@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.1093.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +150 -136
  2. package/dist/cjs/StyleSheet/compiler/hash.cjs +14 -18
  3. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +20 -24
  4. package/dist/cjs/StyleSheet/compiler/index.cjs +294 -321
  5. package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +19 -23
  6. package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +31 -35
  7. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +26 -38
  8. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +36 -40
  9. package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +107 -111
  10. package/dist/cjs/StyleSheet/dom/index.cjs +69 -72
  11. package/dist/cjs/StyleSheet/index.cjs +32 -34
  12. package/dist/cjs/StyleSheet/preprocess.cjs +73 -94
  13. package/dist/cjs/StyleSheet/validate.cjs +71 -75
  14. package/dist/cjs/TextAncestorContext.cjs +14 -18
  15. package/dist/cjs/colorProps.cjs +24 -28
  16. package/dist/cjs/index.cjs +48 -50
  17. package/dist/cjs/modules/AccessibilityUtil/index.cjs +17 -21
  18. package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +14 -18
  19. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +45 -49
  20. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +33 -39
  21. package/dist/cjs/modules/AssetRegistry/index.cjs +17 -19
  22. package/dist/cjs/modules/ImageLoader/index.cjs +134 -141
  23. package/dist/cjs/modules/InteractionManager.cjs +211 -219
  24. package/dist/cjs/modules/Platform/index.cjs +17 -21
  25. package/dist/cjs/modules/TextInputState/index.cjs +54 -58
  26. package/dist/cjs/modules/UIManager/index.cjs +45 -51
  27. package/dist/cjs/modules/canUseDOM.cjs +14 -18
  28. package/dist/cjs/modules/createDOMProps/index.cjs +284 -359
  29. package/dist/cjs/modules/createEventHandle/index.cjs +56 -62
  30. package/dist/cjs/modules/dismissKeyboard/index.cjs +15 -19
  31. package/dist/cjs/modules/forwardedProps/index.cjs +127 -130
  32. package/dist/cjs/modules/getBoundingClientRect/index.cjs +21 -25
  33. package/dist/cjs/modules/invariant.cjs +25 -27
  34. package/dist/cjs/modules/isSelectionValid/index.cjs +21 -25
  35. package/dist/cjs/modules/isWebColor/index.cjs +14 -18
  36. package/dist/cjs/modules/mergeRefs/index.cjs +30 -34
  37. package/dist/cjs/modules/modality/index.cjs +130 -134
  38. package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +24 -28
  39. package/dist/cjs/modules/normalizeColor/index.cjs +27 -31
  40. package/dist/cjs/modules/pick/index.cjs +21 -27
  41. package/dist/cjs/modules/processColor/index.cjs +27 -36
  42. package/dist/cjs/modules/requestIdleCallback/index.cjs +27 -29
  43. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +38 -42
  44. package/dist/cjs/modules/setValueForStyles/index.cjs +27 -34
  45. package/dist/cjs/modules/unitlessNumbers/index.cjs +73 -75
  46. package/dist/cjs/modules/useElementLayout/index.cjs +23 -31
  47. package/dist/cjs/modules/useEvent/index.cjs +39 -43
  48. package/dist/cjs/modules/useHover/index.cjs +112 -118
  49. package/dist/cjs/modules/useLayoutEffect/index.cjs +17 -26
  50. package/dist/cjs/modules/useLocale/index.cjs +32 -43
  51. package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +65 -76
  52. package/dist/cjs/modules/useMergeRefs/index.cjs +18 -29
  53. package/dist/cjs/modules/usePlatformMethods/index.cjs +23 -30
  54. package/dist/cjs/modules/useStable/index.cjs +23 -32
  55. package/dist/cjs/styleTypes.cjs +9 -11
  56. package/dist/cjs/types.cjs +9 -11
  57. package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs +137 -119
  58. package/dist/esm/StyleSheet/compiler/createReactDOMStyle.mjs.map +1 -1
  59. package/dist/esm/StyleSheet/compiler/hash.mjs +2 -2
  60. package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs +7 -6
  61. package/dist/esm/StyleSheet/compiler/hyphenateStyleName.mjs.map +1 -1
  62. package/dist/esm/StyleSheet/compiler/index.mjs +279 -302
  63. package/dist/esm/StyleSheet/compiler/index.mjs.map +1 -1
  64. package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +7 -5
  65. package/dist/esm/StyleSheet/compiler/normalizeColor.mjs.map +1 -1
  66. package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs +19 -17
  67. package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.mjs.map +1 -1
  68. package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs +14 -20
  69. package/dist/esm/StyleSheet/compiler/resolveShadowValue.mjs.map +1 -1
  70. package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs +24 -22
  71. package/dist/esm/StyleSheet/dom/createCSSStyleSheet.mjs.map +1 -1
  72. package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs +94 -93
  73. package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.mjs.map +1 -1
  74. package/dist/esm/StyleSheet/dom/index.mjs +57 -54
  75. package/dist/esm/StyleSheet/dom/index.mjs.map +1 -1
  76. package/dist/esm/StyleSheet/index.mjs +18 -17
  77. package/dist/esm/StyleSheet/index.mjs.map +1 -1
  78. package/dist/esm/StyleSheet/preprocess.mjs +58 -75
  79. package/dist/esm/StyleSheet/preprocess.mjs.map +1 -1
  80. package/dist/esm/StyleSheet/validate.mjs +58 -57
  81. package/dist/esm/StyleSheet/validate.mjs.map +1 -1
  82. package/dist/esm/TextAncestorContext.mjs +2 -0
  83. package/dist/esm/TextAncestorContext.mjs.map +1 -1
  84. package/dist/esm/colorProps.mjs +11 -10
  85. package/dist/esm/colorProps.mjs.map +1 -1
  86. package/dist/esm/index.js +22 -15
  87. package/dist/esm/index.mjs +22 -15
  88. package/dist/esm/modules/AccessibilityUtil/index.mjs +5 -3
  89. package/dist/esm/modules/AccessibilityUtil/index.mjs.map +1 -1
  90. package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs +2 -1
  91. package/dist/esm/modules/AccessibilityUtil/isDisabled.mjs.map +1 -1
  92. package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs +33 -31
  93. package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.mjs.map +1 -1
  94. package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs +20 -21
  95. package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.mjs.map +1 -1
  96. package/dist/esm/modules/AssetRegistry/index.mjs +3 -2
  97. package/dist/esm/modules/AssetRegistry/index.mjs.map +1 -1
  98. package/dist/esm/modules/ImageLoader/index.mjs +120 -124
  99. package/dist/esm/modules/ImageLoader/index.mjs.map +1 -1
  100. package/dist/esm/modules/InteractionManager.mjs +199 -201
  101. package/dist/esm/modules/InteractionManager.mjs.map +1 -1
  102. package/dist/esm/modules/Platform/index.mjs +4 -3
  103. package/dist/esm/modules/Platform/index.mjs.map +1 -1
  104. package/dist/esm/modules/TextInputState/index.mjs +42 -40
  105. package/dist/esm/modules/TextInputState/index.mjs.map +1 -1
  106. package/dist/esm/modules/UIManager/index.mjs +33 -33
  107. package/dist/esm/modules/UIManager/index.mjs.map +1 -1
  108. package/dist/esm/modules/canUseDOM.mjs +1 -0
  109. package/dist/esm/modules/canUseDOM.mjs.map +1 -1
  110. package/dist/esm/modules/createDOMProps/index.mjs +271 -342
  111. package/dist/esm/modules/createDOMProps/index.mjs.map +1 -1
  112. package/dist/esm/modules/createEventHandle/index.mjs +44 -44
  113. package/dist/esm/modules/createEventHandle/index.mjs.map +1 -1
  114. package/dist/esm/modules/dismissKeyboard/index.mjs +3 -1
  115. package/dist/esm/modules/dismissKeyboard/index.mjs.map +1 -1
  116. package/dist/esm/modules/forwardedProps/index.mjs +104 -104
  117. package/dist/esm/modules/forwardedProps/index.mjs.map +1 -1
  118. package/dist/esm/modules/getBoundingClientRect/index.mjs +8 -7
  119. package/dist/esm/modules/getBoundingClientRect/index.mjs.map +1 -1
  120. package/dist/esm/modules/invariant.mjs +11 -10
  121. package/dist/esm/modules/invariant.mjs.map +1 -1
  122. package/dist/esm/modules/isSelectionValid/index.mjs +8 -7
  123. package/dist/esm/modules/isSelectionValid/index.mjs.map +1 -1
  124. package/dist/esm/modules/isWebColor/index.mjs +2 -1
  125. package/dist/esm/modules/isWebColor/index.mjs.map +1 -1
  126. package/dist/esm/modules/mergeRefs/index.mjs +17 -16
  127. package/dist/esm/modules/mergeRefs/index.mjs.map +1 -1
  128. package/dist/esm/modules/modality/index.mjs +115 -115
  129. package/dist/esm/modules/modality/index.mjs.map +1 -1
  130. package/dist/esm/modules/multiplyStyleLengthValue/index.mjs +11 -10
  131. package/dist/esm/modules/multiplyStyleLengthValue/index.mjs.map +1 -1
  132. package/dist/esm/modules/normalizeColor/index.mjs +15 -13
  133. package/dist/esm/modules/normalizeColor/index.mjs.map +1 -1
  134. package/dist/esm/modules/pick/index.mjs +8 -9
  135. package/dist/esm/modules/pick/index.mjs.map +1 -1
  136. package/dist/esm/modules/processColor/index.mjs +12 -10
  137. package/dist/esm/modules/processColor/index.mjs.map +1 -1
  138. package/dist/esm/modules/requestIdleCallback/index.mjs +14 -12
  139. package/dist/esm/modules/requestIdleCallback/index.mjs.map +1 -1
  140. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +27 -25
  141. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -1
  142. package/dist/esm/modules/setValueForStyles/index.mjs +15 -16
  143. package/dist/esm/modules/setValueForStyles/index.mjs.map +1 -1
  144. package/dist/esm/modules/unitlessNumbers/index.mjs +60 -57
  145. package/dist/esm/modules/unitlessNumbers/index.mjs.map +1 -1
  146. package/dist/esm/modules/useElementLayout/index.mjs +12 -14
  147. package/dist/esm/modules/useElementLayout/index.mjs.map +1 -1
  148. package/dist/esm/modules/useEvent/index.mjs +28 -26
  149. package/dist/esm/modules/useEvent/index.mjs.map +1 -1
  150. package/dist/esm/modules/useHover/index.mjs +101 -101
  151. package/dist/esm/modules/useHover/index.mjs.map +1 -1
  152. package/dist/esm/modules/useLayoutEffect/index.mjs +2 -0
  153. package/dist/esm/modules/useLayoutEffect/index.mjs.map +1 -1
  154. package/dist/esm/modules/useLocale/index.mjs +15 -17
  155. package/dist/esm/modules/useLocale/index.mjs.map +1 -1
  156. package/dist/esm/modules/useLocale/isLocaleRTL.mjs +52 -58
  157. package/dist/esm/modules/useLocale/isLocaleRTL.mjs.map +1 -1
  158. package/dist/esm/modules/useMergeRefs/index.mjs +3 -3
  159. package/dist/esm/modules/useMergeRefs/index.mjs.map +1 -1
  160. package/dist/esm/modules/usePlatformMethods/index.mjs +11 -12
  161. package/dist/esm/modules/usePlatformMethods/index.mjs.map +1 -1
  162. package/dist/esm/modules/useStable/index.mjs +8 -6
  163. package/dist/esm/modules/useStable/index.mjs.map +1 -1
  164. package/dist/esm/styleTypes.mjs +0 -2
  165. package/dist/esm/types.mjs +0 -2
  166. package/package.json +10 -10
  167. package/src/StyleSheet/compiler/index.tsx +2 -5
  168. package/src/StyleSheet/preprocess.tsx +1 -4
  169. package/src/modules/createDOMProps/index.tsx +8 -22
  170. package/src/modules/forwardedProps/index.tsx +0 -1
  171. package/src/modules/mergeRefs/index.tsx +1 -1
  172. package/src/modules/pick/index.tsx +2 -4
  173. package/src/modules/setValueForStyles/dangerousStyleValue.tsx +1 -1
  174. package/src/modules/setValueForStyles/index.tsx +0 -3
  175. package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -1
  176. package/types/StyleSheet/compiler/index.d.ts.map +1 -1
  177. package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -1
  178. package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -1
  179. package/types/StyleSheet/index.d.ts +15 -16
  180. package/types/StyleSheet/index.d.ts.map +1 -1
  181. package/types/StyleSheet/preprocess.d.ts +1 -1
  182. package/types/StyleSheet/preprocess.d.ts.map +1 -1
  183. package/types/colorProps.d.ts.map +1 -1
  184. package/types/modules/AccessibilityUtil/index.d.ts +6 -5
  185. package/types/modules/AccessibilityUtil/index.d.ts.map +1 -1
  186. package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -1
  187. package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -1
  188. package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -1
  189. package/types/modules/ImageLoader/index.d.ts +1 -1
  190. package/types/modules/ImageLoader/index.d.ts.map +1 -1
  191. package/types/modules/InteractionManager.d.ts +3 -3
  192. package/types/modules/InteractionManager.d.ts.map +1 -1
  193. package/types/modules/Platform/index.d.ts.map +1 -1
  194. package/types/modules/TextInputState/index.d.ts.map +1 -1
  195. package/types/modules/UIManager/index.d.ts +1 -6
  196. package/types/modules/UIManager/index.d.ts.map +1 -1
  197. package/types/modules/createDOMProps/index.d.ts.map +1 -1
  198. package/types/modules/forwardedProps/index.d.ts +70 -74
  199. package/types/modules/forwardedProps/index.d.ts.map +1 -1
  200. package/types/modules/getBoundingClientRect/index.d.ts.map +1 -1
  201. package/types/modules/isWebColor/index.d.ts.map +1 -1
  202. package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -1
  203. package/types/modules/normalizeColor/index.d.ts.map +1 -1
  204. package/types/modules/pick/index.d.ts.map +1 -1
  205. package/types/modules/processColor/index.d.ts.map +1 -1
  206. package/types/modules/requestIdleCallback/index.d.ts +3 -1
  207. package/types/modules/requestIdleCallback/index.d.ts.map +1 -1
  208. package/types/modules/setValueForStyles/index.d.ts.map +1 -1
  209. package/types/modules/unitlessNumbers/index.d.ts.map +1 -1
  210. package/types/modules/useLayoutEffect/index.d.ts +1 -1
  211. package/types/modules/useLayoutEffect/index.d.ts.map +1 -1
  212. package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +0 -265
  213. package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +0 -419
  214. package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +0 -160
  215. package/dist/cjs/StyleSheet/__tests__/index-test.cjs +0 -436
  216. package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +0 -121
  217. package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +0 -51
  218. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +0 -57
  219. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +0 -46
  220. package/dist/cjs/modules/Platform/__tests__/index-test.cjs +0 -56
  221. package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +0 -111
  222. package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +0 -177
  223. package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +0 -422
  224. package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +0 -48
  225. package/dist/cjs/modules/modality/__tests__/index-test.cjs +0 -59
  226. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +0 -38
  227. package/dist/cjs/modules/processColor/__tests__/index-test.cjs +0 -85
  228. package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +0 -490
  229. package/dist/cjs/modules/useHover/__tests__/index-test.cjs +0 -382
  230. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +0 -125
  231. package/dist/cjs/modules/useStable/__tests__/index-test.cjs +0 -122
  232. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +0 -242
  233. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +0 -1
  234. package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +0 -420
  235. package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +0 -1
  236. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +0 -137
  237. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +0 -1
  238. package/dist/esm/StyleSheet/__tests__/index-test.mjs +0 -413
  239. package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +0 -1
  240. package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +0 -122
  241. package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +0 -1
  242. package/dist/esm/StyleSheet/__tests__/validate-test.mjs +0 -52
  243. package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +0 -1
  244. package/dist/esm/StyleSheet/compiler/hash.mjs.map +0 -1
  245. package/dist/esm/index.js.map +0 -1
  246. package/dist/esm/index.mjs.map +0 -1
  247. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +0 -34
  248. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +0 -1
  249. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +0 -23
  250. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +0 -1
  251. package/dist/esm/modules/Platform/__tests__/index-test.mjs +0 -33
  252. package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +0 -1
  253. package/dist/esm/modules/UIManager/__tests__/index-test.mjs +0 -88
  254. package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +0 -1
  255. package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +0 -154
  256. package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +0 -1
  257. package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +0 -399
  258. package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +0 -1
  259. package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +0 -25
  260. package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +0 -1
  261. package/dist/esm/modules/modality/__tests__/index-test.mjs +0 -60
  262. package/dist/esm/modules/modality/__tests__/index-test.mjs.map +0 -1
  263. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +0 -15
  264. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +0 -1
  265. package/dist/esm/modules/processColor/__tests__/index-test.mjs +0 -62
  266. package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +0 -1
  267. package/dist/esm/modules/useEvent/__tests__/index-test.mjs +0 -467
  268. package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +0 -1
  269. package/dist/esm/modules/useHover/__tests__/index-test.mjs +0 -359
  270. package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +0 -1
  271. package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +0 -102
  272. package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +0 -1
  273. package/dist/esm/modules/useStable/__tests__/index-test.mjs +0 -99
  274. package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +0 -1
  275. package/dist/esm/styleTypes.mjs.map +0 -1
  276. package/dist/esm/types.mjs.map +0 -1
  277. package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +0 -236
  278. package/src/StyleSheet/__tests__/compiler-test.tsx +0 -426
  279. package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +0 -169
  280. package/src/StyleSheet/__tests__/index-test.tsx +0 -406
  281. package/src/StyleSheet/__tests__/preprocess-test.tsx +0 -107
  282. package/src/StyleSheet/__tests__/validate-test.tsx +0 -42
  283. package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +0 -44
  284. package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +0 -25
  285. package/src/modules/Platform/__tests__/index-test.tsx +0 -45
  286. package/src/modules/UIManager/__tests__/index-test.tsx +0 -87
  287. package/src/modules/createDOMProps/__tests__/index-test.tsx +0 -138
  288. package/src/modules/createEventHandle/__tests__/index-test.tsx +0 -459
  289. package/src/modules/mergeRefs/__tests__/index-test.tsx +0 -32
  290. package/src/modules/modality/__tests__/index-test.tsx +0 -66
  291. package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +0 -23
  292. package/src/modules/processColor/__tests__/index-test.tsx +0 -78
  293. package/src/modules/useEvent/__tests__/index-test.tsx +0 -511
  294. package/src/modules/useHover/__tests__/index-test.tsx +0 -342
  295. package/src/modules/useMergeRefs/__tests__/index-test.tsx +0 -91
  296. package/src/modules/useStable/__tests__/index-test.tsx +0 -101
