@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,87 +3,84 @@ 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 dom_exports = {};
24
- __export(dom_exports, {
25
- createSheet: () => createSheet
26
- });
22
+ __export(dom_exports, { createSheet: () => createSheet });
27
23
  module.exports = __toCommonJS(dom_exports);
28
24
  var import_canUseDOM = require("../../modules/canUseDOM.cjs");
29
25
  var import_createCSSStyleSheet = require("./createCSSStyleSheet.cjs");
30
26
  var import_createOrderedCSSStyleSheet = require("./createOrderedCSSStyleSheet.cjs");
31
27
  const defaultId = "react-native-stylesheet";
32
- const roots = /* @__PURE__ */new WeakMap();
28
+ const roots = /* @__PURE__ */ new WeakMap();
33
29
  const sheets = [];
34
30
  const initialRules = [
35
- // minimal top-level reset
36
- "html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}", "body{margin:0;}",
37
- // minimal form pseudo-element reset
38
- "button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}", "input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"];
31
+ "html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}",
32
+ "body{margin:0;}",
33
+ "button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}",
34
+ "input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"
35
+ ];
39
36
  function createSheet(root, id = defaultId) {
40
- let sheet;
41
- function createSheet2() {
42
- if (sheet) return;
43
- if (import_canUseDOM.canUseDOM) {
44
- const rootNode = root != null ? root.getRootNode() : document;
45
- if (sheets.length === 0) {
46
- sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id));
47
- initialRules.forEach(rule => {
48
- sheet.insert(rule, 0);
49
- });
50
- roots.set(rootNode, sheets.length);
51
- sheets.push(sheet);
52
- } else {
53
- const index = roots.get(rootNode);
54
- if (index == null) {
55
- const initialSheet = sheets[0];
56
- const textContent = initialSheet != null ? initialSheet.getTextContent() : "";
57
- sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id, rootNode, textContent));
58
- roots.set(rootNode, sheets.length);
59
- sheets.push(sheet);
60
- } else {
61
- sheet = sheets[index];
62
- }
63
- }
64
- } else {
65
- if (sheets.length === 0) {
66
- sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id));
67
- initialRules.forEach(rule => {
68
- sheet.insert(rule, 0);
69
- });
70
- sheets.push(sheet);
71
- } else {
72
- sheet = sheets[0];
73
- }
74
- }
75
- }
76
- return {
77
- getTextContent() {
78
- createSheet2();
79
- return sheet.getTextContent();
80
- },
81
- id,
82
- insert(cssText, groupValue) {
83
- createSheet2();
84
- sheets.forEach(s => {
85
- s.insert(cssText, groupValue);
86
- });
87
- }
88
- };
89
- }
37
+ let sheet;
38
+ function createSheet2() {
39
+ if (sheet) return;
40
+ if (import_canUseDOM.canUseDOM) {
41
+ const rootNode = root != null ? root.getRootNode() : document;
42
+ if (sheets.length === 0) {
43
+ sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id));
44
+ initialRules.forEach((rule) => {
45
+ sheet.insert(rule, 0);
46
+ });
47
+ roots.set(rootNode, sheets.length);
48
+ sheets.push(sheet);
49
+ } else {
50
+ const index = roots.get(rootNode);
51
+ if (index == null) {
52
+ const initialSheet = sheets[0];
53
+ const textContent = initialSheet != null ? initialSheet.getTextContent() : "";
54
+ sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id, rootNode, textContent));
55
+ roots.set(rootNode, sheets.length);
56
+ sheets.push(sheet);
57
+ } else {
58
+ sheet = sheets[index];
59
+ }
60
+ }
61
+ } else {
62
+ if (sheets.length === 0) {
63
+ sheet = (0, import_createOrderedCSSStyleSheet.createOrderedCSSStyleSheet)((0, import_createCSSStyleSheet.createCSSStyleSheet)(id));
64
+ initialRules.forEach((rule) => {
65
+ sheet.insert(rule, 0);
66
+ });
67
+ sheets.push(sheet);
68
+ } else {
69
+ sheet = sheets[0];
70
+ }
71
+ }
72
+ }
73
+ return {
74
+ getTextContent() {
75
+ createSheet2();
76
+ return sheet.getTextContent();
77
+ },
78
+ id,
79
+ insert(cssText, groupValue) {
80
+ createSheet2();
81
+ sheets.forEach((s) => {
82
+ s.insert(cssText, groupValue);
83
+ });
84
+ }
85
+ };
86
+ }
@@ -3,56 +3,54 @@ 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 StyleSheet_exports = {};
24
22
  __export(StyleSheet_exports, {
25
- StyleSheet: () => StyleSheet,
26
- flatten: () => flatten
23
+ StyleSheet: () => StyleSheet,
24
+ flatten: () => flatten
27
25
  });
