@semcore/core 17.0.1-prerelease.0 → 17.1.0-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 +123 -3
  2. package/README.md +5 -35
  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.js +25 -41
  8. package/lib/core-types/Component.js.map +1 -1
  9. package/lib/core-types/Component.mjs +18 -38
  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 +158 -238
  16. package/lib/coreFactory.js.map +1 -1
  17. package/lib/coreFactory.mjs +133 -189
  18. package/lib/coreFactory.mjs.map +1 -1
  19. package/lib/decorators/propsObserver.js +36 -64
  20. package/lib/decorators/propsObserver.js.map +1 -1
  21. package/lib/decorators/propsObserver.mjs +33 -61
  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 +51 -59
  28. package/lib/enhancement/Children.js.map +1 -1
  29. package/lib/enhancement/Children.mjs +47 -41
  30. package/lib/enhancement/Children.mjs.map +1 -1
  31. package/lib/enhancement/Root.js +36 -37
  32. package/lib/enhancement/Root.js.map +1 -1
  33. package/lib/enhancement/Root.mjs +28 -18
  34. package/lib/enhancement/Root.mjs.map +1 -1
  35. package/lib/enhancement/dataName.js +7 -8
  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 +6 -9
  40. package/lib/enhancement/enhance.js.map +1 -1
  41. package/lib/enhancement/enhance.mjs +4 -7
  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 +10 -9
  50. package/lib/enhancement/i18n.mjs.map +1 -1
  51. package/lib/enhancement/inheritedName.js +7 -8
  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 +47 -56
  56. package/lib/enhancement/staticChildren.js.map +1 -1
  57. package/lib/enhancement/staticChildren.mjs +43 -48
  58. package/lib/enhancement/staticChildren.mjs.map +1 -1
  59. package/lib/enhancement/style.js +29 -27
  60. package/lib/enhancement/style.js.map +1 -1
  61. package/lib/enhancement/style.mjs +26 -20
  62. package/lib/enhancement/style.mjs.map +1 -1
  63. package/lib/enhancement/uncontrolledProps.js +46 -65
  64. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  65. package/lib/enhancement/uncontrolledProps.mjs +43 -52
  66. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  67. package/lib/esm/LastInteractionType.mjs +19 -33
  68. package/lib/esm/core-types/Component.mjs +18 -38
  69. package/lib/esm/core-types/symbols.mjs +9 -9
  70. package/lib/esm/coreFactory.mjs +133 -189
  71. package/lib/esm/enhancement/Children.mjs +47 -41
  72. package/lib/esm/enhancement/Root.mjs +28 -18
  73. package/lib/esm/enhancement/dataName.mjs +5 -5
  74. package/lib/esm/enhancement/enhance.mjs +4 -7
  75. package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
  76. package/lib/esm/enhancement/i18n.mjs +10 -9
  77. package/lib/esm/enhancement/inheritedName.mjs +5 -5
  78. package/lib/esm/enhancement/staticChildren.mjs +43 -48
  79. package/lib/esm/enhancement/style.mjs +26 -20
  80. package/lib/esm/enhancement/uncontrolledProps.mjs +43 -52
  81. package/lib/esm/register.mjs +12 -20
  82. package/lib/esm/styled/reshadow-core.mjs +98 -111
  83. package/lib/esm/styled/sstyled.mjs +31 -41
  84. package/lib/esm/utils/assignProps.mjs +32 -36
  85. package/lib/esm/utils/enhances/WithI18n.mjs +15 -17
  86. package/lib/esm/utils/enhances/i18nEnhance.mjs +47 -61
  87. package/lib/esm/utils/logger.mjs +13 -21
  88. package/lib/esm/utils/pick.mjs +4 -4
  89. package/lib/esm/utils/ref.mjs +27 -43
  90. package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
  91. package/lib/index.js +17 -17
  92. package/lib/register.js +17 -24
  93. package/lib/register.js.map +1 -1
  94. package/lib/register.mjs +12 -20
  95. package/lib/register.mjs.map +1 -1
  96. package/lib/styled/index.js +4 -4
  97. package/lib/styled/reshadow-core.js +102 -104
  98. package/lib/styled/reshadow-core.js.map +1 -1
  99. package/lib/styled/reshadow-core.mjs +98 -111
  100. package/lib/styled/reshadow-core.mjs.map +1 -1
  101. package/lib/styled/sstyled.js +31 -53
  102. package/lib/styled/sstyled.js.map +1 -1
  103. package/lib/styled/sstyled.mjs +31 -41
  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 +8 -10
  116. package/lib/utils/CSSinJS.js.map +1 -1
  117. package/lib/utils/CSSinJS.mjs +6 -7
  118. package/lib/utils/CSSinJS.mjs.map +1 -1
  119. package/lib/utils/ThemeProvider.js +44 -51
  120. package/lib/utils/ThemeProvider.js.map +1 -1
  121. package/lib/utils/ThemeProvider.mjs +36 -47
  122. package/lib/utils/ThemeProvider.mjs.map +1 -1
  123. package/lib/utils/addonText.js +4 -7
  124. package/lib/utils/addonText.js.map +1 -1
  125. package/lib/utils/addonText.mjs +2 -5
  126. package/lib/utils/addonText.mjs.map +1 -1
  127. package/lib/utils/addonTextChildren.js +15 -21
  128. package/lib/utils/addonTextChildren.js.map +1 -1
  129. package/lib/utils/addonTextChildren.mjs +7 -13
  130. package/lib/utils/addonTextChildren.mjs.map +1 -1
  131. package/lib/utils/ariaProps.js +7 -5
  132. package/lib/utils/ariaProps.js.map +1 -1
  133. package/lib/utils/ariaProps.mjs +7 -5
  134. package/lib/utils/ariaProps.mjs.map +1 -1
  135. package/lib/utils/assignProps.js +33 -37
  136. package/lib/utils/assignProps.js.map +1 -1
  137. package/lib/utils/assignProps.mjs +32 -36
  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 +72 -95
  142. package/lib/utils/color.js.map +1 -1
  143. package/lib/utils/color.mjs +71 -94
  144. package/lib/utils/color.mjs.map +1 -1
  145. package/lib/utils/compose.js +3 -12
  146. package/lib/utils/compose.js.map +1 -1
  147. package/lib/utils/compose.mjs +2 -11
  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 +3 -4
  154. package/lib/utils/cssToIntDefault.js.map +1 -1
  155. package/lib/utils/cssToIntDefault.mjs +2 -3
  156. package/lib/utils/cssToIntDefault.mjs.map +1 -1
  157. package/lib/utils/enhances/WithCSS.js +10 -8
  158. package/lib/utils/enhances/WithCSS.js.map +1 -1
  159. package/lib/utils/enhances/WithCSS.mjs +7 -6
  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 +15 -17
  164. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  165. package/lib/utils/enhances/a11yEnhance.js +34 -39
  166. package/lib/utils/enhances/a11yEnhance.js.map +1 -1
  167. package/lib/utils/enhances/a11yEnhance.mjs +32 -36
  168. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
  169. package/lib/utils/enhances/animatedSizeEnhance.js +55 -63
  170. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  171. package/lib/utils/enhances/animatedSizeEnhance.mjs +50 -58
  172. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  173. package/lib/utils/enhances/contextEnhance.js +12 -11
  174. package/lib/utils/enhances/contextEnhance.js.map +1 -1
  175. package/lib/utils/enhances/contextEnhance.mjs +9 -8
  176. package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
  177. package/lib/utils/enhances/i18nEnhance.js +51 -67
  178. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  179. package/lib/utils/enhances/i18nEnhance.mjs +47 -61
  180. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  181. package/lib/utils/enhances/resolveColorEnhance.js +12 -10
  182. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
  183. package/lib/utils/enhances/resolveColorEnhance.mjs +8 -6
  184. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
  185. package/lib/utils/eventEmitter.js +30 -57
  186. package/lib/utils/eventEmitter.js.map +1 -1
  187. package/lib/utils/eventEmitter.mjs +26 -55
  188. package/lib/utils/eventEmitter.mjs.map +1 -1
  189. package/lib/utils/findComponent.js +35 -42
  190. package/lib/utils/findComponent.js.map +1 -1
  191. package/lib/utils/findComponent.mjs +26 -33
  192. package/lib/utils/findComponent.mjs.map +1 -1
  193. package/lib/utils/fire.js +7 -13
  194. package/lib/utils/fire.js.map +1 -1
  195. package/lib/utils/fire.mjs +5 -11
  196. package/lib/utils/fire.mjs.map +1 -1
  197. package/lib/utils/focus-lock/focusBorders.js +28 -32
  198. package/lib/utils/focus-lock/focusBorders.js.map +1 -1
  199. package/lib/utils/focus-lock/focusBorders.mjs +26 -32
  200. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
  201. package/lib/utils/focus-lock/getFocusableIn.js +4 -6
  202. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
  203. package/lib/utils/focus-lock/getFocusableIn.mjs +3 -6
  204. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
  205. package/lib/utils/focus-lock/isFocusInside.js +5 -6
  206. package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
  207. package/lib/utils/focus-lock/isFocusInside.mjs +4 -6
  208. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
  209. package/lib/utils/focus-lock/isFocusable.js +9 -12
  210. package/lib/utils/focus-lock/isFocusable.js.map +1 -1
  211. package/lib/utils/focus-lock/isFocusable.mjs +8 -11
  212. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
  213. package/lib/utils/focus-lock/setFocus.js +21 -27
  214. package/lib/utils/focus-lock/setFocus.js.map +1 -1
  215. package/lib/utils/focus-lock/setFocus.mjs +19 -25
  216. package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
  217. package/lib/utils/getAccessibleName.js +10 -22
  218. package/lib/utils/getAccessibleName.js.map +1 -1
  219. package/lib/utils/getAccessibleName.mjs +10 -21
  220. package/lib/utils/getAccessibleName.mjs.map +1 -1
  221. package/lib/utils/getDisplayName.js +1 -1
  222. package/lib/utils/getEventTarget.js +13 -32
  223. package/lib/utils/getEventTarget.js.map +1 -1
  224. package/lib/utils/getEventTarget.mjs +12 -31
  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 +4 -6
  230. package/lib/utils/getValue.js.map +1 -1
  231. package/lib/utils/getValue.mjs +3 -5
  232. package/lib/utils/getValue.mjs.map +1 -1
  233. package/lib/utils/hasLabels.js +16 -27
  234. package/lib/utils/hasLabels.js.map +1 -1
  235. package/lib/utils/hasLabels.mjs +14 -24
  236. package/lib/utils/hasLabels.mjs.map +1 -1
  237. package/lib/utils/hasParent.js +3 -2
  238. package/lib/utils/hasParent.js.map +1 -1
  239. package/lib/utils/hasParent.mjs +2 -3
  240. package/lib/utils/hasParent.mjs.map +1 -1
  241. package/lib/utils/ifChildren.js +6 -4
  242. package/lib/utils/ifChildren.js.map +1 -1
  243. package/lib/utils/ifChildren.mjs +4 -2
  244. package/lib/utils/ifChildren.mjs.map +1 -1
  245. package/lib/utils/indentStyles.js +5 -10
  246. package/lib/utils/indentStyles.js.map +1 -1
  247. package/lib/utils/indentStyles.mjs +5 -9
  248. package/lib/utils/indentStyles.mjs.map +1 -1
  249. package/lib/utils/injectStyle.js +11 -13
  250. package/lib/utils/injectStyle.js.map +1 -1
  251. package/lib/utils/injectStyle.mjs +9 -10
  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 +7 -9
  258. package/lib/utils/isInteractiveElement.js.map +1 -1
  259. package/lib/utils/isInteractiveElement.mjs +7 -9
  260. package/lib/utils/isInteractiveElement.mjs.map +1 -1
  261. package/lib/utils/isNode.js +4 -5
  262. package/lib/utils/isNode.js.map +1 -1
  263. package/lib/utils/isNode.mjs +1 -2
  264. package/lib/utils/isNode.mjs.map +1 -1
  265. package/lib/utils/isPromise.js +1 -1
  266. package/lib/utils/isRetina.js +7 -2
  267. package/lib/utils/isRetina.js.map +1 -1
  268. package/lib/utils/isRetina.mjs +6 -1
  269. package/lib/utils/isRetina.mjs.map +1 -1
  270. package/lib/utils/logger.js +18 -25
  271. package/lib/utils/logger.js.map +1 -1
  272. package/lib/utils/logger.mjs +13 -21
  273. package/lib/utils/logger.mjs.map +1 -1
  274. package/lib/utils/numericChecker.js +11 -18
  275. package/lib/utils/numericChecker.js.map +1 -1
  276. package/lib/utils/numericChecker.mjs +10 -17
  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 +10 -12
  287. package/lib/utils/propsForElement.js.map +1 -1
  288. package/lib/utils/propsForElement.mjs +8 -10
  289. package/lib/utils/propsForElement.mjs.map +1 -1
  290. package/lib/utils/rafTrottle.js +9 -14
  291. package/lib/utils/rafTrottle.js.map +1 -1
  292. package/lib/utils/rafTrottle.mjs +7 -12
  293. package/lib/utils/rafTrottle.mjs.map +1 -1
  294. package/lib/utils/reactToText.js +5 -8
  295. package/lib/utils/reactToText.js.map +1 -1
  296. package/lib/utils/reactToText.mjs +3 -6
  297. package/lib/utils/reactToText.mjs.map +1 -1
  298. package/lib/utils/ref.js +29 -47
  299. package/lib/utils/ref.js.map +1 -1
  300. package/lib/utils/ref.mjs +27 -43
  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 +8 -18
  309. package/lib/utils/uncontroll.js.map +1 -1
  310. package/lib/utils/uncontroll.mjs +8 -17
  311. package/lib/utils/uncontroll.mjs.map +1 -1
  312. package/lib/utils/uniqueID.js +22 -27
  313. package/lib/utils/uniqueID.js.map +1 -1
  314. package/lib/utils/uniqueID.mjs +18 -25
  315. package/lib/utils/uniqueID.mjs.map +1 -1
  316. package/lib/utils/use/useColorResolver.js +20 -21
  317. package/lib/utils/use/useColorResolver.js.map +1 -1
  318. package/lib/utils/use/useColorResolver.mjs +16 -18
  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 +5 -10
  325. package/lib/utils/use/useEventCallback.js.map +1 -1
  326. package/lib/utils/use/useEventCallback.mjs +3 -8
  327. package/lib/utils/use/useEventCallback.mjs.map +1 -1
  328. package/lib/utils/use/useEventListener.js +11 -15
  329. package/lib/utils/use/useEventListener.js.map +1 -1
  330. package/lib/utils/use/useEventListener.mjs +7 -11
  331. package/lib/utils/use/useEventListener.mjs.map +1 -1
  332. package/lib/utils/use/useFocusLock.js +80 -94
  333. package/lib/utils/use/useFocusLock.js.map +1 -1
  334. package/lib/utils/use/useFocusLock.mjs +71 -88
  335. package/lib/utils/use/useFocusLock.mjs.map +1 -1
  336. package/lib/utils/use/usePreventScroll.js +24 -26
  337. package/lib/utils/use/usePreventScroll.js.map +1 -1
  338. package/lib/utils/use/usePreventScroll.mjs +19 -21
  339. package/lib/utils/use/usePreventScroll.mjs.map +1 -1
  340. package/lib/utils/use/useScrollBarWidth.js +8 -14
  341. package/lib/utils/use/useScrollBarWidth.js.map +1 -1
  342. package/lib/utils/use/useScrollBarWidth.mjs +8 -13
  343. package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
  344. package/lib/utils/useCssVariable.js +32 -37
  345. package/lib/utils/useCssVariable.js.map +1 -1
  346. package/lib/utils/useCssVariable.mjs +27 -34
  347. package/lib/utils/useCssVariable.mjs.map +1 -1
  348. package/lib/utils/zIndexStacking.js +28 -24
  349. package/lib/utils/zIndexStacking.js.map +1 -1
  350. package/lib/utils/zIndexStacking.mjs +23 -22
  351. package/lib/utils/zIndexStacking.mjs.map +1 -1
  352. package/package.json +316 -13
  353. package/tsconfig-utils.json +4 -0
  354. package/vite.config.ts +22 -0