@@ -2,25 +2,26 @@ import { simpleHash } from "@tamagui/simple-hash";
2
2
  import { createReactDOMStyle } from "./createReactDOMStyle.mjs";
3
3
  import { hyphenateStyleName } from "./hyphenateStyleName.mjs";
4
4
  import { normalizeValueWithProperty } from "./normalizeValueWithProperty.mjs";
5
- const cache = /* @__PURE__ */new Map();
5
+
6
+ const cache = /* @__PURE__ */ new Map();
6
7
  const emptyObject = {};
7
8
  const classicGroup = 1;
8
9
  const atomicGroup = 2.2;
9
10
  const customGroup = {
10
- borderColor: 2,
11
- borderRadius: 2,
12
- borderStyle: 2,
13
- borderWidth: 2,
14
- display: 2,
15
- flex: 2,
16
- margin: 2,
17
- overflow: 2,
18
- overscrollBehavior: 2,
19
- padding: 2,
20
- marginHorizontal: 2.1,
21
- marginVertical: 2.1,
22
- paddingHorizontal: 2.1,
23
- paddingVertical: 2.1
11
+ borderColor: 2,
12
+ borderRadius: 2,
13
+ borderStyle: 2,
14
+ borderWidth: 2,
15
+ display: 2,
16
+ flex: 2,
17
+ margin: 2,
18
+ overflow: 2,
19
+ overscrollBehavior: 2,
20
+ padding: 2,
21
+ marginHorizontal: 2.1,
22
+ marginVertical: 2.1,
23
+ paddingHorizontal: 2.1,
24
+ paddingVertical: 2.1
24
25
  };
