@tamagui/static 1.99.0 → 1.100.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/checkDeps.native.js +53 -58
- package/dist/cjs/checkDeps.native.js.map +1 -1
- package/dist/cjs/extractor/bundle.native.js +65 -79
- package/dist/cjs/extractor/bundle.native.js.map +1 -1
- package/dist/cjs/extractor/bundleConfig.js +2 -4
- package/dist/cjs/extractor/bundleConfig.js.map +1 -1
- package/dist/cjs/extractor/bundleConfig.native.js +67 -83
- package/dist/cjs/extractor/bundleConfig.native.js.map +1 -1
- package/dist/cjs/extractor/createExtractor.js +8 -16
- package/dist/cjs/extractor/createExtractor.js.map +1 -1
- package/dist/cjs/extractor/createExtractor.native.js +70 -92
- package/dist/cjs/extractor/createExtractor.native.js.map +1 -1
- package/dist/cjs/extractor/extractHelpers.js +4 -8
- package/dist/cjs/extractor/extractHelpers.js.map +1 -1
- package/dist/cjs/extractor/extractHelpers.native.js +11 -22
- package/dist/cjs/extractor/extractHelpers.native.js.map +1 -1
- package/dist/cjs/extractor/extractMediaStyle.js +3 -6
- package/dist/cjs/extractor/extractMediaStyle.js.map +1 -1
- package/dist/cjs/extractor/extractMediaStyle.native.js +10 -20
- package/dist/cjs/extractor/extractMediaStyle.native.js.map +1 -1
- package/dist/cjs/extractor/extractToClassNames.js +5 -7
- package/dist/cjs/extractor/extractToClassNames.js.map +1 -1
- package/dist/cjs/extractor/extractToClassNames.native.js +66 -79
- package/dist/cjs/extractor/extractToClassNames.native.js.map +1 -1
- package/dist/cjs/extractor/generateTamaguiStudioConfig.js +3 -6
- package/dist/cjs/extractor/generateTamaguiStudioConfig.js.map +1 -1
- package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +63 -78
- package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +1 -1
- package/dist/cjs/extractor/generatedUid.native.js +2 -4
- package/dist/cjs/extractor/generatedUid.native.js.map +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.js +4 -8
- package/dist/cjs/extractor/getStaticBindingsForScope.js.map +1 -1
- package/dist/cjs/extractor/getStaticBindingsForScope.native.js +82 -94
- package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +1 -1
- package/dist/cjs/extractor/hoistClassNames.js +1 -2
- package/dist/cjs/extractor/hoistClassNames.js.map +1 -1
- package/dist/cjs/extractor/hoistClassNames.native.js +1 -2
- package/dist/cjs/extractor/hoistClassNames.native.js.map +1 -1
- package/dist/cjs/extractor/literalToAst.native.js +6 -12
- package/dist/cjs/extractor/literalToAst.native.js.map +1 -1
- package/dist/cjs/extractor/loadTamagui.native.js +75 -92
- package/dist/cjs/extractor/loadTamagui.native.js.map +1 -1
- package/dist/cjs/extractor/normalizeTernaries.native.js +2 -4
- package/dist/cjs/extractor/normalizeTernaries.native.js.map +1 -1
- package/dist/cjs/extractor/removeUnusedHooks.js +2 -4
- package/dist/cjs/extractor/removeUnusedHooks.js.map +1 -1
- package/dist/cjs/extractor/removeUnusedHooks.native.js +4 -8
- package/dist/cjs/extractor/removeUnusedHooks.native.js.map +1 -1
- package/dist/cjs/extractor/watchTamaguiConfig.native.js +57 -63
- package/dist/cjs/extractor/watchTamaguiConfig.native.js.map +1 -1
- package/dist/cjs/server.native.js +53 -58
- package/dist/cjs/server.native.js.map +1 -1
- package/dist/esm/checkDeps.native.js +53 -58
- package/dist/esm/checkDeps.native.js.map +1 -1
- package/dist/esm/extractor/bundle.native.js +65 -79
- package/dist/esm/extractor/bundle.native.js.map +1 -1
- package/dist/esm/extractor/bundleConfig.js +2 -4
- package/dist/esm/extractor/bundleConfig.js.map +1 -1
- package/dist/esm/extractor/bundleConfig.native.js +67 -83
- package/dist/esm/extractor/bundleConfig.native.js.map +1 -1
- package/dist/esm/extractor/createExtractor.js +8 -16
- package/dist/esm/extractor/createExtractor.js.map +1 -1
- package/dist/esm/extractor/createExtractor.native.js +70 -92
- package/dist/esm/extractor/createExtractor.native.js.map +1 -1
- package/dist/esm/extractor/extractHelpers.js +4 -8
- package/dist/esm/extractor/extractHelpers.js.map +1 -1
- package/dist/esm/extractor/extractHelpers.native.js +11 -22
- package/dist/esm/extractor/extractHelpers.native.js.map +1 -1
- package/dist/esm/extractor/extractMediaStyle.js +3 -6
- package/dist/esm/extractor/extractMediaStyle.js.map +1 -1
- package/dist/esm/extractor/extractMediaStyle.native.js +10 -20
- package/dist/esm/extractor/extractMediaStyle.native.js.map +1 -1
- package/dist/esm/extractor/extractToClassNames.js +5 -7
- package/dist/esm/extractor/extractToClassNames.js.map +1 -1
- package/dist/esm/extractor/extractToClassNames.native.js +66 -79
- package/dist/esm/extractor/extractToClassNames.native.js.map +1 -1
- package/dist/esm/extractor/generateTamaguiStudioConfig.js +3 -6
- package/dist/esm/extractor/generateTamaguiStudioConfig.js.map +1 -1
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +63 -78
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +1 -1
- package/dist/esm/extractor/generatedUid.native.js +2 -4
- package/dist/esm/extractor/generatedUid.native.js.map +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.js +4 -8
- package/dist/esm/extractor/getStaticBindingsForScope.js.map +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.native.js +82 -94
- package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +1 -1
- package/dist/esm/extractor/hoistClassNames.js +1 -2
- package/dist/esm/extractor/hoistClassNames.js.map +1 -1
- package/dist/esm/extractor/hoistClassNames.native.js +1 -2
- package/dist/esm/extractor/hoistClassNames.native.js.map +1 -1
- package/dist/esm/extractor/literalToAst.native.js +6 -12
- package/dist/esm/extractor/literalToAst.native.js.map +1 -1
- package/dist/esm/extractor/loadTamagui.native.js +75 -92
- package/dist/esm/extractor/loadTamagui.native.js.map +1 -1
- package/dist/esm/extractor/normalizeTernaries.native.js +2 -4
- package/dist/esm/extractor/normalizeTernaries.native.js.map +1 -1
- package/dist/esm/extractor/removeUnusedHooks.js +2 -4
- package/dist/esm/extractor/removeUnusedHooks.js.map +1 -1
- package/dist/esm/extractor/removeUnusedHooks.native.js +4 -8
- package/dist/esm/extractor/removeUnusedHooks.native.js.map +1 -1
- package/dist/esm/extractor/watchTamaguiConfig.native.js +57 -63
- package/dist/esm/extractor/watchTamaguiConfig.native.js.map +1 -1
- package/dist/esm/server.native.js +53 -58
- package/dist/esm/server.native.js.map +1 -1
- package/package.json +16 -15
@@ -16,13 +16,11 @@ import { timer } from "./timer";
|
|
16
16
|
import { createLogger } from "./createLogger";
|
17
17
|
function _array_like_to_array(arr, len) {
|
18
18
|
(len == null || len > arr.length) && (len = arr.length);
|
19
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
20
|
-
arr2[i] = arr[i];
|
19
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
21
20
|
return arr2;
|
22
21
|
}
|
23
22
|
function _array_without_holes(arr) {
|
24
|
-
if (Array.isArray(arr))
|
25
|
-
return _array_like_to_array(arr);
|
23
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
26
24
|
}
|
27
25
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
28
26
|
try {
|
@@ -57,8 +55,7 @@ function _define_property(obj, key, value) {
|
|
57
55
|
}) : obj[key] = value, obj;
|
58
56
|
}
|
59
57
|
function _iterable_to_array(iter) {
|
60
|
-
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
61
|
-
return Array.from(iter);
|
58
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
62
59
|
}
|
63
60
|
function _non_iterable_spread() {
|
64
61
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
@@ -94,21 +91,17 @@ function _to_consumable_array(arr) {
|
|
94
91
|
}
|
95
92
|
function _unsupported_iterable_to_array(o, minLen) {
|
96
93
|
if (o) {
|
97
|
-
if (typeof o == "string")
|
98
|
-
return _array_like_to_array(o, minLen);
|
94
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
99
95
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
100
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
101
|
-
|
102
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
103
|
-
return _array_like_to_array(o, minLen);
|
96
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
97
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
104
98
|
}
|
105
99
|
}
|
106
100
|
function _ts_generator(thisArg, body) {
|
107
101
|
var f, y, t2, g, _ = {
|
108
102
|
label: 0,
|
109
103
|
sent: function() {
|
110
|
-
if (t2[0] & 1)
|
111
|
-
throw t2[1];
|
104
|
+
if (t2[0] & 1) throw t2[1];
|
112
105
|
return t2[1];
|
113
106
|
},
|
114
107
|
trys: [],
|
@@ -130,64 +123,60 @@ function _ts_generator(thisArg, body) {
|
|
130
123
|
};
|
131
124
|
}
|
132
125
|
function step(op) {
|
133
|
-
if (f)
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
default:
|
161
|
-
if (t2 = _.trys, !(t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
162
|
-
_ = 0;
|
163
|
-
continue;
|
164
|
-
}
|
165
|
-
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
166
|
-
_.label = op[1];
|
167
|
-
break;
|
168
|
-
}
|
169
|
-
if (op[0] === 6 && _.label < t2[1]) {
|
170
|
-
_.label = t2[1], t2 = op;
|
171
|
-
break;
|
172
|
-
}
|
173
|
-
if (t2 && _.label < t2[2]) {
|
174
|
-
_.label = t2[2], _.ops.push(op);
|
175
|
-
break;
|
176
|
-
}
|
177
|
-
t2[2] && _.ops.pop(), _.trys.pop();
|
126
|
+
if (f) throw new TypeError("Generator is already executing.");
|
127
|
+
for (; _; ) try {
|
128
|
+
if (f = 1, y && (t2 = op[0] & 2 ? y.return : op[0] ? y.throw || ((t2 = y.return) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) return t2;
|
129
|
+
switch (y = 0, t2 && (op = [
|
130
|
+
op[0] & 2,
|
131
|
+
t2.value
|
132
|
+
]), op[0]) {
|
133
|
+
case 0:
|
134
|
+
case 1:
|
135
|
+
t2 = op;
|
136
|
+
break;
|
137
|
+
case 4:
|
138
|
+
return _.label++, {
|
139
|
+
value: op[1],
|
140
|
+
done: !1
|
141
|
+
};
|
142
|
+
case 5:
|
143
|
+
_.label++, y = op[1], op = [
|
144
|
+
0
|
145
|
+
];
|
146
|
+
continue;
|
147
|
+
case 7:
|
148
|
+
op = _.ops.pop(), _.trys.pop();
|
149
|
+
continue;
|
150
|
+
default:
|
151
|
+
if (t2 = _.trys, !(t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
152
|
+
_ = 0;
|
178
153
|
continue;
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
154
|
+
}
|
155
|
+
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
|
156
|
+
_.label = op[1];
|
157
|
+
break;
|
158
|
+
}
|
159
|
+
if (op[0] === 6 && _.label < t2[1]) {
|
160
|
+
_.label = t2[1], t2 = op;
|
161
|
+
break;
|
162
|
+
}
|
163
|
+
if (t2 && _.label < t2[2]) {
|
164
|
+
_.label = t2[2], _.ops.push(op);
|
165
|
+
break;
|
166
|
+
}
|
167
|
+
t2[2] && _.ops.pop(), _.trys.pop();
|
168
|
+
continue;
|
188
169
|
}
|
189
|
-
|
190
|
-
|
170
|
+
op = body.call(thisArg, _);
|
171
|
+
} catch (e) {
|
172
|
+
op = [
|
173
|
+
6,
|
174
|
+
e
|
175
|
+
], y = 0;
|
176
|
+
} finally {
|
177
|
+
f = t2 = 0;
|
178
|
+
}
|
179
|
+
if (op[0] & 5) throw op[1];
|
191
180
|
return {
|
192
181
|
value: op[0] ? op[1] : void 0,
|
193
182
|
done: !0
|
@@ -299,8 +288,7 @@ function _extractToClassNames() {
|
|
299
288
|
}
|
300
289
|
return style2;
|
301
290
|
}, addStyles = function(style2) {
|
302
|
-
if (!style2)
|
303
|
-
return [];
|
291
|
+
if (!style2) return [];
|
304
292
|
var styleWithPrev = ensureNeededPrevStyle(style2), res2 = getStylesAtomic(styleWithPrev);
|
305
293
|
return res2.length && (finalStyles = _to_consumable_array(finalStyles).concat(_to_consumable_array(res2))), res2;
|
306
294
|
}, lastMediaImportance = 1, _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
|
@@ -421,14 +409,13 @@ function _extractToClassNames() {
|
|
421
409
|
var val1 = cssMap.get(className);
|
422
410
|
val1.commentTexts.push(comment), cssMap.set(className, val1);
|
423
411
|
}
|
424
|
-
} else
|
425
|
-
rules.
|
426
|
-
css: rules.join(`
|
412
|
+
} else rules.length && cssMap.set(className, {
|
413
|
+
css: rules.join(`
|
427
414
|
`),
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
415
|
+
commentTexts: [
|
416
|
+
comment
|
417
|
+
]
|
418
|
+
});
|
432
419
|
}
|
433
420
|
} catch (err) {
|
434
421
|
_didIteratorError3 = !0, _iteratorError3 = err;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/extractToClassNames.ts"],
|
4
|
-
"mappings": "AAAA,YAAYA,UAAU;AACtB,YAAYC,UAAU;AAEtB,OAAOC,cAAc;AACrB,YAAYC,OAAO;AACnB,YAAYC,aAAa;AAGzB,SAASC,0BAA0B;AAEnC,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAE/B,SAASC,6BAA6B;AACtC,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,uCAAuC;AAChD,SAASC,aAAa;AACtB,SAASC,oBAAoB
|
4
|
+
"mappings": "AAAA,YAAYA,UAAU;AACtB,YAAYC,UAAU;AAEtB,OAAOC,cAAc;AACrB,YAAYC,OAAO;AACnB,YAAYC,aAAa;AAGzB,SAASC,0BAA0B;AAEnC,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAE/B,SAASC,6BAA6B;AACtC,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,uCAAuC;AAChD,SAASC,aAAa;AACtB,SAASC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7B,IAAMC,mBAAmB;EACvBC,eAAe;EACfC,cAAc;EACdC,aAAa;EACbC,cAAc;AAChB;AAkBA,SAAsBC,oBAAoB,GAMf;SANLA,qBAAAA,MAAAA,MAAAA,SAAAA;;SAAAA,uBAAAA;AAAAA,gCAAf,oBAAA,SAAmC,OAMf;QALzBC,WACAC,QAAAA,mBACAC,YACAC,SACAC,kBAEMC,IACEC,iBA4BFC,UAGFC,KAWEC,QACAC,gBAEF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,OAAO+H,OAAM,CAAA,EACpC7E,IAAI,SAACC,GAAAA;mBAAMA,EAAE1B;aACbC,KAAK;CAAA,EACLsG,KAAI,GAGD3H,SAASlC,SACb4B,KACA;YACEkI,SAAS;YACTC,UAAUzI;;YAEV0I,aAAa;YACbC,gBAAgB3I;YAChB4I,YAAY;UACd,GACA7I,MAAAA,GAGEG,qBACFY,QAAQoB,KACN;;;GACAtB,OAAOiI,KACJC,MAAM;CAAA,EACNtB,OAAO,SAAC9D,GAAAA;mBAAM,CAACA,EAAEqF,WAAW,IAAA;aAC5B9G,KAAK;CAAA,CAAA,GAEVnB,QAAQoB,KAAK;;;GAA0CvB,MAAAA,IAGzDN,SAASK,GAAAA,GAET;;YAAO;cACLJ;cACAK;cACAqI,IAAIpI,OAAOiI;cACXpF,KAAK7C,OAAO6C;YACd;;;;EACF,CAAA,GAzZsB5D,qBAAAA,MAAAA,MAAAA,SAAAA;;",
|
5
5
|
"names": ["path", "util", "generate", "t", "helpers", "requireTamaguiCore", "babelParse", "buildClassName", "ensureImportingConcat", "isSimpleSpread", "extractMediaStyle", "hoistClassNames", "logLines", "getFontFamilyClassNameFromProps", "timer", "createLogger", "mergeStyleGroups", "shadowOpacity", "shadowRadius", "shadowColor", "shadowOffset", "extractToClassNames", "extractor", "source", "sourcePath", "options", "shouldPrintDebug", "tm", "getStylesAtomic", "printLog", "ast", "cssMap", "existingHoists", "hasFlattened", "res", "styles", "result", "includes", "console", "warn", "Error", "isAbsolute", "test", "slice", "disableExtraction", "loadTamagui", "err", "error", "mark", "Map", "parse", "platform", "extractStyledDefinitions", "onStyleRule", "identifier", "rules", "css", "join", "info", "set", "commentTexts", "getFlattenedNode", "param", "tag", "onExtractTag", "parserProps", "attrs", "node", "attemptEval", "jsxPath", "originalNodeName", "filePath", "lineNumbers", "programPath", "isFlattened", "staticConfig", "addTernaryStyle", "ternary", "a", "b", "cCN", "map", "x", "aCN", "length", "finalClassNames", "push", "conditionalExpression", "stringLiteral", "acceptsClassName", "didFlattenThisTag", "finalAttrs", "finalStyles", "viewStyles", "attr", "type", "value", "ensureNeededPrevStyle", "style", "keys", "Object", "some", "key", "k", "addStyles", "styleWithPrev", "lastMediaImportance", "newFontFamily", "newClassNames", "concatClassName", "existing", "find", "previous", "replace", "prop", "pseudo", "property", "jsxAttribute", "jsxIdentifier", "val", "isJSXSpreadAttribute", "logicalExpression", "argument", "memberExpression", "name", "evaluatedValue", "mediaExtraction", "getTamagui", "ternaryWithoutMedia", "inlineMediaQuery", "mediaStyles", "consequent", "alternate", "attributes", "extraClassNames", "process", "env", "TAMAGUI_DEBUG_OPTIMIZATIONS", "componentName", "names", "nameExpr", "expr", "isIdentifier", "simpleSpreads", "filter", "callExpression", "jsxExpressionContainer", "comment", "format", "className", "has", "get", "modified", "optimized", "flattened", "styled", "Array", "from", "values", "trim", "concise", "filename", "retainLines", "sourceFileName", "sourceMaps", "code", "split", "startsWith", "js"]
|
6
6
|
}
|
@@ -7,8 +7,7 @@ const tamaguiDir = join(process.cwd(), ".tamagui"), confFile = join(tamaguiDir,
|
|
7
7
|
async function generateTamaguiStudioConfig(tamaguiOptions, configIn, rebuild = !1) {
|
8
8
|
try {
|
9
9
|
const config = configIn ?? await getBundledConfig(tamaguiOptions, rebuild);
|
10
|
-
if (!config)
|
11
|
-
return;
|
10
|
+
if (!config) return;
|
12
11
|
const out = transformConfig(config, tamaguiOptions.platform || "web");
|
13
12
|
await FS.ensureDir(dirname(confFile)), await FS.writeJSON(confFile, out, {
|
14
13
|
spaces: 2
|
@@ -37,10 +36,8 @@ async function generateTamaguiThemes(tamaguiOptions, force = !1) {
|
|
37
36
|
try {
|
38
37
|
if (!await FS.pathExists(
|
39
38
|
join(tamaguiDir, "theme-builder.json")
|
40
|
-
))
|
41
|
-
|
42
|
-
if (!generatedOutput)
|
43
|
-
return !1;
|
39
|
+
)) return !0;
|
40
|
+
if (!generatedOutput) return !1;
|
44
41
|
const next = generatedOutput.generated, current = await FS.readFile(outPath, "utf-8");
|
45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AAI,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAE;AAAA,EACvF;AACF;AAEA,SAAS,gBAAgB,QAAuB,UAA2B;AACzE,MAAI,CAAC;AACH,WAAO;AAGT,QAAM,EAAE,iBAAiB,IAAI,mBAAmB,QAAQ,GAGlD,OAAO,cAAc,QAAQ;AAAA,IACjC,aAAa;AAAA,EACf,CAAC,GAEK,EAAE,YAAY,aAAa,cAAc,IAAI,MAC7C,EAAE,QAAQ,OAAO,IAAI;AAK3B,aAAW,OAAO,QAAQ;AACxB,UAAM,QAAQ,OAAO,GAAG;AAExB,UAAM,KAAK;AACX,eAAW,QAAQ;AACjB,YAAM,IAAI,IAAI,iBAAiB,MAAM,IAAI,CAAC;AAAA,EAE9C;AAGA,aAAW,OAAO,QAAQ;AACxB,UAAM,QAAQ,EAAE,GAAG,OAAO,GAAG,EAAE;AAC/B,eAAW,QAAQ;AACjB,YAAM,IAAI,IAAI,iBAAiB,MAAM,IAAI,CAAC;AAAA,EAE9C;AAGA,aAAW,aAAa;AACtB,eAAW,KAAK,UAAU,YAAY;AAEpC,YAAM,iBAAiB,EAAE,GAAG,UAAU,WAAW,CAAC,EAAE;AACpD,gBAAU,WAAW,CAAC,IAAI;AAE1B,YAAM,EAAE,oBAAoB,GAAG,KAAK,IAAI,eAAe;AACvD,qBAAe,eAAe;AAAA,IAChC;AAIF,OAAK,cAAc,CAAC;AACpB,aAAW,OAAO;AAChB,SAAK,YAAY,GAAG,IAAI,CAAC,GAAG,YAAY,GAAG,CAAC;AAI9C,QAAM,EAAE,aAAa,QAAQ,cAAc,aAAa,GAAG,cAAc,IACvE,KAAK;AAEP,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,eAAe;AAAA,EACjB;AACF;",
|
5
5
|
"names": []
|
6
6
|
}
|
@@ -5,17 +5,14 @@ import { requireTamaguiCore } from "../helpers/requireTamaguiCore";
|
|
5
5
|
import { getBundledConfig } from "./bundleConfig";
|
6
6
|
function _array_like_to_array(arr, len) {
|
7
7
|
(len == null || len > arr.length) && (len = arr.length);
|
8
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
9
|
-
arr2[i] = arr[i];
|
8
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
10
9
|
return arr2;
|
11
10
|
}
|
12
11
|
function _array_with_holes(arr) {
|
13
|
-
if (Array.isArray(arr))
|
14
|
-
return arr;
|
12
|
+
if (Array.isArray(arr)) return arr;
|
15
13
|
}
|
16
14
|
function _array_without_holes(arr) {
|
17
|
-
if (Array.isArray(arr))
|
18
|
-
return _array_like_to_array(arr);
|
15
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
19
16
|
}
|
20
17
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
21
18
|
try {
|
@@ -50,8 +47,7 @@ function _define_property(obj, key, value) {
|
|
50
47
|
}) : obj[key] = value, obj;
|
51
48
|
}
|
52
49
|
function _iterable_to_array(iter) {
|
53
|
-
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
54
|
-
return Array.from(iter);
|
50
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
55
51
|
}
|
56
52
|
function _iterable_to_array_limit(arr, i) {
|
57
53
|
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
@@ -66,8 +62,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
66
62
|
try {
|
67
63
|
!_n && _i.return != null && _i.return();
|
68
64
|
} finally {
|
69
|
-
if (_d)
|
70
|
-
throw _e;
|
65
|
+
if (_d) throw _e;
|
71
66
|
}
|
72
67
|
}
|
73
68
|
return _arr;
|
@@ -91,8 +86,7 @@ function _object_spread(target) {
|
|
91
86
|
return target;
|
92
87
|
}
|
93
88
|
function _object_without_properties(source, excluded) {
|
94
|
-
if (source == null)
|
95
|
-
return {};
|
89
|
+
if (source == null) return {};
|
96
90
|
var target = _object_without_properties_loose(source, excluded), key, i;
|
97
91
|
if (Object.getOwnPropertySymbols) {
|
98
92
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
@@ -102,8 +96,7 @@ function _object_without_properties(source, excluded) {
|
|
102
96
|
return target;
|
103
97
|
}
|
104
98
|
function _object_without_properties_loose(source, excluded) {
|
105
|
-
if (source == null)
|
106
|
-
return {};
|
99
|
+
if (source == null) return {};
|
107
100
|
var target = {}, sourceKeys = Object.keys(source), key, i;
|
108
101
|
for (i = 0; i < sourceKeys.length; i++)
|
109
102
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
@@ -117,21 +110,17 @@ function _to_consumable_array(arr) {
|
|
117
110
|
}
|
118
111
|
function _unsupported_iterable_to_array(o, minLen) {
|
119
112
|
if (o) {
|
120
|
-
if (typeof o == "string")
|
121
|
-
return _array_like_to_array(o, minLen);
|
113
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
122
114
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
123
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
124
|
-
|
125
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
126
|
-
return _array_like_to_array(o, minLen);
|
115
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
116
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
127
117
|
}
|
128
118
|
}
|
129
119
|
function _ts_generator(thisArg, body) {
|
130
120
|
var f, y, t, g, _ = {
|
131
121
|
label: 0,
|
132
122
|
sent: function() {
|
133
|
-
if (t[0] & 1)
|
134
|
-
throw t[1];
|
123
|
+
if (t[0] & 1) throw t[1];
|
135
124
|
return t[1];
|
136
125
|
},
|
137
126
|
trys: [],
|
@@ -153,64 +142,60 @@ function _ts_generator(thisArg, body) {
|
|
153
142
|
};
|
154
143
|
}
|
155
144
|
function step(op) {
|
156
|
-
if (f)
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
default:
|
184
|
-
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
185
|
-
_ = 0;
|
186
|
-
continue;
|
187
|
-
}
|
188
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
189
|
-
_.label = op[1];
|
190
|
-
break;
|
191
|
-
}
|
192
|
-
if (op[0] === 6 && _.label < t[1]) {
|
193
|
-
_.label = t[1], t = op;
|
194
|
-
break;
|
195
|
-
}
|
196
|
-
if (t && _.label < t[2]) {
|
197
|
-
_.label = t[2], _.ops.push(op);
|
198
|
-
break;
|
199
|
-
}
|
200
|
-
t[2] && _.ops.pop(), _.trys.pop();
|
145
|
+
if (f) throw new TypeError("Generator is already executing.");
|
146
|
+
for (; _; ) try {
|
147
|
+
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
148
|
+
switch (y = 0, t && (op = [
|
149
|
+
op[0] & 2,
|
150
|
+
t.value
|
151
|
+
]), op[0]) {
|
152
|
+
case 0:
|
153
|
+
case 1:
|
154
|
+
t = op;
|
155
|
+
break;
|
156
|
+
case 4:
|
157
|
+
return _.label++, {
|
158
|
+
value: op[1],
|
159
|
+
done: !1
|
160
|
+
};
|
161
|
+
case 5:
|
162
|
+
_.label++, y = op[1], op = [
|
163
|
+
0
|
164
|
+
];
|
165
|
+
continue;
|
166
|
+
case 7:
|
167
|
+
op = _.ops.pop(), _.trys.pop();
|
168
|
+
continue;
|
169
|
+
default:
|
170
|
+
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
171
|
+
_ = 0;
|
201
172
|
continue;
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
173
|
+
}
|
174
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
175
|
+
_.label = op[1];
|
176
|
+
break;
|
177
|
+
}
|
178
|
+
if (op[0] === 6 && _.label < t[1]) {
|
179
|
+
_.label = t[1], t = op;
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
if (t && _.label < t[2]) {
|
183
|
+
_.label = t[2], _.ops.push(op);
|
184
|
+
break;
|
185
|
+
}
|
186
|
+
t[2] && _.ops.pop(), _.trys.pop();
|
187
|
+
continue;
|
211
188
|
}
|
212
|
-
|
213
|
-
|
189
|
+
op = body.call(thisArg, _);
|
190
|
+
} catch (e) {
|
191
|
+
op = [
|
192
|
+
6,
|
193
|
+
e
|
194
|
+
], y = 0;
|
195
|
+
} finally {
|
196
|
+
f = t = 0;
|
197
|
+
}
|
198
|
+
if (op[0] & 5) throw op[1];
|
214
199
|
return {
|
215
200
|
value: op[0] ? op[1] : void 0,
|
216
201
|
done: !0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/generateTamaguiStudioConfig.ts"],
|
4
|
-
"mappings": "AAAA,SAASA,SAASC,YAAY;AAE9B,SAASC,gBAAgBC,4BAA4B;AAErD,YAAYC,QAAQ;AAEpB,SAASC,0BAA0B;AAGnC,SAASC,wBAAwB
|
4
|
+
"mappings": "AAAA,SAASA,SAASC,YAAY;AAE9B,SAASC,gBAAgBC,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4C,aAAgBC,gBAAAA,2BACzD7C,qBAAAA;IADMyC;IAAaC;IAAQC;IAAcC;;AAG3C,SAAO;IACLnB;IACAC;IACAC,eAAekB;EACjB;AACF;",
|
5
5
|
"names": ["dirname", "join", "generateThemes", "writeGeneratedThemes", "FS", "requireTamaguiCore", "getBundledConfig", "tamaguiDir", "process", "cwd", "confFile", "generateTamaguiStudioConfig", "tamaguiOptions", "configIn", "rebuild", "config", "out", "err", "transformConfig", "platform", "ensureDir", "writeJSON", "spaces", "env", "DEBUG", "includes", "IS_TAMAGUI_DEV", "console", "warn", "generateTamaguiStudioConfigSync", "_tamaguiOptions", "ensureDirSync", "writeJSONSync", "generateTamaguiThemes", "force", "input", "output", "inPath", "outPath", "generatedOutput", "hasChanged", "themeBuilder", "resolveRelativePath", "themeBuilderJsonExists", "next", "current", "pathExists", "_state", "generated", "readFile", "inputPath", "startsWith", "require", "resolve", "cloneDeepSafe", "x", "excludeKeys", "Array", "isArray", "map", "_", "Object", "fromEntries", "entries", "flatMap", "k", "v", "getVariableValue", "validStyles", "components", "nameToPaths", "tamaguiConfig", "themes", "tokens", "key", "theme", "id", "tkey", "token", "component", "nameToInfo", "compDefinition", "staticConfig", "parentStaticConfig", "rest", "fontsParsed", "getCSS", "tokensParsed", "themeConfig", "cleanedConfig"]
|
6
6
|
}
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import * as t from "@babel/types";
|
2
2
|
function generateUid(scope, name) {
|
3
|
-
if (typeof scope != "object")
|
4
|
-
|
5
|
-
if (!(typeof name == "string" && name !== ""))
|
6
|
-
throw "generateUid expects a valid name as its second parameter";
|
3
|
+
if (typeof scope != "object") throw "generateUid expects a scope object as its first parameter";
|
4
|
+
if (!(typeof name == "string" && name !== "")) throw "generateUid expects a valid name as its second parameter";
|
7
5
|
name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
|
8
6
|
var uid, i = 0;
|
9
7
|
do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/generatedUid.ts"],
|
4
|
-
"mappings": "AAAA,YAAYA,OAAO;AAQZ,SAASC,YAAYC,OAAYC,MAAY;AAClD,MAAM,OAAOD,SAAU
|
4
|
+
"mappings": "AAAA,YAAYA,OAAO;AAQZ,SAASC,YAAYC,OAAYC,MAAY;AAClD,MAAM,OAAOD,SAAU,SACrB,OAAM;AACR,MAAI,EAAE,OAAOC,QAAS,YAAYA,SAAS,IACzC,OAAM;AAERA,SAAOH,EACJI,aAAaD,IAAAA,EACbE,QAAQ,OAAO,EAAA,EACfA,QAAQ,YAAY,EAAA;AAEvB,MAAIC,KACAC,IAAI;AACR;AACE,IAAIA,IAAI,IACND,MAAMH,OAAOI,IAEbD,MAAMH,MAERI;SAEAL,MAAMM,SAASF,GAAAA,KACfJ,MAAMO,WAAWH,GAAAA,KACjBJ,MAAMQ,UAAUJ,GAAAA,KAChBJ,MAAMS,aAAaL,GAAAA;AAGrB,MAAMM,UAAUV,MAAMW,iBAAgB;AACtCD,iBAAQE,WAAWR,GAAAA,IAAO,IAC1BM,QAAQG,KAAKT,GAAAA,IAAO,IAEbA;AACT;",
|
5
5
|
"names": ["t", "generateUid", "scope", "name", "toIdentifier", "replace", "uid", "i", "hasLabel", "hasBinding", "hasGlobal", "hasReference", "program", "getProgramParent", "references", "uids"]
|
6
6
|
}
|
@@ -27,13 +27,11 @@ function importModule(path) {
|
|
27
27
|
if (child || forkChild(), pending.has(path))
|
28
28
|
return pending.get(path);
|
29
29
|
const promise = new Promise((res, rej) => {
|
30
|
-
if (!child)
|
31
|
-
return;
|
30
|
+
if (!child) return;
|
32
31
|
if (cache.size > 2e3 && cache.clear(), cache.has(path))
|
33
32
|
return cache.get(path);
|
34
33
|
const listener = (msg) => {
|
35
|
-
if (!child || !msg || typeof msg != "string")
|
36
|
-
return;
|
34
|
+
if (!child || !msg || typeof msg != "string") return;
|
37
35
|
if (msg[0] === "-") {
|
38
36
|
rej(new Error(msg.slice(1)));
|
39
37
|
return;
|
@@ -54,12 +52,10 @@ async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bind
|
|
54
52
|
if (!node.specifiers.length || !isLocalImport(importPath))
|
55
53
|
continue;
|
56
54
|
const moduleName = resolveImportPath(sourcePath, importPath);
|
57
|
-
if (!whitelist.some((test) => moduleName.endsWith(test)))
|
58
|
-
continue;
|
55
|
+
if (!whitelist.some((test) => moduleName.endsWith(test))) continue;
|
59
56
|
try {
|
60
57
|
const src = await importModule(moduleName);
|
61
|
-
if (!src)
|
62
|
-
continue;
|
58
|
+
if (!src) continue;
|
63
59
|
for (const specifier of node.specifiers)
|
64
60
|
if (t.isImportSpecifier(specifier) && t.isIdentifier(specifier.imported) && typeof src[specifier.imported.name] < "u") {
|
65
61
|
const val = src[specifier.local.name];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/extractor/getStaticBindingsForScope.ts"],
|
4
|
-
"mappings": "AACA,SAAS,YAAY;AACrB,SAAS,SAAS,SAAS,MAAM,eAAe;AAGhD,YAAY,OAAO;AAEnB,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAMhC,MAAM,gBAAgB,CAAC,SAAiB,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,GAAG;AAEnF,SAAS,kBAAkB,YAAoB,MAAc;AAC3D,QAAM,YAAY,QAAQ,UAAU;AACpC,SAAI,cAAc,IAAI,KAChB,QAAQ,IAAI,MAAM,OACpB,QAAQ,KAEH,QAAQ,WAAW,IAAI,KAEzB;AACT;AAEA,MAAM,QAAQ,oBAAI,IAAI,GAChB,UAAU,oBAAI,IAA0B,GAExC,UAAU,GAAG,KAAK,WAAW,aAAa,CAAC;AAEjD,IAAI,SAAS,IAET,QAA6B;AAEjC,SAAS,YAAY;AACnB,UAAQ,KAAK,SAAS,CAAC,GAAG;AAAA,IACxB,UAAU,CAAC,MAAM,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