@semcore/core 17.0.0 → 17.0.1-prerelease.0

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 (354) hide show
  1. package/CHANGELOG.md +3 -111
  2. package/README.md +35 -5
  3. package/lib/LastInteractionType.js +36 -22
  4. package/lib/LastInteractionType.js.map +1 -1
  5. package/lib/LastInteractionType.mjs +33 -19
  6. package/lib/LastInteractionType.mjs.map +1 -1
  7. package/lib/core-types/Component.js +41 -25
  8. package/lib/core-types/Component.js.map +1 -1
  9. package/lib/core-types/Component.mjs +38 -18
  10. package/lib/core-types/Component.mjs.map +1 -1
  11. package/lib/core-types/symbols.js +9 -9
  12. package/lib/core-types/symbols.js.map +1 -1
  13. package/lib/core-types/symbols.mjs +9 -9
  14. package/lib/core-types/symbols.mjs.map +1 -1
  15. package/lib/coreFactory.js +238 -158
  16. package/lib/coreFactory.js.map +1 -1
  17. package/lib/coreFactory.mjs +189 -133
  18. package/lib/coreFactory.mjs.map +1 -1
  19. package/lib/decorators/propsObserver.js +64 -36
  20. package/lib/decorators/propsObserver.js.map +1 -1
  21. package/lib/decorators/propsObserver.mjs +61 -33
  22. package/lib/decorators/propsObserver.mjs.map +1 -1
  23. package/lib/decorators/reactive.js +17 -17
  24. package/lib/decorators/reactive.js.map +1 -1
  25. package/lib/decorators/reactive.mjs +15 -15
  26. package/lib/decorators/reactive.mjs.map +1 -1
  27. package/lib/enhancement/Children.js +59 -51
  28. package/lib/enhancement/Children.js.map +1 -1
  29. package/lib/enhancement/Children.mjs +41 -47
  30. package/lib/enhancement/Children.mjs.map +1 -1
  31. package/lib/enhancement/Root.js +37 -36
  32. package/lib/enhancement/Root.js.map +1 -1
  33. package/lib/enhancement/Root.mjs +18 -28
  34. package/lib/enhancement/Root.mjs.map +1 -1
  35. package/lib/enhancement/dataName.js +8 -7
  36. package/lib/enhancement/dataName.js.map +1 -1
  37. package/lib/enhancement/dataName.mjs +5 -5
  38. package/lib/enhancement/dataName.mjs.map +1 -1
  39. package/lib/enhancement/enhance.js +9 -6
  40. package/lib/enhancement/enhance.js.map +1 -1
  41. package/lib/enhancement/enhance.mjs +7 -4
  42. package/lib/enhancement/enhance.mjs.map +1 -1
  43. package/lib/enhancement/functionDefaultProps.js +6 -6
  44. package/lib/enhancement/functionDefaultProps.js.map +1 -1
  45. package/lib/enhancement/functionDefaultProps.mjs +4 -4
  46. package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
  47. package/lib/enhancement/i18n.js +13 -13
  48. package/lib/enhancement/i18n.js.map +1 -1
  49. package/lib/enhancement/i18n.mjs +9 -10
  50. package/lib/enhancement/i18n.mjs.map +1 -1
  51. package/lib/enhancement/inheritedName.js +8 -7
  52. package/lib/enhancement/inheritedName.js.map +1 -1
  53. package/lib/enhancement/inheritedName.mjs +5 -5
  54. package/lib/enhancement/inheritedName.mjs.map +1 -1
  55. package/lib/enhancement/staticChildren.js +56 -47
  56. package/lib/enhancement/staticChildren.js.map +1 -1
  57. package/lib/enhancement/staticChildren.mjs +48 -43
  58. package/lib/enhancement/staticChildren.mjs.map +1 -1
  59. package/lib/enhancement/style.js +27 -29
  60. package/lib/enhancement/style.js.map +1 -1
  61. package/lib/enhancement/style.mjs +20 -26
  62. package/lib/enhancement/style.mjs.map +1 -1
  63. package/lib/enhancement/uncontrolledProps.js +65 -46
  64. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  65. package/lib/enhancement/uncontrolledProps.mjs +52 -43
  66. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  67. package/lib/esm/LastInteractionType.mjs +33 -19
  68. package/lib/esm/core-types/Component.mjs +38 -18
  69. package/lib/esm/core-types/symbols.mjs +9 -9
  70. package/lib/esm/coreFactory.mjs +189 -133
  71. package/lib/esm/enhancement/Children.mjs +41 -47
  72. package/lib/esm/enhancement/Root.mjs +18 -28
  73. package/lib/esm/enhancement/dataName.mjs +5 -5
  74. package/lib/esm/enhancement/enhance.mjs +7 -4
  75. package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
  76. package/lib/esm/enhancement/i18n.mjs +9 -10
  77. package/lib/esm/enhancement/inheritedName.mjs +5 -5
  78. package/lib/esm/enhancement/staticChildren.mjs +48 -43
  79. package/lib/esm/enhancement/style.mjs +20 -26
  80. package/lib/esm/enhancement/uncontrolledProps.mjs +52 -43
  81. package/lib/esm/register.mjs +20 -12
  82. package/lib/esm/styled/reshadow-core.mjs +111 -98
  83. package/lib/esm/styled/sstyled.mjs +41 -31
  84. package/lib/esm/utils/assignProps.mjs +36 -32
  85. package/lib/esm/utils/enhances/WithI18n.mjs +17 -15
  86. package/lib/esm/utils/enhances/i18nEnhance.mjs +61 -47
  87. package/lib/esm/utils/logger.mjs +21 -13
  88. package/lib/esm/utils/pick.mjs +4 -4
  89. package/lib/esm/utils/ref.mjs +43 -27
  90. package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
  91. package/lib/index.js +17 -17
  92. package/lib/register.js +24 -17
  93. package/lib/register.js.map +1 -1
  94. package/lib/register.mjs +20 -12
  95. package/lib/register.mjs.map +1 -1
  96. package/lib/styled/index.js +4 -4
  97. package/lib/styled/reshadow-core.js +104 -102
  98. package/lib/styled/reshadow-core.js.map +1 -1
  99. package/lib/styled/reshadow-core.mjs +111 -98
  100. package/lib/styled/reshadow-core.mjs.map +1 -1
  101. package/lib/styled/sstyled.js +53 -31
  102. package/lib/styled/sstyled.js.map +1 -1
  103. package/lib/styled/sstyled.mjs +41 -31
  104. package/lib/styled/sstyled.mjs.map +1 -1
  105. package/lib/theme/themes/dark.js +2 -2
  106. package/lib/theme/themes/dark.js.map +1 -1
  107. package/lib/theme/themes/default.js +2 -2
  108. package/lib/theme/themes/default.js.map +1 -1
  109. package/lib/theme/themes/highlights-dark.js +2 -2
  110. package/lib/theme/themes/highlights-dark.js.map +1 -1
  111. package/lib/theme/themes/highlights-light.js +2 -2
  112. package/lib/theme/themes/highlights-light.js.map +1 -1
  113. package/lib/theme/themes/light.js +2 -2
  114. package/lib/theme/themes/light.js.map +1 -1
  115. package/lib/utils/CSSinJS.js +10 -8
  116. package/lib/utils/CSSinJS.js.map +1 -1
  117. package/lib/utils/CSSinJS.mjs +7 -6
  118. package/lib/utils/CSSinJS.mjs.map +1 -1
  119. package/lib/utils/ThemeProvider.js +51 -44
  120. package/lib/utils/ThemeProvider.js.map +1 -1
  121. package/lib/utils/ThemeProvider.mjs +47 -36
  122. package/lib/utils/ThemeProvider.mjs.map +1 -1
  123. package/lib/utils/addonText.js +7 -4
  124. package/lib/utils/addonText.js.map +1 -1
  125. package/lib/utils/addonText.mjs +5 -2
  126. package/lib/utils/addonText.mjs.map +1 -1
  127. package/lib/utils/addonTextChildren.js +21 -15
  128. package/lib/utils/addonTextChildren.js.map +1 -1
  129. package/lib/utils/addonTextChildren.mjs +13 -7
  130. package/lib/utils/addonTextChildren.mjs.map +1 -1
  131. package/lib/utils/ariaProps.js +5 -7
  132. package/lib/utils/ariaProps.js.map +1 -1
  133. package/lib/utils/ariaProps.mjs +5 -7
  134. package/lib/utils/ariaProps.mjs.map +1 -1
  135. package/lib/utils/assignProps.js +37 -33
  136. package/lib/utils/assignProps.js.map +1 -1
  137. package/lib/utils/assignProps.mjs +36 -32
  138. package/lib/utils/assignProps.mjs.map +1 -1
  139. package/lib/utils/canUseDOM.js +1 -1
  140. package/lib/utils/capitalizeFirstLetter.js +1 -1
  141. package/lib/utils/color.js +95 -72
  142. package/lib/utils/color.js.map +1 -1
  143. package/lib/utils/color.mjs +94 -71
  144. package/lib/utils/color.mjs.map +1 -1
  145. package/lib/utils/compose.js +12 -3
  146. package/lib/utils/compose.js.map +1 -1
  147. package/lib/utils/compose.mjs +11 -2
  148. package/lib/utils/compose.mjs.map +1 -1
  149. package/lib/utils/createUUID.js +5 -5
  150. package/lib/utils/createUUID.js.map +1 -1
  151. package/lib/utils/createUUID.mjs +4 -4
  152. package/lib/utils/createUUID.mjs.map +1 -1
  153. package/lib/utils/cssToIntDefault.js +4 -3
  154. package/lib/utils/cssToIntDefault.js.map +1 -1
  155. package/lib/utils/cssToIntDefault.mjs +3 -2
  156. package/lib/utils/cssToIntDefault.mjs.map +1 -1
  157. package/lib/utils/enhances/WithCSS.js +8 -10
  158. package/lib/utils/enhances/WithCSS.js.map +1 -1
  159. package/lib/utils/enhances/WithCSS.mjs +6 -7
  160. package/lib/utils/enhances/WithCSS.mjs.map +1 -1
  161. package/lib/utils/enhances/WithI18n.js +19 -19
  162. package/lib/utils/enhances/WithI18n.js.map +1 -1
  163. package/lib/utils/enhances/WithI18n.mjs +17 -15
  164. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  165. package/lib/utils/enhances/a11yEnhance.js +39 -34
  166. package/lib/utils/enhances/a11yEnhance.js.map +1 -1
  167. package/lib/utils/enhances/a11yEnhance.mjs +36 -32
  168. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
  169. package/lib/utils/enhances/animatedSizeEnhance.js +63 -55
  170. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  171. package/lib/utils/enhances/animatedSizeEnhance.mjs +58 -50
  172. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  173. package/lib/utils/enhances/contextEnhance.js +11 -12
  174. package/lib/utils/enhances/contextEnhance.js.map +1 -1
  175. package/lib/utils/enhances/contextEnhance.mjs +8 -9
  176. package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
  177. package/lib/utils/enhances/i18nEnhance.js +67 -51
  178. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  179. package/lib/utils/enhances/i18nEnhance.mjs +61 -47
  180. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  181. package/lib/utils/enhances/resolveColorEnhance.js +10 -12
  182. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
  183. package/lib/utils/enhances/resolveColorEnhance.mjs +6 -8
  184. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
  185. package/lib/utils/eventEmitter.js +57 -30
  186. package/lib/utils/eventEmitter.js.map +1 -1
  187. package/lib/utils/eventEmitter.mjs +55 -26
  188. package/lib/utils/eventEmitter.mjs.map +1 -1
  189. package/lib/utils/findComponent.js +42 -35
  190. package/lib/utils/findComponent.js.map +1 -1
  191. package/lib/utils/findComponent.mjs +33 -26
  192. package/lib/utils/findComponent.mjs.map +1 -1
  193. package/lib/utils/fire.js +13 -7
  194. package/lib/utils/fire.js.map +1 -1
  195. package/lib/utils/fire.mjs +11 -5
  196. package/lib/utils/fire.mjs.map +1 -1
  197. package/lib/utils/focus-lock/focusBorders.js +32 -28
  198. package/lib/utils/focus-lock/focusBorders.js.map +1 -1
  199. package/lib/utils/focus-lock/focusBorders.mjs +32 -26
  200. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
  201. package/lib/utils/focus-lock/getFocusableIn.js +6 -4
  202. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
  203. package/lib/utils/focus-lock/getFocusableIn.mjs +6 -3
  204. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
  205. package/lib/utils/focus-lock/isFocusInside.js +6 -5
  206. package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
  207. package/lib/utils/focus-lock/isFocusInside.mjs +6 -4
  208. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
  209. package/lib/utils/focus-lock/isFocusable.js +12 -9
  210. package/lib/utils/focus-lock/isFocusable.js.map +1 -1
  211. package/lib/utils/focus-lock/isFocusable.mjs +11 -8
  212. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
  213. package/lib/utils/focus-lock/setFocus.js +27 -21
  214. package/lib/utils/focus-lock/setFocus.js.map +1 -1
  215. package/lib/utils/focus-lock/setFocus.mjs +25 -19
  216. package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
  217. package/lib/utils/getAccessibleName.js +22 -10
  218. package/lib/utils/getAccessibleName.js.map +1 -1
  219. package/lib/utils/getAccessibleName.mjs +21 -10
  220. package/lib/utils/getAccessibleName.mjs.map +1 -1
  221. package/lib/utils/getDisplayName.js +1 -1
  222. package/lib/utils/getEventTarget.js +32 -13
  223. package/lib/utils/getEventTarget.js.map +1 -1
  224. package/lib/utils/getEventTarget.mjs +31 -12
  225. package/lib/utils/getEventTarget.mjs.map +1 -1
  226. package/lib/utils/getOriginChildren.js +4 -4
  227. package/lib/utils/getOriginChildren.js.map +1 -1
  228. package/lib/utils/getRandomInt.js +1 -1
  229. package/lib/utils/getValue.js +6 -4
  230. package/lib/utils/getValue.js.map +1 -1
  231. package/lib/utils/getValue.mjs +5 -3
  232. package/lib/utils/getValue.mjs.map +1 -1
  233. package/lib/utils/hasLabels.js +27 -16
  234. package/lib/utils/hasLabels.js.map +1 -1
  235. package/lib/utils/hasLabels.mjs +24 -14
  236. package/lib/utils/hasLabels.mjs.map +1 -1
  237. package/lib/utils/hasParent.js +2 -3
  238. package/lib/utils/hasParent.js.map +1 -1
  239. package/lib/utils/hasParent.mjs +3 -2
  240. package/lib/utils/hasParent.mjs.map +1 -1
  241. package/lib/utils/ifChildren.js +4 -6
  242. package/lib/utils/ifChildren.js.map +1 -1
  243. package/lib/utils/ifChildren.mjs +2 -4
  244. package/lib/utils/ifChildren.mjs.map +1 -1
  245. package/lib/utils/indentStyles.js +10 -5
  246. package/lib/utils/indentStyles.js.map +1 -1
  247. package/lib/utils/indentStyles.mjs +9 -5
  248. package/lib/utils/indentStyles.mjs.map +1 -1
  249. package/lib/utils/injectStyle.js +13 -11
  250. package/lib/utils/injectStyle.js.map +1 -1
  251. package/lib/utils/injectStyle.mjs +10 -9
  252. package/lib/utils/injectStyle.mjs.map +1 -1
  253. package/lib/utils/inputProps.js +5 -5
  254. package/lib/utils/inputProps.js.map +1 -1
  255. package/lib/utils/inputProps.mjs +4 -4
  256. package/lib/utils/inputProps.mjs.map +1 -1
  257. package/lib/utils/isInteractiveElement.js +9 -7
  258. package/lib/utils/isInteractiveElement.js.map +1 -1
  259. package/lib/utils/isInteractiveElement.mjs +9 -7
  260. package/lib/utils/isInteractiveElement.mjs.map +1 -1
  261. package/lib/utils/isNode.js +5 -4
  262. package/lib/utils/isNode.js.map +1 -1
  263. package/lib/utils/isNode.mjs +2 -1
  264. package/lib/utils/isNode.mjs.map +1 -1
  265. package/lib/utils/isPromise.js +1 -1
  266. package/lib/utils/isRetina.js +2 -7
  267. package/lib/utils/isRetina.js.map +1 -1
  268. package/lib/utils/isRetina.mjs +1 -6
  269. package/lib/utils/isRetina.mjs.map +1 -1
  270. package/lib/utils/logger.js +25 -18
  271. package/lib/utils/logger.js.map +1 -1
  272. package/lib/utils/logger.mjs +21 -13
  273. package/lib/utils/logger.mjs.map +1 -1
  274. package/lib/utils/numericChecker.js +18 -11
  275. package/lib/utils/numericChecker.js.map +1 -1
  276. package/lib/utils/numericChecker.mjs +17 -10
  277. package/lib/utils/numericChecker.mjs.map +1 -1
  278. package/lib/utils/ownerDocument.js +2 -2
  279. package/lib/utils/ownerDocument.js.map +1 -1
  280. package/lib/utils/ownerDocument.mjs +1 -1
  281. package/lib/utils/ownerDocument.mjs.map +1 -1
  282. package/lib/utils/pick.js +5 -5
  283. package/lib/utils/pick.js.map +1 -1
  284. package/lib/utils/pick.mjs +4 -4
  285. package/lib/utils/pick.mjs.map +1 -1
  286. package/lib/utils/propsForElement.js +12 -10
  287. package/lib/utils/propsForElement.js.map +1 -1
  288. package/lib/utils/propsForElement.mjs +10 -8
  289. package/lib/utils/propsForElement.mjs.map +1 -1
  290. package/lib/utils/rafTrottle.js +14 -9
  291. package/lib/utils/rafTrottle.js.map +1 -1
  292. package/lib/utils/rafTrottle.mjs +12 -7
  293. package/lib/utils/rafTrottle.mjs.map +1 -1
  294. package/lib/utils/reactToText.js +8 -5
  295. package/lib/utils/reactToText.js.map +1 -1
  296. package/lib/utils/reactToText.mjs +6 -3
  297. package/lib/utils/reactToText.mjs.map +1 -1
  298. package/lib/utils/ref.js +47 -29
  299. package/lib/utils/ref.js.map +1 -1
  300. package/lib/utils/ref.mjs +43 -27
  301. package/lib/utils/ref.mjs.map +1 -1
  302. package/lib/utils/setRef.js +2 -2
  303. package/lib/utils/setRef.js.map +1 -1
  304. package/lib/utils/syncScroll.js +24 -24
  305. package/lib/utils/syncScroll.js.map +1 -1
  306. package/lib/utils/syncScroll.mjs +21 -21
  307. package/lib/utils/syncScroll.mjs.map +1 -1
  308. package/lib/utils/uncontroll.js +18 -8
  309. package/lib/utils/uncontroll.js.map +1 -1
  310. package/lib/utils/uncontroll.mjs +17 -8
  311. package/lib/utils/uncontroll.mjs.map +1 -1
  312. package/lib/utils/uniqueID.js +27 -22
  313. package/lib/utils/uniqueID.js.map +1 -1
  314. package/lib/utils/uniqueID.mjs +25 -18
  315. package/lib/utils/uniqueID.mjs.map +1 -1
  316. package/lib/utils/use/useColorResolver.js +22 -21
  317. package/lib/utils/use/useColorResolver.js.map +1 -1
  318. package/lib/utils/use/useColorResolver.mjs +19 -17
  319. package/lib/utils/use/useColorResolver.mjs.map +1 -1
  320. package/lib/utils/use/useEnhancedEffect.js +4 -4
  321. package/lib/utils/use/useEnhancedEffect.js.map +1 -1
  322. package/lib/utils/use/useEnhancedEffect.mjs +1 -1
  323. package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
  324. package/lib/utils/use/useEventCallback.js +10 -5
  325. package/lib/utils/use/useEventCallback.js.map +1 -1
  326. package/lib/utils/use/useEventCallback.mjs +8 -3
  327. package/lib/utils/use/useEventCallback.mjs.map +1 -1
  328. package/lib/utils/use/useEventListener.js +15 -11
  329. package/lib/utils/use/useEventListener.js.map +1 -1
  330. package/lib/utils/use/useEventListener.mjs +11 -7
  331. package/lib/utils/use/useEventListener.mjs.map +1 -1
  332. package/lib/utils/use/useFocusLock.js +94 -80
  333. package/lib/utils/use/useFocusLock.js.map +1 -1
  334. package/lib/utils/use/useFocusLock.mjs +88 -71
  335. package/lib/utils/use/useFocusLock.mjs.map +1 -1
  336. package/lib/utils/use/usePreventScroll.js +26 -24
  337. package/lib/utils/use/usePreventScroll.js.map +1 -1
  338. package/lib/utils/use/usePreventScroll.mjs +21 -19
  339. package/lib/utils/use/usePreventScroll.mjs.map +1 -1
  340. package/lib/utils/use/useScrollBarWidth.js +14 -8
  341. package/lib/utils/use/useScrollBarWidth.js.map +1 -1
  342. package/lib/utils/use/useScrollBarWidth.mjs +13 -8
  343. package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
  344. package/lib/utils/useCssVariable.js +37 -32
  345. package/lib/utils/useCssVariable.js.map +1 -1
  346. package/lib/utils/useCssVariable.mjs +34 -27
  347. package/lib/utils/useCssVariable.mjs.map +1 -1
  348. package/lib/utils/zIndexStacking.js +24 -28
  349. package/lib/utils/zIndexStacking.js.map +1 -1
  350. package/lib/utils/zIndexStacking.mjs +22 -23
  351. package/lib/utils/zIndexStacking.mjs.map +1 -1
  352. package/package.json +12 -316
  353. package/vite.config.ts +0 -22
  354. package/tsconfig-utils.json +0 -4
