@fluentui-react-native/win32-theme 0.39.0 → 0.39.1

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 (78) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/NativeModule/_mocks_/getThemingModule.native.d.ts +1 -1
  3. package/lib/NativeModule/_mocks_/getThemingModule.native.js +2 -2
  4. package/lib/NativeModule/fallbackOfficeModule.d.ts +1 -1
  5. package/lib/NativeModule/fallbackOfficeModule.js +163 -163
  6. package/lib/NativeModule/getThemingModule.d.ts +1 -1
  7. package/lib/NativeModule/getThemingModule.js +2 -2
  8. package/lib/NativeModule/getThemingModule.native.d.ts +1 -1
  9. package/lib/NativeModule/getThemingModule.native.js +30 -28
  10. package/lib/NativeModule/hostThemeSetting.d.ts +1 -1
  11. package/lib/NativeModule/hostThemeSetting.js +3 -3
  12. package/lib/NativeModule/index.d.ts +2 -10
  13. package/lib/NativeModule/index.js +1 -1
  14. package/lib/NativeModule/officeThemingModule.d.ts +21 -21
  15. package/lib/NativeModule/officeThemingModule.js +1 -1
  16. package/lib/__tests__/win32-theme.test.d.ts +1 -1
  17. package/lib/__tests__/win32-theme.test.js +47 -47
  18. package/lib/createAliasesFromPalette.d.ts +1 -1
  19. package/lib/createAliasesFromPalette.js +56 -56
  20. package/lib/createBrandedThemeWithAlias.d.ts +1 -1
  21. package/lib/createBrandedThemeWithAlias.js +61 -56
  22. package/lib/createFontAliasTokens.d.ts +1 -1
  23. package/lib/createFontAliasTokens.js +3 -3
  24. package/lib/createOfficeAliasTokens.d.ts +1 -1
  25. package/lib/createOfficeAliasTokens.js +5 -5
  26. package/lib/createOfficeTheme.d.ts +1 -1
  27. package/lib/createOfficeTheme.js +46 -53
  28. package/lib/createPartialOfficeTheme.d.ts +1 -1
  29. package/lib/createPartialOfficeTheme.js +19 -22
  30. package/lib/getOfficeTokens.d.ts +227 -229
  31. package/lib/getOfficeTokens.js +26 -20
  32. package/lib/getThemeTypography.d.ts +1 -1
  33. package/lib/getThemeTypography.js +32 -32
  34. package/lib/highContrast/tokens-alias.d.ts +1 -1
  35. package/lib/highContrast/tokens-alias.js +11 -11
  36. package/lib/index.d.ts +2 -10
  37. package/lib/index.js +1 -1
  38. package/lib/paletteFromOfficeColors.d.ts +1 -1
  39. package/lib/paletteFromOfficeColors.js +114 -114
  40. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts +1 -1
  41. package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js +5 -5
  42. package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts +1 -1
  43. package/lib-commonjs/NativeModule/fallbackOfficeModule.js +165 -165
  44. package/lib-commonjs/NativeModule/getThemingModule.d.ts +1 -1
  45. package/lib-commonjs/NativeModule/getThemingModule.js +5 -5
  46. package/lib-commonjs/NativeModule/getThemingModule.native.d.ts +1 -1
  47. package/lib-commonjs/NativeModule/getThemingModule.native.js +35 -33
  48. package/lib-commonjs/NativeModule/hostThemeSetting.d.ts +1 -1
  49. package/lib-commonjs/NativeModule/hostThemeSetting.js +5 -5
  50. package/lib-commonjs/NativeModule/index.d.ts +2 -10
  51. package/lib-commonjs/NativeModule/index.js +8 -23
  52. package/lib-commonjs/NativeModule/officeThemingModule.d.ts +21 -21
  53. package/lib-commonjs/NativeModule/officeThemingModule.js +3 -3
  54. package/lib-commonjs/__tests__/win32-theme.test.d.ts +1 -1
  55. package/lib-commonjs/__tests__/win32-theme.test.js +57 -57
  56. package/lib-commonjs/createAliasesFromPalette.d.ts +1 -1
  57. package/lib-commonjs/createAliasesFromPalette.js +58 -58
  58. package/lib-commonjs/createBrandedThemeWithAlias.d.ts +1 -1
  59. package/lib-commonjs/createBrandedThemeWithAlias.js +64 -59
  60. package/lib-commonjs/createFontAliasTokens.d.ts +1 -1
  61. package/lib-commonjs/createFontAliasTokens.js +8 -8
  62. package/lib-commonjs/createOfficeAliasTokens.d.ts +1 -1
  63. package/lib-commonjs/createOfficeAliasTokens.js +10 -10
  64. package/lib-commonjs/createOfficeTheme.d.ts +1 -1
  65. package/lib-commonjs/createOfficeTheme.js +57 -66
  66. package/lib-commonjs/createPartialOfficeTheme.d.ts +1 -1
  67. package/lib-commonjs/createPartialOfficeTheme.js +22 -25
  68. package/lib-commonjs/getOfficeTokens.d.ts +227 -229
  69. package/lib-commonjs/getOfficeTokens.js +39 -35
  70. package/lib-commonjs/getThemeTypography.d.ts +1 -1
  71. package/lib-commonjs/getThemeTypography.js +36 -36
  72. package/lib-commonjs/highContrast/tokens-alias.d.ts +1 -1
  73. package/lib-commonjs/highContrast/tokens-alias.js +18 -20
  74. package/lib-commonjs/index.d.ts +2 -10
  75. package/lib-commonjs/index.js +23 -89
  76. package/lib-commonjs/paletteFromOfficeColors.d.ts +1 -1
  77. package/lib-commonjs/paletteFromOfficeColors.js +116 -116
  78. package/package.json +19 -18
