@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
@@ -3,34 +3,30 @@ 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 normalizeColor_exports = {};
24
- __export(normalizeColor_exports, {
25
- normalizeColor: () => normalizeColor
26
- });
22
+ __export(normalizeColor_exports, { normalizeColor: () => normalizeColor });
27
23
  module.exports = __toCommonJS(normalizeColor_exports);
28
24
  var import_isWebColor = require("../../modules/isWebColor/index.cjs");
29
25
  var import_processColor = require("../../modules/processColor/index.cjs");
30
26
  const normalizeColor = (color, opacity = 1) => {
31
- if (color == null) return;
32
- if (typeof color === "string" && (0, import_isWebColor.isWebColor)(color)) return color;
33
- const colorInt = (0, import_processColor.processColor)(color);
34
- if (colorInt != null) return `rgba(${colorInt >> 16 & 255},${colorInt >> 8 & 255},${colorInt & 255},${((colorInt >> 24 & 255) / 255 * opacity).toFixed(2)})`;
35
- if (typeof color === "string") return color;
36
- };
27
+ if (color == null) return;
28
+ if (typeof color === "string" && (0, import_isWebColor.isWebColor)(color)) return color;
29
+ const colorInt = (0, import_processColor.processColor)(color);
30
+ if (colorInt != null) return `rgba(${colorInt >> 16 & 255},${colorInt >> 8 & 255},${colorInt & 255},${((colorInt >> 24 & 255) / 255 * opacity).toFixed(2)})`;
31
+ if (typeof color === "string") return color;
32
+ };
@@ -3,48 +3,44 @@ 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 normalizeValueWithProperty_exports = {};
24
- __export(normalizeValueWithProperty_exports, {
25
- normalizeValueWithProperty: () => normalizeValueWithProperty
26
- });
22
+ __export(normalizeValueWithProperty_exports, { normalizeValueWithProperty: () => normalizeValueWithProperty });
27
23
  module.exports = __toCommonJS(normalizeValueWithProperty_exports);
28
24
  var import_unitlessNumbers = require("../../modules/unitlessNumbers/index.cjs");
29
25
  var import_normalizeColor = require("./normalizeColor.cjs");
30
26
  const colorProps = {
31
- backgroundColor: true,
32
- borderColor: true,
33
- borderTopColor: true,
34
- borderRightColor: true,
35
- borderBottomColor: true,
36
- borderLeftColor: true,
37
- color: true,
38
- shadowColor: true,
39
- textDecorationColor: true,
40
- textShadowColor: true
27
+ backgroundColor: true,
28
+ borderColor: true,
29
+ borderTopColor: true,
30
+ borderRightColor: true,
31
+ borderBottomColor: true,
32
+ borderLeftColor: true,
33
+ color: true,
34
+ shadowColor: true,
35
+ textDecorationColor: true,
36
+ textShadowColor: true
41
37
  };
42
38
  function normalizeValueWithProperty(value, property) {
43
- let returnValue = value;
44
- if ((property == null || !import_unitlessNumbers.unitlessNumbers[property]) && typeof value === "number") {
45
- returnValue = `${value}px`;
46
- } else if (property != null && colorProps[property]) {
47
- returnValue = (0, import_normalizeColor.normalizeColor)(value);
48
- }
49
- return returnValue;
50
- }
39
+ let returnValue = value;
40
+ if ((property == null || !import_unitlessNumbers.unitlessNumbers[property]) && typeof value === "number") {
41
+ returnValue = `${value}px`;
42
+ } else if (property != null && colorProps[property]) {
43
+ returnValue = (0, import_normalizeColor.normalizeColor)(value);
44
+ }
45
+ return returnValue;
46
+ }
@@ -3,50 +3,38 @@ 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 resolveShadowValue_exports = {};
24
- __export(resolveShadowValue_exports, {
25
- resolveShadowValue: () => resolveShadowValue
26
- });
22
+ __export(resolveShadowValue_exports, { resolveShadowValue: () => resolveShadowValue });
27
23
  module.exports = __toCommonJS(resolveShadowValue_exports);
28
24
  var import_normalizeColor = require("./normalizeColor.cjs");
29
25
  var import_normalizeValueWithProperty = require("./normalizeValueWithProperty.cjs");
30
26
  const defaultOffset = {
31
- height: 0,
32
- width: 0
27
+ height: 0,
28
+ width: 0
29
+ };
30
+ const resolveShadowValue = (style) => {
31
+ const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
32
+ const { height, width } = shadowOffset || defaultOffset;
33
+ const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
34
+ const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
35
+ const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
36
+ const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
37
+ if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
38
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
39
+ }
33
40
  };
34
- const resolveShadowValue = style => {
35
- const {
36
- shadowColor,
37
- shadowOffset,
38
- shadowOpacity,
39
- shadowRadius
40
- } = style;
41
- const {
42
- height,
43
- width
44
- } = shadowOffset || defaultOffset;
45
- const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
46
- const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
47
- const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
48
- const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
49
- if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
50
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
51
- }
52
- };
@@ -3,50 +3,46 @@ 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 createCSSStyleSheet_exports = {};
24
- __export(createCSSStyleSheet_exports, {
25
- createCSSStyleSheet: () => createCSSStyleSheet
26
- });
22
+ __export(createCSSStyleSheet_exports, { createCSSStyleSheet: () => createCSSStyleSheet });
27
23
  module.exports = __toCommonJS(createCSSStyleSheet_exports);
