@tamagui/react-native-web-internals 2.7.7 → 3.0.0-beta.1097.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
@@ -1,64 +1,67 @@
1
1
  import { canUseDOM } from "../../modules/canUseDOM.mjs";
2
2
  import { createCSSStyleSheet } from "./createCSSStyleSheet.mjs";
3
3
  import { createOrderedCSSStyleSheet } from "./createOrderedCSSStyleSheet.mjs";
4
+
4
5
  const defaultId = "react-native-stylesheet";
5
- const roots = /* @__PURE__ */new WeakMap();
6
+ const roots = /* @__PURE__ */ new WeakMap();
6
7
  const sheets = [];
7
8
  const initialRules = [
8
- // minimal top-level reset
9
- "html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}", "body{margin:0;}",
10
- // minimal form pseudo-element reset
11
- "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;}"];
9
+ "html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}",
10
+ "body{margin:0;}",
11
+ "button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}",
12
+ "input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"
13
+ ];
12
14
  function createSheet(root, id = defaultId) {
13
- let sheet;
14
- function createSheet2() {
15
- if (sheet) return;
16
- if (canUseDOM) {
17
- const rootNode = root != null ? root.getRootNode() : document;
18
- if (sheets.length === 0) {
19
- sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));
20
- initialRules.forEach(rule => {
21
- sheet.insert(rule, 0);
22
- });
23
- roots.set(rootNode, sheets.length);
24
- sheets.push(sheet);
25
- } else {
26
- const index = roots.get(rootNode);
27
- if (index == null) {
28
- const initialSheet = sheets[0];
29
- const textContent = initialSheet != null ? initialSheet.getTextContent() : "";
30
- sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id, rootNode, textContent));
31
- roots.set(rootNode, sheets.length);
32
- sheets.push(sheet);
33
- } else {
34
- sheet = sheets[index];
35
- }
36
- }
37
- } else {
38
- if (sheets.length === 0) {
39
- sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));
40
- initialRules.forEach(rule => {
41
- sheet.insert(rule, 0);
42
- });
43
- sheets.push(sheet);
44
- } else {
45
- sheet = sheets[0];
46
- }
47
- }
48
- }
49
- return {
50
- getTextContent() {
51
- createSheet2();
52
- return sheet.getTextContent();
53
- },
54
- id,
55
- insert(cssText, groupValue) {
56
- createSheet2();
57
- sheets.forEach(s => {
58
- s.insert(cssText, groupValue);
59
- });
60
- }
61
- };
15
+ let sheet;
16
+ function createSheet2() {
17
+ if (sheet) return;
18
+ if (canUseDOM) {
19
+ const rootNode = root != null ? root.getRootNode() : document;
20
+ if (sheets.length === 0) {
21
+ sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));
22
+ initialRules.forEach((rule) => {
23
+ sheet.insert(rule, 0);
24
+ });
25
+ roots.set(rootNode, sheets.length);
26
+ sheets.push(sheet);
27
+ } else {
28
+ const index = roots.get(rootNode);
29
+ if (index == null) {
30
+ const initialSheet = sheets[0];
31
+ const textContent = initialSheet != null ? initialSheet.getTextContent() : "";
32
+ sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id, rootNode, textContent));
33
+ roots.set(rootNode, sheets.length);
34
+ sheets.push(sheet);
35
+ } else {
36
+ sheet = sheets[index];
37
+ }
38
+ }
39
+ } else {
40
+ if (sheets.length === 0) {
41
+ sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));
42
+ initialRules.forEach((rule) => {
43
+ sheet.insert(rule, 0);
44
+ });
45
+ sheets.push(sheet);
46
+ } else {
47
+ sheet = sheets[0];
48
+ }
49
+ }
50
+ }
51
+ return {
52
+ getTextContent() {
53
+ createSheet2();
54
+ return sheet.getTextContent();
55
+ },
56
+ id,
57
+ insert(cssText, groupValue) {
58
+ createSheet2();
59
+ sheets.forEach((s) => {
60
+ s.insert(cssText, groupValue);
61
+ });
62
+ }
63
+ };
62
64
  }
65
+
63
66
  export { createSheet };
