@tamagui/static 1.110.5 → 1.111.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/cjs/checkDeps.native.js +3 -131
  2. package/dist/cjs/checkDeps.native.js.map +1 -1
  3. package/dist/cjs/extractor/babelParse.native.js +3 -3
  4. package/dist/cjs/extractor/babelParse.native.js.map +1 -1
  5. package/dist/cjs/extractor/buildClassName.native.js +5 -5
  6. package/dist/cjs/extractor/buildClassName.native.js.map +1 -1
  7. package/dist/cjs/extractor/bundle.native.js +35 -260
  8. package/dist/cjs/extractor/bundle.native.js.map +2 -2
  9. package/dist/cjs/extractor/bundleConfig.native.js +153 -429
  10. package/dist/cjs/extractor/bundleConfig.native.js.map +2 -2
  11. package/dist/cjs/extractor/createEvaluator.native.js +2 -2
  12. package/dist/cjs/extractor/createEvaluator.native.js.map +1 -1
  13. package/dist/cjs/extractor/createExtractor.native.js +488 -730
  14. package/dist/cjs/extractor/createExtractor.native.js.map +2 -2
  15. package/dist/cjs/extractor/createLogger.native.js +2 -2
  16. package/dist/cjs/extractor/createLogger.native.js.map +1 -1
  17. package/dist/cjs/extractor/esbuildAliasPlugin.native.js +3 -3
  18. package/dist/cjs/extractor/esbuildAliasPlugin.native.js.map +1 -1
  19. package/dist/cjs/extractor/extractHelpers.native.js +17 -71
  20. package/dist/cjs/extractor/extractHelpers.native.js.map +2 -2
  21. package/dist/cjs/extractor/extractMediaStyle.native.js +21 -73
  22. package/dist/cjs/extractor/extractMediaStyle.native.js.map +2 -2
  23. package/dist/cjs/extractor/extractToClassNames.native.js +243 -423
  24. package/dist/cjs/extractor/extractToClassNames.native.js.map +2 -2
  25. package/dist/cjs/extractor/extractToNative.native.js +30 -93
  26. package/dist/cjs/extractor/extractToNative.native.js.map +2 -2
  27. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +43 -365
  28. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +2 -2
  29. package/dist/cjs/extractor/generatedUid.native.js +1 -5
  30. package/dist/cjs/extractor/generatedUid.native.js.map +1 -1
  31. package/dist/cjs/extractor/getPrefixLogs.native.js +1 -1
  32. package/dist/cjs/extractor/getPrefixLogs.native.js.map +1 -1
  33. package/dist/cjs/extractor/getPropValueFromAttributes.native.js +2 -1
  34. package/dist/cjs/extractor/getPropValueFromAttributes.native.js.map +2 -2
  35. package/dist/cjs/extractor/getStaticBindingsForScope.native.js +91 -292
  36. package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +2 -2
  37. package/dist/cjs/extractor/hoistClassNames.native.js +1 -1
  38. package/dist/cjs/extractor/hoistClassNames.native.js.map +1 -1
  39. package/dist/cjs/extractor/literalToAst.native.js +15 -69
  40. package/dist/cjs/extractor/literalToAst.native.js.map +1 -1
  41. package/dist/cjs/extractor/loadFile.native.js +5 -8
  42. package/dist/cjs/extractor/loadFile.native.js.map +1 -1
  43. package/dist/cjs/extractor/loadTamagui.native.js +155 -574
  44. package/dist/cjs/extractor/loadTamagui.native.js.map +2 -2
  45. package/dist/cjs/extractor/logLines.native.js +1 -1
  46. package/dist/cjs/extractor/logLines.native.js.map +1 -1
  47. package/dist/cjs/extractor/normalizeTernaries.native.js +4 -59
  48. package/dist/cjs/extractor/normalizeTernaries.native.js.map +1 -1
  49. package/dist/cjs/extractor/propsToFontFamilyCache.native.js +1 -1
  50. package/dist/cjs/extractor/propsToFontFamilyCache.native.js.map +1 -1
  51. package/dist/cjs/extractor/removeUnusedHooks.native.js +1 -1
  52. package/dist/cjs/extractor/removeUnusedHooks.native.js.map +1 -1
  53. package/dist/cjs/extractor/timer.native.js +2 -2
  54. package/dist/cjs/extractor/timer.native.js.map +1 -1
  55. package/dist/cjs/extractor/watchTamaguiConfig.native.js +25 -166
  56. package/dist/cjs/extractor/watchTamaguiConfig.native.js.map +2 -2
  57. package/dist/cjs/getPragmaOptions.native.js +1 -1
  58. package/dist/cjs/getPragmaOptions.native.js.map +1 -1
  59. package/dist/cjs/helpers/requireTamaguiCore.native.js.map +1 -1
  60. package/dist/cjs/minifyCSS.native.js +1 -1
  61. package/dist/cjs/minifyCSS.native.js.map +2 -2
  62. package/dist/cjs/registerRequire.native.js +18 -37
  63. package/dist/cjs/registerRequire.native.js.map +1 -1
  64. package/dist/cjs/server.native.js +21 -163
  65. package/dist/cjs/server.native.js.map +2 -2
  66. package/dist/esm/checkDeps.native.js +3 -131
  67. package/dist/esm/checkDeps.native.js.map +1 -1
  68. package/dist/esm/checkDeps.native.mjs +10 -0
  69. package/dist/esm/checkDeps.native.mjs.map +1 -0
  70. package/dist/esm/constants.native.mjs +12 -0
  71. package/dist/esm/constants.native.mjs.map +1 -0
  72. package/dist/esm/exports.native.mjs +16 -0
  73. package/dist/esm/exports.native.mjs.map +1 -0
  74. package/dist/esm/extractor/accessSafe.native.mjs +12 -0
  75. package/dist/esm/extractor/accessSafe.native.mjs.map +1 -0
  76. package/dist/esm/extractor/babelParse.native.js +3 -3
  77. package/dist/esm/extractor/babelParse.native.js.map +1 -1
  78. package/dist/esm/extractor/babelParse.native.mjs +19 -0
  79. package/dist/esm/extractor/babelParse.native.mjs.map +1 -0
  80. package/dist/esm/extractor/buildClassName.native.js +5 -5
  81. package/dist/esm/extractor/buildClassName.native.js.map +1 -1
  82. package/dist/esm/extractor/buildClassName.native.mjs +30 -0
  83. package/dist/esm/extractor/buildClassName.native.mjs.map +1 -0
  84. package/dist/esm/extractor/bundle.native.js +34 -258
  85. package/dist/esm/extractor/bundle.native.js.map +2 -2
  86. package/dist/esm/extractor/bundle.native.mjs +132 -0
  87. package/dist/esm/extractor/bundle.native.mjs.map +1 -0
  88. package/dist/esm/extractor/bundleConfig.native.js +154 -429
  89. package/dist/esm/extractor/bundleConfig.native.js.map +2 -2
  90. package/dist/esm/extractor/bundleConfig.native.mjs +322 -0
  91. package/dist/esm/extractor/bundleConfig.native.mjs.map +1 -0
  92. package/dist/esm/extractor/createEvaluator.native.js +2 -2
  93. package/dist/esm/extractor/createEvaluator.native.js.map +1 -1
  94. package/dist/esm/extractor/createEvaluator.native.mjs +38 -0
  95. package/dist/esm/extractor/createEvaluator.native.mjs.map +1 -0
  96. package/dist/esm/extractor/createExtractor.native.js +498 -739
  97. package/dist/esm/extractor/createExtractor.native.js.map +2 -2
  98. package/dist/esm/extractor/createExtractor.native.mjs +1140 -0
  99. package/dist/esm/extractor/createExtractor.native.mjs.map +1 -0
  100. package/dist/esm/extractor/createLogger.native.js +2 -2
  101. package/dist/esm/extractor/createLogger.native.js.map +1 -1
  102. package/dist/esm/extractor/createLogger.native.mjs +25 -0
  103. package/dist/esm/extractor/createLogger.native.mjs.map +1 -0
  104. package/dist/esm/extractor/ensureImportingConcat.native.mjs +20 -0
  105. package/dist/esm/extractor/ensureImportingConcat.native.mjs.map +1 -0
  106. package/dist/esm/extractor/esbuildAliasPlugin.native.js +3 -3
  107. package/dist/esm/extractor/esbuildAliasPlugin.native.js.map +1 -1
  108. package/dist/esm/extractor/esbuildAliasPlugin.native.mjs +29 -0
  109. package/dist/esm/extractor/esbuildAliasPlugin.native.mjs.map +1 -0
  110. package/dist/esm/extractor/evaluateAstNode.native.mjs +49 -0
  111. package/dist/esm/extractor/evaluateAstNode.native.mjs.map +1 -0
  112. package/dist/esm/extractor/extractHelpers.native.js +18 -72
  113. package/dist/esm/extractor/extractHelpers.native.js.map +2 -2
  114. package/dist/esm/extractor/extractHelpers.native.mjs +122 -0
  115. package/dist/esm/extractor/extractHelpers.native.mjs.map +1 -0
  116. package/dist/esm/extractor/extractMediaStyle.native.js +21 -73
  117. package/dist/esm/extractor/extractMediaStyle.native.js.map +1 -1
  118. package/dist/esm/extractor/extractMediaStyle.native.mjs +125 -0
  119. package/dist/esm/extractor/extractMediaStyle.native.mjs.map +1 -0
  120. package/dist/esm/extractor/extractToClassNames.native.js +242 -421
  121. package/dist/esm/extractor/extractToClassNames.native.js.map +2 -2
  122. package/dist/esm/extractor/extractToClassNames.native.mjs +315 -0
  123. package/dist/esm/extractor/extractToClassNames.native.mjs.map +1 -0
  124. package/dist/esm/extractor/extractToNative.native.js +31 -93
  125. package/dist/esm/extractor/extractToNative.native.js.map +2 -2
  126. package/dist/esm/extractor/extractToNative.native.mjs +268 -0
  127. package/dist/esm/extractor/extractToNative.native.mjs.map +1 -0
  128. package/dist/esm/extractor/findTopmostFunction.native.mjs +11 -0
  129. package/dist/esm/extractor/findTopmostFunction.native.mjs.map +1 -0
  130. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +43 -364
  131. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +2 -2
  132. package/dist/esm/extractor/generateTamaguiStudioConfig.native.mjs +139 -0
  133. package/dist/esm/extractor/generateTamaguiStudioConfig.native.mjs.map +1 -0
  134. package/dist/esm/extractor/generatedUid.native.js +1 -5
  135. package/dist/esm/extractor/generatedUid.native.js.map +1 -1
  136. package/dist/esm/extractor/generatedUid.native.mjs +13 -0
  137. package/dist/esm/extractor/generatedUid.native.mjs.map +1 -0
  138. package/dist/esm/extractor/getPrefixLogs.native.js +1 -1
  139. package/dist/esm/extractor/getPrefixLogs.native.js.map +1 -1
  140. package/dist/esm/extractor/getPrefixLogs.native.mjs +6 -0
  141. package/dist/esm/extractor/getPrefixLogs.native.mjs.map +1 -0
  142. package/dist/esm/extractor/getPropValueFromAttributes.native.js +2 -1
  143. package/dist/esm/extractor/getPropValueFromAttributes.native.js.map +1 -1
  144. package/dist/esm/extractor/getPropValueFromAttributes.native.mjs +35 -0
  145. package/dist/esm/extractor/getPropValueFromAttributes.native.mjs.map +1 -0
  146. package/dist/esm/extractor/getSourceModule.native.mjs +50 -0
  147. package/dist/esm/extractor/getSourceModule.native.mjs.map +1 -0
  148. package/dist/esm/extractor/getStaticBindingsForScope.native.js +91 -292
  149. package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +2 -2
  150. package/dist/esm/extractor/getStaticBindingsForScope.native.mjs +159 -0
  151. package/dist/esm/extractor/getStaticBindingsForScope.native.mjs.map +1 -0
  152. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.mjs +6 -0
  153. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.mjs.map +1 -0
  154. package/dist/esm/extractor/hoistClassNames.native.js +1 -1
  155. package/dist/esm/extractor/hoistClassNames.native.js.map +1 -1
  156. package/dist/esm/extractor/hoistClassNames.native.mjs +30 -0
  157. package/dist/esm/extractor/hoistClassNames.native.mjs.map +1 -0
  158. package/dist/esm/extractor/literalToAst.native.js +15 -69
  159. package/dist/esm/extractor/literalToAst.native.js.map +1 -1
  160. package/dist/esm/extractor/literalToAst.native.mjs +55 -0
  161. package/dist/esm/extractor/literalToAst.native.mjs.map +1 -0
  162. package/dist/esm/extractor/loadFile.native.js +5 -8
  163. package/dist/esm/extractor/loadFile.native.js.map +1 -1
  164. package/dist/esm/extractor/loadFile.native.mjs +20 -0
  165. package/dist/esm/extractor/loadFile.native.mjs.map +1 -0
  166. package/dist/esm/extractor/loadTamagui.native.js +155 -573
  167. package/dist/esm/extractor/loadTamagui.native.js.map +2 -2
  168. package/dist/esm/extractor/loadTamagui.native.mjs +284 -0
  169. package/dist/esm/extractor/loadTamagui.native.mjs.map +1 -0
  170. package/dist/esm/extractor/logLines.native.js +1 -1
  171. package/dist/esm/extractor/logLines.native.js.map +1 -1
  172. package/dist/esm/extractor/logLines.native.mjs +31 -0
  173. package/dist/esm/extractor/logLines.native.mjs.map +1 -0
  174. package/dist/esm/extractor/normalizeTernaries.native.js +4 -59
  175. package/dist/esm/extractor/normalizeTernaries.native.js.map +1 -1
  176. package/dist/esm/extractor/normalizeTernaries.native.mjs +38 -0
  177. package/dist/esm/extractor/normalizeTernaries.native.mjs.map +1 -0
  178. package/dist/esm/extractor/propsToFontFamilyCache.native.js +1 -1
  179. package/dist/esm/extractor/propsToFontFamilyCache.native.js.map +1 -1
  180. package/dist/esm/extractor/propsToFontFamilyCache.native.mjs +13 -0
  181. package/dist/esm/extractor/propsToFontFamilyCache.native.mjs.map +1 -0
  182. package/dist/esm/extractor/removeUnusedHooks.native.js +2 -2
  183. package/dist/esm/extractor/removeUnusedHooks.native.js.map +1 -1
  184. package/dist/esm/extractor/removeUnusedHooks.native.mjs +83 -0
  185. package/dist/esm/extractor/removeUnusedHooks.native.mjs.map +1 -0
  186. package/dist/esm/extractor/timer.native.js +2 -2
  187. package/dist/esm/extractor/timer.native.js.map +1 -1
  188. package/dist/esm/extractor/timer.native.mjs +22 -0
  189. package/dist/esm/extractor/timer.native.mjs.map +1 -0
  190. package/dist/esm/extractor/validHTMLAttributes.native.mjs +50 -0
  191. package/dist/esm/extractor/validHTMLAttributes.native.mjs.map +1 -0
  192. package/dist/esm/extractor/watchTamaguiConfig.native.js +25 -166
  193. package/dist/esm/extractor/watchTamaguiConfig.native.js.map +2 -2
  194. package/dist/esm/extractor/watchTamaguiConfig.native.mjs +33 -0
  195. package/dist/esm/extractor/watchTamaguiConfig.native.mjs.map +1 -0
  196. package/dist/esm/getPragmaOptions.native.js +1 -1
  197. package/dist/esm/getPragmaOptions.native.js.map +1 -1
  198. package/dist/esm/getPragmaOptions.native.mjs +51 -0
  199. package/dist/esm/getPragmaOptions.native.mjs.map +1 -0
  200. package/dist/esm/helpers/memoize.native.mjs +15 -0
  201. package/dist/esm/helpers/memoize.native.mjs.map +1 -0
  202. package/dist/esm/helpers/requireTamaguiCore.native.js.map +1 -1
  203. package/dist/esm/helpers/requireTamaguiCore.native.mjs +13 -0
  204. package/dist/esm/helpers/requireTamaguiCore.native.mjs.map +1 -0
  205. package/dist/esm/index.native.mjs +5 -0
  206. package/dist/esm/index.native.mjs.map +1 -0
  207. package/dist/esm/minifyCSS.native.js +1 -1
  208. package/dist/esm/minifyCSS.native.js.map +2 -2
  209. package/dist/esm/minifyCSS.native.mjs +16 -0
  210. package/dist/esm/minifyCSS.native.mjs.map +1 -0
  211. package/dist/esm/registerRequire.native.js +17 -35
  212. package/dist/esm/registerRequire.native.js.map +1 -1
  213. package/dist/esm/registerRequire.native.mjs +86 -0
  214. package/dist/esm/registerRequire.native.mjs.map +1 -0
  215. package/dist/esm/server.native.js +21 -163
  216. package/dist/esm/server.native.js.map +2 -2
  217. package/dist/esm/server.native.mjs +44 -0
  218. package/dist/esm/server.native.mjs.map +1 -0
  219. package/dist/esm/setup.native.mjs +2 -0
  220. package/dist/esm/setup.native.mjs.map +1 -0
  221. package/dist/esm/types.native.mjs +2 -0
  222. package/dist/esm/types.native.mjs.map +1 -0
  223. package/package.json +14 -14
