@tamagui/static 2.7.7 → 3.0.0-beta.1097.1

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 (335) hide show
  1. package/dist/cjs/check-dep-versions.cjs +354 -0
  2. package/dist/cjs/checkDeps.cjs +301 -0
  3. package/dist/cjs/compiler.cjs +349 -0
  4. package/dist/cjs/compilerHost.cjs +2287 -0
  5. package/dist/cjs/componentDiscovery.cjs +94 -0
  6. package/dist/cjs/constants.cjs +32 -0
  7. package/dist/cjs/domStructuralPass.cjs +121 -0
  8. package/dist/cjs/exports.cjs +44 -0
  9. package/dist/cjs/extractor/addLocalExports.cjs +63 -0
  10. package/dist/cjs/extractor/bundle.cjs +229 -0
  11. package/dist/cjs/extractor/bundleConfig.cjs +769 -0
  12. package/dist/cjs/extractor/concatClassName.cjs +120 -0
  13. package/dist/cjs/extractor/detectModuleFormat.cjs +53 -0
  14. package/dist/cjs/extractor/esbuildAliasPlugin.cjs +46 -0
  15. package/dist/cjs/extractor/esbuildTsconfigPaths.cjs +91 -0
  16. package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.cjs +42 -0
  17. package/dist/cjs/extractor/loadTamagui.cjs +394 -0
  18. package/dist/cjs/extractor/regenerateConfig.cjs +160 -0
  19. package/dist/cjs/extractor/watchTamaguiConfig.cjs +63 -0
  20. package/dist/cjs/getPragmaOptions.cjs +66 -0
  21. package/dist/cjs/helpers/memoize.cjs +41 -0
  22. package/dist/cjs/helpers/requireTamaguiCore.cjs +39 -0
  23. package/dist/cjs/index.cjs +33 -0
  24. package/dist/cjs/registerRequire.cjs +219 -0
  25. package/dist/cjs/server.cjs +65 -0
  26. package/dist/cjs/staticEvaluationIgnoredModules.cjs +85 -0
  27. package/dist/cjs/types.cjs +16 -0
  28. package/dist/cjs/zero/artifact.cjs +144 -0
  29. package/dist/cjs/zero/graph.cjs +208 -0
  30. package/dist/cjs/zero/identity.cjs +60 -0
  31. package/dist/cjs/zero/index.cjs +33 -0
  32. package/dist/cjs/zero/islands.cjs +235 -0
  33. package/dist/cjs/zero/options.cjs +162 -0
  34. package/dist/cjs/zero/ownership.cjs +78 -0
  35. package/dist/cjs/zero/theme.cjs +337 -0
  36. package/dist/cjs/zero/transform.cjs +207 -0
  37. package/dist/esm/check-dep-versions.mjs +329 -0
  38. package/dist/esm/check-dep-versions.mjs.map +1 -0
  39. package/dist/esm/checkDeps.mjs +279 -0
  40. package/dist/esm/checkDeps.mjs.map +1 -0
  41. package/dist/esm/compiler.mjs +319 -0
  42. package/dist/esm/compiler.mjs.map +1 -0
  43. package/dist/esm/compilerHost.mjs +2265 -0
  44. package/dist/esm/compilerHost.mjs.map +1 -0
  45. package/dist/esm/componentDiscovery.mjs +69 -0
  46. package/dist/esm/componentDiscovery.mjs.map +1 -0
  47. package/dist/esm/constants.mjs +7 -0
  48. package/dist/esm/constants.mjs.map +1 -0
  49. package/dist/esm/domStructuralPass.mjs +102 -0
  50. package/dist/esm/domStructuralPass.mjs.map +1 -0
  51. package/dist/esm/exports.mjs +29 -0
  52. package/dist/esm/extractor/addLocalExports.mjs +44 -0
  53. package/dist/esm/extractor/addLocalExports.mjs.map +1 -0
  54. package/dist/esm/extractor/bundle.mjs +199 -0
  55. package/dist/esm/extractor/bundle.mjs.map +1 -0
  56. package/dist/esm/extractor/bundleConfig.mjs +728 -0
  57. package/dist/esm/extractor/bundleConfig.mjs.map +1 -0
  58. package/dist/esm/extractor/concatClassName.mjs +100 -0
  59. package/dist/esm/extractor/concatClassName.mjs.map +1 -0
  60. package/dist/esm/extractor/detectModuleFormat.mjs +31 -0
  61. package/dist/esm/extractor/detectModuleFormat.mjs.map +1 -0
  62. package/dist/esm/extractor/esbuildAliasPlugin.mjs +26 -0
  63. package/dist/esm/extractor/esbuildAliasPlugin.mjs.map +1 -0
  64. package/dist/esm/extractor/esbuildTsconfigPaths.mjs +63 -0
  65. package/dist/esm/extractor/esbuildTsconfigPaths.mjs.map +1 -0
  66. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +23 -0
  67. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
  68. package/dist/esm/extractor/loadTamagui.mjs +357 -0
  69. package/dist/esm/extractor/loadTamagui.mjs.map +1 -0
  70. package/dist/esm/extractor/regenerateConfig.mjs +131 -0
  71. package/dist/esm/extractor/regenerateConfig.mjs.map +1 -0
  72. package/dist/esm/extractor/watchTamaguiConfig.mjs +43 -0
  73. package/dist/esm/extractor/watchTamaguiConfig.mjs.map +1 -0
  74. package/dist/esm/getPragmaOptions.mjs +46 -0
  75. package/dist/esm/getPragmaOptions.mjs.map +1 -0
  76. package/dist/esm/helpers/memoize.mjs +21 -0
  77. package/dist/esm/helpers/memoize.mjs.map +1 -0
  78. package/dist/esm/helpers/requireTamaguiCore.mjs +19 -0
  79. package/dist/esm/helpers/requireTamaguiCore.mjs.map +1 -0
  80. package/dist/esm/index.mjs +8 -0
  81. package/dist/esm/index.mjs.map +1 -0
  82. package/dist/esm/registerRequire.mjs +195 -0
  83. package/dist/esm/registerRequire.mjs.map +1 -0
  84. package/dist/esm/server.mjs +40 -0
  85. package/dist/esm/server.mjs.map +1 -0
  86. package/dist/esm/setup.mjs +0 -0
  87. package/dist/esm/staticEvaluationIgnoredModules.mjs +61 -0
  88. package/dist/esm/staticEvaluationIgnoredModules.mjs.map +1 -0
  89. package/dist/esm/types.mjs +0 -0
  90. package/dist/esm/zero/artifact.mjs +119 -0
  91. package/dist/esm/zero/artifact.mjs.map +1 -0
  92. package/dist/esm/zero/graph.mjs +170 -0
  93. package/dist/esm/zero/graph.mjs.map +1 -0
  94. package/dist/esm/zero/identity.mjs +36 -0
  95. package/dist/esm/zero/identity.mjs.map +1 -0
  96. package/dist/esm/zero/index.mjs +19 -0
  97. package/dist/esm/zero/islands.mjs +201 -0
  98. package/dist/esm/zero/islands.mjs.map +1 -0
  99. package/dist/esm/zero/options.mjs +129 -0
  100. package/dist/esm/zero/options.mjs.map +1 -0
  101. package/dist/esm/zero/ownership.mjs +48 -0
  102. package/dist/esm/zero/ownership.mjs.map +1 -0
  103. package/dist/esm/zero/theme.mjs +313 -0
  104. package/dist/esm/zero/theme.mjs.map +1 -0
  105. package/dist/esm/zero/transform.mjs +182 -0
  106. package/dist/esm/zero/transform.mjs.map +1 -0
  107. package/package.json +38 -47
  108. package/src/check-dep-versions.ts +2 -2
  109. package/src/checkDeps.ts +3 -2
  110. package/src/compiler.ts +506 -0
  111. package/src/compilerHost.ts +3739 -0
  112. package/src/componentDiscovery.ts +105 -0
  113. package/src/constants.ts +0 -5
  114. package/src/domStructuralPass.ts +190 -0
  115. package/src/exports.ts +5 -6
  116. package/src/extractor/addLocalExports.ts +49 -0
  117. package/src/extractor/bundle.ts +38 -40
  118. package/src/extractor/bundleConfig.ts +368 -187
  119. package/src/extractor/concatClassName.ts +21 -24
  120. package/src/extractor/getTamaguiConfigPathFromOptionsConfig.ts +13 -5
  121. package/src/extractor/loadTamagui.ts +196 -143
  122. package/src/extractor/regenerateConfig.ts +65 -13
  123. package/src/extractor/watchTamaguiConfig.ts +6 -1
  124. package/src/helpers/requireTamaguiCore.ts +6 -1
  125. package/src/registerRequire.ts +94 -132
  126. package/src/staticEvaluationIgnoredModules.ts +74 -0
  127. package/src/types.ts +2 -107
  128. package/src/zero/artifact.ts +142 -0
  129. package/src/zero/graph.ts +359 -0
  130. package/src/zero/identity.ts +73 -0
  131. package/src/zero/index.ts +9 -0
  132. package/src/zero/islands.ts +266 -0
  133. package/src/zero/options.ts +239 -0
  134. package/src/zero/ownership.ts +113 -0
  135. package/src/zero/theme.ts +526 -0
  136. package/src/zero/transform.ts +329 -0
  137. package/types/check-dep-versions.d.ts.map +1 -1
  138. package/types/checkDeps.d.ts.map +1 -1
  139. package/types/compiler.d.ts +134 -0
  140. package/types/compiler.d.ts.map +1 -0
  141. package/types/compilerHost.d.ts +38 -0
  142. package/types/compilerHost.d.ts.map +1 -0
  143. package/types/componentDiscovery.d.ts +27 -0
  144. package/types/componentDiscovery.d.ts.map +1 -0
  145. package/types/constants.d.ts +0 -1
  146. package/types/constants.d.ts.map +1 -1
  147. package/types/domStructuralPass.d.ts +3 -0
  148. package/types/domStructuralPass.d.ts.map +1 -0
  149. package/types/exports.d.ts +5 -6
  150. package/types/exports.d.ts.map +1 -1
  151. package/types/extractor/addLocalExports.d.ts +3 -0
  152. package/types/extractor/addLocalExports.d.ts.map +1 -0
  153. package/types/extractor/bundle.d.ts +66 -65
  154. package/types/extractor/bundle.d.ts.map +1 -1
  155. package/types/extractor/bundleConfig.d.ts +26 -4
  156. package/types/extractor/bundleConfig.d.ts.map +1 -1
  157. package/types/extractor/esbuildAliasPlugin.d.ts.map +1 -1
  158. package/types/extractor/getTamaguiConfigPathFromOptionsConfig.d.ts +1 -1
  159. package/types/extractor/getTamaguiConfigPathFromOptionsConfig.d.ts.map +1 -1
  160. package/types/extractor/loadTamagui.d.ts +26 -3
  161. package/types/extractor/loadTamagui.d.ts.map +1 -1
  162. package/types/extractor/regenerateConfig.d.ts +1 -1
  163. package/types/extractor/regenerateConfig.d.ts.map +1 -1
  164. package/types/extractor/watchTamaguiConfig.d.ts.map +1 -1
  165. package/types/getPragmaOptions.d.ts +1 -1
  166. package/types/helpers/memoize.d.ts +1 -1
  167. package/types/helpers/memoize.d.ts.map +1 -1
  168. package/types/helpers/requireTamaguiCore.d.ts.map +1 -1
  169. package/types/index.d.ts.map +1 -1
  170. package/types/registerRequire.d.ts +2 -2
  171. package/types/registerRequire.d.ts.map +1 -1
  172. package/types/staticEvaluationIgnoredModules.d.ts +9 -0
  173. package/types/staticEvaluationIgnoredModules.d.ts.map +1 -0
  174. package/types/types.d.ts +2 -90
  175. package/types/types.d.ts.map +1 -1
  176. package/types/zero/artifact.d.ts +44 -0
  177. package/types/zero/artifact.d.ts.map +1 -0
  178. package/types/zero/graph.d.ts +139 -0
  179. package/types/zero/graph.d.ts.map +1 -0
  180. package/types/zero/identity.d.ts +33 -0
  181. package/types/zero/identity.d.ts.map +1 -0
  182. package/types/zero/index.d.ts +10 -0
  183. package/types/zero/index.d.ts.map +1 -0
  184. package/types/zero/islands.d.ts +56 -0
  185. package/types/zero/islands.d.ts.map +1 -0
  186. package/types/zero/options.d.ts +58 -0
  187. package/types/zero/options.d.ts.map +1 -0
  188. package/types/zero/ownership.d.ts +51 -0
  189. package/types/zero/ownership.d.ts.map +1 -0
  190. package/types/zero/theme.d.ts +85 -0
  191. package/types/zero/theme.d.ts.map +1 -0
  192. package/types/zero/transform.d.ts +53 -0
  193. package/types/zero/transform.d.ts.map +1 -0
  194. package/dist/check-dep-versions.cjs +0 -372
  195. package/dist/checkDeps.cjs +0 -271
  196. package/dist/constants.cjs +0 -51
  197. package/dist/exports.cjs +0 -48
  198. package/dist/extractor/accessSafe.cjs +0 -48
  199. package/dist/extractor/babelParse.cjs +0 -56
  200. package/dist/extractor/buildClassName.cjs +0 -86
  201. package/dist/extractor/bundle.cjs +0 -234
  202. package/dist/extractor/bundleConfig.cjs +0 -729
  203. package/dist/extractor/concatClassName.cjs +0 -129
  204. package/dist/extractor/createEvaluator.cjs +0 -88
  205. package/dist/extractor/createExtractor.cjs +0 -1968
  206. package/dist/extractor/createLogger.cjs +0 -50
  207. package/dist/extractor/detectModuleFormat.cjs +0 -55
  208. package/dist/extractor/ensureImportingConcat.cjs +0 -54
  209. package/dist/extractor/errors.cjs +0 -28
  210. package/dist/extractor/esbuildAliasPlugin.cjs +0 -56
  211. package/dist/extractor/esbuildTsconfigPaths.cjs +0 -108
  212. package/dist/extractor/evaluateAstNode.cjs +0 -128
  213. package/dist/extractor/extractHelpers.cjs +0 -182
  214. package/dist/extractor/extractMediaStyle.cjs +0 -169
  215. package/dist/extractor/extractToClassNames.cjs +0 -475
  216. package/dist/extractor/extractToNative.cjs +0 -369
  217. package/dist/extractor/findTopmostFunction.cjs +0 -43
  218. package/dist/extractor/generatedUid.cjs +0 -58
  219. package/dist/extractor/getPrefixLogs.cjs +0 -31
  220. package/dist/extractor/getPropValueFromAttributes.cjs +0 -85
  221. package/dist/extractor/getSourceModule.cjs +0 -100
  222. package/dist/extractor/getStaticBindingsForScope.cjs +0 -213
  223. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.cjs +0 -41
  224. package/dist/extractor/hasTopLevelAwait.cjs +0 -62
  225. package/dist/extractor/hoistClassNames.cjs +0 -76
  226. package/dist/extractor/literalToAst.cjs +0 -109
  227. package/dist/extractor/loadFile.cjs +0 -17
  228. package/dist/extractor/loadTamagui.cjs +0 -373
  229. package/dist/extractor/logLines.cjs +0 -43
  230. package/dist/extractor/normalizeTernaries.cjs +0 -100
  231. package/dist/extractor/propsToFontFamilyCache.cjs +0 -42
  232. package/dist/extractor/regenerateConfig.cjs +0 -178
  233. package/dist/extractor/removeUnusedHooks.cjs +0 -108
  234. package/dist/extractor/timer.cjs +0 -52
  235. package/dist/extractor/validHTMLAttributes.cjs +0 -79
  236. package/dist/extractor/watchTamaguiConfig.cjs +0 -70
  237. package/dist/getPragmaOptions.cjs +0 -73
  238. package/dist/helpers/memoize.cjs +0 -45
  239. package/dist/helpers/requireTamaguiCore.cjs +0 -40
  240. package/dist/index.cjs +0 -42
  241. package/dist/registerRequire.cjs +0 -209
  242. package/dist/server.cjs +0 -82
  243. package/dist/types.cjs +0 -18
  244. package/dist/worker.cjs +0 -111
  245. package/src/extractor/accessSafe.ts +0 -22
  246. package/src/extractor/babelParse.ts +0 -38
  247. package/src/extractor/buildClassName.ts +0 -76
  248. package/src/extractor/createEvaluator.ts +0 -82
  249. package/src/extractor/createExtractor.ts +0 -2970
  250. package/src/extractor/createLogger.ts +0 -41
  251. package/src/extractor/ensureImportingConcat.ts +0 -36
  252. package/src/extractor/errors.ts +0 -1
  253. package/src/extractor/evaluateAstNode.ts +0 -136
  254. package/src/extractor/extractHelpers.ts +0 -211
  255. package/src/extractor/extractMediaStyle.ts +0 -194
  256. package/src/extractor/extractToClassNames.ts +0 -733
  257. package/src/extractor/extractToNative.ts +0 -506
  258. package/src/extractor/findTopmostFunction.ts +0 -24
  259. package/src/extractor/generatedUid.ts +0 -41
  260. package/src/extractor/getPrefixLogs.ts +0 -9
  261. package/src/extractor/getPropValueFromAttributes.ts +0 -95
  262. package/src/extractor/getSourceModule.ts +0 -96
  263. package/src/extractor/getStaticBindingsForScope.ts +0 -237
  264. package/src/extractor/hasTopLevelAwait.ts +0 -28
  265. package/src/extractor/hoistClassNames.ts +0 -52
  266. package/src/extractor/literalToAst.ts +0 -85
  267. package/src/extractor/loadFile.ts +0 -17
  268. package/src/extractor/logLines.ts +0 -16
  269. package/src/extractor/normalizeTernaries.ts +0 -89
  270. package/src/extractor/propsToFontFamilyCache.ts +0 -18
  271. package/src/extractor/removeUnusedHooks.ts +0 -83
  272. package/src/extractor/timer.ts +0 -25
  273. package/src/extractor/validHTMLAttributes.ts +0 -52
  274. package/src/worker.ts +0 -142
  275. package/types/extractor/accessSafe.d.ts +0 -3
  276. package/types/extractor/accessSafe.d.ts.map +0 -1
  277. package/types/extractor/babelParse.d.ts +0 -5
  278. package/types/extractor/babelParse.d.ts.map +0 -1
  279. package/types/extractor/buildClassName.d.ts +0 -7
  280. package/types/extractor/buildClassName.d.ts.map +0 -1
  281. package/types/extractor/createEvaluator.d.ts +0 -12
  282. package/types/extractor/createEvaluator.d.ts.map +0 -1
  283. package/types/extractor/createExtractor.d.ts +0 -32
  284. package/types/extractor/createExtractor.d.ts.map +0 -1
  285. package/types/extractor/createLogger.d.ts +0 -3
  286. package/types/extractor/createLogger.d.ts.map +0 -1
  287. package/types/extractor/ensureImportingConcat.d.ts +0 -4
  288. package/types/extractor/ensureImportingConcat.d.ts.map +0 -1
  289. package/types/extractor/errors.d.ts +0 -3
  290. package/types/extractor/errors.d.ts.map +0 -1
  291. package/types/extractor/evaluateAstNode.d.ts +0 -3
  292. package/types/extractor/evaluateAstNode.d.ts.map +0 -1
  293. package/types/extractor/extractHelpers.d.ts +0 -28
  294. package/types/extractor/extractHelpers.d.ts.map +0 -1
  295. package/types/extractor/extractMediaStyle.d.ts +0 -11
  296. package/types/extractor/extractMediaStyle.d.ts.map +0 -1
  297. package/types/extractor/extractToClassNames.d.ts +0 -25
  298. package/types/extractor/extractToClassNames.d.ts.map +0 -1
  299. package/types/extractor/extractToNative.d.ts +0 -13
  300. package/types/extractor/extractToNative.d.ts.map +0 -1
  301. package/types/extractor/findTopmostFunction.d.ts +0 -4
  302. package/types/extractor/findTopmostFunction.d.ts.map +0 -1
  303. package/types/extractor/generatedUid.d.ts +0 -5
  304. package/types/extractor/generatedUid.d.ts.map +0 -1
  305. package/types/extractor/getPrefixLogs.d.ts +0 -3
  306. package/types/extractor/getPrefixLogs.d.ts.map +0 -1
  307. package/types/extractor/getPropValueFromAttributes.d.ts +0 -19
  308. package/types/extractor/getPropValueFromAttributes.d.ts.map +0 -1
  309. package/types/extractor/getSourceModule.d.ts +0 -16
  310. package/types/extractor/getSourceModule.d.ts.map +0 -1
  311. package/types/extractor/getStaticBindingsForScope.d.ts +0 -5
  312. package/types/extractor/getStaticBindingsForScope.d.ts.map +0 -1
  313. package/types/extractor/hasTopLevelAwait.d.ts +0 -2
  314. package/types/extractor/hasTopLevelAwait.d.ts.map +0 -1
  315. package/types/extractor/hoistClassNames.d.ts +0 -6
  316. package/types/extractor/hoistClassNames.d.ts.map +0 -1
  317. package/types/extractor/literalToAst.d.ts +0 -4
  318. package/types/extractor/literalToAst.d.ts.map +0 -1
  319. package/types/extractor/loadFile.d.ts +0 -1
  320. package/types/extractor/loadFile.d.ts.map +0 -1
  321. package/types/extractor/logLines.d.ts +0 -2
  322. package/types/extractor/logLines.d.ts.map +0 -1
  323. package/types/extractor/normalizeTernaries.d.ts +0 -5
  324. package/types/extractor/normalizeTernaries.d.ts.map +0 -1
  325. package/types/extractor/propsToFontFamilyCache.d.ts +0 -4
  326. package/types/extractor/propsToFontFamilyCache.d.ts.map +0 -1
  327. package/types/extractor/removeUnusedHooks.d.ts +0 -3
  328. package/types/extractor/removeUnusedHooks.d.ts.map +0 -1
  329. package/types/extractor/timer.d.ts +0 -5
  330. package/types/extractor/timer.d.ts.map +0 -1
  331. package/types/extractor/validHTMLAttributes.d.ts +0 -52
  332. package/types/extractor/validHTMLAttributes.d.ts.map +0 -1
  333. package/types/worker.d.ts +0 -46
  334. package/types/worker.d.ts.map +0 -1
  335. /package/dist/{setup.cjs → cjs/setup.cjs} +0 -0
