@fluentui/react-jsx-runtime 9.0.16 → 9.0.18
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 +31 -1
- package/CHANGELOG.md +20 -2
- package/lib/jsx/createJSX.js +5 -1
- package/lib/jsx/createJSX.js.map +1 -1
- package/lib/utils/warnIfElementTypeIsInvalid.js +13 -0
- package/lib/utils/warnIfElementTypeIsInvalid.js.map +1 -0
- package/lib-commonjs/jsx/createJSX.js +5 -1
- package/lib-commonjs/jsx/createJSX.js.map +1 -1
- package/lib-commonjs/utils/warnIfElementTypeIsInvalid.js +24 -0
- package/lib-commonjs/utils/warnIfElementTypeIsInvalid.js.map +1 -0
- package/package.json +3 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui/react-jsx-runtime",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed,
|
|
5
|
+
"date": "Wed, 18 Oct 2023 17:47:37 GMT",
|
|
6
|
+
"tag": "@fluentui/react-jsx-runtime_v9.0.18",
|
|
7
|
+
"version": "9.0.18",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
13
|
+
"comment": "Bump @fluentui/react-utilities to v9.15.1",
|
|
14
|
+
"commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 12 Oct 2023 14:55:44 GMT",
|
|
21
|
+
"tag": "@fluentui/react-jsx-runtime_v9.0.17",
|
|
22
|
+
"version": "9.0.17",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
27
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
28
|
+
"commit": "c5a97ca5b00df131ed12af2526953f5a4354ae66",
|
|
29
|
+
"comment": "chore: add warning for resolution problems"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Wed, 11 Oct 2023 13:54:26 GMT",
|
|
6
36
|
"tag": "@fluentui/react-jsx-runtime_v9.0.16",
|
|
7
37
|
"version": "9.0.16",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-jsx-runtime
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 18 Oct 2023 17:47:37 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.18)
|
|
8
|
+
|
|
9
|
+
Wed, 18 Oct 2023 17:47:37 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.17..@fluentui/react-jsx-runtime_v9.0.18)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-utilities to v9.15.1 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
|
|
15
|
+
|
|
16
|
+
## [9.0.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.17)
|
|
17
|
+
|
|
18
|
+
Thu, 12 Oct 2023 14:55:44 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.16..@fluentui/react-jsx-runtime_v9.0.17)
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- chore: add warning for resolution problems ([PR #29434](https://github.com/microsoft/fluentui/pull/29434) by bernardo.sunderhus@gmail.com)
|
|
24
|
+
|
|
7
25
|
## [9.0.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.16)
|
|
8
26
|
|
|
9
|
-
Wed, 11 Oct 2023 13:
|
|
27
|
+
Wed, 11 Oct 2023 13:54:26 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.15..@fluentui/react-jsx-runtime_v9.0.16)
|
|
11
29
|
|
|
12
30
|
### Patches
|
package/lib/jsx/createJSX.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isSlot } from '@fluentui/react-utilities';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { createCompatSlotComponent } from '../utils/createCompatSlotComponent';
|
|
4
|
-
|
|
4
|
+
import { warnIfElementTypeIsInvalid } from '../utils/warnIfElementTypeIsInvalid';
|
|
5
|
+
export function createJSX(runtime, slotRuntime) {
|
|
6
|
+
return function jsx(type, overrideProps, key, source, self) {
|
|
5
7
|
// TODO:
|
|
6
8
|
// this is for backwards compatibility with getSlotsNext
|
|
7
9
|
// it should be removed once getSlotsNext is obsolete
|
|
@@ -11,5 +13,7 @@ export const createJSX = (runtime, slotRuntime)=>(type, overrideProps, key, sour
|
|
|
11
13
|
if (isSlot(type)) {
|
|
12
14
|
return slotRuntime(type, overrideProps, key, source, self);
|
|
13
15
|
}
|
|
16
|
+
warnIfElementTypeIsInvalid(type);
|
|
14
17
|
return runtime(type, overrideProps, key, source, self);
|
|
15
18
|
};
|
|
19
|
+
}
|
package/lib/jsx/createJSX.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createJSX.ts"],"sourcesContent":["import { isSlot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\nimport { JSXRuntime, JSXSlotRuntime } from '../utils/types';\n\nexport
|
|
1
|
+
{"version":3,"sources":["createJSX.ts"],"sourcesContent":["import { isSlot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\nimport { JSXRuntime, JSXSlotRuntime } from '../utils/types';\nimport { warnIfElementTypeIsInvalid } from '../utils/warnIfElementTypeIsInvalid';\n\nexport function createJSX(runtime: JSXRuntime, slotRuntime: JSXSlotRuntime) {\n return function jsx<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 slotRuntime<Props>(createCompatSlotComponent(type, overrideProps), null, key, source, self);\n }\n if (isSlot<Props>(type)) {\n return slotRuntime(type, overrideProps, key, source, self);\n }\n warnIfElementTypeIsInvalid(type);\n return runtime(type, overrideProps, key, source, self);\n };\n}\n"],"names":["isSlot","React","createCompatSlotComponent","warnIfElementTypeIsInvalid","createJSX","runtime","slotRuntime","jsx","type","overrideProps","key","source","self"],"mappings":"AAAA,SAASA,MAAM,QAAQ,4BAA4B;AACnD,YAAYC,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qCAAqC;AAE/E,SAASC,0BAA0B,QAAQ,sCAAsC;AAEjF,OAAO,SAASC,UAAUC,OAAmB,EAAEC,WAA2B;IACxE,OAAO,SAASC,IACdC,IAA8B,EAC9BC,aAA2B,EAC3BC,GAAe,EACfC,MAAgB,EAChBC,IAAc;QAEd,QAAQ;QACR,wDAAwD;QACxD,qDAAqD;QACrD,IAAIZ,OAAcS,gBAAgB;YAChC,OAAOH,YAAmBJ,0BAA0BM,MAAMC,gBAAgB,MAAMC,KAAKC,QAAQC;QAC/F;QACA,IAAIZ,OAAcQ,OAAO;YACvB,OAAOF,YAAYE,MAAMC,eAAeC,KAAKC,QAAQC;QACvD;QACAT,2BAA2BK;QAC3B,OAAOH,QAAQG,MAAMC,eAAeC,KAAKC,QAAQC;IACnD;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { isValidElementType } from 'react-is';
|
|
3
|
+
export function warnIfElementTypeIsInvalid(type) {
|
|
4
|
+
if (typeof type === 'object' && !isValidElementType(type) && process.env.NODE_ENV === 'development') {
|
|
5
|
+
// eslint-disable-next-line no-console
|
|
6
|
+
console.error(`@fluentui/react-jsx-runtime:
|
|
7
|
+
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ${type}.
|
|
8
|
+
|
|
9
|
+
If this happened in a slot of Fluent UI component, you might be facing package resolution issues.
|
|
10
|
+
Please make sure you don't have multiple versions of "@fluentui/react-utilities" installed in your dependencies or sub-dependencies.
|
|
11
|
+
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).`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["warnIfElementTypeIsInvalid.ts"],"sourcesContent":["import * as React from 'react';\nimport { isValidElementType } from 'react-is';\n\nexport function warnIfElementTypeIsInvalid(type: React.ElementType) {\n if (typeof type === 'object' && !isValidElementType(type) && process.env.NODE_ENV === 'development') {\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":["React","isValidElementType","warnIfElementTypeIsInvalid","type","process","env","NODE_ENV","console","error"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,kBAAkB,QAAQ,WAAW;AAE9C,OAAO,SAASC,2BAA2BC,IAAuB;IAChE,IAAI,OAAOA,SAAS,YAAY,CAACF,mBAAmBE,SAASC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;QACnG,sCAAsC;QACtCC,QAAQC,KAAK,CAAuB,CAAC;6HAE4F,EAAEL,KAAK;;;;wJAKtI,CAAC;IACL;AACF"}
|
|
@@ -12,7 +12,9 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
14
|
const _createCompatSlotComponent = require("../utils/createCompatSlotComponent");
|
|
15
|
-
const
|
|
15
|
+
const _warnIfElementTypeIsInvalid = require("../utils/warnIfElementTypeIsInvalid");
|
|
16
|
+
function createJSX(runtime, slotRuntime) {
|
|
17
|
+
return function jsx(type, overrideProps, key, source, self) {
|
|
16
18
|
// TODO:
|
|
17
19
|
// this is for backwards compatibility with getSlotsNext
|
|
18
20
|
// it should be removed once getSlotsNext is obsolete
|
|
@@ -22,5 +24,7 @@ const createJSX = (runtime, slotRuntime)=>(type, overrideProps, key, source, sel
|
|
|
22
24
|
if ((0, _reactutilities.isSlot)(type)) {
|
|
23
25
|
return slotRuntime(type, overrideProps, key, source, self);
|
|
24
26
|
}
|
|
27
|
+
(0, _warnIfElementTypeIsInvalid.warnIfElementTypeIsInvalid)(type);
|
|
25
28
|
return runtime(type, overrideProps, key, source, self);
|
|
26
29
|
};
|
|
30
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["createJSX.js"],"sourcesContent":["import { isSlot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\nexport
|
|
1
|
+
{"version":3,"sources":["createJSX.js"],"sourcesContent":["import { isSlot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\nimport { warnIfElementTypeIsInvalid } from '../utils/warnIfElementTypeIsInvalid';\nexport function createJSX(runtime, slotRuntime) {\n return function jsx(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 slotRuntime(createCompatSlotComponent(type, overrideProps), null, key, source, self);\n }\n if (isSlot(type)) {\n return slotRuntime(type, overrideProps, key, source, self);\n }\n warnIfElementTypeIsInvalid(type);\n return runtime(type, overrideProps, key, source, self);\n };\n}\n"],"names":["createJSX","runtime","slotRuntime","jsx","type","overrideProps","key","source","self","isSlot","createCompatSlotComponent","warnIfElementTypeIsInvalid"],"mappings":";;;;+BAIgBA;;;eAAAA;;;;gCAJO;iEACA;2CACmB;4CACC;AACpC,SAASA,UAAUC,OAAO,EAAEC,WAAW;IAC1C,OAAO,SAASC,IAAIC,IAAI,EAAEC,aAAa,EAAEC,GAAG,EAAEC,MAAM,EAAEC,IAAI;QACtD,QAAQ;QACR,wDAAwD;QACxD,qDAAqD;QACrD,IAAIC,IAAAA,sBAAM,EAACJ,gBAAgB;YACvB,OAAOH,YAAYQ,IAAAA,oDAAyB,EAACN,MAAMC,gBAAgB,MAAMC,KAAKC,QAAQC;QAC1F;QACA,IAAIC,IAAAA,sBAAM,EAACL,OAAO;YACd,OAAOF,YAAYE,MAAMC,eAAeC,KAAKC,QAAQC;QACzD;QACAG,IAAAA,sDAA0B,EAACP;QAC3B,OAAOH,QAAQG,MAAMC,eAAeC,KAAKC,QAAQC;IACrD;AACJ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "warnIfElementTypeIsInvalid", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return warnIfElementTypeIsInvalid;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactis = require("react-is");
|
|
14
|
+
function warnIfElementTypeIsInvalid(type) {
|
|
15
|
+
if (typeof type === 'object' && !(0, _reactis.isValidElementType)(type) && process.env.NODE_ENV === 'development') {
|
|
16
|
+
// eslint-disable-next-line no-console
|
|
17
|
+
console.error(`@fluentui/react-jsx-runtime:
|
|
18
|
+
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ${type}.
|
|
19
|
+
|
|
20
|
+
If this happened in a slot of Fluent UI component, you might be facing package resolution issues.
|
|
21
|
+
Please make sure you don't have multiple versions of "@fluentui/react-utilities" installed in your dependencies or sub-dependencies.
|
|
22
|
+
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).`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["warnIfElementTypeIsInvalid.js"],"sourcesContent":["import * as React from 'react';\nimport { isValidElementType } from 'react-is';\nexport function warnIfElementTypeIsInvalid(type) {\n if (typeof type === 'object' && !isValidElementType(type) && process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error(`@fluentui/react-jsx-runtime:\nElement type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ${type}.\n\nIf this happened in a slot of Fluent UI component, you might be facing package resolution issues.\nPlease make sure you don't have multiple versions of \"@fluentui/react-utilities\" installed in your dependencies or sub-dependencies.\nYou 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"],"names":["warnIfElementTypeIsInvalid","type","isValidElementType","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAEgBA;;;eAAAA;;;;iEAFO;yBACY;AAC5B,SAASA,2BAA2BC,IAAI;IAC3C,IAAI,OAAOA,SAAS,YAAY,CAACC,IAAAA,2BAAkB,EAACD,SAASE,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;QACjG,sCAAsC;QACtCC,QAAQC,KAAK,CAAC,CAAC;6HACsG,EAAEN,KAAK;;;;wJAIoB,CAAC;IACrJ;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.18",
|
|
4
4
|
"description": "Custom JSX runtime for @fluentui/react-components",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fluentui/react-utilities": "^9.15.
|
|
34
|
+
"@fluentui/react-utilities": "^9.15.1",
|
|
35
|
+
"react-is": "^17.0.2",
|
|
35
36
|
"@swc/helpers": "^0.5.1"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|