@hanzogui/theme 4.4.0 → 102.0.0-rc.41-hanzoai.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.
- package/dist/cjs/_mutateTheme.cjs +12 -40
- package/dist/cjs/_mutateTheme.native.js +12 -72
- package/dist/cjs/_mutateTheme.native.js.map +1 -1
- package/dist/esm/_mutateTheme.mjs +12 -40
- package/dist/esm/_mutateTheme.mjs.map +1 -1
- package/dist/esm/_mutateTheme.native.js +12 -72
- package/dist/esm/_mutateTheme.native.js.map +1 -1
- package/package.json +9 -9
- package/src/_mutateTheme.ts +1 -1
|
@@ -45,9 +45,7 @@ function mutateThemes({
|
|
|
45
45
|
...props,
|
|
46
46
|
name,
|
|
47
47
|
theme,
|
|
48
|
-
// we'll do one update at the end
|
|
49
48
|
avoidUpdate: true,
|
|
50
|
-
// always add which also replaces but doesnt fail first time
|
|
51
49
|
mutationType: "add"
|
|
52
50
|
});
|
|
53
51
|
if (res) {
|
|
@@ -71,9 +69,7 @@ function mutateThemes({
|
|
|
71
69
|
}
|
|
72
70
|
function _mutateTheme(props) {
|
|
73
71
|
if (import_constants.isServer) {
|
|
74
|
-
if (process.env.NODE_ENV === "development")
|
|
75
|
-
console.warn("Theme mutation is not supported on server side");
|
|
76
|
-
}
|
|
72
|
+
if (process.env.NODE_ENV === "development") console.warn("Theme mutation is not supported on server side");
|
|
77
73
|
return;
|
|
78
74
|
}
|
|
79
75
|
const config = (0, import_web.getConfig)();
|
|
@@ -84,35 +80,25 @@ function _mutateTheme(props) {
|
|
|
84
80
|
mutationType
|
|
85
81
|
} = props;
|
|
86
82
|
if (process.env.NODE_ENV === "development") {
|
|
87
|
-
if (!config)
|
|
88
|
-
throw new Error("No config");
|
|
89
|
-
}
|
|
83
|
+
if (!config) throw new Error("No config");
|
|
90
84
|
const theme2 = config.themes[props.name];
|
|
91
|
-
if (mutationType !== "add" && !theme2) {
|
|
92
|
-
throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
93
|
-
}
|
|
85
|
+
if (mutationType !== "add" && !theme2) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
94
86
|
}
|
|
95
87
|
const theme = {
|
|
96
88
|
...(mutationType === "update" ? config.themes[themeName] ?? {} : {}),
|
|
97
89
|
...themeIn
|
|
98
90
|
};
|
|
99
|
-
for (const key in theme)
|
|
100
|
-
(0, import_web.ensureThemeVariable)(theme, key);
|
|
101
|
-
}
|
|
91
|
+
for (const key in theme) (0, import_web.ensureThemeVariable)(theme, key);
|
|
102
92
|
const themeProxied = (0, import_web.proxyThemeToParents)(themeName, theme);
|
|
103
93
|
const response = {
|
|
104
94
|
themeRaw: theme,
|
|
105
95
|
theme: themeProxied,
|
|
106
96
|
cssRules: []
|
|
107
97
|
};
|
|
108
|
-
if (props.avoidUpdate)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
response.cssRules = insertThemeCSS({
|
|
113
|
-
[themeName]: theme
|
|
114
|
-
});
|
|
115
|
-
}
|
|
98
|
+
if (props.avoidUpdate) return response;
|
|
99
|
+
if (insertCSS) response.cssRules = insertThemeCSS({
|
|
100
|
+
[themeName]: theme
|
|
101
|
+
});
|
|
116
102
|
updateThemeConfig(themeName, themeProxied);
|
|
117
103
|
updateThemeStates();
|
|
118
104
|
return response;
|
|
@@ -126,9 +112,6 @@ function updateThemeStates() {
|
|
|
126
112
|
(0, import_web.forceUpdateThemes)();
|
|
127
113
|
}
|
|
128
114
|
function insertThemeCSS(themes, batch = false) {
|
|
129
|
-
if (false) {
|
|
130
|
-
return [];
|
|
131
|
-
}
|
|
132
115
|
const config = (0, import_web.getConfig)();
|
|
133
116
|
let cssRules = [];
|
|
134
117
|
for (const themeName in themes) {
|
|
@@ -139,22 +122,13 @@ function insertThemeCSS(themes, batch = false) {
|
|
|
139
122
|
names: [themeName],
|
|
140
123
|
hasDarkLight: true,
|
|
141
124
|
theme,
|
|
142
|
-
// Use mutated variable creator which starts from high index to avoid conflicts
|
|
143
125
|
useMutatedVariables: true
|
|
144
126
|
});
|
|
145
127
|
cssRules = [...cssRules, ...rules];
|
|
146
|
-
if (!batch) {
|
|
147
|
-
updateStyle(`t_theme_style_${themeName}`, rules);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
if (import_web.mutatedAutoVariables.length > 0) {
|
|
151
|
-
const autoVarCSS = `:root{${import_web.mutatedAutoVariables.map(v => `--${v.name}:${v.val}`).join(";")}}`;
|
|
152
|
-
updateStyle(`t_mutate_vars`, [autoVarCSS]);
|
|
153
|
-
}
|
|
154
|
-
if (batch) {
|
|
155
|
-
const id = typeof batch == "string" ? batch : (0, import_web.simpleHash)(Object.keys(themes).join(""));
|
|
156
|
-
updateStyle(`t_theme_style_${id}`, cssRules);
|
|
128
|
+
if (!batch) updateStyle(`t_theme_style_${themeName}`, rules);
|
|
157
129
|
}
|
|
130
|
+
if (import_web.mutatedAutoVariables.length > 0) updateStyle(`t_mutate_vars`, [`:root{${import_web.mutatedAutoVariables.map(v => `--${v.name}:${v.val}`).join(";")}}`]);
|
|
131
|
+
if (batch) updateStyle(`t_theme_style_${typeof batch == "string" ? batch : (0, import_web.simpleHash)(Object.keys(themes).join(""))}`, cssRules);
|
|
158
132
|
return cssRules;
|
|
159
133
|
}
|
|
160
134
|
function updateStyle(id, rules) {
|
|
@@ -163,7 +137,5 @@ function updateStyle(id, rules) {
|
|
|
163
137
|
style.id = id;
|
|
164
138
|
style.appendChild(document.createTextNode(rules.join("\n")));
|
|
165
139
|
document.head.appendChild(style);
|
|
166
|
-
if (existing)
|
|
167
|
-
existing.parentElement?.removeChild(existing);
|
|
168
|
-
}
|
|
140
|
+
if (existing) existing.parentElement?.removeChild(existing);
|
|
169
141
|
}
|
|
@@ -53,9 +53,7 @@ function mutateThemes(param) {
|
|
|
53
53
|
...props,
|
|
54
54
|
name,
|
|
55
55
|
theme,
|
|
56
|
-
// we'll do one update at the end
|
|
57
56
|
avoidUpdate: true,
|
|
58
|
-
// always add which also replaces but doesnt fail first time
|
|
59
57
|
mutationType: "add"
|
|
60
58
|
});
|
|
61
59
|
if (res) {
|
|
@@ -68,13 +66,9 @@ function mutateThemes(param) {
|
|
|
68
66
|
_iteratorError = err;
|
|
69
67
|
} finally {
|
|
70
68
|
try {
|
|
71
|
-
if (!_iteratorNormalCompletion && _iterator.return != null)
|
|
72
|
-
_iterator.return();
|
|
73
|
-
}
|
|
69
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
74
70
|
} finally {
|
|
75
|
-
if (_didIteratorError)
|
|
76
|
-
throw _iteratorError;
|
|
77
|
-
}
|
|
71
|
+
if (_didIteratorError) throw _iteratorError;
|
|
78
72
|
}
|
|
79
73
|
}
|
|
80
74
|
var cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
@@ -93,9 +87,7 @@ function mutateThemes(param) {
|
|
|
93
87
|
}
|
|
94
88
|
function _mutateTheme(props) {
|
|
95
89
|
if (import_constants.isServer) {
|
|
96
|
-
if (process.env.NODE_ENV === "development")
|
|
97
|
-
console.warn("Theme mutation is not supported on server side");
|
|
98
|
-
}
|
|
90
|
+
if (process.env.NODE_ENV === "development") console.warn("Theme mutation is not supported on server side");
|
|
99
91
|
return;
|
|
100
92
|
}
|
|
101
93
|
var config = (0, import_web.getConfig)();
|
|
@@ -106,36 +98,26 @@ function _mutateTheme(props) {
|
|
|
106
98
|
mutationType
|
|
107
99
|
} = props;
|
|
108
100
|
if (process.env.NODE_ENV === "development") {
|
|
109
|
-
if (!config)
|
|
110
|
-
throw new Error("No config");
|
|
111
|
-
}
|
|
101
|
+
if (!config) throw new Error("No config");
|
|
112
102
|
var theme = config.themes[props.name];
|
|
113
|
-
if (mutationType !== "add" && !theme) {
|
|
114
|
-
throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
115
|
-
}
|
|
103
|
+
if (mutationType !== "add" && !theme) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
116
104
|
}
|
|
117
105
|
var _config_themes_themeName;
|
|
118
106
|
var theme1 = {
|
|
119
107
|
...(mutationType === "update" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {}),
|
|
120
108
|
...themeIn
|
|
121
109
|
};
|
|
122
|
-
for (var key in theme1)
|
|
123
|
-
(0, import_web.ensureThemeVariable)(theme1, key);
|
|
124
|
-
}
|
|
110
|
+
for (var key in theme1) (0, import_web.ensureThemeVariable)(theme1, key);
|
|
125
111
|
var themeProxied = (0, import_web.proxyThemeToParents)(themeName, theme1);
|
|
126
112
|
var response = {
|
|
127
113
|
themeRaw: theme1,
|
|
128
114
|
theme: themeProxied,
|
|
129
115
|
cssRules: []
|
|
130
116
|
};
|
|
131
|
-
if (props.avoidUpdate)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
response.cssRules = insertThemeCSS({
|
|
136
|
-
[themeName]: theme1
|
|
137
|
-
});
|
|
138
|
-
}
|
|
117
|
+
if (props.avoidUpdate) return response;
|
|
118
|
+
if (insertCSS) response.cssRules = insertThemeCSS({
|
|
119
|
+
[themeName]: theme1
|
|
120
|
+
});
|
|
139
121
|
updateThemeConfig(themeName, themeProxied);
|
|
140
122
|
updateThemeStates();
|
|
141
123
|
return response;
|
|
@@ -149,49 +131,7 @@ function updateThemeStates() {
|
|
|
149
131
|
(0, import_web.forceUpdateThemes)();
|
|
150
132
|
}
|
|
151
133
|
function insertThemeCSS(themes) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
return [];
|
|
155
|
-
}
|
|
156
|
-
var config = (0, import_web.getConfig)();
|
|
157
|
-
var cssRules = [];
|
|
158
|
-
for (var themeName in themes) {
|
|
159
|
-
var theme = themes[themeName];
|
|
160
|
-
var rules = (0, import_web.getThemeCSSRules)({
|
|
161
|
-
config,
|
|
162
|
-
themeName,
|
|
163
|
-
names: [themeName],
|
|
164
|
-
hasDarkLight: true,
|
|
165
|
-
theme,
|
|
166
|
-
// Use mutated variable creator which starts from high index to avoid conflicts
|
|
167
|
-
useMutatedVariables: true
|
|
168
|
-
});
|
|
169
|
-
cssRules = [...cssRules, ...rules];
|
|
170
|
-
if (!batch) {
|
|
171
|
-
updateStyle(`t_theme_style_${themeName}`, rules);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (import_web.mutatedAutoVariables.length > 0) {
|
|
175
|
-
var autoVarCSS = `:root{${import_web.mutatedAutoVariables.map(function (v) {
|
|
176
|
-
return `--${v.name}:${v.val}`;
|
|
177
|
-
}).join(";")}}`;
|
|
178
|
-
updateStyle(`t_mutate_vars`, [autoVarCSS]);
|
|
179
|
-
}
|
|
180
|
-
if (batch) {
|
|
181
|
-
var id = typeof batch == "string" ? batch : (0, import_web.simpleHash)(Object.keys(themes).join(""));
|
|
182
|
-
updateStyle(`t_theme_style_${id}`, cssRules);
|
|
183
|
-
}
|
|
184
|
-
return cssRules;
|
|
185
|
-
}
|
|
186
|
-
function updateStyle(id, rules) {
|
|
187
|
-
var existing = document.querySelector(`#${id}`);
|
|
188
|
-
var style = document.createElement("style");
|
|
189
|
-
style.id = id;
|
|
190
|
-
style.appendChild(document.createTextNode(rules.join("\n")));
|
|
191
|
-
document.head.appendChild(style);
|
|
192
|
-
if (existing) {
|
|
193
|
-
var _existing_parentElement;
|
|
194
|
-
(_existing_parentElement = existing.parentElement) === null || _existing_parentElement === void 0 ? void 0 : _existing_parentElement.removeChild(existing);
|
|
195
|
-
}
|
|
134
|
+
arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
135
|
+
return [];
|
|
196
136
|
}
|
|
197
137
|
//# sourceMappingURL=_mutateTheme.native.js.map
|
|
@@ -1 +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"
|
|
1
|
+
{"version":3,"names":["to","__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"],"sources":["../../src/_mutateTheme.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EAAA,OAAAA,EAAA;AAAA;AAAA,IAAAC,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAyB;EACzBC,YAAA,EAAAA,CAAA,KAAAA;AAEA;AA4BOC,MAAA,CAAAC,OAAS,GAAAV,YAAa,CAAAK,mBAAA;AAAA,IAC3BM,gBAAA,GAAAC,OAAA;AAAA,IACAC,uBAAA,G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F,SAAW,EAAAmB,YAAe;EAAAhB,iBACvB,CAAG;EAAA,OACdkB,QAAA;AAAA;AAGH,SAAAnB,iBAAkBA,CAAAF,SAAW,EAAAV,KAAY;EACzC,IAAAqB,MAAA,OAAAvC,UAAkB,CAAAwC,SAAA;EAElBD,MAAA,CAAArC,MAAO,CAAA0B,SAAA,IAAAV,KAAA;EACT,IAAAlB,UAAA,CAAAkD,YAAA,YAAAX,MAAA,CAAArC,MAAA;AAEA;AACE,SAAM6B,iBAASA,CAAA;EACf,IAAA/B,UAAO,CAAOmD,iBAAa;AAC3B;AACF,SAAAzB,eAAAxB,MAAA;EAEAkD,SAAS,CAAAC,MAAA,QAAAD,SAAoB,kBAAAA,SAAA;EAC3B;AACF","ignoreList":[]}
|
|
@@ -17,9 +17,7 @@ function mutateThemes({
|
|
|
17
17
|
...props,
|
|
18
18
|
name,
|
|
19
19
|
theme,
|
|
20
|
-
// we'll do one update at the end
|
|
21
20
|
avoidUpdate: true,
|
|
22
|
-
// always add which also replaces but doesnt fail first time
|
|
23
21
|
mutationType: "add"
|
|
24
22
|
});
|
|
25
23
|
if (res) {
|
|
@@ -43,9 +41,7 @@ function mutateThemes({
|
|
|
43
41
|
}
|
|
44
42
|
function _mutateTheme(props) {
|
|
45
43
|
if (isServer) {
|
|
46
|
-
if (process.env.NODE_ENV === "development")
|
|
47
|
-
console.warn("Theme mutation is not supported on server side");
|
|
48
|
-
}
|
|
44
|
+
if (process.env.NODE_ENV === "development") console.warn("Theme mutation is not supported on server side");
|
|
49
45
|
return;
|
|
50
46
|
}
|
|
51
47
|
const config = getConfig();
|
|
@@ -56,35 +52,25 @@ function _mutateTheme(props) {
|
|
|
56
52
|
mutationType
|
|
57
53
|
} = props;
|
|
58
54
|
if (process.env.NODE_ENV === "development") {
|
|
59
|
-
if (!config)
|
|
60
|
-
throw new Error("No config");
|
|
61
|
-
}
|
|
55
|
+
if (!config) throw new Error("No config");
|
|
62
56
|
const theme2 = config.themes[props.name];
|
|
63
|
-
if (mutationType !== "add" && !theme2) {
|
|
64
|
-
throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
65
|
-
}
|
|
57
|
+
if (mutationType !== "add" && !theme2) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
66
58
|
}
|
|
67
59
|
const theme = {
|
|
68
60
|
...(mutationType === "update" ? config.themes[themeName] ?? {} : {}),
|
|
69
61
|
...themeIn
|
|
70
62
|
};
|
|
71
|
-
for (const key in theme)
|
|
72
|
-
ensureThemeVariable(theme, key);
|
|
73
|
-
}
|
|
63
|
+
for (const key in theme) ensureThemeVariable(theme, key);
|
|
74
64
|
const themeProxied = proxyThemeToParents(themeName, theme);
|
|
75
65
|
const response = {
|
|
76
66
|
themeRaw: theme,
|
|
77
67
|
theme: themeProxied,
|
|
78
68
|
cssRules: []
|
|
79
69
|
};
|
|
80
|
-
if (props.avoidUpdate)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
response.cssRules = insertThemeCSS({
|
|
85
|
-
[themeName]: theme
|
|
86
|
-
});
|
|
87
|
-
}
|
|
70
|
+
if (props.avoidUpdate) return response;
|
|
71
|
+
if (insertCSS) response.cssRules = insertThemeCSS({
|
|
72
|
+
[themeName]: theme
|
|
73
|
+
});
|
|
88
74
|
updateThemeConfig(themeName, themeProxied);
|
|
89
75
|
updateThemeStates();
|
|
90
76
|
return response;
|
|
@@ -98,9 +84,6 @@ function updateThemeStates() {
|
|
|
98
84
|
forceUpdateThemes();
|
|
99
85
|
}
|
|
100
86
|
function insertThemeCSS(themes, batch = false) {
|
|
101
|
-
if (false) {
|
|
102
|
-
return [];
|
|
103
|
-
}
|
|
104
87
|
const config = getConfig();
|
|
105
88
|
let cssRules = [];
|
|
106
89
|
for (const themeName in themes) {
|
|
@@ -111,22 +94,13 @@ function insertThemeCSS(themes, batch = false) {
|
|
|
111
94
|
names: [themeName],
|
|
112
95
|
hasDarkLight: true,
|
|
113
96
|
theme,
|
|
114
|
-
// Use mutated variable creator which starts from high index to avoid conflicts
|
|
115
97
|
useMutatedVariables: true
|
|
116
98
|
});
|
|
117
99
|
cssRules = [...cssRules, ...rules];
|
|
118
|
-
if (!batch) {
|
|
119
|
-
updateStyle(`t_theme_style_${themeName}`, rules);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (mutatedAutoVariables.length > 0) {
|
|
123
|
-
const autoVarCSS = `:root{${mutatedAutoVariables.map(v => `--${v.name}:${v.val}`).join(";")}}`;
|
|
124
|
-
updateStyle(`t_mutate_vars`, [autoVarCSS]);
|
|
125
|
-
}
|
|
126
|
-
if (batch) {
|
|
127
|
-
const id = typeof batch == "string" ? batch : simpleHash(Object.keys(themes).join(""));
|
|
128
|
-
updateStyle(`t_theme_style_${id}`, cssRules);
|
|
100
|
+
if (!batch) updateStyle(`t_theme_style_${themeName}`, rules);
|
|
129
101
|
}
|
|
102
|
+
if (mutatedAutoVariables.length > 0) updateStyle(`t_mutate_vars`, [`:root{${mutatedAutoVariables.map(v => `--${v.name}:${v.val}`).join(";")}}`]);
|
|
103
|
+
if (batch) updateStyle(`t_theme_style_${typeof batch == "string" ? batch : simpleHash(Object.keys(themes).join(""))}`, cssRules);
|
|
130
104
|
return cssRules;
|
|
131
105
|
}
|
|
132
106
|
function updateStyle(id, rules) {
|
|
@@ -135,9 +109,7 @@ function updateStyle(id, rules) {
|
|
|
135
109
|
style.id = id;
|
|
136
110
|
style.appendChild(document.createTextNode(rules.join("\n")));
|
|
137
111
|
document.head.appendChild(style);
|
|
138
|
-
if (existing)
|
|
139
|
-
existing.parentElement?.removeChild(existing);
|
|
140
|
-
}
|
|
112
|
+
if (existing) existing.parentElement?.removeChild(existing);
|
|
141
113
|
}
|
|
142
114
|
export { _mutateTheme, mutateThemes };
|
|
143
115
|
//# sourceMappingURL=_mutateTheme.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","getThemeCSSRules","mutatedAutoVariables","proxyThemeToParents","simpleHash","updateConfig","mutateThemes","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","name","theme","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","cssRules","insertThemeCSS","themeName","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","theme2","key","themeProxied","response","rules","names","hasDarkLight","useMutatedVariables","updateStyle","length","
|
|
1
|
+
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","getThemeCSSRules","mutatedAutoVariables","proxyThemeToParents","simpleHash","updateConfig","mutateThemes","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","name","theme","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","cssRules","insertThemeCSS","themeName","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","theme2","key","themeProxied","response","rules","names","hasDarkLight","useMutatedVariables","updateStyle","length","map","v","val","join","Object","keys","id","existing","document","querySelector","style","createElement","appendChild","createTextNode","head","parentElement","removeChild"],"sources":["../../src/_mutateTheme.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,QAAgB;AACzB,SAASC,eAAA,QAAuB;AAEhC,SAAAC,mBAAA,EAAAC,iBAAA,EAAAC,SAAA,EAAAC,gBAAA,EAAAC,oBAAA,EAAAC,mBAAA,EAAAC,UAAA,EAAAC,YAAA;AAAA,SACEC,aAAA;EAAAC,MAAA;EAAAC,KAAA;EAAAC,SAAA;EAAA,GAAAC;AAAA;EAAA,MACAC,gBAAA;EAAA,MACAC,YAAA;EAAA,KACA;IAAAC,IAAA;IAAAC;EAAA,KAAAP,MAAA;IACA,MAAAQ,GAAA,GAAAC,YAAA;MACA,GAAAN,KAAA;MACAG,IAAA;MACAC,KAAA;MAAAG,WACK;MAmBAC,YAAS;IACd;IACA,IAAAH,GAAA;MACAJ,gBAA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C,MAAA,EAAAwC,IAAA,SAAA3B,QAAA;EAAA,OACdA,QAAA;AAAA;AAGH,SAAAsB,WAAkBA,CAAAQ,EAAA,EAAAZ,KAAA,EAAW;EAC7B,MAAAa,QAAA,GAAAC,QAAkB,CAAAC,aAAA,KAAAH,EAAA;EAElB,MAAAI,KAAO,GAAAF,QAAA,CAAAG,aAAA;EACTD,KAAA,CAAAJ,EAAA,GAAAA,EAAA;EAEAI,KAAA,CAAAE,WAAS,CAAAJ,QAAkB,CAAAK,cAAmB,CAAAnB,KAAoB,CAAAS,IAAA;EAChEK,QAAM,CAAAM,IAAA,CAAAF,WAAS,CAAUF,KAAA;EACzB,IAAAH,QAAO,EAAAA,QAAO,CAAAQ,aAAa,EAAAC,WAAA,CAAAT,QAAA;AAC3B;AACF,SAAAnC,YAAA,EAAAV,YAAA","ignoreList":[]}
|
|
@@ -23,9 +23,7 @@ function mutateThemes(param) {
|
|
|
23
23
|
...props,
|
|
24
24
|
name,
|
|
25
25
|
theme,
|
|
26
|
-
// we'll do one update at the end
|
|
27
26
|
avoidUpdate: true,
|
|
28
|
-
// always add which also replaces but doesnt fail first time
|
|
29
27
|
mutationType: "add"
|
|
30
28
|
});
|
|
31
29
|
if (res) {
|
|
@@ -38,13 +36,9 @@ function mutateThemes(param) {
|
|
|
38
36
|
_iteratorError = err;
|
|
39
37
|
} finally {
|
|
40
38
|
try {
|
|
41
|
-
if (!_iteratorNormalCompletion && _iterator.return != null)
|
|
42
|
-
_iterator.return();
|
|
43
|
-
}
|
|
39
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
44
40
|
} finally {
|
|
45
|
-
if (_didIteratorError)
|
|
46
|
-
throw _iteratorError;
|
|
47
|
-
}
|
|
41
|
+
if (_didIteratorError) throw _iteratorError;
|
|
48
42
|
}
|
|
49
43
|
}
|
|
50
44
|
var cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
@@ -63,9 +57,7 @@ function mutateThemes(param) {
|
|
|
63
57
|
}
|
|
64
58
|
function _mutateTheme(props) {
|
|
65
59
|
if (isServer) {
|
|
66
|
-
if (process.env.NODE_ENV === "development")
|
|
67
|
-
console.warn("Theme mutation is not supported on server side");
|
|
68
|
-
}
|
|
60
|
+
if (process.env.NODE_ENV === "development") console.warn("Theme mutation is not supported on server side");
|
|
69
61
|
return;
|
|
70
62
|
}
|
|
71
63
|
var config = getConfig();
|
|
@@ -76,36 +68,26 @@ function _mutateTheme(props) {
|
|
|
76
68
|
mutationType
|
|
77
69
|
} = props;
|
|
78
70
|
if (process.env.NODE_ENV === "development") {
|
|
79
|
-
if (!config)
|
|
80
|
-
throw new Error("No config");
|
|
81
|
-
}
|
|
71
|
+
if (!config) throw new Error("No config");
|
|
82
72
|
var theme = config.themes[props.name];
|
|
83
|
-
if (mutationType !== "add" && !theme) {
|
|
84
|
-
throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
85
|
-
}
|
|
73
|
+
if (mutationType !== "add" && !theme) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
86
74
|
}
|
|
87
75
|
var _config_themes_themeName;
|
|
88
76
|
var theme1 = {
|
|
89
77
|
...(mutationType === "update" ? (_config_themes_themeName = config.themes[themeName]) !== null && _config_themes_themeName !== void 0 ? _config_themes_themeName : {} : {}),
|
|
90
78
|
...themeIn
|
|
91
79
|
};
|
|
92
|
-
for (var key in theme1)
|
|
93
|
-
ensureThemeVariable(theme1, key);
|
|
94
|
-
}
|
|
80
|
+
for (var key in theme1) ensureThemeVariable(theme1, key);
|
|
95
81
|
var themeProxied = proxyThemeToParents(themeName, theme1);
|
|
96
82
|
var response = {
|
|
97
83
|
themeRaw: theme1,
|
|
98
84
|
theme: themeProxied,
|
|
99
85
|
cssRules: []
|
|
100
86
|
};
|
|
101
|
-
if (props.avoidUpdate)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
response.cssRules = insertThemeCSS({
|
|
106
|
-
[themeName]: theme1
|
|
107
|
-
});
|
|
108
|
-
}
|
|
87
|
+
if (props.avoidUpdate) return response;
|
|
88
|
+
if (insertCSS) response.cssRules = insertThemeCSS({
|
|
89
|
+
[themeName]: theme1
|
|
90
|
+
});
|
|
109
91
|
updateThemeConfig(themeName, themeProxied);
|
|
110
92
|
updateThemeStates();
|
|
111
93
|
return response;
|
|
@@ -119,50 +101,8 @@ function updateThemeStates() {
|
|
|
119
101
|
forceUpdateThemes();
|
|
120
102
|
}
|
|
121
103
|
function insertThemeCSS(themes) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return [];
|
|
125
|
-
}
|
|
126
|
-
var config = getConfig();
|
|
127
|
-
var cssRules = [];
|
|
128
|
-
for (var themeName in themes) {
|
|
129
|
-
var theme = themes[themeName];
|
|
130
|
-
var rules = getThemeCSSRules({
|
|
131
|
-
config,
|
|
132
|
-
themeName,
|
|
133
|
-
names: [themeName],
|
|
134
|
-
hasDarkLight: true,
|
|
135
|
-
theme,
|
|
136
|
-
// Use mutated variable creator which starts from high index to avoid conflicts
|
|
137
|
-
useMutatedVariables: true
|
|
138
|
-
});
|
|
139
|
-
cssRules = [...cssRules, ...rules];
|
|
140
|
-
if (!batch) {
|
|
141
|
-
updateStyle(`t_theme_style_${themeName}`, rules);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (mutatedAutoVariables.length > 0) {
|
|
145
|
-
var autoVarCSS = `:root{${mutatedAutoVariables.map(function (v) {
|
|
146
|
-
return `--${v.name}:${v.val}`;
|
|
147
|
-
}).join(";")}}`;
|
|
148
|
-
updateStyle(`t_mutate_vars`, [autoVarCSS]);
|
|
149
|
-
}
|
|
150
|
-
if (batch) {
|
|
151
|
-
var id = typeof batch == "string" ? batch : simpleHash(Object.keys(themes).join(""));
|
|
152
|
-
updateStyle(`t_theme_style_${id}`, cssRules);
|
|
153
|
-
}
|
|
154
|
-
return cssRules;
|
|
155
|
-
}
|
|
156
|
-
function updateStyle(id, rules) {
|
|
157
|
-
var existing = document.querySelector(`#${id}`);
|
|
158
|
-
var style = document.createElement("style");
|
|
159
|
-
style.id = id;
|
|
160
|
-
style.appendChild(document.createTextNode(rules.join("\n")));
|
|
161
|
-
document.head.appendChild(style);
|
|
162
|
-
if (existing) {
|
|
163
|
-
var _existing_parentElement;
|
|
164
|
-
(_existing_parentElement = existing.parentElement) === null || _existing_parentElement === void 0 ? void 0 : _existing_parentElement.removeChild(existing);
|
|
165
|
-
}
|
|
104
|
+
arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
105
|
+
return [];
|
|
166
106
|
}
|
|
167
107
|
export { _mutateTheme, mutateThemes };
|
|
168
108
|
//# sourceMappingURL=_mutateTheme.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","getThemeCSSRules","mutatedAutoVariables","proxyThemeToParents","simpleHash","updateConfig","mutateThemes","param","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","name","theme","value","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","err","return","cssRules","insertThemeCSS","themeName","theme2","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","_config_themes_themeName","theme1","key","themeProxied","response","arguments","length"
|
|
1
|
+
{"version":3,"names":["isServer","startTransition","ensureThemeVariable","forceUpdateThemes","getConfig","getThemeCSSRules","mutatedAutoVariables","proxyThemeToParents","simpleHash","updateConfig","mutateThemes","param","themes","batch","insertCSS","props","allThemesProxied","allThemesRaw","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","name","theme","value","res","_mutateTheme","avoidUpdate","mutationType","themeRaw","err","return","cssRules","insertThemeCSS","themeName","theme2","updateThemeConfig","updateThemeStates","themesRaw","process","env","NODE_ENV","console","warn","config","themeIn","Error","_config_themes_themeName","theme1","key","themeProxied","response","arguments","length"],"sources":["../../src/_mutateTheme.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,QAAgB;AACzB,SAASC,eAAA,QAAuB;AAEhC,SAAAC,mBAAA,EAAAC,iBAAA,EAAAC,SAAA,EAAAC,gBAAA,EAAAC,oBAAA,EAAAC,mBAAA,EAAAC,UAAA,EAAAC,YAAA;AAAA,SACEC,aAAAC,KAAA;EAAA,IACA;IAAAC,MAAA;IAAAC,KAAA;IAAAC,SAAA;IAAA,GAAAC;EAAA,IAAAJ,KAAA;EAAA,IACAK,gBAAA;EAAA,IACAC,YAAA;EAAA,IACAC,yBAAA;IAAAC,iBAAA;IAAAC,cAAA;EAAA,IACA;IACA,SAAAC,SAAA,GAAAT,MAAA,CAAAU,MAAA,CAAAC,QAAA,KAAAC,KAAA,IAAAN,yBAAA,IAAAM,KAAA,GAAAH,SAAA,CAAAI,IAAA,IAAAC,IAAA,GAAAR,yBAAA;MACA;QAAAS,IAAA;QAAAC;MAAA,IAAAJ,KAAA,CAAAK,KAAA;MAAA,IACKC,GAAA,GAAAC,YAAA;QAmBA,GAAAhB,KAAS;QACdY,IAAA;QACAC,KAAA;QACAI,WAAY;QACZC,YAAG;MAMF;MACD,IAAAH,GAAM;QACNd,gBAAM,CAAAW,IAA6C,IAAAG,GAAA,CAAAF,KAAA;QACnDX,YAAa,CAAAU,IAAM,IAAAG,GAAM,CAAAI,QAAK;MAC5B;IAAyB;EACpB,SACHC,GAAA;IAAAhB,iBACA;IAAAC,cAAA,GAAAe,GAAA;EAAA,UAEA;IAAa;MAAA,IAEb,CAAAjB,yBAAc,IAAAG,SAAA,CAAAe,MAAA,UAAAf,SAAA,CAAAe,MAAA;IAAA,UACf;MACD,IAAAjB,iBAAS,QAAAC,cAAA;IACP;EACA;EAAyB,IAC3BiB,QAAA,GAAAvB,SAAA,GAAAwB,cAAA,CAAArB,YAAA,EAAAJ,KAAA;EA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AwB,QAAA;EAAA,IACL1C,SAAA,EAAA0C,QAAA,CAAAnB,QAAA,GAAAC,cAAA;IAAA,CAAAC,SAAA,GAAAc;EAAA;EAEAZ,iBAAW,CAAAF,SAAc,EAAAgB,YAAA;EACvBb,iBAAA;EAA8B,OAChCc,QAAA;AAEA;AAEA,SAAMf,iBAAWA,CAAAF,SAAA,EAAAX,KAAA;EAAA,IACfqB,MAAA,GAAU7C,SAAA;EAAA6C,MACV,CAAArC,MAAO,CAAA2B,SAAA,IAAAX,KAAA;EAAAnB,YACP,CAAU,QAAC,EAAAwC,MAAA,CAAArC,MAAA;AAAA;AAGb,SAAI8B,iBAAmBA,CAAA;EACrBvC,iBAAO;AAAA;AAGT,SAAImC,cAAWA,CAAA1B,MAAA;EACb6C,SAAA,CAAAC,MAAS,QAAWD,SAAA,QAAe,UAAAA,SAAA;EAAA,OAChC;AAAY;AACd,SACH1B,YAAA,EAAArB,YAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "102.0.0-rc.41-hanzoai.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
|
-
"build": "
|
|
32
|
-
"watch": "
|
|
33
|
-
"clean": "
|
|
34
|
-
"clean:build": "
|
|
31
|
+
"build": "hanzogui-build",
|
|
32
|
+
"watch": "hanzogui-build --watch",
|
|
33
|
+
"clean": "hanzogui-build clean",
|
|
34
|
+
"clean:build": "hanzogui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@hanzogui/constants": "
|
|
38
|
-
"@hanzogui/start-transition": "
|
|
39
|
-
"@hanzogui/web": "
|
|
37
|
+
"@hanzogui/constants": "102.0.0-rc.41-hanzoai.1",
|
|
38
|
+
"@hanzogui/start-transition": "102.0.0-rc.41-hanzoai.1",
|
|
39
|
+
"@hanzogui/web": "102.0.0-rc.41-hanzoai.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@hanzogui/build": "
|
|
42
|
+
"@hanzogui/build": "102.0.0-rc.41-hanzoai.1",
|
|
43
43
|
"react": ">=19"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
package/src/_mutateTheme.ts
CHANGED