Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DevRuntime", {
enumerable: true,
get: function() {
return DevRuntime;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxdevruntime = /*#__PURE__*/ _interop_require_wildcard._(require("react/jsx-dev-runtime"));
const DevRuntime = _jsxdevruntime;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/DevRuntime.ts"],"sourcesContent":["import * as ReactDevRuntime from 'react/jsx-dev-runtime';\nimport type { JSXRuntime } from './types';\n\nexport const DevRuntime = ReactDevRuntime as {\n jsxDEV: JSXRuntime;\n};\n"],"names":["DevRuntime","ReactDevRuntime"],"rangeMappings":";;;;;;;;;;;;","mappings":";;;;+BAGaA;;;eAAAA;;;;yEAHoB;AAG1B,MAAMA,aAAaC"}
+13
View File
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Runtime", {
enumerable: true,
get: function() {
return Runtime;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxruntime = /*#__PURE__*/ _interop_require_wildcard._(require("react/jsx-runtime"));
const Runtime = _jsxruntime;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/Runtime.ts"],"sourcesContent":["import * as ReactRuntime from 'react/jsx-runtime';\nimport type { JSXRuntime } from './types';\n\nexport const Runtime = ReactRuntime as {\n jsx: JSXRuntime;\n jsxs: JSXRuntime;\n};\n"],"names":["Runtime","ReactRuntime"],"rangeMappings":";;;;;;;;;;;;","mappings":";;;;+BAGaA;;;eAAAA;;;;sEAHiB;AAGvB,MAAMA,UAAUC"}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createCompatSlotComponent", {
enumerable: true,
get: function() {
return createCompatSlotComponent;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
function createCompatSlotComponent(type, props) {
return {
...props,
[_reactutilities.SLOT_ELEMENT_TYPE_SYMBOL]: type
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/createCompatSlotComponent.ts"],"sourcesContent":["import * as React from 'react';\nimport { SLOT_ELEMENT_TYPE_SYMBOL } from '@fluentui/react-utilities';\nimport type { SlotComponentType } from '@fluentui/react-utilities';\n\n// TODO:\n// this is for backwards compatibility with getSlotsNext\n// it should be removed once getSlotsNext is obsolete\nexport function createCompatSlotComponent<P extends {}>(type: React.ElementType<P>, props: P): SlotComponentType<P> {\n return {\n ...props,\n [SLOT_ELEMENT_TYPE_SYMBOL]: type,\n } as SlotComponentType<P>;\n}\n"],"names":["createCompatSlotComponent","type","props","SLOT_ELEMENT_TYPE_SYMBOL"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOgBA;;;eAAAA;;;;iEAPO;gCACkB;AAMlC,SAASA,0BAAwCC,IAA0B,EAAEC,KAAQ;IAC1F,OAAO;QACL,GAAGA,KAAK;QACR,CAACC,wCAAwB,CAAC,EAAEF;IAC9B;AACF"}
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getMetadataFromSlotComponent", {
enumerable: true,
get: function() {
return getMetadataFromSlotComponent;
}
});
const _reactutilities = require("@fluentui/react-utilities");
function getMetadataFromSlotComponent(type) {
const { as, [_reactutilities.SLOT_ELEMENT_TYPE_SYMBOL]: baseElementType, [_reactutilities.SLOT_RENDER_FUNCTION_SYMBOL]: renderFunction, ...propsWithoutMetadata } = type;
const props = propsWithoutMetadata;
const elementType = typeof baseElementType === 'string' ? as !== null && as !== void 0 ? as : baseElementType : baseElementType;
if (typeof elementType !== 'string' && as) {
props.as = as;
}
return {
elementType,
props,
renderFunction
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/getMetadataFromSlotComponent.ts"],"sourcesContent":["import type * as React from 'react';\nimport { SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL } from '@fluentui/react-utilities';\nimport type { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\n\n/**\n * @internal\n */\nexport function getMetadataFromSlotComponent<Props extends UnknownSlotProps>(type: SlotComponentType<Props>) {\n const {\n as,\n [SLOT_ELEMENT_TYPE_SYMBOL]: baseElementType,\n [SLOT_RENDER_FUNCTION_SYMBOL]: renderFunction,\n ...propsWithoutMetadata\n } = type;\n const props = propsWithoutMetadata as UnknownSlotProps as Props;\n\n const elementType = (\n typeof baseElementType === 'string' ? as ?? baseElementType : baseElementType\n ) as React.ElementType<Props>;\n\n if (typeof elementType !== 'string' && as) {\n props.as = as;\n }\n return { elementType, props, renderFunction };\n}\n"],"names":["getMetadataFromSlotComponent","type","as","SLOT_ELEMENT_TYPE_SYMBOL","baseElementType","SLOT_RENDER_FUNCTION_SYMBOL","renderFunction","propsWithoutMetadata","props","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOgBA;;;eAAAA;;;gCANsD;AAM/D,SAASA,6BAA6DC,IAA8B;IACzG,MAAM,EACJC,EAAE,EACF,CAACC,wCAAwB,CAAC,EAAEC,eAAe,EAC3C,CAACC,2CAA2B,CAAC,EAAEC,cAAc,EAC7C,GAAGC,sBACJ,GAAGN;IACJ,MAAMO,QAAQD;IAEd,MAAME,cACJ,OAAOL,oBAAoB,WAAWF,eAAAA,gBAAAA,KAAME,kBAAkBA;IAGhE,IAAI,OAAOK,gBAAgB,YAAYP,IAAI;QACzCM,MAAMN,EAAE,GAAGA;IACb;IACA,OAAO;QAAEO;QAAaD;QAAOF;IAAe;AAC9C"}
+4
View File
@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"rangeMappings":"","mappings":""}
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "warnIfElementTypeIsInvalid", {
enumerable: true,
get: function() {
return warnIfElementTypeIsInvalid;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactis = require("react-is");
function warnIfElementTypeIsInvalid(type) {
if (process.env.NODE_ENV === 'development' && typeof type === 'object' && !(0, _reactis.isValidElementType)(type)) {
// eslint-disable-next-line no-console
console.error(`@fluentui/react-jsx-runtime:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ${type}.
If this happened in a slot of Fluent UI component, you might be facing package resolution issues.
Please make sure you don't have multiple versions of "@fluentui/react-utilities" installed in your dependencies or sub-dependencies.
You can check this by searching up for matching entries in a lockfile produced by your package manager (yarn.lock, pnpm-lock.yaml or package-lock.json).`);
}
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/warnIfElementTypeIsInvalid.ts"],"sourcesContent":["import * as React from 'react';\nimport { isValidElementType } from 'react-is';\n\nexport function warnIfElementTypeIsInvalid(type: React.ElementType) {\n if (process.env.NODE_ENV === 'development' && typeof type === 'object' && !isValidElementType(type)) {\n // eslint-disable-next-line no-console\n console.error(/** #__DE-INDENT__ */ `\n @fluentui/react-jsx-runtime:\n Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ${type}.\n\n If this happened in a slot of Fluent UI component, you might be facing package resolution issues.\n Please make sure you don't have multiple versions of \"@fluentui/react-utilities\" installed in your dependencies or sub-dependencies.\n You can check this by searching up for matching entries in a lockfile produced by your package manager (yarn.lock, pnpm-lock.yaml or package-lock.json).\n `);\n }\n}\n"],"names":["warnIfElementTypeIsInvalid","type","process","env","NODE_ENV","isValidElementType","console","error"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;yBACY;AAE5B,SAASA,2BAA2BC,IAAuB;IAChE,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,iBAAiB,OAAOH,SAAS,YAAY,CAACI,IAAAA,2BAAkB,EAACJ,OAAO;QACnG,sCAAsC;QACtCK,QAAQC,KAAK,CAAuB,CAAC;6HAE4F,EAAEN,KAAK;;;;wJAKtI,CAAC;IACL;AACF"}