64
67
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["canUseDOM","createCSSStyleSheet","createOrderedCSSStyleSheet","defaultId","roots","WeakMap","sheets","initialRules","createSheet","root","id","sheet","rootNode","getRootNode","document","length","forEach","rule","insert","set","push","index","get","initialSheet","textContent","getTextContent","cssText","groupValue","s"],"sources":["../../../../src/StyleSheet/dom/index.tsx"],"sourcesContent":[null],"mappings":"AAUA,SAASA,SAAA,QAAiB;AAC1B,SAASC,mBAAA,QAA2B;AAEpC,SAASC,0BAAA,QAAkC;AAM3C,MAAMC,SAAA,GAAY;AAClB,MAAMC,KAAA,GAAQ,mBAAIC,OAAA,CAAsB;AACxC,MAAMC,MAAA,GAAS,EAAC;AAEhB,MAAMC,YAAA,GAAe;AAAA;AAEnB,4GACA;AAAA;AAEA,yEACA,oKACF;AAEO,SAASC,YAAYC,IAAA,EAAoBC,EAAA,GAAKP,SAAA,EAAkB;EACrE,IAAIQ,KAAA;EAEJ,SAASH,aAAA,EAAc;IACrB,IAAIG,KAAA,EAAO;IAEX,IAAIX,SAAA,EAAW;MACb,MAAMY,QAAA,GAAiBH,IAAA,IAAQ,OAAOA,IAAA,CAAKI,WAAA,CAAY,IAAIC,QAAA;MAE3D,IAAIR,MAAA,CAAOS,MAAA,KAAW,GAAG;QACvBJ,KAAA,GAAQT,0BAAA,CAA2BD,mBAAA,CAAoBS,EAAE,CAAC;QAC1DH,YAAA,CAAaS,OAAA,CAASC,IAAA,IAAS;UAC7BN,KAAA,CAAMO,MAAA,CAAOD,IAAA,EAAM,CAAC;QACtB,CAAC;QACDb,KAAA,CAAMe,GAAA,CAAIP,QAAA,EAAUN,MAAA,CAAOS,MAAM;QACjCT,MAAA,CAAOc,IAAA,CAAKT,KAAK;MACnB,OAAO;QACL,MAAMU,KAAA,GAAQjB,KAAA,CAAMkB,GAAA,CAAIV,QAAQ;QAChC,IAAIS,KAAA,IAAS,MAAM;UACjB,MAAME,YAAA,GAAejB,MAAA,CAAO,CAAC;UAE7B,MAAMkB,WAAA,GAAcD,YAAA,IAAgB,OAAOA,YAAA,CAAaE,cAAA,CAAe,IAAI;UAE3Ed,KAAA,GAAQT,0BAAA,CACND,mBAAA,CAAoBS,EAAA,EAAIE,QAAA,EAAiBY,WAAW,CACtD;UACApB,KAAA,CAAMe,GAAA,CAAIP,QAAA,EAAUN,MAAA,CAAOS,MAAM;UACjCT,MAAA,CAAOc,IAAA,CAAKT,KAAK;QACnB,OAAO;UACLA,KAAA,GAAQL,MAAA,CAAOe,KAAK;QACtB;MACF;IACF,OAAO;MAEL,IAAIf,MAAA,CAAOS,MAAA,KAAW,GAAG;QACvBJ,KAAA,GAAQT,0BAAA,CAA2BD,mBAAA,CAAoBS,EAAE,CAAC;QAC1DH,YAAA,CAAaS,OAAA,CAASC,IAAA,IAAS;UAC7BN,KAAA,CAAMO,MAAA,CAAOD,IAAA,EAAM,CAAC;QACtB,CAAC;QACDX,MAAA,CAAOc,IAAA,CAAKT,KAAK;MACnB,OAAO;QACLA,KAAA,GAAQL,MAAA,CAAO,CAAC;MAClB;IACF;EACF;EAEA,OAAO;IACLmB,eAAA,EAAiB;MACfjB,YAAA,CAAY;MACZ,OAAOG,KAAA,CAAMc,cAAA,CAAe;IAC9B;IACAf,EAAA;IACAQ,OAAOQ,OAAA,EAAiBC,UAAA,EAAoB;MAC1CnB,YAAA,CAAY;MACZF,MAAA,CAAOU,OAAA,CAASY,CAAA,IAAM;QACpBA,CAAA,CAAEV,MAAA,CAAOQ,OAAA,EAASC,UAAU;MAC9B,CAAC;IACH;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/StyleSheet/dom/index.js"],"sourcesContent":["import { canUseDOM } from \"../../modules/canUseDOM\";\nimport { createCSSStyleSheet } from \"./createCSSStyleSheet\";\nimport { createOrderedCSSStyleSheet } from \"./createOrderedCSSStyleSheet\";\nconst defaultId = \"react-native-stylesheet\";\nconst roots = /* @__PURE__ */ new WeakMap();\nconst sheets = [];\nconst initialRules = [\n // minimal top-level reset\n \"html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}\",\n \"body{margin:0;}\",\n // minimal form pseudo-element reset\n \"button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}\",\n \"input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}\"\n];\nfunction createSheet(root, id = defaultId) {\n let sheet;\n function createSheet2() {\n if (sheet) return;\n if (canUseDOM) {\n const rootNode = root != null ? root.getRootNode() : document;\n if (sheets.length === 0) {\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));\n initialRules.forEach((rule) => {\n sheet.insert(rule, 0);\n });\n roots.set(rootNode, sheets.length);\n sheets.push(sheet);\n } else {\n const index = roots.get(rootNode);\n if (index == null) {\n const initialSheet = sheets[0];\n const textContent = initialSheet != null ? initialSheet.getTextContent() : \"\";\n sheet = createOrderedCSSStyleSheet(\n createCSSStyleSheet(id, rootNode, textContent)\n );\n roots.set(rootNode, sheets.length);\n sheets.push(sheet);\n } else {\n sheet = sheets[index];\n }\n }\n } else {\n if (sheets.length === 0) {\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));\n initialRules.forEach((rule) => {\n sheet.insert(rule, 0);\n });\n sheets.push(sheet);\n } else {\n sheet = sheets[0];\n }\n }\n }\n return {\n getTextContent() {\n createSheet2();\n return sheet.getTextContent();\n },\n id,\n insert(cssText, groupValue) {\n createSheet2();\n sheets.forEach((s) => {\n s.insert(cssText, groupValue);\n });\n }\n };\n}\nexport {\n createSheet\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;AAGA,MAAM,YAAY;AAClB,MAAM,wBAAwB,IAAI,QAAQ;AAC1C,MAAM,SAAS,CAAC;AAChB,MAAM,eAAe;CAEnB;CACA;CAEA;CACA;AACF;AACA,SAAS,YAAY,MAAM,KAAK,WAAW;CACzC,IAAI;CACJ,SAAS,eAAe;EACtB,IAAI,OAAO;EACX,IAAI,WAAW;GACb,MAAM,WAAW,QAAQ,OAAO,KAAK,YAAY,IAAI;GACrD,IAAI,OAAO,WAAW,GAAG;IACvB,QAAQ,2BAA2B,oBAAoB,EAAE,CAAC;IAC1D,aAAa,SAAS,SAAS;KAC7B,MAAM,OAAO,MAAM,CAAC;IACtB,CAAC;IACD,MAAM,IAAI,UAAU,OAAO,MAAM;IACjC,OAAO,KAAK,KAAK;GACnB,OAAO;IACL,MAAM,QAAQ,MAAM,IAAI,QAAQ;IAChC,IAAI,SAAS,MAAM;KACjB,MAAM,eAAe,OAAO;KAC5B,MAAM,cAAc,gBAAgB,OAAO,aAAa,eAAe,IAAI;KAC3E,QAAQ,2BACN,oBAAoB,IAAI,UAAU,WAAW,CAC/C;KACA,MAAM,IAAI,UAAU,OAAO,MAAM;KACjC,OAAO,KAAK,KAAK;IACnB,OAAO;KACL,QAAQ,OAAO;IACjB;GACF;EACF,OAAO;GACL,IAAI,OAAO,WAAW,GAAG;IACvB,QAAQ,2BAA2B,oBAAoB,EAAE,CAAC;IAC1D,aAAa,SAAS,SAAS;KAC7B,MAAM,OAAO,MAAM,CAAC;IACtB,CAAC;IACD,OAAO,KAAK,KAAK;GACnB,OAAO;IACL,QAAQ,OAAO;GACjB;EACF;CACF;CACA,OAAO;EACL,iBAAiB;GACf,aAAa;GACb,OAAO,MAAM,eAAe;EAC9B;EACA;EACA,OAAO,SAAS,YAAY;GAC1B,aAAa;GACb,OAAO,SAAS,MAAM;IACpB,EAAE,OAAO,SAAS,UAAU;GAC9B,CAAC;EACH;CACF;AACF"}
@@ -1,30 +1,30 @@
1
1
  const absoluteFillObject = {
2
- position: "absolute",
3
- left: 0,
4
- right: 0,
5
- top: 0,
6
- bottom: 0
2
+ position: "absolute",
3
+ left: 0,
4
+ right: 0,
5
+ top: 0,
6
+ bottom: 0
7
7
  };
