@tamagui/generate-themes 1.121.12-1737270844392 → 1.121.12-1737271201540
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/generate-themes.cjs +2 -2
- package/dist/cjs/generate-themes.js +2 -2
- package/dist/cjs/generate-themes.native.js +2 -2
- package/dist/esm/generate-themes.js +2 -2
- package/dist/esm/generate-themes.mjs +2 -2
- package/dist/esm/generate-themes.native.js +2 -2
- package/package.json +5 -5
- package/src/generate-themes.ts +2 -2
|
@@ -113,11 +113,11 @@ ${baseKeys.map(([k]) => ` ${k}: string;
|
|
|
113
113
|
function t(a: [number, number][]) {
|
|
114
114
|
let res: Record<string,string> = {}
|
|
115
115
|
for (const [ki, vi] of a) {
|
|
116
|
-
res[ks[ki] as string] =
|
|
116
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
117
117
|
}
|
|
118
118
|
return res as Theme
|
|
119
119
|
}
|
|
120
|
-
`, out += `
|
|
120
|
+
`, out += `const vs = [
|
|
121
121
|
`;
|
|
122
122
|
let index = 0;
|
|
123
123
|
const valueToIndex = {};
|
|
@@ -103,11 +103,11 @@ ${baseKeys.map(([k]) => ` ${k}: string;
|
|
|
103
103
|
function t(a: [number, number][]) {
|
|
104
104
|
let res: Record<string,string> = {}
|
|
105
105
|
for (const [ki, vi] of a) {
|
|
106
|
-
res[ks[ki] as string] =
|
|
106
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
107
107
|
}
|
|
108
108
|
return res as Theme
|
|
109
109
|
}
|
|
110
|
-
`, out += `
|
|
110
|
+
`, out += `const vs = [
|
|
111
111
|
`;
|
|
112
112
|
let index = 0;
|
|
113
113
|
const valueToIndex = {};
|
|
@@ -116,11 +116,11 @@ ${baseKeys.map(function(param) {
|
|
|
116
116
|
function t(a: [number, number][]) {
|
|
117
117
|
let res: Record<string,string> = {}
|
|
118
118
|
for (const [ki, vi] of a) {
|
|
119
|
-
res[ks[ki] as string] =
|
|
119
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
120
120
|
}
|
|
121
121
|
return res as Theme
|
|
122
122
|
}
|
|
123
|
-
`, out += `
|
|
123
|
+
`, out += `const vs = [
|
|
124
124
|
`;
|
|
125
125
|
var index = 0, valueToIndex = {};
|
|
126
126
|
dedupedTokens.forEach(function(name2, value2) {
|
|
@@ -77,11 +77,11 @@ ${baseKeys.map(([k]) => ` ${k}: string;
|
|
|
77
77
|
function t(a: [number, number][]) {
|
|
78
78
|
let res: Record<string,string> = {}
|
|
79
79
|
for (const [ki, vi] of a) {
|
|
80
|
-
res[ks[ki] as string] =
|
|
80
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
81
81
|
}
|
|
82
82
|
return res as Theme
|
|
83
83
|
}
|
|
84
|
-
`, out += `
|
|
84
|
+
`, out += `const vs = [
|
|
85
85
|
`;
|
|
86
86
|
let index = 0;
|
|
87
87
|
const valueToIndex = {};
|
|
@@ -77,11 +77,11 @@ ${baseKeys.map(([k]) => ` ${k}: string;
|
|
|
77
77
|
function t(a: [number, number][]) {
|
|
78
78
|
let res: Record<string,string> = {}
|
|
79
79
|
for (const [ki, vi] of a) {
|
|
80
|
-
res[ks[ki] as string] =
|
|
80
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
81
81
|
}
|
|
82
82
|
return res as Theme
|
|
83
83
|
}
|
|
84
|
-
`, out += `
|
|
84
|
+
`, out += `const vs = [
|
|
85
85
|
`;
|
|
86
86
|
let index = 0;
|
|
87
87
|
const valueToIndex = {};
|
|
@@ -90,11 +90,11 @@ ${baseKeys.map(function(param) {
|
|
|
90
90
|
function t(a: [number, number][]) {
|
|
91
91
|
let res: Record<string,string> = {}
|
|
92
92
|
for (const [ki, vi] of a) {
|
|
93
|
-
res[ks[ki] as string] =
|
|
93
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
94
94
|
}
|
|
95
95
|
return res as Theme
|
|
96
96
|
}
|
|
97
|
-
`, out += `
|
|
97
|
+
`, out += `const vs = [
|
|
98
98
|
`;
|
|
99
99
|
var index = 0, valueToIndex = {};
|
|
100
100
|
dedupedTokens.forEach(function(name2, value2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/generate-themes",
|
|
3
|
-
"version": "1.121.12-
|
|
3
|
+
"version": "1.121.12-1737271201540",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"clean:build": "tamagui-build clean:build"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/create-theme": "1.121.12-
|
|
37
|
-
"@tamagui/theme-builder": "1.121.12-
|
|
38
|
-
"@tamagui/types": "1.121.12-
|
|
36
|
+
"@tamagui/create-theme": "1.121.12-1737271201540",
|
|
37
|
+
"@tamagui/theme-builder": "1.121.12-1737271201540",
|
|
38
|
+
"@tamagui/types": "1.121.12-1737271201540",
|
|
39
39
|
"esbuild-register": "^3.6.0",
|
|
40
40
|
"fs-extra": "^11.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@tamagui/build": "1.121.12-
|
|
43
|
+
"@tamagui/build": "1.121.12-1737271201540"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/src/generate-themes.ts
CHANGED
|
@@ -145,14 +145,14 @@ ${baseKeys
|
|
|
145
145
|
function t(a: [number, number][]) {
|
|
146
146
|
let res: Record<string,string> = {}
|
|
147
147
|
for (const [ki, vi] of a) {
|
|
148
|
-
res[ks[ki] as string] =
|
|
148
|
+
res[ks[ki] as string] = vs[vi] as string
|
|
149
149
|
}
|
|
150
150
|
return res as Theme
|
|
151
151
|
}
|
|
152
152
|
`
|
|
153
153
|
|
|
154
154
|
// add all token variables
|
|
155
|
-
out += `
|
|
155
|
+
out += `const vs = [\n`
|
|
156
156
|
let index = 0
|
|
157
157
|
const valueToIndex = {}
|
|
158
158
|
dedupedTokens.forEach((name, value) => {
|