package/CHANGELOG.md CHANGED
@@ -2,121 +2,13 @@
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-04-15
5
+ ## [17.0.1] - 2026-05-06
6
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
-
16
- ## [16.5.2] - 2026-04-01
17
-
18
- ### Changed
19
-
20
- - Moved css-variables to separate package - `@semcore/theme`.
21
-
22
- ### Fixed
23
-
24
- - Prevent `body` pollution in `usePreventScroll`.
25
-
26
- ## [16.5.1] - 2025-10-30
27
-
28
- ### Fixed
29
-
30
- - Unnecessary calculations in `sstyled` wrapper.
31
-
32
- ## [16.5.0] - 2025-10-03
33
-
34
- ### Changed
35
-
36
- - Values for `keyboard-focus` tokens.
37
- - Inverted outline token moved from keyboard-focus group to keyboard-focus-invert group: `keyboard-focus-outline-invert` changed to `keyboard-focus-invert-outline` for consistency.
38
- - Grouping for `keyboard-focus` tokens in the design json files.
39
-
40
- ## [16.4.0] - 2025-09-20
41
-
42
- ### Added
43
-
44
- - Ability to use two tags in `tag` property. First for some logic like `Ellipsis` or `Select.Trigger` and second for real `html` tag.
45
-
46
- ## [16.3.1] - 2025-09-12
7
+ ## [2.40.0] - 2026-05-06
47
8
 
