@fluentui/react-portal-compat-context 0.0.0-nightly-20250423-1342.1 → 0.0.0-nightly-20250423-1415.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/CHANGELOG.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Change Log - @fluentui/react-portal-compat-context
2
2
 
3
- This log was last generated on Wed, 23 Apr 2025 13:46:16 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 23 Apr 2025 14:31:30 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20250423-1342.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v0.0.0-nightly-20250423-1342.1)
7
+ ## [0.0.0-nightly-20250423-1415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v0.0.0-nightly-20250423-1415.1)
8
8
 
9
- Wed, 23 Apr 2025 13:46:16 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.13..@fluentui/react-portal-compat-context_v0.0.0-nightly-20250423-1342.1)
9
+ Wed, 23 Apr 2025 14:31:30 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.13..@fluentui/react-portal-compat-context_v0.0.0-nightly-20250423-1415.1)
11
11
 
12
12
  ### Changes
13
13
 
@@ -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,12 @@
1
+ import * as React from 'react';
2
+ var PortalCompatContext = React.createContext(undefined);
3
+ var portalCompatContextDefaultValue = function() {
4
+ return function() {
5
+ return undefined;
6
+ };
7
+ };
8
+ export var PortalCompatContextProvider = PortalCompatContext.Provider;
9
+ export function usePortalCompat() {
10
+ var _React_useContext;
11
+ return (_React_useContext = React.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
12
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"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"],"names":["React","PortalCompatContext","createContext","undefined","portalCompatContextDefaultValue","PortalCompatContextProvider","Provider","usePortalCompat","useContext"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,IAAMC,sBAAsBD,MAAME,aAAa,CAC7CC;AAGF,IAAMC,kCAAkC;WAAM;eAAMD;;;AAEpD,OAAO,IAAME,8BAA8BJ,oBAAoBK,QAAQ,CAAC;AAExE,OAAO,SAASC;QACPP;IAAP,OAAOA,CAAAA,oBAAAA,MAAMQ,UAAU,CAACP,kCAAjBD,+BAAAA,oBAAyCI;AAClD"}
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';\nexport type { RegisterPortalFn } from './types';\n"],"names":["PortalCompatContextProvider","usePortalCompat"],"rangeMappings":"","mappings":"AAAA,SAASA,2BAA2B,EAAEC,eAAe,QAAQ,wBAAwB"}
package/lib/types.js ADDED
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["export type RegisterPortalFn = (el: HTMLElement) => () => void;\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAA+D"}
@@ -0,0 +1,37 @@
1
+ define([
2
+ "require",
3
+ "exports",
4
+ "@swc/helpers/_/_interop_require_wildcard",
5
+ "react"
6
+ ], function(require, exports, _interop_require_wildcard, _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: function() {
19
+ return PortalCompatContextProvider;
20
+ },
21
+ usePortalCompat: function() {
22
+ return usePortalCompat;
23
+ }
24
+ });
25
+ _react = /*#__PURE__*/ _interop_require_wildcard._(_react);
26
+ var PortalCompatContext = _react.createContext(undefined);
27
+ var portalCompatContextDefaultValue = function() {
28
+ return function() {
29
+ return undefined;
30
+ };
31
+ };
32
+ var PortalCompatContextProvider = PortalCompatContext.Provider;
33
+ function usePortalCompat() {
34
+ var _React_useContext;
35
+ return (_React_useContext = _react.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
36
+ }
37
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"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"],"names":["PortalCompatContextProvider","usePortalCompat","PortalCompatContext","React","createContext","undefined","portalCompatContextDefaultValue","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;IAAuB;;;;;;;;;;;;;QASVA,2BAA2B;mBAA3BA;;QAEGC,eAAe;mBAAfA;;;;IARhB,IAAMC,sBAAsBC,OAAMC,aAAa,CAC7CC;IAGF,IAAMC,kCAAkC;eAAM;mBAAMD;;;IAE7C,IAAML,8BAA8BE,oBAAoBK,QAAQ;IAEhE,SAASN;YACPE;QAAP,OAAOA,CAAAA,oBAAAA,OAAMK,UAAU,CAACN,kCAAjBC,+BAAAA,oBAAyCG;IAClD"}
@@ -0,0 +1,24 @@
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: function() {
18
+ return _PortalCompatContext.PortalCompatContextProvider;
19
+ },
20
+ usePortalCompat: function() {
21
+ return _PortalCompatContext.usePortalCompat;
22
+ }
23
+ });
24
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';\nexport type { RegisterPortalFn } from './types';\n"],"names":["PortalCompatContextProvider","usePortalCompat"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;IAA6D;;;;;;;;;;;;;QAApDA,2BAA2B;mBAA3BA,gDAA2B;;QAAEC,eAAe;mBAAfA,oCAAe"}
@@ -0,0 +1,9 @@
1
+ define([
2
+ "require",
3
+ "exports"
4
+ ], function(require, exports) {
5
+ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"rangeMappings":"","mappings":""}
@@ -0,0 +1,31 @@
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: function() {
13
+ return PortalCompatContextProvider;
14
+ },
15
+ usePortalCompat: function() {
16
+ return usePortalCompat;
17
+ }
18
+ });
19
+ var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
20
+ var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
21
+ var PortalCompatContext = _react.createContext(undefined);
22
+ var portalCompatContextDefaultValue = function() {
23
+ return function() {
24
+ return undefined;
25
+ };
26
+ };
27
+ var PortalCompatContextProvider = PortalCompatContext.Provider;
28
+ function usePortalCompat() {
29
+ var _React_useContext;
30
+ return (_React_useContext = _react.useContext(PortalCompatContext)) !== null && _React_useContext !== void 0 ? _React_useContext : portalCompatContextDefaultValue;
31
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"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"],"names":["PortalCompatContextProvider","usePortalCompat","PortalCompatContext","React","createContext","undefined","portalCompatContextDefaultValue","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IASaA,2BAA2B;eAA3BA;;IAEGC,eAAe;eAAfA;;;;+DAXO;AAGvB,IAAMC,sBAAsBC,OAAMC,aAAa,CAC7CC;AAGF,IAAMC,kCAAkC;WAAM;eAAMD;;;AAE7C,IAAML,8BAA8BE,oBAAoBK,QAAQ;AAEhE,SAASN;QACPE;IAAP,OAAOA,CAAAA,oBAAAA,OAAMK,UAAU,CAACN,kCAAjBC,+BAAAA,oBAAyCG;AAClD"}
@@ -0,0 +1,19 @@
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: function() {
13
+ return _PortalCompatContext.PortalCompatContextProvider;
14
+ },
15
+ usePortalCompat: function() {
16
+ return _PortalCompatContext.usePortalCompat;
17
+ }
18
+ });
19
+ var _PortalCompatContext = require("./PortalCompatContext");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { PortalCompatContextProvider, usePortalCompat } from './PortalCompatContext';\nexport type { RegisterPortalFn } from './types';\n"],"names":["PortalCompatContextProvider","usePortalCompat"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,2BAA2B;eAA3BA,gDAA2B;;IAAEC,eAAe;eAAfA,oCAAe;;;mCAAQ"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"rangeMappings":"","mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-portal-compat-context",
3
- "version": "0.0.0-nightly-20250423-1342.1",
3
+ "version": "0.0.0-nightly-20250423-1415.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",