@tamagui/react-native-web-internals 2.7.7 → 3.0.0-0.canary.1791056644527

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