28
24
  var import_canUseDOM = require("../../modules/canUseDOM.cjs");
29
25
  function createCSSStyleSheet(id, rootNode, textContent) {
30
- if (import_canUseDOM.canUseDOM) {
31
- const root = rootNode != null ? rootNode : document;
32
- let element = root.getElementById(id);
33
- if (element == null) {
34
- element = document.createElement("style");
35
- element.setAttribute("id", id);
36
- if (typeof textContent === "string") {
37
- element.appendChild(document.createTextNode(textContent));
38
- }
39
- if (root instanceof ShadowRoot) {
40
- root.insertBefore(element, root.firstChild);
41
- } else {
42
- const head = root.head;
43
- if (head) {
44
- head.appendChild(element);
45
- }
46
- }
47
- }
48
- return element.sheet;
49
- } else {
50
- return null;
51
- }
52
- }
26
+ if (import_canUseDOM.canUseDOM) {
27
+ const root = rootNode != null ? rootNode : document;
28
+ let element = root.getElementById(id);
29
+ if (element == null) {
30
+ element = document.createElement("style");
31
+ element.setAttribute("id", id);
32
+ if (typeof textContent === "string") {
33
+ element.appendChild(document.createTextNode(textContent));
34
+ }
35
+ if (root instanceof ShadowRoot) {
36
+ root.insertBefore(element, root.firstChild);
37
+ } else {
38
+ const head = root.head;
39
+ if (head) {
40
+ head.appendChild(element);
41
+ }
42
+ }
43
+ }
44
+ return element.sheet;
45
+ } else {
46
+ return null;
47
+ }
48
+ }
@@ -3,133 +3,129 @@ 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 createOrderedCSSStyleSheet_exports = {};
24
- __export(createOrderedCSSStyleSheet_exports, {
25
- createOrderedCSSStyleSheet: () => createOrderedCSSStyleSheet
26
- });
22
+ __export(createOrderedCSSStyleSheet_exports, { createOrderedCSSStyleSheet: () => createOrderedCSSStyleSheet });
27
23
  module.exports = __toCommonJS(createOrderedCSSStyleSheet_exports);
28
24
  const slice = Array.prototype.slice;
