@tamagui/react-native-web-internals 2.0.0-rc.3 → 2.0.0-rc.30

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 (342) hide show
  1. package/dist/cjs/index.cjs +1 -0
  2. package/dist/cjs/index.js +58 -21
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/modules/createDOMProps/index.cjs +102 -59
  5. package/dist/cjs/modules/forwardedProps/index.cjs +1 -0
  6. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.cjs +7 -2
  7. package/dist/esm/StyleSheet/__tests__/compiler-test.mjs +1 -1
  8. package/dist/esm/StyleSheet/compiler/normalizeColor.mjs +2 -2
  9. package/dist/esm/index.js +42 -77
  10. package/dist/esm/index.js.map +1 -6
  11. package/dist/esm/index.mjs +2 -2
  12. package/dist/esm/index.mjs.map +1 -1
  13. package/dist/esm/modules/Platform/__tests__/index-test.mjs +1 -1
  14. package/dist/esm/modules/TextInputState/index.mjs +1 -1
  15. package/dist/esm/modules/UIManager/__tests__/index-test.mjs +1 -1
  16. package/dist/esm/modules/createDOMProps/__tests__/index-test.mjs +1 -1
  17. package/dist/esm/modules/createDOMProps/index.mjs +102 -59
  18. package/dist/esm/modules/createDOMProps/index.mjs.map +1 -1
  19. package/dist/esm/modules/createEventHandle/__tests__/index-test.mjs +1 -1
  20. package/dist/esm/modules/forwardedProps/index.mjs +1 -0
  21. package/dist/esm/modules/forwardedProps/index.mjs.map +1 -1
  22. package/dist/esm/modules/mergeRefs/__tests__/index-test.mjs +1 -1
  23. package/dist/esm/modules/modality/__tests__/index-test.mjs +1 -1
  24. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.mjs +1 -1
  25. package/dist/esm/modules/processColor/__tests__/index-test.mjs +1 -1
  26. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs +6 -1
  27. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.mjs.map +1 -1
  28. package/dist/esm/modules/useEvent/__tests__/index-test.mjs +1 -1
  29. package/dist/esm/modules/useHover/__tests__/index-test.mjs +1 -1
  30. package/dist/esm/modules/useMergeRefs/__tests__/index-test.mjs +1 -1
  31. package/dist/esm/modules/useStable/__tests__/index-test.mjs +1 -1
  32. package/package.json +9 -8
  33. package/src/index.tsx +4 -1
  34. package/src/modules/createDOMProps/index.tsx +51 -0
  35. package/src/modules/forwardedProps/index.tsx +1 -0
  36. package/src/modules/setValueForStyles/dangerousStyleValue.tsx +24 -0
  37. package/types/index.d.ts +1 -1
  38. package/types/index.d.ts.map +1 -1
  39. package/types/modules/createDOMProps/index.d.ts.map +1 -1
  40. package/types/modules/forwardedProps/index.d.ts +4 -0
  41. package/types/modules/forwardedProps/index.d.ts.map +1 -1
  42. package/types/modules/setValueForStyles/dangerousStyleValue.d.ts.map +1 -1
  43. package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js +0 -192
  44. package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js.map +0 -6
  45. package/dist/cjs/StyleSheet/__tests__/compiler-test.js +0 -378
  46. package/dist/cjs/StyleSheet/__tests__/compiler-test.js.map +0 -6
  47. package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js +0 -117
  48. package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js.map +0 -6
  49. package/dist/cjs/StyleSheet/__tests__/index-test.js +0 -347
  50. package/dist/cjs/StyleSheet/__tests__/index-test.js.map +0 -6
  51. package/dist/cjs/StyleSheet/__tests__/preprocess-test.js +0 -77
  52. package/dist/cjs/StyleSheet/__tests__/preprocess-test.js.map +0 -6
  53. package/dist/cjs/StyleSheet/__tests__/validate-test.js +0 -18
  54. package/dist/cjs/StyleSheet/__tests__/validate-test.js.map +0 -6
  55. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.js +0 -112
  56. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.js.map +0 -6
  57. package/dist/cjs/StyleSheet/compiler/hash.js +0 -21
  58. package/dist/cjs/StyleSheet/compiler/hash.js.map +0 -6
  59. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.js +0 -30
  60. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.js.map +0 -6
  61. package/dist/cjs/StyleSheet/compiler/index.js +0 -245
  62. package/dist/cjs/StyleSheet/compiler/index.js.map +0 -6
  63. package/dist/cjs/StyleSheet/compiler/normalizeColor.js +0 -33
  64. package/dist/cjs/StyleSheet/compiler/normalizeColor.js.map +0 -6
  65. package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.js +0 -37
  66. package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.js.map +0 -6
  67. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.js +0 -26
  68. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.js.map +0 -6
  69. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.js +0 -36
  70. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.js.map +0 -6
  71. package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.js +0 -94
  72. package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.js.map +0 -6
  73. package/dist/cjs/StyleSheet/dom/index.js +0 -66
  74. package/dist/cjs/StyleSheet/dom/index.js.map +0 -6
  75. package/dist/cjs/StyleSheet/index.js +0 -52
  76. package/dist/cjs/StyleSheet/index.js.map +0 -6
  77. package/dist/cjs/StyleSheet/preprocess.js +0 -59
  78. package/dist/cjs/StyleSheet/preprocess.js.map +0 -6
  79. package/dist/cjs/StyleSheet/validate.js +0 -66
  80. package/dist/cjs/StyleSheet/validate.js.map +0 -6
  81. package/dist/cjs/TextAncestorContext.js +0 -22
  82. package/dist/cjs/TextAncestorContext.js.map +0 -6
  83. package/dist/cjs/colorProps.js +0 -32
  84. package/dist/cjs/colorProps.js.map +0 -6
  85. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js +0 -46
  86. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js.map +0 -6
  87. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js +0 -30
  88. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js.map +0 -6
  89. package/dist/cjs/modules/AccessibilityUtil/index.js +0 -26
  90. package/dist/cjs/modules/AccessibilityUtil/index.js.map +0 -6
  91. package/dist/cjs/modules/AccessibilityUtil/isDisabled.js +0 -21
  92. package/dist/cjs/modules/AccessibilityUtil/isDisabled.js.map +0 -6
  93. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.js +0 -51
  94. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.js.map +0 -6
  95. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.js +0 -42
  96. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.js.map +0 -6
  97. package/dist/cjs/modules/AssetRegistry/index.js +0 -28
  98. package/dist/cjs/modules/AssetRegistry/index.js.map +0 -6
  99. package/dist/cjs/modules/ImageLoader/index.js +0 -101
  100. package/dist/cjs/modules/ImageLoader/index.js.map +0 -6
  101. package/dist/cjs/modules/InteractionManager.js +0 -163
  102. package/dist/cjs/modules/InteractionManager.js.map +0 -6
  103. package/dist/cjs/modules/Platform/__tests__/index-test.js +0 -46
  104. package/dist/cjs/modules/Platform/__tests__/index-test.js.map +0 -6
  105. package/dist/cjs/modules/Platform/index.js +0 -25
  106. package/dist/cjs/modules/Platform/index.js.map +0 -6
  107. package/dist/cjs/modules/TextInputState/index.js +0 -50
  108. package/dist/cjs/modules/TextInputState/index.js.map +0 -6
  109. package/dist/cjs/modules/UIManager/__tests__/index-test.js +0 -66
  110. package/dist/cjs/modules/UIManager/__tests__/index-test.js.map +0 -6
  111. package/dist/cjs/modules/UIManager/index.js +0 -57
  112. package/dist/cjs/modules/UIManager/index.js.map +0 -6
  113. package/dist/cjs/modules/canUseDOM.js +0 -21
  114. package/dist/cjs/modules/canUseDOM.js.map +0 -6
  115. package/dist/cjs/modules/createDOMProps/__tests__/index-test.js +0 -106
  116. package/dist/cjs/modules/createDOMProps/__tests__/index-test.js.map +0 -6
  117. package/dist/cjs/modules/createDOMProps/index.js +0 -126
  118. package/dist/cjs/modules/createDOMProps/index.js.map +0 -6
  119. package/dist/cjs/modules/createEventHandle/__tests__/index-test.js +0 -242
  120. package/dist/cjs/modules/createEventHandle/__tests__/index-test.js.map +0 -6
  121. package/dist/cjs/modules/createEventHandle/index.js +0 -66
  122. package/dist/cjs/modules/createEventHandle/index.js.map +0 -6
  123. package/dist/cjs/modules/dismissKeyboard/index.js +0 -24
  124. package/dist/cjs/modules/dismissKeyboard/index.js.map +0 -6
  125. package/dist/cjs/modules/forwardedProps/index.js +0 -145
  126. package/dist/cjs/modules/forwardedProps/index.js.map +0 -6
  127. package/dist/cjs/modules/getBoundingClientRect/index.js +0 -24
  128. package/dist/cjs/modules/getBoundingClientRect/index.js.map +0 -6
  129. package/dist/cjs/modules/invariant.js +0 -35
  130. package/dist/cjs/modules/invariant.js.map +0 -6
  131. package/dist/cjs/modules/isSelectionValid/index.js +0 -27
  132. package/dist/cjs/modules/isSelectionValid/index.js.map +0 -6
  133. package/dist/cjs/modules/isWebColor/index.js +0 -21
  134. package/dist/cjs/modules/isWebColor/index.js.map +0 -6
  135. package/dist/cjs/modules/mergeRefs/__tests__/index-test.js +0 -34
  136. package/dist/cjs/modules/mergeRefs/__tests__/index-test.js.map +0 -6
  137. package/dist/cjs/modules/mergeRefs/index.js +0 -41
  138. package/dist/cjs/modules/mergeRefs/index.js.map +0 -6
  139. package/dist/cjs/modules/modality/__tests__/index-test.js +0 -20
  140. package/dist/cjs/modules/modality/__tests__/index-test.js.map +0 -6
  141. package/dist/cjs/modules/modality/index.js +0 -82
  142. package/dist/cjs/modules/modality/index.js.map +0 -6
  143. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.js +0 -28
  144. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.js.map +0 -6
  145. package/dist/cjs/modules/multiplyStyleLengthValue/index.js +0 -27
  146. package/dist/cjs/modules/multiplyStyleLengthValue/index.js.map +0 -6
  147. package/dist/cjs/modules/normalizeColor/index.js +0 -31
  148. package/dist/cjs/modules/normalizeColor/index.js.map +0 -6
  149. package/dist/cjs/modules/pick/index.js +0 -26
  150. package/dist/cjs/modules/pick/index.js.map +0 -6
  151. package/dist/cjs/modules/processColor/__tests__/index-test.js +0 -64
  152. package/dist/cjs/modules/processColor/__tests__/index-test.js.map +0 -6
  153. package/dist/cjs/modules/processColor/index.js +0 -36
  154. package/dist/cjs/modules/processColor/index.js.map +0 -6
  155. package/dist/cjs/modules/requestIdleCallback/index.js +0 -35
  156. package/dist/cjs/modules/requestIdleCallback/index.js.map +0 -6
  157. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.js +0 -25
  158. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.js.map +0 -6
  159. package/dist/cjs/modules/setValueForStyles/index.js +0 -30
  160. package/dist/cjs/modules/setValueForStyles/index.js.map +0 -6
  161. package/dist/cjs/modules/unitlessNumbers/index.js +0 -78
  162. package/dist/cjs/modules/unitlessNumbers/index.js.map +0 -6
  163. package/dist/cjs/modules/useElementLayout/index.js +0 -33
  164. package/dist/cjs/modules/useElementLayout/index.js.map +0 -6
  165. package/dist/cjs/modules/useEvent/__tests__/index-test.js +0 -289
  166. package/dist/cjs/modules/useEvent/__tests__/index-test.js.map +0 -6
  167. package/dist/cjs/modules/useEvent/index.js +0 -37
  168. package/dist/cjs/modules/useEvent/index.js.map +0 -6
  169. package/dist/cjs/modules/useHover/__tests__/index-test.js +0 -195
  170. package/dist/cjs/modules/useHover/__tests__/index-test.js.map +0 -6
  171. package/dist/cjs/modules/useHover/index.js +0 -73
  172. package/dist/cjs/modules/useHover/index.js.map +0 -6
  173. package/dist/cjs/modules/useLayoutEffect/index.js +0 -30
  174. package/dist/cjs/modules/useLayoutEffect/index.js.map +0 -6
  175. package/dist/cjs/modules/useLocale/index.js +0 -54
  176. package/dist/cjs/modules/useLocale/index.js.map +0 -6
  177. package/dist/cjs/modules/useLocale/isLocaleRTL.js +0 -91
  178. package/dist/cjs/modules/useLocale/isLocaleRTL.js.map +0 -6
  179. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.js +0 -68
  180. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.js.map +0 -6
  181. package/dist/cjs/modules/useMergeRefs/index.js +0 -36
  182. package/dist/cjs/modules/useMergeRefs/index.js.map +0 -6
  183. package/dist/cjs/modules/usePlatformMethods/index.js +0 -29
  184. package/dist/cjs/modules/usePlatformMethods/index.js.map +0 -6
  185. package/dist/cjs/modules/useStable/__tests__/index-test.js +0 -69
  186. package/dist/cjs/modules/useStable/__tests__/index-test.js.map +0 -6
  187. package/dist/cjs/modules/useStable/index.js +0 -34
  188. package/dist/cjs/modules/useStable/index.js.map +0 -6
  189. package/dist/cjs/styleTypes.js +0 -14
  190. package/dist/cjs/styleTypes.js.map +0 -6
  191. package/dist/cjs/types.js +0 -14
  192. package/dist/cjs/types.js.map +0 -6
  193. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js +0 -173
  194. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js.map +0 -6
  195. package/dist/esm/StyleSheet/__tests__/compiler-test.js +0 -378
  196. package/dist/esm/StyleSheet/__tests__/compiler-test.js.map +0 -6
  197. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js +0 -98
  198. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js.map +0 -6
  199. package/dist/esm/StyleSheet/__tests__/index-test.js +0 -328
  200. package/dist/esm/StyleSheet/__tests__/index-test.js.map +0 -6
  201. package/dist/esm/StyleSheet/__tests__/preprocess-test.js +0 -77
  202. package/dist/esm/StyleSheet/__tests__/preprocess-test.js.map +0 -6
  203. package/dist/esm/StyleSheet/__tests__/validate-test.js +0 -18
  204. package/dist/esm/StyleSheet/__tests__/validate-test.js.map +0 -6
  205. package/dist/esm/StyleSheet/compiler/createReactDOMStyle.js +0 -97
  206. package/dist/esm/StyleSheet/compiler/createReactDOMStyle.js.map +0 -6
  207. package/dist/esm/StyleSheet/compiler/hash.js +0 -5
  208. package/dist/esm/StyleSheet/compiler/hash.js.map +0 -6
  209. package/dist/esm/StyleSheet/compiler/hyphenateStyleName.js +0 -14
  210. package/dist/esm/StyleSheet/compiler/hyphenateStyleName.js.map +0 -6
  211. package/dist/esm/StyleSheet/compiler/index.js +0 -232
  212. package/dist/esm/StyleSheet/compiler/index.js.map +0 -6
  213. package/dist/esm/StyleSheet/compiler/normalizeColor.js +0 -18
  214. package/dist/esm/StyleSheet/compiler/normalizeColor.js.map +0 -6
  215. package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.js +0 -22
  216. package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.js.map +0 -6
  217. package/dist/esm/StyleSheet/compiler/resolveShadowValue.js +0 -11
  218. package/dist/esm/StyleSheet/compiler/resolveShadowValue.js.map +0 -6
  219. package/dist/esm/StyleSheet/dom/createCSSStyleSheet.js +0 -20
  220. package/dist/esm/StyleSheet/dom/createCSSStyleSheet.js.map +0 -6
  221. package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.js +0 -78
  222. package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.js.map +0 -6
  223. package/dist/esm/StyleSheet/dom/index.js +0 -52
  224. package/dist/esm/StyleSheet/dom/index.js.map +0 -6
  225. package/dist/esm/StyleSheet/index.js +0 -36
  226. package/dist/esm/StyleSheet/index.js.map +0 -6
  227. package/dist/esm/StyleSheet/preprocess.js +0 -44
  228. package/dist/esm/StyleSheet/preprocess.js.map +0 -6
  229. package/dist/esm/StyleSheet/validate.js +0 -50
  230. package/dist/esm/StyleSheet/validate.js.map +0 -6
  231. package/dist/esm/TextAncestorContext.js +0 -6
  232. package/dist/esm/TextAncestorContext.js.map +0 -6
  233. package/dist/esm/colorProps.js +0 -16
  234. package/dist/esm/colorProps.js.map +0 -6
  235. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js +0 -27
  236. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js.map +0 -6
  237. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js +0 -11
  238. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js.map +0 -6
  239. package/dist/esm/modules/AccessibilityUtil/index.js +0 -12
  240. package/dist/esm/modules/AccessibilityUtil/index.js.map +0 -6
  241. package/dist/esm/modules/AccessibilityUtil/isDisabled.js +0 -5
  242. package/dist/esm/modules/AccessibilityUtil/isDisabled.js.map +0 -6
  243. package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.js +0 -35
  244. package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.js.map +0 -6
  245. package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.js +0 -26
  246. package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.js.map +0 -6
  247. package/dist/esm/modules/AssetRegistry/index.js +0 -12
  248. package/dist/esm/modules/AssetRegistry/index.js.map +0 -6
  249. package/dist/esm/modules/ImageLoader/index.js +0 -85
  250. package/dist/esm/modules/ImageLoader/index.js.map +0 -6
  251. package/dist/esm/modules/InteractionManager.js +0 -148
  252. package/dist/esm/modules/InteractionManager.js.map +0 -6
  253. package/dist/esm/modules/Platform/__tests__/index-test.js +0 -27
  254. package/dist/esm/modules/Platform/__tests__/index-test.js.map +0 -6
  255. package/dist/esm/modules/Platform/index.js +0 -9
  256. package/dist/esm/modules/Platform/index.js.map +0 -6
  257. package/dist/esm/modules/TextInputState/index.js +0 -34
  258. package/dist/esm/modules/TextInputState/index.js.map +0 -6
  259. package/dist/esm/modules/UIManager/__tests__/index-test.js +0 -47
  260. package/dist/esm/modules/UIManager/__tests__/index-test.js.map +0 -6
  261. package/dist/esm/modules/UIManager/index.js +0 -41
  262. package/dist/esm/modules/UIManager/index.js.map +0 -6
  263. package/dist/esm/modules/canUseDOM.js +0 -5
  264. package/dist/esm/modules/canUseDOM.js.map +0 -6
  265. package/dist/esm/modules/createDOMProps/__tests__/index-test.js +0 -87
  266. package/dist/esm/modules/createDOMProps/__tests__/index-test.js.map +0 -6
  267. package/dist/esm/modules/createDOMProps/index.js +0 -111
  268. package/dist/esm/modules/createDOMProps/index.js.map +0 -6
  269. package/dist/esm/modules/createEventHandle/__tests__/index-test.js +0 -229
  270. package/dist/esm/modules/createEventHandle/__tests__/index-test.js.map +0 -6
  271. package/dist/esm/modules/createEventHandle/index.js +0 -49
  272. package/dist/esm/modules/createEventHandle/index.js.map +0 -6
  273. package/dist/esm/modules/dismissKeyboard/index.js +0 -8
  274. package/dist/esm/modules/dismissKeyboard/index.js.map +0 -6
  275. package/dist/esm/modules/forwardedProps/index.js +0 -129
  276. package/dist/esm/modules/forwardedProps/index.js.map +0 -6
  277. package/dist/esm/modules/getBoundingClientRect/index.js +0 -8
  278. package/dist/esm/modules/getBoundingClientRect/index.js.map +0 -6
  279. package/dist/esm/modules/invariant.js +0 -19
  280. package/dist/esm/modules/invariant.js.map +0 -6
  281. package/dist/esm/modules/isSelectionValid/index.js +0 -11
  282. package/dist/esm/modules/isSelectionValid/index.js.map +0 -6
  283. package/dist/esm/modules/isWebColor/index.js +0 -5
  284. package/dist/esm/modules/isWebColor/index.js.map +0 -6
  285. package/dist/esm/modules/mergeRefs/__tests__/index-test.js +0 -18
  286. package/dist/esm/modules/mergeRefs/__tests__/index-test.js.map +0 -6
  287. package/dist/esm/modules/mergeRefs/index.js +0 -25
  288. package/dist/esm/modules/mergeRefs/index.js.map +0 -6
  289. package/dist/esm/modules/modality/__tests__/index-test.js +0 -27
  290. package/dist/esm/modules/modality/__tests__/index-test.js.map +0 -6
  291. package/dist/esm/modules/modality/index.js +0 -67
  292. package/dist/esm/modules/modality/index.js.map +0 -6
  293. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.js +0 -9
  294. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.js.map +0 -6
  295. package/dist/esm/modules/multiplyStyleLengthValue/index.js +0 -11
  296. package/dist/esm/modules/multiplyStyleLengthValue/index.js.map +0 -6
  297. package/dist/esm/modules/normalizeColor/index.js +0 -16
  298. package/dist/esm/modules/normalizeColor/index.js.map +0 -6
  299. package/dist/esm/modules/pick/index.js +0 -10
  300. package/dist/esm/modules/pick/index.js.map +0 -6
  301. package/dist/esm/modules/processColor/__tests__/index-test.js +0 -45
  302. package/dist/esm/modules/processColor/__tests__/index-test.js.map +0 -6
  303. package/dist/esm/modules/processColor/index.js +0 -12
  304. package/dist/esm/modules/processColor/index.js.map +0 -6
  305. package/dist/esm/modules/requestIdleCallback/index.js +0 -19
  306. package/dist/esm/modules/requestIdleCallback/index.js.map +0 -6
  307. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.js +0 -9
  308. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.js.map +0 -6
  309. package/dist/esm/modules/setValueForStyles/index.js +0 -14
  310. package/dist/esm/modules/setValueForStyles/index.js.map +0 -6
  311. package/dist/esm/modules/unitlessNumbers/index.js +0 -62
  312. package/dist/esm/modules/unitlessNumbers/index.js.map +0 -6
  313. package/dist/esm/modules/useElementLayout/index.js +0 -21
  314. package/dist/esm/modules/useElementLayout/index.js.map +0 -6
  315. package/dist/esm/modules/useEvent/__tests__/index-test.js +0 -275
  316. package/dist/esm/modules/useEvent/__tests__/index-test.js.map +0 -6
  317. package/dist/esm/modules/useEvent/index.js +0 -23
  318. package/dist/esm/modules/useEvent/index.js.map +0 -6
  319. package/dist/esm/modules/useHover/__tests__/index-test.js +0 -187
  320. package/dist/esm/modules/useHover/__tests__/index-test.js.map +0 -6
  321. package/dist/esm/modules/useHover/index.js +0 -59
  322. package/dist/esm/modules/useHover/index.js.map +0 -6
  323. package/dist/esm/modules/useLayoutEffect/index.js +0 -7
  324. package/dist/esm/modules/useLayoutEffect/index.js.map +0 -6
  325. package/dist/esm/modules/useLocale/index.js +0 -32
  326. package/dist/esm/modules/useLocale/index.js.map +0 -6
  327. package/dist/esm/modules/useLocale/isLocaleRTL.js +0 -75
  328. package/dist/esm/modules/useLocale/isLocaleRTL.js.map +0 -6
  329. package/dist/esm/modules/useMergeRefs/__tests__/index-test.js +0 -53
  330. package/dist/esm/modules/useMergeRefs/__tests__/index-test.js.map +0 -6
  331. package/dist/esm/modules/useMergeRefs/index.js +0 -13
  332. package/dist/esm/modules/useMergeRefs/index.js.map +0 -6
  333. package/dist/esm/modules/usePlatformMethods/index.js +0 -18
  334. package/dist/esm/modules/usePlatformMethods/index.js.map +0 -6
  335. package/dist/esm/modules/useStable/__tests__/index-test.js +0 -53
  336. package/dist/esm/modules/useStable/__tests__/index-test.js.map +0 -6
  337. package/dist/esm/modules/useStable/index.js +0 -10
  338. package/dist/esm/modules/useStable/index.js.map +0 -6
  339. package/dist/esm/styleTypes.js +0 -1
  340. package/dist/esm/styleTypes.js.map +0 -6
  341. package/dist/esm/types.js +0 -1
  342. package/dist/esm/types.js.map +0 -6