@@ -1,173 +1,173 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fallbackOfficeModule = void 0;
4
4
  exports.fallbackGetPalette = fallbackGetPalette;
5
5
  const whiteColorsPalette = {
6
- Bkg: '#FFFFFF',
7
- BkgHover: '#D2D2D2',
8
- BkgPressed: '#B1B1B1',
9
- BkgSelected: '#C6C6C6',
10
- BkgSubtle: '#F3F3F3',
11
- BkgSelectionHighlight: '#737373',
12
- Text: '#262626',
13
- TextRest: '#262626',
14
- TextHover: '#262626',
15
- TextPressed: '#262626',
16
- TextSelected: '#262626',
17
- TextDisabled: '#B1B1B1',
18
- TextSelectionHighlight: '#FFFFFF',
19
- TextSecondary: '#666666',
20
- TextSecondaryRest: '#666666',
21
- TextSecondaryHover: '#505050',
22
- TextSecondaryPressed: '#666666',
23
- TextSecondarySelected: '#666666',
24
- TextEmphasis: '#D83B01',
25
- TextEmphasisRest: '#D83B01',
26
- TextEmphasisHover: '#EA6115',
27
- TextEmphasisPressed: '#A22C01',
28
- TextEmphasisSelected: '#D83B01',
29
- StrokeSelectedHover: '#969696',
30
- StrokeKeyboard: '#969696',
31
- StrokeOverRest: '#00000000',
32
- StrokeOverHover: '#00000000',
33
- StrokeOverPressed: '#00000000',
34
- StrokeOverSelectedRest: '#00000000',
35
- StrokeOverSelectedHover: '#969696',
36
- StrokeOverSelectedPressed: '#00000000',
37
- BkgCtl: '#E6E6E6',
38
- BkgCtlHover: '#FFF7F0',
39
- BkgCtlPressed: '#FBDFD0',
40
- BkgCtlSelected: '#E6E6E6',
41
- BkgCtlDisabled: '#E6E6E6',
42
- TextCtl: '#262626',
43
- TextCtlHover: '#262626',
44
- TextCtlPressed: '#262626',
45
- TextCtlSelected: '#262626',
46
- TextCtlDisabled: '#B1B1B1',
47
- StrokeCtl: '#969696',
48
- StrokeCtlHover: '#FBDFD0',
49
- StrokeCtlPressed: '#EA6115',
50
- StrokeCtlSelected: '#969696',
51
- StrokeCtlDisabled: '#D2D2D2',
52
- StrokeCtlKeyboard: '#FBDFD0',
53
- BkgCtlEmphasis: '#D83B01',
54
- BkgCtlEmphasisHover: '#F29F71',
55
- BkgCtlEmphasisPressed: '#A22C01',
56
- BkgCtlEmphasisDisabled: '#E6E6E6',
57
- TextCtlEmphasis: '#FFFFFF',
58
- TextCtlEmphasisHover: '#FFFFFF',
59
- TextCtlEmphasisPressed: '#FFFFFF',
60
- TextCtlEmphasisDisabled: '#B1B1B1',
61
- StrokeCtlEmphasis: '#A22C01',
62
- StrokeCtlEmphasisHover: '#D83B01',
63
- StrokeCtlEmphasisPressed: '#A22C01',
64
- StrokeCtlEmphasisDisabled: '#D2D2D2',
65
- StrokeCtlEmphasisKeyboard: '#A22C01',
66
- BkgCtlSubtle: '#FFFFFF',
67
- BkgCtlSubtleHover: '#FFFFFF',
68
- BkgCtlSubtlePressed: '#FFFFFF',
69
- BkgCtlSubtleDisabled: '#F3F3F3',
70
- TextCtlSubtle: '#262626',
71
- TextCtlSubtleHover: '#262626',
72
- TextCtlSubtlePressed: '#262626',
73
- TextCtlSubtleDisabled: '#B1B1B1',
74
- StrokeCtlSubtle: '#C6C6C6',
75
- StrokeCtlSubtleHover: '#969696',
76
- StrokeCtlSubtlePressed: '#969696',
77
- StrokeCtlSubtleDisabled: '#C6C6C6',
78
- StrokeCtlSubtleKeyboard: '#969696',
79
- TextHyperlink: '#D83B01',
80
- TextHyperlinkHover: '#A22C01',
81
- TextHyperlinkPressed: '#6C1E01',
82
- TextActive: '#262626',
83
- TextActiveHover: '#EA6115',
84
- TextActivePressed: '#A22C01',
85
- TextActiveSelected: '#D83B01',
86
- StrokeOnlyHover: '#B1B1B1',
87
- StrokeOnlyPressed: '#737373',
88
- StrokeOnlySelected: '#969696',
89
- TextError: '#A50000',
90
- TextErrorHover: '#A50000',
91
- TextErrorPressed: '#A50000',
92
- TextErrorSelected: '#A50000',
93
- ThumbToggleSwitchOff: '#505050',
94
- ThumbToggleSwitchOffHover: '#505050',
95
- ThumbToggleSwitchOffPressed: '#505050',
96
- ThumbToggleSwitchOffDisabled: '#D2D2D2',
97
- ThumbToggleSwitchOn: '#FFFFFF',
98
- ThumbToggleSwitchOnHover: '#FFFFFF',
99
- ThumbToggleSwitchOnPressed: '#FFFFFF',
100
- ThumbToggleSwitchOnDisabled: '#FFFFFF',
101
- BkgToggleSwitchOff: '#FFFFFF',
102
- BkgToggleSwitchOffHover: '#D2D2D2',
103
- BkgToggleSwitchOffPressed: '#B1B1B1',
104
- BkgToggleSwitchOffDisabled: '#FFFFFF',
105
- BkgToggleSwitchOn: '#D83B01',
106
- BkgToggleSwitchOnHover: '#EA6115',
107
- BkgToggleSwitchOnPressed: '#A22C01',
108
- BkgToggleSwitchOnDisabled: '#D2D2D2',
109
- StrokeToggleSwitchOff: '#505050',
110
- StrokeToggleSwitchOffHover: '#505050',
111
- StrokeToggleSwitchOffPressed: '#505050',
112
- StrokeToggleSwitchOffDisabled: '#D2D2D2',
113
- StrokeToggleSwitchOn: '#D83B01',
114
- StrokeToggleSwitchOnHover: '#EA6115',
115
- StrokeToggleSwitchOnPressed: '#A22C01',
116
- StrokeToggleSwitchOnDisabled: '#D2D2D2',
117
- SliderPrimary: '#444444',
118
- SliderPrimaryHover: '#D2D2D2',
119
- SliderPrimaryPressed: '#262626',
120
- SliderPrimaryDisabled: '#969696',
121
- SliderSecondary: '#D2D2D2',
122
- SliderBuffer: '#262626',
123
- SliderKeyboard: '#444444',
124
- SliderToolTipBorder: '#C6C6C6',
125
- SliderToolTipLabel: '#262626',
126
- SliderToolTipBkg: '#FFFFFF',
127
- AccentDark: '#C6C6C6',
128
- AccentLight: '#E6E6E6',
129
- AccentEmphasis: '#D83B01',
130
- AccentOutline: '#000000',
131
- BkgAccentTint: '#D2E0F4',
132
- TextAccentTint: '#242424',
133
- TextEmphasis2: '#D83B01',
134
- BkgCtlSubtleSelected: '#F3F3F3',
135
- TextCtlSubtleSelected: '#262626',
136
- BkgCtlEmphasisFocus: '#F3F3F3',
137
- BkgCtlSubtleFocus: '#F3F3F3',
138
- BkgCtlSubtleHoverDisabled: '#F3F3F3',
139
- BkgCtlSubtleSelectedDisabled: '#F3F3F3',
140
- BkgHeader: '#E6E6E6',
141
- TextHeader: '#262626',
142
- TextTextBoxPlaceholder: '#666666',
6
+ Bkg: '#FFFFFF',
7
+ BkgHover: '#D2D2D2',
8
+ BkgPressed: '#B1B1B1',
9
+ BkgSelected: '#C6C6C6',
10
+ BkgSubtle: '#F3F3F3',
11
+ BkgSelectionHighlight: '#737373',
12
+ Text: '#262626',
13
+ TextRest: '#262626',
14
+ TextHover: '#262626',
15
+ TextPressed: '#262626',
16
+ TextSelected: '#262626',
17
+ TextDisabled: '#B1B1B1',
18
+ TextSelectionHighlight: '#FFFFFF',
19
+ TextSecondary: '#666666',
20
+ TextSecondaryRest: '#666666',
21
+ TextSecondaryHover: '#505050',
22
+ TextSecondaryPressed: '#666666',
23
+ TextSecondarySelected: '#666666',
24
+ TextEmphasis: '#D83B01',
25
+ TextEmphasisRest: '#D83B01',
26
+ TextEmphasisHover: '#EA6115',
27
+ TextEmphasisPressed: '#A22C01',
28
+ TextEmphasisSelected: '#D83B01',
29
+ StrokeSelectedHover: '#969696',
30
+ StrokeKeyboard: '#969696',
31
+ StrokeOverRest: '#00000000',
32
+ StrokeOverHover: '#00000000',
33
+ StrokeOverPressed: '#00000000',
34
+ StrokeOverSelectedRest: '#00000000',
35
+ StrokeOverSelectedHover: '#969696',
36
+ StrokeOverSelectedPressed: '#00000000',
37
+ BkgCtl: '#E6E6E6',
38
+ BkgCtlHover: '#FFF7F0',
39
+ BkgCtlPressed: '#FBDFD0',
40
+ BkgCtlSelected: '#E6E6E6',
41
+ BkgCtlDisabled: '#E6E6E6',
42
+ TextCtl: '#262626',
43
+ TextCtlHover: '#262626',
44
+ TextCtlPressed: '#262626',
45
+ TextCtlSelected: '#262626',
46
+ TextCtlDisabled: '#B1B1B1',
47
+ StrokeCtl: '#969696',
48
+ StrokeCtlHover: '#FBDFD0',
49
+ StrokeCtlPressed: '#EA6115',
50
+ StrokeCtlSelected: '#969696',
51
+ StrokeCtlDisabled: '#D2D2D2',
52
+ StrokeCtlKeyboard: '#FBDFD0',
53
+ BkgCtlEmphasis: '#D83B01',
54
+ BkgCtlEmphasisHover: '#F29F71',
55
+ BkgCtlEmphasisPressed: '#A22C01',
56
+ BkgCtlEmphasisDisabled: '#E6E6E6',
57
+ TextCtlEmphasis: '#FFFFFF',
58
+ TextCtlEmphasisHover: '#FFFFFF',
59
+ TextCtlEmphasisPressed: '#FFFFFF',
60
+ TextCtlEmphasisDisabled: '#B1B1B1',
61
+ StrokeCtlEmphasis: '#A22C01',
62
+ StrokeCtlEmphasisHover: '#D83B01',
63
+ StrokeCtlEmphasisPressed: '#A22C01',
64
+ StrokeCtlEmphasisDisabled: '#D2D2D2',
65
+ StrokeCtlEmphasisKeyboard: '#A22C01',
66
+ BkgCtlSubtle: '#FFFFFF',
67
+ BkgCtlSubtleHover: '#FFFFFF',
68
+ BkgCtlSubtlePressed: '#FFFFFF',
69
+ BkgCtlSubtleDisabled: '#F3F3F3',
70
+ TextCtlSubtle: '#262626',
71
+ TextCtlSubtleHover: '#262626',
72
+ TextCtlSubtlePressed: '#262626',
73
+ TextCtlSubtleDisabled: '#B1B1B1',
74
+ StrokeCtlSubtle: '#C6C6C6',
75
+ StrokeCtlSubtleHover: '#969696',
76
+ StrokeCtlSubtlePressed: '#969696',
77
+ StrokeCtlSubtleDisabled: '#C6C6C6',
78
+ StrokeCtlSubtleKeyboard: '#969696',
79
+ TextHyperlink: '#D83B01',
80
+ TextHyperlinkHover: '#A22C01',
81
+ TextHyperlinkPressed: '#6C1E01',
82
+ TextActive: '#262626',
83
+ TextActiveHover: '#EA6115',
84
+ TextActivePressed: '#A22C01',
85
+ TextActiveSelected: '#D83B01',
86
+ StrokeOnlyHover: '#B1B1B1',
87
+ StrokeOnlyPressed: '#737373',
88
+ StrokeOnlySelected: '#969696',
89
+ TextError: '#A50000',
90
+ TextErrorHover: '#A50000',
91
+ TextErrorPressed: '#A50000',
92
+ TextErrorSelected: '#A50000',
93
+ ThumbToggleSwitchOff: '#505050',
94
+ ThumbToggleSwitchOffHover: '#505050',
95
+ ThumbToggleSwitchOffPressed: '#505050',
96
+ ThumbToggleSwitchOffDisabled: '#D2D2D2',
97
+ ThumbToggleSwitchOn: '#FFFFFF',
98
+ ThumbToggleSwitchOnHover: '#FFFFFF',
99
+ ThumbToggleSwitchOnPressed: '#FFFFFF',
100
+ ThumbToggleSwitchOnDisabled: '#FFFFFF',
101
+ BkgToggleSwitchOff: '#FFFFFF',
102
+ BkgToggleSwitchOffHover: '#D2D2D2',
103
+ BkgToggleSwitchOffPressed: '#B1B1B1',
104
+ BkgToggleSwitchOffDisabled: '#FFFFFF',
105
+ BkgToggleSwitchOn: '#D83B01',
106
+ BkgToggleSwitchOnHover: '#EA6115',
107
+ BkgToggleSwitchOnPressed: '#A22C01',
108
+ BkgToggleSwitchOnDisabled: '#D2D2D2',
109
+ StrokeToggleSwitchOff: '#505050',
110
+ StrokeToggleSwitchOffHover: '#505050',
111
+ StrokeToggleSwitchOffPressed: '#505050',
112
+ StrokeToggleSwitchOffDisabled: '#D2D2D2',
113
+ StrokeToggleSwitchOn: '#D83B01',
114
+ StrokeToggleSwitchOnHover: '#EA6115',
115
+ StrokeToggleSwitchOnPressed: '#A22C01',
116
+ StrokeToggleSwitchOnDisabled: '#D2D2D2',
117
+ SliderPrimary: '#444444',
118
+ SliderPrimaryHover: '#D2D2D2',
119
+ SliderPrimaryPressed: '#262626',
120
+ SliderPrimaryDisabled: '#969696',
121
+ SliderSecondary: '#D2D2D2',
122
+ SliderBuffer: '#262626',
123
+ SliderKeyboard: '#444444',
124
+ SliderToolTipBorder: '#C6C6C6',
125
+ SliderToolTipLabel: '#262626',
126
+ SliderToolTipBkg: '#FFFFFF',
127
+ AccentDark: '#C6C6C6',
128
+ AccentLight: '#E6E6E6',
129
+ AccentEmphasis: '#D83B01',
130
+ AccentOutline: '#000000',
131
+ BkgAccentTint: '#D2E0F4',
132
+ TextAccentTint: '#242424',
133
+ TextEmphasis2: '#D83B01',
134
+ BkgCtlSubtleSelected: '#F3F3F3',
135
+ TextCtlSubtleSelected: '#262626',
136
+ BkgCtlEmphasisFocus: '#F3F3F3',
137
+ BkgCtlSubtleFocus: '#F3F3F3',
138
+ BkgCtlSubtleHoverDisabled: '#F3F3F3',
139
+ BkgCtlSubtleSelectedDisabled: '#F3F3F3',
140
+ BkgHeader: '#E6E6E6',
141
+ TextHeader: '#262626',
142
+ TextTextBoxPlaceholder: '#666666',
143
143
  };
