@semcore/core 2.39.1 → 16.0.0-prerelease.4

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 (1001) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +2 -2
  3. package/lib/LastInteractionType.d.ts +11 -0
  4. package/lib/cjs/LastInteractionType.js +57 -0
  5. package/lib/cjs/LastInteractionType.js.map +1 -0
  6. package/lib/cjs/core-types/Component.js +59 -0
  7. package/lib/cjs/core-types/Component.js.map +1 -0
  8. package/lib/cjs/core-types/UnknownProperties.js +2 -0
  9. package/lib/cjs/core-types/UnknownProperties.js.map +1 -0
  10. package/lib/cjs/core-types/reshadow.d.js +2 -0
  11. package/lib/cjs/core-types/reshadow.d.js.map +1 -0
  12. package/lib/cjs/core-types/symbols.js +25 -0
  13. package/lib/cjs/core-types/symbols.js.map +1 -0
  14. package/lib/cjs/coreFactory.js +352 -0
  15. package/lib/cjs/coreFactory.js.map +1 -0
  16. package/lib/cjs/enhancement/Children.js +119 -0
  17. package/lib/cjs/enhancement/Children.js.map +1 -0
  18. package/lib/cjs/enhancement/Root.js +78 -0
  19. package/lib/cjs/enhancement/Root.js.map +1 -0
  20. package/lib/cjs/enhancement/bindHandler.js +54 -0
  21. package/lib/cjs/enhancement/bindHandler.js.map +1 -0
  22. package/lib/cjs/enhancement/dataName.js +20 -0
  23. package/lib/cjs/enhancement/dataName.js.map +1 -0
  24. package/lib/cjs/enhancement/enhance.js +22 -0
  25. package/lib/cjs/enhancement/enhance.js.map +1 -0
  26. package/lib/cjs/enhancement/functionDefaultProps.js +36 -0
  27. package/lib/cjs/enhancement/functionDefaultProps.js.map +1 -0
  28. package/lib/cjs/enhancement/hoistProps.js +97 -0
  29. package/lib/cjs/enhancement/hoistProps.js.map +1 -0
  30. package/lib/cjs/enhancement/i18n.js +28 -0
  31. package/lib/cjs/enhancement/i18n.js.map +1 -0
  32. package/lib/cjs/enhancement/inheritedName.js +23 -0
  33. package/lib/cjs/enhancement/inheritedName.js.map +1 -0
  34. package/lib/cjs/enhancement/staticChildren.js +135 -0
  35. package/lib/cjs/enhancement/staticChildren.js.map +1 -0
  36. package/lib/cjs/enhancement/style.js +60 -0
  37. package/lib/cjs/enhancement/style.js.map +1 -0
  38. package/lib/cjs/enhancement/uncontrolledProps.js +131 -0
  39. package/lib/cjs/enhancement/uncontrolledProps.js.map +1 -0
  40. package/lib/cjs/index.js +97 -17
  41. package/lib/cjs/index.js.map +1 -1
  42. package/lib/cjs/register.js +37 -0
  43. package/lib/cjs/register.js.map +1 -0
  44. package/lib/cjs/styled/index.js +32 -0
  45. package/lib/cjs/styled/index.js.map +1 -0
  46. package/lib/cjs/styled/reshadow-core.js +256 -0
  47. package/lib/cjs/styled/reshadow-core.js.map +1 -0
  48. package/lib/cjs/styled/sstyled.js +149 -0
  49. package/lib/cjs/styled/sstyled.js.map +1 -0
  50. package/lib/cjs/theme/dark.json +2506 -0
  51. package/lib/cjs/theme/exclude-tokens.json +10 -0
  52. package/lib/cjs/theme/light.json +2584 -0
  53. package/lib/cjs/theme/processor.js +315 -0
  54. package/lib/cjs/theme/processor.js.map +1 -0
  55. package/lib/cjs/theme/themes/auto.css +1465 -0
  56. package/lib/cjs/theme/themes/dark.css +723 -0
  57. package/lib/cjs/theme/themes/dark.js +385 -0
  58. package/lib/cjs/theme/themes/dark.js.map +1 -0
  59. package/lib/cjs/theme/themes/default.css +742 -0
  60. package/lib/cjs/theme/themes/default.js +394 -0
  61. package/lib/cjs/theme/themes/default.js.map +1 -0
  62. package/lib/cjs/theme/themes/light.css +742 -0
  63. package/lib/cjs/theme/themes/light.js +394 -0
  64. package/lib/cjs/theme/themes/light.js.map +1 -0
  65. package/lib/cjs/theme/utils.js +297 -0
  66. package/lib/cjs/theme/utils.js.map +1 -0
  67. package/lib/cjs/utils/CSSinJS.js +36 -0
  68. package/lib/cjs/utils/CSSinJS.js.map +1 -0
  69. package/lib/cjs/utils/ScreenReaderOnly.js +31 -0
  70. package/lib/cjs/utils/ScreenReaderOnly.js.map +1 -0
  71. package/lib/cjs/utils/ThemeProvider.js +82 -0
  72. package/lib/cjs/utils/ThemeProvider.js.map +1 -0
  73. package/lib/cjs/utils/addonText.js +18 -0
  74. package/lib/cjs/utils/addonText.js.map +1 -0
  75. package/lib/cjs/utils/addonTextChildren.js +45 -0
  76. package/lib/cjs/utils/addonTextChildren.js.map +1 -0
  77. package/lib/cjs/utils/ariaProps.js +22 -0
  78. package/lib/cjs/utils/ariaProps.js.map +1 -0
  79. package/lib/cjs/utils/assignProps.js +93 -0
  80. package/lib/cjs/utils/assignProps.js.map +1 -0
  81. package/lib/cjs/utils/canUseDOM.js +10 -0
  82. package/lib/cjs/utils/canUseDOM.js.map +1 -0
  83. package/lib/cjs/utils/capitalizeFirstLetter.js +10 -0
  84. package/lib/cjs/utils/capitalizeFirstLetter.js.map +1 -0
  85. package/lib/cjs/utils/color.js +208 -0
  86. package/lib/cjs/utils/color.js.map +1 -0
  87. package/lib/cjs/utils/compose.js +21 -0
  88. package/lib/cjs/utils/compose.js.map +1 -0
  89. package/lib/cjs/utils/createHoc.js +55 -0
  90. package/lib/cjs/utils/createHoc.js.map +1 -0
  91. package/lib/cjs/utils/createUUID.js +15 -0
  92. package/lib/cjs/utils/createUUID.js.map +1 -0
  93. package/lib/cjs/utils/cssToIntDefault.js +22 -0
  94. package/lib/cjs/utils/cssToIntDefault.js.map +1 -0
  95. package/lib/cjs/utils/enhances/WithAutoFocus.js +75 -0
  96. package/lib/cjs/utils/enhances/WithAutoFocus.js.map +1 -0
  97. package/lib/cjs/utils/enhances/WithCSS.js +93 -0
  98. package/lib/cjs/utils/enhances/WithCSS.js.map +1 -0
  99. package/lib/cjs/utils/enhances/WithI18n.js +95 -0
  100. package/lib/cjs/utils/enhances/WithI18n.js.map +1 -0
  101. package/lib/cjs/utils/enhances/WithKeyboardFocus.js +93 -0
  102. package/lib/cjs/utils/enhances/WithKeyboardFocus.js.map +1 -0
  103. package/lib/cjs/utils/enhances/WithRef.js +26 -0
  104. package/lib/cjs/utils/enhances/WithRef.js.map +1 -0
  105. package/lib/cjs/utils/enhances/a11yEnhance.js +74 -0
  106. package/lib/cjs/utils/enhances/a11yEnhance.js.map +1 -0
  107. package/lib/cjs/utils/enhances/animatedSizeEnhance.js +98 -0
  108. package/lib/cjs/utils/enhances/animatedSizeEnhance.js.map +1 -0
  109. package/lib/cjs/utils/enhances/autoFocusEnhance.js +46 -0
  110. package/lib/cjs/utils/enhances/autoFocusEnhance.js.map +1 -0
  111. package/lib/cjs/utils/enhances/contextEnhance.js +22 -0
  112. package/lib/cjs/utils/enhances/contextEnhance.js.map +1 -0
  113. package/lib/cjs/utils/enhances/i18nEnhance.js +101 -0
  114. package/lib/cjs/utils/enhances/i18nEnhance.js.map +1 -0
  115. package/lib/cjs/utils/enhances/keyboardFocusEnhance.js +63 -0
  116. package/lib/cjs/utils/enhances/keyboardFocusEnhance.js.map +1 -0
  117. package/lib/cjs/utils/enhances/resolveColorEnhance.js +25 -0
  118. package/lib/cjs/utils/enhances/resolveColorEnhance.js.map +1 -0
  119. package/lib/cjs/utils/eventEmitter.js +41 -0
  120. package/lib/cjs/utils/eventEmitter.js.map +1 -0
  121. package/lib/cjs/utils/findComponent.js +106 -0
  122. package/lib/cjs/utils/findComponent.js.map +1 -0
  123. package/lib/cjs/utils/fire.js +23 -0
  124. package/lib/cjs/utils/fire.js.map +1 -0
  125. package/lib/cjs/utils/focus-lock/focusBorders.js +72 -0
  126. package/lib/cjs/utils/focus-lock/focusBorders.js.map +1 -0
  127. package/lib/cjs/utils/focus-lock/getFocusableIn.js +26 -0
  128. package/lib/cjs/utils/focus-lock/getFocusableIn.js.map +1 -0
  129. package/lib/cjs/utils/focus-lock/isFocusInside.js +16 -0
  130. package/lib/cjs/utils/focus-lock/isFocusInside.js.map +1 -0
  131. package/lib/cjs/utils/focus-lock/isFocusable.js +51 -0
  132. package/lib/cjs/utils/focus-lock/isFocusable.js.map +1 -0
  133. package/lib/cjs/utils/focus-lock/setFocus.js +63 -0
  134. package/lib/cjs/utils/focus-lock/setFocus.js.map +1 -0
  135. package/lib/cjs/utils/getAccessibleName.js +56 -0
  136. package/lib/cjs/utils/getAccessibleName.js.map +1 -0
  137. package/lib/cjs/utils/getDisplayName.js +10 -0
  138. package/lib/cjs/utils/getDisplayName.js.map +1 -0
  139. package/lib/cjs/utils/getEventTarget.js +53 -0
  140. package/lib/cjs/utils/getEventTarget.js.map +1 -0
  141. package/lib/cjs/utils/getOriginChildren.js +18 -0
  142. package/lib/cjs/utils/getOriginChildren.js.map +1 -0
  143. package/lib/cjs/utils/getRandomInt.js +11 -0
  144. package/lib/cjs/utils/getRandomInt.js.map +1 -0
  145. package/lib/cjs/utils/getValue.js +16 -0
  146. package/lib/cjs/utils/getValue.js.map +1 -0
  147. package/lib/cjs/utils/hasLabels.js +47 -0
  148. package/lib/cjs/utils/hasLabels.js.map +1 -0
  149. package/lib/cjs/utils/hasParent.js +14 -0
  150. package/lib/cjs/utils/hasParent.js.map +1 -0
  151. package/lib/cjs/utils/if.js +16 -0
  152. package/lib/cjs/utils/if.js.map +1 -0
  153. package/lib/cjs/utils/ifChildren.js +17 -0
  154. package/lib/cjs/utils/ifChildren.js.map +1 -0
  155. package/lib/cjs/utils/injectStyle.js +49 -0
  156. package/lib/cjs/utils/injectStyle.js.map +1 -0
  157. package/lib/cjs/utils/inputProps.js +22 -0
  158. package/lib/cjs/utils/inputProps.js.map +1 -0
  159. package/lib/cjs/utils/isNode.js +28 -0
  160. package/lib/cjs/utils/isNode.js.map +1 -0
  161. package/lib/cjs/utils/isPromise.js +10 -0
  162. package/lib/cjs/utils/isPromise.js.map +1 -0
  163. package/lib/cjs/utils/isRetina.js +15 -0
  164. package/lib/cjs/utils/isRetina.js.map +1 -0
  165. package/lib/cjs/utils/logger.js +40 -0
  166. package/lib/cjs/utils/logger.js.map +1 -0
  167. package/lib/cjs/utils/numericChecker.js +33 -0
  168. package/lib/cjs/utils/numericChecker.js.map +1 -0
  169. package/lib/cjs/utils/ownerDocument.js +10 -0
  170. package/lib/cjs/utils/ownerDocument.js.map +1 -0
  171. package/lib/cjs/utils/pick.js +19 -0
  172. package/lib/cjs/utils/pick.js.map +1 -0
  173. package/lib/cjs/utils/propsForElement.js +59 -0
  174. package/lib/cjs/utils/propsForElement.js.map +1 -0
  175. package/lib/cjs/utils/rafTrottle.js +33 -0
  176. package/lib/cjs/utils/rafTrottle.js.map +1 -0
  177. package/lib/cjs/utils/reactToText.js +33 -0
  178. package/lib/cjs/utils/reactToText.js.map +1 -0
  179. package/lib/cjs/utils/ref.js +95 -0
  180. package/lib/cjs/utils/ref.js.map +1 -0
  181. package/lib/cjs/utils/setRef.js +10 -0
  182. package/lib/cjs/utils/setRef.js.map +1 -0
  183. package/lib/cjs/utils/syncScroll.js +61 -0
  184. package/lib/cjs/utils/syncScroll.js.map +1 -0
  185. package/lib/cjs/utils/uncontroll.js +47 -0
  186. package/lib/cjs/utils/uncontroll.js.map +1 -0
  187. package/lib/cjs/utils/uniqueID.js +42 -0
  188. package/lib/cjs/utils/uniqueID.js.map +1 -0
  189. package/lib/cjs/utils/use/useColorResolver.js +208 -0
  190. package/lib/cjs/utils/use/useColorResolver.js.map +1 -0
  191. package/lib/cjs/utils/use/useCss.js +20 -0
  192. package/lib/cjs/utils/use/useCss.js.map +1 -0
  193. package/lib/cjs/utils/use/useEnhancedEffect.js +13 -0
  194. package/lib/cjs/utils/use/useEnhancedEffect.js.map +1 -0
  195. package/lib/cjs/utils/use/useEventCallback.js +25 -0
  196. package/lib/cjs/utils/use/useEventCallback.js.map +1 -0
  197. package/lib/cjs/utils/use/useEventListener.js +33 -0
  198. package/lib/cjs/utils/use/useEventListener.js.map +1 -0
  199. package/lib/cjs/utils/use/useFocusLock.js +289 -0
  200. package/lib/cjs/utils/use/useFocusLock.js.map +1 -0
  201. package/lib/cjs/utils/use/usePreventScroll.js +78 -0
  202. package/lib/cjs/utils/use/usePreventScroll.js.map +1 -0
  203. package/lib/cjs/utils/useCssVariable.js +55 -0
  204. package/lib/cjs/utils/useCssVariable.js.map +1 -0
  205. package/lib/cjs/utils/zIndexStacking.js +48 -0
  206. package/lib/cjs/utils/zIndexStacking.js.map +1 -0
  207. package/lib/core-types/Component.js +59 -0
  208. package/lib/core-types/Component.js.map +1 -0
  209. package/lib/core-types/Component.mjs +54 -0
  210. package/lib/core-types/Component.mjs.map +1 -0
  211. package/lib/core-types/UnknownProperties.d.ts +3 -0
  212. package/lib/core-types/UnknownProperties.js +2 -0
  213. package/lib/core-types/UnknownProperties.js.map +1 -0
  214. package/lib/core-types/UnknownProperties.mjs +3 -0
  215. package/lib/core-types/UnknownProperties.mjs.map +1 -0
  216. package/lib/core-types/reshadow.d.js +2 -0
  217. package/lib/core-types/reshadow.d.js.map +1 -0
  218. package/lib/core-types/reshadow.d.mjs +2 -0
  219. package/lib/core-types/reshadow.d.mjs.map +1 -0
  220. package/lib/core-types/symbols.d.ts +9 -0
  221. package/lib/core-types/symbols.js +25 -0
  222. package/lib/core-types/symbols.js.map +1 -0
  223. package/lib/core-types/symbols.mjs +10 -0
  224. package/lib/core-types/symbols.mjs.map +1 -0
  225. package/lib/enhancement/Children.js +119 -0
  226. package/lib/enhancement/Children.js.map +1 -0
  227. package/lib/enhancement/Children.mjs +111 -0
  228. package/lib/enhancement/Children.mjs.map +1 -0
  229. package/lib/enhancement/Root.js +78 -0
  230. package/lib/enhancement/Root.js.map +1 -0
  231. package/lib/enhancement/Root.mjs +70 -0
  232. package/lib/enhancement/Root.mjs.map +1 -0
  233. package/lib/enhancement/bindHandler.js +54 -0
  234. package/lib/enhancement/bindHandler.js.map +1 -0
  235. package/lib/enhancement/bindHandler.mjs +47 -0
  236. package/lib/enhancement/bindHandler.mjs.map +1 -0
  237. package/lib/enhancement/dataName.js +20 -0
  238. package/lib/enhancement/dataName.js.map +1 -0
  239. package/lib/enhancement/dataName.mjs +12 -0
  240. package/lib/enhancement/dataName.mjs.map +1 -0
  241. package/lib/enhancement/enhance.js +22 -0
  242. package/lib/enhancement/enhance.js.map +1 -0
  243. package/lib/enhancement/enhance.mjs +15 -0
  244. package/lib/enhancement/enhance.mjs.map +1 -0
  245. package/lib/enhancement/functionDefaultProps.js +36 -0
  246. package/lib/enhancement/functionDefaultProps.js.map +1 -0
  247. package/lib/enhancement/functionDefaultProps.mjs +29 -0
  248. package/lib/enhancement/functionDefaultProps.mjs.map +1 -0
  249. package/lib/enhancement/hoistProps.js +97 -0
  250. package/lib/enhancement/hoistProps.js.map +1 -0
  251. package/lib/enhancement/hoistProps.mjs +88 -0
  252. package/lib/enhancement/hoistProps.mjs.map +1 -0
  253. package/lib/enhancement/i18n.js +28 -0
  254. package/lib/enhancement/i18n.js.map +1 -0
  255. package/lib/enhancement/i18n.mjs +20 -0
  256. package/lib/enhancement/i18n.mjs.map +1 -0
  257. package/lib/enhancement/inheritedName.js +23 -0
  258. package/lib/enhancement/inheritedName.js.map +1 -0
  259. package/lib/enhancement/inheritedName.mjs +15 -0
  260. package/lib/enhancement/inheritedName.mjs.map +1 -0
  261. package/lib/enhancement/staticChildren.js +135 -0
  262. package/lib/enhancement/staticChildren.js.map +1 -0
  263. package/lib/enhancement/staticChildren.mjs +123 -0
  264. package/lib/enhancement/staticChildren.mjs.map +1 -0
  265. package/lib/enhancement/style.js +60 -0
  266. package/lib/enhancement/style.js.map +1 -0
  267. package/lib/enhancement/style.mjs +51 -0
  268. package/lib/enhancement/style.mjs.map +1 -0
  269. package/lib/enhancement/uncontrolledProps.js +131 -0
  270. package/lib/enhancement/uncontrolledProps.js.map +1 -0
  271. package/lib/enhancement/uncontrolledProps.mjs +123 -0
  272. package/lib/enhancement/uncontrolledProps.mjs.map +1 -0
  273. package/lib/es6/LastInteractionType.js +49 -0
  274. package/lib/es6/LastInteractionType.js.map +1 -0
  275. package/lib/es6/core-types/Component.js +54 -0
  276. package/lib/es6/core-types/Component.js.map +1 -0
  277. package/lib/es6/core-types/UnknownProperties.js +2 -0
  278. package/lib/es6/core-types/UnknownProperties.js.map +1 -0
  279. package/lib/es6/core-types/reshadow.d.js +2 -0
  280. package/lib/es6/core-types/reshadow.d.js.map +1 -0
  281. package/lib/es6/core-types/symbols.js +10 -0
  282. package/lib/es6/core-types/symbols.js.map +1 -0
  283. package/lib/es6/coreFactory.js +343 -0
  284. package/lib/es6/coreFactory.js.map +1 -0
  285. package/lib/es6/enhancement/Children.js +111 -0
  286. package/lib/es6/enhancement/Children.js.map +1 -0
  287. package/lib/es6/enhancement/Root.js +70 -0
  288. package/lib/es6/enhancement/Root.js.map +1 -0
  289. package/lib/es6/enhancement/bindHandler.js +47 -0
  290. package/lib/es6/enhancement/bindHandler.js.map +1 -0
  291. package/lib/es6/enhancement/dataName.js +12 -0
  292. package/lib/es6/enhancement/dataName.js.map +1 -0
  293. package/lib/es6/enhancement/enhance.js +15 -0
  294. package/lib/es6/enhancement/enhance.js.map +1 -0
  295. package/lib/es6/enhancement/functionDefaultProps.js +29 -0
  296. package/lib/es6/enhancement/functionDefaultProps.js.map +1 -0
  297. package/lib/es6/enhancement/hoistProps.js +88 -0
  298. package/lib/es6/enhancement/hoistProps.js.map +1 -0
  299. package/lib/es6/enhancement/i18n.js +20 -0
  300. package/lib/es6/enhancement/i18n.js.map +1 -0
  301. package/lib/es6/enhancement/inheritedName.js +15 -0
  302. package/lib/es6/enhancement/inheritedName.js.map +1 -0
  303. package/lib/es6/enhancement/staticChildren.js +123 -0
  304. package/lib/es6/enhancement/staticChildren.js.map +1 -0
  305. package/lib/es6/enhancement/style.js +51 -0
  306. package/lib/es6/enhancement/style.js.map +1 -0
  307. package/lib/es6/enhancement/uncontrolledProps.js +123 -0
  308. package/lib/es6/enhancement/uncontrolledProps.js.map +1 -0
  309. package/lib/es6/index.js +8 -3
  310. package/lib/es6/index.js.map +1 -1
  311. package/lib/es6/register.js +29 -0
  312. package/lib/es6/register.js.map +1 -0
  313. package/lib/es6/styled/index.js +6 -0
  314. package/lib/es6/styled/index.js.map +1 -0
  315. package/lib/es6/styled/reshadow-core.js +243 -0
  316. package/lib/es6/styled/reshadow-core.js.map +1 -0
  317. package/lib/es6/styled/sstyled.js +142 -0
  318. package/lib/es6/styled/sstyled.js.map +1 -0
  319. package/lib/es6/theme/dark.json +2506 -0
  320. package/lib/es6/theme/exclude-tokens.json +10 -0
  321. package/lib/es6/theme/light.json +2584 -0
  322. package/lib/es6/theme/processor.js +307 -0
  323. package/lib/es6/theme/processor.js.map +1 -0
  324. package/lib/es6/theme/themes/auto.css +1465 -0
  325. package/lib/es6/theme/themes/dark.css +723 -0
  326. package/lib/es6/theme/themes/dark.js +378 -0
  327. package/lib/es6/theme/themes/dark.js.map +1 -0
  328. package/lib/es6/theme/themes/default.css +742 -0
  329. package/lib/es6/theme/themes/default.js +387 -0
  330. package/lib/es6/theme/themes/default.js.map +1 -0
  331. package/lib/es6/theme/themes/light.css +742 -0
  332. package/lib/es6/theme/themes/light.js +387 -0
  333. package/lib/es6/theme/themes/light.js.map +1 -0
  334. package/lib/es6/theme/utils.js +286 -0
  335. package/lib/es6/theme/utils.js.map +1 -0
  336. package/lib/es6/utils/CSSinJS.js +28 -0
  337. package/lib/es6/utils/CSSinJS.js.map +1 -0
  338. package/lib/es6/utils/ScreenReaderOnly.js +24 -0
  339. package/lib/es6/utils/ScreenReaderOnly.js.map +1 -0
  340. package/lib/es6/utils/ThemeProvider.js +71 -0
  341. package/lib/es6/utils/ThemeProvider.js.map +1 -0
  342. package/lib/es6/utils/addonText.js +11 -0
  343. package/lib/es6/utils/addonText.js.map +1 -0
  344. package/lib/es6/utils/addonTextChildren.js +37 -0
  345. package/lib/es6/utils/addonTextChildren.js.map +1 -0
  346. package/lib/es6/utils/ariaProps.js +16 -0
  347. package/lib/es6/utils/ariaProps.js.map +1 -0
  348. package/lib/es6/utils/assignProps.js +84 -0
  349. package/lib/es6/utils/assignProps.js.map +1 -0
  350. package/lib/es6/utils/canUseDOM.js +4 -0
  351. package/lib/es6/utils/canUseDOM.js.map +1 -0
  352. package/lib/es6/utils/capitalizeFirstLetter.js +4 -0
  353. package/lib/es6/utils/capitalizeFirstLetter.js.map +1 -0
  354. package/lib/es6/utils/color.js +196 -0
  355. package/lib/es6/utils/color.js.map +1 -0
  356. package/lib/es6/utils/compose.js +15 -0
  357. package/lib/es6/utils/compose.js.map +1 -0
  358. package/lib/es6/utils/createHoc.js +46 -0
  359. package/lib/es6/utils/createHoc.js.map +1 -0
  360. package/lib/es6/utils/createUUID.js +9 -0
  361. package/lib/es6/utils/createUUID.js.map +1 -0
  362. package/lib/es6/utils/cssToIntDefault.js +16 -0
  363. package/lib/es6/utils/cssToIntDefault.js.map +1 -0
  364. package/lib/es6/utils/enhances/WithAutoFocus.js +67 -0
  365. package/lib/es6/utils/enhances/WithAutoFocus.js.map +1 -0
  366. package/lib/es6/utils/enhances/WithCSS.js +79 -0
  367. package/lib/es6/utils/enhances/WithCSS.js.map +1 -0
  368. package/lib/es6/utils/enhances/WithI18n.js +83 -0
  369. package/lib/es6/utils/enhances/WithI18n.js.map +1 -0
  370. package/lib/es6/utils/enhances/WithKeyboardFocus.js +84 -0
  371. package/lib/es6/utils/enhances/WithKeyboardFocus.js.map +1 -0
  372. package/lib/es6/utils/enhances/WithRef.js +18 -0
  373. package/lib/es6/utils/enhances/WithRef.js.map +1 -0
  374. package/lib/es6/utils/enhances/a11yEnhance.js +66 -0
  375. package/lib/es6/utils/enhances/a11yEnhance.js.map +1 -0
  376. package/lib/es6/utils/enhances/animatedSizeEnhance.js +90 -0
  377. package/lib/es6/utils/enhances/animatedSizeEnhance.js.map +1 -0
  378. package/lib/es6/utils/enhances/autoFocusEnhance.js +38 -0
  379. package/lib/es6/utils/enhances/autoFocusEnhance.js.map +1 -0
  380. package/lib/es6/utils/enhances/contextEnhance.js +14 -0
  381. package/lib/es6/utils/enhances/contextEnhance.js.map +1 -0
  382. package/lib/es6/utils/enhances/i18nEnhance.js +92 -0
  383. package/lib/es6/utils/enhances/i18nEnhance.js.map +1 -0
  384. package/lib/es6/utils/enhances/keyboardFocusEnhance.js +57 -0
  385. package/lib/es6/utils/enhances/keyboardFocusEnhance.js.map +1 -0
  386. package/lib/es6/utils/enhances/resolveColorEnhance.js +17 -0
  387. package/lib/es6/utils/enhances/resolveColorEnhance.js.map +1 -0
  388. package/lib/es6/utils/eventEmitter.js +34 -0
  389. package/lib/es6/utils/eventEmitter.js.map +1 -0
  390. package/lib/es6/utils/findComponent.js +95 -0
  391. package/lib/es6/utils/findComponent.js.map +1 -0
  392. package/lib/es6/utils/fire.js +15 -0
  393. package/lib/es6/utils/fire.js.map +1 -0
  394. package/lib/es6/utils/focus-lock/focusBorders.js +62 -0
  395. package/lib/es6/utils/focus-lock/focusBorders.js.map +1 -0
  396. package/lib/es6/utils/focus-lock/getFocusableIn.js +19 -0
  397. package/lib/es6/utils/focus-lock/getFocusableIn.js.map +1 -0
  398. package/lib/es6/utils/focus-lock/isFocusInside.js +9 -0
  399. package/lib/es6/utils/focus-lock/isFocusInside.js.map +1 -0
  400. package/lib/es6/utils/focus-lock/isFocusable.js +43 -0
  401. package/lib/es6/utils/focus-lock/isFocusable.js.map +1 -0
  402. package/lib/es6/utils/focus-lock/setFocus.js +55 -0
  403. package/lib/es6/utils/focus-lock/setFocus.js.map +1 -0
  404. package/lib/es6/utils/getAccessibleName.js +49 -0
  405. package/lib/es6/utils/getAccessibleName.js.map +1 -0
  406. package/lib/es6/utils/getDisplayName.js +4 -0
  407. package/lib/es6/utils/getDisplayName.js.map +1 -0
  408. package/lib/es6/utils/getEventTarget.js +45 -0
  409. package/lib/es6/utils/getEventTarget.js.map +1 -0
  410. package/lib/es6/utils/getOriginChildren.js +10 -0
  411. package/lib/es6/utils/getOriginChildren.js.map +1 -0
  412. package/lib/es6/utils/getRandomInt.js +5 -0
  413. package/lib/es6/utils/getRandomInt.js.map +1 -0
  414. package/lib/es6/utils/getValue.js +10 -0
  415. package/lib/es6/utils/getValue.js.map +1 -0
  416. package/lib/es6/utils/hasLabels.js +39 -0
  417. package/lib/es6/utils/hasLabels.js.map +1 -0
  418. package/lib/es6/utils/hasParent.js +7 -0
  419. package/lib/es6/utils/hasParent.js.map +1 -0
  420. package/lib/es6/utils/if.js +9 -0
  421. package/lib/es6/utils/if.js.map +1 -0
  422. package/lib/es6/utils/ifChildren.js +10 -0
  423. package/lib/es6/utils/ifChildren.js.map +1 -0
  424. package/lib/es6/utils/injectStyle.js +41 -0
  425. package/lib/es6/utils/injectStyle.js.map +1 -0
  426. package/lib/es6/utils/inputProps.js +14 -0
  427. package/lib/es6/utils/inputProps.js.map +1 -0
  428. package/lib/es6/utils/isNode.js +21 -0
  429. package/lib/es6/utils/isNode.js.map +1 -0
  430. package/lib/es6/utils/isPromise.js +4 -0
  431. package/lib/es6/utils/isPromise.js.map +1 -0
  432. package/lib/es6/utils/isRetina.js +9 -0
  433. package/lib/es6/utils/isRetina.js.map +1 -0
  434. package/lib/es6/utils/logger.js +32 -0
  435. package/lib/es6/utils/logger.js.map +1 -0
  436. package/lib/es6/utils/numericChecker.js +27 -0
  437. package/lib/es6/utils/numericChecker.js.map +1 -0
  438. package/lib/es6/utils/ownerDocument.js +4 -0
  439. package/lib/es6/utils/ownerDocument.js.map +1 -0
  440. package/lib/es6/utils/pick.js +13 -0
  441. package/lib/es6/utils/pick.js.map +1 -0
  442. package/lib/es6/utils/propsForElement.js +50 -0
  443. package/lib/es6/utils/propsForElement.js.map +1 -0
  444. package/lib/es6/utils/rafTrottle.js +26 -0
  445. package/lib/es6/utils/rafTrottle.js.map +1 -0
  446. package/lib/es6/utils/reactToText.js +26 -0
  447. package/lib/es6/utils/reactToText.js.map +1 -0
  448. package/lib/es6/utils/ref.js +83 -0
  449. package/lib/es6/utils/ref.js.map +1 -0
  450. package/lib/es6/utils/setRef.js +3 -0
  451. package/lib/es6/utils/setRef.js.map +1 -0
  452. package/lib/es6/utils/syncScroll.js +54 -0
  453. package/lib/es6/utils/syncScroll.js.map +1 -0
  454. package/lib/es6/utils/uncontroll.js +38 -0
  455. package/lib/es6/utils/uncontroll.js.map +1 -0
  456. package/lib/es6/utils/uniqueID.js +33 -0
  457. package/lib/es6/utils/uniqueID.js.map +1 -0
  458. package/lib/es6/utils/use/useColorResolver.js +200 -0
  459. package/lib/es6/utils/use/useColorResolver.js.map +1 -0
  460. package/lib/es6/utils/use/useCss.js +12 -0
  461. package/lib/es6/utils/use/useCss.js.map +1 -0
  462. package/lib/es6/utils/use/useEnhancedEffect.js +5 -0
  463. package/lib/es6/utils/use/useEnhancedEffect.js.map +1 -0
  464. package/lib/es6/utils/use/useEventCallback.js +19 -0
  465. package/lib/es6/utils/use/useEventCallback.js.map +1 -0
  466. package/lib/es6/utils/use/useEventListener.js +25 -0
  467. package/lib/es6/utils/use/useEventListener.js.map +1 -0
  468. package/lib/es6/utils/use/useFocusLock.js +266 -0
  469. package/lib/es6/utils/use/useFocusLock.js.map +1 -0
  470. package/lib/es6/utils/use/usePreventScroll.js +70 -0
  471. package/lib/es6/utils/use/usePreventScroll.js.map +1 -0
  472. package/lib/es6/utils/useCssVariable.js +46 -0
  473. package/lib/es6/utils/useCssVariable.js.map +1 -0
  474. package/lib/es6/utils/zIndexStacking.js +38 -0
  475. package/lib/es6/utils/zIndexStacking.js.map +1 -0
  476. package/lib/esm/LastInteractionType.mjs +42 -0
  477. package/lib/esm/core-types/Component.mjs +40 -0
  478. package/lib/esm/core-types/symbols.mjs +12 -0
  479. package/lib/esm/coreFactory.mjs +235 -0
  480. package/lib/esm/enhancement/Children.mjs +72 -0
  481. package/lib/esm/enhancement/Root.mjs +43 -0
  482. package/lib/esm/enhancement/bindHandler.mjs +44 -0
  483. package/lib/esm/enhancement/dataName.mjs +13 -0
  484. package/lib/esm/enhancement/enhance.mjs +16 -0
  485. package/lib/esm/enhancement/functionDefaultProps.mjs +19 -0
  486. package/lib/esm/enhancement/hoistProps.mjs +58 -0
  487. package/lib/esm/enhancement/i18n.mjs +18 -0
  488. package/lib/esm/enhancement/inheritedName.mjs +16 -0
  489. package/lib/esm/enhancement/staticChildren.mjs +78 -0
  490. package/lib/esm/enhancement/style.mjs +38 -0
  491. package/lib/esm/enhancement/uncontrolledProps.mjs +88 -0
  492. package/lib/esm/index.mjs +21 -4
  493. package/lib/esm/register.mjs +24 -0
  494. package/lib/esm/styled/reshadow-core.mjs +16 -0
  495. package/lib/esm/styled/sstyled.mjs +78 -0
  496. package/lib/esm/utils/assignProps.mjs +42 -0
  497. package/lib/esm/utils/canUseDOM.mjs +6 -0
  498. package/lib/esm/utils/capitalizeFirstLetter.mjs +6 -0
  499. package/lib/esm/utils/enhances/WithI18n.mjs +48 -0
  500. package/lib/esm/utils/logger.mjs +27 -0
  501. package/lib/esm/utils/pick.mjs +10 -0
  502. package/lib/esm/utils/ref.mjs +34 -0
  503. package/lib/esm/utils/use/useEnhancedEffect.mjs +6 -0
  504. package/lib/register.d.ts +8 -0
  505. package/lib/register.js +37 -0
  506. package/lib/register.js.map +1 -0
  507. package/lib/register.mjs +29 -0
  508. package/lib/register.mjs.map +1 -0
  509. package/lib/styled/index.d.ts +11 -0
  510. package/lib/styled/index.js +32 -0
  511. package/lib/styled/index.js.map +1 -0
  512. package/lib/styled/index.mjs +6 -0
  513. package/lib/styled/index.mjs.map +1 -0
  514. package/lib/styled/reshadow-core.d.ts +37 -0
  515. package/lib/styled/reshadow-core.js +256 -0
  516. package/lib/styled/reshadow-core.js.map +1 -0
  517. package/lib/styled/reshadow-core.mjs +243 -0
  518. package/lib/styled/reshadow-core.mjs.map +1 -0
  519. package/lib/styled/sstyled.d.ts +17 -0
  520. package/lib/styled/sstyled.js +149 -0
  521. package/lib/styled/sstyled.js.map +1 -0
  522. package/lib/styled/sstyled.mjs +142 -0
  523. package/lib/styled/sstyled.mjs.map +1 -0
  524. package/lib/theme/dark.json +2506 -0
  525. package/lib/theme/exclude-tokens.json +10 -0
  526. package/lib/theme/light.json +2584 -0
  527. package/lib/theme/processor.js +315 -0
  528. package/lib/theme/processor.js.map +1 -0
  529. package/lib/theme/processor.mjs +307 -0
  530. package/lib/theme/processor.mjs.map +1 -0
  531. package/lib/theme/themes/auto.css +1465 -0
  532. package/lib/theme/themes/dark.css +723 -0
  533. package/lib/theme/themes/dark.js +385 -0
  534. package/lib/theme/themes/dark.js.map +1 -0
  535. package/lib/theme/themes/dark.mjs +378 -0
  536. package/lib/theme/themes/dark.mjs.map +1 -0
  537. package/lib/theme/themes/default.css +742 -0
  538. package/lib/theme/themes/default.d.ts +387 -0
  539. package/lib/theme/themes/default.js +394 -0
  540. package/lib/theme/themes/default.js.map +1 -0
  541. package/lib/theme/themes/default.mjs +387 -0
  542. package/lib/theme/themes/default.mjs.map +1 -0
  543. package/lib/theme/themes/light.css +742 -0
  544. package/lib/theme/themes/light.js +394 -0
  545. package/lib/theme/themes/light.js.map +1 -0
  546. package/lib/theme/themes/light.mjs +387 -0
  547. package/lib/theme/themes/light.mjs.map +1 -0
  548. package/lib/theme/utils.js +297 -0
  549. package/lib/theme/utils.js.map +1 -0
  550. package/lib/theme/utils.mjs +286 -0
  551. package/lib/theme/utils.mjs.map +1 -0
  552. package/lib/types/LastInteractionType.d.ts +11 -0
  553. package/lib/types/core-types/Component.d.ts +189 -0
  554. package/lib/types/core-types/UnknownProperties.d.ts +3 -0
  555. package/lib/types/core-types/symbols.d.ts +9 -0
  556. package/lib/types/coreFactory.d.ts +27 -0
  557. package/lib/types/enhancement/Children.d.ts +5 -0
  558. package/lib/types/enhancement/Root.d.ts +6 -0
  559. package/lib/types/enhancement/bindHandler.d.ts +5 -0
  560. package/lib/types/enhancement/dataName.d.ts +4 -0
  561. package/lib/types/enhancement/enhance.d.ts +5 -0
  562. package/lib/types/enhancement/functionDefaultProps.d.ts +8 -0
  563. package/lib/types/enhancement/hoistProps.d.ts +10 -0
  564. package/lib/types/enhancement/i18n.d.ts +4 -0
  565. package/lib/types/enhancement/inheritedName.d.ts +8 -0
  566. package/lib/types/enhancement/staticChildren.d.ts +13 -0
  567. package/lib/types/enhancement/style.d.ts +9 -0
  568. package/lib/types/enhancement/uncontrolledProps.d.ts +7 -0
  569. package/lib/types/index.d.ts +11 -3
  570. package/lib/types/register.d.ts +8 -0
  571. package/lib/types/styled/index.d.ts +11 -0
  572. package/lib/types/styled/reshadow-core.d.ts +37 -0
  573. package/lib/types/styled/sstyled.d.ts +17 -0
  574. package/lib/types/theme/processor.d.ts +1 -0
  575. package/lib/types/theme/themes/dark.d.ts +378 -0
  576. package/lib/types/theme/themes/default.d.ts +387 -0
  577. package/lib/types/theme/themes/light.d.ts +387 -0
  578. package/lib/types/theme/utils.d.ts +52 -0
  579. package/lib/types/utils/CSSinJS.d.ts +5 -0
  580. package/lib/types/utils/ScreenReaderOnly.d.ts +8 -0
  581. package/lib/types/utils/ThemeProvider.d.ts +15 -0
  582. package/lib/types/utils/addonText.d.ts +2 -0
  583. package/lib/types/utils/addonTextChildren.d.ts +3 -0
  584. package/lib/types/utils/ariaProps.d.ts +12 -0
  585. package/lib/types/utils/assignProps.d.ts +11 -0
  586. package/lib/types/utils/canUseDOM.d.ts +1 -0
  587. package/lib/types/utils/capitalizeFirstLetter.d.ts +1 -0
  588. package/lib/types/utils/color.d.ts +5 -0
  589. package/lib/types/utils/compose.d.ts +1 -0
  590. package/lib/types/utils/createHoc.d.ts +3 -0
  591. package/lib/types/utils/createUUID.d.ts +1 -0
  592. package/lib/types/utils/cssToIntDefault.d.ts +8 -0
  593. package/lib/types/utils/enhances/WithAutoFocus.d.ts +14 -0
  594. package/lib/types/utils/enhances/WithCSS.d.ts +41 -0
  595. package/lib/types/utils/enhances/WithI18n.d.ts +43 -0
  596. package/lib/types/utils/enhances/WithKeyboardFocus.d.ts +45 -0
  597. package/lib/types/utils/enhances/WithRef.d.ts +3 -0
  598. package/lib/types/utils/enhances/a11yEnhance.d.ts +10 -0
  599. package/lib/types/utils/enhances/animatedSizeEnhance.d.ts +12 -0
  600. package/lib/types/utils/enhances/autoFocusEnhance.d.ts +10 -0
  601. package/lib/types/utils/enhances/contextEnhance.d.ts +3 -0
  602. package/lib/types/utils/enhances/i18nEnhance.d.ts +25 -0
  603. package/lib/types/utils/enhances/keyboardFocusEnhance.d.ts +27 -0
  604. package/lib/types/utils/enhances/resolveColorEnhance.d.ts +2 -0
  605. package/lib/types/utils/eventEmitter.d.ts +9 -0
  606. package/lib/types/utils/findComponent.d.ts +12 -0
  607. package/lib/types/utils/fire.d.ts +2 -0
  608. package/lib/types/utils/focus-lock/focusBorders.d.ts +4 -0
  609. package/lib/types/utils/focus-lock/getFocusableIn.d.ts +1 -0
  610. package/lib/types/utils/focus-lock/isFocusInside.d.ts +1 -0
  611. package/lib/types/utils/focus-lock/isFocusable.d.ts +1 -0
  612. package/lib/types/utils/focus-lock/setFocus.d.ts +1 -0
  613. package/lib/types/utils/getAccessibleName.d.ts +1 -0
  614. package/lib/types/utils/getDisplayName.d.ts +2 -0
  615. package/lib/types/utils/getEventTarget.d.ts +1 -0
  616. package/lib/types/utils/getOriginChildren.d.ts +2 -0
  617. package/lib/types/utils/getRandomInt.d.ts +1 -0
  618. package/lib/types/utils/getValue.d.ts +1 -0
  619. package/lib/types/utils/hasLabels.d.ts +7 -0
  620. package/lib/types/utils/hasParent.d.ts +1 -0
  621. package/lib/types/utils/if.d.ts +11 -0
  622. package/lib/types/utils/ifChildren.d.ts +8 -0
  623. package/lib/types/utils/injectStyle.d.ts +2 -0
  624. package/lib/types/utils/inputProps.d.ts +2 -0
  625. package/lib/types/utils/isNode.d.ts +1 -0
  626. package/lib/types/utils/isPromise.d.ts +1 -0
  627. package/lib/types/utils/isRetina.d.ts +1 -0
  628. package/lib/types/utils/logger.d.ts +9 -0
  629. package/lib/types/utils/numericChecker.d.ts +5 -0
  630. package/lib/types/utils/ownerDocument.d.ts +1 -0
  631. package/lib/types/utils/pick.d.ts +1 -0
  632. package/lib/types/utils/propsForElement.d.ts +3 -0
  633. package/lib/types/utils/rafTrottle.d.ts +2 -0
  634. package/lib/types/utils/reactToText.d.ts +3 -0
  635. package/lib/types/utils/ref.d.ts +8 -0
  636. package/lib/types/utils/setRef.d.ts +2 -0
  637. package/lib/types/utils/syncScroll.d.ts +1 -0
  638. package/lib/types/utils/uncontroll.d.ts +4 -0
  639. package/lib/types/utils/uniqueID.d.ts +12 -0
  640. package/lib/types/utils/use/useColorResolver.d.ts +1 -0
  641. package/lib/types/utils/use/useCss.d.ts +4 -0
  642. package/lib/types/utils/use/useEnhancedEffect.d.ts +3 -0
  643. package/lib/types/utils/use/useEventCallback.d.ts +4 -0
  644. package/lib/types/utils/use/useEventListener.d.ts +2 -0
  645. package/lib/types/utils/use/useFocusLock.d.ts +10 -0
  646. package/lib/types/utils/use/usePreventScroll.d.ts +2 -0
  647. package/lib/types/utils/useCssVariable.d.ts +8 -0
  648. package/lib/types/utils/zIndexStacking.d.ts +8 -0
  649. package/lib/utils/CSSinJS.d.ts +5 -0
  650. package/lib/utils/CSSinJS.js +36 -0
  651. package/lib/utils/CSSinJS.js.map +1 -0
  652. package/lib/utils/CSSinJS.mjs +28 -0
  653. package/lib/utils/CSSinJS.mjs.map +1 -0
  654. package/lib/utils/ScreenReaderOnly.d.ts +8 -0
  655. package/lib/utils/ScreenReaderOnly.js +31 -0
  656. package/lib/utils/ScreenReaderOnly.js.map +1 -0
  657. package/lib/utils/ScreenReaderOnly.mjs +24 -0
  658. package/lib/utils/ScreenReaderOnly.mjs.map +1 -0
  659. package/lib/utils/ThemeProvider.d.ts +15 -0
  660. package/lib/utils/ThemeProvider.js +82 -0
  661. package/lib/utils/ThemeProvider.js.map +1 -0
  662. package/lib/utils/ThemeProvider.mjs +71 -0
  663. package/lib/utils/ThemeProvider.mjs.map +1 -0
  664. package/lib/utils/addonText.d.ts +2 -0
  665. package/lib/utils/addonText.js +18 -0
  666. package/lib/utils/addonText.js.map +1 -0
  667. package/lib/utils/addonText.mjs +11 -0
  668. package/lib/utils/addonText.mjs.map +1 -0
  669. package/lib/utils/addonTextChildren.d.ts +3 -0
  670. package/lib/utils/addonTextChildren.js +45 -0
  671. package/lib/utils/addonTextChildren.js.map +1 -0
  672. package/lib/utils/addonTextChildren.mjs +37 -0
  673. package/lib/utils/addonTextChildren.mjs.map +1 -0
  674. package/lib/utils/ariaProps.d.ts +12 -0
  675. package/lib/utils/ariaProps.js +22 -0
  676. package/lib/utils/ariaProps.js.map +1 -0
  677. package/lib/utils/ariaProps.mjs +16 -0
  678. package/lib/utils/ariaProps.mjs.map +1 -0
  679. package/lib/utils/assignProps.d.ts +11 -0
  680. package/lib/utils/assignProps.js +93 -0
  681. package/lib/utils/assignProps.js.map +1 -0
  682. package/lib/utils/assignProps.mjs +84 -0
  683. package/lib/utils/assignProps.mjs.map +1 -0
  684. package/lib/utils/canUseDOM.d.ts +1 -0
  685. package/lib/utils/canUseDOM.js +10 -0
  686. package/lib/utils/canUseDOM.js.map +1 -0
  687. package/lib/utils/canUseDOM.mjs +4 -0
  688. package/lib/utils/canUseDOM.mjs.map +1 -0
  689. package/lib/utils/capitalizeFirstLetter.d.ts +1 -0
  690. package/lib/utils/capitalizeFirstLetter.js +10 -0
  691. package/lib/utils/capitalizeFirstLetter.js.map +1 -0
  692. package/lib/utils/capitalizeFirstLetter.mjs +4 -0
  693. package/lib/utils/capitalizeFirstLetter.mjs.map +1 -0
  694. package/lib/utils/color.d.ts +5 -0
  695. package/lib/utils/color.js +208 -0
  696. package/lib/utils/color.js.map +1 -0
  697. package/lib/utils/color.mjs +196 -0
  698. package/lib/utils/color.mjs.map +1 -0
  699. package/lib/utils/compose.d.ts +1 -0
  700. package/lib/utils/compose.js +21 -0
  701. package/lib/utils/compose.js.map +1 -0
  702. package/lib/utils/compose.mjs +15 -0
  703. package/lib/utils/compose.mjs.map +1 -0
  704. package/lib/utils/createHoc.d.ts +3 -0
  705. package/lib/utils/createHoc.js +55 -0
  706. package/lib/utils/createHoc.js.map +1 -0
  707. package/lib/utils/createHoc.mjs +46 -0
  708. package/lib/utils/createHoc.mjs.map +1 -0
  709. package/lib/utils/createUUID.d.ts +1 -0
  710. package/lib/utils/createUUID.js +15 -0
  711. package/lib/utils/createUUID.js.map +1 -0
  712. package/lib/utils/createUUID.mjs +9 -0
  713. package/lib/utils/createUUID.mjs.map +1 -0
  714. package/lib/utils/cssToIntDefault.d.ts +8 -0
  715. package/lib/utils/cssToIntDefault.js +22 -0
  716. package/lib/utils/cssToIntDefault.js.map +1 -0
  717. package/lib/utils/cssToIntDefault.mjs +16 -0
  718. package/lib/utils/cssToIntDefault.mjs.map +1 -0
  719. package/lib/utils/enhances/WithAutoFocus.d.ts +14 -0
  720. package/lib/utils/enhances/WithAutoFocus.js +75 -0
  721. package/lib/utils/enhances/WithAutoFocus.js.map +1 -0
  722. package/lib/utils/enhances/WithAutoFocus.mjs +67 -0
  723. package/lib/utils/enhances/WithAutoFocus.mjs.map +1 -0
  724. package/lib/utils/enhances/WithCSS.d.ts +41 -0
  725. package/lib/utils/enhances/WithCSS.js +93 -0
  726. package/lib/utils/enhances/WithCSS.js.map +1 -0
  727. package/lib/utils/enhances/WithCSS.mjs +79 -0
  728. package/lib/utils/enhances/WithCSS.mjs.map +1 -0
  729. package/lib/utils/enhances/WithI18n.d.ts +43 -0
  730. package/lib/utils/enhances/WithI18n.js +95 -0
  731. package/lib/utils/enhances/WithI18n.js.map +1 -0
  732. package/lib/utils/enhances/WithI18n.mjs +83 -0
  733. package/lib/utils/enhances/WithI18n.mjs.map +1 -0
  734. package/lib/utils/enhances/WithKeyboardFocus.d.ts +45 -0
  735. package/lib/utils/enhances/WithKeyboardFocus.js +93 -0
  736. package/lib/utils/enhances/WithKeyboardFocus.js.map +1 -0
  737. package/lib/utils/enhances/WithKeyboardFocus.mjs +84 -0
  738. package/lib/utils/enhances/WithKeyboardFocus.mjs.map +1 -0
  739. package/lib/utils/enhances/WithRef.d.ts +3 -0
  740. package/lib/utils/enhances/WithRef.js +26 -0
  741. package/lib/utils/enhances/WithRef.js.map +1 -0
  742. package/lib/utils/enhances/WithRef.mjs +18 -0
  743. package/lib/utils/enhances/WithRef.mjs.map +1 -0
  744. package/lib/utils/enhances/a11yEnhance.d.ts +10 -0
  745. package/lib/utils/enhances/a11yEnhance.js +74 -0
  746. package/lib/utils/enhances/a11yEnhance.js.map +1 -0
  747. package/lib/utils/enhances/a11yEnhance.mjs +66 -0
  748. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -0
  749. package/lib/utils/enhances/animatedSizeEnhance.d.ts +12 -0
  750. package/lib/utils/enhances/animatedSizeEnhance.js +98 -0
  751. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -0
  752. package/lib/utils/enhances/animatedSizeEnhance.mjs +90 -0
  753. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -0
  754. package/lib/utils/enhances/autoFocusEnhance.d.ts +10 -0
  755. package/lib/utils/enhances/autoFocusEnhance.js +46 -0
  756. package/lib/utils/enhances/autoFocusEnhance.js.map +1 -0
  757. package/lib/utils/enhances/autoFocusEnhance.mjs +38 -0
  758. package/lib/utils/enhances/autoFocusEnhance.mjs.map +1 -0
  759. package/lib/utils/enhances/contextEnhance.d.ts +3 -0
  760. package/lib/utils/enhances/contextEnhance.js +22 -0
  761. package/lib/utils/enhances/contextEnhance.js.map +1 -0
  762. package/lib/utils/enhances/contextEnhance.mjs +14 -0
  763. package/lib/utils/enhances/contextEnhance.mjs.map +1 -0
  764. package/lib/utils/enhances/i18nEnhance.d.ts +25 -0
  765. package/lib/utils/enhances/i18nEnhance.js +101 -0
  766. package/lib/utils/enhances/i18nEnhance.js.map +1 -0
  767. package/lib/utils/enhances/i18nEnhance.mjs +92 -0
  768. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -0
  769. package/lib/utils/enhances/keyboardFocusEnhance.d.ts +27 -0
  770. package/lib/utils/enhances/keyboardFocusEnhance.js +63 -0
  771. package/lib/utils/enhances/keyboardFocusEnhance.js.map +1 -0
  772. package/lib/utils/enhances/keyboardFocusEnhance.mjs +57 -0
  773. package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +1 -0
  774. package/lib/utils/enhances/resolveColorEnhance.d.ts +2 -0
  775. package/lib/utils/enhances/resolveColorEnhance.js +25 -0
  776. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -0
  777. package/lib/utils/enhances/resolveColorEnhance.mjs +17 -0
  778. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -0
  779. package/lib/utils/eventEmitter.d.ts +9 -0
  780. package/lib/utils/eventEmitter.js +41 -0
  781. package/lib/utils/eventEmitter.js.map +1 -0
  782. package/lib/utils/eventEmitter.mjs +34 -0
  783. package/lib/utils/eventEmitter.mjs.map +1 -0
  784. package/lib/utils/findComponent.d.ts +12 -0
  785. package/lib/utils/findComponent.js +106 -0
  786. package/lib/utils/findComponent.js.map +1 -0
  787. package/lib/utils/findComponent.mjs +95 -0
  788. package/lib/utils/findComponent.mjs.map +1 -0
  789. package/lib/utils/fire.d.ts +2 -0
  790. package/lib/utils/fire.js +23 -0
  791. package/lib/utils/fire.js.map +1 -0
  792. package/lib/utils/fire.mjs +15 -0
  793. package/lib/utils/fire.mjs.map +1 -0
  794. package/lib/utils/focus-lock/focusBorders.d.ts +4 -0
  795. package/lib/utils/focus-lock/focusBorders.js +72 -0
  796. package/lib/utils/focus-lock/focusBorders.js.map +1 -0
  797. package/lib/utils/focus-lock/focusBorders.mjs +62 -0
  798. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -0
  799. package/lib/utils/focus-lock/getFocusableIn.d.ts +1 -0
  800. package/lib/utils/focus-lock/getFocusableIn.js +26 -0
  801. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -0
  802. package/lib/utils/focus-lock/getFocusableIn.mjs +19 -0
  803. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -0
  804. package/lib/utils/focus-lock/isFocusInside.d.ts +1 -0
  805. package/lib/utils/focus-lock/isFocusInside.js +16 -0
  806. package/lib/utils/focus-lock/isFocusInside.js.map +1 -0
  807. package/lib/utils/focus-lock/isFocusInside.mjs +9 -0
  808. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -0
  809. package/lib/utils/focus-lock/isFocusable.d.ts +1 -0
  810. package/lib/utils/focus-lock/isFocusable.js +51 -0
  811. package/lib/utils/focus-lock/isFocusable.js.map +1 -0
  812. package/lib/utils/focus-lock/isFocusable.mjs +43 -0
  813. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -0
  814. package/lib/utils/focus-lock/setFocus.d.ts +1 -0
  815. package/lib/utils/focus-lock/setFocus.js +63 -0
  816. package/lib/utils/focus-lock/setFocus.js.map +1 -0
  817. package/lib/utils/focus-lock/setFocus.mjs +55 -0
  818. package/lib/utils/focus-lock/setFocus.mjs.map +1 -0
  819. package/lib/utils/getAccessibleName.d.ts +1 -0
  820. package/lib/utils/getAccessibleName.js +56 -0
  821. package/lib/utils/getAccessibleName.js.map +1 -0
  822. package/lib/utils/getAccessibleName.mjs +49 -0
  823. package/lib/utils/getAccessibleName.mjs.map +1 -0
  824. package/lib/utils/getDisplayName.d.ts +2 -0
  825. package/lib/utils/getDisplayName.js +10 -0
  826. package/lib/utils/getDisplayName.js.map +1 -0
  827. package/lib/utils/getDisplayName.mjs +4 -0
  828. package/lib/utils/getDisplayName.mjs.map +1 -0
  829. package/lib/utils/getEventTarget.d.ts +1 -0
  830. package/lib/utils/getEventTarget.js +53 -0
  831. package/lib/utils/getEventTarget.js.map +1 -0
  832. package/lib/utils/getEventTarget.mjs +45 -0
  833. package/lib/utils/getEventTarget.mjs.map +1 -0
  834. package/lib/utils/getOriginChildren.d.ts +2 -0
  835. package/lib/utils/getOriginChildren.js +18 -0
  836. package/lib/utils/getOriginChildren.js.map +1 -0
  837. package/lib/utils/getOriginChildren.mjs +10 -0
  838. package/lib/utils/getOriginChildren.mjs.map +1 -0
  839. package/lib/utils/getRandomInt.d.ts +1 -0
  840. package/lib/utils/getRandomInt.js +11 -0
  841. package/lib/utils/getRandomInt.js.map +1 -0
  842. package/lib/utils/getRandomInt.mjs +5 -0
  843. package/lib/utils/getRandomInt.mjs.map +1 -0
  844. package/lib/utils/getValue.d.ts +1 -0
  845. package/lib/utils/getValue.js +16 -0
  846. package/lib/utils/getValue.js.map +1 -0
  847. package/lib/utils/getValue.mjs +10 -0
  848. package/lib/utils/getValue.mjs.map +1 -0
  849. package/lib/utils/hasLabels.d.ts +7 -0
  850. package/lib/utils/hasLabels.js +47 -0
  851. package/lib/utils/hasLabels.js.map +1 -0
  852. package/lib/utils/hasLabels.mjs +39 -0
  853. package/lib/utils/hasLabels.mjs.map +1 -0
  854. package/lib/utils/hasParent.d.ts +1 -0
  855. package/lib/utils/hasParent.js +14 -0
  856. package/lib/utils/hasParent.js.map +1 -0
  857. package/lib/utils/hasParent.mjs +7 -0
  858. package/lib/utils/hasParent.mjs.map +1 -0
  859. package/lib/utils/if.d.ts +11 -0
  860. package/lib/utils/if.js +16 -0
  861. package/lib/utils/if.js.map +1 -0
  862. package/lib/utils/if.mjs +9 -0
  863. package/lib/utils/if.mjs.map +1 -0
  864. package/lib/utils/ifChildren.d.ts +8 -0
  865. package/lib/utils/ifChildren.js +17 -0
  866. package/lib/utils/ifChildren.js.map +1 -0
  867. package/lib/utils/ifChildren.mjs +10 -0
  868. package/lib/utils/ifChildren.mjs.map +1 -0
  869. package/lib/utils/injectStyle.d.ts +2 -0
  870. package/lib/utils/injectStyle.js +49 -0
  871. package/lib/utils/injectStyle.js.map +1 -0
  872. package/lib/utils/injectStyle.mjs +41 -0
  873. package/lib/utils/injectStyle.mjs.map +1 -0
  874. package/lib/utils/inputProps.d.ts +2 -0
  875. package/lib/utils/inputProps.js +22 -0
  876. package/lib/utils/inputProps.js.map +1 -0
  877. package/lib/utils/inputProps.mjs +14 -0
  878. package/lib/utils/inputProps.mjs.map +1 -0
  879. package/lib/utils/isNode.d.ts +1 -0
  880. package/lib/utils/isNode.js +28 -0
  881. package/lib/utils/isNode.js.map +1 -0
  882. package/lib/utils/isNode.mjs +21 -0
  883. package/lib/utils/isNode.mjs.map +1 -0
  884. package/lib/utils/isPromise.d.ts +1 -0
  885. package/lib/utils/isPromise.js +10 -0
  886. package/lib/utils/isPromise.js.map +1 -0
  887. package/lib/utils/isPromise.mjs +4 -0
  888. package/lib/utils/isPromise.mjs.map +1 -0
  889. package/lib/utils/isRetina.d.ts +1 -0
  890. package/lib/utils/isRetina.js +15 -0
  891. package/lib/utils/isRetina.js.map +1 -0
  892. package/lib/utils/isRetina.mjs +9 -0
  893. package/lib/utils/isRetina.mjs.map +1 -0
  894. package/lib/utils/logger.d.ts +9 -0
  895. package/lib/utils/logger.js +40 -0
  896. package/lib/utils/logger.js.map +1 -0
  897. package/lib/utils/logger.mjs +32 -0
  898. package/lib/utils/logger.mjs.map +1 -0
  899. package/lib/utils/numericChecker.d.ts +5 -0
  900. package/lib/utils/numericChecker.js +33 -0
  901. package/lib/utils/numericChecker.js.map +1 -0
  902. package/lib/utils/numericChecker.mjs +27 -0
  903. package/lib/utils/numericChecker.mjs.map +1 -0
  904. package/lib/utils/ownerDocument.d.ts +1 -0
  905. package/lib/utils/ownerDocument.js +10 -0
  906. package/lib/utils/ownerDocument.js.map +1 -0
  907. package/lib/utils/ownerDocument.mjs +4 -0
  908. package/lib/utils/ownerDocument.mjs.map +1 -0
  909. package/lib/utils/pick.d.ts +1 -0
  910. package/lib/utils/pick.js +19 -0
  911. package/lib/utils/pick.js.map +1 -0
  912. package/lib/utils/pick.mjs +13 -0
  913. package/lib/utils/pick.mjs.map +1 -0
  914. package/lib/utils/propsForElement.d.ts +3 -0
  915. package/lib/utils/propsForElement.js +59 -0
  916. package/lib/utils/propsForElement.js.map +1 -0
  917. package/lib/utils/propsForElement.mjs +50 -0
  918. package/lib/utils/propsForElement.mjs.map +1 -0
  919. package/lib/utils/rafTrottle.d.ts +2 -0
  920. package/lib/utils/rafTrottle.js +33 -0
  921. package/lib/utils/rafTrottle.js.map +1 -0
  922. package/lib/utils/rafTrottle.mjs +26 -0
  923. package/lib/utils/rafTrottle.mjs.map +1 -0
  924. package/lib/utils/reactToText.d.ts +3 -0
  925. package/lib/utils/reactToText.js +33 -0
  926. package/lib/utils/reactToText.js.map +1 -0
  927. package/lib/utils/reactToText.mjs +26 -0
  928. package/lib/utils/reactToText.mjs.map +1 -0
  929. package/lib/utils/ref.d.ts +8 -0
  930. package/lib/utils/ref.js +95 -0
  931. package/lib/utils/ref.js.map +1 -0
  932. package/lib/utils/ref.mjs +83 -0
  933. package/lib/utils/ref.mjs.map +1 -0
  934. package/lib/utils/setRef.d.ts +2 -0
  935. package/lib/utils/setRef.js +10 -0
  936. package/lib/utils/setRef.js.map +1 -0
  937. package/lib/utils/setRef.mjs +3 -0
  938. package/lib/utils/setRef.mjs.map +1 -0
  939. package/lib/utils/syncScroll.d.ts +1 -0
  940. package/lib/utils/syncScroll.js +61 -0
  941. package/lib/utils/syncScroll.js.map +1 -0
  942. package/lib/utils/syncScroll.mjs +54 -0
  943. package/lib/utils/syncScroll.mjs.map +1 -0
  944. package/lib/utils/uncontroll.d.ts +4 -0
  945. package/lib/utils/uncontroll.js +47 -0
  946. package/lib/utils/uncontroll.js.map +1 -0
  947. package/lib/utils/uncontroll.mjs +38 -0
  948. package/lib/utils/uncontroll.mjs.map +1 -0
  949. package/lib/utils/uniqueID.d.ts +12 -0
  950. package/lib/utils/uniqueID.js +42 -0
  951. package/lib/utils/uniqueID.js.map +1 -0
  952. package/lib/utils/uniqueID.mjs +33 -0
  953. package/lib/utils/uniqueID.mjs.map +1 -0
  954. package/lib/utils/use/useColorResolver.d.ts +1 -0
  955. package/lib/utils/use/useColorResolver.js +208 -0
  956. package/lib/utils/use/useColorResolver.js.map +1 -0
  957. package/lib/utils/use/useColorResolver.mjs +200 -0
  958. package/lib/utils/use/useColorResolver.mjs.map +1 -0
  959. package/lib/utils/use/useCss.d.ts +4 -0
  960. package/lib/utils/use/useCss.js +20 -0
  961. package/lib/utils/use/useCss.js.map +1 -0
  962. package/lib/utils/use/useCss.mjs +12 -0
  963. package/lib/utils/use/useCss.mjs.map +1 -0
  964. package/lib/utils/use/useEnhancedEffect.d.ts +3 -0
  965. package/lib/utils/use/useEnhancedEffect.js +13 -0
  966. package/lib/utils/use/useEnhancedEffect.js.map +1 -0
  967. package/lib/utils/use/useEnhancedEffect.mjs +5 -0
  968. package/lib/utils/use/useEnhancedEffect.mjs.map +1 -0
  969. package/lib/utils/use/useEventCallback.d.ts +4 -0
  970. package/lib/utils/use/useEventCallback.js +25 -0
  971. package/lib/utils/use/useEventCallback.js.map +1 -0
  972. package/lib/utils/use/useEventCallback.mjs +19 -0
  973. package/lib/utils/use/useEventCallback.mjs.map +1 -0
  974. package/lib/utils/use/useEventListener.d.ts +2 -0
  975. package/lib/utils/use/useEventListener.js +33 -0
  976. package/lib/utils/use/useEventListener.js.map +1 -0
  977. package/lib/utils/use/useEventListener.mjs +25 -0
  978. package/lib/utils/use/useEventListener.mjs.map +1 -0
  979. package/lib/utils/use/useFocusLock.d.ts +10 -0
  980. package/lib/utils/use/useFocusLock.js +289 -0
  981. package/lib/utils/use/useFocusLock.js.map +1 -0
  982. package/lib/utils/use/useFocusLock.mjs +266 -0
  983. package/lib/utils/use/useFocusLock.mjs.map +1 -0
  984. package/lib/utils/use/usePreventScroll.d.ts +2 -0
  985. package/lib/utils/use/usePreventScroll.js +78 -0
  986. package/lib/utils/use/usePreventScroll.js.map +1 -0
  987. package/lib/utils/use/usePreventScroll.mjs +70 -0
  988. package/lib/utils/use/usePreventScroll.mjs.map +1 -0
  989. package/lib/utils/useCssVariable.d.ts +8 -0
  990. package/lib/utils/useCssVariable.js +55 -0
  991. package/lib/utils/useCssVariable.js.map +1 -0
  992. package/lib/utils/useCssVariable.mjs +46 -0
  993. package/lib/utils/useCssVariable.mjs.map +1 -0
  994. package/lib/utils/zIndexStacking.d.ts +8 -0
  995. package/lib/utils/zIndexStacking.js +48 -0
  996. package/lib/utils/zIndexStacking.js.map +1 -0
  997. package/lib/utils/zIndexStacking.mjs +38 -0
  998. package/lib/utils/zIndexStacking.mjs.map +1 -0
  999. package/package.json +269 -7
  1000. package/tsconfig-utils.json +4 -0
  1001. package/vite.config.ts +15 -0
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+ var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _toPropertyKey2 = _interopRequireDefault(require("@babel/runtime/helpers/toPropertyKey"));
13
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+ var _assignProps = require("../utils/assignProps");
16
+ var _capitalizeFirstLetter = _interopRequireDefault(require("../utils/capitalizeFirstLetter"));
17
+ function assign(target, source) {
18
+ return Object.defineProperties(target, Object.keys(source).reduce(function (descriptors, key) {
19
+ descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
20
+ return descriptors;
21
+ }, {}));
22
+ }
23
+ function defaultProp(prop) {
24
+ return "default".concat((0, _capitalizeFirstLetter["default"])(prop));
25
+ }
26
+ function handlerProp(prop) {
27
+ if (prop === 'value') prop = '';
28
+ if (prop === 'checked') prop = '';
29
+ return "on".concat((0, _capitalizeFirstLetter["default"])(prop), "Change");
30
+ }
31
+ function isControlled(propValue) {
32
+ return propValue !== undefined;
33
+ }
34
+ function uncontrolledProp(self, propName, propValue, propDefaultValue, propHandler, chainHandler) {
35
+ function getValue() {
36
+ return isControlled(propValue) ? propValue : propName in self.state ? self.state[propName] : propDefaultValue;
37
+ }
38
+ return [getValue(), function (value) {
39
+ var oldValue = getValue();
40
+ if (oldValue === value) return false;
41
+ if (!isControlled(propValue)) self.setState((0, _defineProperty2["default"])({}, propName, value));
42
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
43
+ args[_key - 1] = arguments[_key];
44
+ }
45
+ return _assignProps.callAllEventHandlers.apply(void 0, [propHandler].concat((0, _toConsumableArray2["default"])(chainHandler))).apply(void 0, [value].concat(args));
46
+ }];
47
+ }
48
+ function uncontrolledUniversal(props, config, uncontrolledProp) {
49
+ var handlerProps = {};
50
+ var uncontrolledProps = Object.keys(config).reduce(function (result, propName) {
51
+ var _objectSpread2;
52
+ var handlerName = handlerProp(propName);
53
+ var defaultPropName = defaultProp(propName);
54
+ var propDefaultValue = result[defaultPropName],
55
+ propValue = result[propName],
56
+ propHandler = result[handlerName],
57
+ other = (0, _objectWithoutProperties2["default"])(result, [defaultPropName, propName, handlerName].map(_toPropertyKey2["default"]));
58
+ if (propDefaultValue === undefined) {
59
+ console.warn(defaultPropName, 'must be installed in "defaultProps"');
60
+ }
61
+
62
+ // if (typeof propDefaultValue === 'function' && propDefaultValue.defaultInit) {
63
+ // propDefaultValue = propDefaultValue(result);
64
+ // }
65
+
66
+ var setter = config[propName];
67
+ var chainHandler = [];
68
+ if (Array.isArray(setter)) {
69
+ var _setter = setter;
70
+ var _setter2 = (0, _toArray2["default"])(_setter);
71
+ setter = _setter2[0];
72
+ chainHandler = _setter2.slice(1);
73
+ }
74
+ setter = setter || function (v) {
75
+ return v;
76
+ };
77
+ var _uncontrolledProp = uncontrolledProp(propName, propValue, propDefaultValue, propHandler, chainHandler),
78
+ _uncontrolledProp2 = (0, _slicedToArray2["default"])(_uncontrolledProp, 2),
79
+ value = _uncontrolledProp2[0],
80
+ handler = _uncontrolledProp2[1];
81
+ // TODO: need to warn about recursion (by lsroman)
82
+ handlerProps[propName] = handler;
83
+ return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, other), {}, (_objectSpread2 = {}, (0, _defineProperty2["default"])(_objectSpread2, propName, value), (0, _defineProperty2["default"])(_objectSpread2, handlerName, function (eventOrValue) {
84
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
85
+ args[_key2 - 1] = arguments[_key2];
86
+ }
87
+ var result = [setter.apply(void 0, [eventOrValue].concat(args))].concat(args);
88
+ if (eventOrValue !== null && eventOrValue !== void 0 && eventOrValue.target) {
89
+ result.push(eventOrValue);
90
+ }
91
+ return handler.apply(void 0, (0, _toConsumableArray2["default"])(result));
92
+ }), _objectSpread2));
93
+ }, props);
94
+ return [uncontrolledProps, handlerProps];
95
+ }
96
+ function uncontrolled(self, props, config) {
97
+ return uncontrolledUniversal(props, config, uncontrolledProp.bind(undefined, self));
98
+ }
99
+ function Enhancement() {
100
+ return {
101
+ condition: function condition(Component) {
102
+ return Boolean(Component.prototype.uncontrolledProps);
103
+ },
104
+ init: function init() {
105
+ this.state = this.state || {};
106
+ assign(this, {
107
+ get handlers() {
108
+ var _uncontrolled = uncontrolled(this, this.props, this.uncontrolledProps()),
109
+ _uncontrolled2 = (0, _slicedToArray2["default"])(_uncontrolled, 2),
110
+ uncontrolledHandlers = _uncontrolled2[1];
111
+ return uncontrolledHandlers;
112
+ }
113
+ });
114
+ },
115
+ context: function context(_context) {
116
+ return (0, _objectSpread3["default"])((0, _objectSpread3["default"])({}, _context), {}, {
117
+ handlers: this.handlers
118
+ });
119
+ },
120
+ asProps: function asProps(props) {
121
+ // TODO: need to omit unneccessary props (by lsroman)
122
+ var _uncontrolled3 = uncontrolled(this, props, this.uncontrolledProps()),
123
+ _uncontrolled4 = (0, _slicedToArray2["default"])(_uncontrolled3, 1),
124
+ uncontrolledProps = _uncontrolled4[0];
125
+ return uncontrolledProps;
126
+ }
127
+ };
128
+ }
129
+ var _default = Enhancement;
130
+ exports["default"] = _default;
131
+ //# sourceMappingURL=uncontrolledProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uncontrolledProps.js","names":["_assignProps","require","_capitalizeFirstLetter","_interopRequireDefault","assign","target","source","Object","defineProperties","keys","reduce","descriptors","key","getOwnPropertyDescriptor","defaultProp","prop","concat","capitalizeFirstLetter","handlerProp","isControlled","propValue","undefined","uncontrolledProp","self","propName","propDefaultValue","propHandler","chainHandler","getValue","state","value","oldValue","setState","_defineProperty2","_len","arguments","length","args","Array","_key","callAllEventHandlers","apply","_toConsumableArray2","uncontrolledUniversal","props","config","handlerProps","uncontrolledProps","result","_objectSpread2","handlerName","defaultPropName","other","_objectWithoutProperties2","map","_toPropertyKey2","console","warn","setter","isArray","_setter","_setter2","_toArray2","slice","v","_uncontrolledProp","_uncontrolledProp2","_slicedToArray2","handler","_objectSpread3","eventOrValue","_len2","_key2","push","uncontrolled","bind","Enhancement","condition","Component","Boolean","prototype","init","handlers","_uncontrolled","_uncontrolled2","uncontrolledHandlers","context","asProps","_uncontrolled3","_uncontrolled4","_default","exports"],"sources":["../../src/enhancement/uncontrolledProps.tsx"],"sourcesContent":["import { callAllEventHandlers } from '../utils/assignProps';\nimport capitalizeFirstLetter from '../utils/capitalizeFirstLetter';\n\nfunction assign(target: any, source: any) {\n return Object.defineProperties(\n target,\n Object.keys(source).reduce((descriptors: any, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, {}),\n );\n}\n\nfunction defaultProp(prop: any) {\n return `default${capitalizeFirstLetter(prop)}`;\n}\n\nfunction handlerProp(prop: any) {\n if (prop === 'value') prop = '';\n if (prop === 'checked') prop = '';\n return `on${capitalizeFirstLetter(prop)}Change`;\n}\n\nfunction isControlled(propValue: any) {\n return propValue !== undefined;\n}\n\nfunction uncontrolledProp(\n self: any,\n propName: any,\n propValue: any,\n propDefaultValue: any,\n propHandler: any,\n chainHandler: any,\n) {\n function getValue() {\n return isControlled(propValue)\n ? propValue\n : propName in self.state\n ? self.state[propName]\n : propDefaultValue;\n }\n\n return [\n getValue(),\n (value: any, ...args: any[]) => {\n const oldValue = getValue();\n if (oldValue === value) return false;\n if (!isControlled(propValue)) self.setState({ [propName]: value });\n return callAllEventHandlers(propHandler, ...chainHandler)(value, ...args);\n },\n ];\n}\n\nfunction uncontrolledUniversal(props: any, config: any, uncontrolledProp: any) {\n const handlerProps = {};\n const uncontrolledProps = Object.keys(config).reduce((result, propName) => {\n const handlerName = handlerProp(propName);\n const defaultPropName = defaultProp(propName);\n const {\n [defaultPropName]: propDefaultValue,\n [propName]: propValue,\n [handlerName]: propHandler,\n ...other\n } = result;\n\n if (propDefaultValue === undefined) {\n console.warn(defaultPropName, 'must be installed in \"defaultProps\"');\n }\n\n // if (typeof propDefaultValue === 'function' && propDefaultValue.defaultInit) {\n // propDefaultValue = propDefaultValue(result);\n // }\n\n let setter = config[propName];\n let chainHandler = [];\n\n if (Array.isArray(setter)) [setter, ...chainHandler] = setter;\n setter = setter || ((v: any) => v);\n\n const [value, handler] = uncontrolledProp(\n propName,\n propValue,\n propDefaultValue,\n propHandler,\n chainHandler,\n );\n // TODO: need to warn about recursion (by lsroman)\n (handlerProps as any)[propName] = handler;\n\n return {\n ...other,\n [propName]: value,\n [handlerName]: (eventOrValue: any, ...args: any[]) => {\n const result = [setter(eventOrValue, ...args), ...args];\n if (eventOrValue?.target) {\n result.push(eventOrValue);\n }\n return handler(...result);\n },\n };\n }, props);\n return [uncontrolledProps, handlerProps];\n}\n\nfunction uncontrolled(self: any, props: any, config: any) {\n return uncontrolledUniversal(props, config, uncontrolledProp.bind(undefined, self));\n}\n\nfunction Enhancement() {\n return {\n condition: function (Component: any) {\n return Boolean(Component.prototype.uncontrolledProps);\n },\n init: function (this: any) {\n this.state = this.state || {};\n assign(this, {\n get handlers() {\n const [, uncontrolledHandlers] = uncontrolled(this, this.props, this.uncontrolledProps());\n return uncontrolledHandlers;\n },\n });\n },\n context: function (this: any, context: any) {\n return {\n ...context,\n handlers: this.handlers,\n };\n },\n asProps: function (this: any, props: any) {\n // TODO: need to omit unneccessary props (by lsroman)\n const [uncontrolledProps] = uncontrolled(this, props, this.uncontrolledProps());\n return uncontrolledPro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;MAAQ;IAE3B,CAAC;IACDK,OAAO,EAAE,SAAAA,QAAqB3C,KAAU,EAAE;MACxC;MACA,IAAA4C,cAAA,GAA4Bd,YAAY,CAAC,IAAI,EAAE9B,KAAK,EAAE,IAAI,CAACG,iBAAiB,EAAE,CAAC;QAAA0C,cAAA,OAAAtB,eAAA,aAAAqB,cAAA;QAAxEzC,iBAAiB,GAAA0C,cAAA;MACxB,OAAO1C,iBAAiB;IAC1B;EACF,CAAC;AACH;AAAC,IAAA2C,QAAA,GAEcd,WAAW;AAAAe,OAAA,cAAAD,QAAA"}
@@ -0,0 +1,123 @@
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import _toArray from "@babel/runtime/helpers/toArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ import _toPropertyKey from "@babel/runtime/helpers/toPropertyKey";
6
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
7
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ import { callAllEventHandlers } from "../utils/assignProps.mjs";
9
+ import capitalizeFirstLetter from "../utils/capitalizeFirstLetter.mjs";
10
+ function assign(target, source) {
11
+ return Object.defineProperties(target, Object.keys(source).reduce(function (descriptors, key) {
12
+ descriptors[key] = Object.getOwnPropertyDescriptor(source, key);
13
+ return descriptors;
14
+ }, {}));
15
+ }
16
+ function defaultProp(prop) {
17
+ return "default".concat(capitalizeFirstLetter(prop));
18
+ }
19
+ function handlerProp(prop) {
20
+ if (prop === 'value') prop = '';
21
+ if (prop === 'checked') prop = '';
22
+ return "on".concat(capitalizeFirstLetter(prop), "Change");
23
+ }
24
+ function isControlled(propValue) {
25
+ return propValue !== undefined;
26
+ }
27
+ function uncontrolledProp(self, propName, propValue, propDefaultValue, propHandler, chainHandler) {
28
+ function getValue() {
29
+ return isControlled(propValue) ? propValue : propName in self.state ? self.state[propName] : propDefaultValue;
30
+ }
31
+ return [getValue(), function (value) {
32
+ var oldValue = getValue();
33
+ if (oldValue === value) return false;
34
+ if (!isControlled(propValue)) self.setState(_defineProperty({}, propName, value));
35
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
36
+ args[_key - 1] = arguments[_key];
37
+ }
38
+ return callAllEventHandlers.apply(void 0, [propHandler].concat(_toConsumableArray(chainHandler))).apply(void 0, [value].concat(args));
39
+ }];
40
+ }
41
+ function uncontrolledUniversal(props, config, uncontrolledProp) {
42
+ var handlerProps = {};
43
+ var uncontrolledProps = Object.keys(config).reduce(function (result, propName) {
44
+ var _objectSpread2;
45
+ var handlerName = handlerProp(propName);
46
+ var defaultPropName = defaultProp(propName);
47
+ var propDefaultValue = result[defaultPropName],
48
+ propValue = result[propName],
49
+ propHandler = result[handlerName],
50
+ other = _objectWithoutProperties(result, [defaultPropName, propName, handlerName].map(_toPropertyKey));
51
+ if (propDefaultValue === undefined) {
52
+ console.warn(defaultPropName, 'must be installed in "defaultProps"');
53
+ }
54
+
55
+ // if (typeof propDefaultValue === 'function' && propDefaultValue.defaultInit) {
56
+ // propDefaultValue = propDefaultValue(result);
57
+ // }
58
+
59
+ var setter = config[propName];
60
+ var chainHandler = [];
61
+ if (Array.isArray(setter)) {
62
+ var _setter = setter;
63
+ var _setter2 = _toArray(_setter);
64
+ setter = _setter2[0];
65
+ chainHandler = _setter2.slice(1);
66
+ }
67
+ setter = setter || function (v) {
68
+ return v;
69
+ };
70
+ var _uncontrolledProp = uncontrolledProp(propName, propValue, propDefaultValue, propHandler, chainHandler),
71
+ _uncontrolledProp2 = _slicedToArray(_uncontrolledProp, 2),
72
+ value = _uncontrolledProp2[0],
73
+ handler = _uncontrolledProp2[1];
74
+ // TODO: need to warn about recursion (by lsroman)
75
+ handlerProps[propName] = handler;
76
+ return _objectSpread(_objectSpread({}, other), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, propName, value), _defineProperty(_objectSpread2, handlerName, function (eventOrValue) {
77
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
78
+ args[_key2 - 1] = arguments[_key2];
79
+ }
80
+ var result = [setter.apply(void 0, [eventOrValue].concat(args))].concat(args);
81
+ if (eventOrValue !== null && eventOrValue !== void 0 && eventOrValue.target) {
82
+ result.push(eventOrValue);
83
+ }
84
+ return handler.apply(void 0, _toConsumableArray(result));
85
+ }), _objectSpread2));
86
+ }, props);
87
+ return [uncontrolledProps, handlerProps];
88
+ }
89
+ function uncontrolled(self, props, config) {
90
+ return uncontrolledUniversal(props, config, uncontrolledProp.bind(undefined, self));
91
+ }
92
+ function Enhancement() {
93
+ return {
94
+ condition: function condition(Component) {
95
+ return Boolean(Component.prototype.uncontrolledProps);
96
+ },
97
+ init: function init() {
98
+ this.state = this.state || {};
99
+ assign(this, {
100
+ get handlers() {
101
+ var _uncontrolled = uncontrolled(this, this.props, this.uncontrolledProps()),
102
+ _uncontrolled2 = _slicedToArray(_uncontrolled, 2),
103
+ uncontrolledHandlers = _uncontrolled2[1];
104
+ return uncontrolledHandlers;
105
+ }
106
+ });
107
+ },
108
+ context: function context(_context) {
109
+ return _objectSpread(_objectSpread({}, _context), {}, {
110
+ handlers: this.handlers
111
+ });
112
+ },
113
+ asProps: function asProps(props) {
114
+ // TODO: need to omit unneccessary props (by lsroman)
115
+ var _uncontrolled3 = uncontrolled(this, props, this.uncontrolledProps()),
116
+ _uncontrolled4 = _slicedToArray(_uncontrolled3, 1),
117
+ uncontrolledProps = _uncontrolled4[0];
118
+ return uncontrolledProps;
119
+ }
120
+ };
121
+ }
122
+ export default Enhancement;
123
+ //# sourceMappingURL=uncontrolledProps.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uncontrolledProps.mjs","names":["callAllEventHandlers","capitalizeFirstLetter","assign","target","source","Object","defineProperties","keys","reduce","descriptors","key","getOwnPropertyDescriptor","defaultProp","prop","concat","handlerProp","isControlled","propValue","undefined","uncontrolledProp","self","propName","propDefaultValue","propHandler","chainHandler","getValue","state","value","oldValue","setState","_defineProperty","_len","arguments","length","args","Array","_key","apply","_toConsumableArray","uncontrolledUniversal","props","config","handlerProps","uncontrolledProps","result","_objectSpread2","handlerName","defaultPropName","other","_objectWithoutProperties","map","_toPropertyKey","console","warn","setter","isArray","_setter","_setter2","_toArray","slice","v","_uncontrolledProp","_uncontrolledProp2","_slicedToArray","handler","_objectSpread","eventOrValue","_len2","_key2","push","uncontrolled","bind","Enhancement","condition","Component","Boolean","prototype","init","handlers","_uncontrolled","_uncontrolled2","uncontrolledHandlers","context","asProps","_uncontrolled3","_uncontrolled4"],"sources":["../../src/enhancement/uncontrolledProps.tsx"],"sourcesContent":["import { callAllEventHandlers } from '../utils/assignProps';\nimport capitalizeFirstLetter from '../utils/capitalizeFirstLetter';\n\nfunction assign(target: any, source: any) {\n return Object.defineProperties(\n target,\n Object.keys(source).reduce((descriptors: any, key) => {\n descriptors[key] = Object.getOwnPropertyDescriptor(source, key);\n return descriptors;\n }, {}),\n );\n}\n\nfunction defaultProp(prop: any) {\n return `default${capitalizeFirstLetter(prop)}`;\n}\n\nfunction handlerProp(prop: any) {\n if (prop === 'value') prop = '';\n if (prop === 'checked') prop = '';\n return `on${capitalizeFirstLetter(prop)}Change`;\n}\n\nfunction isControlled(propValue: any) {\n return propValue !== undefined;\n}\n\nfunction uncontrolledProp(\n self: any,\n propName: any,\n propValue: any,\n propDefaultValue: any,\n propHandler: any,\n chainHandler: any,\n) {\n function getValue() {\n return isControlled(propValue)\n ? propValue\n : propName in self.state\n ? self.state[propName]\n : propDefaultValue;\n }\n\n return [\n getValue(),\n (value: any, ...args: any[]) => {\n const oldValue = getValue();\n if (oldValue === value) return false;\n if (!isControlled(propValue)) self.setState({ [propName]: value });\n return callAllEventHandlers(propHandler, ...chainHandler)(value, ...args);\n },\n ];\n}\n\nfunction uncontrolledUniversal(props: any, config: any, uncontrolledProp: any) {\n const handlerProps = {};\n const uncontrolledProps = Object.keys(config).reduce((result, propName) => {\n const handlerName = handlerProp(propName);\n const defaultPropName = defaultProp(propName);\n const {\n [defaultPropName]: propDefaultValue,\n [propName]: propValue,\n [handlerName]: propHandler,\n ...other\n } = result;\n\n if (propDefaultValue === undefined) {\n console.warn(defaultPropName, 'must be installed in \"defaultProps\"');\n }\n\n // if (typeof propDefaultValue === 'function' && propDefaultValue.defaultInit) {\n // propDefaultValue = propDefaultValue(result);\n // }\n\n let setter = config[propName];\n let chainHandler = [];\n\n if (Array.isArray(setter)) [setter, ...chainHandler] = setter;\n setter = setter || ((v: any) => v);\n\n const [value, handler] = uncontrolledProp(\n propName,\n propValue,\n propDefaultValue,\n propHandler,\n chainHandler,\n );\n // TODO: need to warn about recursion (by lsroman)\n (handlerProps as any)[propName] = handler;\n\n return {\n ...other,\n [propName]: value,\n [handlerName]: (eventOrValue: any, ...args: any[]) => {\n const result = [setter(eventOrValue, ...args), ...args];\n if (eventOrValue?.target) {\n result.push(eventOrValue);\n }\n return handler(...result);\n },\n };\n }, props);\n return [uncontrolledProps, handlerProps];\n}\n\nfunction uncontrolled(self: any, props: any, config: any) {\n return uncontrolledUniversal(props, config, uncontrolledProp.bind(undefined, self));\n}\n\nfunction Enhancement() {\n return {\n condition: function (Component: any) {\n return Boolean(Component.prototype.uncontrolledProps);\n },\n init: function (this: any) {\n this.state = this.state || {};\n assign(this, {\n get handlers() {\n const [, uncontrolledHandlers] = uncontrolled(this, this.props, this.uncontrolledProps());\n return uncontrolledHandlers;\n },\n });\n },\n context: function (this: any, context: any) {\n return {\n ...context,\n handlers: this.handlers,\n };\n },\n asProps: function (this: any, props: any) {\n // TODO: need to omit unneccessary props (by lsroman)\n const [uncontrolledProps] = uncontrolled(this, props, this.uncontrolledProps());\n return uncontrolledProps;\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;;AAAA,SAASA,oBAAoB,QAAQ,0BAAsB;AAC3D,OAAOC,qBAAqB,MAAM,oCAAgC;A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B,EAAE,CAAC;QAAA0C,cAAA,GAAAtB,cAAA,CAAAqB,cAAA;QAAxEzC,iBAAiB,GAAA0C,cAAA;MACxB,OAAO1C,iBAAiB;IAC1B;EACF,CAAC;AACH;AAEA,eAAe6B,WAAW"}
@@ -0,0 +1,49 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import canUseDOM from './utils/canUseDOM';
5
+ var LastInteractionType = /*#__PURE__*/function () {
6
+ function LastInteractionType() {
7
+ _classCallCheck(this, LastInteractionType);
8
+ _defineProperty(this, "lastFocusSource", 'none');
9
+ this.handleKeyDown = this.handleKeyDown.bind(this);
10
+ this.handleMouseDown = this.handleMouseDown.bind(this);
11
+ if (canUseDOM()) {
12
+ document.addEventListener('mousedown', this.handleMouseDown, {
13
+ capture: true
14
+ });
15
+ document.addEventListener('keydown', this.handleKeyDown, {
16
+ capture: true
17
+ });
18
+ }
19
+ }
20
+ _createClass(LastInteractionType, [{
21
+ key: "type",
22
+ get: function get() {
23
+ return this.lastFocusSource;
24
+ }
25
+ }, {
26
+ key: "isKeyboard",
27
+ value: function isKeyboard() {
28
+ return this.lastFocusSource === 'keyboard';
29
+ }
30
+ }, {
31
+ key: "isMouse",
32
+ value: function isMouse() {
33
+ return this.lastFocusSource === 'mouse';
34
+ }
35
+ }, {
36
+ key: "handleMouseDown",
37
+ value: function handleMouseDown() {
38
+ this.lastFocusSource = 'mouse';
39
+ }
40
+ }, {
41
+ key: "handleKeyDown",
42
+ value: function handleKeyDown() {
43
+ this.lastFocusSource = 'keyboard';
44
+ }
45
+ }]);
46
+ return LastInteractionType;
47
+ }();
48
+ export var lastInteraction = new LastInteractionType();
49
+ //# sourceMappingURL=LastInteractionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LastInteractionType.js","names":["canUseDOM","LastInteractionType","_classCallCheck","_defineProperty","handleKeyDown","bind","handleMouseDown","document","addEventListener","capture","_createClass","key","get","lastFocusSource","value","isKeyboard","isMouse","lastInteraction"],"sources":["../../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";;;AAAA,OAAOA,SAAS,MAAM,mBAAmB;AAAC,IAEpCC,mBAAmB;EAGvB,SAAAA,oBAAA,EAAc;IAAAC,eAAA,OAAAD,mBAAA;IAAAE,eAAA,0BAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAIL,SAAS,EAAE,EAAE;MACfO,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACF,eAAe,EAAE;QAAEG,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACJ,aAAa,EAAE;QAAEK,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAACC,YAAA,CAAAT,mBAAA;IAAAU,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAkB;MAChB,OAAO,IAAI,CAACC,eAAe;IAC7B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAAC,WAAA,EAAoB;MAClB,OAAO,IAAI,CAACF,eAAe,KAAK,UAAU;IAC5C;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAAE,QAAA,EAAiB;MACf,OAAO,IAAI,CAACH,eAAe,KAAK,OAAO;IACzC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAAR,gBAAA,EAA0B;MACxB,IAAI,CAACO,eAAe,GAAG,OAAO;IAChC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAAV,cAAA,EAAwB;MACtB,IAAI,CAACS,eAAe,GAAG,UAAU;IACnC;EAAC;EAAA,OAAAZ,mBAAA;AAAA;AAGH,OAAO,IAAMgB,eAAe,GAAG,IAAIhB,mBAAmB,EAAE"}
@@ -0,0 +1,54 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
+ import { PureComponent } from 'react';
8
+ import { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';
9
+
10
+ /** @deprecated */
11
+
12
+ var Root = undefined;
13
+ export { Root };
14
+
15
+ /** @deprecated */
16
+ var RootComponent = /*#__PURE__*/function (_PureComponent) {
17
+ _inherits(RootComponent, _PureComponent);
18
+ var _super = _createSuper(RootComponent);
19
+ function RootComponent() {
20
+ var _this;
21
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
22
+ args[_key] = arguments[_key];
23
+ }
24
+ _classCallCheck(this, RootComponent);
25
+ _this = _super.call.apply(_super, [this].concat(args));
26
+ _defineProperty(_assertThisInitialized(_this), "Root", undefined);
27
+ _defineProperty(_assertThisInitialized(_this), "isControlled", false);
28
+ return _this;
29
+ }
30
+ _createClass(RootComponent, [{
31
+ key: "handlers",
32
+ get: function get() {
33
+ return {};
34
+ }
35
+ }, {
36
+ key: "asProps",
37
+ get: function get() {
38
+ return {};
39
+ }
40
+ }]);
41
+ return RootComponent;
42
+ }(PureComponent);
43
+ export var Component = RootComponent;
44
+ /** @deprecated */
45
+
46
+ export var Intergalactic;
47
+ (function (_Intergalactic) {
48
+ var InternalTypings;
49
+ (function (_InternalTypings) {})(InternalTypings || (InternalTypings = _Intergalactic.InternalTypings || (_Intergalactic.InternalTypings = {})));
50
+ })(Intergalactic || (Intergalactic = {}));
51
+ export var wrapIntergalacticComponent = function wrapIntergalacticComponent(wrapper) {
52
+ return wrapper;
53
+ };
54
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_len","arguments","length","args","Array","_key","_classCallCheck","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance>,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;AAAA,SAGEA,aAAa,QAIR,OAAO;AAEd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,WAAW;;AAE5D;;AAiFA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAC,eAAA,OAAAZ,aAAA;IAAAK,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAN,IAAA;IAAAO,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,WAqBbN,SAAS;IAAAiB,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAa,YAAA,CAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAjBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IAQX;EAAC;EAAA,OAAApB,aAAA;AAAA,EAdOL,aAAa;AAqBvB,OAAO,IAAM0B,SAAS,GAAGrB,aAAa;AACtC;;AAgBA,WAAAsB,aAAA;AAyLC,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA7JkBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAbA,aAAa;AA2L9B,OAAO,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=UnknownProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnknownProperties.js","names":[],"sources":["../../../src/core-types/UnknownProperties.ts"],"sourcesContent":["export type UnknownProperties = {\n [key: string]: unknown;\n};\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=reshadow.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reshadow.d.js","names":[],"sources":["../../../src/core-types/reshadow.d.ts"],"sourcesContent":["declare module 'hoist-non-react-statics' {\n const hoistNonReactStatics: any;\n export default hoistNonReactStatics;\n}\n"],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export var CORE_COMPONENT = Symbol('CORE_COMPONENT');
2
+ export var CORE_INSTANCE = Symbol('CORE_INSTANCE');
3
+ export var CORE_AS_PROPS = Symbol('CORE_AS_PROPS');
4
+ export var CORE_INIT = Symbol('CORE_INIT');
5
+ export var CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');
6
+ export var CREATE_COMPONENT = Symbol('CREATE_COMPONENT');
7
+ export var PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');
8
+ export var CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');
9
+ export var INHERITED_NAME = Symbol('INHERITED_NAME');
10
+ //# sourceMappingURL=symbols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.js","names":["CORE_COMPONENT","Symbol","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":"AAAA,OAAO,IAAMA,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AACtD,OAAO,IAAMC,aAAa,GAAGD,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,IAAME,aAAa,GAAGF,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,IAAMG,SAAS,GAAGH,MAAM,CAAC,WAAW,CAAC;AAC5C,OAAO,IAAMI,iBAAiB,GAAGJ,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,IAAMK,gBAAgB,GAAGL,MAAM,CAAC,kBAAkB,CAAC;AAC1D,OAAO,IAAMM,iBAAiB,GAAGN,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,IAAMO,kBAAkB,GAAGP,MAAM,CAAC,oBAAoB,CAAC;AAC9D,OAAO,IAAMQ,cAAc,GAAGR,MAAM,CAAC,gBAAgB,CAAC"}