25
26
  const borderTopLeftRadius = "borderTopLeftRadius";
26
27
  const borderTopRightRadius = "borderTopRightRadius";
@@ -39,313 +40,289 @@ const paddingLeft = "paddingLeft";
39
40
  const paddingRight = "paddingRight";
40
41
  const left = "left";
41
42
  const PROPERTIES_FLIP = {
42
- [borderTopLeftRadius]: borderTopRightRadius,
43
- [borderTopRightRadius]: borderTopLeftRadius,
44
- [borderBottomLeftRadius]: borderBottomRightRadius,
45
- [borderBottomRightRadius]: borderBottomLeftRadius,
46
- [borderLeftColor]: borderRightColor,
47
- [borderLeftStyle]: borderRightStyle,
48
- [borderLeftWidth]: borderRightWidth,
49
- [borderRightColor]: borderLeftColor,
50
- [borderRightStyle]: borderLeftStyle,
51
- [borderRightWidth]: borderLeftWidth,
52
- [left]: right,
53
- [marginLeft]: marginRight,
54
- [marginRight]: marginLeft,
55
- [paddingLeft]: paddingRight,
56
- [paddingRight]: paddingLeft,
57
- [right]: left
43
+ [borderTopLeftRadius]: borderTopRightRadius,
44
+ [borderTopRightRadius]: borderTopLeftRadius,
45
+ [borderBottomLeftRadius]: borderBottomRightRadius,
46
+ [borderBottomRightRadius]: borderBottomLeftRadius,
47
+ [borderLeftColor]: borderRightColor,
48
+ [borderLeftStyle]: borderRightStyle,
49
+ [borderLeftWidth]: borderRightWidth,
50
+ [borderRightColor]: borderLeftColor,
51
+ [borderRightStyle]: borderLeftStyle,
52
+ [borderRightWidth]: borderLeftWidth,
53
+ [left]: right,
54
+ [marginLeft]: marginRight,
55
+ [marginRight]: marginLeft,
56
+ [paddingLeft]: paddingRight,
57
+ [paddingRight]: paddingLeft,
58
+ [right]: left
58
59
  };
