@uifabricshared/theming-react-native 0.16.7 → 0.16.9

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 (67) hide show
  1. package/CHANGELOG.json +37 -1
  2. package/CHANGELOG.md +19 -2
  3. package/package.json +3 -3
  4. package/lib/BaselinePlatformDefaults.d.ts +0 -6
  5. package/lib/BaselinePlatformDefaults.d.ts.map +0 -1
  6. package/lib/BaselinePlatformDefaults.js +0 -8
  7. package/lib/BaselinePlatformDefaults.js.map +0 -1
  8. package/lib/Global.d.ts +0 -56
  9. package/lib/Global.d.ts.map +0 -1
  10. package/lib/Global.js +0 -73
  11. package/lib/Global.js.map +0 -1
  12. package/lib/NativeModule/ThemingModule.d.ts +0 -5
  13. package/lib/NativeModule/ThemingModule.d.ts.map +0 -1
  14. package/lib/NativeModule/ThemingModule.js +0 -7
  15. package/lib/NativeModule/ThemingModule.js.map +0 -1
  16. package/lib/NativeModule/ThemingModule.types.d.ts +0 -35
  17. package/lib/NativeModule/ThemingModule.types.d.ts.map +0 -1
  18. package/lib/NativeModule/ThemingModule.types.js +0 -2
  19. package/lib/NativeModule/ThemingModule.types.js.map +0 -1
  20. package/lib/NativeModule/ThemingModuleHelpers.d.ts +0 -16
  21. package/lib/NativeModule/ThemingModuleHelpers.d.ts.map +0 -1
  22. package/lib/NativeModule/ThemingModuleHelpers.js +0 -57
  23. package/lib/NativeModule/ThemingModuleHelpers.js.map +0 -1
  24. package/lib/NativeModule/getHostSettings.d.ts +0 -6
  25. package/lib/NativeModule/getHostSettings.d.ts.map +0 -1
  26. package/lib/NativeModule/getHostSettings.js +0 -8
  27. package/lib/NativeModule/getHostSettings.js.map +0 -1
  28. package/lib/NativeModule/index.d.ts +0 -4
  29. package/lib/NativeModule/index.d.ts.map +0 -1
  30. package/lib/NativeModule/index.js +0 -4
  31. package/lib/NativeModule/index.js.map +0 -1
  32. package/lib/Theme.types.d.ts +0 -15
  33. package/lib/Theme.types.d.ts.map +0 -1
  34. package/lib/Theme.types.js +0 -2
  35. package/lib/Theme.types.js.map +0 -1
  36. package/lib/ThemeContext.d.ts +0 -15
  37. package/lib/ThemeContext.d.ts.map +0 -1
  38. package/lib/ThemeContext.js +0 -14
  39. package/lib/ThemeContext.js.map +0 -1
  40. package/lib/ThemeLayer.d.ts +0 -61
  41. package/lib/ThemeLayer.d.ts.map +0 -1
  42. package/lib/ThemeLayer.js +0 -91
  43. package/lib/ThemeLayer.js.map +0 -1
  44. package/lib/ThemeProvider.d.ts +0 -7
  45. package/lib/ThemeProvider.d.ts.map +0 -1
  46. package/lib/ThemeProvider.js +0 -29
  47. package/lib/ThemeProvider.js.map +0 -1
  48. package/lib/ThemeProvider.types.d.ts +0 -10
  49. package/lib/ThemeProvider.types.d.ts.map +0 -1
  50. package/lib/ThemeProvider.types.js +0 -3
  51. package/lib/ThemeProvider.types.js.map +0 -1
  52. package/lib/index.d.ts +0 -41
  53. package/lib/index.d.ts.map +0 -1
  54. package/lib/index.js +0 -25
  55. package/lib/index.js.map +0 -1
  56. package/lib/platform/PlatformDefaults.d.ts +0 -6
  57. package/lib/platform/PlatformDefaults.d.ts.map +0 -1
  58. package/lib/platform/PlatformDefaults.js +0 -10
  59. package/lib/platform/PlatformDefaults.js.map +0 -1
  60. package/lib/platform/PlatformDefaults.native.d.ts +0 -6
  61. package/lib/platform/PlatformDefaults.native.d.ts.map +0 -1
  62. package/lib/platform/PlatformDefaults.native.js +0 -15
  63. package/lib/platform/PlatformDefaults.native.js.map +0 -1
  64. package/lib/platform/index.d.ts +0 -2
  65. package/lib/platform/index.d.ts.map +0 -1
  66. package/lib/platform/index.js +0 -2
  67. package/lib/platform/index.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,43 @@
2
2
  "name": "@uifabricshared/theming-react-native",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 16 Mar 2023 21:46:27 GMT",