@@ -32,373 +32,57 @@ __export(loadTamagui_exports, {
32
32
  resolveWebOrNativeSpecificEntry: () => resolveWebOrNativeSpecificEntry
33
33
  });
34
34
  module.exports = __toCommonJS(loadTamagui_exports);
35
- var import_node_fs = require("node:fs"), import_node_path = require("node:path"), import_cli_color = require("@tamagui/cli-color"), import_esbuild = __toESM(require("esbuild")), fsExtra = __toESM(require("fs-extra")), import_promises = require("node:fs/promises"), import_constants = require("../constants"), import_requireTamaguiCore = require("../helpers/requireTamaguiCore"), import_minifyCSS = require("../minifyCSS"), import_registerRequire = require("../registerRequire"), import_bundleConfig = require("./bundleConfig"), import_generateTamaguiStudioConfig = require("./generateTamaguiStudioConfig"), import_getTamaguiConfigPathFromOptionsConfig = require("./getTamaguiConfigPathFromOptionsConfig");
36
- function _array_like_to_array(arr, len) {
37
- (len == null || len > arr.length) && (len = arr.length);
38
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
39
- return arr2;
40
- }
41
- function _array_without_holes(arr) {
42
- if (Array.isArray(arr)) return _array_like_to_array(arr);
43
- }
44
- function asyncGeneratorStep(gen, resolve2, reject, _next, _throw, key, arg) {
45
- try {
46
- var info = gen[key](arg), value = info.value;
47
- } catch (error) {
48
- reject(error);
49
- return;
50
- }
51
- info.done ? resolve2(value) : Promise.resolve(value).then(_next, _throw);
52
- }
53
- function _async_to_generator(fn) {
54
- return function() {
55
- var self = this, args = arguments;
56
- return new Promise(function(resolve2, reject) {
57
- var gen = fn.apply(self, args);
58
- function _next(value) {
59
- asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "next", value);
60
- }
61
- function _throw(err) {
62
- asyncGeneratorStep(gen, resolve2, reject, _next, _throw, "throw", err);
63
- }
64
- _next(void 0);
65
- });
66
- };
67
- }
68
- function _define_property(obj, key, value) {
69
- return key in obj ? Object.defineProperty(obj, key, {
70
- value,
71
- enumerable: !0,
72
- configurable: !0,
73
- writable: !0
74
- }) : obj[key] = value, obj;
75
- }
76
- function _instanceof(left, right) {
77
- return right != null && typeof Symbol < "u" && right[Symbol.hasInstance] ? !!right[Symbol.hasInstance](left) : left instanceof right;
78
- }
79
- function _iterable_to_array(iter) {
80
- if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
81
- }
82
- function _non_iterable_spread() {
83
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
84
- }
85
- function _object_spread(target) {
86
- for (var i = 1; i < arguments.length; i++) {
87
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
88
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
89
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
90
- }))), ownKeys2.forEach(function(key) {
91
- _define_property(target, key, source[key]);
92
- });
93
- }
94
- return target;
95
- }
96
- function ownKeys(object, enumerableOnly) {
97
- var keys = Object.keys(object);
98
- if (Object.getOwnPropertySymbols) {
99
- var symbols = Object.getOwnPropertySymbols(object);
100
- enumerableOnly && (symbols = symbols.filter(function(sym) {
101
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
102
- })), keys.push.apply(keys, symbols);
103
- }
104
- return keys;
105
- }
106
- function _object_spread_props(target, source) {
107
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
108
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
109
- }), target;
110
- }
111
- function _object_without_properties(source, excluded) {
112
- if (source == null) return {};
113
- var target = _object_without_properties_loose(source, excluded), key, i;
114
- if (Object.getOwnPropertySymbols) {
115
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
116
- for (i = 0; i < sourceSymbolKeys.length; i++)
117
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
118
- }
119
- return target;
120
- }
121
- function _object_without_properties_loose(source, excluded) {
122
- if (source == null) return {};
123
- var target = {}, sourceKeys = Object.keys(source), key, i;
124
- for (i = 0; i < sourceKeys.length; i++)
125
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
126
- return target;
127
- }
128
- function _to_consumable_array(arr) {
129
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
130
- }
131
- function _unsupported_iterable_to_array(o, minLen) {
132
- if (o) {
133
- if (typeof o == "string") return _array_like_to_array(o, minLen);
134
- var n = Object.prototype.toString.call(o).slice(8, -1);
135
- if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
136
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
137
- }
138
- }
139
- function _ts_generator(thisArg, body) {
140
- var f, y, t, g, _ = {
141
- label: 0,
142
- sent: function() {
143
- if (t[0] & 1) throw t[1];
144
- return t[1];
145
- },
146
- trys: [],
147
- ops: []
148
- };
149
- return g = {
150
- next: verb(0),
151
- throw: verb(1),
152
- return: verb(2)
153
- }, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
154
- return this;
155
- }), g;
156
- function verb(n) {
157
- return function(v) {
158
- return step([
159
- n,
160
- v
161
- ]);
162
- };
163
- }
164
- function step(op) {
165
- if (f) throw new TypeError("Generator is already executing.");
166
- for (; _; ) try {
167
- 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) return t;
168
- switch (y = 0, t && (op = [
169
- op[0] & 2,
170
- t.value
171
- ]), op[0]) {
172
- case 0:
173
- case 1:
174
- t = op;
175
- break;
176
- case 4:
177
- return _.label++, {
178
- value: op[1],
179
- done: !1
180
- };
181
- case 5:
182
- _.label++, y = op[1], op = [
183
- 0
184
- ];
185
- continue;
186
- case 7:
187
- op = _.ops.pop(), _.trys.pop();
188
- continue;
189
- default:
190
- if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
191
- _ = 0;
192
- continue;
193
- }
194
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
195
- _.label = op[1];
196
- break;
197
- }
198
- if (op[0] === 6 && _.label < t[1]) {
199
- _.label = t[1], t = op;
200
- break;
201
- }
202
- if (t && _.label < t[2]) {
203
- _.label = t[2], _.ops.push(op);
204
- break;
205
- }
206
- t[2] && _.ops.pop(), _.trys.pop();
207
- continue;
208
- }
209
- op = body.call(thisArg, _);
210
- } catch (e) {
211
- op = [
212
- 6,
213
- e
214
- ], y = 0;
215
- } finally {
216
- f = t = 0;
217
- }
218
- if (op[0] & 5) throw op[1];
219
- return {
220
- value: op[0] ? op[1] : void 0,
221
- done: !0
222
- };
223
- }
224
- }
225
- var getFilledOptions = function(propsIn) {
226
- return _object_spread({
35
+ var import_node_fs = require("node:fs"), import_node_path = require("node:path"), import_cli_color = require("@tamagui/cli-color"), import_esbuild = __toESM(require("esbuild")), fsExtra = __toESM(require("fs-extra")), import_promises = require("node:fs/promises"), import_constants = require("../constants"), import_requireTamaguiCore = require("../helpers/requireTamaguiCore"), import_minifyCSS = require("../minifyCSS"), import_registerRequire = require("../registerRequire"), import_bundleConfig = require("./bundleConfig"), import_generateTamaguiStudioConfig = require("./generateTamaguiStudioConfig"), import_getTamaguiConfigPathFromOptionsConfig = require("./getTamaguiConfigPathFromOptionsConfig"), getFilledOptions = function(propsIn) {
36
+ return {
227
37
  // defaults
228
38
  platform: "native",
229
39
  config: "tamagui.config.ts",
230
40
  components: [
231
41
  "tamagui"
232
- ]
233
- }, propsIn);
42
+ ],
43
+ ...propsIn
44
+ };
234
45
  };
