@fluentui/react-shared-contexts 9.5.1 → 9.7.0

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.
Files changed (28) hide show
  1. package/CHANGELOG.json +52 -1
  2. package/CHANGELOG.md +21 -2
  3. package/dist/index.d.ts +42 -0
  4. package/lib/AnnounceContext/AnnounceContext.js +13 -0
  5. package/lib/AnnounceContext/AnnounceContext.js.map +1 -0
  6. package/lib/AnnounceContext/index.js +1 -0
  7. package/lib/AnnounceContext/index.js.map +1 -0
  8. package/lib/BackgroundAppearanceContext/BackgroundAppearanceContext.js +10 -0
  9. package/lib/BackgroundAppearanceContext/BackgroundAppearanceContext.js.map +1 -0
  10. package/lib/BackgroundAppearanceContext/index.js +1 -0
  11. package/lib/BackgroundAppearanceContext/index.js.map +1 -0
  12. package/lib/PortalMountNodeContext.js +12 -0
  13. package/lib/PortalMountNodeContext.js.map +1 -0
  14. package/lib/index.js +3 -0
  15. package/lib/index.js.map +1 -1
  16. package/lib-commonjs/AnnounceContext/AnnounceContext.js +26 -0
  17. package/lib-commonjs/AnnounceContext/AnnounceContext.js.map +1 -0
  18. package/lib-commonjs/AnnounceContext/index.js +6 -0
  19. package/lib-commonjs/AnnounceContext/index.js.map +1 -0
  20. package/lib-commonjs/BackgroundAppearanceContext/BackgroundAppearanceContext.js +22 -0
  21. package/lib-commonjs/BackgroundAppearanceContext/BackgroundAppearanceContext.js.map +1 -0
  22. package/lib-commonjs/BackgroundAppearanceContext/index.js +6 -0
  23. package/lib-commonjs/BackgroundAppearanceContext/index.js.map +1 -0
  24. package/lib-commonjs/PortalMountNodeContext.js +25 -0
  25. package/lib-commonjs/PortalMountNodeContext.js.map +1 -0
  26. package/lib-commonjs/index.js +10 -1
  27. package/lib-commonjs/index.js.map +1 -1
  28. package/package.json +1 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,58 @@
2
2
  "name": "@fluentui/react-shared-contexts",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 20 Jun 2023 12:34:46 GMT",
