@tamagui/static 1.89.26 → 1.89.27-1708113113238

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/cjs/constants.native.js +4 -4
  2. package/dist/cjs/constants.native.js.map +3 -3
  3. package/dist/cjs/extractor/accessSafe.native.js +1 -5
  4. package/dist/cjs/extractor/accessSafe.native.js.map +3 -3
  5. package/dist/cjs/extractor/babelParse.native.js +5 -8
  6. package/dist/cjs/extractor/babelParse.native.js.map +3 -3
  7. package/dist/cjs/extractor/buildClassName.native.js +31 -42
  8. package/dist/cjs/extractor/buildClassName.native.js.map +3 -3
  9. package/dist/cjs/extractor/bundle.js +6 -4
  10. package/dist/cjs/extractor/bundle.js.map +1 -1
  11. package/dist/cjs/extractor/bundle.native.js +321 -56
  12. package/dist/cjs/extractor/bundle.native.js.map +3 -3
  13. package/dist/cjs/extractor/bundleConfig.native.js +499 -187
  14. package/dist/cjs/extractor/bundleConfig.native.js.map +3 -3
  15. package/dist/cjs/extractor/createEvaluator.native.js +9 -11
  16. package/dist/cjs/extractor/createEvaluator.native.js.map +3 -3
  17. package/dist/cjs/extractor/createExtractor.native.js +1240 -906
  18. package/dist/cjs/extractor/createExtractor.native.js.map +3 -3
  19. package/dist/cjs/extractor/ensureImportingConcat.native.js +11 -17
  20. package/dist/cjs/extractor/ensureImportingConcat.native.js.map +3 -3
  21. package/dist/cjs/extractor/esbuildAliasPlugin.native.js +22 -11
  22. package/dist/cjs/extractor/esbuildAliasPlugin.native.js.map +3 -3
  23. package/dist/cjs/extractor/evaluateAstNode.native.js +15 -21
  24. package/dist/cjs/extractor/evaluateAstNode.native.js.map +3 -3
  25. package/dist/cjs/extractor/extractHelpers.native.js +146 -38
  26. package/dist/cjs/extractor/extractHelpers.native.js.map +3 -3
  27. package/dist/cjs/extractor/extractMediaStyle.native.js +127 -54
  28. package/dist/cjs/extractor/extractMediaStyle.native.js.map +3 -3
  29. package/dist/cjs/extractor/extractToClassNames.native.js +449 -252
  30. package/dist/cjs/extractor/extractToClassNames.native.js.map +3 -3
  31. package/dist/cjs/extractor/findTopmostFunction.native.js +4 -4
  32. package/dist/cjs/extractor/findTopmostFunction.native.js.map +3 -3
  33. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js +415 -54
  34. package/dist/cjs/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
  35. package/dist/cjs/extractor/generatedUid.native.js +2 -2
  36. package/dist/cjs/extractor/generatedUid.native.js.map +3 -3
  37. package/dist/cjs/extractor/getPrefixLogs.native.js +2 -1
  38. package/dist/cjs/extractor/getPrefixLogs.native.js.map +3 -3
  39. package/dist/cjs/extractor/getPropValueFromAttributes.native.js +16 -19
  40. package/dist/cjs/extractor/getPropValueFromAttributes.native.js.map +3 -3
  41. package/dist/cjs/extractor/getSourceModule.native.js +20 -7
  42. package/dist/cjs/extractor/getSourceModule.native.js.map +3 -3
  43. package/dist/cjs/extractor/getStaticBindingsForScope.native.js +336 -94
  44. package/dist/cjs/extractor/getStaticBindingsForScope.native.js.map +3 -3
  45. package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
  46. package/dist/cjs/extractor/hoistClassNames.native.js +8 -10
  47. package/dist/cjs/extractor/hoistClassNames.native.js.map +3 -3
  48. package/dist/cjs/extractor/literalToAst.native.js +89 -19
  49. package/dist/cjs/extractor/literalToAst.native.js.map +3 -3
  50. package/dist/cjs/extractor/loadFile.native.js +16 -8
  51. package/dist/cjs/extractor/loadFile.native.js.map +3 -3
  52. package/dist/cjs/extractor/loadTamagui.js +3 -3
  53. package/dist/cjs/extractor/loadTamagui.js.map +1 -1
  54. package/dist/cjs/extractor/loadTamagui.native.js +667 -192
  55. package/dist/cjs/extractor/loadTamagui.native.js.map +3 -3
  56. package/dist/cjs/extractor/logLines.native.js +24 -6
  57. package/dist/cjs/extractor/logLines.native.js.map +3 -3
  58. package/dist/cjs/extractor/normalizeTernaries.native.js +71 -20
  59. package/dist/cjs/extractor/normalizeTernaries.native.js.map +3 -3
  60. package/dist/cjs/extractor/propsToFontFamilyCache.native.js +3 -3
  61. package/dist/cjs/extractor/propsToFontFamilyCache.native.js.map +3 -3
  62. package/dist/cjs/extractor/removeUnusedHooks.native.js +69 -36
  63. package/dist/cjs/extractor/removeUnusedHooks.native.js.map +3 -3
  64. package/dist/cjs/extractor/timer.native.js +10 -9
  65. package/dist/cjs/extractor/timer.native.js.map +3 -3
  66. package/dist/cjs/extractor/validHTMLAttributes.native.js +1 -1
  67. package/dist/cjs/extractor/validHTMLAttributes.native.js.map +3 -3
  68. package/dist/cjs/getPragmaOptions.native.js +4 -9
  69. package/dist/cjs/getPragmaOptions.native.js.map +3 -3
  70. package/dist/cjs/helpers/memoize.native.js +5 -3
  71. package/dist/cjs/helpers/memoize.native.js.map +3 -3
  72. package/dist/cjs/helpers/requireTamaguiCore.native.js +2 -1
  73. package/dist/cjs/helpers/requireTamaguiCore.native.js.map +3 -3
  74. package/dist/cjs/index.native.js.map +2 -2
  75. package/dist/cjs/minifyCSS.native.js.map +3 -3
  76. package/dist/cjs/registerRequire.native.js +56 -28
  77. package/dist/cjs/registerRequire.native.js.map +3 -3
  78. package/dist/cjs/server.native.js +175 -21
  79. package/dist/cjs/server.native.js.map +3 -3
  80. package/dist/cjs/setup.native.js.map +3 -3
  81. package/dist/cjs/static.native.js.map +2 -2
  82. package/dist/cjs/types.native.js.map +2 -2
  83. package/dist/cjs/webpackPlugin.native.js +26 -5
  84. package/dist/cjs/webpackPlugin.native.js.map +3 -3
  85. package/dist/esm/constants.native.js +4 -3
  86. package/dist/esm/constants.native.js.map +3 -3
  87. package/dist/esm/extractor/accessSafe.native.js +1 -5
  88. package/dist/esm/extractor/accessSafe.native.js.map +3 -3
  89. package/dist/esm/extractor/babelParse.native.js +5 -7
  90. package/dist/esm/extractor/babelParse.native.js.map +3 -3
  91. package/dist/esm/extractor/buildClassName.native.js +31 -41
  92. package/dist/esm/extractor/buildClassName.native.js.map +3 -3
  93. package/dist/esm/extractor/bundle.js +6 -4
  94. package/dist/esm/extractor/bundle.js.map +1 -1
  95. package/dist/esm/extractor/bundle.mjs +7 -5
  96. package/dist/esm/extractor/bundle.native.js +321 -56
  97. package/dist/esm/extractor/bundle.native.js.map +3 -3
  98. package/dist/esm/extractor/bundleConfig.native.js +499 -187
  99. package/dist/esm/extractor/bundleConfig.native.js.map +3 -3
  100. package/dist/esm/extractor/createEvaluator.native.js +9 -11
  101. package/dist/esm/extractor/createEvaluator.native.js.map +3 -3
  102. package/dist/esm/extractor/createExtractor.native.js +1241 -916
  103. package/dist/esm/extractor/createExtractor.native.js.map +3 -3
  104. package/dist/esm/extractor/ensureImportingConcat.native.js +11 -16
  105. package/dist/esm/extractor/ensureImportingConcat.native.js.map +3 -3
  106. package/dist/esm/extractor/esbuildAliasPlugin.native.js +22 -11
  107. package/dist/esm/extractor/esbuildAliasPlugin.native.js.map +3 -3
  108. package/dist/esm/extractor/evaluateAstNode.native.js +15 -21
  109. package/dist/esm/extractor/evaluateAstNode.native.js.map +3 -3
  110. package/dist/esm/extractor/extractHelpers.native.js +146 -38
  111. package/dist/esm/extractor/extractHelpers.native.js.map +3 -3
  112. package/dist/esm/extractor/extractMediaStyle.native.js +127 -54
  113. package/dist/esm/extractor/extractMediaStyle.native.js.map +3 -3
  114. package/dist/esm/extractor/extractToClassNames.native.js +449 -252
  115. package/dist/esm/extractor/extractToClassNames.native.js.map +3 -3
  116. package/dist/esm/extractor/findTopmostFunction.native.js +4 -4
  117. package/dist/esm/extractor/findTopmostFunction.native.js.map +3 -3
  118. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js +415 -54
  119. package/dist/esm/extractor/generateTamaguiStudioConfig.native.js.map +3 -3
  120. package/dist/esm/extractor/generatedUid.native.js +2 -2
  121. package/dist/esm/extractor/generatedUid.native.js.map +3 -3
  122. package/dist/esm/extractor/getPrefixLogs.native.js +2 -1
  123. package/dist/esm/extractor/getPrefixLogs.native.js.map +3 -3
  124. package/dist/esm/extractor/getPropValueFromAttributes.native.js +16 -19
  125. package/dist/esm/extractor/getPropValueFromAttributes.native.js.map +3 -3
  126. package/dist/esm/extractor/getSourceModule.native.js +20 -7
  127. package/dist/esm/extractor/getSourceModule.native.js.map +3 -3
  128. package/dist/esm/extractor/getStaticBindingsForScope.native.js +336 -94
  129. package/dist/esm/extractor/getStaticBindingsForScope.native.js.map +3 -3
  130. package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +3 -3
  131. package/dist/esm/extractor/hoistClassNames.native.js +8 -10
  132. package/dist/esm/extractor/hoistClassNames.native.js.map +3 -3
  133. package/dist/esm/extractor/literalToAst.native.js +89 -19
  134. package/dist/esm/extractor/literalToAst.native.js.map +3 -3
  135. package/dist/esm/extractor/loadFile.native.js +16 -8
  136. package/dist/esm/extractor/loadFile.native.js.map +3 -3
  137. package/dist/esm/extractor/loadTamagui.js +1 -2
  138. package/dist/esm/extractor/loadTamagui.js.map +1 -1
  139. package/dist/esm/extractor/loadTamagui.mjs +5 -3
  140. package/dist/esm/extractor/loadTamagui.native.js +668 -203
  141. package/dist/esm/extractor/loadTamagui.native.js.map +3 -3
  142. package/dist/esm/extractor/logLines.native.js +24 -6
  143. package/dist/esm/extractor/logLines.native.js.map +3 -3
  144. package/dist/esm/extractor/normalizeTernaries.native.js +71 -20
  145. package/dist/esm/extractor/normalizeTernaries.native.js.map +3 -3
  146. package/dist/esm/extractor/propsToFontFamilyCache.native.js +3 -3
  147. package/dist/esm/extractor/propsToFontFamilyCache.native.js.map +3 -3
  148. package/dist/esm/extractor/removeUnusedHooks.native.js +69 -35
  149. package/dist/esm/extractor/removeUnusedHooks.native.js.map +3 -3
  150. package/dist/esm/extractor/timer.native.js +10 -9
  151. package/dist/esm/extractor/timer.native.js.map +3 -3
  152. package/dist/esm/extractor/validHTMLAttributes.native.js +1 -1
  153. package/dist/esm/extractor/validHTMLAttributes.native.js.map +3 -3
  154. package/dist/esm/getPragmaOptions.native.js +4 -9
  155. package/dist/esm/getPragmaOptions.native.js.map +3 -3
  156. package/dist/esm/helpers/memoize.native.js +5 -3
  157. package/dist/esm/helpers/memoize.native.js.map +3 -3
  158. package/dist/esm/helpers/requireTamaguiCore.native.js +2 -1
  159. package/dist/esm/helpers/requireTamaguiCore.native.js.map +3 -3
  160. package/dist/esm/index.native.js.map +1 -1
  161. package/dist/esm/minifyCSS.native.js.map +3 -3
  162. package/dist/esm/registerRequire.native.js +56 -28
  163. package/dist/esm/registerRequire.native.js.map +3 -3
  164. package/dist/esm/server.native.js +175 -21
  165. package/dist/esm/server.native.js.map +3 -3
  166. package/dist/esm/setup.native.js.map +3 -3
  167. package/dist/esm/static.native.js.map +3 -3
  168. package/dist/esm/webpackPlugin.native.js +26 -5
  169. package/dist/esm/webpackPlugin.native.js.map +3 -3
  170. package/package.json +14 -15
  171. package/src/extractor/bundle.ts +5 -2
  172. package/src/extractor/loadTamagui.ts +3 -2
  173. package/types/extractor/bundle.d.ts.map +1 -1
  174. package/types/extractor/loadTamagui.d.ts.map +1 -1
  175. package/tamagui.tsconfig.json +0 -5
