@uifabricshared/theming-react-native 0.21.1 → 0.21.4
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/.cache/tsconfig.tsbuildinfo +1 -0
- package/CHANGELOG.md +41 -0
- package/config/pre-copy.json +1 -1
- package/jest/setup.js +1 -1
- package/lib/BaselinePlatformDefaults.js.map +1 -1
- package/lib/Global.js.map +1 -1
- package/lib/NativeModule/ThemingModuleHelpers.js.map +1 -1
- package/lib/NativeModule/getHostSettings.js.map +1 -1
- package/lib/ThemeLayer.d.ts.map +1 -1
- package/lib/ThemeLayer.js.map +1 -1
- package/lib/ThemeProvider.js.map +1 -1
- package/lib/platform/PlatformDefaults.js.map +1 -1
- package/lib/platform/PlatformDefaults.native.js.map +1 -1
- package/lib/platform/index.d.ts +1 -1
- package/lib/platform/index.d.ts.map +1 -1
- package/lib/platform/index.js +1 -1
- package/lib/platform/index.js.map +1 -1
- package/package.json +20 -26
- package/src/ThemeLayer.tsx +2 -2
- package/src/platform/index.ts +1 -1
- package/eslint.config.js +0 -3
- package/lib-commonjs/BaselinePlatformDefaults.d.ts +0 -6
- package/lib-commonjs/BaselinePlatformDefaults.d.ts.map +0 -1
- package/lib-commonjs/BaselinePlatformDefaults.js +0 -11
- package/lib-commonjs/BaselinePlatformDefaults.js.map +0 -1
- package/lib-commonjs/Global.d.ts +0 -56
- package/lib-commonjs/Global.d.ts.map +0 -1
- package/lib-commonjs/Global.js +0 -82
- package/lib-commonjs/Global.js.map +0 -1
- package/lib-commonjs/NativeModule/ThemingModule.d.ts +0 -5
- package/lib-commonjs/NativeModule/ThemingModule.d.ts.map +0 -1
- package/lib-commonjs/NativeModule/ThemingModule.js +0 -10
- package/lib-commonjs/NativeModule/ThemingModule.js.map +0 -1
- package/lib-commonjs/NativeModule/ThemingModule.types.d.ts +0 -35
- package/lib-commonjs/NativeModule/ThemingModule.types.d.ts.map +0 -1
- package/lib-commonjs/NativeModule/ThemingModule.types.js +0 -3
- package/lib-commonjs/NativeModule/ThemingModule.types.js.map +0 -1
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts +0 -16
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.d.ts.map +0 -1
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js +0 -61
- package/lib-commonjs/NativeModule/ThemingModuleHelpers.js.map +0 -1
- package/lib-commonjs/NativeModule/getHostSettings.d.ts +0 -6
- package/lib-commonjs/NativeModule/getHostSettings.d.ts.map +0 -1
- package/lib-commonjs/NativeModule/getHostSettings.js +0 -10
- package/lib-commonjs/NativeModule/getHostSettings.js.map +0 -1
- package/lib-commonjs/NativeModule/index.d.ts +0 -4
- package/lib-commonjs/NativeModule/index.d.ts.map +0 -1
- package/lib-commonjs/NativeModule/index.js +0 -8
- package/lib-commonjs/NativeModule/index.js.map +0 -1
- package/lib-commonjs/Theme.types.d.ts +0 -15
- package/lib-commonjs/Theme.types.d.ts.map +0 -1
- package/lib-commonjs/Theme.types.js +0 -3
- package/lib-commonjs/Theme.types.js.map +0 -1
- package/lib-commonjs/ThemeContext.d.ts +0 -15
- package/lib-commonjs/ThemeContext.d.ts.map +0 -1
- package/lib-commonjs/ThemeContext.js +0 -53
- package/lib-commonjs/ThemeContext.js.map +0 -1
- package/lib-commonjs/ThemeLayer.d.ts +0 -62
- package/lib-commonjs/ThemeLayer.d.ts.map +0 -1
- package/lib-commonjs/ThemeLayer.js +0 -111
- package/lib-commonjs/ThemeLayer.js.map +0 -1
- package/lib-commonjs/ThemeProvider.d.ts +0 -8
- package/lib-commonjs/ThemeProvider.d.ts.map +0 -1
- package/lib-commonjs/ThemeProvider.js +0 -68
- package/lib-commonjs/ThemeProvider.js.map +0 -1
- package/lib-commonjs/ThemeProvider.types.d.ts +0 -9
- package/lib-commonjs/ThemeProvider.types.d.ts.map +0 -1
- package/lib-commonjs/ThemeProvider.types.js +0 -4
- package/lib-commonjs/ThemeProvider.types.js.map +0 -1
- package/lib-commonjs/index.d.ts +0 -42
- package/lib-commonjs/index.d.ts.map +0 -1
- package/lib-commonjs/index.js +0 -39
- package/lib-commonjs/index.js.map +0 -1
- package/lib-commonjs/platform/PlatformDefaults.d.ts +0 -6
- package/lib-commonjs/platform/PlatformDefaults.d.ts.map +0 -1
- package/lib-commonjs/platform/PlatformDefaults.js +0 -13
- package/lib-commonjs/platform/PlatformDefaults.js.map +0 -1
- package/lib-commonjs/platform/PlatformDefaults.native.d.ts +0 -6
- package/lib-commonjs/platform/PlatformDefaults.native.d.ts.map +0 -1
- package/lib-commonjs/platform/PlatformDefaults.native.js +0 -17
- package/lib-commonjs/platform/PlatformDefaults.native.js.map +0 -1
- package/lib-commonjs/platform/index.d.ts +0 -2
- package/lib-commonjs/platform/index.d.ts.map +0 -1
- package/lib-commonjs/platform/index.js +0 -18
- package/lib-commonjs/platform/index.js.map +0 -1
|
@@ -1,111 +0,0 @@
|
|
|
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;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
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;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ThemeLayer = void 0;
|
|
37
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
const React = __importStar(require("react"));
|
|
39
|
-
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
40
|
-
const Global_1 = require("./Global");
|
|
41
|
-
/**
|
|
42
|
-
* Multipurpose theme provider. This can run in provider/consumer mode and pure consumer mode.
|
|
43
|
-
*
|
|
44
|
-
* In pure consumer mode the usage is as follows:
|
|
45
|
-
* ```
|
|
46
|
-
* <ThemeLayer>{(theme: ITheme) => {
|
|
47
|
-
* return (<MyComponent style={someStyleFn(theme, 'stylename')}/>);
|
|
48
|
-
* }}</ThemeLayer>
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* In provider/consumer mode a themeName will be specified:
|
|
52
|
-
* ```
|
|
53
|
-
* <ThemeLayer themeName='myTheme'>{(theme: ITheme) => {
|
|
54
|
-
* return (
|
|
55
|
-
* <View>
|
|
56
|
-
* <MySmartComponent/>
|
|
57
|
-
* <MyComponent style={someStyleFn(theme, 'stylename')}/>
|
|
58
|
-
* </View>
|
|
59
|
-
* );
|
|
60
|
-
* }}</ThemeLayer>
|
|
61
|
-
* ```
|
|
62
|
-
* The work of registering for updates will be done automatically. The highest level `ThemeLayer` in
|
|
63
|
-
* consumer mode will automatically register and act like a provider to ensure renders happen on theme
|
|
64
|
-
* change
|
|
65
|
-
* @deprecated
|
|
66
|
-
*/
|
|
67
|
-
class ThemeLayer extends React.Component {
|
|
68
|
-
/**
|
|
69
|
-
* stores the name of the theme if in provider mode. Existence of this string is tied to registration
|
|
70
|
-
* and is used to signal registration and unregistration
|
|
71
|
-
*/
|
|
72
|
-
_registeredTheme;
|
|
73
|
-
/** handler for theme changes, conditionally will force update */
|
|
74
|
-
onInvalidate = (name) => {
|
|
75
|
-
// only force updates if this theme was the one invalidated
|
|
76
|
-
if (name === this._registeredTheme) {
|
|
77
|
-
this.forceUpdate();
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
/** standard cleanup handler to ensure we unregister */
|
|
81
|
-
componentWillUnmount() {
|
|
82
|
-
if (this._registeredTheme !== undefined) {
|
|
83
|
-
(0, Global_1.removeThemeRegistryListener)(this);
|
|
84
|
-
this._registeredTheme = undefined;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
render() {
|
|
88
|
-
let themeName = this.props.themeName;
|
|
89
|
-
return (jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Consumer, { children: (theme) => {
|
|
90
|
-
// go to provider mode if a themeName is specified or if this is the first consumer and the context
|
|
91
|
-
// is undefined.
|
|
92
|
-
if (themeName !== undefined || theme === undefined) {
|
|
93
|
-
themeName = themeName || '';
|
|
94
|
-
this._ensureCallbackRegistration(themeName);
|
|
95
|
-
theme = (0, Global_1.getTheme)(themeName);
|
|
96
|
-
return jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Provider, { value: theme, children: this.props.children(theme) });
|
|
97
|
-
}
|
|
98
|
-
// otherwise in consumer mode just push the current theme to the children
|
|
99
|
-
return this.props.children(theme);
|
|
100
|
-
} }));
|
|
101
|
-
}
|
|
102
|
-
/** helper to register if this is the first time and to update the filter if necessary */
|
|
103
|
-
_ensureCallbackRegistration = (themeName) => {
|
|
104
|
-
if (this._registeredTheme === undefined) {
|
|
105
|
-
(0, Global_1.addThemeRegistryListener)(this);
|
|
106
|
-
}
|
|
107
|
-
this._registeredTheme = themeName;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
exports.ThemeLayer = ThemeLayer;
|
|
111
|
-
//# sourceMappingURL=ThemeLayer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeLayer.js","sourceRoot":"","sources":["../src/ThemeLayer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B,+DAA4D;AAE5D,qCAA2F;AAuB3F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,gBAAwB,SAAQ,KAAK,CAAC,SAA2B;IAC/D;;;OAGG;IACK,gBAAgB,CAAqB;IAE7C,iEAAiE;IAC1D,YAAY,GAAwC,CAAC,IAAY,EAAE,EAAE,CAAC;QAC3E,2DAA2D;QAC3D,IAAI,IAAI,KAAK,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACnC,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC;IAAA,CACF,CAAC;IAEF,uDAAuD;IAChD,oBAAoB,GAAS;QAClC,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxC,IAAA,oCAA2B,EAAC,IAAI,CAAC,CAAC;YAClC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QACpC,CAAC;IAAA,CACF;IAEM,MAAM,GAAoB;QAC/B,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACrC,OAAO,CACL,kBAAC,2BAAY,CAAC,QAAQ,cACnB,CAAC,KAAc,EAAE,EAAE,CAAC;gBACnB,mGAAmG;gBACnG,gBAAgB;gBAChB,IAAI,SAAS,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;oBACnD,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;oBAC5B,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;oBAC5C,KAAK,GAAG,IAAA,iBAAQ,EAAC,SAAS,CAAC,CAAC;oBAC5B,OAAO,kBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAyB,CAAC;gBACnG,CAAC;gBACD,yEAAyE;gBACzE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAAA,CACnC,GACqB,CACzB,CAAC;IAAA,CACH;IAED,yFAAyF;IACjF,2BAA2B,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC;QAC3D,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACxC,IAAA,iCAAwB,EAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAAA,CACnC,CAAC;CACH"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { IThemeProviderProps } from './ThemeProvider.types';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Use ThemeProvider from @fluentui-react-native/theme instead.
|
|
5
|
-
* See https://github.com/microsoft/fluentui-react-native/blob/main/docs/pages/Guides/UpdateThemeProvider.md for details
|
|
6
|
-
*/
|
|
7
|
-
export declare const ThemeProvider: React.FunctionComponent<IThemeProviderProps>;
|
|
8
|
-
//# 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;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CA6BtE,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
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;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
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;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ThemeProvider = void 0;
|
|
37
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
const React = __importStar(require("react"));
|
|
39
|
-
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
40
|
-
const Global_1 = require("./Global");
|
|
41
|
-
const ThemeContext_1 = require("./ThemeContext");
|
|
42
|
-
/**
|
|
43
|
-
* @deprecated Use ThemeProvider from @fluentui-react-native/theme instead.
|
|
44
|
-
* See https://github.com/microsoft/fluentui-react-native/blob/main/docs/pages/Guides/UpdateThemeProvider.md for details
|
|
45
|
-
*/
|
|
46
|
-
const ThemeProvider = (props) => {
|
|
47
|
-
const { registry: registryFromProps, theme: themeName = '', children } = props;
|
|
48
|
-
const defaultRegistry = (0, ThemeContext_1.useThemeRegistry)();
|
|
49
|
-
const registryToUse = registryFromProps || defaultRegistry || (0, Global_1.getThemeRegistry)();
|
|
50
|
-
const [theme, setThemeState] = React.useState(registryToUse.getTheme(themeName));
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
setThemeState(registryToUse.getTheme(themeName));
|
|
53
|
-
const themeInvalidater = {
|
|
54
|
-
onInvalidate: (name) => {
|
|
55
|
-
name === themeName && setThemeState(registryToUse.getTheme(themeName));
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
registryToUse.addEventListener(themeInvalidater);
|
|
59
|
-
return () => {
|
|
60
|
-
registryToUse.removeEventListener(themeInvalidater);
|
|
61
|
-
};
|
|
62
|
-
}, [registryToUse, themeName, setThemeState]);
|
|
63
|
-
const themeProvider = jsx_runtime_1.jsx(theming_ramp_1.ThemeContext.Provider, { value: theme, children: children });
|
|
64
|
-
// note `registryFromProps` came from props and it's not the same as `registryToUse`
|
|
65
|
-
return registryFromProps ? (jsx_runtime_1.jsx(ThemeContext_1.ThemeRegistryContext.Provider, { value: registryFromProps, children: themeProvider })) : (themeProvider);
|
|
66
|
-
};
|
|
67
|
-
exports.ThemeProvider = ThemeProvider;
|
|
68
|
-
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,KAAK,kCAAc;AAG/B,+DAA4D;AAE5D,qCAA4C;AAC5C,iDAAwE;AAGxE;;;GAGG;AACI,MAAM,aAAa,GAAiD,CAAC,KAA0B,EAAE,EAAE,CAAC;IACzG,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC/E,MAAM,eAAe,GAAG,IAAA,+BAAgB,GAAE,CAAC;IAC3C,MAAM,aAAa,GAAG,iBAAiB,IAAI,eAAe,IAAI,IAAA,yBAAgB,GAAE,CAAC;IACjF,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAEjF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACpB,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjD,MAAM,gBAAgB,GAAwB;YAC5C,YAAY,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC;gBAC9B,IAAI,KAAK,SAAS,IAAI,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;YAAA,CACxE;SACF,CAAC;QAEF,aAAa,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO,GAAG,EAAE,CAAC;YACX,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;QAAA,CACrD,CAAC;IAAA,CACH,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9C,MAAM,aAAa,GAAG,kBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;IAE9F,oFAAoF;IACpF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,kBAAC,mCAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,iBAAiB,YAAG,aAAa,GAAiC,CACzG,CAAC,CAAC,CAAC,CACF,aAAa,CACd,CAAC;AAAA,CACH,CAAC;AA7BW,QAAA,aAAa,GAAb,aAAa,CA6BxB"}
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.types.js","sourceRoot":"","sources":["../src/ThemeProvider.types.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
|
package/lib-commonjs/index.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated
|
|
3
|
-
*/
|
|
4
|
-
export { addThemeRegistryListener, removeThemeRegistryListener, setTheme, getTheme, augmentPlatformTheme } from './Global';
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
*/
|
|
8
|
-
export type { IPartialTheme, ITheme } from './Theme.types';
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
*/
|
|
12
|
-
export type { IThemeDefinition, ThemeRegistry } from './Theme.types';
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated
|
|
15
|
-
*/
|
|
16
|
-
export type { IThemeLayerProps } from './ThemeLayer';
|
|
17
|
-
export { ThemeLayer } from './ThemeLayer';
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated
|
|
20
|
-
*/
|
|
21
|
-
export { createPlatformThemeRegistry } from './platform';
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated
|
|
24
|
-
*/
|
|
25
|
-
export { ThemeProvider } from './ThemeProvider';
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated
|
|
28
|
-
*/
|
|
29
|
-
export type { IThemeProviderProps } from './ThemeProvider.types';
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated
|
|
32
|
-
*/
|
|
33
|
-
export { ThemeContext, ThemeRegistryContext, useTheme, useThemeRegistry } from './ThemeContext';
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated
|
|
36
|
-
*/
|
|
37
|
-
export { ThemingModuleHelper, getHostSettingsWin32 } from './NativeModule';
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated
|
|
40
|
-
*/
|
|
41
|
-
export type { IEventEmitter, IHostSettingsWin32, IPlatformThemeDefinition, IThemingModuleHelper } from './NativeModule';
|
|
42
|
-
//# 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,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3D;;GAEG;AACH,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACrE;;GAEG;AACH,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C;;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-commonjs/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHostSettingsWin32 = exports.ThemingModuleHelper = exports.useThemeRegistry = exports.useTheme = exports.ThemeRegistryContext = exports.ThemeContext = exports.ThemeProvider = exports.createPlatformThemeRegistry = exports.ThemeLayer = exports.augmentPlatformTheme = exports.getTheme = exports.setTheme = exports.removeThemeRegistryListener = exports.addThemeRegistryListener = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated
|
|
6
|
-
*/
|
|
7
|
-
const Global_1 = require("./Global");
|
|
8
|
-
Object.defineProperty(exports, "addThemeRegistryListener", { enumerable: true, get: function () { return Global_1.addThemeRegistryListener; } });
|
|
9
|
-
Object.defineProperty(exports, "removeThemeRegistryListener", { enumerable: true, get: function () { return Global_1.removeThemeRegistryListener; } });
|
|
10
|
-
Object.defineProperty(exports, "setTheme", { enumerable: true, get: function () { return Global_1.setTheme; } });
|
|
11
|
-
Object.defineProperty(exports, "getTheme", { enumerable: true, get: function () { return Global_1.getTheme; } });
|
|
12
|
-
Object.defineProperty(exports, "augmentPlatformTheme", { enumerable: true, get: function () { return Global_1.augmentPlatformTheme; } });
|
|
13
|
-
const ThemeLayer_1 = require("./ThemeLayer");
|
|
14
|
-
Object.defineProperty(exports, "ThemeLayer", { enumerable: true, get: function () { return ThemeLayer_1.ThemeLayer; } });
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
|
-
const platform_1 = require("./platform");
|
|
19
|
-
Object.defineProperty(exports, "createPlatformThemeRegistry", { enumerable: true, get: function () { return platform_1.createPlatformThemeRegistry; } });
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated
|
|
22
|
-
*/
|
|
23
|
-
const ThemeProvider_1 = require("./ThemeProvider");
|
|
24
|
-
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated
|
|
27
|
-
*/
|
|
28
|
-
const ThemeContext_1 = require("./ThemeContext");
|
|
29
|
-
Object.defineProperty(exports, "ThemeContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeContext; } });
|
|
30
|
-
Object.defineProperty(exports, "ThemeRegistryContext", { enumerable: true, get: function () { return ThemeContext_1.ThemeRegistryContext; } });
|
|
31
|
-
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeContext_1.useTheme; } });
|
|
32
|
-
Object.defineProperty(exports, "useThemeRegistry", { enumerable: true, get: function () { return ThemeContext_1.useThemeRegistry; } });
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated
|
|
35
|
-
*/
|
|
36
|
-
const NativeModule_1 = require("./NativeModule");
|
|
37
|
-
Object.defineProperty(exports, "ThemingModuleHelper", { enumerable: true, get: function () { return NativeModule_1.ThemingModuleHelper; } });
|
|
38
|
-
Object.defineProperty(exports, "getHostSettingsWin32", { enumerable: true, get: function () { return NativeModule_1.getHostSettingsWin32; } });
|
|
39
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,qCAA2H;AAAlH,kHAAA,wBAAwB,OAAA;AAAE,qHAAA,2BAA2B,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,kGAAA,QAAQ,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAaxG,6CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB;;GAEG;AACH,yCAAyD;AAAhD,uHAAA,2BAA2B,OAAA;AACpC;;GAEG;AACH,mDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAKtB;;GAEG;AACH,iDAAgG;AAAvF,4GAAA,YAAY,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AACvE;;GAEG;AACH,iDAA2E;AAAlE,mHAAA,mBAAmB,OAAA;AAAE,oHAAA,oBAAoB,OAAA"}
|
|
@@ -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,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
|
|
4
|
-
const theme_registry_1 = require("@uifabricshared/theme-registry");
|
|
5
|
-
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
6
|
-
const BaselinePlatformDefaults_1 = require("../BaselinePlatformDefaults");
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
function createPlatformThemeRegistry(_themeId, _module) {
|
|
11
|
-
return (0, theme_registry_1.createThemeRegistry)((0, BaselinePlatformDefaults_1.getBaselinePlatformTheme)(), theming_ramp_1.resolvePartialTheme);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=PlatformDefaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformDefaults.js","sourceRoot":"","sources":["../../src/platform/PlatformDefaults.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,+DAAmE;AAEnE,0EAAuE;AAGvE;;GAEG;AACH,qCAA4C,QAAiB,EAAE,OAA8B,EAAE;IAC7F,OAAO,IAAA,oCAAmB,EAAC,IAAA,mDAAwB,GAAE,EAAE,kCAAmB,CAAC,CAAC;AAAA,CAC7E"}
|
|
@@ -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,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPlatformThemeRegistry = createPlatformThemeRegistry;
|
|
4
|
-
const theme_registry_1 = require("@uifabricshared/theme-registry");
|
|
5
|
-
const theming_ramp_1 = require("@uifabricshared/theming-ramp");
|
|
6
|
-
const NativeModule_1 = require("../NativeModule");
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
*/
|
|
10
|
-
function createPlatformThemeRegistry(platformThemeId, module = NativeModule_1.ThemingModuleHelper) {
|
|
11
|
-
const registry = (0, theme_registry_1.createThemeRegistry)(module.getPlatformDefaults(platformThemeId), theming_ramp_1.resolvePartialTheme);
|
|
12
|
-
module.addListener(() => {
|
|
13
|
-
registry.updatePlatformDefaults(module.getPlatformDefaults(platformThemeId));
|
|
14
|
-
});
|
|
15
|
-
return registry;
|
|
16
|
-
}
|
|
17
|
-
//# 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,mEAAqE;AACrE,+DAAmE;AAGnE,kDAAsD;AAEtD;;GAEG;AACH,qCAA4C,eAAwB,EAAE,MAAM,GAAyB,kCAAmB,EAAE;IACxH,MAAM,QAAQ,GAAG,IAAA,oCAAmB,EAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,kCAAmB,CAAC,CAAC;IACvG,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;QACvB,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IAAA,CAC9E,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAAA,CACjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./PlatformDefaults"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
|