@hanzogui/theme 2.0.0
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/cjs/_mutateTheme.cjs +136 -0
- package/dist/cjs/_mutateTheme.native.js +158 -0
- package/dist/cjs/_mutateTheme.native.js.map +1 -0
- package/dist/cjs/addTheme.cjs +33 -0
- package/dist/cjs/addTheme.native.js +36 -0
- package/dist/cjs/addTheme.native.js.map +1 -0
- package/dist/cjs/index.cjs +30 -0
- package/dist/cjs/index.native.js +33 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/replaceTheme.cjs +37 -0
- package/dist/cjs/replaceTheme.native.js +42 -0
- package/dist/cjs/replaceTheme.native.js.map +1 -0
- package/dist/cjs/updateTheme.cjs +37 -0
- package/dist/cjs/updateTheme.native.js +41 -0
- package/dist/cjs/updateTheme.native.js.map +1 -0
- package/dist/esm/_mutateTheme.mjs +112 -0
- package/dist/esm/_mutateTheme.mjs.map +1 -0
- package/dist/esm/_mutateTheme.native.js +131 -0
- package/dist/esm/_mutateTheme.native.js.map +1 -0
- package/dist/esm/addTheme.mjs +10 -0
- package/dist/esm/addTheme.mjs.map +1 -0
- package/dist/esm/addTheme.native.js +10 -0
- package/dist/esm/addTheme.native.js.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +6 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +6 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/replaceTheme.mjs +14 -0
- package/dist/esm/replaceTheme.mjs.map +1 -0
- package/dist/esm/replaceTheme.native.js +16 -0
- package/dist/esm/replaceTheme.native.js.map +1 -0
- package/dist/esm/updateTheme.mjs +14 -0
- package/dist/esm/updateTheme.mjs.map +1 -0
- package/dist/esm/updateTheme.native.js +15 -0
- package/dist/esm/updateTheme.native.js.map +1 -0
- package/package.json +48 -0
- package/src/_mutateTheme.ts +197 -0
- package/src/addTheme.ts +11 -0
- package/src/index.ts +5 -0
- package/src/replaceTheme.ts +14 -0
- package/src/updateTheme.ts +13 -0
- package/types/_mutateTheme.d.ts +27 -0
- package/types/_mutateTheme.d.ts.map +1 -0
- package/types/addTheme.d.ts +11 -0
- package/types/addTheme.d.ts.map +1 -0
- package/types/index.d.ts +6 -0
- package/types/index.d.ts.map +1 -0
- package/types/replaceTheme.d.ts +10 -0
- package/types/replaceTheme.d.ts.map +1 -0
- package/types/updateTheme.d.ts +10 -0
- package/types/updateTheme.d.ts.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## addFont
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var mutateTheme_exports = {};
|
|
22
|
+
__export(mutateTheme_exports, {
|
|
23
|
+
_mutateTheme: () => _mutateTheme,
|
|
24
|
+
mutateThemes: () => mutateThemes
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(mutateTheme_exports);
|
|
27
|
+
var import_constants = require("@hanzogui/constants"),
|
|
28
|
+
import_start_transition = require("@hanzogui/start-transition"),
|
|
29
|
+
import_web = require("@hanzogui/web");
|
|
30
|
+
function mutateThemes({
|
|
31
|
+
themes,
|
|
32
|
+
batch,
|
|
33
|
+
insertCSS = !0,
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
const allThemesProxied = {},
|
|
37
|
+
allThemesRaw = {};
|
|
38
|
+
for (const {
|
|
39
|
+
name,
|
|
40
|
+
theme
|
|
41
|
+
} of themes) {
|
|
42
|
+
const res = _mutateTheme({
|
|
43
|
+
...props,
|
|
44
|
+
name,
|
|
45
|
+
theme,
|
|
46
|
+
// we'll do one update at the end
|
|
47
|
+
avoidUpdate: !0,
|
|
48
|
+
// always add which also replaces but doesnt fail first time
|
|
49
|
+
mutationType: "add"
|
|
50
|
+
});
|
|
51
|
+
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
52
|
+
}
|
|
53
|
+
const cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
54
|
+
return (0, import_start_transition.startTransition)(() => {
|
|
55
|
+
for (const themeName in allThemesProxied) {
|
|
56
|
+
const theme = allThemesProxied[themeName];
|
|
57
|
+
updateThemeConfig(themeName, theme);
|
|
58
|
+
}
|
|
59
|
+
updateThemeStates();
|
|
60
|
+
}), {
|
|
61
|
+
themes: allThemesProxied,
|
|
62
|
+
themesRaw: allThemesRaw,
|
|
63
|
+
cssRules
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function _mutateTheme(props) {
|
|
67
|
+
if (import_constants.isServer) {
|
|
68
|
+
process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const config = (0, import_web.getConfig)(),
|
|
72
|
+
{
|
|
73
|
+
name: themeName,
|
|
74
|
+
theme: themeIn,
|
|
75
|
+
insertCSS,
|
|
76
|
+
mutationType
|
|
77
|
+
} = props;
|
|
78
|
+
if (process.env.NODE_ENV === "development") {
|
|
79
|
+
if (!config) throw new Error("No config");
|
|
80
|
+
const theme2 = config.themes[props.name];
|
|
81
|
+
if (mutationType !== "add" && !theme2) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
82
|
+
}
|
|
83
|
+
const theme = {
|
|
84
|
+
...(mutationType === "update" ? config.themes[themeName] ?? {} : {}),
|
|
85
|
+
...themeIn
|
|
86
|
+
};
|
|
87
|
+
for (const key in theme) (0, import_web.ensureThemeVariable)(theme, key);
|
|
88
|
+
const themeProxied = (0, import_web.proxyThemeToParents)(themeName, theme),
|
|
89
|
+
response = {
|
|
90
|
+
themeRaw: theme,
|
|
91
|
+
theme: themeProxied,
|
|
92
|
+
cssRules: []
|
|
93
|
+
};
|
|
94
|
+
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
95
|
+
[themeName]: theme
|
|
96
|
+
})), updateThemeConfig(themeName, themeProxied), updateThemeStates()), response;
|
|
97
|
+
}
|
|
98
|
+
function updateThemeConfig(themeName, theme) {
|
|
99
|
+
const config = (0, import_web.getConfig)();
|
|
100
|
+
config.themes[themeName] = theme, (0, import_web.updateConfig)("themes", config.themes);
|
|
101
|
+
}
|
|
102
|
+
function updateThemeStates() {
|
|
103
|
+
(0, import_web.forceUpdateThemes)();
|
|
104
|
+
}
|
|
105
|
+
function insertThemeCSS(themes, batch = !1) {
|
|
106
|
+
const config = (0, import_web.getConfig)();
|
|
107
|
+
let cssRules = [];
|
|
108
|
+
for (const themeName in themes) {
|
|
109
|
+
const theme = themes[themeName],
|
|
110
|
+
rules = (0, import_web.getThemeCSSRules)({
|
|
111
|
+
config,
|
|
112
|
+
themeName,
|
|
113
|
+
names: [themeName],
|
|
114
|
+
hasDarkLight: !0,
|
|
115
|
+
theme,
|
|
116
|
+
// Use mutated variable creator which starts from high index to avoid conflicts
|
|
117
|
+
useMutatedVariables: !0
|
|
118
|
+
});
|
|
119
|
+
cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
|
|
120
|
+
}
|
|
121
|
+
if (import_web.mutatedAutoVariables.length > 0) {
|
|
122
|
+
const autoVarCSS = `:root{${import_web.mutatedAutoVariables.map(v => `--${v.name}:${v.val}`).join(";")}}`;
|
|
123
|
+
updateStyle("t_mutate_vars", [autoVarCSS]);
|
|
124
|
+
}
|
|
125
|
+
if (batch) {
|
|
126
|
+
const id = typeof batch == "string" ? batch : (0, import_web.simpleHash)(Object.keys(themes).join(""));
|
|
127
|
+
updateStyle(`t_theme_style_${id}`, cssRules);
|
|
128
|
+
}
|
|
129
|
+
return cssRules;
|
|
130
|
+
}
|
|
131
|
+
function updateStyle(id, rules) {
|
|
132
|
+
const existing = document.querySelector(`#${id}`),
|
|
133
|
+
style = document.createElement("style");
|
|
134
|
+
style.id = id, style.appendChild(document.createTextNode(rules.join(`
|
|
135
|
+
`))), document.head.appendChild(style), existing && existing.parentElement?.removeChild(existing);
|
|
136
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var mutateTheme_exports = {};
|
|
24
|
+
__export(mutateTheme_exports, {
|
|
25
|
+
_mutateTheme: () => _mutateTheme,
|
|
26
|
+
mutateThemes: () => mutateThemes
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(mutateTheme_exports);
|
|
29
|
+
var import_constants = require("@hanzogui/constants"),
|
|
30
|
+
import_start_transition = require("@hanzogui/start-transition"),
|
|
31
|
+
import_web = require("@hanzogui/web");
|
|
32
|
+
function mutateThemes(param) {
|
|
33
|
+
var {
|
|
34
|
+
themes,
|
|
35
|
+
batch,
|
|
36
|
+
insertCSS = !0,
|
|
37
|
+
...props
|
|
38
|
+
} = param,
|
|
39
|
+
allThemesProxied = {},
|
|
40
|
+
allThemesRaw = {},
|
|
41
|
+
_iteratorNormalCompletion = !0,
|
|
42
|
+
_didIteratorError = !1,
|
|
43
|
+
_iteratorError = void 0;
|
|
44
|
+
try {
|
|
45
|
+
for (var _iterator = themes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
46
|
+
var {
|
|
47
|
+
name,
|
|
48
|
+
theme
|
|
49
|
+
} = _step.value,
|
|
50
|
+
res = _mutateTheme({
|
|
51
|
+
...props,
|
|
52
|
+
name,
|
|
53
|
+
theme,
|
|
54
|
+
// we'll do one update at the end
|
|
55
|
+
avoidUpdate: !0,
|
|
56
|
+
// always add which also replaces but doesnt fail first time
|
|
57
|
+
mutationType: "add"
|
|
58
|
+
});
|
|
59
|
+
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
60
|
+
}
|
|
61
|
+
} catch (err) {
|
|
62
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
63
|
+
} finally {
|
|
64
|
+
try {
|
|
65
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
66
|
+
} finally {
|
|
67
|
+
if (_didIteratorError) throw _iteratorError;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
var cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
71
|
+
return (0, import_start_transition.startTransition)(function () {
|
|
72
|
+
for (var themeName in allThemesProxied) {
|
|
73
|
+
var theme2 = allThemesProxied[themeName];
|
|
74
|
+
updateThemeConfig(themeName, theme2);
|
|
75
|
+
}
|
|
76
|
+
updateThemeStates();
|
|
77
|
+
}), {
|
|
78
|
+
themes: allThemesProxied,
|
|
79
|
+
themesRaw: allThemesRaw,
|
|
80
|
+
cssRules
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function _mutateTheme(props) {
|
|
84
|
+
if (import_constants.isServer) {
|
|
85
|
+
process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
var config = (0, import_web.getConfig)(),
|
|
89
|
+
{
|
|
90
|
+
name: themeName,
|
|
91
|
+
theme: themeIn,
|
|
92
|
+
insertCSS,
|
|
93
|
+
mutationType
|
|
94
|
+
} = props;
|
|
95
|
+
if (process.env.NODE_ENV === "development") {
|
|
96
|
+
if (!config) throw new Error("No config");
|
|
97
|
+
var theme = config.themes[props.name];
|
|
98
|
+
if (mutationType !== "add" && !theme) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
99
|
+
}
|
|
100
|
+
var _config_themes_themeName,
|
|
101
|
+
theme1 = {
|
|
102
|
+
...(mutationType === "update" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {}),
|
|
103
|
+
...themeIn
|
|
104
|
+
};
|
|
105
|
+
for (var key in theme1) (0, import_web.ensureThemeVariable)(theme1, key);
|
|
106
|
+
var themeProxied = (0, import_web.proxyThemeToParents)(themeName, theme1),
|
|
107
|
+
response = {
|
|
108
|
+
themeRaw: theme1,
|
|
109
|
+
theme: themeProxied,
|
|
110
|
+
cssRules: []
|
|
111
|
+
};
|
|
112
|
+
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
113
|
+
[themeName]: theme1
|
|
114
|
+
})), updateThemeConfig(themeName, themeProxied), updateThemeStates()), response;
|
|
115
|
+
}
|
|
116
|
+
function updateThemeConfig(themeName, theme) {
|
|
117
|
+
var config = (0, import_web.getConfig)();
|
|
118
|
+
config.themes[themeName] = theme, (0, import_web.updateConfig)("themes", config.themes);
|
|
119
|
+
}
|
|
120
|
+
function updateThemeStates() {
|
|
121
|
+
(0, import_web.forceUpdateThemes)();
|
|
122
|
+
}
|
|
123
|
+
function insertThemeCSS(themes) {
|
|
124
|
+
var batch = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
125
|
+
return [];
|
|
126
|
+
var config, cssRules;
|
|
127
|
+
for (var themeName in themes) {
|
|
128
|
+
var theme = themes[themeName],
|
|
129
|
+
rules = (0, import_web.getThemeCSSRules)({
|
|
130
|
+
config,
|
|
131
|
+
themeName,
|
|
132
|
+
names: [themeName],
|
|
133
|
+
hasDarkLight: !0,
|
|
134
|
+
theme,
|
|
135
|
+
// Use mutated variable creator which starts from high index to avoid conflicts
|
|
136
|
+
useMutatedVariables: !0
|
|
137
|
+
});
|
|
138
|
+
cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
|
|
139
|
+
}
|
|
140
|
+
if (import_web.mutatedAutoVariables.length > 0) {
|
|
141
|
+
var autoVarCSS;
|
|
142
|
+
updateStyle("t_mutate_vars", [autoVarCSS]);
|
|
143
|
+
}
|
|
144
|
+
if (batch) {
|
|
145
|
+
var id;
|
|
146
|
+
updateStyle(`t_theme_style_${id}`, cssRules);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function updateStyle(id, rules) {
|
|
150
|
+
var existing = document.querySelector(`#${id}`),
|
|
151
|
+
style = document.createElement("style");
|
|
152
|
+
if (style.id = id, style.appendChild(document.createTextNode(rules.join(`
|
|
153
|
+
`))), document.head.appendChild(style), existing) {
|
|
154
|
+
var _existing_parentElement;
|
|
155
|
+
(_existing_parentElement = existing.parentElement) === null || _existing_parentElement === void 0 || _existing_parentElement.removeChild(existing);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=_mutateTheme.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","mutateTheme_exports","__export","_mutateTheme","mutateThemes","module","exports","import_constants","require","import_start_transition","import_web","param","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","name","theme","res","avoidUpdate","mutationType","themeRaw","err","return","cssRules","insertThemeCSS","startTransition","themeName","theme2","updateThemeConfig","updateThemeStates","themesRaw","isServer","process","env","NODE_ENV","console","warn","config","getConfig","themeIn","Error","_config_themes_themeName","theme1","key","ensureThemeVariable","themeProxied","proxyThemeToParents","response","updateConfig","forceUpdateThemes","arguments","length","rules","getThemeCSSRules","names","hasDarkLight","useMutatedVariables","updateStyle","mutatedAutoVariables","autoVarCSS"],"sources":["../../src/_mutateTheme.ts"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var addTheme_exports = {};
|
|
22
|
+
__export(addTheme_exports, {
|
|
23
|
+
addTheme: () => addTheme
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(addTheme_exports);
|
|
26
|
+
var import_mutateTheme = require("./_mutateTheme.cjs");
|
|
27
|
+
function addTheme(props) {
|
|
28
|
+
return (0, import_mutateTheme._mutateTheme)({
|
|
29
|
+
...props,
|
|
30
|
+
insertCSS: !0,
|
|
31
|
+
mutationType: "add"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var addTheme_exports = {};
|
|
24
|
+
__export(addTheme_exports, {
|
|
25
|
+
addTheme: () => addTheme
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(addTheme_exports);
|
|
28
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
29
|
+
function addTheme(props) {
|
|
30
|
+
return (0, import_mutateTheme._mutateTheme)({
|
|
31
|
+
...props,
|
|
32
|
+
insertCSS: !0,
|
|
33
|
+
mutationType: "add"
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=addTheme.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","addTheme_exports","__export","addTheme","module","exports","import_mutateTheme","require","props","_mutateTheme"],"sources":["../../src/addTheme.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAA6B,CAAAK,gBAAA;AAEtB,IAAAK,kBAAkB,GAItBC,OAAA;AACD,SAAAJ,QAAOA,CAAAK,KAAA;EACT,WAAAF,kBAAA,CAAAG,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
},
|
|
18
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
+
value: !0
|
|
21
|
+
}), mod);
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
mutateThemes: () => import_mutateTheme.mutateThemes
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
__reExport(index_exports, require("./addTheme.cjs"), module.exports);
|
|
28
|
+
__reExport(index_exports, require("./updateTheme.cjs"), module.exports);
|
|
29
|
+
__reExport(index_exports, require("./replaceTheme.cjs"), module.exports);
|
|
30
|
+
var import_mutateTheme = require("./_mutateTheme.cjs");
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
},
|
|
20
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
+
value: !0
|
|
23
|
+
}), mod);
|
|
24
|
+
var index_exports = {};
|
|
25
|
+
__export(index_exports, {
|
|
26
|
+
mutateThemes: () => import_mutateTheme.mutateThemes
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
|
+
__reExport(index_exports, require("./addTheme.native.js"), module.exports);
|
|
30
|
+
__reExport(index_exports, require("./updateTheme.native.js"), module.exports);
|
|
31
|
+
__reExport(index_exports, require("./replaceTheme.native.js"), module.exports);
|
|
32
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
33
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","mutateThemes","import_mutateTheme","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAC,kBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAV,YAAc,CAAAK,aAAA;AACdM,UAAA,CAAAN,aAAA,EAAcO,OAAA,0BAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAN,aAAA,EAAcO,OAAA,6BAAAH,MAFd,CAAAC,OAAA;AAGAC,UAAA,CAAAN,aAAA,EAA6BO,OAAA,8BAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var replaceTheme_exports = {};
|
|
22
|
+
__export(replaceTheme_exports, {
|
|
23
|
+
replaceTheme: () => replaceTheme
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(replaceTheme_exports);
|
|
26
|
+
var import_mutateTheme = require("./_mutateTheme.cjs");
|
|
27
|
+
function replaceTheme({
|
|
28
|
+
name,
|
|
29
|
+
theme
|
|
30
|
+
}) {
|
|
31
|
+
return (0, import_mutateTheme._mutateTheme)({
|
|
32
|
+
name,
|
|
33
|
+
theme,
|
|
34
|
+
insertCSS: !0,
|
|
35
|
+
mutationType: "replace"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var replaceTheme_exports = {};
|
|
24
|
+
__export(replaceTheme_exports, {
|
|
25
|
+
replaceTheme: () => replaceTheme
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(replaceTheme_exports);
|
|
28
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
29
|
+
function replaceTheme(param) {
|
|
30
|
+
var {
|
|
31
|
+
name,
|
|
32
|
+
theme
|
|
33
|
+
} = param,
|
|
34
|
+
next = (0, import_mutateTheme._mutateTheme)({
|
|
35
|
+
name,
|
|
36
|
+
theme,
|
|
37
|
+
insertCSS: !0,
|
|
38
|
+
mutationType: "replace"
|
|
39
|
+
});
|
|
40
|
+
return next;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=replaceTheme.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","replaceTheme_exports","__export","replaceTheme","module","exports","import_mutateTheme","require","param","name","theme","next","_mutateTheme","insertCSS"],"sources":["../../src/replaceTheme.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAA6B,CAAAK,oBAAA;AAEtB,IAAAK,kBAAsB,GAAAC,OAAA;AAAA,SAC3BJ,aAAAK,KAAA;EACA;MAAAC,IAAA;MAAAC;IAAA,IAAAF,KAAA;IAAAG,IAAA,OAAAL,kBAAA,CAAAM,YAAA;MAICH,IAAA;MAEDC,KAAA;MACFG,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var updateTheme_exports = {};
|
|
22
|
+
__export(updateTheme_exports, {
|
|
23
|
+
updateTheme: () => updateTheme
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(updateTheme_exports);
|
|
26
|
+
var import_mutateTheme = require("./_mutateTheme.cjs");
|
|
27
|
+
function updateTheme({
|
|
28
|
+
name,
|
|
29
|
+
theme
|
|
30
|
+
}) {
|
|
31
|
+
return (0, import_mutateTheme._mutateTheme)({
|
|
32
|
+
name,
|
|
33
|
+
theme,
|
|
34
|
+
insertCSS: !0,
|
|
35
|
+
mutationType: "update"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: !0
|
|
22
|
+
}), mod);
|
|
23
|
+
var updateTheme_exports = {};
|
|
24
|
+
__export(updateTheme_exports, {
|
|
25
|
+
updateTheme: () => updateTheme
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(updateTheme_exports);
|
|
28
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
29
|
+
function updateTheme(param) {
|
|
30
|
+
var {
|
|
31
|
+
name,
|
|
32
|
+
theme
|
|
33
|
+
} = param;
|
|
34
|
+
return (0, import_mutateTheme._mutateTheme)({
|
|
35
|
+
name,
|
|
36
|
+
theme,
|
|
37
|
+
insertCSS: !0,
|
|
38
|
+
mutationType: "update"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=updateTheme.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","updateTheme_exports","__export","updateTheme","module","exports","import_mutateTheme","require","param","name","theme","_mutateTheme"],"sources":["../../src/updateTheme.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAA6B,CAAAK,mBAAA;AAEtB,IAAAK,kBAAqB,GAAAC,OAAA;AAAA,SAC1BJ,YAAAK,KAAA;EACA;IAAAC,IAAA;IAAAC;EAAA,IAAAF,KAAA;EACF,OAGG,IAAAF,kBAAA,CAAAK,YAAA;IACDF,IAAA;IACFC,KAAA","ignoreList":[]}
|