8
8
  const absoluteFill = absoluteFillObject;
9
9
  function create(styles) {
10
- return styles;
10
+ return styles;
11
11
  }
12
12
  function compose(style1, style2) {
13
- return flatten(style1, style2);
13
+ return flatten(style1, style2);
14
14
  }
15
15
  function flatten(...styles) {
16
- return styles.flat().flat().flat().flat().reduce((acc, cur) => {
17
- if (cur) {
18
- Object.assign(acc, cur);
19
- }
20
- return acc;
21
- }, {});
16
+ return styles.flat().flat().flat().flat().reduce((acc, cur) => {
17
+ if (cur) {
18
+ Object.assign(acc, cur);
19
+ }
20
+ return acc;
21
+ }, {});
22
22
  }
23
23
  function getSheet() {
24
- return {
25
- id: "",
26
- textContent: sheet.getTextContent()
27
- };
24
+ return {
25
+ id: "",
26
+ textContent: sheet.getTextContent()
27
+ };
28
28
  }
29
29
  function StyleSheet(styles, options) {}
30
30
  StyleSheet.absoluteFill = absoluteFill;
@@ -34,5 +34,6 @@ StyleSheet.compose = compose;
34
34
  StyleSheet.flatten = flatten;
35
35
  StyleSheet.getSheet = getSheet;
36
36
  StyleSheet.hairlineWidth = 1;
37
+
37
38
  export { StyleSheet, flatten };
