@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
@@ -3,16 +3,154 @@ import { dirname, extname, join, resolve } from "path";
3
3
  import * as t from "@babel/types";
4
4
  import { evaluateAstNode } from "./evaluateAstNode";
5
5
  import { getSourceModule } from "./getSourceModule";
6
- const isLocalImport = (path) => path.startsWith(".") || path.startsWith("/");
6
+ function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key, arg) {
7
+ try {
8
+ var info = gen[key](arg), value = info.value;
9
+ } catch (error) {
10
+ reject(error);
11
+ return;
12
+ }
13
+ info.done ? resolve2(value) : Promise.resolve(value).then(_next, _throw);
14
+ }
15
+ function _async_to_generator(fn) {
16
+ return function() {
17
+ var self = this, args = arguments;
18
+ return new Promise(function(resolve2, reject) {
19
+ var gen = fn.apply(self, args);
20
+ function _next(value) {
21
+ asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
22
+ }
23
+ function _throw(err) {
24
+ asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
25
+ }
26
+ _next(void 0);
27
+ });
28
+ };
29
+ }
30
+ function _type_of(obj) {
31
+ "@swc/helpers - typeof";
32
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
33
+ }
34
+ function _ts_generator(thisArg, body) {
35
+ var f, y, t2, g, _ = {
36
+ label: 0,
37
+ sent: function() {
38
+ if (t2[0] & 1)
39
+ throw t2[1];
40
+ return t2[1];
41
+ },
42
+ trys: [],
43
+ ops: []
44
+ };
45
+ return g = {
46
+ next: verb(0),
47
+ throw: verb(1),
48
+ return: verb(2)
49
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
50
+ return this;
51
+ }), g;
52
+ function verb(n) {
53
+ return function(v) {
54
+ return step([
55
+ n,
56
+ v
57
+ ]);
58
+ };
59
+ }
60
+ function step(op) {
61
+ if (f)
62
+ throw new TypeError("Generator is already executing.");
63
+ for (; _; )
64
+ try {
65
+ 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)
66
+ return t2;
67
+ switch (y = 0, t2 && (op = [
68
+ op[0] & 2,
69
+ t2.value
70
+ ]), op[0]) {
71
+ case 0:
72
+ case 1:
73
+ t2 = op;
74
+ break;
75
+ case 4:
76
+ return _.label++, {
77
+ value: op[1],
78
+ done: !1
79
+ };
80
+ case 5:
81
+ _.label++, y = op[1], op = [
82
+ 0
83
+ ];
84
+ continue;
85
+ case 7:
86
+ op = _.ops.pop(), _.trys.pop();
87
+ continue;
88
+ default:
89
+ if (t2 = _.trys, !(t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
90
+ _ = 0;
91
+ continue;
92
+ }
93
+ if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
94
+ _.label = op[1];
95
+ break;
96
+ }
97
+ if (op[0] === 6 && _.label < t2[1]) {
98
+ _.label = t2[1], t2 = op;
99
+ break;
100
+ }
101
+ if (t2 && _.label < t2[2]) {
102
+ _.label = t2[2], _.ops.push(op);
103
+ break;
104
+ }
105
+ t2[2] && _.ops.pop(), _.trys.pop();
106
+ continue;
107
+ }
108
+ op = body.call(thisArg, _);
109
+ } catch (e) {
110
+ op = [
111
+ 6,
112
+ e
113
+ ], y = 0;
114
+ } finally {
115
+ f = t2 = 0;
116
+ }
117
+ if (op[0] & 5)
118
+ throw op[1];
119
+ return {
120
+ value: op[0] ? op[1] : void 0,
121
+ done: !0
122
+ };
123
+ }
124
+ }
125
+ function _ts_values(o) {
126
+ var s = typeof Symbol == "function" && Symbol.iterator, m = s && o[s], i = 0;
127
+ if (m)
128
+ return m.call(o);
129
+ if (o && typeof o.length == "number")
130
+ return {
131
+ next: function() {
132
+ return o && i >= o.length && (o = void 0), {
133
+ value: o && o[i++],
134
+ done: !o
135
+ };
136
+ }
137
+ };
138
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
139
+ }
140
+ var isLocalImport = function(path) {
141
+ return path.startsWith(".") || path.startsWith("/");
142
+ };
7
143
  function resolveImportPath(sourcePath, path) {
8
- const sourceDir = dirname(sourcePath);
144
+ var sourceDir = dirname(sourcePath);
9
145
  return isLocalImport(path) ? (extname(path) === "" && (path += ".js"), resolve(sourceDir, path)) : path;
10
146
  }
