@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,32 +1,60 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __setModuleDefault =
23
+ (this && this.__setModuleDefault) ||
24
+ (Object.create
25
+ ? function (o, v) {
26
+ Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
+ }
28
+ : function (o, v) {
29
+ o['default'] = v;
30
+ });
31
+ var __importStar =
32
+ (this && this.__importStar) ||
33
+ (function () {
34
+ var ownKeys = function (o) {
35
+ ownKeys =
36
+ Object.getOwnPropertyNames ||
37
+ function (o) {
38
+ var ar = [];
39
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
+ return ar;
41
+ };
42
+ return ownKeys(o);
43
+ };
44
+ return function (mod) {
45
+ if (mod && mod.__esModule) return mod;
46
+ var result = {};
47
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
+ __setModuleDefault(result, mod);
49
+ return result;
50
+ };
51
+ })();
52
+ Object.defineProperty(exports, '__esModule', { value: true });
26
53
  exports.ThemeLayer = void 0;
27
- const React = __importStar(require("react"));
28
- const theming_ramp_1 = require("@uifabricshared/theming-ramp");
29
- const Global_1 = require("./Global");
54
+ const jsx_runtime_1 = require('react/jsx-runtime');
55
+ const React = __importStar(require('react'));
56
+ const theming_ramp_1 = require('@uifabricshared/theming-ramp');
57
+ const Global_1 = require('./Global');
30
58
  /**
31
59
  * Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
32
60
  *
@@ -54,47 +82,49 @@ const Global_1 = require("./Global");
54
82
  * @deprecated
55
83
  */
