@fluentui/react-portal-compat-context 0.0.0-nightly-20230321-0440.1 → 0.0.0-nightly-20230324-0422.1
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/.swcrc +30 -0
- package/CHANGELOG.json +24 -3
- package/CHANGELOG.md +14 -4
- package/dist/index.d.ts +9 -0
- package/lib/PortalCompatContext.js +9 -0
- package/lib/PortalCompatContext.js.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib-amd/PortalCompatContext.js +32 -0
- package/lib-amd/PortalCompatContext.js.map +1 -0
- package/lib-amd/index.js +23 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/types.js +12 -0
- package/lib-amd/types.js.map +1 -0
- package/lib-commonjs/PortalCompatContext.js +25 -0
- package/lib-commonjs/PortalCompatContext.js.map +1 -0
- package/lib-commonjs/index.js +18 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/types.js +7 -0
- package/lib-commonjs/types.js.map +1 -0
- package/package.json +3 -3
package/.swcrc
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
+
"exclude": [
|
4
|
+
"/testing",
|
5
|
+
"/**/*.cy.ts",
|
6
|
+
"/**/*.cy.tsx",
|
7
|
+
"/**/*.spec.ts",
|
8
|
+
"/**/*.spec.tsx",
|
9
|
+
"/**/*.test.ts",
|
10
|
+
"/**/*.test.tsx"
|
11
|
+
],
|
12
|
+
"jsc": {
|
13
|
+
"parser": {
|
14
|
+
"syntax": "typescript",
|
15
|
+
"tsx": true,
|
16
|
+
"decorators": false,
|
17
|
+
"dynamicImport": false
|
18
|
+
},
|
19
|
+
"externalHelpers": true,
|
20
|
+
"transform": {
|
21
|
+
"react": {
|
22
|
+
"runtime": "classic",
|
23
|
+
"useSpread": true
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"target": "es2019"
|
27
|
+
},
|
28
|
+
"minify": false,
|
29
|
+
"sourceMaps": true
|
30
|
+
}
|
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-portal-compat-context",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-portal-compat-context_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Fri, 24 Mar 2023 04:29:05 GMT",
|
6
|
+
"tag": "@fluentui/react-portal-compat-context_v0.0.0-nightly-20230324-0422.1",
|
7
|
+
"version": "0.0.0-nightly-20230324-0422.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,6 +16,27 @@
|
|
16
16
|
]
|
17
17
|
}
|
18
18
|
},
|
19
|
+
{
|
20
|
+
"date": "Tue, 21 Mar 2023 21:23:45 GMT",
|
21
|
+
"tag": "@fluentui/react-portal-compat-context_v9.0.5",
|
22
|
+
"version": "9.0.5",
|
23
|
+
"comments": {
|
24
|
+
"patch": [
|
25
|
+
{
|
26
|
+
"author": "tristan.watanabe@gmail.com",
|
27
|
+
"package": "@fluentui/react-portal-compat-context",
|
28
|
+
"commit": "ead1c6d4c2ac3f3596b62b8cbc07b0a03041f11f",
|
29
|
+
"comment": "fix: add node field to package.json exports map."
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"author": "tristan.watanabe@gmail.com",
|
33
|
+
"package": "@fluentui/react-portal-compat-context",
|
34
|
+
"commit": "2fac1a139149bd13b76b1306207bc988dca9c72c",
|
35
|
+
"comment": "chore: migrate to swc transpilation approach."
|
36
|
+
}
|
37
|
+
]
|
38
|
+
}
|
39
|
+
},
|
19
40
|
{
|
20
41
|
"date": "Wed, 08 Mar 2023 17:42:37 GMT",
|
21
42
|
"tag": "@fluentui/react-portal-compat-context_v9.0.4",
|
package/CHANGELOG.md
CHANGED
@@ -1,18 +1,28 @@
|
|
1
1
|
# Change Log - @fluentui/react-portal-compat-context
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 24 Mar 2023 04:29:05 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20230324-0422.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v0.0.0-nightly-20230324-0422.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.
|
9
|
+
Fri, 24 Mar 2023 04:29:05 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.5..@fluentui/react-portal-compat-context_v0.0.0-nightly-20230324-0422.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
15
|
|
16
|
+
## [9.0.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v9.0.5)
|
17
|
+
|
18
|
+
Tue, 21 Mar 2023 21:23:45 GMT
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.4..@fluentui/react-portal-compat-context_v9.0.5)
|
20
|
+
|
21
|
+
### Patches
|
22
|
+
|
23
|
+
- fix: add node field to package.json exports map. ([PR #27154](https://github.com/microsoft/fluentui/pull/27154) by tristan.watanabe@gmail.com)
|
24
|
+
- chore: migrate to swc transpilation approach. ([PR #27250](https://github.com/microsoft/fluentui/pull/27250) by tristan.watanabe@gmail.com)
|
25
|
+
|
16
26
|
## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v9.0.4)
|
17
27
|
|
18
28
|
Fri, 11 Nov 2022 14:57:32 GMT
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as React_2 from 'react';
|
2
|
+
|
3
|
+
export declare const PortalCompatContextProvider: React_2.Provider<RegisterPortalFn>;
|
4
|
+
|
5
|
+
export declare type RegisterPortalFn = (el: HTMLElement) => () => void;
|
6
|
+
|
7
|
+
export declare function usePortalCompat(): RegisterPortalFn;
|
8
|
+
|
9
|
+
export { }
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
const PortalCompatContext = /*#__PURE__*/React.createContext(undefined);
|
3
|
+
const portalCompatContextDefaultValue = () => () => undefined;
|
4
|
+
export const PortalCompatContextProvider = PortalCompatContext.Provider;
|
5
|
+
export function usePortalCompat() {
|
6
|
+
var _React_useContext;
|
7
|
+
return (_React_useContext = React.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
|
8
|
+
}
|
9
|
+
//# sourceMappingURL=PortalCompatContext.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","PortalCompatContext","createContext","undefined","portalCompatContextDefaultValue","PortalCompatContextProvider","Provider","usePortalCompat","_React_useContext","useContext"],"sources":["../src/PortalCompatContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn | undefined>(\n undefined,\n) as React.Context<RegisterPortalFn>;\n\nconst portalCompatContextDefaultValue = () => () => undefined;\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext) ?? portalCompatContextDefaultValue;\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAGvB,MAAMC,mBAAA,gBAAsBD,KAAA,CAAME,aAAa,CAC7CC,SAAA;AAGF,MAAMC,+BAAA,GAAkCA,CAAA,KAAM,MAAMD,SAAA;AAEpD,OAAO,MAAME,2BAAA,GAA8BJ,mBAAA,CAAoBK,QAAQ;AAEvE,OAAO,SAASC,gBAAA,EAAkB;MACzBC,iBAAA;EAAP,OAAO,CAAAA,iBAAA,GAAAR,KAAA,CAAMS,UAAU,CAACR,mBAAA,eAAjBO,iBAAA,cAAAA,iBAAA,GAAyCJ,+BAA+B;AACjF"}
|
package/lib/index.js
ADDED
package/lib/index.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["PortalCompatContextProvider","usePortalCompat"],"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';\nexport type { RegisterPortalFn } from './types';\n"],"mappings":"AAAA,SAASA,2BAA2B,EAAEC,eAAe,QAAQ"}
|
package/lib/types.js
ADDED
package/lib/types.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sources":["../src/types.ts"],"sourcesContent":["export type RegisterPortalFn = (el: HTMLElement) => () => void;\n"],"mappings":"AAAA"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
define([
|
2
|
+
"require",
|
3
|
+
"exports",
|
4
|
+
"@swc/helpers/src/_interop_require_wildcard.mjs",
|
5
|
+
"react"
|
6
|
+
], function(require, exports, _interopRequireWildcard, _react) {
|
7
|
+
"use strict";
|
8
|
+
Object.defineProperty(exports, "__esModule", {
|
9
|
+
value: true
|
10
|
+
});
|
11
|
+
function _export(target, all) {
|
12
|
+
for(var name in all)Object.defineProperty(target, name, {
|
13
|
+
enumerable: true,
|
14
|
+
get: all[name]
|
15
|
+
});
|
16
|
+
}
|
17
|
+
_export(exports, {
|
18
|
+
PortalCompatContextProvider: ()=>PortalCompatContextProvider,
|
19
|
+
usePortalCompat: ()=>usePortalCompat
|
20
|
+
});
|
21
|
+
_interopRequireWildcard = _interopRequireWildcard.default;
|
22
|
+
_react = /*#__PURE__*/ _interopRequireWildcard(_react);
|
23
|
+
const PortalCompatContext = /*#__PURE__*/ _react.createContext(undefined);
|
24
|
+
const portalCompatContextDefaultValue = ()=>()=>undefined;
|
25
|
+
const PortalCompatContextProvider = PortalCompatContext.Provider;
|
26
|
+
function usePortalCompat() {
|
27
|
+
var _React_useContext;
|
28
|
+
return (_React_useContext = _react.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
|
29
|
+
} //# sourceMappingURL=PortalCompatContext.js.map
|
30
|
+
});
|
31
|
+
|
32
|
+
//# sourceMappingURL=PortalCompatContext.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../lib/PortalCompatContext.js"],"sourcesContent":["import * as React from 'react';\nconst PortalCompatContext = /*#__PURE__*/React.createContext(undefined);\nconst portalCompatContextDefaultValue = () => () => undefined;\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\nexport function usePortalCompat() {\n var _React_useContext;\n return (_React_useContext = React.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;\n}\n//# sourceMappingURL=PortalCompatContext.js.map"],"names":["PortalCompatContextProvider","usePortalCompat","PortalCompatContext","React","createContext","undefined","portalCompatContextDefaultValue","Provider","_React_useContext","useContext"],"mappings":";;;;IAAuB;;;;;;;;;;;;;QAGVA,2BAA2B,MAA3BA;QACGC,eAAe,MAAfA;;;;IAHhB,MAAMC,sBAAsB,WAAW,GAAEC,OAAMC,aAAa,CAACC;IAC7D,MAAMC,kCAAkC,IAAM,IAAMD;IAC7C,MAAML,8BAA8BE,oBAAoBK,QAAQ;IAChE,SAASN,kBAAkB;QAChC,IAAIO;QACJ,OAAO,AAACA,CAAAA,oBAAoBL,OAAMM,UAAU,CAACP,oBAAmB,MAAO,IAAI,IAAIM,sBAAsB,KAAK,IAAIA,oBAAoBF,+BAA+B;IACnK,EACA,+CAA+C"}
|
package/lib-amd/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
define([
|
2
|
+
"require",
|
3
|
+
"exports",
|
4
|
+
"./PortalCompatContext"
|
5
|
+
], function(require, exports, _portalCompatContext) {
|
6
|
+
"use strict";
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
function _export(target, all) {
|
11
|
+
for(var name in all)Object.defineProperty(target, name, {
|
12
|
+
enumerable: true,
|
13
|
+
get: all[name]
|
14
|
+
});
|
15
|
+
}
|
16
|
+
_export(exports, {
|
17
|
+
PortalCompatContextProvider: ()=>_portalCompatContext.PortalCompatContextProvider,
|
18
|
+
usePortalCompat: ()=>_portalCompatContext.usePortalCompat
|
19
|
+
});
|
20
|
+
});
|
21
|
+
//# sourceMappingURL=index.js.map
|
22
|
+
|
23
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';\n//# sourceMappingURL=index.js.map"],"names":["PortalCompatContextProvider","usePortalCompat"],"mappings":";;;IAA6D;;;;;;;;;;;;;QAApDA,2BAA2B,MAA3BA,gDAA2B;QAAEC,eAAe,MAAfA,oCAAe;;;CACrD,iCAAiC"}
|
package/lib-amd/types.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../lib/types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;;;;;;CACA,iCAAiC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
PortalCompatContextProvider: ()=>PortalCompatContextProvider,
|
13
|
+
usePortalCompat: ()=>usePortalCompat
|
14
|
+
});
|
15
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
16
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
17
|
+
const PortalCompatContext = /*#__PURE__*/ _react.createContext(undefined);
|
18
|
+
const portalCompatContextDefaultValue = ()=>()=>undefined;
|
19
|
+
const PortalCompatContextProvider = PortalCompatContext.Provider;
|
20
|
+
function usePortalCompat() {
|
21
|
+
var _React_useContext;
|
22
|
+
return (_React_useContext = _react.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
|
23
|
+
} //# sourceMappingURL=PortalCompatContext.js.map
|
24
|
+
|
25
|
+
//# sourceMappingURL=PortalCompatContext.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../lib/PortalCompatContext.js"],"sourcesContent":["import * as React from 'react';\nconst PortalCompatContext = /*#__PURE__*/React.createContext(undefined);\nconst portalCompatContextDefaultValue = () => () => undefined;\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\nexport function usePortalCompat() {\n var _React_useContext;\n return (_React_useContext = React.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;\n}\n//# sourceMappingURL=PortalCompatContext.js.map"],"names":["PortalCompatContextProvider","usePortalCompat","PortalCompatContext","React","createContext","undefined","portalCompatContextDefaultValue","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAGaA,2BAA2B,MAA3BA;IACGC,eAAe,MAAfA;;;6DAJO;AACvB,MAAMC,sBAAsB,WAAW,GAAEC,OAAMC,aAAa,CAACC;AAC7D,MAAMC,kCAAkC,IAAM,IAAMD;AAC7C,MAAML,8BAA8BE,oBAAoBK,QAAQ;AAChE,SAASN,kBAAkB;IAChC,IAAIO;IACJ,OAAO,AAACA,CAAAA,oBAAoBL,OAAMM,UAAU,CAACP,oBAAmB,MAAO,IAAI,IAAIM,sBAAsB,KAAK,IAAIA,oBAAoBF,+BAA+B;AACnK,EACA,+CAA+C"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
PortalCompatContextProvider: ()=>_portalCompatContext.PortalCompatContextProvider,
|
13
|
+
usePortalCompat: ()=>_portalCompatContext.usePortalCompat
|
14
|
+
});
|
15
|
+
const _portalCompatContext = require("./PortalCompatContext");
|
16
|
+
//# sourceMappingURL=index.js.map
|
17
|
+
|
18
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';\n//# sourceMappingURL=index.js.map"],"names":["PortalCompatContextProvider","usePortalCompat"],"mappings":";;;;;;;;;;;IAASA,2BAA2B,MAA3BA,gDAA2B;IAAEC,eAAe,MAAfA,oCAAe;;qCAAQ;CAC7D,iCAAiC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../lib/types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;CACA,iCAAiC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-portal-compat-context",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230324-0422.1",
|
4
4
|
"description": "A package that holds React context for compatibility of React Contexts",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"lint": "just-scripts lint",
|
20
20
|
"test": "jest --passWithNoTests",
|
21
21
|
"type-check": "tsc -b tsconfig.json",
|
22
|
-
"generate-api": "
|
22
|
+
"generate-api": "just-scripts generate-api"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
25
|
"@fluentui/eslint-plugin": "*",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"@fluentui/scripts-tasks": "*"
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
|
-
"
|
30
|
+
"@swc/helpers": "^0.4.14"
|
31
31
|
},
|
32
32
|
"peerDependencies": {
|
33
33
|
"@types/react": ">=16.8.0 <19.0.0",
|