59
60
  const PROPERTIES_I18N = {
60
- borderTopStartRadius: borderTopLeftRadius,
61
- borderTopEndRadius: borderTopRightRadius,
62
- borderBottomStartRadius: borderBottomLeftRadius,
63
- borderBottomEndRadius: borderBottomRightRadius,
64
- borderStartColor: borderLeftColor,
65
- borderStartStyle: borderLeftStyle,
66
- borderStartWidth: borderLeftWidth,
67
- borderEndColor: borderRightColor,
68
- borderEndStyle: borderRightStyle,
69
- borderEndWidth: borderRightWidth,
70
- end: right,
71
- marginStart: marginLeft,
72
- marginEnd: marginRight,
73
- paddingStart: paddingLeft,
74
- paddingEnd: paddingRight,
75
- start: left
61
+ borderTopStartRadius: borderTopLeftRadius,
62
+ borderTopEndRadius: borderTopRightRadius,
63
+ borderBottomStartRadius: borderBottomLeftRadius,
64
+ borderBottomEndRadius: borderBottomRightRadius,
65
+ borderStartColor: borderLeftColor,
66
+ borderStartStyle: borderLeftStyle,
67
+ borderStartWidth: borderLeftWidth,
68
+ borderEndColor: borderRightColor,
69
+ borderEndStyle: borderRightStyle,
70
+ borderEndWidth: borderRightWidth,
71
+ end: right,
72
+ marginStart: marginLeft,
73
+ marginEnd: marginRight,
74
+ paddingStart: paddingLeft,
75
+ paddingEnd: paddingRight,
76
+ start: left
76
77
  };
