@tamagui/core 1.0.1-beta.68 → 1.0.1-beta.71

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 (219) hide show
  1. package/dist/cjs/constants/rnw.js +2 -13
  2. package/dist/cjs/constants/rnw.js.map +2 -2
  3. package/dist/cjs/createComponent.js +29 -22
  4. package/dist/cjs/createComponent.js.map +2 -2
  5. package/dist/cjs/helpers/createPropMapper.js +3 -0
  6. package/dist/cjs/helpers/createPropMapper.js.map +2 -2
  7. package/dist/cjs/helpers/generateAtomicStyles.js +133 -89
  8. package/dist/cjs/helpers/generateAtomicStyles.js.map +2 -2
  9. package/dist/cjs/helpers/getSplitStyles.js +22 -20
  10. package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
  11. package/dist/cjs/helpers/getStylesAtomic.js +22 -67
  12. package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
  13. package/dist/cjs/helpers/pseudos.js.map +1 -1
  14. package/dist/cjs/views/Text.js +2 -1
  15. package/dist/cjs/views/Text.js.map +2 -2
  16. package/dist/esm/constants/rnw.js +2 -13
  17. package/dist/esm/constants/rnw.js.map +2 -2
  18. package/dist/esm/createComponent.js +29 -22
  19. package/dist/esm/createComponent.js.map +2 -2
  20. package/dist/esm/helpers/createPropMapper.js +3 -0
  21. package/dist/esm/helpers/createPropMapper.js.map +2 -2
  22. package/dist/esm/helpers/generateAtomicStyles.js +133 -89
  23. package/dist/esm/helpers/generateAtomicStyles.js.map +2 -2
  24. package/dist/esm/helpers/getSplitStyles.js +22 -21
  25. package/dist/esm/helpers/getSplitStyles.js.map +2 -2
  26. package/dist/esm/helpers/getStylesAtomic.js +22 -67
  27. package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
  28. package/dist/esm/helpers/pseudos.js.map +1 -1
  29. package/dist/esm/views/Text.js +2 -1
  30. package/dist/esm/views/Text.js.map +2 -2
  31. package/dist/jsx/constants/rnw.js +2 -13
  32. package/dist/jsx/createComponent.js +29 -22
  33. package/dist/jsx/helpers/createPropMapper.js +3 -0
  34. package/dist/jsx/helpers/generateAtomicStyles.js +133 -89
  35. package/dist/jsx/helpers/getSplitStyles.js +22 -21
  36. package/dist/jsx/helpers/getStylesAtomic.js +22 -67
  37. package/dist/jsx/views/Text.js +2 -1
  38. package/package.json +6 -6
  39. package/reset.css +0 -1
  40. package/types/Pressability.d.ts +0 -0
  41. package/types/Pressability.d.ts.map +0 -0
  42. package/types/Pressability.native.d.ts +0 -0
  43. package/types/Pressability.native.d.ts.map +0 -0
  44. package/types/Tamagui.d.ts +0 -0
  45. package/types/Tamagui.d.ts.map +0 -0
  46. package/types/ThemeContext.d.ts +0 -0
  47. package/types/ThemeContext.d.ts.map +0 -0
  48. package/types/ThemeManager.d.ts +0 -0
  49. package/types/ThemeManager.d.ts.map +0 -0
  50. package/types/conf.d.ts +0 -0
  51. package/types/conf.d.ts.map +0 -0
  52. package/types/constants/constants.d.ts +0 -0
  53. package/types/constants/constants.d.ts.map +0 -0
  54. package/types/constants/platform.d.ts +0 -0
  55. package/types/constants/platform.d.ts.map +0 -0
  56. package/types/constants/rnw.d.ts +0 -0
  57. package/types/constants/rnw.d.ts.map +1 -1
  58. package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
  59. package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -0
  60. package/types/createComponent.d.ts +0 -0
  61. package/types/createComponent.d.ts.map +1 -1
  62. package/types/createFont.d.ts +0 -0
  63. package/types/createFont.d.ts.map +0 -0
  64. package/types/createShorthands.d.ts +0 -0
  65. package/types/createShorthands.d.ts.map +0 -0
  66. package/types/createTamagui.d.ts +0 -0
  67. package/types/createTamagui.d.ts.map +0 -0
  68. package/types/createTheme.d.ts +0 -0
  69. package/types/createTheme.d.ts.map +0 -0
  70. package/types/createTokens.d.ts +0 -0
  71. package/types/createTokens.d.ts.map +0 -0
  72. package/types/createVariable.d.ts +0 -0
  73. package/types/createVariable.d.ts.map +0 -0
  74. package/types/createVariables.d.ts +0 -0
  75. package/types/createVariables.d.ts.map +0 -0
  76. package/types/defaultComponentState.d.ts +0 -0
  77. package/types/defaultComponentState.d.ts.map +0 -0
  78. package/types/helpers/RNComponents.d.ts +0 -0
  79. package/types/helpers/RNComponents.d.ts.map +0 -0
  80. package/types/helpers/areEqualSets.d.ts +0 -0
  81. package/types/helpers/areEqualSets.d.ts.map +0 -0
  82. package/types/helpers/calc.d.ts +0 -0
  83. package/types/helpers/calc.d.ts.map +0 -0
  84. package/types/helpers/createMediaStyle.d.ts +0 -0
  85. package/types/helpers/createMediaStyle.d.ts.map +0 -0
  86. package/types/helpers/createPropMapper.d.ts +0 -0
  87. package/types/helpers/createPropMapper.d.ts.map +0 -0
  88. package/types/helpers/createShallowUpdate.d.ts +0 -0
  89. package/types/helpers/createShallowUpdate.d.ts.map +0 -0
  90. package/types/helpers/createTamaguiProvider.d.ts +0 -0
  91. package/types/helpers/createTamaguiProvider.d.ts.map +0 -0
  92. package/types/helpers/extendStaticConfig.d.ts +0 -0
  93. package/types/helpers/extendStaticConfig.d.ts.map +0 -0
  94. package/types/helpers/fixNativeShadow.d.ts +0 -0
  95. package/types/helpers/fixNativeShadow.d.ts.map +0 -0
  96. package/types/helpers/fixNativeShadow.native.d.ts +0 -0
  97. package/types/helpers/fixNativeShadow.native.d.ts.map +0 -0
  98. package/types/helpers/generateAtomicStyles.d.ts +3 -12
  99. package/types/helpers/generateAtomicStyles.d.ts.map +1 -1
  100. package/types/helpers/getExpandedShorthands.d.ts +0 -0
  101. package/types/helpers/getExpandedShorthands.d.ts.map +0 -0
  102. package/types/helpers/getSize.d.ts +0 -0
  103. package/types/helpers/getSize.d.ts.map +0 -0
  104. package/types/helpers/getSplitStyles.d.ts +6 -0
  105. package/types/helpers/getSplitStyles.d.ts.map +1 -1
  106. package/types/helpers/getStackSize.d.ts +0 -0
  107. package/types/helpers/getStackSize.d.ts.map +0 -0
  108. package/types/helpers/getStylesAtomic.d.ts +0 -5
  109. package/types/helpers/getStylesAtomic.d.ts.map +1 -1
  110. package/types/helpers/getStylesAtomic.native.d.ts +0 -0
  111. package/types/helpers/getStylesAtomic.native.d.ts.map +0 -0
  112. package/types/helpers/getTextSize.d.ts +0 -0
  113. package/types/helpers/getTextSize.d.ts.map +0 -0
  114. package/types/helpers/getVariantExtras.d.ts +0 -0
  115. package/types/helpers/getVariantExtras.d.ts.map +0 -0
  116. package/types/helpers/insertStyleRule.d.ts +0 -0
  117. package/types/helpers/insertStyleRule.d.ts.map +0 -0
  118. package/types/helpers/isObj.d.ts +0 -0
  119. package/types/helpers/isObj.d.ts.map +0 -0
  120. package/types/helpers/isTamaguiComponent.d.ts +0 -0
  121. package/types/helpers/isTamaguiComponent.d.ts.map +0 -0
  122. package/types/helpers/isTamaguiElement.d.ts +0 -0
  123. package/types/helpers/isTamaguiElement.d.ts.map +0 -0
  124. package/types/helpers/matchMedia.d.ts +0 -0
  125. package/types/helpers/matchMedia.d.ts.map +0 -0
  126. package/types/helpers/matchMedia.native.d.ts +0 -0
  127. package/types/helpers/matchMedia.native.d.ts.map +0 -0
  128. package/types/helpers/mergeProps.d.ts +0 -0
  129. package/types/helpers/mergeProps.d.ts.map +0 -0
  130. package/types/helpers/mergeTransform.d.ts +0 -0
  131. package/types/helpers/mergeTransform.d.ts.map +0 -0
  132. package/types/helpers/nativeGestureHandler.native.d.ts +0 -0
  133. package/types/helpers/nativeGestureHandler.native.d.ts.map +0 -0
  134. package/types/helpers/proxyThemeVariables.d.ts +0 -0
  135. package/types/helpers/proxyThemeVariables.d.ts.map +0 -0
  136. package/types/helpers/pseudos.d.ts +1 -0
  137. package/types/helpers/pseudos.d.ts.map +1 -1
  138. package/types/helpers/registerCSSVariable.d.ts +0 -0
  139. package/types/helpers/registerCSSVariable.d.ts.map +0 -0
  140. package/types/helpers/themeable.d.ts +0 -0
  141. package/types/helpers/themeable.d.ts.map +0 -0
  142. package/types/helpers/validate.d.ts +0 -0
  143. package/types/helpers/validate.d.ts.map +0 -0
  144. package/types/helpers/withStaticProperties.d.ts +0 -0
  145. package/types/helpers/withStaticProperties.d.ts.map +0 -0
  146. package/types/helpers/wrapThemeManagerContext.d.ts +0 -0
  147. package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -0
  148. package/types/hooks/useConstant.d.ts +0 -0
  149. package/types/hooks/useConstant.d.ts.map +0 -0
  150. package/types/hooks/useFeatures.d.ts +0 -0
  151. package/types/hooks/useFeatures.d.ts.map +0 -0
  152. package/types/hooks/useId.d.ts +0 -0
  153. package/types/hooks/useId.d.ts.map +0 -0
  154. package/types/hooks/useIsMounted.d.ts +0 -0
  155. package/types/hooks/useIsMounted.d.ts.map +0 -0
  156. package/types/hooks/useIsTouchDevice.d.ts +0 -0
  157. package/types/hooks/useIsTouchDevice.d.ts.map +0 -0
  158. package/types/hooks/useMedia.d.ts +0 -0
  159. package/types/hooks/useMedia.d.ts.map +0 -0
  160. package/types/hooks/usePressable.d.ts +0 -0
  161. package/types/hooks/usePressable.d.ts.map +0 -0
  162. package/types/hooks/usePrevious.d.ts +0 -0
  163. package/types/hooks/usePrevious.d.ts.map +0 -0
  164. package/types/hooks/useTheme.d.ts +0 -0
  165. package/types/hooks/useTheme.d.ts.map +0 -0
  166. package/types/hooks/useUnmountEffect.d.ts +0 -0
  167. package/types/hooks/useUnmountEffect.d.ts.map +0 -0
  168. package/types/index.d.ts +0 -0
  169. package/types/index.d.ts.map +0 -0
  170. package/types/insertFont.d.ts +0 -0
  171. package/types/insertFont.d.ts.map +0 -0
  172. package/types/static.d.ts +0 -0
  173. package/types/static.d.ts.map +0 -0
  174. package/types/styled.d.ts +0 -0
  175. package/types/styled.d.ts.map +0 -0
  176. package/types/types-rnw.d.ts +0 -0
  177. package/types/types-rnw.d.ts.map +0 -0
  178. package/types/types.d.ts +0 -0
  179. package/types/types.d.ts.map +0 -0
  180. package/types/views/Slot.d.ts +0 -0
  181. package/types/views/Slot.d.ts.map +0 -0
  182. package/types/views/Stack.d.ts +0 -0
  183. package/types/views/Stack.d.ts.map +0 -0
  184. package/types/views/Text.d.ts +0 -0
  185. package/types/views/Text.d.ts.map +1 -1
  186. package/types/views/TextAncestorContext.d.ts +0 -0
  187. package/types/views/TextAncestorContext.d.ts.map +0 -0
  188. package/types/views/Theme.d.ts +0 -0
  189. package/types/views/Theme.d.ts.map +0 -0
  190. package/types/views/ThemeInverse.d.ts +0 -0
  191. package/types/views/ThemeInverse.d.ts.map +0 -0
  192. package/types/views/ThemeProvider.d.ts +0 -0
  193. package/types/views/ThemeProvider.d.ts.map +0 -0
  194. package/types/views/ThemeReset.d.ts +0 -0
  195. package/types/views/ThemeReset.d.ts.map +0 -0
  196. package/dist/cjs/helpers/nativeGestureHandler.js +0 -29
  197. package/dist/cjs/helpers/nativeGestureHandler.js.map +0 -7
  198. package/dist/cjs/helpers/prefixStyles.js +0 -192
  199. package/dist/cjs/helpers/prefixStyles.js.map +0 -7
  200. package/dist/cjs/nativeGestureHandler.native.js +0 -18
  201. package/dist/cjs/nativeGestureHandler.native.js.map +0 -7
  202. package/dist/cjs/registerCSSVariable.js +0 -41
  203. package/dist/cjs/registerCSSVariable.js.map +0 -7
  204. package/dist/esm/helpers/nativeGestureHandler.js +0 -7
  205. package/dist/esm/helpers/nativeGestureHandler.js.map +0 -7
  206. package/dist/esm/helpers/prefixStyles.js +0 -166
  207. package/dist/esm/helpers/prefixStyles.js.map +0 -7
  208. package/dist/esm/nativeGestureHandler.native.js +0 -2
  209. package/dist/esm/nativeGestureHandler.native.js.map +0 -7
  210. package/dist/esm/registerCSSVariable.js +0 -17
  211. package/dist/esm/registerCSSVariable.js.map +0 -7
  212. package/dist/jsx/helpers/nativeGestureHandler.js +0 -6
  213. package/dist/jsx/helpers/prefixStyles.js +0 -165
  214. package/dist/jsx/nativeGestureHandler.native.js +0 -1
  215. package/dist/jsx/registerCSSVariable.js +0 -16
  216. package/types/helpers/prefixStyles.d.ts +0 -5
  217. package/types/helpers/prefixStyles.d.ts.map +0 -1
  218. package/types/registerCSSVariable.d.ts +0 -5
  219. package/types/registerCSSVariable.d.ts.map +0 -1