@@ -3,79 +3,187 @@ import generate from "@babel/generator";
3
3
  import * as t from "@babel/types";
4
4
  import findRoot from "find-root";
5
5
  import { memoize } from "../helpers/memoize";
6
+ function _array_like_to_array(arr, len) {
7
+ (len == null || len > arr.length) && (len = arr.length);
8
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
9
+ arr2[i] = arr[i];
10
+ return arr2;
11
+ }
12
+ function _array_with_holes(arr) {
13
+ if (Array.isArray(arr))
14
+ return arr;
15
+ }
16
+ function _array_without_holes(arr) {
17
+ if (Array.isArray(arr))
18
+ return _array_like_to_array(arr);
19
+ }
20
+ function _iterable_to_array(iter) {
21
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
22
+ return Array.from(iter);
23
+ }
24
+ function _iterable_to_array_limit(arr, i) {
25
+ var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
26
+ if (_i != null) {
27
+ var _arr = [], _n = !0, _d = !1, _s, _e;
28
+ try {
29
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
30
+ ;
31
+ } catch (err) {
32
+ _d = !0, _e = err;
33
+ } finally {
34
+ try {
35
+ !_n && _i.return != null && _i.return();
36
+ } finally {
37
+ if (_d)
38
+ throw _e;
39
+ }
40
+ }
41
+ return _arr;
42
+ }
43
+ }
44
+ function _non_iterable_rest() {
45
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
46
+ }
47
+ function _non_iterable_spread() {
48
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
49
+ }
50
+ function _sliced_to_array(arr, i) {
51
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
52
+ }
53
+ function _to_consumable_array(arr) {
54
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
55
+ }
56
+ function _unsupported_iterable_to_array(o, minLen) {
57
+ if (o) {
58
+ if (typeof o == "string")
59
+ return _array_like_to_array(o, minLen);
60
+ var n = Object.prototype.toString.call(o).slice(8, -1);
61
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
62
+ return Array.from(n);
63
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
64
+ return _array_like_to_array(o, minLen);
65
+ }
66
+ }
6
67
  function isPresent(input) {
7
68
  return input != null;
8
69
  }