@@ -1,51 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var propsToAccessibilityComponent_exports = {};
16
- __export(propsToAccessibilityComponent_exports, {
17
- propsToAccessibilityComponent: () => propsToAccessibilityComponent
18
- });
19
- module.exports = __toCommonJS(propsToAccessibilityComponent_exports);
20
- var import_propsToAriaRole = require("./propsToAriaRole");
21
- const roleComponents = {
22
- article: "article",
23
- banner: "header",
24
- blockquote: "blockquote",
25
- code: "code",
26
- complementary: "aside",
27
- contentinfo: "footer",
28
- deletion: "del",
29
- emphasis: "em",
30
- figure: "figure",
31
- insertion: "ins",
32
- form: "form",
33
- list: "ul",
34
- listitem: "li",
35
- main: "main",
36
- navigation: "nav",
37
- region: "section",
38
- strong: "strong"
39
- }, emptyObject = {}, propsToAccessibilityComponent = (props = emptyObject) => {
40
- if (props.accessibilityRole === "label")
41
- return "label";
42
- const role = (0, import_propsToAriaRole.propsToAriaRole)(props);
43
- if (role) {
44
- if (role === "heading") {
45
- const level = props.accessibilityLevel || props["aria-level"];
46
- return level != null ? `h${level}` : "h1";
47
- }
48
- return roleComponents[role];
49
- }
50
- };
51
- //# sourceMappingURL=propsToAccessibilityComponent.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/modules/AccessibilityUtil/propsToAccessibilityComponent.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,6BAAgC;AAEhC,MAAM,iBAAiB;AAAA,EACrB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,eAAe;AAAA,EACf,aAAa;AAAA,EACb,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AACV,GAEM,cAAc,CAAC,GAER,gCAAgC,CAC3C,QAAgB,gBACE;AAElB,MAAI,MAAM,sBAAsB;AAC9B,WAAO;AAGT,QAAM,WAAO,wCAAgB,KAAK;AAClC,MAAI,MAAM;AACR,QAAI,SAAS,WAAW;AACtB,YAAM,QAAQ,MAAM,sBAAsB,MAAM,YAAY;AAC5D,aAAI,SAAS,OACJ,IAAI,KAAK,KAEX;AAAA,IACT;AACA,WAAO,eAAe,IAAI;AAAA,EAC5B;AACF;",
5
- "names": []
6
- }
@@ -1,42 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var propsToAriaRole_exports = {};
16
- __export(propsToAriaRole_exports, {
17
- propsToAriaRole: () => propsToAriaRole
18
- });
19
- module.exports = __toCommonJS(propsToAriaRole_exports);
20
- const accessibilityRoleToWebRole = {
21
- adjustable: "slider",
22
- button: "button",
23
- header: "heading",
24
- image: "img",
25
- imagebutton: null,
26
- keyboardkey: null,
27
- label: null,
28
- link: "link",
29
- none: "presentation",
30
- search: "search",
31
- summary: "region",
32
- text: null
33
- }, propsToAriaRole = ({
34
- accessibilityRole
35
- }) => {
36
- if (accessibilityRole) {
37
- const inferredRole = accessibilityRoleToWebRole[accessibilityRole];
38
- if (inferredRole !== null)
39
- return inferredRole || accessibilityRole;
40
- }
41
- };
42
- //# sourceMappingURL=propsToAriaRole.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/modules/AccessibilityUtil/propsToAriaRole.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAM,6BAA6B;AAAA,EACjC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AAAA,EACb,aAAa;AAAA,EACb,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACR,GAEa,kBAAkB,CAAC;AAAA,EAC9B;AACF,MAEqB;AACnB,MAAI,mBAAmB;AACrB,UAAM,eAAe,2BAA2B,iBAAiB;AACjE,QAAI,iBAAiB;AAEnB,aAAO,gBAAgB;AAAA,EAE3B;AACF;",
5
- "names": []
6
- }
@@ -1,28 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var AssetRegistry_exports = {};
16
- __export(AssetRegistry_exports, {
17
- getAssetByID: () => getAssetByID,
18
- registerAsset: () => registerAsset
19
- });
20
- module.exports = __toCommonJS(AssetRegistry_exports);
21
- const assets = [];
22
- function registerAsset(asset) {
23
- return assets.push(asset);
24
- }
25
- function getAssetByID(assetId) {
26
- return assets[assetId - 1];
27
- }
28
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/modules/AssetRegistry/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,MAAM,SAA+B,CAAC;AAE/B,SAAS,cAAc,OAA8B;AAG1D,SAAO,OAAO,KAAK,KAAK;AAC1B;AAEO,SAAS,aAAa,SAAgC;AAC3D,SAAO,OAAO,UAAU,CAAC;AAC3B;",
5
- "names": []
6
- }
@@ -1,101 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var ImageLoader_exports = {};
16
- __export(ImageLoader_exports, {
17
- ImageLoader: () => ImageLoader,
18
- ImageUriCache: () => ImageUriCache
19
- });
20
- module.exports = __toCommonJS(ImageLoader_exports);
21
- const dataUriPattern = /^data:/;
22
- class ImageUriCache {
23
- static _maximumEntries = 256;
24
- static _entries = {};
25
- static has(uri) {
26
- const entries = ImageUriCache._entries;
27
- return dataUriPattern.test(uri) || !!entries[uri];
28
- }
29
- static add(uri) {
30
- const entries = ImageUriCache._entries, lastUsedTimestamp = Date.now();
31
- entries[uri] ? (entries[uri].lastUsedTimestamp = lastUsedTimestamp, entries[uri].refCount += 1) : entries[uri] = {
32
- lastUsedTimestamp,
33
- refCount: 1
34
- };
35
- }
36
- static remove(uri) {
37
- const entries = ImageUriCache._entries;
38
- entries[uri] && (entries[uri].refCount -= 1), ImageUriCache._cleanUpIfNeeded();
39
- }
40
- static _cleanUpIfNeeded() {
41
- const entries = ImageUriCache._entries, imageUris = Object.keys(entries);
42
- if (imageUris.length + 1 > ImageUriCache._maximumEntries) {
43
- let leastRecentlyUsedKey, leastRecentlyUsedEntry;
44
- imageUris.forEach((uri) => {
45
- const entry = entries[uri];
46
- (!leastRecentlyUsedEntry || entry.lastUsedTimestamp < leastRecentlyUsedEntry.lastUsedTimestamp) && entry.refCount === 0 && (leastRecentlyUsedKey = uri, leastRecentlyUsedEntry = entry);
47
- }), leastRecentlyUsedKey && delete entries[leastRecentlyUsedKey];
48
- }
49
- }
50
- }
51
- let id = 0;
52
- const requests = {}, ImageLoader = {
53
- abort(requestId) {
54
- let image = requests[`${requestId}`];
55
- image && (image.onerror = null, image.onload = null, image = null, delete requests[`${requestId}`]);
56
- },
57
- getSize(uri, success, failure) {
58
- let complete = !1;
59
- const interval = setInterval(callback, 16), requestId = ImageLoader.load(uri, callback, errorCallback);
60
- function callback() {
61
- const image = requests[`${requestId}`];
62
- if (image) {
63
- const { naturalHeight, naturalWidth } = image;
64
- naturalHeight && naturalWidth && (success(naturalWidth, naturalHeight), complete = !0);
65
- }
66
- complete && (ImageLoader.abort(requestId), clearInterval(interval));
67
- }
68
- function errorCallback() {
69
- typeof failure == "function" && failure(), ImageLoader.abort(requestId), clearInterval(interval);
70
- }
71
- },
72
- has(uri) {
73
- return ImageUriCache.has(uri);
74
- },
75
- load(uri, onLoad, onError) {
76
- id += 1;
77
- const image = new window.Image();
78
- return image.onerror = onError, image.onload = (e) => {
79
- const onDecode = () => onLoad({ nativeEvent: e });
80
- typeof image.decode == "function" ? image.decode().then(onDecode, onDecode) : setTimeout(onDecode, 0);
81
- }, image.src = uri, requests[`${id}`] = image, id;
82
- },
83
- prefetch(uri) {
84
- return new Promise((resolve, reject) => {
85
- ImageLoader.load(
86
- uri,
87
- () => {
88
- ImageUriCache.add(uri), ImageUriCache.remove(uri), resolve();
89
- },
90
- reject
91
- );
92
- });
93
- },
94
- queryCache(uris) {
95
- const result = {};
96
- return uris.forEach((u) => {
97
- ImageUriCache.has(u) && (result[u] = "disk/memory");
98
- }), Promise.resolve(result);
99
- }
100
- };
101
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/modules/ImageLoader/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAM,iBAAiB;AAEhB,MAAM,cAAc;AAAA,EACzB,OAAO,kBAAkB;AAAA,EACzB,OAAO,WAAW,CAAC;AAAA,EAEnB,OAAO,IAAI,KAAsB;AAC/B,UAAM,UAAU,cAAc;AAE9B,WADkB,eAAe,KAAK,GAAG,KACrB,EAAQ,QAAQ,GAAG;AAAA,EACzC;AAAA,EAEA,OAAO,IAAI,KAAa;AACtB,UAAM,UAAU,cAAc,UACxB,oBAAoB,KAAK,IAAI;AACnC,IAAI,QAAQ,GAAG,KACb,QAAQ,GAAG,EAAE,oBAAoB,mBACjC,QAAQ,GAAG,EAAE,YAAY,KAEzB,QAAQ,GAAG,IAAI;AAAA,MACb;AAAA,MACA,UAAU;AAAA,IACZ;AAAA,EAEJ;AAAA,EAEA,OAAO,OAAO,KAAa;AACzB,UAAM,UAAU,cAAc;AAC9B,IAAI,QAAQ,GAAG,MACb,QAAQ,GAAG,EAAE,YAAY,IAG3B,cAAc,iBAAiB;AAAA,EACjC;AAAA,EAEA,OAAO,mBAAmB;AACxB,UAAM,UAAU,cAAc,UACxB,YAAY,OAAO,KAAK,OAAO;AAErC,QAAI,UAAU,SAAS,IAAI,cAAc,iBAAiB;AACxD,UAAI,sBACA;AAEJ,gBAAU,QAAQ,CAAC,QAAQ;AACzB,cAAM,QAAQ,QAAQ,GAAG;AACzB,SACG,CAAC,0BACA,MAAM,oBAAoB,uBAAuB,sBACnD,MAAM,aAAa,MAEn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,SAAS,GAAG,EAAE,EAAE,IAAI,OACb;AAAA,EACT;AAAA,EACA,SAAS,KAA4B;AACnC,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,kBAAY;AAAA,QACV;AAAA,QACA,MAAM;AAGJ,wBAAc,IAAI,GAAG,GACrB,cAAc,OAAO,GAAG,GACxB,QAAQ;AAAA,QACV;AAAA,QACA;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EACA,WAAW,MAAgE;AACzE,UAAM,SAAS,CAAC;AAChB,gBAAK,QAAQ,CAAC,MAAM;AAClB,MAAI,cAAc,IAAI,CAAC,MACrB,OAAO,CAAC,IAAI;AAAA,IAEhB,CAAC,GACM,QAAQ,QAAQ,MAAM;AAAA,EAC/B;AACF;",
5
- "names": []
6
- }
@@ -1,163 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var InteractionManager_exports = {};
16
- __export(InteractionManager_exports, {
17
- InteractionManager: () => InteractionManager
18
- });
19
- module.exports = __toCommonJS(InteractionManager_exports);
20
- var import_invariant = require("./invariant"), import_requestIdleCallback = require("./requestIdleCallback/index");
21
- class EventEmitter {
22
- _registry = {};
23
- addListener(eventType, listener, context) {
24
- const registrations = this._allocate(eventType), registration = {
25
- context,
26
- listener,
27
- remove: () => {
28
- registrations.delete(registration);
29
- }
30
- };
31
- return registrations.add(registration), registration;
32
- }
33
- emit(eventType, ...args) {
34
- const registrations = this._registry[eventType];
35
- if (registrations != null)
36
- for (const registration of Array.from(registrations))
37
- registration.listener.apply(registration.context, args);
38
- }
39
- _allocate(eventType) {
40
- let registrations = this._registry[eventType];
41
- return registrations == null && (registrations = /* @__PURE__ */ new Set(), this._registry[eventType] = registrations), registrations;
42
- }
43
- }
44
- class TaskQueue {
45
- _queueStack;
46
- _onMoreTasks;
47
- constructor({ onMoreTasks }) {
48
- this._onMoreTasks = onMoreTasks, this._queueStack = [{ tasks: [], popable: !0 }];
49
- }
50
- enqueueTasks(tasks) {
51
- tasks.forEach((task) => this._enqueue(task));
52
- }
53
- cancelTasks(tasksToCancel) {
54
- this._queueStack = this._queueStack.map((queue) => ({
55
- ...queue,
56
- tasks: queue.tasks.filter((task) => !tasksToCancel.includes(task))
57
- })).filter((queue, idx) => queue.tasks.length > 0 || idx === 0);
58
- }
59
- hasTasksToProcess() {
60
- return this._getCurrentQueue().length > 0;
61
- }
62
- processNext() {
63
- const queue = this._getCurrentQueue();
64
- if (queue.length) {
65
- const task = queue.shift();
66
- try {
67
- typeof task == "object" && task && "gen" in task ? this._genPromise(task) : typeof task == "object" && task && "run" in task ? task.run() : ((0, import_invariant.invariant)(
68
- typeof task == "function",
69
- `Expected Function, SimpleTask, or PromiseTask, but got:
70
- ` + JSON.stringify(task, null, 2)
71
- ), task());
72
- } catch (e) {
73
- if (e instanceof Error) {
74
- const taskName = task && typeof task == "object" && "name" in task ? task.name : "";
75
- e.message = "TaskQueue: Error with task " + taskName + ": " + e.message;
76
- }
77
- throw e;
78
- }
79
- }
80
- }
81
- _enqueue(task) {
82
- this._getCurrentQueue().push(task);
83
- }
84
- _getCurrentQueue() {
85
- const stackIdx = this._queueStack.length - 1, queue = this._queueStack[stackIdx];
86
- return queue.popable && queue.tasks.length === 0 && stackIdx > 0 ? (this._queueStack.pop(), this._getCurrentQueue()) : queue.tasks;
87
- }
88
- _genPromise(task) {
89
- const stackIdx = this._queueStack.push({ tasks: [], popable: !1 }) - 1, stackItem = this._queueStack[stackIdx];
90
- task.gen().then(() => {
91
- stackItem.popable = !0, this.hasTasksToProcess() && this._onMoreTasks();
92
- }).catch((ex) => {
93
- setTimeout(() => {
94
- throw ex instanceof Error && (ex.message = `TaskQueue: Error resolving Promise in task ${task.name}: ${ex.message}`), ex;
95
- }, 0);
96
- });
97
- }
98
- }
99
- const _emitter = new EventEmitter(), InteractionManager = {
100
- Events: {
101
- interactionStart: "interactionStart",
102
- interactionComplete: "interactionComplete"
103
- },
104
- /**
105
- * Schedule a function to run after all interactions have completed.
106
- */
107
- runAfterInteractions(task) {
108
- const tasks = [], promise = new Promise((resolve) => {
109
- _scheduleUpdate(), task && tasks.push(task), tasks.push({
110
- run: resolve,
111
- name: "resolve " + (task && typeof task == "object" && "name" in task && task.name || "?")
112
- }), _taskQueue.enqueueTasks(tasks);
113
- });
114
- return {
115
- then: promise.then.bind(promise),
116
- done: promise.then.bind(promise),
117
- cancel: () => {
118
- _taskQueue.cancelTasks(tasks);
119
- }
120
- };
121
- },
122
- /**
123
- * Notify manager that an interaction has started.
124
- */
125
- createInteractionHandle() {
126
- _scheduleUpdate();
127
- const handle = ++_inc;
128
- return _addInteractionSet.add(handle), handle;
129
- },
130
- /**
131
- * Notify manager that an interaction has completed.
132
- */
133
- clearInteractionHandle(handle) {
134
- (0, import_invariant.invariant)(!!handle, "Must provide a handle to clear."), _scheduleUpdate(), _addInteractionSet.delete(handle), _deleteInteractionSet.add(handle);
135
- },
136
- addListener: _emitter.addListener.bind(_emitter),
137
- /**
138
- * Set deadline for task processing
139
- */
140
- setDeadline(deadline) {
141
- _deadline = deadline;
142
- }
143
- }, _interactionSet = /* @__PURE__ */ new Set(), _addInteractionSet = /* @__PURE__ */ new Set(), _deleteInteractionSet = /* @__PURE__ */ new Set(), _taskQueue = new TaskQueue({ onMoreTasks: _scheduleUpdate });
144
- let _nextUpdateHandle = null, _inc = 0, _deadline = -1;
145
- function _scheduleUpdate() {
146
- _nextUpdateHandle || (_deadline > 0 ? _nextUpdateHandle = setTimeout(_processUpdate) : _nextUpdateHandle = (0, import_requestIdleCallback.requestIdleCallback)(_processUpdate));
147
- }
148
- function _processUpdate() {
149
- _nextUpdateHandle = null;
150
- const interactionCount = _interactionSet.size;
151
- _addInteractionSet.forEach((handle) => _interactionSet.add(handle)), _deleteInteractionSet.forEach((handle) => _interactionSet.delete(handle));
152
- const nextInteractionCount = _interactionSet.size;
153
- if (interactionCount !== 0 && nextInteractionCount === 0 ? _emitter.emit("interactionComplete") : interactionCount === 0 && nextInteractionCount !== 0 && _emitter.emit("interactionStart"), nextInteractionCount === 0) {
154
- const begin = Date.now();
155
- for (; _taskQueue.hasTasksToProcess(); )
156
- if (_taskQueue.processNext(), _deadline > 0 && Date.now() - begin >= _deadline) {
157
- _scheduleUpdate();
158
- break;
159
- }
160
- }
161
- _addInteractionSet.clear(), _deleteInteractionSet.clear();
162
- }
163
- //# sourceMappingURL=InteractionManager.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/modules/InteractionManager.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,uBAA0B,wBAC1B,6BAAoC;AAWpC,MAAM,aAAoD;AAAA,EAChD,YAMJ,CAAC;AAAA,EAEL,YACE,WACA,UACA,SACmB;AACnB,UAAM,gBAAgB,KAAK,UAAU,SAAS,GACxC,eAAe;AAAA,MACnB;AAAA,MACA;AAAA,MACA,QAAQ,MAAM;AACZ,sBAAc,OAAO,YAAY;AAAA,MACnC;AAAA,IACF;AACA,yBAAc,IAAI,YAAY,GACvB;AAAA,EACT;AAAA,EAEA,KAAgC,cAAiB,MAA0B;AACzE,UAAM,gBAAgB,KAAK,UAAU,SAAS;AAC9C,QAAI,iBAAiB;AACnB,iBAAW,gBAAgB,MAAM,KAAK,aAAa;AACjD,qBAAa,SAAS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qBAAqB,KAAK,yBAAyB,KAC5D,SAAS,KAAK,kBAAkB,GAG9B,yBAAyB,GAAG;AAG9B,UAAM,QAAQ,KAAK,IAAI;AACvB,WAAO,WAAW,kBAAkB;AAElC,UADA,WAAW,YAAY,GACnB,YAAY,KAAK,KAAK,IAAI,IAAI,SAAS,WAAW;AACpD,wBAAgB;AAChB;AAAA,MACF;AAAA,EAEJ;AACA,qBAAmB,MAAM,GACzB,sBAAsB,MAAM;AAC9B;",
5
- "names": []
6
- }
@@ -1,46 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from == "object" || typeof from == "function")
8
- for (let key of __getOwnPropNames(from))
9
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- return to;
11
- };
12
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
13
- // If the importer is in node compatibility mode or this is not an ESM
14
- // file that has been converted to a CommonJS file using a Babel-
15
- // compatible transform (i.e. "__esModule" has not been set), then set
16
- // "default" to the CommonJS "module.exports" for node compatibility.
17
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
18
- mod
19
- ));
20
- var import__ = __toESM(require(".."), 1);
21
- describe("apis/Platform", () => {
22
- describe("select", () => {
23
- test('supports "default"', () => {
24
- expect(import__.default.select({ default: "default" })).toEqual("default");
25
- }), test('chooses "web"', () => {
26
- expect(
27
- import__.default.select({
28
- android: "android",
29
- ios: "ios",
30
- web: "web",
31
- default: "default"
32
- })
33
- ).toEqual("web");
34
- });
35
- }), describe("isTesting", () => {
36
- const NODE_ENV_BACKUP = process.env.NODE_ENV;
37
- afterEach(() => {
38
- process.env.NODE_ENV = NODE_ENV_BACKUP;
39
- }), test('true when NODE_ENV is "test"', () => {
40
- process.env.NODE_ENV = "test", expect(import__.default.isTesting).toEqual(!0);
41
- }), test('false when NODE_ENV is not "test"', () => {
42
- process.env.NODE_ENV = "development", expect(import__.default.isTesting).toEqual(!1);
43
- });
44
- });
45
- });
46
- //# sourceMappingURL=index-test.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/modules/Platform/__tests__/index-test.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AAOA,eAAqB;AAErB,SAAS,iBAAiB,MAAM;AAC9B,WAAS,UAAU,MAAM;AACvB,SAAK,sBAAsB,MAAM;AAC/B,aAAO,SAAAA,QAAS,OAAO,EAAE,SAAS,UAAU,CAAC,CAAC,EAAE,QAAQ,SAAS;AAAA,IACnE,CAAC,GAED,KAAK,iBAAiB,MAAM;AAC1B;AAAA,QACE,SAAAA,QAAS,OAAO;AAAA,UACd,SAAS;AAAA,UACT,KAAK;AAAA,UACL,KAAK;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,MACH,EAAE,QAAQ,KAAK;AAAA,IACjB,CAAC;AAAA,EACH,CAAC,GAED,SAAS,aAAa,MAAM;AAC1B,UAAM,kBAAkB,QAAQ,IAAI;AAEpC,cAAU,MAAM;AACd,cAAQ,IAAI,WAAW;AAAA,IACzB,CAAC,GAED,KAAK,gCAAgC,MAAM;AACzC,cAAQ,IAAI,WAAW,QACvB,OAAO,SAAAA,QAAS,SAAS,EAAE,QAAQ,EAAI;AAAA,IACzC,CAAC,GAED,KAAK,qCAAqC,MAAM;AAC9C,cAAQ,IAAI,WAAW,eACvB,OAAO,SAAAA,QAAS,SAAS,EAAE,QAAQ,EAAK;AAAA,IAC1C,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
5
- "names": ["Platform"]
6
- }
@@ -1,25 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var Platform_exports = {};
16
- __export(Platform_exports, {
17
- Platform: () => Platform
18
- });
19
- module.exports = __toCommonJS(Platform_exports);
20
- const Platform = {
21
- OS: "web",
22
- select: (obj) => "web" in obj ? obj.web : obj.default,
23
- isTesting: process.env.NODE_ENV === "test"
24
- };
25
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/modules/Platform/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,WAAW;AAAA,EACtB,IAAI;AAAA,EACJ,QAAQ,CAAC,QAAmB,SAAS,MAAM,IAAI,MAAM,IAAI;AAAA,EACzD,WAAW,QAAQ,IAAI,aAAa;AACtC;",
5
- "names": []
6
- }
@@ -1,50 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var TextInputState_exports = {};
16
- __export(TextInputState_exports, {
17
- TextInputState: () => TextInputState
18
- });
19
- module.exports = __toCommonJS(TextInputState_exports);
20
- var import_UIManager = require("../UIManager");
21
- const TextInputState = {
22
- /**
23
- * Internal state
24
- */
25
- _currentlyFocusedNode: null,
26
- /**
27
- * Returns the ID of the currently focused text field, if one exists
28
- * If no text field is focused it returns null
29
- */
30
- currentlyFocusedField() {
31
- return document.activeElement !== this._currentlyFocusedNode && (this._currentlyFocusedNode = null), this._currentlyFocusedNode;
32
- },
33
- /**
34
- * @param {Object} TextInputID id of the text field to focus
35
- * Focuses the specified text field
36
- * noop if the text field was already focused
37
- */
38
- focusTextInput(textFieldNode) {
39
- textFieldNode !== null && (this._currentlyFocusedNode = textFieldNode, document.activeElement !== textFieldNode && import_UIManager.UIManager.focus(textFieldNode));
40
- },
41
- /**
42
- * @param {Object} textFieldNode id of the text field to focus
43
- * Unfocuses the specified text field
44
- * noop if it wasn't focused
45
- */
46
- blurTextInput(textFieldNode) {
47
- textFieldNode !== null && (this._currentlyFocusedNode = null, document.activeElement === textFieldNode && import_UIManager.UIManager.blur(textFieldNode));
48
- }
49
- };
50
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/modules/TextInputState/index.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,uBAA0B;AAOnB,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAI5B,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvB,wBAAuC;AACrC,WAAI,SAAS,kBAAkB,KAAK,0BAClC,KAAK,wBAAwB,OAExB,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,eAAe,eAA8B;AAC3C,IAAI,kBAAkB,SACpB,KAAK,wBAAwB,eACzB,SAAS,kBAAkB,iBAC7B,2BAAU,MAAM,aAAa;AAAA,EAGnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,cAAc,eAA8B;AAC1C,IAAI,kBAAkB,SACpB,KAAK,wBAAwB,MACzB,SAAS,kBAAkB,iBAC7B,2BAAU,KAAK,aAAa;AAAA,EAGlC;AACF;",
5
- "names": []
6
- }
@@ -1,66 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from == "object" || typeof from == "function")
8
- for (let key of __getOwnPropNames(from))
9
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- return to;
11
- };
12
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
13
- // If the importer is in node compatibility mode or this is not an ESM
14
- // file that has been converted to a CommonJS file using a Babel-
15
- // compatible transform (i.e. "__esModule" has not been set), then set
16
- // "default" to the CommonJS "module.exports" for node compatibility.
17
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
18
- mod
19
- ));
20
- var import__ = __toESM(require(".."), 1);
21
- const createStyledNode = (name = "div", style = {}) => {
22
- const root = document.createElement(name);
23
- return Object.keys(style).forEach((prop) => {
24
- root.style[prop] = style[prop];
25
- }), root;
26
- }, componentStub = {
27
- _reactInternalInstance: {
28
- _currentElement: { _owner: {} },
29
- _debugID: 1
30
- }
31
- };
32
- describe("apis/UIManager", () => {
33
- describe("focus", () => {
34
- test('sets tabIndex="-1" on elements not programmatically focusable by default', () => {
35
- const node = createStyledNode();
36
- import__.default.focus(node), expect(node.getAttribute("tabIndex")).toEqual("-1");
37
- }), test(`doesn't set tabIndex="-1" on elements with an existing tabIndex`, () => {
38
- const node = createStyledNode();
39
- node.tabIndex = 0, import__.default.focus(node), expect(node.getAttribute("tabIndex")).toEqual("0");
40
- }), test(`doesn't set tabIndex="-1" on elements focusable by default`, () => {
41
- ["a", "input", "select", "textarea"].forEach((name) => {
42
- const node = createStyledNode(name);
43
- import__.default.focus(node), expect(node.getAttribute("tabIndex")).toBeNull();
44
- });
45
- });
46
- }), describe("updateView", () => {
47
- test("supports className alias for class", () => {
48
- const node = createStyledNode(), props = { className: "extra" };
49
- import__.default.updateView(node, props, componentStub), expect(node.getAttribute("class")).toEqual("extra");
50
- }), test("adds correct DOM styles to existing style", () => {
51
- const node = createStyledNode("div", { color: "red" }), props = { style: { marginTop: 0, marginBottom: 0, opacity: 0 } };
52
- import__.default.updateView(node, props, componentStub), expect(node.getAttribute("style")).toEqual(
53
- "color: red; margin-top: 0px; margin-bottom: 0px; opacity: 0;"
54
- );
55
- }), test("replaces input and textarea text", () => {
56
- const node = createStyledNode("textarea");
57
- node.value = "initial";
58
- const textProp = { text: "expected-text" }, valueProp = { value: "expected-value" };
59
- import__.default.updateView(node, textProp), expect(node.value).toEqual("expected-text"), import__.default.updateView(node, valueProp), expect(node.value).toEqual("expected-value");
60
- }), test("sets other attribute values", () => {
61
- const node = createStyledNode(), props = { "aria-level": "4", "data-of-type": "string" };
62
- import__.default.updateView(node, props), expect(node.getAttribute("aria-level")).toEqual("4"), expect(node.getAttribute("data-of-type")).toEqual("string");
63
- });
64
- });
65
- });
66
- //# sourceMappingURL=index-test.js.map