28
26
  module.exports = __toCommonJS(StyleSheet_exports);
29
27
  const absoluteFillObject = {
30
- position: "absolute",
31
- left: 0,
32
- right: 0,
33
- top: 0,
34
- bottom: 0
28
+ position: "absolute",
29
+ left: 0,
30
+ right: 0,
31
+ top: 0,
32
+ bottom: 0
35
33
  };
36
34
  const absoluteFill = absoluteFillObject;
37
35
  function create(styles) {
38
- return styles;
36
+ return styles;
39
37
  }
40
38
  function compose(style1, style2) {
41
- return flatten(style1, style2);
39
+ return flatten(style1, style2);
42
40
  }
43
41
  function flatten(...styles) {
44
- return styles.flat().flat().flat().flat().reduce((acc, cur) => {
45
- if (cur) {
46
- Object.assign(acc, cur);
47
- }
48
- return acc;
49
- }, {});
42
+ return styles.flat().flat().flat().flat().reduce((acc, cur) => {
43
+ if (cur) {
44
+ Object.assign(acc, cur);
45
+ }
46
+ return acc;
47
+ }, {});
50
48
  }
51
49
  function getSheet() {
52
- return {
53
- id: "",
54
- textContent: sheet.getTextContent()
55
- };
50
+ return {
51
+ id: "",
52
+ textContent: sheet.getTextContent()
53
+ };
56
54
  }
57
55
  function StyleSheet(styles, options) {}
58
56
  StyleSheet.absoluteFill = absoluteFill;
@@ -61,4 +59,4 @@ StyleSheet.create = create;
61
59
  StyleSheet.compose = compose;
62
60
  StyleSheet.flatten = flatten;
63
61
  StyleSheet.getSheet = getSheet;
64
- StyleSheet.hairlineWidth = 1;
62
+ StyleSheet.hairlineWidth = 1;
@@ -3,112 +3,91 @@ 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 preprocess_exports = {};
24
22
  __export(preprocess_exports, {
25
- createBoxShadowValue: () => createBoxShadowValue,
26
- createTextShadowValue: () => createTextShadowValue,
27
- preprocess: () => preprocess,
28
- processStyle: () => processStyle
23
+ createBoxShadowValue: () => createBoxShadowValue,
24
+ createTextShadowValue: () => createTextShadowValue,
25
+ preprocess: () => preprocess,
26
+ processStyle: () => processStyle
29
27
  });
30
28
  module.exports = __toCommonJS(preprocess_exports);
31
29
  var import_normalizeColor = require("./compiler/normalizeColor.cjs");
32
30
  var import_normalizeValueWithProperty = require("./compiler/normalizeValueWithProperty.cjs");
33
31
  const emptyObject = {};
34
32
  const defaultOffset = {
35
- height: 0,
36
- width: 0
33
+ height: 0,
34
+ width: 0
37
35
  };
38
- const createBoxShadowValue = style => {
39
- const {
40
- shadowColor,
41
- shadowOffset,
42
- shadowOpacity,
43
- shadowRadius
44
- } = style;
45
- const {
46
- height,
47
- width
48
- } = shadowOffset || defaultOffset;
49
- const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
50
- const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
51
- const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
52
- const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
53
- if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
54
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
55
- }
36
+ const createBoxShadowValue = (style) => {
37
+ const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
38
+ const { height, width } = shadowOffset || defaultOffset;
39
+ const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
40
+ const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
41
+ const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(shadowRadius || 0);
42
+ const color = (0, import_normalizeColor.normalizeColor)(shadowColor || "black", shadowOpacity);
43
+ if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
44
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
45
+ }
56
46
  };
