@uifabricshared/theming-react-native 0.20.20 → 0.21.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 (94) hide show
  1. package/CHANGELOG.md +97 -3
  2. package/README.md +1 -1
  3. package/etc/theming-react-native.api.md +12 -11
  4. package/lib/BaselinePlatformDefaults.d.ts +1 -1
  5. package/lib/BaselinePlatformDefaults.js +2 -2
  6. package/lib/BaselinePlatformDefaults.js.map +1 -1
  7. package/lib/Global.d.ts +1 -1
  8. package/lib/Global.js +11 -11
  9. package/lib/Global.js.map +1 -1
  10. package/lib/NativeModule/ThemingModule.d.ts +2 -2
  11. package/lib/NativeModule/ThemingModule.js +1 -1
  12. package/lib/NativeModule/ThemingModule.types.d.ts +13 -13
  13. package/lib/NativeModule/ThemingModule.types.js +1 -1
  14. package/lib/NativeModule/ThemingModuleHelpers.d.ts +8 -3
  15. package/lib/NativeModule/ThemingModuleHelpers.d.ts.map +1 -1
  16. package/lib/NativeModule/ThemingModuleHelpers.js +36 -36
  17. package/lib/NativeModule/ThemingModuleHelpers.js.map +1 -1
  18. package/lib/NativeModule/getHostSettings.d.ts +1 -1
  19. package/lib/NativeModule/getHostSettings.js +2 -2
  20. package/lib/NativeModule/getHostSettings.js.map +1 -1
  21. package/lib/NativeModule/index.d.ts +1 -1
  22. package/lib/NativeModule/index.js +1 -1
  23. package/lib/Theme.types.d.ts +1 -1
  24. package/lib/Theme.types.js +1 -1
  25. package/lib/ThemeContext.d.ts +1 -1
  26. package/lib/ThemeContext.js +1 -1
  27. package/lib/ThemeLayer.d.ts +25 -24
  28. package/lib/ThemeLayer.d.ts.map +1 -1
  29. package/lib/ThemeLayer.js +42 -39
  30. package/lib/ThemeLayer.js.map +1 -1
  31. package/lib/ThemeProvider.d.ts +1 -1
  32. package/lib/ThemeProvider.js +21 -20
  33. package/lib/ThemeProvider.js.map +1 -1
  34. package/lib/ThemeProvider.types.d.ts +3 -3
  35. package/lib/ThemeProvider.types.js +1 -1
  36. package/lib/index.d.ts +1 -1
  37. package/lib/index.js +1 -1
  38. package/lib/platform/PlatformDefaults.d.ts +8 -2
  39. package/lib/platform/PlatformDefaults.d.ts.map +1 -1
  40. package/lib/platform/PlatformDefaults.js +2 -2
  41. package/lib/platform/PlatformDefaults.js.map +1 -1
  42. package/lib/platform/PlatformDefaults.native.d.ts +8 -2
  43. package/lib/platform/PlatformDefaults.native.d.ts.map +1 -1
  44. package/lib/platform/PlatformDefaults.native.js +6 -6
  45. package/lib/platform/PlatformDefaults.native.js.map +1 -1
  46. package/lib/platform/index.d.ts +1 -1
  47. package/lib/platform/index.js +1 -1
  48. package/lib-commonjs/BaselinePlatformDefaults.d.ts +1 -1
  49. package/lib-commonjs/BaselinePlatformDefaults.js +6 -7
  50. package/lib-commonjs/BaselinePlatformDefaults.js.map +1 -1
  51. package/lib-commonjs/Global.d.ts +1 -1
  52. package/lib-commonjs/Global.js +21 -22
  53. package/lib-commonjs/Global.js.map +1 -1
  54. package/lib-commonjs/NativeModule/ThemingModule.d.ts +2 -2
  55. package/lib-commonjs/NativeModule/ThemingModule.js +5 -5
  56. package/lib-commonjs/NativeModule/ThemingModule.types.d.ts +13 -13
  57. package/lib-commonjs/NativeModule/ThemingModule.types.js +3 -3
  58. package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts +8 -3
  59. package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +46 -44
  60. package/lib-commonjs/NativeModule/ThemingModuleHelpers.js.map +1 -1
  61. package/lib-commonjs/NativeModule/getHostSettings.d.ts +1 -1
  62. package/lib-commonjs/NativeModule/getHostSettings.js +5 -6
  63. package/lib-commonjs/NativeModule/getHostSettings.js.map +1 -1
  64. package/lib-commonjs/NativeModule/index.d.ts +1 -1
  65. package/lib-commonjs/NativeModule/index.js +17 -7
  66. package/lib-commonjs/NativeModule/index.js.map +1 -1
  67. package/lib-commonjs/Theme.types.d.ts +1 -1
  68. package/lib-commonjs/Theme.types.js +3 -3
  69. package/lib-commonjs/ThemeContext.d.ts +1 -1
  70. package/lib-commonjs/ThemeContext.js +67 -30
  71. package/lib-commonjs/ThemeContext.js.map +1 -1
  72. package/lib-commonjs/ThemeLayer.d.ts +25 -24
  73. package/lib-commonjs/ThemeLayer.d.ts.map +1 -1
  74. package/lib-commonjs/ThemeLayer.js +97 -67
  75. package/lib-commonjs/ThemeLayer.js.map +1 -1
  76. package/lib-commonjs/ThemeProvider.d.ts +1 -1
  77. package/lib-commonjs/ThemeProvider.js +79 -49
  78. package/lib-commonjs/ThemeProvider.js.map +1 -1
  79. package/lib-commonjs/ThemeProvider.types.d.ts +3 -3
  80. package/lib-commonjs/ThemeProvider.types.js +3 -3
  81. package/lib-commonjs/index.d.ts +1 -1
  82. package/lib-commonjs/index.js +108 -24
  83. package/lib-commonjs/index.js.map +1 -1
  84. package/lib-commonjs/platform/PlatformDefaults.d.ts +8 -2
  85. package/lib-commonjs/platform/PlatformDefaults.js +11 -9
  86. package/lib-commonjs/platform/PlatformDefaults.js.map +1 -1
  87. package/lib-commonjs/platform/PlatformDefaults.native.d.ts +8 -2
  88. package/lib-commonjs/platform/PlatformDefaults.native.js +15 -13
  89. package/lib-commonjs/platform/PlatformDefaults.native.js.map +1 -1
  90. package/lib-commonjs/platform/index.d.ts +1 -1
  91. package/lib-commonjs/platform/index.js +29 -18
  92. package/package.json +58 -62
  93. package/src/ThemeLayer.tsx +3 -2
  94. package/babel.config.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC"}
