@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.643.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 (286) hide show
  1. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.cjs +151 -136
  2. package/dist/cjs/StyleSheet/compiler/hash.cjs +15 -18
  3. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.cjs +21 -24
  4. package/dist/cjs/StyleSheet/compiler/index.cjs +295 -321
  5. package/dist/cjs/StyleSheet/compiler/normalizeColor.cjs +20 -23
  6. package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.cjs +32 -35
  7. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.cjs +27 -38
  8. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.cjs +37 -40
  9. package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.cjs +108 -111
  10. package/dist/cjs/StyleSheet/dom/index.cjs +70 -72
  11. package/dist/cjs/StyleSheet/index.cjs +33 -34
  12. package/dist/cjs/StyleSheet/preprocess.cjs +74 -94
  13. package/dist/cjs/StyleSheet/validate.cjs +72 -75
  14. package/dist/cjs/TextAncestorContext.cjs +15 -18
  15. package/dist/cjs/colorProps.cjs +25 -28
  16. package/dist/cjs/index.cjs +49 -50
  17. package/dist/cjs/modules/AccessibilityUtil/index.cjs +18 -21
  18. package/dist/cjs/modules/AccessibilityUtil/isDisabled.cjs +15 -18
  19. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.cjs +46 -49
  20. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.cjs +34 -39
  21. package/dist/cjs/modules/AssetRegistry/index.cjs +18 -19
  22. package/dist/cjs/modules/ImageLoader/index.cjs +135 -141
  23. package/dist/cjs/modules/InteractionManager.cjs +212 -219
  24. package/dist/cjs/modules/Platform/index.cjs +18 -21
  25. package/dist/cjs/modules/TextInputState/index.cjs +55 -58
  26. package/dist/cjs/modules/UIManager/index.cjs +46 -51
  27. package/dist/cjs/modules/canUseDOM.cjs +15 -18
  28. package/dist/cjs/modules/createDOMProps/index.cjs +289 -358
  29. package/dist/cjs/modules/createEventHandle/index.cjs +57 -62
  30. package/dist/cjs/modules/dismissKeyboard/index.cjs +16 -19
  31. package/dist/cjs/modules/forwardedProps/index.cjs +128 -130
  32. package/dist/cjs/modules/getBoundingClientRect/index.cjs +22 -25
  33. package/dist/cjs/modules/invariant.cjs +26 -27
  34. package/dist/cjs/modules/isSelectionValid/index.cjs +22 -25
  35. package/dist/cjs/modules/isWebColor/index.cjs +15 -18
  36. package/dist/cjs/modules/mergeRefs/index.cjs +31 -34
  37. package/dist/cjs/modules/modality/index.cjs +131 -134
  38. package/dist/cjs/modules/multiplyStyleLengthValue/index.cjs +25 -28
  39. package/dist/cjs/modules/normalizeColor/index.cjs +28 -31
  40. package/dist/cjs/modules/pick/index.cjs +24 -27
  41. package/dist/cjs/modules/processColor/index.cjs +28 -36
  42. package/dist/cjs/modules/requestIdleCallback/index.cjs +28 -29
  43. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +39 -42
  44. package/dist/cjs/modules/setValueForStyles/index.cjs +31 -34
  45. package/dist/cjs/modules/unitlessNumbers/index.cjs +74 -75
  46. package/dist/cjs/modules/useElementLayout/index.cjs +24 -31
  47. package/dist/cjs/modules/useEvent/index.cjs +40 -43
  48. package/dist/cjs/modules/useHover/index.cjs +113 -118
  49. package/dist/cjs/modules/useLayoutEffect/index.cjs +18 -26
  50. package/dist/cjs/modules/useLocale/index.cjs +33 -43
  51. package/dist/cjs/modules/useLocale/isLocaleRTL.cjs +66 -76
  52. package/dist/cjs/modules/useMergeRefs/index.cjs +19 -29
  53. package/dist/cjs/modules/usePlatformMethods/index.cjs +24 -30
  54. package/dist/cjs/modules/useStable/index.cjs +24 -32
  55. package/dist/cjs/styleTypes.cjs +10 -11
  56. package/dist/cjs/types.cjs +10 -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 +275 -341
  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 +10 -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 +18 -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 +8 -8
  167. package/src/modules/createDOMProps/index.tsx +3 -12
  168. package/src/modules/forwardedProps/index.tsx +0 -1
  169. package/src/modules/mergeRefs/index.tsx +1 -1
  170. package/types/StyleSheet/compiler/createReactDOMStyle.d.ts.map +1 -1
  171. package/types/StyleSheet/compiler/normalizeColor.d.ts.map +1 -1
  172. package/types/StyleSheet/compiler/resolveShadowValue.d.ts.map +1 -1
  173. package/types/StyleSheet/index.d.ts +15 -16
  174. package/types/StyleSheet/index.d.ts.map +1 -1
  175. package/types/StyleSheet/preprocess.d.ts +1 -1
  176. package/types/StyleSheet/preprocess.d.ts.map +1 -1
  177. package/types/colorProps.d.ts.map +1 -1
  178. package/types/modules/AccessibilityUtil/index.d.ts +6 -5
  179. package/types/modules/AccessibilityUtil/index.d.ts.map +1 -1
  180. package/types/modules/AccessibilityUtil/isDisabled.d.ts.map +1 -1
  181. package/types/modules/AccessibilityUtil/propsToAccessibilityComponent.d.ts.map +1 -1
  182. package/types/modules/AccessibilityUtil/propsToAriaRole.d.ts.map +1 -1
  183. package/types/modules/ImageLoader/index.d.ts +1 -1
  184. package/types/modules/ImageLoader/index.d.ts.map +1 -1
  185. package/types/modules/InteractionManager.d.ts +3 -3
  186. package/types/modules/InteractionManager.d.ts.map +1 -1
  187. package/types/modules/Platform/index.d.ts.map +1 -1
  188. package/types/modules/TextInputState/index.d.ts.map +1 -1
  189. package/types/modules/createDOMProps/index.d.ts.map +1 -1
  190. package/types/modules/forwardedProps/index.d.ts +70 -74
  191. package/types/modules/forwardedProps/index.d.ts.map +1 -1
  192. package/types/modules/getBoundingClientRect/index.d.ts.map +1 -1
  193. package/types/modules/isWebColor/index.d.ts.map +1 -1
  194. package/types/modules/multiplyStyleLengthValue/index.d.ts.map +1 -1
  195. package/types/modules/normalizeColor/index.d.ts.map +1 -1
  196. package/types/modules/processColor/index.d.ts.map +1 -1
  197. package/types/modules/requestIdleCallback/index.d.ts +3 -1
  198. package/types/modules/requestIdleCallback/index.d.ts.map +1 -1
  199. package/types/modules/unitlessNumbers/index.d.ts.map +1 -1
  200. package/types/modules/useLayoutEffect/index.d.ts +1 -1
  201. package/types/modules/useLayoutEffect/index.d.ts.map +1 -1
  202. package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.cjs +0 -265
  203. package/dist/cjs/StyleSheet/__tests__/compiler-test.cjs +0 -419
  204. package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.cjs +0 -160
  205. package/dist/cjs/StyleSheet/__tests__/index-test.cjs +0 -436
  206. package/dist/cjs/StyleSheet/__tests__/preprocess-test.cjs +0 -121
  207. package/dist/cjs/StyleSheet/__tests__/validate-test.cjs +0 -51
  208. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.cjs +0 -57
  209. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.cjs +0 -46
  210. package/dist/cjs/modules/Platform/__tests__/index-test.cjs +0 -56
  211. package/dist/cjs/modules/UIManager/__tests__/index-test.cjs +0 -111
  212. package/dist/cjs/modules/createDOMProps/__tests__/index-test.cjs +0 -177
  213. package/dist/cjs/modules/createEventHandle/__tests__/index-test.cjs +0 -422
  214. package/dist/cjs/modules/mergeRefs/__tests__/index-test.cjs +0 -48
  215. package/dist/cjs/modules/modality/__tests__/index-test.cjs +0 -59
  216. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.cjs +0 -38
  217. package/dist/cjs/modules/processColor/__tests__/index-test.cjs +0 -85
  218. package/dist/cjs/modules/useEvent/__tests__/index-test.cjs +0 -490
  219. package/dist/cjs/modules/useHover/__tests__/index-test.cjs +0 -382
  220. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.cjs +0 -125
  221. package/dist/cjs/modules/useStable/__tests__/index-test.cjs +0 -122
  222. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs +0 -242
  223. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.mjs.map +0 -1
  224. package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +0 -420
  225. package/dist/esm/StyleSheet/__tests__/compiler-test.mjs.map +0 -1
  226. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs +0 -137
  227. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.mjs.map +0 -1
  228. package/dist/esm/StyleSheet/__tests__/index-test.mjs +0 -413
  229. package/dist/esm/StyleSheet/__tests__/index-test.mjs.map +0 -1
  230. package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs +0 -122
  231. package/dist/esm/StyleSheet/__tests__/preprocess-test.mjs.map +0 -1
  232. package/dist/esm/StyleSheet/__tests__/validate-test.mjs +0 -52
  233. package/dist/esm/StyleSheet/__tests__/validate-test.mjs.map +0 -1
  234. package/dist/esm/StyleSheet/compiler/hash.mjs.map +0 -1
  235. package/dist/esm/index.js.map +0 -1
  236. package/dist/esm/index.mjs.map +0 -1
  237. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs +0 -34
  238. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.mjs.map +0 -1
  239. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs +0 -23
  240. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.mjs.map +0 -1
  241. package/dist/esm/modules/Platform/__tests__/index-test.mjs +0 -33
  242. package/dist/esm/modules/Platform/__tests__/index-test.mjs.map +0 -1
  243. package/dist/esm/modules/UIManager/__tests__/index-test.mjs +0 -88
  244. package/dist/esm/modules/UIManager/__tests__/index-test.mjs.map +0 -1
  245. package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +0 -154
  246. package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs.map +0 -1
  247. package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +0 -399
  248. package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs.map +0 -1
  249. package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +0 -25
  250. package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs.map +0 -1
  251. package/dist/esm/modules/modality/__tests__/index-test.mjs +0 -60
  252. package/dist/esm/modules/modality/__tests__/index-test.mjs.map +0 -1
  253. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +0 -15
  254. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs.map +0 -1
  255. package/dist/esm/modules/processColor/__tests__/index-test.mjs +0 -62
  256. package/dist/esm/modules/processColor/__tests__/index-test.mjs.map +0 -1
  257. package/dist/esm/modules/useEvent/__tests__/index-test.mjs +0 -467
  258. package/dist/esm/modules/useEvent/__tests__/index-test.mjs.map +0 -1
  259. package/dist/esm/modules/useHover/__tests__/index-test.mjs +0 -359
  260. package/dist/esm/modules/useHover/__tests__/index-test.mjs.map +0 -1
  261. package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +0 -102
  262. package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs.map +0 -1
  263. package/dist/esm/modules/useStable/__tests__/index-test.mjs +0 -99
  264. package/dist/esm/modules/useStable/__tests__/index-test.mjs.map +0 -1
  265. package/dist/esm/styleTypes.mjs.map +0 -1
  266. package/dist/esm/types.mjs.map +0 -1
  267. package/src/StyleSheet/__tests__/compiler-createReactDOMStyle-test.tsx +0 -236
  268. package/src/StyleSheet/__tests__/compiler-test.tsx +0 -426
  269. package/src/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.tsx +0 -169
  270. package/src/StyleSheet/__tests__/index-test.tsx +0 -406
  271. package/src/StyleSheet/__tests__/preprocess-test.tsx +0 -107
  272. package/src/StyleSheet/__tests__/validate-test.tsx +0 -42
  273. package/src/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.tsx +0 -44
  274. package/src/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.tsx +0 -25
  275. package/src/modules/Platform/__tests__/index-test.tsx +0 -45
  276. package/src/modules/UIManager/__tests__/index-test.tsx +0 -87
  277. package/src/modules/createDOMProps/__tests__/index-test.tsx +0 -138
  278. package/src/modules/createEventHandle/__tests__/index-test.tsx +0 -459
  279. package/src/modules/mergeRefs/__tests__/index-test.tsx +0 -32
  280. package/src/modules/modality/__tests__/index-test.tsx +0 -66
  281. package/src/modules/multiplyStyleLengthValue/__tests__/index-test.tsx +0 -23
  282. package/src/modules/processColor/__tests__/index-test.tsx +0 -78
  283. package/src/modules/useEvent/__tests__/index-test.tsx +0 -511
  284. package/src/modules/useHover/__tests__/index-test.tsx +0 -342
  285. package/src/modules/useMergeRefs/__tests__/index-test.tsx +0 -91
  286. package/src/modules/useStable/__tests__/index-test.tsx +0 -101
