@tamagui/static 1.89.26 → 1.89.27-1708113113238
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/constants.native.js +4 -4
- package/dist/cjs/constants.native.js.map +3 -3
- package/dist/cjs/extractor/accessSafe.native.js +1 -5
- package/dist/cjs/extractor/accessSafe.native.js.map +3 -3
- package/dist/cjs/extractor/babelParse.native.js +5 -8
- package/dist/cjs/extractor/babelParse.native.js.map +3 -3
- package/dist/cjs/extractor/buildClassName.native.js +31 -42
- package/dist/cjs/extractor/buildClassName.native.js.map +3 -3
- package/dist/cjs/extractor/bundle.js +6 -4
- package/dist/cjs/extractor/bundle.js.map +1 -1
- package/dist/cjs/extractor/bundle.native.js +321 -56
- package/dist/cjs/extractor/bundle.native.js.map +3 -3
- package/dist/cjs/extractor/bundleConfig.native.js +499 -187
- package/dist/cjs/extractor/bundleConfig.native.js.map +3 -3
- package/dist/cjs/extractor/createEvaluator.native.js +9 -11
- package/dist/cjs/extractor/createEvaluator.native.js.map +3 -3
- package/dist/cjs/extractor/createExtractor.native.js +1240 -906
- package/dist/cjs/extractor/createExtractor.native.js.map +3 -3
- package/dist/cjs/extractor/ensureImportingConcat.native.js +11 -17
- package/dist/cjs/extractor/ensureImportingConcat.native.js.map +3 -3
- package/dist/cjs/extractor/esbuildAliasPlugin.native.js +22 -11
- package/dist/cjs/extractor/esbuildAliasPlugin.native.js.map +3 -3
- package/dist/cjs/extractor/evaluateAstNode.native.js +15 -21
- package/dist/cjs/extractor/evaluateAstNode.native.js.map +3 -3
- package/dist/cjs/extractor/extractHelpers.native.js +146 -38
- package/dist/cjs/extractor/extractHelpers.native.js.map +3 -3
- package/dist/cjs/extractor/extractMediaStyle.native.js +127 -54
- package/dist/cjs/extractor/extractMediaStyle.native.js.map +3 -3
- package/dist/cjs/extractor/extractToClassNames.native.js +449 -252
- package/dist/cjs/extractor/extractToClassNames.native.js.map +3 -3
- package/dist/cjs/extractor/findTopmostFunction.native.js +4 -4
- package/dist/cjs/extractor/findTopmostFunction.native.js.map +3 -3
- package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +415 -54
- package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
- package/dist/cjs/extractor/generatedUid.native.js +2 -2
- package/dist/cjs/extractor/generatedUid.native.js.map +3 -3
- package/dist/cjs/extractor/getPrefixLogs.native.js +2 -1
- package/dist/cjs/extractor/getPrefixLogs.native.js.map +3 -3
- package/dist/cjs/extractor/getPropValueFromAttributes.native.js +16 -19
- package/dist/cjs/extractor/getPropValueFromAttributes.native.js.map +3 -3
- package/dist/cjs/extractor/getSourceModule.native.js +20 -7
- package/dist/cjs/extractor/getSourceModule.native.js.map +3 -3
- package/dist/cjs/extractor/getStaticBindingsForScope.native.js +336 -94
- package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +3 -3
- package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
- package/dist/cjs/extractor/hoistClassNames.native.js +8 -10
- package/dist/cjs/extractor/hoistClassNames.native.js.map +3 -3
- package/dist/cjs/extractor/literalToAst.native.js +89 -19
- package/dist/cjs/extractor/literalToAst.native.js.map +3 -3
- package/dist/cjs/extractor/loadFile.native.js +16 -8
- package/dist/cjs/extractor/loadFile.native.js.map +3 -3
- package/dist/cjs/extractor/loadTamagui.js +3 -3
- package/dist/cjs/extractor/loadTamagui.js.map +1 -1
- package/dist/cjs/extractor/loadTamagui.native.js +667 -192
- package/dist/cjs/extractor/loadTamagui.native.js.map +3 -3
- package/dist/cjs/extractor/logLines.native.js +24 -6
- package/dist/cjs/extractor/logLines.native.js.map +3 -3
- package/dist/cjs/extractor/normalizeTernaries.native.js +71 -20
- package/dist/cjs/extractor/normalizeTernaries.native.js.map +3 -3
- package/dist/cjs/extractor/propsToFontFamilyCache.native.js +3 -3
- package/dist/cjs/extractor/propsToFontFamilyCache.native.js.map +3 -3
- package/dist/cjs/extractor/removeUnusedHooks.native.js +69 -36
- package/dist/cjs/extractor/removeUnusedHooks.native.js.map +3 -3
- package/dist/cjs/extractor/timer.native.js +10 -9
- package/dist/cjs/extractor/timer.native.js.map +3 -3
- package/dist/cjs/extractor/validHTMLAttributes.native.js +1 -1
- package/dist/cjs/extractor/validHTMLAttributes.native.js.map +3 -3
- package/dist/cjs/getPragmaOptions.native.js +4 -9
- package/dist/cjs/getPragmaOptions.native.js.map +3 -3
- package/dist/cjs/helpers/memoize.native.js +5 -3
- package/dist/cjs/helpers/memoize.native.js.map +3 -3
- package/dist/cjs/helpers/requireTamaguiCore.native.js +2 -1
- package/dist/cjs/helpers/requireTamaguiCore.native.js.map +3 -3
- package/dist/cjs/index.native.js.map +2 -2
- package/dist/cjs/minifyCSS.native.js.map +3 -3
- package/dist/cjs/registerRequire.native.js +56 -28
- package/dist/cjs/registerRequire.native.js.map +3 -3
- package/dist/cjs/server.native.js +175 -21
- package/dist/cjs/server.native.js.map +3 -3
- package/dist/cjs/setup.native.js.map +3 -3
- package/dist/cjs/static.native.js.map +2 -2
- package/dist/cjs/types.native.js.map +2 -2
- package/dist/cjs/webpackPlugin.native.js +26 -5
- package/dist/cjs/webpackPlugin.native.js.map +3 -3
- package/dist/esm/constants.native.js +4 -3
- package/dist/esm/constants.native.js.map +3 -3
- package/dist/esm/extractor/accessSafe.native.js +1 -5
- package/dist/esm/extractor/accessSafe.native.js.map +3 -3
- package/dist/esm/extractor/babelParse.native.js +5 -7
- package/dist/esm/extractor/babelParse.native.js.map +3 -3
- package/dist/esm/extractor/buildClassName.native.js +31 -41
- package/dist/esm/extractor/buildClassName.native.js.map +3 -3
- package/dist/esm/extractor/bundle.js +6 -4
- package/dist/esm/extractor/bundle.js.map +1 -1
- package/dist/esm/extractor/bundle.mjs +7 -5
- package/dist/esm/extractor/bundle.native.js +321 -56
- package/dist/esm/extractor/bundle.native.js.map +3 -3
- package/dist/esm/extractor/bundleConfig.native.js +499 -187
- package/dist/esm/extractor/bundleConfig.native.js.map +3 -3
- package/dist/esm/extractor/createEvaluator.native.js +9 -11
- package/dist/esm/extractor/createEvaluator.native.js.map +3 -3
- package/dist/esm/extractor/createExtractor.native.js +1241 -916
- package/dist/esm/extractor/createExtractor.native.js.map +3 -3
- package/dist/esm/extractor/ensureImportingConcat.native.js +11 -16
- package/dist/esm/extractor/ensureImportingConcat.native.js.map +3 -3
- package/dist/esm/extractor/esbuildAliasPlugin.native.js +22 -11
- package/dist/esm/extractor/esbuildAliasPlugin.native.js.map +3 -3
- package/dist/esm/extractor/evaluateAstNode.native.js +15 -21
- package/dist/esm/extractor/evaluateAstNode.native.js.map +3 -3
- package/dist/esm/extractor/extractHelpers.native.js +146 -38
- package/dist/esm/extractor/extractHelpers.native.js.map +3 -3
- package/dist/esm/extractor/extractMediaStyle.native.js +127 -54
- package/dist/esm/extractor/extractMediaStyle.native.js.map +3 -3
- package/dist/esm/extractor/extractToClassNames.native.js +449 -252
- package/dist/esm/extractor/extractToClassNames.native.js.map +3 -3
- package/dist/esm/extractor/findTopmostFunction.native.js +4 -4
- package/dist/esm/extractor/findTopmostFunction.native.js.map +3 -3
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +415 -54
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
- package/dist/esm/extractor/generatedUid.native.js +2 -2
- package/dist/esm/extractor/generatedUid.native.js.map +3 -3
- package/dist/esm/extractor/getPrefixLogs.native.js +2 -1
- package/dist/esm/extractor/getPrefixLogs.native.js.map +3 -3
- package/dist/esm/extractor/getPropValueFromAttributes.native.js +16 -19
- package/dist/esm/extractor/getPropValueFromAttributes.native.js.map +3 -3
- package/dist/esm/extractor/getSourceModule.native.js +20 -7
- package/dist/esm/extractor/getSourceModule.native.js.map +3 -3
- package/dist/esm/extractor/getStaticBindingsForScope.native.js +336 -94
- package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +3 -3
- package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
- package/dist/esm/extractor/hoistClassNames.native.js +8 -10
- package/dist/esm/extractor/hoistClassNames.native.js.map +3 -3
- package/dist/esm/extractor/literalToAst.native.js +89 -19
- package/dist/esm/extractor/literalToAst.native.js.map +3 -3
- package/dist/esm/extractor/loadFile.native.js +16 -8
- package/dist/esm/extractor/loadFile.native.js.map +3 -3
- package/dist/esm/extractor/loadTamagui.js +1 -2
- package/dist/esm/extractor/loadTamagui.js.map +1 -1
- package/dist/esm/extractor/loadTamagui.mjs +5 -3
- package/dist/esm/extractor/loadTamagui.native.js +668 -203
- package/dist/esm/extractor/loadTamagui.native.js.map +3 -3
- package/dist/esm/extractor/logLines.native.js +24 -6
- package/dist/esm/extractor/logLines.native.js.map +3 -3
- package/dist/esm/extractor/normalizeTernaries.native.js +71 -20
- package/dist/esm/extractor/normalizeTernaries.native.js.map +3 -3
- package/dist/esm/extractor/propsToFontFamilyCache.native.js +3 -3
- package/dist/esm/extractor/propsToFontFamilyCache.native.js.map +3 -3
- package/dist/esm/extractor/removeUnusedHooks.native.js +69 -35
- package/dist/esm/extractor/removeUnusedHooks.native.js.map +3 -3
- package/dist/esm/extractor/timer.native.js +10 -9
- package/dist/esm/extractor/timer.native.js.map +3 -3
- package/dist/esm/extractor/validHTMLAttributes.native.js +1 -1
- package/dist/esm/extractor/validHTMLAttributes.native.js.map +3 -3
- package/dist/esm/getPragmaOptions.native.js +4 -9
- package/dist/esm/getPragmaOptions.native.js.map +3 -3
- package/dist/esm/helpers/memoize.native.js +5 -3
- package/dist/esm/helpers/memoize.native.js.map +3 -3
- package/dist/esm/helpers/requireTamaguiCore.native.js +2 -1
- package/dist/esm/helpers/requireTamaguiCore.native.js.map +3 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/minifyCSS.native.js.map +3 -3
- package/dist/esm/registerRequire.native.js +56 -28
- package/dist/esm/registerRequire.native.js.map +3 -3
- package/dist/esm/server.native.js +175 -21
- package/dist/esm/server.native.js.map +3 -3
- package/dist/esm/setup.native.js.map +3 -3
- package/dist/esm/static.native.js.map +3 -3
- package/dist/esm/webpackPlugin.native.js +26 -5
- package/dist/esm/webpackPlugin.native.js.map +3 -3
- package/package.json +14 -15
- package/src/extractor/bundle.ts +5 -2
- package/src/extractor/loadTamagui.ts +3 -2
- package/types/extractor/bundle.d.ts.map +1 -1
- package/types/extractor/loadTamagui.d.ts.map +1 -1
- package/tamagui.tsconfig.json +0 -5
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
|
-
"sources": ["../../../src/extractor/extractToClassNames.ts"],
|
4
|
-
"mappings": "AAAA,
|
5
|
-
"names": ["res", "styles", "
|
3
|
+
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/extractToClassNames.ts"],
|
4
|
+
"mappings": "AAAA,YAAYA,UAAU;AACtB,SAASC,gBAAgB;AACzB,YAAYC,UAAU;AAEtB,OAAOC,cAAc;AACrB,YAAYC,OAAO;AACnB,SAASC,uBAAuB;AAGhC,SAASC,0BAA0B;AAEnC,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAE/B,SAASC,6BAA6B;AACtC,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,qBAAqB;AAC9B,SAASC,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,uCAAuC;AAChD,SAASC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtB,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,QACAC,YACAC,SACAC,kBAEMC,IACE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AAQ,IAAA,IAAM,IACrCK,SAASc,KAAKC,IAAG,IAAK7B,OACtBe,YAAa,GAAS,OAAPD,QAAO,IAAA,EAAI6I,SAAS,CAAA,GACnC3I,MAAMnC,cAAcc,OAAAA,GACpBsB,SAASJ,SAAU,IAAU,OAAPA,QAAO,GAAA,IAAK,IACxCM,QAAQ0B,KACL,GAAS5E,OAAP+C,KAAI,GAAA,EAAgBL,OAAb1C,QAAK,WAAA,EAA+ByC,OAAvBC,UAAS,iBAAA,EAAuCC,OAAzBF,cAAa,eAAA,EAAkCK,OAAtBH,cAAa,SAAA,EAAsBK,OAAbF,WAAU,GAAA,EAAU,OAAPE,MAAAA,CAAAA,IAI9G;;YAAO;cACLf;cACAK;cACAsJ,IAAIrJ,OAAO6I;cACXjF,KAAK5D,OAAO4D;YACd;;;;EACF,CAAA,GAlbsB7E,qBAAAA,MAAAA,MAAAA,SAAAA;;",
|
5
|
+
"names": ["path", "basename", "util", "generate", "t", "concatClassName", "requireTamaguiCore", "babelParse", "buildClassName", "ensureImportingConcat", "isSimpleSpread", "extractMediaStyle", "getPrefixLogs", "hoistClassNames", "logLines", "getFontFamilyClassNameFromProps", "timer", "mergeStyleGroups", "shadowOpacity", "shadowRadius", "shadowColor", "shadowOffset", "extractToClassNames", "extractor", "source", "sourcePath", "options", "shouldPrintDebug", "tm", "getStylesAtomic", "shouldLogTiming", "start", "mem", "ast", "cssMap", "existingHoists", "hasFlattened", "res", "styles", "result", "memUsed", "numOptimized", "numFound", "numFlattened", "memory", "timing", "timingStr", "pre", "memStr", "includes", "console", "warn", "Error", "isAbsolute", "test", "slice", "disableExtraction", "loadTamagui", "logTimings", "Date", "now", "process", "env", "TAMAGUI_SHOW_MEMORY_USAGE", "memoryUsage", "err", "error", "mark", "Map", "parse", "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", "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", "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", "Math", "round", "heapUsed", "padStart", "found", "js"]
|
6
6
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
function findTopmostFunction(jsxPath) {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
for (var isFunction = function(path) {
|
3
|
+
return path.isArrowFunctionExpression() || path.isFunctionDeclaration() || path.isFunctionExpression();
|
4
|
+
}, compFn = jsxPath.findParent(isFunction); compFn; ) {
|
5
|
+
var parent = compFn.findParent(isFunction);
|
6
6
|
if (parent)
|
7
7
|
compFn = parent;
|
8
8
|
else
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
|
-
"sources": ["../../../src/extractor/findTopmostFunction.ts"],
|
4
|
-
"mappings": "AAGO,
|
5
|
-
"names": []
|
3
|
+
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/findTopmostFunction.ts"],
|
4
|
+
"mappings": "AAGO,SAASA,oBAAoBC,SAA+B;AAOjE,WALMC,aAAa,SAACC,MAAAA;WAClBA,KAAKC,0BAAyB,KAC9BD,KAAKE,sBAAqB,KAC1BF,KAAKG,qBAAoB;KACvBC,SAA+BN,QAAQO,WAAWN,UAAAA,GAC/CK,UAAQ;AACb,QAAME,SAASF,OAAOC,WAAWN,UAAAA;AACjC,QAAIO;AACFF,eAASE;;AAET;EAEJ;AACA,SAAKF,UAEI;AAGX;",
|
5
|
+
"names": ["findTopmostFunction", "jsxPath", "isFunction", "path", "isArrowFunctionExpression", "isFunctionDeclaration", "isFunctionExpression", "compFn", "findParent", "parent"]
|
6
6
|
}
|
@@ -3,84 +3,445 @@ import { generateThemes, writeGeneratedThemes } from "@tamagui/generate-themes";
|
|
3
3
|
import fs, { readFile } from "fs-extra";
|
4
4
|
import { requireTamaguiCore } from "../helpers/requireTamaguiCore";
|
5
5
|
import { getBundledConfig } from "./bundleConfig";
|
6
|
-
|
7
|
-
|
8
|
-
var
|
6
|
+
function _array_like_to_array(arr, len) {
|
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];
|
10
|
+
return arr2;
|
11
|
+
}
|
12
|
+
function _array_with_holes(arr) {
|
13
|
+
if (Array.isArray(arr))
|
14
|
+
return arr;
|
15
|
+
}
|
16
|
+
function _array_without_holes(arr) {
|
17
|
+
if (Array.isArray(arr))
|
18
|
+
return _array_like_to_array(arr);
|
19
|
+
}
|
20
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
9
21
|
try {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
22
|
+
var info = gen[key](arg), value = info.value;
|
23
|
+
} catch (error) {
|
24
|
+
reject(error);
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
|
28
|
+
}
|
29
|
+
function _async_to_generator(fn) {
|
30
|
+
return function() {
|
31
|
+
var self = this, args = arguments;
|
32
|
+
return new Promise(function(resolve, reject) {
|
33
|
+
var gen = fn.apply(self, args);
|
34
|
+
function _next(value) {
|
35
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
36
|
+
}
|
37
|
+
function _throw(err) {
|
38
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
39
|
+
}
|
40
|
+
_next(void 0);
|
16
41
|
});
|
17
|
-
}
|
18
|
-
|
42
|
+
};
|
43
|
+
}
|
44
|
+
function _define_property(obj, key, value) {
|
45
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
46
|
+
value,
|
47
|
+
enumerable: !0,
|
48
|
+
configurable: !0,
|
49
|
+
writable: !0
|
50
|
+
}) : obj[key] = value, obj;
|
51
|
+
}
|
52
|
+
function _iterable_to_array(iter) {
|
53
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
54
|
+
return Array.from(iter);
|
55
|
+
}
|
56
|
+
function _iterable_to_array_limit(arr, i) {
|
57
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
58
|
+
if (_i != null) {
|
59
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
60
|
+
try {
|
61
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
62
|
+
;
|
63
|
+
} catch (err) {
|
64
|
+
_d = !0, _e = err;
|
65
|
+
} finally {
|
66
|
+
try {
|
67
|
+
!_n && _i.return != null && _i.return();
|
68
|
+
} finally {
|
69
|
+
if (_d)
|
70
|
+
throw _e;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
return _arr;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
function _non_iterable_rest() {
|
77
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
78
|
+
}
|
79
|
+
function _non_iterable_spread() {
|
80
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
81
|
+
}
|
82
|
+
function _object_spread(target) {
|
83
|
+
for (var i = 1; i < arguments.length; i++) {
|
84
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
85
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
86
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
87
|
+
}))), ownKeys.forEach(function(key) {
|
88
|
+
_define_property(target, key, source[key]);
|
89
|
+
});
|
90
|
+
}
|
91
|
+
return target;
|
92
|
+
}
|
93
|
+
function _object_without_properties(source, excluded) {
|
94
|
+
if (source == null)
|
95
|
+
return {};
|
96
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
97
|
+
if (Object.getOwnPropertySymbols) {
|
98
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
99
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
100
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
101
|
+
}
|
102
|
+
return target;
|
103
|
+
}
|
104
|
+
function _object_without_properties_loose(source, excluded) {
|
105
|
+
if (source == null)
|
106
|
+
return {};
|
107
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
108
|
+
for (i = 0; i < sourceKeys.length; i++)
|
109
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
110
|
+
return target;
|
111
|
+
}
|
112
|
+
function _sliced_to_array(arr, i) {
|
113
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
114
|
+
}
|
115
|
+
function _to_consumable_array(arr) {
|
116
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
117
|
+
}
|
118
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
119
|
+
if (o) {
|
120
|
+
if (typeof o == "string")
|
121
|
+
return _array_like_to_array(o, minLen);
|
122
|
+
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
|
+
return Array.from(n);
|
125
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
126
|
+
return _array_like_to_array(o, minLen);
|
19
127
|
}
|
20
128
|
}
|
129
|
+
function _ts_generator(thisArg, body) {
|
130
|
+
var f, y, t, g, _ = {
|
131
|
+
label: 0,
|
132
|
+
sent: function() {
|
133
|
+
if (t[0] & 1)
|
134
|
+
throw t[1];
|
135
|
+
return t[1];
|
136
|
+
},
|
137
|
+
trys: [],
|
138
|
+
ops: []
|
139
|
+
};
|
140
|
+
return g = {
|
141
|
+
next: verb(0),
|
142
|
+
throw: verb(1),
|
143
|
+
return: verb(2)
|
144
|
+
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
145
|
+
return this;
|
146
|
+
}), g;
|
147
|
+
function verb(n) {
|
148
|
+
return function(v) {
|
149
|
+
return step([
|
150
|
+
n,
|
151
|
+
v
|
152
|
+
]);
|
153
|
+
};
|
154
|
+
}
|
155
|
+
function step(op) {
|
156
|
+
if (f)
|
157
|
+
throw new TypeError("Generator is already executing.");
|
158
|
+
for (; _; )
|
159
|
+
try {
|
160
|
+
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)
|
161
|
+
return t;
|
162
|
+
switch (y = 0, t && (op = [
|
163
|
+
op[0] & 2,
|
164
|
+
t.value
|
165
|
+
]), op[0]) {
|
166
|
+
case 0:
|
167
|
+
case 1:
|
168
|
+
t = op;
|
169
|
+
break;
|
170
|
+
case 4:
|
171
|
+
return _.label++, {
|
172
|
+
value: op[1],
|
173
|
+
done: !1
|
174
|
+
};
|
175
|
+
case 5:
|
176
|
+
_.label++, y = op[1], op = [
|
177
|
+
0
|
178
|
+
];
|
179
|
+
continue;
|
180
|
+
case 7:
|
181
|
+
op = _.ops.pop(), _.trys.pop();
|
182
|
+
continue;
|
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();
|
201
|
+
continue;
|
202
|
+
}
|
203
|
+
op = body.call(thisArg, _);
|
204
|
+
} catch (e) {
|
205
|
+
op = [
|
206
|
+
6,
|
207
|
+
e
|
208
|
+
], y = 0;
|
209
|
+
} finally {
|
210
|
+
f = t = 0;
|
211
|
+
}
|
212
|
+
if (op[0] & 5)
|
213
|
+
throw op[1];
|
214
|
+
return {
|
215
|
+
value: op[0] ? op[1] : void 0,
|
216
|
+
done: !0
|
217
|
+
};
|
218
|
+
}
|
219
|
+
}
|
220
|
+
var tamaguiDir = join(process.cwd(), ".tamagui"), confFile = join(tamaguiDir, "tamagui.config.json");
|
221
|
+
function generateTamaguiStudioConfig(tamaguiOptions, configIn) {
|
222
|
+
return _generateTamaguiStudioConfig.apply(this, arguments);
|
223
|
+
}
|
224
|
+
function _generateTamaguiStudioConfig() {
|
225
|
+
return _generateTamaguiStudioConfig = _async_to_generator(function(tamaguiOptions, configIn) {
|
226
|
+
var rebuild, config, _tmp, out, err, _process_env_DEBUG, _arguments = arguments;
|
227
|
+
return _ts_generator(this, function(_state) {
|
228
|
+
switch (_state.label) {
|
229
|
+
case 0:
|
230
|
+
rebuild = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : !1, _state.label = 1;
|
231
|
+
case 1:
|
232
|
+
return _state.trys.push([
|
233
|
+
1,
|
234
|
+
7,
|
235
|
+
,
|
236
|
+
8
|
237
|
+
]), configIn == null ? [
|
238
|
+
3,
|
239
|
+
2
|
240
|
+
] : (_tmp = configIn, [
|
241
|
+
3,
|
242
|
+
4
|
243
|
+
]);
|
244
|
+
case 2:
|
245
|
+
return [
|
246
|
+
4,
|
247
|
+
getBundledConfig(tamaguiOptions, rebuild)
|
248
|
+
];
|
249
|
+
case 3:
|
250
|
+
_tmp = _state.sent(), _state.label = 4;
|
251
|
+
case 4:
|
252
|
+
return config = _tmp, config ? (out = transformConfig(config, tamaguiOptions.platform), [
|
253
|
+
4,
|
254
|
+
fs.ensureDir(dirname(confFile))
|
255
|
+
]) : [
|
256
|
+
2
|
257
|
+
];
|
258
|
+
case 5:
|
259
|
+
return _state.sent(), [
|
260
|
+
4,
|
261
|
+
fs.writeJSON(confFile, out, {
|
262
|
+
spaces: 2
|
263
|
+
})
|
264
|
+
];
|
265
|
+
case 6:
|
266
|
+
return _state.sent(), [
|
267
|
+
3,
|
268
|
+
8
|
269
|
+
];
|
270
|
+
case 7:
|
271
|
+
return err = _state.sent(), (!((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.includes("tamagui") || process.env.IS_TAMAGUI_DEV) && console.warn("generateTamaguiStudioConfig error", err), [
|
272
|
+
3,
|
273
|
+
8
|
274
|
+
];
|
275
|
+
case 8:
|
276
|
+
return [
|
277
|
+
2
|
278
|
+
];
|
279
|
+
}
|
280
|
+
});
|
281
|
+
}), _generateTamaguiStudioConfig.apply(this, arguments);
|
282
|
+
}
|
21
283
|
function generateTamaguiStudioConfigSync(_tamaguiOptions, config) {
|
22
|
-
var _a;
|
23
284
|
try {
|
24
285
|
fs.ensureDirSync(dirname(confFile)), fs.writeJSONSync(confFile, transformConfig(config, _tamaguiOptions.platform), {
|
25
286
|
spaces: 2
|
26
287
|
});
|
27
288
|
} catch (err) {
|
28
|
-
|
289
|
+
var _process_env_DEBUG;
|
290
|
+
(!((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.includes("tamagui") || process.env.IS_TAMAGUI_DEV) && console.warn("generateTamaguiStudioConfig error", err);
|
29
291
|
}
|
30
292
|
}
|
31
|
-
|
32
|
-
|
33
|
-
return;
|
34
|
-
const { input, output } = tamaguiOptions.themeBuilder, inPath = resolveRelativePath(input), outPath = resolveRelativePath(output), generatedOutput = await generateThemes(inPath), hasChanged = force || await (async () => {
|
35
|
-
try {
|
36
|
-
if (!await fs.pathExists(
|
37
|
-
join(tamaguiDir, "theme-builder.json")
|
38
|
-
))
|
39
|
-
return !0;
|
40
|
-
if (!generatedOutput)
|
41
|
-
return !1;
|
42
|
-
const next = generatedOutput.generated, current = await readFile(outPath, "utf-8");
|
43
|
-
return next !== current;
|
44
|
-
} catch {
|
45
|
-
}
|
46
|
-
return !0;
|
47
|
-
})();
|
48
|
-
return hasChanged && await writeGeneratedThemes(tamaguiDir, outPath, generatedOutput), hasChanged;
|
293
|
+
function generateTamaguiThemes(tamaguiOptions) {
|
294
|
+
return _generateTamaguiThemes.apply(this, arguments);
|
49
295
|
}
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
296
|
+
function _generateTamaguiThemes() {
|
297
|
+
return _generateTamaguiThemes = _async_to_generator(function(tamaguiOptions) {
|
298
|
+
var force, _tamaguiOptions_themeBuilder, input, output, inPath, outPath, generatedOutput, hasChanged, _tmp, _arguments = arguments;
|
299
|
+
return _ts_generator(this, function(_state) {
|
300
|
+
switch (_state.label) {
|
301
|
+
case 0:
|
302
|
+
return force = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : !1, tamaguiOptions.themeBuilder ? (_tamaguiOptions_themeBuilder = tamaguiOptions.themeBuilder, input = _tamaguiOptions_themeBuilder.input, output = _tamaguiOptions_themeBuilder.output, inPath = resolveRelativePath(input), outPath = resolveRelativePath(output), [
|
303
|
+
4,
|
304
|
+
generateThemes(inPath)
|
305
|
+
]) : [
|
306
|
+
2
|
307
|
+
];
|
308
|
+
case 1:
|
309
|
+
return generatedOutput = _state.sent(), _tmp = force, _tmp ? [
|
310
|
+
3,
|
311
|
+
3
|
312
|
+
] : [
|
313
|
+
4,
|
314
|
+
_async_to_generator(function() {
|
315
|
+
var themeBuilderJsonExists, next, current, err;
|
316
|
+
return _ts_generator(this, function(_state2) {
|
317
|
+
switch (_state2.label) {
|
318
|
+
case 0:
|
319
|
+
return _state2.trys.push([
|
320
|
+
0,
|
321
|
+
3,
|
322
|
+
,
|
323
|
+
4
|
324
|
+
]), [
|
325
|
+
4,
|
326
|
+
fs.pathExists(join(tamaguiDir, "theme-builder.json"))
|
327
|
+
];
|
328
|
+
case 1:
|
329
|
+
return themeBuilderJsonExists = _state2.sent(), themeBuilderJsonExists ? generatedOutput ? (next = generatedOutput.generated, [
|
330
|
+
4,
|
331
|
+
readFile(outPath, "utf-8")
|
332
|
+
]) : [
|
333
|
+
2,
|
334
|
+
!1
|
335
|
+
] : [
|
336
|
+
2,
|
337
|
+
!0
|
338
|
+
];
|
339
|
+
case 2:
|
340
|
+
return current = _state2.sent(), [
|
341
|
+
2,
|
342
|
+
next !== current
|
343
|
+
];
|
344
|
+
case 3:
|
345
|
+
return err = _state2.sent(), [
|
346
|
+
3,
|
347
|
+
4
|
348
|
+
];
|
349
|
+
case 4:
|
350
|
+
return [
|
351
|
+
2,
|
352
|
+
!0
|
353
|
+
];
|
354
|
+
}
|
355
|
+
});
|
356
|
+
})()
|
357
|
+
];
|
358
|
+
case 2:
|
359
|
+
_tmp = _state.sent(), _state.label = 3;
|
360
|
+
case 3:
|
361
|
+
return hasChanged = _tmp, hasChanged ? [
|
362
|
+
4,
|
363
|
+
writeGeneratedThemes(tamaguiDir, outPath, generatedOutput)
|
364
|
+
] : [
|
365
|
+
3,
|
366
|
+
5
|
367
|
+
];
|
368
|
+
case 4:
|
369
|
+
_state.sent(), _state.label = 5;
|
370
|
+
case 5:
|
371
|
+
return [
|
372
|
+
2,
|
373
|
+
hasChanged
|
374
|
+
];
|
375
|
+
}
|
376
|
+
});
|
377
|
+
}), _generateTamaguiThemes.apply(this, arguments);
|
378
|
+
}
|
379
|
+
var resolveRelativePath = function(inputPath) {
|
380
|
+
return inputPath.startsWith(".") ? join(process.cwd(), inputPath) : require.resolve(inputPath);
|
381
|
+
};
|
382
|
+
function cloneDeepSafe(x) {
|
383
|
+
var excludeKeys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
384
|
+
return x && (Array.isArray(x) ? x.map(function(_) {
|
385
|
+
return cloneDeepSafe(_);
|
386
|
+
}) : typeof x == "function" ? "Function" : typeof x != "object" ? x : "$$typeof" in x ? "Component" : Object.fromEntries(Object.entries(x).flatMap(function(param) {
|
387
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
388
|
+
return excludeKeys[k] ? [] : [
|
389
|
+
[
|
390
|
+
k,
|
391
|
+
cloneDeepSafe(v)
|
392
|
+
]
|
393
|
+
];
|
394
|
+
})));
|
55
395
|
}
|
56
396
|
function transformConfig(config, platform) {
|
57
397
|
if (!config)
|
58
398
|
return null;
|
59
|
-
|
399
|
+
var getVariableValue = requireTamaguiCore(platform).getVariableValue, next = cloneDeepSafe(config, {
|
60
400
|
validStyles: !0
|
61
|
-
}),
|
62
|
-
for (
|
63
|
-
|
401
|
+
}), components = next.components, nameToPaths = next.nameToPaths, tamaguiConfig = next.tamaguiConfig, themes = tamaguiConfig.themes, tokens = tamaguiConfig.tokens;
|
402
|
+
for (var key in themes) {
|
403
|
+
var theme = themes[key];
|
64
404
|
theme.id = key;
|
65
|
-
for (
|
405
|
+
for (var tkey in theme)
|
66
406
|
theme[tkey] = getVariableValue(theme[tkey]);
|
67
407
|
}
|
68
|
-
for (
|
69
|
-
|
70
|
-
for (
|
71
|
-
token[
|
408
|
+
for (var key1 in tokens) {
|
409
|
+
var token = _object_spread({}, tokens[key1]);
|
410
|
+
for (var tkey1 in token)
|
411
|
+
token[tkey1] = getVariableValue(token[tkey1]);
|
72
412
|
}
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
413
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
414
|
+
try {
|
415
|
+
for (var _iterator = components[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
416
|
+
var _ref = _step.value, component = _ref;
|
417
|
+
for (var _ref1 in component.nameToInfo) {
|
418
|
+
var _ = _ref1, compDefinition = _object_spread({}, component.nameToInfo[_]);
|
419
|
+
component.nameToInfo[_] = compDefinition;
|
420
|
+
var _compDefinition_staticConfig = compDefinition.staticConfig, parentStaticConfig = _compDefinition_staticConfig.parentStaticConfig, rest = _object_without_properties(_compDefinition_staticConfig, [
|
421
|
+
"parentStaticConfig"
|
422
|
+
]);
|
423
|
+
compDefinition.staticConfig = rest;
|
424
|
+
}
|
79
425
|
}
|
426
|
+
} catch (err) {
|
427
|
+
_didIteratorError = !0, _iteratorError = err;
|
428
|
+
} finally {
|
429
|
+
try {
|
430
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
431
|
+
} finally {
|
432
|
+
if (_didIteratorError)
|
433
|
+
throw _iteratorError;
|
434
|
+
}
|
435
|
+
}
|
80
436
|
next.nameToPaths = {};
|
81
|
-
for (
|
82
|
-
next.nameToPaths[
|
83
|
-
|
437
|
+
for (var key2 in nameToPaths)
|
438
|
+
next.nameToPaths[key2] = _to_consumable_array(nameToPaths[key2]);
|
439
|
+
var _next_tamaguiConfig = next.tamaguiConfig, fontsParsed = _next_tamaguiConfig.fontsParsed, getCSS = _next_tamaguiConfig.getCSS, tokensParsed = _next_tamaguiConfig.tokensParsed, themeConfig = _next_tamaguiConfig.themeConfig, cleanedConfig = _object_without_properties(_next_tamaguiConfig, [
|
440
|
+
"fontsParsed",
|
441
|
+
"getCSS",
|
442
|
+
"tokensParsed",
|
443
|
+
"themeConfig"
|
444
|
+
]);
|
84
445
|
return {
|
85
446
|
components,
|
86
447
|
nameToPaths,
|