9
70
  function isSimpleSpread(node) {
10
71
  return t.isIdentifier(node.argument) || t.isMemberExpression(node.argument);
11
72
  }
12
- const attrStr = (attr) => attr ? attr.type === "attr" ? getNameAttr(attr.value) : attr.type === "ternary" ? `...${ternaryStr(attr.value)}` : `${attr.type}(${objToStr(attr.value)})` : "", objToStr = (obj, spacer = ", ") => obj ? `{${Object.entries(obj).map(
13
- ([k, v]) => `${k}:${Array.isArray(v) ? "[...]" : v && typeof v == "object" ? `${objToStr(v, ",")}` : JSON.stringify(v)}`
14
- ).join(spacer)}}` : `${obj}`, getNameAttr = (attr) => t.isJSXSpreadAttribute(attr) ? `...${attr.argument.name}` : "name" in attr ? attr.name.name : `unknown-${attr.type}`, ternaryStr = (x) => [
15
- "ternary(",
16
- t.isIdentifier(x.test) ? x.test.name : t.isMemberExpression(x.test) ? [x.test.object.name, x.test.property.name] : (
17
- // @ts-ignore
18
- generate(x.test).code
19
- ),
20
- isFilledObj(x.consequent) ? ` ? ${objToStr(x.consequent)}` : " ? \u{1F6AB}",
21
- isFilledObj(x.alternate) ? ` : ${objToStr(x.alternate)}` : " : \u{1F6AB}",
22
- ")"
23
- ].flat().join(""), isFilledObj = (obj) => obj && Object.keys(obj).length;
73
+ var attrStr = function(attr) {
74
+ return attr ? attr.type === "attr" ? getNameAttr(attr.value) : attr.type === "ternary" ? "...".concat(ternaryStr(attr.value)) : "".concat(attr.type, "(").concat(objToStr(attr.value), ")") : "";
75
+ }, objToStr = function(obj) {
76
+ var spacer = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ", ";
77
+ return obj ? "{".concat(Object.entries(obj).map(function(param) {
78
+ var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
79
+ return "".concat(k, ":").concat(Array.isArray(v) ? "[...]" : v && typeof v == "object" ? "".concat(objToStr(v, ",")) : JSON.stringify(v));
80
+ }).join(spacer), "}") : "".concat(obj);
81
+ }, getNameAttr = function(attr) {
82
+ return t.isJSXSpreadAttribute(attr) ? "...".concat(attr.argument.name) : "name" in attr ? attr.name.name : "unknown-".concat(attr.type);
83
+ }, ternaryStr = function(x) {
84
+ var conditional = t.isIdentifier(x.test) ? x.test.name : t.isMemberExpression(x.test) ? [
85
+ x.test.object.name,
86
+ x.test.property.name
87
+ ] : generate(x.test).code;
88
+ return [
89
+ "ternary(",
90
+ conditional,
91
+ isFilledObj(x.consequent) ? " ? ".concat(objToStr(x.consequent)) : " ? \u{1F6AB}",
92
+ isFilledObj(x.alternate) ? " : ".concat(objToStr(x.alternate)) : " : \u{1F6AB}",
93
+ ")"
94
+ ].flat().join("");
95
+ }, isFilledObj = function(obj) {
96
+ return obj && Object.keys(obj).length;
97
+ };
24
98
  function findComponentName(scope) {
25
- var _a;
26
- const componentName = "";
27
- let cur = scope.path;
28
- for (; cur.parentPath && !t.isProgram(cur.parentPath.parent); )
99
+ for (var componentName = "", cur = scope.path; cur.parentPath && !t.isProgram(cur.parentPath.parent); )
29
100
  cur = cur.parentPath;
30
- let node = cur.parent;
101
+ var node = cur.parent;
31
102
  if (t.isExportNamedDeclaration(node) && (node = node.declaration), t.isVariableDeclaration(node)) {
32
- const [dec] = node.declarations;
103
+ var _node_declarations = _sliced_to_array(node.declarations, 1), dec = _node_declarations[0];
33
104
  if (t.isVariableDeclarator(dec) && t.isIdentifier(dec.id))
34
105
  return dec.id.name;
35
106
  }
36
- return t.isFunctionDeclaration(node) ? (_a = node.id) == null ? void 0 : _a.name : componentName;
107
+ if (t.isFunctionDeclaration(node)) {
108
+ var _node_id;
109
+ return (_node_id = node.id) === null || _node_id === void 0 ? void 0 : _node_id.name;
110
+ }
111
+ return componentName;
37
112
  }