144
144
  function fallbackGetPalette(pal) {
145
- return pal === 'TaskPane'
146
- ? {
147
- ...whiteColorsPalette,
148
- Bkg: 'antiquewhite',
149
- }
150
- : whiteColorsPalette;
145
+ return pal === 'TaskPane'
146
+ ? {
147
+ ...whiteColorsPalette,
148
+ Bkg: 'antiquewhite',
149
+ }
150
+ : whiteColorsPalette;
151
151
  }
152
152
  exports.fallbackOfficeModule = {
153
- getPalette: fallbackGetPalette,
154
- getConstants() {
155
- return {
156
- ramps: {
157
- App: ['#F8F8F8', '#EFF6FC', '#BBDAF3', '#55A4E2', '#359EDD', '#0078d7', '#283E4A', '#030C13'],
158
- FluentGrays: ['#FAF9F8', '#797775', '#11100F'],
159
- ClassicGrays: ['#FFFFFF', '#737373', '#000000'],
160
- Sepias: ['#ECE6DE'],
161
- },
162
- typography: {},
163
- fluentTypography: {},
164
- rampNames: {
165
- App: ['FakeApp1', 'App2', 'App3', 'App4', 'App5', 'App6', 'App7', 'App8'],
166
- FluentGrays: ['FakeGray1', 'Gray2', 'Gray3'],
167
- ClassicGrays: ['FakeGray4', 'Gray5', 'Gray6'],
168
- Sepias: ['FakeSepia'],
169
- },
170
- };
171
- },
153
+ getPalette: fallbackGetPalette,
154
+ getConstants() {
155
+ return {
156
+ ramps: {
157
+ App: ['#F8F8F8', '#EFF6FC', '#BBDAF3', '#55A4E2', '#359EDD', '#0078d7', '#283E4A', '#030C13'],
158
+ FluentGrays: ['#FAF9F8', '#797775', '#11100F'],
159
+ ClassicGrays: ['#FFFFFF', '#737373', '#000000'],
160
+ Sepias: ['#ECE6DE'],
161
+ },
162
+ typography: {},
163
+ fluentTypography: {},
164
+ rampNames: {
165
+ App: ['FakeApp1', 'App2', 'App3', 'App4', 'App5', 'App6', 'App7', 'App8'],
166
+ FluentGrays: ['FakeGray1', 'Gray2', 'Gray3'],
167
+ ClassicGrays: ['FakeGray4', 'Gray5', 'Gray6'],
168
+ Sepias: ['FakeSepia'],
169
+ },
170
+ };
171
+ },
172
172
  };