@@ -1,36 +1,33 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  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;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var isSelectionValid_exports = {};
24
- __export(isSelectionValid_exports, {
25
- isSelectionValid: () => isSelectionValid
26
- });
23
+ __export(isSelectionValid_exports, { isSelectionValid: () => isSelectionValid });
27
24
  module.exports = __toCommonJS(isSelectionValid_exports);
28
25
  function isSelectionValid() {
29
- const selection = window.getSelection();
30
- if (!selection) return false;
31
- const string = selection.toString();
32
- const anchorNode = selection.anchorNode;
33
- const focusNode = selection.focusNode;
34
- const isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;
35
- return string.length >= 1 && string !== "\n" && !!isTextNode;
36
- }
26
+ const selection = window.getSelection();
27
+ if (!selection) return false;
28
+ const string = selection.toString();
29
+ const anchorNode = selection.anchorNode;
30
+ const focusNode = selection.focusNode;
31
+ const isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;
32
+ return string.length >= 1 && string !== "\n" && !!isTextNode;
33
+ }
@@ -1,28 +1,25 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  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;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var isWebColor_exports = {};
24
- __export(isWebColor_exports, {
25
- isWebColor: () => isWebColor
26
- });
23
+ __export(isWebColor_exports, { isWebColor: () => isWebColor });
27
24
  module.exports = __toCommonJS(isWebColor_exports);