56
84
  class ThemeLayer extends React.Component {
57
- /**
58
- * stores the name of the theme if in provider mode. Existence of this string is tied to registration
59
- * and is used to signal registration and unregistration
60
- */
61
- _registeredTheme;
62
- /** handler for theme changes, conditionally will force update */
63
- onInvalidate = (name) => {
64
- // only force updates if this theme was the one invalidated
65
- if (name === this._registeredTheme) {
66
- this.forceUpdate();
67
- }
68
- };
69
- /** standard cleanup handler to ensure we unregister */
70
- componentWillUnmount() {
71
- if (this._registeredTheme !== undefined) {
72
- (0, Global_1.removeThemeRegistryListener)(this);
73
- this._registeredTheme = undefined;
74
- }
85
+ /**
86
+ * stores the name of the theme if in provider mode. Existence of this string is tied to registration
87
+ * and is used to signal registration and unregistration
88
+ */
89
+ _registeredTheme;
90
+ /** handler for theme changes, conditionally will force update */
91
+ onInvalidate = (name) => {
92
+ // only force updates if this theme was the one invalidated
93
+ if (name === this._registeredTheme) {
94
+ this.forceUpdate();
75
95
  }
76
- render() {
77
- let themeName = this.props.themeName;
78
- return (React.createElement(theming_ramp_1.ThemeContext.Consumer, null, (theme) => {
79
- // go to provider mode if a themeName is specified or if this is the first consumer and the context
80
- // is undefined.
81
- if (themeName !== undefined || theme === undefined) {
82
- themeName = themeName || '';
83
- this._ensureCallbackRegistration(themeName);
84
- theme = (0, Global_1.getTheme)(themeName);
85
- return React.createElement(theming_ramp_1.ThemeContext.Provider, { value: theme }, this.props.children(theme));
86
- }
87
- // otherwise in consumer mode just push the current theme to the children
88
- return this.props.children(theme);
89
- }));
96
+ };
97
+ /** standard cleanup handler to ensure we unregister */
98
+ componentWillUnmount() {
99
+ if (this._registeredTheme !== undefined) {
100
+ (0, Global_1.removeThemeRegistryListener)(this);
101
+ this._registeredTheme = undefined;
90
102
  }
91
- /** helper to register if this is the first time and to update the filter if necessary */
92
- _ensureCallbackRegistration = (themeName) => {
93
- if (this._registeredTheme === undefined) {
94
- (0, Global_1.addThemeRegistryListener)(this);
103
+ }
104
+ render() {
105
+ let themeName = this.props.themeName;
106
+ return jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Consumer, {
107
+ children: (theme) => {
108
+ // go to provider mode if a themeName is specified or if this is the first consumer and the context
109
+ // is undefined.
110
+ if (themeName !== undefined || theme === undefined) {
111
+ themeName = themeName || '';
112
+ this._ensureCallbackRegistration(themeName);
113
+ theme = (0, Global_1.getTheme)(themeName);
114
+ return jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Provider, { value: theme, children: this.props.children(theme) });
95
115
  }
96
- this._registeredTheme = themeName;
97
- };
116
+ // otherwise in consumer mode just push the current theme to the children
117
+ return this.props.children(theme);
118
+ },
119
+ });
120
+ }
121
+ /** helper to register if this is the first time and to update the filter if necessary */
122
+ _ensureCallbackRegistration = (themeName) => {
123
+ if (this._registeredTheme === undefined) {
124
+ (0, Global_1.addThemeRegistryListener)(this);
125
+ }
126
+ this._registeredTheme = themeName;
127
+ };
98
128
  }
99
129
  exports.ThemeLayer = ThemeLayer;
100
- //# sourceMappingURL=ThemeLayer.js.map
130
+ //# sourceMappingURL=ThemeLayer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeLayer.js","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAG/B,+DAA4D;AAE5D,q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BAC5C,KAAK,GAAG,IAAA,iBAAQ,EAAC,SAAS,CAAC,CAAC;oBAC5B,OAAO,kBAAC,2BAAY,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,IAAA,iCAAwB,EAAC,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,57 +1,87 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __setModuleDefault =
23
+ (this && this.__setModuleDefault) ||
24
+ (Object.create
25
+ ? function (o, v) {
26
+ Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
+ }
28
+ : function (o, v) {
29
+ o['default'] = v;
30
+ });
31
+ var __importStar =
32
+ (this && this.__importStar) ||
33
+ (function () {
34
+ var ownKeys = function (o) {
35
+ ownKeys =
36
+ Object.getOwnPropertyNames ||
37
+ function (o) {
38
+ var ar = [];
39
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
+ return ar;
41
+ };
42
+ return ownKeys(o);
43
+ };
44
+ return function (mod) {
45
+ if (mod && mod.__esModule) return mod;
46
+ var result = {};
47
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
+ __setModuleDefault(result, mod);
49
+ return result;
50
+ };
51
+ })();
52
+ Object.defineProperty(exports, '__esModule', { value: true });
26
53
  exports.ThemeProvider = void 0;
27
- const React = __importStar(require("react"));
28
- const theming_ramp_1 = require("@uifabricshared/theming-ramp");
29
- const Global_1 = require("./Global");
30
- const ThemeContext_1 = require("./ThemeContext");
54
+ const jsx_runtime_1 = require('react/jsx-runtime');
55
+ const React = __importStar(require('react'));
56
+ const theming_ramp_1 = require('@uifabricshared/theming-ramp');
57
+ const Global_1 = require('./Global');
58
+ const ThemeContext_1 = require('./ThemeContext');
31
59
  /**
32
60
  * @deprecated Use ThemeProvider from @fluentui-react-native/theme instead.
33
61
  * See https://github.com/microsoft/fluentui-react-native/blob/main/docs/pages/Guides/UpdateThemeProvider.md for details
34
62
  */
35
63
  const ThemeProvider = (props) => {
36
- const { registry: registryFromProps, theme: themeName = '', children } = props;
37
- const defaultRegistry = (0, ThemeContext_1.useThemeRegistry)();
38
- const registryToUse = registryFromProps || defaultRegistry || (0, Global_1.getThemeRegistry)();
39
- const [theme, setThemeState] = React.useState(registryToUse.getTheme(themeName));
40
- React.useEffect(() => {
41
- setThemeState(registryToUse.getTheme(themeName));
42
- const themeInvalidater = {
43
- onInvalidate: (name) => {
44
- name === themeName && setThemeState(registryToUse.getTheme(themeName));
45
- },
46
- };
47
- registryToUse.addEventListener(themeInvalidater);
48
- return () => {
49
- registryToUse.removeEventListener(themeInvalidater);
50
- };
51
- }, [registryToUse, themeName, setThemeState]);
52
- const themeProvider = React.createElement(theming_ramp_1.ThemeContext.Provider, { value: theme }, children);
53
- // note `registryFromProps` came from props and it's not the same as `registryToUse`
54
- return registryFromProps ? (React.createElement(ThemeContext_1.ThemeRegistryContext.Provider, { value: registryFromProps }, themeProvider)) : (themeProvider);
64
+ const { registry: registryFromProps, theme: themeName = '', children } = props;
65
+ const defaultRegistry = (0, ThemeContext_1.useThemeRegistry)();
66
+ const registryToUse = registryFromProps || defaultRegistry || (0, Global_1.getThemeRegistry)();
67
+ const [theme, setThemeState] = React.useState(registryToUse.getTheme(themeName));
68
+ React.useEffect(() => {
69
+ setThemeState(registryToUse.getTheme(themeName));
70
+ const themeInvalidater = {
71
+ onInvalidate: (name) => {
72
+ name === themeName && setThemeState(registryToUse.getTheme(themeName));
73
+ },
74
+ };
75
+ registryToUse.addEventListener(themeInvalidater);
76
+ return () => {
77
+ registryToUse.removeEventListener(themeInvalidater);
78
+ };
79
+ }, [registryToUse, themeName, setThemeState]);
80
+ const themeProvider = jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Provider, { value: theme, children: children });
81
+ // note `registryFromProps` came from props and it's not the same as `registryToUse`
82
+ return registryFromProps
83
+ ? jsx_runtime_1.jsx(ThemeContext_1.ThemeRegistryContext.Provider, { value: registryFromProps, children: themeProvider })
84
+ : themeProvider;
55
85
  };
