@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
@@ -29,7 +29,191 @@ __export(bundle_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(bundle_exports);
31
31
  var import_path = require("path"), import_esbuild = __toESM(require("esbuild")), import_fs_extra = require("fs-extra"), import_esbuildAliasPlugin = require("./esbuildAliasPlugin"), import_loadTamagui = require("./loadTamagui");
32
- const esbuildLoaderConfig = {
32
+ function _array_like_to_array(arr, len) {
33
+ (len == null || len > arr.length) && (len = arr.length);
34
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
35
+ arr2[i] = arr[i];
36
+ return arr2;
37
+ }
38
+ function _array_without_holes(arr) {
39
+ if (Array.isArray(arr))
40
+ return _array_like_to_array(arr);
41
+ }
42
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
43
+ try {
44
+ var info = gen[key](arg), value = info.value;
45
+ } catch (error) {
46
+ reject(error);
47
+ return;
48
+ }
49
+ info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
50
+ }
51
+ function _async_to_generator(fn) {
52
+ return function() {
53
+ var self = this, args = arguments;
54
+ return new Promise(function(resolve, reject) {
55
+ var gen = fn.apply(self, args);
56
+ function _next(value) {
57
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
58
+ }
59
+ function _throw(err) {
60
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
61
+ }
62
+ _next(void 0);
63
+ });
64
+ };
65
+ }
66
+ function _define_property(obj, key, value) {
67
+ return key in obj ? Object.defineProperty(obj, key, {
68
+ value,
69
+ enumerable: !0,
70
+ configurable: !0,
71
+ writable: !0
72
+ }) : obj[key] = value, obj;
73
+ }
74
+ function _iterable_to_array(iter) {
75
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
76
+ return Array.from(iter);
77
+ }
78
+ function _non_iterable_spread() {
79
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
80
+ }
81
+ function _object_spread(target) {
82
+ for (var i = 1; i < arguments.length; i++) {
83
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
84
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
85
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
86
+ }))), ownKeys.forEach(function(key) {
87
+ _define_property(target, key, source[key]);
88
+ });
89
+ }
90
+ return target;
91
+ }
92
+ function _object_without_properties(source, excluded) {
93
+ if (source == null)
94
+ return {};
95
+ var target = _object_without_properties_loose(source, excluded), key, i;
96
+ if (Object.getOwnPropertySymbols) {
97
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
98
+ for (i = 0; i < sourceSymbolKeys.length; i++)
99
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
100
+ }
101
+ return target;
102
+ }
103
+ function _object_without_properties_loose(source, excluded) {
104
+ if (source == null)
105
+ return {};
106
+ var target = {}, sourceKeys = Object.keys(source), key, i;
107
+ for (i = 0; i < sourceKeys.length; i++)
108
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
109
+ return target;
110
+ }
111
+ function _to_consumable_array(arr) {
112
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
113
+ }
114
+ function _unsupported_iterable_to_array(o, minLen) {
115
+ if (o) {
116
+ if (typeof o == "string")
117
+ return _array_like_to_array(o, minLen);
118
+ var n = Object.prototype.toString.call(o).slice(8, -1);
119
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
120
+ return Array.from(n);
121
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
122
+ return _array_like_to_array(o, minLen);
123
+ }
124
+ }
125
+ function _ts_generator(thisArg, body) {
126
+ var f, y, t, g, _ = {
127
+ label: 0,
128
+ sent: function() {
129
+ if (t[0] & 1)
130
+ throw t[1];
131
+ return t[1];
132
+ },
133
+ trys: [],
134
+ ops: []
135
+ };
136
+ return g = {
137
+ next: verb(0),
138
+ throw: verb(1),
139
+ return: verb(2)
140
+ }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
141
+ return this;
142
+ }), g;
143
+ function verb(n) {
144
+ return function(v) {
145
+ return step([
146
+ n,
147
+ v
148
+ ]);
149
+ };
150
+ }
151
+ function step(op) {
152
+ if (f)
153
+ throw new TypeError("Generator is already executing.");
154
+ for (; _; )
155
+ try {
156
+ if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
157
+ return t;
158
+ switch (y = 0, t && (op = [
159
+ op[0] & 2,
160
+ t.value
161
+ ]), op[0]) {
162
+ case 0:
163
+ case 1:
164
+ t = op;
165
+ break;
166
+ case 4:
167
+ return _.label++, {
168
+ value: op[1],
169
+ done: !1
170
+ };
171
+ case 5:
172
+ _.label++, y = op[1], op = [
173
+ 0
174
+ ];
175
+ continue;
176
+ case 7:
177
+ op = _.ops.pop(), _.trys.pop();
178
+ continue;
179
+ default:
180
+ if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
181
+ _ = 0;
182
+ continue;
183
+ }
184
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
185
+ _.label = op[1];
186
+ break;
187
+ }
188
+ if (op[0] === 6 && _.label < t[1]) {
189
+ _.label = t[1], t = op;
190
+ break;
191
+ }
192
+ if (t && _.label < t[2]) {
193
+ _.label = t[2], _.ops.push(op);
194
+ break;
195
+ }
196
+ t[2] && _.ops.pop(), _.trys.pop();
197
+ continue;
198
+ }
199
+ op = body.call(thisArg, _);
200
+ } catch (e) {
201
+ op = [
202
+ 6,
203
+ e
204
+ ], y = 0;
205
+ } finally {
206
+ f = t = 0;
207
+ }
208
+ if (op[0] & 5)
209
+ throw op[1];
210
+ return {
211
+ value: op[0] ? op[1] : void 0,
212
+ done: !0
213
+ };
214
+ }
215
+ }
216
+ var esbuildLoaderConfig = {
33
217
  ".js": "jsx",
34
218
  ".png": "dataurl",
35
219
  ".jpg": "dataurl",
@@ -52,84 +236,165 @@ const esbuildLoaderConfig = {
52
236
  ".aac": "file",
53
237
  ".ogg": "file",
54
238
  ".flac": "file"
55
- }, dataExtensions = Object.keys(esbuildLoaderConfig).filter(
56
- (k) => esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl"
57
- ).map((k) => k.slice(1)), esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join("|")})$`, "i");
58
- function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, ...options }, platform, aliases) {
59
- var _a;
60
- (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Building", entryPoints);
61
- const tsconfig = (0, import_path.join)(__dirname, "..", "..", "..", "tamagui.tsconfig.json");
62
- return {
239
+ }, dataExtensions = Object.keys(esbuildLoaderConfig).filter(function(k) {
240
+ return esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl";
241
+ }).map(function(k) {
242
+ return k.slice(1);
243
+ }), esbuildIgnoreFilesRegex = new RegExp(".(".concat(dataExtensions.join("|"), ")$"), "i");
244
+ function getESBuildConfig(_param, platform, aliases) {
245
+ var entryPoints = _param.entryPoints, resolvePlatformSpecificEntries = _param.resolvePlatformSpecificEntries, options = _object_without_properties(_param, [
246
+ "entryPoints",
247
+ "resolvePlatformSpecificEntries"
248
+ ]), _process_env_DEBUG;
249
+ !((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.startsWith("tamagui") && console.info("Building", entryPoints);
250
+ var resolvedEntryPoints = resolvePlatformSpecificEntries ? entryPoints.map(import_loadTamagui.resolveWebOrNativeSpecificEntry) : entryPoints, res = _object_spread({
63
251
  bundle: !0,
64
- entryPoints: resolvePlatformSpecificEntries ? entryPoints.map(import_loadTamagui.resolveWebOrNativeSpecificEntry) : entryPoints,
252
+ entryPoints: resolvedEntryPoints,
65
253
  format: "cjs",
66
254
  target: "node16",
67
255
  jsx: "transform",
68
256
  jsxFactory: "react",
69
257
  allowOverwrite: !0,
70
258
  keepNames: !0,
71
- resolveExtensions: [
259
+ resolveExtensions: _to_consumable_array([
72
260
  ".native.tsx",
73
261
  ".native.ts",
74
262
  ".native.jsx",
75
- ".native.js",
263
+ ".native.js"
264
+ ]).concat([
76
265
  ".tsx",
77
266
  ".ts",
78
267
  ".jsx",
79
268
  ".js"
80
- ],
269
+ ]),
81
270
  platform: "node",
82
- tsconfig,
271
+ tsconfigRaw: {
272
+ compilerOptions: {
273
+ jsx: "react-jsx"
274
+ }
275
+ },
83
276
  loader: esbuildLoaderConfig,
84
277
  logLevel: "warning",
85
278
  plugins: [
86
279
  {
87
280
  name: "external",
88
- setup(build) {
89
- build.onResolve({ filter: /@tamagui\/core/ }, (args) => ({
90
- path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
91
- external: !0
92
- })), build.onResolve({ filter: /react-native\/package.json$/ }, (args) => ({
93
- path: "react-native/package.json",
94
- external: !0
95
- })), build.onResolve({ filter: /@tamagui\/web/ }, (args) => ({
96
- path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
97
- external: !0
98
- })), build.onResolve({ filter: /^(react-native|react-native\/.*)$/ }, (args) => ({
99
- path: "react-native-web-lite",
100
- external: !0
101
- })), build.onResolve({ filter: /react-native-reanimated/ }, (args) => ({
102
- path: "react-native-reanimated",
103
- external: !0
104
- }));
281
+ setup: function(build) {
282
+ build.onResolve({
283
+ filter: /@tamagui\/core/
284
+ }, function(args) {
285
+ return {
286
+ path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
287
+ external: !0
288
+ };
289
+ }), build.onResolve({
290
+ filter: /react-native\/package.json$/
291
+ }, function(args) {
292
+ return {
293
+ path: "react-native/package.json",
294
+ external: !0
295
+ };
296
+ }), build.onResolve({
297
+ filter: /@tamagui\/web/
298
+ }, function(args) {
299
+ return {
300
+ path: platform === "native" ? "@tamagui/core/native" : "@tamagui/core",
301
+ external: !0
302
+ };
303
+ }), build.onResolve({
304
+ filter: /^(react-native|react-native\/.*)$/
305
+ }, function(args) {
306
+ return {
307
+ path: "react-native-web-lite",
308
+ external: !0
309
+ };
310
+ }), build.onResolve({
311
+ filter: /react-native-reanimated/
312
+ }, function(args) {
313
+ return {
314
+ path: "react-native-reanimated",
315
+ external: !0
316
+ };
317
+ });
105
318
  }
106
319
  },
107
- (0, import_esbuildAliasPlugin.esbuildAliasPlugin)({
108
- ...aliases
109
- })
110
- ],
111
- ...options
112
- };
320
+ (0, import_esbuildAliasPlugin.esbuildAliasPlugin)(_object_spread({}, aliases))
321
+ ]
322
+ }, options);
323
+ return res;
113
324
  }
114
- async function bundle(props, platform, aliases) {
115
- await asyncLock(props);
116
- const config = getESBuildConfig(props, platform, aliases);
117
- return import_esbuild.default.build(config);
118
- }
119
- async function asyncLock(props) {
120
- var _a;
121
- const lockFile = (0, import_path.join)((0, import_path.dirname)(props.outfile), (0, import_path.basename)(props.outfile, ".lock")), lockStat = await (0, import_fs_extra.stat)(lockFile).catch(() => {
122
- });
123
- if ((lockStat ? (/* @__PURE__ */ new Date()).getTime() - new Date(lockStat.mtime).getTime() : 1 / 0) < 500) {
124
- (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.info("Waiting for existing build", props.entryPoints);
125
- let tries = 5;
126
- for (; tries--; ) {
127
- if (await (0, import_fs_extra.pathExists)(props.outfile))
128
- return;
129
- await new Promise((res) => setTimeout(res, 50));
130
- }
131
- }
132
- (0, import_fs_extra.writeFile)(lockFile, "");
325
+ function bundle(props, platform, aliases) {
326
+ return _bundle.apply(this, arguments);
327
+ }
328
+ function _bundle() {
329
+ return _bundle = _async_to_generator(function(props, platform, aliases) {
330
+ var config;
331
+ return _ts_generator(this, function(_state) {
332
+ switch (_state.label) {
333
+ case 0:
334
+ return [
335
+ 4,
336
+ asyncLock(props)
337
+ ];
338
+ case 1:
339
+ return _state.sent(), config = getESBuildConfig(props, platform, aliases), [
340
+ 2,
341
+ import_esbuild.default.build(config)
342
+ ];
343
+ }
344
+ });
345
+ }), _bundle.apply(this, arguments);
346
+ }
347
+ function asyncLock(props) {
348
+ return _asyncLock.apply(this, arguments);
349
+ }
350
+ function _asyncLock() {
351
+ return _asyncLock = // until i do fancier things w plugins:
352
+ _async_to_generator(function(props) {
353
+ var lockFile, lockStat, lockedMsAgo, _process_env_DEBUG, tries;
354
+ return _ts_generator(this, function(_state) {
355
+ switch (_state.label) {
356
+ case 0:
357
+ return lockFile = (0, import_path.join)((0, import_path.dirname)(props.outfile), (0, import_path.basename)(props.outfile, ".lock")), [
358
+ 4,
359
+ (0, import_fs_extra.stat)(lockFile).catch(function() {
360
+ })
361
+ ];
362
+ case 1:
363
+ if (lockStat = _state.sent(), lockedMsAgo = lockStat ? (/* @__PURE__ */ new Date()).getTime() - new Date(lockStat.mtime).getTime() : 1 / 0, !(lockedMsAgo < 500))
364
+ return [
365
+ 3,
366
+ 5
367
+ ];
368
+ !((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.startsWith("tamagui") && console.info("Waiting for existing build", props.entryPoints), tries = 5, _state.label = 2;
369
+ case 2:
370
+ return tries-- ? [
371
+ 4,
372
+ (0, import_fs_extra.pathExists)(props.outfile)
373
+ ] : [
374
+ 3,
375
+ 5
376
+ ];
377
+ case 3:
378
+ return _state.sent() ? [
379
+ 2
380
+ ] : [
381
+ 4,
382
+ new Promise(function(res) {
383
+ return setTimeout(res, 50);
384
+ })
385
+ ];
386
+ case 4:
387
+ return _state.sent(), [
388
+ 3,
389
+ 2
390
+ ];
391
+ case 5:
392
+ return (0, import_fs_extra.writeFile)(lockFile, ""), [
393
+ 2
394
+ ];
395
+ }
396
+ });
397
+ }), _asyncLock.apply(this, arguments);
133
398
  }
134
399
  // Annotate the CommonJS export names for ESM import in node:
135
400
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/bundle.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC,iBAExC,iBAAoB,6BACpB,kBAA4C,qBAG5C,4BAAmC,iCACnC,qBAAgD;AAEzC,MAAM,sBAAsB;AAAA,EACjC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ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FilesRegex", "RegExp", "join", "getESBuildConfig", "platform", "aliases", "entryPoints", "resolvePlatformSpecificEntries", "options", "process", "env", "DEBUG", "startsWith", "console", "info", "resolvedEntryPoints", "resolveWebOrNativeSpecificEntry", "res", "bundle", "format", "target", "jsx", "jsxFactory", "allowOverwrite", "keepNames", "resolveExtensions", "tsconfigRaw", "compilerOptions", "loader", "logLevel", "plugins", "name", "setup", "build", "onResolve", "args", "path", "external", "esbuildAliasPlugin", "props", "config", "asyncLock", "esbuild", "lockFile", "lockStat", "lockedMsAgo", "tries", "dirname", "outfile", "basename", "stat", "catch", "Date", "getTime", "mtime", "Infinity", "pathExists", "Promise", "setTimeout", "writeFile"]
6
6
  }