57
- const createTextShadowValue = style => {
58
- const {
59
- textShadowColor,
60
- textShadowOffset,
61
- textShadowRadius
62
- } = style;
63
- const {
64
- height,
65
- width
66
- } = textShadowOffset || defaultOffset;
67
- const radius = textShadowRadius || 0;
68
- const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
69
- const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
70
- const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(radius);
71
- const color = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(textShadowColor, "textShadowColor");
72
- if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
73
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
74
- }
47
+ const createTextShadowValue = (style) => {
48
+ const { textShadowColor, textShadowOffset, textShadowRadius } = style;
49
+ const { height, width } = textShadowOffset || defaultOffset;
50
+ const radius = textShadowRadius || 0;
51
+ const offsetX = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(width);
52
+ const offsetY = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(height);
53
+ const blurRadius = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(radius);
54
+ const color = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(textShadowColor, "textShadowColor");
55
+ if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
56
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
57
+ }
75
58
  };
76
- const preprocess = originalStyle => {
77
- const style = originalStyle || emptyObject;
78
- const nextStyle = {};
79
- for (const originalProp in style) {
80
- const originalValue = style[originalProp];
81
- let prop = originalProp;
82
- let value = originalValue;
83
- if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {
84
- continue;
85
- }
86
- if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
87
- const boxShadowValue = createBoxShadowValue(style);
88
- if (boxShadowValue != null && nextStyle.boxShadow == null) {
89
- const {
90
- boxShadow
91
- } = style;
92
- prop = "boxShadow";
93
- value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
94
- } else {
95
- continue;
96
- }
97
- }
98
- if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
99
- const textShadowValue = createTextShadowValue(style);
100
- if (textShadowValue != null && nextStyle.textShadow == null) {
101
- const {
102
- textShadow
103
- } = style;
104
- prop = "textShadow";
105
- value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
106
- } else {
107
- continue;
108
- }
109
- }
110
- nextStyle[prop] = value;
111
- }
112
- return nextStyle;
59
+ const preprocess = (originalStyle) => {
60
+ const style = originalStyle || emptyObject;
61
+ const nextStyle = {};
62
+ for (const originalProp in style) {
63
+ const originalValue = style[originalProp];
64
+ let prop = originalProp;
65
+ let value = originalValue;
66
+ if (originalValue == null) {
67
+ continue;
68
+ }
69
+ if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
70
+ const boxShadowValue = createBoxShadowValue(style);
71
+ if (boxShadowValue != null && nextStyle.boxShadow == null) {
72
+ const { boxShadow } = style;
73
+ prop = "boxShadow";
74
+ value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
75
+ } else {
76
+ continue;
77
+ }
78
+ }
79
+ if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
80
+ const textShadowValue = createTextShadowValue(style);
81
+ if (textShadowValue != null && nextStyle.textShadow == null) {
82
+ const { textShadow } = style;
83
+ prop = "textShadow";
84
+ value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
85
+ } else {
86
+ continue;
87
+ }
88
+ }
89
+ nextStyle[prop] = value;
90
+ }
91
+ return nextStyle;
113
92
  };
114
- const processStyle = preprocess;
93
+ const processStyle = preprocess;
@@ -3,90 +3,86 @@ 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 validate_exports = {};
24
- __export(validate_exports, {
25
- validate: () => validate
26
- });
22
+ __export(validate_exports, { validate: () => validate });
27
23
  module.exports = __toCommonJS(validate_exports);
28
24
  const invalidShortforms = {
29
- background: true,
30
- borderBottom: true,
31
- borderLeft: true,
32
- borderRight: true,
33
- borderTop: true,
34
- font: true,
35
- grid: true,
36
- outline: true,
37
- textDecoration: true
25
+ background: true,
26
+ borderBottom: true,
27
+ borderLeft: true,
28
+ borderRight: true,
29
+ borderTop: true,
30
+ font: true,
31
+ grid: true,
32
+ outline: true,
33
+ textDecoration: true
38
34
  };