38
113
  function isValidThemeHook(props, jsxPath, n, sourcePath) {
39
- var _a;
114
+ var _binding_scope_getBinding;
40
115
  if (!t.isIdentifier(n.object) || !t.isIdentifier(n.property))
41
116
  return !1;
42
- const binding = jsxPath.scope.getAllBindings()[n.object.name];
117
+ var bindings = jsxPath.scope.getAllBindings(), binding = bindings[n.object.name];
43
118
  if (!(binding != null && binding.path) || !binding.path.isVariableDeclarator())
44
119
  return !1;
45
- const init = binding.path.node.init;
120
+ var init = binding.path.node.init;
46
121
  if (!init || !t.isCallExpression(init) || !t.isIdentifier(init.callee) || init.callee.name !== "useTheme")
47
122
  return !1;
48
- const importNode = (_a = binding.scope.getBinding("useTheme")) == null ? void 0 : _a.path.parent;
123
+ var importNode = (_binding_scope_getBinding = binding.scope.getBinding("useTheme")) === null || _binding_scope_getBinding === void 0 ? void 0 : _binding_scope_getBinding.path.parent;
49
124
  return !(!t.isImportDeclaration(importNode) || sourcePath && !isValidImport(props, sourcePath));
50
125
  }
51
- const isInsideComponentPackage = (props, moduleName) => getValidComponentsPaths(props).some((path) => moduleName.startsWith(path)), isComponentPackage = (props, srcName) => getValidComponentsPaths(props).some((path) => srcName.startsWith(path));
126
+ var isInsideComponentPackage = function(props, moduleName) {
127
+ return getValidComponentsPaths(props).some(function(path) {
128
+ return moduleName.startsWith(path);
129
+ });
130
+ }, isComponentPackage = function(props, srcName) {
131
+ return getValidComponentsPaths(props).some(function(path) {
132
+ return srcName.startsWith(path);
133
+ });
134
+ };
52
135
  function getValidComponent(props, moduleName, componentName) {
53
136
  if (componentName[0].toUpperCase() !== componentName[0])
54
137
  return !1;
55
- for (const loaded of props.allLoadedComponents) {
56
- if (!loaded)
57
- continue;
58
- const isInModule = moduleName === "*" || moduleName.startsWith(loaded.moduleName), foundComponent = loaded.nameToInfo[componentName];
59
- if (isInModule && foundComponent)
60
- return foundComponent;
138
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
139
+ try {
140
+ for (var _iterator = props.allLoadedComponents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
141
+ var loaded = _step.value;
142
+ if (loaded) {
143
+ var isInModule = moduleName === "*" || moduleName.startsWith(loaded.moduleName), foundComponent = loaded.nameToInfo[componentName];
144
+ if (isInModule && foundComponent)
145
+ return foundComponent;
146
+ }
147
+ }
148
+ } catch (err) {
149
+ _didIteratorError = !0, _iteratorError = err;
150
+ } finally {
151
+ try {
152
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
153
+ } finally {
154
+ if (_didIteratorError)
155
+ throw _iteratorError;
156
+ }
61
157
  }
62
158
  return null;
63
159
  }
64
- const isValidModule = (props, moduleName) => {
160
+ var isValidModule = function(props, moduleName) {
65
161
  if (typeof moduleName != "string")
66
162
  throw new Error("No module name");
67
- const isLocal = moduleName.startsWith(".");
163
+ var isLocal = moduleName.startsWith(".");
68
164
  return {
69
165
  isLocal,
70
166
  isValid: isLocal ? isInsideComponentPackage(props, moduleName) : isComponentPackage(props, moduleName)
71
167
  };
72
- }, getValidImport = (props, moduleName, componentName) => {
73
- const { isValid, isLocal } = isValidModule(props, moduleName);
168
+ }, getValidImport = function(props, moduleName, componentName) {
169
+ var _isValidModule = isValidModule(props, moduleName), isValid = _isValidModule.isValid, isLocal = _isValidModule.isLocal;
74
170
  return !isValid || !componentName ? null : getValidComponent(props, isLocal ? "*" : moduleName, componentName) || null;
75
- }, isValidImport = (props, moduleName, componentName) => componentName ? !!getValidImport(props, moduleName, componentName) : isValidModule(props, moduleName).isValid, getValidComponentPackages = memoize((props) => [.../* @__PURE__ */ new Set(["@tamagui/core", "tamagui", ...props.components])]), getValidComponentsPaths = memoize((props) => getValidComponentPackages(props).flatMap((pkg) => {
76
- const root = findRoot(pkg);
77
- return [basename(root), pkg].filter(Boolean);
78
- }));
171
+ }, isValidImport = function(props, moduleName, componentName) {
172
+ return componentName ? !!getValidImport(props, moduleName, componentName) : isValidModule(props, moduleName).isValid;
173
+ }, getValidComponentPackages = memoize(function(props) {
174
+ return _to_consumable_array(new Set([
175
+ "@tamagui/core",
176
+ "tamagui"
177
+ ].concat(_to_consumable_array(props.components))));
178
+ }), getValidComponentsPaths = memoize(function(props) {
179
+ return getValidComponentPackages(props).flatMap(function(pkg) {
180
+ var root = findRoot(pkg), based = basename(root);
181
+ return [
182
+ based,
183
+ pkg
184
+ ].filter(Boolean);
185
+ });
186
+ });
79
187
  export {
80
188
  attrStr,
81
189
  findComponentName,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/extractHelpers.ts"],
4
- "mappings": "AAAA,SAAS,gBAAgB;AAE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C,UAAU,CAAA,CAAA,CAAA;AACrE,CAAA,GAEapB,0BAA0B1E,QAAQ,SAAC0D,OAAAA;AAC9C,SAAOkC,0BAA0BlC,KAAAA,EAAOqC,QAAQ,SAACC,KAAAA;AAC/C,QAAMC,OAAOlG,SAASiG,GAAAA,GAChBE,QAAQtG,SAASqG,IAAAA;AACvB,WAAO;MAACC;MAAOF;MAAKG,OAAOR,OAAAA;EAC7B,CAAA;AACF,CAAA;",
5
+ "names": ["basename", "generate", "t", "findRoot", "memoize", "isPresent", "input", "isSimpleSpread", "node", "isIdentifier", "argument", "isMemberExpression", "attrStr", "attr", "type", "getNameAttr", "value", "ternaryStr", "objToStr", "obj", "spacer", "Object", "entries", "map", "k", "v", "Array", "isArray", "JSON", "stringify", "join", "isJSXSpreadAttribute", "name", "x", "conditional", "test", "object", "property", "code", "isFilledObj", "consequent", "alternate", "flat", "keys", "length", "findComponentName", "scope", "componentName", "cur", "path", "parentPath", "isProgram", "parent", "isExportNamedDeclaration", "declaration", "isVariableDeclaration", "declarations", "dec", "isVariableDeclarator", "id", "isFunctionDeclaration", "isValidThemeHook", "props", "jsxPath", "n", "sourcePath", "binding", "bindings", "getAllBindings", "init", "isCallExpression", "callee", "importNode", "getBinding", "isImportDeclaration", "isValidImport", "isInsideComponentPackage", "moduleName", "getValidComponentsPaths", "some", "startsWith", "isComponentPackage", "srcName", "getValidComponent", "toUpperCase", "allLoadedComponents", "loaded", "isInModule", "foundComponent", "nameToInfo", "isValidModule", "Error", "isLocal", "isValid", "getValidImport", "Boolean", "getValidComponentPackages", "Set", "components", "flatMap", "pkg", "root", "based", "filter"]
6
6
  }
@@ -2,95 +2,168 @@ import * as t from "@babel/types";
2
2
  import { createMediaStyle } from "@tamagui/core";
3
3
  import { requireTamaguiCore } from "../helpers/requireTamaguiCore";
4
4
  import { isPresent, isValidImport } from "./extractHelpers";
5
- function extractMediaStyle(props, ternary, jsxPath, tamaguiConfig, sourcePath, importance = 0, shouldPrintDebug = !1) {
6
- const { getStylesAtomic, mediaObjectToString } = requireTamaguiCore("web"), mt = getMediaQueryTernary(props, ternary, jsxPath, sourcePath);
5
+ function _array_like_to_array(arr, len) {
6
+ (len == null || len > arr.length) && (len = arr.length);
7
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
8
+ arr2[i] = arr[i];
9
+ return arr2;
10
+ }
11
+ function _array_without_holes(arr) {
12
+ if (Array.isArray(arr))
13
+ return _array_like_to_array(arr);
14
+ }
15
+ function _define_property(obj, key, value) {
16
+ return key in obj ? Object.defineProperty(obj, key, {
17
+ value,
18
+ enumerable: !0,
19
+ configurable: !0,
20
+ writable: !0
21
+ }) : obj[key] = value, obj;
22
+ }
23
+ function _iterable_to_array(iter) {
24
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
25
+ return Array.from(iter);
26
+ }
27
+ function _non_iterable_spread() {
28
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
29
+ }
30
+ function _object_spread(target) {
31
+ for (var i = 1; i < arguments.length; i++) {
32
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
33
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
34
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
35
+ }))), ownKeys2.forEach(function(key) {
36
+ _define_property(target, key, source[key]);
37
+ });
38
+ }
39
+ return target;
40
+ }
41
+ function ownKeys(object, enumerableOnly) {
42
+ var keys = Object.keys(object);
43
+ if (Object.getOwnPropertySymbols) {
44
+ var symbols = Object.getOwnPropertySymbols(object);
45
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
46
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
47
+ })), keys.push.apply(keys, symbols);
48
+ }
49
+ return keys;
50
+ }
51
+ function _object_spread_props(target, source) {
52
+ return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
53
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
54
+ }), target;
55
+ }
56
+ function _to_consumable_array(arr) {
57
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
58
+ }
59
+ function _unsupported_iterable_to_array(o, minLen) {
60
+ if (o) {
61
+ if (typeof o == "string")
62
+ return _array_like_to_array(o, minLen);
63
+ var n = Object.prototype.toString.call(o).slice(8, -1);
64
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
65
+ return Array.from(n);
66
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
67
+ return _array_like_to_array(o, minLen);
68
+ }
69
+ }
70
+ function extractMediaStyle(props, ternary, jsxPath, tamaguiConfig, sourcePath) {
71
+ var importance = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0, shouldPrintDebug = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : !1, _requireTamaguiCore = requireTamaguiCore("web"), getStylesAtomic = _requireTamaguiCore.getStylesAtomic, mediaObjectToString = _requireTamaguiCore.mediaObjectToString, mt = getMediaQueryTernary(props, ternary, jsxPath, sourcePath);
7
72
  if (!mt)
8
73
  return null;
9
- const { key } = mt;
10
- if (!tamaguiConfig.media[key])
11
- return console.error(`Media query "${key}" not found: ${Object.keys(tamaguiConfig.media)}`), null;
12
- const getStyleObj = (styleObj, negate = !1) => styleObj ? { styleObj, negate } : null, styleOpts = [
74
+ var key = mt.key, mq = tamaguiConfig.media[key];
75
+ if (!mq)
76
+ return console.error('Media query "'.concat(key, '" not found: ').concat(Object.keys(tamaguiConfig.media))), null;
77
+ var getStyleObj = function(styleObj) {
78
+ var negate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
79
+ return styleObj ? {
80
+ styleObj,
81
+ negate
82
+ } : null;
83
+ }, styleOpts = [
13
84
  getStyleObj(ternary.consequent, !1),
14
85
  getStyleObj(ternary.alternate, !0)
15
86
  ].filter(isPresent);
16
87
  if (shouldPrintDebug && !styleOpts.length)
17
88
  return console.info(" media query, no styles?"), null;
18
- const mediaKeyPrecendence = Object.keys(tamaguiConfig.media).reduce((acc, cur, i) => (acc[cur] = new Array(importance + 1).fill(":root").join(""), acc), {});
19
- let mediaStyles = [];
20
- for (const { styleObj, negate } of styleOpts) {
21
- const singleMediaStyles = getStylesAtomic(styleObj).map((style) => {
22
- const mediaStyle = createMediaStyle(style, key, tamaguiConfig.media, !0, negate), className = `.${mediaStyle.identifier}`;
23
- return {
24
- ...mediaStyle,
25
- className
26
- };
27
- });
28
- shouldPrintDebug === "verbose" && console.info(
29
- " media styles:",
30
- importance,
31
- styleObj,
32
- singleMediaStyles.map((x) => x.identifier).join(", ")
33
- ), mediaStyles = [...mediaStyles, ...singleMediaStyles];
89
+ var mediaKeys = Object.keys(tamaguiConfig.media), mediaKeyPrecendence = mediaKeys.reduce(function(acc, cur, i) {
90
+ return acc[cur] = new Array(importance + 1).fill(":root").join(""), acc;
91
+ }, {}), mediaStyles = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
92
+ try {
93
+ for (var _loop = function() {
94
+ var _step_value = _step.value, styleObj = _step_value.styleObj, negate = _step_value.negate, styles = getStylesAtomic(styleObj), singleMediaStyles = styles.map(function(style) {
95
+ var mediaStyle = createMediaStyle(style, key, tamaguiConfig.media, !0, negate), className = ".".concat(mediaStyle.identifier);
96
+ return _object_spread_props(_object_spread({}, mediaStyle), {
97
+ className
98
+ });
99
+ });
100
+ shouldPrintDebug === "verbose" && console.info(" media styles:", importance, styleObj, singleMediaStyles.map(function(x) {
101
+ return x.identifier;
102
+ }).join(", ")), mediaStyles = _to_consumable_array(mediaStyles).concat(_to_consumable_array(singleMediaStyles));
103
+ }, _iterator = styleOpts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
104
+ _loop();
105
+ } catch (err) {
106
+ _didIteratorError = !0, _iteratorError = err;
107
+ } finally {
108
+ try {
109
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
110
+ } finally {
111
+ if (_didIteratorError)
112
+ throw _iteratorError;
113
+ }
34
114
  }
35
- return ternary.remove(), { mediaStyles, ternaryWithoutMedia: mt.ternaryWithoutMedia };
115
+ return ternary.remove(), {
116
+ mediaStyles,
117
+ ternaryWithoutMedia: mt.ternaryWithoutMedia
118
+ };
36
119
  }
37
120
  function getMediaQueryTernary(props, ternary, jsxPath, sourcePath) {
38
121
  if (t.isLogicalExpression(ternary.test) && ternary.test.operator === "&&") {
39
- const mediaLeft = getMediaInfoFromExpression(
40
- props,
41
- ternary.test.left,
42
- jsxPath,
43
- sourcePath,
44
- ternary.inlineMediaQuery
45
- );
122
+ var mediaLeft = getMediaInfoFromExpression(props, ternary.test.left, jsxPath, sourcePath, ternary.inlineMediaQuery);
46
123
  if (mediaLeft)
47
- return {
48
- ...mediaLeft,
49
- ternaryWithoutMedia: {
50
- ...ternary,
124
+ return _object_spread_props(_object_spread({}, mediaLeft), {
125
+ ternaryWithoutMedia: _object_spread_props(_object_spread({}, ternary), {
51
126
  test: ternary.test.right
52
- }
53
- };
127
+ })
128
+ });
54
129
  }
55
- const result = getMediaInfoFromExpression(
56
- props,
57
- ternary.test,
58
- jsxPath,
59
- sourcePath,
60
- ternary.inlineMediaQuery
61
- );
62
- return result ? {
63
- ...result,
130
+ var result = getMediaInfoFromExpression(props, ternary.test, jsxPath, sourcePath, ternary.inlineMediaQuery);
131
+ return result ? _object_spread_props(_object_spread({}, result), {
64
132
  ternaryWithoutMedia: null
65
- } : null;
133
+ }) : null;
66
134
  }
67
135
  function getMediaInfoFromExpression(props, test, jsxPath, sourcePath, inlineMediaQuery) {
68
- var _a, _b, _c;
69
136
  if (inlineMediaQuery)
70
137
  return {
71
138
  key: inlineMediaQuery,
72
139
  bindingName: inlineMediaQuery
73
140
  };
74
141
  if (t.isMemberExpression(test) && t.isIdentifier(test.object) && t.isIdentifier(test.property)) {
75
- const name = test.object.name, key = test.property.name, binding = jsxPath.scope.getAllBindings()[name];
142
+ var _binding_path, name = test.object.name, key = test.property.name, bindings = jsxPath.scope.getAllBindings(), binding = bindings[name];
76
143
  if (!binding)
77
144
  return !1;
78
- const bindingNode = (_a = binding.path) == null ? void 0 : _a.node;
79
- return !t.isVariableDeclarator(bindingNode) || !bindingNode.init || !isValidMediaCall(props, jsxPath, bindingNode.init, sourcePath) ? !1 : { key, bindingName: name };
145
+ var bindingNode = (_binding_path = binding.path) === null || _binding_path === void 0 ? void 0 : _binding_path.node;
146
+ return !t.isVariableDeclarator(bindingNode) || !bindingNode.init || !isValidMediaCall(props, jsxPath, bindingNode.init, sourcePath) ? !1 : {
147
+ key,
148
+ bindingName: name
149
+ };
80
150
  }
81
151
  if (t.isIdentifier(test)) {
82
- const key = test.name, node = (_c = (_b = jsxPath.scope.getBinding(test.name)) == null ? void 0 : _b.path) == null ? void 0 : _c.node;
83
- return !t.isVariableDeclarator(node) || !node.init || !isValidMediaCall(props, jsxPath, node.init, sourcePath) ? !1 : { key, bindingName: key };
152
+ var _jsxPath_scope_getBinding_path, _jsxPath_scope_getBinding, key1 = test.name, node = (_jsxPath_scope_getBinding = jsxPath.scope.getBinding(test.name)) === null || _jsxPath_scope_getBinding === void 0 || (_jsxPath_scope_getBinding_path = _jsxPath_scope_getBinding.path) === null || _jsxPath_scope_getBinding_path === void 0 ? void 0 : _jsxPath_scope_getBinding_path.node;
153
+ return !t.isVariableDeclarator(node) || !node.init || !isValidMediaCall(props, jsxPath, node.init, sourcePath) ? !1 : {
154
+ key: key1,
155
+ bindingName: key1
156
+ };
84
157
  }
85
158
  return null;
86
159
  }
87
160
  function isValidMediaCall(props, jsxPath, init, sourcePath) {
88
161
  if (!init || !t.isCallExpression(init) || !t.isIdentifier(init.callee) || init.callee.name !== "useMedia")
89
162
  return !1;
90
- const mediaBinding = jsxPath.scope.getAllBindings().useMedia;
163
+ var bindings = jsxPath.scope.getAllBindings(), mediaBinding = bindings.useMedia;
91
164
  if (!mediaBinding)
92
165
  return !1;
93
- const useMediaImport = mediaBinding.path.parent;
166
+ var useMediaImport = mediaBinding.path.parent;
94
167
  return !(!t.isImportDeclaration(useMediaImport) || !isValidImport(props, sourcePath));
95
168
  }
96
169
  export {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/extractor/extractMediaStyle.ts"],
4
- "mappings": "AACA,YAAY,OAAO;AAEnB,SAAS,wBAAwB;AAGjC,SAAS,0BAA0B;AAEnC,SAAS,WAAW,qBAAqB;AAElC,SAAS,kBACd,OACA,SACA,SACA,eACA,YACA,aAAa,GACb,mBAAwC,IACxC;AACA,QAAM,EAAE,iBAAiB,oBAAoB,IAAI,mBAAmB,KAAK,GACnE,KAAK,qBAAqB,OAAO,SAAS,SAAS,UAAU;AACnE,MAAI,CAAC;AACH,WAAO;AAET,QAAM,EAAE,IAAI,IAAI;AAEhB,MAAI,CADO,cAAc,MAAM,GAAG;AAEhC,mBAAQ,MAAM,gBAAgB,GAAG,gBAAgB,OAAO,KAAK,cAAc,KAAK,CAAC,EAAE,GAC5E;AAET,QAAM,cAAc,CAAC,UAA4B,SAAS,OACjD,WAAW,EAAE,UAAU,OAAO,IAAI,MAErC,YAAY;AAAA,IAChB,YAAY,QAAQ,YAAY,EAAK;AAAA,IACrC,YAAY,QAAQ,WAAW,EAAI;AAAA,EACrC,EAAE,OAAO,SAAS;AAClB,MAAI,oBAAoB,CAAC,UAAU;AACjC,mBAAQ,KAAK,2BAA2B,GACjC;AAIT,QAAM,sBADY,OAAO,KAAK,cAAc,KAAK,EACX,OAAO,CAAC,KAAK,KAAK,OACtD,IAAI,GAAG,IAAI,IAAI,MAAM,aAAa,CAAC,EAAE,KAAK,OAAO,EAAE,KAAK,EAAE,GACnD,MACN,CAAC,CAAC;AACL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AAA,IACtD,KACF;MAAEO,KAAAA;MAAK6C,aAAa7C;IAAI;EACjC;AACA,SAAO;AACT;AAEO,SAAS4D,iBACdvE,OACAE,SACAoE,MACAlE,YAAkB;AAKlB,MAHI,CAACkE,QAAQ,CAAC5E,EAAE+E,iBAAiBH,IAAAA,KAC7B,CAAC5E,EAAEgE,aAAaY,KAAKI,MAAM,KAE3BJ,KAAKI,OAAOZ,SAAS;AAAY,WAAO;AAC5C,MAAMC,WAAW7D,QAAQ8D,MAAMC,eAAc,GACvCU,eAAeZ,SAAS;AAC9B,MAAI,CAACY;AAAc,WAAO;AAC1B,MAAMC,iBAAiBD,aAAaR,KAAKU;AAEzC,SADI,GAACnF,EAAEoF,oBAAoBF,cAAAA,KACvB,CAAC9E,cAAcE,OAAOI,UAAAA;AAI5B;",
5
+ "names": ["t", "createMediaStyle", "requireTamaguiCore", "isPresent", "isValidImport", "extractMediaStyle", "props", "ternary", "jsxPath", "tamaguiConfig", "sourcePath", "importance", "shouldPrintDebug", "getStylesAtomic", "mediaObjectToString", "mt", "getMediaQueryTernary", "key", "mq", "media", "console", "error", "Object", "keys", "getStyleObj", "styleObj", "negate", "styleOpts", "consequent", "alternate", "filter", "length", "info", "mediaKeys", "mediaKeyPrecendence", "reduce", "acc", "cur", "i", "Array", "fill", "join", "mediaStyles", "styles", "singleMediaStyles", "map", "style", "mediaStyle", "className", "identifier", "x", "remove", "ternaryWithoutMedia", "isLogicalExpression", "test", "operator", "mediaLeft", "getMediaInfoFromExpression", "left", "inlineMediaQuery", "right", "result", "bindingName", "isMemberExpression", "isIdentifier", "object", "property", "binding", "name", "bindings", "scope", "getAllBindings", "bindingNode", "path", "node", "isVariableDeclarator", "init", "isValidMediaCall", "getBinding", "isCallExpression", "callee", "mediaBinding", "useMediaImport", "parent", "isImportDeclaration"]
6
6
  }