28
- const isWebColor = color => color === "currentcolor" || color === "currentColor" || color === "inherit" || color.startsWith("var(");
25
+ const isWebColor = (color) => color === "currentcolor" || color === "currentColor" || color === "inherit" || color.startsWith("var(");
@@ -1,45 +1,42 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  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;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var mergeRefs_exports = {};
24
- __export(mergeRefs_exports, {
25
- mergeRefs: () => mergeRefs
26
- });
23
+ __export(mergeRefs_exports, { mergeRefs: () => mergeRefs });
27
24
  module.exports = __toCommonJS(mergeRefs_exports);
28
25
  function mergeRefs(...args) {
29
- return function forwardRef(node) {
30
- args.forEach(ref => {
31
- if (ref == null) {
32
- return;
33
- }
34
- if (typeof ref === "function") {
35
- ref(node);
36
- return;
37
- }
38
- if (typeof ref === "object") {
39
- ref.current = node;
40
- return;
41
- }
42
- console.error(`mergeRefs cannot handle Refs of type boolean, number or string, received ref ${String(ref)}`);
43
- });
44
- };
45
- }
26
+ return function mergedRef(node) {
27
+ args.forEach((ref) => {
28
+ if (ref == null) {
29
+ return;
30
+ }
31
+ if (typeof ref === "function") {
32
+ ref(node);
33
+ return;
34
+ }
35
+ if (typeof ref === "object") {
36
+ ref.current = node;
37
+ return;
38
+ }
39
+ console.error(`mergeRefs cannot handle Refs of type boolean, number or string, received ref ${String(ref)}`);
40
+ });
41
+ };
42
+ }
@@ -1,31 +1,30 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  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;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var modality_exports = {};
24
23
  __export(modality_exports, {
25
- addModalityListener: () => addModalityListener,
26
- getActiveModality: () => getActiveModality,
27
- getModality: () => getModality,
28
- testOnly_resetActiveModality: () => testOnly_resetActiveModality
24
+ addModalityListener: () => addModalityListener,
25
+ getActiveModality: () => getActiveModality,
26
+ getModality: () => getModality,
27
+ testOnly_resetActiveModality: () => testOnly_resetActiveModality
29
28
  });
