@tamagui/static 1.135.3 → 1.135.4-1761748186554

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 (181) hide show
  1. package/dist/check-dep-versions.mjs +268 -0
  2. package/dist/check-dep-versions.mjs.map +1 -0
  3. package/dist/checkDeps.mjs +33 -0
  4. package/dist/checkDeps.mjs.map +1 -0
  5. package/dist/constants.mjs +50 -0
  6. package/dist/constants.mjs.map +1 -0
  7. package/dist/exports.mjs +42 -0
  8. package/dist/exports.mjs.map +1 -0
  9. package/dist/extractor/accessSafe.mjs +47 -0
  10. package/dist/extractor/accessSafe.mjs.map +1 -0
  11. package/dist/extractor/babelParse.mjs +55 -0
  12. package/dist/extractor/babelParse.mjs.map +1 -0
  13. package/dist/extractor/bundle.mjs +149 -0
  14. package/dist/extractor/bundle.mjs.map +1 -0
  15. package/dist/extractor/bundleConfig.mjs +331 -0
  16. package/dist/extractor/bundleConfig.mjs.map +1 -0
  17. package/dist/extractor/concatClassName.mjs +79 -0
  18. package/dist/extractor/concatClassName.mjs.map +1 -0
  19. package/dist/extractor/createEvaluator.mjs +76 -0
  20. package/dist/extractor/createEvaluator.mjs.map +1 -0
  21. package/dist/extractor/createExtractor.mjs +976 -0
  22. package/dist/extractor/createExtractor.mjs.map +1 -0
  23. package/dist/extractor/createLogger.mjs +46 -0
  24. package/dist/extractor/createLogger.mjs.map +1 -0
  25. package/dist/extractor/errors.mjs +27 -0
  26. package/dist/extractor/errors.mjs.map +1 -0
  27. package/dist/extractor/esbuildAliasPlugin.mjs +45 -0
  28. package/dist/extractor/esbuildAliasPlugin.mjs.map +1 -0
  29. package/dist/extractor/esbuildTsconfigPaths.mjs +85 -0
  30. package/dist/extractor/esbuildTsconfigPaths.mjs.map +1 -0
  31. package/dist/extractor/evaluateAstNode.mjs +84 -0
  32. package/dist/extractor/evaluateAstNode.mjs.map +1 -0
  33. package/dist/extractor/extractHelpers.mjs +121 -0
  34. package/dist/extractor/extractHelpers.mjs.map +1 -0
  35. package/dist/extractor/extractMediaStyle.mjs +129 -0
  36. package/dist/extractor/extractMediaStyle.mjs.map +1 -0
  37. package/dist/extractor/extractToClassNames.mjs +304 -0
  38. package/dist/extractor/extractToClassNames.mjs.map +1 -0
  39. package/dist/extractor/extractToNative.mjs +262 -0
  40. package/dist/extractor/extractToNative.mjs.map +1 -0
  41. package/dist/extractor/findTopmostFunction.mjs +35 -0
  42. package/dist/extractor/findTopmostFunction.mjs.map +1 -0
  43. package/dist/extractor/{generatedUid.native.js → generatedUid.mjs} +26 -23
  44. package/dist/extractor/generatedUid.mjs.map +1 -0
  45. package/dist/extractor/getPrefixLogs.mjs +30 -0
  46. package/dist/extractor/getPrefixLogs.mjs.map +1 -0
  47. package/dist/extractor/getPropValueFromAttributes.mjs +68 -0
  48. package/dist/extractor/getPropValueFromAttributes.mjs.map +1 -0
  49. package/dist/extractor/getSourceModule.mjs +65 -0
  50. package/dist/extractor/getSourceModule.mjs.map +1 -0
  51. package/dist/extractor/getStaticBindingsForScope.mjs +149 -0
  52. package/dist/extractor/getStaticBindingsForScope.mjs.map +1 -0
  53. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +36 -0
  54. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
  55. package/dist/extractor/literalToAst.mjs +85 -0
  56. package/dist/extractor/literalToAst.mjs.map +1 -0
  57. package/dist/extractor/loadFile.mjs +12 -0
  58. package/dist/extractor/loadFile.mjs.map +1 -0
  59. package/dist/extractor/loadTamagui.mjs +296 -0
  60. package/dist/extractor/loadTamagui.mjs.map +1 -0
  61. package/dist/extractor/logLines.mjs +36 -0
  62. package/dist/extractor/logLines.mjs.map +1 -0
  63. package/dist/extractor/{normalizeTernaries.native.js → normalizeTernaries.mjs} +45 -31
  64. package/dist/extractor/normalizeTernaries.mjs.map +1 -0
  65. package/dist/extractor/propsToFontFamilyCache.mjs +39 -0
  66. package/dist/extractor/propsToFontFamilyCache.mjs.map +1 -0
  67. package/dist/extractor/regenerateConfig.mjs +145 -0
  68. package/dist/extractor/regenerateConfig.mjs.map +1 -0
  69. package/dist/extractor/removeUnusedHooks.mjs +77 -0
  70. package/dist/extractor/removeUnusedHooks.mjs.map +1 -0
  71. package/dist/extractor/timer.mjs +44 -0
  72. package/dist/extractor/timer.mjs.map +1 -0
  73. package/dist/extractor/{validHTMLAttributes.native.js → validHTMLAttributes.mjs} +17 -16
  74. package/dist/extractor/validHTMLAttributes.mjs.map +1 -0
  75. package/dist/extractor/watchTamaguiConfig.mjs +59 -0
  76. package/dist/extractor/watchTamaguiConfig.mjs.map +1 -0
  77. package/dist/getPragmaOptions.mjs +55 -0
  78. package/dist/getPragmaOptions.mjs.map +1 -0
  79. package/dist/helpers/memoize.mjs +38 -0
  80. package/dist/helpers/memoize.mjs.map +1 -0
  81. package/dist/helpers/requireTamaguiCore.mjs +34 -0
  82. package/dist/helpers/requireTamaguiCore.mjs.map +1 -0
  83. package/dist/index.mjs +41 -0
  84. package/dist/index.mjs.map +1 -0
  85. package/dist/registerRequire.mjs +107 -0
  86. package/dist/registerRequire.mjs.map +1 -0
  87. package/dist/server.mjs +76 -0
  88. package/dist/server.mjs.map +1 -0
  89. package/dist/setup.mjs +2 -0
  90. package/dist/setup.mjs.map +1 -0
  91. package/dist/{types.native.js → types.mjs} +8 -6
  92. package/dist/types.mjs.map +1 -0
  93. package/package.json +19 -21
  94. package/dist/check-dep-versions.native.js +0 -602
  95. package/dist/check-dep-versions.native.js.map +0 -6
  96. package/dist/checkDeps.native.js +0 -34
  97. package/dist/checkDeps.native.js.map +0 -6
  98. package/dist/constants.native.js +0 -45
  99. package/dist/constants.native.js.map +0 -6
  100. package/dist/exports.native.js +0 -52
  101. package/dist/exports.native.js.map +0 -6
  102. package/dist/extractor/accessSafe.native.js +0 -48
  103. package/dist/extractor/accessSafe.native.js.map +0 -6
  104. package/dist/extractor/babelParse.native.js +0 -62
  105. package/dist/extractor/babelParse.native.js.map +0 -6
  106. package/dist/extractor/bundle.native.js +0 -168
  107. package/dist/extractor/bundle.native.js.map +0 -6
  108. package/dist/extractor/bundleConfig.native.js +0 -394
  109. package/dist/extractor/bundleConfig.native.js.map +0 -6
  110. package/dist/extractor/concatClassName.native.js +0 -69
  111. package/dist/extractor/concatClassName.native.js.map +0 -6
  112. package/dist/extractor/createEvaluator.native.js +0 -63
  113. package/dist/extractor/createEvaluator.native.js.map +0 -6
  114. package/dist/extractor/createExtractor.native.js +0 -1229
  115. package/dist/extractor/createExtractor.native.js.map +0 -6
  116. package/dist/extractor/createLogger.native.js +0 -35
  117. package/dist/extractor/createLogger.native.js.map +0 -6
  118. package/dist/extractor/errors.native.js +0 -119
  119. package/dist/extractor/errors.native.js.map +0 -6
  120. package/dist/extractor/esbuildAliasPlugin.native.js +0 -52
  121. package/dist/extractor/esbuildAliasPlugin.native.js.map +0 -6
  122. package/dist/extractor/esbuildTsconfigPaths.native.js +0 -79
  123. package/dist/extractor/esbuildTsconfigPaths.native.js.map +0 -6
  124. package/dist/extractor/evaluateAstNode.native.js +0 -98
  125. package/dist/extractor/evaluateAstNode.native.js.map +0 -6
  126. package/dist/extractor/extractHelpers.native.js +0 -183
  127. package/dist/extractor/extractHelpers.native.js.map +0 -6
  128. package/dist/extractor/extractMediaStyle.native.js +0 -138
  129. package/dist/extractor/extractMediaStyle.native.js.map +0 -6
  130. package/dist/extractor/extractToClassNames.native.js +0 -332
  131. package/dist/extractor/extractToClassNames.native.js.map +0 -6
  132. package/dist/extractor/extractToNative.native.js +0 -276
  133. package/dist/extractor/extractToNative.native.js.map +0 -6
  134. package/dist/extractor/findTopmostFunction.native.js +0 -37
  135. package/dist/extractor/findTopmostFunction.native.js.map +0 -6
  136. package/dist/extractor/generatedUid.native.js.map +0 -6
  137. package/dist/extractor/getPrefixLogs.native.js +0 -30
  138. package/dist/extractor/getPrefixLogs.native.js.map +0 -6
  139. package/dist/extractor/getPropValueFromAttributes.native.js +0 -68
  140. package/dist/extractor/getPropValueFromAttributes.native.js.map +0 -6
  141. package/dist/extractor/getSourceModule.native.js +0 -80
  142. package/dist/extractor/getSourceModule.native.js.map +0 -6
  143. package/dist/extractor/getStaticBindingsForScope.native.js +0 -183
  144. package/dist/extractor/getStaticBindingsForScope.native.js.map +0 -6
  145. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js +0 -37
  146. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +0 -6
  147. package/dist/extractor/literalToAst.native.js +0 -106
  148. package/dist/extractor/literalToAst.native.js.map +0 -6
  149. package/dist/extractor/loadFile.native.js +0 -21
  150. package/dist/extractor/loadFile.native.js.map +0 -6
  151. package/dist/extractor/loadTamagui.native.js +0 -314
  152. package/dist/extractor/loadTamagui.native.js.map +0 -6
  153. package/dist/extractor/logLines.native.js +0 -53
  154. package/dist/extractor/logLines.native.js.map +0 -6
  155. package/dist/extractor/normalizeTernaries.native.js.map +0 -6
  156. package/dist/extractor/propsToFontFamilyCache.native.js +0 -40
  157. package/dist/extractor/propsToFontFamilyCache.native.js.map +0 -6
  158. package/dist/extractor/regenerateConfig.native.js +0 -148
  159. package/dist/extractor/regenerateConfig.native.js.map +0 -6
  160. package/dist/extractor/removeUnusedHooks.native.js +0 -111
  161. package/dist/extractor/removeUnusedHooks.native.js.map +0 -6
  162. package/dist/extractor/timer.native.js +0 -44
  163. package/dist/extractor/timer.native.js.map +0 -6
  164. package/dist/extractor/validHTMLAttributes.native.js.map +0 -6
  165. package/dist/extractor/watchTamaguiConfig.native.js +0 -60
  166. package/dist/extractor/watchTamaguiConfig.native.js.map +0 -6
  167. package/dist/getPragmaOptions.native.js +0 -62
  168. package/dist/getPragmaOptions.native.js.map +0 -6
  169. package/dist/helpers/memoize.native.js +0 -40
  170. package/dist/helpers/memoize.native.js.map +0 -6
  171. package/dist/helpers/requireTamaguiCore.native.js +0 -34
  172. package/dist/helpers/requireTamaguiCore.native.js.map +0 -6
  173. package/dist/index.native.js +0 -35
  174. package/dist/index.native.js.map +0 -6
  175. package/dist/registerRequire.native.js +0 -124
  176. package/dist/registerRequire.native.js.map +0 -6
  177. package/dist/server.native.js +0 -70
  178. package/dist/server.native.js.map +0 -6
  179. package/dist/setup.native.js +0 -2
  180. package/dist/setup.native.js.map +0 -6
  181. package/dist/types.native.js.map +0 -6