38
39
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["absoluteFillObject","position","left","right","top","bottom","absoluteFill","create","styles","compose","style1","style2","flatten","flat","reduce","acc","cur","Object","assign","getSheet","id","textContent","sheet","getTextContent","StyleSheet","options","hairlineWidth"],"sources":["../../../src/StyleSheet/index.tsx"],"sourcesContent":[null],"mappings":"AAoBA,MAAMA,kBAAA,GAAqB;EACzBC,QAAA,EAAU;EACVC,IAAA,EAAM;EACNC,KAAA,EAAO;EACPC,GAAA,EAAK;EACLC,MAAA,EAAQ;AACV;AAEA,MAAMC,YAAA,GAAeN,kBAAA;AAKrB,SAASO,OAAOC,MAAA,EAAQ;EACtB,OAAOA,MAAA;AACT;AAKA,SAASC,QAAQC,MAAA,EAAaC,MAAA,EAAkB;EAC9C,OAAOC,OAAA,CAAQF,MAAA,EAAQC,MAAM;AAC/B;AAKO,SAASC,QAAA,GAAWJ,MAAA,EAAqC;EAC9D,OAAOA,MAAA,CACJK,IAAA,CAAK,EACLA,IAAA,CAAK,EACLA,IAAA,CAAK,EACLA,IAAA,CAAK,EACLC,MAAA,CAAO,CAACC,GAAA,EAAKC,GAAA,KAAQ;IACpB,IAAIA,GAAA,EAAK;MACPC,MAAA,CAAOC,MAAA,CAAOH,GAAA,EAAKC,GAAG;IACxB;IACA,OAAOD,GAAA;EACT,GAAG,CAAC,CAAC;AACT;AAKA,SAASI,SAAA,EAAgD;EACvD,OAAO;IACLC,EAAA,EAAI;IACJC,WAAA,EAAaC,KAAA,CAAMC,cAAA,CAAe;EACpC;AACF;AAQO,SAASC,WAAWhB,MAAA,EAAaiB,OAAA,EAA+B,CAAC;AAExED,UAAA,CAAWlB,YAAA,GAAeA,YAAA;AAC1BkB,UAAA,CAAWxB,kBAAA,GAAqBA,kBAAA;AAChCwB,UAAA,CAAWjB,MAAA,GAASA,MAAA;AACpBiB,UAAA,CAAWf,OAAA,GAAUA,OAAA;AACrBe,UAAA,CAAWZ,OAAA,GAAUA,OAAA;AACrBY,UAAA,CAAWL,QAAA,GAAWA,QAAA;AAGtBK,UAAA,CAAWE,aAAA,GAAgB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/StyleSheet/index.js"],"sourcesContent":["const absoluteFillObject = {\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nconst absoluteFill = absoluteFillObject;\nfunction create(styles) {\n return styles;\n}\nfunction compose(style1, style2) {\n return flatten(style1, style2);\n}\nfunction flatten(...styles) {\n return styles.flat().flat().flat().flat().reduce((acc, cur) => {\n if (cur) {\n Object.assign(acc, cur);\n }\n return acc;\n }, {});\n}\nfunction getSheet() {\n return {\n id: \"\",\n textContent: sheet.getTextContent()\n };\n}\nfunction StyleSheet(styles, options) {\n}\nStyleSheet.absoluteFill = absoluteFill;\nStyleSheet.absoluteFillObject = absoluteFillObject;\nStyleSheet.create = create;\nStyleSheet.compose = compose;\nStyleSheet.flatten = flatten;\nStyleSheet.getSheet = getSheet;\nStyleSheet.hairlineWidth = 1;\nexport {\n StyleSheet,\n flatten\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";AAAA,MAAM,qBAAqB;CACzB,UAAU;CACV,MAAM;CACN,OAAO;CACP,KAAK;CACL,QAAQ;AACV;AACA,MAAM,eAAe;AACrB,SAAS,OAAO,QAAQ;CACtB,OAAO;AACT;AACA,SAAS,QAAQ,QAAQ,QAAQ;CAC/B,OAAO,QAAQ,QAAQ,MAAM;AAC/B;AACA,SAAS,QAAQ,GAAG,QAAQ;CAC1B,OAAO,OAAO,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,QAAQ;EAC7D,IAAI,KAAK;GACP,OAAO,OAAO,KAAK,GAAG;EACxB;EACA,OAAO;CACT,GAAG,CAAC,CAAC;AACP;AACA,SAAS,WAAW;CAClB,OAAO;EACL,IAAI;EACJ,aAAa,MAAM,eAAe;CACpC;AACF;AACA,SAAS,WAAW,QAAQ,SAAS,CACrC;AACA,WAAW,eAAe;AAC1B,WAAW,qBAAqB;AAChC,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,WAAW;AACtB,WAAW,gBAAgB"}
@@ -1,86 +1,69 @@
1
1
  import { normalizeColor } from "./compiler/normalizeColor.mjs";
2
2
  import { normalizeValueWithProperty } from "./compiler/normalizeValueWithProperty.mjs";
3
+
3
4
  const emptyObject = {};
4
5
  const defaultOffset = {
5
- height: 0,
6
- width: 0
6
+ height: 0,
7
+ width: 0
7
8
  };
8
- const createBoxShadowValue = style => {
9
- const {
10
- shadowColor,
11
- shadowOffset,
12
- shadowOpacity,
13
- shadowRadius
14
- } = style;
15
- const {
16
- height,
17
- width
18
- } = shadowOffset || defaultOffset;
19
- const offsetX = normalizeValueWithProperty(width);
20
- const offsetY = normalizeValueWithProperty(height);
21
- const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
22
- const color = normalizeColor(shadowColor || "black", shadowOpacity);
23
- if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
24
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
25
- }
9
+ const createBoxShadowValue = (style) => {
10
+ const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;
11
+ const { height, width } = shadowOffset || defaultOffset;
12
+ const offsetX = normalizeValueWithProperty(width);
13
+ const offsetY = normalizeValueWithProperty(height);
14
+ const blurRadius = normalizeValueWithProperty(shadowRadius || 0);
15
+ const color = normalizeColor(shadowColor || "black", shadowOpacity);
16
+ if (color != null && offsetX != null && offsetY != null && blurRadius != null) {
17
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
18
+ }
26
19
  };
27
- const createTextShadowValue = style => {
28
- const {
29
- textShadowColor,
30
- textShadowOffset,
31
- textShadowRadius
32
- } = style;
33
- const {
34
- height,
35
- width
36
- } = textShadowOffset || defaultOffset;
37
- const radius = textShadowRadius || 0;
38
- const offsetX = normalizeValueWithProperty(width);
39
- const offsetY = normalizeValueWithProperty(height);
40
- const blurRadius = normalizeValueWithProperty(radius);
41
- const color = normalizeValueWithProperty(textShadowColor, "textShadowColor");
42
- if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
43
- return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
44
- }
20
+ const createTextShadowValue = (style) => {
21
+ const { textShadowColor, textShadowOffset, textShadowRadius } = style;
22
+ const { height, width } = textShadowOffset || defaultOffset;
23
+ const radius = textShadowRadius || 0;
24
+ const offsetX = normalizeValueWithProperty(width);
25
+ const offsetY = normalizeValueWithProperty(height);
26
+ const blurRadius = normalizeValueWithProperty(radius);
27
+ const color = normalizeValueWithProperty(textShadowColor, "textShadowColor");
28
+ if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {
29
+ return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
30
+ }
45
31
  };
46
- const preprocess = originalStyle => {
47
- const style = originalStyle || emptyObject;
48
- const nextStyle = {};
49
- for (const originalProp in style) {
50
- const originalValue = style[originalProp];
51
- let prop = originalProp;
52
- let value = originalValue;
53
- if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {
54
- continue;
55
- }
56
- if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
57
- const boxShadowValue = createBoxShadowValue(style);
58
- if (boxShadowValue != null && nextStyle.boxShadow == null) {
59
- const {
60
- boxShadow
61
- } = style;
62
- prop = "boxShadow";
63
- value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
64
- } else {
65
- continue;
66
- }
67
- }
68
- if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
69
- const textShadowValue = createTextShadowValue(style);
70
- if (textShadowValue != null && nextStyle.textShadow == null) {
71
- const {
72
- textShadow
73
- } = style;
74
- prop = "textShadow";
75
- value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
76
- } else {
77
- continue;
78
- }
79
- }
80
- nextStyle[prop] = value;
81
- }
82
- return nextStyle;
32
+ const preprocess = (originalStyle) => {
33
+ const style = originalStyle || emptyObject;
34
+ const nextStyle = {};
35
+ for (const originalProp in style) {
36
+ const originalValue = style[originalProp];
37
+ let prop = originalProp;
38
+ let value = originalValue;
39
+ if (originalValue == null) {
40
+ continue;
41
+ }
42
+ if (prop === "shadowColor" || prop === "shadowOffset" || prop === "shadowOpacity" || prop === "shadowRadius") {
43
+ const boxShadowValue = createBoxShadowValue(style);
44
+ if (boxShadowValue != null && nextStyle.boxShadow == null) {
45
+ const { boxShadow } = style;
46
+ prop = "boxShadow";
47
+ value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;
48
+ } else {
49
+ continue;
50
+ }
51
+ }
52
+ if (prop === "textShadowColor" || prop === "textShadowOffset" || prop === "textShadowRadius") {
53
+ const textShadowValue = createTextShadowValue(style);
54
+ if (textShadowValue != null && nextStyle.textShadow == null) {
55
+ const { textShadow } = style;
56
+ prop = "textShadow";
57
+ value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;
58
+ } else {
59
+ continue;
60
+ }
61
+ }
62
+ nextStyle[prop] = value;
63
+ }
64
+ return nextStyle;
83
65
  };
84
66
  const processStyle = preprocess;
67
+
85
68
  export { createBoxShadowValue, createTextShadowValue, preprocess, processStyle };