48
9
  ### Changed
49
10
 
50
- - Prevent scroll on focus by mouse interaction.
51
-
52
- ## [16.3.0] - 2025-09-08
53
-
54
- ### Added
55
-
56
- - New group of tokens for our `Illustration` component.
57
-
58
- ## [16.2.0] - 2025-09-03
59
-
60
- ### Added
61
-
62
- - New tokens for secondary button from the `feature-highlight` package.
63
-
64
- ### Fixed
65
-
66
- - Some inconsistencies and missing tokens/descriptions in `dark.json`.
67
-
68
- ## [16.1.1] - 2025-08-29
69
-
70
- ### Changed
71
-
72
- - FocusLock work when popper opened without focus and trigger has few focusable elements.
73
-
74
- ## [16.1.0] - 2025-07-24
75
-
76
- ### Added
77
-
78
- - New tokens for FeaturePopover's new theme styles: `feature-popover-bg`, `feature-popover-bg-neutral`, `feature-popover-dot-neutral`, `feature-popover-dot-neutral-outer-border`.
79
-
80
- ## [16.0.4] - 2025-07-07
81
-
82
- ### Added
83
-
84
- - `featureHighlight` tokens to dark.json.
85
- - `newInstance` method for create new component instances from the existing.
86
-
87
- ## [16.0.3] - 2025-07-02
88
-
89
- ### Added
90
-
91
- - `useScrollBarWidth` hook.
92
- - Container focus if there aren't focusable children while `autoFocus='enforced'`
93
-
94
- ## [16.0.2] - 2025-06-23
95
-
96
- ### Added
97
-
98
- - `focusVisible` option to `setFocus` util method with value from last interaction type.
99
-
100
- ## [16.0.1] - 2025-06-16
101
-
102
- ### Added
103
-
104
- - Tokens from basic palette to themed .css files.
105
-
106
- ### Changed
107
-
108
- - Value for `--intergalactic-sidebar-nav-control-hover` token (was updated to match gray palette) and fixed lightness for `--intergalactic-violet-dusty-50` token.
109
-
110
- ## [16.0.0] - 2025-05-19
111
-
112
- ### Added
113
-
114
- - `utils` functions as part of Core.
115
- - `LastInteractionType` class to check last interaction was from keyboard or mouse.
116
-
117
- ### Fixed
118
-
119
- - Return type for `findComponent` util. It could be only `ReactElement` or `undefined`.
11
+ - Version minor update due to children dependencies update (`@semcore/utils` [4.48.5 ~> 4.49.0]).
120
12
 