30
29
  module.exports = __toCommonJS(modality_exports);
31
30
  var import_canUseDOM = require("../canUseDOM.cjs");
@@ -36,7 +35,7 @@ let modality = "keyboard";
36
35
  let previousModality;
37
36
  let previousActiveModality;
38
37
  let isEmulatingMouseEvents = false;
39
- const listeners = /* @__PURE__ */new Set();
38
+ const listeners = /* @__PURE__ */ new Set();
40
39
  const KEYBOARD = "keyboard";
41
40
  const MOUSE = "mouse";
42
41
  const TOUCH = "touch";
@@ -55,12 +54,10 @@ const TOUCHCANCEL = "touchcancel";
55
54
  const TOUCHMOVE = "touchmove";
56
55
  const TOUCHSTART = "touchstart";
57
56
  const VISIBILITYCHANGE = "visibilitychange";
58
- const bubbleOptions = {
59
- passive: true
60
- };
57
+ const bubbleOptions = { passive: true };
61
58
  const captureOptions = {
62
- capture: true,
63
- passive: true
59
+ capture: true,
60
+ passive: true
64
61
  };
65
62
  const addBlurListener = (0, import_createEventHandle.createEventHandle)(BLUR, bubbleOptions);
66
63
  const addFocusListener = (0, import_createEventHandle.createEventHandle)(FOCUS, bubbleOptions);