77
- const PROPERTIES_VALUE = ["clear", "float", "textAlign"];
78
+ const PROPERTIES_VALUE = [
79
+ "clear",
80
+ "float",
81
+ "textAlign"
82
+ ];
78
83
  function atomic(style) {
79
- const compiledStyle = {
80
- $$css: true
81
- };
82
- const compiledRules = [];
83
- function atomicCompile(prop, value) {
84
- const valueString = stringifyValueWithProperty(value, prop);
85
- const cacheKey = prop + valueString;
86
- const cachedResult = cache.get(cacheKey);
87
- let identifier;
88
- if (cachedResult != null) {
89
- identifier = cachedResult[0];
90
- compiledRules.push(cachedResult[1]);
91
- } else {
92
- identifier = createIdentifier("r", prop, value);
93
- const order = customGroup[prop] || atomicGroup;
94
- const rules = createAtomicRules(identifier, prop, value);
95
- const orderedRules = [rules, order];
96
- compiledRules.push(orderedRules);
97
- cache.set(cacheKey, [identifier, orderedRules]);
98
- }
99
- return identifier;
100
- }
101
- Object.keys(style).sort().forEach(prop => {
102
- const value = style[prop];
103
- if (value != null) {
104
- let localizeableValue;
105
- if (PROPERTIES_VALUE.indexOf(prop) > -1) {
106
- const left2 = atomicCompile(prop, "left");
107
- const right2 = atomicCompile(prop, "right");
108
- if (value === "start") {
109
- localizeableValue = [left2, right2];
110
- } else if (value === "end") {
111
- localizeableValue = [right2, left2];
112
- }
113
- }
114
- const propPolyfill = PROPERTIES_I18N[prop];
115
- if (propPolyfill != null) {
116
- const ltr = atomicCompile(propPolyfill, value);
117
- const rtl = atomicCompile(PROPERTIES_FLIP[propPolyfill], value);
118
- localizeableValue = [ltr, rtl];
119
- }
120
- if (prop === "transitionProperty") {
121
- const values = Array.isArray(value) ? value : [value];
122
- const polyfillIndices = [];
123
- for (let i = 0; i < values.length; i++) {
124
- const val = values[i];
125
- if (typeof val === "string" && PROPERTIES_I18N[val] != null) {
126
- polyfillIndices.push(i);
127
- }
128
- }
129
- if (polyfillIndices.length > 0) {
130
- const ltrPolyfillValues = [...values];
131
- const rtlPolyfillValues = [...values];
132
- polyfillIndices.forEach(i => {
133
- const ltrVal = ltrPolyfillValues[i];
134
- if (typeof ltrVal === "string") {
135
- const ltrPolyfill = PROPERTIES_I18N[ltrVal];
136
- const rtlPolyfill = PROPERTIES_FLIP[ltrPolyfill];
137
- ltrPolyfillValues[i] = ltrPolyfill;
138
- rtlPolyfillValues[i] = rtlPolyfill;
139
- const ltr = atomicCompile(prop, ltrPolyfillValues);
140
- const rtl = atomicCompile(prop, rtlPolyfillValues);
141
- localizeableValue = [ltr, rtl];
142
- }
143
- });
144
- }
145
- }
146
- if (localizeableValue == null) {
147
- localizeableValue = atomicCompile(prop, value);
148
- } else {
149
- compiledStyle["$$css$localize"] = true;
150
- }
151
- compiledStyle[prop] = localizeableValue;
152
- }
153
- });
154
- return [compiledStyle, compiledRules];
84
+ const compiledStyle = { $$css: true };
85
+ const compiledRules = [];
86
+ function atomicCompile(prop, value) {
87
+ const valueString = stringifyValueWithProperty(value, prop);
88
+ const cacheKey = prop + valueString;
89
+ const cachedResult = cache.get(cacheKey);
90
+ let identifier;
91
+ if (cachedResult != null) {
92
+ identifier = cachedResult[0];
93
+ compiledRules.push(cachedResult[1]);
94
+ } else {
95
+ identifier = createIdentifier("r", prop, value);
96
+ const order = customGroup[prop] || atomicGroup;
97
+ const rules = createAtomicRules(identifier, prop, value);
98
+ const orderedRules = [rules, order];
99
+ compiledRules.push(orderedRules);
100
+ cache.set(cacheKey, [identifier, orderedRules]);
101
+ }
102
+ return identifier;
103
+ }
104
+ Object.keys(style).sort().forEach((prop) => {
105
+ const value = style[prop];
106
+ if (value != null) {
107
+ let localizeableValue;
108
+ if (PROPERTIES_VALUE.indexOf(prop) > -1) {
109
+ const left2 = atomicCompile(prop, "left");
110
+ const right2 = atomicCompile(prop, "right");
111
+ if (value === "start") {
112
+ localizeableValue = [left2, right2];
113
+ } else if (value === "end") {
114
+ localizeableValue = [right2, left2];
115
+ }
116
+ }
117
+ const propPolyfill = PROPERTIES_I18N[prop];
118
+ if (propPolyfill != null) {
119
+ const ltr = atomicCompile(propPolyfill, value);
120
+ const rtl = atomicCompile(PROPERTIES_FLIP[propPolyfill], value);
121
+ localizeableValue = [ltr, rtl];
122
+ }
123
+ if (prop === "transitionProperty") {
124
+ const values = Array.isArray(value) ? value : [value];
125
+ const polyfillIndices = [];
126
+ for (let i = 0; i < values.length; i++) {
127
+ const val = values[i];
128
+ if (typeof val === "string" && PROPERTIES_I18N[val] != null) {
129
+ polyfillIndices.push(i);
130
+ }
131
+ }
132
+ if (polyfillIndices.length > 0) {
133
+ const ltrPolyfillValues = [...values];
134
+ const rtlPolyfillValues = [...values];
135
+ polyfillIndices.forEach((i) => {
136
+ const ltrVal = ltrPolyfillValues[i];
137
+ if (typeof ltrVal === "string") {
138
+ const ltrPolyfill = PROPERTIES_I18N[ltrVal];
139
+ const rtlPolyfill = PROPERTIES_FLIP[ltrPolyfill];
140
+ ltrPolyfillValues[i] = ltrPolyfill;
141
+ rtlPolyfillValues[i] = rtlPolyfill;
142
+ const ltr = atomicCompile(prop, ltrPolyfillValues);
143
+ const rtl = atomicCompile(prop, rtlPolyfillValues);
144
+ localizeableValue = [ltr, rtl];
145
+ }
146
+ });
147
+ }
148
+ }
149
+ if (localizeableValue == null) {
150
+ localizeableValue = atomicCompile(prop, value);
151
+ } else {
152
+ compiledStyle["$$css$localize"] = true;
153
+ }
154
+ compiledStyle[prop] = localizeableValue;
155
+ }
156
+ });
157
+ return [compiledStyle, compiledRules];
155
158
  }