173
- //# sourceMappingURL=fallbackOfficeModule.js.map
173
+ //# sourceMappingURL=fallbackOfficeModule.js.map
@@ -4,4 +4,4 @@ import type { OfficeThemingModule } from './officeThemingModule';
4
4
  * implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
5
5
  */
6
6
  export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
7
- //# sourceMappingURL=getThemingModule.d.ts.map
7
+ //# sourceMappingURL=getThemingModule.d.ts.map
@@ -1,11 +1,11 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getThemingModule = getThemingModule;
4
- const fallbackOfficeModule_1 = require('./fallbackOfficeModule');
4
+ const fallbackOfficeModule_1 = require("./fallbackOfficeModule");
5
5
  /**
6
6
  * implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
7
7
  */
8
8
  function getThemingModule() {
9
- return [fallbackOfficeModule_1.fallbackOfficeModule, undefined];
9
+ return [fallbackOfficeModule_1.fallbackOfficeModule, undefined];
10
10
  }
11
- //# sourceMappingURL=getThemingModule.js.map
11
+ //# sourceMappingURL=getThemingModule.js.map
@@ -1,4 +1,4 @@
1
1
  import { NativeEventEmitter } from 'react-native';
2
2
  import type { OfficeThemingModule } from './officeThemingModule';
