@semcore/core 17.0.0-prerelease.20 → 17.0.0-prerelease.20-prerelease.20

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/lib/LastInteractionType.js +36 -22
  2. package/lib/LastInteractionType.js.map +1 -1
  3. package/lib/LastInteractionType.mjs +33 -19
  4. package/lib/LastInteractionType.mjs.map +1 -1
  5. package/lib/core-types/Component.js +41 -25
  6. package/lib/core-types/Component.js.map +1 -1
  7. package/lib/core-types/Component.mjs +38 -18
  8. package/lib/core-types/Component.mjs.map +1 -1
  9. package/lib/core-types/symbols.js +9 -9
  10. package/lib/core-types/symbols.js.map +1 -1
  11. package/lib/core-types/symbols.mjs +9 -9
  12. package/lib/core-types/symbols.mjs.map +1 -1
  13. package/lib/coreFactory.js +205 -143
  14. package/lib/coreFactory.js.map +1 -1
  15. package/lib/coreFactory.mjs +164 -118
  16. package/lib/coreFactory.mjs.map +1 -1
  17. package/lib/decorators/propsObserver.js +64 -36
  18. package/lib/decorators/propsObserver.js.map +1 -1
  19. package/lib/decorators/propsObserver.mjs +61 -33
  20. package/lib/decorators/propsObserver.mjs.map +1 -1
  21. package/lib/decorators/reactive.js +17 -17
  22. package/lib/decorators/reactive.js.map +1 -1
  23. package/lib/decorators/reactive.mjs +15 -15
  24. package/lib/decorators/reactive.mjs.map +1 -1
  25. package/lib/enhancement/Children.js +59 -51
  26. package/lib/enhancement/Children.js.map +1 -1
  27. package/lib/enhancement/Children.mjs +41 -47
  28. package/lib/enhancement/Children.mjs.map +1 -1
  29. package/lib/enhancement/Root.js +37 -36
  30. package/lib/enhancement/Root.js.map +1 -1
  31. package/lib/enhancement/Root.mjs +18 -28
  32. package/lib/enhancement/Root.mjs.map +1 -1
  33. package/lib/enhancement/dataName.js +8 -7
  34. package/lib/enhancement/dataName.js.map +1 -1
  35. package/lib/enhancement/dataName.mjs +5 -5
  36. package/lib/enhancement/dataName.mjs.map +1 -1
  37. package/lib/enhancement/enhance.js +9 -6
  38. package/lib/enhancement/enhance.js.map +1 -1
  39. package/lib/enhancement/enhance.mjs +7 -5
  40. package/lib/enhancement/enhance.mjs.map +1 -1
  41. package/lib/enhancement/functionDefaultProps.js +6 -6
  42. package/lib/enhancement/functionDefaultProps.js.map +1 -1
  43. package/lib/enhancement/functionDefaultProps.mjs +4 -4
  44. package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
  45. package/lib/enhancement/i18n.js +13 -13
  46. package/lib/enhancement/i18n.js.map +1 -1
  47. package/lib/enhancement/i18n.mjs +9 -10
  48. package/lib/enhancement/i18n.mjs.map +1 -1
  49. package/lib/enhancement/inheritedName.js +8 -7
  50. package/lib/enhancement/inheritedName.js.map +1 -1
  51. package/lib/enhancement/inheritedName.mjs +5 -5
  52. package/lib/enhancement/inheritedName.mjs.map +1 -1
  53. package/lib/enhancement/staticChildren.js +56 -47
  54. package/lib/enhancement/staticChildren.js.map +1 -1
  55. package/lib/enhancement/staticChildren.mjs +48 -43
  56. package/lib/enhancement/staticChildren.mjs.map +1 -1
  57. package/lib/enhancement/style.js +27 -29
  58. package/lib/enhancement/style.js.map +1 -1
  59. package/lib/enhancement/style.mjs +20 -26
  60. package/lib/enhancement/style.mjs.map +1 -1
  61. package/lib/enhancement/uncontrolledProps.js +65 -46
  62. package/lib/enhancement/uncontrolledProps.js.map +1 -1
  63. package/lib/enhancement/uncontrolledProps.mjs +52 -43
  64. package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
  65. package/lib/esm/LastInteractionType.mjs +33 -19
  66. package/lib/esm/core-types/Component.mjs +38 -18
  67. package/lib/esm/core-types/symbols.mjs +9 -9
  68. package/lib/esm/coreFactory.mjs +164 -118
  69. package/lib/esm/enhancement/Children.mjs +41 -47
  70. package/lib/esm/enhancement/Root.mjs +18 -28
  71. package/lib/esm/enhancement/dataName.mjs +5 -5
  72. package/lib/esm/enhancement/enhance.mjs +7 -5
  73. package/lib/esm/enhancement/functionDefaultProps.mjs +4 -4
  74. package/lib/esm/enhancement/i18n.mjs +9 -10
  75. package/lib/esm/enhancement/inheritedName.mjs +5 -5
  76. package/lib/esm/enhancement/staticChildren.mjs +48 -43
  77. package/lib/esm/enhancement/style.mjs +20 -26
  78. package/lib/esm/enhancement/uncontrolledProps.mjs +52 -43
  79. package/lib/esm/register.mjs +20 -12
  80. package/lib/esm/styled/reshadow-core.mjs +111 -98
  81. package/lib/esm/styled/sstyled.mjs +41 -31
  82. package/lib/esm/utils/assignProps.mjs +36 -32
  83. package/lib/esm/utils/enhances/WithI18n.mjs +17 -15
  84. package/lib/esm/utils/enhances/i18nEnhance.mjs +61 -47
  85. package/lib/esm/utils/logger.mjs +21 -13
  86. package/lib/esm/utils/pick.mjs +4 -4
  87. package/lib/esm/utils/ref.mjs +43 -27
  88. package/lib/esm/utils/use/useEnhancedEffect.mjs +1 -1
  89. package/lib/index.js +17 -17
  90. package/lib/register.js +24 -17
  91. package/lib/register.js.map +1 -1
  92. package/lib/register.mjs +20 -12
  93. package/lib/register.mjs.map +1 -1
  94. package/lib/styled/index.js +4 -4
  95. package/lib/styled/reshadow-core.js +104 -102
  96. package/lib/styled/reshadow-core.js.map +1 -1
  97. package/lib/styled/reshadow-core.mjs +111 -98
  98. package/lib/styled/reshadow-core.mjs.map +1 -1
  99. package/lib/styled/sstyled.js +53 -31
  100. package/lib/styled/sstyled.js.map +1 -1
  101. package/lib/styled/sstyled.mjs +41 -31
  102. package/lib/styled/sstyled.mjs.map +1 -1
  103. package/lib/theme/processor.js +222 -150
  104. package/lib/theme/processor.js.map +1 -1
  105. package/lib/theme/processor.mjs +221 -148
  106. package/lib/theme/processor.mjs.map +1 -1
  107. package/lib/theme/themes/dark.js +2 -2
  108. package/lib/theme/themes/dark.js.map +1 -1
  109. package/lib/theme/themes/default.js +2 -2
  110. package/lib/theme/themes/default.js.map +1 -1
  111. package/lib/theme/themes/highlights-dark.js +2 -2
  112. package/lib/theme/themes/highlights-dark.js.map +1 -1
  113. package/lib/theme/themes/highlights-light.js +2 -2
  114. package/lib/theme/themes/highlights-light.js.map +1 -1
  115. package/lib/theme/themes/light.js +2 -2
  116. package/lib/theme/themes/light.js.map +1 -1
  117. package/lib/theme/utils.js +215 -140
  118. package/lib/theme/utils.js.map +1 -1
  119. package/lib/theme/utils.mjs +214 -135
  120. package/lib/theme/utils.mjs.map +1 -1
  121. package/lib/utils/CSSinJS.js +10 -8
  122. package/lib/utils/CSSinJS.js.map +1 -1
  123. package/lib/utils/CSSinJS.mjs +7 -6
  124. package/lib/utils/CSSinJS.mjs.map +1 -1
  125. package/lib/utils/ThemeProvider.js +51 -44
  126. package/lib/utils/ThemeProvider.js.map +1 -1
  127. package/lib/utils/ThemeProvider.mjs +47 -36
  128. package/lib/utils/ThemeProvider.mjs.map +1 -1
  129. package/lib/utils/addonText.js +7 -4
  130. package/lib/utils/addonText.js.map +1 -1
  131. package/lib/utils/addonText.mjs +5 -2
  132. package/lib/utils/addonText.mjs.map +1 -1
  133. package/lib/utils/addonTextChildren.js +21 -15
  134. package/lib/utils/addonTextChildren.js.map +1 -1
  135. package/lib/utils/addonTextChildren.mjs +13 -7
  136. package/lib/utils/addonTextChildren.mjs.map +1 -1
  137. package/lib/utils/ariaProps.js +5 -7
  138. package/lib/utils/ariaProps.js.map +1 -1
  139. package/lib/utils/ariaProps.mjs +5 -7
  140. package/lib/utils/ariaProps.mjs.map +1 -1
  141. package/lib/utils/assignProps.js +37 -33
  142. package/lib/utils/assignProps.js.map +1 -1
  143. package/lib/utils/assignProps.mjs +36 -32
  144. package/lib/utils/assignProps.mjs.map +1 -1
  145. package/lib/utils/canUseDOM.js +1 -1
  146. package/lib/utils/capitalizeFirstLetter.js +1 -1
  147. package/lib/utils/color.js +95 -72
  148. package/lib/utils/color.js.map +1 -1
  149. package/lib/utils/color.mjs +94 -71
  150. package/lib/utils/color.mjs.map +1 -1
  151. package/lib/utils/compose.js +12 -3
  152. package/lib/utils/compose.js.map +1 -1
  153. package/lib/utils/compose.mjs +11 -2
  154. package/lib/utils/compose.mjs.map +1 -1
  155. package/lib/utils/createUUID.js +5 -5
  156. package/lib/utils/createUUID.js.map +1 -1
  157. package/lib/utils/createUUID.mjs +4 -4
  158. package/lib/utils/createUUID.mjs.map +1 -1
  159. package/lib/utils/cssToIntDefault.js +4 -3
  160. package/lib/utils/cssToIntDefault.js.map +1 -1
  161. package/lib/utils/cssToIntDefault.mjs +3 -2
  162. package/lib/utils/cssToIntDefault.mjs.map +1 -1
  163. package/lib/utils/enhances/WithCSS.js +8 -10
  164. package/lib/utils/enhances/WithCSS.js.map +1 -1
  165. package/lib/utils/enhances/WithCSS.mjs +6 -7
  166. package/lib/utils/enhances/WithCSS.mjs.map +1 -1
  167. package/lib/utils/enhances/WithI18n.js +19 -19
  168. package/lib/utils/enhances/WithI18n.js.map +1 -1
  169. package/lib/utils/enhances/WithI18n.mjs +17 -15
  170. package/lib/utils/enhances/WithI18n.mjs.map +1 -1
  171. package/lib/utils/enhances/a11yEnhance.js +39 -34
  172. package/lib/utils/enhances/a11yEnhance.js.map +1 -1
  173. package/lib/utils/enhances/a11yEnhance.mjs +36 -32
  174. package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
  175. package/lib/utils/enhances/animatedSizeEnhance.js +63 -55
  176. package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -1
  177. package/lib/utils/enhances/animatedSizeEnhance.mjs +58 -50
  178. package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
  179. package/lib/utils/enhances/contextEnhance.js +11 -12
  180. package/lib/utils/enhances/contextEnhance.js.map +1 -1
  181. package/lib/utils/enhances/contextEnhance.mjs +8 -9
  182. package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
  183. package/lib/utils/enhances/i18nEnhance.js +67 -51
  184. package/lib/utils/enhances/i18nEnhance.js.map +1 -1
  185. package/lib/utils/enhances/i18nEnhance.mjs +61 -47
  186. package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
  187. package/lib/utils/enhances/resolveColorEnhance.js +10 -12
  188. package/lib/utils/enhances/resolveColorEnhance.js.map +1 -1
  189. package/lib/utils/enhances/resolveColorEnhance.mjs +6 -8
  190. package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
  191. package/lib/utils/eventEmitter.js +57 -30
  192. package/lib/utils/eventEmitter.js.map +1 -1
  193. package/lib/utils/eventEmitter.mjs +55 -26
  194. package/lib/utils/eventEmitter.mjs.map +1 -1
  195. package/lib/utils/findComponent.js +42 -35
  196. package/lib/utils/findComponent.js.map +1 -1
  197. package/lib/utils/findComponent.mjs +33 -26
  198. package/lib/utils/findComponent.mjs.map +1 -1
  199. package/lib/utils/fire.js +13 -7
  200. package/lib/utils/fire.js.map +1 -1
  201. package/lib/utils/fire.mjs +11 -5
  202. package/lib/utils/fire.mjs.map +1 -1
  203. package/lib/utils/focus-lock/focusBorders.js +32 -28
  204. package/lib/utils/focus-lock/focusBorders.js.map +1 -1
  205. package/lib/utils/focus-lock/focusBorders.mjs +32 -26
  206. package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
  207. package/lib/utils/focus-lock/getFocusableIn.js +6 -4
  208. package/lib/utils/focus-lock/getFocusableIn.js.map +1 -1
  209. package/lib/utils/focus-lock/getFocusableIn.mjs +6 -3
  210. package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
  211. package/lib/utils/focus-lock/isFocusInside.js +6 -5
  212. package/lib/utils/focus-lock/isFocusInside.js.map +1 -1
  213. package/lib/utils/focus-lock/isFocusInside.mjs +6 -4
  214. package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
  215. package/lib/utils/focus-lock/isFocusable.js +12 -9
  216. package/lib/utils/focus-lock/isFocusable.js.map +1 -1
  217. package/lib/utils/focus-lock/isFocusable.mjs +11 -8
  218. package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
  219. package/lib/utils/focus-lock/setFocus.js +27 -21
  220. package/lib/utils/focus-lock/setFocus.js.map +1 -1
  221. package/lib/utils/focus-lock/setFocus.mjs +25 -19
  222. package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
  223. package/lib/utils/getAccessibleName.js +22 -10
  224. package/lib/utils/getAccessibleName.js.map +1 -1
  225. package/lib/utils/getAccessibleName.mjs +21 -10
  226. package/lib/utils/getAccessibleName.mjs.map +1 -1
  227. package/lib/utils/getDisplayName.js +1 -1
  228. package/lib/utils/getEventTarget.js +32 -13
  229. package/lib/utils/getEventTarget.js.map +1 -1
  230. package/lib/utils/getEventTarget.mjs +31 -12
  231. package/lib/utils/getEventTarget.mjs.map +1 -1
  232. package/lib/utils/getOriginChildren.js +4 -4
  233. package/lib/utils/getOriginChildren.js.map +1 -1
  234. package/lib/utils/getRandomInt.js +1 -1
  235. package/lib/utils/getValue.js +6 -4
  236. package/lib/utils/getValue.js.map +1 -1
  237. package/lib/utils/getValue.mjs +5 -3
  238. package/lib/utils/getValue.mjs.map +1 -1
  239. package/lib/utils/hasLabels.js +27 -16
  240. package/lib/utils/hasLabels.js.map +1 -1
  241. package/lib/utils/hasLabels.mjs +24 -14
  242. package/lib/utils/hasLabels.mjs.map +1 -1
  243. package/lib/utils/hasParent.js +2 -3
  244. package/lib/utils/hasParent.js.map +1 -1
  245. package/lib/utils/hasParent.mjs +3 -2
  246. package/lib/utils/hasParent.mjs.map +1 -1
  247. package/lib/utils/ifChildren.js +4 -6
  248. package/lib/utils/ifChildren.js.map +1 -1
  249. package/lib/utils/ifChildren.mjs +2 -4
  250. package/lib/utils/ifChildren.mjs.map +1 -1
  251. package/lib/utils/injectStyle.js +13 -11
  252. package/lib/utils/injectStyle.js.map +1 -1
  253. package/lib/utils/injectStyle.mjs +10 -9
  254. package/lib/utils/injectStyle.mjs.map +1 -1
  255. package/lib/utils/inputProps.js +5 -5
  256. package/lib/utils/inputProps.js.map +1 -1
  257. package/lib/utils/inputProps.mjs +4 -4
  258. package/lib/utils/inputProps.mjs.map +1 -1
  259. package/lib/utils/isInteractiveElement.js +9 -7
  260. package/lib/utils/isInteractiveElement.js.map +1 -1
  261. package/lib/utils/isInteractiveElement.mjs +9 -7
  262. package/lib/utils/isInteractiveElement.mjs.map +1 -1
  263. package/lib/utils/isNode.js +5 -4
  264. package/lib/utils/isNode.js.map +1 -1
  265. package/lib/utils/isNode.mjs +2 -1
  266. package/lib/utils/isNode.mjs.map +1 -1
  267. package/lib/utils/isPromise.js +1 -1
  268. package/lib/utils/isRetina.js +2 -7
  269. package/lib/utils/isRetina.js.map +1 -1
  270. package/lib/utils/isRetina.mjs +1 -6
  271. package/lib/utils/isRetina.mjs.map +1 -1
  272. package/lib/utils/logger.js +25 -18
  273. package/lib/utils/logger.js.map +1 -1
  274. package/lib/utils/logger.mjs +21 -13
  275. package/lib/utils/logger.mjs.map +1 -1
  276. package/lib/utils/numericChecker.js +18 -11
  277. package/lib/utils/numericChecker.js.map +1 -1
  278. package/lib/utils/numericChecker.mjs +17 -10
  279. package/lib/utils/numericChecker.mjs.map +1 -1
  280. package/lib/utils/ownerDocument.js +2 -2
  281. package/lib/utils/ownerDocument.js.map +1 -1
  282. package/lib/utils/ownerDocument.mjs +1 -1
  283. package/lib/utils/ownerDocument.mjs.map +1 -1
  284. package/lib/utils/pick.js +5 -5
  285. package/lib/utils/pick.js.map +1 -1
  286. package/lib/utils/pick.mjs +4 -4
  287. package/lib/utils/pick.mjs.map +1 -1
  288. package/lib/utils/propsForElement.js +12 -10
  289. package/lib/utils/propsForElement.js.map +1 -1
  290. package/lib/utils/propsForElement.mjs +10 -8
  291. package/lib/utils/propsForElement.mjs.map +1 -1
  292. package/lib/utils/rafTrottle.js +14 -9
  293. package/lib/utils/rafTrottle.js.map +1 -1
  294. package/lib/utils/rafTrottle.mjs +12 -7
  295. package/lib/utils/rafTrottle.mjs.map +1 -1
  296. package/lib/utils/reactToText.js +8 -5
  297. package/lib/utils/reactToText.js.map +1 -1
  298. package/lib/utils/reactToText.mjs +6 -3
  299. package/lib/utils/reactToText.mjs.map +1 -1
  300. package/lib/utils/ref.js +47 -29
  301. package/lib/utils/ref.js.map +1 -1
  302. package/lib/utils/ref.mjs +43 -27
  303. package/lib/utils/ref.mjs.map +1 -1
  304. package/lib/utils/setRef.js +2 -2
  305. package/lib/utils/setRef.js.map +1 -1
  306. package/lib/utils/syncScroll.js +24 -24
  307. package/lib/utils/syncScroll.js.map +1 -1
  308. package/lib/utils/syncScroll.mjs +21 -21
  309. package/lib/utils/syncScroll.mjs.map +1 -1
  310. package/lib/utils/uncontroll.js +18 -8
  311. package/lib/utils/uncontroll.js.map +1 -1
  312. package/lib/utils/uncontroll.mjs +17 -8
  313. package/lib/utils/uncontroll.mjs.map +1 -1
  314. package/lib/utils/uniqueID.js +27 -22
  315. package/lib/utils/uniqueID.js.map +1 -1
  316. package/lib/utils/uniqueID.mjs +25 -18
  317. package/lib/utils/uniqueID.mjs.map +1 -1
  318. package/lib/utils/use/useColorResolver.js +21 -20
  319. package/lib/utils/use/useColorResolver.js.map +1 -1
  320. package/lib/utils/use/useColorResolver.mjs +18 -16
  321. package/lib/utils/use/useColorResolver.mjs.map +1 -1
  322. package/lib/utils/use/useEnhancedEffect.js +4 -4
  323. package/lib/utils/use/useEnhancedEffect.js.map +1 -1
  324. package/lib/utils/use/useEnhancedEffect.mjs +1 -1
  325. package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
  326. package/lib/utils/use/useEventCallback.js +10 -5
  327. package/lib/utils/use/useEventCallback.js.map +1 -1
  328. package/lib/utils/use/useEventCallback.mjs +8 -3
  329. package/lib/utils/use/useEventCallback.mjs.map +1 -1
  330. package/lib/utils/use/useEventListener.js +15 -11
  331. package/lib/utils/use/useEventListener.js.map +1 -1
  332. package/lib/utils/use/useEventListener.mjs +11 -7
  333. package/lib/utils/use/useEventListener.mjs.map +1 -1
  334. package/lib/utils/use/useFocusLock.js +94 -80
  335. package/lib/utils/use/useFocusLock.js.map +1 -1
  336. package/lib/utils/use/useFocusLock.mjs +88 -71
  337. package/lib/utils/use/useFocusLock.mjs.map +1 -1
  338. package/lib/utils/use/usePreventScroll.js +28 -26
  339. package/lib/utils/use/usePreventScroll.js.map +1 -1
  340. package/lib/utils/use/usePreventScroll.mjs +23 -21
  341. package/lib/utils/use/usePreventScroll.mjs.map +1 -1
  342. package/lib/utils/use/useScrollBarWidth.js +14 -8
  343. package/lib/utils/use/useScrollBarWidth.js.map +1 -1
  344. package/lib/utils/use/useScrollBarWidth.mjs +13 -8
  345. package/lib/utils/use/useScrollBarWidth.mjs.map +1 -1
  346. package/lib/utils/useCssVariable.js +37 -32
  347. package/lib/utils/useCssVariable.js.map +1 -1
  348. package/lib/utils/useCssVariable.mjs +34 -27
  349. package/lib/utils/useCssVariable.mjs.map +1 -1
  350. package/lib/utils/zIndexStacking.js +24 -28
  351. package/lib/utils/zIndexStacking.js.map +1 -1
  352. package/lib/utils/zIndexStacking.mjs +22 -23
  353. package/lib/utils/zIndexStacking.mjs.map +1 -1
  354. package/package.json +1 -1