156
159
  function classic(style, name) {
157
- const compiledStyle = {
158
- $$css: true
159
- };
160
- const compiledRules = [];
161
- const {
162
- animationKeyframes,
163
- ...rest
164
- } = style;
165
- const identifier = createIdentifier("css", name, style);
166
- const selector = `.${identifier}`;
167
- let animationName;
168
- if (animationKeyframes != null) {
169
- const [animationNames, keyframesRules] = processKeyframesValue(animationKeyframes);
170
- animationName = animationNames.join(",");
171
- compiledRules.push(...keyframesRules);
172
- }
173
- const block = createDeclarationBlock({
174
- ...rest,
175
- animationName
176
- });
177
- compiledRules.push(`${selector}${block}`);
178
- compiledStyle[identifier] = identifier;
179
- return [compiledStyle, [[compiledRules, classicGroup]]];
160
+ const compiledStyle = { $$css: true };
161
+ const compiledRules = [];
162
+ const { animationKeyframes, ...rest } = style;
163
+ const identifier = createIdentifier("css", name, style);
164
+ const selector = `.${identifier}`;
165
+ let animationName;
166
+ if (animationKeyframes != null) {
167
+ const [animationNames, keyframesRules] = processKeyframesValue(animationKeyframes);
168
+ animationName = animationNames.join(",");
169
+ compiledRules.push(...keyframesRules);
170
+ }
171
+ const block = createDeclarationBlock({
172
+ ...rest,
173
+ animationName
174
+ });
175
+ compiledRules.push(`${selector}${block}`);
176
+ compiledStyle[identifier] = identifier;
177
+ return [compiledStyle, [[compiledRules, classicGroup]]];
180
178
  }