3
3
  export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
4
- //# sourceMappingURL=getThemingModule.native.d.ts.map
4
+ //# sourceMappingURL=getThemingModule.native.d.ts.map
@@ -1,49 +1,51 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getThemingModule = getThemingModule;
4
- const react_native_1 = require('react-native');
5
- const fallbackOfficeModule_1 = require('./fallbackOfficeModule');
6
- const hostThemeSetting_1 = require('./hostThemeSetting');
4
+ const react_native_1 = require("react-native");
5
+ const fallbackOfficeModule_1 = require("./fallbackOfficeModule");
6
+ const hostThemeSetting_1 = require("./hostThemeSetting");
7
7
  /**
8
8
  * If we have a userAgent string, let's assume we're web debugging. __DEV__ is for developer bundles. Currently,
9
9
  * react-native only polyfills navigator with { product: 'ReactNative', geolocation: NativeModules.Geolocation }
10
10
  */
11
11
  function disableGetPalette() {
12
- const disabled = __DEV__ && typeof globalThis.navigator !== 'undefined' && globalThis.navigator.userAgent !== undefined;
13
- disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
14
- return disabled;
12
+ const disabled = __DEV__ && typeof globalThis.navigator !== 'undefined' && globalThis.navigator.userAgent !== undefined;
13
+ disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
14
+ return disabled;
15
15
  }