1
+ {"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa,EAA8B;IAC9E,OAAO,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAAA,CACrD"}
@@ -1,4 +1,4 @@
1
1
  export { ThemingModuleHelper } from './ThemingModule';
2
2
  export type { IEventEmitter, IPlatformThemeDefinition, IThemingModuleHelper, IHostSettingsWin32 } from './ThemingModule.types';
3
3
  export { getHostSettingsWin32 } from './getHostSettings';
4
- //# sourceMappingURL=index.d.ts.map
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export { ThemingModuleHelper } from './ThemingModule';
2
2
  export { getHostSettingsWin32 } from './getHostSettings';
3
- //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -12,4 +12,4 @@ export type IThemeDefinition = IPartialTheme | IProcessTheme<ITheme, IPartialThe
12
12
  * @deprecated
13
13
  */
14
14
  export type ThemeRegistry = IThemeRegistry<ITheme, IPartialTheme>;
15
- //# sourceMappingURL=Theme.types.d.ts.map
15
+ //# sourceMappingURL=Theme.types.d.ts.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=Theme.types.js.map
2
+ //# sourceMappingURL=Theme.types.js.map
@@ -12,4 +12,4 @@ export declare const ThemeRegistryContext: React.Context<ThemeRegistry>;
12
12
  * @deprecated
13
13
  */
14
14
  export declare const useThemeRegistry: () => ThemeRegistry;
15
- //# sourceMappingURL=ThemeContext.d.ts.map
15
+ //# sourceMappingURL=ThemeContext.d.ts.map
@@ -11,4 +11,4 @@ export const ThemeRegistryContext = React.createContext(undefined);
11
11
  * @deprecated
12
12
  */
13
13
  export const useThemeRegistry = () => React.useContext(ThemeRegistryContext);
14
- //# sourceMappingURL=ThemeContext.js.map
14
+ //# sourceMappingURL=ThemeContext.js.map
@@ -1,22 +1,23 @@
1
1
  import * as React from 'react';
2
2
  import type { IThemeEventListener } from '@uifabricshared/theme-registry';
3
3
  import type { ITheme } from './Theme.types';
4
+ import type { FurnJSX } from '@fluentui-react-native/framework-base';
4
5
  /**
5
6
  * props for the ThemeLayer
6
7
  * @deprecated
7
8
  */