56
86
  exports.ThemeProvider = ThemeProvider;
57
- //# sourceMappingURL=ThemeProvider.js.map
87
+ //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAG/B,+DAA4D;AAE5D,qCAA4C;AAC5C,iDAAwE;AAGxE;;;GAGG;AACI,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,IAAA,+BAAgB,GAAE,CAAC;IAC3C,MAAM,aAAa,GAAG,iBAAiB,IAAI,eAAe,IAAI,IAAA,yBAAgB,GAAE,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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B,IAAI,eAAe,IAAI,IAAA,yBAAgB,GAAE,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,kBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;IAE9F,oFAAoF;IACpF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,kBAAC,mCAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,YAAG,aAAa,GAAiC,CACzG,CAAC,CAAC,CAAC,CACF,aAAa,CACd,CAAC;AAAA,CACH,CAAC;AA7BW,QAAA,aAAa,GAAb,aAAa,CA6BxB"}
@@ -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,4 +1,4 @@
1
- "use strict";
1
+ 'use strict';
2
2
  /* eslint-disable */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- //# sourceMappingURL=ThemeProvider.types.js.map
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+ //# sourceMappingURL=ThemeProvider.types.js.map
@@ -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
@@ -1,39 +1,123 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHostSettingsWin32 = exports.ThemingModuleHelper = exports.useThemeRegistry = exports.useTheme = exports.ThemeRegistryContext = exports.ThemeContext = exports.ThemeProvider = exports.createPlatformThemeRegistry = exports.ThemeLayer = exports.augmentPlatformTheme = exports.getTheme = exports.setTheme = exports.removeThemeRegistryListener = exports.addThemeRegistryListener = void 0;
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.getHostSettingsWin32 =
4
+ exports.ThemingModuleHelper =
5
+ exports.useThemeRegistry =
6
+ exports.useTheme =
7
+ exports.ThemeRegistryContext =
8
+ exports.ThemeContext =
9
+ exports.ThemeProvider =
10
+ exports.createPlatformThemeRegistry =
11
+ exports.ThemeLayer =
12
+ exports.augmentPlatformTheme =
13
+ exports.getTheme =
14
+ exports.setTheme =
15
+ exports.removeThemeRegistryListener =
16
+ exports.addThemeRegistryListener =
17
+ void 0;
4
18
  /**
5
19
  * @deprecated
6
20
  */