5
+ "date": "Sat, 18 Mar 2023 17:18:20 GMT",
6
+ "tag": "@uifabricshared/theming-react-native_v0.16.9",
7
+ "version": "0.16.9",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@uifabricshared/theming-react-native",
13
+ "comment": "Bump @fluentui-react-native/default-theme to v0.18.1",
14
+ "commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@uifabricshared/theming-react-native",
19
+ "comment": "Bump @fluentui-react-native/win32-theme to v0.25.9",
20
+ "commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Fri, 17 Mar 2023 20:54:52 GMT",
27
+ "tag": "@uifabricshared/theming-react-native_v0.16.8",
28
+ "version": "0.16.8",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "beachball",
33
+ "package": "@uifabricshared/theming-react-native",
34
+ "comment": "Bump @fluentui-react-native/win32-theme to v0.25.8",
35
+ "commit": "17b7aef310b2c2325dce2129aeefceada04140e7"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Thu, 16 Mar 2023 21:46:56 GMT",
6
42
  "tag": "@uifabricshared/theming-react-native_v0.16.7",
7
43
  "version": "0.16.7",
8
44
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @uifabricshared/theming-react-native
2
2
 
3
- This log was last generated on Thu, 16 Mar 2023 21:46:27 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.16.9
8
+
9
+ Sat, 18 Mar 2023 17:18:20 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/default-theme to v0.18.1
14
+ - Bump @fluentui-react-native/win32-theme to v0.25.9
15
+
16
+ ## 0.16.8
17
+
18
+ Fri, 17 Mar 2023 20:54:52 GMT
19
+
20
+ ### Patches
21
+
22
+ - Bump @fluentui-react-native/win32-theme to v0.25.8
23
+
7
24
  ## 0.16.7
8
25
 
9
- Thu, 16 Mar 2023 21:46:27 GMT
26
+ Thu, 16 Mar 2023 21:46:56 GMT
10
27
 
11
28
  ### Patches
12
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uifabricshared/theming-react-native",
3
- "version": "0.16.7",
3
+ "version": "0.16.9",
4
4
  "description": "A library of functions which produce React Native styles from a Theme",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,8 +27,8 @@
27
27
  "author": "",
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@fluentui-react-native/default-theme": ">=0.18.0 <1.0.0",
31
- "@fluentui-react-native/win32-theme": ">=0.25.7 <1.0.0",
30
+ "@fluentui-react-native/default-theme": ">=0.18.1 <1.0.0",
31
+ "@fluentui-react-native/win32-theme": ">=0.25.9 <1.0.0",
32
32
  "@uifabricshared/theme-registry": ">=0.9.2 <1.0.0",
33
33
  "@uifabricshared/theming-ramp": ">=0.17.22 <1.0.0"
34
34
  },