121
13
  ## [2.39.4] - 2025-05-13
122
14
 
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/HEAD/LICENSE)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/semrush/intergalactic/blob/master/LICENSE)
6
6
 
7
7
  > This component is part of the Intergalactic Design System
8
8
 
@@ -13,14 +13,44 @@
13
13
  ## Install
14
14
 
15
15
  ```sh
16
- npm install @semcore/core
16
+ npm install intergalactic
17
17
  ```
18
18
 
19
+ ## Usage
19
20
 
21
+ ```jsx
22
+ import createComponent, { Root, sstyled } from 'intergalactic/core';
23
+ ```
24
+
25
+ <details>
26
+ <summary>Alternative installation and use</summary>
27
+
28
+ **We do not recommend this usage path due to possible dependency and update issues.**
29
+
30
+ ### Install
31
+
32
+ You can only install one package from the design system
33
+
34
+ ```sh
35
+ npm install @semcore/core @semcore/core
36
+ ```
37
+
38
+ `@semcore/core` - _is the basic package by which we create our components, and it contains all of the common logic
39
+ of the components that is discussed below. There should only be one version of the package in the project._
40
+
41
+ ### Usage
42
+
43
+ You can use the package the same way but without `/ui/` in the import path.
44
+
45
+ ```jsx
46
+ import createComponent, { Root, sstyled } from '@semcore/core';
47
+ ```
48
+
49
+ </details>
20
50
 
