@tamagui/theme 1.61.3 → 1.62.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/dist/cjs/_mutateTheme.js +36 -79
- package/dist/cjs/_mutateTheme.js.map +1 -1
- package/dist/cjs/_mutateTheme.native.js +112 -0
- package/dist/cjs/_mutateTheme.native.js.map +6 -0
- package/dist/cjs/addTheme.js +6 -10
- package/dist/cjs/addTheme.js.map +1 -1
- package/dist/cjs/addTheme.native.js +29 -0
- package/dist/cjs/addTheme.native.js.map +6 -0
- package/dist/cjs/index.js +6 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +32 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/cjs/replaceTheme.js +6 -11
- package/dist/cjs/replaceTheme.js.map +1 -1
- package/dist/cjs/replaceTheme.native.js +32 -0
- package/dist/cjs/replaceTheme.native.js.map +6 -0
- package/dist/cjs/updateTheme.js +6 -10
- package/dist/cjs/updateTheme.js.map +1 -1
- package/dist/cjs/updateTheme.native.js +32 -0
- package/dist/cjs/updateTheme.native.js.map +6 -0
- package/dist/esm/_mutateTheme.js +30 -67
- package/dist/esm/_mutateTheme.js.map +1 -1
- package/dist/esm/addTheme.js +1 -1
- package/dist/esm/addTheme.js.map +1 -1
- package/dist/esm/replaceTheme.js +1 -2
- package/dist/esm/replaceTheme.js.map +1 -1
- package/dist/esm/updateTheme.js +1 -1
- package/dist/esm/updateTheme.js.map +1 -1
- package/dist/jsx/_mutateTheme.js +30 -66
- package/dist/jsx/_mutateTheme.js.map +1 -1
- package/dist/jsx/_mutateTheme.native.js +100 -0
- package/dist/jsx/_mutateTheme.native.js.map +6 -0
- package/dist/jsx/addTheme.js +1 -1
- package/dist/jsx/addTheme.js.map +1 -1
- package/dist/jsx/addTheme.native.js +8 -0
- package/dist/jsx/addTheme.native.js.map +6 -0
- package/dist/jsx/index.native.js +8 -0
- package/dist/jsx/index.native.js.map +6 -0
- package/dist/jsx/replaceTheme.js +1 -2
- package/dist/jsx/replaceTheme.js.map +1 -1
- package/dist/jsx/replaceTheme.native.js +11 -0
- package/dist/jsx/replaceTheme.native.js.map +6 -0
- package/dist/jsx/updateTheme.js +1 -1
- package/dist/jsx/updateTheme.js.map +1 -1
- package/dist/jsx/updateTheme.native.js +11 -0
- package/dist/jsx/updateTheme.native.js.map +6 -0
- package/package.json +4 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var updateTheme_exports = {};
|
|
17
|
+
__export(updateTheme_exports, {
|
|
18
|
+
updateTheme: () => updateTheme
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(updateTheme_exports);
|
|
21
|
+
var import_mutateTheme = require("./_mutateTheme");
|
|
22
|
+
function updateTheme({
|
|
23
|
+
name,
|
|
24
|
+
theme
|
|
25
|
+
}) {
|
|
26
|
+
return (0, import_mutateTheme._mutateTheme)({ name, theme, insertCSS: !0, mutationType: "update" });
|
|
27
|
+
}
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
updateTheme
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=updateTheme.js.map
|
package/dist/esm/_mutateTheme.js
CHANGED
|
@@ -12,35 +12,29 @@ import { startTransition } from "react";
|
|
|
12
12
|
function mutateThemes({
|
|
13
13
|
themes,
|
|
14
14
|
batch,
|
|
15
|
-
insertCSS =
|
|
15
|
+
insertCSS = !0,
|
|
16
16
|
...props
|
|
17
17
|
}) {
|
|
18
|
-
const allThemesProxied = {};
|
|
19
|
-
const allThemesRaw = {};
|
|
18
|
+
const allThemesProxied = {}, allThemesRaw = {};
|
|
20
19
|
for (const { name, theme } of themes) {
|
|
21
20
|
const res = _mutateTheme({
|
|
22
21
|
...props,
|
|
23
22
|
name,
|
|
24
23
|
theme,
|
|
25
24
|
// we'll do one update at the end
|
|
26
|
-
avoidUpdate:
|
|
25
|
+
avoidUpdate: !0,
|
|
27
26
|
// always add which also replaces but doesnt fail first time
|
|
28
27
|
mutationType: "add"
|
|
29
28
|
});
|
|
30
|
-
|
|
31
|
-
allThemesProxied[name] = res.theme;
|
|
32
|
-
allThemesRaw[name] = res.themeRaw;
|
|
33
|
-
}
|
|
29
|
+
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
34
30
|
}
|
|
35
31
|
const cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
36
|
-
startTransition(() => {
|
|
32
|
+
return startTransition(() => {
|
|
37
33
|
for (const themeName in allThemesProxied) {
|
|
38
34
|
const theme = allThemesProxied[themeName];
|
|
39
|
-
updateThemeConfig(themeName, theme);
|
|
40
|
-
notifyThemeManagersOfUpdate(themeName, theme);
|
|
35
|
+
updateThemeConfig(themeName, theme), notifyThemeManagersOfUpdate(themeName, theme);
|
|
41
36
|
}
|
|
42
|
-
})
|
|
43
|
-
return {
|
|
37
|
+
}), {
|
|
44
38
|
themes: allThemesProxied,
|
|
45
39
|
themesRaw: allThemesRaw,
|
|
46
40
|
cssRules
|
|
@@ -48,86 +42,61 @@ function mutateThemes({
|
|
|
48
42
|
}
|
|
49
43
|
function _mutateTheme(props) {
|
|
50
44
|
if (isServer) {
|
|
51
|
-
|
|
52
|
-
console.warn("Theme mutation is not supported on server side");
|
|
53
|
-
}
|
|
45
|
+
process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
|
|
54
46
|
return;
|
|
55
47
|
}
|
|
56
|
-
const config = getConfig();
|
|
57
|
-
const { name: themeName, theme: themeIn, insertCSS, mutationType } = props;
|
|
48
|
+
const config = getConfig(), { name: themeName, theme: themeIn, insertCSS, mutationType } = props;
|
|
58
49
|
if (process.env.NODE_ENV === "development") {
|
|
59
|
-
if (!config)
|
|
50
|
+
if (!config)
|
|
60
51
|
throw new Error("No config");
|
|
61
|
-
}
|
|
62
52
|
const theme2 = config.themes[props.name];
|
|
63
|
-
if (mutationType !== "add" && !theme2)
|
|
53
|
+
if (mutationType !== "add" && !theme2)
|
|
64
54
|
throw new Error(
|
|
65
55
|
`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`
|
|
66
56
|
);
|
|
67
|
-
}
|
|
68
57
|
}
|
|
69
58
|
const theme = {
|
|
70
59
|
...mutationType === "update" ? config.themes[themeName] ?? {} : {},
|
|
71
60
|
...themeIn
|
|
72
61
|
};
|
|
73
|
-
for (const key in theme)
|
|
62
|
+
for (const key in theme)
|
|
74
63
|
ensureThemeVariable(theme, key);
|
|
75
|
-
|
|
76
|
-
const themeProxied = proxyThemeToParents(themeName, theme);
|
|
77
|
-
const response = {
|
|
64
|
+
const themeProxied = proxyThemeToParents(themeName, theme), response = {
|
|
78
65
|
themeRaw: theme,
|
|
79
66
|
theme: themeProxied,
|
|
80
67
|
cssRules: []
|
|
81
68
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
if (insertCSS) {
|
|
86
|
-
response.cssRules = insertThemeCSS({
|
|
87
|
-
[themeName]: theme
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
updateThemeConfig(themeName, themeProxied);
|
|
91
|
-
notifyThemeManagersOfUpdate(themeName, themeProxied);
|
|
92
|
-
return response;
|
|
69
|
+
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
70
|
+
[themeName]: theme
|
|
71
|
+
})), updateThemeConfig(themeName, themeProxied), notifyThemeManagersOfUpdate(themeName, themeProxied)), response;
|
|
93
72
|
}
|
|
94
73
|
function updateThemeConfig(themeName, theme) {
|
|
95
74
|
const config = getConfig();
|
|
96
|
-
config.themes[themeName] = theme;
|
|
97
|
-
updateConfig("themes", config.themes);
|
|
75
|
+
config.themes[themeName] = theme, updateConfig("themes", config.themes);
|
|
98
76
|
}
|
|
99
77
|
function notifyThemeManagersOfUpdate(themeName, theme) {
|
|
100
78
|
activeThemeManagers.forEach((manager) => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
);
|
|
109
|
-
}
|
|
79
|
+
manager.state.name === themeName && manager.updateStateFromProps(
|
|
80
|
+
{
|
|
81
|
+
name: themeName,
|
|
82
|
+
forceTheme: theme
|
|
83
|
+
},
|
|
84
|
+
!0
|
|
85
|
+
);
|
|
110
86
|
});
|
|
111
87
|
}
|
|
112
|
-
function insertThemeCSS(themes, batch =
|
|
113
|
-
if (process.env.TAMAGUI_TARGET !== "web") {
|
|
114
|
-
return [];
|
|
115
|
-
}
|
|
88
|
+
function insertThemeCSS(themes, batch = !1) {
|
|
116
89
|
const config = getConfig();
|
|
117
90
|
let cssRules = [];
|
|
118
91
|
for (const themeName in themes) {
|
|
119
|
-
const theme = themes[themeName]
|
|
120
|
-
const rules = getThemeCSSRules({
|
|
92
|
+
const theme = themes[themeName], rules = getThemeCSSRules({
|
|
121
93
|
// @ts-ignore this works but should be fixed types
|
|
122
94
|
config,
|
|
123
95
|
themeName,
|
|
124
96
|
names: [themeName],
|
|
125
97
|
theme
|
|
126
98
|
});
|
|
127
|
-
cssRules = [...cssRules, ...rules];
|
|
128
|
-
if (!batch) {
|
|
129
|
-
updateStyle(`t_theme_style_${themeName}`, rules);
|
|
130
|
-
}
|
|
99
|
+
cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
|
|
131
100
|
}
|
|
132
101
|
if (batch) {
|
|
133
102
|
const id = simpleHash(Object.keys(themes).join(","));
|
|
@@ -136,15 +105,9 @@ function insertThemeCSS(themes, batch = false) {
|
|
|
136
105
|
return cssRules;
|
|
137
106
|
}
|
|
138
107
|
function updateStyle(id, rules) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
style.id = id;
|
|
143
|
-
style.appendChild(document.createTextNode(rules.join("\n")));
|
|
144
|
-
document.head.appendChild(style);
|
|
145
|
-
if (existing) {
|
|
146
|
-
(_a = existing.parentElement) == null ? void 0 : _a.removeChild(existing);
|
|
147
|
-
}
|
|
108
|
+
const existing = document.querySelector(`#${id}`), style = document.createElement("style");
|
|
109
|
+
style.id = id, style.appendChild(document.createTextNode(rules.join(`
|
|
110
|
+
`))), document.head.appendChild(style), existing && existing.parentElement?.removeChild(existing);
|
|
148
111
|
}
|
|
149
112
|
export {
|
|
150
113
|
_mutateTheme,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/_mutateTheme.ts"],
|
|
4
|
-
"mappings": "AAAA,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAgBzB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,GAAG;AACL,GAMG;AACD,QAAM,mBAAgD,CAAC
|
|
4
|
+
"mappings": "AAAA,SAAS,gBAAgB;AAEzB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,EAAE,KAAK,GAAG,CAAC;AACnD,gBAAY,iBAAiB,EAAE,IAAI,QAAQ;AAAA,EAC7C;AAEA,SAAO;AACT;AAEA,SAAS,YAAY,IAAY,OAAiB;AAChD,QAAM,WAAW,SAAS,cAAc,IAAI,EAAE,EAAE,GAC1C,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,KAAK,IACX,MAAM,YAAY,SAAS,eAAe,MAAM,KAAK;AAAA,CAAI,CAAC,CAAC,GAC3D,SAAS,KAAK,YAAY,KAAK,GAC3B,YACF,SAAS,eAAe,YAAY,QAAQ;AAEhD;",
|
|
5
5
|
"names": ["theme"]
|
|
6
6
|
}
|
package/dist/esm/addTheme.js
CHANGED
package/dist/esm/addTheme.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/addTheme.ts"],
|
|
4
|
-
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,SAAS,OAItB;AACD,SAAO,aAAa,EAAE,GAAG,OAAO,WAAW,
|
|
4
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,SAAS,OAItB;AACD,SAAO,aAAa,EAAE,GAAG,OAAO,WAAW,IAAM,cAAc,MAAM,CAAC;AACxE;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/replaceTheme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/replaceTheme.ts"],
|
|
4
|
-
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AACF,GAGG;
|
|
4
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AACF,GAGG;AAED,SADa,aAAa,EAAE,MAAM,OAAO,WAAW,IAAM,cAAc,UAAU,CAAC;AAErF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/updateTheme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/updateTheme.ts"],
|
|
4
|
-
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AACF,GAGG;AACD,SAAO,aAAa,EAAE,MAAM,OAAO,WAAW,
|
|
4
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AACF,GAGG;AACD,SAAO,aAAa,EAAE,MAAM,OAAO,WAAW,IAAM,cAAc,SAAS,CAAC;AAC9E;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/jsx/_mutateTheme.js
CHANGED
|
@@ -12,35 +12,29 @@ import { startTransition } from "react";
|
|
|
12
12
|
function mutateThemes({
|
|
13
13
|
themes,
|
|
14
14
|
batch,
|
|
15
|
-
insertCSS =
|
|
15
|
+
insertCSS = !0,
|
|
16
16
|
...props
|
|
17
17
|
}) {
|
|
18
|
-
const allThemesProxied = {};
|
|
19
|
-
const allThemesRaw = {};
|
|
18
|
+
const allThemesProxied = {}, allThemesRaw = {};
|
|
20
19
|
for (const { name, theme } of themes) {
|
|
21
20
|
const res = _mutateTheme({
|
|
22
21
|
...props,
|
|
23
22
|
name,
|
|
24
23
|
theme,
|
|
25
24
|
// we'll do one update at the end
|
|
26
|
-
avoidUpdate:
|
|
25
|
+
avoidUpdate: !0,
|
|
27
26
|
// always add which also replaces but doesnt fail first time
|
|
28
27
|
mutationType: "add"
|
|
29
28
|
});
|
|
30
|
-
|
|
31
|
-
allThemesProxied[name] = res.theme;
|
|
32
|
-
allThemesRaw[name] = res.themeRaw;
|
|
33
|
-
}
|
|
29
|
+
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
34
30
|
}
|
|
35
31
|
const cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
36
|
-
startTransition(() => {
|
|
32
|
+
return startTransition(() => {
|
|
37
33
|
for (const themeName in allThemesProxied) {
|
|
38
34
|
const theme = allThemesProxied[themeName];
|
|
39
|
-
updateThemeConfig(themeName, theme);
|
|
40
|
-
notifyThemeManagersOfUpdate(themeName, theme);
|
|
35
|
+
updateThemeConfig(themeName, theme), notifyThemeManagersOfUpdate(themeName, theme);
|
|
41
36
|
}
|
|
42
|
-
})
|
|
43
|
-
return {
|
|
37
|
+
}), {
|
|
44
38
|
themes: allThemesProxied,
|
|
45
39
|
themesRaw: allThemesRaw,
|
|
46
40
|
cssRules
|
|
@@ -48,86 +42,61 @@ function mutateThemes({
|
|
|
48
42
|
}
|
|
49
43
|
function _mutateTheme(props) {
|
|
50
44
|
if (isServer) {
|
|
51
|
-
|
|
52
|
-
console.warn("Theme mutation is not supported on server side");
|
|
53
|
-
}
|
|
45
|
+
process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
|
|
54
46
|
return;
|
|
55
47
|
}
|
|
56
|
-
const config = getConfig();
|
|
57
|
-
const { name: themeName, theme: themeIn, insertCSS, mutationType } = props;
|
|
48
|
+
const config = getConfig(), { name: themeName, theme: themeIn, insertCSS, mutationType } = props;
|
|
58
49
|
if (process.env.NODE_ENV === "development") {
|
|
59
|
-
if (!config)
|
|
50
|
+
if (!config)
|
|
60
51
|
throw new Error("No config");
|
|
61
|
-
}
|
|
62
52
|
const theme2 = config.themes[props.name];
|
|
63
|
-
if (mutationType !== "add" && !theme2)
|
|
53
|
+
if (mutationType !== "add" && !theme2)
|
|
64
54
|
throw new Error(
|
|
65
55
|
`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`
|
|
66
56
|
);
|
|
67
|
-
}
|
|
68
57
|
}
|
|
69
58
|
const theme = {
|
|
70
59
|
...mutationType === "update" ? config.themes[themeName] ?? {} : {},
|
|
71
60
|
...themeIn
|
|
72
61
|
};
|
|
73
|
-
for (const key in theme)
|
|
62
|
+
for (const key in theme)
|
|
74
63
|
ensureThemeVariable(theme, key);
|
|
75
|
-
|
|
76
|
-
const themeProxied = proxyThemeToParents(themeName, theme);
|
|
77
|
-
const response = {
|
|
64
|
+
const themeProxied = proxyThemeToParents(themeName, theme), response = {
|
|
78
65
|
themeRaw: theme,
|
|
79
66
|
theme: themeProxied,
|
|
80
67
|
cssRules: []
|
|
81
68
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
if (insertCSS) {
|
|
86
|
-
response.cssRules = insertThemeCSS({
|
|
87
|
-
[themeName]: theme
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
updateThemeConfig(themeName, themeProxied);
|
|
91
|
-
notifyThemeManagersOfUpdate(themeName, themeProxied);
|
|
92
|
-
return response;
|
|
69
|
+
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
70
|
+
[themeName]: theme
|
|
71
|
+
})), updateThemeConfig(themeName, themeProxied), notifyThemeManagersOfUpdate(themeName, themeProxied)), response;
|
|
93
72
|
}
|
|
94
73
|
function updateThemeConfig(themeName, theme) {
|
|
95
74
|
const config = getConfig();
|
|
96
|
-
config.themes[themeName] = theme;
|
|
97
|
-
updateConfig("themes", config.themes);
|
|
75
|
+
config.themes[themeName] = theme, updateConfig("themes", config.themes);
|
|
98
76
|
}
|
|
99
77
|
function notifyThemeManagersOfUpdate(themeName, theme) {
|
|
100
78
|
activeThemeManagers.forEach((manager) => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
);
|
|
109
|
-
}
|
|
79
|
+
manager.state.name === themeName && manager.updateStateFromProps(
|
|
80
|
+
{
|
|
81
|
+
name: themeName,
|
|
82
|
+
forceTheme: theme
|
|
83
|
+
},
|
|
84
|
+
!0
|
|
85
|
+
);
|
|
110
86
|
});
|
|
111
87
|
}
|
|
112
|
-
function insertThemeCSS(themes, batch =
|
|
113
|
-
if (process.env.TAMAGUI_TARGET !== "web") {
|
|
114
|
-
return [];
|
|
115
|
-
}
|
|
88
|
+
function insertThemeCSS(themes, batch = !1) {
|
|
116
89
|
const config = getConfig();
|
|
117
90
|
let cssRules = [];
|
|
118
91
|
for (const themeName in themes) {
|
|
119
|
-
const theme = themes[themeName]
|
|
120
|
-
const rules = getThemeCSSRules({
|
|
92
|
+
const theme = themes[themeName], rules = getThemeCSSRules({
|
|
121
93
|
// @ts-ignore this works but should be fixed types
|
|
122
94
|
config,
|
|
123
95
|
themeName,
|
|
124
96
|
names: [themeName],
|
|
125
97
|
theme
|
|
126
98
|
});
|
|
127
|
-
cssRules = [...cssRules, ...rules];
|
|
128
|
-
if (!batch) {
|
|
129
|
-
updateStyle(`t_theme_style_${themeName}`, rules);
|
|
130
|
-
}
|
|
99
|
+
cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
|
|
131
100
|
}
|
|
132
101
|
if (batch) {
|
|
133
102
|
const id = simpleHash(Object.keys(themes).join(","));
|
|
@@ -136,14 +105,9 @@ function insertThemeCSS(themes, batch = false) {
|
|
|
136
105
|
return cssRules;
|
|
137
106
|
}
|
|
138
107
|
function updateStyle(id, rules) {
|
|
139
|
-
const existing = document.querySelector(`#${id}`);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
style.appendChild(document.createTextNode(rules.join("\n")));
|
|
143
|
-
document.head.appendChild(style);
|
|
144
|
-
if (existing) {
|
|
145
|
-
existing.parentElement?.removeChild(existing);
|
|
146
|
-
}
|
|
108
|
+
const existing = document.querySelector(`#${id}`), style = document.createElement("style");
|
|
109
|
+
style.id = id, style.appendChild(document.createTextNode(rules.join(`
|
|
110
|
+
`))), document.head.appendChild(style), existing && existing.parentElement?.removeChild(existing);
|
|
147
111
|
}
|
|
148
112
|
export {
|
|
149
113
|
_mutateTheme,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
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AK3E,QAAM,SAAS,UAAU;AACzB,MAAI,WAAqB,CAAC;AAE1B,aAAW,aAAa,QAAQ;AAC9B,UAAM,QAAQ,OAAO,SAAS,GAExB,QAAQ,iBAAiB;AAAA;AAAA,MAE7B;AAAA,MACA;AAAA,MACA,OAAO,CAAC,SAAS;AAAA,MACjB;AAAA,IACF,CAAC;AAED,eAAW,CAAC,GAAG,UAAU,GAAG,KAAK,GAE5B,SACH,YAAY,iBAAiB,SAAS,IAAI,KAAK;AAAA,EAEnD;AAEA,MAAI,OAAO;AACT,UAAM,KAAK,WAAW,OAAO,KAAK,MAAM,EAAE,KAAK,GAAG,CAAC;AACnD,gBAAY,iBAAiB,EAAE,IAAI,QAAQ;AAAA,EAC7C;AAEA,SAAO;AACT;AAEA,SAAS,YAAY,IAAY,OAAiB;AAChD,QAAM,WAAW,SAAS,cAAc,IAAI,EAAE,EAAE,GAC1C,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,KAAK,IACX,MAAM,YAAY,SAAS,eAAe,MAAM,KAAK;AAAA,CAAI,CAAC,CAAC,GAC3D,SAAS,KAAK,YAAY,KAAK,GAC3B,YACF,SAAS,eAAe,YAAY,QAAQ;AAEhD;",
|
|
5
5
|
"names": ["theme"]
|
|
6
6
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { isServer } from "@tamagui/constants";
|
|
2
|
+
import {
|
|
3
|
+
activeThemeManagers,
|
|
4
|
+
ensureThemeVariable,
|
|
5
|
+
getConfig,
|
|
6
|
+
getThemeCSSRules,
|
|
7
|
+
proxyThemeToParents,
|
|
8
|
+
simpleHash,
|
|
9
|
+
updateConfig
|
|
10
|
+
} from "@tamagui/web";
|
|
11
|
+
import { startTransition } from "react";
|
|
12
|
+
function mutateThemes({
|
|
13
|
+
themes,
|
|
14
|
+
batch,
|
|
15
|
+
insertCSS = !0,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
const allThemesProxied = {}, allThemesRaw = {};
|
|
19
|
+
for (const { name, theme } of themes) {
|
|
20
|
+
const res = _mutateTheme({
|
|
21
|
+
...props,
|
|
22
|
+
name,
|
|
23
|
+
theme,
|
|
24
|
+
// we'll do one update at the end
|
|
25
|
+
avoidUpdate: !0,
|
|
26
|
+
// always add which also replaces but doesnt fail first time
|
|
27
|
+
mutationType: "add"
|
|
28
|
+
});
|
|
29
|
+
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
30
|
+
}
|
|
31
|
+
const cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
32
|
+
return startTransition(() => {
|
|
33
|
+
for (const themeName in allThemesProxied) {
|
|
34
|
+
const theme = allThemesProxied[themeName];
|
|
35
|
+
updateThemeConfig(themeName, theme), notifyThemeManagersOfUpdate(themeName, theme);
|
|
36
|
+
}
|
|
37
|
+
}), {
|
|
38
|
+
themes: allThemesProxied,
|
|
39
|
+
themesRaw: allThemesRaw,
|
|
40
|
+
cssRules
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function _mutateTheme(props) {
|
|
44
|
+
if (isServer) {
|
|
45
|
+
process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const config = getConfig(), { name: themeName, theme: themeIn, insertCSS, mutationType } = props;
|
|
49
|
+
if (process.env.NODE_ENV === "development") {
|
|
50
|
+
if (!config)
|
|
51
|
+
throw new Error("No config");
|
|
52
|
+
const theme2 = config.themes[props.name];
|
|
53
|
+
if (mutationType !== "add" && !theme2)
|
|
54
|
+
throw new Error(
|
|
55
|
+
`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
const theme = {
|
|
59
|
+
...mutationType === "update" ? config.themes[themeName] ?? {} : {},
|
|
60
|
+
...themeIn
|
|
61
|
+
};
|
|
62
|
+
for (const key in theme)
|
|
63
|
+
ensureThemeVariable(theme, key);
|
|
64
|
+
const themeProxied = proxyThemeToParents(themeName, theme), response = {
|
|
65
|
+
themeRaw: theme,
|
|
66
|
+
theme: themeProxied,
|
|
67
|
+
cssRules: []
|
|
68
|
+
};
|
|
69
|
+
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
70
|
+
[themeName]: theme
|
|
71
|
+
})), updateThemeConfig(themeName, themeProxied), notifyThemeManagersOfUpdate(themeName, themeProxied)), response;
|
|
72
|
+
}
|
|
73
|
+
function updateThemeConfig(themeName, theme) {
|
|
74
|
+
const config = getConfig();
|
|
75
|
+
config.themes[themeName] = theme, updateConfig("themes", config.themes);
|
|
76
|
+
}
|
|
77
|
+
function notifyThemeManagersOfUpdate(themeName, theme) {
|
|
78
|
+
activeThemeManagers.forEach((manager) => {
|
|
79
|
+
manager.state.name === themeName && manager.updateStateFromProps(
|
|
80
|
+
{
|
|
81
|
+
name: themeName,
|
|
82
|
+
forceTheme: theme
|
|
83
|
+
},
|
|
84
|
+
!0
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function insertThemeCSS(themes, batch = !1) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
function updateStyle(id, rules) {
|
|
92
|
+
const existing = document.querySelector(`#${id}`), style = document.createElement("style");
|
|
93
|
+
style.id = id, style.appendChild(document.createTextNode(rules.join(`
|
|
94
|
+
`))), document.head.appendChild(style), existing && existing.parentElement?.removeChild(existing);
|
|
95
|
+
}
|
|
96
|
+
export {
|
|
97
|
+
_mutateTheme,
|
|
98
|
+
mutateThemes
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=_mutateTheme.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/_mutateTheme.ts"],
|
|
4
|
+
"mappings": "AAAA,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA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
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/addTheme.ts"],
|
|
4
|
-
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,SAAS,OAItB;AACD,SAAO,aAAa,EAAE,GAAG,OAAO,WAAW,
|
|
4
|
+
"mappings": "AAEA,SAAS,oBAAoB;AAEtB,SAAS,SAAS,OAItB;AACD,SAAO,aAAa,EAAE,GAAG,OAAO,WAAW,IAAM,cAAc,MAAM,CAAC;AACxE;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/jsx/replaceTheme.js
CHANGED