29
25
  function createOrderedCSSStyleSheet(sheet) {
30
- const groups = {};
31
- const selectors = {};
32
- if (sheet != null) {
33
- let group;
34
- slice.call(sheet.cssRules).forEach((cssRule, i) => {
35
- const cssText = cssRule.cssText;
36
- if (cssText.indexOf("stylesheet-group") > -1) {
37
- group = decodeGroupRule(cssRule);
38
- groups[group] = {
39
- start: i,
40
- rules: [cssText]
41
- };
42
- } else {
43
- const selectorText = getSelectorText(cssText);
44
- if (selectorText != null) {
45
- selectors[selectorText] = true;
46
- groups[group].rules.push(cssText);
47
- }
48
- }
49
- });
50
- }
51
- function sheetInsert(sheet2, group, text) {
52
- const orderedGroups = getOrderedGroups(groups);
53
- const groupIndex = orderedGroups.indexOf(group);
54
- const nextGroupIndex = groupIndex + 1;
55
- const nextGroup = orderedGroups[nextGroupIndex];
56
- const position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet2.cssRules.length;
57
- const isInserted = insertRuleAt(sheet2, text, position);
58
- if (isInserted) {
59
- if (groups[group].start == null) {
60
- groups[group].start = position;
61
- }
62
- for (let i = nextGroupIndex; i < orderedGroups.length; i += 1) {
63
- const groupNumber = orderedGroups[i];
64
- const previousStart = groups[groupNumber].start || 0;
65
- groups[groupNumber].start = previousStart + 1;
66
- }
67
- }
68
- return isInserted;
69
- }
70
- const OrderedCSSStyleSheet = {
71
- /**
72
- * The textContent of the style sheet.
73
- */
74
- getTextContent() {
75
- return getOrderedGroups(groups).map(group => {
76
- const rules = groups[group].rules;
77
- const marker = rules.shift();
78
- rules.sort();
79
- rules.unshift(marker);
80
- return rules.join("\n");
81
- }).join("\n");
82
- },
83
- /**
84
- * Insert a rule into the style sheet
85
- */
86
- insert(cssText, groupValue) {
87
- const group = Number(groupValue);
88
- if (groups[group] == null) {
89
- const markerRule = encodeGroupRule(group);
90
- groups[group] = {
91
- start: null,
92
- rules: [markerRule]
93
- };
94
- if (sheet != null) {
95
- sheetInsert(sheet, group, markerRule);
96
- }
97
- }
98
- const selectorText = getSelectorText(cssText);
99
- if (selectorText != null && selectors[selectorText] == null) {
100
- selectors[selectorText] = true;
101
- groups[group].rules.push(cssText);
102
- if (sheet != null) {
103
- const isInserted = sheetInsert(sheet, group, cssText);
104
- if (!isInserted) {
105
- groups[group].rules.pop();
106
- }
107
- }
108
- }
109
- }
110
- };
111
- return OrderedCSSStyleSheet;
26
+ const groups = {};
27
+ const selectors = {};
28
+ if (sheet != null) {
29
+ let group;
30
+ slice.call(sheet.cssRules).forEach((cssRule, i) => {
31
+ const cssText = cssRule.cssText;
32
+ if (cssText.indexOf("stylesheet-group") > -1) {
33
+ group = decodeGroupRule(cssRule);
34
+ groups[group] = {
35
+ start: i,
36
+ rules: [cssText]
37
+ };
38
+ } else {
39
+ const selectorText = getSelectorText(cssText);
40
+ if (selectorText != null) {
41
+ selectors[selectorText] = true;
42
+ groups[group].rules.push(cssText);
43
+ }
44
+ }
45
+ });
46
+ }
47
+ function sheetInsert(sheet2, group, text) {
48
+ const orderedGroups = getOrderedGroups(groups);
49
+ const groupIndex = orderedGroups.indexOf(group);
50
+ const nextGroupIndex = groupIndex + 1;
51
+ const nextGroup = orderedGroups[nextGroupIndex];
52
+ const position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet2.cssRules.length;
53
+ const isInserted = insertRuleAt(sheet2, text, position);
54
+ if (isInserted) {
55
+ if (groups[group].start == null) {
56
+ groups[group].start = position;
57
+ }
58
+ for (let i = nextGroupIndex; i < orderedGroups.length; i += 1) {
59
+ const groupNumber = orderedGroups[i];
60
+ const previousStart = groups[groupNumber].start || 0;
61
+ groups[groupNumber].start = previousStart + 1;
62
+ }
63
+ }
64
+ return isInserted;
65
+ }
66
+ const OrderedCSSStyleSheet = {
67
+ /**
68
+ * The textContent of the style sheet.
69
+ */
70
+ getTextContent() {
71
+ return getOrderedGroups(groups).map((group) => {
72
+ const rules = groups[group].rules;
73
+ const marker = rules.shift();
74
+ rules.sort();
75
+ rules.unshift(marker);
76
+ return rules.join("\n");
77
+ }).join("\n");
78
+ },
79
+ /**
80
+ * Insert a rule into the style sheet
81
+ */
82
+ insert(cssText, groupValue) {
83
+ const group = Number(groupValue);
84
+ if (groups[group] == null) {
85
+ const markerRule = encodeGroupRule(group);
86
+ groups[group] = {
87
+ start: null,
88
+ rules: [markerRule]
89
+ };
90
+ if (sheet != null) {
91
+ sheetInsert(sheet, group, markerRule);
92
+ }
93
+ }
94
+ const selectorText = getSelectorText(cssText);
95
+ if (selectorText != null && selectors[selectorText] == null) {
96
+ selectors[selectorText] = true;
97
+ groups[group].rules.push(cssText);
98
+ if (sheet != null) {
99
+ const isInserted = sheetInsert(sheet, group, cssText);
100
+ if (!isInserted) {
101
+ groups[group].rules.pop();
102
+ }
103
+ }
104
+ }
105
+ }
106
+ };
107
+ return OrderedCSSStyleSheet;
112
108
  }
113
109
  function encodeGroupRule(group) {
114
- return `[stylesheet-group="${group}"]{}`;
110
+ return `[stylesheet-group="${group}"]{}`;
115
111
  }
116
112
  const groupPattern = /["']/g;
117
113
  function decodeGroupRule(cssRule) {
118
- return Number(cssRule.selectorText.split(groupPattern)[1]);
114
+ return Number(cssRule.selectorText.split(groupPattern)[1]);
119
115
  }
120
116
  function getOrderedGroups(obj) {
121
- return Object.keys(obj).map(Number).sort((a, b) => a > b ? 1 : -1);
117
+ return Object.keys(obj).map(Number).sort((a, b) => a > b ? 1 : -1);
122
118
  }
123
119
  const selectorPattern = /\s*([,])\s*/g;
124
120
  function getSelectorText(cssText) {
125
- const selector = cssText.split("{")[0].trim();
126
- return selector !== "" ? selector.replace(selectorPattern, "$1") : null;
121
+ const selector = cssText.split("{")[0].trim();
122
+ return selector !== "" ? selector.replace(selectorPattern, "$1") : null;
127
123
  }
128
124
  function insertRuleAt(root, cssText, position) {
129
- try {
130
- root.insertRule(cssText, position);
131
- return true;
132
- } catch (e) {
133
- return false;
134
- }
135
- }
125
+ try {
126
+ root.insertRule(cssText, position);
127
+ return true;
128
+ } catch (e) {
129
+ return false;
130
+ }
131
+ }