39
35
  const invalidMultiValueShortforms = {
40
- flex: true,
41
- margin: true,
42
- padding: true,
43
- borderColor: true,
44
- borderRadius: true,
45
- borderStyle: true,
46
- borderWidth: true,
47
- marginHorizontal: true,
48
- marginVertical: true,
49
- paddingHorizontal: true,
50
- paddingVertical: true,
51
- overflow: true,
52
- overscrollBehavior: true,
53
- backgroundPosition: true
36
+ flex: true,
37
+ margin: true,
38
+ padding: true,
39
+ borderColor: true,
40
+ borderRadius: true,
41
+ borderStyle: true,
42
+ borderWidth: true,
43
+ marginHorizontal: true,
44
+ marginVertical: true,
45
+ paddingHorizontal: true,
46
+ paddingVertical: true,
47
+ overflow: true,
48
+ overscrollBehavior: true,
49
+ backgroundPosition: true
54
50
  };
55
51
  function error(message) {
56
- console.error(message);
52
+ console.error(message);
57
53
  }
58
54
  function validate(obj) {
59
- for (const k in obj) {
60
- const prop = k.trim();
61
- const value = obj[prop];
62
- let isInvalid = false;
63
- if (value === null) {
64
- continue;
65
- }
66
- if (typeof value === "string" && value.indexOf("!important") > -1) {
67
- error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
68
- isInvalid = true;
69
- } else {
70
- let suggestion = "";
71
- if (prop === "animation" || prop === "animationName") {
72
- suggestion = 'Did you mean "animationKeyframes"?';
73
- isInvalid = true;
74
- } else if (prop === "direction") {
75
- suggestion = 'Did you mean "writingDirection"?';
76
- isInvalid = true;
77
- } else if (prop === "verticalAlign") {
78
- suggestion = 'Did you mean "textAlignVertical"?';
79
- isInvalid = true;
80
- } else if (invalidShortforms[prop]) {
81
- suggestion = "Please use long-form properties.";
82
- isInvalid = true;
83
- } else if (invalidMultiValueShortforms[prop]) {}
84
- if (suggestion !== "") {
85
- error(`Invalid style property of "${prop}". ${suggestion}`);
86
- }
87
- }
88
- if (isInvalid) {
89
- delete obj[k];
90
- }
91
- }
92
- }
55
+ for (const k in obj) {
56
+ const prop = k.trim();
57
+ const value = obj[prop];
58
+ let isInvalid = false;
59
+ if (value === null) {
60
+ continue;
61
+ }
62
+ if (typeof value === "string" && value.indexOf("!important") > -1) {
63
+ error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
64
+ isInvalid = true;
65
+ } else {
66
+ let suggestion = "";
67
+ if (prop === "animation" || prop === "animationName") {
68
+ suggestion = "Did you mean \"animationKeyframes\"?";
69
+ isInvalid = true;
70
+ } else if (prop === "direction") {
71
+ suggestion = "Did you mean \"writingDirection\"?";
72
+ isInvalid = true;
73
+ } else if (prop === "verticalAlign") {
74
+ suggestion = "Did you mean \"textAlignVertical\"?";
75
+ isInvalid = true;
76
+ } else if (invalidShortforms[prop]) {
77
+ suggestion = "Please use long-form properties.";
78
+ isInvalid = true;
79
+ } else if (invalidMultiValueShortforms[prop]) {}
80
+ if (suggestion !== "") {
81
+ error(`Invalid style property of "${prop}". ${suggestion}`);
82
+ }
83
+ }
84
+ if (isInvalid) {
85
+ delete obj[k];
86
+ }
87
+ }
88
+ }
@@ -3,27 +3,23 @@ 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 TextAncestorContext_exports = {};
24
- __export(TextAncestorContext_exports, {
25
- TextAncestorContext: () => TextAncestorContext
26
- });
22
+ __export(TextAncestorContext_exports, { TextAncestorContext: () => TextAncestorContext });
27
23
  module.exports = __toCommonJS(TextAncestorContext_exports);
28
24
  var import_react = require("react");
29
- const TextAncestorContext = (0, import_react.createContext)(false);
25
+ const TextAncestorContext = (0, import_react.createContext)(false);