8
9
  export interface IThemeLayerProps {
9
- /**
10
- * If `themeName` is specified this layer will set that theme as the active theme. Setting the value
11
- * to '' will explicitly set the default theme as active in the context. If `themeName` is unspecified
12
- * the theme layer will act as a consumer and pick up the currently active theme in the context
13
- */
14
- themeName?: string;
15
- /**
16
- * children function that allows passing of the theme to children. This is a standard pattern for
17
- * consumers.
18
- */
19
- children: (theme: ITheme) => JSX.Element | null;
10
+ /**
11
+ * If `themeName` is specified this layer will set that theme as the active theme. Setting the value
12
+ * to '' will explicitly set the default theme as active in the context. If `themeName` is unspecified
13
+ * the theme layer will act as a consumer and pick up the currently active theme in the context
14
+ */
15
+ themeName?: string;
16
+ /**
17
+ * children function that allows passing of the theme to children. This is a standard pattern for
18
+ * consumers.
19
+ */
20
+ children: (theme: ITheme) => FurnJSX.Element | null;
20
21
  }
21
22
  /**
22
23
  * Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
@@ -45,17 +46,17 @@ export interface IThemeLayerProps {
45
46
  * @deprecated
46
47
  */
47
48
  export declare class ThemeLayer extends React.Component<IThemeLayerProps> {
48
- /**
49
- * stores the name of the theme if in provider mode. Existence of this string is tied to registration
50
- * and is used to signal registration and unregistration
51
- */
52
- private _registeredTheme;
53
- /** handler for theme changes, conditionally will force update */
54
- onInvalidate: IThemeEventListener['onInvalidate'];
55
- /** standard cleanup handler to ensure we unregister */
56
- componentWillUnmount(): void;
57
- render(): JSX.Element;
58
- /** helper to register if this is the first time and to update the filter if necessary */
59
- private _ensureCallbackRegistration;
49
+ /**
50
+ * stores the name of the theme if in provider mode. Existence of this string is tied to registration
51
+ * and is used to signal registration and unregistration
52
+ */
53
+ private _registeredTheme;
54
+ /** handler for theme changes, conditionally will force update */
55
+ onInvalidate: IThemeEventListener['onInvalidate'];
56
+ /** standard cleanup handler to ensure we unregister */
57
+ componentWillUnmount(): void;
58
+ render(): FurnJSX.Element;
59
+ /** helper to register if this is the first time and to update the filter if necessary */
60
+ private _ensureCallbackRegistration;
60
61
  }
61
- //# sourceMappingURL=ThemeLayer.d.ts.map
62
+ //# sourceMappingURL=ThemeLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeLayer.d.ts","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAKtD;IAEF,uDAAuD;IAChD,oBAAoB,IAAI,IAAI;IAO5B,MAAM,IAAI,GAAG,CAAC,OAAO;IAoB5B,yFAAyF;IACzF,OAAO,CAAC,2BAA2B,CAKjC;CACH"}
1
+ {"version":3,"file":"ThemeLayer.d.ts","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAI1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;CACrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAKtD;IAEF,uDAAuD;IAChD,oBAAoB,IAAI,IAAI,CAKlC;IAEM,MAAM,IAAI,OAAO,CAAC,OAAO,CAkB/B;IAED,yFAAyF;IACzF,OAAO,CAAC,2BAA2B,CAKjC;CACH"}
package/lib/ThemeLayer.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { ThemeContext } from '@uifabricshared/theming-ramp';
3
4
  import { removeThemeRegistryListener, getTheme, addThemeRegistryListener } from './Global';
@@ -28,46 +29,48 @@ import { removeThemeRegistryListener, getTheme, addThemeRegistryListener } from
28
29
  * @deprecated
29
30
  */