181
179
  function inline(originalStyle, isRTL) {
182
- const style = originalStyle || emptyObject;
183
- const frozenProps = {};
184
- const nextStyle = {};
185
- for (const originalProp in style) {
186
- const originalValue = style[originalProp];
187
- let prop = originalProp;
188
- let value = originalValue;
189
- if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {
190
- continue;
191
- }
192
- if (PROPERTIES_VALUE.indexOf(originalProp) > -1) {
193
- if (originalValue === "start") {
194
- value = isRTL ? "right" : "left";
195
- } else if (originalValue === "end") {
196
- value = isRTL ? "left" : "right";
197
- }
198
- }
199
- const propPolyfill = PROPERTIES_I18N[originalProp];
200
- if (propPolyfill != null) {
201
- prop = isRTL ? PROPERTIES_FLIP[propPolyfill] : propPolyfill;
202
- }
203
- if (originalProp === "transitionProperty") {
204
- const originalValues = Array.isArray(originalValue) ? originalValue : [originalValue];
205
- originalValues.forEach((val, i) => {
206
- if (typeof val === "string") {
207
- const valuePolyfill = PROPERTIES_I18N[val];
208
- if (valuePolyfill != null) {
209
- originalValues[i] = isRTL ? PROPERTIES_FLIP[valuePolyfill] : valuePolyfill;
210
- }
211
- }
212
- });
213
- }
214
- if (!frozenProps[prop]) {
215
- nextStyle[prop] = value;
216
- }
217
- if (PROPERTIES_I18N.hasOwnProperty(originalProp)) {
218
- frozenProps[prop] = true;
219
- }
220
- }
221
- return createReactDOMStyle(nextStyle, true);
180
+ const style = originalStyle || emptyObject;
181
+ const frozenProps = {};
182
+ const nextStyle = {};
183
+ for (const originalProp in style) {
184
+ const originalValue = style[originalProp];
185
+ let prop = originalProp;
186
+ let value = originalValue;
187
+ if (originalValue == null) {
188
+ continue;
189
+ }
190
+ if (PROPERTIES_VALUE.indexOf(originalProp) > -1) {
191
+ if (originalValue === "start") {
192
+ value = isRTL ? "right" : "left";
193
+ } else if (originalValue === "end") {
194
+ value = isRTL ? "left" : "right";
195
+ }
196
+ }
197
+ const propPolyfill = PROPERTIES_I18N[originalProp];
198
+ if (propPolyfill != null) {
199
+ prop = isRTL ? PROPERTIES_FLIP[propPolyfill] : propPolyfill;
200
+ }
201
+ if (originalProp === "transitionProperty") {
202
+ const originalValues = Array.isArray(originalValue) ? originalValue : [originalValue];
203
+ originalValues.forEach((val, i) => {
204
+ if (typeof val === "string") {
205
+ const valuePolyfill = PROPERTIES_I18N[val];
206
+ if (valuePolyfill != null) {
207
+ originalValues[i] = isRTL ? PROPERTIES_FLIP[valuePolyfill] : valuePolyfill;
208
+ }
209
+ }
210
+ });
211
+ }
212
+ if (!frozenProps[prop]) {
213
+ nextStyle[prop] = value;
214
+ }
215
+ if (originalProp in PROPERTIES_I18N) {
216
+ frozenProps[prop] = true;
217
+ }
218
+ }
219
+ return createReactDOMStyle(nextStyle, true);
222
220
  }
223
221
  function stringifyValueWithProperty(value, property) {
224
- const normalizedValue = normalizeValueWithProperty(value, property);
225
- return typeof normalizedValue !== "string" ? JSON.stringify(normalizedValue || "") : normalizedValue;
222
+ const normalizedValue = normalizeValueWithProperty(value, property);
223
+ return typeof normalizedValue !== "string" ? JSON.stringify(normalizedValue || "") : normalizedValue;
226
224
  }
227
225
  function createAtomicRules(identifier, property, value) {
228
- const rules = [];
229
- const selector = `.${identifier}`;
230
- switch (property) {
231
- case "animationKeyframes":
232
- {
233
- const [animationNames, keyframesRules] = processKeyframesValue(value);
234
- const block = createDeclarationBlock({
235
- animationName: animationNames.join(",")
236
- });
237
- rules.push(`${selector}${block}`, ...keyframesRules);
238
- break;
239
- }
240
- // Equivalent to using '::placeholder'
241
- case "placeholderTextColor":
242
- {
243
- const block = createDeclarationBlock({
244
- color: value,
245
- opacity: 1
246
- });
247
- rules.push(`${selector}::-webkit-input-placeholder${block}`, `${selector}::-moz-placeholder${block}`, `${selector}:-ms-input-placeholder${block}`, `${selector}::placeholder${block}`);
248
- break;
249
- }
250
- // Polyfill for additional 'pointer-events' values
251
- // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58
252
- case "pointerEvents":
253
- {
254
- let finalValue = value;
255
- if (value === "auto" || value === "box-only") {
256
- finalValue = "auto!important";
257
- if (value === "box-only") {
258
- const block2 = createDeclarationBlock({
259
- pointerEvents: "none"
260
- });
261
- rules.push(`${selector}>*${block2}`);
262
- }
263
- } else if (value === "none" || value === "box-none") {
264
- finalValue = "none!important";
265
- if (value === "box-none") {
266
- const block2 = createDeclarationBlock({
267
- pointerEvents: "auto"
268
- });
269
- rules.push(`${selector}>*${block2}`);
270
- }
271
- }
272
- const block = createDeclarationBlock({
273
- pointerEvents: finalValue
274
- });
275
- rules.push(`${selector}${block}`);
276
- break;
277
- }
278
- // Polyfill for draft spec
279
- // https://drafts.csswg.org/css-scrollbars-1/
280
- case "scrollbarWidth":
281
- {
282
- if (value === "none") {
283
- rules.push(`${selector}::-webkit-scrollbar{display:none}`);
284
- }
285
- const block = createDeclarationBlock({
286
- scrollbarWidth: value
287
- });
288
- rules.push(`${selector}${block}`);
289
- break;
290
- }
291
- default:
292
- {
293
- const block = createDeclarationBlock({
294
- [property]: value
295
- });
296
- rules.push(`${selector}${block}`);
297
- break;
298
- }
299
- }
300
- return rules;
226
+ const rules = [];
227
+ const selector = `.${identifier}`;
228
+ switch (property) {
229
+ case "animationKeyframes": {
230
+ const [animationNames, keyframesRules] = processKeyframesValue(value);
231
+ const block = createDeclarationBlock({ animationName: animationNames.join(",") });
232
+ rules.push(`${selector}${block}`, ...keyframesRules);
233
+ break;
234
+ }
235
+ case "placeholderTextColor": {
236
+ const block = createDeclarationBlock({
237
+ color: value,
238
+ opacity: 1
239
+ });
240
+ rules.push(`${selector}::-webkit-input-placeholder${block}`, `${selector}::-moz-placeholder${block}`, `${selector}:-ms-input-placeholder${block}`, `${selector}::placeholder${block}`);
241
+ break;
242
+ }
243
+ case "pointerEvents": {
244
+ let finalValue = value;
245
+ if (value === "auto" || value === "box-only") {
246
+ finalValue = "auto!important";
247
+ if (value === "box-only") {
248
+ const block2 = createDeclarationBlock({ pointerEvents: "none" });
249
+ rules.push(`${selector}>*${block2}`);
250
+ }
251
+ } else if (value === "none" || value === "box-none") {
252
+ finalValue = "none!important";
253
+ if (value === "box-none") {
254
+ const block2 = createDeclarationBlock({ pointerEvents: "auto" });
255
+ rules.push(`${selector}>*${block2}`);
256
+ }
257
+ }
258
+ const block = createDeclarationBlock({ pointerEvents: finalValue });
259
+ rules.push(`${selector}${block}`);
260
+ break;
261
+ }
262
+ case "scrollbarWidth": {
263
+ if (value === "none") {
264
+ rules.push(`${selector}::-webkit-scrollbar{display:none}`);
265
+ }
266
+ const block = createDeclarationBlock({ scrollbarWidth: value });
267
+ rules.push(`${selector}${block}`);
268
+ break;
269
+ }
270
+ default: {
271
+ const block = createDeclarationBlock({ [property]: value });
272
+ rules.push(`${selector}${block}`);
273
+ break;
274
+ }
275
+ }
276
+ return rules;
301
277
  }
