@tamagui/theme 1.135.4 → 1.135.6
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.native.js +78 -59
- package/dist/cjs/_mutateTheme.native.js.map +1 -6
- package/dist/cjs/addTheme.native.js +18 -15
- package/dist/cjs/addTheme.native.js.map +1 -6
- package/dist/cjs/index.native.js +22 -21
- package/dist/cjs/index.native.js.map +1 -6
- package/dist/cjs/replaceTheme.native.js +28 -21
- package/dist/cjs/replaceTheme.native.js.map +1 -6
- package/dist/cjs/updateTheme.native.js +22 -16
- package/dist/cjs/updateTheme.native.js.map +1 -6
- package/package.json +6 -5
|
@@ -1,38 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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);
|
|
16
23
|
var mutateTheme_exports = {};
|
|
17
24
|
__export(mutateTheme_exports, {
|
|
18
25
|
_mutateTheme: () => _mutateTheme,
|
|
19
26
|
mutateThemes: () => mutateThemes
|
|
20
27
|
});
|
|
21
28
|
module.exports = __toCommonJS(mutateTheme_exports);
|
|
22
|
-
var import_constants = require("@tamagui/constants"),
|
|
29
|
+
var import_constants = require("@tamagui/constants"),
|
|
30
|
+
import_start_transition = require("@tamagui/start-transition"),
|
|
31
|
+
import_web = require("@tamagui/web");
|
|
23
32
|
function mutateThemes(param) {
|
|
24
|
-
var {
|
|
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;
|
|
25
44
|
try {
|
|
26
45
|
for (var _iterator = themes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
27
|
-
var {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
+
});
|
|
36
59
|
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
37
60
|
}
|
|
38
61
|
} catch (err) {
|
|
@@ -41,12 +64,11 @@ function mutateThemes(param) {
|
|
|
41
64
|
try {
|
|
42
65
|
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
43
66
|
} finally {
|
|
44
|
-
if (_didIteratorError)
|
|
45
|
-
throw _iteratorError;
|
|
67
|
+
if (_didIteratorError) throw _iteratorError;
|
|
46
68
|
}
|
|
47
69
|
}
|
|
48
70
|
var cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
49
|
-
return (0, import_start_transition.startTransition)(function() {
|
|
71
|
+
return (0, import_start_transition.startTransition)(function () {
|
|
50
72
|
for (var themeName in allThemesProxied) {
|
|
51
73
|
var theme2 = allThemesProxied[themeName];
|
|
52
74
|
updateThemeConfig(themeName, theme2);
|
|
@@ -63,25 +85,30 @@ function _mutateTheme(props) {
|
|
|
63
85
|
process.env.NODE_ENV === "development" && console.warn("Theme mutation is not supported on server side");
|
|
64
86
|
return;
|
|
65
87
|
}
|
|
66
|
-
var config = (0, import_web.getConfig)(),
|
|
88
|
+
var config = (0, import_web.getConfig)(),
|
|
89
|
+
{
|
|
90
|
+
name: themeName,
|
|
91
|
+
theme: themeIn,
|
|
92
|
+
insertCSS,
|
|
93
|
+
mutationType
|
|
94
|
+
} = props;
|
|
67
95
|
if (process.env.NODE_ENV === "development") {
|
|
68
|
-
if (!config)
|
|
69
|
-
throw new Error("No config");
|
|
96
|
+
if (!config) throw new Error("No config");
|
|
70
97
|
var theme = config.themes[props.name];
|
|
71
|
-
if (mutationType !== "add" && !theme)
|
|
72
|
-
throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
98
|
+
if (mutationType !== "add" && !theme) throw new Error(`${mutationType === "replace" ? "Replace" : "Update"} theme failed! Theme ${props.name} does not exist`);
|
|
73
99
|
}
|
|
74
|
-
var _config_themes_themeName,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var themeProxied = (0, import_web.proxyThemeToParents)(themeName, theme1),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
+
};
|
|
85
112
|
return props.avoidUpdate || (insertCSS && (response.cssRules = insertThemeCSS({
|
|
86
113
|
[themeName]: theme1
|
|
87
114
|
})), updateThemeConfig(themeName, themeProxied), updateThemeStates()), response;
|
|
@@ -98,19 +125,15 @@ function insertThemeCSS(themes) {
|
|
|
98
125
|
return [];
|
|
99
126
|
var config, cssRules;
|
|
100
127
|
for (var themeName in themes) {
|
|
101
|
-
var theme = themes[themeName],
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
themeName
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
});
|
|
110
|
-
cssRules = [
|
|
111
|
-
...cssRules,
|
|
112
|
-
...rules
|
|
113
|
-
], batch || updateStyle(`t_theme_style_${themeName}`, rules);
|
|
128
|
+
var theme = themes[themeName],
|
|
129
|
+
rules = (0, import_web.getThemeCSSRules)({
|
|
130
|
+
config,
|
|
131
|
+
themeName,
|
|
132
|
+
names: [themeName],
|
|
133
|
+
hasDarkLight: !0,
|
|
134
|
+
theme
|
|
135
|
+
});
|
|
136
|
+
cssRules = [...cssRules, ...rules], batch || updateStyle(`t_theme_style_${themeName}`, rules);
|
|
114
137
|
}
|
|
115
138
|
if (batch) {
|
|
116
139
|
var id;
|
|
@@ -118,16 +141,12 @@ function insertThemeCSS(themes) {
|
|
|
118
141
|
}
|
|
119
142
|
}
|
|
120
143
|
function updateStyle(id, rules) {
|
|
121
|
-
var existing = document.querySelector(`#${id}`),
|
|
144
|
+
var existing = document.querySelector(`#${id}`),
|
|
145
|
+
style = document.createElement("style");
|
|
122
146
|
if (style.id = id, style.appendChild(document.createTextNode(rules.join(`
|
|
123
147
|
`))), document.head.appendChild(style), existing) {
|
|
124
148
|
var _existing_parentElement;
|
|
125
149
|
(_existing_parentElement = existing.parentElement) === null || _existing_parentElement === void 0 || _existing_parentElement.removeChild(existing);
|
|
126
150
|
}
|
|
127
151
|
}
|
|
128
|
-
|
|
129
|
-
0 && (module.exports = {
|
|
130
|
-
_mutateTheme,
|
|
131
|
-
mutateThemes
|
|
132
|
-
});
|
|
133
|
-
//# sourceMappingURL=_mutateTheme.js.map
|
|
152
|
+
//# sourceMappingURL=_mutateTheme.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/_mutateTheme.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAyB,+BACzB,0BAAgC,sCAChC,aAAmI;AAG5H,SAAS,aAAa,OAG7B;AACI,MAAI,EAAE,QAAQ,OAAO,YAAY,IAAM,GAAG,MAAM,IAAI,OAChD,mBAAmB,CAAC,GACpB,eAAe,CAAC,GAChB,4BAA4B,IAAM,oBAAoB,IAAO,iBAAiB;AAClF,MAAI;AACA,aAAQ,YAAY,OAAO,OAAO,QAAQ,EAAE,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,GAAG,OAAO,4BAA4B,IAAK;AACnJ,UAAI,EAAE,MAAM,MAAM,IAAI,MAAM,OACxB,MAAM,aAAa;AAAA,QACnB,GAAG;AAAA,QACH;AAAA,QACA;AAAA;AAAA,QAEA,aAAa;AAAA;AAAA,QAEb,cAAc;AAAA,M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,KAAC,0BAA0B,SAAS,mBAAmB,QAAQ,4BAA4B,UAAkB,wBAAwB,YAAY,QAAQ;AAAA,EAC7J;AACJ;",
|
|
5
|
-
"names": ["theme"]
|
|
6
|
-
}
|
|
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","updateStyle"],"sources":["../../src/_mutateTheme.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,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAV,YAAyB,CAAAK,mBAAA;AA8BlB,IAAAM,gBAAS,GAAaC,OAAA;EAAAC,uBAAA,GAAAD,OAAA;EAAAE,UAAA,GAAAF,OAAA;AAAA,SAC3BJ,aAAAO,KAAA;EACA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,SAAA;MAAA,GAAAC;IAAA,IAAAJ,KAAA;IAAAK,gBAAA;IAAAC,YAAA;IAAAC,yBAAA;IAAAC,iBAAA;IAAAC,cAAA;EACA;IACA,KAAG,IAAAC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,SAAI6B,iBAAsBA,CAAA;EAE1B,IAAA/B,UAAW,CAAAmD,iBAAqB;AAC9B;AAE+B,SAC7BzB,eAAAxB,MAAA;EAAA,IACAC,KAAA,GAAAiD,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;EAAA,OACA;EAAiB,IACjBb,MAAA,EAAAd,QAAc;EAAA,KACd,IAAAG,SAAA,IAAA1B,MAAA;IACF,IAACgB,KAAA,GAAAhB,MAAA,CAAA0B,SAAA;MAAA0B,KAAA,OAAAtD,UAAA,CAAAuD,gBAAA;QAEDhB,MAAA;QAKFX,SAAA;QAEI4B,KAAA,EAAO,CACT5B,SAAW,CACX;QACF6B,YAAA;QAEAvC;MACF;IAEAO,QAAS,IACP,GAAMA,QAAA,EAEN,GAAM6B,KAAK,CACgD,EAC3DnD,KAAA,IAASuD,WAAK,kBACV9B,SACF,IAAA0B,KAAS;EAEb","ignoreList":[]}
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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);
|
|
16
23
|
var addTheme_exports = {};
|
|
17
24
|
__export(addTheme_exports, {
|
|
18
25
|
addTheme: () => addTheme
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(addTheme_exports);
|
|
21
|
-
var import_mutateTheme = require("./_mutateTheme");
|
|
28
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
22
29
|
function addTheme(props) {
|
|
23
30
|
return (0, import_mutateTheme._mutateTheme)({
|
|
24
31
|
...props,
|
|
@@ -26,8 +33,4 @@ function addTheme(props) {
|
|
|
26
33
|
mutationType: "add"
|
|
27
34
|
});
|
|
28
35
|
}
|
|
29
|
-
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
addTheme
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=addTheme.js.map
|
|
36
|
+
//# sourceMappingURL=addTheme.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/addTheme.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA6B;AACtB,SAAS,SAAS,OAAO;AAC5B,aAAO,iCAAa;AAAA,IAChB,GAAG;AAAA,IACH,WAAW;AAAA,IACX,cAAc;AAAA,EAClB,CAAC;AACL;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
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":[]}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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);
|
|
16
24
|
var index_exports = {};
|
|
17
25
|
__export(index_exports, {
|
|
18
26
|
mutateThemes: () => import_mutateTheme.mutateThemes
|
|
19
27
|
});
|
|
20
28
|
module.exports = __toCommonJS(index_exports);
|
|
21
|
-
__reExport(index_exports, require("./addTheme"), module.exports);
|
|
22
|
-
__reExport(index_exports, require("./updateTheme"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./replaceTheme"), module.exports);
|
|
24
|
-
var import_mutateTheme = require("./_mutateTheme");
|
|
25
|
-
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
mutateThemes,
|
|
28
|
-
...require("./addTheme"),
|
|
29
|
-
...require("./updateTheme"),
|
|
30
|
-
...require("./replaceTheme")
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
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
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,uBAAd;AACA,0BAAc,0BADd;AAEA,0BAAc,2BAFd;AAGA,yBAA6B;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
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":[]}
|
|
@@ -1,35 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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);
|
|
16
23
|
var replaceTheme_exports = {};
|
|
17
24
|
__export(replaceTheme_exports, {
|
|
18
25
|
replaceTheme: () => replaceTheme
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(replaceTheme_exports);
|
|
21
|
-
var import_mutateTheme = require("./_mutateTheme");
|
|
28
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
22
29
|
function replaceTheme(param) {
|
|
23
|
-
var {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
});
|
|
29
40
|
return next;
|
|
30
41
|
}
|
|
31
|
-
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
replaceTheme
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=replaceTheme.js.map
|
|
42
|
+
//# sourceMappingURL=replaceTheme.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/replaceTheme.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA6B;AACtB,SAAS,aAAa,OAAO;AAChC,MAAI,EAAE,MAAM,MAAM,IAAI,OAClB,WAAO,iCAAa;AAAA,IACpB;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,cAAc;AAAA,EAClB,CAAC;AACD,SAAO;AACX;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
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":[]}
|
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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);
|
|
16
23
|
var updateTheme_exports = {};
|
|
17
24
|
__export(updateTheme_exports, {
|
|
18
25
|
updateTheme: () => updateTheme
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(updateTheme_exports);
|
|
21
|
-
var import_mutateTheme = require("./_mutateTheme");
|
|
28
|
+
var import_mutateTheme = require("./_mutateTheme.native.js");
|
|
22
29
|
function updateTheme(param) {
|
|
23
|
-
var {
|
|
30
|
+
var {
|
|
31
|
+
name,
|
|
32
|
+
theme
|
|
33
|
+
} = param;
|
|
24
34
|
return (0, import_mutateTheme._mutateTheme)({
|
|
25
35
|
name,
|
|
26
36
|
theme,
|
|
@@ -28,8 +38,4 @@ function updateTheme(param) {
|
|
|
28
38
|
mutationType: "update"
|
|
29
39
|
});
|
|
30
40
|
}
|
|
31
|
-
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
updateTheme
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=updateTheme.js.map
|
|
41
|
+
//# sourceMappingURL=updateTheme.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/updateTheme.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA6B;AACtB,SAAS,YAAY,OAAO;AAC/B,MAAI,EAAE,MAAM,MAAM,IAAI;AACtB,aAAO,iCAAa;AAAA,IAChB;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,cAAc;AAAA,EAClB,CAAC;AACL;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/theme",
|
|
3
|
-
"version": "1.135.
|
|
3
|
+
"version": "1.135.6",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"sideEffects": false,
|
|
5
6
|
"source": "src/index.ts",
|
|
6
7
|
"types": "./types/index.d.ts",
|
|
@@ -33,12 +34,12 @@
|
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@tamagui/constants": "1.135.
|
|
37
|
-
"@tamagui/start-transition": "1.135.
|
|
38
|
-
"@tamagui/web": "1.135.
|
|
37
|
+
"@tamagui/constants": "1.135.6",
|
|
38
|
+
"@tamagui/start-transition": "1.135.6",
|
|
39
|
+
"@tamagui/web": "1.135.6"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.135.
|
|
42
|
+
"@tamagui/build": "1.135.6",
|
|
42
43
|
"react": "*"
|
|
43
44
|
},
|
|
44
45
|
"publishConfig": {
|