@@ -78,135 +75,135 @@ const addTouchCancelListener = (0, import_createEventHandle.createEventHandle)(T
78
75
  const addTouchMoveListener = (0, import_createEventHandle.createEventHandle)(TOUCHMOVE, captureOptions);
79
76
  const addTouchStartListener = (0, import_createEventHandle.createEventHandle)(TOUCHSTART, captureOptions);
80
77
  function restoreModality() {
81
- if (previousModality != null || previousActiveModality != null) {
82
- if (previousModality != null) {
83
- modality = previousModality;
84
- previousModality = null;
85
- }
86
- if (previousActiveModality != null) {
87
- activeModality = previousActiveModality;
88
- previousActiveModality = null;
89
- }
90
- callListeners();
91
- }
78
+ if (previousModality != null || previousActiveModality != null) {
79
+ if (previousModality != null) {
80
+ modality = previousModality;
81
+ previousModality = null;
82
+ }
83
+ if (previousActiveModality != null) {
84
+ activeModality = previousActiveModality;
85
+ previousActiveModality = null;
86
+ }
87
+ callListeners();
88
+ }
92
89
  }
93
90
  function onBlurWindow() {
94
- previousModality = modality;
95
- previousActiveModality = activeModality;
96
- activeModality = KEYBOARD;
97
- modality = KEYBOARD;
98
- callListeners();
99
- isEmulatingMouseEvents = false;
91
+ previousModality = modality;
92
+ previousActiveModality = activeModality;
93
+ activeModality = KEYBOARD;
94
+ modality = KEYBOARD;
95
+ callListeners();
96
+ isEmulatingMouseEvents = false;
100
97
  }
101
98
  function onFocusWindow() {
102
- restoreModality();
99
+ restoreModality();
103
100
  }
104
101
  function onKeyDown(event) {
105
- if (event.metaKey || event.altKey || event.ctrlKey) {
106
- return;
107
- }
108
- if (modality !== KEYBOARD) {
109
- modality = KEYBOARD;
110
- activeModality = KEYBOARD;
111
- callListeners();
112
- }
102
+ if (event.metaKey || event.altKey || event.ctrlKey) {
103
+ return;
104
+ }
105
+ if (modality !== KEYBOARD) {
106
+ modality = KEYBOARD;
107
+ activeModality = KEYBOARD;
108
+ callListeners();
109
+ }
113
110
  }
114
111
  function onVisibilityChange() {
115
- if (document.visibilityState !== "hidden") {
116
- restoreModality();
117
- }
112
+ if (document.visibilityState !== "hidden") {
113
+ restoreModality();
114
+ }
118
115
  }
119
116
  function onPointerish(event) {
120
- const eventType = event.type;
121
- if (supportsPointerEvent()) {
122
- if (eventType === POINTERDOWN) {
123
- if (activeModality !== event.pointerType) {
124
- modality = event.pointerType;
125
- activeModality = event.pointerType;
126
- callListeners();
127
- }
128
- return;
129
- }
130
- if (eventType === POINTERMOVE) {
131
- if (modality !== event.pointerType) {
132
- modality = event.pointerType;
133
- callListeners();
134
- }
135
- return;
136
- }
137
- } else {
138
- if (!isEmulatingMouseEvents) {
139
- if (eventType === MOUSEDOWN) {
140
- if (activeModality !== MOUSE) {
141
- modality = MOUSE;
142
- activeModality = MOUSE;
143
- callListeners();
144
- }
145
- }
146
- if (eventType === MOUSEMOVE) {
147
- if (modality !== MOUSE) {
148
- modality = MOUSE;
149
- callListeners();
150
- }
151
- }
152
- }
153
- if (eventType === TOUCHSTART) {
154
- isEmulatingMouseEvents = true;
155
- if (event.touches && event.touches.length > 1) {
156
- isEmulatingMouseEvents = false;
157
- }
158
- if (activeModality !== TOUCH) {
159
- modality = TOUCH;
160
- activeModality = TOUCH;
161
- callListeners();
162
- }
163
- return;
164
- }
165
- if (eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) {
166
- isEmulatingMouseEvents = false;
167
- }
168
- }
117
+ const eventType = event.type;
118
+ if (supportsPointerEvent()) {
119
+ if (eventType === POINTERDOWN) {
120
+ if (activeModality !== event.pointerType) {
121
+ modality = event.pointerType;
122
+ activeModality = event.pointerType;
123
+ callListeners();
124
+ }
125
+ return;
126
+ }
127
+ if (eventType === POINTERMOVE) {
128
+ if (modality !== event.pointerType) {
129
+ modality = event.pointerType;
130
+ callListeners();
131
+ }
132
+ return;
133
+ }
134
+ } else {
135
+ if (!isEmulatingMouseEvents) {
136
+ if (eventType === MOUSEDOWN) {
137
+ if (activeModality !== MOUSE) {
138
+ modality = MOUSE;
139
+ activeModality = MOUSE;
140
+ callListeners();
141
+ }
142
+ }
143
+ if (eventType === MOUSEMOVE) {
144
+ if (modality !== MOUSE) {
145
+ modality = MOUSE;
146
+ callListeners();
147
+ }
148
+ }
149
+ }
150
+ if (eventType === TOUCHSTART) {
151
+ isEmulatingMouseEvents = true;
152
+ if (event.touches && event.touches.length > 1) {
153
+ isEmulatingMouseEvents = false;
154
+ }
155
+ if (activeModality !== TOUCH) {
156
+ modality = TOUCH;
157
+ activeModality = TOUCH;
158
+ callListeners();
159
+ }
160
+ return;
161
+ }
162
+ if (eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) {
163
+ isEmulatingMouseEvents = false;
164
+ }
165
+ }
169
166
  }
170
167
  if (import_canUseDOM.canUseDOM) {
171
- addBlurListener(window, onBlurWindow);
172
- addFocusListener(window, onFocusWindow);
173
- addKeyDownListener(document, onKeyDown);
174
- addPointerDownListener(document, onPointerish);
175
- addPointerMoveListener(document, onPointerish);
176
- addVisibilityChangeListener(document, onVisibilityChange);
177
- addContextMenuListener(document, onPointerish);
178
- addMouseDownListener(document, onPointerish);
179
- addMouseMoveListener(document, onPointerish);
180
- addMouseUpListener(document, onPointerish);
181
- addTouchCancelListener(document, onPointerish);
182
- addTouchMoveListener(document, onPointerish);
183
- addTouchStartListener(document, onPointerish);
184
- addSelectiomChangeListener(document, onPointerish);
185
- addScrollListener(document, onPointerish);
168
+ addBlurListener(window, onBlurWindow);
169
+ addFocusListener(window, onFocusWindow);
170
+ addKeyDownListener(document, onKeyDown);
171
+ addPointerDownListener(document, onPointerish);
172
+ addPointerMoveListener(document, onPointerish);
173
+ addVisibilityChangeListener(document, onVisibilityChange);
174
+ addContextMenuListener(document, onPointerish);
175
+ addMouseDownListener(document, onPointerish);
176
+ addMouseMoveListener(document, onPointerish);
177
+ addMouseUpListener(document, onPointerish);
178
+ addTouchCancelListener(document, onPointerish);
179
+ addTouchMoveListener(document, onPointerish);
180
+ addTouchStartListener(document, onPointerish);
181
+ addSelectiomChangeListener(document, onPointerish);
182
+ addScrollListener(document, onPointerish);
186
183
  }
187
184
  function callListeners() {
188
- const value = {
189
- activeModality,
190
- modality
191
- };
192
- listeners.forEach(listener => {
193
- listener(value);
194
- });
185
+ const value = {
186
+ activeModality,
187
+ modality
188
+ };
189
+ listeners.forEach((listener) => {
190
+ listener(value);
191
+ });
195
192
  }
196
193
  function getActiveModality() {
197
- return activeModality;
194
+ return activeModality;
198
195
  }
199
196
  function getModality() {
200
- return modality;
197
+ return modality;
201
198
  }
202
199
  function addModalityListener(listener) {
203
- listeners.add(listener);
204
- return () => {
205
- listeners.delete(listener);
206
- };
200
+ listeners.add(listener);
201
+ return () => {
202
+ listeners.delete(listener);
203
+ };
207
204
  }
208
205
  function testOnly_resetActiveModality() {
209
- isEmulatingMouseEvents = false;
210
- activeModality = KEYBOARD;
211
- modality = KEYBOARD;
212
- }
206
+ isEmulatingMouseEvents = false;
207
+ activeModality = KEYBOARD;
208
+ modality = KEYBOARD;
209
+ }
@@ -1,41 +1,38 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  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;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var multiplyStyleLengthValue_exports = {};
24
- __export(multiplyStyleLengthValue_exports, {
25
- multiplyStyleLengthValue: () => multiplyStyleLengthValue
26
- });
23
+ __export(multiplyStyleLengthValue_exports, { multiplyStyleLengthValue: () => multiplyStyleLengthValue });
27
24
  module.exports = __toCommonJS(multiplyStyleLengthValue_exports);
