@semcore/core 16.5.1 → 17.0.0-prerelease.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/README.md +4 -4
  3. package/lib/LastInteractionType.js +22 -36
  4. package/lib/LastInteractionType.js.map +1 -1
  5. package/lib/LastInteractionType.mjs +19 -33
  6. package/lib/LastInteractionType.mjs.map +1 -1
  7. package/lib/core-types/Component.d.ts +26 -79
  8. package/lib/core-types/Component.js +24 -72
  9. package/lib/core-types/Component.js.map +1 -1
  10. package/lib/core-types/Component.mjs +18 -34
  11. package/lib/core-types/Component.mjs.map +1 -1
  12. package/lib/core-types/symbols.js +9 -9
  13. package/lib/core-types/symbols.js.map +1 -1
  14. package/lib/core-types/symbols.mjs +9 -9
  15. package/lib/core-types/symbols.mjs.map +1 -1
  16. package/lib/coreFactory.d.ts +6 -23
  17. package/lib/coreFactory.js +150 -217
  18. package/lib/coreFactory.js.map +1 -1
  19. package/lib/coreFactory.mjs +139 -194
  20. package/lib/coreFactory.mjs.map +1 -1
  21. package/lib/decorators/propsObserver.d.ts +11 -0
  22. package/lib/decorators/reactive.d.ts +11 -0
  23. package/lib/enhancement/Children.js +51 -59
  24. package/lib/enhancement/Children.js.map +1 -1
  25. package/lib/enhancement/Children.mjs +47 -41
  26. package/lib/enhancement/Children.mjs.map +1 -1
  27. package/lib/enhancement/Root.js +36 -37
  28. package/lib/enhancement/Root.js.map +1 -1
  29. package/lib/enhancement/Root.mjs +28 -18
  30. package/lib/enhancement/Root.mjs.map +1 -1
  31. package/lib/enhancement/dataName.js +7 -8
  32. package/lib/enhancement/dataName.js.map +1 -1
  33. package/lib/enhancement/dataName.mjs +5 -5
  34. package/lib/enhancement/dataName.mjs.map +1 -1
  35. package/lib/enhancement/enhance.js +6 -9
  36. package/lib/enhancement/enhance.js.map +1 -1
  37. package/lib/enhancement/enhance.mjs +5 -7
  38. package/lib/enhancement/enhance.mjs.map +1 -1
  39. package/lib/enhancement/functionDefaultProps.js +6 -6
  40. package/lib/enhancement/functionDefaultProps.js.map +1 -1
  41. package/lib/enhancement/functionDefaultProps.mjs +4 -4
  42. package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
  43. package/lib/enhancement/i18n.js +13 -13
  44. package/lib/enhancement/i18n.js.map +1 -1
  45. package/lib/enhancement/i18n.mjs +10 -9
  46. package/lib/enhancement/i18n.mjs.map +1 -1
  47. package/lib/enhancement/inheritedName.js +7 -8
  48. package/lib/enhancement/inheritedName.js.map +1 -1
  49. package/lib/enhancement/inheritedName.mjs +5 -5
  50. package/lib/enhancement/inheritedName.mjs.map +1 -1
  51. package/lib/enhancement/staticChildren.js +47 -56
  52. package/lib/enhancement/staticChildren.js.map +1 -1
  53. package/lib/enhancement/staticChildren.mjs +43 -48
  54. package/lib/enhancement/staticChildren.mjs.map +1 -1
  55. package/lib/enhancement/style.js +29 -27
  56. package/lib/enhancement/style.js.map +1 -1
  57. package/lib/enhancement/style.mjs +26 -20
  58. package/lib/enhancement/style.mjs.map +1 -1
  59. package/lib/enhancement/uncontrolledProps.js +46 -64
  60. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  61. package/lib/enhancement/uncontrolledProps.mjs +43 -51
  62. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  63. package/lib/esm/LastInteractionType.mjs +19 -33
  64. package/lib/esm/core-types/Component.mjs +18 -34
  65. package/lib/esm/core-types/symbols.mjs +9 -9
  66. package/lib/esm/coreFactory.mjs +139 -194
  67. package/lib/esm/enhancement/Children.mjs +47 -41
  68. package/lib/esm/enhancement/Root.mjs +28 -18
  69. package/lib/esm/enhancement/dataName.mjs +5 -5
  70. package/lib/esm/enhancement/enhance.mjs +5 -7
  71. package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
  72. package/lib/esm/enhancement/i18n.mjs +10 -9
  73. package/lib/esm/enhancement/inheritedName.mjs +5 -5
  74. package/lib/esm/enhancement/staticChildren.mjs +43 -48
  75. package/lib/esm/enhancement/style.mjs +26 -20
  76. package/lib/esm/enhancement/uncontrolledProps.mjs +43 -51
  77. package/lib/esm/register.mjs +12 -20
  78. package/lib/esm/styled/reshadow-core.mjs +98 -111
  79. package/lib/esm/styled/sstyled.mjs +31 -41
  80. package/lib/esm/utils/assignProps.mjs +32 -36
  81. package/lib/esm/utils/enhances/WithI18n.mjs +16 -63
  82. package/lib/esm/utils/enhances/i18nEnhance.mjs +47 -61
  83. package/lib/esm/utils/logger.mjs +13 -21
  84. package/lib/esm/utils/pick.mjs +4 -4
  85. package/lib/esm/utils/ref.mjs +27 -57
  86. package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
  87. package/lib/index.d.ts +3 -3
  88. package/lib/index.js +17 -17
  89. package/lib/index.js.map +1 -1
  90. package/lib/index.mjs.map +1 -1
  91. package/lib/register.js +17 -24
  92. package/lib/register.js.map +1 -1
  93. package/lib/register.mjs +12 -20
  94. package/lib/register.mjs.map +1 -1
  95. package/lib/styled/index.d.ts +1 -5
  96. package/lib/styled/index.js +4 -4
  97. package/lib/styled/index.js.map +1 -1
  98. package/lib/styled/index.mjs.map +1 -1
  99. package/lib/styled/reshadow-core.js +102 -104
  100. package/lib/styled/reshadow-core.js.map +1 -1
  101. package/lib/styled/reshadow-core.mjs +98 -111
  102. package/lib/styled/reshadow-core.mjs.map +1 -1
  103. package/lib/styled/sstyled.js +31 -53
  104. package/lib/styled/sstyled.js.map +1 -1
  105. package/lib/styled/sstyled.mjs +31 -41
  106. package/lib/styled/sstyled.mjs.map +1 -1
  107. package/lib/theme/processor.js +150 -222
  108. package/lib/theme/processor.js.map +1 -1
  109. package/lib/theme/processor.mjs +148 -221
  110. package/lib/theme/processor.mjs.map +1 -1
  111. package/lib/theme/themes/dark.js +2 -2
  112. package/lib/theme/themes/dark.js.map +1 -1
  113. package/lib/theme/themes/default.js +2 -2
  114. package/lib/theme/themes/default.js.map +1 -1
  115. package/lib/theme/themes/highlights-dark.js +2 -2
  116. package/lib/theme/themes/highlights-dark.js.map +1 -1
  117. package/lib/theme/themes/highlights-light.js +2 -2
  118. package/lib/theme/themes/highlights-light.js.map +1 -1
  119. package/lib/theme/themes/light.js +2 -2
  120. package/lib/theme/themes/light.js.map +1 -1
  121. package/lib/theme/utils.js +140 -215
  122. package/lib/theme/utils.js.map +1 -1
  123. package/lib/theme/utils.mjs +135 -214
  124. package/lib/theme/utils.mjs.map +1 -1
  125. package/lib/utils/CSSinJS.js +8 -10
  126. package/lib/utils/CSSinJS.js.map +1 -1
  127. package/lib/utils/CSSinJS.mjs +6 -7
  128. package/lib/utils/CSSinJS.mjs.map +1 -1
  129. package/lib/utils/ThemeProvider.js +44 -51
  130. package/lib/utils/ThemeProvider.js.map +1 -1
  131. package/lib/utils/ThemeProvider.mjs +36 -47
  132. package/lib/utils/ThemeProvider.mjs.map +1 -1
  133. package/lib/utils/addonText.js +4 -7
  134. package/lib/utils/addonText.js.map +1 -1
  135. package/lib/utils/addonText.mjs +2 -5
  136. package/lib/utils/addonText.mjs.map +1 -1
  137. package/lib/utils/addonTextChildren.js +15 -21
  138. package/lib/utils/addonTextChildren.js.map +1 -1
  139. package/lib/utils/addonTextChildren.mjs +7 -13
  140. package/lib/utils/addonTextChildren.mjs.map +1 -1
  141. package/lib/utils/ariaProps.js +7 -5
  142. package/lib/utils/ariaProps.js.map +1 -1
  143. package/lib/utils/ariaProps.mjs +7 -5
  144. package/lib/utils/ariaProps.mjs.map +1 -1
  145. package/lib/utils/assignProps.js +33 -37
  146. package/lib/utils/assignProps.js.map +1 -1
  147. package/lib/utils/assignProps.mjs +32 -36
  148. package/lib/utils/assignProps.mjs.map +1 -1
  149. package/lib/utils/canUseDOM.js +1 -1
  150. package/lib/utils/capitalizeFirstLetter.js +1 -1
  151. package/lib/utils/color.js +72 -95
  152. package/lib/utils/color.js.map +1 -1
  153. package/lib/utils/color.mjs +71 -94
  154. package/lib/utils/color.mjs.map +1 -1
  155. package/lib/utils/compose.js +3 -12
  156. package/lib/utils/compose.js.map +1 -1
  157. package/lib/utils/compose.mjs +2 -11
  158. package/lib/utils/compose.mjs.map +1 -1
  159. package/lib/utils/createUUID.js +5 -5
  160. package/lib/utils/createUUID.js.map +1 -1
  161. package/lib/utils/createUUID.mjs +4 -4
  162. package/lib/utils/createUUID.mjs.map +1 -1
  163. package/lib/utils/cssToIntDefault.js +3 -4
  164. package/lib/utils/cssToIntDefault.js.map +1 -1
  165. package/lib/utils/cssToIntDefault.mjs +2 -3
  166. package/lib/utils/cssToIntDefault.mjs.map +1 -1
  167. package/lib/utils/enhances/WithCSS.d.ts +2 -30
  168. package/lib/utils/enhances/WithCSS.js +13 -64
  169. package/lib/utils/enhances/WithCSS.js.map +1 -1
  170. package/lib/utils/enhances/WithCSS.mjs +9 -59
  171. package/lib/utils/enhances/WithCSS.mjs.map +1 -1
  172. package/lib/utils/enhances/WithI18n.d.ts +1 -30
  173. package/lib/utils/enhances/WithI18n.js +20 -76
  174. package/lib/utils/enhances/WithI18n.js.map +1 -1
  175. package/lib/utils/enhances/WithI18n.mjs +16 -63
  176. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  177. package/lib/utils/enhances/a11yEnhance.js +34 -39
  178. package/lib/utils/enhances/a11yEnhance.js.map +1 -1
  179. package/lib/utils/enhances/a11yEnhance.mjs +32 -36
  180. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
  181. package/lib/utils/enhances/animatedSizeEnhance.d.ts +0 -4
  182. package/lib/utils/enhances/animatedSizeEnhance.js +55 -65
  183. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  184. package/lib/utils/enhances/animatedSizeEnhance.mjs +50 -61
  185. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  186. package/lib/utils/enhances/contextEnhance.js +12 -11
  187. package/lib/utils/enhances/contextEnhance.js.map +1 -1
  188. package/lib/utils/enhances/contextEnhance.mjs +9 -8
  189. package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
  190. package/lib/utils/enhances/i18nEnhance.d.ts +0 -4
  191. package/lib/utils/enhances/i18nEnhance.js +51 -69
  192. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  193. package/lib/utils/enhances/i18nEnhance.mjs +47 -61
  194. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  195. package/lib/utils/enhances/resolveColorEnhance.js +12 -10
  196. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
  197. package/lib/utils/enhances/resolveColorEnhance.mjs +8 -6
  198. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
  199. package/lib/utils/eventEmitter.d.ts +10 -6
  200. package/lib/utils/eventEmitter.js +33 -32
  201. package/lib/utils/eventEmitter.js.map +1 -1
  202. package/lib/utils/eventEmitter.mjs +30 -31
  203. package/lib/utils/eventEmitter.mjs.map +1 -1
  204. package/lib/utils/findComponent.js +35 -42
  205. package/lib/utils/findComponent.js.map +1 -1
  206. package/lib/utils/findComponent.mjs +26 -33
  207. package/lib/utils/findComponent.mjs.map +1 -1
  208. package/lib/utils/fire.js +7 -13
  209. package/lib/utils/fire.js.map +1 -1
  210. package/lib/utils/fire.mjs +5 -11
  211. package/lib/utils/fire.mjs.map +1 -1
  212. package/lib/utils/focus-lock/focusBorders.js +28 -32
  213. package/lib/utils/focus-lock/focusBorders.js.map +1 -1
  214. package/lib/utils/focus-lock/focusBorders.mjs +26 -32
  215. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
  216. package/lib/utils/focus-lock/getFocusableIn.js +4 -6
  217. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
  218. package/lib/utils/focus-lock/getFocusableIn.mjs +3 -6
  219. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
  220. package/lib/utils/focus-lock/isFocusInside.js +5 -6
  221. package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
  222. package/lib/utils/focus-lock/isFocusInside.mjs +4 -6
  223. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
  224. package/lib/utils/focus-lock/isFocusable.js +9 -12
  225. package/lib/utils/focus-lock/isFocusable.js.map +1 -1
  226. package/lib/utils/focus-lock/isFocusable.mjs +8 -11
  227. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
  228. package/lib/utils/focus-lock/setFocus.js +21 -27
  229. package/lib/utils/focus-lock/setFocus.js.map +1 -1
  230. package/lib/utils/focus-lock/setFocus.mjs +19 -25
  231. package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
  232. package/lib/utils/getAccessibleName.js +10 -22
  233. package/lib/utils/getAccessibleName.js.map +1 -1
  234. package/lib/utils/getAccessibleName.mjs +10 -21
  235. package/lib/utils/getAccessibleName.mjs.map +1 -1
  236. package/lib/utils/getDisplayName.js +1 -1
  237. package/lib/utils/getDisplayName.mjs +3 -5
  238. package/lib/utils/getEventTarget.js +13 -32
  239. package/lib/utils/getEventTarget.js.map +1 -1
  240. package/lib/utils/getEventTarget.mjs +12 -31
  241. package/lib/utils/getEventTarget.mjs.map +1 -1
  242. package/lib/utils/getOriginChildren.js +4 -4
  243. package/lib/utils/getOriginChildren.js.map +1 -1
  244. package/lib/utils/getRandomInt.js +1 -1
  245. package/lib/utils/getValue.js +4 -6
  246. package/lib/utils/getValue.js.map +1 -1
  247. package/lib/utils/getValue.mjs +3 -5
  248. package/lib/utils/getValue.mjs.map +1 -1
  249. package/lib/utils/hasLabels.js +16 -27
  250. package/lib/utils/hasLabels.js.map +1 -1
  251. package/lib/utils/hasLabels.mjs +14 -24
  252. package/lib/utils/hasLabels.mjs.map +1 -1
  253. package/lib/utils/hasParent.js +3 -2
  254. package/lib/utils/hasParent.js.map +1 -1
  255. package/lib/utils/hasParent.mjs +2 -3
  256. package/lib/utils/hasParent.mjs.map +1 -1
  257. package/lib/utils/ifChildren.js +6 -4
  258. package/lib/utils/ifChildren.js.map +1 -1
  259. package/lib/utils/ifChildren.mjs +4 -2
  260. package/lib/utils/ifChildren.mjs.map +1 -1
  261. package/lib/utils/injectStyle.js +11 -13
  262. package/lib/utils/injectStyle.js.map +1 -1
  263. package/lib/utils/injectStyle.mjs +9 -10
  264. package/lib/utils/injectStyle.mjs.map +1 -1
  265. package/lib/utils/inputProps.js +5 -5
  266. package/lib/utils/inputProps.js.map +1 -1
  267. package/lib/utils/inputProps.mjs +4 -4
  268. package/lib/utils/inputProps.mjs.map +1 -1
  269. package/lib/utils/isInteractiveElement.js +7 -9
  270. package/lib/utils/isInteractiveElement.js.map +1 -1
  271. package/lib/utils/isInteractiveElement.mjs +7 -9
  272. package/lib/utils/isInteractiveElement.mjs.map +1 -1
  273. package/lib/utils/isNode.js +4 -5
  274. package/lib/utils/isNode.js.map +1 -1
  275. package/lib/utils/isNode.mjs +1 -2
  276. package/lib/utils/isNode.mjs.map +1 -1
  277. package/lib/utils/isPromise.js +1 -1
  278. package/lib/utils/isRetina.js +7 -2
  279. package/lib/utils/isRetina.js.map +1 -1
  280. package/lib/utils/isRetina.mjs +6 -1
  281. package/lib/utils/isRetina.mjs.map +1 -1
  282. package/lib/utils/logger.js +18 -25
  283. package/lib/utils/logger.js.map +1 -1
  284. package/lib/utils/logger.mjs +13 -21
  285. package/lib/utils/logger.mjs.map +1 -1
  286. package/lib/utils/numericChecker.js +11 -18
  287. package/lib/utils/numericChecker.js.map +1 -1
  288. package/lib/utils/numericChecker.mjs +10 -17
  289. package/lib/utils/numericChecker.mjs.map +1 -1
  290. package/lib/utils/ownerDocument.js +2 -2
  291. package/lib/utils/ownerDocument.js.map +1 -1
  292. package/lib/utils/ownerDocument.mjs +1 -1
  293. package/lib/utils/ownerDocument.mjs.map +1 -1
  294. package/lib/utils/pick.js +5 -5
  295. package/lib/utils/pick.js.map +1 -1
  296. package/lib/utils/pick.mjs +4 -4
  297. package/lib/utils/pick.mjs.map +1 -1
  298. package/lib/utils/propsForElement.js +10 -12
  299. package/lib/utils/propsForElement.js.map +1 -1
  300. package/lib/utils/propsForElement.mjs +8 -10
  301. package/lib/utils/propsForElement.mjs.map +1 -1
  302. package/lib/utils/rafTrottle.js +9 -14
  303. package/lib/utils/rafTrottle.js.map +1 -1
  304. package/lib/utils/rafTrottle.mjs +7 -12
  305. package/lib/utils/rafTrottle.mjs.map +1 -1
  306. package/lib/utils/reactToText.js +5 -8
  307. package/lib/utils/reactToText.js.map +1 -1
  308. package/lib/utils/reactToText.mjs +3 -6
  309. package/lib/utils/reactToText.mjs.map +1 -1
  310. package/lib/utils/ref.d.ts +1 -3
  311. package/lib/utils/ref.js +29 -61
  312. package/lib/utils/ref.js.map +1 -1
  313. package/lib/utils/ref.mjs +27 -57
  314. package/lib/utils/ref.mjs.map +1 -1
  315. package/lib/utils/setRef.js +2 -2
  316. package/lib/utils/setRef.js.map +1 -1
  317. package/lib/utils/syncScroll.js +24 -24
  318. package/lib/utils/syncScroll.js.map +1 -1
  319. package/lib/utils/syncScroll.mjs +21 -21
  320. package/lib/utils/syncScroll.mjs.map +1 -1
  321. package/lib/utils/uncontroll.js +8 -18
  322. package/lib/utils/uncontroll.js.map +1 -1
  323. package/lib/utils/uncontroll.mjs +8 -17
  324. package/lib/utils/uncontroll.mjs.map +1 -1
  325. package/lib/utils/uniqueID.d.ts +0 -4
  326. package/lib/utils/uniqueID.js +23 -30
  327. package/lib/utils/uniqueID.js.map +1 -1
  328. package/lib/utils/uniqueID.mjs +19 -29
  329. package/lib/utils/uniqueID.mjs.map +1 -1
  330. package/lib/utils/use/useColorResolver.js +20 -21
  331. package/lib/utils/use/useColorResolver.js.map +1 -1
  332. package/lib/utils/use/useColorResolver.mjs +16 -18
  333. package/lib/utils/use/useColorResolver.mjs.map +1 -1
  334. package/lib/utils/use/useEnhancedEffect.d.ts +1 -1
  335. package/lib/utils/use/useEnhancedEffect.js +4 -4
  336. package/lib/utils/use/useEnhancedEffect.js.map +1 -1
  337. package/lib/utils/use/useEnhancedEffect.mjs +1 -1
  338. package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
  339. package/lib/utils/use/useEventCallback.js +5 -10
  340. package/lib/utils/use/useEventCallback.js.map +1 -1
  341. package/lib/utils/use/useEventCallback.mjs +3 -8
  342. package/lib/utils/use/useEventCallback.mjs.map +1 -1
  343. package/lib/utils/use/useEventListener.js +11 -15
  344. package/lib/utils/use/useEventListener.js.map +1 -1
  345. package/lib/utils/use/useEventListener.mjs +7 -11
  346. package/lib/utils/use/useEventListener.mjs.map +1 -1
  347. package/lib/utils/use/useFocusLock.js +80 -94
  348. package/lib/utils/use/useFocusLock.js.map +1 -1
  349. package/lib/utils/use/useFocusLock.mjs +71 -88
  350. package/lib/utils/use/useFocusLock.mjs.map +1 -1
  351. package/lib/utils/use/usePreventScroll.js +26 -28
  352. package/lib/utils/use/usePreventScroll.js.map +1 -1
  353. package/lib/utils/use/usePreventScroll.mjs +21 -23
  354. package/lib/utils/use/usePreventScroll.mjs.map +1 -1
  355. package/lib/utils/use/useScrollBarWidth.js +8 -14
  356. package/lib/utils/use/useScrollBarWidth.js.map +1 -1
  357. package/lib/utils/use/useScrollBarWidth.mjs +8 -13
  358. package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
  359. package/lib/utils/useCssVariable.js +32 -37
  360. package/lib/utils/useCssVariable.js.map +1 -1
  361. package/lib/utils/useCssVariable.mjs +27 -34
  362. package/lib/utils/useCssVariable.mjs.map +1 -1
  363. package/lib/utils/zIndexStacking.d.ts +3 -1
  364. package/lib/utils/zIndexStacking.js +28 -24
  365. package/lib/utils/zIndexStacking.js.map +1 -1
  366. package/lib/utils/zIndexStacking.mjs +23 -22
  367. package/lib/utils/zIndexStacking.mjs.map +1 -1
  368. package/package.json +129 -129
  369. package/lib/enhancement/bindHandler.d.ts +0 -5
  370. package/lib/enhancement/bindHandler.js +0 -53
  371. package/lib/enhancement/bindHandler.js.map +0 -1
  372. package/lib/enhancement/bindHandler.mjs +0 -48
  373. package/lib/enhancement/bindHandler.mjs.map +0 -1
  374. package/lib/enhancement/hoistProps.d.ts +0 -10
  375. package/lib/enhancement/hoistProps.js +0 -95
  376. package/lib/enhancement/hoistProps.js.map +0 -1
  377. package/lib/enhancement/hoistProps.mjs +0 -78
  378. package/lib/enhancement/hoistProps.mjs.map +0 -1
  379. package/lib/esm/enhancement/bindHandler.mjs +0 -48
  380. package/lib/esm/enhancement/hoistProps.mjs +0 -78
  381. package/lib/esm/utils/createHoc.mjs +0 -42
  382. package/lib/esm/utils/getDisplayName.mjs +0 -6
  383. package/lib/utils/ScreenReaderOnly.d.ts +0 -8
  384. package/lib/utils/ScreenReaderOnly.js +0 -30
  385. package/lib/utils/ScreenReaderOnly.js.map +0 -1
  386. package/lib/utils/ScreenReaderOnly.mjs +0 -24
  387. package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
  388. package/lib/utils/createHoc.d.ts +0 -3
  389. package/lib/utils/createHoc.js +0 -52
  390. package/lib/utils/createHoc.js.map +0 -1
  391. package/lib/utils/createHoc.mjs +0 -42
  392. package/lib/utils/createHoc.mjs.map +0 -1
  393. package/lib/utils/enhances/WithAutoFocus.d.ts +0 -14
  394. package/lib/utils/enhances/WithAutoFocus.js +0 -72
  395. package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
  396. package/lib/utils/enhances/WithAutoFocus.mjs +0 -66
  397. package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
  398. package/lib/utils/enhances/WithKeyboardFocus.d.ts +0 -46
  399. package/lib/utils/enhances/WithKeyboardFocus.js +0 -94
  400. package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
  401. package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -88
  402. package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
  403. package/lib/utils/enhances/WithRef.d.ts +0 -3
  404. package/lib/utils/enhances/WithRef.js +0 -25
  405. package/lib/utils/enhances/WithRef.js.map +0 -1
  406. package/lib/utils/enhances/WithRef.mjs +0 -18
  407. package/lib/utils/enhances/WithRef.mjs.map +0 -1
  408. package/lib/utils/enhances/autoFocusEnhance.d.ts +0 -10
  409. package/lib/utils/enhances/autoFocusEnhance.js +0 -45
  410. package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
  411. package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
  412. package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
  413. package/lib/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
  414. package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
  415. package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
  416. package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
  417. package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
  418. package/lib/utils/if.d.ts +0 -11
  419. package/lib/utils/if.js +0 -15
  420. package/lib/utils/if.js.map +0 -1
  421. package/lib/utils/if.mjs +0 -9
  422. package/lib/utils/if.mjs.map +0 -1
  423. package/lib/utils/use/useCss.d.ts +0 -4
  424. package/lib/utils/use/useCss.js +0 -19
  425. package/lib/utils/use/useCss.js.map +0 -1
  426. package/lib/utils/use/useCss.mjs +0 -12
  427. package/lib/utils/use/useCss.mjs.map +0 -1