@@ -0,0 +1,76 @@
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
+ __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
+ value: mod,
27
+ enumerable: !0
28
+ }) : target, mod)),
29
+ __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
+ value: !0
31
+ }), mod);
32
+ var createEvaluator_exports = {};
33
+ __export(createEvaluator_exports, {
34
+ createEvaluator: () => createEvaluator,
35
+ createSafeEvaluator: () => createSafeEvaluator
36
+ });
37
+ module.exports = __toCommonJS(createEvaluator_exports);
38
+ var import_node_vm = __toESM(require("node:vm")),
39
+ import_generator = __toESM(require("@babel/generator")),
40
+ t = __toESM(require("@babel/types")),
41
+ import_esbuild = __toESM(require("esbuild")),
42
+ import_constants = require("../constants.mjs"),
43
+ import_evaluateAstNode = require("./evaluateAstNode.mjs");
44
+ function createEvaluator({
45
+ props,
46
+ staticNamespace,
47
+ sourcePath,
48
+ traversePath,
49
+ shouldPrintDebug
50
+ }) {
51
+ const evalFn = n => {
52
+ if (t.isIdentifier(n) && typeof staticNamespace[n.name] < "u") return staticNamespace[n.name];
53
+ const evalContext = import_node_vm.default.createContext(staticNamespace),
54
+ codeWithTypescriptAnnotations = `(${(0, import_generator.default)(n).code})`,
55
+ code = import_esbuild.default.transformSync(codeWithTypescriptAnnotations, {
56
+ loader: "tsx"
57
+ }).code.replace(/;\n$/, "");
58
+ shouldPrintDebug && console.info("evaluating", code);
59
+ const result1 = import_node_vm.default.runInContext(code, evalContext),
60
+ result2 = import_node_vm.default.runInContext(code, evalContext);
61
+ if (!(Object.is(result1, result2) || typeof result1 == "object" && typeof result2 == "object" && JSON.stringify(result1) === JSON.stringify(result2))) throw shouldPrintDebug && console.info("Bailing on non-deterministic expression:", code, `
62
+ First result:`, result1, "Second result:", result2), new Error("Non-deterministic value, bailing");
63
+ return result1;
64
+ };
65
+ return n => (0, import_evaluateAstNode.evaluateAstNode)(n, evalFn);
66
+ }
67
+ function createSafeEvaluator(attemptEval) {
68
+ return n => {
69
+ try {
70
+ return attemptEval(n);
71
+ } catch {
72
+ return import_constants.FAILED_EVAL;
73
+ }
74
+ };
75
+ }
76
+ //# sourceMappingURL=createEvaluator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEvaluator_exports","__export","createEvaluator","createSafeEvaluator","module","exports","__toCommonJS","import_node_vm","__toESM","require","import_generator","t","import_esbuild","import_constants","import_evaluateAstNode","props","staticNamespace","sourcePath","traversePath","shouldPrintDebug","evalFn","n","isIdentifier","name","evalContext","default","createContext","codeWithTypescriptAnnotations","code","transformSync","loader","replace","console","info","result1","runInContext","result2","Object","is","JSON","stringify","Error","evaluateAstNode","attemptEval","FAILED_EVAL"],"sources":["../../src/extractor/createEvaluator.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,uBAAA;AAAAC,QAAA,CAAAD,uBAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,uBAAA;AAAA,IAAAO,cAAA,GAAeC,OAAA,CAAAC,OAAA;EAEfC,gBAAA,GAAqBF,OAAA,CAAAC,OAAA;EAErBE,CAAA,GAAmBH,OAAA,CAAAC,OAAA;EACnBG,cAAA,GAAoBJ,OAAA,CAAAC,OAAA;EAEpBI,gBAAA,GAA4BJ,OAAA;EAE5BK,sBAAA,GAAgCL,OAAA;AAEzB,SAASP,gBAAgB;EAC9Ba,KAAA;EACAC,eAAA;EACAC,UAAA;EACAC,YAAA;EACAC;AACF,GAMG;EAED,MAAMC,MAAA,GAAUC,CAAA,IAAc;IAE5B,IAAIV,CAAA,CAAEW,YAAA,CAAaD,CAAC,KAAK,OAAOL,eAAA,CAAgBK,CAAA,CAAEE,IAAI,IAAM,KAC1D,OAAOP,eAAA,CAAgBK,CAAA,CAAEE,IAAI;IAG/B,MAAMC,WAAA,GAAcjB,cAAA,CAAAkB,OAAA,CAAGC,aAAA,CAAcV,eAAe;MAE9CW,6BAAA,GAAgC,QAAIjB,gBAAA,CAAAe,OAAA,EAASJ,CAAQ,EAAEO,IAAI;MAC3DA,IAAA,GAAOhB,cAAA,CAAAa,OAAA,CACVI,aAAA,CAAcF,6BAAA,EAA+B;QAAEG,MAAA,EAAQ;MAAM,CAAC,EAC9DF,IAAA,CAAKG,OAAA,CAAQ,QAAQ,EAAE;IAEtBZ,gBAAA,IACFa,OAAA,CAAQC,IAAA,CAAK,cAAcL,IAAI;IAGjC,MAAMM,OAAA,GAAU3B,cAAA,CAAAkB,OAAA,CAAGU,YAAA,CAAaP,IAAA,EAAMJ,WAAW;MAC3CY,OAAA,GAAU7B,cAAA,CAAAkB,OAAA,CAAGU,YAAA,CAAaP,IAAA,EAAMJ,WAAW;IAQjD,IAAI,EALFa,MAAA,CAAOC,EAAA,CAAGJ,OAAA,EAASE,OAAO,KACzB,OAAOF,OAAA,IAAY,YAClB,OAAOE,OAAA,IAAY,YACnBG,IAAA,CAAKC,SAAA,CAAUN,OAAO,MAAMK,IAAA,CAAKC,SAAA,CAAUJ,OAAO,IAGpD,MAAIjB,gBAAA,IACFa,OAAA,CAAQC,IAAA,CACN,4CACAL,IAAA,EACA;AAAA,gBACAM,OAAA,EACA,kBACAE,OACF,GAEI,IAAIK,KAAA,CAAM,kCAAkC;IAGpD,OAAOP,OAAA;EACT;EAEA,OAAQb,CAAA,QACCP,sBAAA,CAAA4B,eAAA,EAAgBrB,CAAA,EAAGD,MAAM;AAEpC;AAEO,SAASjB,oBAAoBwC,WAAA,EAAiC;EACnE,OAAQtB,CAAA,IAAc;IACpB,IAAI;MACF,OAAOsB,WAAA,CAAYtB,CAAC;IACtB,QAAc;MACZ,OAAOR,gBAAA,CAAA+B,WAAA;IACT;EACF;AACF","ignoreList":[]}