@tamagui/static 1.135.4 → 1.135.6

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.
Files changed (181) hide show
  1. package/dist/check-dep-versions.mjs +268 -0
  2. package/dist/check-dep-versions.mjs.map +1 -0
  3. package/dist/checkDeps.mjs +33 -0
  4. package/dist/checkDeps.mjs.map +1 -0
  5. package/dist/constants.mjs +50 -0
  6. package/dist/constants.mjs.map +1 -0
  7. package/dist/exports.mjs +42 -0
  8. package/dist/exports.mjs.map +1 -0
  9. package/dist/extractor/accessSafe.mjs +47 -0
  10. package/dist/extractor/accessSafe.mjs.map +1 -0
  11. package/dist/extractor/babelParse.mjs +55 -0
  12. package/dist/extractor/babelParse.mjs.map +1 -0
  13. package/dist/extractor/bundle.mjs +149 -0
  14. package/dist/extractor/bundle.mjs.map +1 -0
  15. package/dist/extractor/bundleConfig.mjs +331 -0
  16. package/dist/extractor/bundleConfig.mjs.map +1 -0
  17. package/dist/extractor/concatClassName.mjs +79 -0
  18. package/dist/extractor/concatClassName.mjs.map +1 -0
  19. package/dist/extractor/createEvaluator.mjs +76 -0
  20. package/dist/extractor/createEvaluator.mjs.map +1 -0
  21. package/dist/extractor/createExtractor.mjs +976 -0
  22. package/dist/extractor/createExtractor.mjs.map +1 -0
  23. package/dist/extractor/createLogger.mjs +46 -0
  24. package/dist/extractor/createLogger.mjs.map +1 -0
  25. package/dist/extractor/errors.mjs +27 -0
  26. package/dist/extractor/errors.mjs.map +1 -0
  27. package/dist/extractor/esbuildAliasPlugin.mjs +45 -0
  28. package/dist/extractor/esbuildAliasPlugin.mjs.map +1 -0
  29. package/dist/extractor/esbuildTsconfigPaths.mjs +85 -0
  30. package/dist/extractor/esbuildTsconfigPaths.mjs.map +1 -0
  31. package/dist/extractor/evaluateAstNode.mjs +84 -0
  32. package/dist/extractor/evaluateAstNode.mjs.map +1 -0
  33. package/dist/extractor/extractHelpers.mjs +121 -0
  34. package/dist/extractor/extractHelpers.mjs.map +1 -0
  35. package/dist/extractor/extractMediaStyle.mjs +129 -0
  36. package/dist/extractor/extractMediaStyle.mjs.map +1 -0
  37. package/dist/extractor/extractToClassNames.mjs +304 -0
  38. package/dist/extractor/extractToClassNames.mjs.map +1 -0
  39. package/dist/extractor/extractToNative.mjs +262 -0
  40. package/dist/extractor/extractToNative.mjs.map +1 -0
  41. package/dist/extractor/findTopmostFunction.mjs +35 -0
  42. package/dist/extractor/findTopmostFunction.mjs.map +1 -0
  43. package/dist/extractor/{generatedUid.native.js → generatedUid.mjs} +26 -23
  44. package/dist/extractor/generatedUid.mjs.map +1 -0
  45. package/dist/extractor/getPrefixLogs.mjs +30 -0
  46. package/dist/extractor/getPrefixLogs.mjs.map +1 -0
  47. package/dist/extractor/getPropValueFromAttributes.mjs +68 -0
  48. package/dist/extractor/getPropValueFromAttributes.mjs.map +1 -0
  49. package/dist/extractor/getSourceModule.mjs +65 -0
  50. package/dist/extractor/getSourceModule.mjs.map +1 -0
  51. package/dist/extractor/getStaticBindingsForScope.mjs +149 -0
  52. package/dist/extractor/getStaticBindingsForScope.mjs.map +1 -0
  53. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +36 -0
  54. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
  55. package/dist/extractor/literalToAst.mjs +85 -0
  56. package/dist/extractor/literalToAst.mjs.map +1 -0
  57. package/dist/extractor/loadFile.mjs +12 -0
  58. package/dist/extractor/loadFile.mjs.map +1 -0
  59. package/dist/extractor/loadTamagui.mjs +296 -0
  60. package/dist/extractor/loadTamagui.mjs.map +1 -0
  61. package/dist/extractor/logLines.mjs +36 -0
  62. package/dist/extractor/logLines.mjs.map +1 -0
  63. package/dist/extractor/{normalizeTernaries.native.js → normalizeTernaries.mjs} +45 -31
  64. package/dist/extractor/normalizeTernaries.mjs.map +1 -0
  65. package/dist/extractor/propsToFontFamilyCache.mjs +39 -0
  66. package/dist/extractor/propsToFontFamilyCache.mjs.map +1 -0
  67. package/dist/extractor/regenerateConfig.mjs +145 -0
  68. package/dist/extractor/regenerateConfig.mjs.map +1 -0
  69. package/dist/extractor/removeUnusedHooks.mjs +77 -0
  70. package/dist/extractor/removeUnusedHooks.mjs.map +1 -0
  71. package/dist/extractor/timer.mjs +44 -0
  72. package/dist/extractor/timer.mjs.map +1 -0
  73. package/dist/extractor/{validHTMLAttributes.native.js → validHTMLAttributes.mjs} +17 -16
  74. package/dist/extractor/validHTMLAttributes.mjs.map +1 -0
  75. package/dist/extractor/watchTamaguiConfig.mjs +59 -0
  76. package/dist/extractor/watchTamaguiConfig.mjs.map +1 -0
  77. package/dist/getPragmaOptions.mjs +55 -0
  78. package/dist/getPragmaOptions.mjs.map +1 -0
  79. package/dist/helpers/memoize.mjs +38 -0
  80. package/dist/helpers/memoize.mjs.map +1 -0
  81. package/dist/helpers/requireTamaguiCore.mjs +34 -0
  82. package/dist/helpers/requireTamaguiCore.mjs.map +1 -0
  83. package/dist/index.mjs +41 -0
  84. package/dist/index.mjs.map +1 -0
  85. package/dist/registerRequire.mjs +107 -0
  86. package/dist/registerRequire.mjs.map +1 -0
  87. package/dist/server.mjs +76 -0
  88. package/dist/server.mjs.map +1 -0
  89. package/dist/setup.mjs +2 -0
  90. package/dist/setup.mjs.map +1 -0
  91. package/dist/{types.native.js → types.mjs} +8 -6
  92. package/dist/types.mjs.map +1 -0
  93. package/package.json +19 -21
  94. package/dist/check-dep-versions.native.js +0 -602
  95. package/dist/check-dep-versions.native.js.map +0 -6
  96. package/dist/checkDeps.native.js +0 -34
  97. package/dist/checkDeps.native.js.map +0 -6
  98. package/dist/constants.native.js +0 -45
  99. package/dist/constants.native.js.map +0 -6
  100. package/dist/exports.native.js +0 -52
  101. package/dist/exports.native.js.map +0 -6
  102. package/dist/extractor/accessSafe.native.js +0 -48
  103. package/dist/extractor/accessSafe.native.js.map +0 -6
  104. package/dist/extractor/babelParse.native.js +0 -62
  105. package/dist/extractor/babelParse.native.js.map +0 -6
  106. package/dist/extractor/bundle.native.js +0 -168
  107. package/dist/extractor/bundle.native.js.map +0 -6
  108. package/dist/extractor/bundleConfig.native.js +0 -394
  109. package/dist/extractor/bundleConfig.native.js.map +0 -6
  110. package/dist/extractor/concatClassName.native.js +0 -69
  111. package/dist/extractor/concatClassName.native.js.map +0 -6
  112. package/dist/extractor/createEvaluator.native.js +0 -63
  113. package/dist/extractor/createEvaluator.native.js.map +0 -6
  114. package/dist/extractor/createExtractor.native.js +0 -1229
  115. package/dist/extractor/createExtractor.native.js.map +0 -6
  116. package/dist/extractor/createLogger.native.js +0 -35
  117. package/dist/extractor/createLogger.native.js.map +0 -6
  118. package/dist/extractor/errors.native.js +0 -119
  119. package/dist/extractor/errors.native.js.map +0 -6
  120. package/dist/extractor/esbuildAliasPlugin.native.js +0 -52
  121. package/dist/extractor/esbuildAliasPlugin.native.js.map +0 -6
  122. package/dist/extractor/esbuildTsconfigPaths.native.js +0 -79
  123. package/dist/extractor/esbuildTsconfigPaths.native.js.map +0 -6
  124. package/dist/extractor/evaluateAstNode.native.js +0 -98
  125. package/dist/extractor/evaluateAstNode.native.js.map +0 -6
  126. package/dist/extractor/extractHelpers.native.js +0 -183
  127. package/dist/extractor/extractHelpers.native.js.map +0 -6
  128. package/dist/extractor/extractMediaStyle.native.js +0 -138
  129. package/dist/extractor/extractMediaStyle.native.js.map +0 -6
  130. package/dist/extractor/extractToClassNames.native.js +0 -332
  131. package/dist/extractor/extractToClassNames.native.js.map +0 -6
  132. package/dist/extractor/extractToNative.native.js +0 -276
  133. package/dist/extractor/extractToNative.native.js.map +0 -6
  134. package/dist/extractor/findTopmostFunction.native.js +0 -37
  135. package/dist/extractor/findTopmostFunction.native.js.map +0 -6
  136. package/dist/extractor/generatedUid.native.js.map +0 -6
  137. package/dist/extractor/getPrefixLogs.native.js +0 -30
  138. package/dist/extractor/getPrefixLogs.native.js.map +0 -6
  139. package/dist/extractor/getPropValueFromAttributes.native.js +0 -68
  140. package/dist/extractor/getPropValueFromAttributes.native.js.map +0 -6
  141. package/dist/extractor/getSourceModule.native.js +0 -80
  142. package/dist/extractor/getSourceModule.native.js.map +0 -6
  143. package/dist/extractor/getStaticBindingsForScope.native.js +0 -183
  144. package/dist/extractor/getStaticBindingsForScope.native.js.map +0 -6
  145. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js +0 -37
  146. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +0 -6
  147. package/dist/extractor/literalToAst.native.js +0 -106
  148. package/dist/extractor/literalToAst.native.js.map +0 -6
  149. package/dist/extractor/loadFile.native.js +0 -21
  150. package/dist/extractor/loadFile.native.js.map +0 -6
  151. package/dist/extractor/loadTamagui.native.js +0 -314
  152. package/dist/extractor/loadTamagui.native.js.map +0 -6
  153. package/dist/extractor/logLines.native.js +0 -53
  154. package/dist/extractor/logLines.native.js.map +0 -6
  155. package/dist/extractor/normalizeTernaries.native.js.map +0 -6
  156. package/dist/extractor/propsToFontFamilyCache.native.js +0 -40
  157. package/dist/extractor/propsToFontFamilyCache.native.js.map +0 -6
  158. package/dist/extractor/regenerateConfig.native.js +0 -148
  159. package/dist/extractor/regenerateConfig.native.js.map +0 -6
  160. package/dist/extractor/removeUnusedHooks.native.js +0 -111
  161. package/dist/extractor/removeUnusedHooks.native.js.map +0 -6
  162. package/dist/extractor/timer.native.js +0 -44
  163. package/dist/extractor/timer.native.js.map +0 -6
  164. package/dist/extractor/validHTMLAttributes.native.js.map +0 -6
  165. package/dist/extractor/watchTamaguiConfig.native.js +0 -60
  166. package/dist/extractor/watchTamaguiConfig.native.js.map +0 -6
  167. package/dist/getPragmaOptions.native.js +0 -62
  168. package/dist/getPragmaOptions.native.js.map +0 -6
  169. package/dist/helpers/memoize.native.js +0 -40
  170. package/dist/helpers/memoize.native.js.map +0 -6
  171. package/dist/helpers/requireTamaguiCore.native.js +0 -34
  172. package/dist/helpers/requireTamaguiCore.native.js.map +0 -6
  173. package/dist/index.native.js +0 -35
  174. package/dist/index.native.js.map +0 -6
  175. package/dist/registerRequire.native.js +0 -124
  176. package/dist/registerRequire.native.js.map +0 -6
  177. package/dist/server.native.js +0 -70
  178. package/dist/server.native.js.map +0 -6
  179. package/dist/setup.native.js +0 -2
  180. package/dist/setup.native.js.map +0 -6
  181. package/dist/types.native.js.map +0 -6