5
+ "date": "Tue, 01 Aug 2023 10:14:27 GMT",
6
+ "tag": "@fluentui/react-shared-contexts_v9.7.0",
7
+ "version": "9.7.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "eysjiang@gmail.com",
12
+ "package": "@fluentui/react-shared-contexts",
13
+ "commit": "937b241d624114c181ea1521d0d4ead1068ddfa3",
14
+ "comment": "adds Announce context"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Mon, 03 Jul 2023 11:57:13 GMT",
21
+ "tag": "@fluentui/react-shared-contexts_v9.6.0",
22
+ "version": "9.6.0",
23
+ "comments": {
24
+ "minor": [
25
+ {
26
+ "author": "lingfan.gao@microsoft.com",
27
+ "package": "@fluentui/react-shared-contexts",
28
+ "commit": "7ad45a9f4e696e416c4420286cbac3f57a4b3a6f",
29
+ "comment": "feat: Background appearance context"
30
+ },
31
+ {
32
+ "author": "olfedias@microsoft.com",
33
+ "package": "@fluentui/react-shared-contexts",
34
+ "commit": "3deadf5e6ab264e0be12a31092ca5e172d721241",
35
+ "comment": "feat: export PortalMountNodeProvider & usePortalMountNode"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Wed, 28 Jun 2023 11:12:31 GMT",
42
+ "tag": "@fluentui/react-shared-contexts_v9.5.1",
43
+ "version": "9.5.1",
44
+ "comments": {
45
+ "none": [
46
+ {
47
+ "author": "martinhochel@microsoft.com",
48
+ "package": "@fluentui/react-shared-contexts",
49
+ "commit": "fbe878e9c9785588197481f172c42c2c0a230292",
50
+ "comment": "fix: update .npmignore to unify v8 packages and exclude project.json"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Tue, 20 Jun 2023 12:39:03 GMT",
6
57
  "tag": "@fluentui/react-shared-contexts_v9.5.1",
7
58
  "version": "9.5.1",
8
59
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,31 @@
1
1
  # Change Log - @fluentui/react-shared-contexts
2
2
 
3
- This log was last generated on Tue, 20 Jun 2023 12:34:46 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 01 Aug 2023 10:14:27 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.7.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.7.0)
8
+
9
+ Tue, 01 Aug 2023 10:14:27 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.6.0..@fluentui/react-shared-contexts_v9.7.0)
11
+
12
+ ### Minor changes
13
+
14
+ - adds Announce context ([PR #28654](https://github.com/microsoft/fluentui/pull/28654) by eysjiang@gmail.com)
15
+
16
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.6.0)
17
+
18
+ Mon, 03 Jul 2023 11:57:13 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.5.1..@fluentui/react-shared-contexts_v9.6.0)
20
+
21
+ ### Minor changes
22
+
23
+ - feat: Background appearance context ([PR #28341](https://github.com/microsoft/fluentui/pull/28341) by lingfan.gao@microsoft.com)
24
+ - feat: export PortalMountNodeProvider & usePortalMountNode ([PR #28395](https://github.com/microsoft/fluentui/pull/28395) by olfedias@microsoft.com)
25
+
7
26
  ## [9.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-shared-contexts_v9.5.1)
8
27
 
9
- Tue, 20 Jun 2023 12:34:46 GMT
28
+ Tue, 20 Jun 2023 12:39:03 GMT
10
29
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-shared-contexts_v9.5.0..@fluentui/react-shared-contexts_v9.5.1)
11
30
 
12
31
  ### Patches
package/dist/index.d.ts CHANGED
@@ -1,6 +1,35 @@
1
1
  import * as React_2 from 'react';
2
2
  import type { Theme } from '@fluentui/react-theme';
3
3
 
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare type AnnounceContextValue_unstable = {
8
+ announce: (message: string, options?: AnnounceOptions) => void;
9
+ };
10
+
11
+ declare type AnnounceOptions = {
12
+ alert?: boolean;
13
+ batchId?: string;
14
+ polite?: boolean;
15
+ priority?: number;
16
+ };
17
+
18
+ /**
19
+ * @internal
20
+ */
21
+ export declare const AnnounceProvider_unstable: React_2.Provider<AnnounceContextValue_unstable | undefined>;
22
+
23
+ /**
24
+ * @internal
25
+ */
26
+ export declare type BackgroundAppearanceContextValue = 'inverted' | undefined;
27
+
28
+ /**
29
+ * @internal
30
+ */
31
+ export declare const BackgroundAppearanceProvider: React_2.Provider<BackgroundAppearanceContextValue>;
32
+
4
33
  declare type CustomStyleHook = (state: unknown) => void;
5
34
 
6
35
  /**
@@ -294,6 +323,13 @@ export declare type OverridesContextValue_unstable = {
294
323
  */
295
324
  export declare const OverridesProvider_unstable: React_2.Provider<OverridesContextValue_unstable | undefined>;
296
325
 
326
+ declare type PortalMountNodeContextValue = HTMLElement | ShadowRoot | undefined;
327
+
328
+ /**
329
+ * @internal
330
+ */
331
+ export declare const PortalMountNodeProvider: React_2.Provider<PortalMountNodeContextValue>;
332
+
297
333
  /**
298
334
  * @internal
299
335
  */
@@ -340,6 +376,10 @@ export declare type TooltipVisibilityContextValue_unstable = {
340
376
  */
341
377
  export declare const TooltipVisibilityProvider_unstable: React_2.Provider<TooltipVisibilityContextValue_unstable>;
342
378
 
379
+ export declare function useAnnounce_unstable(): AnnounceContextValue_unstable;
380
+
381
+ export declare function useBackgroundAppearance(): BackgroundAppearanceContextValue;
382
+
343
383
  /**
344
384
  * Gets a custom style hook
345
385
  * @param hook - One of the hook properties in CustomStyleHooksContextValue
@@ -351,6 +391,8 @@ export declare function useFluent_unstable(): ProviderContextValue_unstable;
351
391
 
352
392
  export declare function useOverrides_unstable(): OverridesContextValue_unstable;
353
393
 
394
+ export declare function usePortalMountNode(): PortalMountNodeContextValue;
395
+
354
396
  /**
355
397
  * @returns CSS class that applies css variables
356
398
  */
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * @internal
4
+ */ const AnnounceContext = React.createContext(undefined);
5
+ /**
6
+ * @internal
7
+ */ export const AnnounceProvider = AnnounceContext.Provider;
8
+ export function useAnnounce() {
9
+ var _React_useContext;
10
+ return (_React_useContext = React.useContext(AnnounceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : {
11
+ announce: ()=>undefined
12
+ };
13
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnnounceContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type AnnounceOptions = {\n alert?: boolean;\n batchId?: string;\n polite?: boolean;\n priority?: number;\n};\n\n/**\n * @internal\n */\nexport type AnnounceContextValue = {\n announce: (message: string, options?: AnnounceOptions) => void;\n};\n\n/**\n * @internal\n */\nconst AnnounceContext = React.createContext<AnnounceContextValue | undefined>(undefined);\n\n/**\n * @internal\n */\nexport const AnnounceProvider = AnnounceContext.Provider;\n\nexport function useAnnounce(): AnnounceContextValue {\n return React.useContext(AnnounceContext) ?? { announce: () => undefined };\n}\n"],"names":["React","AnnounceContext","createContext","undefined","AnnounceProvider","Provider","useAnnounce","useContext","announce"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAgB/B;;CAEC,GACD,MAAMC,kBAAkBD,MAAME,aAAa,CAAmCC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mBAAmBH,gBAAgBI,QAAQ,CAAC;AAEzD,OAAO,SAASC,cAAoC;QAC3CN;IAAP,OAAOA,CAAAA,oBAAAA,MAAMO,UAAU,CAACN,8BAAjBD,+BAAAA,oBAAqC;QAAEQ,UAAU,IAAML;IAAU,CAAC;AAC3E,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './AnnounceContext';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AnnounceContext';\n"],"names":[],"mappings":"AAAA,cAAc,oBAAoB"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * @internal
4
+ */ export const BackgroundAppearanceContext = React.createContext(undefined);
5
+ /**
6
+ * @internal
7
+ */ export const BackgroundAppearanceProvider = BackgroundAppearanceContext.Provider;
8
+ export function useBackgroundAppearance() {
9
+ return React.useContext(BackgroundAppearanceContext);
10
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["BackgroundAppearanceContext.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n */\nexport type BackgroundAppearanceContextValue = 'inverted' | undefined;\n\n/**\n * @internal\n */\nexport const BackgroundAppearanceContext = React.createContext<BackgroundAppearanceContextValue | undefined>(undefined);\n\n/**\n * @internal\n */\nexport const BackgroundAppearanceProvider = BackgroundAppearanceContext.Provider;\n\nexport function useBackgroundAppearance(): BackgroundAppearanceContextValue {\n return React.useContext(BackgroundAppearanceContext);\n}\n"],"names":["React","BackgroundAppearanceContext","createContext","undefined","BackgroundAppearanceProvider","Provider","useBackgroundAppearance","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAO/B;;CAEC,GACD,OAAO,MAAMC,8BAA8BD,MAAME,aAAa,CAA+CC,WAAW;AAExH;;CAEC,GACD,OAAO,MAAMC,+BAA+BH,4BAA4BI,QAAQ,CAAC;AAEjF,OAAO,SAASC,0BAA4D;IAC1E,OAAON,MAAMO,UAAU,CAACN;AAC1B,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './BackgroundAppearanceContext';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './BackgroundAppearanceContext';\n"],"names":[],"mappings":"AAAA,cAAc,gCAAgC"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Provides a mount node for portals to render into.
4
+ *
5
+ * @internal
6
+ */ const PortalMountNodeContext = React.createContext(undefined);
7
+ /**
8
+ * @internal
9
+ */ export const PortalMountNodeProvider = PortalMountNodeContext.Provider;
10
+ export function usePortalMountNode() {
11
+ return React.useContext(PortalMountNodeContext);
12
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PortalMountNodeContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type PortalMountNodeContextValue = HTMLElement | ShadowRoot | undefined;\n\n/**\n * Provides a mount node for portals to render into.\n *\n * @internal\n */\nconst PortalMountNodeContext = React.createContext<PortalMountNodeContextValue>(undefined);\n\n/**\n * @internal\n */\nexport const PortalMountNodeProvider = PortalMountNodeContext.Provider;\n\nexport function usePortalMountNode(): PortalMountNodeContextValue {\n return React.useContext(PortalMountNodeContext);\n}\n"],"names":["React","PortalMountNodeContext","createContext","undefined","PortalMountNodeProvider","Provider","usePortalMountNode","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B;;;;CAIC,GACD,MAAMC,yBAAyBD,MAAME,aAAa,CAA8BC;AAEhF;;CAEC,GACD,OAAO,MAAMC,0BAA0BH,uBAAuBI,QAAQ,CAAC;AAEvE,OAAO,SAASC,qBAAkD;IAChE,OAAON,MAAMO,UAAU,CAACN;AAC1B,CAAC"}
package/lib/index.js CHANGED
@@ -4,3 +4,6 @@ export { TooltipVisibilityProvider as TooltipVisibilityProvider_unstable, useToo
4
4
  export { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';
5
5
  export { OverridesProvider as OverridesProvider_unstable, useOverrides as useOverrides_unstable } from './OverridesContext';
6
6
  export { CustomStyleHooksContext as CustomStyleHooksContext_unstable, CustomStyleHooksProvider as CustomStyleHooksProvider_unstable, useCustomStyleHook as useCustomStyleHook_unstable } from './CustomStyleHooksContext';
7
+ export { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';
8
+ export { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';
9
+ export { AnnounceProvider as AnnounceProvider_unstable, useAnnounce as useAnnounce_unstable } from './AnnounceContext';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport type { ThemeContextValue as ThemeContextValue_unstable } from './ThemeContext';\n\nexport {\n ThemeClassNameProvider as ThemeClassNameProvider_unstable,\n useThemeClassName as useThemeClassName_unstable,\n} from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue as ThemeClassNameContextValue_unstable } from './ThemeClassNameContext';\n\nexport {\n TooltipVisibilityProvider as TooltipVisibilityProvider_unstable,\n useTooltipVisibility as useTooltipVisibility_unstable,\n} from './TooltipVisibilityContext';\nexport type { TooltipVisibilityContextValue as TooltipVisibilityContextValue_unstable } from './TooltipVisibilityContext';\n\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport type { ProviderContextValue as ProviderContextValue_unstable } from './ProviderContext';\n\nexport {\n OverridesProvider as OverridesProvider_unstable,\n useOverrides as useOverrides_unstable,\n} from './OverridesContext';\nexport type { OverridesContextValue as OverridesContextValue_unstable } from './OverridesContext';\n\nexport {\n CustomStyleHooksContext as CustomStyleHooksContext_unstable,\n CustomStyleHooksProvider as CustomStyleHooksProvider_unstable,\n useCustomStyleHook as useCustomStyleHook_unstable,\n} from './CustomStyleHooksContext';\nexport type { CustomStyleHooksContextValue as CustomStyleHooksContextValue_unstable } from './CustomStyleHooksContext';\n"],"names":["ThemeContext","ThemeContext_unstable","ThemeProvider","ThemeProvider_unstable","ThemeClassNameProvider","ThemeClassNameProvider_unstable","useThemeClassName","useThemeClassName_unstable","TooltipVisibilityProvider","TooltipVisibilityProvider_unstable","useTooltipVisibility","useTooltipVisibility_unstable","Provider","Provider_unstable","useFluent","useFluent_unstable","OverridesProvider","OverridesProvider_unstable","useOverrides","useOverrides_unstable","CustomStyleHooksContext","CustomStyleHooksContext_unstable","CustomStyleHooksProvider","CustomStyleHooksProvider_unstable","useCustomStyleHook","useCustomStyleHook_unstable"],"mappings":"AAAA,SAASA,gBAAgBC,qBAAqB,EAAEC,iBAAiBC,sBAAsB,QAAQ,iBAAiB;AAGhH,SACEC,0BAA0BC,+BAA+B,EACzDC,qBAAqBC,0BAA0B,QAC1C,0BAA0B;AAGjC,SACEC,6BAA6BC,kCAAkC,EAC/DC,wBAAwBC,6BAA6B,QAChD,6BAA6B;AAGpC,SAASC,YAAYC,iBAAiB,EAAEC,aAAaC,kBAAkB,QAAQ,oBAAoB;AAGnG,SACEC,qBAAqBC,0BAA0B,EAC/CC,gBAAgBC,qBAAqB,QAChC,qBAAqB;AAG5B,SACEC,2BAA2BC,gCAAgC,EAC3DC,4BAA4BC,iCAAiC,EAC7DC,sBAAsBC,2BAA2B,QAC5C,4BAA4B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport type { ThemeContextValue as ThemeContextValue_unstable } from './ThemeContext';\n\nexport {\n ThemeClassNameProvider as ThemeClassNameProvider_unstable,\n useThemeClassName as useThemeClassName_unstable,\n} from './ThemeClassNameContext';\nexport type { ThemeClassNameContextValue as ThemeClassNameContextValue_unstable } from './ThemeClassNameContext';\n\nexport {\n TooltipVisibilityProvider as TooltipVisibilityProvider_unstable,\n useTooltipVisibility as useTooltipVisibility_unstable,\n} from './TooltipVisibilityContext';\nexport type { TooltipVisibilityContextValue as TooltipVisibilityContextValue_unstable } from './TooltipVisibilityContext';\n\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport type { ProviderContextValue as ProviderContextValue_unstable } from './ProviderContext';\n\nexport {\n OverridesProvider as OverridesProvider_unstable,\n useOverrides as useOverrides_unstable,\n} from './OverridesContext';\nexport type { OverridesContextValue as OverridesContextValue_unstable } from './OverridesContext';\n\nexport {\n CustomStyleHooksContext as CustomStyleHooksContext_unstable,\n CustomStyleHooksProvider as CustomStyleHooksProvider_unstable,\n useCustomStyleHook as useCustomStyleHook_unstable,\n} from './CustomStyleHooksContext';\nexport type { CustomStyleHooksContextValue as CustomStyleHooksContextValue_unstable } from './CustomStyleHooksContext';\n\nexport { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';\nexport type { BackgroundAppearanceContextValue } from './BackgroundAppearanceContext';\n\nexport { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';\n\nexport { AnnounceProvider as AnnounceProvider_unstable, useAnnounce as useAnnounce_unstable } from './AnnounceContext';\nexport type { AnnounceContextValue as AnnounceContextValue_unstable } from './AnnounceContext';\n"],"names":["ThemeContext","ThemeContext_unstable","ThemeProvider","ThemeProvider_unstable","ThemeClassNameProvider","ThemeClassNameProvider_unstable","useThemeClassName","useThemeClassName_unstable","TooltipVisibilityProvider","TooltipVisibilityProvider_unstable","useTooltipVisibility","useTooltipVisibility_unstable","Provider","Provider_unstable","useFluent","useFluent_unstable","OverridesProvider","OverridesProvider_unstable","useOverrides","useOverrides_unstable","CustomStyleHooksContext","CustomStyleHooksContext_unstable","CustomStyleHooksProvider","CustomStyleHooksProvider_unstable","useCustomStyleHook","useCustomStyleHook_unstable","BackgroundAppearanceProvider","useBackgroundAppearance","PortalMountNodeProvider","usePortalMountNode","AnnounceProvider","AnnounceProvider_unstable","useAnnounce","useAnnounce_unstable"],"mappings":"AAAA,SAASA,gBAAgBC,qBAAqB,EAAEC,iBAAiBC,sBAAsB,QAAQ,iBAAiB;AAGhH,SACEC,0BAA0BC,+BAA+B,EACzDC,qBAAqBC,0BAA0B,QAC1C,0BAA0B;AAGjC,SACEC,6BAA6BC,kCAAkC,EAC/DC,wBAAwBC,6BAA6B,QAChD,6BAA6B;AAGpC,SAASC,YAAYC,iBAAiB,EAAEC,aAAaC,kBAAkB,QAAQ,oBAAoB;AAGnG,SACEC,qBAAqBC,0BAA0B,EAC/CC,gBAAgBC,qBAAqB,QAChC,qBAAqB;AAG5B,SACEC,2BAA2BC,gCAAgC,EAC3DC,4BAA4BC,iCAAiC,EAC7DC,sBAAsBC,2BAA2B,QAC5C,4BAA4B;AAGnC,SAASC,4BAA4B,EAAEC,uBAAuB,QAAQ,gCAAgC;AAGtG,SAASC,uBAAuB,EAAEC,kBAAkB,QAAQ,2BAA2B;AAEvF,SAASC,oBAAoBC,yBAAyB,EAAEC,eAAeC,oBAAoB,QAAQ,oBAAoB"}
@@ -0,0 +1,26 @@
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
+ AnnounceProvider: ()=>AnnounceProvider,
13
+ useAnnounce: ()=>useAnnounce
14
+ });
15
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
16
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
17
+ /**
18
+ * @internal
19
+ */ const AnnounceContext = /*#__PURE__*/ _react.createContext(undefined);
20
+ const AnnounceProvider = AnnounceContext.Provider;
21
+ function useAnnounce() {
22
+ var _React_useContext;
23
+ return (_React_useContext = _react.useContext(AnnounceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : {
24
+ announce: ()=>undefined
25
+ };
26
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AnnounceContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */ const AnnounceContext = React.createContext(undefined);\n/**\n * @internal\n */ export const AnnounceProvider = AnnounceContext.Provider;\nexport function useAnnounce() {\n var _React_useContext;\n return (_React_useContext = React.useContext(AnnounceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : {\n announce: ()=>undefined\n };\n}\n"],"names":["AnnounceProvider","useAnnounce","AnnounceContext","React","createContext","undefined","Provider","_React_useContext","useContext","announce"],"mappings":";;;;;;;;;;;IAMiBA,gBAAgB,MAAhBA;IACDC,WAAW,MAAXA;;;6DAPO;AACvB;;CAEC,GAAG,MAAMC,gCAAkBC,OAAMC,aAAa,CAACC;AAGrC,MAAML,mBAAmBE,gBAAgBI,QAAQ;AACrD,SAASL,cAAc;IAC1B,IAAIM;IACJ,OAAO,AAACA,CAAAA,oBAAoBJ,OAAMK,UAAU,CAACN,gBAAe,MAAO,IAAI,IAAIK,sBAAsB,KAAK,IAAIA,oBAAoB;QAC1HE,UAAU,IAAIJ;IAClB,CAAC;AACL"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./AnnounceContext"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './AnnounceContext';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -0,0 +1,22 @@
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
+ BackgroundAppearanceContext: ()=>BackgroundAppearanceContext,
13
+ BackgroundAppearanceProvider: ()=>BackgroundAppearanceProvider,
14
+ useBackgroundAppearance: ()=>useBackgroundAppearance
15
+ });
16
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
17
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
18
+ const BackgroundAppearanceContext = /*#__PURE__*/ _react.createContext(undefined);
19
+ const BackgroundAppearanceProvider = BackgroundAppearanceContext.Provider;
20
+ function useBackgroundAppearance() {
21
+ return _react.useContext(BackgroundAppearanceContext);
22
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["BackgroundAppearanceContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n */ export const BackgroundAppearanceContext = React.createContext(undefined);\n/**\n * @internal\n */ export const BackgroundAppearanceProvider = BackgroundAppearanceContext.Provider;\nexport function useBackgroundAppearance() {\n return React.useContext(BackgroundAppearanceContext);\n}\n"],"names":["BackgroundAppearanceContext","BackgroundAppearanceProvider","useBackgroundAppearance","React","createContext","undefined","Provider","useContext"],"mappings":";;;;;;;;;;;IAGiBA,2BAA2B,MAA3BA;IAGAC,4BAA4B,MAA5BA;IACDC,uBAAuB,MAAvBA;;;6DAPO;AAGZ,MAAMF,4CAA8BG,OAAMC,aAAa,CAACC;AAGxD,MAAMJ,+BAA+BD,4BAA4BM,QAAQ;AAC7E,SAASJ,0BAA0B;IACtC,OAAOC,OAAMI,UAAU,CAACP;AAC5B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./BackgroundAppearanceContext"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './BackgroundAppearanceContext';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -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
+ PortalMountNodeProvider: ()=>PortalMountNodeProvider,
13
+ usePortalMountNode: ()=>usePortalMountNode
14
+ });
15
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
16
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
17
+ /**
18
+ * Provides a mount node for portals to render into.
19
+ *
20
+ * @internal
21
+ */ const PortalMountNodeContext = /*#__PURE__*/ _react.createContext(undefined);
22
+ const PortalMountNodeProvider = PortalMountNodeContext.Provider;
23
+ function usePortalMountNode() {
24
+ return _react.useContext(PortalMountNodeContext);
25
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PortalMountNodeContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * Provides a mount node for portals to render into.\n *\n * @internal\n */ const PortalMountNodeContext = React.createContext(undefined);\n/**\n * @internal\n */ export const PortalMountNodeProvider = PortalMountNodeContext.Provider;\nexport function usePortalMountNode() {\n return React.useContext(PortalMountNodeContext);\n}\n"],"names":["PortalMountNodeProvider","usePortalMountNode","PortalMountNodeContext","React","createContext","undefined","Provider","useContext"],"mappings":";;;;;;;;;;;IAQiBA,uBAAuB,MAAvBA;IACDC,kBAAkB,MAAlBA;;;6DATO;AACvB;;;;CAIC,GAAG,MAAMC,uCAAyBC,OAAMC,aAAa,CAACC;AAG5C,MAAML,0BAA0BE,uBAAuBI,QAAQ;AACnE,SAASL,qBAAqB;IACjC,OAAOE,OAAMI,UAAU,CAACL;AAC5B"}
@@ -21,7 +21,13 @@ _export(exports, {
21
21
  useOverrides_unstable: ()=>_overridesContext.useOverrides,
22
22
  CustomStyleHooksContext_unstable: ()=>_customStyleHooksContext.CustomStyleHooksContext,
23
23
  CustomStyleHooksProvider_unstable: ()=>_customStyleHooksContext.CustomStyleHooksProvider,
24
- useCustomStyleHook_unstable: ()=>_customStyleHooksContext.useCustomStyleHook
24
+ useCustomStyleHook_unstable: ()=>_customStyleHooksContext.useCustomStyleHook,
25
+ BackgroundAppearanceProvider: ()=>_backgroundAppearanceContext.BackgroundAppearanceProvider,
26
+ useBackgroundAppearance: ()=>_backgroundAppearanceContext.useBackgroundAppearance,
27
+ PortalMountNodeProvider: ()=>_portalMountNodeContext.PortalMountNodeProvider,
28
+ usePortalMountNode: ()=>_portalMountNodeContext.usePortalMountNode,
29
+ AnnounceProvider_unstable: ()=>_announceContext.AnnounceProvider,
30
+ useAnnounce_unstable: ()=>_announceContext.useAnnounce
25
31
  });
26
32
  const _themeContext = require("./ThemeContext");
27
33
  const _themeClassNameContext = require("./ThemeClassNameContext");
@@ -29,3 +35,6 @@ const _tooltipVisibilityContext = require("./TooltipVisibilityContext");
29
35
  const _providerContext = require("./ProviderContext");
30
36
  const _overridesContext = require("./OverridesContext");
31
37
  const _customStyleHooksContext = require("./CustomStyleHooksContext");
38
+ const _backgroundAppearanceContext = require("./BackgroundAppearanceContext");
39
+ const _portalMountNodeContext = require("./PortalMountNodeContext");
40
+ const _announceContext = require("./AnnounceContext");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport { ThemeClassNameProvider as ThemeClassNameProvider_unstable, useThemeClassName as useThemeClassName_unstable } from './ThemeClassNameContext';\nexport { TooltipVisibilityProvider as TooltipVisibilityProvider_unstable, useTooltipVisibility as useTooltipVisibility_unstable } from './TooltipVisibilityContext';\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport { OverridesProvider as OverridesProvider_unstable, useOverrides as useOverrides_unstable } from './OverridesContext';\nexport { CustomStyleHooksContext as CustomStyleHooksContext_unstable, CustomStyleHooksProvider as CustomStyleHooksProvider_unstable, useCustomStyleHook as useCustomStyleHook_unstable } from './CustomStyleHooksContext';\n"],"names":["ThemeContext_unstable","ThemeContext","ThemeProvider_unstable","ThemeProvider","ThemeClassNameProvider_unstable","ThemeClassNameProvider","useThemeClassName_unstable","useThemeClassName","TooltipVisibilityProvider_unstable","TooltipVisibilityProvider","useTooltipVisibility_unstable","useTooltipVisibility","Provider_unstable","Provider","useFluent_unstable","useFluent","OverridesProvider_unstable","OverridesProvider","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","CustomStyleHooksProvider_unstable","CustomStyleHooksProvider","useCustomStyleHook_unstable","useCustomStyleHook"],"mappings":";;;;;;;;;;;IAAyBA,qBAAqB,MAArCC,0BAAY;IAA4CC,sBAAsB,MAAvCC,2BAAa;IAC1BC,+BAA+B,MAAzDC,6CAAsB;IAA0DC,0BAA0B,MAA/CC,wCAAiB;IAC/CC,kCAAkC,MAA/DC,mDAAyB;IAAgEC,6BAA6B,MAArDC,8CAAoB;IACzEC,iBAAiB,MAA7BC,yBAAQ;IAAoCC,kBAAkB,MAA/BC,0BAAS;IACnBC,0BAA0B,MAA/CC,mCAAiB;IAAgDC,qBAAqB,MAArCC,8BAAY;IAClCC,gCAAgC,MAA3DC,gDAAuB;IAAkEC,iCAAiC,MAA7DC,iDAAwB;IAA6DC,2BAA2B,MAAjDC,2CAAkB;;8BALxD;uCAC4B;0CACY;iCACxD;kCACwB;yCACuF"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { ThemeContext as ThemeContext_unstable, ThemeProvider as ThemeProvider_unstable } from './ThemeContext';\nexport { ThemeClassNameProvider as ThemeClassNameProvider_unstable, useThemeClassName as useThemeClassName_unstable } from './ThemeClassNameContext';\nexport { TooltipVisibilityProvider as TooltipVisibilityProvider_unstable, useTooltipVisibility as useTooltipVisibility_unstable } from './TooltipVisibilityContext';\nexport { Provider as Provider_unstable, useFluent as useFluent_unstable } from './ProviderContext';\nexport { OverridesProvider as OverridesProvider_unstable, useOverrides as useOverrides_unstable } from './OverridesContext';\nexport { CustomStyleHooksContext as CustomStyleHooksContext_unstable, CustomStyleHooksProvider as CustomStyleHooksProvider_unstable, useCustomStyleHook as useCustomStyleHook_unstable } from './CustomStyleHooksContext';\nexport { BackgroundAppearanceProvider, useBackgroundAppearance } from './BackgroundAppearanceContext';\nexport { PortalMountNodeProvider, usePortalMountNode } from './PortalMountNodeContext';\nexport { AnnounceProvider as AnnounceProvider_unstable, useAnnounce as useAnnounce_unstable } from './AnnounceContext';\n"],"names":["ThemeContext_unstable","ThemeContext","ThemeProvider_unstable","ThemeProvider","ThemeClassNameProvider_unstable","ThemeClassNameProvider","useThemeClassName_unstable","useThemeClassName","TooltipVisibilityProvider_unstable","TooltipVisibilityProvider","useTooltipVisibility_unstable","useTooltipVisibility","Provider_unstable","Provider","useFluent_unstable","useFluent","OverridesProvider_unstable","OverridesProvider","useOverrides_unstable","useOverrides","CustomStyleHooksContext_unstable","CustomStyleHooksContext","CustomStyleHooksProvider_unstable","CustomStyleHooksProvider","useCustomStyleHook_unstable","useCustomStyleHook","BackgroundAppearanceProvider","useBackgroundAppearance","PortalMountNodeProvider","usePortalMountNode","AnnounceProvider_unstable","AnnounceProvider","useAnnounce_unstable","useAnnounce"],"mappings":";;;;;;;;;;;IAAyBA,qBAAqB,MAArCC,0BAAY;IAA4CC,sBAAsB,MAAvCC,2BAAa;IAC1BC,+BAA+B,MAAzDC,6CAAsB;IAA0DC,0BAA0B,MAA/CC,wCAAiB;IAC/CC,kCAAkC,MAA/DC,mDAAyB;IAAgEC,6BAA6B,MAArDC,8CAAoB;IACzEC,iBAAiB,MAA7BC,yBAAQ;IAAoCC,kBAAkB,MAA/BC,0BAAS;IACnBC,0BAA0B,MAA/CC,mCAAiB;IAAgDC,qBAAqB,MAArCC,8BAAY;IAClCC,gCAAgC,MAA3DC,gDAAuB;IAAkEC,iCAAiC,MAA7DC,iDAAwB;IAA6DC,2BAA2B,MAAjDC,2CAAkB;IAC9IC,4BAA4B,MAA5BA,yDAA4B;IAAEC,uBAAuB,MAAvBA,oDAAuB;IACrDC,uBAAuB,MAAvBA,+CAAuB;IAAEC,kBAAkB,MAAlBA,0CAAkB;IACvBC,yBAAyB,MAA7CC,iCAAgB;IAA8CC,oBAAoB,MAAnCC,4BAAW;;8BAR4B;uCAC4B;0CACY;iCACxD;kCACwB;yCACuF;6CACxH;wCACV;iCACuC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-shared-contexts",
3
- "version": "9.5.1",
3
+ "version": "9.7.0",
4
4
  "description": "Fluent UI React Contexts shared by multiple components.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",