@@ -1,6 +0,0 @@
1
- import type { ITheme } from '@uifabricshared/theming-ramp';
2
- /**
3
- * @deprecated
4
- */
5
- export declare function getBaselinePlatformTheme(): ITheme;
6
- //# sourceMappingURL=BaselinePlatformDefaults.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaselinePlatformDefaults.d.ts","sourceRoot":"","sources":["../src/BaselinePlatformDefaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD"}
@@ -1,8 +0,0 @@
1
- import { defaultFluentTheme } from '@fluentui-react-native/default-theme';
2
- /**
3
- * @deprecated
4
- */
5
- export function getBaselinePlatformTheme() {
6
- return defaultFluentTheme;
7
- }
8
- //# sourceMappingURL=BaselinePlatformDefaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaselinePlatformDefaults.js","sourceRoot":"","sources":["../src/BaselinePlatformDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
package/lib/Global.d.ts DELETED
@@ -1,56 +0,0 @@
1
- import type { IProcessTheme, IThemeEventListener } from '@uifabricshared/theme-registry';
2
- import type { IPartialTheme, ITheme, ThemeRegistry } from './Theme.types';
3
- /**
4
- * Ensure that `_registry` is set. If not, create it using a native module to
5
- * provide platform defaults.
6
- * @deprecated
7
- */
8
- export declare function getThemeRegistry(): ThemeRegistry;
9
- /**
10
- * Set the global theme registry.
11
- *
12
- * **WARNING**: This is only exported so that internal tests may override it.
13
- * It should not be part of this library's public interface.
14
- *
15
- * The react tree may contain <ThemeLayer> controls which are tightly bound to
16
- * `_registry`. Changing `_registry` while the app is running will disrupt
17
- * theming, causing undefined behavior.
18
- * @deprecated
19
- */
20
- export declare function setThemeRegistry(registry: ThemeRegistry): void;
21
- /**
22
- * Create or update a theme definition
23
- * @param definition - partial theme definition or processing function that defines the theme
24
- * @param name - name of the theme, undefined or '' for default
25
- * @param parent - parent theme to depend on, if unspecified this will pull from the default theme
26
- * @deprecated
27
- */
28
- export declare function setTheme(definition: IPartialTheme | IProcessTheme<ITheme, IPartialTheme>, name?: string, parent?: string): void;
29
- /**
30
- * Register a theme event listener
31
- * @param listener - theme event listener to add
32
- * @deprecated
33
- */
34
- export declare function addThemeRegistryListener(listener: IThemeEventListener): void;
35
- /**
36
- * Unregister a theme event listener
37
- * @param listener - theme event listener to remove
38
- * @deprecated
39
- */
40
- export declare function removeThemeRegistryListener(listener: IThemeEventListener): void;
41
- /**
42
- * Get a theme by name
43
- * @param name - name of the theme. Undefined or '' will resolve to the default theme
44
- * @deprecated
45
- */
46
- export declare function getTheme(name?: string): ITheme;
47
- /**
48
- * This will update the platform theme. This is primarily exposed for clients to add custom lookup values to palettes or to
49
- * add custom typed settings blocks for their own components.
50
- *
51
- * @param definition - properties to add to the platform theme. Note that this will invalidate every theme and cause rerenders
52
- * if this is not done in the boot sequence.
53
- * @deprecated
54
- */
55
- export declare function augmentPlatformTheme(definition: IPartialTheme): void;
56
- //# sourceMappingURL=Global.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Global.d.ts","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAGzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAI1E;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAKhD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAE/H;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAEpE"}
package/lib/Global.js DELETED
@@ -1,73 +0,0 @@
1
- import { createPlatformThemeRegistry } from './platform';
2
- var _registry;
3
- /**
4
- * Ensure that `_registry` is set. If not, create it using a native module to
5
- * provide platform defaults.
6
- * @deprecated
7
- */
8
- export function getThemeRegistry() {
9
- if (!_registry) {
10
- _registry = createPlatformThemeRegistry();
11
- }
12
- return _registry;
13
- }
14
- /**
15
- * Set the global theme registry.
16
- *
17
- * **WARNING**: This is only exported so that internal tests may override it.
18
- * It should not be part of this library's public interface.
19
- *
20
- * The react tree may contain <ThemeLayer> controls which are tightly bound to
21
- * `_registry`. Changing `_registry` while the app is running will disrupt
22
- * theming, causing undefined behavior.
23
- * @deprecated
24
- */
25
- export function setThemeRegistry(registry) {
26
- _registry = registry;
27
- }
28
- /**
29
- * Create or update a theme definition
30
- * @param definition - partial theme definition or processing function that defines the theme
31
- * @param name - name of the theme, undefined or '' for default
32
- * @param parent - parent theme to depend on, if unspecified this will pull from the default theme
33
- * @deprecated
34
- */
35
- export function setTheme(definition, name, parent) {
36
- return getThemeRegistry().setTheme(definition, name, parent);
37
- }
38
- /**
39
- * Register a theme event listener
40
- * @param listener - theme event listener to add
41
- * @deprecated
42
- */
43
- export function addThemeRegistryListener(listener) {
44
- return getThemeRegistry().addEventListener(listener);
45
- }
46
- /**
47
- * Unregister a theme event listener
48
- * @param listener - theme event listener to remove
49
- * @deprecated
50
- */
51
- export function removeThemeRegistryListener(listener) {
52
- return getThemeRegistry().removeEventListener(listener);
53
- }
54
- /**
55
- * Get a theme by name
56
- * @param name - name of the theme. Undefined or '' will resolve to the default theme
57
- * @deprecated
58
- */
59
- export function getTheme(name) {
60
- return getThemeRegistry().getTheme(name);
61
- }
62
- /**
63
- * This will update the platform theme. This is primarily exposed for clients to add custom lookup values to palettes or to
64
- * add custom typed settings blocks for their own components.
65
- *
66
- * @param definition - properties to add to the platform theme. Note that this will invalidate every theme and cause rerenders
67
- * if this is not done in the boot sequence.
68
- * @deprecated
69
- */
70
- export function augmentPlatformTheme(definition) {
71
- getThemeRegistry().updatePlatformDefaults(definition);
72
- }
73
- //# sourceMappingURL=Global.js.map
package/lib/Global.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Global.js","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAGzD,IAAI,SAAwB,CAAC;AAE7B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,2BAA2B,EAAE,CAAC;KAC3C;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAuB;IACtD,SAAS,GAAG,QAAQ,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,UAAgE,EAAE,IAAa,EAAE,MAAe;IACvH,OAAO,gBAAgB,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAA6B;IACpE,OAAO,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAAC,QAA6B;IACvE,OAAO,gBAAgB,EAAE,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAa;IACpC,OAAO,gBAAgB,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,UAAyB;IAC5D,gBAAgB,EAAE,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;AACxD,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated
3
- */
4
- export declare const ThemingModuleHelper: import("./ThemingModule.types").IThemingModuleHelper;
5
- //# sourceMappingURL=ThemingModule.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemingModule.d.ts","sourceRoot":"","sources":["../../src/NativeModule/ThemingModule.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,mBAAmB,sDAAmD,CAAC"}
@@ -1,7 +0,0 @@
1
- import { getThemingModule } from '@fluentui-react-native/win32-theme';
2
- import { createThemingModuleHelper } from './ThemingModuleHelpers';
3
- /**
4
- * @deprecated
5
- */
6
- export var ThemingModuleHelper = createThemingModuleHelper.apply(void 0, getThemingModule());
7
- //# sourceMappingURL=ThemingModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemingModule.js","sourceRoot":"","sources":["../../src/NativeModule/ThemingModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAG,yBAAyB,eAAI,gBAAgB,EAAE,CAAC,CAAC"}
@@ -1,35 +0,0 @@
1
- import type { PlatformDefaultsChangedCallback } from '@fluentui-react-native/win32-theme';
2
- import type { IProcessTheme } from '@uifabricshared/theme-registry';
3
- import type { ITheme, IPartialTheme, OfficePalette as IOfficePalette } from '@uifabricshared/theming-ramp';
4
- /**
5
- * @deprecated
6
- */
7
- export interface IEventEmitter {
8
- addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
9
- }
10
- /**
11
- * @deprecated
12
- */
13
- export type IPlatformThemeDefinition = IPartialTheme | IProcessTheme<ITheme, IPartialTheme>;
14
- /**
15
- * @deprecated
16
- */
17
- export interface IThemingModuleHelper {
18
- /**
19
- * Gets a complete platform theme suitable for using with a Theme Registry
20
- */
21
- getPlatformDefaults: (themeId?: string) => ITheme;
22
- /**
23
- * Gets a theme definition to register with a Theme Registry & use with the theme context to create a subtree with the
24
- * look & feel of a platform theme.
25
- */
26
- getPlatformThemeDefinition: (themeId?: string) => IPlatformThemeDefinition;
27
- addListener: (listener: PlatformDefaultsChangedCallback) => void;
28
- }
29
- /**
30
- * @deprecated
31
- */
32
- export type IHostSettingsWin32 = {
33
- palette: IOfficePalette;
34
- };
35
- //# sourceMappingURL=ThemingModule.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemingModule.types.d.ts","sourceRoot":"","sources":["../../src/NativeModule/ThemingModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE3G;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,+BAA+B,KAAA,KAAK,IAAI,CAAC;CACvE;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD;;;OAGG;IACH,0BAA0B,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,wBAAwB,CAAC;IAC3E,WAAW,EAAE,CAAC,QAAQ,EAAE,+BAA+B,KAAK,IAAI,CAAC;CAClE;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ThemingModule.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemingModule.types.js","sourceRoot":"","sources":["../../src/NativeModule/ThemingModule.types.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
1
- import type { OfficeThemingModule } from '@fluentui-react-native/win32-theme';
2
- import type { OfficePalette } from '@uifabricshared/theming-ramp';
3
- import type { IThemingModuleHelper, IEventEmitter } from './ThemingModule.types';
4
- type PaletteCache = {
5
- [key: string]: OfficePalette;
6
- };
7
- /**
8
- * @deprecated
9
- */
10
- export declare function translateOfficeTheme(module: OfficeThemingModule, cache: PaletteCache, id?: string, themeName?: string): import("@uifabricshared/theming-ramp").IPartialTheme;
11
- /**
12
- * @deprecated
13
- */
14
- export declare function createThemingModuleHelper(themingModule?: OfficeThemingModule, emitter?: IEventEmitter): IThemingModuleHelper;
15
- export {};
16
- //# sourceMappingURL=ThemingModuleHelpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemingModuleHelpers.d.ts","sourceRoot":"","sources":["../../src/NativeModule/ThemingModuleHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EAIpB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAU,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGjF,KAAK,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC;AAyBrD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,wDAGrH;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,CAAC,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,oBAAoB,CAuB5H"}
@@ -1,57 +0,0 @@
1
- import { createPartialOfficeTheme } from '@fluentui-react-native/win32-theme';
2
- import { resolvePartialTheme } from '@uifabricshared/theming-ramp';
3
- import { getBaselinePlatformTheme } from '../BaselinePlatformDefaults';
4
- function isException(palette) {
5
- return palette.message !== undefined;
6
- }
7
- function updatePaletteInCache(module, cache, palette) {
8
- var paletteValue = module.getPalette(palette);
9
- if (!isException(paletteValue)) {
10
- cache[palette] = paletteValue;
11
- }
12
- }
13
- var getPaletteCacheKey = function (palette) {
14
- return palette || 'WhiteColors';
15
- };
16
- function ensurePalette(module, paletteCache, palette) {
17
- var key = getPaletteCacheKey(palette);
18
- if (!paletteCache[key]) {
19
- updatePaletteInCache(module, paletteCache, key);
20
- }
21
- return paletteCache[key] || {};
22
- }
23
- /**
24
- * @deprecated
25
- */
26
- export function translateOfficeTheme(module, cache, id, themeName) {
27
- var palette = ensurePalette(module, cache, id);
28
- return createPartialOfficeTheme(module, themeName, palette);
29
- }
30
- /**
31
- * @deprecated
32
- */
33
- export function createThemingModuleHelper(themingModule, emitter) {
34
- themingModule || console.error('No NativeModule for Theming found');
35
- var paletteCache = {};
36
- var _hostTheme = themingModule.initialHostThemeSetting || '';
37
- emitter &&
38
- emitter.addListener('onPlatformDefaultsChanged', function (args) {
39
- _hostTheme = (args && args.hostThemeSetting) || _hostTheme;
40
- Object.keys(paletteCache).forEach(function (key) { return delete paletteCache[key]; });
41
- });
42
- return {
43
- getPlatformDefaults: function (themeId) {
44
- return resolvePartialTheme(getBaselinePlatformTheme(), translateOfficeTheme(themingModule, paletteCache, themeId, _hostTheme));
45
- },
46
- getPlatformThemeDefinition: function (themeId) {
47
- return function (_parent) {
48
- updatePaletteInCache(themingModule, paletteCache, themeId);
49
- return translateOfficeTheme(themingModule, paletteCache, themeId);
50
- };
51
- },
52
- addListener: function (callback) {
53
- emitter && emitter.addListener('onPlatformDefaultsChanged', callback);
54
- },
55
- };
56
- }
57
- //# sourceMappingURL=ThemingModuleHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemingModuleHelpers.js","sourceRoot":"","sources":["../../src/NativeModule/ThemingModuleHelpers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAIvE,SAAS,WAAW,CAAC,OAAqC;IACxD,OAAQ,OAAwB,CAAC,OAAO,KAAK,SAAS,CAAC;AACzD,CAAC;AAED,SAAS,oBAAoB,CAAC,MAA2B,EAAE,KAAmB,EAAE,OAAe;IAC7F,IAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE;QAC9B,KAAK,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;KAC/B;AACH,CAAC;AAED,IAAM,kBAAkB,GAAG,UAAC,OAAgB;IAC1C,OAAO,OAAO,IAAI,aAAa,CAAC;AAClC,CAAC,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B,EAAE,YAA0B,EAAE,OAAgB;IAC9F,IAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE;QACtB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;KACjD;IACD,OAAO,YAAY,CAAC,GAAG,CAAC,IAAK,EAAoB,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA2B,EAAE,KAAmB,EAAE,EAAW,EAAE,SAAkB;IACpH,IAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IACjD,OAAO,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,aAAmC,EAAE,OAAuB;IACpG,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACpE,IAAM,YAAY,GAAiB,EAAE,CAAC;IACtC,IAAI,UAAU,GAAG,aAAa,CAAC,uBAAuB,IAAI,EAAE,CAAC;IAC7D,OAAO;QACL,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,UAAC,IAAiC;YACjF,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC;YAC3D,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,UAAC,GAAW,IAAK,OAAA,OAAO,YAAY,CAAC,GAAG,CAAC,EAAxB,CAAwB,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;IACL,OAAO;QACL,mBAAmB,EAAE,UAAC,OAAgB;YACpC,OAAO,mBAAmB,CAAC,wBAAwB,EAAE,EAAE,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;QACjI,CAAC;QACD,0BAA0B,EAAE,UAAC,OAAgB;YAC3C,OAAO,UAAC,OAAe;gBACrB,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC3D,OAAO,oBAAoB,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;YACpE,CAAC,CAAC;QACJ,CAAC;QACD,WAAW,EAAE,UAAC,QAAyC;YACrD,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACxE,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { ITheme } from '../Theme.types';
2
- /**
3
- * @deprecated
4
- */
5
- export declare function getHostSettingsWin32(theme: ITheme): ITheme['host'] | undefined;
6
- //# sourceMappingURL=getHostSettings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHostSettings.d.ts","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAE9E"}
@@ -1,8 +0,0 @@
1
- /**
2
- * @deprecated
3
- */
4
- export function getHostSettingsWin32(theme) {
5
- var _a;
6
- return ((_a = theme.host) === null || _a === void 0 ? void 0 : _a.palette) ? theme.host : undefined;
7
- }
8
- //# sourceMappingURL=getHostSettings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHostSettings.js","sourceRoot":"","sources":["../../src/NativeModule/getHostSettings.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa;;IAChD,OAAO,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,OAAO,EAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './ThemingModule';
2
- export * from './ThemingModule.types';
3
- export * from './getHostSettings';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './ThemingModule';
2
- export * from './ThemingModule.types';
3
- export * from './getHostSettings';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/NativeModule/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { IThemeRegistry, IProcessTheme } from '@uifabricshared/theme-registry';
2
- import type { ITheme, IPartialTheme } from '@uifabricshared/theming-ramp';
3
- /**
4
- * @deprecated
5
- */
6
- export { ITheme, IPartialTheme } from '@uifabricshared/theming-ramp';
7
- /**
8
- * @deprecated
9
- */
10
- export type IThemeDefinition = IPartialTheme | IProcessTheme<ITheme, IPartialTheme>;
11
- /**
12
- * @deprecated
13
- */
14
- export type ThemeRegistry = IThemeRegistry<ITheme, IPartialTheme>;
15
- //# sourceMappingURL=Theme.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Theme.types.d.ts","sourceRoot":"","sources":["../src/Theme.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Theme.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Theme.types.js","sourceRoot":"","sources":["../src/Theme.types.ts"],"names":[],"mappings":""}
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import type { ThemeRegistry } from './Theme.types';
3
- /**
4
- * @deprecated
5
- */
6
- export { ThemeContext, useTheme } from '@uifabricshared/theming-ramp';
7
- /**
8
- * @deprecated
9
- */
10
- export declare const ThemeRegistryContext: React.Context<ThemeRegistry>;
11
- /**
12
- * @deprecated
13
- */
14
- export declare const useThemeRegistry: () => ThemeRegistry;
15
- //# sourceMappingURL=ThemeContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,oBAAoB,8BAAgD,CAAC;AAClF;;GAEG;AACH,eAAO,MAAM,gBAAgB,qBAA+C,CAAC"}
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * @deprecated
4
- */
5
- export { ThemeContext, useTheme } from '@uifabricshared/theming-ramp';
6
- /**
7
- * @deprecated
8
- */
9
- export var ThemeRegistryContext = React.createContext(undefined);
10
- /**
11
- * @deprecated
12
- */
13
- export var useThemeRegistry = function () { return React.useContext(ThemeRegistryContext); };
14
- //# sourceMappingURL=ThemeContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAG,KAAK,CAAC,aAAa,CAAgB,SAAS,CAAC,CAAC;AAClF;;GAEG;AACH,MAAM,CAAC,IAAM,gBAAgB,GAAG,cAAM,OAAA,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAtC,CAAsC,CAAC"}
@@ -1,61 +0,0 @@
1
- import * as React from 'react';
2
- import type { IThemeEventListener } from '@uifabricshared/theme-registry';
3
- import type { ITheme } from './Theme.types';
4
- /**
5
- * props for the ThemeLayer
6
- * @deprecated
7
- */
8
- 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;
20
- }
21
- /**
22
- * Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
23
- *
24
- * In pure consumer mode the usage is as follows:
25
- * ```
26
- * <ThemeLayer>{(theme: ITheme) => {
27
- * return (<MyComponent style={someStyleFn(theme, 'stylename')}/>);
28
- * }}</ThemeLayer>
29
- * ```
30
- *
31
- * In provider/consumer mode a themeName will be specified:
32
- * ```
33
- * <ThemeLayer themeName='myTheme'>{(theme: ITheme) => {
34
- * return (
35
- * <View>
36
- * <MySmartComponent/>
37
- * <MyComponent style={someStyleFn(theme, 'stylename')}/>
38
- * </View>
39
- * );
40
- * }}</ThemeLayer>
41
- * ```
42
- * The work of registering for updates will be done automatically. The highest level `ThemeLayer` in
43
- * consumer mode will automatically register and act like a provider to ensure renders happen on theme
44
- * change
45
- * @deprecated
46
- */
47
- 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;
60
- }
61
- //# sourceMappingURL=ThemeLayer.d.ts.map
@@ -1 +0,0 @@
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"}
package/lib/ThemeLayer.js DELETED
@@ -1,91 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import * as React from 'react';
17
- import { ThemeContext } from '@uifabricshared/theming-ramp';
18
- import { removeThemeRegistryListener, getTheme, addThemeRegistryListener } from './Global';
19
- /**
20
- * Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
21
- *
22
- * In pure consumer mode the usage is as follows:
23
- * ```
24
- * <ThemeLayer>{(theme: ITheme) => {
25
- * return (<MyComponent style={someStyleFn(theme, 'stylename')}/>);
26
- * }}</ThemeLayer>
27
- * ```
28
- *
29
- * In provider/consumer mode a themeName will be specified:
30
- * ```
31
- * <ThemeLayer themeName='myTheme'>{(theme: ITheme) => {
32
- * return (
33
- * <View>
34
- * <MySmartComponent/>
35
- * <MyComponent style={someStyleFn(theme, 'stylename')}/>
36
- * </View>
37
- * );
38
- * }}</ThemeLayer>
39
- * ```
40
- * The work of registering for updates will be done automatically. The highest level `ThemeLayer` in
41
- * consumer mode will automatically register and act like a provider to ensure renders happen on theme
42
- * change
43
- * @deprecated
44
- */
45
- var ThemeLayer = /** @class */ (function (_super) {
46
- __extends(ThemeLayer, _super);
47
- function ThemeLayer() {
48
- var _this = _super !== null && _super.apply(this, arguments) || this;
49
- /** handler for theme changes, conditionally will force update */
50
- _this.onInvalidate = function (name) {
51
- // only force updates if this theme was the one invalidated
52
- if (name === _this._registeredTheme) {
53
- _this.forceUpdate();
54
- }
55
- };
56
- /** helper to register if this is the first time and to update the filter if necessary */
57
- _this._ensureCallbackRegistration = function (themeName) {
58
- if (_this._registeredTheme === undefined) {
59
- addThemeRegistryListener(_this);
60
- }
61
- _this._registeredTheme = themeName;
62
- };
63
- return _this;
64
- }
65
- /** standard cleanup handler to ensure we unregister */
66
- ThemeLayer.prototype.componentWillUnmount = function () {
67
- if (this._registeredTheme !== undefined) {
68
- removeThemeRegistryListener(this);
69
- this._registeredTheme = undefined;
70
- }
71
- };
72
- ThemeLayer.prototype.render = function () {
73
- var _this = this;
74
- var themeName = this.props.themeName;
75
- return (React.createElement(ThemeContext.Consumer, null, function (theme) {
76
- // go to provider mode if a themeName is specified or if this is the first consumer and the context
77
- // is undefined.
78
- if (themeName !== undefined || theme === undefined) {
79
- themeName = themeName || '';
80
- _this._ensureCallbackRegistration(themeName);
81
- theme = getTheme(themeName);
82
- return React.createElement(ThemeContext.Provider, { value: theme }, _this.props.children(theme));
83
- }
84
- // otherwise in consumer mode just push the current theme to the children
85
- return _this.props.children(theme);
86
- }));
87
- };
88
- return ThemeLayer;
89
- }(React.Component));
90
- export { ThemeLayer };
91
- //# sourceMappingURL=ThemeLayer.js.map
@@ -1 +0,0 @@
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;IAAgC,8BAAiC;IAAjE;QAAA,qEAkDC;QA3CC,iEAAiE;QAC1D,kBAAY,GAAwC,UAAC,IAAY;YACtE,2DAA2D;YAC3D,IAAI,IAAI,KAAK,KAAI,CAAC,gBAAgB,EAAE;gBAClC,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;QA8BF,yFAAyF;QACjF,iCAA2B,GAAG,UAAC,SAAiB;YACtD,IAAI,KAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;gBACvC,wBAAwB,CAAC,KAAI,CAAC,CAAC;aAChC;YACD,KAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACpC,CAAC,CAAC;;IACJ,CAAC;IAnCC,uDAAuD;IAChD,yCAAoB,GAA3B;QACE,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;YACvC,2BAA2B,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;SACnC;IACH,CAAC;IAEM,2BAAM,GAAb;QAAA,iBAkBC;QAjBC,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACrC,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,QACnB,UAAC,KAAc;YACd,mGAAmG;YACnG,gBAAgB;YAChB,IAAI,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE;gBAClD,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;gBAC5B,KAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;gBAC5C,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;gBAC5B,OAAO,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAyB,CAAC;aAClG;YACD,yEAAyE;YACzE,OAAO,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC,CACqB,CACzB,CAAC;IACJ,CAAC;IASH,iBAAC;AAAD,CAAC,AAlDD,CAAgC,KAAK,CAAC,SAAS,GAkD9C"}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import type { IThemeProviderProps } from './ThemeProvider.types';
3
- /**
4
- * @deprecated
5
- */
6
- export declare const ThemeProvider: React.FunctionComponent<IThemeProviderProps>;
7
- //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CA6BtE,CAAC"}
@@ -1,29 +0,0 @@
1
- import * as React from 'react';
2
- import { ThemeContext } from '@uifabricshared/theming-ramp';
3
- import { getThemeRegistry } from './Global';
4
- import { useThemeRegistry, ThemeRegistryContext } from './ThemeContext';
5
- /**
6
- * @deprecated
7
- */
8
- export var ThemeProvider = function (props) {
9
- var registryFromProps = props.registry, _a = props.theme, themeName = _a === void 0 ? '' : _a, children = props.children;
10
- var defaultRegistry = useThemeRegistry();
11
- var registryToUse = registryFromProps || defaultRegistry || getThemeRegistry();
12
- var _b = React.useState(registryToUse.getTheme(themeName)), theme = _b[0], setThemeState = _b[1];
13
- React.useEffect(function () {
14
- setThemeState(registryToUse.getTheme(themeName));
15
- var themeInvalidater = {
16
- onInvalidate: function (name) {
17
- name === themeName && setThemeState(registryToUse.getTheme(themeName));
18
- },
19
- };
20
- registryToUse.addEventListener(themeInvalidater);
21
- return function () {
22
- registryToUse.removeEventListener(themeInvalidater);
23
- };
24
- }, [registryToUse, themeName, setThemeState]);
25
- var themeProvider = React.createElement(ThemeContext.Provider, { value: theme }, children);
26
- // note `registryFromProps` came from props and it's not the same as `registryToUse`
27
- return registryFromProps ? (React.createElement(ThemeRegistryContext.Provider, { value: registryFromProps }, themeProvider)) : (themeProvider);
28
- };
29
- //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +0,0 @@
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;;GAEG;AACH,MAAM,CAAC,IAAM,aAAa,GAAiD,UAAC,KAA0B;IAC5F,IAAU,iBAAiB,GAAsC,KAAK,SAA3C,EAAE,KAAoC,KAAK,MAApB,EAAd,SAAS,mBAAG,EAAE,KAAA,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAC/E,IAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,IAAM,aAAa,GAAG,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,EAAE,CAAC;IAC3E,IAAA,KAAyB,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAzE,KAAK,QAAA,EAAE,aAAa,QAAqD,CAAC;IAEjF,KAAK,CAAC,SAAS,CAAC;QACd,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,IAAM,gBAAgB,GAAwB;YAC5C,YAAY,EAAE,UAAC,IAAY;gBACzB,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YACzE,CAAC;SACF,CAAC;QAEF,aAAa,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO;YACL,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9C,IAAM,aAAa,GAAG,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAyB,CAAC;IAE9F,oFAAoF;IACpF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,IAAG,aAAa,CAAiC,CACzG,CAAC,CAAC,CAAC,CACF,aAAa,CACd,CAAC;AACJ,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { ThemeRegistry } from './Theme.types';
3
- /**
4
- * @deprecated
5
- */
6
- export interface IThemeProviderProps extends React.PropsWithChildren<{}> {
7
- theme?: string;
8
- registry?: ThemeRegistry;
9
- }
10
- //# sourceMappingURL=ThemeProvider.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeProvider.types.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.types.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B"}
@@ -1,3 +0,0 @@
1
- /* eslint-disable */
2
- export {};
3
- //# sourceMappingURL=ThemeProvider.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeProvider.types.js","sourceRoot":"","sources":["../src/ThemeProvider.types.ts"],"names":[],"mappings":"AAAA,oBAAoB"}
package/lib/index.d.ts DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * @deprecated
3
- */
4
- export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
5
- /**
6
- * @deprecated
7
- */
8
- export { IPartialTheme, ITheme } from './Theme.types';
9
- /**
10
- * @deprecated
11
- */
12
- export type { IThemeDefinition, ThemeRegistry } from './Theme.types';
13
- /**
14
- * @deprecated
15
- */
16
- export { IThemeLayerProps, ThemeLayer } from './ThemeLayer';
17
- /**
18
- * @deprecated
19
- */
20
- export { createPlatformThemeRegistry } from './platform';
21
- /**
22
- * @deprecated
23
- */
24
- export { ThemeProvider } from './ThemeProvider';
25
- /**
26
- * @deprecated
27
- */
28
- export type { IThemeProviderProps } from './ThemeProvider.types';
29
- /**
30
- * @deprecated
31
- */
32
- export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
33
- /**
34
- * @deprecated
35
- */
36
- export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
37
- /**
38
- * @deprecated
39
- */
40
- export type { IEventEmitter, IHostSettingsWin32, IPlatformThemeDefinition, IThemingModuleHelper } from './NativeModule';
41
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3H;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD;;GAEG;AACH,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACrE;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D;;GAEG;AACH,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD;;GAEG;AACH,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChG;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3E;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
package/lib/index.js DELETED
@@ -1,25 +0,0 @@
1
- /**
2
- * @deprecated
3
- */
4
- export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
5
- /**
6
- * @deprecated
7
- */
8
- export { ThemeLayer } from './ThemeLayer';
9
- /**
10
- * @deprecated
11
- */
12
- export { createPlatformThemeRegistry } from './platform';
13
- /**
14
- * @deprecated
15
- */
16
- export { ThemeProvider } from './ThemeProvider';
17
- /**
18
- * @deprecated
19
- */
20
- export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
21
- /**
22
- * @deprecated
23
- */
24
- export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
25
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAS3H;;GAEG;AACH,OAAO,EAAoB,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D;;GAEG;AACH,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChG;;GAEG;AACH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { IThemingModuleHelper } from '../NativeModule';
2
- /**
3
- * @deprecated
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
@@ -1 +0,0 @@
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,10 +0,0 @@
1
- import { createThemeRegistry } from '@uifabricshared/theme-registry';
2
- import { resolvePartialTheme } from '@uifabricshared/theming-ramp';
3
- import { getBaselinePlatformTheme } from '../BaselinePlatformDefaults';
4
- /**
5
- * @deprecated
6
- */
7
- export function createPlatformThemeRegistry(_themeId, _module) {
8
- return createThemeRegistry(getBaselinePlatformTheme(), resolvePartialTheme);
9
- }
10
- //# sourceMappingURL=PlatformDefaults.js.map
@@ -1 +0,0 @@
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,6 +0,0 @@
1
- import type { IThemingModuleHelper } from '../NativeModule';
2
- /**
3
- * @deprecated
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
@@ -1 +0,0 @@
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,15 +0,0 @@
1
- import { createThemeRegistry } from '@uifabricshared/theme-registry';
2
- import { resolvePartialTheme } from '@uifabricshared/theming-ramp';
3
- import { ThemingModuleHelper } from '../NativeModule';
4
- /**
5
- * @deprecated
6
- */
7
- export function createPlatformThemeRegistry(platformThemeId, module) {
8
- if (module === void 0) { module = ThemingModuleHelper; }
9
- var registry = createThemeRegistry(module.getPlatformDefaults(platformThemeId), resolvePartialTheme);
10
- module.addListener(function () {
11
- registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
12
- });
13
- return registry;
14
- }
15
- //# sourceMappingURL=PlatformDefaults.native.js.map
@@ -1 +0,0 @@
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,MAAkD;IAAlD,uBAAA,EAAA,4BAAkD;IACtH,IAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC,CAAC;IACvG,MAAM,CAAC,WAAW,CAAC;QACjB,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './PlatformDefaults';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './PlatformDefaults';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}