@semcore/core 16.0.0-prerelease.9 → 16.0.1-prerelease.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -1
- package/README.md +1 -31
- package/lib/{LastInteractionType.cjs → LastInteractionType.js} +4 -6
- package/lib/LastInteractionType.js.map +1 -0
- package/lib/LastInteractionType.mjs +1 -2
- package/lib/LastInteractionType.mjs.map +1 -1
- package/lib/core-types/Component.d.ts +11 -13
- package/lib/core-types/Component.js +88 -0
- package/lib/core-types/Component.js.map +1 -0
- package/lib/core-types/Component.mjs +11 -14
- package/lib/core-types/Component.mjs.map +1 -1
- package/lib/core-types/UnknownProperties.js +2 -0
- package/lib/core-types/UnknownProperties.js.map +1 -0
- package/lib/core-types/UnknownProperties.mjs.map +1 -1
- package/lib/core-types/reshadow.d.js +2 -0
- package/lib/core-types/reshadow.d.js.map +1 -0
- package/lib/core-types/reshadow.d.mjs.map +1 -1
- package/lib/core-types/symbols.js +16 -0
- package/lib/core-types/symbols.js.map +1 -0
- package/lib/core-types/symbols.mjs.map +1 -1
- package/lib/coreFactory.d.ts +4 -4
- package/lib/{coreFactory.cjs → coreFactory.js} +38 -39
- package/lib/coreFactory.js.map +1 -0
- package/lib/coreFactory.mjs +39 -34
- package/lib/coreFactory.mjs.map +1 -1
- package/lib/enhancement/{Children.cjs → Children.js} +10 -11
- package/lib/enhancement/Children.js.map +1 -0
- package/lib/enhancement/Children.mjs +8 -8
- package/lib/enhancement/Children.mjs.map +1 -1
- package/lib/enhancement/Root.d.ts +1 -1
- package/lib/enhancement/{Root.cjs → Root.js} +6 -7
- package/lib/enhancement/Root.js.map +1 -0
- package/lib/enhancement/Root.mjs +2 -6
- package/lib/enhancement/Root.mjs.map +1 -1
- package/lib/enhancement/bindHandler.d.ts +1 -1
- package/lib/enhancement/{bindHandler.cjs → bindHandler.js} +3 -4
- package/lib/enhancement/bindHandler.js.map +1 -0
- package/lib/enhancement/bindHandler.mjs +1 -1
- package/lib/enhancement/bindHandler.mjs.map +1 -1
- package/lib/enhancement/{dataName.cjs → dataName.js} +3 -4
- package/lib/enhancement/dataName.js.map +1 -0
- package/lib/enhancement/dataName.mjs.map +1 -1
- package/lib/enhancement/{enhance.cjs → enhance.js} +2 -3
- package/lib/enhancement/enhance.js.map +1 -0
- package/lib/enhancement/enhance.mjs.map +1 -1
- package/lib/enhancement/{functionDefaultProps.cjs → functionDefaultProps.js} +2 -3
- package/lib/enhancement/functionDefaultProps.js.map +1 -0
- package/lib/enhancement/functionDefaultProps.mjs.map +1 -1
- package/lib/enhancement/hoistProps.d.ts +1 -1
- package/lib/enhancement/{hoistProps.cjs → hoistProps.js} +6 -8
- package/lib/enhancement/hoistProps.js.map +1 -0
- package/lib/enhancement/hoistProps.mjs +2 -2
- package/lib/enhancement/hoistProps.mjs.map +1 -1
- package/lib/enhancement/{i18n.cjs → i18n.js} +3 -4
- package/lib/enhancement/i18n.js.map +1 -0
- package/lib/enhancement/i18n.mjs.map +1 -1
- package/lib/enhancement/{inheritedName.cjs → inheritedName.js} +3 -4
- package/lib/enhancement/inheritedName.js.map +1 -0
- package/lib/enhancement/inheritedName.mjs.map +1 -1
- package/lib/enhancement/{staticChildren.cjs → staticChildren.js} +6 -9
- package/lib/enhancement/staticChildren.js.map +1 -0
- package/lib/enhancement/staticChildren.mjs +1 -1
- package/lib/enhancement/staticChildren.mjs.map +1 -1
- package/lib/enhancement/{style.cjs → style.js} +5 -7
- package/lib/enhancement/style.js.map +1 -0
- package/lib/enhancement/style.mjs +2 -3
- package/lib/enhancement/style.mjs.map +1 -1
- package/lib/enhancement/{uncontrolledProps.cjs → uncontrolledProps.js} +5 -7
- package/lib/enhancement/uncontrolledProps.js.map +1 -0
- package/lib/enhancement/uncontrolledProps.mjs +2 -3
- package/lib/enhancement/uncontrolledProps.mjs.map +1 -1
- package/lib/esm/LastInteractionType.mjs +1 -2
- package/lib/esm/core-types/Component.mjs +11 -14
- package/lib/esm/coreFactory.mjs +39 -34
- package/lib/esm/enhancement/Children.mjs +8 -8
- package/lib/esm/enhancement/Root.mjs +2 -6
- package/lib/esm/enhancement/bindHandler.mjs +1 -1
- package/lib/esm/enhancement/hoistProps.mjs +2 -2
- package/lib/esm/enhancement/staticChildren.mjs +1 -1
- package/lib/esm/enhancement/style.mjs +2 -3
- package/lib/esm/enhancement/uncontrolledProps.mjs +2 -3
- package/lib/esm/index.mjs +3 -2
- package/lib/esm/register.mjs +1 -2
- package/lib/esm/styled/index.mjs +8 -0
- package/lib/esm/styled/reshadow-core.mjs +219 -3
- package/lib/esm/styled/sstyled.mjs +1 -1
- package/lib/esm/utils/assignProps.mjs +10 -0
- package/lib/esm/utils/createHoc.mjs +47 -0
- package/lib/esm/utils/enhances/WithI18n.mjs +41 -15
- package/lib/esm/utils/enhances/i18nEnhance.mjs +91 -0
- package/lib/esm/utils/getDisplayName.mjs +6 -0
- package/lib/esm/utils/logger.mjs +1 -2
- package/lib/esm/utils/ref.mjs +46 -2
- package/lib/index.d.ts +5 -5
- package/lib/{index.cjs → index.js} +5 -5
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +3 -2
- package/lib/index.mjs.map +1 -1
- package/lib/{register.cjs → register.js} +5 -8
- package/lib/register.js.map +1 -0
- package/lib/register.mjs +1 -2
- package/lib/register.mjs.map +1 -1
- package/lib/styled/index.d.ts +1 -2
- package/lib/styled/{index.cjs → index.js} +1 -1
- package/lib/styled/index.js.map +1 -0
- package/lib/styled/index.mjs +8 -6
- package/lib/styled/index.mjs.map +1 -1
- package/lib/styled/{reshadow-core.cjs → reshadow-core.js} +28 -51
- package/lib/styled/reshadow-core.js.map +1 -0
- package/lib/styled/reshadow-core.mjs +219 -3
- package/lib/styled/reshadow-core.mjs.map +1 -1
- package/lib/styled/sstyled.d.ts +2 -2
- package/lib/styled/{sstyled.cjs → sstyled.js} +4 -4
- package/lib/styled/sstyled.js.map +1 -0
- package/lib/styled/sstyled.mjs +1 -1
- package/lib/styled/sstyled.mjs.map +1 -1
- package/lib/theme/dark.json +4 -4
- package/lib/theme/light.json +4 -44
- package/lib/theme/{processor.cjs → processor.js} +62 -64
- package/lib/theme/processor.js.map +1 -0
- package/lib/theme/processor.mjs +52 -53
- package/lib/theme/processor.mjs.map +1 -1
- package/lib/theme/themes/auto.css +228 -6
- package/lib/theme/themes/dark.css +114 -3
- package/lib/theme/themes/dark.d.ts +92 -1
- package/lib/theme/themes/{dark.cjs → dark.js} +95 -5
- package/lib/theme/themes/dark.js.map +1 -0
- package/lib/theme/themes/dark.mjs +93 -2
- package/lib/theme/themes/dark.mjs.map +1 -1
- package/lib/theme/themes/default.css +114 -3
- package/lib/theme/themes/default.d.ts +92 -1
- package/lib/theme/themes/{light.cjs → default.js} +95 -5
- package/lib/theme/themes/default.js.map +1 -0
- package/lib/theme/themes/default.mjs +93 -2
- package/lib/theme/themes/default.mjs.map +1 -1
- package/lib/theme/themes/light.css +114 -3
- package/lib/theme/themes/light.d.ts +92 -1
- package/lib/theme/themes/{default.cjs → light.js} +95 -5
- package/lib/theme/themes/light.js.map +1 -0
- package/lib/theme/themes/light.mjs +93 -2
- package/lib/theme/themes/light.mjs.map +1 -1
- package/lib/theme/utils.d.ts +2 -1
- package/lib/theme/{utils.cjs → utils.js} +37 -33
- package/lib/theme/utils.js.map +1 -0
- package/lib/theme/utils.mjs +31 -23
- package/lib/theme/utils.mjs.map +1 -1
- package/lib/utils/CSSinJS.d.ts +1 -1
- package/lib/utils/{CSSinJS.cjs → CSSinJS.js} +5 -6
- package/lib/utils/CSSinJS.js.map +1 -0
- package/lib/utils/CSSinJS.mjs +2 -2
- package/lib/utils/CSSinJS.mjs.map +1 -1
- package/lib/utils/ScreenReaderOnly.d.ts +1 -1
- package/lib/utils/{ScreenReaderOnly.cjs → ScreenReaderOnly.js} +3 -4
- package/lib/utils/ScreenReaderOnly.js.map +1 -0
- package/lib/utils/ScreenReaderOnly.mjs.map +1 -1
- package/lib/utils/ThemeProvider.d.ts +1 -1
- package/lib/utils/{ThemeProvider.cjs → ThemeProvider.js} +6 -10
- package/lib/utils/ThemeProvider.js.map +1 -0
- package/lib/utils/ThemeProvider.mjs.map +1 -1
- package/lib/utils/addonText.d.ts +1 -1
- package/lib/utils/{addonText.cjs → addonText.js} +2 -2
- package/lib/utils/addonText.js.map +1 -0
- package/lib/utils/addonText.mjs.map +1 -1
- package/lib/utils/addonTextChildren.d.ts +1 -1
- package/lib/utils/{addonTextChildren.cjs → addonTextChildren.js} +4 -5
- package/lib/utils/addonTextChildren.js.map +1 -0
- package/lib/utils/addonTextChildren.mjs +1 -1
- package/lib/utils/addonTextChildren.mjs.map +1 -1
- package/lib/utils/ariaProps.d.ts +1 -1
- package/lib/utils/{ariaProps.cjs → ariaProps.js} +1 -1
- package/lib/utils/ariaProps.js.map +1 -0
- package/lib/utils/ariaProps.mjs.map +1 -1
- package/lib/utils/assignProps.d.ts +1 -1
- package/lib/utils/{assignProps.cjs → assignProps.js} +3 -3
- package/lib/utils/assignProps.js.map +1 -0
- package/lib/utils/assignProps.mjs +10 -0
- package/lib/utils/assignProps.mjs.map +1 -1
- package/lib/utils/{canUseDOM.cjs → canUseDOM.js} +1 -1
- package/lib/utils/canUseDOM.js.map +1 -0
- package/lib/utils/canUseDOM.mjs.map +1 -1
- package/lib/utils/{capitalizeFirstLetter.cjs → capitalizeFirstLetter.js} +1 -1
- package/lib/utils/capitalizeFirstLetter.js.map +1 -0
- package/lib/utils/capitalizeFirstLetter.mjs.map +1 -1
- package/lib/utils/{color.cjs → color.js} +19 -19
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/color.mjs +16 -15
- package/lib/utils/color.mjs.map +1 -1
- package/lib/utils/{compose.cjs → compose.js} +1 -1
- package/lib/utils/compose.js.map +1 -0
- package/lib/utils/compose.mjs.map +1 -1
- package/lib/utils/createHoc.d.ts +1 -1
- package/lib/utils/{createHoc.cjs → createHoc.js} +12 -12
- package/lib/utils/createHoc.js.map +1 -0
- package/lib/utils/createHoc.mjs +24 -23
- package/lib/utils/createHoc.mjs.map +1 -1
- package/lib/utils/{createUUID.cjs → createUUID.js} +1 -1
- package/lib/utils/createUUID.js.map +1 -0
- package/lib/utils/createUUID.mjs.map +1 -1
- package/lib/utils/cssToIntDefault.d.ts +1 -1
- package/lib/utils/{cssToIntDefault.cjs → cssToIntDefault.js} +3 -3
- package/lib/utils/cssToIntDefault.js.map +1 -0
- package/lib/utils/cssToIntDefault.mjs +2 -2
- package/lib/utils/cssToIntDefault.mjs.map +1 -1
- package/lib/utils/enhances/WithAutoFocus.d.ts +3 -3
- package/lib/utils/enhances/{WithAutoFocus.cjs → WithAutoFocus.js} +13 -13
- package/lib/utils/enhances/WithAutoFocus.js.map +1 -0
- package/lib/utils/enhances/WithAutoFocus.mjs +11 -9
- package/lib/utils/enhances/WithAutoFocus.mjs.map +1 -1
- package/lib/utils/enhances/WithCSS.d.ts +4 -4
- package/lib/utils/enhances/{WithCSS.cjs → WithCSS.js} +16 -21
- package/lib/utils/enhances/WithCSS.js.map +1 -0
- package/lib/utils/enhances/WithCSS.mjs +8 -8
- package/lib/utils/enhances/WithCSS.mjs.map +1 -1
- package/lib/utils/enhances/WithI18n.d.ts +3 -3
- package/lib/utils/enhances/{WithI18n.cjs → WithI18n.js} +20 -23
- package/lib/utils/enhances/WithI18n.js.map +1 -0
- package/lib/utils/enhances/WithI18n.mjs +41 -15
- package/lib/utils/enhances/WithI18n.mjs.map +1 -1
- package/lib/utils/enhances/WithKeyboardFocus.d.ts +4 -3
- package/lib/utils/enhances/{WithKeyboardFocus.cjs → WithKeyboardFocus.js} +29 -25
- package/lib/utils/enhances/WithKeyboardFocus.js.map +1 -0
- package/lib/utils/enhances/WithKeyboardFocus.mjs +26 -19
- package/lib/utils/enhances/WithKeyboardFocus.mjs.map +1 -1
- package/lib/utils/enhances/WithRef.d.ts +1 -1
- package/lib/utils/enhances/{WithRef.cjs → WithRef.js} +4 -5
- package/lib/utils/enhances/WithRef.js.map +1 -0
- package/lib/utils/enhances/WithRef.mjs +1 -1
- package/lib/utils/enhances/WithRef.mjs.map +1 -1
- package/lib/utils/enhances/{a11yEnhance.cjs → a11yEnhance.js} +10 -11
- package/lib/utils/enhances/a11yEnhance.js.map +1 -0
- package/lib/utils/enhances/a11yEnhance.mjs +7 -7
- package/lib/utils/enhances/a11yEnhance.mjs.map +1 -1
- package/lib/utils/enhances/animatedSizeEnhance.d.ts +1 -1
- package/lib/utils/enhances/{animatedSizeEnhance.cjs → animatedSizeEnhance.js} +13 -11
- package/lib/utils/enhances/animatedSizeEnhance.js.map +1 -0
- package/lib/utils/enhances/animatedSizeEnhance.mjs +11 -7
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
- package/lib/utils/enhances/autoFocusEnhance.d.ts +1 -1
- package/lib/utils/enhances/{autoFocusEnhance.cjs → autoFocusEnhance.js} +3 -4
- package/lib/utils/enhances/autoFocusEnhance.js.map +1 -0
- package/lib/utils/enhances/autoFocusEnhance.mjs.map +1 -1
- package/lib/utils/enhances/{contextEnhance.cjs → contextEnhance.js} +3 -4
- package/lib/utils/enhances/contextEnhance.js.map +1 -0
- package/lib/utils/enhances/contextEnhance.mjs.map +1 -1
- package/lib/utils/enhances/i18nEnhance.d.ts +2 -2
- package/lib/utils/enhances/{i18nEnhance.cjs → i18nEnhance.js} +11 -11
- package/lib/utils/enhances/i18nEnhance.js.map +1 -0
- package/lib/utils/enhances/i18nEnhance.mjs +36 -37
- package/lib/utils/enhances/i18nEnhance.mjs.map +1 -1
- package/lib/utils/enhances/keyboardFocusEnhance.d.ts +1 -1
- package/lib/utils/enhances/{keyboardFocusEnhance.cjs → keyboardFocusEnhance.js} +8 -8
- package/lib/utils/enhances/keyboardFocusEnhance.js.map +1 -0
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +2 -2
- package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +1 -1
- package/lib/utils/enhances/{resolveColorEnhance.cjs → resolveColorEnhance.js} +5 -6
- package/lib/utils/enhances/resolveColorEnhance.js.map +1 -0
- package/lib/utils/enhances/resolveColorEnhance.mjs +2 -2
- package/lib/utils/enhances/resolveColorEnhance.mjs.map +1 -1
- package/lib/utils/{eventEmitter.cjs → eventEmitter.js} +3 -4
- package/lib/utils/eventEmitter.js.map +1 -0
- package/lib/utils/eventEmitter.mjs.map +1 -1
- package/lib/utils/findComponent.d.ts +2 -2
- package/lib/utils/{findComponent.cjs → findComponent.js} +15 -16
- package/lib/utils/findComponent.js.map +1 -0
- package/lib/utils/findComponent.mjs +12 -12
- package/lib/utils/findComponent.mjs.map +1 -1
- package/lib/utils/{fire.cjs → fire.js} +2 -2
- package/lib/utils/fire.js.map +1 -0
- package/lib/utils/fire.mjs.map +1 -1
- package/lib/utils/focus-lock/{focusBorders.cjs → focusBorders.js} +13 -17
- package/lib/utils/focus-lock/focusBorders.js.map +1 -0
- package/lib/utils/focus-lock/focusBorders.mjs +8 -8
- package/lib/utils/focus-lock/focusBorders.mjs.map +1 -1
- package/lib/utils/focus-lock/{getFocusableIn.cjs → getFocusableIn.js} +3 -4
- package/lib/utils/focus-lock/getFocusableIn.js.map +1 -0
- package/lib/utils/focus-lock/getFocusableIn.mjs +1 -1
- package/lib/utils/focus-lock/getFocusableIn.mjs.map +1 -1
- package/lib/utils/focus-lock/{isFocusInside.cjs → isFocusInside.js} +2 -3
- package/lib/utils/focus-lock/isFocusInside.js.map +1 -0
- package/lib/utils/focus-lock/isFocusInside.mjs.map +1 -1
- package/lib/utils/focus-lock/{isFocusable.cjs → isFocusable.js} +3 -4
- package/lib/utils/focus-lock/isFocusable.js.map +1 -0
- package/lib/utils/focus-lock/isFocusable.mjs.map +1 -1
- package/lib/utils/focus-lock/{setFocus.cjs → setFocus.js} +5 -6
- package/lib/utils/focus-lock/setFocus.js.map +1 -0
- package/lib/utils/focus-lock/setFocus.mjs +2 -2
- package/lib/utils/focus-lock/setFocus.mjs.map +1 -1
- package/lib/utils/{getAccessibleName.cjs → getAccessibleName.js} +2 -2
- package/lib/utils/getAccessibleName.js.map +1 -0
- package/lib/utils/getAccessibleName.mjs.map +1 -1
- package/lib/utils/getDisplayName.d.ts +1 -1
- package/lib/utils/{getDisplayName.cjs → getDisplayName.js} +1 -1
- package/lib/utils/getDisplayName.js.map +1 -0
- package/lib/utils/getDisplayName.mjs +5 -3
- package/lib/utils/getDisplayName.mjs.map +1 -1
- package/lib/utils/{getEventTarget.cjs → getEventTarget.js} +3 -4
- package/lib/utils/getEventTarget.js.map +1 -0
- package/lib/utils/getEventTarget.mjs.map +1 -1
- package/lib/utils/{getOriginChildren.cjs → getOriginChildren.js} +4 -5
- package/lib/utils/getOriginChildren.js.map +1 -0
- package/lib/utils/getOriginChildren.mjs +1 -1
- package/lib/utils/getOriginChildren.mjs.map +1 -1
- package/lib/utils/{getRandomInt.cjs → getRandomInt.js} +1 -1
- package/lib/utils/getRandomInt.js.map +1 -0
- package/lib/utils/getRandomInt.mjs.map +1 -1
- package/lib/utils/{getValue.cjs → getValue.js} +2 -4
- package/lib/utils/getValue.js.map +1 -0
- package/lib/utils/getValue.mjs +1 -3
- package/lib/utils/getValue.mjs.map +1 -1
- package/lib/utils/{hasLabels.cjs → hasLabels.js} +6 -7
- package/lib/utils/hasLabels.js.map +1 -0
- package/lib/utils/hasLabels.mjs +3 -3
- package/lib/utils/hasLabels.mjs.map +1 -1
- package/lib/utils/{hasParent.cjs → hasParent.js} +3 -4
- package/lib/utils/hasParent.js.map +1 -0
- package/lib/utils/hasParent.mjs +3 -2
- package/lib/utils/hasParent.mjs.map +1 -1
- package/lib/utils/if.d.ts +2 -2
- package/lib/utils/{if.cjs → if.js} +2 -3
- package/lib/utils/if.js.map +1 -0
- package/lib/utils/if.mjs.map +1 -1
- package/lib/utils/ifChildren.d.ts +1 -1
- package/lib/utils/{ifChildren.cjs → ifChildren.js} +2 -3
- package/lib/utils/ifChildren.js.map +1 -0
- package/lib/utils/ifChildren.mjs.map +1 -1
- package/lib/utils/{injectStyle.cjs → injectStyle.js} +4 -6
- package/lib/utils/injectStyle.js.map +1 -0
- package/lib/utils/injectStyle.mjs +1 -2
- package/lib/utils/injectStyle.mjs.map +1 -1
- package/lib/utils/{inputProps.cjs → inputProps.js} +2 -3
- package/lib/utils/inputProps.js.map +1 -0
- package/lib/utils/inputProps.mjs.map +1 -1
- package/lib/utils/isInteractiveElement.d.ts +1 -0
- package/lib/utils/isInteractiveElement.js +34 -0
- package/lib/utils/isInteractiveElement.js.map +1 -0
- package/lib/utils/isInteractiveElement.mjs +28 -0
- package/lib/utils/isInteractiveElement.mjs.map +1 -0
- package/lib/utils/{isNode.cjs → isNode.js} +2 -2
- package/lib/utils/isNode.js.map +1 -0
- package/lib/utils/isNode.mjs.map +1 -1
- package/lib/utils/{isPromise.cjs → isPromise.js} +1 -1
- package/lib/utils/isPromise.js.map +1 -0
- package/lib/utils/isPromise.mjs.map +1 -1
- package/lib/utils/{isRetina.cjs → isRetina.js} +1 -1
- package/lib/utils/isRetina.js.map +1 -0
- package/lib/utils/isRetina.mjs.map +1 -1
- package/lib/utils/{logger.cjs → logger.js} +5 -8
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/logger.mjs +1 -2
- package/lib/utils/logger.mjs.map +1 -1
- package/lib/utils/{numericChecker.cjs → numericChecker.js} +1 -1
- package/lib/utils/numericChecker.js.map +1 -0
- package/lib/utils/numericChecker.mjs.map +1 -1
- package/lib/utils/{ownerDocument.cjs → ownerDocument.js} +1 -1
- package/lib/utils/ownerDocument.js.map +1 -0
- package/lib/utils/ownerDocument.mjs.map +1 -1
- package/lib/utils/{pick.cjs → pick.js} +1 -1
- package/lib/utils/pick.js.map +1 -0
- package/lib/utils/pick.mjs.map +1 -1
- package/lib/utils/propsForElement.d.ts +1 -1
- package/lib/utils/{propsForElement.cjs → propsForElement.js} +3 -4
- package/lib/utils/propsForElement.js.map +1 -0
- package/lib/utils/propsForElement.mjs.map +1 -1
- package/lib/utils/{rafTrottle.cjs → rafTrottle.js} +2 -3
- package/lib/utils/rafTrottle.js.map +1 -0
- package/lib/utils/rafTrottle.mjs.map +1 -1
- package/lib/utils/reactToText.d.ts +1 -1
- package/lib/utils/{reactToText.cjs → reactToText.js} +2 -3
- package/lib/utils/reactToText.js.map +1 -0
- package/lib/utils/reactToText.mjs.map +1 -1
- package/lib/utils/ref.d.ts +4 -2
- package/lib/utils/{ref.cjs → ref.js} +4 -3
- package/lib/utils/ref.js.map +1 -0
- package/lib/utils/ref.mjs +46 -2
- package/lib/utils/ref.mjs.map +1 -1
- package/lib/utils/{setRef.cjs → setRef.js} +2 -3
- package/lib/utils/setRef.js.map +1 -0
- package/lib/utils/setRef.mjs.map +1 -1
- package/lib/utils/{syncScroll.cjs → syncScroll.js} +3 -3
- package/lib/utils/syncScroll.js.map +1 -0
- package/lib/utils/syncScroll.mjs +1 -1
- package/lib/utils/syncScroll.mjs.map +1 -1
- package/lib/utils/uncontroll.d.ts +1 -1
- package/lib/utils/{uncontroll.cjs → uncontroll.js} +2 -2
- package/lib/utils/uncontroll.js.map +1 -0
- package/lib/utils/uncontroll.mjs.map +1 -1
- package/lib/utils/uniqueID.d.ts +1 -1
- package/lib/utils/{uniqueID.cjs → uniqueID.js} +6 -6
- package/lib/utils/uniqueID.js.map +1 -0
- package/lib/utils/uniqueID.mjs +3 -0
- package/lib/utils/uniqueID.mjs.map +1 -1
- package/lib/utils/use/{useColorResolver.cjs → useColorResolver.js} +8 -107
- package/lib/utils/use/useColorResolver.js.map +1 -0
- package/lib/utils/use/useColorResolver.mjs +5 -103
- package/lib/utils/use/useColorResolver.mjs.map +1 -1
- package/lib/utils/use/useCss.d.ts +1 -1
- package/lib/utils/use/{useCss.cjs → useCss.js} +3 -4
- package/lib/utils/use/useCss.js.map +1 -0
- package/lib/utils/use/useCss.mjs.map +1 -1
- package/lib/utils/use/{useEnhancedEffect.cjs → useEnhancedEffect.js} +3 -4
- package/lib/utils/use/useEnhancedEffect.js.map +1 -0
- package/lib/utils/use/useEnhancedEffect.mjs.map +1 -1
- package/lib/utils/use/{useEventCallback.cjs → useEventCallback.js} +2 -2
- package/lib/utils/use/useEventCallback.js.map +1 -0
- package/lib/utils/use/useEventCallback.mjs.map +1 -1
- package/lib/utils/use/{useEventListener.cjs → useEventListener.js} +4 -5
- package/lib/utils/use/useEventListener.js.map +1 -0
- package/lib/utils/use/useEventListener.mjs +1 -1
- package/lib/utils/use/useEventListener.mjs.map +1 -1
- package/lib/utils/use/useFocusLock.d.ts +1 -1
- package/lib/utils/use/{useFocusLock.cjs → useFocusLock.js} +9 -12
- package/lib/utils/use/useFocusLock.js.map +1 -0
- package/lib/utils/use/useFocusLock.mjs +4 -4
- package/lib/utils/use/useFocusLock.mjs.map +1 -1
- package/lib/utils/use/{usePreventScroll.cjs → usePreventScroll.js} +3 -3
- package/lib/utils/use/usePreventScroll.js.map +1 -0
- package/lib/utils/use/usePreventScroll.mjs +1 -1
- package/lib/utils/use/usePreventScroll.mjs.map +1 -1
- package/lib/utils/useCssVariable.d.ts +2 -2
- package/lib/utils/{useCssVariable.cjs → useCssVariable.js} +4 -6
- package/lib/utils/useCssVariable.js.map +1 -0
- package/lib/utils/useCssVariable.mjs.map +1 -1
- package/lib/utils/{zIndexStacking.cjs → zIndexStacking.js} +7 -10
- package/lib/utils/zIndexStacking.js.map +1 -0
- package/lib/utils/zIndexStacking.mjs +2 -2
- package/lib/utils/zIndexStacking.mjs.map +1 -1
- package/package.json +45 -23
- package/vite.config.ts +1 -1
- package/lib/LastInteractionType.cjs.map +0 -1
- package/lib/core-types/Component.cjs +0 -59
- package/lib/core-types/Component.cjs.map +0 -1
- package/lib/core-types/UnknownProperties.cjs +0 -2
- package/lib/core-types/UnknownProperties.cjs.map +0 -1
- package/lib/core-types/reshadow.d.cjs +0 -2
- package/lib/core-types/reshadow.d.cjs.map +0 -1
- package/lib/core-types/symbols.cjs +0 -25
- package/lib/core-types/symbols.cjs.map +0 -1
- package/lib/coreFactory.cjs.map +0 -1
- package/lib/enhancement/Children.cjs.map +0 -1
- package/lib/enhancement/Root.cjs.map +0 -1
- package/lib/enhancement/bindHandler.cjs.map +0 -1
- package/lib/enhancement/dataName.cjs.map +0 -1
- package/lib/enhancement/enhance.cjs.map +0 -1
- package/lib/enhancement/functionDefaultProps.cjs.map +0 -1
- package/lib/enhancement/hoistProps.cjs.map +0 -1
- package/lib/enhancement/i18n.cjs.map +0 -1
- package/lib/enhancement/inheritedName.cjs.map +0 -1
- package/lib/enhancement/staticChildren.cjs.map +0 -1
- package/lib/enhancement/style.cjs.map +0 -1
- package/lib/enhancement/uncontrolledProps.cjs.map +0 -1
- package/lib/index.cjs.map +0 -1
- package/lib/register.cjs.map +0 -1
- package/lib/styled/index.cjs.map +0 -1
- package/lib/styled/reshadow-core.cjs.map +0 -1
- package/lib/styled/sstyled.cjs.map +0 -1
- package/lib/theme/processor.cjs.map +0 -1
- package/lib/theme/themes/dark.cjs.map +0 -1
- package/lib/theme/themes/default.cjs.map +0 -1
- package/lib/theme/themes/light.cjs.map +0 -1
- package/lib/theme/utils.cjs.map +0 -1
- package/lib/utils/CSSinJS.cjs.map +0 -1
- package/lib/utils/ScreenReaderOnly.cjs.map +0 -1
- package/lib/utils/ThemeProvider.cjs.map +0 -1
- package/lib/utils/addonText.cjs.map +0 -1
- package/lib/utils/addonTextChildren.cjs.map +0 -1
- package/lib/utils/ariaProps.cjs.map +0 -1
- package/lib/utils/assignProps.cjs.map +0 -1
- package/lib/utils/canUseDOM.cjs.map +0 -1
- package/lib/utils/capitalizeFirstLetter.cjs.map +0 -1
- package/lib/utils/color.cjs.map +0 -1
- package/lib/utils/compose.cjs.map +0 -1
- package/lib/utils/createHoc.cjs.map +0 -1
- package/lib/utils/createUUID.cjs.map +0 -1
- package/lib/utils/cssToIntDefault.cjs.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.cjs.map +0 -1
- package/lib/utils/enhances/WithCSS.cjs.map +0 -1
- package/lib/utils/enhances/WithI18n.cjs.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.cjs.map +0 -1
- package/lib/utils/enhances/WithRef.cjs.map +0 -1
- package/lib/utils/enhances/a11yEnhance.cjs.map +0 -1
- package/lib/utils/enhances/animatedSizeEnhance.cjs.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.cjs.map +0 -1
- package/lib/utils/enhances/contextEnhance.cjs.map +0 -1
- package/lib/utils/enhances/i18nEnhance.cjs.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.cjs.map +0 -1
- package/lib/utils/enhances/resolveColorEnhance.cjs.map +0 -1
- package/lib/utils/eventEmitter.cjs.map +0 -1
- package/lib/utils/findComponent.cjs.map +0 -1
- package/lib/utils/fire.cjs.map +0 -1
- package/lib/utils/focus-lock/focusBorders.cjs.map +0 -1
- package/lib/utils/focus-lock/getFocusableIn.cjs.map +0 -1
- package/lib/utils/focus-lock/isFocusInside.cjs.map +0 -1
- package/lib/utils/focus-lock/isFocusable.cjs.map +0 -1
- package/lib/utils/focus-lock/setFocus.cjs.map +0 -1
- package/lib/utils/getAccessibleName.cjs.map +0 -1
- package/lib/utils/getDisplayName.cjs.map +0 -1
- package/lib/utils/getEventTarget.cjs.map +0 -1
- package/lib/utils/getOriginChildren.cjs.map +0 -1
- package/lib/utils/getRandomInt.cjs.map +0 -1
- package/lib/utils/getValue.cjs.map +0 -1
- package/lib/utils/hasLabels.cjs.map +0 -1
- package/lib/utils/hasParent.cjs.map +0 -1
- package/lib/utils/if.cjs.map +0 -1
- package/lib/utils/ifChildren.cjs.map +0 -1
- package/lib/utils/injectStyle.cjs.map +0 -1
- package/lib/utils/inputProps.cjs.map +0 -1
- package/lib/utils/isNode.cjs.map +0 -1
- package/lib/utils/isPromise.cjs.map +0 -1
- package/lib/utils/isRetina.cjs.map +0 -1
- package/lib/utils/logger.cjs.map +0 -1
- package/lib/utils/numericChecker.cjs.map +0 -1
- package/lib/utils/ownerDocument.cjs.map +0 -1
- package/lib/utils/pick.cjs.map +0 -1
- package/lib/utils/propsForElement.cjs.map +0 -1
- package/lib/utils/rafTrottle.cjs.map +0 -1
- package/lib/utils/reactToText.cjs.map +0 -1
- package/lib/utils/ref.cjs.map +0 -1
- package/lib/utils/setRef.cjs.map +0 -1
- package/lib/utils/syncScroll.cjs.map +0 -1
- package/lib/utils/uncontroll.cjs.map +0 -1
- package/lib/utils/uniqueID.cjs.map +0 -1
- package/lib/utils/use/useColorResolver.cjs.map +0 -1
- package/lib/utils/use/useCss.cjs.map +0 -1
- package/lib/utils/use/useEnhancedEffect.cjs.map +0 -1
- package/lib/utils/use/useEventCallback.cjs.map +0 -1
- package/lib/utils/use/useEventListener.cjs.map +0 -1
- package/lib/utils/use/useFocusLock.cjs.map +0 -1
- package/lib/utils/use/usePreventScroll.cjs.map +0 -1
- package/lib/utils/useCssVariable.cjs.map +0 -1
- package/lib/utils/zIndexStacking.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [16.0.
|
|
5
|
+
## [16.0.1] - 2025-06-16
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Tokens form basic palette to themed .css files.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Value for `--intergalactic-sidebar-nav-control-hover` token (was updated to match gray palette) and fixed lightness for `--intergalactic-violet-dusty-50` token.
|
|
14
|
+
|
|
15
|
+
## [16.0.0] - 2025-05-19
|
|
6
16
|
|
|
7
17
|
### Added
|
|
8
18
|
|
|
9
19
|
- `utils` functions as part of Core.
|
|
10
20
|
- `LastInteractionType` class to check last interaction was from keyboard or mouse.
|
|
11
21
|
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Return type for `fincComponent` util. It could be only `ReactElement` or `undefined`.
|
|
25
|
+
|
|
26
|
+
## [2.39.4] - 2025-05-13
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [4.48.4 ~> 4.48.5]).
|
|
31
|
+
|
|
32
|
+
## [2.39.3] - 2025-05-09
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [4.48.2 ~> 4.48.4]).
|
|
37
|
+
|
|
38
|
+
## [2.39.2] - 2025-04-04
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [4.48.1 ~> 4.48.2]).
|
|
43
|
+
|
|
12
44
|
## [2.39.1] - 2025-03-20
|
|
13
45
|
|
|
14
46
|
### Changed
|
package/README.md
CHANGED
|
@@ -13,40 +13,10 @@
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
npm install
|
|
16
|
+
npm install @semcore/core
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
## Usage
|
|
20
19
|
|
|
21
|
-
```jsx
|
|
22
|
-
import { createComponent, Root, sstyled } from 'intergalactic/core';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
<details>
|
|
26
|
-
<summary>Alternative installation and use</summary>
|
|
27
|
-
|
|
28
|
-
**We do not recommend this usage path due to possible dependency and update issues.**
|
|
29
|
-
|
|
30
|
-
### Install
|
|
31
|
-
|
|
32
|
-
You can only install one package from the design system
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm install @semcore/core @semcore/core
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
`@semcore/core` - _is the basic package by which we create our components, and it contains all of the common logic
|
|
39
|
-
of the components that is discussed below. There should only be one version of the package in the project._
|
|
40
|
-
|
|
41
|
-
### Usage
|
|
42
|
-
|
|
43
|
-
You can use the package the same way but without `/ui/` in the import path.
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
import { createComponent, Root, sstyled } from '@semcore/core';
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
</details>
|
|
50
20
|
|
|
51
21
|
## 👤 Author
|
|
52
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -24,7 +24,7 @@ var LastInteractionType = /*#__PURE__*/function () {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
(0, _createClass2["default"])(LastInteractionType, [{
|
|
27
|
+
return (0, _createClass2["default"])(LastInteractionType, [{
|
|
28
28
|
key: "type",
|
|
29
29
|
get: function get() {
|
|
30
30
|
return this.lastFocusSource;
|
|
@@ -50,8 +50,6 @@ var LastInteractionType = /*#__PURE__*/function () {
|
|
|
50
50
|
this.lastFocusSource = 'keyboard';
|
|
51
51
|
}
|
|
52
52
|
}]);
|
|
53
|
-
return LastInteractionType;
|
|
54
53
|
}();
|
|
55
|
-
var lastInteraction = new LastInteractionType();
|
|
56
|
-
|
|
57
|
-
//# sourceMappingURL=LastInteractionType.cjs.map
|
|
54
|
+
var lastInteraction = exports.lastInteraction = new LastInteractionType();
|
|
55
|
+
//# sourceMappingURL=LastInteractionType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LastInteractionType.js","names":["_canUseDOM","_interopRequireDefault","require","LastInteractionType","_classCallCheck2","_defineProperty2","handleKeyDown","bind","handleMouseDown","canUseDOM","document","addEventListener","capture","_createClass2","key","get","lastFocusSource","value","isKeyboard","isMouse","lastInteraction","exports"],"sources":["../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0C,IAEpCC,mBAAmB;EAGvB,SAAAA,oBAAA,EAAc;IAAA,IAAAC,gBAAA,mBAAAD,mBAAA;IAAA,IAAAE,gBAAA,sCAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAI,IAAAE,qBAAS,EAAC,CAAC,EAAE;MACfC,QAAQ,CAACC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAACH,eAAe,EAAE;QAAEI,OAAO,EAAE;MAAK,CAAC,CAAC;MAC/EF,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAACL,aAAa,EAAE;QAAEM,OAAO,EAAE;MAAK,CAAC,CAAC;IAC7E;EACF;EAAC,WAAAC,aAAA,aAAAV,mBAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAkB;MAChB,OAAO,IAAI,CAACC,eAAe;IAC7B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,UAAUA,CAAA,EAAG;MAClB,OAAO,IAAI,CAACF,eAAe,KAAK,UAAU;IAC5C;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOE,OAAOA,CAAA,EAAG;MACf,OAAO,IAAI,CAACH,eAAe,KAAK,OAAO;IACzC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQT,eAAeA,CAAA,EAAG;MACxB,IAAI,CAACQ,eAAe,GAAG,OAAO;IAChC;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAQX,aAAaA,CAAA,EAAG;MACtB,IAAI,CAACU,eAAe,GAAG,UAAU;IACnC;EAAC;AAAA;AAGI,IAAMI,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAIjB,mBAAmB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,7 @@ var LastInteractionType = /* @__PURE__ */ function() {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
_createClass(LastInteractionType2, [{
|
|
20
|
+
return _createClass(LastInteractionType2, [{
|
|
21
21
|
key: "type",
|
|
22
22
|
get: function get() {
|
|
23
23
|
return this.lastFocusSource;
|
|
@@ -43,7 +43,6 @@ var LastInteractionType = /* @__PURE__ */ function() {
|
|
|
43
43
|
this.lastFocusSource = "keyboard";
|
|
44
44
|
}
|
|
45
45
|
}]);
|
|
46
|
-
return LastInteractionType2;
|
|
47
46
|
}();
|
|
48
47
|
var lastInteraction = new LastInteractionType();
|
|
49
48
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LastInteractionType.mjs","names":["canUseDOM","LastInteractionType","_classCallCheck","_defineProperty","handleKeyDown","bind","handleMouseDown","document","addEventListener","capture","_createClass","key","get","lastFocusSource","value","isKeyboard","isMouse","lastInteraction"],"sources":["../src/LastInteractionType.ts"],"sourcesContent":["import canUseDOM from './utils/canUseDOM';\n\nclass LastInteractionType {\n private lastFocusSource: 'mouse' | 'keyboard' | 'none' = 'none';\n\n constructor() {\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n\n if (canUseDOM()) {\n document.addEventListener('mousedown', this.handleMouseDown, { capture: true });\n document.addEventListener('keydown', this.handleKeyDown, { capture: true });\n }\n }\n\n public get type() {\n return this.lastFocusSource;\n }\n\n public isKeyboard() {\n return this.lastFocusSource === 'keyboard';\n }\n\n public isMouse() {\n return this.lastFocusSource === 'mouse';\n }\n\n private handleMouseDown() {\n this.lastFocusSource = 'mouse';\n }\n\n private handleKeyDown() {\n this.lastFocusSource = 'keyboard';\n }\n}\n\nexport const lastInteraction = new LastInteractionType();\n"],"mappings":";;;AAAA,OAAOA,SAAS,MAAM,uBAAmB;AAAC,IAEpCC,mBAAmB;EAGvB,SAAAA,oBAAA,EAAc;IAAAC,eAAA,OAAAD,mBAAA;IAAAE,eAAA,0BAF2C,MAAM;IAG7D,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACC,IAAI,CAAC,IAAI,CAAC;IAClD,IAAI,CAACC,eAAe,GAAG,IAAI,CAACA,eAAe,CAACD,IAAI,CAAC,IAAI,CAAC;IAEtD,IAAIL,SAAS,
|
|
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,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type AllHTMLAttributes, type ForwardRefExoticComponent, PureComponent, type ReactNode, type RefAttributes, type RefObject } from 'react';
|
|
3
|
+
import type { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';
|
|
4
|
+
import type { IStyledProps } from '../styled/index';
|
|
4
5
|
/** @deprecated */
|
|
5
6
|
type KnownKeys<T> = {
|
|
6
7
|
[K in keyof T]: string extends K ? never : number extends K ? never : K;
|
|
@@ -21,10 +22,10 @@ export interface IRootComponentHandlers {
|
|
|
21
22
|
}
|
|
22
23
|
/** @deprecated */
|
|
23
24
|
export interface IRootComponentProps<Props = {}, Ctx = {}> {
|
|
24
|
-
forwardRef?: RefObject<any>;
|
|
25
|
-
Children?: any;
|
|
26
|
-
children?: ChildrenType<Props, Ctx>;
|
|
27
|
-
styles?: IStyledProps['styles'];
|
|
25
|
+
'forwardRef'?: RefObject<any>;
|
|
26
|
+
'Children'?: any;
|
|
27
|
+
'children'?: ChildrenType<Props, Ctx>;
|
|
28
|
+
'styles'?: IStyledProps['styles'];
|
|
28
29
|
'data-ui-name'?: string;
|
|
29
30
|
}
|
|
30
31
|
/** @deprecated */
|
|
@@ -70,9 +71,9 @@ export type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args:
|
|
|
70
71
|
declare const Root: Root;
|
|
71
72
|
export { Root };
|
|
72
73
|
/** @deprecated */
|
|
73
|
-
declare abstract class RootComponent<Props = {}, Context = {}, State = {}, Enhance extends readonly ((...args: any[]) => any)[] = []> extends PureComponent<Props, State> {
|
|
74
|
+
declare abstract class RootComponent<Props = {}, Context = {}, State = {}, Enhance extends readonly ((...args: any[]) => any)[] = [], InnerProps = {}> extends PureComponent<Props, State> {
|
|
74
75
|
get handlers(): Readonly<IRootComponentHandlers>;
|
|
75
|
-
get asProps(): Readonly<Merge<Props & IRootComponentProps<Props, Context> & Intergalactic.InternalTypings.ExtractEnhanceType<Enhance
|
|
76
|
+
get asProps(): Readonly<Merge<Props & IRootComponentProps<Props, Context> & Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> & InnerProps, AllHTMLAttributes<any>>>;
|
|
76
77
|
Root: Root;
|
|
77
78
|
isControlled: boolean;
|
|
78
79
|
}
|
|
@@ -172,10 +173,7 @@ export declare namespace Intergalactic {
|
|
|
172
173
|
}[Keys];
|
|
173
174
|
export {};
|
|
174
175
|
}
|
|
175
|
-
export declare const wrapIntergalacticComponent: <
|
|
176
|
-
ref: React.Ref<any>;
|
|
177
|
-
tag: Intergalactic.InternalTypings.ComponentTag;
|
|
178
|
-
} & PropsExtending) => React.ReactNode) => Intergalactic.Component<Component_1["__tag"], Component_1["__props"] & Component_1["__nestedProps"] & PropsExtending, Component_1["__context"], Component_1["__additionalContext"]>;
|
|
176
|
+
export declare const wrapIntergalacticComponent: <Component extends Intergalactic.Component<any, any, any, any>, PropsExtending = {}>(wrapper: (props: Intergalactic.InternalTypings.UntypeRefAndTag<Intergalactic.InternalTypings.ComponentPropsNesting<Component>> & PropsExtending) => React.ReactNode) => Intergalactic.Component<Component["__tag"], Component["__props"] & Component["__nestedProps"] & PropsExtending, Component["__context"], Component["__additionalContext"]>;
|
|
179
177
|
export type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> & RefAttributes<unknown>;
|
|
180
178
|
export type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<PropsAndRef<T, Ctx, UCProps>>;
|
|
181
179
|
type ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps] ? ComponentType<ParentProps, ChildProps, Context, UCProps> : ForwardRefComponent<T, Context, UCProps>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
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 _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
+
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
12
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
17
|
+
/** @deprecated */
|
|
18
|
+
|
|
19
|
+
/** @deprecated */
|
|
20
|
+
|
|
21
|
+
/** @deprecated */
|
|
22
|
+
|
|
23
|
+
/** @deprecated */
|
|
24
|
+
|
|
25
|
+
/** @deprecated */
|
|
26
|
+
|
|
27
|
+
/** @deprecated */
|
|
28
|
+
|
|
29
|
+
/** @deprecated */
|
|
30
|
+
|
|
31
|
+
/** @deprecated */
|
|
32
|
+
|
|
33
|
+
/** @deprecated */
|
|
34
|
+
|
|
35
|
+
/** @deprecated */
|
|
36
|
+
|
|
37
|
+
/** @deprecated */
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated since version ^1.8.0
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated since version ^1.8.0
|
|
45
|
+
*/
|
|
46
|
+
/** @deprecated */
|
|
47
|
+
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
|
|
50
|
+
/** @deprecated */
|
|
51
|
+
|
|
52
|
+
/** @deprecated */
|
|
53
|
+
|
|
54
|
+
var Root = exports.Root = undefined;
|
|
55
|
+
/** @deprecated */
|
|
56
|
+
var RootComponent = /*#__PURE__*/function (_PureComponent) {
|
|
57
|
+
function RootComponent() {
|
|
58
|
+
var _this;
|
|
59
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
60
|
+
args[_key] = arguments[_key];
|
|
61
|
+
}
|
|
62
|
+
(0, _classCallCheck2["default"])(this, RootComponent);
|
|
63
|
+
_this = _callSuper(this, RootComponent, [].concat(args));
|
|
64
|
+
(0, _defineProperty2["default"])(_this, "Root", undefined);
|
|
65
|
+
(0, _defineProperty2["default"])(_this, "isControlled", false);
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
(0, _inherits2["default"])(RootComponent, _PureComponent);
|
|
69
|
+
return (0, _createClass2["default"])(RootComponent, [{
|
|
70
|
+
key: "handlers",
|
|
71
|
+
get: function get() {
|
|
72
|
+
return {};
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
key: "asProps",
|
|
76
|
+
get: function get() {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
}]);
|
|
80
|
+
}(_react.PureComponent);
|
|
81
|
+
var Component = exports.Component = RootComponent;
|
|
82
|
+
/** @deprecated */
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
84
|
+
var Intergalactic;
|
|
85
|
+
var wrapIntergalacticComponent = exports.wrapIntergalacticComponent = function wrapIntergalacticComponent(wrapper) {
|
|
86
|
+
return wrapper;
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=Component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.js","names":["_react","require","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","Root","exports","undefined","RootComponent","_PureComponent","_this","_len","arguments","length","args","Array","_key","_classCallCheck2","concat","_defineProperty2","_inherits2","_createClass2","key","get","PureComponent","Component","Intergalactic","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import type React from 'react';\nimport { type\nAllHTMLAttributes, type\nForwardRefExoticComponent,\nPureComponent, type\nReactNode, type\nRefAttributes, type\nRefObject,\n} from 'react';\n\nimport type { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\nimport type { IStyledProps } from '../styled/index';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n 'forwardRef'?: RefObject<any>;\n 'Children'?: any;\n 'children'?: ChildrenType<Props, Ctx>;\n 'styles'?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n InnerProps = {},\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance> &\n InnerProps,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n // eslint-disable-next-line @stylistic/indent-binary-ops\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\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> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<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 };\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 = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n } & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n };\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAOe,SAAAC,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,MAAAK,0BAAA,iBAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAKf;;AAOA;;AAEA;;AAKA;;AAGA;;AAKA;;AASA;;AAGA;;AAIA;;AASA;;AAIA;;AAYA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAKA,IAAMQ,IAAU,GAAAC,OAAA,CAAAD,IAAA,GAAGE,SAAgB;AAInC;AAAA,IACeC,aAAa,0BAAAC,cAAA;EAAA,SAAAD,cAAA;IAAA,IAAAE,KAAA;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAA,IAAAC,gBAAA,mBAAAT,aAAA;IAAAE,KAAA,GAAAhB,UAAA,OAAAc,aAAA,KAAAU,MAAA,CAAAJ,IAAA;IAAA,IAAAK,gBAAA,aAAAT,KAAA,UAuBbH,SAAS;IAAA,IAAAY,gBAAA,aAAAT,KAAA,kBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAA,IAAAU,UAAA,aAAAZ,aAAA,EAAAC,cAAA;EAAA,WAAAY,aAAA,aAAAb,aAAA;IAAAc,GAAA;IAAAC,GAAA,EAlBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IASX;EAAC;AAAA,EAfOC,oBAAa;AAsBhB,IAAMC,SAAS,GAAAnB,OAAA,CAAAmB,SAAA,GAAGjB,aAAa;AACtC;AAgBA;AAAA,IACiBkB,aAAa;AA+LvB,IAAMC,0BAA0B,GAAArB,OAAA,CAAAqB,0BAAA,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","ignoreList":[]}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
6
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
8
|
import { PureComponent } from "react";
|
|
9
|
+
function _callSuper(t, o, e) {
|
|
10
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
11
|
+
}
|
|
8
12
|
var Root = void 0;
|
|
9
13
|
var RootComponent = /* @__PURE__ */ function(_PureComponent) {
|
|
10
|
-
_inherits(RootComponent2, _PureComponent);
|
|
11
|
-
var _super = _createSuper(RootComponent2);
|
|
12
14
|
function RootComponent2() {
|
|
13
15
|
var _this;
|
|
14
16
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
17
|
args[_key] = arguments[_key];
|
|
16
18
|
}
|
|
17
19
|
_classCallCheck(this, RootComponent2);
|
|
18
|
-
_this =
|
|
19
|
-
_defineProperty(
|
|
20
|
-
_defineProperty(
|
|
20
|
+
_this = _callSuper(this, RootComponent2, [].concat(args));
|
|
21
|
+
_defineProperty(_this, "Root", void 0);
|
|
22
|
+
_defineProperty(_this, "isControlled", false);
|
|
21
23
|
return _this;
|
|
22
24
|
}
|
|
23
|
-
|
|
25
|
+
_inherits(RootComponent2, _PureComponent);
|
|
26
|
+
return _createClass(RootComponent2, [{
|
|
24
27
|
key: "handlers",
|
|
25
28
|
get: function get() {
|
|
26
29
|
return {};
|
|
@@ -31,15 +34,9 @@ var RootComponent = /* @__PURE__ */ function(_PureComponent) {
|
|
|
31
34
|
return {};
|
|
32
35
|
}
|
|
33
36
|
}]);
|
|
34
|
-
return RootComponent2;
|
|
35
37
|
}(PureComponent);
|
|
36
38
|
var Component = RootComponent;
|
|
37
39
|
var Intergalactic;
|
|
38
|
-
(function(_Intergalactic) {
|
|
39
|
-
var InternalTypings;
|
|
40
|
-
/* @__PURE__ */ (function(_InternalTypings) {
|
|
41
|
-
})(InternalTypings || (InternalTypings = _Intergalactic.InternalTypings || (_Intergalactic.InternalTypings = {})));
|
|
42
|
-
})(Intergalactic || (Intergalactic = {}));
|
|
43
40
|
var wrapIntergalacticComponent = function wrapIntergalacticComponent2(wrapper) {
|
|
44
41
|
return wrapper;
|
|
45
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mjs","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_len","arguments","length","args","Array","_key","_classCallCheck","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\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> 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 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\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 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 ? {\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 ? {\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 ? {\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,\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> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<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 };\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 = 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":";;;;;;AAAA,SAGEA,aAAa,QAIR,OAAO;AAEd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,eAAW;;AAE5D;;AAiFA,IAAMC,IAAU,GAAGC,SAAgB;AAEnC,SAASD,IAAI;;AAEb;AAAA,IACeE,aAAa,0BAAAC,cAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,cAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;EAAA,SAAAA,cAAA;IAAA,IAAAK,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,OAAAZ,aAAA;IAAAK,KAAA,GAAAF,MAAA,CAAAU,IAAA,CAAAC,KAAA,CAAAX,MAAA,SAAAY,MAAA,CAAAN,IAAA;IAAAO,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,WAqBbN,SAAS;IAAAiB,eAAA,CAAAC,sBAAA,CAAAZ,KAAA,mBAEP,KAAK;IAAA,OAAAA,KAAA;EAAA;EAAAa,YAAA,CAAAlB,aAAA;IAAAmB,GAAA;IAAAC,GAAA,EAjBpB,SAAAA,IAAA,EAAiD;MAC/C,OAAO,CAAC,CAAC;IACX;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAc;MACZ,OAAO,CAAC,CAAC;IAQX;EAAC;EAAA,OAAApB,aAAA;AAAA,EAdOL,aAAa;AAqBvB,OAAO,IAAM0B,SAAS,GAAGrB,aAAa;AACtC;;AAgBA,WAAAsB,aAAA;AAyLC,WAAAC,cAAA;EAAA,IAAAC,eAAA;EAAA,WAAAC,gBAAA,MA7JkBD,eAAe,KAAfA,eAAe,GAAAD,cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAbA,aAAa;AA2L9B,OAAO,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO"}
|
|
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,\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> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<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 };\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 = 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;AA+L9B,OAAO,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownProperties.js","names":[],"sources":["../../src/core-types/UnknownProperties.ts"],"sourcesContent":["export type UnknownProperties = {\n [key: string]: unknown;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownProperties.mjs","names":[],"sources":["../../src/core-types/UnknownProperties.ts"],"sourcesContent":["export type UnknownProperties = {\n [key: string]: unknown;\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"UnknownProperties.mjs","names":[],"sources":["../../src/core-types/UnknownProperties.ts"],"sourcesContent":["export type UnknownProperties = {\n [key: string]: unknown;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reshadow.d.js","names":[],"sources":["../../src/core-types/reshadow.d.ts"],"sourcesContent":["declare module 'hoist-non-react-statics' {\n const hoistNonReactStatics: any;\n export default hoistNonReactStatics;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reshadow.d.mjs","names":[],"sources":["../../src/core-types/reshadow.d.ts"],"sourcesContent":["declare module 'hoist-non-react-statics' {\n const hoistNonReactStatics: any;\n export default hoistNonReactStatics;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"reshadow.d.mjs","names":[],"sources":["../../src/core-types/reshadow.d.ts"],"sourcesContent":["declare module 'hoist-non-react-statics' {\n const hoistNonReactStatics: any;\n export default hoistNonReactStatics;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
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');
|
|
16
|
+
//# sourceMappingURL=symbols.js.map
|
|
@@ -0,0 +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 +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"}
|
|
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":[]}
|
package/lib/coreFactory.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import { Component, PropsWithRenderFnChildren } from './core-types/Component';
|
|
1
|
+
import React, { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
2
|
+
import { Component, type PropsWithRenderFnChildren } from './core-types/Component';
|
|
3
3
|
import { CORE_COMPONENT, CREATE_COMPONENT } from './core-types/symbols';
|
|
4
4
|
export type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> & RefAttributes<unknown>;
|
|
5
5
|
export type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<PropsAndRef<T, Ctx, UCProps>>;
|
|
@@ -12,7 +12,7 @@ export type ComponentType<ComponentProps, ChildComponentProps = {}, ContextType
|
|
|
12
12
|
[CORE_COMPONENT]: boolean;
|
|
13
13
|
[CREATE_COMPONENT]: () => ComponentType<ComponentProps, ChildComponentProps, ContextType, UCProps>;
|
|
14
14
|
};
|
|
15
|
-
interface ClassWithUncontrolledProps
|
|
15
|
+
interface ClassWithUncontrolledProps {
|
|
16
16
|
uncontrolledProps(): unknown;
|
|
17
17
|
}
|
|
18
18
|
export declare function assignProps(p1: any, p2: any): any;
|
|
@@ -20,7 +20,7 @@ declare function createComponent<ComponentProps, ChildComponentProps = {}, Conte
|
|
|
20
20
|
context?: React.Context<ContextType>;
|
|
21
21
|
parent?: ComponentType<unknown> | ComponentType<unknown>[];
|
|
22
22
|
enhancements?: [any];
|
|
23
|
-
}): ComponentType<ComponentProps extends Component<infer Props> ? Props : ComponentProps, ChildComponentProps, ContextType, ComponentProps extends ClassWithUncontrolledProps
|
|
23
|
+
}): ComponentType<ComponentProps extends Component<infer Props> ? Props : ComponentProps, ChildComponentProps, ContextType, ComponentProps extends ClassWithUncontrolledProps ? ReturnType<ComponentProps['uncontrolledProps']> : {
|
|
24
24
|
[key: string]: (arg: unknown) => void;
|
|
25
25
|
}, FNType>;
|
|
26
26
|
declare function createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps>;
|