@@ -0,0 +1,149 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
32
+ var getStaticBindingsForScope_exports = {};
33
+ __export(getStaticBindingsForScope_exports, {
34
+ cleanupBeforeExit: () => cleanupBeforeExit,
35
+ getStaticBindingsForScope: () => getStaticBindingsForScope
36
+ });
37
+ module.exports = __toCommonJS(getStaticBindingsForScope_exports);
38
+ var import_node_child_process = require("node:child_process"),
39
+ import_node_path = require("node:path"),
40
+ t = __toESM(require("@babel/types")),
41
+ import_evaluateAstNode = require("./evaluateAstNode.mjs"),
42
+ import_getSourceModule = require("./getSourceModule.mjs");
43
+ const isLocalImport = path => path.startsWith(".") || path.startsWith("/");
44
+ function resolveImportPath(sourcePath, path) {
45
+ const sourceDir = (0, import_node_path.dirname)(sourcePath);
46
+ return isLocalImport(path) ? ((0, import_node_path.extname)(path) === "" && (path += ""), (0, import_node_path.resolve)(sourceDir, path)) : path;
47
+ }
48
+ const cache = /* @__PURE__ */new Map(),
49
+ pending = /* @__PURE__ */new Map(),
50
+ loadCmd = `${(0, import_node_path.join)(__dirname, "loadFile.js")}`;
51
+ let exited = !1,
52
+ child = null;
53
+ function forkChild() {
54
+ child = (0, import_node_child_process.fork)(loadCmd, [], {
55
+ execArgv: ["-r", "esbuild-register"],
56
+ detached: !1,
57
+ stdio: "ignore"
58
+ });
59
+ }
60
+ function cleanupBeforeExit() {
61
+ exited || child && (child.removeAllListeners(), child.unref(), child.disconnect(), child.kill(), exited = !0);
62
+ }
63
+ process.once("SIGTERM", cleanupBeforeExit);
64
+ process.once("SIGINT", cleanupBeforeExit);
65
+ process.once("beforeExit", cleanupBeforeExit);
66
+ function importModule(path) {
67
+ if (child || forkChild(), pending.has(path)) return pending.get(path);
68
+ const promise = new Promise((res, rej) => {
69
+ if (!child) return;
70
+ if (cache.size > 2e3 && cache.clear(), cache.has(path)) return cache.get(path);
71
+ const listener = msg => {
72
+ if (!child || !msg || typeof msg != "string") return;
73
+ if (msg[0] === "-") {
74
+ rej(new Error(msg.slice(1)));
75
+ return;
76
+ }
77
+ child.removeListener("message", listener);
78
+ const val = JSON.parse(msg);
79
+ cache.set(path, val), res(val);
80
+ };
81
+ child.once("message", listener), child.send(`${path.replace(".js", "")}`);
82
+ });
83
+ return pending.set(path, promise), promise;
84
+ }
85
+ async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bindingCache, shouldPrintDebug) {
86
+ const bindings = scope.getAllBindings(),
87
+ ret = {},
88
+ program = scope.getProgramParent().block;
89
+ for (const node of program.body) if (t.isImportDeclaration(node)) {
90
+ const importPath = node.source.value;
91
+ if (!node.specifiers.length || !isLocalImport(importPath)) continue;
92
+ const moduleName = resolveImportPath(sourcePath, importPath);
93
+ if (!whitelist.some(test => moduleName.endsWith(test))) continue;
94
+ try {
95
+ const src = await importModule(moduleName);
96
+ if (!src) continue;
97
+ for (const specifier of node.specifiers) if (t.isImportSpecifier(specifier) && t.isIdentifier(specifier.imported) && typeof src[specifier.imported.name] < "u") {
98
+ const val = src[specifier.local.name];
99
+ ret[specifier.local.name] = val;
100
+ }
101
+ } catch (err) {
102
+ shouldPrintDebug ? console.warn(` | Skipping partial evaluation of constant file: ${moduleName} (DEBUG=tamagui for more)`) : process.env.DEBUG?.startsWith("tamagui") && console.info("Error in partial evaluation", err.message, err.stack);
103
+ }
104
+ }
105
+ if (!bindingCache) throw new Error("BindingCache is a required param");
106
+ for (const k in bindings) {
107
+ const binding = bindings[k],
108
+ sourceModule = (0, import_getSourceModule.getSourceModule)(k, binding);
109
+ if (sourceModule) {
110
+ if (!sourceModule.sourceModule) continue;
111
+ const moduleName = resolveImportPath(sourcePath, sourceModule.sourceModule);
112
+ if (whitelist.some(test => moduleName.endsWith(test))) {
113
+ const src = importModule(moduleName);
114
+ if (!src) return console.info(` | \u26A0\uFE0F Missing file ${moduleName} via ${sourcePath} import ${sourceModule.sourceModule}?`), {};
115
+ sourceModule.destructured ? sourceModule.imported && (ret[k] = src[sourceModule.imported]) : ret[k] = src;
116
+ }
117
+ continue;
118
+ }
119
+ const {
120
+ parent
121
+ } = binding.path;
122
+ if (!t.isVariableDeclaration(parent) || parent.kind !== "const") continue;
123
+ const dec = parent.declarations.find(d => t.isIdentifier(d.id) && d.id.name === k);
124
+ if (!dec || !dec.init) continue;
125
+ if (typeof dec.id.start != "number" || typeof dec.id.end != "number") {
126
+ console.error("dec.id.start/end is not a number");
127
+ continue;
128
+ }
129
+ if (!t.isIdentifier(dec.id)) {
130
+ console.error("dec is not an identifier");
131
+ continue;
132
+ }
133
+ const cacheKey = `${dec.id.name}_${dec.id.start}-${dec.id.end}`;
134
+ if (Object.hasOwnProperty.call(bindingCache, cacheKey)) {
135
+ ret[k] = bindingCache[cacheKey];
136
+ continue;
137
+ }
138
+ if (Object.hasOwnProperty.call(bindingCache, cacheKey)) {
139
+ ret[k] = bindingCache[cacheKey];
140
+ continue;
141
+ }
142
+ try {
143
+ ret[k] = (0, import_evaluateAstNode.evaluateAstNode)(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k];
144
+ continue;
145
+ } catch {}
146
+ }
147
+ return ret;
148
+ }
149
+ //# sourceMappingURL=getStaticBindingsForScope.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getStaticBindingsForScope_exports","__export","cleanupBeforeExit","getStaticBindingsForScope","module","exports","__toCommonJS","import_node_child_process","require","import_node_path","t","__toESM","import_evaluateAstNode","import_getSourceModule","isLocalImport","path","startsWith","resolveImportPath","sourcePath","sourceDir","dirname","extname","resolve","cache","Map","pending","loadCmd","join","__dirname","exited","child","forkChild","fork","execArgv","detached","stdio","removeAllListeners","unref","disconnect","kill","process","once","importModule","has","get","promise","Promise","res","rej","size","clear","listener","msg","Error","slice","removeListener","val","JSON","parse","set","send","replace","scope","whitelist","bindingCache","shouldPrintDebug","bindings","getAllBindings","ret","program","getProgramParent","block","node","body","isImportDeclaration","importPath","source","value","specifiers","length","moduleName","some","test","endsWith","src","specifier","isImportSpecifier","isIdentifier","imported","name","local","err","console","warn","env","DEBUG","info","message","stack","k","binding","sourceModule","getSourceModule","destructured","parent","isVariableDeclaration","kind","dec","declarations","find","d","id","init","start","end","error","cacheKey","Object","hasOwnProperty","call","evaluateAstNode"],"sources":["../../src/extractor/getStaticBindingsForScope.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iCAAA;AAAA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AI+B,CAAC;MAC9B;IACF,QAAQ,CAER;EACF;EAEA,OAAO/B,GAAA;AACT","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var getTamaguiConfigPathFromOptionsConfig_exports = {};
22
+ __export(getTamaguiConfigPathFromOptionsConfig_exports, {
23
+ getTamaguiConfigPathFromOptionsConfig: () => getTamaguiConfigPathFromOptionsConfig
24
+ });
25
+ module.exports = __toCommonJS(getTamaguiConfigPathFromOptionsConfig_exports);
26
+ var import_node_path = require("node:path"),
27
+ import_node_fs = require("node:fs");
28
+ function getTamaguiConfigPathFromOptionsConfig(config) {
29
+ if ((0, import_node_path.isAbsolute)(config)) return config;
30
+ const fullPath = (0, import_node_path.join)(process.cwd(), config);
31
+ try {
32
+ if ((0, import_node_fs.statSync)(fullPath).isFile()) return fullPath;
33
+ } catch {}
34
+ return config;
35
+ }
36
+ //# sourceMappingURL=getTamaguiConfigPathFromOptionsConfig.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getTamaguiConfigPathFromOptionsConfig_exports","__export","getTamaguiConfigPathFromOptionsConfig","module","exports","__toCommonJS","import_node_path","require","import_node_fs","config","isAbsolute","fullPath","join","process","cwd","statSync","isFile"],"sources":["../../src/extractor/getTamaguiConfigPathFromOptionsConfig.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,6CAAA;AAAAC,QAAA,CAAAD,6CAAA;EAAAE,qCAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAL,6CAAA;AAAA,IAAAM,gBAAA,GAAiCC,OAAA;EAEjCC,cAAA,GAAyBD,OAAA;AAGlB,SAASL,sCACdO,MAAA,EACA;EACA,QAAIH,gBAAA,CAAAI,UAAA,EAAWD,MAAM,GACnB,OAAOA,MAAA;EAGT,MAAME,QAAA,OAAWL,gBAAA,CAAAM,IAAA,EAAKC,OAAA,CAAQC,GAAA,CAAI,GAAGL,MAAM;EAE3C,IAAI;IACF,QAAID,cAAA,CAAAO,QAAA,EAASJ,QAAQ,EAAEK,MAAA,CAAO,GAC5B,OAAOL,QAAA;EAEX,QAAQ,CAER;EAEA,OAAOF,MAAA;AACT","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
32
+ var literalToAst_exports = {};
33
+ __export(literalToAst_exports, {
34
+ astToLiteral: () => astToLiteral,
35
+ literalToAst: () => literalToAst
36
+ });
37
+ module.exports = __toCommonJS(literalToAst_exports);
38
+ var t = __toESM(require("@babel/types"));
39
+ function literalToAst(literal) {
40
+ if (literal === null) return t.nullLiteral();
41
+ switch (typeof literal) {
42
+ case "function":
43
+ throw new Error("Unsupported");
44
+ case "number":
45
+ return t.numericLiteral(literal);
46
+ case "string":
47
+ return t.stringLiteral(literal);
48
+ case "boolean":
49
+ return t.booleanLiteral(literal);
50
+ case "undefined":
51
+ return t.unaryExpression("void", t.numericLiteral(0), !0);
52
+ default:
53
+ return Array.isArray(literal) ? t.arrayExpression(literal.map(literalToAst)) : t.objectExpression(Object.keys(literal).filter(k => typeof literal[k] < "u").map(k => t.objectProperty(t.stringLiteral(k), literalToAst(literal[k]))));
54
+ }
55
+ }
56
+ const easyPeasies = ["BooleanLiteral", "StringLiteral", "NumericLiteral"];
57
+ function astToLiteral(node) {
58
+ if (node) {
59
+ if (easyPeasies.includes(node.type)) return node.value;
60
+ if (!(node.name === "undefined" && !node.value)) {
61
+ if (t.isNullLiteral(node)) return null;
62
+ if (t.isObjectExpression(node)) return computeProps(node.properties);
63
+ if (t.isArrayExpression(node)) return node.elements.reduce(
64
+ // @ts-ignore
65
+ (acc, element) => [...acc, ...(element?.type === "SpreadElement" ? astToLiteral(element.argument) : [astToLiteral(element)])], []);
66
+ }
67
+ }
68
+ }
69
+ function computeProps(props) {
70
+ return props.reduce((acc, prop) => {
71
+ if (prop.type === "SpreadElement") return {
72
+ ...acc,
73
+ ...astToLiteral(prop.argument)
74
+ };
75
+ if (prop.type !== "ObjectMethod") {
76
+ const val = astToLiteral(prop.value);
77
+ if (val !== void 0) return {
78
+ ...acc,
79
+ [prop.key.name]: val
80
+ };
81
+ }
82
+ return acc;
83
+ }, {});
84
+ }
85
+ //# sourceMappingURL=literalToAst.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["literalToAst_exports","__export","astToLiteral","literalToAst","module","exports","__toCommonJS","t","__toESM","require","literal","nullLiteral","Error","numericLiteral","stringLiteral","booleanLiteral","unaryExpression","Array","isArray","arrayExpression","map","objectExpression","Object","keys","filter","k","objectProperty","easyPeasies","node","includes","type","value","name","isNullLiteral","isObjectExpression","computeProps","properties","isArrayExpression","elements","reduce","acc","element","argument","props","prop","val","key"],"sources":["../../src/extractor/literalToAst.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA,YAAA;EAAAC,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,oBAAA;AAAA,IAAAO,CAAA,GAAmBC,OAAA,CAAAC,OAAA;AAEZ,SAASN,aAAaO,OAAA,EAA4B;EACvD,IAAIA,OAAA,KAAY,MACd,OAAOH,CAAA,CAAEI,WAAA,CAAY;EAEvB,QAAQ,OAAOD,OAAA;IACb,KAAK;MACH,MAAM,IAAIE,KAAA,CAAM,aAAa;IAC/B,KAAK;MACH,OAAOL,CAAA,CAAEM,cAAA,CAAeH,OAAO;IACjC,KAAK;MACH,OAAOH,CAAA,CAAEO,aAAA,CAAcJ,OAAO;IAChC,KAAK;MACH,OAAOH,CAAA,CAAEQ,cAAA,CAAeL,OAAO;IACjC,KAAK;MACH,OAAOH,CAAA,CAAES,eAAA,CAAgB,QAAQT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EJ;AAEA,SAASN,aAAaQ,KAAA,EAAO;EAC3B,OAAOA,KAAA,CAAMJ,MAAA,CAAO,CAACC,GAAA,EAAKI,IAAA,KAAS;IACjC,IAAIA,IAAA,CAAKd,IAAA,KAAS,iBAChB,OAAO;MACL,GAAGU,GAAA;MACH,GAAGtC,YAAA,CAAa0C,IAAA,CAAKF,QAAQ;IAC/B;IAEF,IAAIE,IAAA,CAAKd,IAAA,KAAS,gBAAgB;MAChC,MAAMe,GAAA,GAAM3C,YAAA,CAAa0C,IAAA,CAAKb,KAAK;MACnC,IAAIc,GAAA,KAAQ,QACV,OAAO;QACL,GAAGL,GAAA;QACH,CAACI,IAAA,CAAKE,GAAA,CAAId,IAAI,GAAGa;MACnB;IAEJ;IACA,OAAOL,GAAA;EACT,GAAG,CAAC,CAAC;AACP","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ process.on("message", path => {
2
+ if (typeof path != "string") throw new Error(`Not a string: ${path}`);
3
+ try {
4
+ const out = require(path);
5
+ process.send?.(JSON.stringify(out));
6
+ } catch (err) {
7
+ err instanceof Error ? process.send?.(`-${err.message}
8
+ ${err.stack}`) : process.send?.(`-${err}`);
9
+ }
10
+ });
11
+ setInterval(() => {}, 1e3);
12
+ //# sourceMappingURL=loadFile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["process","on","path","Error","out","require","send","JSON","stringify","err","message","stack","setInterval"],"sources":["../../src/extractor/loadFile.ts"],"sourcesContent":[null],"mappings":"AAAAA,OAAA,CAAQC,EAAA,CAAG,WAAYC,IAAA,IAAS;EAC9B,IAAI,OAAOA,IAAA,IAAS,UAClB,MAAM,IAAIC,KAAA,CAAM,iBAAiBD,IAAI,EAAE;EAEzC,IAAI;IACF,MAAME,GAAA,GAAMC,OAAA,CAAQH,IAAI;IACxBF,OAAA,CAAQM,IAAA,GAAOC,IAAA,CAAKC,SAAA,CAAUJ,GAAG,CAAC;EACpC,SAASK,GAAA,EAAK;IACRA,GAAA,YAAeN,KAAA,GACjBH,OAAA,CAAQM,IAAA,GAAO,IAAIG,GAAA,CAAIC,OAAO;AAAA,EAAKD,GAAA,CAAIE,KAAK,EAAE,IAE9CX,OAAA,CAAQM,IAAA,GAAO,IAAIG,GAAG,EAAE;EAE5B;AACF,CAAC;AAEDG,WAAA,CAAY,MAAM,CAAC,GAAG,GAAI","ignoreList":[]}
@@ -0,0 +1,296 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf,
6
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
32
+ var loadTamagui_exports = {};
33
+ __export(loadTamagui_exports, {
34
+ esbuildWatchFiles: () => esbuildWatchFiles,
35
+ generateThemesAndLog: () => generateThemesAndLog,
36
+ getOptions: () => getOptions,
37
+ loadTamagui: () => loadTamagui,
38
+ loadTamaguiBuildConfigSync: () => loadTamaguiBuildConfigSync,
39
+ loadTamaguiSync: () => loadTamaguiSync,
40
+ resolveWebOrNativeSpecificEntry: () => resolveWebOrNativeSpecificEntry
41
+ });
42
+ module.exports = __toCommonJS(loadTamagui_exports);
43
+ var import_node_path = require("node:path"),
44
+ import_cli_color = require("@tamagui/cli-color"),
45
+ import_esbuild = __toESM(require("esbuild")),
46
+ fsExtra = __toESM(require("fs-extra")),
47
+ import_constants = require("../constants.mjs"),
48
+ import_requireTamaguiCore = require("../helpers/requireTamaguiCore.mjs"),
49
+ import_registerRequire = require("../registerRequire.mjs"),
50
+ import_bundleConfig = require("./bundleConfig.mjs"),
51
+ import_getTamaguiConfigPathFromOptionsConfig = require("./getTamaguiConfigPathFromOptionsConfig.mjs"),
52
+ import_regenerateConfig = require("./regenerateConfig.mjs");
53
+ const getFilledOptions = propsIn => ({
54
+ // defaults
55
+ platform: "web",
56
+ config: "tamagui.config.ts",
57
+ components: ["tamagui"],
58
+ ...propsIn
59
+ });
60
+ let isLoadingPromise;
61
+ async function loadTamagui(propsIn) {
62
+ if (isLoadingPromise) return await isLoadingPromise;
63
+ let resolvePromise, rejectPromise;
64
+ isLoadingPromise = new Promise((res, rej) => {
65
+ resolvePromise = res, rejectPromise = rej;
66
+ });
67
+ try {
68
+ const props = getFilledOptions(propsIn),
69
+ bundleInfo = await (0, import_bundleConfig.getBundledConfig)(props);
70
+ if (!bundleInfo) return console.warn("No bundled config generated, maybe an error in bundling. Set DEBUG=tamagui and re-run to get logs."), resolvePromise(null), null;
71
+ await generateThemesAndLog(props);
72
+ const maybeTamaguiConfig = bundleInfo.tamaguiConfig;
73
+ if (maybeTamaguiConfig && !maybeTamaguiConfig.parsed) {
74
+ const {
75
+ createTamagui
76
+ } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web");
77
+ bundleInfo.tamaguiConfig = createTamagui(bundleInfo.tamaguiConfig);
78
+ }
79
+ return (0, import_bundleConfig.hasBundledConfigChanged)() ? (process.env.NODE_ENV === "development" && (await (0, import_regenerateConfig.regenerateConfig)(props, bundleInfo)), resolvePromise(bundleInfo), bundleInfo) : (resolvePromise(bundleInfo), bundleInfo);
80
+ } catch (err) {
81
+ throw rejectPromise(), err;
82
+ } finally {
83
+ isLoadingPromise = null;
84
+ }
85
+ }
86
+ let waiting = !1;
87
+ const generateThemesAndLog = async (options, force = !1) => {
88
+ if (!waiting && options.themeBuilder) try {
89
+ if (waiting = !0, await new Promise(res => setTimeout(res, 30)), (await (0, import_regenerateConfig.generateTamaguiThemes)(options, force)) && ((0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, ` \u27A1 [tamagui] generated themes: ${(0, import_node_path.relative)(process.cwd(), options.themeBuilder.output)}`), options.outputCSS)) {
90
+ const loadedConfig = (0, import_bundleConfig.getLoadedConfig)();
91
+ loadedConfig && (await (0, import_bundleConfig.writeTamaguiCSS)(options.outputCSS, loadedConfig));
92
+ }
93
+ } finally {
94
+ waiting = !1;
95
+ }
96
+ },
97
+ last = {},
98
+ lastVersion = {};
99
+ function loadTamaguiBuildConfigSync(tamaguiOptions) {
100
+ const buildFilePath = tamaguiOptions?.buildFile ?? "tamagui.build.ts";
101
+ if (fsExtra.existsSync(buildFilePath)) {
102
+ const registered = (0, import_registerRequire.registerRequire)("web");
103
+ try {
104
+ const out = require(buildFilePath).default;
105
+ if (!out) throw new Error(`No default export found in ${buildFilePath}: ${out}`);
106
+ if (tamaguiOptions?.config && out.config) throw new Error("You're configuring tamagui from both the plugin and tamagui.build.ts, please choose one or the other.");
107
+ tamaguiOptions = {
108
+ ...tamaguiOptions,
109
+ ...out
110
+ };
111
+ } finally {
112
+ registered.unregister();
113
+ }
114
+ }
115
+ if (!tamaguiOptions) throw new Error("No tamagui build options found either via input props or at tamagui.build.ts");
116
+ return {
117
+ config: "tamagui.config.ts",
118
+ components: ["tamagui", "@tamagui/core"],
119
+ ...tamaguiOptions
120
+ };
121
+ }
122
+ function loadTamaguiSync({
123
+ forceExports,
124
+ cacheKey,
125
+ ...propsIn
126
+ }) {
127
+ const key = JSON.stringify(propsIn);
128
+ if (last[key] && !(0, import_bundleConfig.hasBundledConfigChanged)() && (!lastVersion[key] || lastVersion[key] === cacheKey)) return last[key];
129
+ lastVersion[key] = cacheKey || "";
130
+ const props = getFilledOptions(propsIn);
131
+ process.env.IS_STATIC = "is_static", process.env.TAMAGUI_IS_SERVER = "true";
132
+ const {
133
+ unregister
134
+ } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
135
+ proxyWormImports: !!forceExports
136
+ });
137
+ try {
138
+ const devValueOG = globalThis.__DEV__;
139
+ globalThis.__DEV__ = process.env.NODE_ENV === "development";
140
+ try {
141
+ let tamaguiConfig = null;
142
+ if (propsIn.config) {
143
+ const configPath = (0, import_getTamaguiConfigPathFromOptionsConfig.getTamaguiConfigPathFromOptionsConfig)(propsIn.config),
144
+ exp = require(configPath);
145
+ if (!exp || exp._isProxyWorm) throw new Error("Got a empty / proxied config!");
146
+ if (tamaguiConfig = exp.default || exp.config || exp, !tamaguiConfig || !tamaguiConfig.parsed) {
147
+ const confPath = require.resolve(configPath);
148
+ throw new Error(`Can't find valid config in ${confPath}:
149
+
150
+ Be sure you "export default" or "export const config" the config.`);
151
+ }
152
+ if (tamaguiConfig) {
153
+ const {
154
+ createTamagui
155
+ } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web");
156
+ createTamagui(tamaguiConfig);
157
+ }
158
+ }
159
+ const components = (0, import_bundleConfig.loadComponents)(props, forceExports);
160
+ if (!components) throw new Error("No components loaded");
161
+ process.env.DEBUG === "tamagui" && console.info("components", components), process.env.IS_STATIC = void 0, globalThis.__DEV__ = devValueOG;
162
+ const info = {
163
+ components,
164
+ tamaguiConfig,
165
+ nameToPaths: (0, import_registerRequire.getNameToPaths)()
166
+ };
167
+ if (tamaguiConfig) {
168
+ const {
169
+ outputCSS
170
+ } = props;
171
+ outputCSS && (0, import_bundleConfig.writeTamaguiCSS)(outputCSS, tamaguiConfig), (0, import_regenerateConfig.regenerateConfigSync)(props, info);
172
+ }
173
+ return last[key] = {
174
+ ...info,
175
+ cached: !0
176
+ }, info;
177
+ } catch (err) {
178
+ err instanceof Error ? !import_constants.SHOULD_DEBUG && !forceExports ? (console.warn("Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config"), console.info(`
179
+
180
+ ${err.message}
181
+
182
+ `)) : import_constants.SHOULD_DEBUG && console.error(err) : console.error("Error loading tamagui.config.ts", err);
183
+ const {
184
+ createTamagui
185
+ } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web"),
186
+ {
187
+ getDefaultTamaguiConfig
188
+ } = require("@tamagui/config-default");
189
+ return {
190
+ components: [],
191
+ tamaguiConfig: createTamagui(getDefaultTamaguiConfig()),
192
+ nameToPaths: {}
193
+ };
194
+ }
195
+ } finally {
196
+ unregister();
197
+ }
198
+ }
199
+ async function getOptions({
200
+ root = process.cwd(),
201
+ tsconfigPath = "tsconfig.json",
202
+ tamaguiOptions,
203
+ host,
204
+ debug
205
+ } = {}) {
206
+ const dotDir = (0, import_node_path.join)(root, ".tamagui");
207
+ let pkgJson = {};
208
+ try {
209
+ pkgJson = await fsExtra.readJSON((0, import_node_path.join)(root, "package.json"));
210
+ } catch {}
211
+ return {
212
+ mode: process.env.NODE_ENV === "production" ? "production" : "development",
213
+ root,
214
+ host: host || "127.0.0.1",
215
+ pkgJson,
216
+ debug,
217
+ tsconfigPath,
218
+ tamaguiOptions: {
219
+ platform: "web",
220
+ components: ["tamagui"],
221
+ ...tamaguiOptions,
222
+ config: tamaguiOptions?.config ?? (await getDefaultTamaguiConfigPath(root, tamaguiOptions?.config))
223
+ },
224
+ paths: {
225
+ root,
226
+ dotDir,
227
+ conf: (0, import_node_path.join)(dotDir, "tamagui.config.json"),
228
+ types: (0, import_node_path.join)(dotDir, "types.json")
229
+ }
230
+ };
231
+ }
232
+ function resolveWebOrNativeSpecificEntry(entry) {
233
+ const workspaceRoot = (0, import_node_path.resolve)(),
234
+ resolved = require.resolve(entry, {
235
+ paths: [workspaceRoot]
236
+ }),
237
+ ext = (0, import_node_path.extname)(resolved),
238
+ fileName = (0, import_node_path.basename)(resolved).replace(ext, ""),
239
+ specificFile = (0, import_node_path.join)((0, import_node_path.dirname)(resolved), fileName + "." + "web" + ext);
240
+ return fsExtra.existsSync(specificFile) ? specificFile : entry;
241
+ }
242
+ const defaultPaths = ["tamagui.config.ts", (0, import_node_path.join)("src", "tamagui.config.ts")];
243
+ let hasWarnedOnce = !1;
244
+ async function getDefaultTamaguiConfigPath(root, configPath) {
245
+ const searchPaths = [...new Set([configPath, ...defaultPaths].filter(Boolean).map(p => (0, import_node_path.join)(root, p)))];
246
+ for (const path of searchPaths) if (await fsExtra.pathExists(path)) return path;
247
+ hasWarnedOnce || (hasWarnedOnce = !0, console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration "${configPath}":
248
+ ${searchPaths.join(`
249
+ `)}
250
+ `));
251
+ }
252
+ async function esbuildWatchFiles(entry, onChanged) {
253
+ let hasRunOnce = !1;
254
+ const context = await import_esbuild.default.context({
255
+ bundle: !0,
256
+ entryPoints: [entry],
257
+ resolveExtensions: [".ts", ".tsx", ".js", ".mjs"],
258
+ logLevel: "silent",
259
+ write: !1,
260
+ alias: {
261
+ "@react-native/normalize-color": "@tamagui/proxy-worm",
262
+ "react-native-web": "@tamagui/react-native-web-lite",
263
+ "react-native": "@tamagui/proxy-worm"
264
+ },
265
+ plugins: [
266
+ // to log what its watching:
267
+ // {
268
+ // name: 'test',
269
+ // setup({ onResolve }) {
270
+ // onResolve({ filter: /.*/ }, (args) => {
271
+ // console.log('wtf', args.path)
272
+ // })
273
+ // },
274
+ // },
275
+ {
276
+ name: "on-rebuild",
277
+ setup({
278
+ onEnd,
279
+ onResolve
280
+ }) {
281
+ onResolve({
282
+ filter: /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/
283
+ }, args => ({
284
+ path: args.path,
285
+ external: !0
286
+ })), onEnd(() => {
287
+ hasRunOnce ? onChanged() : hasRunOnce = !0;
288
+ });
289
+ }
290
+ }]
291
+ });
292
+ return context.watch(), () => {
293
+ context.dispose();
294
+ };
295
+ }
296
+ //# sourceMappingURL=loadTamagui.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["loadTamagui_exports","__export","esbuildWatchFiles","generateThemesAndLog","getOptions","loadTamagui","loadTamaguiBuildConfigSync","loadTamaguiSync","resolveWebOrNativeSpecificEntry","module","exports","__toCommonJS","import_node_path","require","import_cli_color","import_esbuild","__toESM","fsExtra","import_constants","import_requireTamaguiCore","import_registerRequire","import_bundleConfig","import_getTamaguiConfigPathFromOptionsConfig","import_regenerateConfig","getFilledOptions","propsIn","platform","config","components","isLoadingPromise","resolvePromise","rejectPromise","Promise","res","rej","props","bundleInfo","getBundledConfig","console","warn","maybeTamaguiConfig","tamaguiConfig","parsed","createTamagui","requireTamaguiCore","hasBundledConfigChanged","process","env","NODE_ENV","regenerateConfig","err","waiting","options","force","themeBuilder","setTimeout","generateTamaguiThemes","colorLog","Color","FgYellow","relative","cwd","output","outputCSS","loadedConfig","getLoadedConfig","writeTamaguiCSS","last","lastVersion","tamaguiOptions","buildFilePath","buildFile","existsSync","registered","registerRequire","out","default","Error","unregister","forceExports","cacheKey","key","JSON","stringify","IS_STATIC","TAMAGUI_IS_SERVER","proxyWormImports","devValueOG","globalThis","__DEV__","configPath","getTamaguiConfigPathFromOptionsConfig","exp","_isProxyWorm","confPath","resolve","loadComponents","DEBUG","info","nameToPaths","getNameToPaths","regenerateConfigSync","cached","SHOULD_DEBUG","message","error","getDefaultTamaguiConfig","root","tsconfigPath","host","debug","dotDir","join","pkgJson","readJSON","mode","getDefaultTamaguiConfigPath","paths","conf","types","entry","workspaceRoot","resolved","ext","extname","fileName","basename","replace","specificFile","dirname","defaultPaths","hasWarnedOnce","searchPaths","Set","filter","Boolean","map","p","path","pathExists","onChanged","hasRunOnce","context","bundle","entryPoints","resolveExtensions","logLevel","write","alias","plugins","name","setup","onEnd","onResolve","args","external","watch","dispose"],"sources":["../../src/extractor/loadTamagui.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,oBAAA,EAAAA,CAAA,KAAAA,oBAAA;EAAAC,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,0BAAA,EAAAA,CAAA,KAAAA,0BAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,+BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAX,mBAAA;AAAA,IAAAY,gBAAA,GAAoEC,OAAA;EAEpEC,gBAAA,GAAgCD,OAAA;EAGhCE,cAAA,GAAoBC,OAAA,CAAAH,OAAA;EACpBI,OAAA,GAAyBD,OAAA,CAAAH,OAAA;EAEzBK,gBAAA,GAA6BL,OAAA;EAC7BM,yBAAA,GAAmCN,OAAA;EACnCO,sBAAA,GAAgDP,OAAA;EAChDQ,mBAAA,GAOOR,OAAA;EACPS,4CAAA,GAAsDT,OAAA;EACtDU,uBAAA,GAIOV,OAAA;AAEP,MAAMW,gBAAA,GAAoBC,OAAA,KAAsD;EAAA;EAE9EC,QAAA,EAAW;EACXC,MAAA,EAAQ;EACRC,UAAA,EAAY,CAAC,SAAS;EACtB,GAAIH;AACN;AAEA,IAAII,gBAAA;AAEJ,eAAsBxB,YACpBoB,OAAA,EACoC;EACpC,IAAII,gBAAA,EAAkB,OAAO,MAAMA,gBAAA;EAEnC,IAAIC,cAAA,EACAC,aAAA;EACJF,gBAAA,GAAmB,IAAIG,OAAA,CAAQ,CAACC,GAAA,EAAKC,GAAA,KAAQ;IAC3CJ,cAAA,GAAiBG,GAAA,EACjBF,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