86
69
  //# sourceMappingURL=preprocess.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["normalizeColor","normalizeValueWithProperty","emptyObject","defaultOffset","height","width","createBoxShadowValue","style","shadowColor","shadowOffset","shadowOpacity","shadowRadius","offsetX","offsetY","blurRadius","color","createTextShadowValue","textShadowColor","textShadowOffset","textShadowRadius","radius","preprocess","originalStyle","nextStyle","originalProp","originalValue","prop","value","Object","prototype","hasOwnProperty","call","boxShadowValue","boxShadow","textShadowValue","textShadow","processStyle"],"sources":["../../../src/StyleSheet/preprocess.tsx"],"sourcesContent":[null],"mappings":"AAUA,SAASA,cAAA,QAAsB;AAC/B,SAASC,0BAAA,QAAkC;AAE3C,MAAMC,WAAA,GAAc,CAAC;AAMrB,MAAMC,aAAA,GAAgB;EAAEC,MAAA,EAAQ;EAAGC,KAAA,EAAO;AAAE;AAErC,MAAMC,oBAAA,GAAwBC,KAAA,IAAiC;EACpE,MAAM;IAAEC,WAAA;IAAaC,YAAA;IAAcC,aAAA;IAAeC;EAAa,IAAIJ,KAAA;EACnE,MAAM;IAAEH,MAAA;IAAQC;EAAM,IAAII,YAAA,IAAgBN,aAAA;EAC1C,MAAMS,OAAA,GAAUX,0BAAA,CAA2BI,KAAK;EAChD,MAAMQ,OAAA,GAAUZ,0BAAA,CAA2BG,MAAM;EACjD,MAAMU,UAAA,GAAab,0BAAA,CAA2BU,YAAA,IAAgB,CAAC;EAC/D,MAAMI,KAAA,GAAQf,cAAA,CAAeQ,WAAA,IAAe,SAASE,aAAa;EAClE,IAAIK,KAAA,IAAS,QAAQH,OAAA,IAAW,QAAQC,OAAA,IAAW,QAAQC,UAAA,IAAc,MAAM;IAC7E,OAAO,GAAGF,OAAO,IAAIC,OAAO,IAAIC,UAAU,IAAIC,KAAK;EACrD;AACF;AAEO,MAAMC,qBAAA,GAAyBT,KAAA,IAAiC;EACrE,MAAM;IAAEU,eAAA;IAAiBC,gBAAA;IAAkBC;EAAiB,IAAIZ,KAAA;EAChE,MAAM;IAAEH,MAAA;IAAQC;EAAM,IAAIa,gBAAA,IAAoBf,aAAA;EAC9C,MAAMiB,MAAA,GAASD,gBAAA,IAAoB;EACnC,MAAMP,OAAA,GAAUX,0BAAA,CAA2BI,KAAK;EAChD,MAAMQ,OAAA,GAAUZ,0BAAA,CAA2BG,MAAM;EACjD,MAAMU,UAAA,GAAab,0BAAA,CAA2BmB,MAAM;EACpD,MAAML,KAAA,GAAQd,0BAAA,CAA2BgB,eAAA,EAAiB,iBAAiB;EAE3E,IACEF,KAAA,KACCX,MAAA,KAAW,KAAKC,KAAA,KAAU,KAAKe,MAAA,KAAW,MAC3CR,OAAA,IAAW,QACXC,OAAA,IAAW,QACXC,UAAA,IAAc,MACd;IACA,OAAO,GAAGF,OAAO,IAAIC,OAAO,IAAIC,UAAU,IAAIC,KAAK;EACrD;AACF;AAKO,MAAMM,UAAA,GAKXC,aAAA,IACM;EACN,MAAMf,KAAA,GAAQe,aAAA,IAAiBpB,WAAA;EAC/B,MAAMqB,SAAA,GAAY,CAAC;EAEnB,WAAWC,YAAA,IAAgBjB,KAAA,EAAO;IAChC,MAAMkB,aAAA,GAAgBlB,KAAA,CAAMiB,YAAY;IACxC,IAAIE,IAAA,GAAOF,YAAA;IACX,IAAIG,KAAA,GAAQF,aAAA;IAEZ,IACE,CAACG,MAAA,CAAOC,SAAA,CAAUC,cAAA,CAAeC,IAAA,CAAKxB,KAAA,EAAOiB,YAAY,KACzDC,aAAA,IAAiB,MACjB;MACA;IACF;IAGA,IACEC,IAAA,KAAS,iBACTA,IAAA,KAAS,kBACTA,IAAA,KAAS,mBACTA,IAAA,KAAS,gBACT;MACA,MAAMM,cAAA,GAAiB1B,oBAAA,CAAqBC,KAAK;MACjD,IAAIyB,cAAA,IAAkB,QAAQT,SAAA,CAAUU,SAAA,IAAa,MAAM;QACzD,MAAM;UAAEA;QAAU,IAAI1B,KAAA;QACtBmB,IAAA,GAAO;QACPC,KAAA,GAAQM,SAAA,GAAY,GAAGA,SAAS,KAAKD,cAAc,KAAKA,cAAA;MAC1D,OAAO;QACL;MACF;IACF;IAGA,IACEN,IAAA,KAAS,qBACTA,IAAA,KAAS,sBACTA,IAAA,KAAS,oBACT;MACA,MAAMQ,eAAA,GAAkBlB,qBAAA,CAAsBT,KAAK;MACnD,IAAI2B,eAAA,IAAmB,QAAQX,SAAA,CAAUY,UAAA,IAAc,MAAM;QAC3D,MAAM;UAAEA;QAAW,IAAI5B,KAAA;QACvBmB,IAAA,GAAO;QACPC,KAAA,GAAQQ,UAAA,GAAa,GAAGA,UAAU,KAAKD,eAAe,KAAKA,eAAA;MAC7D,OAAO;QACL;MACF;IACF;IAEAX,SAAA,CAAUG,IAAI,IAAIC,KAAA;EACpB;EAGA,OAAOJ,SAAA;AACT;AAEO,MAAMa,YAAA,GAAef,UAAA","ignoreList":[]}