package/CHANGELOG.md CHANGED
@@ -2,13 +2,133 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [17.0.1] - 2026-05-06
5
+ ## [17.1.0] - 2026-05-12
6
6
 
7
- ## [2.40.0] - 2026-05-06
7
+ ### Added
8
+
9
+ - New brand theme.
10
+
11
+ ## [17.0.1] - 2026-04-16
12
+
13
+ ### Fixed
14
+
15
+ - Build processing to correct extract styles.
16
+
17
+ ## [17.0.0] - 2026-04-15
18
+
19
+ ### BREAK
20
+
21
+ - New major version.
22
+ - Removed `WithI18n`. Use `useI18n`.
23
+ - Removed `WithCSS`. Use `useCss`.
24
+ - Removed `WithAutoFocus` and `autoFocusEnhance`.
25
+ - Removed `WithKeyboardFocus`. Just don't use.
26
+ - Removed `WithRef`. Use `useForkRef`.
27
+
28
+ ## [16.5.2] - 2026-04-01
29
+
30
+ ### Changed
31
+
32
+ - Moved css-variables to separate package - `@semcore/theme`.
33
+
34
+ ### Fixed
35
+
36
+ - Prevent `body` pollution in `usePreventScroll`.
37
+
38
+ ## [16.5.1] - 2025-10-30
39
+
40
+ ### Fixed
41
+
42
+ - Unnecessary calculations in `sstyled` wrapper.
43
+
44
+ ## [16.5.0] - 2025-10-03
8
45
 
