@uifabricshared/theming-react-native 0.13.13 → 0.13.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,82 @@
2
2
  "name": "@uifabricshared/theming-react-native",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 04 Mar 2022 21:17:24 GMT",
5
+ "date": "Thu, 31 Mar 2022 07:25:45 GMT",
6
+ "tag": "@uifabricshared/theming-react-native_v0.13.16",
7
+ "version": "0.13.16",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "4123478+tido64@users.noreply.github.com",
12
+ "package": "@uifabricshared/theming-react-native",
13
+ "commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed",
14
+ "comment": "Ban `export *` in index files for better tree-shakeability"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@uifabricshared/theming-react-native",
19
+ "comment": "Bump @fluentui-react-native/default-theme to v0.9.13",
20
+ "commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@uifabricshared/theming-react-native",
25
+ "comment": "Bump @fluentui-react-native/win32-theme to v0.14.15",
26
+ "commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@uifabricshared/theming-react-native",
31
+ "comment": "Bump @uifabricshared/theme-registry to v0.7.3",
32
+ "commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@uifabricshared/theming-react-native",
37
+ "comment": "Bump @uifabricshared/theming-ramp to v0.16.6",
38
+ "commit": "c39b4436f2ca160a31ca1d7ca9fa8bf7d59512ed"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Wed, 23 Mar 2022 17:24:05 GMT",
45
+ "tag": "@uifabricshared/theming-react-native_v0.13.15",
46
+ "version": "0.13.15",
47
+ "comments": {
48
+ "patch": [
49
+ {
50
+ "author": "beachball",
51
+ "package": "@uifabricshared/theming-react-native",
52
+ "comment": "Bump @fluentui-react-native/default-theme to v0.9.12",
53
+ "commit": "0a18d2f8bb6505c6c6e2445ff3ba62ac79334872"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@uifabricshared/theming-react-native",
58
+ "comment": "Bump @fluentui-react-native/win32-theme to v0.14.14",
59
+ "commit": "0a18d2f8bb6505c6c6e2445ff3ba62ac79334872"
60
+ }
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "date": "Fri, 04 Mar 2022 23:43:10 GMT",
66
+ "tag": "@uifabricshared/theming-react-native_v0.13.14",
67
+ "version": "0.13.14",
68
+ "comments": {
69
+ "patch": [
70
+ {
71
+ "author": "ruaraki@microsoft.com",
72
+ "package": "@uifabricshared/theming-react-native",
73
+ "commit": "051e390caabfc13c4e53f9812f0ec7c5b56094a2",
74
+ "comment": "Bump @rnx-kit/eslint-plugin from 0.2.10 to 0.2.11"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ {
80
+ "date": "Fri, 04 Mar 2022 21:17:46 GMT",
6
81
  "tag": "@uifabricshared/theming-react-native_v0.13.13",
7
82
  "version": "0.13.13",
8
83
  "comments": {
@@ -11,7 +86,7 @@
11
86
  "author": "beachball",
12
87
  "package": "@uifabricshared/theming-react-native",
13
88
  "comment": "Bump @fluentui-react-native/win32-theme to v0.14.13",
14
- "commit": "eb7cd2301e8a73b1211309a19c1b2f8af09fcc1a"
89
+ "commit": "1a80cce6c4a557ca32a719bd476e025ba3822630"
15
90
  }
16
91
  ]
17
92
  }
package/CHANGELOG.md CHANGED
@@ -1,12 +1,41 @@
1
1
  # Change Log - @uifabricshared/theming-react-native
2
2
 
3
- This log was last generated on Fri, 04 Mar 2022 21:17:24 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 31 Mar 2022 07:25:45 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.13.16
8
+
9
+ Thu, 31 Mar 2022 07:25:45 GMT
10
+
11
+ ### Patches
12
+
13
+ - Ban `export *` in index files for better tree-shakeability (4123478+tido64@users.noreply.github.com)
14
+ - Bump @fluentui-react-native/default-theme to v0.9.13
15
+ - Bump @fluentui-react-native/win32-theme to v0.14.15
16
+ - Bump @uifabricshared/theme-registry to v0.7.3
17
+ - Bump @uifabricshared/theming-ramp to v0.16.6
18
+
19
+ ## 0.13.15
20
+
21
+ Wed, 23 Mar 2022 17:24:05 GMT
22
+
23
+ ### Patches
24
+
25
+ - Bump @fluentui-react-native/default-theme to v0.9.12
26
+ - Bump @fluentui-react-native/win32-theme to v0.14.14
27
+
28
+ ## 0.13.14
29
+
30
+ Fri, 04 Mar 2022 23:43:10 GMT
31
+
32
+ ### Patches
33
+
34
+ - Bump @rnx-kit/eslint-plugin from 0.2.10 to 0.2.11 (ruaraki@microsoft.com)
35
+
7
36
  ## 0.13.13
8
37
 
9
- Fri, 04 Mar 2022 21:17:24 GMT
38
+ Fri, 04 Mar 2022 21:17:46 GMT
10
39
 
11
40
  ### Patches
12
41
 
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CA4BtE,CAAC"}
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CA6BtE,CAAC"}
@@ -4,7 +4,8 @@ import { getThemeRegistry } from './Global';
4
4
  import { ThemeContext } from '@uifabricshared/theming-ramp';
5
5
  export var ThemeProvider = function (props) {
6
6
  var registryFromProps = props.registry, _a = props.theme, themeName = _a === void 0 ? '' : _a, children = props.children;
7
- var registryToUse = registryFromProps || useThemeRegistry() || getThemeRegistry();
7
+ var defaultRegistry = useThemeRegistry();
8
+ var registryToUse = registryFromProps || defaultRegistry || getThemeRegistry();
8
9
  var _b = React.useState(registryToUse.getTheme(themeName)), theme = _b[0], setThemeState = _b[1];
9
10
  React.useEffect(function () {
10
11
  setThemeState(registryToUse.getTheme(themeName));
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,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,aAAa,GAAG,iBAAiB,IAAI,gBAAgB,EAAE,IAAI,gBAAgB,EAAE,CAAC;IAC9E,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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AAI,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"}
package/lib/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
2
- export * from './Theme.types';
2
+ export { IPartialTheme, ITheme } from './Theme.types';
3
+ export type { IThemeDefinition, ThemeRegistry } from './Theme.types';
3
4
  export { IThemeLayerProps, ThemeLayer } from './ThemeLayer';
4
- export * from './platform';
5
- export * from './ThemeProvider';
6
- export * from './ThemeProvider.types';
7
- export * from './ThemeContext';
8
- export * from './NativeModule';
5
+ export { createPlatformThemeRegistry } from './platform';
6
+ export { ThemeProvider } from './ThemeProvider';
7
+ export type { IThemeProviderProps } from './ThemeProvider.types';
8
+ export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
9
+ export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
10
+ export type { IEventEmitter, IHostSettingsWin32, IPlatformThemeDefinition, IThemingModuleHelper } from './NativeModule';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3H,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3H,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
package/lib/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
2
- export * from './Theme.types';
3
2
  export { ThemeLayer } from './ThemeLayer';
4
- export * from './platform';
5
- export * from './ThemeProvider';
6
- export * from './ThemeProvider.types';
7
- export * from './ThemeContext';
8
- export * from './NativeModule';
3
+ export { createPlatformThemeRegistry } from './platform';
4
+ export { ThemeProvider } from './ThemeProvider';
5
+ export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
6
+ export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
9
7
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3H,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAoB,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAG3H,OAAO,EAAoB,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CA4BtE,CAAC"}
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CA6BtE,CAAC"}
@@ -26,7 +26,8 @@ var Global_1 = require("./Global");
26
26
  var theming_ramp_1 = require("@uifabricshared/theming-ramp");
27
27
  var ThemeProvider = function (props) {
28
28
  var registryFromProps = props.registry, _a = props.theme, themeName = _a === void 0 ? '' : _a, children = props.children;
29
- var registryToUse = registryFromProps || (0, ThemeContext_1.useThemeRegistry)() || (0, Global_1.getThemeRegistry)();
29
+ var defaultRegistry = (0, ThemeContext_1.useThemeRegistry)();
30
+ var registryToUse = registryFromProps || defaultRegistry || (0, Global_1.getThemeRegistry)();
30
31
  var _b = React.useState(registryToUse.getTheme(themeName)), theme = _b[0], setThemeState = _b[1];
31
32
  React.useEffect(function () {
32
33
  setThemeState(registryToUse.getTheme(themeName));
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAE/B,+CAAwE;AAExE,mCAA4C;AAC5C,6DAA4D;AAErD,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,aAAa,GAAG,iBAAiB,IAAI,IAAA,+BAAgB,GAAE,IAAI,IAAA,yBAAgB,GAAE,CAAC;IAC9E,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,2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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,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAyB,CAAC;IAE9F,oFAAoF;IACpF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,oBAAC,mCAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,IAAG,aAAa,CAAiC,CACzG,CAAC,CAAC,CAAC,CACF,aAAa,CACd,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,aAAa,iBA6BxB"}
@@ -1,9 +1,11 @@
1
1
  export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
2
- export * from './Theme.types';
2
+ export { IPartialTheme, ITheme } from './Theme.types';
3
+ export type { IThemeDefinition, ThemeRegistry } from './Theme.types';
3
4
  export { IThemeLayerProps, ThemeLayer } from './ThemeLayer';
4
- export * from './platform';
5
- export * from './ThemeProvider';
6
- export * from './ThemeProvider.types';
7
- export * from './ThemeContext';
8
- export * from './NativeModule';
5
+ export { createPlatformThemeRegistry } from './platform';
6
+ export { ThemeProvider } from './ThemeProvider';
7
+ export type { IThemeProviderProps } from './ThemeProvider.types';
8
+ export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
9
+ export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
10
+ export type { IEventEmitter, IHostSettingsWin32, IPlatformThemeDefinition, IThemingModuleHelper } from './NativeModule';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3H,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3H,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,28 +1,24 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
2
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.ThemeLayer = exports.augmentPlatformTheme = exports.getTheme = exports.setTheme = exports.removeThemeRegistryListener = exports.addThemeRegistryListener = void 0;
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;
14
4
  var Global_1 = require("./Global");
15
5
  Object.defineProperty(exports, "addThemeRegistryListener", { enumerable: true, get: function () { return Global_1.addThemeRegistryListener; } });
16
6
  Object.defineProperty(exports, "removeThemeRegistryListener", { enumerable: true, get: function () { return Global_1.removeThemeRegistryListener; } });
17
7
  Object.defineProperty(exports, "setTheme", { enumerable: true, get: function () { return Global_1.setTheme; } });
18
8
  Object.defineProperty(exports, "getTheme", { enumerable: true, get: function () { return Global_1.getTheme; } });
19
9
  Object.defineProperty(exports, "augmentPlatformTheme", { enumerable: true, get: function () { return Global_1.augmentPlatformTheme; } });
20
- __exportStar(require("./Theme.types"), exports);
21
10
  var ThemeLayer_1 = require("./ThemeLayer");
22
11
  Object.defineProperty(exports, "ThemeLayer", { enumerable: true, get: function () { return ThemeLayer_1.ThemeLayer; } });
23
- __exportStar(require("./platform"), exports);
24
- __exportStar(require("./ThemeProvider"), exports);
25
- __exportStar(require("./ThemeProvider.types"), exports);
26
- __exportStar(require("./ThemeContext"), exports);
27
- __exportStar(require("./NativeModule"), exports);
12
+ var platform_1 = require("./platform");
13
+ Object.defineProperty(exports, "createPlatformThemeRegistry", { enumerable: true, get: function () { return platform_1.createPlatformThemeRegistry; } });
14
+ var ThemeProvider_1 = require("./ThemeProvider");
15
+ Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
16
+ var ThemeContext_1 = require("./ThemeContext");
17
+ Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeContext; } });
18
+ Object.defineProperty(exports, "ThemeRegistryContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeRegistryContext; } });
19
+ Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeContext_1.useTheme; } });
20
+ Object.defineProperty(exports, "useThemeRegistry", { enumerable: true, get: function () { return ThemeContext_1.useThemeRegistry; } });
21
+ var NativeModule_1 = require("./NativeModule");
22
+ Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return NativeModule_1.ThemingModuleHelper; } });
23
+ Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return NativeModule_1.getHostSettingsWin32; } });
28
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mCAA2H;AAAlH,kHAAA,wBAAwB,OAAA;AAAE,qHAAA,2BAA2B,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AACxG,gDAA8B;AAC9B,2CAA4D;AAAjC,wGAAA,UAAU,OAAA;AACrC,6CAA2B;AAC3B,kDAAgC;AAChC,wDAAsC;AACtC,iDAA+B;AAC/B,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAA2H;AAAlH,kHAAA,wBAAwB,OAAA;AAAE,qHAAA,2BAA2B,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAGxG,2CAA4D;AAAjC,wGAAA,UAAU,OAAA;AACrC,uCAAyD;AAAhD,uHAAA,2BAA2B,OAAA;AACpC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,+CAAgG;AAAvF,4GAAA,YAAY,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AACvE,+CAA2E;AAAlE,mHAAA,mBAAmB,OAAA;AAAE,oHAAA,oBAAoB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uifabricshared/theming-react-native",
3
- "version": "0.13.13",
3
+ "version": "0.13.16",
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,10 +27,10 @@
27
27
  "author": "",
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@fluentui-react-native/default-theme": ">=0.9.11 <1.0.0",
31
- "@fluentui-react-native/win32-theme": ">=0.14.13 <1.0.0",
32
- "@uifabricshared/theme-registry": ">=0.7.2 <1.0.0",
33
- "@uifabricshared/theming-ramp": ">=0.16.5 <1.0.0"
30
+ "@fluentui-react-native/default-theme": ">=0.9.13 <1.0.0",
31
+ "@fluentui-react-native/win32-theme": ">=0.14.15 <1.0.0",
32
+ "@uifabricshared/theme-registry": ">=0.7.3 <1.0.0",
33
+ "@uifabricshared/theming-ramp": ">=0.16.6 <1.0.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@fluentui-react-native/eslint-config-rules": "^0.1.1",
@@ -7,7 +7,8 @@ import { ThemeContext } from '@uifabricshared/theming-ramp';
7
7
 