1
+ {"version":3,"file":"preprocess.js","names":[],"sources":["esm/StyleSheet/preprocess.js"],"sourcesContent":["import { normalizeColor } from \"./compiler/normalizeColor\";\nimport { normalizeValueWithProperty } from \"./compiler/normalizeValueWithProperty\";\nconst emptyObject = {};\nconst defaultOffset = { height: 0, width: 0 };\nconst createBoxShadowValue = (style) => {\n const { shadowColor, shadowOffset, shadowOpacity, shadowRadius } = style;\n const { height, width } = shadowOffset || defaultOffset;\n const offsetX = normalizeValueWithProperty(width);\n const offsetY = normalizeValueWithProperty(height);\n const blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n const color = normalizeColor(shadowColor || \"black\", shadowOpacity);\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return `${offsetX} ${offsetY} ${blurRadius} ${color}`;\n }\n};\nconst createTextShadowValue = (style) => {\n const { textShadowColor, textShadowOffset, textShadowRadius } = style;\n const { height, width } = textShadowOffset || defaultOffset;\n const radius = textShadowRadius || 0;\n const offsetX = normalizeValueWithProperty(width);\n const offsetY = normalizeValueWithProperty(height);\n const blurRadius = normalizeValueWithProperty(radius);\n const color = normalizeValueWithProperty(textShadowColor, \"textShadowColor\");\n if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n return `${offsetX} ${offsetY} ${blurRadius} ${color}`;\n }\n};\nconst preprocess = (originalStyle) => {\n const style = originalStyle || emptyObject;\n const nextStyle = {};\n for (const originalProp in style) {\n const originalValue = style[originalProp];\n let prop = originalProp;\n let value = originalValue;\n if (originalValue == null) {\n continue;\n }\n if (prop === \"shadowColor\" || prop === \"shadowOffset\" || prop === \"shadowOpacity\" || prop === \"shadowRadius\") {\n const boxShadowValue = createBoxShadowValue(style);\n if (boxShadowValue != null && nextStyle.boxShadow == null) {\n const { boxShadow } = style;\n prop = \"boxShadow\";\n value = boxShadow ? `${boxShadow}, ${boxShadowValue}` : boxShadowValue;\n } else {\n continue;\n }\n }\n if (prop === \"textShadowColor\" || prop === \"textShadowOffset\" || prop === \"textShadowRadius\") {\n const textShadowValue = createTextShadowValue(style);\n if (textShadowValue != null && nextStyle.textShadow == null) {\n const { textShadow } = style;\n prop = \"textShadow\";\n value = textShadow ? `${textShadow}, ${textShadowValue}` : textShadowValue;\n } else {\n continue;\n }\n }\n nextStyle[prop] = value;\n }\n return nextStyle;\n};\nconst processStyle = preprocess;\nexport {\n createBoxShadowValue,\n createTextShadowValue,\n preprocess,\n processStyle\n};\n//# sourceMappingURL=preprocess.js.map\n"],"mappings":";;;;AAEA,MAAM,cAAc,CAAC;AACrB,MAAM,gBAAgB;CAAE,QAAQ;CAAG,OAAO;AAAE;AAC5C,MAAM,wBAAwB,UAAU;CACtC,MAAM,EAAE,aAAa,cAAc,eAAe,iBAAiB;CACnE,MAAM,EAAE,QAAQ,UAAU,gBAAgB;CAC1C,MAAM,UAAU,2BAA2B,KAAK;CAChD,MAAM,UAAU,2BAA2B,MAAM;CACjD,MAAM,aAAa,2BAA2B,gBAAgB,CAAC;CAC/D,MAAM,QAAQ,eAAe,eAAe,SAAS,aAAa;CAClE,IAAI,SAAS,QAAQ,WAAW,QAAQ,WAAW,QAAQ,cAAc,MAAM;EAC7E,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG;CAChD;AACF;AACA,MAAM,yBAAyB,UAAU;CACvC,MAAM,EAAE,iBAAiB,kBAAkB,qBAAqB;CAChE,MAAM,EAAE,QAAQ,UAAU,oBAAoB;CAC9C,MAAM,SAAS,oBAAoB;CACnC,MAAM,UAAU,2BAA2B,KAAK;CAChD,MAAM,UAAU,2BAA2B,MAAM;CACjD,MAAM,aAAa,2BAA2B,MAAM;CACpD,MAAM,QAAQ,2BAA2B,iBAAiB,iBAAiB;CAC3E,IAAI,UAAU,WAAW,KAAK,UAAU,KAAK,WAAW,MAAM,WAAW,QAAQ,WAAW,QAAQ,cAAc,MAAM;EACtH,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG;CAChD;AACF;AACA,MAAM,cAAc,kBAAkB;CACpC,MAAM,QAAQ,iBAAiB;CAC/B,MAAM,YAAY,CAAC;CACnB,KAAK,MAAM,gBAAgB,OAAO;EAChC,MAAM,gBAAgB,MAAM;EAC5B,IAAI,OAAO;EACX,IAAI,QAAQ;EACZ,IAAI,iBAAiB,MAAM;GACzB;EACF;EACA,IAAI,SAAS,iBAAiB,SAAS,kBAAkB,SAAS,mBAAmB,SAAS,gBAAgB;GAC5G,MAAM,iBAAiB,qBAAqB,KAAK;GACjD,IAAI,kBAAkB,QAAQ,UAAU,aAAa,MAAM;IACzD,MAAM,EAAE,cAAc;IACtB,OAAO;IACP,QAAQ,YAAY,GAAG,UAAU,IAAI,mBAAmB;GAC1D,OAAO;IACL;GACF;EACF;EACA,IAAI,SAAS,qBAAqB,SAAS,sBAAsB,SAAS,oBAAoB;GAC5F,MAAM,kBAAkB,sBAAsB,KAAK;GACnD,IAAI,mBAAmB,QAAQ,UAAU,cAAc,MAAM;IAC3D,MAAM,EAAE,eAAe;IACvB,OAAO;IACP,QAAQ,aAAa,GAAG,WAAW,IAAI,oBAAoB;GAC7D,OAAO;IACL;GACF;EACF;EACA,UAAU,QAAQ;CACpB;CACA,OAAO;AACT;AACA,MAAM,eAAe"}
@@ -1,67 +1,68 @@
1
1
  const invalidShortforms = {
2
- background: true,
3
- borderBottom: true,
4
- borderLeft: true,
5
- borderRight: true,
6
- borderTop: true,
7
- font: true,
8
- grid: true,
9
- outline: true,
10
- textDecoration: true
2
+ background: true,
3
+ borderBottom: true,
4
+ borderLeft: true,
5
+ borderRight: true,
6
+ borderTop: true,
7
+ font: true,
8
+ grid: true,
9
+ outline: true,
10
+ textDecoration: true
11
11
  };
12
12
  const invalidMultiValueShortforms = {
13
- flex: true,
14
- margin: true,
15
- padding: true,
16
- borderColor: true,
17
- borderRadius: true,
18
- borderStyle: true,
19
- borderWidth: true,
20
- marginHorizontal: true,
21
- marginVertical: true,
22
- paddingHorizontal: true,
23
- paddingVertical: true,
24
- overflow: true,
25
- overscrollBehavior: true,
26
- backgroundPosition: true
13
+ flex: true,
14
+ margin: true,
15
+ padding: true,
16
+ borderColor: true,
17
+ borderRadius: true,
18
+ borderStyle: true,
19
+ borderWidth: true,
20
+ marginHorizontal: true,
21
+ marginVertical: true,
22
+ paddingHorizontal: true,
23
+ paddingVertical: true,
24
+ overflow: true,
25
+ overscrollBehavior: true,
26
+ backgroundPosition: true
27
27
  };
28
28
  function error(message) {
29
- console.error(message);
29
+ console.error(message);
30
30
  }