@@ -1,18 +1,21 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.lastInteraction = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
8
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
11
  var _canUseDOM = _interopRequireDefault(require("./utils/canUseDOM"));
10
- class LastInteractionType {
11
- constructor() {
12
- (0, _defineProperty2.default)(this, "lastFocusSource", 'none');
12
+ var LastInteractionType = /*#__PURE__*/function () {
13
+ function LastInteractionType() {
14
+ (0, _classCallCheck2["default"])(this, LastInteractionType);
15
+ (0, _defineProperty2["default"])(this, "lastFocusSource", 'none');
13
16
  this.handleKeyDown = this.handleKeyDown.bind(this);
14
17
  this.handleMouseDown = this.handleMouseDown.bind(this);
15
- if ((0, _canUseDOM.default)()) {
18
+ if ((0, _canUseDOM["default"])()) {
16
19
  document.addEventListener('mousedown', this.handleMouseDown, {
17
20
  capture: true
18
21
  });
@@ -21,21 +24,32 @@ class LastInteractionType {
21
24
  });
22
25
  }
23
26
  }
24
- get type() {
25
- return this.lastFocusSource;
26
- }
27
- isKeyboard() {
28
- return this.lastFocusSource === 'keyboard';
29
- }
30
- isMouse() {
31
- return this.lastFocusSource === 'mouse';
32
- }
33
- handleMouseDown() {
34
- this.lastFocusSource = 'mouse';
35
- }
36
- handleKeyDown() {
37
- this.lastFocusSource = 'keyboard';
38
- }
39
- }
40
- const lastInteraction = exports.lastInteraction = new LastInteractionType();
27
+ return (0, _createClass2["default"])(LastInteractionType, [{
28
+ key: "type",
29
+ get: function get() {
30
+ return this.lastFocusSource;
31
+ }
32
+ }, {
33
+ key: "isKeyboard",
34
+ value: function isKeyboard() {
35
+ return this.lastFocusSource === 'keyboard';
36
+ }
37
+ }, {
38
+ key: "isMouse",
39
+ value: function isMouse() {
40
+ return this.lastFocusSource === 'mouse';
41
+ }
42
+ }, {
43
+ key: "handleMouseDown",
44
+ value: function handleMouseDown() {
45
+ this.lastFocusSource = 'mouse';
46
+ }
47
+ }, {
48
+ key: "handleKeyDown",
49
+ value: function handleKeyDown() {
50
+ this.lastFocusSource = 'keyboard';
51
+ }
52
+ }]);
53
+ }();
54
+ var lastInteraction = exports.lastInteraction = new LastInteractionType();
41
55
  //# sourceMappingURL=LastInteractionType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LastInteractionType.js","names":["_canUseDOM","_interopRequireDefault","require","LastInteractionType","constructor","_defineProperty2","default","handleKeyDown","bind","handleMouseDown","canUseDOM","document","addEventListener","capture","type","lastFocusSource","isKeyboard","isMouse","lastInteraction","exports"],"sources":["../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,MAAMC,mBAAmB,CAAC;EAGxBC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA,2BAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAI,IAAAE,kBAAS,EAAC,CAAC,EAAE;MACfC,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACH,eAAe,EAAE;QAAEI,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACL,aAAa,EAAE;QAAEM,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAEA,IAAWC,IAAIA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACC,eAAe;EAC7B;EAEOC,UAAUA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACD,eAAe,KAAK,UAAU;EAC5C;EAEOE,OAAOA,CAAA,EAAG;IACf,OAAO,IAAI,CAACF,eAAe,KAAK,OAAO;EACzC;EAEQN,eAAeA,CAAA,EAAG;IACxB,IAAI,CAACM,eAAe,GAAG,OAAO;EAChC;EAEQR,aAAaA,CAAA,EAAG;IACtB,IAAI,CAACQ,eAAe,GAAG,UAAU;EACnC;AACF;AAEO,MAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAIf,mBAAmB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"LastInteractionType.js","names":["_canUseDOM","_interopRequireDefault","require","LastInteractionType","_classCallCheck2","_defineProperty2","handleKeyDown","bind","handleMouseDown","canUseDOM","document","addEventListener","capture","_createClass2","key","get","lastFocusSource","value","isKeyboard","isMouse","lastInteraction","exports"],"sources":["../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAEpCC,mBAAmB;EAGvB,SAAAA,oBAAA,EAAc;IAAA,IAAAC,gBAAA,mBAAAD,mBAAA;IAAA,IAAAE,gBAAA,sCAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAI,IAAAE,qBAAS,EAAC,CAAC,EAAE;MACfC,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACH,eAAe,EAAE;QAAEI,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACL,aAAa,EAAE;QAAEM,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAAC,WAAAC,aAAA,aAAAV,mBAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAkB;MAChB,OAAO,IAAI,CAACC,eAAe;IAC7B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,UAAUA,CAAA,EAAG;MAClB,OAAO,IAAI,CAACF,eAAe,KAAK,UAAU;IAC5C;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOE,OAAOA,CAAA,EAAG;MACf,OAAO,IAAI,CAACH,eAAe,KAAK,OAAO;IACzC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQT,eAAeA,CAAA,EAAG;MACxB,IAAI,CAACQ,eAAe,GAAG,OAAO;IAChC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQX,aAAaA,CAAA,EAAG;MACtB,IAAI,CAACU,eAAe,GAAG,UAAU;IACnC;EAAC;AAAA;AAGI,IAAMI,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAIjB,mBAAmB,CAAC,CAAC","ignoreList":[]}
@@ -1,7 +1,10 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
1
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
4
  import canUseDOM from "./utils/canUseDOM.mjs";
3
- class LastInteractionType {
4
- constructor() {
5
+ var LastInteractionType = /* @__PURE__ */ (function() {
6
+ function LastInteractionType2() {
7
+ _classCallCheck(this, LastInteractionType2);
5
8
  _defineProperty(this, "lastFocusSource", "none");
6
9
  this.handleKeyDown = this.handleKeyDown.bind(this);
7
10
  this.handleMouseDown = this.handleMouseDown.bind(this);
@@ -14,23 +17,34 @@ class LastInteractionType {
14
17
  });
15
18
  }
16
19
  }
17
- get type() {
18
- return this.lastFocusSource;
19
- }
20
- isKeyboard() {
21
- return this.lastFocusSource === "keyboard";
22
- }
23
- isMouse() {
24
- return this.lastFocusSource === "mouse";
25
- }
26
- handleMouseDown() {
27
- this.lastFocusSource = "mouse";
28
- }
29
- handleKeyDown() {
30
- this.lastFocusSource = "keyboard";
31
- }
32
- }
33
- const lastInteraction = new LastInteractionType();
20
+ return _createClass(LastInteractionType2, [{
21
+ key: "type",
22
+ get: function get() {
23
+ return this.lastFocusSource;
24
+ }
25
+ }, {
26
+ key: "isKeyboard",
27
+ value: function isKeyboard() {
28
+ return this.lastFocusSource === "keyboard";
29
+ }
30
+ }, {
31
+ key: "isMouse",
32
+ value: function isMouse() {
33
+ return this.lastFocusSource === "mouse";
34
+ }
35
+ }, {
36
+ key: "handleMouseDown",
37
+ value: function handleMouseDown() {
38
+ this.lastFocusSource = "mouse";
39
+ }
40
+ }, {
41
+ key: "handleKeyDown",
42
+ value: function handleKeyDown() {
43
+ this.lastFocusSource = "keyboard";
44
+ }
45
+ }]);
46
+ })();
47
+ var lastInteraction = new LastInteractionType();
34
48
  export {
35
49
  lastInteraction
36
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LastInteractionType.mjs","names":["canUseDOM","LastInteractionType","constructor","_defineProperty","handleKeyDown","bind","handleMouseDown","document","addEventListener","capture","type","lastFocusSource","isKeyboard","isMouse","lastInteraction"],"sources":["../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,uBAAmB;AAEzC,MAAMC,mBAAmB,CAAC;EAGxBC,WAAWA,CAAA,EAAG;IAAAC,eAAA,0BAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAIL,SAAS,CAAC,CAAC,EAAE;MACfO,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACF,eAAe,EAAE;QAAEG,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACJ,aAAa,EAAE;QAAEK,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAEA,IAAWC,IAAIA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACC,eAAe;EAC7B;EAEOC,UAAUA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACD,eAAe,KAAK,UAAU;EAC5C;EAEOE,OAAOA,CAAA,EAAG;IACf,OAAO,IAAI,CAACF,eAAe,KAAK,OAAO;EACzC;EAEQL,eAAeA,CAAA,EAAG;IACxB,IAAI,CAACK,eAAe,GAAG,OAAO;EAChC;EAEQP,aAAaA,CAAA,EAAG;IACtB,IAAI,CAACO,eAAe,GAAG,UAAU;EACnC;AACF;AAEA,OAAO,MAAMG,eAAe,GAAG,IAAIb,mBAAmB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"LastInteractionType.mjs","names":["canUseDOM","LastInteractionType","_classCallCheck","_defineProperty","handleKeyDown","bind","handleMouseDown","document","addEventListener","capture","_createClass","key","get","lastFocusSource","value","isKeyboard","isMouse","lastInteraction"],"sources":["../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";;;AAAA,OAAOA,SAAS,MAAM,uBAAmB;AAAC,IAEpCC,mBAAmB;EAGvB,SAAAA,oBAAA,EAAc;IAAAC,eAAA,OAAAD,mBAAA;IAAAE,eAAA,0BAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAIL,SAAS,CAAC,CAAC,EAAE;MACfO,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACF,eAAe,EAAE;QAAEG,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACJ,aAAa,EAAE;QAAEK,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAAC,OAAAC,YAAA,CAAAT,mBAAA;IAAAU,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAkB;MAChB,OAAO,IAAI,CAACC,eAAe;IAC7B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,UAAUA,CAAA,EAAG;MAClB,OAAO,IAAI,CAACF,eAAe,KAAK,UAAU;IAC5C;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOE,OAAOA,CAAA,EAAG;MACf,OAAO,IAAI,CAACH,eAAe,KAAK,OAAO;IACzC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQR,eAAeA,CAAA,EAAG;MACxB,IAAI,CAACO,eAAe,GAAG,OAAO;IAChC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQV,aAAaA,CAAA,EAAG;MACtB,IAAI,CAACS,eAAe,GAAG,UAAU;IACnC;EAAC;AAAA;AAGH,OAAO,IAAMI,eAAe,GAAG,IAAIhB,mBAAmB,CAAC,CAAC","ignoreList":[]}
@@ -1,37 +1,53 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.wrapIntergalacticComponent = exports.Root = exports.Intergalactic = exports.Component = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
11
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
8
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
13
  var _react = require("react");
10
14
  /** @deprecated */
11
15
 
12
- const Root = exports.Root = undefined;
13
- class Component extends _react.PureComponent {
14
- constructor(...args) {
15
- super(...args);
16
- (0, _defineProperty2.default)(this, "Root", undefined);
17
- (0, _defineProperty2.default)(this, "isControlled", false);
16
+ var Root = exports.Root = undefined;
17
+ var Component = exports.Component = /*#__PURE__*/function (_PureComponent) {
18
+ function Component() {
19
+ var _this;
20
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21
+ args[_key] = arguments[_key];
22
+ }
23
+ (0, _classCallCheck2["default"])(this, Component);
24
+ _this = (0, _callSuper2["default"])(this, Component, [].concat(args));
25
+ (0, _defineProperty2["default"])(_this, "Root", undefined);
26
+ (0, _defineProperty2["default"])(_this, "isControlled", false);
27
+ return _this;
18
28
  }
19
- uncontrolledProps() {
20
- // @ts-ignore. This is a default value. Should be defined in related classes.
21
- return {};
22
- }
23
- get handlers() {
24
- // @ts-ignore. The body will be generated in factory
25
- return {};
26
- }
27
- get asProps() {
28
- return {};
29
- }
30
- }
31
-
32
- // eslint-disable-next-line @typescript-eslint/no-namespace
33
- exports.Component = Component;
34
- let Intergalactic = exports.Intergalactic = void 0;
35
- const wrapIntergalacticComponent = wrapper => wrapper;
36
- exports.wrapIntergalacticComponent = wrapIntergalacticComponent;
29
+ (0, _inherits2["default"])(Component, _PureComponent);
30
+ return (0, _createClass2["default"])(Component, [{
31
+ key: "uncontrolledProps",
32
+ value: function uncontrolledProps() {
33
+ // @ts-ignore. This is a default value. Should be defined in related classes.
34
+ return {};
35
+ }
36
+ }, {
37
+ key: "handlers",
38
+ get: function get() {
39
+ // @ts-ignore. The body will be generated in factory
40
+ return {};
41
+ }
42
+ }, {
43
+ key: "asProps",
44
+ get: function get() {
45
+ return {};
46
+ }
47
+ }]);
48
+ }(_react.PureComponent); // eslint-disable-next-line @typescript-eslint/no-namespace
49
+ var Intergalactic;
50
+ var wrapIntergalacticComponent = exports.wrapIntergalacticComponent = function wrapIntergalacticComponent(wrapper) {
51
+ return wrapper;
52
+ };
37
53
  //# sourceMappingURL=Component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","names":["_react","require","Root","exports","undefined","Component","PureComponent","constructor","args","_defineProperty2","default","uncontrolledProps","handlers","asProps","Intergalactic","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import type React from 'react';\nimport { type\nAllHTMLAttributes, type\nForwardRefExoticComponent,\nPureComponent, type\nReactNode, type\nRefObject,\n} from 'react';\n\nimport type { CORE_COMPONENT } from './symbols';\nimport type { IStyledProps } from '../styled/index';\n\ntype HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n\nexport interface IRootComponentProps<Props = {}, Ctx = {}, H = {}> {\n 'forwardRef'?: RefObject<any>;\n 'Children'?: any;\n 'children'?: ReactNode | ((props: Props & Ctx, handlers: HandlersType<H>) => ReactNode);\n 'styles'?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\ntype RootResult<T extends Intergalactic.Tag | never> = ForwardRefExoticComponent<IRootNodeProps & Intergalactic.InternalTypings.ComponentPropsNesting<T>>;\n\ntype BaseAsProps<Props = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> = Readonly<\n Props &\n IRootComponentProps &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps\n>;\n\nexport abstract class Component<\n Props = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n Uncontrolled extends Readonly<{ [key in keyof Props]?: Props[key] | null | ((value: Props[key], e?: any) => void | boolean | Props[key]) | ((value: Props[key], e?: any) => void | boolean | Props[key])[] }> = never,\n InnerProps = {},\n State = {},\n> extends PureComponent<Props, State> {\n protected uncontrolledProps(): [Uncontrolled] extends [never] ? never : Uncontrolled {\n // @ts-ignore. This is a default value. Should be defined in related classes.\n return {};\n };\n\n protected get handlers(): Readonly<{\n [key in keyof Uncontrolled]: key extends keyof Props\n ? Uncontrolled[key] extends (null | Props[key])\n ? (value: Props[key], e?: any) => void\n : Uncontrolled[key] extends Array<any> ? Uncontrolled[key][0] : Uncontrolled[key]\n : never\n }> {\n // @ts-ignore. The body will be generated in factory\n return {};\n }\n\n protected get asProps() {\n return {} as Readonly<\n { Root: RootResult<any> } &\n BaseAsProps<Props, Enhance, InnerProps> &\n Intergalactic.InternalTypings.EfficientOmit<AllHTMLAttributes<any>, keyof BaseAsProps<Props, Enhance, InnerProps>>\n >;\n }\n\n protected Root: RootResult<any> = undefined as any;\n\n protected isControlled = false;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends Readonly<any[]> = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace InternalTypings {\n export type PartialRequired<T, K extends keyof T> = Omit<T, K> & {\n [key in K]-?: T[key];\n };\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag | [ComponentTag, keyof JSX.IntrinsicElements],\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends Readonly<any[]> = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n newInstance: () => Component<BaseTag, Props, Context>;\n [CORE_COMPONENT]: boolean;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends Readonly<any[]> = never[],\n > = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AA8BA;;AAGA,MAAMC,IAAU,GAAAC,OAAA,CAAAD,IAAA,GAAGE,SAAgB;AAa5B,MAAeC,SAAS,SAMrBC,oBAAa,CAAe;EAAAC,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,gBAyBFN,SAAS;IAAA,IAAAK,gBAAA,CAAAC,OAAA,wBAElB,KAAK;EAAA;EA1BpBC,iBAAiBA,CAAA,EAA0D;IACnF;IACA,OAAO,CAAC,CAAC;EACX;EAEA,IAAcC,QAAQA,CAAA,EAMnB;IACD;IACA,OAAO,CAAC,CAAC;EACX;EAEA,IAAcC,OAAOA,CAAA,EAAG;IACtB,OAAO,CAAC,CAAC;EAKX;AAKF;;AAEA;AAAAV,OAAA,CAAAE,SAAA,GAAAA,SAAA;AAAA,IACiBS,aAAa,GAAAX,OAAA,CAAAW,aAAA;AAoMvB,MAAMC,0BAA0B,GAIrCC,OAKoB,IAMjBA,OAAc;AAACb,OAAA,CAAAY,0BAAA,GAAAA,0BAAA","ignoreList":[]}
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\nexport abstract class Component<\n Props = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n Uncontrolled extends Readonly<{ [key in keyof Props]?: Props[key] | null | ((value: Props[key], e?: any) => void | boolean | Props[key]) | ((value: Props[key], e?: any) => void | boolean | Props[key])[] }> = never,\n InnerProps = {},\n State = {},\n> extends PureComponent<Props, State> {\n protected uncontrolledProps(): [Uncontrolled] extends [never] ? never : Uncontrolled {\n // @ts-ignore. This is a default value. Should be defined in related classes.\n return {};\n };\n\n protected get handlers(): Readonly<{\n [key in keyof Uncontrolled]: key extends keyof Props\n ? Uncontrolled[key] extends (null | Props[key])\n ? (value: Props[key], e?: any) => void\n : Uncontrolled[key] extends Array<any> ? Uncontrolled[key][0] : Uncontrolled[key]\n : never\n }> {\n // @ts-ignore. The body will be generated in factory\n return {};\n }\n\n protected get asProps() {\n return {} as Readonly<\n { Root: RootResult<any> } &\n BaseAsProps<Props, Enhance, InnerProps> &\n Intergalactic.InternalTypings.EfficientOmit<AllHTMLAttributes<any>, keyof BaseAsProps<Props, Enhance, InnerProps>>\n >;\n }\n\n protected Root: RootResult<any> = undefined as any;\n\n protected isControlled = false;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends Readonly<any[]> = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace InternalTypings {\n export type PartialRequired<T, K extends keyof T> = Omit<T, K> & {\n [key in K]-?: T[key];\n };\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag | [ComponentTag, keyof JSX.IntrinsicElements],\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends Readonly<any[]> = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag extends [ComponentTag, keyof JSX.IntrinsicElements] ? Tag[0] : Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n newInstance: () => Component<BaseTag, Props, Context>;\n [CORE_COMPONENT]: boolean;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends Readonly<any[]> = never[],\n > = (<Tag extends InternalTypings.ComponentTag | [InternalTypings.ComponentTag, keyof JSX.IntrinsicElements] = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AA8BA;;AAGA,IAAMC,IAAU,GAAAC,OAAA,CAAAD,IAAA,GAAGE,SAAgB;AAAC,IAadC,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;AAoMvB,IAAMC,0BAA0B,GAAAvB,OAAA,CAAAuB,0BAAA,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","ignoreList":[]}
@@ -1,24 +1,44 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
4
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
1
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
6
  import { PureComponent } from "react";
3
- const Root = void 0;
4
- class Component extends PureComponent {
5
- constructor(...args) {
6
- super(...args);
7
- _defineProperty(this, "Root", void 0);
8
- _defineProperty(this, "isControlled", false);
7
+ var Root = void 0;
8
+ var Component = /* @__PURE__ */ (function(_PureComponent) {
9
+ function Component2() {
10
+ var _this;
11
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12
+ args[_key] = arguments[_key];
13
+ }
14
+ _classCallCheck(this, Component2);
15
+ _this = _callSuper(this, Component2, [].concat(args));
16
+ _defineProperty(_this, "Root", void 0);
17
+ _defineProperty(_this, "isControlled", false);
18
+ return _this;
9
19
  }
10
- uncontrolledProps() {
11
- return {};
12
- }
13
- get handlers() {
14
- return {};
15
- }
16
- get asProps() {
17
- return {};
18
- }
19
- }
20
- let Intergalactic;
21
- const wrapIntergalacticComponent = (wrapper) => wrapper;
20
+ _inherits(Component2, _PureComponent);
21
+ return _createClass(Component2, [{
22
+ key: "uncontrolledProps",
23
+ value: function uncontrolledProps() {
24
+ return {};
25
+ }
26
+ }, {
27
+ key: "handlers",
28
+ get: function get() {
29
+ return {};
30
+ }
31
+ }, {
32
+ key: "asProps",
33
+ get: function get() {
34
+ return {};
35
+ }
36
+ }]);
37
+ })(PureComponent);
38
+ var Intergalactic;
39
+ var wrapIntergalacticComponent = function wrapIntergalacticComponent2(wrapper) {
40
+ return wrapper;
41
+ };
22
42
  export {
23
43
  Component,
24
44
  Intergalactic,
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"file":"Component.mjs","names":["PureComponent","Root","undefined","Component","_PureComponent","_this","_len","arguments","length","args","Array","_key","_classCallCheck","_callSuper","concat","_defineProperty","_inherits","_createClass","key","value","uncontrolledProps","get","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,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;AAWb,WAAsBE,SAAS,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;IAAAC,eAAA,OAAAT,SAAA;IAAAE,KAAA,GAAAQ,UAAA,OAAAV,SAAA,KAAAW,MAAA,CAAAL,IAAA;IAAAM,eAAA,CAAAV,KAAA,UA+BKH,SAAS;IAAAa,eAAA,CAAAV,KAAA,kBAElB,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAW,SAAA,CAAAb,SAAA,EAAAC,cAAA;EAAA,OAAAa,YAAA,CAAAd,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,EAvBOrB,aAAa;;AA8BvB;AAAA,WACiBsB,aAAa;AAoM9B,OAAO,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","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
- 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');
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');
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,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
+ {"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,12 +1,12 @@
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");
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");
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,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
+ {"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":[]}