@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.
Files changed (175) hide show
  1. package/dist/cjs/constants.native.js +4 -4
  2. package/dist/cjs/constants.native.js.map +3 -3
  3. package/dist/cjs/extractor/accessSafe.native.js +1 -5
  4. package/dist/cjs/extractor/accessSafe.native.js.map +3 -3
  5. package/dist/cjs/extractor/babelParse.native.js +5 -8
  6. package/dist/cjs/extractor/babelParse.native.js.map +3 -3
  7. package/dist/cjs/extractor/buildClassName.native.js +31 -42
  8. package/dist/cjs/extractor/buildClassName.native.js.map +3 -3
  9. package/dist/cjs/extractor/bundle.js +6 -4
  10. package/dist/cjs/extractor/bundle.js.map +1 -1
  11. package/dist/cjs/extractor/bundle.native.js +321 -56
  12. package/dist/cjs/extractor/bundle.native.js.map +3 -3
  13. package/dist/cjs/extractor/bundleConfig.native.js +499 -187
  14. package/dist/cjs/extractor/bundleConfig.native.js.map +3 -3
  15. package/dist/cjs/extractor/createEvaluator.native.js +9 -11
  16. package/dist/cjs/extractor/createEvaluator.native.js.map +3 -3
  17. package/dist/cjs/extractor/createExtractor.native.js +1240 -906
  18. package/dist/cjs/extractor/createExtractor.native.js.map +3 -3
  19. package/dist/cjs/extractor/ensureImportingConcat.native.js +11 -17
  20. package/dist/cjs/extractor/ensureImportingConcat.native.js.map +3 -3
  21. package/dist/cjs/extractor/esbuildAliasPlugin.native.js +22 -11
  22. package/dist/cjs/extractor/esbuildAliasPlugin.native.js.map +3 -3
  23. package/dist/cjs/extractor/evaluateAstNode.native.js +15 -21
  24. package/dist/cjs/extractor/evaluateAstNode.native.js.map +3 -3
  25. package/dist/cjs/extractor/extractHelpers.native.js +146 -38
  26. package/dist/cjs/extractor/extractHelpers.native.js.map +3 -3
  27. package/dist/cjs/extractor/extractMediaStyle.native.js +127 -54
  28. package/dist/cjs/extractor/extractMediaStyle.native.js.map +3 -3
  29. package/dist/cjs/extractor/extractToClassNames.native.js +449 -252
  30. package/dist/cjs/extractor/extractToClassNames.native.js.map +3 -3
  31. package/dist/cjs/extractor/findTopmostFunction.native.js +4 -4
  32. package/dist/cjs/extractor/findTopmostFunction.native.js.map +3 -3
  33. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +415 -54
  34. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
  35. package/dist/cjs/extractor/generatedUid.native.js +2 -2
  36. package/dist/cjs/extractor/generatedUid.native.js.map +3 -3
  37. package/dist/cjs/extractor/getPrefixLogs.native.js +2 -1
  38. package/dist/cjs/extractor/getPrefixLogs.native.js.map +3 -3
  39. package/dist/cjs/extractor/getPropValueFromAttributes.native.js +16 -19
  40. package/dist/cjs/extractor/getPropValueFromAttributes.native.js.map +3 -3
  41. package/dist/cjs/extractor/getSourceModule.native.js +20 -7
  42. package/dist/cjs/extractor/getSourceModule.native.js.map +3 -3
  43. package/dist/cjs/extractor/getStaticBindingsForScope.native.js +336 -94
  44. package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +3 -3
  45. package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
  46. package/dist/cjs/extractor/hoistClassNames.native.js +8 -10
  47. package/dist/cjs/extractor/hoistClassNames.native.js.map +3 -3
  48. package/dist/cjs/extractor/literalToAst.native.js +89 -19
  49. package/dist/cjs/extractor/literalToAst.native.js.map +3 -3
  50. package/dist/cjs/extractor/loadFile.native.js +16 -8
  51. package/dist/cjs/extractor/loadFile.native.js.map +3 -3
  52. package/dist/cjs/extractor/loadTamagui.js +3 -3
  53. package/dist/cjs/extractor/loadTamagui.js.map +1 -1
  54. package/dist/cjs/extractor/loadTamagui.native.js +667 -192
  55. package/dist/cjs/extractor/loadTamagui.native.js.map +3 -3
  56. package/dist/cjs/extractor/logLines.native.js +24 -6
  57. package/dist/cjs/extractor/logLines.native.js.map +3 -3
  58. package/dist/cjs/extractor/normalizeTernaries.native.js +71 -20
  59. package/dist/cjs/extractor/normalizeTernaries.native.js.map +3 -3
  60. package/dist/cjs/extractor/propsToFontFamilyCache.native.js +3 -3
  61. package/dist/cjs/extractor/propsToFontFamilyCache.native.js.map +3 -3
  62. package/dist/cjs/extractor/removeUnusedHooks.native.js +69 -36
  63. package/dist/cjs/extractor/removeUnusedHooks.native.js.map +3 -3
  64. package/dist/cjs/extractor/timer.native.js +10 -9
  65. package/dist/cjs/extractor/timer.native.js.map +3 -3
  66. package/dist/cjs/extractor/validHTMLAttributes.native.js +1 -1
  67. package/dist/cjs/extractor/validHTMLAttributes.native.js.map +3 -3
  68. package/dist/cjs/getPragmaOptions.native.js +4 -9
  69. package/dist/cjs/getPragmaOptions.native.js.map +3 -3
  70. package/dist/cjs/helpers/memoize.native.js +5 -3
  71. package/dist/cjs/helpers/memoize.native.js.map +3 -3
  72. package/dist/cjs/helpers/requireTamaguiCore.native.js +2 -1
  73. package/dist/cjs/helpers/requireTamaguiCore.native.js.map +3 -3
  74. package/dist/cjs/index.native.js.map +2 -2
  75. package/dist/cjs/minifyCSS.native.js.map +3 -3
  76. package/dist/cjs/registerRequire.native.js +56 -28
  77. package/dist/cjs/registerRequire.native.js.map +3 -3
  78. package/dist/cjs/server.native.js +175 -21
  79. package/dist/cjs/server.native.js.map +3 -3
  80. package/dist/cjs/setup.native.js.map +3 -3
  81. package/dist/cjs/static.native.js.map +2 -2
  82. package/dist/cjs/types.native.js.map +2 -2
  83. package/dist/cjs/webpackPlugin.native.js +26 -5
  84. package/dist/cjs/webpackPlugin.native.js.map +3 -3
  85. package/dist/esm/constants.native.js +4 -3
  86. package/dist/esm/constants.native.js.map +3 -3
  87. package/dist/esm/extractor/accessSafe.native.js +1 -5
  88. package/dist/esm/extractor/accessSafe.native.js.map +3 -3
  89. package/dist/esm/extractor/babelParse.native.js +5 -7
  90. package/dist/esm/extractor/babelParse.native.js.map +3 -3
  91. package/dist/esm/extractor/buildClassName.native.js +31 -41
  92. package/dist/esm/extractor/buildClassName.native.js.map +3 -3
  93. package/dist/esm/extractor/bundle.js +6 -4
  94. package/dist/esm/extractor/bundle.js.map +1 -1
  95. package/dist/esm/extractor/bundle.mjs +7 -5
  96. package/dist/esm/extractor/bundle.native.js +321 -56
  97. package/dist/esm/extractor/bundle.native.js.map +3 -3
  98. package/dist/esm/extractor/bundleConfig.native.js +499 -187
  99. package/dist/esm/extractor/bundleConfig.native.js.map +3 -3
  100. package/dist/esm/extractor/createEvaluator.native.js +9 -11
  101. package/dist/esm/extractor/createEvaluator.native.js.map +3 -3
  102. package/dist/esm/extractor/createExtractor.native.js +1241 -916
  103. package/dist/esm/extractor/createExtractor.native.js.map +3 -3
  104. package/dist/esm/extractor/ensureImportingConcat.native.js +11 -16
  105. package/dist/esm/extractor/ensureImportingConcat.native.js.map +3 -3
  106. package/dist/esm/extractor/esbuildAliasPlugin.native.js +22 -11
  107. package/dist/esm/extractor/esbuildAliasPlugin.native.js.map +3 -3
  108. package/dist/esm/extractor/evaluateAstNode.native.js +15 -21
  109. package/dist/esm/extractor/evaluateAstNode.native.js.map +3 -3
  110. package/dist/esm/extractor/extractHelpers.native.js +146 -38
  111. package/dist/esm/extractor/extractHelpers.native.js.map +3 -3
  112. package/dist/esm/extractor/extractMediaStyle.native.js +127 -54
  113. package/dist/esm/extractor/extractMediaStyle.native.js.map +3 -3
  114. package/dist/esm/extractor/extractToClassNames.native.js +449 -252
  115. package/dist/esm/extractor/extractToClassNames.native.js.map +3 -3
  116. package/dist/esm/extractor/findTopmostFunction.native.js +4 -4
  117. package/dist/esm/extractor/findTopmostFunction.native.js.map +3 -3
  118. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +415 -54
  119. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
  120. package/dist/esm/extractor/generatedUid.native.js +2 -2
  121. package/dist/esm/extractor/generatedUid.native.js.map +3 -3
  122. package/dist/esm/extractor/getPrefixLogs.native.js +2 -1
  123. package/dist/esm/extractor/getPrefixLogs.native.js.map +3 -3
  124. package/dist/esm/extractor/getPropValueFromAttributes.native.js +16 -19
  125. package/dist/esm/extractor/getPropValueFromAttributes.native.js.map +3 -3
  126. package/dist/esm/extractor/getSourceModule.native.js +20 -7
  127. package/dist/esm/extractor/getSourceModule.native.js.map +3 -3
  128. package/dist/esm/extractor/getStaticBindingsForScope.native.js +336 -94
  129. package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +3 -3
  130. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
  131. package/dist/esm/extractor/hoistClassNames.native.js +8 -10
  132. package/dist/esm/extractor/hoistClassNames.native.js.map +3 -3
  133. package/dist/esm/extractor/literalToAst.native.js +89 -19
  134. package/dist/esm/extractor/literalToAst.native.js.map +3 -3
  135. package/dist/esm/extractor/loadFile.native.js +16 -8
  136. package/dist/esm/extractor/loadFile.native.js.map +3 -3
  137. package/dist/esm/extractor/loadTamagui.js +1 -2
  138. package/dist/esm/extractor/loadTamagui.js.map +1 -1
  139. package/dist/esm/extractor/loadTamagui.mjs +5 -3
  140. package/dist/esm/extractor/loadTamagui.native.js +668 -203
  141. package/dist/esm/extractor/loadTamagui.native.js.map +3 -3
  142. package/dist/esm/extractor/logLines.native.js +24 -6
  143. package/dist/esm/extractor/logLines.native.js.map +3 -3
  144. package/dist/esm/extractor/normalizeTernaries.native.js +71 -20
  145. package/dist/esm/extractor/normalizeTernaries.native.js.map +3 -3
  146. package/dist/esm/extractor/propsToFontFamilyCache.native.js +3 -3
  147. package/dist/esm/extractor/propsToFontFamilyCache.native.js.map +3 -3
  148. package/dist/esm/extractor/removeUnusedHooks.native.js +69 -35
  149. package/dist/esm/extractor/removeUnusedHooks.native.js.map +3 -3
  150. package/dist/esm/extractor/timer.native.js +10 -9
  151. package/dist/esm/extractor/timer.native.js.map +3 -3
  152. package/dist/esm/extractor/validHTMLAttributes.native.js +1 -1
  153. package/dist/esm/extractor/validHTMLAttributes.native.js.map +3 -3
  154. package/dist/esm/getPragmaOptions.native.js +4 -9
  155. package/dist/esm/getPragmaOptions.native.js.map +3 -3
  156. package/dist/esm/helpers/memoize.native.js +5 -3
  157. package/dist/esm/helpers/memoize.native.js.map +3 -3
  158. package/dist/esm/helpers/requireTamaguiCore.native.js +2 -1
  159. package/dist/esm/helpers/requireTamaguiCore.native.js.map +3 -3
  160. package/dist/esm/index.native.js.map +1 -1
  161. package/dist/esm/minifyCSS.native.js.map +3 -3
  162. package/dist/esm/registerRequire.native.js +56 -28
  163. package/dist/esm/registerRequire.native.js.map +3 -3
  164. package/dist/esm/server.native.js +175 -21
  165. package/dist/esm/server.native.js.map +3 -3
  166. package/dist/esm/setup.native.js.map +3 -3
  167. package/dist/esm/static.native.js.map +3 -3
  168. package/dist/esm/webpackPlugin.native.js +26 -5
  169. package/dist/esm/webpackPlugin.native.js.map +3 -3
  170. package/package.json +14 -15
  171. package/src/extractor/bundle.ts +5 -2
  172. package/src/extractor/loadTamagui.ts +3 -2
  173. package/types/extractor/bundle.d.ts.map +1 -1
  174. package/types/extractor/loadTamagui.d.ts.map +1 -1
  175. package/tamagui.tsconfig.json +0 -5
