@tamagui/react-native-web-internals 2.0.0-rc.26 → 2.0.0-rc.26-1773452370596

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 (301) hide show
  1. package/package.json +8 -8
  2. package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js +0 -192
  3. package/dist/cjs/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js.map +0 -6
  4. package/dist/cjs/StyleSheet/__tests__/compiler-test.js +0 -378
  5. package/dist/cjs/StyleSheet/__tests__/compiler-test.js.map +0 -6
  6. package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js +0 -117
  7. package/dist/cjs/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js.map +0 -6
  8. package/dist/cjs/StyleSheet/__tests__/index-test.js +0 -347
  9. package/dist/cjs/StyleSheet/__tests__/index-test.js.map +0 -6
  10. package/dist/cjs/StyleSheet/__tests__/preprocess-test.js +0 -77
  11. package/dist/cjs/StyleSheet/__tests__/preprocess-test.js.map +0 -6
  12. package/dist/cjs/StyleSheet/__tests__/validate-test.js +0 -18
  13. package/dist/cjs/StyleSheet/__tests__/validate-test.js.map +0 -6
  14. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.js +0 -112
  15. package/dist/cjs/StyleSheet/compiler/createReactDOMStyle.js.map +0 -6
  16. package/dist/cjs/StyleSheet/compiler/hash.js +0 -21
  17. package/dist/cjs/StyleSheet/compiler/hash.js.map +0 -6
  18. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.js +0 -30
  19. package/dist/cjs/StyleSheet/compiler/hyphenateStyleName.js.map +0 -6
  20. package/dist/cjs/StyleSheet/compiler/index.js +0 -245
  21. package/dist/cjs/StyleSheet/compiler/index.js.map +0 -6
  22. package/dist/cjs/StyleSheet/compiler/normalizeColor.js +0 -33
  23. package/dist/cjs/StyleSheet/compiler/normalizeColor.js.map +0 -6
  24. package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.js +0 -37
  25. package/dist/cjs/StyleSheet/compiler/normalizeValueWithProperty.js.map +0 -6
  26. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.js +0 -26
  27. package/dist/cjs/StyleSheet/compiler/resolveShadowValue.js.map +0 -6
  28. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.js +0 -36
  29. package/dist/cjs/StyleSheet/dom/createCSSStyleSheet.js.map +0 -6
  30. package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.js +0 -94
  31. package/dist/cjs/StyleSheet/dom/createOrderedCSSStyleSheet.js.map +0 -6
  32. package/dist/cjs/StyleSheet/dom/index.js +0 -66
  33. package/dist/cjs/StyleSheet/dom/index.js.map +0 -6
  34. package/dist/cjs/StyleSheet/index.js +0 -52
  35. package/dist/cjs/StyleSheet/index.js.map +0 -6
  36. package/dist/cjs/StyleSheet/preprocess.js +0 -59
  37. package/dist/cjs/StyleSheet/preprocess.js.map +0 -6
  38. package/dist/cjs/StyleSheet/validate.js +0 -66
  39. package/dist/cjs/StyleSheet/validate.js.map +0 -6
  40. package/dist/cjs/TextAncestorContext.js +0 -22
  41. package/dist/cjs/TextAncestorContext.js.map +0 -6
  42. package/dist/cjs/colorProps.js +0 -32
  43. package/dist/cjs/colorProps.js.map +0 -6
  44. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js +0 -46
  45. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js.map +0 -6
  46. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js +0 -30
  47. package/dist/cjs/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js.map +0 -6
  48. package/dist/cjs/modules/AccessibilityUtil/index.js +0 -26
  49. package/dist/cjs/modules/AccessibilityUtil/index.js.map +0 -6
  50. package/dist/cjs/modules/AccessibilityUtil/isDisabled.js +0 -21
  51. package/dist/cjs/modules/AccessibilityUtil/isDisabled.js.map +0 -6
  52. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.js +0 -51
  53. package/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.js.map +0 -6
  54. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.js +0 -42
  55. package/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.js.map +0 -6
  56. package/dist/cjs/modules/AssetRegistry/index.js +0 -28
  57. package/dist/cjs/modules/AssetRegistry/index.js.map +0 -6
  58. package/dist/cjs/modules/ImageLoader/index.js +0 -101
  59. package/dist/cjs/modules/ImageLoader/index.js.map +0 -6
  60. package/dist/cjs/modules/InteractionManager.js +0 -163
  61. package/dist/cjs/modules/InteractionManager.js.map +0 -6
  62. package/dist/cjs/modules/Platform/__tests__/index-test.js +0 -46
  63. package/dist/cjs/modules/Platform/__tests__/index-test.js.map +0 -6
  64. package/dist/cjs/modules/Platform/index.js +0 -25
  65. package/dist/cjs/modules/Platform/index.js.map +0 -6
  66. package/dist/cjs/modules/TextInputState/index.js +0 -50
  67. package/dist/cjs/modules/TextInputState/index.js.map +0 -6
  68. package/dist/cjs/modules/UIManager/__tests__/index-test.js +0 -66
  69. package/dist/cjs/modules/UIManager/__tests__/index-test.js.map +0 -6
  70. package/dist/cjs/modules/UIManager/index.js +0 -57
  71. package/dist/cjs/modules/UIManager/index.js.map +0 -6
  72. package/dist/cjs/modules/canUseDOM.js +0 -21
  73. package/dist/cjs/modules/canUseDOM.js.map +0 -6
  74. package/dist/cjs/modules/createDOMProps/__tests__/index-test.js +0 -106
  75. package/dist/cjs/modules/createDOMProps/__tests__/index-test.js.map +0 -6
  76. package/dist/cjs/modules/createDOMProps/index.js +0 -170
  77. package/dist/cjs/modules/createDOMProps/index.js.map +0 -6
  78. package/dist/cjs/modules/createEventHandle/__tests__/index-test.js +0 -242
  79. package/dist/cjs/modules/createEventHandle/__tests__/index-test.js.map +0 -6
  80. package/dist/cjs/modules/createEventHandle/index.js +0 -66
  81. package/dist/cjs/modules/createEventHandle/index.js.map +0 -6
  82. package/dist/cjs/modules/dismissKeyboard/index.js +0 -24
  83. package/dist/cjs/modules/dismissKeyboard/index.js.map +0 -6
  84. package/dist/cjs/modules/forwardedProps/index.js +0 -146
  85. package/dist/cjs/modules/forwardedProps/index.js.map +0 -6
  86. package/dist/cjs/modules/getBoundingClientRect/index.js +0 -24
  87. package/dist/cjs/modules/getBoundingClientRect/index.js.map +0 -6
  88. package/dist/cjs/modules/invariant.js +0 -35
  89. package/dist/cjs/modules/invariant.js.map +0 -6
  90. package/dist/cjs/modules/isSelectionValid/index.js +0 -27
  91. package/dist/cjs/modules/isSelectionValid/index.js.map +0 -6
  92. package/dist/cjs/modules/isWebColor/index.js +0 -21
  93. package/dist/cjs/modules/isWebColor/index.js.map +0 -6
  94. package/dist/cjs/modules/mergeRefs/__tests__/index-test.js +0 -34
  95. package/dist/cjs/modules/mergeRefs/__tests__/index-test.js.map +0 -6
  96. package/dist/cjs/modules/mergeRefs/index.js +0 -41
  97. package/dist/cjs/modules/mergeRefs/index.js.map +0 -6
  98. package/dist/cjs/modules/modality/__tests__/index-test.js +0 -20
  99. package/dist/cjs/modules/modality/__tests__/index-test.js.map +0 -6
  100. package/dist/cjs/modules/modality/index.js +0 -82
  101. package/dist/cjs/modules/modality/index.js.map +0 -6
  102. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.js +0 -28
  103. package/dist/cjs/modules/multiplyStyleLengthValue/__tests__/index-test.js.map +0 -6
  104. package/dist/cjs/modules/multiplyStyleLengthValue/index.js +0 -27
  105. package/dist/cjs/modules/multiplyStyleLengthValue/index.js.map +0 -6
  106. package/dist/cjs/modules/normalizeColor/index.js +0 -31
  107. package/dist/cjs/modules/normalizeColor/index.js.map +0 -6
  108. package/dist/cjs/modules/pick/index.js +0 -26
  109. package/dist/cjs/modules/pick/index.js.map +0 -6
  110. package/dist/cjs/modules/processColor/__tests__/index-test.js +0 -64
  111. package/dist/cjs/modules/processColor/__tests__/index-test.js.map +0 -6
  112. package/dist/cjs/modules/processColor/index.js +0 -36
  113. package/dist/cjs/modules/processColor/index.js.map +0 -6
  114. package/dist/cjs/modules/requestIdleCallback/index.js +0 -35
  115. package/dist/cjs/modules/requestIdleCallback/index.js.map +0 -6
  116. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.js +0 -29
  117. package/dist/cjs/modules/setValueForStyles/dangerousStyleValue.js.map +0 -6
  118. package/dist/cjs/modules/setValueForStyles/index.js +0 -30
  119. package/dist/cjs/modules/setValueForStyles/index.js.map +0 -6
  120. package/dist/cjs/modules/unitlessNumbers/index.js +0 -78
  121. package/dist/cjs/modules/unitlessNumbers/index.js.map +0 -6
  122. package/dist/cjs/modules/useElementLayout/index.js +0 -33
  123. package/dist/cjs/modules/useElementLayout/index.js.map +0 -6
  124. package/dist/cjs/modules/useEvent/__tests__/index-test.js +0 -289
  125. package/dist/cjs/modules/useEvent/__tests__/index-test.js.map +0 -6
  126. package/dist/cjs/modules/useEvent/index.js +0 -37
  127. package/dist/cjs/modules/useEvent/index.js.map +0 -6
  128. package/dist/cjs/modules/useHover/__tests__/index-test.js +0 -195
  129. package/dist/cjs/modules/useHover/__tests__/index-test.js.map +0 -6
  130. package/dist/cjs/modules/useHover/index.js +0 -73
  131. package/dist/cjs/modules/useHover/index.js.map +0 -6
  132. package/dist/cjs/modules/useLayoutEffect/index.js +0 -30
  133. package/dist/cjs/modules/useLayoutEffect/index.js.map +0 -6
  134. package/dist/cjs/modules/useLocale/index.js +0 -54
  135. package/dist/cjs/modules/useLocale/index.js.map +0 -6
  136. package/dist/cjs/modules/useLocale/isLocaleRTL.js +0 -91
  137. package/dist/cjs/modules/useLocale/isLocaleRTL.js.map +0 -6
  138. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.js +0 -68
  139. package/dist/cjs/modules/useMergeRefs/__tests__/index-test.js.map +0 -6
  140. package/dist/cjs/modules/useMergeRefs/index.js +0 -36
  141. package/dist/cjs/modules/useMergeRefs/index.js.map +0 -6
  142. package/dist/cjs/modules/usePlatformMethods/index.js +0 -29
  143. package/dist/cjs/modules/usePlatformMethods/index.js.map +0 -6
  144. package/dist/cjs/modules/useStable/__tests__/index-test.js +0 -69
  145. package/dist/cjs/modules/useStable/__tests__/index-test.js.map +0 -6
  146. package/dist/cjs/modules/useStable/index.js +0 -34
  147. package/dist/cjs/modules/useStable/index.js.map +0 -6
  148. package/dist/cjs/styleTypes.js +0 -14
  149. package/dist/cjs/styleTypes.js.map +0 -6
  150. package/dist/cjs/types.js +0 -14
  151. package/dist/cjs/types.js.map +0 -6
  152. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js +0 -173
  153. package/dist/esm/StyleSheet/__tests__/compiler-createReactDOMStyle-test.js.map +0 -6
  154. package/dist/esm/StyleSheet/__tests__/compiler-test.js +0 -378
  155. package/dist/esm/StyleSheet/__tests__/compiler-test.js.map +0 -6
  156. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js +0 -98
  157. package/dist/esm/StyleSheet/__tests__/dom-createOrderedCSSStyleSheet-test.js.map +0 -6
  158. package/dist/esm/StyleSheet/__tests__/index-test.js +0 -328
  159. package/dist/esm/StyleSheet/__tests__/index-test.js.map +0 -6
  160. package/dist/esm/StyleSheet/__tests__/preprocess-test.js +0 -77
  161. package/dist/esm/StyleSheet/__tests__/preprocess-test.js.map +0 -6
  162. package/dist/esm/StyleSheet/__tests__/validate-test.js +0 -18
  163. package/dist/esm/StyleSheet/__tests__/validate-test.js.map +0 -6
  164. package/dist/esm/StyleSheet/compiler/createReactDOMStyle.js +0 -97
  165. package/dist/esm/StyleSheet/compiler/createReactDOMStyle.js.map +0 -6
  166. package/dist/esm/StyleSheet/compiler/hash.js +0 -5
  167. package/dist/esm/StyleSheet/compiler/hash.js.map +0 -6
  168. package/dist/esm/StyleSheet/compiler/hyphenateStyleName.js +0 -14
  169. package/dist/esm/StyleSheet/compiler/hyphenateStyleName.js.map +0 -6
  170. package/dist/esm/StyleSheet/compiler/index.js +0 -232
  171. package/dist/esm/StyleSheet/compiler/index.js.map +0 -6
  172. package/dist/esm/StyleSheet/compiler/normalizeColor.js +0 -18
  173. package/dist/esm/StyleSheet/compiler/normalizeColor.js.map +0 -6
  174. package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.js +0 -22
  175. package/dist/esm/StyleSheet/compiler/normalizeValueWithProperty.js.map +0 -6
  176. package/dist/esm/StyleSheet/compiler/resolveShadowValue.js +0 -11
  177. package/dist/esm/StyleSheet/compiler/resolveShadowValue.js.map +0 -6
  178. package/dist/esm/StyleSheet/dom/createCSSStyleSheet.js +0 -20
  179. package/dist/esm/StyleSheet/dom/createCSSStyleSheet.js.map +0 -6
  180. package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.js +0 -78
  181. package/dist/esm/StyleSheet/dom/createOrderedCSSStyleSheet.js.map +0 -6
  182. package/dist/esm/StyleSheet/dom/index.js +0 -52
  183. package/dist/esm/StyleSheet/dom/index.js.map +0 -6
  184. package/dist/esm/StyleSheet/index.js +0 -36
  185. package/dist/esm/StyleSheet/index.js.map +0 -6
  186. package/dist/esm/StyleSheet/preprocess.js +0 -44
  187. package/dist/esm/StyleSheet/preprocess.js.map +0 -6
  188. package/dist/esm/StyleSheet/validate.js +0 -50
  189. package/dist/esm/StyleSheet/validate.js.map +0 -6
  190. package/dist/esm/TextAncestorContext.js +0 -6
  191. package/dist/esm/TextAncestorContext.js.map +0 -6
  192. package/dist/esm/colorProps.js +0 -16
  193. package/dist/esm/colorProps.js.map +0 -6
  194. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js +0 -27
  195. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAccessibilityComponent-test.js.map +0 -6
  196. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js +0 -11
  197. package/dist/esm/modules/AccessibilityUtil/__tests__/propsToAriaRole-test.js.map +0 -6
  198. package/dist/esm/modules/AccessibilityUtil/index.js +0 -12
  199. package/dist/esm/modules/AccessibilityUtil/index.js.map +0 -6
  200. package/dist/esm/modules/AccessibilityUtil/isDisabled.js +0 -5
  201. package/dist/esm/modules/AccessibilityUtil/isDisabled.js.map +0 -6
  202. package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.js +0 -35
  203. package/dist/esm/modules/AccessibilityUtil/propsToAccessibilityComponent.js.map +0 -6
  204. package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.js +0 -26
  205. package/dist/esm/modules/AccessibilityUtil/propsToAriaRole.js.map +0 -6
  206. package/dist/esm/modules/AssetRegistry/index.js +0 -12
  207. package/dist/esm/modules/AssetRegistry/index.js.map +0 -6
  208. package/dist/esm/modules/ImageLoader/index.js +0 -85
  209. package/dist/esm/modules/ImageLoader/index.js.map +0 -6
  210. package/dist/esm/modules/InteractionManager.js +0 -148
  211. package/dist/esm/modules/InteractionManager.js.map +0 -6
  212. package/dist/esm/modules/Platform/__tests__/index-test.js +0 -27
  213. package/dist/esm/modules/Platform/__tests__/index-test.js.map +0 -6
  214. package/dist/esm/modules/Platform/index.js +0 -9
  215. package/dist/esm/modules/Platform/index.js.map +0 -6
  216. package/dist/esm/modules/TextInputState/index.js +0 -34
  217. package/dist/esm/modules/TextInputState/index.js.map +0 -6
  218. package/dist/esm/modules/UIManager/__tests__/index-test.js +0 -47
  219. package/dist/esm/modules/UIManager/__tests__/index-test.js.map +0 -6
  220. package/dist/esm/modules/UIManager/index.js +0 -41
  221. package/dist/esm/modules/UIManager/index.js.map +0 -6
  222. package/dist/esm/modules/canUseDOM.js +0 -5
  223. package/dist/esm/modules/canUseDOM.js.map +0 -6
  224. package/dist/esm/modules/createDOMProps/__tests__/index-test.js +0 -87
  225. package/dist/esm/modules/createDOMProps/__tests__/index-test.js.map +0 -6
  226. package/dist/esm/modules/createDOMProps/index.js +0 -155
  227. package/dist/esm/modules/createDOMProps/index.js.map +0 -6
  228. package/dist/esm/modules/createEventHandle/__tests__/index-test.js +0 -229
  229. package/dist/esm/modules/createEventHandle/__tests__/index-test.js.map +0 -6
  230. package/dist/esm/modules/createEventHandle/index.js +0 -49
  231. package/dist/esm/modules/createEventHandle/index.js.map +0 -6
  232. package/dist/esm/modules/dismissKeyboard/index.js +0 -8
  233. package/dist/esm/modules/dismissKeyboard/index.js.map +0 -6
  234. package/dist/esm/modules/forwardedProps/index.js +0 -130
  235. package/dist/esm/modules/forwardedProps/index.js.map +0 -6
  236. package/dist/esm/modules/getBoundingClientRect/index.js +0 -8
  237. package/dist/esm/modules/getBoundingClientRect/index.js.map +0 -6
  238. package/dist/esm/modules/invariant.js +0 -19
  239. package/dist/esm/modules/invariant.js.map +0 -6
  240. package/dist/esm/modules/isSelectionValid/index.js +0 -11
  241. package/dist/esm/modules/isSelectionValid/index.js.map +0 -6
  242. package/dist/esm/modules/isWebColor/index.js +0 -5
  243. package/dist/esm/modules/isWebColor/index.js.map +0 -6
  244. package/dist/esm/modules/mergeRefs/__tests__/index-test.js +0 -18
  245. package/dist/esm/modules/mergeRefs/__tests__/index-test.js.map +0 -6
  246. package/dist/esm/modules/mergeRefs/index.js +0 -25
  247. package/dist/esm/modules/mergeRefs/index.js.map +0 -6
  248. package/dist/esm/modules/modality/__tests__/index-test.js +0 -27
  249. package/dist/esm/modules/modality/__tests__/index-test.js.map +0 -6
  250. package/dist/esm/modules/modality/index.js +0 -67
  251. package/dist/esm/modules/modality/index.js.map +0 -6
  252. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.js +0 -9
  253. package/dist/esm/modules/multiplyStyleLengthValue/__tests__/index-test.js.map +0 -6
  254. package/dist/esm/modules/multiplyStyleLengthValue/index.js +0 -11
  255. package/dist/esm/modules/multiplyStyleLengthValue/index.js.map +0 -6
  256. package/dist/esm/modules/normalizeColor/index.js +0 -16
  257. package/dist/esm/modules/normalizeColor/index.js.map +0 -6
  258. package/dist/esm/modules/pick/index.js +0 -10
  259. package/dist/esm/modules/pick/index.js.map +0 -6
  260. package/dist/esm/modules/processColor/__tests__/index-test.js +0 -45
  261. package/dist/esm/modules/processColor/__tests__/index-test.js.map +0 -6
  262. package/dist/esm/modules/processColor/index.js +0 -12
  263. package/dist/esm/modules/processColor/index.js.map +0 -6
  264. package/dist/esm/modules/requestIdleCallback/index.js +0 -19
  265. package/dist/esm/modules/requestIdleCallback/index.js.map +0 -6
  266. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.js +0 -14
  267. package/dist/esm/modules/setValueForStyles/dangerousStyleValue.js.map +0 -6
  268. package/dist/esm/modules/setValueForStyles/index.js +0 -14
  269. package/dist/esm/modules/setValueForStyles/index.js.map +0 -6
  270. package/dist/esm/modules/unitlessNumbers/index.js +0 -62
  271. package/dist/esm/modules/unitlessNumbers/index.js.map +0 -6
  272. package/dist/esm/modules/useElementLayout/index.js +0 -21
  273. package/dist/esm/modules/useElementLayout/index.js.map +0 -6
  274. package/dist/esm/modules/useEvent/__tests__/index-test.js +0 -275
  275. package/dist/esm/modules/useEvent/__tests__/index-test.js.map +0 -6
  276. package/dist/esm/modules/useEvent/index.js +0 -23
  277. package/dist/esm/modules/useEvent/index.js.map +0 -6
  278. package/dist/esm/modules/useHover/__tests__/index-test.js +0 -187
  279. package/dist/esm/modules/useHover/__tests__/index-test.js.map +0 -6
  280. package/dist/esm/modules/useHover/index.js +0 -59
  281. package/dist/esm/modules/useHover/index.js.map +0 -6
  282. package/dist/esm/modules/useLayoutEffect/index.js +0 -7
  283. package/dist/esm/modules/useLayoutEffect/index.js.map +0 -6
  284. package/dist/esm/modules/useLocale/index.js +0 -32
  285. package/dist/esm/modules/useLocale/index.js.map +0 -6
  286. package/dist/esm/modules/useLocale/isLocaleRTL.js +0 -75
  287. package/dist/esm/modules/useLocale/isLocaleRTL.js.map +0 -6
  288. package/dist/esm/modules/useMergeRefs/__tests__/index-test.js +0 -53
  289. package/dist/esm/modules/useMergeRefs/__tests__/index-test.js.map +0 -6
  290. package/dist/esm/modules/useMergeRefs/index.js +0 -13
  291. package/dist/esm/modules/useMergeRefs/index.js.map +0 -6
  292. package/dist/esm/modules/usePlatformMethods/index.js +0 -18
  293. package/dist/esm/modules/usePlatformMethods/index.js.map +0 -6
  294. package/dist/esm/modules/useStable/__tests__/index-test.js +0 -53
  295. package/dist/esm/modules/useStable/__tests__/index-test.js.map +0 -6
  296. package/dist/esm/modules/useStable/index.js +0 -10
  297. package/dist/esm/modules/useStable/index.js.map +0 -6
  298. package/dist/esm/styleTypes.js +0 -1
  299. package/dist/esm/styleTypes.js.map +0 -6
  300. package/dist/esm/types.js +0 -1
  301. 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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,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,MAAM,aAAa,SAAS,IAAI;AAAA,EAG5D;AAAA,EAEQ,UACN,WAKC;AACD,QAAI,gBAAgB,KAAK,UAAU,SAAS;AAC5C,WAAI,iBAAiB,SACnB,gBAAgB,oBAAI,IAAI,GACxB,KAAK,UAAU,SAAS,IAAI,gBAEvB;AAAA,EACT;AACF;AAoBA,MAAM,UAAU;AAAA,EACN;AAAA,EACA;AAAA,EAER,YAAY,EAAE,YAAY,GAAgC;AACxD,SAAK,eAAe,aACpB,KAAK,cAAc,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,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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