31
31
  function validate(obj) {
32
- for (const k in obj) {
33
- const prop = k.trim();
34
- const value = obj[prop];
35
- let isInvalid = false;
36
- if (value === null) {
37
- continue;
38
- }
39
- if (typeof value === "string" && value.indexOf("!important") > -1) {
40
- error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
41
- isInvalid = true;
42
- } else {
43
- let suggestion = "";
44
- if (prop === "animation" || prop === "animationName") {
45
- suggestion = 'Did you mean "animationKeyframes"?';
46
- isInvalid = true;
47
- } else if (prop === "direction") {
48
- suggestion = 'Did you mean "writingDirection"?';
49
- isInvalid = true;
50
- } else if (prop === "verticalAlign") {
51
- suggestion = 'Did you mean "textAlignVertical"?';
52
- isInvalid = true;
53
- } else if (invalidShortforms[prop]) {
54
- suggestion = "Please use long-form properties.";
55
- isInvalid = true;
56
- } else if (invalidMultiValueShortforms[prop]) {}
57
- if (suggestion !== "") {
58
- error(`Invalid style property of "${prop}". ${suggestion}`);
59
- }
60
- }
61
- if (isInvalid) {
62
- delete obj[k];
63
- }
64
- }
32
+ for (const k in obj) {
33
+ const prop = k.trim();
34
+ const value = obj[prop];
35
+ let isInvalid = false;
36
+ if (value === null) {
37
+ continue;
38
+ }
39
+ if (typeof value === "string" && value.indexOf("!important") > -1) {
40
+ error(`Invalid style declaration "${prop}:${value}". Values cannot include "!important"`);
41
+ isInvalid = true;
42
+ } else {
43
+ let suggestion = "";
44
+ if (prop === "animation" || prop === "animationName") {
45
+ suggestion = "Did you mean \"animationKeyframes\"?";
46
+ isInvalid = true;
47
+ } else if (prop === "direction") {
48
+ suggestion = "Did you mean \"writingDirection\"?";
49
+ isInvalid = true;
50
+ } else if (prop === "verticalAlign") {
51
+ suggestion = "Did you mean \"textAlignVertical\"?";
52
+ isInvalid = true;
53
+ } else if (invalidShortforms[prop]) {
54
+ suggestion = "Please use long-form properties.";
55
+ isInvalid = true;
56
+ } else if (invalidMultiValueShortforms[prop]) {}
57
+ if (suggestion !== "") {
58
+ error(`Invalid style property of "${prop}". ${suggestion}`);
59
+ }
60
+ }
61
+ if (isInvalid) {
62
+ delete obj[k];
63
+ }
64
+ }
65
65
  }
66
+
66
67
  export { validate };
67
68
  //# sourceMappingURL=validate.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["invalidShortforms","background","borderBottom","borderLeft","borderRight","borderTop","font","grid","outline","textDecoration","invalidMultiValueShortforms","flex","margin","padding","borderColor","borderRadius","borderStyle","borderWidth","marginHorizontal","marginVertical","paddingHorizontal","paddingVertical","overflow","overscrollBehavior","backgroundPosition","error","message","console","validate","obj","k","prop","trim","value","isInvalid","indexOf","suggestion"],"sources":["../../../src/StyleSheet/validate.tsx"],"sourcesContent":[null],"mappings":"AASA,MAAMA,iBAAA,GAAoB;EACxBC,UAAA,EAAY;EACZC,YAAA,EAAc;EACdC,UAAA,EAAY;EACZC,WAAA,EAAa;EACbC,SAAA,EAAW;EACXC,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,OAAA,EAAS;EACTC,cAAA,EAAgB;AAClB;AAEA,MAAMC,2BAAA,GAA8B;EAClCC,IAAA,EAAM;EACNC,MAAA,EAAQ;EACRC,OAAA,EAAS;EACTC,WAAA,EAAa;EACbC,YAAA,EAAc;EACdC,WAAA,EAAa;EACbC,WAAA,EAAa;EACbC,gBAAA,EAAkB;EAClBC,cAAA,EAAgB;EAChBC,iBAAA,EAAmB;EACnBC,eAAA,EAAiB;EACjBC,QAAA,EAAU;EACVC,kBAAA,EAAoB;EACpBC,kBAAA,EAAoB;AACtB;AAEA,SAASC,MAAMC,OAAA,EAAS;EACtBC,OAAA,CAAQF,KAAA,CAAMC,OAAO;AACvB;AAEO,SAASE,SAASC,GAAA,EAAa;EACpC,WAAWC,CAAA,IAAKD,GAAA,EAAK;IACnB,MAAME,IAAA,GAAOD,CAAA,CAAEE,IAAA,CAAK;IACpB,MAAMC,KAAA,GAAQJ,GAAA,CAAIE,IAAI;IACtB,IAAIG,SAAA,GAAY;IAEhB,IAAID,KAAA,KAAU,MAAM;MAClB;IACF;IAEA,IAAI,OAAOA,KAAA,KAAU,YAAYA,KAAA,CAAME,OAAA,CAAQ,YAAY,IAAI,IAAI;MACjEV,KAAA,CACE,8BAA8BM,IAAI,IAAIE,KAAK,uCAC7C;MACAC,SAAA,GAAY;IACd,OAAO;MACL,IAAIE,UAAA,GAAa;MACjB,IAAIL,IAAA,KAAS,eAAeA,IAAA,KAAS,iBAAiB;QACpDK,UAAA,GAAa;QAGbF,SAAA,GAAY;MACd,WAAWH,IAAA,KAAS,aAAa;QAC/BK,UAAA,GAAa;QACbF,SAAA,GAAY;MACd,WAAWH,IAAA,KAAS,iBAAiB;QACnCK,UAAA,GAAa;QACbF,SAAA,GAAY;MACd,WAAWlC,iBAAA,CAAkB+B,IAAI,GAAG;QAClCK,UAAA,GAAa;QACbF,SAAA,GAAY;MACd,WAAWxB,2BAAA,CAA4BqB,IAAI,GAAG,CAM9C;MACA,IAAIK,UAAA,KAAe,IAAI;QACrBX,KAAA,CAAM,8BAA8BM,IAAI,MAAMK,UAAU,EAAE;MAC5D;IACF;IAEA,IAAIF,SAAA,EAAW;MACb,OAAOL,GAAA,CAAIC,CAAC;IACd;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"validate.js","names":[],"sources":["esm/StyleSheet/validate.js"],"sourcesContent":["const invalidShortforms = {\n background: true,\n borderBottom: true,\n borderLeft: true,\n borderRight: true,\n borderTop: true,\n font: true,\n grid: true,\n outline: true,\n textDecoration: true\n};\nconst invalidMultiValueShortforms = {\n flex: true,\n margin: true,\n padding: true,\n borderColor: true,\n borderRadius: true,\n borderStyle: true,\n borderWidth: true,\n marginHorizontal: true,\n marginVertical: true,\n paddingHorizontal: true,\n paddingVertical: true,\n overflow: true,\n overscrollBehavior: true,\n backgroundPosition: true\n};\nfunction error(message) {\n console.error(message);\n}\nfunction validate(obj) {\n for (const k in obj) {\n const prop = k.trim();\n const value = obj[prop];\n let isInvalid = false;\n if (value === null) {\n continue;\n }\n if (typeof value === \"string\" && value.indexOf(\"!important\") > -1) {\n error(\n `Invalid style declaration \"${prop}:${value}\". Values cannot include \"!important\"`\n );\n isInvalid = true;\n } else {\n let suggestion = \"\";\n if (prop === \"animation\" || prop === \"animationName\") {\n suggestion = 'Did you mean \"animationKeyframes\"?';\n isInvalid = true;\n } else if (prop === \"direction\") {\n suggestion = 'Did you mean \"writingDirection\"?';\n isInvalid = true;\n } else if (prop === \"verticalAlign\") {\n suggestion = 'Did you mean \"textAlignVertical\"?';\n isInvalid = true;\n } else if (invalidShortforms[prop]) {\n suggestion = \"Please use long-form properties.\";\n isInvalid = true;\n } else if (invalidMultiValueShortforms[prop]) {\n }\n if (suggestion !== \"\") {\n error(`Invalid style property of \"${prop}\". ${suggestion}`);\n }\n }\n if (isInvalid) {\n delete obj[k];\n }\n }\n}\nexport {\n validate\n};\n//# sourceMappingURL=validate.js.map\n"],"mappings":";AAAA,MAAM,oBAAoB;CACxB,YAAY;CACZ,cAAc;CACd,YAAY;CACZ,aAAa;CACb,WAAW;CACX,MAAM;CACN,MAAM;CACN,SAAS;CACT,gBAAgB;AAClB;AACA,MAAM,8BAA8B;CAClC,MAAM;CACN,QAAQ;CACR,SAAS;CACT,aAAa;CACb,cAAc;CACd,aAAa;CACb,aAAa;CACb,kBAAkB;CAClB,gBAAgB;CAChB,mBAAmB;CACnB,iBAAiB;CACjB,UAAU;CACV,oBAAoB;CACpB,oBAAoB;AACtB;AACA,SAAS,MAAM,SAAS;CACtB,QAAQ,MAAM,OAAO;AACvB;AACA,SAAS,SAAS,KAAK;CACrB,KAAK,MAAM,KAAK,KAAK;EACnB,MAAM,OAAO,EAAE,KAAK;EACpB,MAAM,QAAQ,IAAI;EAClB,IAAI,YAAY;EAChB,IAAI,UAAU,MAAM;GAClB;EACF;EACA,IAAI,OAAO,UAAU,YAAY,MAAM,QAAQ,YAAY,IAAI,CAAC,GAAG;GACjE,MACE,8BAA8B,KAAK,GAAG,MAAM,sCAC9C;GACA,YAAY;EACd,OAAO;GACL,IAAI,aAAa;GACjB,IAAI,SAAS,eAAe,SAAS,iBAAiB;IACpD,aAAa;IACb,YAAY;GACd,OAAO,IAAI,SAAS,aAAa;IAC/B,aAAa;IACb,YAAY;GACd,OAAO,IAAI,SAAS,iBAAiB;IACnC,aAAa;IACb,YAAY;GACd,OAAO,IAAI,kBAAkB,OAAO;IAClC,aAAa;IACb,YAAY;GACd,OAAO,IAAI,4BAA4B,OAAO,CAC9C;GACA,IAAI,eAAe,IAAI;IACrB,MAAM,8BAA8B,KAAK,KAAK,YAAY;GAC5D;EACF;EACA,IAAI,WAAW;GACb,OAAO,IAAI;EACb;CACF;AACF"}