235
- function loadTamagui(propsIn) {
236
- return _loadTamagui.apply(this, arguments);
237
- }
238
- function _loadTamagui() {
239
- return _loadTamagui = _async_to_generator(function(propsIn) {
240
- var props, bundleInfo, createTamagui, config, outputCSS, flush, cssOut, css, e;
241
- return _ts_generator(this, function(_state) {
242
- switch (_state.label) {
243
- case 0:
244
- return props = getFilledOptions(propsIn), [
245
- 4,
246
- (0, import_bundleConfig.getBundledConfig)(props)
247
- ];
248
- case 1:
249
- return bundleInfo = _state.sent(), bundleInfo ? [
250
- 4,
251
- generateThemesAndLog(props, !0)
252
- ] : (console.warn("No bundled config generated, maybe an error in bundling. Set DEBUG=tamagui and re-run to get logs."), [
253
- 2,
254
- null
255
- ]);
256
- case 2:
257
- if (_state.sent(), !(0, import_bundleConfig.hasBundledConfigChanged)())
258
- return [
259
- 2,
260
- bundleInfo
261
- ];
262
- if (!// this depends on the config so run it after
263
- bundleInfo) return [
264
- 3,
265
- 10
266
- ];
267
- if (createTamagui = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web").createTamagui, config = createTamagui(bundleInfo.tamaguiConfig), outputCSS = props.outputCSS, !(outputCSS && props.platform === "web")) return [
268
- 3,
269
- 10
270
- ];
271
- flush = /* @__PURE__ */ function() {
272
- var _ref = _async_to_generator(function() {
273
- return _ts_generator(this, function(_state2) {
274
- switch (_state2.label) {
275
- case 0:
276
- return (0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, " \u27A1 [tamagui] output css: ".concat(outputCSS, `
277
- `)), [
278
- 4,
279
- fsExtra.writeFile(outputCSS, css)
280
- ];
281
- case 1:
282
- return _state2.sent(), [
283
- 2
284
- ];
285
- }
286
- });
287
- });
288
- return function() {
289
- return _ref.apply(this, arguments);
290
- };
291
- }(), cssOut = config.getCSS(), css = props.disableMinifyCSS === !1 ? (0, import_minifyCSS.minifyCSS)(cssOut).code : cssOut, _state.label = 3;
292
- case 3:
293
- return _state.trys.push([
294
- 3,
295
- 8,
296
- ,
297
- 10
298
- ]), [
299
- 4,
300
- (0, import_promises.readFile)(outputCSS, "utf8")
301
- ];
302
- case 4:
303
- return _state.sent() !== css ? [
304
- 3,
305
- 5
306
- ] : [
307
- 3,
308
- 7
309
- ];
310
- case 5:
311
- return [
312
- 4,
313
- flush()
314
- ];
315
- case 6:
316
- _state.sent(), _state.label = 7;
317
- case 7:
318
- return [
319
- 3,
320
- 10
321
- ];
322
- case 8:
323
- return e = _state.sent(), [
324
- 4,
325
- flush()
326
- ];
327
- case 9:
328
- return _state.sent(), [
329
- 3,
330
- 10
331
- ];
332
- case 10:
333
- return process.env.NODE_ENV !== "development" ? [
334
- 3,
335
- 12
336
- ] : [
337
- 4,
338
- (0, import_generateTamaguiStudioConfig.generateTamaguiStudioConfig)(props, bundleInfo)
339
- ];
340
- case 11:
341
- _state.sent(), _state.label = 12;
342
- case 12:
343
- return [
344
- 2,
345
- bundleInfo
346
- ];
46
+ async function loadTamagui(propsIn) {
47
+ var props = getFilledOptions(propsIn), bundleInfo = await (0, import_bundleConfig.getBundledConfig)(props);
48
+ if (!bundleInfo)
49
+ return console.warn("No bundled config generated, maybe an error in bundling. Set DEBUG=tamagui and re-run to get logs."), null;
50
+ if (await generateThemesAndLog(props, !0), !(0, import_bundleConfig.hasBundledConfigChanged)())
51
+ return bundleInfo;
52
+ if (bundleInfo) {
53
+ var { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web"), config = createTamagui(bundleInfo.tamaguiConfig), { outputCSS } = props;
54
+ if (outputCSS && props.platform === "web") {
55
+ var flush = async function() {
56
+ (0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, ` \u27A1 [tamagui] output css: ${outputCSS}
57
+ `), await fsExtra.writeFile(outputCSS, css);
58
+ }, cssOut = config.getCSS(), css = props.disableMinifyCSS === !1 ? (0, import_minifyCSS.minifyCSS)(cssOut).code : cssOut;
59
+ try {
60
+ await (0, import_promises.readFile)(outputCSS, "utf8") === css || await flush();
61
+ } catch {
62
+ await flush();
347
63
  }
348
- });
349
- }), _loadTamagui.apply(this, arguments);
64
+ }
65
+ }
66
+ return process.env.NODE_ENV === "development" && await (0, import_generateTamaguiStudioConfig.generateTamaguiStudioConfig)(props, bundleInfo), bundleInfo;
350
67
  }
351
- var waiting = !1, hasLoggedOnce = !1, generateThemesAndLog = /* @__PURE__ */ function() {
352
- var _ref = _async_to_generator(function(options) {
353
- var force, didGenerate, whitespaceBefore, _arguments = arguments;
354
- return _ts_generator(this, function(_state) {
355
- switch (_state.label) {
356
- case 0:
357
- if (force = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : !1, waiting) return [
358
- 2
359
- ];
360
- if (!options.themeBuilder) return [
361
- 2
362
- ];
363
- _state.label = 1;
364
- case 1:
365
- return _state.trys.push([
366
- 1,
367
- ,
368
- 4,
369
- 5
370
- ]), waiting = !0, [
371
- 4,
372
- new Promise(function(res) {
373
- return setTimeout(res, 30);
374
- })
375
- ];
376
- case 2:
377
- return _state.sent(), [
378
- 4,
379
- (0, import_generateTamaguiStudioConfig.generateTamaguiThemes)(options, force)
380
- ];
381
- case 3:
382
- return didGenerate = _state.sent(), !hasLoggedOnce && didGenerate && (hasLoggedOnce = !0, whitespaceBefore = " ", (0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, `
383
- `.concat(whitespaceBefore, "\u27A1 [tamagui] generated themes: ").concat((0, import_node_path.relative)(process.cwd(), options.themeBuilder.output)))), [
384
- 3,
385
- 5
386
- ];
387
- case 4:
388
- return waiting = !1, [
389
- 7
390
- ];
391
- case 5:
392
- return [
393
- 2
394
- ];
68
+ var waiting = !1, hasLoggedOnce = !1, generateThemesAndLog = async function(options) {
69
+ var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
70
+ if (!waiting && options.themeBuilder)
71
+ try {
72
+ waiting = !0, await new Promise(function(res) {
73
+ return setTimeout(res, 30);
74
+ });
75
+ var didGenerate = await (0, import_generateTamaguiStudioConfig.generateTamaguiThemes)(options, force);
76
+ if (!hasLoggedOnce && didGenerate) {
77
+ hasLoggedOnce = !0;
78
+ var whitespaceBefore = " ";
79
+ (0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, `
80
+ ${whitespaceBefore}\u27A1 [tamagui] generated themes: ${(0, import_node_path.relative)(process.cwd(), options.themeBuilder.output)}`);
395
81
  }
396
- });
397
- });
398
- return function(options) {
399
- return _ref.apply(this, arguments);
400
- };
401
- }(), last = {}, lastVersion = {};
82
+ } finally {
83
+ waiting = !1;
84
+ }
85
+ }, last = {}, lastVersion = {};
402
86
  function loadTamaguiBuildConfigSync(tamaguiOptions) {
403
87
  var _tamaguiOptions_buildFile, buildFilePath = (_tamaguiOptions_buildFile = tamaguiOptions == null ? void 0 : tamaguiOptions.buildFile) !== null && _tamaguiOptions_buildFile !== void 0 ? _tamaguiOptions_buildFile : "tamagui.build.ts";
404
88
  if (fsExtra.existsSync(buildFilePath)) {
@@ -406,34 +90,35 @@ function loadTamaguiBuildConfigSync(tamaguiOptions) {
406
90
  try {
407
91
  var out = require(buildFilePath).default;
408
92
  if (!out)
409
- throw new Error("No default export found in ".concat(buildFilePath, ": ").concat(out));
410
- tamaguiOptions = _object_spread({}, tamaguiOptions, out);
93
+ throw new Error(`No default export found in ${buildFilePath}: ${out}`);
94
+ tamaguiOptions = {
95
+ ...tamaguiOptions,
96
+ ...out
97
+ };
411
98
  } finally {
412
99
  registered.unregister();
413
100
  }
414
101
  }
415
102
  if (!tamaguiOptions)
416
103
  throw new Error("No tamagui build options found either via input props or at tamagui.build.ts");
417
- return _object_spread({
104
+ return {
418
105
  config: "tamagui.config.ts",
419
106
  components: [
420
107
  "@tamagui/core"
421
- ]
422
- }, tamaguiOptions);
108
+ ],
109
+ ...tamaguiOptions
110
+ };
423
111
  }
424
- function loadTamaguiSync(_param) {
425
- var forceExports = _param.forceExports, cacheKey = _param.cacheKey, propsIn = _object_without_properties(_param, [
426
- "forceExports",
427
- "cacheKey"
428
- ]), key = JSON.stringify(propsIn);
112
+ function loadTamaguiSync(param) {
113
+ var { forceExports, cacheKey, ...propsIn } = param, key = JSON.stringify(propsIn);
429
114
  if (last[key] && !(0, import_bundleConfig.hasBundledConfigChanged)() && (!lastVersion[key] || lastVersion[key] === cacheKey))
430
115
  return last[key];
431
116
  lastVersion[key] = cacheKey || "";
432
117
  var props = getFilledOptions(propsIn);
433
118
  process.env.IS_STATIC = "is_static", process.env.TAMAGUI_IS_SERVER = "true";
434
- var unregister = (0, import_registerRequire.registerRequire)(props.platform || "web", {
119
+ var { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
435
120
  proxyWormImports: !!forceExports
436
- }).unregister;
121
+ });
437
122
  try {
438
123
  var devValueOG = globalThis.__DEV__;
439
124
  globalThis.__DEV__ = process.env.NODE_ENV === "development";
@@ -443,12 +128,12 @@ function loadTamaguiSync(_param) {
443
128
  var configPath = (0, import_getTamaguiConfigPathFromOptionsConfig.getTamaguiConfigPathFromOptionsConfig)(propsIn.config), exp = require(configPath);
444
129
  if (tamaguiConfig = exp.default || exp.config || exp, !tamaguiConfig || !tamaguiConfig.parsed) {
445
130
  var confPath = require.resolve(configPath);
446
- throw new Error("Can't find valid config in ".concat(confPath, `:
131
+ throw new Error(`Can't find valid config in ${confPath}:
447
132
 
448
- Be sure you "export default" or "export const config" the config.`));
133
+ Be sure you "export default" or "export const config" the config.`);
449
134
  }
450
135
  if (tamaguiConfig) {
451
- var createTamagui = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web").createTamagui;
136
+ var { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web");
452
137
  createTamagui(tamaguiConfig);
453
138
  }
454
139
  }
@@ -462,11 +147,11 @@ function loadTamaguiSync(_param) {
462
147
  nameToPaths: (0, import_registerRequire.getNameToPaths)()
463
148
  };
464
149
  if (tamaguiConfig) {
465
- var outputCSS = props.outputCSS;
150
+ var { outputCSS } = props;
466
151
  if (outputCSS) {
467
152
  var flush = function() {
468
- (0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, " \u27A1 [tamagui] output css: ".concat(outputCSS, `
469
- `)), (0, import_node_fs.writeFileSync)(outputCSS, css);
153
+ (0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, ` \u27A1 [tamagui] output css: ${outputCSS}
154
+ `), (0, import_node_fs.writeFileSync)(outputCSS, css);
470
155
  }, css = props.disableMinifyCSS === !1 ? (0, import_minifyCSS.minifyCSS)(tamaguiConfig.getCSS()).code : tamaguiConfig.getCSS();
471
156
  try {
472
157
  (0, import_node_fs.readFileSync)(outputCSS, "utf-8") === css || flush();
@@ -476,16 +161,17 @@ function loadTamaguiSync(_param) {
476
161
  }
477
162
  (0, import_generateTamaguiStudioConfig.generateTamaguiStudioConfigSync)(props, info);
478
163
  }
479
- return last[key] = _object_spread_props(_object_spread({}, info), {
164
+ return last[key] = {
165
+ ...info,
480
166
  cached: !0
481
- }), info;
167
+ }, info;
482
168
  } catch (err) {
483
- _instanceof(err, Error) ? !import_constants.SHOULD_DEBUG && !forceExports ? (console.warn("Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config"), console.info(`
169
+ err instanceof Error ? !import_constants.SHOULD_DEBUG && !forceExports ? (console.warn("Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config"), console.info(`
484
170
 
485
- `.concat(err.message, `
171
+ ${err.message}
486
172
 
487
- `))) : import_constants.SHOULD_DEBUG && console.error(err) : console.error("Error loading tamagui.config.ts", err);
488
- var createTamagui1 = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web").createTamagui, getDefaultTamaguiConfig = require("@tamagui/config-default").getDefaultTamaguiConfig;
173
+ `)) : import_constants.SHOULD_DEBUG && console.error(err) : console.error("Error loading tamagui.config.ts", err);
174
+ var { createTamagui: createTamagui1 } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web"), { getDefaultTamaguiConfig } = require("@tamagui/config-default");
489
175
  return {
490
176
  components: [],
491
177
  tamaguiConfig: createTamagui1(getDefaultTamaguiConfig()),
@@ -496,80 +182,35 @@ function loadTamaguiSync(_param) {
496
182
  unregister();
497
183
  }
498
184
  }
499
- function getOptions() {
500
- return _getOptions.apply(this, arguments);
501
- }
502
- function _getOptions() {
503
- return _getOptions = _async_to_generator(function() {
504
- var _ref, _ref_root, root, _ref_tsconfigPath, tsconfigPath, tamaguiOptions, host, debug, dotDir, pkgJson, err, _tamaguiOptions_config, _tmp, _tmp1, _tmp2, _tmp3, _arguments = arguments;
505
- return _ts_generator(this, function(_state) {
506
- switch (_state.label) {
507
- case 0:
508
- _ref = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : {}, _ref_root = _ref.root, root = _ref_root === void 0 ? process.cwd() : _ref_root, _ref_tsconfigPath = _ref.tsconfigPath, tsconfigPath = _ref_tsconfigPath === void 0 ? "tsconfig.json" : _ref_tsconfigPath, tamaguiOptions = _ref.tamaguiOptions, host = _ref.host, debug = _ref.debug, dotDir = (0, import_node_path.join)(root, ".tamagui"), pkgJson = {}, _state.label = 1;
509
- case 1:
510
- return _state.trys.push([
511
- 1,
512
- 3,
513
- ,
514
- 4
515
- ]), [
516
- 4,
517
- fsExtra.readJSON((0, import_node_path.join)(root, "package.json"))
518
- ];
519
- case 2:
520
- return pkgJson = _state.sent(), [
521
- 3,
522
- 4
523
- ];
524
- case 3:
525
- return err = _state.sent(), [
526
- 3,
527
- 4
528
- ];
529
- case 4:
530
- return _tmp = {
531
- mode: process.env.NODE_ENV === "production" ? "production" : "development",
532
- root,
533
- host: host || "127.0.0.1",
534
- pkgJson,
535
- debug,
536
- tsconfigPath
537
- }, _tmp1 = [
538
- _object_spread({
539
- platform: "native",
540
- components: [
541
- "tamagui"
542
- ]
543
- }, tamaguiOptions)
544
- ], _tmp2 = {}, (_tamaguiOptions_config = tamaguiOptions == null ? void 0 : tamaguiOptions.config) !== null && _tamaguiOptions_config !== void 0 ? (_tmp3 = _tamaguiOptions_config, [
545
- 3,
546
- 7
547
- ]) : [
548
- 3,
549
- 5
550
- ];
551
- case 5:
552
- return [
553
- 4,
554
- getDefaultTamaguiConfigPath(root, tamaguiOptions == null ? void 0 : tamaguiOptions.config)
555
- ];
556
- case 6:
557
- _tmp3 = _state.sent(), _state.label = 7;
558
- case 7:
559
- return [
560
- 2,
561
- (_tmp.tamaguiOptions = _object_spread_props.apply(void 0, _tmp1.concat([
562
- (_tmp2.config = _tmp3, _tmp2)
563
- ])), _tmp.paths = {
564
- root,
565
- dotDir,
566
- conf: (0, import_node_path.join)(dotDir, "tamagui.config.json"),
567
- types: (0, import_node_path.join)(dotDir, "types.json")
568
- }, _tmp)
569
- ];
570
- }
571
- });
572
- }), _getOptions.apply(this, arguments);
185
+ async function getOptions() {
186
+ var { root = process.cwd(), tsconfigPath = "tsconfig.json", tamaguiOptions, host, debug } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, dotDir = (0, import_node_path.join)(root, ".tamagui"), pkgJson = {};
187
+ try {
188
+ pkgJson = await fsExtra.readJSON((0, import_node_path.join)(root, "package.json"));
189
+ } catch {
190
+ }
191
+ var _tamaguiOptions_config;
192
+ return {
193
+ mode: process.env.NODE_ENV === "production" ? "production" : "development",
194
+ root,
195
+ host: host || "127.0.0.1",
196
+ pkgJson,
197
+ debug,
198
+ tsconfigPath,
199
+ tamaguiOptions: {
200
+ platform: "native",
201
+ components: [
202
+ "tamagui"
203
+ ],
204
+ ...tamaguiOptions,
205
+ config: (_tamaguiOptions_config = tamaguiOptions == null ? void 0 : tamaguiOptions.config) !== null && _tamaguiOptions_config !== void 0 ? _tamaguiOptions_config : await getDefaultTamaguiConfigPath(root, tamaguiOptions == null ? void 0 : tamaguiOptions.config)
206
+ },
207
+ paths: {
208
+ root,
209
+ dotDir,
210
+ conf: (0, import_node_path.join)(dotDir, "tamagui.config.json"),
211
+ types: (0, import_node_path.join)(dotDir, "types.json")
212
+ }
213
+ };
573
214
  }
574
215
  function resolveWebOrNativeSpecificEntry(entry) {
575
216
  var workspaceRoot = (0, import_node_path.resolve)(), resolved = require.resolve(entry, {
@@ -583,126 +224,66 @@ var defaultPaths = [
583
224
  "tamagui.config.ts",
584
225
  (0, import_node_path.join)("src", "tamagui.config.ts")
585
226
  ], hasWarnedOnce = !1;
586
- function getDefaultTamaguiConfigPath(root, configPath) {
587
- return _getDefaultTamaguiConfigPath.apply(this, arguments);
588
- }
589
- function _getDefaultTamaguiConfigPath() {
590
- return _getDefaultTamaguiConfigPath = _async_to_generator(function(root, configPath) {
591
- var searchPaths, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, path, err;
592
- return _ts_generator(this, function(_state) {
593
- switch (_state.label) {
594
- case 0:
595
- searchPaths = _to_consumable_array(new Set([
596
- configPath
597
- ].concat(_to_consumable_array(defaultPaths)).filter(Boolean).map(function(p) {
598
- return (0, import_node_path.join)(root, p);
599
- }))), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0, _state.label = 1;
600
- case 1:
601
- _state.trys.push([
602
- 1,
603
- 6,
604
- 7,
605
- 8
606
- ]), _iterator = searchPaths[Symbol.iterator](), _state.label = 2;
607
- case 2:
608
- return (_iteratorNormalCompletion = (_step = _iterator.next()).done) ? [
609
- 3,
610
- 5
611
- ] : (path = _step.value, [
612
- 4,
613
- fsExtra.pathExists(path)
614
- ]);
615
- case 3:
616
- if (_state.sent())
617
- return [
618
- 2,
619
- path
620
- ];
621
- _state.label = 4;
622
- case 4:
623
- return _iteratorNormalCompletion = !0, [
624
- 3,
625
- 2
626
- ];
627
- case 5:
628
- return [
629
- 3,
630
- 8
631
- ];
632
- case 6:
633
- return err = _state.sent(), _didIteratorError = !0, _iteratorError = err, [
634
- 3,
635
- 8
636
- ];
637
- case 7:
638
- try {
639
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
640
- } finally {
641
- if (_didIteratorError)
642
- throw _iteratorError;
643
- }
644
- return [
645
- 7
646
- ];
647
- case 8:
648
- return hasWarnedOnce || (hasWarnedOnce = !0, console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration "`.concat(configPath, `":
649
- `).concat(searchPaths.join(`
650
- `), `
651
- `))), [
652
- 2
653
- ];
654
- }
655
- });
656
- }), _getDefaultTamaguiConfigPath.apply(this, arguments);
657
- }
658
- function esbuildWatchFiles(entry, onChanged) {
659
- return _esbuildWatchFiles.apply(this, arguments);
227
+ async function getDefaultTamaguiConfigPath(root, configPath) {
228
+ var searchPaths = [
229
+ ...new Set([
230
+ configPath,
231
+ ...defaultPaths
232
+ ].filter(Boolean).map(function(p) {
233
+ return (0, import_node_path.join)(root, p);
234
+ }))
235
+ ], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
236
+ try {
237
+ for (var _iterator = searchPaths[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
238
+ var path = _step.value;
239
+ if (await fsExtra.pathExists(path))
240
+ return path;
241
+ }
242
+ } catch (err) {
243
+ _didIteratorError = !0, _iteratorError = err;
244
+ } finally {
245
+ try {
246
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
247
+ } finally {
248
+ if (_didIteratorError)
249
+ throw _iteratorError;
250
+ }
251
+ }
252
+ hasWarnedOnce || (hasWarnedOnce = !0, console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration "${configPath}":
253
+ ${searchPaths.join(`
254
+ `)}
255
+ `));
660
256
  }
661
- function _esbuildWatchFiles() {
662
- return _esbuildWatchFiles = _async_to_generator(function(entry, onChanged) {
663
- var hasRunOnce, context;
664
- return _ts_generator(this, function(_state) {
665
- switch (_state.label) {
666
- case 0:
667
- return hasRunOnce = !1, [
668
- 4,
669
- import_esbuild.default.context({
670
- bundle: !0,
671
- entryPoints: [
672
- entry
673
- ],
674
- resolveExtensions: [
675
- ".ts",
676
- ".tsx",
677
- ".js",
678
- ".jsx",
679
- ".mjs"
680
- ],
681
- logLevel: "silent",
682
- write: !1,
683
- plugins: [
684
- {
685
- name: "on-rebuild",
686
- setup: function(param) {
687
- var onEnd = param.onEnd;
688
- onEnd(function() {
689
- hasRunOnce ? onChanged() : hasRunOnce = !0;
690
- });
691
- }
692
- }
693
- ]
694
- })
695
- ];
696
- case 1:
697
- return context = _state.sent(), context.watch(), [
698
- 2,
699
- function() {
700
- context.dispose();
701
- }
702
- ];
257
+ async function esbuildWatchFiles(entry, onChanged) {
258
+ var hasRunOnce = !1, context = await import_esbuild.default.context({
259
+ bundle: !0,
260
+ entryPoints: [
261
+ entry
262
+ ],
263
+ resolveExtensions: [
264
+ ".ts",
265
+ ".tsx",
266
+ ".js",
267
+ ".jsx",
268
+ ".mjs"
269
+ ],
270
+ logLevel: "silent",
271
+ write: !1,
272
+ plugins: [
273
+ {
274
+ name: "on-rebuild",
275
+ setup(param) {
276
+ var { onEnd } = param;
277
+ onEnd(function() {
278
+ hasRunOnce ? onChanged() : hasRunOnce = !0;
279
+ });
280
+ }
703
281
  }
704
- });
705
- }), _esbuildWatchFiles.apply(this, arguments);
282
+ ]
283
+ });
284
+ return context.watch(), function() {
285
+ context.dispose();
286
+ };
706
287
  }
707
288
  // Annotate the CommonJS export names for ESM import in node:
708
289
  0 && (module.exports = {