7
- var Global_1 = require("./Global");
8
- Object.defineProperty(exports, "addThemeRegistryListener", { enumerable: true, get: function () { return Global_1.addThemeRegistryListener; } });
9
- Object.defineProperty(exports, "removeThemeRegistryListener", { enumerable: true, get: function () { return Global_1.removeThemeRegistryListener; } });
10
- Object.defineProperty(exports, "setTheme", { enumerable: true, get: function () { return Global_1.setTheme; } });
11
- Object.defineProperty(exports, "getTheme", { enumerable: true, get: function () { return Global_1.getTheme; } });
12
- Object.defineProperty(exports, "augmentPlatformTheme", { enumerable: true, get: function () { return Global_1.augmentPlatformTheme; } });
13
- var ThemeLayer_1 = require("./ThemeLayer");
14
- Object.defineProperty(exports, "ThemeLayer", { enumerable: true, get: function () { return ThemeLayer_1.ThemeLayer; } });
21
+ const Global_1 = require('./Global');
22
+ Object.defineProperty(exports, 'addThemeRegistryListener', {
23
+ enumerable: true,
24
+ get: function () {
25
+ return Global_1.addThemeRegistryListener;
26
+ },
27
+ });
28
+ Object.defineProperty(exports, 'removeThemeRegistryListener', {
29
+ enumerable: true,
30
+ get: function () {
31
+ return Global_1.removeThemeRegistryListener;
32
+ },
33
+ });
34
+ Object.defineProperty(exports, 'setTheme', {
35
+ enumerable: true,
36
+ get: function () {
37
+ return Global_1.setTheme;
38
+ },
39
+ });
40
+ Object.defineProperty(exports, 'getTheme', {
41
+ enumerable: true,
42
+ get: function () {
43
+ return Global_1.getTheme;
44
+ },
45
+ });
46
+ Object.defineProperty(exports, 'augmentPlatformTheme', {
47
+ enumerable: true,
48
+ get: function () {
49
+ return Global_1.augmentPlatformTheme;
50
+ },
51
+ });
52
+ const ThemeLayer_1 = require('./ThemeLayer');
53
+ Object.defineProperty(exports, 'ThemeLayer', {
54
+ enumerable: true,
55
+ get: function () {
56
+ return ThemeLayer_1.ThemeLayer;
57
+ },
58
+ });
15
59
  /**
16
60
  * @deprecated
17
61
  */
18
- var platform_1 = require("./platform");
19
- Object.defineProperty(exports, "createPlatformThemeRegistry", { enumerable: true, get: function () { return platform_1.createPlatformThemeRegistry; } });
62
+ const platform_1 = require('./platform');
63
+ Object.defineProperty(exports, 'createPlatformThemeRegistry', {
64
+ enumerable: true,
65
+ get: function () {
66
+ return platform_1.createPlatformThemeRegistry;
67
+ },
68
+ });
20
69
  /**
21
70
  * @deprecated
22
71
  */
23
- var ThemeProvider_1 = require("./ThemeProvider");
24
- Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
72
+ const ThemeProvider_1 = require('./ThemeProvider');
73
+ Object.defineProperty(exports, 'ThemeProvider', {
74
+ enumerable: true,
75
+ get: function () {
76
+ return ThemeProvider_1.ThemeProvider;
77
+ },
78
+ });
25
79
  /**
26
80
  * @deprecated
27
81
  */