8
8
  export const ThemeProvider: React.FunctionComponent<IThemeProviderProps> = (props: IThemeProviderProps) => {
9
9
  const { registry: registryFromProps, theme: themeName = '', children } = props;
10
- const registryToUse = registryFromProps || useThemeRegistry() || getThemeRegistry();
10
+ const defaultRegistry = useThemeRegistry();
11
+ const registryToUse = registryFromProps || defaultRegistry || getThemeRegistry();
11
12
  const [theme, setThemeState] = React.useState(registryToUse.getTheme(themeName));
12
13
 
13
14
  React.useEffect(() => {
package/src/index.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
2
- export * from './Theme.types';
2
+ export { IPartialTheme, ITheme } from './Theme.types';
3
+ export type { IThemeDefinition, ThemeRegistry } from './Theme.types';
3
4
  export { IThemeLayerProps, ThemeLayer } from './ThemeLayer';
4
- export * from './platform';
5
- export * from './ThemeProvider';
6
- export * from './ThemeProvider.types';
7
- export * from './ThemeContext';
8
- export * from './NativeModule';
5
+ export { createPlatformThemeRegistry } from './platform';
6
+ export { ThemeProvider } from './ThemeProvider';
7
+ export type { IThemeProviderProps } from './ThemeProvider.types';
8
+ export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
9
+ export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
10
+ export type { IEventEmitter, IHostSettingsWin32, IPlatformThemeDefinition, IThemingModuleHelper } from './NativeModule';