@@ -1,40 +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 RootComponent = /* @__PURE__ */ (function(_PureComponent) {
9
- function RootComponent2() {
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, RootComponent2);
15
- _this = _callSuper(this, RootComponent2, [].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(RootComponent2, _PureComponent);
21
- return _createClass(RootComponent2, [{
22
- key: "handlers",
23
- get: function get() {
24
- return {};
25
- }
26
- }, {
27
- key: "asProps",
28
- get: function get() {
29
- return {};
30
- }
31
- }]);
32
- })(PureComponent);
33
- var Component = RootComponent;
34
- var Intergalactic;
35
- var wrapIntergalacticComponent = function wrapIntergalacticComponent2(wrapper) {
36
- return wrapper;
37
- };
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;
38
22
  export {
39
23
  Component,
40
24
  Intergalactic,
@@ -1 +1 @@
1
- {"version":3,"file":"Component.mjs","names":["PureComponent","Root","undefined","RootComponent","_PureComponent","_this","_len","arguments","length","args","Array","_key","_classCallCheck","_callSuper","concat","_defineProperty","_inherits","_createClass","key","get","Component","Intergalactic","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import type React from 'react';\nimport { type\nAllHTMLAttributes, type\nForwardRefExoticComponent,\nPureComponent, type\nReactNode, type\nRefAttributes, type\nRefObject,\n} from 'react';\n\nimport type { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\nimport type { IStyledProps } from '../styled/index';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n 'forwardRef'?: RefObject<any>;\n 'Children'?: any;\n 'children'?: ChildrenType<Props, Ctx>;\n 'styles'?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n InnerProps = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag | [ComponentTag, keyof JSX.IntrinsicElements],\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n newInstance: () => Component<BaseTag, Props, Context>;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n } & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n };\n"],"mappings":";;;;;AACA,SAGAA,aAAa,QAIN,OAAO;;AAKd;;AAOA;;AAEA;;AAKA;;AAGA;;AAKA;;AASA;;AAGA;;AAIA;;AASA;;AAIA;;AAYA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAKA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAA,SAAAD,cAAA;IAAA,IAAAE,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAC,eAAA,OAAAT,aAAA;IAAAE,KAAA,GAAAQ,UAAA,OAAAV,aAAA,KAAAW,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAV,KAAA,UAuBbH,SAAS;IAAAa,eAAA,CAAAV,KAAA,kBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAW,SAAA,CAAAb,aAAA,EAAAC,cAAA;EAAA,OAAAa,YAAA,CAAAd,aAAA;IAAAe,GAAA;IAAAC,GAAA,EAlBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IASX;EAAC;AAAA,EAfOnB,aAAa;AAsBvB,OAAO,IAAMoB,SAAS,GAAGjB,aAAa;AACtC;AAgBA;AAAA,WACiBkB,aAAa;AAgM9B,OAAO,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","ignoreList":[]}
1
+ {"version":3,"file":"Component.mjs","names":["PureComponent","Root","undefined","Component","constructor","args","_defineProperty","uncontrolledProps","handlers","asProps","Intergalactic","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import type React from 'react';\nimport { type\nAllHTMLAttributes, type\nForwardRefExoticComponent,\nPureComponent, type\nReactNode, type\nRefObject,\n} from 'react';\n\nimport type { CORE_COMPONENT } from './symbols';\nimport type { IStyledProps } from '../styled/index';\n\ntype HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n\nexport interface IRootComponentProps<Props = {}, Ctx = {}, H = {}> {\n 'forwardRef'?: RefObject<any>;\n 'Children'?: any;\n 'children'?: ReactNode | ((props: Props & Ctx, handlers: HandlersType<H>) => ReactNode);\n 'styles'?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\ntype RootResult<T extends Intergalactic.Tag | never> = ForwardRefExoticComponent<IRootNodeProps & Intergalactic.InternalTypings.ComponentPropsNesting<T>>;\n\ntype BaseAsProps<Props = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> = Readonly<\n Props &\n IRootComponentProps &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps\n>;\n\nexport abstract class Component<\n Props = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n Uncontrolled extends Readonly<{ [key in keyof Props]?: Props[key] | null | ((value: Props[key], e?: any) => void | boolean | Props[key]) | ((value: Props[key], e?: any) => void | boolean | Props[key])[] }> = never,\n InnerProps = {},\n State = {},\n> extends PureComponent<Props, State> {\n protected uncontrolledProps(): [Uncontrolled] extends [never] ? never : Uncontrolled {\n // @ts-ignore. This is a default value. Should be defined in related classes.\n return {};\n };\n\n protected get handlers(): Readonly<{\n [key in keyof Uncontrolled]: key extends keyof Props\n ? Uncontrolled[key] extends (null | Props[key])\n ? (value: Props[key], e?: any) => void\n : Uncontrolled[key] extends Array<any> ? Uncontrolled[key][0] : Uncontrolled[key]\n : never\n }> {\n // @ts-ignore. The body will be generated in factory\n return {};\n }\n\n protected get asProps() {\n return {} as Readonly<\n { Root: RootResult<any> } &\n BaseAsProps<Props, Enhance, InnerProps> &\n Intergalactic.InternalTypings.EfficientOmit<AllHTMLAttributes<any>, keyof BaseAsProps<Props, Enhance, InnerProps>>\n >;\n }\n\n protected Root: RootResult<any> = undefined as any;\n\n protected isControlled = false;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends Readonly<any[]> = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace InternalTypings {\n export type PartialRequired<T, K extends keyof T> = Omit<T, K> & {\n [key in K]-?: T[key];\n };\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag | [ComponentTag, keyof JSX.IntrinsicElements],\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends Readonly<any[]> = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n newInstance: () => Component<BaseTag, Props, Context>;\n [CORE_COMPONENT]: boolean;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends Readonly<any[]> = never[],\n > = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n"],"mappings":";AACA,SAGAA,aAAa,QAGN,OAAO;;AAwBd;;AAGA,MAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;AAWb,OAAO,MAAeE,SAAS,SAMrBH,aAAa,CAAe;EAAAI,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,eAyBFJ,SAAS;IAAAI,eAAA,uBAElB,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;AAAA,WACiBC,aAAa;AAoM9B,OAAO,MAAMC,0BAA0B,GAIrCC,OAKoB,IAMjBA,OAAc","ignoreList":[]}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.PARENT_COMPONENTS = exports.INHERITED_NAME = exports.CREATE_COMPONENT = exports.CORE_INSTANCE = exports.CORE_INIT = exports.CORE_COMPONENT = exports.CORE_AS_PROPS = exports.CONTEXT_COMPONENT = exports.CHILDREN_COMPONENT = void 0;
7
- var CORE_COMPONENT = exports.CORE_COMPONENT = Symbol('CORE_COMPONENT');
8
- var CORE_INSTANCE = exports.CORE_INSTANCE = Symbol('CORE_INSTANCE');
9
- var CORE_AS_PROPS = exports.CORE_AS_PROPS = Symbol('CORE_AS_PROPS');
10
- var CORE_INIT = exports.CORE_INIT = Symbol('CORE_INIT');
11
- var CONTEXT_COMPONENT = exports.CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');
12
- var CREATE_COMPONENT = exports.CREATE_COMPONENT = Symbol('CREATE_COMPONENT');
13
- var PARENT_COMPONENTS = exports.PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');
14
- var CHILDREN_COMPONENT = exports.CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');
15
- var INHERITED_NAME = exports.INHERITED_NAME = Symbol('INHERITED_NAME');
7
+ const CORE_COMPONENT = exports.CORE_COMPONENT = Symbol('CORE_COMPONENT');
8
+ const CORE_INSTANCE = exports.CORE_INSTANCE = Symbol('CORE_INSTANCE');
9
+ const CORE_AS_PROPS = exports.CORE_AS_PROPS = Symbol('CORE_AS_PROPS');
10
+ const CORE_INIT = exports.CORE_INIT = Symbol('CORE_INIT');
11
+ const CONTEXT_COMPONENT = exports.CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');
12
+ const CREATE_COMPONENT = exports.CREATE_COMPONENT = Symbol('CREATE_COMPONENT');
13
+ const PARENT_COMPONENTS = exports.PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');
14
+ const CHILDREN_COMPONENT = exports.CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');
15
+ const INHERITED_NAME = exports.INHERITED_NAME = Symbol('INHERITED_NAME');
16
16
  //# sourceMappingURL=symbols.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"symbols.js","names":["CORE_COMPONENT","exports","Symbol","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":";;;;;;AAAO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAGE,MAAM,CAAC,gBAAgB,CAAC;AAC/C,IAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAGD,MAAM,CAAC,eAAe,CAAC;AAC7C,IAAME,aAAa,GAAAH,OAAA,CAAAG,aAAA,GAAGF,MAAM,CAAC,eAAe,CAAC;AAC7C,IAAMG,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGH,MAAM,CAAC,WAAW,CAAC;AACrC,IAAMI,iBAAiB,GAAAL,OAAA,CAAAK,iBAAA,GAAGJ,MAAM,CAAC,mBAAmB,CAAC;AACrD,IAAMK,gBAAgB,GAAAN,OAAA,CAAAM,gBAAA,GAAGL,MAAM,CAAC,kBAAkB,CAAC;AACnD,IAAMM,iBAAiB,GAAAP,OAAA,CAAAO,iBAAA,GAAGN,MAAM,CAAC,mBAAmB,CAAC;AACrD,IAAMO,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAGP,MAAM,CAAC,oBAAoB,CAAC;AACvD,IAAMQ,cAAc,GAAAT,OAAA,CAAAS,cAAA,GAAGR,MAAM,CAAC,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"symbols.js","names":["CORE_COMPONENT","exports","Symbol","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAGE,MAAM,CAAC,gBAAgB,CAAC;AAC/C,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAGD,MAAM,CAAC,eAAe,CAAC;AAC7C,MAAME,aAAa,GAAAH,OAAA,CAAAG,aAAA,GAAGF,MAAM,CAAC,eAAe,CAAC;AAC7C,MAAMG,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGH,MAAM,CAAC,WAAW,CAAC;AACrC,MAAMI,iBAAiB,GAAAL,OAAA,CAAAK,iBAAA,GAAGJ,MAAM,CAAC,mBAAmB,CAAC;AACrD,MAAMK,gBAAgB,GAAAN,OAAA,CAAAM,gBAAA,GAAGL,MAAM,CAAC,kBAAkB,CAAC;AACnD,MAAMM,iBAAiB,GAAAP,OAAA,CAAAO,iBAAA,GAAGN,MAAM,CAAC,mBAAmB,CAAC;AACrD,MAAMO,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAGP,MAAM,CAAC,oBAAoB,CAAC;AACvD,MAAMQ,cAAc,GAAAT,OAAA,CAAAS,cAAA,GAAGR,MAAM,CAAC,gBAAgB,CAAC","ignoreList":[]}
@@ -1,12 +1,12 @@
1
- var CORE_COMPONENT = Symbol("CORE_COMPONENT");
2
- var CORE_INSTANCE = Symbol("CORE_INSTANCE");
3
- var CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
4
- var CORE_INIT = Symbol("CORE_INIT");
5
- var CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
6
- var CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
7
- var PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
8
- var CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
9
- var INHERITED_NAME = Symbol("INHERITED_NAME");
1
+ const CORE_COMPONENT = Symbol("CORE_COMPONENT");
2
+ const CORE_INSTANCE = Symbol("CORE_INSTANCE");
3
+ const CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
4
+ const CORE_INIT = Symbol("CORE_INIT");
5
+ const CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
6
+ const CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
7
+ const PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
8
+ const CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
9
+ const INHERITED_NAME = Symbol("INHERITED_NAME");
10
10
  export {
11
11
  CHILDREN_COMPONENT,
12
12
  CONTEXT_COMPONENT,
@@ -1 +1 @@
1
- {"version":3,"file":"symbols.mjs","names":["CORE_COMPONENT","Symbol","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":"AAAA,OAAO,IAAMA,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AACtD,OAAO,IAAMC,aAAa,GAAGD,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,IAAME,aAAa,GAAGF,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,IAAMG,SAAS,GAAGH,MAAM,CAAC,WAAW,CAAC;AAC5C,OAAO,IAAMI,iBAAiB,GAAGJ,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,IAAMK,gBAAgB,GAAGL,MAAM,CAAC,kBAAkB,CAAC;AAC1D,OAAO,IAAMM,iBAAiB,GAAGN,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,IAAMO,kBAAkB,GAAGP,MAAM,CAAC,oBAAoB,CAAC;AAC9D,OAAO,IAAMQ,cAAc,GAAGR,MAAM,CAAC,gBAAgB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"symbols.mjs","names":["CORE_COMPONENT","Symbol","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":"AAAA,OAAO,MAAMA,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AACtD,OAAO,MAAMC,aAAa,GAAGD,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,MAAME,aAAa,GAAGF,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,MAAMG,SAAS,GAAGH,MAAM,CAAC,WAAW,CAAC;AAC5C,OAAO,MAAMI,iBAAiB,GAAGJ,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,MAAMK,gBAAgB,GAAGL,MAAM,CAAC,kBAAkB,CAAC;AAC1D,OAAO,MAAMM,iBAAiB,GAAGN,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,MAAMO,kBAAkB,GAAGP,MAAM,CAAC,oBAAoB,CAAC;AAC9D,OAAO,MAAMQ,cAAc,GAAGR,MAAM,CAAC,gBAAgB,CAAC","ignoreList":[]}
@@ -1,27 +1,10 @@
1
- import React, { type ForwardRefExoticComponent, type RefAttributes } from 'react';
2
- import { Component, type PropsWithRenderFnChildren } from './core-types/Component';
3
- import { CORE_COMPONENT, CREATE_COMPONENT } from './core-types/symbols';
4
- export type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> & RefAttributes<unknown>;
5
- export type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<PropsAndRef<T, Ctx, UCProps>>;
6
- type ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps] ? ComponentType<ParentProps, ChildProps, Context, UCProps> : ForwardRefComponent<T, Context, UCProps>;
7
- export type ComponentType<ComponentProps, ChildComponentProps = {}, ContextType = {}, UCProps = {}, FNType = null> = (FNType extends null ? ForwardRefComponent<ComponentProps, ContextType, UCProps> : FNType & {
8
- displayName: string;
9
- }) & {
10
- [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;
11
- } & {
12
- [CORE_COMPONENT]: boolean;
13
- [CREATE_COMPONENT]: () => ComponentType<ComponentProps, ChildComponentProps, ContextType, UCProps>;
14
- };
15
- interface ClassWithUncontrolledProps {
16
- uncontrolledProps(): unknown;
17
- }
1
+ import React from 'react';
2
+ import { type Intergalactic } from './core-types/Component';
18
3
  export declare function assignProps(p1: any, p2: any): any;
19
- declare function createComponent<ComponentProps, ChildComponentProps = {}, ContextType = {}, FNType = null>(OriginComponent: any, childComponents?: any, options?: {
4
+ declare function createComponent<T extends Intergalactic.InternalTypings.ComponentTag = 'div', ComponentProps = {}, ContextType = {}, E extends Readonly<any[]> = never[]>(OriginComponent: any, childComponents?: any, options?: {
20
5
  context?: React.Context<ContextType>;
21
- parent?: ComponentType<unknown> | ComponentType<unknown>[];
6
+ parent?: Intergalactic.Component<any, any, any, any> | Intergalactic.Component<any, any, any, any>[];
22
7
  enhancements?: [any];
23
- }): ComponentType<ComponentProps extends Component<infer Props> ? Props : ComponentProps, ChildComponentProps, ContextType, ComponentProps extends ClassWithUncontrolledProps ? ReturnType<ComponentProps['uncontrolledProps']> : {
24
- [key: string]: (arg: unknown) => void;
25
- }, FNType>;
26
- declare function createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps>;
8
+ }): Intergalactic.Component<T, ComponentProps, ContextType, E>;
9
+ declare function createBaseComponent<T extends keyof React.JSX.IntrinsicElements, P>(OriginComponent: React.ForwardRefRenderFunction<React.ElementRef<T>, P>): Intergalactic.Component<T, P, {}, never[]>;
27
10
  export { createComponent, createBaseComponent };