11
- const cache = /* @__PURE__ */ new Map(), pending = /* @__PURE__ */ new Map(), loadCmd = `${join(__dirname, "loadFile.js")}`;
12
- let exited = !1, child = null;
147
+ var cache = /* @__PURE__ */ new Map(), pending = /* @__PURE__ */ new Map(), loadCmd = "".concat(join(__dirname, "loadFile.js")), exited = !1, child = null;
13
148
  function forkChild() {
14
149
  child = fork(loadCmd, [], {
15
- execArgv: ["-r", "esbuild-register"],
150
+ execArgv: [
151
+ "-r",
152
+ "esbuild-register"
153
+ ],
16
154
  detached: !1,
17
155
  stdio: "ignore"
18
156
  });
@@ -26,100 +164,204 @@ process.once("beforeExit", cleanupBeforeExit);
26
164
  function importModule(path) {
27
165
  if (child || forkChild(), pending.has(path))
28
166
  return pending.get(path);
29
- const promise = new Promise((res, rej) => {
30
- if (!child)
31
- return;
32
- if (cache.size > 2e3 && cache.clear(), cache.has(path))
33
- return cache.get(path);
34
- const listener = (msg) => {
35
- if (!child || !msg || typeof msg != "string")
36
- return;
37
- if (msg[0] === "-") {
38
- rej(new Error(msg.slice(1)));
39
- return;
40
- }
41
- child.removeListener("message", listener);
42
- const val = JSON.parse(msg);
43
- cache.set(path, val), res(val);
44
- };
45
- child.once("message", listener), child.send(`${path.replace(".js", "")}`);
167
+ var promise = new Promise(function(res, rej) {
168
+ if (child) {
169
+ if (cache.size > 2e3 && cache.clear(), cache.has(path))
170
+ return cache.get(path);
171
+ var listener = function(msg) {
172
+ if (child && msg && typeof msg == "string") {
173
+ if (msg[0] === "-") {
174
+ rej(new Error(msg.slice(1)));
175
+ return;
176
+ }
177
+ child.removeListener("message", listener);
178
+ var val = JSON.parse(msg);
179
+ cache.set(path, val), res(val);
180
+ }
181
+ };
182
+ child.once("message", listener), child.send("".concat(path.replace(".js", "")));
183
+ }
46
184
  });
47
185
  return pending.set(path, promise), promise;
48
186
  }
49
- async function getStaticBindingsForScope(scope, whitelist = [], sourcePath, bindingCache, shouldPrintDebug) {
50
- var _a;
51
- const bindings = scope.getAllBindings(), ret = {}, program = scope.getProgramParent().block;
52
- for (const node of program.body)
53
- if (t.isImportDeclaration(node)) {
54
- const importPath = node.source.value;
55
- if (!node.specifiers.length || !isLocalImport(importPath))
56
- continue;
57
- const moduleName = resolveImportPath(sourcePath, importPath);
58
- if (!whitelist.some((test) => moduleName.endsWith(test)))
59
- continue;
60
- try {
61
- const src = await importModule(moduleName);
62
- if (!src)
63
- continue;
64
- for (const specifier of node.specifiers)
65
- if (t.isImportSpecifier(specifier) && t.isIdentifier(specifier.imported) && typeof src[specifier.imported.name] < "u") {
66
- const val = src[specifier.local.name];
67
- ret[specifier.local.name] = val;
187
+ function getStaticBindingsForScope(scope) {
188
+ return _getStaticBindingsForScope.apply(this, arguments);
189
+ }
190
+ function _getStaticBindingsForScope() {
191
+ return _getStaticBindingsForScope = _async_to_generator(function(scope) {
192
+ var _loop, whitelist, sourcePath, bindingCache, shouldPrintDebug, bindings, ret, program, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _loop1, _iterator, _step, err, k, _ret, _arguments = arguments;
193
+ return _ts_generator(this, function(_state) {
194
+ switch (_state.label) {
195
+ case 0:
196
+ _loop = function(k3) {
197
+ var binding = bindings[k3], sourceModule = getSourceModule(k3, binding);
198
+ if (sourceModule) {
199
+ if (!sourceModule.sourceModule)
200
+ return "continue";
201
+ var moduleName = resolveImportPath(sourcePath, sourceModule.sourceModule), isOnWhitelist = whitelist.some(function(test) {
202
+ return moduleName.endsWith(test);
203
+ });
204
+ if (isOnWhitelist) {
205
+ var src = importModule(moduleName);
206
+ if (!src)
207
+ return console.info(" | \u26A0\uFE0F Missing file ".concat(moduleName, " via ").concat(sourcePath, " import ").concat(sourceModule.sourceModule, "?")), {
208
+ v: {}
209
+ };
210
+ sourceModule.destructured ? sourceModule.imported && (ret[k3] = src[sourceModule.imported]) : ret[k3] = src;
211
+ }
212
+ return "continue";
213
+ }
214
+ var parent = binding.path.parent;
215
+ if (!t.isVariableDeclaration(parent) || parent.kind !== "const")
216
+ return "continue";
217
+ var dec = parent.declarations.find(function(d) {
218
+ return t.isIdentifier(d.id) && d.id.name === k3;
219
+ });
220
+ if (!dec || !dec.init)
221
+ return "continue";
222
+ if (typeof dec.id.start != "number" || typeof dec.id.end != "number")
223
+ return console.error("dec.id.start/end is not a number"), "continue";
224
+ if (!t.isIdentifier(dec.id))
225
+ return console.error("dec is not an identifier"), "continue";
226
+ var cacheKey = "".concat(dec.id.name, "_").concat(dec.id.start, "-").concat(dec.id.end);
227
+ if (Object.hasOwnProperty.call(bindingCache, cacheKey) || Object.hasOwnProperty.call(bindingCache, cacheKey))
228
+ return ret[k3] = bindingCache[cacheKey], "continue";
229
+ try {
230
+ return ret[k3] = evaluateAstNode(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k3], "continue";
231
+ } catch {
232
+ }
233
+ }, 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;
234
+ case 1:
235
+ _state.trys.push([
236
+ 1,
237
+ 6,
238
+ 7,
239
+ 8
240
+ ]), _loop1 = function() {
241
+ var node, importPath, moduleName, isOnWhitelist, src, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step1, specifier, val, err1, _process_env_DEBUG;
242
+ return _ts_generator(this, function(_state2) {
243
+ switch (_state2.label) {
244
+ case 0:
245
+ if (node = _step.value, !t.isImportDeclaration(node))
246
+ return [
247
+ 3,
248
+ 4
249
+ ];
250
+ if (importPath = node.source.value, !node.specifiers.length)
251
+ return [
252
+ 2,
253
+ "continue"
254
+ ];
255
+ if (!isLocalImport(importPath))
256
+ return [
257
+ 2,
258
+ "continue"
259
+ ];
260
+ if (moduleName = resolveImportPath(sourcePath, importPath), isOnWhitelist = whitelist.some(function(test) {
261
+ return moduleName.endsWith(test);
262
+ }), !isOnWhitelist)
263
+ return [
264
+ 2,
265
+ "continue"
266
+ ];
267
+ _state2.label = 1;
268
+ case 1:
269
+ return _state2.trys.push([
270
+ 1,
271
+ 3,
272
+ ,
273
+ 4
274
+ ]), [
275
+ 4,
276
+ importModule(moduleName)
277
+ ];
278
+ case 2:
279
+ if (src = _state2.sent(), !src)
280
+ return [
281
+ 2,
282
+ "continue"
283
+ ];
284
+ _iteratorNormalCompletion2 = !0, _didIteratorError2 = !1, _iteratorError2 = void 0;
285
+ try {
286
+ for (_iterator2 = node.specifiers[Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step1 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0)
287
+ 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);
288
+ } catch (err2) {
289
+ _didIteratorError2 = !0, _iteratorError2 = err2;
290
+ } finally {
291
+ try {
292
+ !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
293
+ } finally {
294
+ if (_didIteratorError2)
295
+ throw _iteratorError2;
296
+ }
297
+ }
298
+ return [
299
+ 3,
300
+ 4
301
+ ];
302
+ case 3:
303
+ 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), [
304
+ 3,
305
+ 4
306
+ ];
307
+ case 4:
308
+ return [
309
+ 2
310
+ ];
311
+ }
312
+ });
313
+ }, _iterator = program.body[Symbol.iterator](), _state.label = 2;
314
+ case 2:
315
+ return (_iteratorNormalCompletion = (_step = _iterator.next()).done) ? [
316
+ 3,
317
+ 5
318
+ ] : [
319
+ 5,
320
+ _ts_values(_loop1())
321
+ ];
322
+ case 3:
323
+ _state.sent(), _state.label = 4;
324
+ case 4:
325
+ return _iteratorNormalCompletion = !0, [
326
+ 3,
327
+ 2
328
+ ];
329
+ case 5:
330
+ return [
331
+ 3,
332
+ 8
333
+ ];
334
+ case 6:
335
+ return err = _state.sent(), _didIteratorError = !0, _iteratorError = err, [
336
+ 3,
337
+ 8
338
+ ];
339
+ case 7:
340
+ try {
341
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
342
+ } finally {
343
+ if (_didIteratorError)
344
+ throw _iteratorError;
68
345
  }
69
- } catch (err) {
70
- shouldPrintDebug ? console.warn(
71
- ` | Skipping partial evaluation of constant file: ${moduleName} (DEBUG=tamagui for more)`
72
- ) : (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Error in partial evaluation", err.message, err.stack);
73
- }
74
- }
75
- if (!bindingCache)
76
- throw new Error("BindingCache is a required param");
77
- for (const k in bindings) {
78
- const binding = bindings[k], sourceModule = getSourceModule(k, binding);
79
- if (sourceModule) {
80
- if (!sourceModule.sourceModule)
81
- continue;
82
- const moduleName = resolveImportPath(sourcePath, sourceModule.sourceModule);
83
- if (whitelist.some((test) => moduleName.endsWith(test))) {
84
- const src = importModule(moduleName);
85
- if (!src)
86
- return console.info(
87
- ` | \u26A0\uFE0F Missing file ${moduleName} via ${sourcePath} import ${sourceModule.sourceModule}?`
88
- ), {};
89
- sourceModule.destructured ? sourceModule.imported && (ret[k] = src[sourceModule.imported]) : ret[k] = src;
346
+ return [
347
+ 7
348
+ ];
349
+ case 8:
350
+ if (!bindingCache)
351
+ throw new Error("BindingCache is a required param");
352
+ for (var k2 in bindings)
353
+ if (_ret = _loop(k2), _type_of(_ret) === "object")
354
+ return [
355
+ 2,
356
+ _ret.v
357
+ ];
358
+ return [
359
+ 2,
360
+ ret
361
+ ];
90
362
  }
91
- continue;
92
- }
93
- const { parent } = binding.path;
94
- if (!t.isVariableDeclaration(parent) || parent.kind !== "const")
95
- continue;
96
- const dec = parent.declarations.find((d) => t.isIdentifier(d.id) && d.id.name === k);
97
- if (!dec || !dec.init)
98
- continue;
99
- if (typeof dec.id.start != "number" || typeof dec.id.end != "number") {
100
- console.error("dec.id.start/end is not a number");
101
- continue;
102
- }
103
- if (!t.isIdentifier(dec.id)) {
104
- console.error("dec is not an identifier");
105
- continue;
106
- }
107
- const cacheKey = `${dec.id.name}_${dec.id.start}-${dec.id.end}`;
108
- if (Object.hasOwnProperty.call(bindingCache, cacheKey)) {
109
- ret[k] = bindingCache[cacheKey];
110
- continue;
111
- }
112
- if (Object.hasOwnProperty.call(bindingCache, cacheKey)) {
113
- ret[k] = bindingCache[cacheKey];
114
- continue;
115
- }
116
- try {
117
- ret[k] = evaluateAstNode(dec.init, void 0, shouldPrintDebug), bindingCache[cacheKey] = ret[k];
118
- continue;
119
- } catch {
120
- }
121
- }
122
- return ret;
363
+ });
364
+ }), _getStaticBindingsForScope.apply(this, arguments);
123
365
  }
124
366
  export {
125
367
  cleanupBeforeExit,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/getStaticBindingsForScope.ts"],
4
- "mappings": "AACA,SAAS,YAAY;AACrB,SAAS,SAAS,SAAS,MAAM,eAAe;AAGhD,YAAY,OAAO;AAEnB,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAEhC,MAAM,gBAAgB,CAAC,SAAiB,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,GAAG;AAEnF,SAAS,kBAAkB,YAAoB,MAAc;AAC3D,QAAM,YAAY,QAAQ,UAAU;AACpC,SAAI,cAAc,IAAI,KAChB,QAAQ,IAAI,MAAM,OACpB,QAAQ,QAEH,QAAQ,WAAW,IAAI,KAEzB;AACT;AAEA,MAAM,QAAQ,oBAAI,IAAI,GAChB,UAAU,oBAAI,IAA0B,GAExC,UAAU,GAAG,KAAK,WAAW,aAAa,CAAC;AAEjD,IAAI,SAAS,IAET,QAA6B;AAEjC,SAAS,YAAY;AACnB,UAAQ,KAAK,SAAS,CAAC,GAAG;AAAA,IACxB,UAAU,CAAC,MAAM,kBAAkB;AAAA,IACnC,UAAU;AAAA,IACV,OAAO;AAAA,EACT,CAAC;AACH;AAEO,SAAS,oBAAoB;AAClC,EAAI,UACC,UACL,MAAM,mBAAmB,GACzB,MAAM,MAAM,GACZ,MAAM,WAAW,GACjB,MAAM,KAAK,GACX,SAAS;AACX;AAEA,QAAQ,KAAK,WAAW,iBAAiB;AACzC,QAAQ,KAAK,UAAU,iBAAiB;AACxC,QAAQ,KAAK,cAAc,iBAAiB;AAE5C,SAAS,aAAa,MAAc;AAIlC,MAHK,SACH,UAAU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BAAAA,WAAAA,mBAAmBpB,WAAW,SAAA,KACvC2D,QAAQC,KAAM,+BAA8BgC,KAAIY,SAASZ,KAAIa,KAAK;;;;;;;;;;UAI1E,GA/BK,YAAcxD,QAAQyD,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,CAAC7D;AACH,kBAAM,IAAIZ,MAAM,kCAAA;AAGlB,mBAAWiB,MAAKH;;;;;;AAmFhB,iBAAA;;YAAOC;;;;EACT,CAAA,GA5IsBN,2BAAAA,MAAAA,MAAAA,SAAAA;;",
5
+ "names": ["fork", "dirname", "extname", "join", "resolve", "t", "evaluateAstNode", "getSourceModule", "isLocalImport", "path", "startsWith", "resolveImportPath", "sourcePath", "sourceDir", "cache", "Map", "pending", "loadCmd", "__dirname", "exited", "child", "forkChild", "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", "moduleName", "isOnWhitelist", "some", "test", "endsWith", "src", "console", "info", "destructured", "imported", "parent", "isVariableDeclaration", "kind", "dec", "declarations", "find", "d", "isIdentifier", "id", "name", "init", "start", "end", "error", "cacheKey", "Object", "hasOwnProperty", "call", "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,SAAS,YAAY,YAAY;AAI1B,SAAS,sCACd,QACA;AACA,SAAI,WAAW,MAAM,IACZ,SAGF,KAAK,QAAQ,IAAI,GAAG,MAAM;AACnC;",
5
- "names": []
3
+ "sources": ["../../../src/extractor/Users/n8/tamagui/packages/static/src/extractor/getTamaguiConfigPathFromOptionsConfig.ts"],
4
+ "mappings": "AAAA,SAASA,YAAYC,YAAY;AAI1B,SAASC,sCACdC,QAA6C;AAE7C,SAAIH,WAAWG,MAAAA,IACNA,SAGFF,KAAKG,QAAQC,IAAG,GAAIF,MAAAA;AAC7B;",
5
+ "names": ["isAbsolute", "join", "getTamaguiConfigPathFromOptionsConfig", "config", "process", "cwd"]
6
6
  }
@@ -1,12 +1,12 @@
1
1
  import * as t from "@babel/types";
2
2
  function hoistClassNames(path, existing, expr) {
3
- const hoist = hoistClassNames.bind(null, path, existing);
3
+ var hoist = hoistClassNames.bind(null, path, existing);
4
4
  if (t.isStringLiteral(expr)) {
5
5
  if (expr.value.trim() === "")
6
6
  return expr;
7
7
  if (existing[expr.value])
8
8
  return existing[expr.value];
9
- const identifier = replaceStringWithVariable(expr);
9
+ var identifier = replaceStringWithVariable(expr);
10
10
  return existing[expr.value] = identifier, identifier;
11
11
  }
12
12
  if (t.isBinaryExpression(expr))
@@ -14,19 +14,17 @@ function hoistClassNames(path, existing, expr) {
14
14
  if (t.isLogicalExpression(expr))
15
15
  return t.logicalExpression(expr.operator, hoist(expr.left), hoist(expr.right));
16
16
  if (t.isConditionalExpression(expr))
17
- return t.conditionalExpression(
18
- expr.test,
19
- hoist(expr.consequent),
20
- hoist(expr.alternate)
21
- );
17
+ return t.conditionalExpression(expr.test, hoist(expr.consequent), hoist(expr.alternate));
22
18
  return expr;
23
19
  function replaceStringWithVariable(str) {
24
- const uid = path.scope.generateUidIdentifier("cn"), parent = path.findParent((path2) => path2.isProgram());
20
+ var uid = path.scope.generateUidIdentifier("cn"), parent = path.findParent(function(path2) {
21
+ return path2.isProgram();
22
+ });
25
23
  if (!parent)
26
24
  throw new Error("no program?");
27
- const variable = t.variableDeclaration("const", [
25
+ var variable = t.variableDeclaration("const", [
28
26
  // adding a space for extra safety
29
- t.variableDeclarator(uid, t.stringLiteral(` ${str.value}`))
27
+ t.variableDeclarator(uid, t.stringLiteral(" ".concat(str.value)))
30
28
  ]);
31
29
  return parent.unshiftContainer("body", variable), uid;
32
30
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/hoistClassNames.ts"],
4
- "mappings": "AACA,YAAY,OAAO;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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A0Ba,KAAoB;AAErD,QAAMC,MAAMvB,KAAKwB,MAAMC,sBAAsB,IAAA,GACvCC,SAAS1B,KAAK2B,WAAW,SAAC3B,OAAAA;aAASA,MAAK4B,UAAS;;AACvD,QAAI,CAACF;AAAQ,YAAM,IAAIG,MAAO,aAAA;AAC9B,QAAMC,WAAWhC,EAAEiC,oBAAoB,SAAS;;MAE9CjC,EAAEkC,mBAAmBT,KAAKzB,EAAEmC,cAAe,IAAa,OAAVX,IAAIhB,KAAK,CAAA,CAAA;KACxD;AAEDoB,kBAAOQ,iBAAiB,QAAQJ,QAAAA,GACzBP;EACT;AACF;",
5
+ "names": ["t", "hoistClassNames", "path", "existing", "expr", "hoist", "bind", "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
  }