30
31
  export class ThemeLayer extends React.Component {
31
- /**
32
- * stores the name of the theme if in provider mode. Existence of this string is tied to registration
33
- * and is used to signal registration and unregistration
34
- */
35
- _registeredTheme;
36
- /** handler for theme changes, conditionally will force update */
37
- onInvalidate = (name) => {
38
- // only force updates if this theme was the one invalidated
39
- if (name === this._registeredTheme) {
40
- this.forceUpdate();
41
- }
42
- };
43
- /** standard cleanup handler to ensure we unregister */
44
- componentWillUnmount() {
45
- if (this._registeredTheme !== undefined) {
46
- removeThemeRegistryListener(this);
47
- this._registeredTheme = undefined;
48
- }
32
+ /**
33
+ * stores the name of the theme if in provider mode. Existence of this string is tied to registration
34
+ * and is used to signal registration and unregistration
35
+ */
36
+ _registeredTheme;
37
+ /** handler for theme changes, conditionally will force update */
38
+ onInvalidate = (name) => {
39
+ // only force updates if this theme was the one invalidated
40
+ if (name === this._registeredTheme) {
41
+ this.forceUpdate();
49
42
  }
50
- render() {
51
- let themeName = this.props.themeName;
52
- return (React.createElement(ThemeContext.Consumer, null, (theme) => {
53
- // go to provider mode if a themeName is specified or if this is the first consumer and the context
54
- // is undefined.
55
- if (themeName !== undefined || theme === undefined) {
56
- themeName = themeName || '';
57
- this._ensureCallbackRegistration(themeName);
58
- theme = getTheme(themeName);
59
- return React.createElement(ThemeContext.Provider, { value: theme }, this.props.children(theme));
60
- }
61
- // otherwise in consumer mode just push the current theme to the children
62
- return this.props.children(theme);
63
- }));
43
+ };
44
+ /** standard cleanup handler to ensure we unregister */
45
+ componentWillUnmount() {
46
+ if (this._registeredTheme !== undefined) {
47
+ removeThemeRegistryListener(this);
48
+ this._registeredTheme = undefined;
64
49
  }
65
- /** helper to register if this is the first time and to update the filter if necessary */
66
- _ensureCallbackRegistration = (themeName) => {
67
- if (this._registeredTheme === undefined) {
68
- addThemeRegistryListener(this);
50
+ }
51
+ render() {
52
+ let themeName = this.props.themeName;
53
+ return _jsx(ThemeContext.Consumer, {
54
+ children: (theme) => {
55
+ // go to provider mode if a themeName is specified or if this is the first consumer and the context
56
+ // is undefined.
57
+ if (themeName !== undefined || theme === undefined) {
58
+ themeName = themeName || '';
59
+ this._ensureCallbackRegistration(themeName);
60
+ theme = getTheme(themeName);
61
+ return _jsx(ThemeContext.Provider, { value: theme, children: this.props.children(theme) });
69
62
  }
70
- this._registeredTheme = themeName;
71
- };
63
+ // otherwise in consumer mode just push the current theme to the children
64
+ return this.props.children(theme);
65
+ },
66
+ });
67
+ }
68
+ /** helper to register if this is the first time and to update the filter if necessary */
69
+ _ensureCallbackRegistration = (themeName) => {
70
+ if (this._registeredTheme === undefined) {
71
+ addThemeRegistryListener(this);
72
+ }
73
+ this._registeredTheme = themeName;
74
+ };
72
75
  }
73
- //# sourceMappingURL=ThemeLayer.js.map
76
+ //# sourceMappingURL=ThemeLayer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeLayer.js","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAsB3F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA2B;IAC/D;;;OAGG;IACK,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY,GAAwC,CAAC,IAAY,EAAE,EAAE;QAC1E,2DAA2D;QAC3D,IAAI,IAAI,KAAK,IAAI,CAAC,gBAAgB,EAAE;YAClC,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,CAAC;IAEF,uDAAuD;IAChD,oBAAoB;QACzB,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;YACvC,2BAA2B,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;SACnC;IACH,CAAC;IAEM,MAAM;QACX,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACrC,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,QACnB,CAAC,KAAc,EAAE,EAAE;YAClB,mGAAmG;YACnG,gBAAgB;YAChB,IAAI,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE;gBAClD,SAAS,GAAG,SAAS,IAAI,EAAE,C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,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxC,2BAA2B,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACpC,CAAC;IAAA,CACF;IAEM,MAAM,GAAoB;QAC/B,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACrC,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,cACnB,CAAC,KAAc,EAAE,EAAE,CAAC;gBACnB,mGAAmG;gBACnG,gBAAgB;gBAChB,IAAI,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;oBACnD,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;oBAC5B,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;oBAC5C,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;oBAC5B,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAyB,CAAC;gBACnG,CAAC;gBACD,yEAAyE;gBACzE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAAA,CACnC,GACqB,CACzB,CAAC;IAAA,CACH;IAED,yFAAyF;IACjF,2BAA2B,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC;QAC3D,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxC,wBAAwB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAAA,CACnC,CAAC;CACH"}
@@ -5,4 +5,4 @@ import type { IThemeProviderProps } from './ThemeProvider.types';
5
5
  * See https://github.com/microsoft/fluentui-react-native/blob/main/docs/pages/Guides/UpdateThemeProvider.md for details
6
6
  */
7
7
  export declare const ThemeProvider: React.FunctionComponent<IThemeProviderProps>;
8
- //# sourceMappingURL=ThemeProvider.d.ts.map
8
+ //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { ThemeContext } from '@uifabricshared/theming-ramp';
3
4
  import { getThemeRegistry } from './Global';
@@ -7,24 +8,24 @@ import { useThemeRegistry, ThemeRegistryContext } from './ThemeContext';
7
8
  * See https://github.com/microsoft/fluentui-react-native/blob/main/docs/pages/Guides/UpdateThemeProvider.md for details
8
9
  */
9
10
  export const ThemeProvider = (props) => {
10
- const { registry: registryFromProps, theme: themeName = '', children } = props;
11
- const defaultRegistry = useThemeRegistry();
12
- const registryToUse = registryFromProps || defaultRegistry || getThemeRegistry();
13
- const [theme, setThemeState] = React.useState(registryToUse.getTheme(themeName));
14
- React.useEffect(() => {
15
- setThemeState(registryToUse.getTheme(themeName));
16
- const themeInvalidater = {
17
- onInvalidate: (name) => {
18
- name === themeName && setThemeState(registryToUse.getTheme(themeName));
19
- },
20
- };
21
- registryToUse.addEventListener(themeInvalidater);
22
- return () => {
23
- registryToUse.removeEventListener(themeInvalidater);
24
- };
25
- }, [registryToUse, themeName, setThemeState]);
26
- const themeProvider = React.createElement(ThemeContext.Provider, { value: theme }, children);
27
- // note `registryFromProps` came from props and it's not the same as `registryToUse`
28
- return registryFromProps ? (React.createElement(ThemeRegistryContext.Provider, { value: registryFromProps }, themeProvider)) : (themeProvider);
11
+ const { registry: registryFromProps, theme: themeName = '', children } = props;
12
+ const defaultRegistry = useThemeRegistry();
13
+ const registryToUse = registryFromProps || defaultRegistry || getThemeRegistry();
14
+ const [theme, setThemeState] = React.useState(registryToUse.getTheme(themeName));
15
+ React.useEffect(() => {
16
+ setThemeState(registryToUse.getTheme(themeName));
17
+ const themeInvalidater = {
18
+ onInvalidate: (name) => {
19
+ name === themeName && setThemeState(registryToUse.getTheme(themeName));
20
+ },
21
+ };
22
+ registryToUse.addEventListener(themeInvalidater);
23
+ return () => {
24
+ registryToUse.removeEventListener(themeInvalidater);
25
+ };
26
+ }, [registryToUse, themeName, setThemeState]);
27
+ const themeProvider = _jsx(ThemeContext.Provider, { value: theme, children: children });
28
+ // note `registryFromProps` came from props and it's not the same as `registryToUse`
29
+ return registryFromProps ? _jsx(ThemeRegistryContext.Provider, { value: registryFromProps, children: themeProvider }) : themeProvider;
29
30
  };
30
- //# sourceMappingURL=ThemeProvider.js.map
31
+ //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGxE;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiD,CAAC,KAA0B,EAAE,EAAE;IACxG,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC/E,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,aAAa,GAAG,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,EAAE,CAAC;IACjF,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAEjF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,MAAM,gBAAgB,GAAwB;YAC5C,YAAY,EAAE,CAAC,IAAY,EAAE,EAAE;gB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AE,CAAC;IACjF,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAEjF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACpB,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,MAAM,gBAAgB,GAAwB;YAC5C,YAAY,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC;gBAC9B,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YAAA,CACxE;SACF,CAAC;QAEF,aAAa,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO,GAAG,EAAE,CAAC;YACX,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;QAAA,CACrD,CAAC;IAAA,CACH,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9C,MAAM,aAAa,GAAG,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;IAE9F,oFAAoF;IACpF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,KAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,YAAG,aAAa,GAAiC,CACzG,CAAC,CAAC,CAAC,CACF,aAAa,CACd,CAAC;AAAA,CACH,CAAC"}
@@ -3,7 +3,7 @@ import { ThemeRegistry } from './Theme.types';
3
3
  * @deprecated
4
4
  */
5
5
  export interface IThemeProviderProps extends React.PropsWithChildren<{}> {
6
- theme?: string;
7
- registry?: ThemeRegistry;
6
+ theme?: string;
7
+ registry?: ThemeRegistry;
8
8
  }
9
- //# sourceMappingURL=ThemeProvider.types.d.ts.map
9
+ //# sourceMappingURL=ThemeProvider.types.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable */
2
2
  export {};
3
- //# sourceMappingURL=ThemeProvider.types.js.map
3
+ //# sourceMappingURL=ThemeProvider.types.js.map
package/lib/index.d.ts CHANGED
@@ -39,4 +39,4 @@ export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
39
39
  * @deprecated
40
40
  */
41
41
  export type { IEventEmitter, IHostSettingsWin32, IPlatformThemeDefinition, IThemingModuleHelper } from './NativeModule';
42
- //# sourceMappingURL=index.d.ts.map
42
+ //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -19,4 +19,4 @@ export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from '
19
19
  * @deprecated
20
20
  */
21
21
  export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
22
- //# sourceMappingURL=index.js.map
22
+ //# sourceMappingURL=index.js.map
@@ -2,5 +2,11 @@ import type { IThemingModuleHelper } from '../NativeModule';
2
2
  /**
3
3
  * @deprecated
4
4
  */
5
- export declare function createPlatformThemeRegistry(_themeId?: string, _module?: IThemingModuleHelper): import("@uifabricshared/theme-registry").IThemeRegistry<import("@uifabricshared/theming-ramp").ITheme, import("@uifabricshared/theming-ramp").IPartialTheme>;
6
- //# sourceMappingURL=PlatformDefaults.d.ts.map
5
+ export declare function createPlatformThemeRegistry(
6
+ _themeId?: string,
7
+ _module?: IThemingModuleHelper,
8
+ ): import('@uifabricshared/theme-registry').IThemeRegistry<
9
+ import('@fluentui-react-native/theme-types').Theme,
10
+ import('@fluentui-react-native/theme-types').PartialTheme
11
+ >;
12
+ //# sourceMappingURL=PlatformDefaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformDefaults.d.ts","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,gKAE5F"}
1
+ {"version":3,"file":"PlatformDefaults.d.ts","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,0KAE5F"}
@@ -5,6 +5,6 @@ import { getBaselinePlatformTheme } from '../BaselinePlatformDefaults';
5
5
  * @deprecated
6
6
  */
7
7
  export function createPlatformThemeRegistry(_themeId, _module) {
8
- return createThemeRegistry(getBaselinePlatformTheme(), resolvePartialTheme);
8
+ return createThemeRegistry(getBaselinePlatformTheme(), resolvePartialTheme);
9
9
  }
10
- //# sourceMappingURL=PlatformDefaults.js.map
10
+ //# sourceMappingURL=PlatformDefaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAGvE;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,QAAiB,EAAE,OAA8B;IAC3F,OAAO,mBAAmB,CAAC,wBAAwB,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAC9E,CAAC"}
1
+ {"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAGvE;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,QAAiB,EAAE,OAA8B,EAAE;IAC7F,OAAO,mBAAmB,CAAC,wBAAwB,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAAA,CAC7E"}
@@ -2,5 +2,11 @@ import type { IThemingModuleHelper } from '../NativeModule';
2
2
  /**
3
3
  * @deprecated
4
4
  */
5
- export declare function createPlatformThemeRegistry(platformThemeId?: string, module?: IThemingModuleHelper): import("@uifabricshared/theme-registry").IThemeRegistry<import("@uifabricshared/theming-ramp").ITheme, import("@uifabricshared/theming-ramp").IPartialTheme>;
6
- //# sourceMappingURL=PlatformDefaults.native.d.ts.map
5
+ export declare function createPlatformThemeRegistry(
6
+ platformThemeId?: string,
7
+ module?: IThemingModuleHelper,
8
+ ): import('@uifabricshared/theme-registry').IThemeRegistry<
9
+ import('@fluentui-react-native/theme-types').Theme,
10
+ import('@fluentui-react-native/theme-types').PartialTheme
11
+ >;
12
+ //# sourceMappingURL=PlatformDefaults.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformDefaults.native.d.ts","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,oBAA0C,gKAMvH"}
1
+ {"version":3,"file":"PlatformDefaults.native.d.ts","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG5D;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,oBAA0C,0KAMvH"}
@@ -5,10 +5,10 @@ import { ThemingModuleHelper } from '../NativeModule';
5
5
  * @deprecated
6
6
  */
7
7
  export function createPlatformThemeRegistry(platformThemeId, module = ThemingModuleHelper) {
8
- const registry = createThemeRegistry(module.getPlatformDefaults(platformThemeId), resolvePartialTheme);
9
- module.addListener(() => {
10
- registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
11
- });
12
- return registry;
8
+ const registry = createThemeRegistry(module.getPlatformDefaults(platformThemeId), resolvePartialTheme);
9
+ module.addListener(() => {
10
+ registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
11
+ });
12
+ return registry;
13
13
  }
14
- //# sourceMappingURL=PlatformDefaults.native.js.map
14
+ //# sourceMappingURL=PlatformDefaults.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformDefaults.native.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,eAAwB,EAAE,SAA+B,mBAAmB;IACtH,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACvG,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE;QACtB,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"PlatformDefaults.native.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,eAAwB,EAAE,MAAM,GAAyB,mBAAmB,EAAE;IACxH,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACvG,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;QACvB,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAAA,CAC9E,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAAA,CACjB"}
@@ -1,2 +1,2 @@
1
1
  export * from './PlatformDefaults';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
1
  export * from './PlatformDefaults';
2
- //# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -3,4 +3,4 @@ import type { ITheme } from '@uifabricshared/theming-ramp';
3
3
  * @deprecated
4
4
  */
5
5
  export declare function getBaselinePlatformTheme(): ITheme;
6
- //# sourceMappingURL=BaselinePlatformDefaults.d.ts.map
6
+ //# sourceMappingURL=BaselinePlatformDefaults.d.ts.map
@@ -1,12 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBaselinePlatformTheme = void 0;
4
- const default_theme_1 = require("@fluentui-react-native/default-theme");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.getBaselinePlatformTheme = getBaselinePlatformTheme;
4
+ const default_theme_1 = require('@fluentui-react-native/default-theme');
5
5
  /**
6
6
  * @deprecated
7
7
  */
8
8
  function getBaselinePlatformTheme() {
9
- return default_theme_1.defaultFluentTheme;
9
+ return default_theme_1.defaultFluentTheme;
10
10
  }
11
- exports.getBaselinePlatformTheme = getBaselinePlatformTheme;
12
- //# sourceMappingURL=BaselinePlatformDefaults.js.map
11
+ //# sourceMappingURL=BaselinePlatformDefaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaselinePlatformDefaults.js","sourceRoot":"","sources":["../src/BaselinePlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAG1E;;GAEG;AACH,SAAgB,wBAAwB;IACtC,OAAO,kCAAkB,CAAC;AAC5B,CAAC;AAFD,4DAEC"}
1
+ {"version":3,"file":"BaselinePlatformDefaults.js","sourceRoot":"","sources":["../src/BaselinePlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,wEAA0E;AAG1E;;GAEG;AACH,oCAAmD;IACjD,OAAO,kCAAkB,CAAC;AAAA,CAC3B"}
@@ -53,4 +53,4 @@ export declare function getTheme(name?: string): ITheme;
53
53
  * @deprecated
54
54
  */
55
55
  export declare function augmentPlatformTheme(definition: IPartialTheme): void;
56
- //# sourceMappingURL=Global.d.ts.map
56
+ //# sourceMappingURL=Global.d.ts.map
@@ -1,7 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.augmentPlatformTheme = exports.getTheme = exports.removeThemeRegistryListener = exports.addThemeRegistryListener = exports.setTheme = exports.setThemeRegistry = exports.getThemeRegistry = void 0;
4
- const platform_1 = require("./platform");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.getThemeRegistry = getThemeRegistry;
4
+ exports.setThemeRegistry = setThemeRegistry;
5
+ exports.setTheme = setTheme;
6
+ exports.addThemeRegistryListener = addThemeRegistryListener;
7
+ exports.removeThemeRegistryListener = removeThemeRegistryListener;
8
+ exports.getTheme = getTheme;
9
+ exports.augmentPlatformTheme = augmentPlatformTheme;
10
+ const platform_1 = require('./platform');
5
11
  let _registry;
6
12
  /**
7
13
  * Ensure that `_registry` is set. If not, create it using a native module to
@@ -9,12 +15,11 @@ let _registry;
9
15
  * @deprecated
10
16
  */
11
17
  function getThemeRegistry() {
12
- if (!_registry) {
13
- _registry = (0, platform_1.createPlatformThemeRegistry)();
14
- }
15
- return _registry;
18
+ if (!_registry) {
19
+ _registry = (0, platform_1.createPlatformThemeRegistry)();
20
+ }
21
+ return _registry;
16
22
  }
17
- exports.getThemeRegistry = getThemeRegistry;
18
23
  /**
19
24
  * Set the global theme registry.
20
25
  *
@@ -27,9 +32,8 @@ exports.getThemeRegistry = getThemeRegistry;
27
32
  * @deprecated
28
33
  */
29
34
  function setThemeRegistry(registry) {
30
- _registry = registry;
35
+ _registry = registry;
31
36
  }
32
- exports.setThemeRegistry = setThemeRegistry;
33
37
  /**
34
38
  * Create or update a theme definition
35
39
  * @param definition - partial theme definition or processing function that defines the theme
@@ -38,36 +42,32 @@ exports.setThemeRegistry = setThemeRegistry;
38
42
  * @deprecated
39
43
  */
40
44
  function setTheme(definition, name, parent) {
41
- return getThemeRegistry().setTheme(definition, name, parent);
45
+ return getThemeRegistry().setTheme(definition, name, parent);
42
46
  }
43
- exports.setTheme = setTheme;
44
47
  /**
45
48
  * Register a theme event listener
46
49
  * @param listener - theme event listener to add
47
50
  * @deprecated
48
51
  */
49
52
  function addThemeRegistryListener(listener) {
50
- return getThemeRegistry().addEventListener(listener);
53
+ return getThemeRegistry().addEventListener(listener);
51
54
  }
52
- exports.addThemeRegistryListener = addThemeRegistryListener;
53
55
  /**
54
56
  * Unregister a theme event listener
55
57
  * @param listener - theme event listener to remove
56
58
  * @deprecated
57
59
  */
58
60
  function removeThemeRegistryListener(listener) {
59
- return getThemeRegistry().removeEventListener(listener);
61
+ return getThemeRegistry().removeEventListener(listener);
60
62
  }
61
- exports.removeThemeRegistryListener = removeThemeRegistryListener;
62
63
  /**
63
64
  * Get a theme by name
64
65
  * @param name - name of the theme. Undefined or '' will resolve to the default theme
65
66
  * @deprecated
66
67
  */
67
68
  function getTheme(name) {
68
- return getThemeRegistry().getTheme(name);
69
+ return getThemeRegistry().getTheme(name);
69
70
  }
70
- exports.getTheme = getTheme;
71
71
  /**
72
72
  * This will update the platform theme. This is primarily exposed for clients to add custom lookup values to palettes or to
73
73
  * add custom typed settings blocks for their own components.
@@ -77,7 +77,6 @@ exports.getTheme = getTheme;
77
77
  * @deprecated
78
78
  */
79
79
  function augmentPlatformTheme(definition) {
80
- getThemeRegistry().updatePlatformDefaults(definition);
80
+ getThemeRegistry().updatePlatformDefaults(definition);
81
81
  }
82
- exports.augmentPlatformTheme = augmentPlatformTheme;
83
- //# sourceMappingURL=Global.js.map
82
+ //# sourceMappingURL=Global.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Global.js","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":";;;AAEA,yCAAyD;AAGzD,IAAI,SAAwB,CAAC;AAE7B;;;;GAIG;AACH,SAAgB,gBAAgB;IAC9B,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,IAAA,sCAA2B,GAAE,CAAC;KAC3C;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AALD,4CAKC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,gBAAgB,CAAC,QAAuB;IACtD,SAAS,GAAG,QAAQ,CAAC;AACvB,CAAC;AAFD,4CAEC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,UAAgE,EAAE,IAAa,EAAE,MAAe;IACvH,OAAO,gBAAgB,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC;AAFD,4BAEC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,QAA6B;IACpE,OAAO,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC;AAFD,4DAEC;AAED;;;;GAIG;AACH,SAAgB,2BAA2B,CAAC,QAA6B;IACvE,OAAO,gBAAgB,EAAE,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAFD,kEAEC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAA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C;AAAA,CACvD"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * @deprecated
3
3
  */
4
- export declare const ThemingModuleHelper: import("./ThemingModule.types").IThemingModuleHelper;
5
- //# sourceMappingURL=ThemingModule.d.ts.map
4
+ export declare const ThemingModuleHelper: import('./ThemingModule.types').IThemingModuleHelper;
5
+ //# sourceMappingURL=ThemingModule.d.ts.map
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.ThemingModuleHelper = void 0;
4
- const win32_theme_1 = require("@fluentui-react-native/win32-theme");
5
- const ThemingModuleHelpers_1 = require("./ThemingModuleHelpers");
4
+ const win32_theme_1 = require('@fluentui-react-native/win32-theme');
5
+ const ThemingModuleHelpers_1 = require('./ThemingModuleHelpers');
6
6
  /**
7
7
  * @deprecated
8
8
  */
9
9
  exports.ThemingModuleHelper = (0, ThemingModuleHelpers_1.createThemingModuleHelper)(...(0, win32_theme_1.getThemingModule)());
10
- //# sourceMappingURL=ThemingModule.js.map
10
+ //# sourceMappingURL=ThemingModule.js.map