@semcore/core 16.5.1 → 17.0.0-prerelease.17

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 (427) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/README.md +4 -4
  3. package/lib/LastInteractionType.js +22 -36
  4. package/lib/LastInteractionType.js.map +1 -1
  5. package/lib/LastInteractionType.mjs +19 -33
  6. package/lib/LastInteractionType.mjs.map +1 -1
  7. package/lib/core-types/Component.d.ts +26 -79
  8. package/lib/core-types/Component.js +24 -72
  9. package/lib/core-types/Component.js.map +1 -1
  10. package/lib/core-types/Component.mjs +18 -34
  11. package/lib/core-types/Component.mjs.map +1 -1
  12. package/lib/core-types/symbols.js +9 -9
  13. package/lib/core-types/symbols.js.map +1 -1
  14. package/lib/core-types/symbols.mjs +9 -9
  15. package/lib/core-types/symbols.mjs.map +1 -1
  16. package/lib/coreFactory.d.ts +6 -23
  17. package/lib/coreFactory.js +150 -217
  18. package/lib/coreFactory.js.map +1 -1
  19. package/lib/coreFactory.mjs +139 -194
  20. package/lib/coreFactory.mjs.map +1 -1
  21. package/lib/decorators/propsObserver.d.ts +11 -0
  22. package/lib/decorators/reactive.d.ts +11 -0
  23. package/lib/enhancement/Children.js +51 -59
  24. package/lib/enhancement/Children.js.map +1 -1
  25. package/lib/enhancement/Children.mjs +47 -41
  26. package/lib/enhancement/Children.mjs.map +1 -1
  27. package/lib/enhancement/Root.js +36 -37
  28. package/lib/enhancement/Root.js.map +1 -1
  29. package/lib/enhancement/Root.mjs +28 -18
  30. package/lib/enhancement/Root.mjs.map +1 -1
  31. package/lib/enhancement/dataName.js +7 -8
  32. package/lib/enhancement/dataName.js.map +1 -1
  33. package/lib/enhancement/dataName.mjs +5 -5
  34. package/lib/enhancement/dataName.mjs.map +1 -1
  35. package/lib/enhancement/enhance.js +6 -9
  36. package/lib/enhancement/enhance.js.map +1 -1
  37. package/lib/enhancement/enhance.mjs +5 -7
  38. package/lib/enhancement/enhance.mjs.map +1 -1
  39. package/lib/enhancement/functionDefaultProps.js +6 -6
  40. package/lib/enhancement/functionDefaultProps.js.map +1 -1
  41. package/lib/enhancement/functionDefaultProps.mjs +4 -4
  42. package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
  43. package/lib/enhancement/i18n.js +13 -13
  44. package/lib/enhancement/i18n.js.map +1 -1
  45. package/lib/enhancement/i18n.mjs +10 -9
  46. package/lib/enhancement/i18n.mjs.map +1 -1
  47. package/lib/enhancement/inheritedName.js +7 -8
  48. package/lib/enhancement/inheritedName.js.map +1 -1
  49. package/lib/enhancement/inheritedName.mjs +5 -5
  50. package/lib/enhancement/inheritedName.mjs.map +1 -1
  51. package/lib/enhancement/staticChildren.js +47 -56
  52. package/lib/enhancement/staticChildren.js.map +1 -1
  53. package/lib/enhancement/staticChildren.mjs +43 -48
  54. package/lib/enhancement/staticChildren.mjs.map +1 -1
  55. package/lib/enhancement/style.js +29 -27
  56. package/lib/enhancement/style.js.map +1 -1
  57. package/lib/enhancement/style.mjs +26 -20
  58. package/lib/enhancement/style.mjs.map +1 -1
  59. package/lib/enhancement/uncontrolledProps.js +46 -64
  60. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  61. package/lib/enhancement/uncontrolledProps.mjs +43 -51
  62. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  63. package/lib/esm/LastInteractionType.mjs +19 -33
  64. package/lib/esm/core-types/Component.mjs +18 -34
  65. package/lib/esm/core-types/symbols.mjs +9 -9
  66. package/lib/esm/coreFactory.mjs +139 -194
  67. package/lib/esm/enhancement/Children.mjs +47 -41
  68. package/lib/esm/enhancement/Root.mjs +28 -18
  69. package/lib/esm/enhancement/dataName.mjs +5 -5
  70. package/lib/esm/enhancement/enhance.mjs +5 -7
  71. package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
  72. package/lib/esm/enhancement/i18n.mjs +10 -9
  73. package/lib/esm/enhancement/inheritedName.mjs +5 -5
  74. package/lib/esm/enhancement/staticChildren.mjs +43 -48
  75. package/lib/esm/enhancement/style.mjs +26 -20
  76. package/lib/esm/enhancement/uncontrolledProps.mjs +43 -51
  77. package/lib/esm/register.mjs +12 -20
  78. package/lib/esm/styled/reshadow-core.mjs +98 -111
  79. package/lib/esm/styled/sstyled.mjs +31 -41
  80. package/lib/esm/utils/assignProps.mjs +32 -36
  81. package/lib/esm/utils/enhances/WithI18n.mjs +16 -63
  82. package/lib/esm/utils/enhances/i18nEnhance.mjs +47 -61
  83. package/lib/esm/utils/logger.mjs +13 -21
  84. package/lib/esm/utils/pick.mjs +4 -4
  85. package/lib/esm/utils/ref.mjs +27 -57
  86. package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
  87. package/lib/index.d.ts +3 -3
  88. package/lib/index.js +17 -17
  89. package/lib/index.js.map +1 -1
  90. package/lib/index.mjs.map +1 -1
  91. package/lib/register.js +17 -24
  92. package/lib/register.js.map +1 -1
  93. package/lib/register.mjs +12 -20
  94. package/lib/register.mjs.map +1 -1
  95. package/lib/styled/index.d.ts +1 -5
  96. package/lib/styled/index.js +4 -4
  97. package/lib/styled/index.js.map +1 -1
  98. package/lib/styled/index.mjs.map +1 -1
  99. package/lib/styled/reshadow-core.js +102 -104
  100. package/lib/styled/reshadow-core.js.map +1 -1
  101. package/lib/styled/reshadow-core.mjs +98 -111
  102. package/lib/styled/reshadow-core.mjs.map +1 -1
  103. package/lib/styled/sstyled.js +31 -53
  104. package/lib/styled/sstyled.js.map +1 -1
  105. package/lib/styled/sstyled.mjs +31 -41
  106. package/lib/styled/sstyled.mjs.map +1 -1
  107. package/lib/theme/processor.js +150 -222
  108. package/lib/theme/processor.js.map +1 -1
  109. package/lib/theme/processor.mjs +148 -221
  110. package/lib/theme/processor.mjs.map +1 -1
  111. package/lib/theme/themes/dark.js +2 -2
  112. package/lib/theme/themes/dark.js.map +1 -1
  113. package/lib/theme/themes/default.js +2 -2
  114. package/lib/theme/themes/default.js.map +1 -1
  115. package/lib/theme/themes/highlights-dark.js +2 -2
  116. package/lib/theme/themes/highlights-dark.js.map +1 -1
  117. package/lib/theme/themes/highlights-light.js +2 -2
  118. package/lib/theme/themes/highlights-light.js.map +1 -1
  119. package/lib/theme/themes/light.js +2 -2
  120. package/lib/theme/themes/light.js.map +1 -1
  121. package/lib/theme/utils.js +140 -215
  122. package/lib/theme/utils.js.map +1 -1
  123. package/lib/theme/utils.mjs +135 -214
  124. package/lib/theme/utils.mjs.map +1 -1
  125. package/lib/utils/CSSinJS.js +8 -10
  126. package/lib/utils/CSSinJS.js.map +1 -1
  127. package/lib/utils/CSSinJS.mjs +6 -7
  128. package/lib/utils/CSSinJS.mjs.map +1 -1
  129. package/lib/utils/ThemeProvider.js +44 -51
  130. package/lib/utils/ThemeProvider.js.map +1 -1
  131. package/lib/utils/ThemeProvider.mjs +36 -47
  132. package/lib/utils/ThemeProvider.mjs.map +1 -1
  133. package/lib/utils/addonText.js +4 -7
  134. package/lib/utils/addonText.js.map +1 -1
  135. package/lib/utils/addonText.mjs +2 -5
  136. package/lib/utils/addonText.mjs.map +1 -1
  137. package/lib/utils/addonTextChildren.js +15 -21
  138. package/lib/utils/addonTextChildren.js.map +1 -1
  139. package/lib/utils/addonTextChildren.mjs +7 -13
  140. package/lib/utils/addonTextChildren.mjs.map +1 -1
  141. package/lib/utils/ariaProps.js +7 -5
  142. package/lib/utils/ariaProps.js.map +1 -1
  143. package/lib/utils/ariaProps.mjs +7 -5
  144. package/lib/utils/ariaProps.mjs.map +1 -1
  145. package/lib/utils/assignProps.js +33 -37
  146. package/lib/utils/assignProps.js.map +1 -1
  147. package/lib/utils/assignProps.mjs +32 -36
  148. package/lib/utils/assignProps.mjs.map +1 -1
  149. package/lib/utils/canUseDOM.js +1 -1
  150. package/lib/utils/capitalizeFirstLetter.js +1 -1
  151. package/lib/utils/color.js +72 -95
  152. package/lib/utils/color.js.map +1 -1
  153. package/lib/utils/color.mjs +71 -94
  154. package/lib/utils/color.mjs.map +1 -1
  155. package/lib/utils/compose.js +3 -12
  156. package/lib/utils/compose.js.map +1 -1
  157. package/lib/utils/compose.mjs +2 -11
  158. package/lib/utils/compose.mjs.map +1 -1
  159. package/lib/utils/createUUID.js +5 -5
  160. package/lib/utils/createUUID.js.map +1 -1
  161. package/lib/utils/createUUID.mjs +4 -4
  162. package/lib/utils/createUUID.mjs.map +1 -1
  163. package/lib/utils/cssToIntDefault.js +3 -4
  164. package/lib/utils/cssToIntDefault.js.map +1 -1
  165. package/lib/utils/cssToIntDefault.mjs +2 -3
  166. package/lib/utils/cssToIntDefault.mjs.map +1 -1
  167. package/lib/utils/enhances/WithCSS.d.ts +2 -30
  168. package/lib/utils/enhances/WithCSS.js +13 -64
  169. package/lib/utils/enhances/WithCSS.js.map +1 -1
  170. package/lib/utils/enhances/WithCSS.mjs +9 -59
  171. package/lib/utils/enhances/WithCSS.mjs.map +1 -1
  172. package/lib/utils/enhances/WithI18n.d.ts +1 -30
  173. package/lib/utils/enhances/WithI18n.js +20 -76
  174. package/lib/utils/enhances/WithI18n.js.map +1 -1
  175. package/lib/utils/enhances/WithI18n.mjs +16 -63
  176. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  177. package/lib/utils/enhances/a11yEnhance.js +34 -39
  178. package/lib/utils/enhances/a11yEnhance.js.map +1 -1
  179. package/lib/utils/enhances/a11yEnhance.mjs +32 -36
  180. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
  181. package/lib/utils/enhances/animatedSizeEnhance.d.ts +0 -4
  182. package/lib/utils/enhances/animatedSizeEnhance.js +55 -65
  183. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  184. package/lib/utils/enhances/animatedSizeEnhance.mjs +50 -61
  185. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  186. package/lib/utils/enhances/contextEnhance.js +12 -11
  187. package/lib/utils/enhances/contextEnhance.js.map +1 -1
  188. package/lib/utils/enhances/contextEnhance.mjs +9 -8
  189. package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
  190. package/lib/utils/enhances/i18nEnhance.d.ts +0 -4
  191. package/lib/utils/enhances/i18nEnhance.js +51 -69
  192. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  193. package/lib/utils/enhances/i18nEnhance.mjs +47 -61
  194. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  195. package/lib/utils/enhances/resolveColorEnhance.js +12 -10
  196. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
  197. package/lib/utils/enhances/resolveColorEnhance.mjs +8 -6
  198. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
  199. package/lib/utils/eventEmitter.d.ts +10 -6
  200. package/lib/utils/eventEmitter.js +33 -32
  201. package/lib/utils/eventEmitter.js.map +1 -1
  202. package/lib/utils/eventEmitter.mjs +30 -31
  203. package/lib/utils/eventEmitter.mjs.map +1 -1
  204. package/lib/utils/findComponent.js +35 -42
  205. package/lib/utils/findComponent.js.map +1 -1
  206. package/lib/utils/findComponent.mjs +26 -33
  207. package/lib/utils/findComponent.mjs.map +1 -1
  208. package/lib/utils/fire.js +7 -13
  209. package/lib/utils/fire.js.map +1 -1
  210. package/lib/utils/fire.mjs +5 -11
  211. package/lib/utils/fire.mjs.map +1 -1
  212. package/lib/utils/focus-lock/focusBorders.js +28 -32
  213. package/lib/utils/focus-lock/focusBorders.js.map +1 -1
  214. package/lib/utils/focus-lock/focusBorders.mjs +26 -32
  215. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
  216. package/lib/utils/focus-lock/getFocusableIn.js +4 -6
  217. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
  218. package/lib/utils/focus-lock/getFocusableIn.mjs +3 -6
  219. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
  220. package/lib/utils/focus-lock/isFocusInside.js +5 -6
  221. package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
  222. package/lib/utils/focus-lock/isFocusInside.mjs +4 -6
  223. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
  224. package/lib/utils/focus-lock/isFocusable.js +9 -12
  225. package/lib/utils/focus-lock/isFocusable.js.map +1 -1
  226. package/lib/utils/focus-lock/isFocusable.mjs +8 -11
  227. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
  228. package/lib/utils/focus-lock/setFocus.js +21 -27
  229. package/lib/utils/focus-lock/setFocus.js.map +1 -1
  230. package/lib/utils/focus-lock/setFocus.mjs +19 -25
  231. package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
  232. package/lib/utils/getAccessibleName.js +10 -22
  233. package/lib/utils/getAccessibleName.js.map +1 -1
  234. package/lib/utils/getAccessibleName.mjs +10 -21
  235. package/lib/utils/getAccessibleName.mjs.map +1 -1
  236. package/lib/utils/getDisplayName.js +1 -1
  237. package/lib/utils/getDisplayName.mjs +3 -5
  238. package/lib/utils/getEventTarget.js +13 -32
  239. package/lib/utils/getEventTarget.js.map +1 -1
  240. package/lib/utils/getEventTarget.mjs +12 -31
  241. package/lib/utils/getEventTarget.mjs.map +1 -1
  242. package/lib/utils/getOriginChildren.js +4 -4
  243. package/lib/utils/getOriginChildren.js.map +1 -1
  244. package/lib/utils/getRandomInt.js +1 -1
  245. package/lib/utils/getValue.js +4 -6
  246. package/lib/utils/getValue.js.map +1 -1
  247. package/lib/utils/getValue.mjs +3 -5
  248. package/lib/utils/getValue.mjs.map +1 -1
  249. package/lib/utils/hasLabels.js +16 -27
  250. package/lib/utils/hasLabels.js.map +1 -1
  251. package/lib/utils/hasLabels.mjs +14 -24
  252. package/lib/utils/hasLabels.mjs.map +1 -1
  253. package/lib/utils/hasParent.js +3 -2
  254. package/lib/utils/hasParent.js.map +1 -1
  255. package/lib/utils/hasParent.mjs +2 -3
  256. package/lib/utils/hasParent.mjs.map +1 -1
  257. package/lib/utils/ifChildren.js +6 -4
  258. package/lib/utils/ifChildren.js.map +1 -1
  259. package/lib/utils/ifChildren.mjs +4 -2
  260. package/lib/utils/ifChildren.mjs.map +1 -1
  261. package/lib/utils/injectStyle.js +11 -13
  262. package/lib/utils/injectStyle.js.map +1 -1
  263. package/lib/utils/injectStyle.mjs +9 -10
  264. package/lib/utils/injectStyle.mjs.map +1 -1
  265. package/lib/utils/inputProps.js +5 -5
  266. package/lib/utils/inputProps.js.map +1 -1
  267. package/lib/utils/inputProps.mjs +4 -4
  268. package/lib/utils/inputProps.mjs.map +1 -1
  269. package/lib/utils/isInteractiveElement.js +7 -9
  270. package/lib/utils/isInteractiveElement.js.map +1 -1
  271. package/lib/utils/isInteractiveElement.mjs +7 -9
  272. package/lib/utils/isInteractiveElement.mjs.map +1 -1
  273. package/lib/utils/isNode.js +4 -5
  274. package/lib/utils/isNode.js.map +1 -1
  275. package/lib/utils/isNode.mjs +1 -2
  276. package/lib/utils/isNode.mjs.map +1 -1
  277. package/lib/utils/isPromise.js +1 -1
  278. package/lib/utils/isRetina.js +7 -2
  279. package/lib/utils/isRetina.js.map +1 -1
  280. package/lib/utils/isRetina.mjs +6 -1
  281. package/lib/utils/isRetina.mjs.map +1 -1
  282. package/lib/utils/logger.js +18 -25
  283. package/lib/utils/logger.js.map +1 -1
  284. package/lib/utils/logger.mjs +13 -21
  285. package/lib/utils/logger.mjs.map +1 -1
  286. package/lib/utils/numericChecker.js +11 -18
  287. package/lib/utils/numericChecker.js.map +1 -1
  288. package/lib/utils/numericChecker.mjs +10 -17
  289. package/lib/utils/numericChecker.mjs.map +1 -1
  290. package/lib/utils/ownerDocument.js +2 -2
  291. package/lib/utils/ownerDocument.js.map +1 -1
  292. package/lib/utils/ownerDocument.mjs +1 -1
  293. package/lib/utils/ownerDocument.mjs.map +1 -1
  294. package/lib/utils/pick.js +5 -5
  295. package/lib/utils/pick.js.map +1 -1
  296. package/lib/utils/pick.mjs +4 -4
  297. package/lib/utils/pick.mjs.map +1 -1
  298. package/lib/utils/propsForElement.js +10 -12
  299. package/lib/utils/propsForElement.js.map +1 -1
  300. package/lib/utils/propsForElement.mjs +8 -10
  301. package/lib/utils/propsForElement.mjs.map +1 -1
  302. package/lib/utils/rafTrottle.js +9 -14
  303. package/lib/utils/rafTrottle.js.map +1 -1
  304. package/lib/utils/rafTrottle.mjs +7 -12
  305. package/lib/utils/rafTrottle.mjs.map +1 -1
  306. package/lib/utils/reactToText.js +5 -8
  307. package/lib/utils/reactToText.js.map +1 -1
  308. package/lib/utils/reactToText.mjs +3 -6
  309. package/lib/utils/reactToText.mjs.map +1 -1
  310. package/lib/utils/ref.d.ts +1 -3
  311. package/lib/utils/ref.js +29 -61
  312. package/lib/utils/ref.js.map +1 -1
  313. package/lib/utils/ref.mjs +27 -57
  314. package/lib/utils/ref.mjs.map +1 -1
  315. package/lib/utils/setRef.js +2 -2
  316. package/lib/utils/setRef.js.map +1 -1
  317. package/lib/utils/syncScroll.js +24 -24
  318. package/lib/utils/syncScroll.js.map +1 -1
  319. package/lib/utils/syncScroll.mjs +21 -21
  320. package/lib/utils/syncScroll.mjs.map +1 -1
  321. package/lib/utils/uncontroll.js +8 -18
  322. package/lib/utils/uncontroll.js.map +1 -1
  323. package/lib/utils/uncontroll.mjs +8 -17
  324. package/lib/utils/uncontroll.mjs.map +1 -1
  325. package/lib/utils/uniqueID.d.ts +0 -4
  326. package/lib/utils/uniqueID.js +23 -30
  327. package/lib/utils/uniqueID.js.map +1 -1
  328. package/lib/utils/uniqueID.mjs +19 -29
  329. package/lib/utils/uniqueID.mjs.map +1 -1
  330. package/lib/utils/use/useColorResolver.js +20 -21
  331. package/lib/utils/use/useColorResolver.js.map +1 -1
  332. package/lib/utils/use/useColorResolver.mjs +16 -18
  333. package/lib/utils/use/useColorResolver.mjs.map +1 -1
  334. package/lib/utils/use/useEnhancedEffect.d.ts +1 -1
  335. package/lib/utils/use/useEnhancedEffect.js +4 -4
  336. package/lib/utils/use/useEnhancedEffect.js.map +1 -1
  337. package/lib/utils/use/useEnhancedEffect.mjs +1 -1
  338. package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
  339. package/lib/utils/use/useEventCallback.js +5 -10
  340. package/lib/utils/use/useEventCallback.js.map +1 -1
  341. package/lib/utils/use/useEventCallback.mjs +3 -8
  342. package/lib/utils/use/useEventCallback.mjs.map +1 -1
  343. package/lib/utils/use/useEventListener.js +11 -15
  344. package/lib/utils/use/useEventListener.js.map +1 -1
  345. package/lib/utils/use/useEventListener.mjs +7 -11
  346. package/lib/utils/use/useEventListener.mjs.map +1 -1
  347. package/lib/utils/use/useFocusLock.js +80 -94
  348. package/lib/utils/use/useFocusLock.js.map +1 -1
  349. package/lib/utils/use/useFocusLock.mjs +71 -88
  350. package/lib/utils/use/useFocusLock.mjs.map +1 -1
  351. package/lib/utils/use/usePreventScroll.js +26 -28
  352. package/lib/utils/use/usePreventScroll.js.map +1 -1
  353. package/lib/utils/use/usePreventScroll.mjs +21 -23
  354. package/lib/utils/use/usePreventScroll.mjs.map +1 -1
  355. package/lib/utils/use/useScrollBarWidth.js +8 -14
  356. package/lib/utils/use/useScrollBarWidth.js.map +1 -1
  357. package/lib/utils/use/useScrollBarWidth.mjs +8 -13
  358. package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
  359. package/lib/utils/useCssVariable.js +32 -37
  360. package/lib/utils/useCssVariable.js.map +1 -1
  361. package/lib/utils/useCssVariable.mjs +27 -34
  362. package/lib/utils/useCssVariable.mjs.map +1 -1
  363. package/lib/utils/zIndexStacking.d.ts +3 -1
  364. package/lib/utils/zIndexStacking.js +28 -24
  365. package/lib/utils/zIndexStacking.js.map +1 -1
  366. package/lib/utils/zIndexStacking.mjs +23 -22
  367. package/lib/utils/zIndexStacking.mjs.map +1 -1
  368. package/package.json +129 -129
  369. package/lib/enhancement/bindHandler.d.ts +0 -5
  370. package/lib/enhancement/bindHandler.js +0 -53
  371. package/lib/enhancement/bindHandler.js.map +0 -1
  372. package/lib/enhancement/bindHandler.mjs +0 -48
  373. package/lib/enhancement/bindHandler.mjs.map +0 -1
  374. package/lib/enhancement/hoistProps.d.ts +0 -10
  375. package/lib/enhancement/hoistProps.js +0 -95
  376. package/lib/enhancement/hoistProps.js.map +0 -1
  377. package/lib/enhancement/hoistProps.mjs +0 -78
  378. package/lib/enhancement/hoistProps.mjs.map +0 -1
  379. package/lib/esm/enhancement/bindHandler.mjs +0 -48
  380. package/lib/esm/enhancement/hoistProps.mjs +0 -78
  381. package/lib/esm/utils/createHoc.mjs +0 -42
  382. package/lib/esm/utils/getDisplayName.mjs +0 -6
  383. package/lib/utils/ScreenReaderOnly.d.ts +0 -8
  384. package/lib/utils/ScreenReaderOnly.js +0 -30
  385. package/lib/utils/ScreenReaderOnly.js.map +0 -1
  386. package/lib/utils/ScreenReaderOnly.mjs +0 -24
  387. package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
  388. package/lib/utils/createHoc.d.ts +0 -3
  389. package/lib/utils/createHoc.js +0 -52
  390. package/lib/utils/createHoc.js.map +0 -1
  391. package/lib/utils/createHoc.mjs +0 -42
  392. package/lib/utils/createHoc.mjs.map +0 -1
  393. package/lib/utils/enhances/WithAutoFocus.d.ts +0 -14
  394. package/lib/utils/enhances/WithAutoFocus.js +0 -72
  395. package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
  396. package/lib/utils/enhances/WithAutoFocus.mjs +0 -66
  397. package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
  398. package/lib/utils/enhances/WithKeyboardFocus.d.ts +0 -46
  399. package/lib/utils/enhances/WithKeyboardFocus.js +0 -94
  400. package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
  401. package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -88
  402. package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
  403. package/lib/utils/enhances/WithRef.d.ts +0 -3
  404. package/lib/utils/enhances/WithRef.js +0 -25
  405. package/lib/utils/enhances/WithRef.js.map +0 -1
  406. package/lib/utils/enhances/WithRef.mjs +0 -18
  407. package/lib/utils/enhances/WithRef.mjs.map +0 -1
  408. package/lib/utils/enhances/autoFocusEnhance.d.ts +0 -10
  409. package/lib/utils/enhances/autoFocusEnhance.js +0 -45
  410. package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
  411. package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
  412. package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
  413. package/lib/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
  414. package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
  415. package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  416. package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
  417. package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
  418. package/lib/utils/if.d.ts +0 -11
  419. package/lib/utils/if.js +0 -15
  420. package/lib/utils/if.js.map +0 -1
  421. package/lib/utils/if.mjs +0 -9
  422. package/lib/utils/if.mjs.map +0 -1
  423. package/lib/utils/use/useCss.d.ts +0 -4
  424. package/lib/utils/use/useCss.js +0 -19
  425. package/lib/utils/use/useCss.js.map +0 -1
  426. package/lib/utils/use/useCss.mjs +0 -12
  427. package/lib/utils/use/useCss.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [17.0.0] - 2026-02-18