28
25
  const CSS_UNIT_RE = /^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/;
29
- const getUnit = str => str.match(CSS_UNIT_RE)[1];
30
- const isNumeric = n => {
31
- return !isNaN(parseFloat(n)) && isFinite(n);
26
+ const getUnit = (str) => str.match(CSS_UNIT_RE)[1];
27
+ const isNumeric = (n) => {
28
+ return !isNaN(parseFloat(n)) && isFinite(n);
32
29
  };
33
30
  const multiplyStyleLengthValue = (value, multiple) => {
34
- if (typeof value === "string") {
35
- const number = parseFloat(value) * multiple;
36
- const unit = getUnit(value);
37
- return `${number}${unit}`;
38
- } else if (isNumeric(value)) {
39
- return value * multiple;
40
- }
41
- };
31
+ if (typeof value === "string") {
32
+ const number = parseFloat(value) * multiple;
33
+ const unit = getUnit(value);
34
+ return `${number}${unit}`;
35
+ } else if (isNumeric(value)) {
36
+ return value * multiple;
37
+ }
38
+ };
@@ -1,44 +1,41 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  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;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var normalizeColor_exports = {};
24
- __export(normalizeColor_exports, {
25
- normalizeColor: () => normalizeColor
26
- });
23
+ __export(normalizeColor_exports, { normalizeColor: () => normalizeColor });
27
24
  module.exports = __toCommonJS(normalizeColor_exports);
