@fluentui/react-jsx-runtime 9.0.2 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +43 -1
- package/CHANGELOG.md +22 -2
- package/lib/createElement.js.map +1 -1
- package/lib/jsx/createElementFromSlotComponent.js +1 -1
- package/lib/jsx/createElementFromSlotComponent.js.map +1 -1
- package/lib/jsx/createJSX.js +1 -1
- package/lib/jsx/createJSX.js.map +1 -1
- package/lib/utils/createCompatSlotComponent.js.map +1 -1
- package/lib/utils/getMetadataFromSlotComponent.js +1 -1
- package/lib/utils/getMetadataFromSlotComponent.js.map +1 -1
- package/lib-commonjs/createElement.js +8 -6
- package/lib-commonjs/createElement.js.map +1 -1
- package/lib-commonjs/index.js +6 -2
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/jsx/createElementFromSlotComponent.js +6 -4
- package/lib-commonjs/jsx/createElementFromSlotComponent.js.map +1 -1
- package/lib-commonjs/jsx/createJSX.js +9 -7
- package/lib-commonjs/jsx/createJSX.js.map +1 -1
- package/lib-commonjs/jsx-dev-runtime.js +8 -4
- package/lib-commonjs/jsx-dev-runtime.js.map +1 -1
- package/lib-commonjs/jsx-runtime.js +12 -6
- package/lib-commonjs/jsx-runtime.js.map +1 -1
- package/lib-commonjs/utils/DevRuntime.js +6 -4
- package/lib-commonjs/utils/DevRuntime.js.map +1 -1
- package/lib-commonjs/utils/Runtime.js +6 -4
- package/lib-commonjs/utils/Runtime.js.map +1 -1
- package/lib-commonjs/utils/createCompatSlotComponent.js +7 -5
- package/lib-commonjs/utils/createCompatSlotComponent.js.map +1 -1
- package/lib-commonjs/utils/getMetadataFromSlotComponent.js +5 -3
- package/lib-commonjs/utils/getMetadataFromSlotComponent.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,49 @@
|
|
|
2
2
|
"name": "@fluentui/react-jsx-runtime",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 05 Sep 2023 13:23:29 GMT",
|
|
6
|
+
"tag": "@fluentui/react-jsx-runtime_v9.0.4",
|
|
7
|
+
"version": "9.0.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
13
|
+
"commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
|
|
14
|
+
"comment": "bumps @swc/helpers version to 0.5.1"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
18
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
19
|
+
"commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
|
|
20
|
+
"comment": "bumps react peer dependencies to v16.14.0"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
25
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.1",
|
|
26
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Tue, 29 Aug 2023 12:57:36 GMT",
|
|
33
|
+
"tag": "@fluentui/react-jsx-runtime_v9.0.3",
|
|
34
|
+
"version": "9.0.3",
|
|
35
|
+
"comments": {
|
|
36
|
+
"patch": [
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
40
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.0",
|
|
41
|
+
"commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"date": "Thu, 24 Aug 2023 10:26:33 GMT",
|
|
6
48
|
"tag": "@fluentui/react-jsx-runtime_v9.0.2",
|
|
7
49
|
"version": "9.0.2",
|
|
8
50
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-jsx-runtime
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 05 Sep 2023 13:23:29 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.4)
|
|
8
|
+
|
|
9
|
+
Tue, 05 Sep 2023 13:23:29 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.3..@fluentui/react-jsx-runtime_v9.0.4)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- bumps react peer dependencies to v16.14.0 ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
|
|
16
|
+
- Bump @fluentui/react-utilities to v9.13.1 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
17
|
+
|
|
18
|
+
## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.3)
|
|
19
|
+
|
|
20
|
+
Tue, 29 Aug 2023 12:57:36 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.2..@fluentui/react-jsx-runtime_v9.0.3)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- Bump @fluentui/react-utilities to v9.13.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
|
|
26
|
+
|
|
7
27
|
## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.2)
|
|
8
28
|
|
|
9
|
-
Thu, 24 Aug 2023 10:
|
|
29
|
+
Thu, 24 Aug 2023 10:26:33 GMT
|
|
10
30
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.1..@fluentui/react-jsx-runtime_v9.0.2)
|
|
11
31
|
|
|
12
32
|
### Patches
|
package/lib/createElement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { isSlot } from '@fluentui/react-utilities';\nimport { createElementFromSlotComponent } from './jsx/createElementFromSlotComponent';\nimport { createCompatSlotComponent } from './utils/createCompatSlotComponent';\n\nexport function createElement<P extends {}>(\n type: React.ElementType<P>,\n props?: P | null,\n ...children: React.ReactNode[]\n): React.ReactElement<P> {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot<P>(props)) {\n return createElementFromSlotComponent(createCompatSlotComponent(type, props), children);\n }\n if (isSlot<P>(type)) {\n return createElementFromSlotComponent(type, children);\n }\n return React.createElement(type, props, ...children);\n}\n"],"names":["React","isSlot","createElementFromSlotComponent","createCompatSlotComponent","createElement","type","props","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,8BAA8B,QAAQ,uCAAuC;AACtF,SAASC,yBAAyB,QAAQ,oCAAoC;AAE9E,OAAO,SAASC,cACdC,IAA0B,EAC1BC,KAAgB,EAChB,GAAGC,QAA2B
|
|
1
|
+
{"version":3,"sources":["createElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { isSlot } from '@fluentui/react-utilities';\nimport { createElementFromSlotComponent } from './jsx/createElementFromSlotComponent';\nimport { createCompatSlotComponent } from './utils/createCompatSlotComponent';\n\nexport function createElement<P extends {}>(\n type: React.ElementType<P>,\n props?: P | null,\n ...children: React.ReactNode[]\n): React.ReactElement<P> {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot<P>(props)) {\n return createElementFromSlotComponent(createCompatSlotComponent(type, props), children);\n }\n if (isSlot<P>(type)) {\n return createElementFromSlotComponent(type, children);\n }\n return React.createElement(type, props, ...children);\n}\n"],"names":["React","isSlot","createElementFromSlotComponent","createCompatSlotComponent","createElement","type","props","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,8BAA8B,QAAQ,uCAAuC;AACtF,SAASC,yBAAyB,QAAQ,oCAAoC;AAE9E,OAAO,SAASC,cACdC,IAA0B,EAC1BC,KAAgB,EAChB,GAAGC,QAA2B;IAE9B,QAAQ;IACR,wDAAwD;IACxD,qDAAqD;IACrD,IAAIN,OAAUK,QAAQ;QACpB,OAAOJ,+BAA+BC,0BAA0BE,MAAMC,QAAQC;IAChF;IACA,IAAIN,OAAUI,OAAO;QACnB,OAAOH,+BAA+BG,MAAME;IAC9C;IACA,OAAOP,MAAMI,aAAa,CAACC,MAAMC,UAAUC;AAC7C"}
|
|
@@ -4,7 +4,7 @@ import { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotCompon
|
|
|
4
4
|
* @internal
|
|
5
5
|
* creates a ReactElement from a slot declaration
|
|
6
6
|
*/ export function createElementFromSlotComponent(type, overrideChildren) {
|
|
7
|
-
const { elementType
|
|
7
|
+
const { elementType, renderFunction, props } = getMetadataFromSlotComponent(type);
|
|
8
8
|
if (renderFunction) {
|
|
9
9
|
if (overrideChildren.length > 0) {
|
|
10
10
|
props.children = React.createElement(React.Fragment, {}, ...overrideChildren);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createElementFromSlotComponent.ts"],"sourcesContent":["import * as React from 'react';\nimport type { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\n\n/**\n * @internal\n * creates a ReactElement from a slot declaration\n */\nexport function createElementFromSlotComponent<Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideChildren: React.ReactNode[],\n): React.ReactElement<Props> {\n const { elementType, renderFunction, props } = getMetadataFromSlotComponent(type);\n\n if (renderFunction) {\n if (overrideChildren.length > 0) {\n props.children = React.createElement(React.Fragment, {}, ...overrideChildren);\n }\n\n return React.createElement(\n React.Fragment,\n {},\n renderFunction(elementType as React.ElementType<Props>, props),\n ) as React.ReactElement<Props>;\n }\n\n return React.createElement(elementType, props, ...overrideChildren);\n}\n"],"names":["React","getMetadataFromSlotComponent","createElementFromSlotComponent","type","overrideChildren","elementType","renderFunction","props","length","children","createElement","Fragment"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,wCAAwC;AAErF;;;CAGC,GACD,OAAO,SAASC,+BACdC,IAA8B,EAC9BC,gBAAmC
|
|
1
|
+
{"version":3,"sources":["createElementFromSlotComponent.ts"],"sourcesContent":["import * as React from 'react';\nimport type { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\n\n/**\n * @internal\n * creates a ReactElement from a slot declaration\n */\nexport function createElementFromSlotComponent<Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideChildren: React.ReactNode[],\n): React.ReactElement<Props> {\n const { elementType, renderFunction, props } = getMetadataFromSlotComponent(type);\n\n if (renderFunction) {\n if (overrideChildren.length > 0) {\n props.children = React.createElement(React.Fragment, {}, ...overrideChildren);\n }\n\n return React.createElement(\n React.Fragment,\n {},\n renderFunction(elementType as React.ElementType<Props>, props),\n ) as React.ReactElement<Props>;\n }\n\n return React.createElement(elementType, props, ...overrideChildren);\n}\n"],"names":["React","getMetadataFromSlotComponent","createElementFromSlotComponent","type","overrideChildren","elementType","renderFunction","props","length","children","createElement","Fragment"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,wCAAwC;AAErF;;;CAGC,GACD,OAAO,SAASC,+BACdC,IAA8B,EAC9BC,gBAAmC;IAEnC,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGN,6BAA6BE;IAE5E,IAAIG,gBAAgB;QAClB,IAAIF,iBAAiBI,MAAM,GAAG,GAAG;YAC/BD,MAAME,QAAQ,GAAGT,MAAMU,aAAa,CAACV,MAAMW,QAAQ,EAAE,CAAC,MAAMP;QAC9D;QAEA,OAAOJ,MAAMU,aAAa,CACxBV,MAAMW,QAAQ,EACd,CAAC,GACDL,eAAeD,aAAyCE;IAE5D;IAEA,OAAOP,MAAMU,aAAa,CAACL,aAAaE,UAAUH;AACpD"}
|
package/lib/jsx/createJSX.js
CHANGED
|
@@ -6,7 +6,7 @@ import { createCompatSlotComponent } from '../utils/createCompatSlotComponent';
|
|
|
6
6
|
* @internal
|
|
7
7
|
*/ export const createJSX = (runtime)=>{
|
|
8
8
|
const jsxFromSlotComponent = (type, overrideProps, key, source, self)=>{
|
|
9
|
-
const { elementType
|
|
9
|
+
const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);
|
|
10
10
|
const props = {
|
|
11
11
|
...slotProps,
|
|
12
12
|
...overrideProps
|
package/lib/jsx/createJSX.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createJSX.ts"],"sourcesContent":["import * as React from 'react';\nimport { isSlot, type SlotComponentType, type UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport type { JSXRuntime } from '../utils/types';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\n\n/**\n * @internal\n */\nexport const createJSX = (runtime: JSXRuntime) => {\n const jsxFromSlotComponent = <Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n source?: unknown,\n self?: unknown,\n ): React.ReactElement<Props> => {\n const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);\n\n const props: Props = { ...slotProps, ...overrideProps };\n\n if (renderFunction) {\n return runtime(\n React.Fragment,\n {\n children: renderFunction(elementType, props),\n },\n key,\n source,\n self,\n ) as React.ReactElement<Props>;\n }\n return runtime(elementType, props, key, source, self);\n };\n\n return <Props extends {}>(\n type: React.ElementType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n source?: unknown,\n self?: unknown,\n ): React.ReactElement<Props> => {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot<Props>(overrideProps)) {\n return jsxFromSlotComponent(createCompatSlotComponent(type, overrideProps), null, key, source, self);\n }\n if (isSlot<Props>(type)) {\n return jsxFromSlotComponent(type, overrideProps, key, source, self);\n }\n return runtime(type, overrideProps, key, source, self);\n };\n};\n"],"names":["React","isSlot","getMetadataFromSlotComponent","createCompatSlotComponent","createJSX","runtime","jsxFromSlotComponent","type","overrideProps","key","source","self","elementType","renderFunction","props","slotProps","Fragment","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAuD,4BAA4B;AAClG,SAASC,4BAA4B,QAAQ,wCAAwC;AAErF,SAASC,yBAAyB,QAAQ,qCAAqC;AAE/E;;CAEC,GACD,OAAO,MAAMC,YAAY,CAACC
|
|
1
|
+
{"version":3,"sources":["createJSX.ts"],"sourcesContent":["import * as React from 'react';\nimport { isSlot, type SlotComponentType, type UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport type { JSXRuntime } from '../utils/types';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\n\n/**\n * @internal\n */\nexport const createJSX = (runtime: JSXRuntime) => {\n const jsxFromSlotComponent = <Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n source?: unknown,\n self?: unknown,\n ): React.ReactElement<Props> => {\n const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);\n\n const props: Props = { ...slotProps, ...overrideProps };\n\n if (renderFunction) {\n return runtime(\n React.Fragment,\n {\n children: renderFunction(elementType, props),\n },\n key,\n source,\n self,\n ) as React.ReactElement<Props>;\n }\n return runtime(elementType, props, key, source, self);\n };\n\n return <Props extends {}>(\n type: React.ElementType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n source?: unknown,\n self?: unknown,\n ): React.ReactElement<Props> => {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot<Props>(overrideProps)) {\n return jsxFromSlotComponent(createCompatSlotComponent(type, overrideProps), null, key, source, self);\n }\n if (isSlot<Props>(type)) {\n return jsxFromSlotComponent(type, overrideProps, key, source, self);\n }\n return runtime(type, overrideProps, key, source, self);\n };\n};\n"],"names":["React","isSlot","getMetadataFromSlotComponent","createCompatSlotComponent","createJSX","runtime","jsxFromSlotComponent","type","overrideProps","key","source","self","elementType","renderFunction","props","slotProps","Fragment","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAuD,4BAA4B;AAClG,SAASC,4BAA4B,QAAQ,wCAAwC;AAErF,SAASC,yBAAyB,QAAQ,qCAAqC;AAE/E;;CAEC,GACD,OAAO,MAAMC,YAAY,CAACC;IACxB,MAAMC,uBAAuB,CAC3BC,MACAC,eACAC,KACAC,QACAC;QAEA,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,OAAOC,SAAS,EAAE,GAAGb,6BAA6BK;QAEvF,MAAMO,QAAe;YAAE,GAAGC,SAAS;YAAE,GAAGP,aAAa;QAAC;QAEtD,IAAIK,gBAAgB;YAClB,OAAOR,QACLL,MAAMgB,QAAQ,EACd;gBACEC,UAAUJ,eAAeD,aAAaE;YACxC,GACAL,KACAC,QACAC;QAEJ;QACA,OAAON,QAAQO,aAAaE,OAAOL,KAAKC,QAAQC;IAClD;IAEA,OAAO,CACLJ,MACAC,eACAC,KACAC,QACAC;QAEA,QAAQ;QACR,wDAAwD;QACxD,qDAAqD;QACrD,IAAIV,OAAcO,gBAAgB;YAChC,OAAOF,qBAAqBH,0BAA0BI,MAAMC,gBAAgB,MAAMC,KAAKC,QAAQC;QACjG;QACA,IAAIV,OAAcM,OAAO;YACvB,OAAOD,qBAAqBC,MAAMC,eAAeC,KAAKC,QAAQC;QAChE;QACA,OAAON,QAAQE,MAAMC,eAAeC,KAAKC,QAAQC;IACnD;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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":["React","SLOT_ELEMENT_TYPE_SYMBOL","createCompatSlotComponent","type","props"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,4BAA4B;AAGrE,QAAQ;AACR,wDAAwD;AACxD,qDAAqD;AACrD,OAAO,SAASC,0BAAwCC,IAA0B,EAAEC,KAAQ
|
|
1
|
+
{"version":3,"sources":["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":["React","SLOT_ELEMENT_TYPE_SYMBOL","createCompatSlotComponent","type","props"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,4BAA4B;AAGrE,QAAQ;AACR,wDAAwD;AACxD,qDAAqD;AACrD,OAAO,SAASC,0BAAwCC,IAA0B,EAAEC,KAAQ;IAC1F,OAAO;QACL,GAAGA,KAAK;QACR,CAACH,yBAAyB,EAAEE;IAC9B;AACF"}
|
|
@@ -2,7 +2,7 @@ import { SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL } from '@fluentui
|
|
|
2
2
|
/**
|
|
3
3
|
* @internal
|
|
4
4
|
*/ export function getMetadataFromSlotComponent(type) {
|
|
5
|
-
const { as
|
|
5
|
+
const { as, [SLOT_ELEMENT_TYPE_SYMBOL]: baseElementType, [SLOT_RENDER_FUNCTION_SYMBOL]: renderFunction, ...propsWithoutMetadata } = type;
|
|
6
6
|
const props = propsWithoutMetadata;
|
|
7
7
|
const elementType = typeof baseElementType === 'string' ? as !== null && as !== void 0 ? as : baseElementType : baseElementType;
|
|
8
8
|
if (typeof elementType !== 'string' && as) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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":["SLOT_ELEMENT_TYPE_SYMBOL","SLOT_RENDER_FUNCTION_SYMBOL","getMetadataFromSlotComponent","type","as","baseElementType","renderFunction","propsWithoutMetadata","props","elementType"],"mappings":"AACA,SAASA,wBAAwB,EAAEC,2BAA2B,QAAQ,4BAA4B;AAGlG;;CAEC,GACD,OAAO,SAASC,6BAA6DC,IAA8B
|
|
1
|
+
{"version":3,"sources":["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":["SLOT_ELEMENT_TYPE_SYMBOL","SLOT_RENDER_FUNCTION_SYMBOL","getMetadataFromSlotComponent","type","as","baseElementType","renderFunction","propsWithoutMetadata","props","elementType"],"mappings":"AACA,SAASA,wBAAwB,EAAEC,2BAA2B,QAAQ,4BAA4B;AAGlG;;CAEC,GACD,OAAO,SAASC,6BAA6DC,IAA8B;IACzG,MAAM,EACJC,EAAE,EACF,CAACJ,yBAAyB,EAAEK,eAAe,EAC3C,CAACJ,4BAA4B,EAAEK,cAAc,EAC7C,GAAGC,sBACJ,GAAGJ;IACJ,MAAMK,QAAQD;IAEd,MAAME,cACJ,OAAOJ,oBAAoB,WAAWD,eAAAA,gBAAAA,KAAMC,kBAAkBA;IAGhE,IAAI,OAAOI,gBAAgB,YAAYL,IAAI;QACzCI,MAAMJ,EAAE,GAAGA;IACb;IACA,OAAO;QAAEK;QAAaD;QAAOF;IAAe;AAC9C"}
|
|
@@ -4,21 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "createElement", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return createElement;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/
|
|
11
|
-
const
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
12
14
|
const _createElementFromSlotComponent = require("./jsx/createElementFromSlotComponent");
|
|
13
15
|
const _createCompatSlotComponent = require("./utils/createCompatSlotComponent");
|
|
14
16
|
function createElement(type, props, ...children) {
|
|
15
17
|
// TODO:
|
|
16
18
|
// this is for backwards compatibility with getSlotsNext
|
|
17
19
|
// it should be removed once getSlotsNext is obsolete
|
|
18
|
-
if ((0,
|
|
20
|
+
if ((0, _reactutilities.isSlot)(props)) {
|
|
19
21
|
return (0, _createElementFromSlotComponent.createElementFromSlotComponent)((0, _createCompatSlotComponent.createCompatSlotComponent)(type, props), children);
|
|
20
22
|
}
|
|
21
|
-
if ((0,
|
|
23
|
+
if ((0, _reactutilities.isSlot)(type)) {
|
|
22
24
|
return (0, _createElementFromSlotComponent.createElementFromSlotComponent)(type, children);
|
|
23
25
|
}
|
|
24
26
|
return /*#__PURE__*/ _react.createElement(type, props, ...children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createElement.js"],"sourcesContent":["import * as React from 'react';\nimport { isSlot } from '@fluentui/react-utilities';\nimport { createElementFromSlotComponent } from './jsx/createElementFromSlotComponent';\nimport { createCompatSlotComponent } from './utils/createCompatSlotComponent';\nexport function createElement(type, props, ...children) {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot(props)) {\n return createElementFromSlotComponent(createCompatSlotComponent(type, props), children);\n }\n if (isSlot(type)) {\n return createElementFromSlotComponent(type, children);\n }\n return React.createElement(type, props, ...children);\n}\n"],"names":["createElement","type","props","children","isSlot","createElementFromSlotComponent","createCompatSlotComponent","React"],"mappings":";;;;+BAIgBA
|
|
1
|
+
{"version":3,"sources":["createElement.js"],"sourcesContent":["import * as React from 'react';\nimport { isSlot } from '@fluentui/react-utilities';\nimport { createElementFromSlotComponent } from './jsx/createElementFromSlotComponent';\nimport { createCompatSlotComponent } from './utils/createCompatSlotComponent';\nexport function createElement(type, props, ...children) {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot(props)) {\n return createElementFromSlotComponent(createCompatSlotComponent(type, props), children);\n }\n if (isSlot(type)) {\n return createElementFromSlotComponent(type, children);\n }\n return React.createElement(type, props, ...children);\n}\n"],"names":["createElement","type","props","children","isSlot","createElementFromSlotComponent","createCompatSlotComponent","React"],"mappings":";;;;+BAIgBA;;;eAAAA;;;;iEAJO;gCACA;gDACwB;2CACL;AACnC,SAASA,cAAcC,IAAI,EAAEC,KAAK,EAAE,GAAGC,QAAQ;IAClD,QAAQ;IACR,wDAAwD;IACxD,qDAAqD;IACrD,IAAIC,IAAAA,sBAAM,EAACF,QAAQ;QACf,OAAOG,IAAAA,8DAA8B,EAACC,IAAAA,oDAAyB,EAACL,MAAMC,QAAQC;IAClF;IACA,IAAIC,IAAAA,sBAAM,EAACH,OAAO;QACd,OAAOI,IAAAA,8DAA8B,EAACJ,MAAME;IAChD;IACA,qBAAOI,OAAMP,aAAa,CAACC,MAAMC,UAAUC;AAC/C"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -9,8 +9,12 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
createElement: ()
|
|
13
|
-
|
|
12
|
+
createElement: function() {
|
|
13
|
+
return _createElement.createElement;
|
|
14
|
+
},
|
|
15
|
+
Fragment: function() {
|
|
16
|
+
return _react.Fragment;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
19
|
const _createElement = require("./createElement");
|
|
16
20
|
const _react = require("react");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { createElement } from './createElement';\nexport { Fragment } from 'react';\n"],"names":["createElement","Fragment"],"mappings":";;;;;;;;;;;IAASA,aAAa,
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { createElement } from './createElement';\nexport { Fragment } from 'react';\n"],"names":["createElement","Fragment"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IACbC,QAAQ;eAARA,eAAQ;;;+BADa;uBACL"}
|
|
@@ -4,13 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "createElementFromSlotComponent", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return createElementFromSlotComponent;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
11
13
|
const _getMetadataFromSlotComponent = require("../utils/getMetadataFromSlotComponent");
|
|
12
14
|
function createElementFromSlotComponent(type, overrideChildren) {
|
|
13
|
-
const { elementType
|
|
15
|
+
const { elementType, renderFunction, props } = (0, _getMetadataFromSlotComponent.getMetadataFromSlotComponent)(type);
|
|
14
16
|
if (renderFunction) {
|
|
15
17
|
if (overrideChildren.length > 0) {
|
|
16
18
|
props.children = /*#__PURE__*/ _react.createElement(_react.Fragment, {}, ...overrideChildren);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createElementFromSlotComponent.js"],"sourcesContent":["import * as React from 'react';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\n/**\n * @internal\n * creates a ReactElement from a slot declaration\n */ export function createElementFromSlotComponent(type, overrideChildren) {\n const { elementType
|
|
1
|
+
{"version":3,"sources":["createElementFromSlotComponent.js"],"sourcesContent":["import * as React from 'react';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\n/**\n * @internal\n * creates a ReactElement from a slot declaration\n */ export function createElementFromSlotComponent(type, overrideChildren) {\n const { elementType, renderFunction, props } = getMetadataFromSlotComponent(type);\n if (renderFunction) {\n if (overrideChildren.length > 0) {\n props.children = React.createElement(React.Fragment, {}, ...overrideChildren);\n }\n return React.createElement(React.Fragment, {}, renderFunction(elementType, props));\n }\n return React.createElement(elementType, props, ...overrideChildren);\n}\n"],"names":["createElementFromSlotComponent","type","overrideChildren","elementType","renderFunction","props","getMetadataFromSlotComponent","length","children","React","createElement","Fragment"],"mappings":";;;;+BAKoBA;;;eAAAA;;;;iEALG;8CACsB;AAIlC,SAASA,+BAA+BC,IAAI,EAAEC,gBAAgB;IACrE,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGC,IAAAA,0DAA4B,EAACL;IAC5E,IAAIG,gBAAgB;QAChB,IAAIF,iBAAiBK,MAAM,GAAG,GAAG;YAC7BF,MAAMG,QAAQ,iBAAGC,OAAMC,aAAa,CAACD,OAAME,QAAQ,EAAE,CAAC,MAAMT;QAChE;QACA,qBAAOO,OAAMC,aAAa,CAACD,OAAME,QAAQ,EAAE,CAAC,GAAGP,eAAeD,aAAaE;IAC/E;IACA,qBAAOI,OAAMC,aAAa,CAACP,aAAaE,UAAUH;AACtD"}
|
|
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "createJSX", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return createJSX;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/
|
|
11
|
-
const
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
12
14
|
const _getMetadataFromSlotComponent = require("../utils/getMetadataFromSlotComponent");
|
|
13
15
|
const _createCompatSlotComponent = require("../utils/createCompatSlotComponent");
|
|
14
16
|
const createJSX = (runtime)=>{
|
|
15
17
|
const jsxFromSlotComponent = (type, overrideProps, key, source, self)=>{
|
|
16
|
-
const { elementType
|
|
18
|
+
const { elementType, renderFunction, props: slotProps } = (0, _getMetadataFromSlotComponent.getMetadataFromSlotComponent)(type);
|
|
17
19
|
const props = {
|
|
18
20
|
...slotProps,
|
|
19
21
|
...overrideProps
|
|
@@ -29,10 +31,10 @@ const createJSX = (runtime)=>{
|
|
|
29
31
|
// TODO:
|
|
30
32
|
// this is for backwards compatibility with getSlotsNext
|
|
31
33
|
// it should be removed once getSlotsNext is obsolete
|
|
32
|
-
if ((0,
|
|
34
|
+
if ((0, _reactutilities.isSlot)(overrideProps)) {
|
|
33
35
|
return jsxFromSlotComponent((0, _createCompatSlotComponent.createCompatSlotComponent)(type, overrideProps), null, key, source, self);
|
|
34
36
|
}
|
|
35
|
-
if ((0,
|
|
37
|
+
if ((0, _reactutilities.isSlot)(type)) {
|
|
36
38
|
return jsxFromSlotComponent(type, overrideProps, key, source, self);
|
|
37
39
|
}
|
|
38
40
|
return runtime(type, overrideProps, key, source, self);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createJSX.js"],"sourcesContent":["import * as React from 'react';\nimport { isSlot } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\n/**\n * @internal\n */ export const createJSX = (runtime)=>{\n const jsxFromSlotComponent = (type, overrideProps, key, source, self)=>{\n const { elementType
|
|
1
|
+
{"version":3,"sources":["createJSX.js"],"sourcesContent":["import * as React from 'react';\nimport { isSlot } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\n/**\n * @internal\n */ export const createJSX = (runtime)=>{\n const jsxFromSlotComponent = (type, overrideProps, key, source, self)=>{\n const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);\n const props = {\n ...slotProps,\n ...overrideProps\n };\n if (renderFunction) {\n return runtime(React.Fragment, {\n children: renderFunction(elementType, props)\n }, key, source, self);\n }\n return runtime(elementType, props, key, source, self);\n };\n return (type, overrideProps, key, source, self)=>{\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot(overrideProps)) {\n return jsxFromSlotComponent(createCompatSlotComponent(type, overrideProps), null, key, source, self);\n }\n if (isSlot(type)) {\n return jsxFromSlotComponent(type, overrideProps, key, source, self);\n }\n return runtime(type, overrideProps, key, source, self);\n };\n};\n"],"names":["createJSX","runtime","jsxFromSlotComponent","type","overrideProps","key","source","self","elementType","renderFunction","props","slotProps","getMetadataFromSlotComponent","React","Fragment","children","isSlot","createCompatSlotComponent"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;iEANM;gCACA;8CACsB;2CACH;AAG/B,MAAMA,YAAY,CAACC;IAC1B,MAAMC,uBAAuB,CAACC,MAAMC,eAAeC,KAAKC,QAAQC;QAC5D,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,OAAOC,SAAS,EAAE,GAAGC,IAAAA,0DAA4B,EAACT;QACvF,MAAMO,QAAQ;YACV,GAAGC,SAAS;YACZ,GAAGP,aAAa;QACpB;QACA,IAAIK,gBAAgB;YAChB,OAAOR,QAAQY,OAAMC,QAAQ,EAAE;gBAC3BC,UAAUN,eAAeD,aAAaE;YAC1C,GAAGL,KAAKC,QAAQC;QACpB;QACA,OAAON,QAAQO,aAAaE,OAAOL,KAAKC,QAAQC;IACpD;IACA,OAAO,CAACJ,MAAMC,eAAeC,KAAKC,QAAQC;QACtC,QAAQ;QACR,wDAAwD;QACxD,qDAAqD;QACrD,IAAIS,IAAAA,sBAAM,EAACZ,gBAAgB;YACvB,OAAOF,qBAAqBe,IAAAA,oDAAyB,EAACd,MAAMC,gBAAgB,MAAMC,KAAKC,QAAQC;QACnG;QACA,IAAIS,IAAAA,sBAAM,EAACb,OAAO;YACd,OAAOD,qBAAqBC,MAAMC,eAAeC,KAAKC,QAAQC;QAClE;QACA,OAAON,QAAQE,MAAMC,eAAeC,KAAKC,QAAQC;IACrD;AACJ"}
|
|
@@ -9,10 +9,14 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Fragment: ()
|
|
13
|
-
|
|
12
|
+
Fragment: function() {
|
|
13
|
+
return _react.Fragment;
|
|
14
|
+
},
|
|
15
|
+
jsxDEV: function() {
|
|
16
|
+
return jsxDEV;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const
|
|
19
|
+
const _DevRuntime = require("./utils/DevRuntime");
|
|
16
20
|
const _createJSX = require("./jsx/createJSX");
|
|
17
21
|
const _react = require("react");
|
|
18
|
-
const jsxDEV = (0, _createJSX.createJSX)(
|
|
22
|
+
const jsxDEV = (0, _createJSX.createJSX)(_DevRuntime.DevRuntime.jsxDEV);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["jsx-dev-runtime.js"],"sourcesContent":["import { DevRuntime } from './utils/DevRuntime';\nimport { createJSX } from './jsx/createJSX';\nexport { Fragment } from 'react';\nexport const jsxDEV = createJSX(DevRuntime.jsxDEV);\n"],"names":["Fragment","jsxDEV","createJSX","DevRuntime"],"mappings":";;;;;;;;;;;IAESA,QAAQ,
|
|
1
|
+
{"version":3,"sources":["jsx-dev-runtime.js"],"sourcesContent":["import { DevRuntime } from './utils/DevRuntime';\nimport { createJSX } from './jsx/createJSX';\nexport { Fragment } from 'react';\nexport const jsxDEV = createJSX(DevRuntime.jsxDEV);\n"],"names":["Fragment","jsxDEV","createJSX","DevRuntime"],"mappings":";;;;;;;;;;;IAESA,QAAQ;eAARA,eAAQ;;IACJC,MAAM;eAANA;;;4BAHc;2BACD;uBACD;AAClB,MAAMA,SAASC,IAAAA,oBAAS,EAACC,sBAAU,CAACF,MAAM"}
|
|
@@ -9,12 +9,18 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Fragment: ()
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
Fragment: function() {
|
|
13
|
+
return _react.Fragment;
|
|
14
|
+
},
|
|
15
|
+
jsx: function() {
|
|
16
|
+
return jsx;
|
|
17
|
+
},
|
|
18
|
+
jsxs: function() {
|
|
19
|
+
return jsxs;
|
|
20
|
+
}
|
|
15
21
|
});
|
|
16
|
-
const
|
|
22
|
+
const _Runtime = require("./utils/Runtime");
|
|
17
23
|
const _createJSX = require("./jsx/createJSX");
|
|
18
24
|
const _react = require("react");
|
|
19
|
-
const jsx = (0, _createJSX.createJSX)(
|
|
20
|
-
const jsxs = (0, _createJSX.createJSX)(
|
|
25
|
+
const jsx = (0, _createJSX.createJSX)(_Runtime.Runtime.jsx);
|
|
26
|
+
const jsxs = (0, _createJSX.createJSX)(_Runtime.Runtime.jsxs);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["jsx-runtime.js"],"sourcesContent":["import { Runtime } from './utils/Runtime';\nimport { createJSX } from './jsx/createJSX';\nexport { Fragment } from 'react';\nexport const jsx = createJSX(Runtime.jsx);\nexport const jsxs = createJSX(Runtime.jsxs);\n"],"names":["Fragment","jsx","jsxs","createJSX","Runtime"],"mappings":";;;;;;;;;;;IAESA,QAAQ,
|
|
1
|
+
{"version":3,"sources":["jsx-runtime.js"],"sourcesContent":["import { Runtime } from './utils/Runtime';\nimport { createJSX } from './jsx/createJSX';\nexport { Fragment } from 'react';\nexport const jsx = createJSX(Runtime.jsx);\nexport const jsxs = createJSX(Runtime.jsxs);\n"],"names":["Fragment","jsx","jsxs","createJSX","Runtime"],"mappings":";;;;;;;;;;;IAESA,QAAQ;eAARA,eAAQ;;IACJC,GAAG;eAAHA;;IACAC,IAAI;eAAJA;;;yBAJW;2BACE;uBACD;AAClB,MAAMD,MAAME,IAAAA,oBAAS,EAACC,gBAAO,CAACH,GAAG;AACjC,MAAMC,OAAOC,IAAAA,oBAAS,EAACC,gBAAO,CAACF,IAAI"}
|
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "DevRuntime", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return DevRuntime;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const DevRuntime =
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _jsxdevruntime = /*#__PURE__*/ _interop_require_wildcard._(require("react/jsx-dev-runtime"));
|
|
13
|
+
const DevRuntime = _jsxdevruntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DevRuntime.js"],"sourcesContent":["import * as ReactDevRuntime from 'react/jsx-dev-runtime';\nexport const DevRuntime = ReactDevRuntime;\n"],"names":["DevRuntime","ReactDevRuntime"],"mappings":";;;;+BACaA
|
|
1
|
+
{"version":3,"sources":["DevRuntime.js"],"sourcesContent":["import * as ReactDevRuntime from 'react/jsx-dev-runtime';\nexport const DevRuntime = ReactDevRuntime;\n"],"names":["DevRuntime","ReactDevRuntime"],"mappings":";;;;+BACaA;;;eAAAA;;;;yEADoB;AAC1B,MAAMA,aAAaC"}
|
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "Runtime", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return Runtime;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const Runtime =
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _jsxruntime = /*#__PURE__*/ _interop_require_wildcard._(require("react/jsx-runtime"));
|
|
13
|
+
const Runtime = _jsxruntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Runtime.js"],"sourcesContent":["import * as ReactRuntime from 'react/jsx-runtime';\nexport const Runtime = ReactRuntime;\n"],"names":["Runtime","ReactRuntime"],"mappings":";;;;+BACaA
|
|
1
|
+
{"version":3,"sources":["Runtime.js"],"sourcesContent":["import * as ReactRuntime from 'react/jsx-runtime';\nexport const Runtime = ReactRuntime;\n"],"names":["Runtime","ReactRuntime"],"mappings":";;;;+BACaA;;;eAAAA;;;;sEADiB;AACvB,MAAMA,UAAUC"}
|
|
@@ -4,14 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "createCompatSlotComponent", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return createCompatSlotComponent;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
10
|
-
const _react = /*#__PURE__*/
|
|
11
|
-
const
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
12
14
|
function createCompatSlotComponent(type, props) {
|
|
13
15
|
return {
|
|
14
16
|
...props,
|
|
15
|
-
[
|
|
17
|
+
[_reactutilities.SLOT_ELEMENT_TYPE_SYMBOL]: type
|
|
16
18
|
};
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createCompatSlotComponent.js"],"sourcesContent":["import * as React from 'react';\nimport { SLOT_ELEMENT_TYPE_SYMBOL } from '@fluentui/react-utilities';\n// TODO:\n// this is for backwards compatibility with getSlotsNext\n// it should be removed once getSlotsNext is obsolete\nexport function createCompatSlotComponent(type, props) {\n return {\n ...props,\n [SLOT_ELEMENT_TYPE_SYMBOL]: type\n };\n}\n"],"names":["createCompatSlotComponent","type","props","SLOT_ELEMENT_TYPE_SYMBOL"],"mappings":";;;;+BAKgBA
|
|
1
|
+
{"version":3,"sources":["createCompatSlotComponent.js"],"sourcesContent":["import * as React from 'react';\nimport { SLOT_ELEMENT_TYPE_SYMBOL } from '@fluentui/react-utilities';\n// TODO:\n// this is for backwards compatibility with getSlotsNext\n// it should be removed once getSlotsNext is obsolete\nexport function createCompatSlotComponent(type, props) {\n return {\n ...props,\n [SLOT_ELEMENT_TYPE_SYMBOL]: type\n };\n}\n"],"names":["createCompatSlotComponent","type","props","SLOT_ELEMENT_TYPE_SYMBOL"],"mappings":";;;;+BAKgBA;;;eAAAA;;;;iEALO;gCACkB;AAIlC,SAASA,0BAA0BC,IAAI,EAAEC,KAAK;IACjD,OAAO;QACH,GAAGA,KAAK;QACR,CAACC,wCAAwB,CAAC,EAAEF;IAChC;AACJ"}
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "getMetadataFromSlotComponent", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return getMetadataFromSlotComponent;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const
|
|
11
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
10
12
|
function getMetadataFromSlotComponent(type) {
|
|
11
|
-
const { as
|
|
13
|
+
const { as, [_reactutilities.SLOT_ELEMENT_TYPE_SYMBOL]: baseElementType, [_reactutilities.SLOT_RENDER_FUNCTION_SYMBOL]: renderFunction, ...propsWithoutMetadata } = type;
|
|
12
14
|
const props = propsWithoutMetadata;
|
|
13
15
|
const elementType = typeof baseElementType === 'string' ? as !== null && as !== void 0 ? as : baseElementType : baseElementType;
|
|
14
16
|
if (typeof elementType !== 'string' && as) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["getMetadataFromSlotComponent.js"],"sourcesContent":["import { SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL } from '@fluentui/react-utilities';\n/**\n * @internal\n */ export function getMetadataFromSlotComponent(type) {\n const { as
|
|
1
|
+
{"version":3,"sources":["getMetadataFromSlotComponent.js"],"sourcesContent":["import { SLOT_ELEMENT_TYPE_SYMBOL, SLOT_RENDER_FUNCTION_SYMBOL } from '@fluentui/react-utilities';\n/**\n * @internal\n */ export function getMetadataFromSlotComponent(type) {\n const { as, [SLOT_ELEMENT_TYPE_SYMBOL]: baseElementType, [SLOT_RENDER_FUNCTION_SYMBOL]: renderFunction, ...propsWithoutMetadata } = type;\n const props = propsWithoutMetadata;\n const elementType = typeof baseElementType === 'string' ? as !== null && as !== void 0 ? as : baseElementType : baseElementType;\n if (typeof elementType !== 'string' && as) {\n props.as = as;\n }\n return {\n elementType,\n props,\n renderFunction\n };\n}\n"],"names":["getMetadataFromSlotComponent","type","as","SLOT_ELEMENT_TYPE_SYMBOL","baseElementType","SLOT_RENDER_FUNCTION_SYMBOL","renderFunction","propsWithoutMetadata","props","elementType"],"mappings":";;;;+BAGoBA;;;eAAAA;;;gCAHkD;AAG3D,SAASA,6BAA6BC,IAAI;IACjD,MAAM,EAAEC,EAAE,EAAE,CAACC,wCAAwB,CAAC,EAAEC,eAAe,EAAE,CAACC,2CAA2B,CAAC,EAAEC,cAAc,EAAE,GAAGC,sBAAsB,GAAGN;IACpI,MAAMO,QAAQD;IACd,MAAME,cAAc,OAAOL,oBAAoB,WAAWF,OAAO,QAAQA,OAAO,KAAK,IAAIA,KAAKE,kBAAkBA;IAChH,IAAI,OAAOK,gBAAgB,YAAYP,IAAI;QACvCM,MAAMN,EAAE,GAAGA;IACf;IACA,OAAO;QACHO;QACAD;QACAF;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-jsx-runtime",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "Custom JSX runtime for @fluentui/react-components",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fluentui/react-utilities": "^9.
|
|
35
|
-
"@swc/helpers": "^0.
|
|
34
|
+
"@fluentui/react-utilities": "^9.13.1",
|
|
35
|
+
"@swc/helpers": "^0.5.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@types/react": ">=16.
|
|
39
|
-
"react": ">=16.
|
|
38
|
+
"@types/react": ">=16.14.0 <19.0.0",
|
|
39
|
+
"react": ">=16.14.0 <19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"beachball": {
|
|
42
42
|
"disallowedChangeTypes": [
|