28
- var ThemeContext_1 = require("./ThemeContext");
29
- Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeContext; } });
30
- Object.defineProperty(exports, "ThemeRegistryContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeRegistryContext; } });
31
- Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeContext_1.useTheme; } });
32
- Object.defineProperty(exports, "useThemeRegistry", { enumerable: true, get: function () { return ThemeContext_1.useThemeRegistry; } });
82
+ const ThemeContext_1 = require('./ThemeContext');
83
+ Object.defineProperty(exports, 'ThemeContext', {
84
+ enumerable: true,
85
+ get: function () {
86
+ return ThemeContext_1.ThemeContext;
87
+ },
88
+ });
89
+ Object.defineProperty(exports, 'ThemeRegistryContext', {
90
+ enumerable: true,
91
+ get: function () {
92
+ return ThemeContext_1.ThemeRegistryContext;
93
+ },
94
+ });
95
+ Object.defineProperty(exports, 'useTheme', {
96
+ enumerable: true,
97
+ get: function () {
98
+ return ThemeContext_1.useTheme;
99
+ },
100
+ });
101
+ Object.defineProperty(exports, 'useThemeRegistry', {
102
+ enumerable: true,
103
+ get: function () {
104
+ return ThemeContext_1.useThemeRegistry;
105
+ },
106
+ });
33
107
  /**
34
108
  * @deprecated
35
109
  */
36
- var NativeModule_1 = require("./NativeModule");
37
- Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return NativeModule_1.ThemingModuleHelper; } });
38
- Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return NativeModule_1.getHostSettingsWin32; } });
39
- //# sourceMappingURL=index.js.map
110
+ const NativeModule_1 = require('./NativeModule');
111
+ Object.defineProperty(exports, 'ThemingModuleHelper', {
112
+ enumerable: true,
113
+ get: function () {
114
+ return NativeModule_1.ThemingModuleHelper;
115
+ },
116
+ });
117
+ Object.defineProperty(exports, 'getHostSettingsWin32', {
118
+ enumerable: true,
119
+ get: function () {
120
+ return NativeModule_1.getHostSettingsWin32;
121
+ },
122
+ });
123
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mCAA2H;AAAlH,kHAAA,wBAAwB,OAAA;AAAE,qHAAA,2BAA2B,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAaxG,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB;;GAEG;AACH,uCAAyD;AAAhD,uHAAA,2BAA2B,OAAA;AACpC;;GAEG;AACH,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAKtB;;GAEG;AACH,+CAAgG;AAAvF,4GAAA,YAAY,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AACvE;;GAEG;AACH,+CAA2E;AAAlE,mHAAA,mBAAmB,OAAA;AAAE,oHAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,qCAA2H;AAAlH,kHAAA,wBAAwB,OAAA;AAAE,qHAAA,2BAA2B,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAaxG,6CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB;;GAEG;AACH,yCAAyD;AAAhD,uHAAA,2BAA2B,OAAA;AACpC;;GAEG;AACH,mDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAKtB;;GAEG;AACH,iDAAgG;AAAvF,4GAAA,YAAY,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AACvE;;GAEG;AACH,iDAA2E;AAAlE,mHAAA,mBAAmB,OAAA;AAAE,oHAAA,oBAAoB,OAAA"}
@@ -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('@uifabricshared/theming-ramp').ITheme,
10
+ import('@uifabricshared/theming-ramp').IPartialTheme
11
+ >;
12
+ //# sourceMappingURL=PlatformDefaults.d.ts.map
@@ -1,14 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createPlatformThemeRegistry = void 0;
4
- const theme_registry_1 = require("@uifabricshared/theme-registry");
5
- const theming_ramp_1 = require("@uifabricshared/theming-ramp");
6
- const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
4
+ const theme_registry_1 = require('@uifabricshared/theme-registry');
5
+ const theming_ramp_1 = require('@uifabricshared/theming-ramp');
6
+ const BaselinePlatformDefaults_1 = require('../BaselinePlatformDefaults');
7
7
  /**
8
8
  * @deprecated
9
9
  */
