@semcore/core 16.0.0-prerelease.2 → 16.0.0-prerelease.6
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/lib/{cjs/LastInteractionType.js → LastInteractionType.cjs} +1 -1
- package/lib/LastInteractionType.cjs.map +1 -0
- package/lib/LastInteractionType.d.ts +1 -1
- package/lib/{es6/LastInteractionType.js → LastInteractionType.mjs} +5 -5
- package/lib/LastInteractionType.mjs.map +1 -0
- package/lib/core-types/{Component.js → Component.cjs} +1 -1
- package/lib/core-types/Component.cjs.map +1 -0
- package/lib/core-types/Component.mjs +6 -6
- package/lib/core-types/UnknownProperties.cjs +2 -0
- package/lib/core-types/UnknownProperties.cjs.map +1 -0
- package/lib/core-types/UnknownProperties.mjs +0 -1
- package/lib/core-types/reshadow.d.cjs +2 -0
- package/lib/core-types/reshadow.d.cjs.map +1 -0
- package/lib/core-types/{symbols.js → symbols.cjs} +1 -1
- package/lib/core-types/symbols.cjs.map +1 -0
- package/lib/{cjs/coreFactory.js → coreFactory.cjs} +1 -1
- package/lib/coreFactory.cjs.map +1 -0
- package/lib/{es6/coreFactory.js → coreFactory.mjs} +30 -30
- package/lib/coreFactory.mjs.map +1 -0
- package/lib/{cjs/enhancement/Children.js → enhancement/Children.cjs} +1 -1
- package/lib/enhancement/Children.cjs.map +1 -0
- package/lib/enhancement/Children.mjs +4 -4
- package/lib/enhancement/{Root.js → Root.cjs} +1 -1
- package/lib/enhancement/Root.cjs.map +1 -0
- package/lib/enhancement/Root.mjs +3 -3
- package/lib/enhancement/{bindHandler.js → bindHandler.cjs} +1 -1
- package/lib/enhancement/bindHandler.cjs.map +1 -0
- package/lib/enhancement/{dataName.js → dataName.cjs} +1 -1
- package/lib/enhancement/dataName.cjs.map +1 -0
- package/lib/enhancement/dataName.mjs +1 -1
- package/lib/{cjs/enhancement/enhance.js → enhancement/enhance.cjs} +1 -1
- package/lib/enhancement/enhance.cjs.map +1 -0
- package/lib/enhancement/{functionDefaultProps.js → functionDefaultProps.cjs} +1 -1
- package/lib/enhancement/functionDefaultProps.cjs.map +1 -0
- package/lib/enhancement/{hoistProps.js → hoistProps.cjs} +1 -1
- package/lib/enhancement/hoistProps.cjs.map +1 -0
- package/lib/enhancement/hoistProps.mjs +4 -4
- package/lib/enhancement/{i18n.js → i18n.cjs} +1 -1
- package/lib/enhancement/i18n.cjs.map +1 -0
- package/lib/enhancement/i18n.mjs +2 -2
- package/lib/{cjs/enhancement/inheritedName.js → enhancement/inheritedName.cjs} +1 -1
- package/lib/enhancement/inheritedName.cjs.map +1 -0
- package/lib/enhancement/inheritedName.mjs +2 -2
- package/lib/enhancement/{staticChildren.js → staticChildren.cjs} +1 -1
- package/lib/enhancement/staticChildren.cjs.map +1 -0
- package/lib/enhancement/staticChildren.mjs +3 -3
- package/lib/enhancement/{style.js → style.cjs} +1 -1
- package/lib/enhancement/style.cjs.map +1 -0
- package/lib/enhancement/style.mjs +3 -3
- package/lib/{cjs/enhancement/uncontrolledProps.js → enhancement/uncontrolledProps.cjs} +1 -1
- package/lib/enhancement/uncontrolledProps.cjs.map +1 -0
- package/lib/enhancement/uncontrolledProps.mjs +7 -7
- package/lib/{cjs/index.js → index.cjs} +1 -1
- package/lib/index.cjs.map +1 -0
- package/lib/{es6/index.js → index.mjs} +7 -7
- package/lib/index.mjs.map +1 -0
- package/lib/{cjs/register.js → register.cjs} +1 -1
- package/lib/register.cjs.map +1 -0
- package/lib/register.mjs +3 -3
- package/lib/{cjs/styled/index.js → styled/index.cjs} +1 -1
- package/lib/styled/index.cjs.map +1 -0
- package/lib/{cjs/styled/reshadow-core.js → styled/reshadow-core.cjs} +1 -1
- package/lib/styled/reshadow-core.cjs.map +1 -0
- package/lib/styled/reshadow-core.mjs +5 -5
- package/lib/styled/reshadow-core.mjs.map +1 -1
- package/lib/styled/{sstyled.js → sstyled.cjs} +1 -1
- package/lib/styled/sstyled.cjs.map +1 -0
- package/lib/styled/sstyled.mjs +2 -2
- package/lib/theme/{processor.js → processor.cjs} +1 -1
- package/lib/theme/processor.cjs.map +1 -0
- package/lib/theme/processor.mjs +4 -4
- package/lib/{cjs/theme/themes/dark.js → theme/themes/dark.cjs} +1 -1
- package/lib/theme/themes/dark.cjs.map +1 -0
- package/lib/theme/themes/{default.js → default.cjs} +1 -1
- package/lib/theme/themes/default.cjs.map +1 -0
- package/lib/{cjs/theme/themes/light.js → theme/themes/light.cjs} +1 -1
- package/lib/theme/themes/light.cjs.map +1 -0
- package/lib/{cjs/theme/utils.js → theme/utils.cjs} +1 -1
- package/lib/theme/utils.cjs.map +1 -0
- package/lib/theme/utils.mjs +9 -9
- package/lib/theme/utils.mjs.map +1 -1
- package/lib/{cjs/utils/CSSinJS.js → utils/CSSinJS.cjs} +1 -1
- package/lib/utils/CSSinJS.cjs.map +1 -0
- package/lib/utils/CSSinJS.mjs +1 -1
- package/lib/utils/{ScreenReaderOnly.js → ScreenReaderOnly.cjs} +1 -1
- package/lib/utils/ScreenReaderOnly.cjs.map +1 -0
- package/lib/utils/ScreenReaderOnly.mjs +1 -1
- package/lib/utils/{ThemeProvider.js → ThemeProvider.cjs} +1 -1
- package/lib/utils/ThemeProvider.cjs.map +1 -0
- package/lib/utils/ThemeProvider.mjs +4 -4
- package/lib/utils/{addonText.js → addonText.cjs} +1 -1
- package/lib/utils/addonText.cjs.map +1 -0
- package/lib/utils/addonText.d.ts +1 -1
- package/lib/{cjs/utils/addonTextChildren.js → utils/addonTextChildren.cjs} +1 -1
- package/lib/utils/addonTextChildren.cjs.map +1 -0
- package/lib/utils/addonTextChildren.mjs +1 -1
- package/lib/utils/{ariaProps.js → ariaProps.cjs} +1 -1
- package/lib/utils/ariaProps.cjs.map +1 -0
- package/lib/{cjs/utils/assignProps.js → utils/assignProps.cjs} +1 -1
- package/lib/utils/assignProps.cjs.map +1 -0
- package/lib/utils/assignProps.mjs +9 -9
- package/lib/utils/{canUseDOM.js → canUseDOM.cjs} +1 -1
- package/lib/utils/canUseDOM.cjs.map +1 -0
- package/lib/utils/{capitalizeFirstLetter.js → capitalizeFirstLetter.cjs} +1 -1
- package/lib/utils/capitalizeFirstLetter.cjs.map +1 -0
- package/lib/utils/{color.js → color.cjs} +1 -1
- package/lib/utils/color.cjs.map +1 -0
- package/lib/utils/color.mjs +2 -2
- package/lib/{cjs/utils/compose.js → utils/compose.cjs} +1 -1
- package/lib/utils/compose.cjs.map +1 -0
- package/lib/{cjs/utils/createHoc.js → utils/createHoc.cjs} +1 -1
- package/lib/utils/createHoc.cjs.map +1 -0
- package/lib/utils/createHoc.mjs +8 -8
- package/lib/{cjs/utils/createUUID.js → utils/createUUID.cjs} +1 -1
- package/lib/utils/createUUID.cjs.map +1 -0
- package/lib/utils/{cssToIntDefault.js → cssToIntDefault.cjs} +1 -1
- package/lib/utils/cssToIntDefault.cjs.map +1 -0
- package/lib/utils/enhances/{WithAutoFocus.js → WithAutoFocus.cjs} +1 -1
- package/lib/utils/enhances/WithAutoFocus.cjs.map +1 -0
- package/lib/utils/enhances/WithAutoFocus.mjs +6 -6
- package/lib/{cjs/utils/enhances/WithCSS.js → utils/enhances/WithCSS.cjs} +1 -1
- package/lib/utils/enhances/WithCSS.cjs.map +1 -0
- package/lib/utils/enhances/WithCSS.mjs +6 -6
- package/lib/{cjs/utils/enhances/WithI18n.js → utils/enhances/WithI18n.cjs} +1 -1
- package/lib/utils/enhances/WithI18n.cjs.map +1 -0
- package/lib/utils/enhances/WithI18n.mjs +6 -6
- package/lib/utils/enhances/{WithKeyboardFocus.js → WithKeyboardFocus.cjs} +1 -1
- package/lib/utils/enhances/WithKeyboardFocus.cjs.map +1 -0
- package/lib/utils/enhances/WithKeyboardFocus.mjs +6 -6
- package/lib/{cjs/utils/enhances/WithRef.js → utils/enhances/WithRef.cjs} +1 -1
- package/lib/utils/enhances/WithRef.cjs.map +1 -0
- package/lib/utils/enhances/WithRef.mjs +1 -1
- package/lib/{cjs/utils/enhances/a11yEnhance.js → utils/enhances/a11yEnhance.cjs} +1 -1
- package/lib/utils/enhances/a11yEnhance.cjs.map +1 -0
- package/lib/utils/enhances/a11yEnhance.mjs +2 -2
- package/lib/utils/enhances/{animatedSizeEnhance.js → animatedSizeEnhance.cjs} +1 -1
- package/lib/utils/enhances/animatedSizeEnhance.cjs.map +1 -0
- package/lib/utils/enhances/animatedSizeEnhance.mjs +15 -15
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +1 -1
- package/lib/utils/enhances/{autoFocusEnhance.js → autoFocusEnhance.cjs} +1 -1
- package/lib/utils/enhances/autoFocusEnhance.cjs.map +1 -0
- package/lib/utils/enhances/autoFocusEnhance.mjs +2 -2
- package/lib/utils/enhances/{contextEnhance.js → contextEnhance.cjs} +1 -1
- package/lib/utils/enhances/contextEnhance.cjs.map +1 -0
- package/lib/utils/enhances/contextEnhance.mjs +4 -4
- package/lib/{cjs/utils/enhances/i18nEnhance.js → utils/enhances/i18nEnhance.cjs} +1 -1
- package/lib/utils/enhances/i18nEnhance.cjs.map +1 -0
- package/lib/utils/enhances/i18nEnhance.mjs +9 -9
- package/lib/utils/enhances/{keyboardFocusEnhance.js → keyboardFocusEnhance.cjs} +1 -1
- package/lib/utils/enhances/keyboardFocusEnhance.cjs.map +1 -0
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +1 -1
- package/lib/{cjs/utils/enhances/resolveColorEnhance.js → utils/enhances/resolveColorEnhance.cjs} +1 -1
- package/lib/utils/enhances/resolveColorEnhance.cjs.map +1 -0
- package/lib/{cjs/utils/eventEmitter.js → utils/eventEmitter.cjs} +1 -1
- package/lib/utils/eventEmitter.cjs.map +1 -0
- package/lib/utils/eventEmitter.mjs +3 -3
- package/lib/{cjs/utils/findComponent.js → utils/findComponent.cjs} +1 -1
- package/lib/utils/findComponent.cjs.map +1 -0
- package/lib/{cjs/utils/fire.js → utils/fire.cjs} +1 -1
- package/lib/utils/fire.cjs.map +1 -0
- package/lib/utils/focus-lock/{focusBorders.js → focusBorders.cjs} +1 -1
- package/lib/utils/focus-lock/focusBorders.cjs.map +1 -0
- package/lib/utils/focus-lock/{getFocusableIn.js → getFocusableIn.cjs} +1 -1
- package/lib/utils/focus-lock/getFocusableIn.cjs.map +1 -0
- package/lib/{cjs/utils/focus-lock/isFocusInside.js → utils/focus-lock/isFocusInside.cjs} +1 -1
- package/lib/utils/focus-lock/isFocusInside.cjs.map +1 -0
- package/lib/{cjs/utils/focus-lock/isFocusable.js → utils/focus-lock/isFocusable.cjs} +1 -1
- package/lib/utils/focus-lock/isFocusable.cjs.map +1 -0
- package/lib/utils/focus-lock/isFocusable.mjs +1 -1
- package/lib/utils/focus-lock/{setFocus.js → setFocus.cjs} +1 -1
- package/lib/utils/focus-lock/setFocus.cjs.map +1 -0
- package/lib/utils/{getAccessibleName.js → getAccessibleName.cjs} +1 -1
- package/lib/utils/getAccessibleName.cjs.map +1 -0
- package/lib/utils/getAccessibleName.mjs +1 -1
- package/lib/utils/{getDisplayName.js → getDisplayName.cjs} +1 -1
- package/lib/utils/getDisplayName.cjs.map +1 -0
- package/lib/{cjs/utils/getEventTarget.js → utils/getEventTarget.cjs} +1 -1
- package/lib/utils/getEventTarget.cjs.map +1 -0
- package/lib/utils/getEventTarget.mjs +1 -1
- package/lib/{cjs/utils/getOriginChildren.js → utils/getOriginChildren.cjs} +1 -1
- package/lib/utils/getOriginChildren.cjs.map +1 -0
- package/lib/{cjs/utils/getRandomInt.js → utils/getRandomInt.cjs} +1 -1
- package/lib/utils/getRandomInt.cjs.map +1 -0
- package/lib/{cjs/utils/getValue.js → utils/getValue.cjs} +1 -1
- package/lib/utils/getValue.cjs.map +1 -0
- package/lib/utils/{hasLabels.js → hasLabels.cjs} +1 -1
- package/lib/utils/hasLabels.cjs.map +1 -0
- package/lib/utils/hasLabels.mjs +1 -1
- package/lib/{cjs/utils/hasParent.js → utils/hasParent.cjs} +1 -1
- package/lib/utils/hasParent.cjs.map +1 -0
- package/lib/{cjs/utils/if.js → utils/if.cjs} +1 -1
- package/lib/utils/if.cjs.map +1 -0
- package/lib/utils/{ifChildren.js → ifChildren.cjs} +1 -1
- package/lib/utils/ifChildren.cjs.map +1 -0
- package/lib/{cjs/utils/injectStyle.js → utils/injectStyle.cjs} +1 -1
- package/lib/utils/injectStyle.cjs.map +1 -0
- package/lib/utils/injectStyle.mjs +1 -1
- package/lib/utils/{inputProps.js → inputProps.cjs} +1 -1
- package/lib/utils/inputProps.cjs.map +1 -0
- package/lib/utils/{isNode.js → isNode.cjs} +1 -1
- package/lib/utils/isNode.cjs.map +1 -0
- package/lib/utils/isNode.mjs +1 -1
- package/lib/utils/{isPromise.js → isPromise.cjs} +1 -1
- package/lib/utils/isPromise.cjs.map +1 -0
- package/lib/{cjs/utils/isRetina.js → utils/isRetina.cjs} +1 -1
- package/lib/utils/isRetina.cjs.map +1 -0
- package/lib/{cjs/utils/logger.js → utils/logger.cjs} +1 -1
- package/lib/utils/logger.cjs.map +1 -0
- package/lib/utils/logger.mjs +3 -3
- package/lib/utils/{numericChecker.js → numericChecker.cjs} +1 -1
- package/lib/utils/numericChecker.cjs.map +1 -0
- package/lib/utils/{ownerDocument.js → ownerDocument.cjs} +1 -1
- package/lib/utils/ownerDocument.cjs.map +1 -0
- package/lib/{cjs/utils/pick.js → utils/pick.cjs} +1 -1
- package/lib/utils/pick.cjs.map +1 -0
- package/lib/utils/{propsForElement.js → propsForElement.cjs} +1 -1
- package/lib/utils/propsForElement.cjs.map +1 -0
- package/lib/utils/propsForElement.mjs +1 -1
- package/lib/{cjs/utils/rafTrottle.js → utils/rafTrottle.cjs} +1 -1
- package/lib/utils/rafTrottle.cjs.map +1 -0
- package/lib/{cjs/utils/reactToText.js → utils/reactToText.cjs} +1 -1
- package/lib/utils/reactToText.cjs.map +1 -0
- package/lib/utils/{ref.js → ref.cjs} +1 -1
- package/lib/utils/ref.cjs.map +1 -0
- package/lib/utils/ref.mjs +2 -2
- package/lib/{cjs/utils/setRef.js → utils/setRef.cjs} +1 -1
- package/lib/utils/setRef.cjs.map +1 -0
- package/lib/{cjs/utils/syncScroll.js → utils/syncScroll.cjs} +1 -1
- package/lib/utils/syncScroll.cjs.map +1 -0
- package/lib/utils/syncScroll.mjs +1 -1
- package/lib/{cjs/utils/uncontroll.js → utils/uncontroll.cjs} +1 -1
- package/lib/utils/uncontroll.cjs.map +1 -0
- package/lib/utils/uncontroll.mjs +1 -1
- package/lib/{cjs/utils/uniqueID.js → utils/uniqueID.cjs} +1 -1
- package/lib/utils/uniqueID.cjs.map +1 -0
- package/lib/utils/uniqueID.mjs +2 -2
- package/lib/utils/use/{useColorResolver.js → useColorResolver.cjs} +1 -1
- package/lib/utils/use/useColorResolver.cjs.map +1 -0
- package/lib/utils/use/{useCss.js → useCss.cjs} +1 -1
- package/lib/utils/use/useCss.cjs.map +1 -0
- package/lib/utils/use/{useEnhancedEffect.js → useEnhancedEffect.cjs} +1 -1
- package/lib/utils/use/useEnhancedEffect.cjs.map +1 -0
- package/lib/utils/use/{useEventCallback.js → useEventCallback.cjs} +1 -1
- package/lib/utils/use/useEventCallback.cjs.map +1 -0
- package/lib/utils/use/{useEventListener.js → useEventListener.cjs} +1 -1
- package/lib/utils/use/useEventListener.cjs.map +1 -0
- package/lib/utils/use/{useFocusLock.js → useFocusLock.cjs} +1 -1
- package/lib/utils/use/useFocusLock.cjs.map +1 -0
- package/lib/utils/use/useFocusLock.mjs +2 -2
- package/lib/{cjs/utils/use/usePreventScroll.js → utils/use/usePreventScroll.cjs} +1 -1
- package/lib/utils/use/usePreventScroll.cjs.map +1 -0
- package/lib/utils/{useCssVariable.js → useCssVariable.cjs} +1 -1
- package/lib/utils/useCssVariable.cjs.map +1 -0
- package/lib/utils/useCssVariable.mjs +3 -3
- package/lib/utils/{zIndexStacking.js → zIndexStacking.cjs} +1 -1
- package/lib/utils/zIndexStacking.cjs.map +1 -0
- package/lib/utils/zIndexStacking.mjs +3 -3
- package/package.json +8 -9
- package/vite.config.ts +15 -0
- package/lib/cjs/LastInteractionType.js.map +0 -1
- package/lib/cjs/core-types/Component.js +0 -59
- package/lib/cjs/core-types/Component.js.map +0 -1
- package/lib/cjs/core-types/UnknownProperties.js +0 -2
- package/lib/cjs/core-types/UnknownProperties.js.map +0 -1
- package/lib/cjs/core-types/reshadow.d.js +0 -2
- package/lib/cjs/core-types/reshadow.d.js.map +0 -1
- package/lib/cjs/core-types/symbols.js +0 -25
- package/lib/cjs/core-types/symbols.js.map +0 -1
- package/lib/cjs/coreFactory.js.map +0 -1
- package/lib/cjs/enhancement/Children.js.map +0 -1
- package/lib/cjs/enhancement/Root.js +0 -78
- package/lib/cjs/enhancement/Root.js.map +0 -1
- package/lib/cjs/enhancement/bindHandler.js +0 -54
- package/lib/cjs/enhancement/bindHandler.js.map +0 -1
- package/lib/cjs/enhancement/dataName.js +0 -20
- package/lib/cjs/enhancement/dataName.js.map +0 -1
- package/lib/cjs/enhancement/enhance.js.map +0 -1
- package/lib/cjs/enhancement/functionDefaultProps.js +0 -36
- package/lib/cjs/enhancement/functionDefaultProps.js.map +0 -1
- package/lib/cjs/enhancement/hoistProps.js +0 -97
- package/lib/cjs/enhancement/hoistProps.js.map +0 -1
- package/lib/cjs/enhancement/i18n.js +0 -28
- package/lib/cjs/enhancement/i18n.js.map +0 -1
- package/lib/cjs/enhancement/inheritedName.js.map +0 -1
- package/lib/cjs/enhancement/staticChildren.js +0 -135
- package/lib/cjs/enhancement/staticChildren.js.map +0 -1
- package/lib/cjs/enhancement/style.js +0 -60
- package/lib/cjs/enhancement/style.js.map +0 -1
- package/lib/cjs/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/register.js.map +0 -1
- package/lib/cjs/styled/index.js.map +0 -1
- package/lib/cjs/styled/reshadow-core.js.map +0 -1
- package/lib/cjs/styled/sstyled.js +0 -149
- package/lib/cjs/styled/sstyled.js.map +0 -1
- package/lib/cjs/theme/dark.json +0 -2506
- package/lib/cjs/theme/exclude-tokens.json +0 -10
- package/lib/cjs/theme/light.json +0 -2584
- package/lib/cjs/theme/processor.js +0 -315
- package/lib/cjs/theme/processor.js.map +0 -1
- package/lib/cjs/theme/themes/auto.css +0 -1465
- package/lib/cjs/theme/themes/dark.css +0 -723
- package/lib/cjs/theme/themes/dark.js.map +0 -1
- package/lib/cjs/theme/themes/default.css +0 -742
- package/lib/cjs/theme/themes/default.js +0 -394
- package/lib/cjs/theme/themes/default.js.map +0 -1
- package/lib/cjs/theme/themes/light.css +0 -742
- package/lib/cjs/theme/themes/light.js.map +0 -1
- package/lib/cjs/theme/utils.js.map +0 -1
- package/lib/cjs/utils/CSSinJS.js.map +0 -1
- package/lib/cjs/utils/ScreenReaderOnly.js +0 -31
- package/lib/cjs/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/cjs/utils/ThemeProvider.js +0 -82
- package/lib/cjs/utils/ThemeProvider.js.map +0 -1
- package/lib/cjs/utils/addonText.js +0 -18
- package/lib/cjs/utils/addonText.js.map +0 -1
- package/lib/cjs/utils/addonTextChildren.js.map +0 -1
- package/lib/cjs/utils/ariaProps.js +0 -22
- package/lib/cjs/utils/ariaProps.js.map +0 -1
- package/lib/cjs/utils/assignProps.js.map +0 -1
- package/lib/cjs/utils/canUseDOM.js +0 -10
- package/lib/cjs/utils/canUseDOM.js.map +0 -1
- package/lib/cjs/utils/capitalizeFirstLetter.js +0 -10
- package/lib/cjs/utils/capitalizeFirstLetter.js.map +0 -1
- package/lib/cjs/utils/color.js +0 -208
- package/lib/cjs/utils/color.js.map +0 -1
- package/lib/cjs/utils/compose.js.map +0 -1
- package/lib/cjs/utils/createHoc.js.map +0 -1
- package/lib/cjs/utils/createUUID.js.map +0 -1
- package/lib/cjs/utils/cssToIntDefault.js +0 -22
- package/lib/cjs/utils/cssToIntDefault.js.map +0 -1
- package/lib/cjs/utils/enhances/WithAutoFocus.js +0 -75
- package/lib/cjs/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/cjs/utils/enhances/WithCSS.js.map +0 -1
- package/lib/cjs/utils/enhances/WithI18n.js.map +0 -1
- package/lib/cjs/utils/enhances/WithKeyboardFocus.js +0 -93
- package/lib/cjs/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/cjs/utils/enhances/WithRef.js.map +0 -1
- package/lib/cjs/utils/enhances/a11yEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/animatedSizeEnhance.js +0 -98
- package/lib/cjs/utils/enhances/animatedSizeEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/autoFocusEnhance.js +0 -46
- package/lib/cjs/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/contextEnhance.js +0 -22
- package/lib/cjs/utils/enhances/contextEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/i18nEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/keyboardFocusEnhance.js +0 -63
- package/lib/cjs/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/cjs/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/cjs/utils/eventEmitter.js.map +0 -1
- package/lib/cjs/utils/findComponent.js.map +0 -1
- package/lib/cjs/utils/fire.js.map +0 -1
- package/lib/cjs/utils/focus-lock/focusBorders.js +0 -72
- package/lib/cjs/utils/focus-lock/focusBorders.js.map +0 -1
- package/lib/cjs/utils/focus-lock/getFocusableIn.js +0 -26
- package/lib/cjs/utils/focus-lock/getFocusableIn.js.map +0 -1
- package/lib/cjs/utils/focus-lock/isFocusInside.js.map +0 -1
- package/lib/cjs/utils/focus-lock/isFocusable.js.map +0 -1
- package/lib/cjs/utils/focus-lock/setFocus.js +0 -63
- package/lib/cjs/utils/focus-lock/setFocus.js.map +0 -1
- package/lib/cjs/utils/getAccessibleName.js +0 -56
- package/lib/cjs/utils/getAccessibleName.js.map +0 -1
- package/lib/cjs/utils/getDisplayName.js +0 -10
- package/lib/cjs/utils/getDisplayName.js.map +0 -1
- package/lib/cjs/utils/getEventTarget.js.map +0 -1
- package/lib/cjs/utils/getOriginChildren.js.map +0 -1
- package/lib/cjs/utils/getRandomInt.js.map +0 -1
- package/lib/cjs/utils/getValue.js.map +0 -1
- package/lib/cjs/utils/hasLabels.js +0 -47
- package/lib/cjs/utils/hasLabels.js.map +0 -1
- package/lib/cjs/utils/hasParent.js.map +0 -1
- package/lib/cjs/utils/if.js.map +0 -1
- package/lib/cjs/utils/ifChildren.js +0 -17
- package/lib/cjs/utils/ifChildren.js.map +0 -1
- package/lib/cjs/utils/injectStyle.js.map +0 -1
- package/lib/cjs/utils/inputProps.js +0 -22
- package/lib/cjs/utils/inputProps.js.map +0 -1
- package/lib/cjs/utils/isNode.js +0 -28
- package/lib/cjs/utils/isNode.js.map +0 -1
- package/lib/cjs/utils/isPromise.js +0 -10
- package/lib/cjs/utils/isPromise.js.map +0 -1
- package/lib/cjs/utils/isRetina.js.map +0 -1
- package/lib/cjs/utils/logger.js.map +0 -1
- package/lib/cjs/utils/numericChecker.js +0 -33
- package/lib/cjs/utils/numericChecker.js.map +0 -1
- package/lib/cjs/utils/ownerDocument.js +0 -10
- package/lib/cjs/utils/ownerDocument.js.map +0 -1
- package/lib/cjs/utils/pick.js.map +0 -1
- package/lib/cjs/utils/propsForElement.js +0 -59
- package/lib/cjs/utils/propsForElement.js.map +0 -1
- package/lib/cjs/utils/rafTrottle.js.map +0 -1
- package/lib/cjs/utils/reactToText.js.map +0 -1
- package/lib/cjs/utils/ref.js +0 -95
- package/lib/cjs/utils/ref.js.map +0 -1
- package/lib/cjs/utils/setRef.js.map +0 -1
- package/lib/cjs/utils/syncScroll.js.map +0 -1
- package/lib/cjs/utils/uncontroll.js.map +0 -1
- package/lib/cjs/utils/uniqueID.js.map +0 -1
- package/lib/cjs/utils/use/useColorResolver.js +0 -208
- package/lib/cjs/utils/use/useColorResolver.js.map +0 -1
- package/lib/cjs/utils/use/useCss.js +0 -20
- package/lib/cjs/utils/use/useCss.js.map +0 -1
- package/lib/cjs/utils/use/useEnhancedEffect.js +0 -13
- package/lib/cjs/utils/use/useEnhancedEffect.js.map +0 -1
- package/lib/cjs/utils/use/useEventCallback.js +0 -25
- package/lib/cjs/utils/use/useEventCallback.js.map +0 -1
- package/lib/cjs/utils/use/useEventListener.js +0 -33
- package/lib/cjs/utils/use/useEventListener.js.map +0 -1
- package/lib/cjs/utils/use/useFocusLock.js +0 -289
- package/lib/cjs/utils/use/useFocusLock.js.map +0 -1
- package/lib/cjs/utils/use/usePreventScroll.js.map +0 -1
- package/lib/cjs/utils/useCssVariable.js +0 -55
- package/lib/cjs/utils/useCssVariable.js.map +0 -1
- package/lib/cjs/utils/zIndexStacking.js +0 -48
- package/lib/cjs/utils/zIndexStacking.js.map +0 -1
- package/lib/core-types/Component.js.map +0 -1
- package/lib/core-types/UnknownProperties.js +0 -2
- package/lib/core-types/UnknownProperties.js.map +0 -1
- package/lib/core-types/reshadow.d.js +0 -2
- package/lib/core-types/reshadow.d.js.map +0 -1
- package/lib/core-types/symbols.js.map +0 -1
- package/lib/enhancement/Children.js +0 -119
- package/lib/enhancement/Children.js.map +0 -1
- package/lib/enhancement/Root.js.map +0 -1
- package/lib/enhancement/bindHandler.js.map +0 -1
- package/lib/enhancement/dataName.js.map +0 -1
- package/lib/enhancement/enhance.js +0 -22
- package/lib/enhancement/enhance.js.map +0 -1
- package/lib/enhancement/functionDefaultProps.js.map +0 -1
- package/lib/enhancement/hoistProps.js.map +0 -1
- package/lib/enhancement/i18n.js.map +0 -1
- package/lib/enhancement/inheritedName.js +0 -23
- package/lib/enhancement/inheritedName.js.map +0 -1
- package/lib/enhancement/staticChildren.js.map +0 -1
- package/lib/enhancement/style.js.map +0 -1
- package/lib/enhancement/uncontrolledProps.js +0 -131
- package/lib/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/es6/LastInteractionType.js.map +0 -1
- package/lib/es6/core-types/Component.js +0 -54
- package/lib/es6/core-types/Component.js.map +0 -1
- package/lib/es6/core-types/UnknownProperties.js +0 -2
- package/lib/es6/core-types/UnknownProperties.js.map +0 -1
- package/lib/es6/core-types/reshadow.d.js +0 -2
- package/lib/es6/core-types/reshadow.d.js.map +0 -1
- package/lib/es6/core-types/symbols.js +0 -10
- package/lib/es6/core-types/symbols.js.map +0 -1
- package/lib/es6/coreFactory.js.map +0 -1
- package/lib/es6/enhancement/Children.js +0 -111
- package/lib/es6/enhancement/Children.js.map +0 -1
- package/lib/es6/enhancement/Root.js +0 -70
- package/lib/es6/enhancement/Root.js.map +0 -1
- package/lib/es6/enhancement/bindHandler.js +0 -47
- package/lib/es6/enhancement/bindHandler.js.map +0 -1
- package/lib/es6/enhancement/dataName.js +0 -12
- package/lib/es6/enhancement/dataName.js.map +0 -1
- package/lib/es6/enhancement/enhance.js +0 -15
- package/lib/es6/enhancement/enhance.js.map +0 -1
- package/lib/es6/enhancement/functionDefaultProps.js +0 -29
- package/lib/es6/enhancement/functionDefaultProps.js.map +0 -1
- package/lib/es6/enhancement/hoistProps.js +0 -88
- package/lib/es6/enhancement/hoistProps.js.map +0 -1
- package/lib/es6/enhancement/i18n.js +0 -20
- package/lib/es6/enhancement/i18n.js.map +0 -1
- package/lib/es6/enhancement/inheritedName.js +0 -15
- package/lib/es6/enhancement/inheritedName.js.map +0 -1
- package/lib/es6/enhancement/staticChildren.js +0 -123
- package/lib/es6/enhancement/staticChildren.js.map +0 -1
- package/lib/es6/enhancement/style.js +0 -51
- package/lib/es6/enhancement/style.js.map +0 -1
- package/lib/es6/enhancement/uncontrolledProps.js +0 -123
- package/lib/es6/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/es6/index.js.map +0 -1
- package/lib/es6/register.js +0 -29
- package/lib/es6/register.js.map +0 -1
- package/lib/es6/styled/index.js +0 -6
- package/lib/es6/styled/index.js.map +0 -1
- package/lib/es6/styled/reshadow-core.js +0 -243
- package/lib/es6/styled/reshadow-core.js.map +0 -1
- package/lib/es6/styled/sstyled.js +0 -142
- package/lib/es6/styled/sstyled.js.map +0 -1
- package/lib/es6/theme/dark.json +0 -2506
- package/lib/es6/theme/exclude-tokens.json +0 -10
- package/lib/es6/theme/light.json +0 -2584
- package/lib/es6/theme/processor.js +0 -307
- package/lib/es6/theme/processor.js.map +0 -1
- package/lib/es6/theme/themes/auto.css +0 -1465
- package/lib/es6/theme/themes/dark.css +0 -723
- package/lib/es6/theme/themes/dark.js +0 -378
- package/lib/es6/theme/themes/dark.js.map +0 -1
- package/lib/es6/theme/themes/default.css +0 -742
- package/lib/es6/theme/themes/default.js +0 -387
- package/lib/es6/theme/themes/default.js.map +0 -1
- package/lib/es6/theme/themes/light.css +0 -742
- package/lib/es6/theme/themes/light.js +0 -387
- package/lib/es6/theme/themes/light.js.map +0 -1
- package/lib/es6/theme/utils.js +0 -286
- package/lib/es6/theme/utils.js.map +0 -1
- package/lib/es6/utils/CSSinJS.js +0 -28
- package/lib/es6/utils/CSSinJS.js.map +0 -1
- package/lib/es6/utils/ScreenReaderOnly.js +0 -24
- package/lib/es6/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/es6/utils/ThemeProvider.js +0 -71
- package/lib/es6/utils/ThemeProvider.js.map +0 -1
- package/lib/es6/utils/addonText.js +0 -11
- package/lib/es6/utils/addonText.js.map +0 -1
- package/lib/es6/utils/addonTextChildren.js +0 -37
- package/lib/es6/utils/addonTextChildren.js.map +0 -1
- package/lib/es6/utils/ariaProps.js +0 -16
- package/lib/es6/utils/ariaProps.js.map +0 -1
- package/lib/es6/utils/assignProps.js +0 -84
- package/lib/es6/utils/assignProps.js.map +0 -1
- package/lib/es6/utils/canUseDOM.js +0 -4
- package/lib/es6/utils/canUseDOM.js.map +0 -1
- package/lib/es6/utils/capitalizeFirstLetter.js +0 -4
- package/lib/es6/utils/capitalizeFirstLetter.js.map +0 -1
- package/lib/es6/utils/color.js +0 -196
- package/lib/es6/utils/color.js.map +0 -1
- package/lib/es6/utils/compose.js +0 -15
- package/lib/es6/utils/compose.js.map +0 -1
- package/lib/es6/utils/createHoc.js +0 -46
- package/lib/es6/utils/createHoc.js.map +0 -1
- package/lib/es6/utils/createUUID.js +0 -9
- package/lib/es6/utils/createUUID.js.map +0 -1
- package/lib/es6/utils/cssToIntDefault.js +0 -16
- package/lib/es6/utils/cssToIntDefault.js.map +0 -1
- package/lib/es6/utils/enhances/WithAutoFocus.js +0 -67
- package/lib/es6/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/es6/utils/enhances/WithCSS.js +0 -79
- package/lib/es6/utils/enhances/WithCSS.js.map +0 -1
- package/lib/es6/utils/enhances/WithI18n.js +0 -83
- package/lib/es6/utils/enhances/WithI18n.js.map +0 -1
- package/lib/es6/utils/enhances/WithKeyboardFocus.js +0 -84
- package/lib/es6/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/es6/utils/enhances/WithRef.js +0 -18
- package/lib/es6/utils/enhances/WithRef.js.map +0 -1
- package/lib/es6/utils/enhances/a11yEnhance.js +0 -66
- package/lib/es6/utils/enhances/a11yEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/animatedSizeEnhance.js +0 -90
- package/lib/es6/utils/enhances/animatedSizeEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/autoFocusEnhance.js +0 -38
- package/lib/es6/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/contextEnhance.js +0 -14
- package/lib/es6/utils/enhances/contextEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/i18nEnhance.js +0 -92
- package/lib/es6/utils/enhances/i18nEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/keyboardFocusEnhance.js +0 -57
- package/lib/es6/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/es6/utils/enhances/resolveColorEnhance.js +0 -17
- package/lib/es6/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/es6/utils/eventEmitter.js +0 -34
- package/lib/es6/utils/eventEmitter.js.map +0 -1
- package/lib/es6/utils/findComponent.js +0 -95
- package/lib/es6/utils/findComponent.js.map +0 -1
- package/lib/es6/utils/fire.js +0 -15
- package/lib/es6/utils/fire.js.map +0 -1
- package/lib/es6/utils/focus-lock/focusBorders.js +0 -62
- package/lib/es6/utils/focus-lock/focusBorders.js.map +0 -1
- package/lib/es6/utils/focus-lock/getFocusableIn.js +0 -19
- package/lib/es6/utils/focus-lock/getFocusableIn.js.map +0 -1
- package/lib/es6/utils/focus-lock/isFocusInside.js +0 -9
- package/lib/es6/utils/focus-lock/isFocusInside.js.map +0 -1
- package/lib/es6/utils/focus-lock/isFocusable.js +0 -43
- package/lib/es6/utils/focus-lock/isFocusable.js.map +0 -1
- package/lib/es6/utils/focus-lock/setFocus.js +0 -55
- package/lib/es6/utils/focus-lock/setFocus.js.map +0 -1
- package/lib/es6/utils/getAccessibleName.js +0 -49
- package/lib/es6/utils/getAccessibleName.js.map +0 -1
- package/lib/es6/utils/getDisplayName.js +0 -4
- package/lib/es6/utils/getDisplayName.js.map +0 -1
- package/lib/es6/utils/getEventTarget.js +0 -45
- package/lib/es6/utils/getEventTarget.js.map +0 -1
- package/lib/es6/utils/getOriginChildren.js +0 -10
- package/lib/es6/utils/getOriginChildren.js.map +0 -1
- package/lib/es6/utils/getRandomInt.js +0 -5
- package/lib/es6/utils/getRandomInt.js.map +0 -1
- package/lib/es6/utils/getValue.js +0 -10
- package/lib/es6/utils/getValue.js.map +0 -1
- package/lib/es6/utils/hasLabels.js +0 -39
- package/lib/es6/utils/hasLabels.js.map +0 -1
- package/lib/es6/utils/hasParent.js +0 -7
- package/lib/es6/utils/hasParent.js.map +0 -1
- package/lib/es6/utils/if.js +0 -9
- package/lib/es6/utils/if.js.map +0 -1
- package/lib/es6/utils/ifChildren.js +0 -10
- package/lib/es6/utils/ifChildren.js.map +0 -1
- package/lib/es6/utils/injectStyle.js +0 -41
- package/lib/es6/utils/injectStyle.js.map +0 -1
- package/lib/es6/utils/inputProps.js +0 -14
- package/lib/es6/utils/inputProps.js.map +0 -1
- package/lib/es6/utils/isNode.js +0 -21
- package/lib/es6/utils/isNode.js.map +0 -1
- package/lib/es6/utils/isPromise.js +0 -4
- package/lib/es6/utils/isPromise.js.map +0 -1
- package/lib/es6/utils/isRetina.js +0 -9
- package/lib/es6/utils/isRetina.js.map +0 -1
- package/lib/es6/utils/logger.js +0 -32
- package/lib/es6/utils/logger.js.map +0 -1
- package/lib/es6/utils/numericChecker.js +0 -27
- package/lib/es6/utils/numericChecker.js.map +0 -1
- package/lib/es6/utils/ownerDocument.js +0 -4
- package/lib/es6/utils/ownerDocument.js.map +0 -1
- package/lib/es6/utils/pick.js +0 -13
- package/lib/es6/utils/pick.js.map +0 -1
- package/lib/es6/utils/propsForElement.js +0 -50
- package/lib/es6/utils/propsForElement.js.map +0 -1
- package/lib/es6/utils/rafTrottle.js +0 -26
- package/lib/es6/utils/rafTrottle.js.map +0 -1
- package/lib/es6/utils/reactToText.js +0 -26
- package/lib/es6/utils/reactToText.js.map +0 -1
- package/lib/es6/utils/ref.js +0 -83
- package/lib/es6/utils/ref.js.map +0 -1
- package/lib/es6/utils/setRef.js +0 -3
- package/lib/es6/utils/setRef.js.map +0 -1
- package/lib/es6/utils/syncScroll.js +0 -54
- package/lib/es6/utils/syncScroll.js.map +0 -1
- package/lib/es6/utils/uncontroll.js +0 -38
- package/lib/es6/utils/uncontroll.js.map +0 -1
- package/lib/es6/utils/uniqueID.js +0 -33
- package/lib/es6/utils/uniqueID.js.map +0 -1
- package/lib/es6/utils/use/useColorResolver.js +0 -200
- package/lib/es6/utils/use/useColorResolver.js.map +0 -1
- package/lib/es6/utils/use/useCss.js +0 -12
- package/lib/es6/utils/use/useCss.js.map +0 -1
- package/lib/es6/utils/use/useEnhancedEffect.js +0 -5
- package/lib/es6/utils/use/useEnhancedEffect.js.map +0 -1
- package/lib/es6/utils/use/useEventCallback.js +0 -19
- package/lib/es6/utils/use/useEventCallback.js.map +0 -1
- package/lib/es6/utils/use/useEventListener.js +0 -25
- package/lib/es6/utils/use/useEventListener.js.map +0 -1
- package/lib/es6/utils/use/useFocusLock.js +0 -266
- package/lib/es6/utils/use/useFocusLock.js.map +0 -1
- package/lib/es6/utils/use/usePreventScroll.js +0 -70
- package/lib/es6/utils/use/usePreventScroll.js.map +0 -1
- package/lib/es6/utils/useCssVariable.js +0 -46
- package/lib/es6/utils/useCssVariable.js.map +0 -1
- package/lib/es6/utils/zIndexStacking.js +0 -38
- package/lib/es6/utils/zIndexStacking.js.map +0 -1
- package/lib/esm/_virtual/_commonjsHelpers.mjs +0 -6
- package/lib/esm/_virtual/index.mjs +0 -4
- package/lib/esm/_virtual/index2.mjs +0 -4
- package/lib/esm/_virtual/react-is.development.mjs +0 -4
- package/lib/esm/_virtual/react-is.production.min.mjs +0 -4
- package/lib/register.js +0 -37
- package/lib/register.js.map +0 -1
- package/lib/styled/index.js +0 -32
- package/lib/styled/index.js.map +0 -1
- package/lib/styled/reshadow-core.js +0 -256
- package/lib/styled/reshadow-core.js.map +0 -1
- package/lib/styled/sstyled.js.map +0 -1
- package/lib/theme/processor.js.map +0 -1
- package/lib/theme/themes/dark.js +0 -385
- package/lib/theme/themes/dark.js.map +0 -1
- package/lib/theme/themes/default.js.map +0 -1
- package/lib/theme/themes/light.js +0 -394
- package/lib/theme/themes/light.js.map +0 -1
- package/lib/theme/utils.js +0 -297
- package/lib/theme/utils.js.map +0 -1
- package/lib/types/LastInteractionType.d.ts +0 -11
- package/lib/types/core-types/UnknownProperties.d.ts +0 -3
- package/lib/types/core-types/symbols.d.ts +0 -9
- package/lib/types/register.d.ts +0 -8
- package/lib/types/styled/index.d.ts +0 -11
- package/lib/types/styled/reshadow-core.d.ts +0 -37
- package/lib/types/styled/sstyled.d.ts +0 -17
- package/lib/types/theme/themes/default.d.ts +0 -387
- package/lib/types/utils/CSSinJS.d.ts +0 -5
- package/lib/types/utils/ScreenReaderOnly.d.ts +0 -8
- package/lib/types/utils/ThemeProvider.d.ts +0 -15
- package/lib/types/utils/addonText.d.ts +0 -2
- package/lib/types/utils/addonTextChildren.d.ts +0 -3
- package/lib/types/utils/ariaProps.d.ts +0 -12
- package/lib/types/utils/assignProps.d.ts +0 -11
- package/lib/types/utils/canUseDOM.d.ts +0 -1
- package/lib/types/utils/capitalizeFirstLetter.d.ts +0 -1
- package/lib/types/utils/color.d.ts +0 -5
- package/lib/types/utils/compose.d.ts +0 -1
- package/lib/types/utils/createHoc.d.ts +0 -3
- package/lib/types/utils/createUUID.d.ts +0 -1
- package/lib/types/utils/cssToIntDefault.d.ts +0 -8
- package/lib/types/utils/enhances/WithAutoFocus.d.ts +0 -14
- package/lib/types/utils/enhances/WithCSS.d.ts +0 -41
- package/lib/types/utils/enhances/WithI18n.d.ts +0 -43
- package/lib/types/utils/enhances/WithKeyboardFocus.d.ts +0 -45
- package/lib/types/utils/enhances/WithRef.d.ts +0 -3
- package/lib/types/utils/enhances/a11yEnhance.d.ts +0 -10
- package/lib/types/utils/enhances/animatedSizeEnhance.d.ts +0 -12
- package/lib/types/utils/enhances/autoFocusEnhance.d.ts +0 -10
- package/lib/types/utils/enhances/contextEnhance.d.ts +0 -3
- package/lib/types/utils/enhances/i18nEnhance.d.ts +0 -25
- package/lib/types/utils/enhances/keyboardFocusEnhance.d.ts +0 -27
- package/lib/types/utils/enhances/resolveColorEnhance.d.ts +0 -2
- package/lib/types/utils/eventEmitter.d.ts +0 -9
- package/lib/types/utils/findComponent.d.ts +0 -12
- package/lib/types/utils/fire.d.ts +0 -2
- package/lib/types/utils/focus-lock/focusBorders.d.ts +0 -4
- package/lib/types/utils/focus-lock/getFocusableIn.d.ts +0 -1
- package/lib/types/utils/focus-lock/isFocusInside.d.ts +0 -1
- package/lib/types/utils/focus-lock/isFocusable.d.ts +0 -1
- package/lib/types/utils/focus-lock/setFocus.d.ts +0 -1
- package/lib/types/utils/getAccessibleName.d.ts +0 -1
- package/lib/types/utils/getDisplayName.d.ts +0 -2
- package/lib/types/utils/getEventTarget.d.ts +0 -1
- package/lib/types/utils/getOriginChildren.d.ts +0 -2
- package/lib/types/utils/getRandomInt.d.ts +0 -1
- package/lib/types/utils/getValue.d.ts +0 -1
- package/lib/types/utils/hasLabels.d.ts +0 -7
- package/lib/types/utils/hasParent.d.ts +0 -1
- package/lib/types/utils/if.d.ts +0 -11
- package/lib/types/utils/ifChildren.d.ts +0 -8
- package/lib/types/utils/injectStyle.d.ts +0 -2
- package/lib/types/utils/inputProps.d.ts +0 -2
- package/lib/types/utils/isNode.d.ts +0 -1
- package/lib/types/utils/isPromise.d.ts +0 -1
- package/lib/types/utils/isRetina.d.ts +0 -1
- package/lib/types/utils/logger.d.ts +0 -9
- package/lib/types/utils/numericChecker.d.ts +0 -5
- package/lib/types/utils/ownerDocument.d.ts +0 -1
- package/lib/types/utils/pick.d.ts +0 -1
- package/lib/types/utils/propsForElement.d.ts +0 -3
- package/lib/types/utils/rafTrottle.d.ts +0 -2
- package/lib/types/utils/reactToText.d.ts +0 -3
- package/lib/types/utils/ref.d.ts +0 -8
- package/lib/types/utils/setRef.d.ts +0 -2
- package/lib/types/utils/syncScroll.d.ts +0 -1
- package/lib/types/utils/uncontroll.d.ts +0 -4
- package/lib/types/utils/uniqueID.d.ts +0 -12
- package/lib/types/utils/use/useColorResolver.d.ts +0 -1
- package/lib/types/utils/use/useCss.d.ts +0 -4
- package/lib/types/utils/use/useEnhancedEffect.d.ts +0 -3
- package/lib/types/utils/use/useEventCallback.d.ts +0 -4
- package/lib/types/utils/use/useEventListener.d.ts +0 -2
- package/lib/types/utils/use/useFocusLock.d.ts +0 -10
- package/lib/types/utils/use/usePreventScroll.d.ts +0 -2
- package/lib/types/utils/useCssVariable.d.ts +0 -8
- package/lib/types/utils/zIndexStacking.d.ts +0 -8
- package/lib/utils/CSSinJS.js +0 -36
- package/lib/utils/CSSinJS.js.map +0 -1
- package/lib/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/utils/ThemeProvider.js.map +0 -1
- package/lib/utils/addonText.js.map +0 -1
- package/lib/utils/addonTextChildren.js +0 -45
- package/lib/utils/addonTextChildren.js.map +0 -1
- package/lib/utils/ariaProps.js.map +0 -1
- package/lib/utils/assignProps.js +0 -93
- package/lib/utils/assignProps.js.map +0 -1
- package/lib/utils/canUseDOM.js.map +0 -1
- package/lib/utils/capitalizeFirstLetter.js.map +0 -1
- package/lib/utils/color.js.map +0 -1
- package/lib/utils/compose.js +0 -21
- package/lib/utils/compose.js.map +0 -1
- package/lib/utils/createHoc.js +0 -55
- package/lib/utils/createHoc.js.map +0 -1
- package/lib/utils/createUUID.js +0 -15
- package/lib/utils/createUUID.js.map +0 -1
- package/lib/utils/cssToIntDefault.js.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/utils/enhances/WithCSS.js +0 -93
- package/lib/utils/enhances/WithCSS.js.map +0 -1
- package/lib/utils/enhances/WithI18n.js +0 -95
- package/lib/utils/enhances/WithI18n.js.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/utils/enhances/WithRef.js +0 -26
- package/lib/utils/enhances/WithRef.js.map +0 -1
- package/lib/utils/enhances/a11yEnhance.js +0 -74
- package/lib/utils/enhances/a11yEnhance.js.map +0 -1
- package/lib/utils/enhances/animatedSizeEnhance.js.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/utils/enhances/contextEnhance.js.map +0 -1
- package/lib/utils/enhances/i18nEnhance.js +0 -101
- package/lib/utils/enhances/i18nEnhance.js.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/utils/enhances/resolveColorEnhance.js +0 -25
- package/lib/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/utils/eventEmitter.js +0 -41
- package/lib/utils/eventEmitter.js.map +0 -1
- package/lib/utils/findComponent.js +0 -106
- package/lib/utils/findComponent.js.map +0 -1
- package/lib/utils/fire.js +0 -23
- package/lib/utils/fire.js.map +0 -1
- package/lib/utils/focus-lock/focusBorders.js.map +0 -1
- package/lib/utils/focus-lock/getFocusableIn.js.map +0 -1
- package/lib/utils/focus-lock/isFocusInside.js +0 -16
- package/lib/utils/focus-lock/isFocusInside.js.map +0 -1
- package/lib/utils/focus-lock/isFocusable.js +0 -51
- package/lib/utils/focus-lock/isFocusable.js.map +0 -1
- package/lib/utils/focus-lock/setFocus.js.map +0 -1
- package/lib/utils/getAccessibleName.js.map +0 -1
- package/lib/utils/getDisplayName.js.map +0 -1
- package/lib/utils/getEventTarget.js +0 -53
- package/lib/utils/getEventTarget.js.map +0 -1
- package/lib/utils/getOriginChildren.js +0 -18
- package/lib/utils/getOriginChildren.js.map +0 -1
- package/lib/utils/getRandomInt.js +0 -11
- package/lib/utils/getRandomInt.js.map +0 -1
- package/lib/utils/getValue.js +0 -16
- package/lib/utils/getValue.js.map +0 -1
- package/lib/utils/hasLabels.js.map +0 -1
- package/lib/utils/hasParent.js +0 -14
- package/lib/utils/hasParent.js.map +0 -1
- package/lib/utils/if.js +0 -16
- package/lib/utils/if.js.map +0 -1
- package/lib/utils/ifChildren.js.map +0 -1
- package/lib/utils/injectStyle.js +0 -49
- package/lib/utils/injectStyle.js.map +0 -1
- package/lib/utils/inputProps.js.map +0 -1
- package/lib/utils/isNode.js.map +0 -1
- package/lib/utils/isPromise.js.map +0 -1
- package/lib/utils/isRetina.js +0 -15
- package/lib/utils/isRetina.js.map +0 -1
- package/lib/utils/logger.js +0 -40
- package/lib/utils/logger.js.map +0 -1
- package/lib/utils/numericChecker.js.map +0 -1
- package/lib/utils/ownerDocument.js.map +0 -1
- package/lib/utils/pick.js +0 -19
- package/lib/utils/pick.js.map +0 -1
- package/lib/utils/propsForElement.js.map +0 -1
- package/lib/utils/rafTrottle.js +0 -33
- package/lib/utils/rafTrottle.js.map +0 -1
- package/lib/utils/reactToText.js +0 -33
- package/lib/utils/reactToText.js.map +0 -1
- package/lib/utils/ref.js.map +0 -1
- package/lib/utils/setRef.js +0 -10
- package/lib/utils/setRef.js.map +0 -1
- package/lib/utils/syncScroll.js +0 -61
- package/lib/utils/syncScroll.js.map +0 -1
- package/lib/utils/uncontroll.js +0 -47
- package/lib/utils/uncontroll.js.map +0 -1
- package/lib/utils/uniqueID.js +0 -42
- package/lib/utils/uniqueID.js.map +0 -1
- package/lib/utils/use/useColorResolver.js.map +0 -1
- package/lib/utils/use/useCss.js.map +0 -1
- package/lib/utils/use/useEnhancedEffect.js.map +0 -1
- package/lib/utils/use/useEventCallback.js.map +0 -1
- package/lib/utils/use/useEventListener.js.map +0 -1
- package/lib/utils/use/useFocusLock.js.map +0 -1
- package/lib/utils/use/usePreventScroll.js +0 -78
- package/lib/utils/use/usePreventScroll.js.map +0 -1
- package/lib/utils/useCssVariable.js.map +0 -1
- package/lib/utils/zIndexStacking.js.map +0 -1
- /package/lib/{types/core-types → core-types}/Component.d.ts +0 -0
- /package/lib/{types/coreFactory.d.ts → coreFactory.d.ts} +0 -0
- /package/lib/{types/enhancement → enhancement}/Children.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/Root.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/bindHandler.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/dataName.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/enhance.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/functionDefaultProps.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/hoistProps.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/i18n.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/inheritedName.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/staticChildren.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/style.d.ts +0 -0
- /package/lib/{types/enhancement → enhancement}/uncontrolledProps.d.ts +0 -0
- /package/lib/{types/index.d.ts → index.d.ts} +0 -0
- /package/lib/{types/theme → theme}/processor.d.ts +0 -0
- /package/lib/{types/theme → theme}/themes/dark.d.ts +0 -0
- /package/lib/{types/theme → theme}/themes/light.d.ts +0 -0
- /package/lib/{types/theme → theme}/utils.d.ts +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
import { PureComponent } from 'react';
|
|
8
|
-
import { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';
|
|
9
|
-
|
|
10
|
-
/** @deprecated */
|
|
11
|
-
|
|
12
|
-
var Root = undefined;
|
|
13
|
-
export { Root };
|
|
14
|
-
|
|
15
|
-
/** @deprecated */
|
|
16
|
-
var RootComponent = /*#__PURE__*/function (_PureComponent) {
|
|
17
|
-
_inherits(RootComponent, _PureComponent);
|
|
18
|
-
var _super = _createSuper(RootComponent);
|
|
19
|
-
function RootComponent() {
|
|
20
|
-
var _this;
|
|
21
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
|
-
args[_key] = arguments[_key];
|
|
23
|
-
}
|
|
24
|
-
_classCallCheck(this, RootComponent);
|
|
25
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26
|
-
_defineProperty(_assertThisInitialized(_this), "Root", undefined);
|
|
27
|
-
_defineProperty(_assertThisInitialized(_this), "isControlled", false);
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
_createClass(RootComponent, [{
|
|
31
|
-
key: "handlers",
|
|
32
|
-
get: function get() {
|
|
33
|
-
return {};
|
|
34
|
-
}
|
|
35
|
-
}, {
|
|
36
|
-
key: "asProps",
|
|
37
|
-
get: function get() {
|
|
38
|
-
return {};
|
|
39
|
-
}
|
|
40
|
-
}]);
|
|
41
|
-
return RootComponent;
|
|
42
|
-
}(PureComponent);
|
|
43
|
-
export var Component = RootComponent;
|
|
44
|
-
/** @deprecated */
|
|
45
|
-
|
|
46
|
-
export var Intergalactic;
|
|
47
|
-
(function (_Intergalactic) {
|
|
48
|
-
var InternalTypings;
|
|
49
|
-
(function (_InternalTypings) {})(InternalTypings || (InternalTypings = _Intergalactic.InternalTypings || (_Intergalactic.InternalTypings = {})));
|
|
50
|
-
})(Intergalactic || (Intergalactic = {}));
|
|
51
|
-
export var wrapIntergalacticComponent = function wrapIntergalacticComponent(wrapper) {
|
|
52
|
-
return wrapper;
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=Component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","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_COM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AA,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownProperties.js","names":[],"sources":["../../../src/core-types/UnknownProperties.ts"],"sourcesContent":["export type UnknownProperties = {\n [key: string]: unknown;\n};\n"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
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":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export var CORE_COMPONENT = Symbol('CORE_COMPONENT');
|
|
2
|
-
export var CORE_INSTANCE = Symbol('CORE_INSTANCE');
|
|
3
|
-
export var CORE_AS_PROPS = Symbol('CORE_AS_PROPS');
|
|
4
|
-
export var CORE_INIT = Symbol('CORE_INIT');
|
|
5
|
-
export var CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');
|
|
6
|
-
export var CREATE_COMPONENT = Symbol('CREATE_COMPONENT');
|
|
7
|
-
export var PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');
|
|
8
|
-
export var CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');
|
|
9
|
-
export var INHERITED_NAME = Symbol('INHERITED_NAME');
|
|
10
|
-
//# sourceMappingURL=symbols.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.js","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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreFactory.js","names":["React","hoistNonReactStatics","useForkRef","useEnhancedEffect","_assignProps","Component","childrenEnhancement","rootEnhancement","uncontrolledPropsEnhancement","functionDefaultPropsEnhancement","staticChildrenEnhancement","STATIC_COMPONENT","ROOT_COMPONENT","getterMethodNameByDisplayName","inheritedNameEnhancement","hoistPropsEnhancement","dataNameEnhancement","enhanceEnhancement","styleEnhancement","bindHandlerEnhancement","i18nAppLocaleEnhance","CORE_AS_PROPS","CORE_INIT","PARENT_COMPONENTS","CORE_INSTANCE","CORE_COMPONENT","CREATE_COMPONENT","CONTEXT_COMPONENT","isEmptyObject","obj","Object","getOwnPropertyNames","length","getOwnPropertySymbols","getPrototypeOf","prototype","createGetField","enhancements","isFunction","getField","key","filter","enhancement","condition","reduce","acc","item","push","createForwardWrapper","wrapperProps","statics","RootComponent","getterMethodName","displayName","getterMethod","undefined","useGetterIndex","WrapperForwardRefWithBind","_ref","ref","_ref$forwardRef","forwardRef","other","_objectWithoutProperties","_excluded","createElement","BindingWrapper","_extends","WrapperForwardRef","_ref2","_ref2$forwardRef","__WRAPPER_PROPS_BIND__","_excluded2","_reduce","WrapperComponent","_reduce$ref","enhancementRef","props","_excluded3","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","value","render","_this2","map","fn","bind","defaultProps","forEach","assign","wrapClass","OriginComponent","Context","inits","renders","contexts","_OriginComponent2","_super2","context","_this3","get","_this4","Error","setContext","_this5","contextProps","_get","_getPrototypeOf","_this6","asProps","ctx","Provider","_objectSpread","wrapFunction","memo","FunctionMemoComponent","selfRef","useRef","firstRender","current","wrapCore","_ref3","Root","createComposeComponent","PureComponent","isPrototypeOf","assignProps","p1","p2","createComponent","childComponents","options","_options$context","createContext","_options$parent","parent","_options$enhancements","parents","isArray","wholeFamily","_toConsumableArray","f","_______childrenComponents","_OriginComponent","_childComponents","_options","createBaseComponent"],"sources":["../../src/coreFactory.tsx"],"sourcesContent":["import React, { ForwardRefExoticComponent, RefAttributes } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nimport { useForkRef } from './utils/ref';\nimport useEnhancedEffect from './utils/use/useEnhancedEffect';\nimport _assignProps from './utils/assignProps';\n\nimport { Component, PropsWithRenderFnChildren } from './core-types/Component';\n\nimport childrenEnhancement from './enhancement/Children';\nimport rootEnhancement from './enhancement/Root';\nimport uncontrolledPropsEnhancement from './enhancement/uncontrolledProps';\nimport functionDefaultPropsEnhancement from './enhancement/functionDefaultProps';\nimport staticChildrenEnhancement, {\n STATIC_COMPONENT,\n ROOT_COMPONENT,\n getterMethodNameByDisplayName,\n} from './enhancement/staticChildren';\nimport inheritedNameEnhancement from './enhancement/inheritedName';\nimport hoistPropsEnhancement from './enhancement/hoistProps';\nimport dataNameEnhancement from './enhancement/dataName';\nimport enhanceEnhancement from './enhancement/enhance';\nimport styleEnhancement from './enhancement/style';\nimport bindHandlerEnhancement from './enhancement/bindHandler';\nimport i18nAppLocaleEnhance from './enhancement/i18n';\nimport {\n CORE_AS_PROPS,\n CORE_INIT,\n PARENT_COMPONENTS,\n CORE_INSTANCE,\n CORE_COMPONENT,\n CREATE_COMPONENT,\n CONTEXT_COMPONENT,\n CHILDREN_COMPONENT,\n INHERITED_NAME,\n} from './core-types/symbols';\n\nfunction isEmptyObject(obj: any) {\n return (\n Object.getOwnPropertyNames(obj).length === 0 &&\n Object.getOwnPropertySymbols && // For IE 11\n Object.getOwnPropertySymbols(obj).length === 0 &&\n Object.getPrototypeOf(obj) === Object.prototype\n );\n}\n\nfunction createGetField(enhancements: any, Component: any, isFunction: boolean) {\n return function getField(key: string) {\n return enhancements\n .filter((enhancement: any) => {\n if (!enhancement.condition) {\n return true;\n }\n return enhancement.condition(Component, isFunction);\n })\n .reduce((acc: any, item: any) => {\n if (item[key]) {\n acc.push(item[key]);\n }\n return acc;\n }, []);\n };\n}\n\nfunction createForwardWrapper(Component: any, wrapperProps: any, statics: any, isFunction: any) {\n const RootComponent = Component[ROOT_COMPONENT];\n const getterMethodName = getterMethodNameByDisplayName(Component?.displayName);\n const getterMethod = RootComponent?.prototype\n ? RootComponent.prototype[getterMethodName]\n : undefined;\n const useGetterIndex = getterMethod?.length >= 2;\n\n function WrapperForwardRefWithBind({ forwardRef = null, ...other }, ref: any) {\n return <BindingWrapper {...other} forwardRef={useForkRef(ref, forwardRef)} />;\n }\n\n function WrapperForwardRef(\n { forwardRef = null, __WRAPPER_PROPS_BIND__, ...other }: any,\n ref: any,\n ) {\n const { ref: enhancementRef = null, ...props } = (\n __WRAPPER_PROPS_BIND__ || wrapperProps\n ).reduce((acc: any, enhancement: any) => enhancement(acc, WrapperComponent, isFunction), other);\n return <Component {...props} forwardRef={useForkRef(enhancementRef, ref, forwardRef)} />;\n }\n\n class BindingWrapper extends React.Component<any> {\n index = -1;\n render() {\n return (\n <WrapperForwardRef\n {...this.props}\n __WRAPPER_PROPS_BIND__={wrapperProps.map((fn: any) => fn.bind(this))}\n />\n );\n }\n }\n\n const WrapperComponent = React.forwardRef(\n useGetterIndex ? WrapperForwardRefWithBind : WrapperForwardRef,\n );\n\n hoistNonReactStatics(WrapperComponent, Component);\n\n WrapperComponent.displayName = Component.displayName;\n // TODO: defaultProps is only empty\n WrapperComponent.defaultProps = Component.defaultProps;\n // STATIC\n statics.forEach((enhancement: any) =>\n Object.assign(WrapperComponent, enhancement(WrapperComponent, Component, isFunction)),\n );\n\n return WrapperComponent;\n}\n\nfunction wrapClass(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, false);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n class Component extends OriginComponent {\n [CORE_AS_PROPS] = null;\n [CORE_INSTANCE] = WrapperComponent;\n [CORE_INIT] = false;\n\n constructor(props: any, context: any) {\n super(props, context);\n // INITS\n inits.forEach((enhancement: any) => enhancement.call(this, props, WrapperComponent, false));\n this[CORE_INIT] = true;\n }\n\n get asProps() {\n // TODO if not production\n if (!this[CORE_INIT]) {\n throw new Error('Can not call asProps in constructor');\n }\n if (!this[CORE_AS_PROPS]) {\n // PROPS\n this[CORE_AS_PROPS] = props.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n this.props,\n );\n }\n return this[CORE_AS_PROPS];\n }\n\n setContext() {\n const contextProps = super.setContext ? super.setContext() : {};\n // CONTEXT\n return contexts.reduce(\n (acc: any, enhancement: any) => enhancement.call(this, acc, WrapperComponent, false),\n contextProps,\n );\n }\n\n render() {\n this[CORE_AS_PROPS] = null;\n // TODO if not production\n if (!super.render) {\n throw new Error('Component `render` method is not defined');\n }\n const asProps: any = this.asProps;\n const ctx = this.setContext();\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(this, acc, asProps, WrapperComponent, false),\n super.render(),\n );\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n }\n }\n\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, false);\n return WrapperComponent;\n}\n\nfunction wrapFunction(OriginComponent: any, enhancements: any, Context: any) {\n const getField = createGetField(enhancements, OriginComponent, true);\n\n const inits = getField('init');\n const props = getField('asProps');\n const renders = getField('render');\n const statics = getField('static');\n const wrapperProps = getField('wrapperProps');\n const contexts = getField('context');\n\n const Component = React.memo(function FunctionMemoComponent(other) {\n const selfRef = React.useRef({});\n const firstRender = React.useRef(true);\n useEnhancedEffect(() => {\n firstRender.current = false;\n }, []);\n if (firstRender.current) {\n // INITS\n inits.forEach((enhancement: any) =>\n enhancement.call(selfRef.current, other, WrapperComponent, true),\n );\n }\n // PROPS\n const asProps = props.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n other,\n );\n // CONTEXT\n const ctx = contexts.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, WrapperComponent, true),\n {},\n );\n\n // RENDER\n const render = renders.reduce(\n (acc: any, enhancement: any) =>\n enhancement.call(selfRef.current, acc, asProps, WrapperComponent, true),\n <OriginComponent {...asProps} />,\n );\n\n if (!WrapperComponent[STATIC_COMPONENT] && !isEmptyObject(ctx)) {\n return <Context.Provider value={{ ...asProps, ...ctx }}>{render}</Context.Provider>;\n } else {\n return render;\n }\n });\n Object.assign(Component, OriginComponent);\n const WrapperComponent: any = createForwardWrapper(Component, wrapperProps, statics, true);\n return WrapperComponent;\n}\n\nfunction wrapCore(OriginComponent: any, enhancements: any, Context: any) {\n const Component = function ({ Root }: any) {\n const defaultProps = OriginComponent.defaultProps || {};\n return <Root {...defaultProps} render={OriginComponent} />;\n };\n hoistNonReactStatics(Component, OriginComponent);\n Component.displayName = OriginComponent.displayName;\n return wrapFunction(Component, enhancements, Context);\n}\n\nfunction createComposeComponent(OriginComponent: any, Context: any, enhancements: any): any {\n if (\n React.PureComponent.isPrototypeOf(OriginComponent) ||\n React.Component.isPrototypeOf(OriginComponent)\n ) {\n if (OriginComponent.prototype instanceof Component) {\n return wrapClass(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must inherit from our component');\n }\n } else if (typeof OriginComponent === 'function') {\n return wrapFunction(OriginComponent, enhancements, Context);\n } else if (OriginComponent[CORE_COMPONENT]) {\n return wrapCore(OriginComponent, enhancements, Context);\n } else {\n throw new Error('Must be a React component');\n }\n}\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\ninterface ClassWithUncontrolledProps<Props> {\n uncontrolledProps(): unknown;\n}\n\nexport function assignProps(p1: any, p2: any) {\n return _assignProps(p2, p1);\n}\n\nfunction createComponent<ComponentProps, ChildComponentProps = {}, ContextType = {}, FNType = null>(\n OriginComponent: any,\n childComponents: any = {},\n options: {\n context?: React.Context<ContextType>;\n parent?: ComponentType<unknown> | ComponentType<unknown>[];\n enhancements?: [any];\n } = {},\n): ComponentType<\n ComponentProps extends Component<infer Props> ? Props : ComponentProps,\n ChildComponentProps,\n ContextType,\n ComponentProps extends ClassWithUncontrolledProps<any>\n ? ReturnType<ComponentProps['uncontrolledProps']>\n : { [key: string]: (arg: unknown) => void },\n FNType\n> {\n const {\n context = React.createContext<ContextType>({} as ContextType),\n parent = [],\n enhancements = [],\n } = options;\n let parents = Array.isArray(parent) ? parent : [parent];\n if (parents.length) {\n const wholeFamily = parents.reduce((acc: any, parent: any) => {\n if (parent[PARENT_COMPONENTS]) {\n acc = [...parent[PARENT_COMPONENTS], ...acc];\n }\n return acc;\n }, parents);\n OriginComponent[PARENT_COMPONENTS] = wholeFamily;\n parents = wholeFamily;\n }\n if (OriginComponent[CORE_COMPONENT]) {\n parents.push(OriginComponent);\n }\n const Component = createComposeComponent(OriginComponent, context, [\n // @ts-ignore\n ...enhancements.map((f) => f(context, parents, createComponent, childComponents)),\n i18nAppLocaleEnhance(),\n bindHandlerEnhancement(),\n childrenEnhancement(context, parents),\n // root must be under the children\n rootEnhancement(),\n uncontrolledPropsEnhancement(),\n staticChildrenEnhancement(childComponents, createComponent, {\n context,\n parent,\n enhancements,\n }),\n // functionDefaultProps must be under the staticChild\n functionDefaultPropsEnhancement(),\n // inheritedName must be under the staticChild\n inheritedNameEnhancement(),\n // dataName must be under the staticChild\n dataNameEnhancement(),\n // enhanceEnhancement must be under the functionDefaultPropsEnhancement\n enhanceEnhancement(),\n styleEnhancement(childComponents, context),\n // must be the last one so any properties can be raised\n hoistPropsEnhancement(childComponents, context),\n ]);\n Component[CONTEXT_COMPONENT] = context;\n Component._______childrenComponents = childComponents;\n Component[CREATE_COMPONENT] = function (\n _OriginComponent = OriginComponent,\n _childComponents = childComponents,\n _options = options,\n ) {\n return createComponent(_OriginComponent, _childComponents, _options);\n };\n Component[CORE_COMPONENT] = true;\n return Component;\n}\n\nfunction createBaseComponent<ComponentProps>(OriginComponent: any): ComponentType<ComponentProps> {\n let Component = null;\n if (\n !React.PureComponent.isPrototypeOf(OriginComponent) &&\n !React.Component.isPrototypeOf(OriginComponent) &&\n typeof OriginComponent === 'function'\n ) {\n Component = React.forwardRef(OriginComponent);\n Component.displayName = OriginComponent.displayName;\n Component.defaultProps = {\n 'data-ui-name': OriginComponent.displayName,\n ...OriginComponent.defaultProps,\n };\n (Component as any)[CORE_COMPONENT] = true;\n } else {\n throw new Error('createBaseComponent accepts only functional component');\n }\n return Component as any;\n}\n\nexport { createComponent, createBaseComponent };\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAoD,OAAO;AACvE,OAAOC,oBAAoB,MAAM,yBAAyB;AAE1D,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,iBAAiB,MAAM,+BAA+B;AAC7D,OAAOC,YAAY,MAAM,qBAAqB;AAE9C,SAASC,SAAS,QAAmC,wBAAwB;AAE7E,OAAOC,mBAAmB,MAAM,wBAAwB;AACxD,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,4BAA4B,MAAM,iCAAiC;AAC1E,OAAOC,+BAA+B,MAAM,oCAAoC;AAChF,OAAOC,yBAAyB,IAC9BC,gBAAgB,EAChBC,cAAc,EACdC,6BAA6B,QACxB,8BAA8B;AACrC,OAAOC,wBAAwB,MAAM,6BAA6B;AAClE,OAAOC,qBAAqB,MAAM,0BAA0B;AAC5D,OAAOC,mBAAmB,MAAM,wBAA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Ae,CAACc,gBAAgB,EAAEC,gBAAgB,EAAEC,QAAQ,CAAC;EACtE,CAAC;EACD3J,SAAS,CAACoB,cAAc,CAAC,GAAG,IAAI;EAChC,OAAOpB,SAAS;AAClB;AAEA,SAAS4J,mBAAmBA,CAAiBvD,eAAoB,EAAiC;EAChG,IAAIrG,SAAS,GAAG,IAAI;EACpB,IACE,CAACL,KAAK,CAAC2I,aAAa,CAACC,aAAa,CAAClC,eAAe,CAAC,IACnD,CAAC1G,KAAK,CAACK,SAAS,CAACuI,aAAa,CAAClC,eAAe,CAAC,IAC/C,OAAOA,eAAe,KAAK,UAAU,EACrC;IACArG,SAAS,gBAAGL,KAAK,CAAC6D,UAAU,CAAC6C,eAAe,CAAC;IAC7CrG,SAAS,CAACgD,WAAW,GAAGqD,eAAe,CAACrD,WAAW;IACnDhD,SAAS,CAACiG,YAAY,GAAAyB,aAAA;MACpB,cAAc,EAAErB,eAAe,CAACrD;IAAW,GACxCqD,eAAe,CAACJ,YAAY,CAChC;IACAjG,SAAS,CAASoB,cAAc,CAAC,GAAG,IAAI;EAC3C,CAAC,MAAM;IACL,MAAM,IAAI4F,KAAK,CAAC,uDAAuD,CAAC;EAC1E;EACA,OAAOhH,SAAS;AAClB;AAEA,SAAS2I,eAAe,EAAEiB,mBAAmB"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
4
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
-
var _excluded = ["handlers", "getters"],
|
|
6
|
-
_excluded2 = ["handlers"];
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import { CONTEXT_COMPONENT, CHILDREN_COMPONENT } from '../core-types/symbols';
|
|
9
|
-
var CHILDREN_SELF = Symbol('CHILDREN_SELF');
|
|
10
|
-
var GETTER_REG = /^get[\w]+Props$/;
|
|
11
|
-
function splitPropsAndGetters(props) {
|
|
12
|
-
return Object.entries(props).reduce(function (acc, _ref) {
|
|
13
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
14
|
-
key = _ref2[0],
|
|
15
|
-
value = _ref2[1];
|
|
16
|
-
if (GETTER_REG.exec(key) === null) {
|
|
17
|
-
acc.props[key] = value;
|
|
18
|
-
} else {
|
|
19
|
-
acc.getters[key] = value;
|
|
20
|
-
}
|
|
21
|
-
return acc;
|
|
22
|
-
}, {
|
|
23
|
-
props: {},
|
|
24
|
-
getters: {}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function getterToArray(getter) {
|
|
28
|
-
if (!Array.isArray(getter)) {
|
|
29
|
-
return typeof getter === 'function' ? [getter] : [];
|
|
30
|
-
}
|
|
31
|
-
return getter;
|
|
32
|
-
}
|
|
33
|
-
function mergeObjects() {
|
|
34
|
-
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
35
|
-
var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
36
|
-
var core = _objectSpread(_objectSpread({}, a), b);
|
|
37
|
-
return Object.keys(core).reduce(function (acc, key) {
|
|
38
|
-
a[key] = getterToArray(a[key]);
|
|
39
|
-
b[key] = getterToArray(b[key]);
|
|
40
|
-
acc[key] = [].concat(_toConsumableArray(a[key]), _toConsumableArray(b[key]));
|
|
41
|
-
return acc;
|
|
42
|
-
}, {});
|
|
43
|
-
}
|
|
44
|
-
function assignGettersChain(getters) {
|
|
45
|
-
return function () {
|
|
46
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
47
|
-
return getters.reduce(function (acc, getter) {
|
|
48
|
-
return getter(acc);
|
|
49
|
-
}, props);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function createChildren(Context, contexts) {
|
|
53
|
-
var Children = function Children() {
|
|
54
|
-
var children = Children.origin;
|
|
55
|
-
if (typeof children === 'function') {
|
|
56
|
-
var _reduce = [].concat(_toConsumableArray(contexts), [Context]).reduce(function (acc, ctx) {
|
|
57
|
-
var _ref3 = React.useContext(ctx),
|
|
58
|
-
handlers = _ref3.handlers,
|
|
59
|
-
propsAndGetters = _objectWithoutProperties(_ref3, _excluded2);
|
|
60
|
-
var _splitPropsAndGetters = splitPropsAndGetters(propsAndGetters),
|
|
61
|
-
props = _splitPropsAndGetters.props,
|
|
62
|
-
getters = _splitPropsAndGetters.getters;
|
|
63
|
-
return Object.assign({}, acc, _objectSpread({
|
|
64
|
-
handlers: Object.assign({}, acc.handlers, handlers),
|
|
65
|
-
getters: mergeObjects(acc.getters, getters)
|
|
66
|
-
}, props));
|
|
67
|
-
}, Children.props),
|
|
68
|
-
_reduce$handlers = _reduce.handlers,
|
|
69
|
-
handlers = _reduce$handlers === void 0 ? {} : _reduce$handlers,
|
|
70
|
-
_reduce$getters = _reduce.getters,
|
|
71
|
-
getters = _reduce$getters === void 0 ? {} : _reduce$getters,
|
|
72
|
-
props = _objectWithoutProperties(_reduce, _excluded);
|
|
73
|
-
var mergedGetters = Object.entries(getters).reduce(function (acc, _ref4) {
|
|
74
|
-
var _ref5 = _slicedToArray(_ref4, 2),
|
|
75
|
-
key = _ref5[0],
|
|
76
|
-
value = _ref5[1];
|
|
77
|
-
acc[key] = assignGettersChain(value);
|
|
78
|
-
return acc;
|
|
79
|
-
}, {});
|
|
80
|
-
return children(_objectSpread(_objectSpread({}, props), mergedGetters), handlers);
|
|
81
|
-
} else if (children === undefined) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return children;
|
|
85
|
-
};
|
|
86
|
-
Children.origin = null;
|
|
87
|
-
Children.props = {};
|
|
88
|
-
Children[CHILDREN_COMPONENT] = true;
|
|
89
|
-
return Children;
|
|
90
|
-
}
|
|
91
|
-
function Enhancement(Context, parent) {
|
|
92
|
-
return {
|
|
93
|
-
init: function init() {
|
|
94
|
-
var contexts = (Array.isArray(parent) ? parent : [parent]).map(function (component) {
|
|
95
|
-
return component[CONTEXT_COMPONENT];
|
|
96
|
-
}).filter(Boolean);
|
|
97
|
-
this[CHILDREN_SELF] = createChildren(Context, contexts);
|
|
98
|
-
},
|
|
99
|
-
asProps: function asProps(props) {
|
|
100
|
-
// TODO: learn the reason what it was used for (by lsroman)
|
|
101
|
-
// this[CHILDREN_SELF].origin = _Children ? _Children.origin : children;
|
|
102
|
-
this[CHILDREN_SELF].origin = props.children;
|
|
103
|
-
this[CHILDREN_SELF].props = props;
|
|
104
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
105
|
-
Children: this[CHILDREN_SELF]
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
export default Enhancement;
|
|
111
|
-
//# sourceMappingURL=Children.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Children.js","names":["React","CONTEXT_COMPONENT","CHILDREN_COMPONENT","CHILDREN_SELF","Symbol","GETTER_REG","splitPropsAndGetters","props","Object","entries","reduce","acc","_ref","_ref2","_slicedToArray","key","value","exec","getters","getterToArray","getter","Array","isArray","mergeObjects","a","arguments","length","undefined","b","core","_objectSpread","keys","concat","_toConsumableArray","assignGettersChain","createChildren","Context","contexts","Children","children","origin","_reduce","ctx","_ref3","useContext","handlers","propsAndGetters","_objectWithoutProperties","_excluded2","_splitPropsAndGetters","assign","_reduce$handlers","_reduce$getters","_excluded","mergedGetters","_ref4","_ref5","Enhancement","parent","init","map","component","filter","Boolean","asProps"],"sources":["../../../src/enhancement/Children.tsx"],"sourcesContent":["import React from 'react';\nimport { CONTEXT_COMPONENT, CHILDREN_COMPONENT } from '../core-types/symbols';\n\nconst CHILDREN_SELF = Symbol('CHILDREN_SELF');\n\nconst GETTER_REG = /^get[\\w]+Props$/;\n\nfunction splitPropsAndGetters(props: any) {\n return Object.entries(props).reduce(\n (acc: any, [key, value]) => {\n if (GETTER_REG.exec(key) === null) {\n acc.props[key] = value;\n } else {\n acc.getters[key] = value;\n }\n return acc;\n },\n { props: {}, getters: {} },\n );\n}\n\nfunction getterToArray(getter: any) {\n if (!Array.isArray(getter)) {\n return typeof getter === 'function' ? [getter] : [];\n }\n return getter;\n}\n\nfunction mergeObjects(a: any = {}, b: any = {}) {\n const core = { ...a, ...b };\n return Object.keys(core).reduce((acc: any, key) => {\n a[key] = getterToArray(a[key]);\n b[key] = getterToArray(b[key]);\n acc[key] = [...a[key], ...b[key]];\n return acc;\n }, {});\n}\n\nfunction assignGettersChain(getters: Array<Function>) {\n return function (props = {}) {\n return getters.reduce((acc, getter) => {\n return getter(acc);\n }, props);\n };\n}\n\nfunction createChildren(Context: any, contexts: any) {\n const Children: any = function () {\n const children = Children.origin;\n if (typeof children === 'function') {\n const {\n handlers = {},\n getters = {},\n ...props\n } = [...contexts, Context].reduce((acc, ctx) => {\n const { handlers, ...propsAndGetters } = React.useContext(ctx) as any;\n const { props, getters } = splitPropsAndGetters(propsAndGetters);\n return Object.assign({}, acc, {\n handlers: Object.assign({}, acc.handlers, handlers),\n getters: mergeObjects(acc.getters, getters),\n ...props,\n });\n }, Children.props);\n\n const mergedGetters = Object.entries(getters).reduce((acc: any, [key, value]) => {\n acc[key] = assignGettersChain(value as []);\n return acc;\n }, {});\n\n return children({ ...props, ...mergedGetters }, handlers);\n } else if (children === undefined) {\n return null;\n }\n return children;\n };\n Children.origin = null;\n Children.props = {};\n Children[CHILDREN_COMPONENT] = true;\n return Children;\n}\n\nfunction Enhancement(this: any, Context: any, parent: any) {\n return {\n init: function (this: any) {\n const contexts = (Array.isArray(parent) ? parent : [parent])\n .map((component) => component[CONTEXT_COMPONENT])\n .filter(Boolean);\n this[CHILDREN_SELF] = createChildren(Context, contexts);\n },\n asProps: function (this: any, props: any) {\n // TODO: learn the reason what it was used for (by lsroman)\n // this[CHILDREN_SELF].origin = _Children ? _Children.origin : children;\n this[CHILDREN_SELF].origin = props.children;\n this[CHILDREN_SELF].props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from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["render"],
|
|
5
|
-
_excluded2 = ["Root", "styles", "children", "Children", "forwardRef"];
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import assignProps from '../utils/assignProps';
|
|
8
|
-
import { useForkRef } from '../utils/ref';
|
|
9
|
-
function createRootRender() {
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
var Root = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12
|
-
var Tag = _ref.render,
|
|
13
|
-
source = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
var _Root$props = Root.props,
|
|
15
|
-
_Root = _Root$props.Root,
|
|
16
|
-
styles = _Root$props.styles,
|
|
17
|
-
children = _Root$props.children,
|
|
18
|
-
Children = _Root$props.Children,
|
|
19
|
-
_Root$props$forwardRe = _Root$props.forwardRef,
|
|
20
|
-
forwardRef = _Root$props$forwardRe === void 0 ? null : _Root$props$forwardRe,
|
|
21
|
-
props = _objectWithoutProperties(_Root$props, _excluded2);
|
|
22
|
-
var clearProps = Object.entries(props).reduce(function (props, _ref2) {
|
|
23
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
24
|
-
name = _ref3[0],
|
|
25
|
-
value = _ref3[1];
|
|
26
|
-
if (value !== undefined) {
|
|
27
|
-
props[name] = value;
|
|
28
|
-
}
|
|
29
|
-
return props;
|
|
30
|
-
}, {});
|
|
31
|
-
var child = {};
|
|
32
|
-
// TODO: need to find better check solution (by lsroman)
|
|
33
|
-
if (typeof Children.origin !== 'undefined') {
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
child.children = /*#__PURE__*/React.createElement(Children, null);
|
|
36
|
-
}
|
|
37
|
-
var other = assignProps(_objectSpread(_objectSpread({}, clearProps), {}, {
|
|
38
|
-
ref: useForkRef(forwardRef, ref)
|
|
39
|
-
}), _objectSpread(_objectSpread({}, child), source));
|
|
40
|
-
if (!Tag) {
|
|
41
|
-
throw new Error('`render` prop of Root is not provided');
|
|
42
|
-
}
|
|
43
|
-
if (Tag === React.Fragment) return /*#__PURE__*/React.createElement(React.Fragment, null, other.children);
|
|
44
|
-
return /*#__PURE__*/React.createElement(Tag, other);
|
|
45
|
-
});
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
Root.props = {};
|
|
48
|
-
return Root;
|
|
49
|
-
}
|
|
50
|
-
function Enhancement() {
|
|
51
|
-
return {
|
|
52
|
-
init: function init() {
|
|
53
|
-
this.Root = createRootRender();
|
|
54
|
-
},
|
|
55
|
-
asProps: function asProps(props, WrapperComponent, isFunction) {
|
|
56
|
-
if (isFunction) {
|
|
57
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
58
|
-
Root: this.Root
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return props;
|
|
62
|
-
},
|
|
63
|
-
render: function render(_render, props) {
|
|
64
|
-
this.Root.props = props;
|
|
65
|
-
return _render;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export default Enhancement;
|
|
70
|
-
//# sourceMappingURL=Root.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Root.js","names":["React","assignProps","useForkRef","createRootRender","Root","forwardRef","_ref","ref","Tag","render","source","_objectWithoutProperties","_excluded","_Root$props","props","_Root","styles","children","Children","_Root$props$forwardRe","_excluded2","clearProps","Object","entries","reduce","_ref2","_ref3","_slicedToArray","name","value","undefined","child","origin","createElement","other","_objectSpread","Error","Fragment","Enhancement","init","asProps","WrapperComponent","isFunction"],"sources":["../../../src/enhancement/Root.tsx"],"sourcesContent":["import React from 'react';\nimport assignProps from '../utils/assignProps';\nimport { useForkRef } from '../utils/ref';\n\nfunction createRootRender() {\n // @ts-ignore\n const Root = React.forwardRef(function ({ render: Tag, ...source }, ref) {\n const {\n Root: _Root,\n\n styles,\n\n children,\n Children,\n forwardRef = null,\n ...props\n // @ts-ignore\n } = Root.props;\n\n const clearProps = Object.entries(props).reduce((props: any, [name, value]) => {\n if (value !== undefined) {\n props[name] = value;\n }\n return props;\n }, {});\n\n const child = {};\n // TODO: need to find better check solution (by lsroman)\n if (typeof Children.origin !== 'undefined') {\n // @ts-ignore\n child.children = <Children />;\n }\n\n const other = assignProps(\n {\n ...clearProps,\n ref: useForkRef(forwardRef, ref),\n },\n {\n ...child,\n ...source,\n },\n );\n if (!Tag) {\n throw new Error('`render` prop of Root is not provided');\n }\n if (Tag === React.Fragment) return <React.Fragment>{other.children}</React.Fragment>;\n\n return <Tag {...other} />;\n });\n // @ts-ignore\n Root.props = {};\n return Root;\n}\n\nfunction Enhancement() {\n return {\n init: function (this: any) {\n this.Root = createRootRender();\n },\n asProps: function (this: any, props: any, WrapperComponent: any, isFunction: boolean) {\n if (isFunction) {\n return {\n ...props,\n Root: this.Root,\n };\n }\n return props;\n },\n render: function (this: any, render: any, props: any) {\n this.Root.props = props;\n return render;\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,gBAAgBA,CAAA,EAAG;EAC1B;EACA,IAAMC,IAAI,gBAAGJ,KAAK,CAACK,UAAU,CAAC,UAAAC,IAAA,EAAsCC,GAAG,EAAE;IAAA,IAAvBC,GAAG,GAAAF,IAAA,CAAXG,MAAM;MAAUC,MAAM,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;IAC9D,IAAAC,WAAA,GAUIT,IAAI,CAACU,KAAK;MATNC,KAAK,GAAAF,WAAA,CAAXT,IAAI;MAEJY,MAAM,GAAAH,WAAA,CAANG,MAAM;MAENC,QAAQ,GAAAJ,WAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,WAAA,CAARK,QAAQ;MAAAC,qBAAA,GAAAN,WAAA,CACRR,UAAU;MAAVA,UAAU,GA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C,WAAWA,CAAA,EAAG;EACrB,OAAO;IACLC,IAAI,EAAE,SAAAA,KAAA,EAAqB;MACzB,IAAI,CAACnC,IAAI,GAAGD,gBAAgB,EAAE;IAChC,CAAC;IACDqC,OAAO,EAAE,SAAAA,QAAqB1B,KAAU,EAAE2B,gBAAqB,EAAEC,UAAmB,EAAE;MACpF,IAAIA,UAAU,EAAE;QACd,OAAAP,aAAA,CAAAA,aAAA,KACKrB,KAAK;UACRV,IAAI,EAAE,IAAI,CAACA;QAAI;MAEnB;MACA,OAAOU,KAAK;IACd,CAAC;IACDL,MAAM,EAAE,SAAAA,OAAqBA,OAAW,EAAEK,KAAU,EAAE;MACpD,IAAI,CAACV,IAAI,CAACU,KAAK,GAAGA,KAAK;MACvB,OAAOL,OAAM;IACf;EACF,CAAC;AACH;AAEA,eAAe6B,WAAW"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
function arraysEqual(a, b) {
|
|
2
|
-
if (a.length !== b.length) return false;
|
|
3
|
-
for (var i = 0; i < a.length; i++) {
|
|
4
|
-
if (a[i] !== b[i]) return false;
|
|
5
|
-
}
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
function handlerBinder(fn) {
|
|
9
|
-
return function () {
|
|
10
|
-
for (var _len = arguments.length, depsArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11
|
-
depsArgs[_key] = arguments[_key];
|
|
12
|
-
}
|
|
13
|
-
var memoizeds = [];
|
|
14
|
-
if (handlerBinder.hasher.has(fn)) {
|
|
15
|
-
memoizeds = handlerBinder.hasher.get(fn);
|
|
16
|
-
var memoized = memoizeds.find(function (memoized) {
|
|
17
|
-
return arraysEqual(memoized.deps, depsArgs);
|
|
18
|
-
});
|
|
19
|
-
if (memoized) return memoized.fn;
|
|
20
|
-
}
|
|
21
|
-
var bindFn = fn.apply(void 0, depsArgs).bind(fn);
|
|
22
|
-
memoizeds.push({
|
|
23
|
-
deps: depsArgs,
|
|
24
|
-
fn: bindFn
|
|
25
|
-
});
|
|
26
|
-
handlerBinder.hasher.set(fn, memoizeds);
|
|
27
|
-
return bindFn;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
handlerBinder.hasher = new WeakMap();
|
|
31
|
-
function Enhancement() {
|
|
32
|
-
return {
|
|
33
|
-
condition: function condition(Component, isFunction) {
|
|
34
|
-
return !isFunction;
|
|
35
|
-
},
|
|
36
|
-
init: function init() {
|
|
37
|
-
var _this = this;
|
|
38
|
-
Object.keys(this).filter(function (field) {
|
|
39
|
-
return field.startsWith('bindHandler');
|
|
40
|
-
}).forEach(function (name) {
|
|
41
|
-
_this[name] = handlerBinder(_this[name].bind(_this));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export default Enhancement;
|
|
47
|
-
//# sourceMappingURL=bindHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bindHandler.js","names":["arraysEqual","a","b","length","i","handlerBinder","fn","_len","arguments","depsArgs","Array","_key","memoizeds","hasher","has","get","memoized","find","deps","bindFn","apply","bind","push","set","WeakMap","Enhancement","condition","Component","isFunction","init","_this","Object","keys","filter","field","startsWith","forEach","name"],"sources":["../../../src/enhancement/bindHandler.tsx"],"sourcesContent":["function arraysEqual(a: any, b: any) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n}\n\nfunction handlerBinder(fn: any) {\n return function (...depsArgs: any[]) {\n let memoizeds = [];\n if (handlerBinder.hasher.has(fn)) {\n memoizeds = handlerBinder.hasher.get(fn);\n const memoized = memoizeds.find((memoized: any) => arraysEqual(memoized.deps, depsArgs));\n if (memoized) return memoized.fn;\n }\n\n const bindFn = fn(...depsArgs).bind(fn);\n memoizeds.push({\n deps: depsArgs,\n fn: bindFn,\n });\n handlerBinder.hasher.set(fn, memoizeds);\n return bindFn;\n };\n}\n\nhandlerBinder.hasher = new WeakMap();\n\nfunction Enhancement() {\n return {\n condition: function (Component: any, isFunction: boolean) {\n return !isFunction;\n },\n init: function (this: any) {\n Object.keys(this)\n .filter((field) => field.startsWith('bindHandler'))\n .forEach((name) => {\n this[name] = handlerBinder(this[name].bind(this));\n });\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":"AAAA,SAASA,WAAWA,CAACC,CAAM,EAAEC,CAAM,EAAE;EACnC,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE,OAAO,KAAK;EACvC,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,CAAC,CAACE,MAAM,EAAEC,CAAC,EAAE,EAAE;IACjC,IAAIH,CAAC,CAACG,CAAC,CAAC,KAAKF,CAAC,CAACE,CAAC,CAAC,EAAE,OAAO,KAAK;EACjC;EACA,OAAO,IAAI;AACb;AAEA,SAASC,aAAaA,CAACC,EAAO,EAAE;EAC9B,OAAO,YAA8B;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAL,MAAA,EAAjBM,QAAQ,OAAAC,KAAA,CAAAH,IAAA,GAAAI,IAAA,MAAAA,IAAA,GAAAJ,IAAA,EAAAI,IAAA;MAARF,QAAQ,CAAAE,IAAA,IAAAH,SAAA,CAAAG,IAAA;IAAA;IAC1B,IAAIC,SAAS,GAAG,EAAE;IAClB,IAAIP,aAAa,CAACQ,MAAM,CAACC,GAAG,CAACR,EAAE,CAAC,EAAE;MAChCM,SAAS,GAAGP,aAAa,CAACQ,MAAM,CAACE,GAAG,CAACT,EAAE,CAAC;MACxC,IAAMU,QAAQ,GAAGJ,SAAS,CAACK,IAAI,CAAC,UAACD,QAAa;QAAA,OAAKhB,WAAW,CAACgB,QAAQ,CAACE,IAAI,EAAET,QAAQ,CAAC;MAAA,EAAC;MACxF,IAAIO,QAAQ,EAAE,OAAOA,QAAQ,CAACV,EAAE;IAClC;IAEA,IAAMa,MAAM,GAAGb,EAAE,CAAAc,KAAA,SAAIX,QAAQ,CAAC,CAACY,IAAI,CAACf,EAAE,CAAC;IACvCM,SAAS,CAACU,IAAI,CAAC;MACbJ,IAAI,EAAET,QAAQ;MACdH,EAAE,EAAEa;IACN,CAAC,CAAC;IACFd,aAAa,CAACQ,MAAM,CAACU,GAAG,CAACjB,EAAE,EAAEM,SAAS,CAAC;IACvC,OAAOO,MAAM;EACf,CAAC;AACH;AAEAd,aAAa,CAACQ,MAAM,GAAG,IAAIW,OAAO,EAAE;AAEpC,SAASC,WAAWA,CAAA,EAAG;EACrB,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAEC,UAAmB,EAAE;MACxD,OAAO,CAACA,UAAU;IACpB,CAAC;IACDC,IAAI,EAAE,SAAAA,KAAA,EAAqB;MAAA,IAAAC,KAAA;MACzBC,MAAM,CAACC,IAAI,CAAC,IAAI,CAAC,CACdC,MAAM,CAAC,UAACC,KAAK;QAAA,OAAKA,KAAK,CAACC,UAAU,CAAC,aAAa,CAAC;MAAA,EAAC,CAClDC,OAAO,CAAC,UAACC,IAAI,EAAK;QACjBP,KAAI,CAACO,IAAI,CAAC,GAAGhC,aAAa,CAACyB,KAAI,CAACO,IAAI,CAAC,CAAChB,IAAI,CAACS,KAAI,CAAC,CAAC;MACnD,CAAC,CAAC;IACN;EACF,CAAC;AACH;AAEA,eAAeL,WAAW"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
-
function Enhancement() {
|
|
3
|
-
return {
|
|
4
|
-
wrapperProps: function wrapperProps(props, WrapperComponent) {
|
|
5
|
-
return _objectSpread({
|
|
6
|
-
'data-ui-name': WrapperComponent.displayName
|
|
7
|
-
}, props);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export default Enhancement;
|
|
12
|
-
//# sourceMappingURL=dataName.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataName.js","names":["Enhancement","wrapperProps","props","WrapperComponent","_objectSpread","displayName"],"sources":["../../../src/enhancement/dataName.tsx"],"sourcesContent":["function Enhancement() {\n return {\n wrapperProps: function (props: any, WrapperComponent: any) {\n return {\n 'data-ui-name': WrapperComponent.displayName,\n ...props,\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";AAAA,SAASA,WAAWA,CAAA,EAAG;EACrB,OAAO;IACLC,YAAY,EAAE,SAAAA,aAAUC,KAAU,EAAEC,gBAAqB,EAAE;MACzD,OAAAC,aAAA;QACE,cAAc,EAAED,gBAAgB,CAACE;MAAW,GACzCH,KAAK;IAEZ;EACF,CAAC;AACH;AAEA,eAAeF,WAAW"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
function Enhancement() {
|
|
2
|
-
return {
|
|
3
|
-
condition: function condition(Component) {
|
|
4
|
-
var _Component$enhance;
|
|
5
|
-
return Boolean((_Component$enhance = Component.enhance) === null || _Component$enhance === void 0 ? void 0 : _Component$enhance.length);
|
|
6
|
-
},
|
|
7
|
-
wrapperProps: function wrapperProps(props, WrapperComponent) {
|
|
8
|
-
return WrapperComponent.enhance.reduce(function (acc, enhance) {
|
|
9
|
-
return enhance(acc);
|
|
10
|
-
}, props);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export default Enhancement;
|
|
15
|
-
//# sourceMappingURL=enhance.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhance.js","names":["Enhancement","condition","Component","_Component$enhance","Boolean","enhance","length","wrapperProps","props","WrapperComponent","reduce","acc"],"sources":["../../../src/enhancement/enhance.tsx"],"sourcesContent":["function Enhancement() {\n return {\n condition: function (Component: any) {\n return Boolean(Component.enhance?.length);\n },\n wrapperProps: function (props: any, WrapperComponent: any) {\n return WrapperComponent.enhance.reduce((acc: any, enhance: any) => enhance(acc), props);\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":"AAAA,SAASA,WAAWA,CAAA,EAAG;EACrB,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAE;MAAA,IAAAC,kBAAA;MACnC,OAAOC,OAAO,EAAAD,kBAAA,GAACD,SAAS,CAACG,OAAO,cAAAF,kBAAA,uBAAjBA,kBAAA,CAAmBG,MAAM,CAAC;IAC3C,CAAC;IACDC,YAAY,EAAE,SAAAA,aAAUC,KAAU,EAAEC,gBAAqB,EAAE;MACzD,OAAOA,gBAAgB,CAACJ,OAAO,CAACK,MAAM,CAAC,UAACC,GAAQ,EAAEN,OAAY;QAAA,OAAKA,OAAO,CAACM,GAAG,CAAC;MAAA,GAAEH,KAAK,CAAC;IACzF;EACF,CAAC;AACH;AAEA,eAAeR,WAAW"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
function Enhancement() {
|
|
2
|
-
var defaultProps = {};
|
|
3
|
-
return {
|
|
4
|
-
condition: function condition(Component) {
|
|
5
|
-
if (!Component.defaultProps) {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
if (typeof Component.defaultProps === 'function') {
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
return Boolean(Object.keys(Component.defaultProps).length);
|
|
12
|
-
},
|
|
13
|
-
"static": function _static(WrapperComponent) {
|
|
14
|
-
defaultProps = WrapperComponent.defaultProps;
|
|
15
|
-
return {
|
|
16
|
-
defaultProps: {}
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
wrapperProps: function wrapperProps(props) {
|
|
20
|
-
if (typeof defaultProps === 'function') {
|
|
21
|
-
// TODO: optimization
|
|
22
|
-
return Object.assign({}, defaultProps(props), props);
|
|
23
|
-
}
|
|
24
|
-
return Object.assign({}, defaultProps, props);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export default Enhancement;
|
|
29
|
-
//# sourceMappingURL=functionDefaultProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functionDefaultProps.js","names":["Enhancement","defaultProps","condition","Component","Boolean","Object","keys","length","_static","WrapperComponent","wrapperProps","props","assign"],"sources":["../../../src/enhancement/functionDefaultProps.tsx"],"sourcesContent":["function Enhancement() {\n let defaultProps = {};\n return {\n condition: function (Component: any) {\n if (!Component.defaultProps) {\n return false;\n }\n if (typeof Component.defaultProps === 'function') {\n return true;\n }\n return Boolean(Object.keys(Component.defaultProps).length);\n },\n static: function (WrapperComponent: any) {\n defaultProps = WrapperComponent.defaultProps;\n return {\n defaultProps: {},\n };\n },\n wrapperProps: function (props: any) {\n if (typeof defaultProps === 'function') {\n // TODO: optimization\n return Object.assign({}, defaultProps(props), props);\n }\n return Object.assign({}, defaultProps, props);\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":"AAAA,SAASA,WAAWA,CAAA,EAAG;EACrB,IAAIC,YAAY,GAAG,CAAC,CAAC;EACrB,OAAO;IACLC,SAAS,EAAE,SAAAA,UAAUC,SAAc,EAAE;MACnC,IAAI,CAACA,SAAS,CAACF,YAAY,EAAE;QAC3B,OAAO,KAAK;MACd;MACA,IAAI,OAAOE,SAAS,CAACF,YAAY,KAAK,UAAU,EAAE;QAChD,OAAO,IAAI;MACb;MACA,OAAOG,OAAO,CAACC,MAAM,CAACC,IAAI,CAACH,SAAS,CAACF,YAAY,CAAC,CAACM,MAAM,CAAC;IAC5D,CAAC;IACD,UAAQ,SAAAC,QAAUC,gBAAqB,EAAE;MACvCR,YAAY,GAAGQ,gBAAgB,CAACR,YAAY;MAC5C,OAAO;QACLA,YAAY,EAAE,CAAC;MACjB,CAAC;IACH,CAAC;IACDS,YAAY,EAAE,SAAAA,aAAUC,KAAU,EAAE;MAClC,IAAI,OAAOV,YAAY,KAAK,UAAU,EAAE;QACtC;QACA,OAAOI,MAAM,CAACO,MAAM,CAAC,CAAC,CAAC,EAAEX,YAAY,CAACU,KAAK,CAAC,EAAEA,KAAK,CAAC;MACtD;MACA,OAAON,MAAM,CAACO,MAAM,CAAC,CAAC,CAAC,EAAEX,YAAY,EAAEU,KAAK,CAAC;IAC/C;EACF,CAAC;AACH;AAEA,eAAeX,WAAW"}
|