302
278
  function createDeclarationBlock(style) {
303
- const domStyle = createReactDOMStyle(style);
304
- const declarationsString = Object.keys(domStyle).map(property => {
305
- const value = domStyle[property];
306
- const prop = hyphenateStyleName(property);
307
- if (Array.isArray(value)) {
308
- return value.map(v => `${prop}:${v}`).join(";");
309
- } else {
310
- return `${prop}:${value}`;
311
- }
312
- }).sort().join(";");
313
- return `{${declarationsString};}`;
279
+ const domStyle = createReactDOMStyle(style);
280
+ const declarationsString = Object.keys(domStyle).map((property) => {
281
+ const value = domStyle[property];
282
+ const prop = hyphenateStyleName(property);
283
+ if (Array.isArray(value)) {
284
+ return value.map((v) => `${prop}:${v}`).join(";");
285
+ } else {
286
+ return `${prop}:${value}`;
287
+ }
288
+ }).sort().join(";");
289
+ return `{${declarationsString};}`;
314
290
  }
315
291
  function createIdentifier(prefix, name, value) {
316
- const hashedString = simpleHash(name + stringifyValueWithProperty(value, name));
317
- return process.env.NODE_ENV !== "production" ? `${prefix}-${name}-${hashedString}` : `${prefix}-${hashedString}`;
292
+ const hashedString = simpleHash(name + stringifyValueWithProperty(value, name));
293
+ return process.env.NODE_ENV !== "production" ? `${prefix}-${name}-${hashedString}` : `${prefix}-${hashedString}`;
318
294
  }
319
295
  function createKeyframes(keyframes) {
320
- const prefixes = ["-webkit-", ""];
321
- const identifier = createIdentifier("r", "animation", keyframes);
322
- const steps = "{" + Object.keys(keyframes).map(stepName => {
323
- const rule = keyframes[stepName];
324
- const block = createDeclarationBlock(rule);
325
- return `${stepName}${block}`;
326
- }).join("") + "}";
327
- const rules = prefixes.map(prefix => {
328
- return `@${prefix}keyframes ${identifier}${steps}`;
329
- });
330
- return [identifier, rules];
296
+ const prefixes = ["-webkit-", ""];
297
+ const identifier = createIdentifier("r", "animation", keyframes);
298
+ const steps = "{" + Object.keys(keyframes).map((stepName) => {
299
+ const rule = keyframes[stepName];
300
+ const block = createDeclarationBlock(rule);
301
+ return `${stepName}${block}`;
302
+ }).join("") + "}";
303
+ const rules = prefixes.map((prefix) => {
304
+ return `@${prefix}keyframes ${identifier}${steps}`;
305
+ });
306
+ return [identifier, rules];
331
307
  }
332
308
  function processKeyframesValue(keyframesValue) {
333
- if (typeof keyframesValue === "number") {
334
- throw new Error(`Invalid CSS keyframes type: ${typeof keyframesValue}`);
335
- }
336
- const animationNames = [];
337
- const rules = [];
338
- const value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];
339
- value.forEach(keyframes => {
340
- if (typeof keyframes === "string") {
341
- animationNames.push(keyframes);
342
- } else {
343
- const [identifier, keyframesRules] = createKeyframes(keyframes);
344
- animationNames.push(identifier);
345
- rules.push(...keyframesRules);
346
- }
347
- });
348
- return [animationNames, rules];
309
+ if (typeof keyframesValue === "number") {
310
+ throw new Error(`Invalid CSS keyframes type: ${typeof keyframesValue}`);
311
+ }
312
+ const animationNames = [];
313
+ const rules = [];
314
+ const value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];
315
+ value.forEach((keyframes) => {
316
+ if (typeof keyframes === "string") {
317
+ animationNames.push(keyframes);
318
+ } else {
319
+ const [identifier, keyframesRules] = createKeyframes(keyframes);
320
+ animationNames.push(identifier);
321
+ rules.push(...keyframesRules);
322
+ }
323
+ });
324
+ return [animationNames, rules];
349
325
  }
326
+
350
327
  export { atomic, classic, inline, stringifyValueWithProperty };
351
328
  //# sourceMappingURL=index.mjs.map