@tamagui/theme 2.7.7 → 3.0.0-beta.643.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 +101 -116
- package/dist/cjs/_mutateTheme.native.cjs +118 -0
- package/dist/cjs/_mutateTheme.native.js +92 -109
- package/dist/cjs/_mutateTheme.native.js.map +1 -1
- package/dist/cjs/addTheme.cjs +20 -23
- package/dist/cjs/addTheme.native.cjs +34 -0
- package/dist/cjs/addTheme.native.js +20 -22
- package/dist/cjs/addTheme.native.js.map +1 -1
- package/dist/cjs/index.cjs +15 -18
- package/dist/cjs/index.native.cjs +31 -0
- package/dist/cjs/index.native.js +15 -17
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/replaceTheme.cjs +23 -29
- package/dist/cjs/replaceTheme.native.cjs +37 -0
- package/dist/cjs/replaceTheme.native.js +23 -28
- package/dist/cjs/replaceTheme.native.js.map +1 -1
- package/dist/cjs/updateTheme.cjs +22 -28
- package/dist/cjs/updateTheme.native.cjs +36 -0
- package/dist/cjs/updateTheme.native.js +22 -27
- package/dist/cjs/updateTheme.native.js.map +1 -1
- package/dist/esm/_mutateTheme.mjs +88 -100
- package/dist/esm/_mutateTheme.mjs.map +1 -1
- package/dist/esm/_mutateTheme.native.js +78 -93
- package/dist/esm/_mutateTheme.native.js.map +1 -1
- package/dist/esm/addTheme.mjs +7 -5
- package/dist/esm/addTheme.mjs.map +1 -1
- package/dist/esm/addTheme.native.js +7 -5
- package/dist/esm/addTheme.native.js.map +1 -1
- package/dist/esm/index.js +8 -5
- package/dist/esm/index.mjs +8 -5
- package/dist/esm/index.native.js +8 -5
- package/dist/esm/replaceTheme.mjs +10 -11
- package/dist/esm/replaceTheme.mjs.map +1 -1
- package/dist/esm/replaceTheme.native.js +10 -11
- package/dist/esm/replaceTheme.native.js.map +1 -1
- package/dist/esm/updateTheme.mjs +9 -10
- package/dist/esm/updateTheme.mjs.map +1 -1
- package/dist/esm/updateTheme.native.js +9 -10
- package/dist/esm/updateTheme.native.js.map +1 -1
- package/package.json +5 -5
- package/src/_mutateTheme.ts +5 -4
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from "./addTheme.mjs";
|
|
2
|
-
export * from "./updateTheme.mjs";
|
|
3
|
-
export * from "./replaceTheme.mjs";
|
|
4
1
|
import { mutateThemes } from "./_mutateTheme.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
export * from "./addTheme.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./updateTheme.mjs"
|
|
6
|
+
|
|
7
|
+
export * from "./replaceTheme.mjs"
|
|
8
|
+
|
|
9
|
+
export { mutateThemes };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from "./addTheme.mjs";
|
|
2
|
-
export * from "./updateTheme.mjs";
|
|
3
|
-
export * from "./replaceTheme.mjs";
|
|
4
1
|
import { mutateThemes } from "./_mutateTheme.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
export * from "./addTheme.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./updateTheme.mjs"
|
|
6
|
+
|
|
7
|
+
export * from "./replaceTheme.mjs"
|
|
8
|
+
|
|
9
|
+
export { mutateThemes };
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from "./addTheme.native.js";
|
|
2
|
-
export * from "./updateTheme.native.js";
|
|
3
|
-
export * from "./replaceTheme.native.js";
|
|
4
1
|
import { mutateThemes } from "./_mutateTheme.native.js";
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
|
|
3
|
+
export * from "./addTheme.native.js"
|
|
4
|
+
|
|
5
|
+
export * from "./updateTheme.native.js"
|
|
6
|
+
|
|
7
|
+
export * from "./replaceTheme.native.js"
|
|
8
|
+
|
|
9
|
+
export { mutateThemes };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { _mutateTheme } from "./_mutateTheme.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
return next;
|
|
2
|
+
|
|
3
|
+
function replaceTheme({ name, theme }) {
|
|
4
|
+
const next = _mutateTheme({
|
|
5
|
+
name,
|
|
6
|
+
theme,
|
|
7
|
+
insertCSS: true,
|
|
8
|
+
mutationType: "replace"
|
|
9
|
+
});
|
|
10
|
+
return next;
|
|
13
11
|
}
|
|
12
|
+
|
|
14
13
|
export { replaceTheme };
|
|
15
14
|
//# sourceMappingURL=replaceTheme.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"replaceTheme.js","names":[],"sources":["esm/replaceTheme.js"],"sourcesContent":["import { _mutateTheme } from \"./_mutateTheme\";\nfunction replaceTheme({\n name,\n theme\n}) {\n const next = _mutateTheme({ name, theme, insertCSS: true, mutationType: \"replace\" });\n return next;\n}\nexport {\n replaceTheme\n};\n//# sourceMappingURL=replaceTheme.js.map\n"],"mappings":";;;AACA,SAAS,aAAa,EACpB,MACA,SACC;CACD,MAAM,OAAO,aAAa;EAAE;EAAM;EAAO,WAAW;EAAM,cAAc;CAAU,CAAC;CACnF,OAAO;AACT"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { _mutateTheme } from "./_mutateTheme.native.js";
|
|
2
|
+
|
|
2
3
|
function replaceTheme(param) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
mutationType: "replace"
|
|
12
|
-
});
|
|
13
|
-
return next;
|
|
4
|
+
var { name, theme } = param;
|
|
5
|
+
var next = _mutateTheme({
|
|
6
|
+
name,
|
|
7
|
+
theme,
|
|
8
|
+
insertCSS: true,
|
|
9
|
+
mutationType: "replace"
|
|
10
|
+
});
|
|
11
|
+
return next;
|
|
14
12
|
}
|
|
13
|
+
|
|
15
14
|
export { replaceTheme };
|
|
16
15
|
//# sourceMappingURL=replaceTheme.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"replaceTheme.native.js","names":[],"sources":["esm/replaceTheme.native.js"],"sourcesContent":["import { _mutateTheme } from \"./_mutateTheme\";\nfunction replaceTheme(param) {\n var { name, theme } = param;\n var next = _mutateTheme({\n name,\n theme,\n insertCSS: true,\n mutationType: \"replace\"\n });\n return next;\n}\nexport {\n replaceTheme\n};\n//# sourceMappingURL=replaceTheme.js.map\n"],"mappings":";;;AACA,SAAS,aAAa,OAAO;CAC3B,IAAI,EAAE,MAAM,UAAU;CACtB,IAAI,OAAO,aAAa;EACtB;EACA;EACA,WAAW;EACX,cAAc;CAChB,CAAC;CACD,OAAO;AACT"}
|
package/dist/esm/updateTheme.mjs
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { _mutateTheme } from "./_mutateTheme.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
mutationType: "update"
|
|
11
|
-
});
|
|
2
|
+
|
|
3
|
+
function updateTheme({ name, theme }) {
|
|
4
|
+
return _mutateTheme({
|
|
5
|
+
name,
|
|
6
|
+
theme,
|
|
7
|
+
insertCSS: true,
|
|
8
|
+
mutationType: "update"
|
|
9
|
+
});
|
|
12
10
|
}
|
|
11
|
+
|
|
13
12
|
export { updateTheme };
|
|
14
13
|
//# sourceMappingURL=updateTheme.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"updateTheme.js","names":[],"sources":["esm/updateTheme.js"],"sourcesContent":["import { _mutateTheme } from \"./_mutateTheme\";\nfunction updateTheme({\n name,\n theme\n}) {\n return _mutateTheme({ name, theme, insertCSS: true, mutationType: \"update\" });\n}\nexport {\n updateTheme\n};\n//# sourceMappingURL=updateTheme.js.map\n"],"mappings":";;;AACA,SAAS,YAAY,EACnB,MACA,SACC;CACD,OAAO,aAAa;EAAE;EAAM;EAAO,WAAW;EAAM,cAAc;CAAS,CAAC;AAC9E"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { _mutateTheme } from "./_mutateTheme.native.js";
|
|
2
|
+
|
|
2
3
|
function updateTheme(param) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
insertCSS: true,
|
|
11
|
-
mutationType: "update"
|
|
12
|
-
});
|
|
4
|
+
var { name, theme } = param;
|
|
5
|
+
return _mutateTheme({
|
|
6
|
+
name,
|
|
7
|
+
theme,
|
|
8
|
+
insertCSS: true,
|
|
9
|
+
mutationType: "update"
|
|
10
|
+
});
|
|
13
11
|
}
|
|
12
|
+
|
|
14
13
|
export { updateTheme };
|
|
15
14
|
//# sourceMappingURL=updateTheme.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"updateTheme.native.js","names":[],"sources":["esm/updateTheme.native.js"],"sourcesContent":["import { _mutateTheme } from \"./_mutateTheme\";\nfunction updateTheme(param) {\n var { name, theme } = param;\n return _mutateTheme({\n name,\n theme,\n insertCSS: true,\n mutationType: \"update\"\n });\n}\nexport {\n updateTheme\n};\n//# sourceMappingURL=updateTheme.js.map\n"],"mappings":";;;AACA,SAAS,YAAY,OAAO;CAC1B,IAAI,EAAE,MAAM,UAAU;CACtB,OAAO,aAAa;EAClB;EACA;EACA,WAAW;EACX,cAAc;CAChB,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.643.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/constants": "
|
|
38
|
-
"@tamagui/start-transition": "
|
|
39
|
-
"@tamagui/web": "
|
|
37
|
+
"@tamagui/constants": "3.0.0-beta.643.1",
|
|
38
|
+
"@tamagui/start-transition": "3.0.0-beta.643.1",
|
|
39
|
+
"@tamagui/web": "3.0.0-beta.643.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "
|
|
42
|
+
"@tamagui/build": "3.0.0-beta.643.1",
|
|
43
43
|
"react": ">=19"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
package/src/_mutateTheme.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
forceUpdateThemes,
|
|
7
7
|
getConfig,
|
|
8
8
|
getThemeCSSRules,
|
|
9
|
-
|
|
9
|
+
getMutatedAutoVariableCSS,
|
|
10
10
|
proxyThemeToParents,
|
|
11
11
|
simpleHash,
|
|
12
12
|
updateConfig,
|
|
@@ -171,9 +171,10 @@ function insertThemeCSS(themes: Record<string, PartialTheme>, batch: Batch = fal
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
//
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
// output all mutated auto variables because updateStyle replaces the element
|
|
175
|
+
const mutatedAutoVariableCSS = getMutatedAutoVariableCSS()
|
|
176
|
+
if (mutatedAutoVariableCSS) {
|
|
177
|
+
const autoVarCSS = `:root{${mutatedAutoVariableCSS}}`
|
|
177
178
|
updateStyle(`t_mutate_vars`, [autoVarCSS])
|
|
178
179
|
}
|
|
179
180
|
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mutateThemes"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,YAAA,QAAoB","ignoreList":[]}
|
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mutateThemes"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,YAAA,QAAoB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mutateThemes"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAASA,YAAA,QAAoB","ignoreList":[]}
|