@@ -28,16 +28,154 @@ __export(getStaticBindingsForScope_exports, {
28
28
  });
29
29
  module.exports = __toCommonJS(getStaticBindingsForScope_exports);
30
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");
31
- const isLocalImport = (path) => path.startsWith(".") || path.startsWith("/");
31
+ function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key, arg) {
32
+ try {
33
+ var info = gen[key](arg), value = info.value;
34
+ } catch (error) {
35
+ reject(error);
36
+ return;
37
+ }
38
+ info.done ? resolve2(value) : Promise.resolve(value).then(_next, _throw);
39
+ }
40
+ function _async_to_generator(fn) {
41
+ return function() {
42
+ var self = this, args = arguments;
43
+ return new Promise(function(resolve2, reject) {
44
+ var gen = fn.apply(self, args);
45
+ function _next(value) {
46
+ asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
47
+ }
48
+ function _throw(err) {
49
+ asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
50
+ }
51
+ _next(void 0);
52
+ });
53
+ };
54
+ }
55
+ function _type_of(obj) {
56
+ "@swc/helpers - typeof";
57
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
58
+ }
59
+ function _ts_generator(thisArg, body) {
60
+ var f, y, t2, g, _ = {
61
+ label: 0,
62
+ sent: function() {
63
+ if (t2[0] & 1)
64
+ throw t2[1];
65
+ return t2[1];
66
+ },
67
+ trys: [],
68
+ ops: []
69
+ };
70
+ return g = {
71
+ next: verb(0),
72
+ throw: verb(1),
73
+ return: verb(2)
74
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
75
+ return this;
76
+ }), g;
77
+ function verb(n) {
78
+ return function(v) {
79
+ return step([
80
+ n,
81
+ v
82
+ ]);
83
+ };
84
+ }
85
+ function step(op) {
86
+ if (f)
87
+ throw new TypeError("Generator is already executing.");
88
+ for (; _; )
89
+ try {
90
+ if (f = 1, y && (t2 = op[0] & 2 ? y.return : op[0] ? y.throw || ((t2 = y.return) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
91
+ return t2;
92
+ switch (y = 0, t2 && (op = [
93
+ op[0] & 2,
94
+ t2.value
95
+ ]), op[0]) {
96
+ case 0:
97
+ case 1:
98
+ t2 = op;
99
+ break;
100
+ case 4:
101
+ return _.label++, {
102
+ value: op[1],
103
+ done: !1
104
+ };
105
+ case 5:
106
+ _.label++, y = op[1], op = [
107
+ 0
108
+ ];
109
+ continue;
110
+ case 7:
111
+ op = _.ops.pop(), _.trys.pop();
112
+ continue;
113
+ default:
114
+ if (t2 = _.trys, !(t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
115
+ _ = 0;
116
+ continue;
117
+ }
118
+ if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
119
+ _.label = op[1];
120
+ break;
121
+ }
122
+ if (op[0] === 6 && _.label < t2[1]) {
123
+ _.label = t2[1], t2 = op;
124
+ break;
125
+ }
126
+ if (t2 && _.label < t2[2]) {
127
+ _.label = t2[2], _.ops.push(op);
128
+ break;
129
+ }
130
+ t2[2] && _.ops.pop(), _.trys.pop();
131
+ continue;
132
+ }
133
+ op = body.call(thisArg, _);
134
+ } catch (e) {
135
+ op = [
136
+ 6,
137
+ e
138
+ ], y = 0;
139
+ } finally {
140
+ f = t2 = 0;
141
+ }
142
+ if (op[0] & 5)
143
+ throw op[1];
144
+ return {
145
+ value: op[0] ? op[1] : void 0,
146
+ done: !0
147
+ };
148
+ }
149
+ }
150
+ function _ts_values(o) {
151
+ var s = typeof Symbol == "function" && Symbol.iterator, m = s && o[s], i = 0;
152
+ if (m)
153
+ return m.call(o);
154
+ if (o && typeof o.length == "number")
155
+ return {
156
+ next: function() {
157
+ return o && i >= o.length && (o = void 0), {
158
+ value: o && o[i++],
159
+ done: !o
160
+ };
161
+ }
162
+ };
163
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
164
+ }
165
+ var isLocalImport = function(path) {
166
+ return path.startsWith(".") || path.startsWith("/");
167
+ };
32
168
  function resolveImportPath(sourcePath, path) {
33
- const sourceDir = (0, import_path.dirname)(sourcePath);
169
+ var sourceDir = (0, import_path.dirname)(sourcePath);
34
170
  return isLocalImport(path) ? ((0, import_path.extname)(path) === "" && (path += ".js"), (0, import_path.resolve)(sourceDir, path)) : path;
35
171
  }
36
- const cache = /* @__PURE__ */ new Map(), pending = /* @__PURE__ */ new Map(), loadCmd = `${(0, import_path.join)(__dirname, "loadFile.js")}`;
37
- let exited = !1, child = null;
172
+ var cache = /* @__PURE__ */ new Map(), pending = /* @__PURE__ */ new Map(), loadCmd = "".concat((0, import_path.join)(__dirname, "loadFile.js")), exited = !1, child = null;
38
173
  function forkChild() {
39
174
  child = (0, import_child_process.fork)(loadCmd, [], {
40
- execArgv: ["-r", "esbuild-register"],
175
+ execArgv: [
176
+ "-r",
177
+ "esbuild-register"
178
+ ],
41
179
  detached: !1,
42
180
  stdio: "ignore"
43
181
  });
@@ -51,100 +189,204 @@ process.once("beforeExit", cleanupBeforeExit);
51
189
  function importModule(path) {
52
190
  if (child || forkChild(), pending.has(path))
53
191
  return pending.get(path);
54
- const promise = new Promise((res, rej) => {
55
- if (!child)
56
- return;
57
- if (cache.size > 2e3 && cache.clear(), cache.has(path))
58
- return cache.get(path);
59
- const listener = (msg) => {
60
- if (!child || !msg || typeof msg != "string")
61
- return;
62
- if (msg[0] === "-") {
63
- rej(new Error(msg.slice(1)));
64
- return;
65
- }
66
- child.removeListener("message", listener);
67
- const val = JSON.parse(msg);
68
- cache.set(path, val), res(val);
69
- };
70
- child.once("message", listener), child.send(`${path.replace(".js", "")}`);
192
+ var promise = new Promise(function(res, rej) {
193
+ if (child) {
194
+ if (cache.size > 2e3 && cache.clear(), cache.has(path))
195
+ return cache.get(path);
196
+ var listener = function(msg) {
197
+ if (child && msg && typeof msg == "string") {
198
+ if (msg[0] === "-") {
199
+ rej(new Error(msg.slice(1)));
200
+ return;
201
+ }
202
+ child.removeListener("message", listener);
203
+ var val = JSON.parse(msg);
204
+ cache.set(path, val), res(val);
205
+ }
206
+ };
207
+ child.once("message", listener), child.send("".concat(path.replace(".js", "")));
208
+ }
71
209
  });
72
210
  return pending.set(path, promise), promise;
73
211
  }
74
- async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bindingCache, shouldPrintDebug) {
75
- var _a;
76
- const bindings = scope.getAllBindings(), ret = {}, program = scope.getProgramParent().block;
77
- for (const node of program.body)
78
- if (t.isImportDeclaration(node)) {
79
- const importPath = node.source.value;
80
- if (!node.specifiers.length || !isLocalImport(importPath))
81
- continue;
82
- const moduleName = resolveImportPath(sourcePath, importPath);
83
- if (!whitelist.some((test) => moduleName.endsWith(test)))
84
- continue;
85
- try {
86
- const src = await importModule(moduleName);
87
- if (!src)
88
- continue;
89
- for (const specifier of node.specifiers)
90
- if (t.isImportSpecifier(specifier) && t.isIdentifier(specifier.imported) && typeof src[specifier.imported.name] < "u") {
91
- const val = src[specifier.local.name];
92
- ret[specifier.local.name] = val;
212
+ function getStaticBindingsForScope(scope) {
213
+ return _getStaticBindingsForScope.apply(this, arguments);
214
+ }
215
+ function _getStaticBindingsForScope() {
216
+ return _getStaticBindingsForScope = _async_to_generator(function(scope) {
217
+ var _loop, whitelist, sourcePath, bindingCache, shouldPrintDebug, bindings, ret, program, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _loop1, _iterator, _step, err, k, _ret, _arguments = arguments;
218
+ return _ts_generator(this, function(_state) {
219
+ switch (_state.label) {
220
+ case 0:
221
+ _loop = function(k3) {
222
+ var binding = bindings[k3], sourceModule = (0, import_getSourceModule.getSourceModule)(k3, binding);
223
+ if (sourceModule) {
224
+ if (!sourceModule.sourceModule)
225
+ return "continue";
226
+ var moduleName = resolveImportPath(sourcePath, sourceModule.sourceModule), isOnWhitelist = whitelist.some(function(test) {
227
+ return moduleName.endsWith(test);
228
+ });
229
+ if (isOnWhitelist) {
230
+ var src = importModule(moduleName);
231
+ if (!src)
232
+ return console.info(" | \u26A0\uFE0F Missing file ".concat(moduleName, " via ").concat(sourcePath, " import ").concat(sourceModule.sourceModule, "?")), {
233
+ v: {}
234
+ };
235
+ sourceModule.destructured ? sourceModule.imported && (ret[k3] = src[sourceModule.imported]) : ret[k3] = src;
236
+ }
237
+ return "continue";
238
+ }
239
+ var parent = binding.path.parent;
240
+ if (!t.isVariableDeclaration(parent) || parent.kind !== "const")
241
+ return "continue";
242
+ var dec = parent.declarations.find(function(d) {
243
+ return t.isIdentifier(d.id) && d.id.name === k3;
244
+ });
245
+ if (!dec || !dec.init)
246
+ return "continue";
247
+ if (typeof dec.id.start != "number" || typeof dec.id.end != "number")
248
+ return console.error("dec.id.start/end is not a number"), "continue";
249
+ if (!t.isIdentifier(dec.id))
250
+ return console.error("dec is not an identifier"), "continue";
251
+ var cacheKey = "".concat(dec.id.name, "_").concat(dec.id.start, "-").concat(dec.id.end);
252
+ if (Object.hasOwnProperty.call(bindingCache, cacheKey) || Object.hasOwnProperty.call(bindingCache, cacheKey))
253
+ return ret[k3] = bindingCache[cacheKey], "continue";
254
+ try {
255
+ return ret[k3] = (0, import_evaluateAstNode.evaluateAstNode)(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k3], "continue";
256
+ } catch {
257
+ }
258
+ }, whitelist = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : [], sourcePath = _arguments.length > 2 ? _arguments[2] : void 0, bindingCache = _arguments.length > 3 ? _arguments[3] : void 0, shouldPrintDebug = _arguments.length > 4 ? _arguments[4] : void 0, bindings = scope.getAllBindings(), ret = {}, program = scope.getProgramParent().block, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0, _state.label = 1;
259
+ case 1:
260
+ _state.trys.push([
261
+ 1,
262
+ 6,
263
+ 7,
264
+ 8
265
+ ]), _loop1 = function() {
266
+ var node, importPath, moduleName, isOnWhitelist, src, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step1, specifier, val, err1, _process_env_DEBUG;
267
+ return _ts_generator(this, function(_state2) {
268
+ switch (_state2.label) {
269
+ case 0:
270
+ if (node = _step.value, !t.isImportDeclaration(node))
271
+ return [
272
+ 3,
273
+ 4
274
+ ];
275
+ if (importPath = node.source.value, !node.specifiers.length)
276
+ return [
277
+ 2,
278
+ "continue"
279
+ ];
280
+ if (!isLocalImport(importPath))
281
+ return [
282
+ 2,
283
+ "continue"
284
+ ];
285
+ if (moduleName = resolveImportPath(sourcePath, importPath), isOnWhitelist = whitelist.some(function(test) {
286
+ return moduleName.endsWith(test);
287
+ }), !isOnWhitelist)
288
+ return [
289
+ 2,
290
+ "continue"
291
+ ];
292
+ _state2.label = 1;
293
+ case 1:
294
+ return _state2.trys.push([
295
+ 1,
296
+ 3,
297
+ ,
298
+ 4
299
+ ]), [
300
+ 4,
301
+ importModule(moduleName)
302
+ ];
303
+ case 2:
304
+ if (src = _state2.sent(), !src)
305
+ return [
306
+ 2,
307
+ "continue"
308
+ ];
309
+ _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
310
+ try {
311
+ for (_iterator2 = node.specifiers[Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step1 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0)
312
+ specifier = _step1.value, t.isImportSpecifier(specifier) && t.isIdentifier(specifier.imported) && typeof src[specifier.imported.name] < "u" && (val = src[specifier.local.name], ret[specifier.local.name] = val);
313
+ } catch (err2) {
314
+ _didIteratorError2 = !0, _iteratorError2 = err2;
315
+ } finally {
316
+ try {
317
+ !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
318
+ } finally {
319
+ if (_didIteratorError2)
320
+ throw _iteratorError2;
321
+ }
322
+ }
323
+ return [
324
+ 3,
325
+ 4
326
+ ];
327
+ case 3:
328
+ return err1 = _state2.sent(), shouldPrintDebug ? console.warn(" | Skipping partial evaluation of constant file: ".concat(moduleName, " (DEBUG=tamagui for more)")) : !((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.startsWith("tamagui") && console.info("Error in partial evaluation", err1.message, err1.stack), [
329
+ 3,
330
+ 4
331
+ ];
332
+ case 4:
333
+ return [
334
+ 2
335
+ ];
336
+ }
337
+ });
338
+ }, _iterator = program.body[Symbol.iterator](), _state.label = 2;
339
+ case 2:
340
+ return (_iteratorNormalCompletion = (_step = _iterator.next()).done) ? [
341
+ 3,
342
+ 5
343
+ ] : [
344
+ 5,
345
+ _ts_values(_loop1())
346
+ ];
347
+ case 3:
348
+ _state.sent(), _state.label = 4;
349
+ case 4:
350
+ return _iteratorNormalCompletion = !0, [
351
+ 3,
352
+ 2
353
+ ];
354
+ case 5:
355
+ return [
356
+ 3,
357
+ 8
358
+ ];
359
+ case 6:
360
+ return err = _state.sent(), _didIteratorError = !0, _iteratorError = err, [
361
+ 3,
362
+ 8
363
+ ];
364
+ case 7:
365
+ try {
366
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
367
+ } finally {
368
+ if (_didIteratorError)
369
+ throw _iteratorError;
93
370
  }
94
- } catch (err) {
95
- shouldPrintDebug ? console.warn(
96
- ` | Skipping partial evaluation of constant file: ${moduleName} (DEBUG=tamagui for more)`
97
- ) : (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Error in partial evaluation", err.message, err.stack);
98
- }
99
- }
100
- if (!bindingCache)
101
- throw new Error("BindingCache is a required param");
102
- for (const k in bindings) {
103
- const binding = bindings[k], sourceModule = (0, import_getSourceModule.getSourceModule)(k, binding);
104
- if (sourceModule) {
105
- if (!sourceModule.sourceModule)
106
- continue;
107
- const moduleName = resolveImportPath(sourcePath, sourceModule.sourceModule);
108
- if (whitelist.some((test) => moduleName.endsWith(test))) {
109
- const src = importModule(moduleName);
110
- if (!src)
111
- return console.info(
112
- ` | \u26A0\uFE0F Missing file ${moduleName} via ${sourcePath} import ${sourceModule.sourceModule}?`
113
- ), {};
114
- sourceModule.destructured ? sourceModule.imported && (ret[k] = src[sourceModule.imported]) : ret[k] = src;
371
+ return [
372
+ 7
373
+ ];
374
+ case 8:
375
+ if (!bindingCache)
376
+ throw new Error("BindingCache is a required param");
377
+ for (var k2 in bindings)
378
+ if (_ret = _loop(k2), _type_of(_ret) === "object")
379
+ return [
380
+ 2,
381
+ _ret.v
382
+ ];
383
+ return [
384
+ 2,
385
+ ret
386
+ ];
115
387
  }
116
- continue;
117
- }
118
- const { parent } = binding.path;
119
- if (!t.isVariableDeclaration(parent) || parent.kind !== "const")
120
- continue;
121
- const dec = parent.declarations.find((d) => t.isIdentifier(d.id) && d.id.name === k);
122
- if (!dec || !dec.init)
123
- continue;
124
- if (typeof dec.id.start != "number" || typeof dec.id.end != "number") {
125
- console.error("dec.id.start/end is not a number");
126
- continue;
127
- }
128
- if (!t.isIdentifier(dec.id)) {
129
- console.error("dec is not an identifier");
130
- continue;
131
- }
132
- const cacheKey = `${dec.id.name}_${dec.id.start}-${dec.id.end}`;
133
- if (Object.hasOwnProperty.call(bindingCache, cacheKey)) {
134
- ret[k] = bindingCache[cacheKey];
135
- continue;
136
- }
137
- if (Object.hasOwnProperty.call(bindingCache, cacheKey)) {
138
- ret[k] = bindingCache[cacheKey];
139
- continue;
140
- }
141
- try {
142
- ret[k] = (0, import_evaluateAstNode.evaluateAstNode)(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k];
143
- continue;
144
- } catch {
145
- }
146
- }
147
- return ret;
388
+ });
389
+ }), _getStaticBindingsForScope.apply(this, arguments);
148
390
  }
149
391
  // Annotate the CommonJS export names for ESM import in node:
150
392
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/getStaticBindingsForScope.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAAqB,0BACrB,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,IAAI,KAEzB;AACT;AAEA,MAAM,QAAQ,oBAAI,IAAI,GAChB,UAAU,oBAAI,IAA0B,GAExC,UAAU,OAAG,kBAAK,WAAW,aAAa,CAAC;AAEjD,IAAI,SAAS,IAET,QAA6B;AAEjC,SAAS,YAAY;AACnB,cAAQ,2BAAK,SAAS,CAAC,GAAG;AAAA,IACxB,UAAU,CAAC,MAAM,kBAAkB;AAAA,IACnC,UAAU;AAAA,IACV,OAAO;AAAA,EACT,CAAC;AACH;AAEO,SAAS,oBAA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IAAAC,kBAAAG;;;uBAAAL,8BAAAG,WAAA,UAAA,QAAAA,WAAA,OAAA;;0BAAAF;8BAAAC;;;;;;;;AAQEG,gCAAAA,QAAAA,KAAAA,GACHjD,mBACFc,QAAQ4C,KACL,uDAAiE,OAAXlD,YAAW,2BAAA,CAAA,IAE3DlC,wBAAAA,QAAQqF,IAAIC,WAAK,QAAjBtF,uBAAAA,WAAAA,mBAAmBzB,WAAW,SAAA,KACvCiE,QAAQC,KAAM,+BAA8BkC,KAAIY,SAASZ,KAAIa,KAAK;;;;;;;;;;UAI1E,GA/BK,YAAc3D,QAAQ4D,KAAI,OAAA,QAAA,EAAA;;kBAA1B,6BAAA,QAAA,UAAA,KAAA,GAAA,QAAA;;;;;;;;;;AAAA,6CAAA;;;;;;;;;;sCAAA,oBAAA,IAAA,iBAAA;;;;;;aAAA,6BAAA,UAAA,UAAA,QAAA,UAAA,OAAA;;gBAAA;oBAAA;;;;;;AAiCL,cAAI,CAAChE;AACH,kBAAM,IAAIZ,MAAM,kCAAA;AAGlB,mBAAWiB,MAAKH;;;;;;AAmFhB,iBAAA;;YAAOC;;;;EACT,CAAA,GA5IsBN,2BAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["isLocalImport", "path", "startsWith", "resolveImportPath", "sourcePath", "sourceDir", "dirname", "extname", "resolve", "cache", "Map", "pending", "loadCmd", "join", "__dirname", "exited", "child", "forkChild", "fork", "execArgv", "detached", "stdio", "cleanupBeforeExit", "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", "getStaticBindingsForScope", "scope", "whitelist", "bindingCache", "shouldPrintDebug", "bindings", "ret", "program", "k", "binding", "sourceModule", "getSourceModule", "moduleName", "isOnWhitelist", "some", "test", "endsWith", "src", "console", "info", "destructured", "imported", "parent", "t", "isVariableDeclaration", "kind", "dec", "declarations", "find", "d", "isIdentifier", "id", "name", "init", "start", "end", "error", "cacheKey", "Object", "hasOwnProperty", "call", "evaluateAstNode", "undefined", "getAllBindings", "getProgramParent", "block", "node", "importPath", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "specifier", "err", "isImportDeclaration", "source", "value", "specifiers", "length", "_state", "isImportSpecifier", "local", "warn", "env", "DEBUG", "message", "stack", "body"]
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/getTamaguiConfigPathFromOptionsConfig.ts"],
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
- "names": []
3
+ "sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/getTamaguiConfigPathFromOptionsConfig.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;kBAAiC;AAI1B,SAASA,sCACdC,QAA6C;AAE7C,aAAIC,wBAAWD,MAAAA,IACNA,aAGFE,kBAAKC,QAAQC,IAAG,GAAIJ,MAAAA;AAC7B;",
5
+ "names": ["getTamaguiConfigPathFromOptionsConfig", "config", "isAbsolute", "join", "process", "cwd"]
6
6
  }
@@ -28,13 +28,13 @@ __export(hoistClassNames_exports, {
28
28
  module.exports = __toCommonJS(hoistClassNames_exports);
29
29
  var t = __toESM(require("@babel/types"));
30
30
  function hoistClassNames(path, existing, expr) {
31
- const hoist = hoistClassNames.bind(null, path, existing);
31
+ var hoist = hoistClassNames.bind(null, path, existing);
32
32
  if (t.isStringLiteral(expr)) {
33
33
  if (expr.value.trim() === "")
34
34
  return expr;
35
35
  if (existing[expr.value])
36
36
  return existing[expr.value];
37
- const identifier = replaceStringWithVariable(expr);
37
+ var identifier = replaceStringWithVariable(expr);
38
38
  return existing[expr.value] = identifier, identifier;
39
39
  }
40
40
  if (t.isBinaryExpression(expr))
@@ -42,19 +42,17 @@ function hoistClassNames(path, existing, expr) {
42
42
  if (t.isLogicalExpression(expr))
43
43
  return t.logicalExpression(expr.operator, hoist(expr.left), hoist(expr.right));
44
44
  if (t.isConditionalExpression(expr))
45
- return t.conditionalExpression(
46
- expr.test,
47
- hoist(expr.consequent),
48
- hoist(expr.alternate)
49
- );
45
+ return t.conditionalExpression(expr.test, hoist(expr.consequent), hoist(expr.alternate));
50
46
  return expr;
51
47
  function replaceStringWithVariable(str) {
52
- const uid = path.scope.generateUidIdentifier("cn"), parent = path.findParent((path2) => path2.isProgram());
48
+ var uid = path.scope.generateUidIdentifier("cn"), parent = path.findParent(function(path2) {
49
+ return path2.isProgram();
50
+ });
53
51
  if (!parent)
54
52
  throw new Error("no program?");
55
- const variable = t.variableDeclaration("const", [
53
+ var variable = t.variableDeclaration("const", [
56
54
  // adding a space for extra safety
57
- t.variableDeclarator(uid, t.stringLiteral(` ${str.value}`))
55
+ t.variableDeclarator(uid, t.stringLiteral(" ".concat(str.value)))
58
56
  ]);
59
57
  return parent.unshiftContainer("body", variable), uid;
60
58
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/hoistClassNames.ts"],
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,W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AAmBT,IAAAA;AACvB,WAAOG,EAAEO,iBAAiBV,KAAKW,UAAUV,MAAMD,KAAKY,IAAI,GAAGX,MAAMD,KAAKa,KAAK,CAAA;AAE7E,MAAIV,EAAEW,oBAAoBd,IAAAA;AACxB,WAAOG,EAAEY,kBAAkBf,KAAKW,UAAUV,MAAMD,KAAKY,IAAI,GAAGX,MAAMD,KAAKa,KAAK,CAAA;AAE9E,MAAIV,EAAEa,wBAAwBhB,IAAAA;AAC5B,WAAOG,EAAEc,sBACPjB,KAAKkB,MACLjB,MAAMD,KAAKmB,UAAU,GACrBlB,MAAMD,KAAKoB,SAAS,CAAA;AAGxB,SAAOpB;AAEP,WAASQ,0BAA0Ba,KAAoB;AAErD,QAAMC,MAAMxB,KAAKyB,MAAMC,sBAAsB,IAAA,GACvCC,SAAS3B,KAAK4B,WAAW,SAAC5B,OAAAA;aAASA,MAAK6B,UAAS;;AACvD,QAAI,CAACF;AAAQ,YAAM,IAAIG,MAAO,aAAA;AAC9B,QAAMC,WAAW1B,EAAE2B,oBAAoB,SAAS;;MAE9C3B,EAAE4B,mBAAmBT,KAAKnB,EAAE6B,cAAe,IAAa,OAAVX,IAAIhB,KAAK,CAAA,CAAA;KACxD;AAEDoB,kBAAOQ,iBAAiB,QAAQJ,QAAAA,GACzBP;EACT;AACF;",
5
+ "names": ["hoistClassNames", "path", "existing", "expr", "hoist", "bind", "t", "isStringLiteral", "value", "trim", "identifier", "replaceStringWithVariable", "isBinaryExpression", "binaryExpression", "operator", "left", "right", "isLogicalExpression", "logicalExpression", "isConditionalExpression", "conditionalExpression", "test", "consequent", "alternate", "str", "uid", "scope", "generateUidIdentifier", "parent", "findParent", "isProgram", "Error", "variable", "variableDeclaration", "variableDeclarator", "stringLiteral", "unshiftContainer"]
6
6
  }