21
51
  ## 👤 Author
22
52
 
23
- [UI-kit team](https://github.com/semrush/intergalactic/blob/HEAD/MAINTAINERS)
53
+ [UI-kit team](https://github.com/semrush/intergalactic/blob/master/MAINTAINERS)
24
54
  and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
25
55
 
26
56
  ## 🤝 Contributing
@@ -28,7 +58,7 @@ and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors
28
58
  Contributions, issues and feature requests are welcome!
29
59
 
30
60
  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/HEAD/CONTRIBUTING.md).
61
+ the [contributing guide](https://github.com/semrush/intergalactic/blob/master/CONTRIBUTING.md).
32
62
 
33
63
  ## Show your support
34
64
 
@@ -36,4 +66,4 @@ Give a ⭐️ if this project helped you!
36
66
 
37
67
  ## 📝 License
38
68
 
39
- This project is [MIT](https://github.com/semrush/intergalactic/blob/HEAD/LICENSE) licensed.
69
+ This project is [MIT](https://github.com/semrush/intergalactic/blob/master/LICENSE) licensed.
@@ -1,18 +1,21 @@
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"));
8
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
11
  var _canUseDOM = _interopRequireDefault(require("./utils/canUseDOM"));
10
- class LastInteractionType {
11
- constructor() {
12
- (0, _defineProperty2.default)(this, "lastFocusSource", 'none');
12
+ var LastInteractionType = /*#__PURE__*/function () {
13
+ function LastInteractionType() {
14
+ (0, _classCallCheck2["default"])(this, LastInteractionType);
15
+ (0, _defineProperty2["default"])(this, "lastFocusSource", 'none');
13
16
  this.handleKeyDown = this.handleKeyDown.bind(this);
14
17
  this.handleMouseDown = this.handleMouseDown.bind(this);
15
- if ((0, _canUseDOM.default)()) {
18
+ if ((0, _canUseDOM["default"])()) {
16
19
  document.addEventListener('mousedown', this.handleMouseDown, {
17
20
  capture: true
18
21
  });
@@ -21,21 +24,32 @@ class LastInteractionType {
21
24
  });
22
25
  }
23
26
  }
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();
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();
41
55
  //# sourceMappingURL=LastInteractionType.js.map
@@ -1 +1 @@
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
+ {"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,7 +1,10 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
1
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
4
  import canUseDOM from "./utils/canUseDOM.mjs";
3
- class LastInteractionType {
4
- constructor() {
5
+ var LastInteractionType = /* @__PURE__ */ (function() {
6
+ function LastInteractionType2() {
7
+ _classCallCheck(this, LastInteractionType2);
5
8
  _defineProperty(this, "lastFocusSource", "none");
6
9
  this.handleKeyDown = this.handleKeyDown.bind(this);
7
10
  this.handleMouseDown = this.handleMouseDown.bind(this);
@@ -14,23 +17,34 @@ class LastInteractionType {
14
17
  });
15
18
  }
16
19
  }
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();
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();
34
48
  export {
35
49
  lastInteraction
36
50
  };
@@ -1 +1 @@
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
+ {"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,37 +1,53 @@
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"));
8
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
13
  var _react = require("react");
10
14
  /** @deprecated */
11
15
 
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);
16
+ var Root = exports.Root = undefined;
17
+ var Component = exports.Component = /*#__PURE__*/function (_PureComponent) {
18
+ function Component() {
19
+ var _this;
20
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21
+ args[_key] = arguments[_key];
22
+ }
23
+ (0, _classCallCheck2["default"])(this, Component);
24
+ _this = (0, _callSuper2["default"])(this, Component, [].concat(args));
25
+ (0, _defineProperty2["default"])(_this, "Root", undefined);
26
+ (0, _defineProperty2["default"])(_this, "isControlled", false);
27
+ return _this;
18
28
  }
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
-
32
- // eslint-disable-next-line @typescript-eslint/no-namespace
33
- exports.Component = Component;
34
- let Intergalactic = exports.Intergalactic = void 0;
35
- const wrapIntergalacticComponent = wrapper => wrapper;
36
- exports.wrapIntergalacticComponent = wrapIntergalacticComponent;
29
+ (0, _inherits2["default"])(Component, _PureComponent);
30
+ return (0, _createClass2["default"])(Component, [{
31
+ key: "uncontrolledProps",
32
+ value: function uncontrolledProps() {
33
+ // @ts-ignore. This is a default value. Should be defined in related classes.
34
+ return {};
35
+ }
36
+ }, {
37
+ key: "handlers",
38
+ get: function get() {
39
+ // @ts-ignore. The body will be generated in factory
40
+ return {};
41
+ }
42
+ }, {
43
+ key: "asProps",
44
+ get: function get() {
45
+ return {};
46
+ }
47
+ }]);
48
+ }(_react.PureComponent); // eslint-disable-next-line @typescript-eslint/no-namespace
49
+ var Intergalactic;
50
+ var wrapIntergalacticComponent = exports.wrapIntergalacticComponent = function wrapIntergalacticComponent(wrapper) {
51
+ return wrapper;
52
+ };
37
53
  //# sourceMappingURL=Component.js.map
@@ -1 +1 @@
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\ntype UncontrolledPropValue<V> =\n | V\n | null\n | ((value: V, e?: any) => void | boolean | V)\n | ((value: V, e?: any) => void | boolean | V)[]\n | ((e?: any) => void | boolean | V);\n\nexport abstract class Component<\n Props = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n Uncontrolled extends Readonly<{ [key in keyof Props]?: UncontrolledPropValue<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 type MergeChildProps<Root, Component> = {\n [K in keyof Root | keyof Component]:\n K extends keyof Root\n ? K extends keyof Component\n ? Root[K] & Component[K] extends never\n ? Root[K] | Component[K]\n : Root[K] & Component[K]\n : Root[K]\n : K extends keyof Component\n ? Component[K]\n : never\n };\n\n type InferPropsFromRoot<\n Root extends new (...args: any) => any,\n Child extends string,\n > = InstanceType<Root>[`get${Child}Props`] extends (...args: any[]) => infer R ? R : Record<string, never>;\n\n export type InferComponentProps<\n Component extends ReactFCLike,\n > = Omit<IRootComponentProps & ReactFCLikeProps<Component>, 'tag'>;\n\n export type InferChildComponentProps<\n Component extends ReactFCLike,\n Root extends new (...args: any) => any,\n ChildName extends string,\n MergedProps = MergeChildProps<InferPropsFromRoot<Root, ChildName>, InferComponentProps<Component>>,\n > = MergedProps & IStyledProps;\n\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 > = (<\n Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag,\n Props extends BaseProps = BaseProps,\n >(\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;AAoB5B,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;AAoOvB,MAAMC,0BAA0B,GAIrCC,OAKoB,IAMjBA,OAAc;AAACb,OAAA,CAAAY,0BAAA,GAAAA,0BAAA","ignoreList":[]}
1
+ {"version":3,"file":"Component.js","names":["_react","require","Root","exports","undefined","Component","_PureComponent","_this","_len","arguments","length","args","Array","_key","_classCallCheck2","_callSuper2","concat","_defineProperty2","_inherits2","_createClass2","key","value","uncontrolledProps","get","PureComponent","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\ntype UncontrolledPropValue<V> =\n | V\n | null\n | ((value: V, e?: any) => void | boolean | V)\n | ((value: V, e?: any) => void | boolean | V)[]\n | ((e?: any) => void | boolean | V);\n\nexport abstract class Component<\n Props = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n Uncontrolled extends Readonly<{ [key in keyof Props]?: UncontrolledPropValue<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 type MergeChildProps<Root, Component> = {\n [K in keyof Root | keyof Component]:\n K extends keyof Root\n ? K extends keyof Component\n ? Root[K] & Component[K] extends never\n ? Root[K] | Component[K]\n : Root[K] & Component[K]\n : Root[K]\n : K extends keyof Component\n ? Component[K]\n : never\n };\n\n type InferPropsFromRoot<\n Root extends new (...args: any) => any,\n Child extends string,\n > = InstanceType<Root>[`get${Child}Props`] extends (...args: any[]) => infer R ? R : Record<string, never>;\n\n export type InferComponentProps<\n Component extends ReactFCLike,\n > = Omit<IRootComponentProps & ReactFCLikeProps<Component>, 'tag'>;\n\n export type InferChildComponentProps<\n Component extends ReactFCLike,\n Root extends new (...args: any) => any,\n ChildName extends string,\n MergedProps = MergeChildProps<InferPropsFromRoot<Root, ChildName>, InferComponentProps<Component>>,\n > = MergedProps & IStyledProps;\n\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 > = (<\n Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag,\n Props extends BaseProps = BaseProps,\n >(\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,IAAMC,IAAU,GAAAC,OAAA,CAAAD,IAAA,GAAGE,SAAgB;AAAC,IAoBdC,SAAS,GAAAF,OAAA,CAAAE,SAAA,0BAAAC,cAAA;EAAA,SAAAD,UAAA;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,SAAA;IAAAE,KAAA,OAAAQ,WAAA,mBAAAV,SAAA,KAAAW,MAAA,CAAAL,IAAA;IAAA,IAAAM,gBAAA,aAAAV,KAAA,UA+BKH,SAAS;IAAA,IAAAa,gBAAA,aAAAV,KAAA,kBAElB,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAW,UAAA,aAAAb,SAAA,EAAAC,cAAA;EAAA,WAAAa,aAAA,aAAAd,SAAA;IAAAe,GAAA;IAAAC,KAAA,EA1B9B,SAAUC,iBAAiBA,CAAA,EAA0D;MACnF;MACA,OAAO,CAAC,CAAC;IACX;EAAC;IAAAF,GAAA;IAAAG,GAAA,EAED,SAAAA,IAAA,EAMG;MACD;MACA,OAAO,CAAC,CAAC;IACX;EAAC;IAAAH,GAAA;IAAAG,GAAA,EAED,SAAAA,IAAA,EAAwB;MACtB,OAAO,CAAC,CAAC;IAKX;EAAC;AAAA,EAvBOC,oBAAa,GA8BvB;AAAA,IACiBC,aAAa;AAoOvB,IAAMC,0BAA0B,GAAAvB,OAAA,CAAAuB,0BAAA,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","ignoreList":[]}
@@ -1,24 +1,44 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
1
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
6
  import { PureComponent } from "react";
3
- const Root = void 0;
4
- class Component extends PureComponent {
5
- constructor(...args) {
6
- super(...args);
7
- _defineProperty(this, "Root", void 0);
8
- _defineProperty(this, "isControlled", false);
7
+ var Root = void 0;
8
+ var Component = /* @__PURE__ */ (function(_PureComponent) {
9
+ function Component2() {
10
+ var _this;
11
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12
+ args[_key] = arguments[_key];
13
+ }
14
+ _classCallCheck(this, Component2);
15
+ _this = _callSuper(this, Component2, [].concat(args));
16
+ _defineProperty(_this, "Root", void 0);
17
+ _defineProperty(_this, "isControlled", false);
18
+ return _this;
9
19
  }
10
- uncontrolledProps() {
11
- return {};
12
- }
13
- get handlers() {
14
- return {};
15
- }
16
- get asProps() {
17
- return {};
18
- }
19
- }
20
- let Intergalactic;
21
- const wrapIntergalacticComponent = (wrapper) => wrapper;
20
+ _inherits(Component2, _PureComponent);
21
+ return _createClass(Component2, [{
22
+ key: "uncontrolledProps",
23
+ value: function uncontrolledProps() {
24
+ return {};
25
+ }
26
+ }, {
27
+ key: "handlers",
28
+ get: function get() {
29
+ return {};
30
+ }
31
+ }, {
32
+ key: "asProps",
33
+ get: function get() {
34
+ return {};
35
+ }
36
+ }]);
37
+ })(PureComponent);
38
+ var Intergalactic;
39
+ var wrapIntergalacticComponent = function wrapIntergalacticComponent2(wrapper) {
40
+ return wrapper;
41
+ };
22
42
  export {
23
43
  Component,
24
44
  Intergalactic,