@uifabricshared/theming-react-native 0.21.0 → 0.21.3
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.md +35 -0
- package/lib/BaselinePlatformDefaults.d.ts +1 -1
- package/lib/BaselinePlatformDefaults.js +2 -2
- package/lib/Global.d.ts +1 -1
- package/lib/Global.js +11 -11
- package/lib/NativeModule/ThemingModule.d.ts +2 -2
- package/lib/NativeModule/ThemingModule.js +1 -1
- package/lib/NativeModule/ThemingModule.types.d.ts +13 -13
- package/lib/NativeModule/ThemingModule.types.js +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.d.ts +3 -8
- package/lib/NativeModule/ThemingModuleHelpers.js +36 -36
- package/lib/NativeModule/getHostSettings.d.ts +1 -1
- package/lib/NativeModule/getHostSettings.js +2 -2
- package/lib/NativeModule/index.d.ts +1 -1
- package/lib/NativeModule/index.js +1 -1
- package/lib/Theme.types.d.ts +1 -1
- package/lib/Theme.types.js +1 -1
- package/lib/ThemeContext.d.ts +1 -1
- package/lib/ThemeContext.js +1 -1
- package/lib/ThemeLayer.d.ts +24 -24
- package/lib/ThemeLayer.js +40 -42
- package/lib/ThemeProvider.d.ts +1 -1
- package/lib/ThemeProvider.js +21 -21
- package/lib/ThemeProvider.types.d.ts +3 -3
- package/lib/ThemeProvider.types.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/platform/PlatformDefaults.d.ts +2 -8
- package/lib/platform/PlatformDefaults.js +2 -2
- package/lib/platform/PlatformDefaults.native.d.ts +2 -8
- package/lib/platform/PlatformDefaults.native.js +6 -6
- package/lib/platform/index.d.ts +2 -2
- package/lib/platform/index.d.ts.map +1 -1
- package/lib/platform/index.js +2 -2
- package/lib/platform/index.js.map +1 -1
- package/lib-commonjs/BaselinePlatformDefaults.d.ts +1 -1
- package/lib-commonjs/BaselinePlatformDefaults.js +5 -5
- package/lib-commonjs/Global.d.ts +1 -1
- package/lib-commonjs/Global.js +14 -14
- package/lib-commonjs/NativeModule/ThemingModule.d.ts +2 -2
- package/lib-commonjs/NativeModule/ThemingModule.js +5 -5
- package/lib-commonjs/NativeModule/ThemingModule.types.d.ts +13 -13
- package/lib-commonjs/NativeModule/ThemingModule.types.js +3 -3
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts +3 -8
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +41 -44
- package/lib-commonjs/NativeModule/getHostSettings.d.ts +1 -1
- package/lib-commonjs/NativeModule/getHostSettings.js +4 -4
- package/lib-commonjs/NativeModule/index.d.ts +1 -1
- package/lib-commonjs/NativeModule/index.js +7 -17
- package/lib-commonjs/Theme.types.d.ts +1 -1
- package/lib-commonjs/Theme.types.js +3 -3
- package/lib-commonjs/ThemeContext.d.ts +1 -1
- package/lib-commonjs/ThemeContext.js +36 -63
- package/lib-commonjs/ThemeLayer.d.ts +24 -24
- package/lib-commonjs/ThemeLayer.js +74 -93
- package/lib-commonjs/ThemeProvider.d.ts +1 -1
- package/lib-commonjs/ThemeProvider.js +56 -75
- package/lib-commonjs/ThemeProvider.types.d.ts +3 -3
- package/lib-commonjs/ThemeProvider.types.js +3 -3
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.js +24 -108
- package/lib-commonjs/platform/PlatformDefaults.d.ts +2 -8
- package/lib-commonjs/platform/PlatformDefaults.js +7 -10
- package/lib-commonjs/platform/PlatformDefaults.native.d.ts +2 -8
- package/lib-commonjs/platform/PlatformDefaults.native.js +11 -14
- package/lib-commonjs/platform/index.d.ts +2 -2
- package/lib-commonjs/platform/index.d.ts.map +1 -1
- package/lib-commonjs/platform/index.js +6 -29
- package/lib-commonjs/platform/index.js.map +1 -1
- package/package.json +24 -23
- package/src/platform/index.ts +1 -1
- package/eslint.config.js +0 -3
|
@@ -5,6 +5,6 @@ import { getBaselinePlatformTheme } from '../BaselinePlatformDefaults';
|
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export function createPlatformThemeRegistry(_themeId, _module) {
|
|
8
|
-
|
|
8
|
+
return createThemeRegistry(getBaselinePlatformTheme(), resolvePartialTheme);
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=PlatformDefaults.js.map
|
|
10
|
+
//# sourceMappingURL=PlatformDefaults.js.map
|
|
@@ -2,11 +2,5 @@ import type { IThemingModuleHelper } from '../NativeModule';
|
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated
|
|
4
4
|
*/
|
|
5
|
-
export declare function createPlatformThemeRegistry(
|
|
6
|
-
|
|
7
|
-
module?: IThemingModuleHelper,
|
|
8
|
-
): import('@uifabricshared/theme-registry').IThemeRegistry<
|
|
9
|
-
import('@fluentui-react-native/theme-types').Theme,
|
|
10
|
-
import('@fluentui-react-native/theme-types').PartialTheme
|
|
11
|
-
>;
|
|
12
|
-
//# sourceMappingURL=PlatformDefaults.native.d.ts.map
|
|
5
|
+
export declare function createPlatformThemeRegistry(platformThemeId?: string, module?: IThemingModuleHelper): import("@uifabricshared/theme-registry").IThemeRegistry<import("@fluentui-react-native/theme-types").Theme, import("@fluentui-react-native/theme-types").PartialTheme>;
|
|
6
|
+
//# sourceMappingURL=PlatformDefaults.native.d.ts.map
|
|
@@ -5,10 +5,10 @@ import { ThemingModuleHelper } from '../NativeModule';
|
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export function createPlatformThemeRegistry(platformThemeId, module = ThemingModuleHelper) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const registry = createThemeRegistry(module.getPlatformDefaults(platformThemeId), resolvePartialTheme);
|
|
9
|
+
module.addListener(() => {
|
|
10
|
+
registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
|
|
11
|
+
});
|
|
12
|
+
return registry;
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=PlatformDefaults.native.js.map
|
|
14
|
+
//# sourceMappingURL=PlatformDefaults.native.js.map
|
package/lib/platform/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { createPlatformThemeRegistry } from './PlatformDefaults';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC"}
|
package/lib/platform/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { createPlatformThemeRegistry } from './PlatformDefaults';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBaselinePlatformTheme = getBaselinePlatformTheme;
|
|
4
|
-
const default_theme_1 = require(
|
|
4
|
+
const default_theme_1 = require("@fluentui-react-native/default-theme");
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated
|
|
7
7
|
*/
|
|
8
8
|
function getBaselinePlatformTheme() {
|
|
9
|
-
|
|
9
|
+
return default_theme_1.defaultFluentTheme;
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=BaselinePlatformDefaults.js.map
|
|
11
|
+
//# sourceMappingURL=BaselinePlatformDefaults.js.map
|
package/lib-commonjs/Global.d.ts
CHANGED
package/lib-commonjs/Global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getThemeRegistry = getThemeRegistry;
|
|
4
4
|
exports.setThemeRegistry = setThemeRegistry;
|
|
5
5
|
exports.setTheme = setTheme;
|
|
@@ -7,7 +7,7 @@ exports.addThemeRegistryListener = addThemeRegistryListener;
|
|
|
7
7
|
exports.removeThemeRegistryListener = removeThemeRegistryListener;
|
|
8
8
|
exports.getTheme = getTheme;
|
|
9
9
|
exports.augmentPlatformTheme = augmentPlatformTheme;
|
|
10
|
-
const platform_1 = require(
|
|
10
|
+
const platform_1 = require("./platform");
|
|
11
11
|
let _registry;
|
|
12
12
|
/**
|
|
13
13
|
* Ensure that `_registry` is set. If not, create it using a native module to
|
|
@@ -15,10 +15,10 @@ let _registry;
|
|
|
15
15
|
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
function getThemeRegistry() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
if (!_registry) {
|
|
19
|
+
_registry = (0, platform_1.createPlatformThemeRegistry)();
|
|
20
|
+
}
|
|
21
|
+
return _registry;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Set the global theme registry.
|
|
@@ -32,7 +32,7 @@ function getThemeRegistry() {
|
|
|
32
32
|
* @deprecated
|
|
33
33
|
*/
|
|
34
34
|
function setThemeRegistry(registry) {
|
|
35
|
-
|
|
35
|
+
_registry = registry;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Create or update a theme definition
|
|
@@ -42,7 +42,7 @@ function setThemeRegistry(registry) {
|
|
|
42
42
|
* @deprecated
|
|
43
43
|
*/
|
|
44
44
|
function setTheme(definition, name, parent) {
|
|
45
|
-
|
|
45
|
+
return getThemeRegistry().setTheme(definition, name, parent);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Register a theme event listener
|
|
@@ -50,7 +50,7 @@ function setTheme(definition, name, parent) {
|
|
|
50
50
|
* @deprecated
|
|
51
51
|
*/
|
|
52
52
|
function addThemeRegistryListener(listener) {
|
|
53
|
-
|
|
53
|
+
return getThemeRegistry().addEventListener(listener);
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Unregister a theme event listener
|
|
@@ -58,7 +58,7 @@ function addThemeRegistryListener(listener) {
|
|
|
58
58
|
* @deprecated
|
|
59
59
|
*/
|
|
60
60
|
function removeThemeRegistryListener(listener) {
|
|
61
|
-
|
|
61
|
+
return getThemeRegistry().removeEventListener(listener);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Get a theme by name
|
|
@@ -66,7 +66,7 @@ function removeThemeRegistryListener(listener) {
|
|
|
66
66
|
* @deprecated
|
|
67
67
|
*/
|
|
68
68
|
function getTheme(name) {
|
|
69
|
-
|
|
69
|
+
return getThemeRegistry().getTheme(name);
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* This will update the platform theme. This is primarily exposed for clients to add custom lookup values to palettes or to
|
|
@@ -77,6 +77,6 @@ function getTheme(name) {
|
|
|
77
77
|
* @deprecated
|
|
78
78
|
*/
|
|
79
79
|
function augmentPlatformTheme(definition) {
|
|
80
|
-
|
|
80
|
+
getThemeRegistry().updatePlatformDefaults(definition);
|
|
81
81
|
}
|
|
82
|
-
//# sourceMappingURL=Global.js.map
|
|
82
|
+
//# sourceMappingURL=Global.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @deprecated
|
|
3
3
|
*/
|
|
4
|
-
export declare const ThemingModuleHelper: import(
|
|
5
|
-
//# sourceMappingURL=ThemingModule.d.ts.map
|
|
4
|
+
export declare const ThemingModuleHelper: import("./ThemingModule.types").IThemingModuleHelper;
|
|
5
|
+
//# sourceMappingURL=ThemingModule.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ThemingModuleHelper = void 0;
|
|
4
|
-
const win32_theme_1 = require(
|
|
5
|
-
const ThemingModuleHelpers_1 = require(
|
|
4
|
+
const win32_theme_1 = require("@fluentui-react-native/win32-theme");
|
|
5
|
+
const ThemingModuleHelpers_1 = require("./ThemingModuleHelpers");
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated
|
|
8
8
|
*/
|
|
9
9
|
exports.ThemingModuleHelper = (0, ThemingModuleHelpers_1.createThemingModuleHelper)(...(0, win32_theme_1.getThemingModule)());
|
|
10
|
-
//# sourceMappingURL=ThemingModule.js.map
|
|
10
|
+
//# sourceMappingURL=ThemingModule.js.map
|
|
@@ -5,7 +5,7 @@ import type { ITheme, IPartialTheme, OfficePalette as IOfficePalette } from '@ui
|
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
export interface IEventEmitter {
|
|
8
|
-
|
|
8
|
+
addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated
|
|
@@ -15,21 +15,21 @@ export type IPlatformThemeDefinition = IPartialTheme | IProcessTheme<ITheme, IPa
|
|
|
15
15
|
* @deprecated
|
|
16
16
|
*/
|
|
17
17
|
export interface IThemingModuleHelper {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* @deprecated
|
|
31
31
|
*/
|
|
32
32
|
export type IHostSettingsWin32 = {
|
|
33
|
-
|
|
33
|
+
palette: IOfficePalette;
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=ThemingModule.types.d.ts.map
|
|
35
|
+
//# sourceMappingURL=ThemingModule.types.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
//# sourceMappingURL=ThemingModule.types.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=ThemingModule.types.js.map
|
|
@@ -2,20 +2,15 @@ import type { OfficeThemingModule } from '@fluentui-react-native/win32-theme';
|
|
|
2
2
|
import type { OfficePalette } from '@uifabricshared/theming-ramp';
|
|
3
3
|
import type { IThemingModuleHelper, IEventEmitter } from './ThemingModule.types';
|
|
4
4
|
type PaletteCache = {
|
|
5
|
-
|
|
5
|
+
[key: string]: OfficePalette;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* @deprecated
|
|
9
9
|
*/
|
|
10
|
-
export declare function translateOfficeTheme(
|
|
11
|
-
module: OfficeThemingModule,
|
|
12
|
-
cache: PaletteCache,
|
|
13
|
-
id?: string,
|
|
14
|
-
themeName?: string,
|
|
15
|
-
): import('@uifabricshared/theming-ramp').IPartialTheme;
|
|
10
|
+
export declare function translateOfficeTheme(module: OfficeThemingModule, cache: PaletteCache, id?: string, themeName?: string): import("@uifabricshared/theming-ramp").IPartialTheme;
|
|
16
11
|
/**
|
|
17
12
|
* @deprecated
|
|
18
13
|
*/
|
|
19
14
|
export declare function createThemingModuleHelper(themingModule?: OfficeThemingModule, emitter?: IEventEmitter): IThemingModuleHelper;
|
|
20
15
|
export {};
|
|
21
|
-
//# sourceMappingURL=ThemingModuleHelpers.d.ts.map
|
|
16
|
+
//# sourceMappingURL=ThemingModuleHelpers.d.ts.map
|
|
@@ -1,64 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.translateOfficeTheme = translateOfficeTheme;
|
|
4
4
|
exports.createThemingModuleHelper = createThemingModuleHelper;
|
|
5
|
-
const win32_theme_1 = require(
|
|
6
|
-
const theming_ramp_1 = require(
|
|
7
|
-
const BaselinePlatformDefaults_1 = require(
|
|
5
|
+
const win32_theme_1 = require("@fluentui-react-native/win32-theme");
|
|
6
|
+
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
7
|
+
const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
|
|
8
8
|
function isException(palette) {
|
|
9
|
-
|
|
9
|
+
return palette.message !== undefined;
|
|
10
10
|
}
|
|
11
11
|
function updatePaletteInCache(module, cache, palette) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const paletteValue = module.getPalette(palette);
|
|
13
|
+
if (!isException(paletteValue)) {
|
|
14
|
+
cache[palette] = paletteValue;
|
|
15
|
+
}
|
|
16
16
|
}
|
|
17
17
|
const getPaletteCacheKey = (palette) => {
|
|
18
|
-
|
|
18
|
+
return palette || 'WhiteColors';
|
|
19
19
|
};
|
|
20
20
|
function ensurePalette(module, paletteCache, palette) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const key = getPaletteCacheKey(palette);
|
|
22
|
+
if (!paletteCache[key]) {
|
|
23
|
+
updatePaletteInCache(module, paletteCache, key);
|
|
24
|
+
}
|
|
25
|
+
return paletteCache[key] || {};
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated
|
|
29
29
|
*/
|
|
30
30
|
function translateOfficeTheme(module, cache, id, themeName) {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const palette = ensurePalette(module, cache, id);
|
|
32
|
+
return (0, win32_theme_1.createPartialOfficeTheme)(module, themeName, palette);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* @deprecated
|
|
36
36
|
*/
|
|
37
37
|
function createThemingModuleHelper(themingModule, emitter) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
emitter && emitter.addListener('onPlatformDefaultsChanged', callback);
|
|
61
|
-
},
|
|
62
|
-
};
|
|
38
|
+
themingModule || console.error('No NativeModule for Theming found');
|
|
39
|
+
const paletteCache = {};
|
|
40
|
+
let _hostTheme = themingModule.getConstants().initialHostThemeSetting || '';
|
|
41
|
+
emitter &&
|
|
42
|
+
emitter.addListener('onPlatformDefaultsChanged', (args) => {
|
|
43
|
+
_hostTheme = (args && args.hostThemeSetting) || _hostTheme;
|
|
44
|
+
Object.keys(paletteCache).forEach((key) => delete paletteCache[key]);
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
getPlatformDefaults: (themeId) => {
|
|
48
|
+
return (0, theming_ramp_1.resolvePartialTheme)((0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(), translateOfficeTheme(themingModule, paletteCache, themeId, _hostTheme));
|
|
49
|
+
},
|
|
50
|
+
getPlatformThemeDefinition: (themeId) => {
|
|
51
|
+
return (_parent) => {
|
|
52
|
+
updatePaletteInCache(themingModule, paletteCache, themeId);
|
|
53
|
+
return translateOfficeTheme(themingModule, paletteCache, themeId);
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
addListener: (callback) => {
|
|
57
|
+
emitter && emitter.addListener('onPlatformDefaultsChanged', callback);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
63
60
|
}
|
|
64
|
-
//# sourceMappingURL=ThemingModuleHelpers.js.map
|
|
61
|
+
//# sourceMappingURL=ThemingModuleHelpers.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHostSettingsWin32 = getHostSettingsWin32;
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
function getHostSettingsWin32(theme) {
|
|
8
|
-
|
|
8
|
+
return theme.host?.palette ? theme.host : undefined;
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=getHostSettings.js.map
|
|
10
|
+
//# sourceMappingURL=getHostSettings.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ThemingModuleHelper } from './ThemingModule';
|
|
2
2
|
export type { IEventEmitter, IPlatformThemeDefinition, IThemingModuleHelper, IHostSettingsWin32 } from './ThemingModule.types';
|
|
3
3
|
export { getHostSettingsWin32 } from './getHostSettings';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHostSettingsWin32 = exports.ThemingModuleHelper = void 0;
|
|
4
|
-
const ThemingModule_1 = require(
|
|
5
|
-
Object.defineProperty(exports,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
const getHostSettings_1 = require('./getHostSettings');
|
|
12
|
-
Object.defineProperty(exports, 'getHostSettingsWin32', {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return getHostSettings_1.getHostSettingsWin32;
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
4
|
+
const ThemingModule_1 = require("./ThemingModule");
|
|
5
|
+
Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return ThemingModule_1.ThemingModuleHelper; } });
|
|
6
|
+
const getHostSettings_1 = require("./getHostSettings");
|
|
7
|
+
Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return getHostSettings_1.getHostSettingsWin32; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
//# sourceMappingURL=Theme.types.js.map
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=Theme.types.js.map
|
|
@@ -1,73 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
(Object.create
|
|
25
|
-
? function (o, v) {
|
|
26
|
-
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
27
|
-
}
|
|
28
|
-
: function (o, v) {
|
|
29
|
-
o['default'] = v;
|
|
30
|
-
});
|
|
31
|
-
var __importStar =
|
|
32
|
-
(this && this.__importStar) ||
|
|
33
|
-
(function () {
|
|
34
|
-
var ownKeys = function (o) {
|
|
35
|
-
ownKeys =
|
|
36
|
-
Object.getOwnPropertyNames ||
|
|
37
|
-
function (o) {
|
|
38
|
-
var ar = [];
|
|
39
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
40
|
-
return ar;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
41
24
|
};
|
|
42
|
-
|
|
25
|
+
return ownKeys(o);
|
|
43
26
|
};
|
|
44
27
|
return function (mod) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
50
33
|
};
|
|
51
|
-
|
|
52
|
-
Object.defineProperty(exports,
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
36
|
exports.useThemeRegistry = exports.ThemeRegistryContext = exports.useTheme = exports.ThemeContext = void 0;
|
|
54
|
-
const React = __importStar(require(
|
|
37
|
+
const React = __importStar(require("react"));
|
|
55
38
|
/**
|
|
56
39
|
* @deprecated
|
|
57
40
|
*/
|
|
58
|
-
const theming_ramp_1 = require(
|
|
59
|
-
Object.defineProperty(exports,
|
|
60
|
-
|
|
61
|
-
get: function () {
|
|
62
|
-
return theming_ramp_1.ThemeContext;
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
Object.defineProperty(exports, 'useTheme', {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return theming_ramp_1.useTheme;
|
|
69
|
-
},
|
|
70
|
-
});
|
|
41
|
+
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
42
|
+
Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return theming_ramp_1.ThemeContext; } });
|
|
43
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return theming_ramp_1.useTheme; } });
|
|
71
44
|
/**
|
|
72
45
|
* @deprecated
|
|
73
46
|
*/
|
|
@@ -77,4 +50,4 @@ exports.ThemeRegistryContext = React.createContext(undefined);
|
|
|
77
50
|
*/
|
|
78
51
|
const useThemeRegistry = () => React.useContext(exports.ThemeRegistryContext);
|
|
79
52
|
exports.useThemeRegistry = useThemeRegistry;
|
|
80
|
-
//# sourceMappingURL=ThemeContext.js.map
|
|
53
|
+
//# sourceMappingURL=ThemeContext.js.map
|