10
10
  function createPlatformThemeRegistry(_themeId, _module) {
11
- return (0, theme_registry_1.createThemeRegistry)((0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(), theming_ramp_1.resolvePartialTheme);
11
+ return (0, theme_registry_1.createThemeRegistry)(
12
+ (0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(),
13
+ theming_ramp_1.resolvePartialTheme,
14
+ );
12
15
  }
13
- exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
14
- //# sourceMappingURL=PlatformDefaults.js.map
16
+ //# sourceMappingURL=PlatformDefaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAEnE,0EAAuE;AAGvE;;GAEG;AACH,SAAgB,2BAA2B,CAAC,QAAiB,EAAE,OAA8B;IAC3F,OAAO,IAAA,oCAAmB,EAAC,IAAA,mDAAwB,GAAE,EAAE,kCAAmB,CAAC,CAAC;AAC9E,CAAC;AAFD,kEAEC"}
1
+ {"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAEnE,0EAAuE;AAGvE;;GAEG;AACH,qCAA4C,QAAiB,EAAE,OAA8B,EAAE;IAC7F,OAAO,IAAA,oCAAmB,EAAC,IAAA,mDAAwB,GAAE,EAAE,kCAAmB,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('@uifabricshared/theming-ramp').ITheme,
10
+ import('@uifabricshared/theming-ramp').IPartialTheme
11
+ >;
12
+ //# sourceMappingURL=PlatformDefaults.native.d.ts.map
@@ -1,18 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createPlatformThemeRegistry = void 0;
4
- const theme_registry_1 = require("@uifabricshared/theme-registry");
5
- const theming_ramp_1 = require("@uifabricshared/theming-ramp");
6
- const NativeModule_1 = require("../NativeModule");
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
+ exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
4
+ const theme_registry_1 = require('@uifabricshared/theme-registry');
5
+ const theming_ramp_1 = require('@uifabricshared/theming-ramp');
6
+ const NativeModule_1 = require('../NativeModule');
7
7
  /**
8
8
  * @deprecated
9
9
  */
10
10
  function createPlatformThemeRegistry(platformThemeId, module = NativeModule_1.ThemingModuleHelper) {
11
- const registry = (0, theme_registry_1.createThemeRegistry)(module.getPlatformDefaults(platformThemeId), theming_ramp_1.resolvePartialTheme);
12
- module.addListener(() => {
13
- registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
14
- });
15
- return registry;
11
+ const registry = (0, theme_registry_1.createThemeRegistry)(
12
+ module.getPlatformDefaults(platformThemeId),
13
+ theming_ramp_1.resolvePartialTheme,
14
+ );
15
+ module.addListener(() => {
16
+ registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
17
+ });
18
+ return registry;
16
19
  }
17
- exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
18
- //# sourceMappingURL=PlatformDefaults.native.js.map
20
+ //# sourceMappingURL=PlatformDefaults.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformDefaults.native.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAGnE,kDAAsD;AAEtD;;GAEG;AACH,SAAgB,2BAA2B,CAAC,eAAwB,EAAE,SAA+B,kCAAmB;IACtH,MAAM,QAAQ,GAAG,IAAA,oCAAmB,EAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,kCAAmB,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;AAND,kEAMC"}
1
+ {"version":3,"file":"PlatformDefaults.native.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.native.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAGnE,kDAAsD;AAEtD;;GAEG;AACH,qCAA4C,eAAwB,EAAE,MAAM,GAAyB,kCAAmB,EAAE;IACxH,MAAM,QAAQ,GAAG,IAAA,oCAAmB,EAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,kCAAmB,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"}