28
25
  var import_isWebColor = require("../isWebColor/index.cjs");
29
26
  var import_processColor = require("../processColor/index.cjs");
30
27
  const normalizeColor = (color, opacity = 1) => {
31
- if (color == null) return;
32
- if (typeof color === "string" && (0, import_isWebColor.isWebColor)(color)) {
33
- return color;
34
- }
35
- const colorInt = (0, import_processColor.processColor)(color);
36
- if (colorInt != null) {
37
- const r = colorInt >> 16 & 255;
38
- const g = colorInt >> 8 & 255;
39
- const b = colorInt & 255;
40
- const a = (colorInt >> 24 & 255) / 255;
41
- const alpha = (a * opacity).toFixed(2);
42
- return `rgba(${r},${g},${b},${alpha})`;
43
- }
44
- };
28
+ if (color == null) return;
29
+ if (typeof color === "string" && (0, import_isWebColor.isWebColor)(color)) {
30
+ return color;
31
+ }
32
+ const colorInt = (0, import_processColor.processColor)(color);
33
+ if (colorInt != null) {
34
+ const r = colorInt >> 16 & 255;
35
+ const g = colorInt >> 8 & 255;
36
+ const b = colorInt & 255;
37
+ const a = (colorInt >> 24 & 255) / 255;
38
+ const alpha = (a * opacity).toFixed(2);
39
+ return `rgba(${r},${g},${b},${alpha})`;
40
+ }
41
+ };