@@ -1,4 +1,6 @@
1
1
  import { createContext } from "react";
2
+
2
3
  const TextAncestorContext = createContext(false);
4
+
3
5
  export { TextAncestorContext };
4
6
  //# sourceMappingURL=TextAncestorContext.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","TextAncestorContext"],"sources":["../../src/TextAncestorContext.tsx"],"sourcesContent":[null],"mappings":"AAUA,SAASA,aAAA,QAAqB;AAEvB,MAAMC,mBAAA,GAAsBD,aAAA,CAAc,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"TextAncestorContext.js","names":[],"sources":["esm/TextAncestorContext.js"],"sourcesContent":["import { createContext } from \"react\";\nconst TextAncestorContext = createContext(false);\nexport {\n TextAncestorContext\n};\n//# sourceMappingURL=TextAncestorContext.js.map\n"],"mappings":";;;AACA,MAAM,sBAAsB,cAAc,KAAK"}
@@ -1,14 +1,15 @@
1
1
  const colorProps = {
2
- backgroundColor: true,
3
- borderColor: true,
4
- borderTopColor: true,
5
- borderRightColor: true,
6
- borderBottomColor: true,
7
- borderLeftColor: true,
8
- color: true,
9
- shadowColor: true,
10
- textDecorationColor: true,
11
- textShadowColor: true
2
+ backgroundColor: true,
3
+ borderColor: true,
4
+ borderTopColor: true,
5
+ borderRightColor: true,
6
+ borderBottomColor: true,
7
+ borderLeftColor: true,
8
+ color: true,
9
+ shadowColor: true,
10
+ textDecorationColor: true,
11
+ textShadowColor: true
12
12
  };
13
+
13
14
  export { colorProps };
14
15
  //# sourceMappingURL=colorProps.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["colorProps","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","color","shadowColor","textDecorationColor","textShadowColor"],"sources":["../../src/colorProps.tsx"],"sourcesContent":[null],"mappings":"AAAO,MAAMA,UAAA,GAAa;EACxBC,eAAA,EAAiB;EACjBC,WAAA,EAAa;EACbC,cAAA,EAAgB;EAChBC,gBAAA,EAAkB;EAClBC,iBAAA,EAAmB;EACnBC,eAAA,EAAiB;EACjBC,KAAA,EAAO;EACPC,WAAA,EAAa;EACbC,mBAAA,EAAqB;EACrBC,eAAA,EAAiB;AACnB","ignoreList":[]}
1
+ {"version":3,"file":"colorProps.js","names":[],"sources":["esm/colorProps.js"],"sourcesContent":["const colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true\n};\nexport {\n colorProps\n};\n//# sourceMappingURL=colorProps.js.map\n"],"mappings":";AAAA,MAAM,aAAa;CACjB,iBAAiB;CACjB,aAAa;CACb,gBAAgB;CAChB,kBAAkB;CAClB,mBAAmB;CACnB,iBAAiB;CACjB,OAAO;CACP,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB"}