@tamagui/static 1.88.0 → 1.88.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/constants.js +1 -11
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/extractor/accessSafe.js +0 -4
- package/dist/cjs/extractor/babelParse.js +0 -5
- package/dist/cjs/extractor/buildClassName.js +0 -5
- package/dist/cjs/extractor/bundle.js +2 -8
- package/dist/cjs/extractor/bundle.js.map +1 -1
- package/dist/cjs/extractor/bundleConfig.js +8 -19
- package/dist/cjs/extractor/bundleConfig.js.map +1 -1
- package/dist/cjs/extractor/createEvaluator.js +0 -5
- package/dist/cjs/extractor/createExtractor.js +23 -32
- package/dist/cjs/extractor/createExtractor.js.map +2 -2
- package/dist/cjs/extractor/createExtractor.native.js +2 -2
- package/dist/cjs/extractor/createExtractor.native.js.map +1 -1
- package/dist/cjs/extractor/ensureImportingConcat.js +0 -4
- package/dist/cjs/extractor/esbuildAliasPlugin.js +0 -4
- package/dist/cjs/extractor/evaluateAstNode.js +0 -4
- package/dist/cjs/extractor/extractHelpers.js +3 -22
- package/dist/cjs/extractor/extractHelpers.js.map +1 -1
- package/dist/cjs/extractor/extractMediaStyle.js +2 -8
- package/dist/cjs/extractor/extractMediaStyle.js.map +1 -1
- package/dist/cjs/extractor/extractToClassNames.js +4 -9
- package/dist/cjs/extractor/extractToClassNames.js.map +1 -1
- package/dist/cjs/extractor/findTopmostFunction.js +0 -4
- package/dist/cjs/extractor/generateTamaguiStudioConfig.js +2 -10
- package/dist/cjs/extractor/generateTamaguiStudioConfig.js.map +1 -1
- package/dist/cjs/extractor/generatedUid.js +0 -4
- package/dist/cjs/extractor/getPrefixLogs.js +1 -5
- package/dist/cjs/extractor/getPrefixLogs.js.map +1 -1
- package/dist/cjs/extractor/getPropValueFromAttributes.js +0 -4
- package/dist/cjs/extractor/getSourceModule.js +0 -4
- package/dist/cjs/extractor/getStaticBindingsForScope.js +1 -7
- package/dist/cjs/extractor/getStaticBindingsForScope.js.map +1 -1
- package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.js +0 -4
- package/dist/cjs/extractor/hoistClassNames.js +0 -4
- package/dist/cjs/extractor/literalToAst.js +1 -6
- package/dist/cjs/extractor/literalToAst.js.map +1 -1
- package/dist/cjs/extractor/loadFile.js +3 -4
- package/dist/cjs/extractor/loadFile.js.map +1 -1
- package/dist/cjs/extractor/loadTamagui.js +3 -13
- package/dist/cjs/extractor/loadTamagui.js.map +1 -1
- package/dist/cjs/extractor/logLines.js +0 -4
- package/dist/cjs/extractor/normalizeTernaries.js +0 -4
- package/dist/cjs/extractor/propsToFontFamilyCache.js +0 -6
- package/dist/cjs/extractor/removeUnusedHooks.js +2 -9
- package/dist/cjs/extractor/removeUnusedHooks.js.map +1 -1
- package/dist/cjs/extractor/timer.js +0 -4
- package/dist/cjs/extractor/validHTMLAttributes.js +0 -4
- package/dist/cjs/getPragmaOptions.js +1 -6
- package/dist/cjs/getPragmaOptions.js.map +1 -1
- package/dist/cjs/getPragmaOptions.native.js +1 -1
- package/dist/cjs/getPragmaOptions.native.js.map +1 -1
- package/dist/cjs/helpers/memoize.js +0 -4
- package/dist/cjs/helpers/requireTamaguiCore.js +0 -4
- package/dist/cjs/index.js +0 -5
- package/dist/cjs/minifyCSS.js +0 -4
- package/dist/cjs/registerRequire.js +6 -20
- package/dist/cjs/registerRequire.js.map +1 -1
- package/dist/cjs/registerRequire.native.js +4 -10
- package/dist/cjs/registerRequire.native.js.map +1 -1
- package/dist/cjs/server.js +0 -4
- package/dist/cjs/static.js +0 -12
- package/dist/cjs/webpackPlugin.js +0 -4
- package/dist/esm/constants.native.js +39 -4
- package/dist/esm/constants.native.js.map +2 -2
- package/dist/esm/extractor/accessSafe.native.js +32 -3
- package/dist/esm/extractor/accessSafe.native.js.map +1 -1
- package/dist/esm/extractor/babelParse.native.js +33 -3
- package/dist/esm/extractor/babelParse.native.js.map +1 -1
- package/dist/esm/extractor/buildClassName.native.js +33 -3
- package/dist/esm/extractor/buildClassName.native.js.map +1 -1
- package/dist/esm/extractor/bundle.native.js +43 -16
- package/dist/esm/extractor/bundle.native.js.map +2 -2
- package/dist/esm/extractor/bundleConfig.native.js +69 -44
- package/dist/esm/extractor/bundleConfig.native.js.map +2 -2
- package/dist/esm/extractor/createEvaluator.native.js +37 -12
- package/dist/esm/extractor/createEvaluator.native.js.map +2 -2
- package/dist/esm/extractor/createExtractor.native.js +115 -109
- package/dist/esm/extractor/createExtractor.native.js.map +2 -2
- package/dist/esm/extractor/ensureImportingConcat.native.js +32 -3
- package/dist/esm/extractor/ensureImportingConcat.native.js.map +1 -1
- package/dist/esm/extractor/esbuildAliasPlugin.native.js +23 -2
- package/dist/esm/extractor/esbuildAliasPlugin.native.js.map +1 -1
- package/dist/esm/extractor/evaluateAstNode.native.js +32 -3
- package/dist/esm/extractor/evaluateAstNode.native.js.map +1 -1
- package/dist/esm/extractor/extractHelpers.native.js +54 -14
- package/dist/esm/extractor/extractHelpers.native.js.map +2 -2
- package/dist/esm/extractor/extractMediaStyle.native.js +40 -12
- package/dist/esm/extractor/extractMediaStyle.native.js.map +1 -1
- package/dist/esm/extractor/extractToClassNames.native.js +48 -34
- package/dist/esm/extractor/extractToClassNames.native.js.map +2 -2
- package/dist/esm/extractor/findTopmostFunction.native.js +23 -2
- package/dist/esm/extractor/findTopmostFunction.native.js.map +1 -1
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +49 -20
- package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +2 -2
- package/dist/esm/extractor/generatedUid.native.js +32 -3
- package/dist/esm/extractor/generatedUid.native.js.map +1 -1
- package/dist/esm/extractor/getPrefixLogs.native.js +24 -3
- package/dist/esm/extractor/getPrefixLogs.native.js.map +1 -1
- package/dist/esm/extractor/getPropValueFromAttributes.native.js +34 -7
- package/dist/esm/extractor/getPropValueFromAttributes.native.js.map +2 -2
- package/dist/esm/extractor/getSourceModule.native.js +32 -3
- package/dist/esm/extractor/getSourceModule.native.js.map +1 -1
- package/dist/esm/extractor/getStaticBindingsForScope.native.js +41 -14
- package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +1 -1
- package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.js +25 -4
- package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +1 -1
- package/dist/esm/extractor/hoistClassNames.native.js +32 -3
- package/dist/esm/extractor/hoistClassNames.native.js.map +1 -1
- package/dist/esm/extractor/literalToAst.native.js +34 -4
- package/dist/esm/extractor/literalToAst.native.js.map +1 -1
- package/dist/esm/extractor/loadFile.native.js +5 -3
- package/dist/esm/extractor/loadFile.native.js.map +1 -1
- package/dist/esm/extractor/loadTamagui.native.js +77 -63
- package/dist/esm/extractor/loadTamagui.native.js.map +2 -2
- package/dist/esm/extractor/logLines.native.js +23 -2
- package/dist/esm/extractor/logLines.native.js.map +1 -1
- package/dist/esm/extractor/normalizeTernaries.native.js +34 -7
- package/dist/esm/extractor/normalizeTernaries.native.js.map +2 -2
- package/dist/esm/extractor/propsToFontFamilyCache.native.js +25 -2
- package/dist/esm/extractor/propsToFontFamilyCache.native.js.map +1 -1
- package/dist/esm/extractor/removeUnusedHooks.native.js +37 -5
- package/dist/esm/extractor/removeUnusedHooks.native.js.map +1 -1
- package/dist/esm/extractor/timer.native.js +23 -2
- package/dist/esm/extractor/timer.native.js.map +1 -1
- package/dist/esm/extractor/validHTMLAttributes.native.js +23 -2
- package/dist/esm/extractor/validHTMLAttributes.native.js.map +1 -1
- package/dist/esm/getPragmaOptions.native.js +25 -3
- package/dist/esm/getPragmaOptions.native.js.map +1 -1
- package/dist/esm/helpers/memoize.native.js +23 -2
- package/dist/esm/helpers/memoize.native.js.map +1 -1
- package/dist/esm/helpers/requireTamaguiCore.native.js +23 -2
- package/dist/esm/helpers/requireTamaguiCore.native.js.map +1 -1
- package/dist/esm/index.native.js +22 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/minifyCSS.native.js +34 -6
- package/dist/esm/minifyCSS.native.js.map +2 -2
- package/dist/esm/registerRequire.js +4 -10
- package/dist/esm/registerRequire.js.map +1 -1
- package/dist/esm/registerRequire.native.js +36 -18
- package/dist/esm/registerRequire.native.js.map +1 -1
- package/dist/esm/server.native.js +34 -5
- package/dist/esm/server.native.js.map +2 -2
- package/dist/esm/setup.native.js +1 -0
- package/dist/esm/setup.native.js.map +1 -1
- package/dist/esm/static.native.js +39 -12
- package/dist/esm/static.native.js.map +1 -1
- package/dist/esm/types.native.js +14 -0
- package/dist/esm/types.native.js.map +2 -2
- package/dist/esm/webpackPlugin.native.js +23 -2
- package/dist/esm/webpackPlugin.native.js.map +1 -1
- package/package.json +14 -14
- package/src/registerRequire.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/getSourceModule.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAUZ,SAAS,gBACd,UACA,aAIqB;AAErB,MAAI,CAAC,YAAY;AACf,WAAO;AAGT,MAAI,cACA,UACA,OACA,cACA,mBAAmB;AAEvB,QAAM,WAAW,YAAY,KAAK;AAElC;AAAA;AAAA,IAEE,EAAE,yBAAyB,QAAQ;AAAA,IAEnC,EAAE,kBAAkB,QAAQ;AAAA;AAE5B,IAAI,EAAE,oBAAoB,YAAY,KAAK,MAAM,MAC/C,eAAe,YAAY,KAAK,OAAO,OAAO,OAC9C,QAAQ,SAAS,MAAM,MACvB,mBAAmB,IACf,EAAE,kBAAkB,QAAQ,KAC9B,WAAW,SAAS,SAAS,MAC7B,eAAe,OAEf,WAAW,SAAS,MAAM,MAC1B,eAAe;AAAA,WAInB,EAAE,qBAAqB,QAAQ,KAC/B,SAAS,QAAQ,QACjB,EAAE,iBAAiB,SAAS,IAAI,KAChC,EAAE,aAAa,SAAS,KAAK,MAAM,KACnC,SAAS,KAAK,OAAO,SAAS,aAC9B,SAAS,KAAK,UAAU,WAAW,GACnC;AACA,UAAM,WAAW,SAAS,KAAK,UAAU,CAAC;AAC1C,QAAI,CAAC,EAAE,gBAAgB,QAAQ;AAC7B,aAAO;AAIT,QAFA,eAAe,SAAS,OAEpB,EAAE,aAAa,SAAS,EAAE;AAC5B,cAAQ,SAAS,GAAG,MACpB,WAAW,SAAS,GAAG,MACvB,eAAe;AAAA,aACN,EAAE,gBAAgB,SAAS,EAAE,GAAG;AACzC,iBAAW,WAAW,SAAS,GAAG;AAChC,YACE,EAAE,iBAAiB,OAAO,KAC1B,EAAE,aAAa,QAAQ,KAAK,KAC5B,QAAQ,MAAM,SAAS,UACvB;AACA,kBAAQ,QAAQ,MAAM,MAEtB,WAAW,QAAQ,IAAI,MACvB,eAAe;AACf;AAAA,QACF;AAGF,UAAI,CAAC,SAAS,CAAC;AACb,uBAAQ,MAAM,uCAAuC,QAAQ,GACtD;AAAA,IAEX;AACE,qBAAQ,MAAM,yBAAyB,SAAS,GAAG,IAAI,GAChD;AAAA,EAEX;AACE,WAAO;AAGT,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var getStaticBindingsForScope_exports = {};
|
|
25
|
+
__export(getStaticBindingsForScope_exports, {
|
|
26
|
+
cleanupBeforeExit: () => cleanupBeforeExit,
|
|
27
|
+
getStaticBindingsForScope: () => getStaticBindingsForScope
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(getStaticBindingsForScope_exports);
|
|
30
|
+
var import_child_process = require("child_process"), import_path = require("path"), t = __toESM(require("@babel/types")), import_evaluateAstNode = require("./evaluateAstNode"), import_getSourceModule = require("./getSourceModule");
|
|
6
31
|
const isLocalImport = (path) => path.startsWith(".") || path.startsWith("/");
|
|
7
32
|
function resolveImportPath(sourcePath, path) {
|
|
8
|
-
const sourceDir = dirname(sourcePath);
|
|
9
|
-
return isLocalImport(path) ? (extname(path) === "" && (path += ".js"), resolve(sourceDir, path)) : path;
|
|
33
|
+
const sourceDir = (0, import_path.dirname)(sourcePath);
|
|
34
|
+
return isLocalImport(path) ? ((0, import_path.extname)(path) === "" && (path += ".js"), (0, import_path.resolve)(sourceDir, path)) : path;
|
|
10
35
|
}
|
|
11
|
-
const cache = /* @__PURE__ */ new Map(), pending = /* @__PURE__ */ new Map(), loadCmd = `${join(__dirname, "loadFile.js")}`;
|
|
36
|
+
const cache = /* @__PURE__ */ new Map(), pending = /* @__PURE__ */ new Map(), loadCmd = `${(0, import_path.join)(__dirname, "loadFile.js")}`;
|
|
12
37
|
let exited = !1, child = null;
|
|
13
38
|
function forkChild() {
|
|
14
|
-
child = fork(loadCmd, [], {
|
|
39
|
+
child = (0, import_child_process.fork)(loadCmd, [], {
|
|
15
40
|
execArgv: ["-r", "esbuild-register"],
|
|
16
41
|
detached: !1,
|
|
17
42
|
stdio: "ignore"
|
|
@@ -47,6 +72,7 @@ function importModule(path) {
|
|
|
47
72
|
return pending.set(path, promise), promise;
|
|
48
73
|
}
|
|
49
74
|
async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bindingCache, shouldPrintDebug) {
|
|
75
|
+
var _a;
|
|
50
76
|
const bindings = scope.getAllBindings(), ret = {}, program = scope.getProgramParent().block;
|
|
51
77
|
for (const node of program.body)
|
|
52
78
|
if (t.isImportDeclaration(node)) {
|
|
@@ -68,13 +94,13 @@ async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bind
|
|
|
68
94
|
} catch (err) {
|
|
69
95
|
shouldPrintDebug ? console.warn(
|
|
70
96
|
` | Skipping partial evaluation of constant file: ${moduleName} (DEBUG=tamagui for more)`
|
|
71
|
-
) : process.env.DEBUG
|
|
97
|
+
) : (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Error in partial evaluation", err.message, err.stack);
|
|
72
98
|
}
|
|
73
99
|
}
|
|
74
100
|
if (!bindingCache)
|
|
75
101
|
throw new Error("BindingCache is a required param");
|
|
76
102
|
for (const k in bindings) {
|
|
77
|
-
const binding = bindings[k], sourceModule = getSourceModule(k, binding);
|
|
103
|
+
const binding = bindings[k], sourceModule = (0, import_getSourceModule.getSourceModule)(k, binding);
|
|
78
104
|
if (sourceModule) {
|
|
79
105
|
if (!sourceModule.sourceModule)
|
|
80
106
|
continue;
|
|
@@ -113,15 +139,16 @@ async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bind
|
|
|
113
139
|
continue;
|
|
114
140
|
}
|
|
115
141
|
try {
|
|
116
|
-
ret[k] = evaluateAstNode(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k];
|
|
142
|
+
ret[k] = (0, import_evaluateAstNode.evaluateAstNode)(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k];
|
|
117
143
|
continue;
|
|
118
144
|
} catch {
|
|
119
145
|
}
|
|
120
146
|
}
|
|
121
147
|
return ret;
|
|
122
148
|
}
|
|
123
|
-
export
|
|
149
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
150
|
+
0 && (module.exports = {
|
|
124
151
|
cleanupBeforeExit,
|
|
125
152
|
getStaticBindingsForScope
|
|
126
|
-
};
|
|
153
|
+
});
|
|
127
154
|
//# sourceMappingURL=getStaticBindingsForScope.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/getStaticBindingsForScope.ts"],
|
|
4
|
-
"mappings": "AAAA
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAmC,0BACnC,cAAgD,iBAGhD,IAAmB,kCAEnB,yBAAgC,8BAChC,yBAAgC;AAEhC,MAAM,gBAAgB,CAAC,SAAiB,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,GAAG;AAEnF,SAAS,kBAAkB,YAAoB,MAAc;AAC3D,QAAM,gBAAY,qBAAQ,UAAU;AACpC,SAAI,cAAc,IAAI,SAChB,qBAAQ,IAAI,MAAM,OACpB,QAAQ,YAEH,qBAAQ,WAAW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EA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
+
var getTamaguiConfigPathFromOptionsConfig_exports = {};
|
|
17
|
+
__export(getTamaguiConfigPathFromOptionsConfig_exports, {
|
|
18
|
+
getTamaguiConfigPathFromOptionsConfig: () => getTamaguiConfigPathFromOptionsConfig
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(getTamaguiConfigPathFromOptionsConfig_exports);
|
|
21
|
+
var import_path = require("path");
|
|
2
22
|
function getTamaguiConfigPathFromOptionsConfig(config) {
|
|
3
|
-
return isAbsolute(config) ? config : join(process.cwd(), config);
|
|
23
|
+
return (0, import_path.isAbsolute)(config) ? config : (0, import_path.join)(process.cwd(), config);
|
|
4
24
|
}
|
|
5
|
-
export
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
6
27
|
getTamaguiConfigPathFromOptionsConfig
|
|
7
|
-
};
|
|
28
|
+
});
|
|
8
29
|
//# sourceMappingURL=getTamaguiConfigPathFromOptionsConfig.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/getTamaguiConfigPathFromOptionsConfig.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAI1B,SAAS,sCACd,QACA;AACA,aAAI,wBAAW,MAAM,IACZ,aAGF,kBAAK,QAAQ,IAAI,GAAG,MAAM;AACnC;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var hoistClassNames_exports = {};
|
|
25
|
+
__export(hoistClassNames_exports, {
|
|
26
|
+
hoistClassNames: () => hoistClassNames
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(hoistClassNames_exports);
|
|
29
|
+
var t = __toESM(require("@babel/types"));
|
|
2
30
|
function hoistClassNames(path, existing, expr) {
|
|
3
31
|
const hoist = hoistClassNames.bind(null, path, existing);
|
|
4
32
|
if (t.isStringLiteral(expr)) {
|
|
@@ -31,7 +59,8 @@ function hoistClassNames(path, existing, expr) {
|
|
|
31
59
|
return parent.unshiftContainer("body", variable), uid;
|
|
32
60
|
}
|
|
33
61
|
}
|
|
34
|
-
export
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
35
64
|
hoistClassNames
|
|
36
|
-
};
|
|
65
|
+
});
|
|
37
66
|
//# sourceMappingURL=hoistClassNames.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/hoistClassNames.ts"],
|
|
4
|
-
"mappings": "AACA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,QAAmB;AAEZ,SAAS,gBACd,MACA,UACA,MACA;AACA,QAAM,QAAQ,gBAAgB,KAAK,MAAM,MAAM,QAAQ;AACvD,MAAI,EAAE,gBAAgB,IAAI,GAAG;AAC3B,QAAI,KAAK,MAAM,KAAK,MAAM;AACxB,aAAO;AAET,QAAI,SAAS,KAAK,KAAK;AACrB,aAAO,SAAS,KAAK,KAAK;AAE5B,UAAM,aAAa,0BAA0B,IAAI;AACjD,oBAAS,KAAK,KAAK,IAAI,YAChB;AAAA,EACT;AACA,MAAI,EAAE,mBAAmB,IAAI;AAC3B,WAAO,EAAE,iBAAiB,KAAK,UAAU,MAAM,KAAK,IAAI,GAAG,MAAM,KAAK,KAAK,CAAC;AAE9E,MAAI,EAAE,oBAAoB,IAAI;AAC5B,WAAO,EAAE,kBAAkB,KAAK,UAAU,MAAM,KAAK,IAAI,GAAG,MAAM,KAAK,KAAK,CAAC;AAE/E,MAAI,EAAE,wBAAwB,IAAI;AAChC,WAAO,EAAE;AAAA,MACP,KAAK;AAAA,MACL,MAAM,KAAK,UAAU;AAAA,MACrB,MAAM,KAAK,SAAS;AAAA,IACtB;AAEF,SAAO;AAEP,WAAS,0BAA0B,KAAoC;AAErE,UAAM,MAAM,KAAK,MAAM,sBAAsB,IAAI,GAC3C,SAAS,KAAK,WAAW,CAACA,UAASA,MAAK,UAAU,CAAC;AACzD,QAAI,CAAC;AAAQ,YAAM,IAAI,MAAM,aAAa;AAC1C,UAAM,WAAW,EAAE,oBAAoB,SAAS;AAAA;AAAA,MAE9C,EAAE,mBAAmB,KAAK,EAAE,cAAc,IAAI,IAAI,KAAK,EAAE,CAAC;AAAA,IAC5D,CAAC;AAED,kBAAO,iBAAiB,QAAQ,QAAQ,GACjC;AAAA,EACT;AACF;",
|
|
5
5
|
"names": ["path"]
|
|
6
6
|
}
|
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var literalToAst_exports = {};
|
|
25
|
+
__export(literalToAst_exports, {
|
|
26
|
+
astToLiteral: () => astToLiteral,
|
|
27
|
+
literalToAst: () => literalToAst
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(literalToAst_exports);
|
|
30
|
+
var t = __toESM(require("@babel/types"));
|
|
2
31
|
function literalToAst(literal) {
|
|
3
32
|
if (literal === null)
|
|
4
33
|
return t.nullLiteral();
|
|
@@ -34,7 +63,7 @@ function astToLiteral(node) {
|
|
|
34
63
|
// @ts-ignore
|
|
35
64
|
(acc, element) => [
|
|
36
65
|
...acc,
|
|
37
|
-
...element
|
|
66
|
+
...(element == null ? void 0 : element.type) === "SpreadElement" ? astToLiteral(element.argument) : [astToLiteral(element)]
|
|
38
67
|
],
|
|
39
68
|
[]
|
|
40
69
|
);
|
|
@@ -59,8 +88,9 @@ function computeProps(props) {
|
|
|
59
88
|
return acc;
|
|
60
89
|
}, {});
|
|
61
90
|
}
|
|
62
|
-
export
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
63
93
|
astToLiteral,
|
|
64
94
|
literalToAst
|
|
65
|
-
};
|
|
95
|
+
});
|
|
66
96
|
//# sourceMappingURL=literalToAst.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/literalToAst.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAmB;AAEZ,SAAS,aAAa,SAA4B;AACvD,MAAI,YAAY;AACd,WAAO,EAAE,YAAY;AAEvB,UAAQ,OAAO,SAAS;AAAA,IACtB,KAAK;AACH,YAAM,IAAI,MAAM,aAAa;AAAA,IAC/B,KAAK;AACH,aAAO,EAAE,eAAe,OAAO;AAAA,IACjC,KAAK;AACH,aAAO,EAAE,cAAc,OAAO;AAAA,IAChC,KAAK;AACH,aAAO,EAAE,eAAe,OAAO;AAAA,IACjC,KAAK;AACH,aAAO,EAAE,gBAAgB,QAAQ,EAAE,eAAe,CAAC,GAAG,EAAI;AAAA,IAC5D;AACE,aAAI,MAAM,QAAQ,OAAO,IAChB,EAAE,gBAAgB,QAAQ,IAAI,YAAY,CAAC,IAE7C,EAAE;AAAA,QACP,OAAO,KAAK,OAAO,EAChB,OAAO,CAAC,MACA,OAAO,QAAQ,CAAC,IAAM,GAC9B,EACA,IAAI,CAAC,MACG,EAAE,eAAe,EAAE,cAAc,CAAC,GAAG,aAAa,QAAQ,CAAC,CAAC,CAAC,CACrE;AAAA,MACL;AAAA,EACJ;AACF;AAEA,MAAM,cAAc,CAAC,kBAAkB,iBAAiB,gBAAgB;AAEjE,SAAS,aAAa,MAAW;AACtC,MAAK,MAGL;AAAA,QAAI,YAAY,SAAS,KAAK,IAAI;AAChC,aAAO,KAAK;AAEd,QAAI,OAAK,SAAS,eAAe,CAAC,KAAK,QAGvC;AAAA,UAAI,EAAE,cAAc,IAAI;AACtB,eAAO;AAET,UAAI,EAAE,mBAAmB,IAAI;AAC3B,eAAO,aAAa,KAAK,UAAU;AAErC,UAAI,EAAE,kBAAkB,IAAI;AAC1B,eAAO,KAAK,SAAS;AAAA;AAAA,UAEnB,CAAC,KAAK,YAAY;AAAA,YAChB,GAAG;AAAA,YACH,IAAI,mCAAS,UAAS,kBAClB,aAAa,QAAQ,QAAQ,IAC7B,CAAC,aAAa,OAAO,CAAC;AAAA,UAC5B;AAAA,UACA,CAAC;AAAA,QACH;AAAA;AAAA;AAEJ;AAEA,SAAS,aAAa,OAAO;AAC3B,SAAO,MAAM,OAAO,CAAC,KAAK,SAAS;AACjC,QAAI,KAAK,SAAS;AAChB,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,aAAa,KAAK,QAAQ;AAAA,MAC/B;AAEF,QAAI,KAAK,SAAS,gBAAgB;AAChC,YAAM,MAAM,aAAa,KAAK,KAAK;AACnC,UAAI,QAAQ;AACV,eAAO;AAAA,UACL,GAAG;AAAA,UACH,CAAC,KAAK,IAAI,IAAI,GAAG;AAAA,QACnB;AAAA,IAEJ;AACA,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACP;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
process.on("message", (path) => {
|
|
3
|
+
var _a, _b, _c;
|
|
2
4
|
if (typeof path != "string")
|
|
3
5
|
throw new Error(`Not a string: ${path}`);
|
|
4
6
|
try {
|
|
5
7
|
const out = require(path);
|
|
6
|
-
process.send
|
|
8
|
+
(_a = process.send) == null || _a.call(process, JSON.stringify(out));
|
|
7
9
|
} catch (err) {
|
|
8
|
-
err instanceof Error ? process.send
|
|
9
|
-
${err.stack}`) : process.send
|
|
10
|
+
err instanceof Error ? (_b = process.send) == null || _b.call(process, `-${err.message}
|
|
11
|
+
${err.stack}`) : (_c = process.send) == null || _c.call(process, `-${err}`);
|
|
10
12
|
}
|
|
11
13
|
});
|
|
12
14
|
setInterval(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/extractor/loadFile.ts"],
|
|
4
|
-
"mappings": "AAAA,QAAQ,GAAG,WAAW,CAAC,SAAS;
|
|
4
|
+
"mappings": ";AAAA,QAAQ,GAAG,WAAW,CAAC,SAAS;AAAhC;AACE,MAAI,OAAO,QAAS;AAClB,UAAM,IAAI,MAAM,iBAAiB,IAAI,EAAE;AAEzC,MAAI;AACF,UAAM,MAAM,QAAQ,IAAI;AACxB,kBAAQ,SAAR,yBAAe,KAAK,UAAU,GAAG;AAAA,EACnC,SAAS,KAAK;AACZ,IAAI,eAAe,SACjB,aAAQ,SAAR,yBAAe,IAAI,IAAI,OAAO;AAAA,EAAK,IAAI,KAAK,OAE5C,aAAQ,SAAR,yBAAe,IAAI,GAAG;AAAA,EAE1B;AACF,CAAC;AAED,YAAY,MAAM;AAAC,GAAG,GAAI;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var loadTamagui_exports = {};
|
|
25
|
+
__export(loadTamagui_exports, {
|
|
26
|
+
TamaguiProjectInfo: () => import_bundleConfig.TamaguiProjectInfo,
|
|
27
|
+
getOptions: () => getOptions,
|
|
28
|
+
loadTamagui: () => loadTamagui,
|
|
29
|
+
loadTamaguiSync: () => loadTamaguiSync,
|
|
30
|
+
resolveWebOrNativeSpecificEntry: () => resolveWebOrNativeSpecificEntry,
|
|
31
|
+
watchTamaguiConfig: () => watchTamaguiConfig
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(loadTamagui_exports);
|
|
34
|
+
var import_fs = require("fs"), import_path = require("path"), import_cli_color = require("@tamagui/cli-color"), import_config_default = require("@tamagui/config-default"), import_esbuild = __toESM(require("esbuild")), import_fs_extra = require("fs-extra"), import_constants = require("../constants"), import_requireTamaguiCore = require("../helpers/requireTamaguiCore"), import_minifyCSS = require("../minifyCSS"), import_registerRequire = require("../registerRequire"), import_bundleConfig = require("./bundleConfig"), import_generateTamaguiStudioConfig = require("./generateTamaguiStudioConfig"), import_getTamaguiConfigPathFromOptionsConfig = require("./getTamaguiConfigPathFromOptionsConfig");
|
|
23
35
|
const getFilledOptions = (propsIn) => ({
|
|
24
36
|
// defaults
|
|
25
37
|
platform: "native",
|
|
@@ -28,34 +40,34 @@ const getFilledOptions = (propsIn) => ({
|
|
|
28
40
|
...propsIn
|
|
29
41
|
});
|
|
30
42
|
async function loadTamagui(propsIn) {
|
|
31
|
-
const props = getFilledOptions(propsIn), bundleInfo = await getBundledConfig(props);
|
|
43
|
+
const props = getFilledOptions(propsIn), bundleInfo = await (0, import_bundleConfig.getBundledConfig)(props);
|
|
32
44
|
if (!bundleInfo)
|
|
33
45
|
return console.warn(
|
|
34
46
|
"No bundled config generated, maybe an error in bundling. Set DEBUG=tamagui and re-run to get logs."
|
|
35
47
|
), null;
|
|
36
|
-
if (await generateThemesAndLog(props, !0), !hasBundledConfigChanged())
|
|
48
|
+
if (await generateThemesAndLog(props, !0), !(0, import_bundleConfig.hasBundledConfigChanged)())
|
|
37
49
|
return bundleInfo;
|
|
38
50
|
if (bundleInfo) {
|
|
39
|
-
const { createTamagui } = requireTamaguiCore(props.platform), config = createTamagui(bundleInfo.tamaguiConfig);
|
|
51
|
+
const { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform), config = createTamagui(bundleInfo.tamaguiConfig);
|
|
40
52
|
if (props.outputCSS) {
|
|
41
|
-
colorLog(Color.FgYellow, ` \u27A1 [tamagui] output css: ${props.outputCSS}
|
|
53
|
+
(0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, ` \u27A1 [tamagui] output css: ${props.outputCSS}
|
|
42
54
|
`);
|
|
43
|
-
const css = props.disableMinifyCSS === !1 ? minifyCSS(config.getCSS()).code : config.getCSS();
|
|
44
|
-
await writeFile(props.outputCSS, css);
|
|
55
|
+
const css = props.disableMinifyCSS === !1 ? (0, import_minifyCSS.minifyCSS)(config.getCSS()).code : config.getCSS();
|
|
56
|
+
await (0, import_fs_extra.writeFile)(props.outputCSS, css);
|
|
45
57
|
}
|
|
46
58
|
}
|
|
47
|
-
return process.env.NODE_ENV === "development" && await generateTamaguiStudioConfig(props, bundleInfo), bundleInfo;
|
|
59
|
+
return process.env.NODE_ENV === "development" && await (0, import_generateTamaguiStudioConfig.generateTamaguiStudioConfig)(props, bundleInfo), bundleInfo;
|
|
48
60
|
}
|
|
49
61
|
let waiting = !1, hasLoggedOnce = !1;
|
|
50
62
|
const generateThemesAndLog = async (options, force = !1) => {
|
|
51
63
|
if (!waiting && options.themeBuilder)
|
|
52
64
|
try {
|
|
53
65
|
waiting = !0, await new Promise((res) => setTimeout(res, 30));
|
|
54
|
-
const didGenerate = await generateTamaguiThemes(options, force);
|
|
55
|
-
!hasLoggedOnce && didGenerate && (hasLoggedOnce = !0, colorLog(
|
|
56
|
-
Color.FgYellow,
|
|
66
|
+
const didGenerate = await (0, import_generateTamaguiStudioConfig.generateTamaguiThemes)(options, force);
|
|
67
|
+
!hasLoggedOnce && didGenerate && (hasLoggedOnce = !0, (0, import_cli_color.colorLog)(
|
|
68
|
+
import_cli_color.Color.FgYellow,
|
|
57
69
|
`
|
|
58
|
-
\u27A1 [tamagui] generated themes: ${relative(
|
|
70
|
+
\u27A1 [tamagui] generated themes: ${(0, import_path.relative)(
|
|
59
71
|
process.cwd(),
|
|
60
72
|
options.themeBuilder.output
|
|
61
73
|
)}`
|
|
@@ -70,12 +82,12 @@ function loadTamaguiSync({
|
|
|
70
82
|
...propsIn
|
|
71
83
|
}) {
|
|
72
84
|
const key = JSON.stringify(propsIn);
|
|
73
|
-
if (last[key] && !hasBundledConfigChanged() && (!lastVersion[key] || lastVersion[key] === cacheKey))
|
|
85
|
+
if (last[key] && !(0, import_bundleConfig.hasBundledConfigChanged)() && (!lastVersion[key] || lastVersion[key] === cacheKey))
|
|
74
86
|
return last[key];
|
|
75
87
|
lastVersion[key] = cacheKey || "";
|
|
76
88
|
const props = getFilledOptions(propsIn);
|
|
77
89
|
process.env.IS_STATIC = "is_static", process.env.TAMAGUI_IS_SERVER = "true";
|
|
78
|
-
const { unregister } = registerRequire(props.platform, {
|
|
90
|
+
const { unregister } = (0, import_registerRequire.registerRequire)(props.platform, {
|
|
79
91
|
proxyWormImports: !!forceExports
|
|
80
92
|
});
|
|
81
93
|
try {
|
|
@@ -84,7 +96,7 @@ function loadTamaguiSync({
|
|
|
84
96
|
try {
|
|
85
97
|
let tamaguiConfig = null;
|
|
86
98
|
if (propsIn.config) {
|
|
87
|
-
const configPath = getTamaguiConfigPathFromOptionsConfig(propsIn.config), exp = require(configPath);
|
|
99
|
+
const configPath = (0, import_getTamaguiConfigPathFromOptionsConfig.getTamaguiConfigPathFromOptionsConfig)(propsIn.config), exp = require(configPath);
|
|
88
100
|
if (tamaguiConfig = exp.default || exp.config || exp, !tamaguiConfig || !tamaguiConfig.parsed) {
|
|
89
101
|
const confPath = require.resolve(configPath);
|
|
90
102
|
throw new Error(`Can't find valid config in ${confPath}:
|
|
@@ -92,44 +104,44 @@ function loadTamaguiSync({
|
|
|
92
104
|
Be sure you "export default" or "export const config" the config.`);
|
|
93
105
|
}
|
|
94
106
|
if (tamaguiConfig) {
|
|
95
|
-
const { createTamagui } = requireTamaguiCore(props.platform);
|
|
107
|
+
const { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform);
|
|
96
108
|
createTamagui(tamaguiConfig);
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
|
-
const components = loadComponents(props, forceExports);
|
|
111
|
+
const components = (0, import_bundleConfig.loadComponents)(props, forceExports);
|
|
100
112
|
if (!components)
|
|
101
113
|
throw new Error("No components loaded");
|
|
102
114
|
process.env.DEBUG === "tamagui" && console.info("components", components), process.env.IS_STATIC = void 0, globalThis.__DEV__ = devValueOG;
|
|
103
115
|
const info = {
|
|
104
116
|
components,
|
|
105
117
|
tamaguiConfig,
|
|
106
|
-
nameToPaths: getNameToPaths()
|
|
118
|
+
nameToPaths: (0, import_registerRequire.getNameToPaths)()
|
|
107
119
|
};
|
|
108
120
|
if (tamaguiConfig) {
|
|
109
121
|
if (props.outputCSS) {
|
|
110
|
-
colorLog(Color.FgYellow, ` \u27A1 [tamagui] output css: ${props.outputCSS}
|
|
122
|
+
(0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, ` \u27A1 [tamagui] output css: ${props.outputCSS}
|
|
111
123
|
`);
|
|
112
|
-
const css = props.disableMinifyCSS === !1 ? minifyCSS(tamaguiConfig.getCSS()).code : tamaguiConfig.getCSS();
|
|
113
|
-
writeFileSync(props.outputCSS, css);
|
|
124
|
+
const css = props.disableMinifyCSS === !1 ? (0, import_minifyCSS.minifyCSS)(tamaguiConfig.getCSS()).code : tamaguiConfig.getCSS();
|
|
125
|
+
(0, import_fs.writeFileSync)(props.outputCSS, css);
|
|
114
126
|
}
|
|
115
|
-
generateTamaguiStudioConfigSync(props, info);
|
|
127
|
+
(0, import_generateTamaguiStudioConfig.generateTamaguiStudioConfigSync)(props, info);
|
|
116
128
|
}
|
|
117
129
|
return last[key] = {
|
|
118
130
|
...info,
|
|
119
131
|
cached: !0
|
|
120
132
|
}, info;
|
|
121
133
|
} catch (err) {
|
|
122
|
-
err instanceof Error ? !SHOULD_DEBUG && !forceExports ? (console.warn(
|
|
134
|
+
err instanceof Error ? !import_constants.SHOULD_DEBUG && !forceExports ? (console.warn(
|
|
123
135
|
"Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config"
|
|
124
136
|
), console.info(`
|
|
125
137
|
|
|
126
138
|
${err.message}
|
|
127
139
|
|
|
128
|
-
`)) : SHOULD_DEBUG && console.error(err) : console.error("Error loading tamagui.config.ts", err);
|
|
129
|
-
const { createTamagui } = requireTamaguiCore(props.platform);
|
|
140
|
+
`)) : import_constants.SHOULD_DEBUG && console.error(err) : console.error("Error loading tamagui.config.ts", err);
|
|
141
|
+
const { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform);
|
|
130
142
|
return {
|
|
131
143
|
components: [],
|
|
132
|
-
tamaguiConfig: createTamagui(getDefaultTamaguiConfig()),
|
|
144
|
+
tamaguiConfig: createTamagui((0, import_config_default.getDefaultTamaguiConfig)()),
|
|
133
145
|
nameToPaths: {}
|
|
134
146
|
};
|
|
135
147
|
}
|
|
@@ -144,10 +156,10 @@ async function getOptions({
|
|
|
144
156
|
host,
|
|
145
157
|
debug
|
|
146
158
|
} = {}) {
|
|
147
|
-
const dotDir = join(root, ".tamagui");
|
|
159
|
+
const dotDir = (0, import_path.join)(root, ".tamagui");
|
|
148
160
|
let pkgJson = {};
|
|
149
161
|
try {
|
|
150
|
-
pkgJson = await readJSON(join(root, "package.json"));
|
|
162
|
+
pkgJson = await (0, import_fs_extra.readJSON)((0, import_path.join)(root, "package.json"));
|
|
151
163
|
} catch {
|
|
152
164
|
}
|
|
153
165
|
return {
|
|
@@ -161,29 +173,29 @@ async function getOptions({
|
|
|
161
173
|
platform: "native",
|
|
162
174
|
components: ["tamagui"],
|
|
163
175
|
...tamaguiOptions,
|
|
164
|
-
config: await getDefaultTamaguiConfigPath(root, tamaguiOptions
|
|
176
|
+
config: await getDefaultTamaguiConfigPath(root, tamaguiOptions == null ? void 0 : tamaguiOptions.config)
|
|
165
177
|
},
|
|
166
178
|
paths: {
|
|
167
179
|
dotDir,
|
|
168
|
-
conf: join(dotDir, "tamagui.config.json"),
|
|
169
|
-
types: join(dotDir, "types.json")
|
|
180
|
+
conf: (0, import_path.join)(dotDir, "tamagui.config.json"),
|
|
181
|
+
types: (0, import_path.join)(dotDir, "types.json")
|
|
170
182
|
}
|
|
171
183
|
};
|
|
172
184
|
}
|
|
173
185
|
function resolveWebOrNativeSpecificEntry(entry) {
|
|
174
|
-
const workspaceRoot = resolve(), resolved = require.resolve(entry, { paths: [workspaceRoot] }), ext = extname(resolved), fileName = basename(resolved).replace(ext, ""), specificFile = join(dirname(resolved), fileName + "." + "native" + ext);
|
|
175
|
-
return existsSync(specificFile) ? specificFile : entry;
|
|
186
|
+
const workspaceRoot = (0, import_path.resolve)(), resolved = require.resolve(entry, { paths: [workspaceRoot] }), ext = (0, import_path.extname)(resolved), fileName = (0, import_path.basename)(resolved).replace(ext, ""), specificFile = (0, import_path.join)((0, import_path.dirname)(resolved), fileName + "." + "native" + ext);
|
|
187
|
+
return (0, import_fs_extra.existsSync)(specificFile) ? specificFile : entry;
|
|
176
188
|
}
|
|
177
|
-
const defaultPaths = ["tamagui.config.ts", join("src", "tamagui.config.ts")];
|
|
189
|
+
const defaultPaths = ["tamagui.config.ts", (0, import_path.join)("src", "tamagui.config.ts")];
|
|
178
190
|
let hasWarnedOnce = !1;
|
|
179
191
|
async function getDefaultTamaguiConfigPath(root, configPath) {
|
|
180
192
|
const searchPaths = [
|
|
181
193
|
...new Set(
|
|
182
|
-
[configPath, ...defaultPaths].filter(Boolean).map((p) => join(root, p))
|
|
194
|
+
[configPath, ...defaultPaths].filter(Boolean).map((p) => (0, import_path.join)(root, p))
|
|
183
195
|
)
|
|
184
196
|
];
|
|
185
197
|
for (const path of searchPaths)
|
|
186
|
-
if (await pathExists(path))
|
|
198
|
+
if (await (0, import_fs_extra.pathExists)(path))
|
|
187
199
|
return path;
|
|
188
200
|
hasWarnedOnce || (hasWarnedOnce = !0, console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration "${configPath}":
|
|
189
201
|
${searchPaths.join(`
|
|
@@ -191,6 +203,7 @@ async function getDefaultTamaguiConfigPath(root, configPath) {
|
|
|
191
203
|
`));
|
|
192
204
|
}
|
|
193
205
|
async function watchTamaguiConfig(tamaguiOptions) {
|
|
206
|
+
var _a;
|
|
194
207
|
const options = await getOptions({ tamaguiOptions });
|
|
195
208
|
if (!options.tamaguiOptions.config)
|
|
196
209
|
throw new Error("No config");
|
|
@@ -202,9 +215,9 @@ async function watchTamaguiConfig(tamaguiOptions) {
|
|
|
202
215
|
const disposeConfigWatcher = await esbuildWatchFiles(
|
|
203
216
|
options.tamaguiOptions.config,
|
|
204
217
|
() => {
|
|
205
|
-
generateTamaguiStudioConfig(options.tamaguiOptions, null, !0);
|
|
218
|
+
(0, import_generateTamaguiStudioConfig.generateTamaguiStudioConfig)(options.tamaguiOptions, null, !0);
|
|
206
219
|
}
|
|
207
|
-
), themeBuilderInput = options.tamaguiOptions.themeBuilder
|
|
220
|
+
), themeBuilderInput = (_a = options.tamaguiOptions.themeBuilder) == null ? void 0 : _a.input;
|
|
208
221
|
let disposeThemesWatcher;
|
|
209
222
|
if (themeBuilderInput) {
|
|
210
223
|
let inputPath = themeBuilderInput;
|
|
@@ -218,13 +231,13 @@ async function watchTamaguiConfig(tamaguiOptions) {
|
|
|
218
231
|
}
|
|
219
232
|
return {
|
|
220
233
|
dispose() {
|
|
221
|
-
disposeConfigWatcher(), disposeThemesWatcher
|
|
234
|
+
disposeConfigWatcher(), disposeThemesWatcher == null || disposeThemesWatcher();
|
|
222
235
|
}
|
|
223
236
|
};
|
|
224
237
|
}
|
|
225
238
|
async function esbuildWatchFiles(entry, onChanged) {
|
|
226
239
|
let hasRunOnce = !1;
|
|
227
|
-
const context = await
|
|
240
|
+
const context = await import_esbuild.default.context({
|
|
228
241
|
bundle: !0,
|
|
229
242
|
entryPoints: [entry],
|
|
230
243
|
resolveExtensions: [".ts", ".tsx", ".js", ".jsx", ".mjs"],
|
|
@@ -245,12 +258,13 @@ async function esbuildWatchFiles(entry, onChanged) {
|
|
|
245
258
|
context.dispose();
|
|
246
259
|
};
|
|
247
260
|
}
|
|
248
|
-
export
|
|
261
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
262
|
+
0 && (module.exports = {
|
|
249
263
|
TamaguiProjectInfo,
|
|
250
264
|
getOptions,
|
|
251
265
|
loadTamagui,
|
|
252
266
|
loadTamaguiSync,
|
|
253
267
|
resolveWebOrNativeSpecificEntry,
|
|
254
268
|
watchTamaguiConfig
|
|
255
|
-
};
|
|
269
|
+
});
|
|
256
270
|
//# sourceMappingURL=loadTamagui.js.map
|