@@ -3,8 +3,43 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
  import { simpleHash } from "@tamagui/helpers";
4
4
  import hyphenateStyleName from "hyphenate-style-name";
5
5
  import normalizeCSSColor from "normalize-css-color";
6
+ import { getConfig } from "../conf";
6
7
  import { isWeb } from "../constants/platform";
8
+ import { reversedShorthands } from "../createTamagui";
7
9
  import { pseudos } from "./pseudos";
10
+ const generateAtomicStyles = /* @__PURE__ */ __name((style, pseudo) => {
11
+ const res = expandStyles(style);
12
+ const out = [];
13
+ for (const key in res) {
14
+ const value = res[key];
15
+ if (value != null) {
16
+ const valueString = stringifyValueWithProperty(value, key);
17
+ const hash = simpleHash(key + valueString + ((pseudo == null ? void 0 : pseudo.name) || ""));
18
+ const cachedResult = cache.get(hash, valueString);
19
+ if (cachedResult != null) {
20
+ out.push(cachedResult);
21
+ } else {
22
+ const pseudoPrefix = pseudo ? `0${pseudo.name}-` : "";
23
+ const shortProp = reversedShorthands[key] || key;
24
+ const identifier = `_${shortProp}-${pseudoPrefix}${hash}`;
25
+ const rules = createAtomicRules(identifier, key, valueString, pseudo);
26
+ const styleObject = {
27
+ property: key,
28
+ pseudo: pseudo == null ? void 0 : pseudo.name,
29
+ value,
30
+ identifier,
31
+ rules
32
+ };
33
+ cache.set(hash, valueString, styleObject);
34
+ out.push(styleObject);
35
+ }
36
+ }
37
+ }
38
+ if (style.borderColor === "transparent") {
39
+ debugger;
40
+ }
41
+ return out;
42
+ }, "generateAtomicStyles");
8
43
  const reducedStyleKeys = {
9
44
  shadowColor: true,
10
45
  shadowOffset: true,
@@ -14,58 +49,116 @@ const reducedStyleKeys = {
14
49
  textShadowOffset: true,
15
50
  textShadowRadius: true
16
51
  };
52
+ let shorthands = null;
17
53
  function expandStyles(style) {
18
54
  const res = {};
19
55
  boxShadowReducer(res, style);
20
56
  textShadowReducer(res, style);
21
- for (const key in style) {
57
+ borderReducer(res, style);
58
+ for (let key in style) {
59
+ shorthands = shorthands || getConfig().shorthands;
60
+ if (shorthands) {
61
+ key = shorthands[key] || key;
62
+ }
22
63
  if (reducedStyleKeys[key])
23
64
  continue;
24
65
  if (key in pseudos) {
25
66
  res[key] = expandStyles(style[key]);
26
67
  } else {
27
- updateReactDOMStyle(res, key, style[key]);
68
+ const val = normalizeValueWithProperty(style[key], key);
69
+ const out = expandStyle(key, val);
70
+ if (out) {
71
+ Object.assign(res, Object.fromEntries(out));
72
+ } else {
73
+ res[key] = val;
74
+ }
28
75
  }
29
76
  }
30
77
  return res;
31
78
  }
32
79
  __name(expandStyles, "expandStyles");
33
- function updateReactDOMStyle(style, key, value) {
34
- value = normalizeValueWithProperty(value, key);
35
- const out = expandStyle(key, value);
36
- if (out) {
37
- Object.assign(style, Object.fromEntries(out));
38
- } else {
39
- style[key] = value;
80
+ function borderReducer(res, cur) {
81
+ for (const key in borderDefaults) {
82
+ if (key in cur) {
83
+ res[borderDefaults[key]] = cur[borderDefaults[key]] || "solid";
84
+ }
40
85
  }
41
86
  }
42
- __name(updateReactDOMStyle, "updateReactDOMStyle");
43
- const generateAtomicStyles = /* @__PURE__ */ __name((style) => {
44
- const res = expandStyles(style);
45
- const out = {};
46
- for (const key in res) {
47
- const value = res[key];
48
- if (value != null) {
49
- const valueString = stringifyValueWithProperty(value, key);
50
- const cachedResult = cache.get(key, valueString);
51
- if (cachedResult != null) {
52
- const { identifier } = cachedResult;
53
- out[identifier] = cachedResult;
54
- } else {
55
- const identifier = simpleHash(key + valueString);
56
- const rules = createAtomicRules(identifier, key, valueString);
57
- const cachedResult2 = cache.set(key, valueString, {
58
- property: key,
59
- value: valueString,
60
- identifier,
61
- rules
62
- });
63
- out[identifier] = cachedResult2;
87
+ __name(borderReducer, "borderReducer");
88
+ const borderDefaults = {
89
+ borderWidth: "borderStyle",
90
+ borderBottomWidth: "borderBottomStyle",
91
+ borderTopWidth: "borderTopStyle",
92
+ borderLeftWidth: "borderLeftStyle",
93
+ borderRightWidth: "borderRightStyle"
94
+ };
95
+ function createDeclarationBlock(style, important = false) {
96
+ let declarations = "";
97
+ for (const key in style) {
98
+ const prop = hyphenateStyleName(key);
99
+ const value = style[key];
100
+ declarations += `${prop}:${value}`;
101
+ }
102
+ return `{${declarations}${important ? ` !important` : ""};}`;
103
+ }
104
+ __name(createDeclarationBlock, "createDeclarationBlock");
105
+ const pseudoSelectorPrefixes = (() => {
106
+ const res = {};
107
+ for (const key in pseudos) {
108
+ const pseudo = pseudos[key];
109
+ res[pseudo.name] = [...Array(pseudo.priority)].map(() => ":root").join("") + " ";
110
+ }
111
+ return res;
112
+ })();
113
+ function createAtomicRules(identifier, property, value, pseudo) {
114
+ const selector = pseudo ? `${pseudoSelectorPrefixes[pseudo.name]} .${identifier}:${pseudo.name}` : `.${identifier}`;
115
+ const important = !!pseudo;
116
+ let rules = [];
117
+ switch (property) {
118
+ case "placeholderTextColor": {
119
+ const block = createDeclarationBlock({ color: value, opacity: 1 }, important);
120
+ rules.push(`${selector}::placeholder${block}`);
121
+ break;
122
+ }
123
+ case "pointerEvents": {
124
+ let finalValue = value;
125
+ if (value === "auto" || value === "box-only") {
126
+ finalValue = "auto!important";
127
+ if (value === "box-only") {
128
+ const block2 = createDeclarationBlock({ pointerEvents: "none" }, important);
129
+ rules.push(`${selector}>*${block2}`);
130
+ }
131
+ } else if (value === "none" || value === "box-none") {
132
+ finalValue = "none!important";
133
+ if (value === "box-none") {
134
+ const block2 = createDeclarationBlock({ pointerEvents: "auto" }, important);
135
+ rules.push(`${selector}>*${block2}`);
136
+ }
64
137
  }
138
+ const block = createDeclarationBlock({ pointerEvents: finalValue }, important);
139
+ rules.push(`${selector}${block}`);
140
+ break;
141
+ }
142
+ case "scrollbarWidth": {
143
+ if (value === "none") {
144
+ rules.push(`${selector}::-webkit-scrollbar{display:none}`);
145
+ }
146
+ const block = createDeclarationBlock({ scrollbarWidth: value }, important);
147
+ rules.push(`${selector}${block}`);
148
+ break;
149
+ }
150
+ default: {
151
+ const block = createDeclarationBlock({ [property]: value }, important);
152
+ rules.push(`${selector}${block}`);
153
+ break;
65
154
  }
66
155
  }
67
- return out;
68
- }, "generateAtomicStyles");
156
+ if ((pseudo == null ? void 0 : pseudo.name) === "hover") {
157
+ rules = rules.map((r) => `@media not all and (hover: none) { ${r} }`);
158
+ }
159
+ return rules;
160
+ }
161
+ __name(createAtomicRules, "createAtomicRules");
69
162
  function expandStyle(key, value) {
70
163
  if (key === "flex") {
71
164
  if (value <= -1) {
@@ -130,61 +223,6 @@ function expandStyle(key, value) {
130
223
  }
131
224
  }
132
225
  __name(expandStyle, "expandStyle");
133
- function createAtomicRules(identifier, property, value) {
134
- const rules = [];
135
- const selector = `.${identifier}`;
136
- switch (property) {
137
- case "placeholderTextColor": {
138
- const block = createDeclarationBlock({ color: value, opacity: 1 });
139
- rules.push(`${selector}::placeholder${block}`);
140
- break;
141
- }
142
- case "pointerEvents": {
143
- let finalValue = value;
144
- if (value === "auto" || value === "box-only") {
145
- finalValue = "auto!important";
146
- if (value === "box-only") {
147
- const block2 = createDeclarationBlock({ pointerEvents: "none" });
148
- rules.push(`${selector}>*${block2}`);
149
- }
150
- } else if (value === "none" || value === "box-none") {
151
- finalValue = "none!important";
152
- if (value === "box-none") {
153
- const block2 = createDeclarationBlock({ pointerEvents: "auto" });
154
- rules.push(`${selector}>*${block2}`);
155
- }
156
- }
157
- const block = createDeclarationBlock({ pointerEvents: finalValue });
158
- rules.push(`${selector}${block}`);
159
- break;
160
- }
161
- case "scrollbarWidth": {
162
- if (value === "none") {
163
- rules.push(`${selector}::-webkit-scrollbar{display:none}`);
164
- }
165
- const block = createDeclarationBlock({ scrollbarWidth: value });
166
- rules.push(`${selector}${block}`);
167
- break;
168
- }
169
- default: {
170
- const block = createDeclarationBlock({ [property]: value });
171
- rules.push(`${selector}${block}`);
172
- break;
173
- }
174
- }
175
- return rules;
176
- }
177
- __name(createAtomicRules, "createAtomicRules");
178
- function createDeclarationBlock(style) {
179
- const domStyle = expandStyles(style);
180
- const declarationsString = Object.keys(domStyle).map((property) => {
181
- const value = domStyle[property];
182
- const prop = hyphenateStyleName(property);
183
- return `${prop}:${value}`;
184
- }).sort().join(";");
185
- return `{${declarationsString};}`;
186
- }
187
- __name(createDeclarationBlock, "createDeclarationBlock");
188
226
  const cache = {
189
227
  get(property, value) {
190
228
  if (cache[property] != null && cache[property].hasOwnProperty(value) && cache[property][value] != null) {
@@ -257,7 +295,13 @@ const normalizeColor = /* @__PURE__ */ __name((color, opacity = 1) => {
257
295
  }
258
296
  return `${color}`;
259
297
  }, "normalizeColor");
260
- const isWebColor = /* @__PURE__ */ __name((color) => color === "currentcolor" || color === "currentColor" || color === "inherit" || color.indexOf("var(") === 0, "isWebColor");
298
+ const webColors = {
299
+ currentColor: true,
300
+ currentcolor: true,
301
+ transparent: true,
302
+ inherit: true
303
+ };
304
+ const isWebColor = /* @__PURE__ */ __name((color) => webColors[color] || color.indexOf("var(") === 0, "isWebColor");
261
305
  const processColor = /* @__PURE__ */ __name((color) => {
262
306
  if (color === void 0 || color === null) {
263
307
  return color;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/helpers/generateAtomicStyles.ts"],
4
- "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { simpleHash } from '@tamagui/helpers'\nimport hyphenateStyleName from 'hyphenate-style-name'\nimport normalizeCSSColor from 'normalize-css-color'\nimport { TextStyle, ViewStyle } from 'react-native'\n\nimport { isWeb } from '../constants/platform'\nimport { pseudos } from './pseudos'\n\ntype Value = Object | Array<any> | string | number\nexport type Style = { [key: string]: Value }\n\ntype Rule = string\ntype Rules = Array<Rule>\n\nexport type RulesData = {\n property?: string\n value?: string\n identifier: string\n rules: Rules\n}\n\ntype CompilerOutput = { [key: string]: RulesData }\n\nconst reducedStyleKeys = {\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n}\n\nexport function expandStyles(style: any) {\n const res = {}\n boxShadowReducer(res, style)\n textShadowReducer(res, style)\n for (const key in style) {\n if (reducedStyleKeys[key]) continue\n if (key in pseudos) {\n res[key] = expandStyles(style[key])\n } else {\n updateReactDOMStyle(res, key, style[key])\n }\n }\n return res\n}\n\nfunction updateReactDOMStyle(style: Object, key: string, value: any) {\n value = normalizeValueWithProperty(value, key)\n const out = expandStyle(key, value)\n if (out) {\n Object.assign(style, Object.fromEntries(out))\n } else {\n style[key] = value\n }\n}\n\nexport const generateAtomicStyles = (style: ViewStyle & TextStyle): CompilerOutput => {\n const res = expandStyles(style)\n\n const out = {}\n for (const key in res) {\n const value = res[key]\n if (value != null) {\n const valueString = stringifyValueWithProperty(value, key)\n const cachedResult = cache.get(key, valueString)\n if (cachedResult != null) {\n const { identifier } = cachedResult\n out[identifier] = cachedResult\n } else {\n const identifier = simpleHash(key + valueString)\n const rules = createAtomicRules(identifier, key, valueString)\n const cachedResult = cache.set(key, valueString, {\n property: key,\n value: valueString,\n identifier,\n rules,\n })\n out[identifier] = cachedResult\n }\n }\n }\n\n return out\n}\n\nexport function expandStyle(key: string, value: any) {\n if (key === 'flex') {\n // The 'flex' property value in React Native must be a positive integer,\n // 0, or -1.\n if (value <= -1) {\n return [\n ['flexGrow', 0],\n ['flexShrink', 1],\n ['flexBasis', 'auto'],\n ]\n }\n // normalizing to better align with native\n // see spec for flex shorthand https://developer.mozilla.org/en-US/docs/Web/CSS/flex\n if (value >= 0) {\n return [\n ['flexGrow', value],\n ['flexShrink', 1],\n ]\n }\n return\n }\n\n // web only\n switch (key) {\n // Ignore some React Native styles\n case 'elevation':\n case 'overlayColor':\n case 'resizeMode':\n case 'tintColor': {\n break\n }\n\n case 'aspectRatio': {\n return [[key, value.toString()]]\n }\n\n // TODO: remove once this issue is fixed\n // https://github.com/rofrischmann/inline-style-prefixer/issues/159\n case 'backgroundClip': {\n if (value === 'text') {\n return [\n ['backgroundClip', value],\n ['WebkitBackgroundClip', value],\n ]\n }\n break\n }\n\n case 'textAlignVertical': {\n return [['verticalAlign', value === 'center' ? 'middle' : value]]\n }\n\n case 'textDecorationLine': {\n return [['textDecorationLine', value]]\n }\n\n case 'transform': {\n if (Array.isArray(value)) {\n return [[key, value.map(mapTransform).join(' ')]]\n }\n break\n }\n\n case 'writingDirection': {\n return [['direction', value]]\n }\n }\n\n const longKey = STYLE_SHORT_FORM_EXPANSIONS[key]\n if (longKey) {\n return longKey.map((key) => {\n return [key, value]\n })\n } else {\n if (isWeb && Array.isArray(value)) {\n return [[key, value.join(',')]]\n }\n }\n}\n\nfunction createAtomicRules(identifier: string, property, value): Rules {\n const rules: string[] = []\n const selector = `.${identifier}`\n\n // Handle non-standard properties and object values that require multiple\n // CSS rules to be created.\n switch (property) {\n // Equivalent to using '::placeholder'\n case 'placeholderTextColor': {\n const block = createDeclarationBlock({ color: value, opacity: 1 })\n rules.push(`${selector}::placeholder${block}`)\n break\n }\n\n // Polyfill for additional 'pointer-events' values\n // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58\n case 'pointerEvents': {\n let finalValue = value\n if (value === 'auto' || value === 'box-only') {\n finalValue = 'auto!important'\n if (value === 'box-only') {\n const block = createDeclarationBlock({ pointerEvents: 'none' })\n rules.push(`${selector}>*${block}`)\n }\n } else if (value === 'none' || value === 'box-none') {\n finalValue = 'none!important'\n if (value === 'box-none') {\n const block = createDeclarationBlock({ pointerEvents: 'auto' })\n rules.push(`${selector}>*${block}`)\n }\n }\n const block = createDeclarationBlock({ pointerEvents: finalValue })\n rules.push(`${selector}${block}`)\n break\n }\n\n // Polyfill for draft spec\n // https://drafts.csswg.org/css-scrollbars-1/\n case 'scrollbarWidth': {\n if (value === 'none') {\n rules.push(`${selector}::-webkit-scrollbar{display:none}`)\n }\n const block = createDeclarationBlock({ scrollbarWidth: value })\n rules.push(`${selector}${block}`)\n break\n }\n\n default: {\n const block = createDeclarationBlock({ [property]: value })\n rules.push(`${selector}${block}`)\n break\n }\n }\n\n return rules\n}\n\n/**\n * Creates a CSS declaration block from a StyleSheet object.\n */\nfunction createDeclarationBlock(style: Style) {\n const domStyle = expandStyles(style)\n const declarationsString = Object.keys(domStyle)\n .map((property) => {\n const value = domStyle[property]\n const prop = hyphenateStyleName(property)\n return `${prop}:${value}`\n })\n // Once properties are hyphenated, this will put the vendor\n // prefixed and short-form properties first in the list.\n .sort()\n .join(';')\n\n return `{${declarationsString};}`\n}\n\nconst cache = {\n get(property, value) {\n if (\n cache[property] != null &&\n cache[property].hasOwnProperty(value) &&\n cache[property][value] != null\n ) {\n return cache[property][value]\n }\n },\n set(property, value, object) {\n if (cache[property] == null) {\n cache[property] = {}\n }\n return (cache[property][value] = object)\n },\n}\n\nfunction stringifyValueWithProperty(value: Value, property?: string): string {\n // e.g., 0 => '0px', 'black' => 'rgba(0,0,0,1)'\n return normalizeValueWithProperty(value, property)\n}\n\n// { scale: 2 } => 'scale(2)'\n// { translateX: 20 } => 'translateX(20px)'\n// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'\nconst mapTransform = (transform) => {\n const type = Object.keys(transform)[0]\n const value = transform[type]\n if (type === 'matrix' || type === 'matrix3d') {\n return `${type}(${value.join(',')})`\n } else {\n const normalizedValue = normalizeValueWithProperty(value, type)\n return `${type}(${normalizedValue})`\n }\n}\n\nconst colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n\nfunction normalizeValueWithProperty(value: any, property?: string): any {\n if (process.env.TAMAGUI_TARGET === 'web') {\n const shouldCoerceToPx =\n typeof value === 'number' &&\n (property === undefined || property === null || !unitlessNumbers[property])\n if (shouldCoerceToPx) {\n return `${value}px`\n }\n }\n if (property && colorProps[property]) {\n return normalizeColor(value)\n }\n return value\n}\n\nconst normalizeColor = (color?: number | string, opacity = 1): void | string => {\n if (color == null || color == undefined) {\n return\n }\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (typeof color === 'string' && isWebColor(color)) {\n return color\n }\n }\n const colorInt = processColor(color)\n if (colorInt != null) {\n const r = (colorInt >> 16) & 255\n const g = (colorInt >> 8) & 255\n const b = colorInt & 255\n const a = ((colorInt >> 24) & 255) / 255\n const alpha = (a * opacity).toFixed(2)\n return `rgba(${r},${g},${b},${alpha})`\n }\n return `${color}`\n}\n\nconst isWebColor = (color: string): boolean =>\n color === 'currentcolor' ||\n color === 'currentColor' ||\n color === 'inherit' ||\n color.indexOf('var(') === 0\n\nconst processColor = (color?: number | string): number | undefined | null => {\n if (color === undefined || color === null) {\n return color\n }\n let intColor = normalizeCSSColor(color)\n if (intColor === undefined || intColor === null) {\n return undefined\n }\n return ((+intColor << 24) | (+intColor >>> 8)) >>> 0\n}\n\nconst unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFleGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\nconst resolveShadowValue = (style: ViewStyle): void | string => {\n const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style\n if (shadowRadius === undefined) {\n return\n }\n const { height, width } = shadowOffset || defaultOffset\n const offsetX = normalizeValueWithProperty(width)\n const offsetY = normalizeValueWithProperty(height)\n const blurRadius = normalizeValueWithProperty(shadowRadius || 0)\n const color = normalizeColor(String(shadowColor || 'black'), shadowOpacity)\n return `${offsetX} ${offsetY} ${blurRadius} ${color}`\n}\n\nfunction boxShadowReducer(resolvedStyle, style) {\n const { boxShadow } = style\n const shadow = resolveShadowValue(style)\n if (shadow != null) {\n resolvedStyle.boxShadow = boxShadow ? `${boxShadow}, ${shadow}` : shadow\n }\n}\n\nconst defaultOffset = { height: 0, width: 0 }\nfunction textShadowReducer(resolvedStyle, style) {\n const { textShadowColor, textShadowOffset, textShadowRadius } = style\n const { height, width } = textShadowOffset || defaultOffset\n const radius = textShadowRadius || 0\n const offsetX = normalizeValueWithProperty(width)\n const offsetY = normalizeValueWithProperty(height)\n const blurRadius = normalizeValueWithProperty(radius)\n const color = normalizeValueWithProperty(textShadowColor, 'textShadowColor')\n\n if (\n color &&\n (height !== 0 || width !== 0 || radius !== 0) &&\n offsetX != null &&\n offsetY != null &&\n blurRadius != null\n ) {\n resolvedStyle.textShadow = `${offsetX} ${offsetY} ${blurRadius} ${color}`\n }\n}\n\nconst STYLE_SHORT_FORM_EXPANSIONS = {\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderRadius: [\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderBottomRightRadius',\n 'borderBottomLeftRadius',\n ],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n marginHorizontal: ['marginRight', 'marginLeft'],\n marginVertical: ['marginTop', 'marginBottom'],\n overscrollBehavior: ['overscrollBehaviorX', 'overscrollBehaviorY'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n paddingHorizontal: ['paddingRight', 'paddingLeft'],\n paddingVertical: ['paddingTop', 'paddingBottom'],\n ...(isWeb && {\n // react-native doesn't support X / Y\n overflow: ['overflowX', 'overflowY'],\n }),\n}\n"],
5
- "mappings": ";;AAKA;AACA;AACA;AAGA;AACA;AAiBA,MAAM,mBAAmB;AAAA,EACvB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,kBAAkB;AACpB;AAEO,sBAAsB,OAAY;AACvC,QAAM,MAAM,CAAC;AACb,mBAAiB,KAAK,KAAK;AAC3B,oBAAkB,KAAK,KAAK;AAC5B,aAAW,OAAO,OAAO;AACvB,QAAI,iBAAiB;AAAM;AAC3B,QAAI,OAAO,SAAS;AAClB,UAAI,OAAO,aAAa,MAAM,IAAI;AAAA,IACpC,OAAO;AACL,0BAAoB,KAAK,KAAK,MAAM,IAAI;AAAA,IAC1C;AAAA,EACF;AACA,SAAO;AACT;AAbgB;AAehB,6BAA6B,OAAe,KAAa,OAAY;AACnE,UAAQ,2BAA2B,OAAO,GAAG;AAC7C,QAAM,MAAM,YAAY,KAAK,KAAK;AAClC,MAAI,KAAK;AACP,WAAO,OAAO,OAAO,OAAO,YAAY,GAAG,CAAC;AAAA,EAC9C,OAAO;AACL,UAAM,OAAO;AAAA,EACf;AACF;AARS;AAUF,MAAM,uBAAuB,wBAAC,UAAiD;AACpF,QAAM,MAAM,aAAa,KAAK;AAE9B,QAAM,MAAM,CAAC;AACb,aAAW,OAAO,KAAK;AACrB,UAAM,QAAQ,IAAI;AAClB,QAAI,SAAS,MAAM;AACjB,YAAM,cAAc,2BAA2B,OAAO,GAAG;AACzD,YAAM,eAAe,MAAM,IAAI,KAAK,WAAW;AAC/C,UAAI,gBAAgB,MAAM;AACxB,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AgB,CAAC,aAAa,cAAc;AAAA,EAC5C,oBAAoB,CAAC,uBAAuB,qBAAqB;AAAA,EACjE,SAAS,CAAC,cAAc,gBAAgB,iBAAiB,aAAa;AAAA,EACtE,mBAAmB,CAAC,gBAAgB,aAAa;AAAA,EACjD,iBAAiB,CAAC,cAAc,eAAe;AAAA,EAC/C,GAAI,SAAS;AAAA,IAEX,UAAU,CAAC,aAAa,WAAW;AAAA,EACrC;AACF;",
4
+ "sourcesContent": ["/**\n * Some parts adapted from react-native-web\n * Copyright (c) Nicolas Gallagher licensed under the MIT license.\n */\n\nimport { StyleObject, simpleHash } from '@tamagui/helpers'\nimport hyphenateStyleName from 'hyphenate-style-name'\nimport normalizeCSSColor from 'normalize-css-color'\nimport { TextStyle, ViewStyle } from 'react-native'\n\nimport { getConfig } from '../conf'\nimport { isWeb } from '../constants/platform'\nimport { reversedShorthands } from '../createTamagui'\nimport { PseudoDescriptor, pseudos } from './pseudos'\n\ntype Value = Object | Array<any> | string | number\nexport type Style = { [key: string]: Value }\n\nexport const generateAtomicStyles = (\n style: ViewStyle & TextStyle,\n pseudo?: PseudoDescriptor\n): StyleObject[] => {\n const res = expandStyles(style)\n const out: StyleObject[] = []\n for (const key in res) {\n const value = res[key]\n if (value != null) {\n const valueString = stringifyValueWithProperty(value, key)\n const hash = simpleHash(key + valueString + (pseudo?.name || ''))\n const cachedResult = cache.get(hash, valueString)\n if (cachedResult != null) {\n out.push(cachedResult)\n } else {\n const pseudoPrefix = pseudo ? `0${pseudo.name}-` : ''\n const shortProp = reversedShorthands[key] || key\n const identifier = `_${shortProp}-${pseudoPrefix}${hash}`\n const rules = createAtomicRules(identifier, key, valueString, pseudo)\n const styleObject: StyleObject = {\n property: key,\n pseudo: pseudo?.name,\n value,\n identifier,\n rules,\n }\n cache.set(hash, valueString, styleObject)\n out.push(styleObject)\n }\n }\n }\n if (style.borderColor === 'transparent') {\n debugger\n }\n return out\n}\n\nconst reducedStyleKeys = {\n shadowColor: true,\n shadowOffset: true,\n shadowOpacity: true,\n shadowRadius: true,\n textShadowColor: true,\n textShadowOffset: true,\n textShadowRadius: true,\n}\n\nlet shorthands: Record<string, string> | null = null\n\n// can likely remove this and include in other loops\nexport function expandStyles(style: any) {\n const res = {}\n boxShadowReducer(res, style)\n textShadowReducer(res, style)\n borderReducer(res, style)\n for (let key in style) {\n shorthands = shorthands || getConfig().shorthands\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (reducedStyleKeys[key]) continue\n if (key in pseudos) {\n res[key] = expandStyles(style[key])\n } else {\n const val = normalizeValueWithProperty(style[key], key)\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n }\n return res\n}\n\n// why is this diff from react-native-web!? need to figure out\nfunction borderReducer(res: any, cur: any) {\n for (const key in borderDefaults) {\n if (key in cur) {\n res[borderDefaults[key]] = cur[borderDefaults[key]] || 'solid'\n }\n }\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n\nfunction createDeclarationBlock(style: Style, important = false) {\n let declarations = ''\n for (const key in style) {\n const prop = hyphenateStyleName(key)\n const value = style[key]\n declarations += `${prop}:${value}`\n }\n return `{${declarations}${important ? ` !important` : ''};}`\n}\n\nconst pseudoSelectorPrefixes = (() => {\n const res: Record<string, string> = {}\n for (const key in pseudos) {\n const pseudo = pseudos[key]\n res[pseudo.name] = [...Array(pseudo.priority)].map(() => ':root').join('') + ' '\n }\n return res\n})()\n\nfunction createAtomicRules(\n identifier: string,\n property: string,\n value: any,\n pseudo?: PseudoDescriptor\n): string[] {\n const selector = pseudo\n ? `${pseudoSelectorPrefixes[pseudo.name]} .${identifier}:${pseudo.name}`\n : `.${identifier}`\n const important = !!pseudo\n\n let rules: string[] = []\n\n // Handle non-standard properties and object values that require multiple\n // CSS rules to be created.\n switch (property) {\n // Equivalent to using '::placeholder'\n case 'placeholderTextColor': {\n const block = createDeclarationBlock({ color: value, opacity: 1 }, important)\n rules.push(`${selector}::placeholder${block}`)\n break\n }\n\n // Polyfill for additional 'pointer-events' values\n // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58\n case 'pointerEvents': {\n let finalValue = value\n if (value === 'auto' || value === 'box-only') {\n finalValue = 'auto!important'\n if (value === 'box-only') {\n const block = createDeclarationBlock({ pointerEvents: 'none' }, important)\n rules.push(`${selector}>*${block}`)\n }\n } else if (value === 'none' || value === 'box-none') {\n finalValue = 'none!important'\n if (value === 'box-none') {\n const block = createDeclarationBlock({ pointerEvents: 'auto' }, important)\n rules.push(`${selector}>*${block}`)\n }\n }\n const block = createDeclarationBlock({ pointerEvents: finalValue }, important)\n rules.push(`${selector}${block}`)\n break\n }\n\n // Polyfill for draft spec\n // https://drafts.csswg.org/css-scrollbars-1/\n case 'scrollbarWidth': {\n if (value === 'none') {\n rules.push(`${selector}::-webkit-scrollbar{display:none}`)\n }\n const block = createDeclarationBlock({ scrollbarWidth: value }, important)\n rules.push(`${selector}${block}`)\n break\n }\n\n default: {\n const block = createDeclarationBlock({ [property]: value }, important)\n rules.push(`${selector}${block}`)\n break\n }\n }\n\n // hover styles need to be conditional\n // perhaps this can be generalized but for now lets just shortcut\n // and hardcode for hover styles, if we need to later we can\n // WEIRD SYNTAX, SEE:\n // https://stackoverflow.com/questions/40532204/media-query-for-devices-supporting-hover\n if (pseudo?.name === 'hover') {\n rules = rules.map((r) => `@media not all and (hover: none) { ${r} }`)\n }\n\n return rules\n}\n\nexport function expandStyle(key: string, value: any) {\n if (key === 'flex') {\n // The 'flex' property value in React Native must be a positive integer,\n // 0, or -1.\n if (value <= -1) {\n return [\n ['flexGrow', 0],\n ['flexShrink', 1],\n ['flexBasis', 'auto'],\n ]\n }\n // normalizing to better align with native\n // see spec for flex shorthand https://developer.mozilla.org/en-US/docs/Web/CSS/flex\n if (value >= 0) {\n return [\n ['flexGrow', value],\n ['flexShrink', 1],\n ]\n }\n return\n }\n\n // web only\n switch (key) {\n // Ignore some React Native styles\n case 'elevation':\n case 'overlayColor':\n case 'resizeMode':\n case 'tintColor': {\n break\n }\n\n case 'aspectRatio': {\n return [[key, value.toString()]]\n }\n\n // TODO: remove once this issue is fixed\n // https://github.com/rofrischmann/inline-style-prefixer/issues/159\n case 'backgroundClip': {\n if (value === 'text') {\n return [\n ['backgroundClip', value],\n ['WebkitBackgroundClip', value],\n ]\n }\n break\n }\n\n case 'textAlignVertical': {\n return [['verticalAlign', value === 'center' ? 'middle' : value]]\n }\n\n case 'textDecorationLine': {\n return [['textDecorationLine', value]]\n }\n\n case 'transform': {\n if (Array.isArray(value)) {\n return [[key, value.map(mapTransform).join(' ')]]\n }\n break\n }\n\n case 'writingDirection': {\n return [['direction', value]]\n }\n }\n\n const longKey = STYLE_SHORT_FORM_EXPANSIONS[key]\n if (longKey) {\n return longKey.map((key) => {\n return [key, value]\n })\n } else {\n if (isWeb && Array.isArray(value)) {\n return [[key, value.join(',')]]\n }\n }\n}\n\nconst cache = {\n get(property, value) {\n if (\n cache[property] != null &&\n cache[property].hasOwnProperty(value) &&\n cache[property][value] != null\n ) {\n return cache[property][value]\n }\n },\n set(property, value, object) {\n if (cache[property] == null) {\n cache[property] = {}\n }\n return (cache[property][value] = object)\n },\n}\n\nfunction stringifyValueWithProperty(value: Value, property?: string): string {\n // e.g., 0 => '0px', 'black' => 'rgba(0,0,0,1)'\n return normalizeValueWithProperty(value, property)\n}\n\n// { scale: 2 } => 'scale(2)'\n// { translateX: 20 } => 'translateX(20px)'\n// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'\nconst mapTransform = (transform) => {\n const type = Object.keys(transform)[0]\n const value = transform[type]\n if (type === 'matrix' || type === 'matrix3d') {\n return `${type}(${value.join(',')})`\n } else {\n const normalizedValue = normalizeValueWithProperty(value, type)\n return `${type}(${normalizedValue})`\n }\n}\n\nconst colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true,\n}\n\nfunction normalizeValueWithProperty(value: any, property?: string): any {\n if (process.env.TAMAGUI_TARGET === 'web') {\n const shouldCoerceToPx =\n typeof value === 'number' &&\n (property === undefined || property === null || !unitlessNumbers[property])\n if (shouldCoerceToPx) {\n return `${value}px`\n }\n }\n if (property && colorProps[property]) {\n return normalizeColor(value)\n }\n return value\n}\n\nconst normalizeColor = (color?: number | string, opacity = 1): void | string => {\n if (color == null || color == undefined) {\n return\n }\n if (process.env.TAMAGUI_TARGET === 'web') {\n if (typeof color === 'string' && isWebColor(color)) {\n return color\n }\n }\n const colorInt = processColor(color)\n if (colorInt != null) {\n const r = (colorInt >> 16) & 255\n const g = (colorInt >> 8) & 255\n const b = colorInt & 255\n const a = ((colorInt >> 24) & 255) / 255\n const alpha = (a * opacity).toFixed(2)\n return `rgba(${r},${g},${b},${alpha})`\n }\n return `${color}`\n}\n\nconst webColors = {\n currentColor: true,\n currentcolor: true,\n transparent: true,\n inherit: true,\n}\n\nconst isWebColor = (color: string): boolean => webColors[color] || color.indexOf('var(') === 0\n\nconst processColor = (color?: number | string): number | undefined | null => {\n if (color === undefined || color === null) {\n return color\n }\n let intColor = normalizeCSSColor(color)\n if (intColor === undefined || intColor === null) {\n return undefined\n }\n return ((+intColor << 24) | (+intColor >>> 8)) >>> 0\n}\n\nconst unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFleGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n shadowOpacity: true,\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\nconst resolveShadowValue = (style: ViewStyle): void | string => {\n const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style\n if (shadowRadius === undefined) {\n return\n }\n const { height, width } = shadowOffset || defaultOffset\n const offsetX = normalizeValueWithProperty(width)\n const offsetY = normalizeValueWithProperty(height)\n const blurRadius = normalizeValueWithProperty(shadowRadius || 0)\n const color = normalizeColor(String(shadowColor || 'black'), shadowOpacity)\n return `${offsetX} ${offsetY} ${blurRadius} ${color}`\n}\n\nfunction boxShadowReducer(resolvedStyle: any, style: any) {\n const { boxShadow } = style\n const shadow = resolveShadowValue(style)\n if (shadow != null) {\n resolvedStyle.boxShadow = boxShadow ? `${boxShadow}, ${shadow}` : shadow\n }\n}\n\nconst defaultOffset = { height: 0, width: 0 }\n\nfunction textShadowReducer(resolvedStyle: any, style: any) {\n const { textShadowColor, textShadowOffset, textShadowRadius } = style\n const { height, width } = textShadowOffset || defaultOffset\n const radius = textShadowRadius || 0\n const offsetX = normalizeValueWithProperty(width)\n const offsetY = normalizeValueWithProperty(height)\n const blurRadius = normalizeValueWithProperty(radius)\n const color = normalizeValueWithProperty(textShadowColor, 'textShadowColor')\n\n if (\n color &&\n (height !== 0 || width !== 0 || radius !== 0) &&\n offsetX != null &&\n offsetY != null &&\n blurRadius != null\n ) {\n resolvedStyle.textShadow = `${offsetX} ${offsetY} ${blurRadius} ${color}`\n }\n}\n\nconst STYLE_SHORT_FORM_EXPANSIONS = {\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderRadius: [\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderBottomRightRadius',\n 'borderBottomLeftRadius',\n ],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n marginHorizontal: ['marginRight', 'marginLeft'],\n marginVertical: ['marginTop', 'marginBottom'],\n overscrollBehavior: ['overscrollBehaviorX', 'overscrollBehaviorY'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n paddingHorizontal: ['paddingRight', 'paddingLeft'],\n paddingVertical: ['paddingTop', 'paddingBottom'],\n ...(isWeb && {\n // react-native doesn't support X / Y\n overflow: ['overflowX', 'overflowY'],\n }),\n}\n"],
5
+ "mappings": ";;AAKA;AACA;AACA;AAGA;AACA;AACA;AACA;AAKO,MAAM,uBAAuB,wBAClC,OACA,WACkB;AAClB,QAAM,MAAM,aAAa,KAAK;AAC9B,QAAM,MAAqB,CAAC;AAC5B,aAAW,OAAO,KAAK;AACrB,UAAM,QAAQ,IAAI;AAClB,QAAI,SAAS,MAAM;AACjB,YAAM,cAAc,2BAA2B,OAAO,GAAG;AACzD,YAAM,OAAO,WAAW,MAAM,cAAe,mCAAQ,SAAQ,GAAG;AAChE,YAAM,eAAe,MAAM,IAAI,MAAM,WAAW;AAChD,UAAI,gBAAgB,MAAM;AACxB,YAAI,KAAK,YAAY;AAAA,MACvB,OAAO;AACL,cAAM,eAAe,SAAS,IAAI,OAAO,UAAU;AACnD,cAAM,YAAY,mBAAmB,QAAQ;AAC7C,cAAM,aAAa,IAAI,aAAa,eAAe;AACnD,cAAM,QAAQ,kBAAkB,YAAY,KAAK,aAAa,MAAM;AACpE,cAAM,cAA2B;AAAA,UAC/B,UAAU;AAA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;AAAA,EAC1F,aAAa,CAAC,kBAAkB,oBAAoB,qBAAqB,iBAAiB;AAAA,EAC1F,QAAQ,CAAC,aAAa,eAAe,gBAAgB,YAAY;AAAA,EACjE,kBAAkB,CAAC,eAAe,YAAY;AAAA,EAC9C,gBAAgB,CAAC,aAAa,cAAc;AAAA,EAC5C,oBAAoB,CAAC,uBAAuB,qBAAqB;AAAA,EACjE,SAAS,CAAC,cAAc,gBAAgB,iBAAiB,aAAa;AAAA,EACtE,mBAAmB,CAAC,gBAAgB,aAAa;AAAA,EACjD,iBAAiB,CAAC,cAAc,eAAe;AAAA,EAC/C,GAAI,SAAS;AAAA,IAEX,UAAU,CAAC,aAAa,WAAW;AAAA,EACrC;AACF;",
6
6
  "names": []
7
7
  }
@@ -7,7 +7,7 @@ import { isClient, isWeb, useIsomorphicLayoutEffect } from "../constants/platfor
7
7
  import { mediaQueryConfig, mediaState } from "../hooks/useMedia";
8
8
  import { createMediaStyle } from "./createMediaStyle";
9
9
  import { fixNativeShadow } from "./fixNativeShadow";
10
- import { getStylesAtomic, pseudoCNInverse } from "./getStylesAtomic";
10
+ import { getStylesAtomic } from "./getStylesAtomic";
11
11
  import {
12
12
  insertStyleRule,
13
13
  insertedTransforms,
@@ -36,6 +36,11 @@ const skipProps = {
36
36
  }
37
37
  };
38
38
  let conf;
39
+ const pseudoCNInverse = {
40
+ hover: "hoverStyle",
41
+ focus: "focusStyle",
42
+ press: "pressStyle"
43
+ };
39
44
  const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state, defaultClassNames, debug) => {
40
45
  var _a, _b;
41
46
  conf = conf || getConfig();
@@ -45,6 +50,9 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
45
50
  const medias = {};
46
51
  const usedKeys = /* @__PURE__ */ new Set();
47
52
  let style = {};
53
+ if (state.hasTextAncestor) {
54
+ style.display = "inline-flex";
55
+ }
48
56
  let classNames = {};
49
57
  let transforms = null;
50
58
  const rulesToInsert = [];
@@ -91,6 +99,7 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
91
99
  }
92
100
  __name(mergeClassName, "mergeClassName");
93
101
  const propKeys = Object.keys(props);
102
+ const shouldDoClasses = isWeb && !state.noClassNames;
94
103
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
95
104
  console.log("propKeys", propKeys);
96
105
  }
@@ -138,10 +147,10 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
138
147
  if (isMedia2) {
139
148
  let mediaShortKey = mediaOrPseudo.slice(1);
140
149
  mediaShortKey = mediaShortKey.slice(0, mediaShortKey.indexOf("_"));
141
- fullKey += `-${mediaShortKey}`;
150
+ fullKey += `_${mediaShortKey}`;
142
151
  } else if (isPseudo2) {
143
152
  const pseudoShortKey = mediaOrPseudo.slice(1);
144
- fullKey += `-${pseudoCNInverse[pseudoShortKey]}`;
153
+ fullKey += `_${pseudoShortKey}`;
145
154
  }
146
155
  usedKeys.add(fullKey);
147
156
  mergeClassName(fullKey, cn, isMediaOrPseudo2);
@@ -155,7 +164,7 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
155
164
  }
156
165
  continue;
157
166
  }
158
- if (validStyleProps[keyInit] && valInit && valInit[0] === "_") {
167
+ if (valInit && valInit[0] === "_") {
159
168
  usedKeys.add(keyInit);
160
169
  mergeClassName(keyInit, valInit);
161
170
  continue;
@@ -205,14 +214,11 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
205
214
  }
206
215
  pseudos[key] = pseudos[key] || {};
207
216
  pseudos[key] = getSubStyle(val, staticConfig, theme, props, state, true);
208
- if (isWeb && !state.noClassNames) {
209
- const shorthand = pseudoAttrs[key].name;
210
- if ((_b = props.forceStyle) == null ? void 0 : _b[shorthand]) {
211
- console.warn("force");
212
- }
217
+ if (shouldDoClasses) {
213
218
  const pseudoStyles = getStylesAtomic({ [key]: pseudos[key] });
214
219
  for (const style2 of pseudoStyles) {
215
- const fullKey = `${style2.property}-${key}`;
220
+ const postfix = ((_b = pseudoAttrs[key]) == null ? void 0 : _b.name) || key;
221
+ const fullKey = `${style2.property}_${postfix}`;
216
222
  if (!usedKeys.has(fullKey)) {
217
223
  usedKeys.add(fullKey);
218
224
  addStyle(style2.identifier, style2.rules.join(";"));
@@ -232,7 +238,6 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
232
238
  continue;
233
239
  }
234
240
  const mediaStyle = getSubStyle(val, staticConfig, theme, props, state);
235
- const shouldDoClasses = isWeb && !state.noClassNames;
236
241
  if (process.env.NODE_ENV === "development" && debug === "verbose") {
237
242
  console.log(" \xBB getSplitStyles mediaStyle", { mediaKey, mediaStyle, props, shouldDoClasses });
238
243
  }
@@ -240,7 +245,7 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
240
245
  const mediaStyles = getStylesAtomic(mediaStyle);
241
246
  for (const style2 of mediaStyles) {
242
247
  const out = createMediaStyle(style2, mediaKeyShort, mediaQueryConfig);
243
- const fullKey = `${style2.property}-${mediaKeyShort}`;
248
+ const fullKey = `${style2.property}_${mediaKeyShort}`;
244
249
  if (!usedKeys.has(fullKey)) {
245
250
  usedKeys.add(fullKey);
246
251
  addStyle(out.identifier, out.styleRule);
@@ -266,15 +271,10 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
266
271
  usedKeys.add(key);
267
272
  if (val && val[0] === "_") {
268
273
  classNames[key] = val;
274
+ } else if (key in stylePropsTransform) {
275
+ mergeTransform(style, key, val, true);
269
276
  } else {
270
- if (key in stylePropsTransform) {
271
- if (process.env.NODE_ENV === "development" && debug) {
272
- console.log(" > mergeTransform", key, val);
273
- }
274
- mergeTransform(style, key, val, true);
275
- } else {
276
- style[key] = val;
277
- }
277
+ style[key] = val;
278
278
  }
279
279
  continue;
280
280
  }
@@ -292,7 +292,7 @@ const getSplitStyles = /* @__PURE__ */ __name((props, staticConfig, theme, state
292
292
  ...classNames
293
293
  };
294
294
  }
295
- if (isWeb && !state.noClassNames) {
295
+ if (shouldDoClasses) {
296
296
  const atomic = getStylesAtomic(style);
297
297
  for (const atomicStyle of atomic) {
298
298
  const key = atomicStyle.property;
@@ -380,6 +380,7 @@ export {
380
380
  getSubStyle,
381
381
  insertSplitStyles,
382
382
  normalizeStyleObject,
383
+ pseudoCNInverse,
383
384
  useSplitStyles
384
385
  };
385
386
  //# sourceMappingURL=getSplitStyles.js.map