@@ -1,369 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
30
- }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
34
- var extractToNative_exports = {};
35
- __export(extractToNative_exports, {
36
- extractToNative: () => extractToNative,
37
- getBabelParseDefinition: () => getBabelParseDefinition,
38
- getBabelPlugin: () => getBabelPlugin
39
- });
40
- module.exports = __toCommonJS(extractToNative_exports);
41
- var import_core = require("@babel/core");
42
- var import_generator = __toESM(require("@babel/generator"));
43
- var import_helper_plugin_utils = require("@babel/helper-plugin-utils");
44
- var import_parser = require("@babel/parser");
45
- var import_template = __toESM(require("@babel/template"));
46
- var t = __toESM(require("@babel/types"));
47
- var import_node_path = require("node:path");
48
- var import_getPragmaOptions = require("../getPragmaOptions.cjs");
49
- var import_createExtractor = require("./createExtractor.cjs");
50
- var import_createLogger = require("./createLogger.cjs");
51
- var import_extractHelpers = require("./extractHelpers.cjs");
52
- var import_literalToAst = require("./literalToAst.cjs");
53
- var import_loadTamagui = require("./loadTamagui.cjs");
54
- const importNativeView = (0, import_template.default)(`
55
- const __ReactNativeView = require('react-native').View;
56
- const __ReactNativeText = require('react-native').Text;
57
- `);
58
- const importStyleSheet = (0, import_template.default)(`
59
- const __ReactNativeStyleSheet = require('react-native').StyleSheet;
60
- `);
61
- const importWithStyle = import_template.default.ast(`import { _withStableStyle } from '@tamagui/core';`);
62
- const extractor = (0, import_createExtractor.createExtractor)({
63
- platform: "native"
64
- });
65
- let tamaguiBuildOptionsLoaded;
66
- function extractToNative(sourceFileName, sourceCode, options) {
67
- const ast = (0, import_parser.parse)(sourceCode, {
68
- sourceType: "module",
69
- plugins: ["jsx", "typescript"]
70
- });
71
- const babelPlugin = getBabelPlugin();
72
- const out = (0, import_core.transformFromAstSync)(ast, sourceCode, {
73
- plugins: [[babelPlugin, options]],
74
- configFile: false,
75
- sourceFileName,
76
- filename: sourceFileName
77
- });
78
- if (!out) {
79
- throw new Error(`No output returned`);
80
- }
81
- return out;
82
- }
83
- function getBabelPlugin() {
84
- return (0, import_helper_plugin_utils.declare)((api, options) => {
85
- api.assertVersion(7);
86
- return getBabelParseDefinition(options);
87
- });
88
- }
89
- function getBabelParseDefinition(options) {
90
- return {
91
- name: "tamagui",
92
- visitor: {
93
- Program: {
94
- enter(root) {
95
- let sourcePath = this.file.opts.filename;
96
- if (sourcePath?.includes("node_modules")) {
97
- return;
98
- }
99
- if (!sourcePath?.endsWith(".jsx") && !sourcePath?.endsWith(".tsx")) {
100
- return;
101
- }
102
- if (process.env.SOURCE_ROOT?.endsWith("ios")) {
103
- sourcePath = sourcePath.replace("/ios", "");
104
- }
105
- let hasImportedView = false;
106
- let hasImportedViewWrapper = false;
107
- let wrapperCount = 0;
108
- const sheetStyles = {};
109
- const sheetIdentifier = root.scope.generateUidIdentifier("sheet");
110
- const firstCommentContents =
111
- // join because you can join together multiple pragmas
112
- root.node.body[0]?.leadingComments?.map(comment => comment?.value || " ").join(" ") ?? "";
113
- const firstComment = firstCommentContents ? `//${firstCommentContents}` : "";
114
- const {
115
- shouldPrintDebug,
116
- shouldDisable
117
- } = (0, import_getPragmaOptions.getPragmaOptions)({
118
- source: firstComment,
119
- path: sourcePath
120
- });
121
- if (shouldDisable) {
122
- return;
123
- }
124
- if (!options.config && !options.components) {
125
- tamaguiBuildOptionsLoaded ||= (0, import_loadTamagui.loadTamaguiBuildConfigSync)({});
126
- }
127
- const finalOptions = {
128
- // @ts-ignore just in case they leave it out
129
- platform: "native",
130
- ...tamaguiBuildOptionsLoaded,
131
- ...options
132
- };
133
- const printLog = (0, import_createLogger.createLogger)(sourcePath, finalOptions);
134
- function addSheetStyle(style, node) {
135
- const styleIndex = `${Object.keys(sheetStyles).length}`;
136
- let key = `${styleIndex}`;
137
- if (process.env.NODE_ENV === "development") {
138
- const lineNumbers = node.loc ? node.loc.start.line + (node.loc.start.line !== node.loc.end.line ? `-${node.loc.end.line}` : "") : "";
139
- key += `:${(0, import_node_path.basename)(sourcePath)}:${lineNumbers}`;
140
- }
141
- sheetStyles[key] = style;
142
- return readStyleExpr(key);
143
- }
144
- function readStyleExpr(key) {
145
- return (0, import_template.default)(`SHEET['KEY']`)({
146
- SHEET: sheetIdentifier.name,
147
- KEY: key
148
- })["expression"];
149
- }
150
- let res;
151
- try {
152
- res = extractor.parseSync(root, {
153
- importsWhitelist: ["constants.js", "colors.js"],
154
- excludeProps: /* @__PURE__ */new Set(["className", "userSelect", "whiteSpace", "textOverflow", "cursor", "contain"]),
155
- // native props that should pass through without preventing extraction
156
- inlineProps: /* @__PURE__ */new Set(["testID", "nativeID", "accessibilityLabel", "accessibilityHint", "accessibilityRole", "accessibilityState", "accessibilityValue", "accessibilityActions", "accessibilityLabelledBy", "accessibilityLiveRegion", "accessibilityElementsHidden", "accessibilityViewIsModal", "importantForAccessibility", "onAccessibilityAction", "onAccessibilityEscape", "onAccessibilityTap", "onMagicTap", "collapsable", "needsOffscreenAlphaCompositing", "removeClippedSubviews", "renderToHardwareTextureAndroid", "shouldRasterizeIOS", "hitSlop", "pointerEvents"]),
157
- shouldPrintDebug,
158
- ...finalOptions,
159
- // disable extracting variables as no native concept of them (only theme values)
160
- disableExtractVariables: false,
161
- sourcePath,
162
- // disabling flattening for now
163
- // it's flattening a plain <Paragraph>hello</Paragraph> which breaks things because themes
164
- // thinking it's not really worth the effort to do much compilation on native
165
- // for now just disable flatten as it can only run in narrow places on native
166
- // disableFlattening: 'styled',
167
- getFlattenedNode({
168
- isTextView
169
- }) {
170
- if (!hasImportedView) {
171
- hasImportedView = true;
172
- root.unshiftContainer("body", importNativeView());
173
- }
174
- return isTextView ? "__ReactNativeText" : "__ReactNativeView";
175
- },
176
- onExtractTag(props) {
177
- assertValidTag(props.node);
178
- const stylesExpr = t.arrayExpression([]);
179
- const hocStylesExpr = t.arrayExpression([]);
180
- const expressions = [];
181
- const mediaExpressionIndexes = /* @__PURE__ */new Set();
182
- const finalAttrs = [];
183
- const themeKeysUsed = /* @__PURE__ */new Set();
184
- function getStyleExpression(style, forTernary = false) {
185
- if (!style) return;
186
- const {
187
- plain,
188
- themed
189
- } = splitThemeStyles(style);
190
- let themeExpr = null;
191
- if (themed) {
192
- for (const key in themed) {
193
- themeKeysUsed.add(themed[key].split("$")[1]);
194
- }
195
- themeExpr = getThemedStyleExpression(themed);
196
- }
197
- const hasPlainKeys = Object.keys(plain).length > 0;
198
- const ident = hasPlainKeys ? addSheetStyle(plain, props.node) : null;
199
- if (themeExpr) {
200
- if (forTernary) {
201
- if (ident) {
202
- return t.arrayExpression([ident, themeExpr]);
203
- }
204
- return themeExpr;
205
- }
206
- if (ident) {
207
- addStyleExpression(ident);
208
- addStyleExpression(ident, true);
209
- }
210
- return themeExpr;
211
- }
212
- return ident;
213
- }
214
- function addStyleExpression(expr, HOC = false) {
215
- if (Array.isArray(expr)) {
216
- ;
217
- (HOC ? hocStylesExpr : stylesExpr).elements.push(...expr);
218
- } else {
219
- ;
220
- (HOC ? hocStylesExpr : stylesExpr).elements.push(expr);
221
- }
222
- }
223
- function getThemedStyleExpression(styles) {
224
- const themedStylesAst = (0, import_literalToAst.literalToAst)(styles);
225
- themedStylesAst.properties.forEach(_ => {
226
- const prop = _;
227
- if (prop.value.type === "StringLiteral") {
228
- const propVal = prop.value.value.slice(1);
229
- const isComputed = !t.isValidIdentifier(propVal);
230
- prop.value = t.callExpression(t.memberExpression(t.memberExpression(t.identifier("theme"), isComputed ? t.stringLiteral(propVal) : t.identifier(propVal), isComputed), t.identifier("get")), []);
231
- }
232
- });
233
- return themedStylesAst;
234
- }
235
- let hasDynamicStyle = false;
236
- let hasMediaKeys = false;
237
- for (const attr of props.attrs) {
238
- switch (attr.type) {
239
- case "style":
240
- {
241
- let styleExpr = getStyleExpression(attr.value);
242
- addStyleExpression(styleExpr);
243
- addStyleExpression(styleExpr, true);
244
- break;
245
- }
246
- case "ternary":
247
- {
248
- const {
249
- consequent,
250
- alternate
251
- } = attr.value;
252
- const consExpr = getStyleExpression(consequent, true);
253
- const altExpr = getStyleExpression(alternate, true);
254
- if (attr.value.inlineMediaQuery) {
255
- hasMediaKeys = true;
256
- }
257
- let expression = attr.value.test;
258
- if (attr.value.inlineMediaQuery && t.isLogicalExpression(attr.value.test, {
259
- operator: "&&"
260
- }) && t.isStringLiteral(attr.value.test.left)) {
261
- expression = t.arrayExpression([t.stringLiteral(attr.value.inlineMediaQuery), t.unaryExpression("!", t.unaryExpression("!", attr.value.test.right))]);
262
- mediaExpressionIndexes.add(expressions.length);
263
- }
264
- expressions.push(expression);
265
- addStyleExpression(t.conditionalExpression(t.identifier(`_expressions[${expressions.length - 1}]`), consExpr || t.nullLiteral(), altExpr || t.nullLiteral()), true);
266
- const styleExpr = t.conditionalExpression(attr.value.test, consExpr || t.nullLiteral(), altExpr || t.nullLiteral());
267
- addStyleExpression(styleExpr);
268
- break;
269
- }
270
- case "attr":
271
- {
272
- if (t.isJSXSpreadAttribute(attr.value)) {
273
- if ((0, import_extractHelpers.isSimpleSpread)(attr.value)) {
274
- stylesExpr.elements.push(t.memberExpression(attr.value.argument, t.identifier("style")));
275
- hocStylesExpr.elements.push(t.memberExpression(attr.value.argument, t.identifier("style")));
276
- }
277
- }
278
- finalAttrs.push(attr.value);
279
- break;
280
- }
281
- }
282
- }
283
- props.node.attributes = finalAttrs;
284
- if (themeKeysUsed.size || hocStylesExpr.elements.length > 1 || hasDynamicStyle || hasMediaKeys) {
285
- if (!hasImportedViewWrapper) {
286
- root.unshiftContainer("body", importWithStyle);
287
- hasImportedViewWrapper = true;
288
- }
289
- const name = props.flatNodeName || props.node.name["name"];
290
- const wrapperName = `_${name.replace(/^_+/, "")}Styled${wrapperCount++}`;
291
- const WrapperIdentifier = t.identifier(wrapperName);
292
- const WrapperJSXIdentifier = t.jsxIdentifier(wrapperName);
293
- const hasThemeKeysFlag = themeKeysUsed.size > 0;
294
- root.pushContainer("body", t.variableDeclaration("const", [t.variableDeclarator(WrapperIdentifier, t.callExpression(t.identifier("_withStableStyle"), [t.identifier(name), t.arrowFunctionExpression([t.identifier("theme"), t.identifier("_expressions")],
295
- // return styles directly - no useMemo, theme changes must trigger style recalc
296
- t.arrayExpression([...hocStylesExpr.elements])), t.booleanLiteral(hasThemeKeysFlag), t.booleanLiteral(hasMediaKeys)]))]));
297
- props.node.name = WrapperJSXIdentifier;
298
- props.jsxPath.node.openingElement.name = WrapperJSXIdentifier;
299
- if (props.jsxPath.node.closingElement) {
300
- props.jsxPath.node.closingElement.name = t.jsxIdentifier(wrapperName);
301
- }
302
- if (expressions.length) {
303
- const safeExpressions = expressions.map((expr, index) => t.isStringLiteral(expr) || mediaExpressionIndexes.has(index) ? expr : t.unaryExpression("!", t.unaryExpression("!", expr)));
304
- props.node.attributes.push(t.jsxAttribute(t.jsxIdentifier("_expressions"), t.jsxExpressionContainer(t.arrayExpression(safeExpressions))));
305
- }
306
- } else {
307
- props.node.attributes.push(t.jsxAttribute(t.jsxIdentifier("style"), t.jsxExpressionContainer(stylesExpr.elements.length === 1 ? stylesExpr.elements[0] : stylesExpr)));
308
- }
309
- }
310
- });
311
- } catch (err) {
312
- if (err instanceof Error) {
313
- let message = `${shouldPrintDebug === "verbose" ? err : err.message}`;
314
- if (message.includes("Unexpected return value from visitor method")) {
315
- message = "Unexpected return value from visitor method";
316
- }
317
- console.warn("Error in Tamagui parse, skipping", message, err.stack);
318
- return;
319
- }
320
- }
321
- if (!Object.keys(sheetStyles).length) {
322
- if (shouldPrintDebug) {
323
- console.info("END no styles");
324
- }
325
- if (res) printLog(res);
326
- return;
327
- }
328
- const sheetObject = (0, import_literalToAst.literalToAst)(sheetStyles);
329
- const sheetOuter = (0, import_template.default)("const SHEET = __ReactNativeStyleSheet.create(null)")({
330
- SHEET: sheetIdentifier.name
331
- });
332
- sheetOuter.declarations[0].init.arguments[0] = sheetObject;
333
- root.unshiftContainer("body", sheetOuter);
334
- root.unshiftContainer("body", importStyleSheet());
335
- if (shouldPrintDebug) {
336
- console.info("\n -------- output code ------- \n");
337
- console.info((0, import_generator.default)(root.parent).code.split("\n").filter(x => !x.startsWith("//")).join("\n"));
338
- }
339
- if (res) printLog(res);
340
- }
341
- }
342
- }
343
- };
344
- }
345
- function assertValidTag(node) {
346
- if (node.attributes.find(x => x.type === "JSXAttribute" && x.name.name === "style")) {
347
- if (process.env.DEBUG?.startsWith("tamagui")) {
348
- console.warn("\u26A0\uFE0F Cannot pass style attribute to extracted style");
349
- }
350
- }
351
- }
352
- function splitThemeStyles(style) {
353
- const themed = {};
354
- const plain = {};
355
- let noTheme = true;
356
- for (const key in style) {
357
- const val = style[key];
358
- if (val && val[0] === "$") {
359
- themed[key] = val;
360
- noTheme = false;
361
- } else {
362
- plain[key] = val;
363
- }
364
- }
365
- return {
366
- themed: noTheme ? null : themed,
367
- plain
368
- };
369
- }
@@ -1,43 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var findTopmostFunction_exports = {};
24
- __export(findTopmostFunction_exports, {
25
- findTopmostFunction: () => findTopmostFunction
26
- });
27
- module.exports = __toCommonJS(findTopmostFunction_exports);
28
- function findTopmostFunction(jsxPath) {
29
- const isFunction = path => path.isArrowFunctionExpression() || path.isFunctionDeclaration() || path.isFunctionExpression();
30
- let compFn = jsxPath.findParent(isFunction);
31
- while (compFn) {
32
- const parent = compFn.findParent(isFunction);
33
- if (parent) {
34
- compFn = parent;
35
- } else {
36
- break;
37
- }
38
- }
39
- if (!compFn) {
40
- return null;
41
- }
42
- return compFn;
43
- }
@@ -1,58 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
30
- }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
34
- var generatedUid_exports = {};
35
- __export(generatedUid_exports, {
36
- generateUid: () => generateUid
37
- });
38
- module.exports = __toCommonJS(generatedUid_exports);
39
- var t = __toESM(require("@babel/types"));
40
- function generateUid(scope, name) {
41
- if (!(typeof scope === "object")) throw "generateUid expects a scope object as its first parameter";
42
- if (!(typeof name === "string" && name !== "")) throw "generateUid expects a valid name as its second parameter";
43
- name = t.toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
44
- let uid;
45
- let i = 0;
46
- do {
47
- if (i > 1) {
48
- uid = name + i;
49
- } else {
50
- uid = name;
51
- }
52
- i++;
53
- } while (scope.hasLabel(uid) || scope.hasBinding(uid) || scope.hasGlobal(uid) || scope.hasReference(uid));
54
- const program = scope.getProgramParent();
55
- program.references[uid] = true;
56
- program.uids[uid] = true;
57
- return uid;
58
- }
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var getPrefixLogs_exports = {};
24
- __export(getPrefixLogs_exports, {
25
- getPrefixLogs: () => getPrefixLogs
26
- });
27
- module.exports = __toCommonJS(getPrefixLogs_exports);
28
- var import_cli_color = require("@tamagui/cli-color");
29
- function getPrefixLogs(options) {
30
- return options?.prefixLogs ?? ` \u{1F425} [tamagui] ${(0, import_cli_color.colorString)(import_cli_color.Color.FgYellow, options?.platform || "web")}`;
31
- }
@@ -1,85 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
30
- }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
34
- var getPropValueFromAttributes_exports = {};
35
- __export(getPropValueFromAttributes_exports, {
36
- getPropValueFromAttributes: () => getPropValueFromAttributes
37
- });
38
- module.exports = __toCommonJS(getPropValueFromAttributes_exports);
39
- var import_generator = __toESM(require("@babel/generator"));
40
- var t = __toESM(require("@babel/types"));
41
- var import_accessSafe = require("./accessSafe.cjs");
42
- function getPropValueFromAttributes(propName, attrs) {
43
- let propIndex = -1;
44
- let jsxAttr = null;
45
- for (let idx = -1, len = attrs.length; ++idx < len;) {
46
- const attr = attrs[idx];
47
- if (t.isJSXAttribute(attr) && attr.name && attr.name.name === propName) {
48
- propIndex = idx;
49
- jsxAttr = attr;
50
- break;
51
- }
52
- }
53
- if (!jsxAttr || jsxAttr.value == null) {
54
- return null;
55
- }
56
- let propValue = jsxAttr.value;
57
- if (t.isJSXExpressionContainer(propValue)) {
58
- propValue = propValue.expression;
59
- }
60
- if (t.isJSXEmptyExpression(propValue)) {
61
- console.error("encountered JSXEmptyExpression");
62
- return null;
63
- }
64
- const applicableSpreads = attrs.filter(
65
- // 1. idx is greater than propValue prop index
66
- // 2. attr is a spread operator
67
- (attr, idx) => {
68
- if (t.isJSXSpreadAttribute(attr)) {
69
- if (t.isIdentifier(attr.argument) || t.isMemberExpression(attr.argument)) {
70
- return idx > propIndex;
71
- }
72
- if (t.isLogicalExpression(attr.argument)) {
73
- return false;
74
- }
75
- throw new Error(`unsupported spread of type "${attr.argument.type}": ${
76
- // @ts-ignore
77
- (0, import_generator.default)(attr).code}`);
78
- }
79
- return false;
80
- }).map(attr => attr.argument);
81
- if (applicableSpreads.length > 0) {
82
- propValue = applicableSpreads.reduce((acc, val) => t.logicalExpression("||", (0, import_accessSafe.accessSafe)(val, propName), acc), propValue);
83
- }
84
- return propValue;
85
- }