9
46
  ### Changed
10
47
 
11
- - Version minor update due to children dependencies update (`@semcore/utils` [4.48.5 ~> 4.49.0]).
48
+ - Values for `keyboard-focus` tokens.
49
+ - 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.
50
+ - Grouping for `keyboard-focus` tokens in the design json files.
51
+
52
+ ## [16.4.0] - 2025-09-20
53
+
54
+ ### Added
55
+
56
+ - Ability to use two tags in `tag` property. First for some logic like `Ellipsis` or `Select.Trigger` and second for real `html` tag.
57
+
58
+ ## [16.3.1] - 2025-09-12
59
+
60
+ ### Changed
61
+
62
+ - Prevent scroll on focus by mouse interaction.
63
+
64
+ ## [16.3.0] - 2025-09-08
65
+
66
+ ### Added
67
+
68
+ - New group of tokens for our `Illustration` component.
69
+
70
+ ## [16.2.0] - 2025-09-03
71
+
72
+ ### Added
73
+
74
+ - New tokens for secondary button from the `feature-highlight` package.
75
+
76
+ ### Fixed
77
+
78
+ - Some inconsistencies and missing tokens/descriptions in `dark.json`.
79
+
80
+ ## [16.1.1] - 2025-08-29
81
+
82
+ ### Changed
83
+
84
+ - FocusLock work when popper opened without focus and trigger has few focusable elements.
85
+
86
+ ## [16.1.0] - 2025-07-24
87
+
88
+ ### Added
89
+
90
+ - 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`.
91
+
92
+ ## [16.0.4] - 2025-07-07
93
+
94
+ ### Added
95
+
96
+ - `featureHighlight` tokens to dark.json.
97
+ - `newInstance` method for create new component instances from the existing.
98
+
99
+ ## [16.0.3] - 2025-07-02
100
+
101
+ ### Added
102
+
103
+ - `useScrollBarWidth` hook.
104
+ - Container focus if there aren't focusable children while `autoFocus='enforced'`
105
+
106
+ ## [16.0.2] - 2025-06-23
107
+
108
+ ### Added
109
+
110
+ - `focusVisible` option to `setFocus` util method with value from last interaction type.
111
+
112
+ ## [16.0.1] - 2025-06-16
113
+
114
+ ### Added
115
+
116
+ - Tokens from basic palette to themed .css files.
117
+
118
+ ### Changed
119
+
120
+ - Value for `--intergalactic-sidebar-nav-control-hover` token (was updated to match gray palette) and fixed lightness for `--intergalactic-violet-dusty-50` token.
121
+
122
+ ## [16.0.0] - 2025-05-19
123
+
124
+ ### Added
125
+
126
+ - `utils` functions as part of Core.
127
+ - `LastInteractionType` class to check last interaction was from keyboard or mouse.
128
+
129
+ ### Fixed
130
+
131
+ - Return type for `findComponent` util. It could be only `ReactElement` or `undefined`.
12
132
 
13
133
  ## [2.39.4] - 2025-05-13
14
134
 
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
 
@@ -13,44 +13,14 @@
13
13
  ## Install
14
14
 
15
15
  ```sh
16
- npm install intergalactic
16
+ npm install @semcore/core
17
17
  ```
18
18
 
19
- ## Usage
20
19
 
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>
50
20
 
51
21
  ## 👤 Author
52
22
 
53
- [UI-kit team](https://github.com/semrush/intergalactic/blob/master/MAINTAINERS)
23
+ [UI-kit team](https://github.com/semrush/intergalactic/blob/HEAD/MAINTAINERS)
54
24
  and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
55
25
 
56
26
  ## 🤝 Contributing
@@ -58,7 +28,7 @@ and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors
58
28
  Contributions, issues and feature requests are welcome!
59
29
 
60
30
  Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at
61
- 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).
62
32
 
63
33
  ## Show your support
64
34
 
@@ -66,4 +36,4 @@ Give a ⭐️ if this project helped you!
66
36
 
67
37
  ## 📝 License
68
38
 
69
- 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,53 +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
- 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;
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);
28
18
  }
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
- };
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;
53
37
  //# sourceMappingURL=Component.js.map
@@ -1 +1 @@
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
+ {"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,44 +1,24 @@
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";
5
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
2
  import { PureComponent } from "react";
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;
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);
19
9
  }
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
- };
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;
42
22
  export {
43
23
  Component,
44
24
  Intergalactic,