16
16
  function themeGetConstants() {
17
- return themingModuleConstants;
17
+ return themingModuleConstants;
18
18
  }
19
19
  let themingModule = undefined;
20
20
  let themingModuleConstants = undefined;
21
21
  let themingModuleEmitter = undefined;
22
22
  function getThemingModule() {
23
- if (!themingModule) {
24
- const module = react_native_1.TurboModuleRegistry.get('Theming');
25
- // if the native module exists return the module + an emitter for it
26
- if (module) {
27
- if (!isInstantiated) {
28
- // We need to store the host theme so that when themes are created
29
- // they can use this information.
30
- (0, hostThemeSetting_1.setCurrentHostThemeSetting)(module.getConstants().initialHostThemeSetting);
31
- isInstantiated = true;
32
- }
33
- // Cache the result of getConstants to avoid continuous Native->JS marshalling
34
- themingModuleConstants = module.getConstants();
35
- // mock getPalette if it should be disabled
36
- if (disableGetPalette()) {
37
- themingModule = { ...module, getPalette: fallbackOfficeModule_1.fallbackGetPalette, getConstants: themeGetConstants };
38
- } else {
39
- themingModule = { ...module, getPalette: module.getPalette, getConstants: themeGetConstants };
40
- }
41
- themingModuleEmitter = new react_native_1.NativeEventEmitter(module);
42
- } else {
43
- themingModule = fallbackOfficeModule_1.fallbackOfficeModule;
23
+ if (!themingModule) {
24
+ const module = react_native_1.TurboModuleRegistry.get('Theming');
25
+ // if the native module exists return the module + an emitter for it
26
+ if (module) {
27
+ if (!isInstantiated) {
28
+ // We need to store the host theme so that when themes are created
29
+ // they can use this information.
30
+ (0, hostThemeSetting_1.setCurrentHostThemeSetting)(module.getConstants().initialHostThemeSetting);
31
+ isInstantiated = true;
32
+ }
33
+ // Cache the result of getConstants to avoid continuous Native->JS marshalling
34
+ themingModuleConstants = module.getConstants();
35
+ // mock getPalette if it should be disabled
36
+ if (disableGetPalette()) {
37
+ themingModule = { ...module, getPalette: fallbackOfficeModule_1.fallbackGetPalette, getConstants: themeGetConstants };
38
+ }
39
+ else {
40
+ themingModule = { ...module, getPalette: module.getPalette, getConstants: themeGetConstants };
41
+ }
42
+ themingModuleEmitter = new react_native_1.NativeEventEmitter(module);
43
+ }
44
+ else {
45
+ themingModule = fallbackOfficeModule_1.fallbackOfficeModule;
46
+ }
44
47
  }
45
- }
46
- return [themingModule, themingModuleEmitter];
48
+ return [themingModule, themingModuleEmitter];
47
49
  }
48
50
  let isInstantiated = false;
49
- //# sourceMappingURL=getThemingModule.native.js.map
51
+ //# sourceMappingURL=getThemingModule.native.js.map
@@ -1,3 +1,3 @@
1
1
  export declare const getCurrentHostThemeSetting: () => string;
2
2
  export declare const setCurrentHostThemeSetting: (newHostThemeSetting: string) => void;
3
- //# sourceMappingURL=hostThemeSetting.d.ts.map
3
+ //# sourceMappingURL=hostThemeSetting.d.ts.map
@@ -1,5 +1,5 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setCurrentHostThemeSetting = exports.getCurrentHostThemeSetting = void 0;
4
4
  // The ThemingModule currently only stores its initial host theme state
5
5
  // This state is never updated (it's a constant on the native module)
@@ -12,11 +12,11 @@ exports.setCurrentHostThemeSetting = exports.getCurrentHostThemeSetting = void 0
12
12
  // entire lifetime of the instance.
13
13
  let currentHostThemeSetting = '';
14
14
  const getCurrentHostThemeSetting = () => {
15
- return currentHostThemeSetting;
15
+ return currentHostThemeSetting;
16
16
  };
17
17
  exports.getCurrentHostThemeSetting = getCurrentHostThemeSetting;
18
18
  const setCurrentHostThemeSetting = (newHostThemeSetting) => {
19
- currentHostThemeSetting = newHostThemeSetting;
19
+ currentHostThemeSetting = newHostThemeSetting;
20
20
  };
21
21
  exports.setCurrentHostThemeSetting = setCurrentHostThemeSetting;
22
- //# sourceMappingURL=hostThemeSetting.js.map
22
+ //# sourceMappingURL=hostThemeSetting.js.map
@@ -1,12 +1,4 @@
1
1
  export { fallbackOfficeModule, fallbackGetPalette } from './fallbackOfficeModule';
2
2
  export { getThemingModule } from './getThemingModule';
3
- export type {
4
- PlatformDefaultsChangedArgs,
5
- PlatformDefaultsChangedCallback,
6
- CxxException,
7
- NativeColorRamps,
8
- NativeColorNames,
9
- OfficeThemingModule,
10
- IEventEmitter,
11
- } from './officeThemingModule';
12
- //# sourceMappingURL=index.d.ts.map
3
+ export type { PlatformDefaultsChangedArgs, PlatformDefaultsChangedCallback, CxxException, NativeColorRamps, NativeColorNames, OfficeThemingModule, IEventEmitter, } from './officeThemingModule';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1,24 +1,9 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getThemingModule = exports.fallbackGetPalette = exports.fallbackOfficeModule = void 0;
4
- const fallbackOfficeModule_1 = require('./fallbackOfficeModule');
5
- Object.defineProperty(exports, 'fallbackOfficeModule', {
6
- enumerable: true,
7
- get: function () {
8
- return fallbackOfficeModule_1.fallbackOfficeModule;
9
- },
10
- });
11
- Object.defineProperty(exports, 'fallbackGetPalette', {
12
- enumerable: true,
13
- get: function () {
14
- return fallbackOfficeModule_1.fallbackGetPalette;
15
- },
16
- });
17
- const getThemingModule_1 = require('./getThemingModule');
18
- Object.defineProperty(exports, 'getThemingModule', {
19
- enumerable: true,
20
- get: function () {
21
- return getThemingModule_1.getThemingModule;
22
- },
23
- });
24
- //# sourceMappingURL=index.js.map
4
+ const fallbackOfficeModule_1 = require("./fallbackOfficeModule");
5
+ Object.defineProperty(exports, "fallbackOfficeModule", { enumerable: true, get: function () { return fallbackOfficeModule_1.fallbackOfficeModule; } });
6
+ Object.defineProperty(exports, "fallbackGetPalette", { enumerable: true, get: function () { return fallbackOfficeModule_1.fallbackGetPalette; } });
7
+ const getThemingModule_1 = require("./getThemingModule");
8
+ Object.defineProperty(exports, "getThemingModule", { enumerable: true, get: function () { return getThemingModule_1.getThemingModule; } });
9
+ //# sourceMappingURL=index.js.map
@@ -2,37 +2,37 @@ import type { NativeModule, ColorValue } from 'react-native';
2
2
  import type { OfficePalette, Typography } from '@fluentui-react-native/theme-types';
3
3
  type ObjectBase = {};
4
4
  export type PlatformDefaultsChangedArgs = {
5
- hostThemeSetting: string;
5
+ hostThemeSetting: string;
6
6
  };
7
7
  export type PlatformDefaultsChangedCallback = (args?: PlatformDefaultsChangedArgs) => void;
8
8
  export interface CxxException {
9
- message: string;
9
+ message: string;
10
10
  }
11
11
  export interface NativeColorRamps {
12
- FluentGrays: ColorValue[];
13
- ClassicGrays: ColorValue[];
14
- App: ColorValue[];
15
- Sepias: ColorValue[];
16
- [key: string]: ColorValue[];
12
+ FluentGrays: ColorValue[];
13
+ ClassicGrays: ColorValue[];
14
+ App: ColorValue[];
15
+ Sepias: ColorValue[];
16
+ [key: string]: ColorValue[];
17
17
  }
18
18
  export interface NativeColorNames {
19
- FluentGrays: string[];
20
- ClassicGrays: string[];
21
- App: string[];
22
- Sepias: string[];
19
+ FluentGrays: string[];
20
+ ClassicGrays: string[];
21
+ App: string[];
22
+ Sepias: string[];
23
23
  }
24
24
  export interface OfficeThemingModule extends NativeModule {
25
- getPalette(palette?: string): OfficePalette | CxxException;
26
- getConstants(): {
27
- typography: ObjectBase;
28
- fluentTypography: Typography;
29
- ramps: NativeColorRamps;
30
- rampNames: NativeColorNames;
31
- initialHostThemeSetting?: string;
32
- };
25
+ getPalette(palette?: string): OfficePalette | CxxException;
26
+ getConstants(): {
27
+ typography: ObjectBase;
28
+ fluentTypography: Typography;
29
+ ramps: NativeColorRamps;
30
+ rampNames: NativeColorNames;
31
+ initialHostThemeSetting?: string;
32
+ };
33
33
  }
34
34
  export interface IEventEmitter {
35
- addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
35
+ addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
36
36
  }
37
37
  export {};
38
- //# sourceMappingURL=officeThemingModule.d.ts.map
38
+ //# sourceMappingURL=officeThemingModule.d.ts.map
@@ -1,3 +1,3 @@
1
- 'use strict';
2
- Object.defineProperty(exports, '__esModule', { value: true });
3
- //# sourceMappingURL=officeThemingModule.js.map
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=officeThemingModule.js.map
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=win32-theme.test.d.ts.map
2
+ //# sourceMappingURL=win32-theme.test.d.ts.map