@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": "
|
5
|
-
"names": ["res", "styles", "
|
3
|
+
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/extractToClassNames.ts"],
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAsB,0BACtB,cAAyB,iBACzB,OAAsB,0BAEtB,mBAAqB,sCACrB,IAAmB,kCACnB,iBAAgC,6BAGhC,4BAAmC,0CAEnC,oBAA2B,yBAC3B,wBAA+B,6BAE/B,+BAAsC,oCACtC,wBAA+B,6BAC/B,2BAAkC,gCAClC,uBAA8B,4BAC9B,yBAAgC,8BAChC,kBAAyB,uBACzB,gCAAgD,qCAChD,eAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtB,IAAMA,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,IACEC,iBA2BgBH,qBAAlBI,iBACAC,OACAC,KAMFC,KAWEC,QACA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S,OAAPD,QAAO,IAAA,EAAI4J,SAAS,CAAA,GACnC1J,UAAM4J,oCAAclL,OAAAA,GACpBuB,SAASJ,SAAU,IAAU,OAAPA,QAAO,GAAA,IAAK,IACxCQ,QAAQ2B,KACL,GAASvC,OAAPO,KAAI,GAAA,EAAgBL,OAAbF,QAAK,WAAA,EAA+BC,OAAvBC,UAAS,iBAAA,EAAuCC,OAAzBF,cAAa,eAAA,EAAkCK,OAAtBH,cAAa,SAAA,EAAsBK,OAAbF,WAAU,GAAA,EAAU,OAAPE,MAAAA,CAAAA,IAI9G;;YAAO;cACLhB;cACAK;cACAuK,IAAItK,OAAO4J;cACX5F,KAAKhE,OAAOgE;YACd;;;;EACF,CAAA,GAlbsBjF,qBAAAA,MAAAA,MAAAA,SAAAA;;",
|
5
|
+
"names": ["mergeStyleGroups", "shadowOpacity", "shadowRadius", "shadowColor", "shadowOffset", "extractToClassNames", "extractor", "source", "sourcePath", "options", "shouldPrintDebug", "tm", "getStylesAtomic", "shouldLogTiming", "start", "mem", "ast", "cssMap", "existingHoists", "hasFlattened", "res", "styles", "result", "memUsed", "path", "numOptimized", "numFound", "numFlattened", "memory", "timing", "timingStr", "pre", "memStr", "timer", "requireTamaguiCore", "includes", "console", "warn", "Error", "isAbsolute", "test", "slice", "disableExtraction", "loadTamagui", "logTimings", "Date", "now", "process", "env", "TAMAGUI_SHOW_MEMORY_USAGE", "memoryUsage", "babelParse", "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", "t", "conditionalExpression", "stringLiteral", "acceptsClassName", "didFlattenThisTag", "finalAttrs", "finalStyles", "viewStyles", "attr", "type", "value", "ensureNeededPrevStyle", "style", "keys", "Object", "some", "key", "k", "addStyles", "styleWithPrev", "lastMediaImportance", "newFontFamily", "getFontFamilyClassNameFromProps", "newClassNames", "concatClassName", "existing", "find", "previous", "replace", "prop", "pseudo", "property", "jsxAttribute", "jsxIdentifier", "val", "isJSXSpreadAttribute", "isSimpleSpread", "logicalExpression", "argument", "memberExpression", "name", "evaluatedValue", "mediaExtraction", "extractMediaStyle", "getTamagui", "ternaryWithoutMedia", "inlineMediaQuery", "mediaStyles", "consequent", "alternate", "logLines", "attributes", "extraClassNames", "TAMAGUI_DEBUG_OPTIMIZATIONS", "componentName", "names", "buildClassName", "nameExpr", "hoistClassNames", "expr", "isIdentifier", "ensureImportingConcat", "simpleSpreads", "filter", "callExpression", "jsxExpressionContainer", "comment", "util", "format", "className", "has", "get", "modified", "optimized", "flattened", "styled", "Array", "from", "values", "trim", "generate", "concise", "filename", "retainLines", "sourceFileName", "sourceMaps", "code", "split", "startsWith", "Math", "round", "heapUsed", "basename", "padStart", "found", "getPrefixLogs", "js"]
|
6
6
|
}
|
@@ -19,10 +19,10 @@ __export(findTopmostFunction_exports, {
|
|
19
19
|
});
|
20
20
|
module.exports = __toCommonJS(findTopmostFunction_exports);
|
21
21
|
function findTopmostFunction(jsxPath) {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
for (var isFunction = function(path) {
|
23
|
+
return path.isArrowFunctionExpression() || path.isFunctionDeclaration() || path.isFunctionExpression();
|
24
|
+
}, compFn = jsxPath.findParent(isFunction); compFn; ) {
|
25
|
+
var parent = compFn.findParent(isFunction);
|
26
26
|
if (parent)
|
27
27
|
compFn = parent;
|
28
28
|
else
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
|
-
"sources": ["../../../src/extractor/findTopmostFunction.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;
|
5
|
-
"names": []
|
3
|
+
"sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/findTopmostFunction.ts"],
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAGA;;;;;AAAO,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
|
}
|
@@ -29,84 +29,445 @@ __export(generateTamaguiStudioConfig_exports, {
|
|
29
29
|
});
|
30
30
|
module.exports = __toCommonJS(generateTamaguiStudioConfig_exports);
|
31
31
|
var import_path = require("path"), import_generate_themes = require("@tamagui/generate-themes"), import_fs_extra = __toESM(require("fs-extra")), import_requireTamaguiCore = require("../helpers/requireTamaguiCore"), import_bundleConfig = require("./bundleConfig");
|
32
|
-
|
33
|
-
|
34
|
-
var
|
32
|
+
function _array_like_to_array(arr, len) {
|
33
|
+
(len == null || len > arr.length) && (len = arr.length);
|
34
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
35
|
+
arr2[i] = arr[i];
|
36
|
+
return arr2;
|
37
|
+
}
|
38
|
+
function _array_with_holes(arr) {
|
39
|
+
if (Array.isArray(arr))
|
40
|
+
return arr;
|
41
|
+
}
|
42
|
+
function _array_without_holes(arr) {
|
43
|
+
if (Array.isArray(arr))
|
44
|
+
return _array_like_to_array(arr);
|
45
|
+
}
|
46
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
35
47
|
try {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
48
|
+
var info = gen[key](arg), value = info.value;
|
49
|
+
} catch (error) {
|
50
|
+
reject(error);
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
|
54
|
+
}
|
55
|
+
function _async_to_generator(fn) {
|
56
|
+
return function() {
|
57
|
+
var self = this, args = arguments;
|
58
|
+
return new Promise(function(resolve, reject) {
|
59
|
+
var gen = fn.apply(self, args);
|
60
|
+
function _next(value) {
|
61
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
62
|
+
}
|
63
|
+
function _throw(err) {
|
64
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
65
|
+
}
|
66
|
+
_next(void 0);
|
42
67
|
});
|
43
|
-
}
|
44
|
-
|
68
|
+
};
|
69
|
+
}
|
70
|
+
function _define_property(obj, key, value) {
|
71
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
72
|
+
value,
|
73
|
+
enumerable: !0,
|
74
|
+
configurable: !0,
|
75
|
+
writable: !0
|
76
|
+
}) : obj[key] = value, obj;
|
77
|
+
}
|
78
|
+
function _iterable_to_array(iter) {
|
79
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
80
|
+
return Array.from(iter);
|
81
|
+
}
|
82
|
+
function _iterable_to_array_limit(arr, i) {
|
83
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
84
|
+
if (_i != null) {
|
85
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
86
|
+
try {
|
87
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
88
|
+
;
|
89
|
+
} catch (err) {
|
90
|
+
_d = !0, _e = err;
|
91
|
+
} finally {
|
92
|
+
try {
|
93
|
+
!_n && _i.return != null && _i.return();
|
94
|
+
} finally {
|
95
|
+
if (_d)
|
96
|
+
throw _e;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
return _arr;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
function _non_iterable_rest() {
|
103
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
104
|
+
}
|
105
|
+
function _non_iterable_spread() {
|
106
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
107
|
+
}
|
108
|
+
function _object_spread(target) {
|
109
|
+
for (var i = 1; i < arguments.length; i++) {
|
110
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
111
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
112
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
113
|
+
}))), ownKeys.forEach(function(key) {
|
114
|
+
_define_property(target, key, source[key]);
|
115
|
+
});
|
116
|
+
}
|
117
|
+
return target;
|
118
|
+
}
|
119
|
+
function _object_without_properties(source, excluded) {
|
120
|
+
if (source == null)
|
121
|
+
return {};
|
122
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
123
|
+
if (Object.getOwnPropertySymbols) {
|
124
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
125
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
126
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
127
|
+
}
|
128
|
+
return target;
|
129
|
+
}
|
130
|
+
function _object_without_properties_loose(source, excluded) {
|
131
|
+
if (source == null)
|
132
|
+
return {};
|
133
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
134
|
+
for (i = 0; i < sourceKeys.length; i++)
|
135
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
136
|
+
return target;
|
137
|
+
}
|
138
|
+
function _sliced_to_array(arr, i) {
|
139
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
140
|
+
}
|
141
|
+
function _to_consumable_array(arr) {
|
142
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
143
|
+
}
|
144
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
145
|
+
if (o) {
|
146
|
+
if (typeof o == "string")
|
147
|
+
return _array_like_to_array(o, minLen);
|
148
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
149
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
150
|
+
return Array.from(n);
|
151
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
152
|
+
return _array_like_to_array(o, minLen);
|
45
153
|
}
|
46
154
|
}
|
155
|
+
function _ts_generator(thisArg, body) {
|
156
|
+
var f, y, t, g, _ = {
|
157
|
+
label: 0,
|
158
|
+
sent: function() {
|
159
|
+
if (t[0] & 1)
|
160
|
+
throw t[1];
|
161
|
+
return t[1];
|
162
|
+
},
|
163
|
+
trys: [],
|
164
|
+
ops: []
|
165
|
+
};
|
166
|
+
return g = {
|
167
|
+
next: verb(0),
|
168
|
+
throw: verb(1),
|
169
|
+
return: verb(2)
|
170
|
+
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
171
|
+
return this;
|
172
|
+
}), g;
|
173
|
+
function verb(n) {
|
174
|
+
return function(v) {
|
175
|
+
return step([
|
176
|
+
n,
|
177
|
+
v
|
178
|
+
]);
|
179
|
+
};
|
180
|
+
}
|
181
|
+
function step(op) {
|
182
|
+
if (f)
|
183
|
+
throw new TypeError("Generator is already executing.");
|
184
|
+
for (; _; )
|
185
|
+
try {
|
186
|
+
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)
|
187
|
+
return t;
|
188
|
+
switch (y = 0, t && (op = [
|
189
|
+
op[0] & 2,
|
190
|
+
t.value
|
191
|
+
]), op[0]) {
|
192
|
+
case 0:
|
193
|
+
case 1:
|
194
|
+
t = op;
|
195
|
+
break;
|
196
|
+
case 4:
|
197
|
+
return _.label++, {
|
198
|
+
value: op[1],
|
199
|
+
done: !1
|
200
|
+
};
|
201
|
+
case 5:
|
202
|
+
_.label++, y = op[1], op = [
|
203
|
+
0
|
204
|
+
];
|
205
|
+
continue;
|
206
|
+
case 7:
|
207
|
+
op = _.ops.pop(), _.trys.pop();
|
208
|
+
continue;
|
209
|
+
default:
|
210
|
+
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
211
|
+
_ = 0;
|
212
|
+
continue;
|
213
|
+
}
|
214
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
215
|
+
_.label = op[1];
|
216
|
+
break;
|
217
|
+
}
|
218
|
+
if (op[0] === 6 && _.label < t[1]) {
|
219
|
+
_.label = t[1], t = op;
|
220
|
+
break;
|
221
|
+
}
|
222
|
+
if (t && _.label < t[2]) {
|
223
|
+
_.label = t[2], _.ops.push(op);
|
224
|
+
break;
|
225
|
+
}
|
226
|
+
t[2] && _.ops.pop(), _.trys.pop();
|
227
|
+
continue;
|
228
|
+
}
|
229
|
+
op = body.call(thisArg, _);
|
230
|
+
} catch (e) {
|
231
|
+
op = [
|
232
|
+
6,
|
233
|
+
e
|
234
|
+
], y = 0;
|
235
|
+
} finally {
|
236
|
+
f = t = 0;
|
237
|
+
}
|
238
|
+
if (op[0] & 5)
|
239
|
+
throw op[1];
|
240
|
+
return {
|
241
|
+
value: op[0] ? op[1] : void 0,
|
242
|
+
done: !0
|
243
|
+
};
|
244
|
+
}
|
245
|
+
}
|
246
|
+
var tamaguiDir = (0, import_path.join)(process.cwd(), ".tamagui"), confFile = (0, import_path.join)(tamaguiDir, "tamagui.config.json");
|
247
|
+
function generateTamaguiStudioConfig(tamaguiOptions, configIn) {
|
248
|
+
return _generateTamaguiStudioConfig.apply(this, arguments);
|
249
|
+
}
|
250
|
+
function _generateTamaguiStudioConfig() {
|
251
|
+
return _generateTamaguiStudioConfig = _async_to_generator(function(tamaguiOptions, configIn) {
|
252
|
+
var rebuild, config, _tmp, out, err, _process_env_DEBUG, _arguments = arguments;
|
253
|
+
return _ts_generator(this, function(_state) {
|
254
|
+
switch (_state.label) {
|
255
|
+
case 0:
|
256
|
+
rebuild = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : !1, _state.label = 1;
|
257
|
+
case 1:
|
258
|
+
return _state.trys.push([
|
259
|
+
1,
|
260
|
+
7,
|
261
|
+
,
|
262
|
+
8
|
263
|
+
]), configIn == null ? [
|
264
|
+
3,
|
265
|
+
2
|
266
|
+
] : (_tmp = configIn, [
|
267
|
+
3,
|
268
|
+
4
|
269
|
+
]);
|
270
|
+
case 2:
|
271
|
+
return [
|
272
|
+
4,
|
273
|
+
(0, import_bundleConfig.getBundledConfig)(tamaguiOptions, rebuild)
|
274
|
+
];
|
275
|
+
case 3:
|
276
|
+
_tmp = _state.sent(), _state.label = 4;
|
277
|
+
case 4:
|
278
|
+
return config = _tmp, config ? (out = transformConfig(config, tamaguiOptions.platform), [
|
279
|
+
4,
|
280
|
+
import_fs_extra.default.ensureDir((0, import_path.dirname)(confFile))
|
281
|
+
]) : [
|
282
|
+
2
|
283
|
+
];
|
284
|
+
case 5:
|
285
|
+
return _state.sent(), [
|
286
|
+
4,
|
287
|
+
import_fs_extra.default.writeJSON(confFile, out, {
|
288
|
+
spaces: 2
|
289
|
+
})
|
290
|
+
];
|
291
|
+
case 6:
|
292
|
+
return _state.sent(), [
|
293
|
+
3,
|
294
|
+
8
|
295
|
+
];
|
296
|
+
case 7:
|
297
|
+
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), [
|
298
|
+
3,
|
299
|
+
8
|
300
|
+
];
|
301
|
+
case 8:
|
302
|
+
return [
|
303
|
+
2
|
304
|
+
];
|
305
|
+
}
|
306
|
+
});
|
307
|
+
}), _generateTamaguiStudioConfig.apply(this, arguments);
|
308
|
+
}
|
47
309
|
function generateTamaguiStudioConfigSync(_tamaguiOptions, config) {
|
48
|
-
var _a;
|
49
310
|
try {
|
50
311
|
import_fs_extra.default.ensureDirSync((0, import_path.dirname)(confFile)), import_fs_extra.default.writeJSONSync(confFile, transformConfig(config, _tamaguiOptions.platform), {
|
51
312
|
spaces: 2
|
52
313
|
});
|
53
314
|
} catch (err) {
|
54
|
-
|
315
|
+
var _process_env_DEBUG;
|
316
|
+
(!((_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);
|
55
317
|
}
|
56
318
|
}
|
57
|
-
|
58
|
-
|
59
|
-
return;
|
60
|
-
const { input, output } = tamaguiOptions.themeBuilder, inPath = resolveRelativePath(input), outPath = resolveRelativePath(output), generatedOutput = await (0, import_generate_themes.generateThemes)(inPath), hasChanged = force || await (async () => {
|
61
|
-
try {
|
62
|
-
if (!await import_fs_extra.default.pathExists(
|
63
|
-
(0, import_path.join)(tamaguiDir, "theme-builder.json")
|
64
|
-
))
|
65
|
-
return !0;
|
66
|
-
if (!generatedOutput)
|
67
|
-
return !1;
|
68
|
-
const next = generatedOutput.generated, current = await (0, import_fs_extra.readFile)(outPath, "utf-8");
|
69
|
-
return next !== current;
|
70
|
-
} catch {
|
71
|
-
}
|
72
|
-
return !0;
|
73
|
-
})();
|
74
|
-
return hasChanged && await (0, import_generate_themes.writeGeneratedThemes)(tamaguiDir, outPath, generatedOutput), hasChanged;
|
319
|
+
function generateTamaguiThemes(tamaguiOptions) {
|
320
|
+
return _generateTamaguiThemes.apply(this, arguments);
|
75
321
|
}
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
322
|
+
function _generateTamaguiThemes() {
|
323
|
+
return _generateTamaguiThemes = _async_to_generator(function(tamaguiOptions) {
|
324
|
+
var force, _tamaguiOptions_themeBuilder, input, output, inPath, outPath, generatedOutput, hasChanged, _tmp, _arguments = arguments;
|
325
|
+
return _ts_generator(this, function(_state) {
|
326
|
+
switch (_state.label) {
|
327
|
+
case 0:
|
328
|
+
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), [
|
329
|
+
4,
|
330
|
+
(0, import_generate_themes.generateThemes)(inPath)
|
331
|
+
]) : [
|
332
|
+
2
|
333
|
+
];
|
334
|
+
case 1:
|
335
|
+
return generatedOutput = _state.sent(), _tmp = force, _tmp ? [
|
336
|
+
3,
|
337
|
+
3
|
338
|
+
] : [
|
339
|
+
4,
|
340
|
+
_async_to_generator(function() {
|
341
|
+
var themeBuilderJsonExists, next, current, err;
|
342
|
+
return _ts_generator(this, function(_state2) {
|
343
|
+
switch (_state2.label) {
|
344
|
+
case 0:
|
345
|
+
return _state2.trys.push([
|
346
|
+
0,
|
347
|
+
3,
|
348
|
+
,
|
349
|
+
4
|
350
|
+
]), [
|
351
|
+
4,
|
352
|
+
import_fs_extra.default.pathExists((0, import_path.join)(tamaguiDir, "theme-builder.json"))
|
353
|
+
];
|
354
|
+
case 1:
|
355
|
+
return themeBuilderJsonExists = _state2.sent(), themeBuilderJsonExists ? generatedOutput ? (next = generatedOutput.generated, [
|
356
|
+
4,
|
357
|
+
(0, import_fs_extra.readFile)(outPath, "utf-8")
|
358
|
+
]) : [
|
359
|
+
2,
|
360
|
+
!1
|
361
|
+
] : [
|
362
|
+
2,
|
363
|
+
!0
|
364
|
+
];
|
365
|
+
case 2:
|
366
|
+
return current = _state2.sent(), [
|
367
|
+
2,
|
368
|
+
next !== current
|
369
|
+
];
|
370
|
+
case 3:
|
371
|
+
return err = _state2.sent(), [
|
372
|
+
3,
|
373
|
+
4
|
374
|
+
];
|
375
|
+
case 4:
|
376
|
+
return [
|
377
|
+
2,
|
378
|
+
!0
|
379
|
+
];
|
380
|
+
}
|
381
|
+
});
|
382
|
+
})()
|
383
|
+
];
|
384
|
+
case 2:
|
385
|
+
_tmp = _state.sent(), _state.label = 3;
|
386
|
+
case 3:
|
387
|
+
return hasChanged = _tmp, hasChanged ? [
|
388
|
+
4,
|
389
|
+
(0, import_generate_themes.writeGeneratedThemes)(tamaguiDir, outPath, generatedOutput)
|
390
|
+
] : [
|
391
|
+
3,
|
392
|
+
5
|
393
|
+
];
|
394
|
+
case 4:
|
395
|
+
_state.sent(), _state.label = 5;
|
396
|
+
case 5:
|
397
|
+
return [
|
398
|
+
2,
|
399
|
+
hasChanged
|
400
|
+
];
|
401
|
+
}
|
402
|
+
});
|
403
|
+
}), _generateTamaguiThemes.apply(this, arguments);
|
404
|
+
}
|
405
|
+
var resolveRelativePath = function(inputPath) {
|
406
|
+
return inputPath.startsWith(".") ? (0, import_path.join)(process.cwd(), inputPath) : require.resolve(inputPath);
|
407
|
+
};
|
408
|
+
function cloneDeepSafe(x) {
|
409
|
+
var excludeKeys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
410
|
+
return x && (Array.isArray(x) ? x.map(function(_) {
|
411
|
+
return cloneDeepSafe(_);
|
412
|
+
}) : typeof x == "function" ? "Function" : typeof x != "object" ? x : "$$typeof" in x ? "Component" : Object.fromEntries(Object.entries(x).flatMap(function(param) {
|
413
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
414
|
+
return excludeKeys[k] ? [] : [
|
415
|
+
[
|
416
|
+
k,
|
417
|
+
cloneDeepSafe(v)
|
418
|
+
]
|
419
|
+
];
|
420
|
+
})));
|
81
421
|
}
|
82
422
|
function transformConfig(config, platform) {
|
83
423
|
if (!config)
|
84
424
|
return null;
|
85
|
-
|
425
|
+
var getVariableValue = (0, import_requireTamaguiCore.requireTamaguiCore)(platform).getVariableValue, next = cloneDeepSafe(config, {
|
86
426
|
validStyles: !0
|
87
|
-
}),
|
88
|
-
for (
|
89
|
-
|
427
|
+
}), components = next.components, nameToPaths = next.nameToPaths, tamaguiConfig = next.tamaguiConfig, themes = tamaguiConfig.themes, tokens = tamaguiConfig.tokens;
|
428
|
+
for (var key in themes) {
|
429
|
+
var theme = themes[key];
|
90
430
|
theme.id = key;
|
91
|
-
for (
|
431
|
+
for (var tkey in theme)
|
92
432
|
theme[tkey] = getVariableValue(theme[tkey]);
|
93
433
|
}
|
94
|
-
for (
|
95
|
-
|
96
|
-
for (
|
97
|
-
token[
|
434
|
+
for (var key1 in tokens) {
|
435
|
+
var token = _object_spread({}, tokens[key1]);
|
436
|
+
for (var tkey1 in token)
|
437
|
+
token[tkey1] = getVariableValue(token[tkey1]);
|
98
438
|
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
439
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
440
|
+
try {
|
441
|
+
for (var _iterator = components[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
442
|
+
var _ref = _step.value, component = _ref;
|
443
|
+
for (var _ref1 in component.nameToInfo) {
|
444
|
+
var _ = _ref1, compDefinition = _object_spread({}, component.nameToInfo[_]);
|
445
|
+
component.nameToInfo[_] = compDefinition;
|
446
|
+
var _compDefinition_staticConfig = compDefinition.staticConfig, parentStaticConfig = _compDefinition_staticConfig.parentStaticConfig, rest = _object_without_properties(_compDefinition_staticConfig, [
|
447
|
+
"parentStaticConfig"
|
448
|
+
]);
|
449
|
+
compDefinition.staticConfig = rest;
|
450
|
+
}
|
105
451
|
}
|
452
|
+
} catch (err) {
|
453
|
+
_didIteratorError = !0, _iteratorError = err;
|
454
|
+
} finally {
|
455
|
+
try {
|
456
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
457
|
+
} finally {
|
458
|
+
if (_didIteratorError)
|
459
|
+
throw _iteratorError;
|
460
|
+
}
|
461
|
+
}
|
106
462
|
next.nameToPaths = {};
|
107
|
-
for (
|
108
|
-
next.nameToPaths[
|
109
|
-
|
463
|
+
for (var key2 in nameToPaths)
|
464
|
+
next.nameToPaths[key2] = _to_consumable_array(nameToPaths[key2]);
|
465
|
+
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, [
|
466
|
+
"fontsParsed",
|
467
|
+
"getCSS",
|
468
|
+
"tokensParsed",
|
469
|
+
"themeConfig"
|
470
|
+
]);
|
110
471
|
return {
|
111
472
|
components,
|
112
473
|
nameToPaths,
|