6
+
7
+ ### BREAK
8
+
9
+ - New major version.
10
+ - Removed `WithI18n`. Use `useI18n`.
11
+ - Removed `WithCSS`. Use `useCss`.
12
+ - Removed `WithAutoFocus` and `autoFocusEnhance`.
13
+ - Removed `WithKeyboardFocus`. Just don't use.
14
+ - Removed `WithRef`. Use `useForkRef`.
15
+
5
16
  ## [16.5.1] - 2025-10-30
6
17
 
7
18
  ### Fixed
@@ -95,7 +106,7 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
95
106
 
96
107
  ### Fixed
97
108
 
98
- - Return type for `fincComponent` util. It could be only `ReactElement` or `undefined`.
109
+ - Return type for `findComponent` util. It could be only `ReactElement` or `undefined`.
99
110
 
100
111
  ## [2.39.4] - 2025-05-13
101
112
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![version](https://img.shields.io/npm/v/@semcore/core.svg)](https://www.npmjs.com/@semcore/core)
4
4
  [![downloads](https://img.shields.io/npm/dt/@semcore/core.svg)](https://www.npmjs.com/package/@semcore/core)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/semrush/intergalactic/blob/master/LICENSE)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE)
6
6
 
7
7
  > This component is part of the Intergalactic Design System
8
8
 
@@ -20,7 +20,7 @@ npm install @semcore/core
20
20
 
21
21
  ## 👤 Author
22
22
 
23
- [UI-kit team](https://github.com/semrush/intergalactic/blob/master/MAINTAINERS)
23
+ [UI-kit team](https://github.com/semrush/intergalactic/blob/HEAD/MAINTAINERS)
24
24
  and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
25
25
 
26
26
  ## 🤝 Contributing
@@ -28,7 +28,7 @@ and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors
28
28
  Contributions, issues and feature requests are welcome!
29
29
 
30
30
  Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at
31
- the [contributing guide](https://github.com/semrush/intergalactic/blob/master/CONTRIBUTING.md).
31
+ the [contributing guide](https://github.com/semrush/intergalactic/blob/HEAD/CONTRIBUTING.md).
32
32
 
33
33
  ## Show your support
34
34
 
@@ -36,4 +36,4 @@ Give a ⭐️ if this project helped you!
36
36
 
37
37
  ## 📝 License
38
38
 
39
- This project is [MIT](https://github.com/semrush/intergalactic/blob/master/LICENSE) licensed.
39
+ This project is [MIT](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE) licensed.
@@ -1,21 +1,18 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.lastInteraction = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
9
  var _canUseDOM = _interopRequireDefault(require("./utils/canUseDOM"));
12
- var LastInteractionType = /*#__PURE__*/function () {
13
- function LastInteractionType() {
14
- (0, _classCallCheck2["default"])(this, LastInteractionType);
15
- (0, _defineProperty2["default"])(this, "lastFocusSource", 'none');
10
+ class LastInteractionType {
11
+ constructor() {
12
+ (0, _defineProperty2.default)(this, "lastFocusSource", 'none');
16
13
  this.handleKeyDown = this.handleKeyDown.bind(this);
17
14
  this.handleMouseDown = this.handleMouseDown.bind(this);
18
- if ((0, _canUseDOM["default"])()) {
15
+ if ((0, _canUseDOM.default)()) {
19
16
  document.addEventListener('mousedown', this.handleMouseDown, {
20
17
  capture: true
21
18
  });
@@ -24,32 +21,21 @@ var LastInteractionType = /*#__PURE__*/function () {
24
21
  });
25
22
  }
26
23
  }
27
- return (0, _createClass2["default"])(LastInteractionType, [{
28
- key: "type",
29
- get: function get() {
30
- return this.lastFocusSource;
31
- }
32
- }, {
33
- key: "isKeyboard",
34
- value: function isKeyboard() {
35
- return this.lastFocusSource === 'keyboard';
36
- }
37
- }, {
38
- key: "isMouse",
39
- value: function isMouse() {
40
- return this.lastFocusSource === 'mouse';
41
- }
42
- }, {
43
- key: "handleMouseDown",
44
- value: function handleMouseDown() {
45
- this.lastFocusSource = 'mouse';
46
- }
47
- }, {
48
- key: "handleKeyDown",
49
- value: function handleKeyDown() {
50
- this.lastFocusSource = 'keyboard';
51
- }
52
- }]);
53
- }();
54
- var lastInteraction = exports.lastInteraction = new LastInteractionType();
24
+ get type() {
25
+ return this.lastFocusSource;
26
+ }
27
+ isKeyboard() {
28
+ return this.lastFocusSource === 'keyboard';
29
+ }
30
+ isMouse() {
31
+ return this.lastFocusSource === 'mouse';
32
+ }
33
+ handleMouseDown() {
34
+ this.lastFocusSource = 'mouse';
35
+ }
36
+ handleKeyDown() {
37
+ this.lastFocusSource = 'keyboard';
38
+ }
39
+ }
40
+ const lastInteraction = exports.lastInteraction = new LastInteractionType();
55
41
  //# sourceMappingURL=LastInteractionType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LastInteractionType.js","names":["_canUseDOM","_interopRequireDefault","require","LastInteractionType","_classCallCheck2","_defineProperty2","handleKeyDown","bind","handleMouseDown","canUseDOM","document","addEventListener","capture","_createClass2","key","get","lastFocusSource","value","isKeyboard","isMouse","lastInteraction","exports"],"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,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAEpCC,mBAAmB;EAGvB,SAAAA,oBAAA,EAAc;IAAA,IAAAC,gBAAA,mBAAAD,mBAAA;IAAA,IAAAE,gBAAA,sCAF2C,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,IAAI,IAAAE,qBAAS,EAAC,CAAC,EAAE;MACfC,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACH,eAAe,EAAE;QAAEI,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACL,aAAa,EAAE;QAAEM,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAAC,WAAAC,aAAA,aAAAV,mBAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAkB;MAChB,OAAO,IAAI,CAACC,eAAe;IAC7B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,UAAUA,CAAA,EAAG;MAClB,OAAO,IAAI,CAACF,eAAe,KAAK,UAAU;IAC5C;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOE,OAAOA,CAAA,EAAG;MACf,OAAO,IAAI,CAACH,eAAe,KAAK,OAAO;IACzC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQT,eAAeA,CAAA,EAAG;MACxB,IAAI,CAACQ,eAAe,GAAG,OAAO;IAChC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQX,aAAaA,CAAA,EAAG;MACtB,IAAI,CAACU,eAAe,GAAG,UAAU;IACnC;EAAC;AAAA;AAGI,IAAMI,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAIjB,mBAAmB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"LastInteractionType.js","names":["_canUseDOM","_interopRequireDefault","require","LastInteractionType","constructor","_defineProperty2","default","handleKeyDown","bind","handleMouseDown","canUseDOM","document","addEventListener","capture","type","lastFocusSource","isKeyboard","isMouse","lastInteraction","exports"],"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,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,MAAMC,mBAAmB,CAAC;EAGxBC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA,2BAF2C,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,IAAI,IAAAE,kBAAS,EAAC,CAAC,EAAE;MACfC,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACH,eAAe,EAAE;QAAEI,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACL,aAAa,EAAE;QAAEM,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAEA,IAAWC,IAAIA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACC,eAAe;EAC7B;EAEOC,UAAUA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACD,eAAe,KAAK,UAAU;EAC5C;EAEOE,OAAOA,CAAA,EAAG;IACf,OAAO,IAAI,CAACF,eAAe,KAAK,OAAO;EACzC;EAEQN,eAAeA,CAAA,EAAG;IACxB,IAAI,CAACM,eAAe,GAAG,OAAO;EAChC;EAEQR,aAAaA,CAAA,EAAG;IACtB,IAAI,CAACQ,eAAe,GAAG,UAAU;EACnC;AACF;AAEO,MAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAIf,mBAAmB,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +1,7 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
2
  import canUseDOM from "./utils/canUseDOM.mjs";
5
- var LastInteractionType = /* @__PURE__ */ (function() {
6
- function LastInteractionType2() {
7
- _classCallCheck(this, LastInteractionType2);
3
+ class LastInteractionType {
4
+ constructor() {
8
5
  _defineProperty(this, "lastFocusSource", "none");
9
6
  this.handleKeyDown = this.handleKeyDown.bind(this);
10
7
  this.handleMouseDown = this.handleMouseDown.bind(this);
@@ -17,34 +14,23 @@ var LastInteractionType = /* @__PURE__ */ (function() {
17
14
  });
18
15
  }
19
16
  }
20
- return _createClass(LastInteractionType2, [{
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
- })();
47
- var lastInteraction = new LastInteractionType();
17
+ get type() {
18
+ return this.lastFocusSource;
19
+ }
20
+ isKeyboard() {
21
+ return this.lastFocusSource === "keyboard";
22
+ }
23
+ isMouse() {
24
+ return this.lastFocusSource === "mouse";
25
+ }
26
+ handleMouseDown() {
27
+ this.lastFocusSource = "mouse";
28
+ }
29
+ handleKeyDown() {
30
+ this.lastFocusSource = "keyboard";
31
+ }
32
+ }
33
+ const lastInteraction = new LastInteractionType();
48
34
  export {
49
35
  lastInteraction
50
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LastInteractionType.mjs","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,uBAAmB;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,CAAC,CAAC,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;EAAC,OAAAC,YAAA,CAAAT,mBAAA;IAAAU,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAkB;MAChB,OAAO,IAAI,CAACC,eAAe;IAC7B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,UAAUA,CAAA,EAAG;MAClB,OAAO,IAAI,CAACF,eAAe,KAAK,UAAU;IAC5C;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOE,OAAOA,CAAA,EAAG;MACf,OAAO,IAAI,CAACH,eAAe,KAAK,OAAO;IACzC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQR,eAAeA,CAAA,EAAG;MACxB,IAAI,CAACO,eAAe,GAAG,OAAO;IAChC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQV,aAAaA,CAAA,EAAG;MACtB,IAAI,CAACS,eAAe,GAAG,UAAU;IACnC;EAAC;AAAA;AAGH,OAAO,IAAMI,eAAe,GAAG,IAAIhB,mBAAmB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"LastInteractionType.mjs","names":["canUseDOM","LastInteractionType","constructor","_defineProperty","handleKeyDown","bind","handleMouseDown","document","addEventListener","capture","type","lastFocusSource","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,uBAAmB;AAEzC,MAAMC,mBAAmB,CAAC;EAGxBC,WAAWA,CAAA,EAAG;IAAAC,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,CAAC,CAAC,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;EAEA,IAAWC,IAAIA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACC,eAAe;EAC7B;EAEOC,UAAUA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACD,eAAe,KAAK,UAAU;EAC5C;EAEOE,OAAOA,CAAA,EAAG;IACf,OAAO,IAAI,CAACF,eAAe,KAAK,OAAO;EACzC;EAEQL,eAAeA,CAAA,EAAG;IACxB,IAAI,CAACK,eAAe,GAAG,OAAO;EAChC;EAEQP,aAAaA,CAAA,EAAG;IACtB,IAAI,CAACO,eAAe,GAAG,UAAU;EACnC;AACF;AAEA,OAAO,MAAMG,eAAe,GAAG,IAAIb,mBAAmB,CAAC,CAAC","ignoreList":[]}
@@ -1,96 +1,50 @@
1
1
  import type React from 'react';
2
- import { type AllHTMLAttributes, type ForwardRefExoticComponent, PureComponent, type ReactNode, type RefAttributes, type RefObject } from 'react';
3
- import type { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';
2
+ import { type AllHTMLAttributes, type ForwardRefExoticComponent, PureComponent, type ReactNode, type RefObject } from 'react';
3
+ import type { CORE_COMPONENT } from './symbols';
4
4
  import type { IStyledProps } from '../styled/index';
5
- /** @deprecated */
6
- type KnownKeys<T> = {
7
- [K in keyof T]: string extends K ? never : number extends K ? never : K;
8
- } extends {
9
- [_ in keyof T]: infer U;
10
- } ? U : never;
11
- /** @deprecated */
12
- export type HandlersType<UCProps> = {
5
+ type HandlersType<UCProps> = {
13
6
  [K in keyof UCProps]?: <T = unknown>(arg: T) => void;
14
7
  };
15
- /** @deprecated */
16
- export type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> = ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode) | ReactNode;
17
- /** @deprecated */
18
- export type RootComponentHandler = (...args: any[]) => void | false;
19
- /** @deprecated */
20
- export interface IRootComponentHandlers {
21
- [key: string]: RootComponentHandler;
22
- }
23
- /** @deprecated */
24
- export interface IRootComponentProps<Props = {}, Ctx = {}> {
8
+ export interface IRootComponentProps<Props = {}, Ctx = {}, H = {}> {
25
9
  'forwardRef'?: RefObject<any>;
26
10
  'Children'?: any;
27
- 'children'?: ChildrenType<Props, Ctx>;
11
+ 'children'?: ReactNode | ((props: Props & Ctx, handlers: HandlersType<H>) => ReactNode);
28
12
  'styles'?: IStyledProps['styles'];
29
13
  'data-ui-name'?: string;
30
14
  }
31
- /** @deprecated */
32
- export type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;
33
- /** @deprecated */
34
- export type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> & Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & {
35
- Root?: Root;
36
- };
37
- /** @deprecated */
38
- export type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<Pick<Props, KnownKeys<Props>>, 'children'> & {
39
- children?: ChildrenType<Props, Ctx, UCProps>;
40
- [key: string]: unknown;
41
- };
42
- /** @deprecated */
43
- export type CProps<Props, Ctx = {}, UCProps = {}> = Props & {
44
- children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;
45
- };
46
- /** @deprecated */
47
- export type ReturnEl = React.ReactElement | null;
48
15
  export interface IRootNodeProps {
49
16
  render: React.ElementType | string;
50
17
  tag?: React.ElementType | string;
51
18
  [key: string]: any;
52
19
  }
53
20
  type Root = ForwardRefExoticComponent<IRootNodeProps>;
54
- /**
55
- * @deprecated since version ^1.8.0
56
- */
57
- export type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;
58
- /**
59
- * @deprecated since version ^1.8.0
60
- */
61
- /** @deprecated */
62
- export type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;
63
21
  /** @deprecated */
64
22
  export type PropGetterFn = <T extends {}>(props?: T) => T & {
65
23
  [key: string]: unknown;
66
24
  };
67
- /** @deprecated */
68
- export type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;
69
- /** @deprecated */
70
- export type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(props?: P) => Merge<ReturnType<G1>, ReturnType<G2>> & P;
71
25
  declare const Root: Root;
72
26
  export { Root };
73
- /** @deprecated */
74
- declare abstract class RootComponent<Props = {}, Context = {}, State = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> extends PureComponent<Props, State> {
75
- get handlers(): Readonly<IRootComponentHandlers>;
76
- get asProps(): Readonly<Merge<Props & IRootComponentProps<Props, Context> & Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> & InnerProps, AllHTMLAttributes<any>>>;
77
- Root: Root;
78
- isControlled: boolean;
27
+ type RootResult<T extends Intergalactic.Tag | never> = ForwardRefExoticComponent<IRootNodeProps & Intergalactic.InternalTypings.ComponentPropsNesting<T>>;
28
+ type BaseAsProps<Props = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> = Readonly<Props & IRootComponentProps & Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> & InnerProps>;
29
+ export declare abstract class Component<Props = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], Uncontrolled extends Readonly<{
30
+ [key in keyof Props]?: Props[key] | null | ((value: Props[key], e?: any) => void | boolean | Props[key]) | ((value: Props[key], e?: any) => void | boolean | Props[key])[];
31
+ }> = never, InnerProps = {}, State = {}> extends PureComponent<Props, State> {
32
+ protected uncontrolledProps(): [Uncontrolled] extends [never] ? never : Uncontrolled;
33
+ protected get handlers(): Readonly<{
34
+ [key in keyof Uncontrolled]: key extends keyof Props ? Uncontrolled[key] extends (null | Props[key]) ? (value: Props[key], e?: any) => void : Uncontrolled[key] extends Array<any> ? Uncontrolled[key][0] : Uncontrolled[key] : never;
35
+ }>;
36
+ protected get asProps(): Readonly<{
37
+ Root: RootResult<any>;
38
+ } & BaseAsProps<Props, Enhance, InnerProps> & Intergalactic.InternalTypings.EfficientOmit<AllHTMLAttributes<any>, keyof BaseAsProps<Props, Enhance, InnerProps>>>;
39
+ protected Root: RootResult<any>;
40
+ protected isControlled: boolean;
79
41
  }
80
- export declare const Component: typeof RootComponent;
81
- /** @deprecated */
82
- export type Component<Props = {}, Context = {}, State = {}, Handlers extends IRootComponentHandlers = IRootComponentHandlers> = React.ComponentClass<Props, State> & {
83
- isControlled: boolean;
84
- handlers: Readonly<Handlers>;
85
- asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;
86
- Root: Root;
87
- };
88
42
  export declare namespace Intergalactic {
89
43
  type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};
90
44
  type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<infer Props> ? Omit<Props, 'tag'> : never;
91
45
  type ReactFCLike = (props: any) => any;
92
46
  type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};
93
- type ComponentChildren<Props, Context, RenderingResult = InternalTypings.ReturnResult, AdditionalContext extends any[] = never[]> = ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult) | InternalTypings.ReturnResult;
47
+ type ComponentChildren<Props, Context, RenderingResult = InternalTypings.ReturnResult, AdditionalContext extends Readonly<any[]> = never[]> = ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult) | InternalTypings.ReturnResult;
94
48
  type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {
95
49
  ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;
96
50
  /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */
@@ -101,6 +55,9 @@ export declare namespace Intergalactic {
101
55
  } & HighPriorityProps;
102
56
  /** @private */
103
57
  export namespace InternalTypings {
58
+ export type PartialRequired<T, K extends keyof T> = Omit<T, K> & {
59
+ [key in K]-?: T[key];
60
+ };
104
61
  export type EfficientOmit<Type, Keys> = {
105
62
  [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];
106
63
  };
@@ -130,7 +87,7 @@ export declare namespace Intergalactic {
130
87
  } ? NestedProps : {}>, 'children' | 'tag'>;
131
88
  export type ReturnResult = React.ReactElement | React.ReactNode | React.ReactNode[] | string | null;
132
89
  export type ComponentTag = keyof JSX.IntrinsicElements | React.ComponentClass | React.FC | ReactFCLike;
133
- export type ComponentProps<Tag extends ComponentTag | [ComponentTag, keyof JSX.IntrinsicElements], BaseTag extends ComponentTag | never, Props, Context = never, AdditionalContext extends any[] = never[]> = {
90
+ export type ComponentProps<Tag extends ComponentTag | [ComponentTag, keyof JSX.IntrinsicElements], BaseTag extends ComponentTag | never, Props, Context = never, AdditionalContext extends Readonly<any[]> = never[]> = {
134
91
  tag?: Tag;
135
92
  children?: ComponentChildren<EfficientOmit<Props, 'children'> & {
136
93
  children: React.ReactNode;
@@ -153,6 +110,7 @@ export declare namespace Intergalactic {
153
110
  __additionalContext: AdditionalContext;
154
111
  displayName: string;
155
112
  newInstance: () => Component<BaseTag, Props, Context>;
113
+ [CORE_COMPONENT]: boolean;
156
114
  };
157
115
  export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> = T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;
158
116
  type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;
@@ -166,7 +124,7 @@ export declare namespace Intergalactic {
166
124
  };
167
125
  export {};
168
126
  }
169
- export type Component<BaseTag extends InternalTypings.ComponentTag = never, BaseProps = {}, Context = {}, AdditionalContext extends any[] = never[]> = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag, Props extends BaseProps = BaseProps>(props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>) => InternalTypings.ComponentRenderingResults) & InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;
127
+ export type Component<BaseTag extends InternalTypings.ComponentTag = never, BaseProps = {}, Context = {}, AdditionalContext extends Readonly<any[]> = never[]> = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag, Props extends BaseProps = BaseProps>(props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>) => InternalTypings.ComponentRenderingResults) & InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;
170
128
  export type Tag = InternalTypings.ComponentTag;
171
129
  export type DomProps<Tag extends keyof JSX.IntrinsicElements> = InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;
172
130
  export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
@@ -175,14 +133,3 @@ export declare namespace Intergalactic {
175
133
  export {};
176
134
  }
177
135
  export declare const wrapIntergalacticComponent: <Component extends Intergalactic.Component<any, any, any, any>, PropsExtending = {}>(wrapper: (props: Intergalactic.InternalTypings.UntypeRefAndTag<Intergalactic.InternalTypings.ComponentPropsNesting<Component>> & PropsExtending) => React.ReactNode) => Intergalactic.Component<Component["__tag"], Component["__props"] & Component["__nestedProps"] & PropsExtending, Component["__context"], Component["__additionalContext"]>;
178
- export type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> & RefAttributes<unknown>;
179
- export type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<PropsAndRef<T, Ctx, UCProps>>;
180
- type ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps] ? ComponentType<ParentProps, ChildProps, Context, UCProps> : ForwardRefComponent<T, Context, UCProps>;
181
- export type ComponentType<ComponentProps, ChildComponentProps = {}, ContextType = {}, UCProps = {}, FNType = null> = (FNType extends null ? ForwardRefComponent<ComponentProps, ContextType, UCProps> : FNType & {
182
- displayName: string;
183
- }) & {
184
- [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;
185
- } & {
186
- [CORE_COMPONENT]: boolean;
187
- [CREATE_COMPONENT]: () => ComponentType<ComponentProps, ChildComponentProps, ContextType, UCProps>;
188
- };
@@ -1,85 +1,37 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.wrapIntergalacticComponent = exports.Root = exports.Intergalactic = exports.Component = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
9
  var _react = require("react");
14
10
  /** @deprecated */
15
11
 
16
- /** @deprecated */
17
-
18
- /** @deprecated */
19
-
20
- /** @deprecated */
21
-
22
- /** @deprecated */
23
-
24
- /** @deprecated */
25
-
26
- /** @deprecated */
27
-
28
- /** @deprecated */
29
-
30
- /** @deprecated */
31
-
32
- /** @deprecated */
33
-
34
- /** @deprecated */
35
-
36
- /**
37
- * @deprecated since version ^1.8.0
38
- */
39
-
40
- /**
41
- * @deprecated since version ^1.8.0
42
- */
43
- /** @deprecated */
44
-
45
- /** @deprecated */
46
-
47
- /** @deprecated */
48
-
49
- /** @deprecated */
50
-
51
- var Root = exports.Root = undefined;
52
- /** @deprecated */
53
- var RootComponent = /*#__PURE__*/function (_PureComponent) {
54
- function RootComponent() {
55
- var _this;
56
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
57
- args[_key] = arguments[_key];
58
- }
59
- (0, _classCallCheck2["default"])(this, RootComponent);
60
- _this = (0, _callSuper2["default"])(this, RootComponent, [].concat(args));
61
- (0, _defineProperty2["default"])(_this, "Root", undefined);
62
- (0, _defineProperty2["default"])(_this, "isControlled", false);
63
- return _this;
12
+ const Root = exports.Root = undefined;
13
+ class Component extends _react.PureComponent {
14
+ constructor(...args) {
15
+ super(...args);
16
+ (0, _defineProperty2.default)(this, "Root", undefined);
17
+ (0, _defineProperty2.default)(this, "isControlled", false);
64
18
  }
65
- (0, _inherits2["default"])(RootComponent, _PureComponent);
66
- return (0, _createClass2["default"])(RootComponent, [{
67
- key: "handlers",
68
- get: function get() {
69
- return {};
70
- }
71
- }, {
72
- key: "asProps",
73
- get: function get() {
74
- return {};
75
- }
76
- }]);
77
- }(_react.PureComponent);
78
- var Component = exports.Component = RootComponent;
79
- /** @deprecated */
19
+ uncontrolledProps() {
20
+ // @ts-ignore. This is a default value. Should be defined in related classes.
21
+ return {};
22
+ }
23
+ get handlers() {
24
+ // @ts-ignore. The body will be generated in factory
25
+ return {};
26
+ }
27
+ get asProps() {
28
+ return {};
29
+ }
30
+ }
31
+
80
32
  // eslint-disable-next-line @typescript-eslint/no-namespace
81
- var Intergalactic;
82
- var wrapIntergalacticComponent = exports.wrapIntergalacticComponent = function wrapIntergalacticComponent(wrapper) {
83
- return wrapper;
84
- };
33
+ exports.Component = Component;
34
+ let Intergalactic = exports.Intergalactic = void 0;
35
+ const wrapIntergalacticComponent = wrapper => wrapper;
36
+ exports.wrapIntergalacticComponent = wrapIntergalacticComponent;
85
37
  //# sourceMappingURL=Component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","names":["_react","require","Root","exports","undefined","RootComponent","_PureComponent","_this","_len","arguments","length","args","Array","_key","_classCallCheck2","_callSuper2","concat","_defineProperty2","_inherits2","_createClass2","key","get","PureComponent","Component","Intergalactic","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import type React from 'react';\nimport { type\nAllHTMLAttributes, type\nForwardRefExoticComponent,\nPureComponent, type\nReactNode, type\nRefAttributes, type\nRefObject,\n} from 'react';\n\nimport type { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\nimport type { IStyledProps } from '../styled/index';\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 InnerProps = {},\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 InnerProps,\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\n// eslint-disable-next-line @typescript-eslint/no-namespace\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 // eslint-disable-next-line @typescript-eslint/no-namespace\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 // eslint-disable-next-line @stylistic/indent-binary-ops\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 // eslint-disable-next-line @stylistic/indent-binary-ops\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 // eslint-disable-next-line @stylistic/indent-binary-ops\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 | [ComponentTag, keyof JSX.IntrinsicElements],\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 extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : 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 newInstance: () => Component<BaseTag, Props, Context>;\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 | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = 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":";;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAYA;;AAOA;;AAEA;;AAKA;;AAGA;;AAKA;;AASA;;AAGA;;AAIA;;AASA;;AAIA;;AAYA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAKA,IAAMC,IAAU,GAAAC,OAAA,CAAAD,IAAA,GAAGE,SAAgB;AAInC;AAAA,IACeC,aAAa,0BAAAC,cAAA;EAAA,SAAAD,cAAA;IAAA,IAAAE,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;IAAA,IAAAC,gBAAA,mBAAAT,aAAA;IAAAE,KAAA,OAAAQ,WAAA,mBAAAV,aAAA,KAAAW,MAAA,CAAAL,IAAA;IAAA,IAAAM,gBAAA,aAAAV,KAAA,UAuBbH,SAAS;IAAA,IAAAa,gBAAA,aAAAV,KAAA,kBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAW,UAAA,aAAAb,aAAA,EAAAC,cAAA;EAAA,WAAAa,aAAA,aAAAd,aAAA;IAAAe,GAAA;IAAAC,GAAA,EAlBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IASX;EAAC;AAAA,EAfOC,oBAAa;AAsBhB,IAAMC,SAAS,GAAApB,OAAA,CAAAoB,SAAA,GAAGlB,aAAa;AACtC;AAgBA;AAAA,IACiBmB,aAAa;AAgMvB,IAAMC,0BAA0B,GAAAtB,OAAA,CAAAsB,0BAAA,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","ignoreList":[]}
1
+ {"version":3,"file":"Component.js","names":["_react","require","Root","exports","undefined","Component","PureComponent","constructor","args","_defineProperty2","default","uncontrolledProps","handlers","asProps","Intergalactic","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import type React from 'react';\nimport { type\nAllHTMLAttributes, type\nForwardRefExoticComponent,\nPureComponent, type\nReactNode, type\nRefObject,\n} from 'react';\n\nimport type { CORE_COMPONENT } from './symbols';\nimport type { IStyledProps } from '../styled/index';\n\ntype HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n\nexport interface IRootComponentProps<Props = {}, Ctx = {}, H = {}> {\n 'forwardRef'?: RefObject<any>;\n 'Children'?: any;\n 'children'?: ReactNode | ((props: Props & Ctx, handlers: HandlersType<H>) => ReactNode);\n 'styles'?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\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/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\ntype RootResult<T extends Intergalactic.Tag | never> = ForwardRefExoticComponent<IRootNodeProps & Intergalactic.InternalTypings.ComponentPropsNesting<T>>;\n\ntype BaseAsProps<Props = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> = Readonly<\n Props &\n IRootComponentProps &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps\n>;\n\nexport abstract class Component<\n Props = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n Uncontrolled extends Readonly<{ [key in keyof Props]?: Props[key] | null | ((value: Props[key], e?: any) => void | boolean | Props[key]) | ((value: Props[key], e?: any) => void | boolean | Props[key])[] }> = never,\n InnerProps = {},\n State = {},\n> extends PureComponent<Props, State> {\n protected uncontrolledProps(): [Uncontrolled] extends [never] ? never : Uncontrolled {\n // @ts-ignore. This is a default value. Should be defined in related classes.\n return {};\n };\n\n protected get handlers(): Readonly<{\n [key in keyof Uncontrolled]: key extends keyof Props\n ? Uncontrolled[key] extends (null | Props[key])\n ? (value: Props[key], e?: any) => void\n : Uncontrolled[key] extends Array<any> ? Uncontrolled[key][0] : Uncontrolled[key]\n : never\n }> {\n // @ts-ignore. The body will be generated in factory\n return {};\n }\n\n protected get asProps() {\n return {} as Readonly<\n { Root: RootResult<any> } &\n BaseAsProps<Props, Enhance, InnerProps> &\n Intergalactic.InternalTypings.EfficientOmit<AllHTMLAttributes<any>, keyof BaseAsProps<Props, Enhance, InnerProps>>\n >;\n }\n\n protected Root: RootResult<any> = undefined as any;\n\n protected isControlled = false;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\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 Readonly<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 // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace InternalTypings {\n export type PartialRequired<T, K extends keyof T> = Omit<T, K> & {\n [key in K]-?: T[key];\n };\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 // eslint-disable-next-line @stylistic/indent-binary-ops\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 // eslint-disable-next-line @stylistic/indent-binary-ops\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 // eslint-disable-next-line @stylistic/indent-binary-ops\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 | [ComponentTag, keyof JSX.IntrinsicElements],\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends Readonly<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 extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : 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 newInstance: () => Component<BaseTag, Props, Context>;\n [CORE_COMPONENT]: boolean;\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 Readonly<any[]> = never[],\n > = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = 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"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AA8BA;;AAGA,MAAMC,IAAU,GAAAC,OAAA,CAAAD,IAAA,GAAGE,SAAgB;AAa5B,MAAeC,SAAS,SAMrBC,oBAAa,CAAe;EAAAC,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,gBAyBFN,SAAS;IAAA,IAAAK,gBAAA,CAAAC,OAAA,wBAElB,KAAK;EAAA;EA1BpBC,iBAAiBA,CAAA,EAA0D;IACnF;IACA,OAAO,CAAC,CAAC;EACX;EAEA,IAAcC,QAAQA,CAAA,EAMnB;IACD;IACA,OAAO,CAAC,CAAC;EACX;EAEA,IAAcC,OAAOA,CAAA,EAAG;IACtB,OAAO,CAAC,CAAC;EAKX;AAKF;;AAEA;AAAAV,OAAA,CAAAE,SAAA,GAAAA,SAAA;AAAA,IACiBS,aAAa,GAAAX,OAAA,CAAAW,aAAA;AAoMvB,MAAMC,0BAA0B,GAIrCC,OAKoB,IAMjBA,OAAc;AAACb,OAAA,CAAAY,0BAAA,GAAAA,0BAAA","ignoreList":[]}