@semcore/core 16.0.0-prerelease.4 → 16.0.0-prerelease.7
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/LastInteractionType.cjs +57 -0
- package/lib/LastInteractionType.cjs.map +1 -0
- package/lib/LastInteractionType.d.ts +1 -1
- package/lib/LastInteractionType.mjs +51 -0
- package/lib/core-types/Component.cjs +59 -0
- package/lib/core-types/Component.cjs.map +1 -0
- package/lib/core-types/Component.mjs +28 -31
- package/lib/core-types/UnknownProperties.cjs +2 -0
- package/lib/core-types/UnknownProperties.cjs.map +1 -0
- package/lib/core-types/reshadow.d.cjs +2 -0
- package/lib/core-types/reshadow.d.cjs.map +1 -0
- package/lib/core-types/symbols.cjs +25 -0
- package/lib/core-types/symbols.cjs.map +1 -0
- package/lib/core-types/symbols.mjs +20 -10
- package/lib/coreFactory.cjs +352 -0
- package/lib/coreFactory.cjs.map +1 -0
- package/lib/coreFactory.mjs +324 -0
- package/lib/enhancement/Children.cjs +119 -0
- package/lib/enhancement/Children.cjs.map +1 -0
- package/lib/enhancement/Children.mjs +34 -49
- package/lib/enhancement/Root.cjs +78 -0
- package/lib/enhancement/Root.cjs.map +1 -0
- package/lib/enhancement/Root.mjs +25 -35
- package/lib/enhancement/bindHandler.cjs +54 -0
- package/lib/enhancement/bindHandler.cjs.map +1 -0
- package/lib/enhancement/bindHandler.mjs +10 -9
- package/lib/enhancement/dataName.cjs +20 -0
- package/lib/enhancement/dataName.cjs.map +1 -0
- package/lib/enhancement/dataName.mjs +5 -4
- package/lib/enhancement/enhance.cjs +22 -0
- package/lib/enhancement/enhance.cjs.map +1 -0
- package/lib/enhancement/enhance.mjs +4 -3
- package/lib/enhancement/functionDefaultProps.cjs +36 -0
- package/lib/enhancement/functionDefaultProps.cjs.map +1 -0
- package/lib/enhancement/functionDefaultProps.mjs +5 -5
- package/lib/enhancement/hoistProps.cjs +97 -0
- package/lib/enhancement/hoistProps.cjs.map +1 -0
- package/lib/enhancement/hoistProps.mjs +22 -32
- package/lib/enhancement/i18n.cjs +28 -0
- package/lib/enhancement/i18n.cjs.map +1 -0
- package/lib/enhancement/i18n.mjs +8 -8
- package/lib/enhancement/inheritedName.cjs +23 -0
- package/lib/enhancement/inheritedName.cjs.map +1 -0
- package/lib/enhancement/inheritedName.mjs +5 -4
- package/lib/enhancement/staticChildren.cjs +135 -0
- package/lib/enhancement/staticChildren.cjs.map +1 -0
- package/lib/enhancement/staticChildren.mjs +35 -38
- package/lib/enhancement/style.cjs +60 -0
- package/lib/enhancement/style.cjs.map +1 -0
- package/lib/enhancement/style.mjs +16 -17
- package/lib/enhancement/uncontrolledProps.cjs +131 -0
- package/lib/enhancement/uncontrolledProps.cjs.map +1 -0
- package/lib/enhancement/uncontrolledProps.mjs +28 -44
- package/lib/esm/LastInteractionType.mjs +29 -20
- package/lib/esm/core-types/Component.mjs +40 -29
- package/lib/esm/core-types/symbols.mjs +18 -10
- package/lib/esm/coreFactory.mjs +273 -184
- package/lib/esm/enhancement/Children.mjs +72 -48
- package/lib/esm/enhancement/Root.mjs +49 -32
- package/lib/esm/enhancement/bindHandler.mjs +34 -30
- package/lib/esm/enhancement/dataName.mjs +7 -7
- package/lib/esm/enhancement/enhance.mjs +9 -9
- package/lib/esm/enhancement/functionDefaultProps.mjs +19 -9
- package/lib/esm/enhancement/hoistProps.mjs +62 -42
- package/lib/esm/enhancement/i18n.mjs +13 -11
- package/lib/esm/enhancement/inheritedName.mjs +9 -9
- package/lib/esm/enhancement/staticChildren.mjs +100 -58
- package/lib/esm/enhancement/style.mjs +38 -26
- package/lib/esm/enhancement/uncontrolledProps.mjs +81 -62
- package/lib/esm/index.mjs +21 -21
- package/lib/esm/register.mjs +22 -15
- package/lib/esm/styled/reshadow-core.mjs +9 -7
- package/lib/esm/styled/sstyled.mjs +98 -55
- package/lib/esm/utils/assignProps.mjs +65 -31
- package/lib/esm/utils/canUseDOM.mjs +3 -3
- package/lib/esm/utils/capitalizeFirstLetter.mjs +3 -3
- package/lib/esm/utils/enhances/WithI18n.mjs +44 -38
- package/lib/esm/utils/logger.mjs +24 -16
- package/lib/esm/utils/pick.mjs +11 -6
- package/lib/esm/utils/ref.mjs +33 -24
- package/lib/esm/utils/use/useEnhancedEffect.mjs +4 -4
- package/lib/index.cjs +103 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.mjs +23 -0
- package/lib/register.cjs +37 -0
- package/lib/register.cjs.map +1 -0
- package/lib/register.mjs +13 -11
- package/lib/styled/index.cjs +32 -0
- package/lib/styled/index.cjs.map +1 -0
- package/lib/styled/reshadow-core.cjs +256 -0
- package/lib/styled/reshadow-core.cjs.map +1 -0
- package/lib/styled/reshadow-core.mjs +8 -233
- package/lib/styled/sstyled.cjs +149 -0
- package/lib/styled/sstyled.cjs.map +1 -0
- package/lib/styled/sstyled.mjs +40 -61
- package/lib/theme/processor.cjs +315 -0
- package/lib/theme/processor.cjs.map +1 -0
- package/lib/theme/themes/dark.cjs +385 -0
- package/lib/theme/themes/dark.cjs.map +1 -0
- package/lib/theme/themes/default.cjs +394 -0
- package/lib/theme/themes/default.cjs.map +1 -0
- package/lib/theme/themes/light.cjs +394 -0
- package/lib/theme/themes/light.cjs.map +1 -0
- package/lib/theme/utils.cjs +297 -0
- package/lib/theme/utils.cjs.map +1 -0
- package/lib/utils/CSSinJS.cjs +36 -0
- package/lib/utils/CSSinJS.cjs.map +1 -0
- package/lib/utils/ScreenReaderOnly.cjs +31 -0
- package/lib/utils/ScreenReaderOnly.cjs.map +1 -0
- package/lib/utils/ThemeProvider.cjs +82 -0
- package/lib/utils/ThemeProvider.cjs.map +1 -0
- package/lib/utils/addonText.cjs +18 -0
- package/lib/utils/addonText.cjs.map +1 -0
- package/lib/utils/addonText.d.ts +1 -1
- package/lib/utils/addonTextChildren.cjs +45 -0
- package/lib/utils/addonTextChildren.cjs.map +1 -0
- package/lib/utils/ariaProps.cjs +22 -0
- package/lib/utils/ariaProps.cjs.map +1 -0
- package/lib/utils/assignProps.cjs +93 -0
- package/lib/utils/assignProps.cjs.map +1 -0
- package/lib/utils/assignProps.mjs +30 -38
- package/lib/utils/canUseDOM.cjs +10 -0
- package/lib/utils/canUseDOM.cjs.map +1 -0
- package/lib/utils/canUseDOM.mjs +5 -3
- package/lib/utils/capitalizeFirstLetter.cjs +10 -0
- package/lib/utils/capitalizeFirstLetter.cjs.map +1 -0
- package/lib/utils/capitalizeFirstLetter.mjs +4 -2
- package/lib/utils/color.cjs +208 -0
- package/lib/utils/color.cjs.map +1 -0
- package/lib/utils/compose.cjs +21 -0
- package/lib/utils/compose.cjs.map +1 -0
- package/lib/utils/createHoc.cjs +55 -0
- package/lib/utils/createHoc.cjs.map +1 -0
- package/lib/utils/createUUID.cjs +15 -0
- package/lib/utils/createUUID.cjs.map +1 -0
- package/lib/utils/cssToIntDefault.cjs +22 -0
- package/lib/utils/cssToIntDefault.cjs.map +1 -0
- package/lib/utils/enhances/WithAutoFocus.cjs +75 -0
- package/lib/utils/enhances/WithAutoFocus.cjs.map +1 -0
- package/lib/utils/enhances/WithCSS.cjs +93 -0
- package/lib/utils/enhances/WithCSS.cjs.map +1 -0
- package/lib/utils/enhances/WithI18n.cjs +95 -0
- package/lib/utils/enhances/WithI18n.cjs.map +1 -0
- package/lib/utils/enhances/WithI18n.mjs +28 -57
- package/lib/utils/enhances/WithKeyboardFocus.cjs +93 -0
- package/lib/utils/enhances/WithKeyboardFocus.cjs.map +1 -0
- package/lib/utils/enhances/WithRef.cjs +26 -0
- package/lib/utils/enhances/WithRef.cjs.map +1 -0
- package/lib/utils/enhances/a11yEnhance.cjs +74 -0
- package/lib/utils/enhances/a11yEnhance.cjs.map +1 -0
- package/lib/utils/enhances/animatedSizeEnhance.cjs +98 -0
- package/lib/utils/enhances/animatedSizeEnhance.cjs.map +1 -0
- package/lib/utils/enhances/autoFocusEnhance.cjs +46 -0
- package/lib/utils/enhances/autoFocusEnhance.cjs.map +1 -0
- package/lib/utils/enhances/contextEnhance.cjs +22 -0
- package/lib/utils/enhances/contextEnhance.cjs.map +1 -0
- package/lib/utils/enhances/i18nEnhance.cjs +101 -0
- package/lib/utils/enhances/i18nEnhance.cjs.map +1 -0
- package/lib/utils/enhances/keyboardFocusEnhance.cjs +63 -0
- package/lib/utils/enhances/keyboardFocusEnhance.cjs.map +1 -0
- package/lib/utils/enhances/resolveColorEnhance.cjs +25 -0
- package/lib/utils/enhances/resolveColorEnhance.cjs.map +1 -0
- package/lib/utils/eventEmitter.cjs +41 -0
- package/lib/utils/eventEmitter.cjs.map +1 -0
- package/lib/utils/findComponent.cjs +106 -0
- package/lib/utils/findComponent.cjs.map +1 -0
- package/lib/utils/fire.cjs +23 -0
- package/lib/utils/fire.cjs.map +1 -0
- package/lib/utils/focus-lock/focusBorders.cjs +72 -0
- package/lib/utils/focus-lock/focusBorders.cjs.map +1 -0
- package/lib/utils/focus-lock/getFocusableIn.cjs +26 -0
- package/lib/utils/focus-lock/getFocusableIn.cjs.map +1 -0
- package/lib/utils/focus-lock/isFocusInside.cjs +16 -0
- package/lib/utils/focus-lock/isFocusInside.cjs.map +1 -0
- package/lib/utils/focus-lock/isFocusable.cjs +51 -0
- package/lib/utils/focus-lock/isFocusable.cjs.map +1 -0
- package/lib/utils/focus-lock/setFocus.cjs +63 -0
- package/lib/utils/focus-lock/setFocus.cjs.map +1 -0
- package/lib/utils/getAccessibleName.cjs +56 -0
- package/lib/utils/getAccessibleName.cjs.map +1 -0
- package/lib/utils/getDisplayName.cjs +10 -0
- package/lib/utils/getDisplayName.cjs.map +1 -0
- package/lib/utils/getEventTarget.cjs +53 -0
- package/lib/utils/getEventTarget.cjs.map +1 -0
- package/lib/utils/getOriginChildren.cjs +18 -0
- package/lib/utils/getOriginChildren.cjs.map +1 -0
- package/lib/utils/getRandomInt.cjs +11 -0
- package/lib/utils/getRandomInt.cjs.map +1 -0
- package/lib/utils/getValue.cjs +16 -0
- package/lib/utils/getValue.cjs.map +1 -0
- package/lib/utils/hasLabels.cjs +47 -0
- package/lib/utils/hasLabels.cjs.map +1 -0
- package/lib/utils/hasParent.cjs +14 -0
- package/lib/utils/hasParent.cjs.map +1 -0
- package/lib/utils/if.cjs +16 -0
- package/lib/utils/if.cjs.map +1 -0
- package/lib/utils/ifChildren.cjs +17 -0
- package/lib/utils/ifChildren.cjs.map +1 -0
- package/lib/utils/injectStyle.cjs +49 -0
- package/lib/utils/injectStyle.cjs.map +1 -0
- package/lib/utils/inputProps.cjs +22 -0
- package/lib/utils/inputProps.cjs.map +1 -0
- package/lib/utils/isNode.cjs +28 -0
- package/lib/utils/isNode.cjs.map +1 -0
- package/lib/utils/isPromise.cjs +10 -0
- package/lib/utils/isPromise.cjs.map +1 -0
- package/lib/utils/isRetina.cjs +15 -0
- package/lib/utils/isRetina.cjs.map +1 -0
- package/lib/utils/logger.cjs +40 -0
- package/lib/utils/logger.cjs.map +1 -0
- package/lib/utils/logger.mjs +19 -16
- package/lib/utils/numericChecker.cjs +33 -0
- package/lib/utils/numericChecker.cjs.map +1 -0
- package/lib/utils/ownerDocument.cjs +10 -0
- package/lib/utils/ownerDocument.cjs.map +1 -0
- package/lib/utils/pick.cjs +19 -0
- package/lib/utils/pick.cjs.map +1 -0
- package/lib/utils/pick.mjs +4 -2
- package/lib/utils/propsForElement.cjs +59 -0
- package/lib/utils/propsForElement.cjs.map +1 -0
- package/lib/utils/rafTrottle.cjs +33 -0
- package/lib/utils/rafTrottle.cjs.map +1 -0
- package/lib/utils/reactToText.cjs +33 -0
- package/lib/utils/reactToText.cjs.map +1 -0
- package/lib/utils/ref.cjs +95 -0
- package/lib/utils/ref.cjs.map +1 -0
- package/lib/utils/ref.mjs +20 -60
- package/lib/utils/setRef.cjs +10 -0
- package/lib/utils/setRef.cjs.map +1 -0
- package/lib/utils/syncScroll.cjs +61 -0
- package/lib/utils/syncScroll.cjs.map +1 -0
- package/lib/utils/uncontroll.cjs +47 -0
- package/lib/utils/uncontroll.cjs.map +1 -0
- package/lib/utils/uniqueID.cjs +42 -0
- package/lib/utils/uniqueID.cjs.map +1 -0
- package/lib/utils/use/useColorResolver.cjs +208 -0
- package/lib/utils/use/useColorResolver.cjs.map +1 -0
- package/lib/utils/use/useCss.cjs +20 -0
- package/lib/utils/use/useCss.cjs.map +1 -0
- package/lib/utils/use/useEnhancedEffect.cjs +13 -0
- package/lib/utils/use/useEnhancedEffect.cjs.map +1 -0
- package/lib/utils/use/useEnhancedEffect.mjs +4 -3
- package/lib/utils/use/useEventCallback.cjs +25 -0
- package/lib/utils/use/useEventCallback.cjs.map +1 -0
- package/lib/utils/use/useEventListener.cjs +33 -0
- package/lib/utils/use/useEventListener.cjs.map +1 -0
- package/lib/utils/use/useFocusLock.cjs +289 -0
- package/lib/utils/use/useFocusLock.cjs.map +1 -0
- package/lib/utils/use/usePreventScroll.cjs +78 -0
- package/lib/utils/use/usePreventScroll.cjs.map +1 -0
- package/lib/utils/useCssVariable.cjs +55 -0
- package/lib/utils/useCssVariable.cjs.map +1 -0
- package/lib/utils/zIndexStacking.cjs +48 -0
- package/lib/utils/zIndexStacking.cjs.map +1 -0
- package/package.json +7 -7
- package/vite.config.ts +8 -0
- package/lib/cjs/LastInteractionType.js +0 -57
- 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 +0 -352
- package/lib/cjs/coreFactory.js.map +0 -1
- package/lib/cjs/enhancement/Children.js +0 -119
- 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 +0 -22
- 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 +0 -23
- 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 +0 -131
- package/lib/cjs/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/cjs/index.js +0 -103
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/register.js +0 -37
- package/lib/cjs/register.js.map +0 -1
- package/lib/cjs/styled/index.js +0 -32
- package/lib/cjs/styled/index.js.map +0 -1
- package/lib/cjs/styled/reshadow-core.js +0 -256
- 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 +0 -385
- 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 +0 -394
- package/lib/cjs/theme/themes/light.js.map +0 -1
- package/lib/cjs/theme/utils.js +0 -297
- package/lib/cjs/theme/utils.js.map +0 -1
- package/lib/cjs/utils/CSSinJS.js +0 -36
- 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 +0 -45
- 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 +0 -93
- 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 +0 -21
- package/lib/cjs/utils/compose.js.map +0 -1
- package/lib/cjs/utils/createHoc.js +0 -55
- package/lib/cjs/utils/createHoc.js.map +0 -1
- package/lib/cjs/utils/createUUID.js +0 -15
- 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 +0 -93
- package/lib/cjs/utils/enhances/WithCSS.js.map +0 -1
- package/lib/cjs/utils/enhances/WithI18n.js +0 -95
- 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 +0 -26
- package/lib/cjs/utils/enhances/WithRef.js.map +0 -1
- package/lib/cjs/utils/enhances/a11yEnhance.js +0 -74
- 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 +0 -101
- 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 +0 -25
- package/lib/cjs/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/cjs/utils/eventEmitter.js +0 -41
- package/lib/cjs/utils/eventEmitter.js.map +0 -1
- package/lib/cjs/utils/findComponent.js +0 -106
- package/lib/cjs/utils/findComponent.js.map +0 -1
- package/lib/cjs/utils/fire.js +0 -23
- 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 +0 -16
- package/lib/cjs/utils/focus-lock/isFocusInside.js.map +0 -1
- package/lib/cjs/utils/focus-lock/isFocusable.js +0 -51
- 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 +0 -53
- package/lib/cjs/utils/getEventTarget.js.map +0 -1
- package/lib/cjs/utils/getOriginChildren.js +0 -18
- package/lib/cjs/utils/getOriginChildren.js.map +0 -1
- package/lib/cjs/utils/getRandomInt.js +0 -11
- package/lib/cjs/utils/getRandomInt.js.map +0 -1
- package/lib/cjs/utils/getValue.js +0 -16
- 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 +0 -14
- package/lib/cjs/utils/hasParent.js.map +0 -1
- package/lib/cjs/utils/if.js +0 -16
- 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 +0 -49
- 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 +0 -15
- package/lib/cjs/utils/isRetina.js.map +0 -1
- package/lib/cjs/utils/logger.js +0 -40
- 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 +0 -19
- 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 +0 -33
- package/lib/cjs/utils/rafTrottle.js.map +0 -1
- package/lib/cjs/utils/reactToText.js +0 -33
- 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 +0 -10
- package/lib/cjs/utils/setRef.js.map +0 -1
- package/lib/cjs/utils/syncScroll.js +0 -61
- package/lib/cjs/utils/syncScroll.js.map +0 -1
- package/lib/cjs/utils/uncontroll.js +0 -47
- package/lib/cjs/utils/uncontroll.js.map +0 -1
- package/lib/cjs/utils/uniqueID.js +0 -42
- 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 +0 -78
- 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 +0 -59
- package/lib/core-types/Component.js.map +0 -1
- package/lib/core-types/Component.mjs.map +0 -1
- package/lib/core-types/UnknownProperties.js +0 -2
- package/lib/core-types/UnknownProperties.js.map +0 -1
- package/lib/core-types/UnknownProperties.mjs +0 -3
- package/lib/core-types/UnknownProperties.mjs.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/reshadow.d.mjs +0 -2
- package/lib/core-types/reshadow.d.mjs.map +0 -1
- package/lib/core-types/symbols.js +0 -25
- package/lib/core-types/symbols.js.map +0 -1
- package/lib/core-types/symbols.mjs.map +0 -1
- package/lib/enhancement/Children.js +0 -119
- package/lib/enhancement/Children.js.map +0 -1
- package/lib/enhancement/Children.mjs.map +0 -1
- package/lib/enhancement/Root.js +0 -78
- package/lib/enhancement/Root.js.map +0 -1
- package/lib/enhancement/Root.mjs.map +0 -1
- package/lib/enhancement/bindHandler.js +0 -54
- package/lib/enhancement/bindHandler.js.map +0 -1
- package/lib/enhancement/bindHandler.mjs.map +0 -1
- package/lib/enhancement/dataName.js +0 -20
- package/lib/enhancement/dataName.js.map +0 -1
- package/lib/enhancement/dataName.mjs.map +0 -1
- package/lib/enhancement/enhance.js +0 -22
- package/lib/enhancement/enhance.js.map +0 -1
- package/lib/enhancement/enhance.mjs.map +0 -1
- package/lib/enhancement/functionDefaultProps.js +0 -36
- package/lib/enhancement/functionDefaultProps.js.map +0 -1
- package/lib/enhancement/functionDefaultProps.mjs.map +0 -1
- package/lib/enhancement/hoistProps.js +0 -97
- package/lib/enhancement/hoistProps.js.map +0 -1
- package/lib/enhancement/hoistProps.mjs.map +0 -1
- package/lib/enhancement/i18n.js +0 -28
- package/lib/enhancement/i18n.js.map +0 -1
- package/lib/enhancement/i18n.mjs.map +0 -1
- package/lib/enhancement/inheritedName.js +0 -23
- package/lib/enhancement/inheritedName.js.map +0 -1
- package/lib/enhancement/inheritedName.mjs.map +0 -1
- package/lib/enhancement/staticChildren.js +0 -135
- package/lib/enhancement/staticChildren.js.map +0 -1
- package/lib/enhancement/staticChildren.mjs.map +0 -1
- package/lib/enhancement/style.js +0 -60
- package/lib/enhancement/style.js.map +0 -1
- package/lib/enhancement/style.mjs.map +0 -1
- package/lib/enhancement/uncontrolledProps.js +0 -131
- package/lib/enhancement/uncontrolledProps.js.map +0 -1
- package/lib/enhancement/uncontrolledProps.mjs.map +0 -1
- package/lib/es6/LastInteractionType.js +0 -49
- 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 +0 -343
- 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 +0 -9
- 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/register.js +0 -37
- package/lib/register.js.map +0 -1
- package/lib/register.mjs.map +0 -1
- package/lib/styled/index.js +0 -32
- package/lib/styled/index.js.map +0 -1
- package/lib/styled/index.mjs +0 -6
- package/lib/styled/index.mjs.map +0 -1
- package/lib/styled/reshadow-core.js +0 -256
- package/lib/styled/reshadow-core.js.map +0 -1
- package/lib/styled/reshadow-core.mjs.map +0 -1
- package/lib/styled/sstyled.js +0 -149
- package/lib/styled/sstyled.js.map +0 -1
- package/lib/styled/sstyled.mjs.map +0 -1
- package/lib/theme/processor.js +0 -315
- package/lib/theme/processor.js.map +0 -1
- package/lib/theme/processor.mjs +0 -307
- package/lib/theme/processor.mjs.map +0 -1
- package/lib/theme/themes/dark.js +0 -385
- package/lib/theme/themes/dark.js.map +0 -1
- package/lib/theme/themes/dark.mjs +0 -378
- package/lib/theme/themes/dark.mjs.map +0 -1
- package/lib/theme/themes/default.js +0 -394
- package/lib/theme/themes/default.js.map +0 -1
- package/lib/theme/themes/default.mjs +0 -387
- package/lib/theme/themes/default.mjs.map +0 -1
- package/lib/theme/themes/light.js +0 -394
- package/lib/theme/themes/light.js.map +0 -1
- package/lib/theme/themes/light.mjs +0 -387
- package/lib/theme/themes/light.mjs.map +0 -1
- package/lib/theme/utils.js +0 -297
- package/lib/theme/utils.js.map +0 -1
- package/lib/theme/utils.mjs +0 -286
- package/lib/theme/utils.mjs.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/CSSinJS.mjs +0 -28
- package/lib/utils/CSSinJS.mjs.map +0 -1
- package/lib/utils/ScreenReaderOnly.js +0 -31
- package/lib/utils/ScreenReaderOnly.js.map +0 -1
- package/lib/utils/ScreenReaderOnly.mjs +0 -24
- package/lib/utils/ScreenReaderOnly.mjs.map +0 -1
- package/lib/utils/ThemeProvider.js +0 -82
- package/lib/utils/ThemeProvider.js.map +0 -1
- package/lib/utils/ThemeProvider.mjs +0 -71
- package/lib/utils/ThemeProvider.mjs.map +0 -1
- package/lib/utils/addonText.js +0 -18
- package/lib/utils/addonText.js.map +0 -1
- package/lib/utils/addonText.mjs +0 -11
- package/lib/utils/addonText.mjs.map +0 -1
- package/lib/utils/addonTextChildren.js +0 -45
- package/lib/utils/addonTextChildren.js.map +0 -1
- package/lib/utils/addonTextChildren.mjs +0 -37
- package/lib/utils/addonTextChildren.mjs.map +0 -1
- package/lib/utils/ariaProps.js +0 -22
- package/lib/utils/ariaProps.js.map +0 -1
- package/lib/utils/ariaProps.mjs +0 -16
- package/lib/utils/ariaProps.mjs.map +0 -1
- package/lib/utils/assignProps.js +0 -93
- package/lib/utils/assignProps.js.map +0 -1
- package/lib/utils/assignProps.mjs.map +0 -1
- package/lib/utils/canUseDOM.js +0 -10
- package/lib/utils/canUseDOM.js.map +0 -1
- package/lib/utils/canUseDOM.mjs.map +0 -1
- package/lib/utils/capitalizeFirstLetter.js +0 -10
- package/lib/utils/capitalizeFirstLetter.js.map +0 -1
- package/lib/utils/capitalizeFirstLetter.mjs.map +0 -1
- package/lib/utils/color.js +0 -208
- package/lib/utils/color.js.map +0 -1
- package/lib/utils/color.mjs +0 -196
- package/lib/utils/color.mjs.map +0 -1
- package/lib/utils/compose.js +0 -21
- package/lib/utils/compose.js.map +0 -1
- package/lib/utils/compose.mjs +0 -15
- package/lib/utils/compose.mjs.map +0 -1
- package/lib/utils/createHoc.js +0 -55
- package/lib/utils/createHoc.js.map +0 -1
- package/lib/utils/createHoc.mjs +0 -46
- package/lib/utils/createHoc.mjs.map +0 -1
- package/lib/utils/createUUID.js +0 -15
- package/lib/utils/createUUID.js.map +0 -1
- package/lib/utils/createUUID.mjs +0 -9
- package/lib/utils/createUUID.mjs.map +0 -1
- package/lib/utils/cssToIntDefault.js +0 -22
- package/lib/utils/cssToIntDefault.js.map +0 -1
- package/lib/utils/cssToIntDefault.mjs +0 -16
- package/lib/utils/cssToIntDefault.mjs.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.js +0 -75
- package/lib/utils/enhances/WithAutoFocus.js.map +0 -1
- package/lib/utils/enhances/WithAutoFocus.mjs +0 -67
- package/lib/utils/enhances/WithAutoFocus.mjs.map +0 -1
- package/lib/utils/enhances/WithCSS.js +0 -93
- package/lib/utils/enhances/WithCSS.js.map +0 -1
- package/lib/utils/enhances/WithCSS.mjs +0 -79
- package/lib/utils/enhances/WithCSS.mjs.map +0 -1
- package/lib/utils/enhances/WithI18n.js +0 -95
- package/lib/utils/enhances/WithI18n.js.map +0 -1
- package/lib/utils/enhances/WithI18n.mjs.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.js +0 -93
- package/lib/utils/enhances/WithKeyboardFocus.js.map +0 -1
- package/lib/utils/enhances/WithKeyboardFocus.mjs +0 -84
- package/lib/utils/enhances/WithKeyboardFocus.mjs.map +0 -1
- package/lib/utils/enhances/WithRef.js +0 -26
- package/lib/utils/enhances/WithRef.js.map +0 -1
- package/lib/utils/enhances/WithRef.mjs +0 -18
- package/lib/utils/enhances/WithRef.mjs.map +0 -1
- package/lib/utils/enhances/a11yEnhance.js +0 -74
- package/lib/utils/enhances/a11yEnhance.js.map +0 -1
- package/lib/utils/enhances/a11yEnhance.mjs +0 -66
- package/lib/utils/enhances/a11yEnhance.mjs.map +0 -1
- package/lib/utils/enhances/animatedSizeEnhance.js +0 -98
- package/lib/utils/enhances/animatedSizeEnhance.js.map +0 -1
- package/lib/utils/enhances/animatedSizeEnhance.mjs +0 -90
- package/lib/utils/enhances/animatedSizeEnhance.mjs.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.js +0 -46
- package/lib/utils/enhances/autoFocusEnhance.js.map +0 -1
- package/lib/utils/enhances/autoFocusEnhance.mjs +0 -38
- package/lib/utils/enhances/autoFocusEnhance.mjs.map +0 -1
- package/lib/utils/enhances/contextEnhance.js +0 -22
- package/lib/utils/enhances/contextEnhance.js.map +0 -1
- package/lib/utils/enhances/contextEnhance.mjs +0 -14
- package/lib/utils/enhances/contextEnhance.mjs.map +0 -1
- package/lib/utils/enhances/i18nEnhance.js +0 -101
- package/lib/utils/enhances/i18nEnhance.js.map +0 -1
- package/lib/utils/enhances/i18nEnhance.mjs +0 -92
- package/lib/utils/enhances/i18nEnhance.mjs.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.js +0 -63
- package/lib/utils/enhances/keyboardFocusEnhance.js.map +0 -1
- package/lib/utils/enhances/keyboardFocusEnhance.mjs +0 -57
- package/lib/utils/enhances/keyboardFocusEnhance.mjs.map +0 -1
- package/lib/utils/enhances/resolveColorEnhance.js +0 -25
- package/lib/utils/enhances/resolveColorEnhance.js.map +0 -1
- package/lib/utils/enhances/resolveColorEnhance.mjs +0 -17
- package/lib/utils/enhances/resolveColorEnhance.mjs.map +0 -1
- package/lib/utils/eventEmitter.js +0 -41
- package/lib/utils/eventEmitter.js.map +0 -1
- package/lib/utils/eventEmitter.mjs +0 -34
- package/lib/utils/eventEmitter.mjs.map +0 -1
- package/lib/utils/findComponent.js +0 -106
- package/lib/utils/findComponent.js.map +0 -1
- package/lib/utils/findComponent.mjs +0 -95
- package/lib/utils/findComponent.mjs.map +0 -1
- package/lib/utils/fire.js +0 -23
- package/lib/utils/fire.js.map +0 -1
- package/lib/utils/fire.mjs +0 -15
- package/lib/utils/fire.mjs.map +0 -1
- package/lib/utils/focus-lock/focusBorders.js +0 -72
- package/lib/utils/focus-lock/focusBorders.js.map +0 -1
- package/lib/utils/focus-lock/focusBorders.mjs +0 -62
- package/lib/utils/focus-lock/focusBorders.mjs.map +0 -1
- package/lib/utils/focus-lock/getFocusableIn.js +0 -26
- package/lib/utils/focus-lock/getFocusableIn.js.map +0 -1
- package/lib/utils/focus-lock/getFocusableIn.mjs +0 -19
- package/lib/utils/focus-lock/getFocusableIn.mjs.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/isFocusInside.mjs +0 -9
- package/lib/utils/focus-lock/isFocusInside.mjs.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/isFocusable.mjs +0 -43
- package/lib/utils/focus-lock/isFocusable.mjs.map +0 -1
- package/lib/utils/focus-lock/setFocus.js +0 -63
- package/lib/utils/focus-lock/setFocus.js.map +0 -1
- package/lib/utils/focus-lock/setFocus.mjs +0 -55
- package/lib/utils/focus-lock/setFocus.mjs.map +0 -1
- package/lib/utils/getAccessibleName.js +0 -56
- package/lib/utils/getAccessibleName.js.map +0 -1
- package/lib/utils/getAccessibleName.mjs +0 -49
- package/lib/utils/getAccessibleName.mjs.map +0 -1
- package/lib/utils/getDisplayName.js +0 -10
- package/lib/utils/getDisplayName.js.map +0 -1
- package/lib/utils/getDisplayName.mjs +0 -4
- package/lib/utils/getDisplayName.mjs.map +0 -1
- package/lib/utils/getEventTarget.js +0 -53
- package/lib/utils/getEventTarget.js.map +0 -1
- package/lib/utils/getEventTarget.mjs +0 -45
- package/lib/utils/getEventTarget.mjs.map +0 -1
- package/lib/utils/getOriginChildren.js +0 -18
- package/lib/utils/getOriginChildren.js.map +0 -1
- package/lib/utils/getOriginChildren.mjs +0 -10
- package/lib/utils/getOriginChildren.mjs.map +0 -1
- package/lib/utils/getRandomInt.js +0 -11
- package/lib/utils/getRandomInt.js.map +0 -1
- package/lib/utils/getRandomInt.mjs +0 -5
- package/lib/utils/getRandomInt.mjs.map +0 -1
- package/lib/utils/getValue.js +0 -16
- package/lib/utils/getValue.js.map +0 -1
- package/lib/utils/getValue.mjs +0 -10
- package/lib/utils/getValue.mjs.map +0 -1
- package/lib/utils/hasLabels.js +0 -47
- package/lib/utils/hasLabels.js.map +0 -1
- package/lib/utils/hasLabels.mjs +0 -39
- package/lib/utils/hasLabels.mjs.map +0 -1
- package/lib/utils/hasParent.js +0 -14
- package/lib/utils/hasParent.js.map +0 -1
- package/lib/utils/hasParent.mjs +0 -7
- package/lib/utils/hasParent.mjs.map +0 -1
- package/lib/utils/if.js +0 -16
- package/lib/utils/if.js.map +0 -1
- package/lib/utils/if.mjs +0 -9
- package/lib/utils/if.mjs.map +0 -1
- package/lib/utils/ifChildren.js +0 -17
- package/lib/utils/ifChildren.js.map +0 -1
- package/lib/utils/ifChildren.mjs +0 -10
- package/lib/utils/ifChildren.mjs.map +0 -1
- package/lib/utils/injectStyle.js +0 -49
- package/lib/utils/injectStyle.js.map +0 -1
- package/lib/utils/injectStyle.mjs +0 -41
- package/lib/utils/injectStyle.mjs.map +0 -1
- package/lib/utils/inputProps.js +0 -22
- package/lib/utils/inputProps.js.map +0 -1
- package/lib/utils/inputProps.mjs +0 -14
- package/lib/utils/inputProps.mjs.map +0 -1
- package/lib/utils/isNode.js +0 -28
- package/lib/utils/isNode.js.map +0 -1
- package/lib/utils/isNode.mjs +0 -21
- package/lib/utils/isNode.mjs.map +0 -1
- package/lib/utils/isPromise.js +0 -10
- package/lib/utils/isPromise.js.map +0 -1
- package/lib/utils/isPromise.mjs +0 -4
- package/lib/utils/isPromise.mjs.map +0 -1
- package/lib/utils/isRetina.js +0 -15
- package/lib/utils/isRetina.js.map +0 -1
- package/lib/utils/isRetina.mjs +0 -9
- package/lib/utils/isRetina.mjs.map +0 -1
- package/lib/utils/logger.js +0 -40
- package/lib/utils/logger.js.map +0 -1
- package/lib/utils/logger.mjs.map +0 -1
- package/lib/utils/numericChecker.js +0 -33
- package/lib/utils/numericChecker.js.map +0 -1
- package/lib/utils/numericChecker.mjs +0 -27
- package/lib/utils/numericChecker.mjs.map +0 -1
- package/lib/utils/ownerDocument.js +0 -10
- package/lib/utils/ownerDocument.js.map +0 -1
- package/lib/utils/ownerDocument.mjs +0 -4
- package/lib/utils/ownerDocument.mjs.map +0 -1
- package/lib/utils/pick.js +0 -19
- package/lib/utils/pick.js.map +0 -1
- package/lib/utils/pick.mjs.map +0 -1
- package/lib/utils/propsForElement.js +0 -59
- package/lib/utils/propsForElement.js.map +0 -1
- package/lib/utils/propsForElement.mjs +0 -50
- package/lib/utils/propsForElement.mjs.map +0 -1
- package/lib/utils/rafTrottle.js +0 -33
- package/lib/utils/rafTrottle.js.map +0 -1
- package/lib/utils/rafTrottle.mjs +0 -26
- package/lib/utils/rafTrottle.mjs.map +0 -1
- package/lib/utils/reactToText.js +0 -33
- package/lib/utils/reactToText.js.map +0 -1
- package/lib/utils/reactToText.mjs +0 -26
- package/lib/utils/reactToText.mjs.map +0 -1
- package/lib/utils/ref.js +0 -95
- package/lib/utils/ref.js.map +0 -1
- package/lib/utils/ref.mjs.map +0 -1
- package/lib/utils/setRef.js +0 -10
- package/lib/utils/setRef.js.map +0 -1
- package/lib/utils/setRef.mjs +0 -3
- package/lib/utils/setRef.mjs.map +0 -1
- package/lib/utils/syncScroll.js +0 -61
- package/lib/utils/syncScroll.js.map +0 -1
- package/lib/utils/syncScroll.mjs +0 -54
- package/lib/utils/syncScroll.mjs.map +0 -1
- package/lib/utils/uncontroll.js +0 -47
- package/lib/utils/uncontroll.js.map +0 -1
- package/lib/utils/uncontroll.mjs +0 -38
- package/lib/utils/uncontroll.mjs.map +0 -1
- package/lib/utils/uniqueID.js +0 -42
- package/lib/utils/uniqueID.js.map +0 -1
- package/lib/utils/uniqueID.mjs +0 -33
- package/lib/utils/uniqueID.mjs.map +0 -1
- package/lib/utils/use/useColorResolver.js +0 -208
- package/lib/utils/use/useColorResolver.js.map +0 -1
- package/lib/utils/use/useColorResolver.mjs +0 -200
- package/lib/utils/use/useColorResolver.mjs.map +0 -1
- package/lib/utils/use/useCss.js +0 -20
- package/lib/utils/use/useCss.js.map +0 -1
- package/lib/utils/use/useCss.mjs +0 -12
- package/lib/utils/use/useCss.mjs.map +0 -1
- package/lib/utils/use/useEnhancedEffect.js +0 -13
- package/lib/utils/use/useEnhancedEffect.js.map +0 -1
- package/lib/utils/use/useEnhancedEffect.mjs.map +0 -1
- package/lib/utils/use/useEventCallback.js +0 -25
- package/lib/utils/use/useEventCallback.js.map +0 -1
- package/lib/utils/use/useEventCallback.mjs +0 -19
- package/lib/utils/use/useEventCallback.mjs.map +0 -1
- package/lib/utils/use/useEventListener.js +0 -33
- package/lib/utils/use/useEventListener.js.map +0 -1
- package/lib/utils/use/useEventListener.mjs +0 -25
- package/lib/utils/use/useEventListener.mjs.map +0 -1
- package/lib/utils/use/useFocusLock.js +0 -289
- package/lib/utils/use/useFocusLock.js.map +0 -1
- package/lib/utils/use/useFocusLock.mjs +0 -266
- package/lib/utils/use/useFocusLock.mjs.map +0 -1
- package/lib/utils/use/usePreventScroll.js +0 -78
- package/lib/utils/use/usePreventScroll.js.map +0 -1
- package/lib/utils/use/usePreventScroll.mjs +0 -70
- package/lib/utils/use/usePreventScroll.mjs.map +0 -1
- package/lib/utils/useCssVariable.js +0 -55
- package/lib/utils/useCssVariable.js.map +0 -1
- package/lib/utils/useCssVariable.mjs +0 -46
- package/lib/utils/useCssVariable.mjs.map +0 -1
- package/lib/utils/zIndexStacking.js +0 -48
- package/lib/utils/zIndexStacking.js.map +0 -1
- package/lib/utils/zIndexStacking.mjs +0 -38
- package/lib/utils/zIndexStacking.mjs.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","names":["_react","require","_symbols","Root","undefined","exports","RootComponent","_PureComponent","_inherits2","_super","_createSuper2","_this","_len","arguments","length","args","Array","_key","_classCallCheck2","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","get","PureComponent","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance>,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\n [CREATE_COMPONENT]: () => ComponentType<\n ComponentProps,\n ChildComponentProps,\n ContextType,\n UCProps\n >;\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,QAAA,G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cAAA,CAAfC,eAAe,KAAAD,cAAA,CAAfC,eAAe;AAAA,GA5BjBF,aAAa,KAAAxB,OAAA,CAAAwB,aAAA,GAAbA,aAAa;AA2LvB,IAAMI,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAIrCC,OAKoB;EAAA,OAMjBA,OAAO;AAAA,CAAO;AAAC7B,OAAA,CAAA4B,0BAAA,GAAAA,0BAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.mjs","names":["PureComponent","CORE_COMPONENT","CREATE_COMPONENT","Root","undefined","RootComponent","_PureComponent","_inherits","_super","_createSuper","_this","_len","arguments","length","args","Array","_key","_classCallCheck","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","get","Component","Intergalactic","_Intergalactic","InternalTypings","_InternalTypings","wrapIntergalacticComponent","wrapper"],"sources":["../../src/core-types/Component.ts"],"sourcesContent":["import React, {\n AllHTMLAttributes,\n ForwardRefExoticComponent,\n PureComponent,\n ReactNode,\n RefAttributes,\n RefObject,\n} from 'react';\nimport { IStyledProps } from '../styled/index';\nimport { CORE_COMPONENT, CREATE_COMPONENT } from './symbols';\n\n/** @deprecated */\ntype KnownKeys<T> = {\n [K in keyof T]: string extends K ? never : number extends K ? never : K;\n} extends { [_ in keyof T]: infer U }\n ? U\n : never;\n\n/** @deprecated */\nexport type HandlersType<UCProps> = { [K in keyof UCProps]?: <T = unknown>(arg: T) => void };\n/** @deprecated */\nexport type ChildrenType<Props = {}, Ctx = {}, UCProps = {}> =\n | ((props: Props & Ctx, handlers: HandlersType<UCProps>) => ReactNode)\n | ReactNode;\n\n/** @deprecated */\nexport type RootComponentHandler = (...args: any[]) => void | false;\n\n/** @deprecated */\nexport interface IRootComponentHandlers {\n [key: string]: RootComponentHandler;\n}\n\n/** @deprecated */\nexport interface IRootComponentProps<Props = {}, Ctx = {}> {\n forwardRef?: RefObject<any>;\n Children?: any;\n children?: ChildrenType<Props, Ctx>;\n styles?: IStyledProps['styles'];\n 'data-ui-name'?: string;\n}\n\n/** @deprecated */\nexport type IComponentProps<Props = {}, Ctx = {}> = Props & IRootComponentProps<Props, Ctx>;\n\n/** @deprecated */\nexport type IFunctionProps<Props = {}, Ctx = {}> = IComponentProps<Props, Ctx> &\n Omit<AllHTMLAttributes<any>, keyof IComponentProps<Props, Ctx>> & { Root?: Root };\n\n/** @deprecated */\nexport type PropsWithRenderFnChildren<Props = {}, Ctx = {}, UCProps = {}> = Omit<\n Pick<Props, KnownKeys<Props>>,\n 'children'\n> & {\n children?: ChildrenType<Props, Ctx, UCProps>;\n [key: string]: unknown;\n};\n\n/** @deprecated */\nexport type CProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?: ((props: Props & Ctx, handlers: UCProps) => React.ReactNode) | React.ReactNode;\n};\n/** @deprecated */\nexport type ReturnEl = React.ReactElement | null;\n\nexport interface IRootNodeProps {\n render: React.ElementType | string;\n tag?: React.ElementType | string;\n\n [key: string]: any;\n}\n\ntype Root = ForwardRefExoticComponent<IRootNodeProps>;\n\n/**\n * @deprecated since version ^1.8.0\n */\nexport type PropGetter<T extends (...args: any) => any> = <P>(props?: P) => ReturnType<T> & P;\n/**\n * @deprecated since version ^1.8.0\n */\n/** @deprecated */\nexport type PropGetterReturn<T extends (...args: any) => any> = Partial<ReturnType<T>>;\n/** @deprecated */\nexport type PropGetterFn = <T extends {}>(props?: T) => T & { [key: string]: unknown };\n/** @deprecated */\nexport type Merge<Props, HTMLProps> = Props & Omit<HTMLProps, keyof Props>;\n/** @deprecated */\nexport type MergeGetters<G1 extends (...args: any) => any, G2 extends (...args: any) => any> = <P>(\n props?: P,\n) => Merge<ReturnType<G1>, ReturnType<G2>> & P;\n\nconst Root: Root = undefined as any;\n\nexport { Root };\n\n/** @deprecated */\nabstract class RootComponent<\n Props = {},\n Context = {},\n State = {},\n Enhance extends readonly ((...args: any[]) => any)[] = [],\n> extends PureComponent<Props, State> {\n get handlers(): Readonly<IRootComponentHandlers> {\n return {};\n }\n\n get asProps() {\n return {} as Readonly<\n Merge<\n Props &\n IRootComponentProps<Props, Context> &\n Intergalactic.InternalTypings.ExtractEnhanceType<Enhance>,\n AllHTMLAttributes<any>\n >\n >;\n }\n\n Root: Root = undefined as any;\n\n isControlled = false;\n}\n\nexport const Component = RootComponent;\n/** @deprecated */\nexport type Component<\n Props = {},\n Context = {},\n State = {},\n Handlers extends IRootComponentHandlers = IRootComponentHandlers,\n> = React.ComponentClass<Props, State> & {\n isControlled: boolean;\n\n handlers: Readonly<Handlers>;\n\n asProps: Readonly<Merge<Props & IRootComponentProps<Props, Context>, AllHTMLAttributes<any>>>;\n\n Root: Root;\n};\n\nexport namespace Intergalactic {\n type ReactFCProps<C extends React.FC> = C extends React.FC<infer Props> ? Omit<Props, 'tag'> : {};\n type ReactComponentProps<C extends React.ComponentClass> = C extends React.ComponentClass<\n infer Props\n >\n ? Omit<Props, 'tag'>\n : never;\n type ReactFCLike = (props: any) => any;\n type ReactFCLikeProps<C extends ReactFCLike> = C extends (props: infer Props) => any ? Props : {};\n type ComponentChildren<\n Props,\n Context,\n RenderingResult = InternalTypings.ReturnResult,\n AdditionalContext extends any[] = never[],\n > =\n | ((props: MergeProps<Context, Props>, ...args: AdditionalContext) => RenderingResult)\n | InternalTypings.ReturnResult;\n type ComponentBasicProps<Tag extends InternalTypings.ComponentTag> = {\n ref?: React.Ref<InternalTypings.ComponentHtmlElement<Tag> | null>;\n /** @private DO NOT USE IT. Low-level api that prevents specified props from being applied as DOM attribute. */\n __excludeProps?: string[];\n };\n type MergeProps<HighPriorityProps, LowPriorityProps> = {\n [K in keyof LowPriorityProps]: K extends keyof HighPriorityProps\n ? HighPriorityProps[K]\n : LowPriorityProps[K];\n } & HighPriorityProps;\n /** @private */\n export namespace InternalTypings {\n export type EfficientOmit<Type, Keys> = {\n [Property in keyof Type as Exclude<Property, Keys>]: Type[Property];\n };\n export type ExtractEnhanceType<F extends readonly ((...args: any[]) => any)[]> =\n F['length'] extends 0\n ? {}\n : F['length'] extends 1\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n }\n : F['length'] extends 2\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n }\n : F['length'] extends 3\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n }\n : F['length'] extends 4\n ? {\n [K in keyof ReturnType<F[0]>]: ReturnType<F[0]>[K];\n } & {\n [K in keyof ReturnType<F[1]>]: ReturnType<F[1]>[K];\n } & {\n [K in keyof ReturnType<F[2]>]: ReturnType<F[2]>[K];\n } & {\n [K in keyof ReturnType<F[3]>]: ReturnType<F[3]>[K];\n }\n : {};\n export type ComponentPropsNesting<Tag extends InternalTypings.ComponentTag> = Omit<\n MergeProps<\n Tag extends React.FC\n ? ReactFCProps<Tag>\n : Tag extends React.ComponentClass\n ? ReactComponentProps<Tag>\n : Tag extends ReactFCLike\n ? ReactFCLikeProps<Tag>\n : Tag extends keyof JSX.IntrinsicElements\n ? JSX.IntrinsicElements[Tag]\n : {},\n Tag extends { __nestedProps: infer NestedProps } ? NestedProps : {}\n >,\n 'children' | 'tag'\n >;\n export type ReturnResult =\n | React.ReactElement\n | React.ReactNode\n | React.ReactNode[]\n | string\n | null;\n export type ComponentTag =\n | keyof JSX.IntrinsicElements\n | React.ComponentClass\n | React.FC\n | ReactFCLike;\n export type ComponentProps<\n Tag extends ComponentTag,\n BaseTag extends ComponentTag | never,\n Props,\n Context = never,\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n ReturnResult,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<\n EfficientOmit<Props, 'tag' | 'children'>,\n MergeProps<ComponentPropsNesting<Tag>, ComponentPropsNesting<BaseTag>>\n >;\n export type PropsRenderingResultComponentProps<\n Tag extends ComponentTag,\n Props,\n Context = {},\n AdditionalContext extends any[] = never[],\n > = {\n tag?: Tag;\n children?: ComponentChildren<\n EfficientOmit<Props, 'children'> & { children: React.ReactNode },\n Context,\n Partial<\n EfficientOmit<\n MergeProps<Props, ComponentPropsNesting<Tag>>,\n 'children' | 'tag' | 'ref'\n > & {\n children?: React.ReactNode;\n }\n >,\n AdditionalContext\n >;\n } & ComponentBasicProps<Tag> &\n MergeProps<EfficientOmit<Props, 'tag' | 'children'>, ComponentPropsNesting<Tag>>;\n export type ComponentRenderingResults = React.ReactElement;\n export type ComponentAdditive<\n BaseTag extends ComponentTag,\n Tag extends ComponentTag,\n Props = {},\n Context = {},\n AdditionalContext = {},\n > = {\n __nestedProps: ComponentPropsNesting<BaseTag>;\n __tag: Tag;\n __props: Props;\n __context: Context;\n __additionalContext: AdditionalContext;\n displayName: string;\n };\n export type InferJsxIntrinsicElement<T extends React.DetailedHTMLProps<any, any>> =\n T extends React.DetailedHTMLProps<infer _, infer Element> ? Element : HTMLElement;\n type InferElementFromRef<T> = T extends React.Ref<infer Element> ? Element : never;\n type InferRefElementFromProps<T> = 'ref' extends keyof T\n ? InferElementFromRef<T['ref']>\n : HTMLElement;\n export type ComponentHtmlElement<Tag extends ComponentTag> =\n Tag extends keyof JSX.IntrinsicElements\n ? InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>\n : Tag extends { __nestedProps: infer NestedProps }\n ? InferRefElementFromProps<NestedProps>\n : HTMLElement;\n export type UntypeRefAndTag<Props> = Intergalactic.InternalTypings.EfficientOmit<\n Props,\n 'ref' | 'tag'\n > & {\n ref: React.Ref<any>;\n tag: Intergalactic.InternalTypings.ComponentTag;\n };\n }\n export type Component<\n BaseTag extends InternalTypings.ComponentTag = never,\n BaseProps = {},\n Context = {},\n AdditionalContext extends any[] = never[],\n > = (<Tag extends InternalTypings.ComponentTag = BaseTag, Props extends BaseProps = BaseProps>(\n props: InternalTypings.ComponentProps<Tag, BaseTag, Props, Context, AdditionalContext>,\n ) => InternalTypings.ComponentRenderingResults) &\n InternalTypings.ComponentAdditive<BaseTag, Tag, BaseProps, Context, AdditionalContext>;\n export type Tag = InternalTypings.ComponentTag;\n export type DomProps<Tag extends keyof JSX.IntrinsicElements> =\n InternalTypings.InferJsxIntrinsicElement<JSX.IntrinsicElements[Tag]>;\n export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<\n T,\n Exclude<keyof T, Keys>\n > &\n {\n [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;\n }[Keys];\n}\n\nexport const wrapIntergalacticComponent = <\n Component extends Intergalactic.Component<any, any, any, any>,\n PropsExtending = {},\n>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<Component>\n > &\n PropsExtending,\n ) => React.ReactNode,\n): Intergalactic.Component<\n Component['__tag'],\n Component['__props'] & Component['__nestedProps'] & PropsExtending,\n Component['__context'],\n Component['__additionalContext']\n> => wrapper as any;\n\nexport type PropsAndRef<T, Ctx, UCProps> = PropsWithRenderFnChildren<T, Ctx, UCProps> &\n RefAttributes<unknown>;\nexport type ForwardRefComponent<T, Ctx, UCProps> = ForwardRefExoticComponent<\n PropsAndRef<T, Ctx, UCProps>\n>;\ntype ComponentOrProps<T, Context, UCProps> = T extends [infer ParentProps, infer ChildProps]\n ? ComponentType<ParentProps, ChildProps, Context, UCProps>\n : ForwardRefComponent<T, Context, UCProps>;\n\nexport type ComponentType<\n ComponentProps,\n ChildComponentProps = {},\n ContextType = {},\n UCProps = {},\n FNType = null,\n> = (FNType extends null\n ? ForwardRefComponent<ComponentProps, ContextType, UCProps>\n : FNType & { displayName: string }) & {\n [K in keyof ChildComponentProps]: ComponentOrProps<ChildComponentProps[K], ContextType, UCProps>;\n} & {\n [CORE_COMPONENT]: boolean;\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AAA,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":"UnknownProperties.mjs","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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reshadow.d.mjs","names":[],"sources":["../../src/core-types/reshadow.d.ts"],"sourcesContent":["declare module 'hoist-non-react-statics' {\n const hoistNonReactStatics: any;\n export default hoistNonReactStatics;\n}\n"],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PARENT_COMPONENTS = exports.INHERITED_NAME = exports.CREATE_COMPONENT = exports.CORE_INSTANCE = exports.CORE_INIT = exports.CORE_COMPONENT = exports.CORE_AS_PROPS = exports.CONTEXT_COMPONENT = exports.CHILDREN_COMPONENT = void 0;
|
|
7
|
-
var CORE_COMPONENT = Symbol('CORE_COMPONENT');
|
|
8
|
-
exports.CORE_COMPONENT = CORE_COMPONENT;
|
|
9
|
-
var CORE_INSTANCE = Symbol('CORE_INSTANCE');
|
|
10
|
-
exports.CORE_INSTANCE = CORE_INSTANCE;
|
|
11
|
-
var CORE_AS_PROPS = Symbol('CORE_AS_PROPS');
|
|
12
|
-
exports.CORE_AS_PROPS = CORE_AS_PROPS;
|
|
13
|
-
var CORE_INIT = Symbol('CORE_INIT');
|
|
14
|
-
exports.CORE_INIT = CORE_INIT;
|
|
15
|
-
var CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');
|
|
16
|
-
exports.CONTEXT_COMPONENT = CONTEXT_COMPONENT;
|
|
17
|
-
var CREATE_COMPONENT = Symbol('CREATE_COMPONENT');
|
|
18
|
-
exports.CREATE_COMPONENT = CREATE_COMPONENT;
|
|
19
|
-
var PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');
|
|
20
|
-
exports.PARENT_COMPONENTS = PARENT_COMPONENTS;
|
|
21
|
-
var CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');
|
|
22
|
-
exports.CHILDREN_COMPONENT = CHILDREN_COMPONENT;
|
|
23
|
-
var INHERITED_NAME = Symbol('INHERITED_NAME');
|
|
24
|
-
exports.INHERITED_NAME = INHERITED_NAME;
|
|
25
|
-
//# sourceMappingURL=symbols.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.js","names":["CORE_COMPONENT","Symbol","exports","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":";;;;;;AAAO,IAAMA,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AAACC,OAAA,CAAAF,cAAA,GAAAA,cAAA;AAChD,IAAMG,aAAa,GAAGF,MAAM,CAAC,eAAe,CAAC;AAACC,OAAA,CAAAC,aAAA,GAAAA,aAAA;AAC9C,IAAMC,aAAa,GAAGH,MAAM,CAAC,eAAe,CAAC;AAACC,OAAA,CAAAE,aAAA,GAAAA,aAAA;AAC9C,IAAMC,SAAS,GAAGJ,MAAM,CAAC,WAAW,CAAC;AAACC,OAAA,CAAAG,SAAA,GAAAA,SAAA;AACtC,IAAMC,iBAAiB,GAAGL,MAAM,CAAC,mBAAmB,CAAC;AAACC,OAAA,CAAAI,iBAAA,GAAAA,iBAAA;AACtD,IAAMC,gBAAgB,GAAGN,MAAM,CAAC,kBAAkB,CAAC;AAACC,OAAA,CAAAK,gBAAA,GAAAA,gBAAA;AACpD,IAAMC,iBAAiB,GAAGP,MAAM,CAAC,mBAAmB,CAAC;AAACC,OAAA,CAAAM,iBAAA,GAAAA,iBAAA;AACtD,IAAMC,kBAAkB,GAAGR,MAAM,CAAC,oBAAoB,CAAC;AAACC,OAAA,CAAAO,kBAAA,GAAAA,kBAAA;AACxD,IAAMC,cAAc,GAAGT,MAAM,CAAC,gBAAgB,CAAC;AAACC,OAAA,CAAAQ,cAAA,GAAAA,cAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symbols.mjs","names":["CORE_COMPONENT","Symbol","CORE_INSTANCE","CORE_AS_PROPS","CORE_INIT","CONTEXT_COMPONENT","CREATE_COMPONENT","PARENT_COMPONENTS","CHILDREN_COMPONENT","INHERITED_NAME"],"sources":["../../src/core-types/symbols.ts"],"sourcesContent":["export const CORE_COMPONENT = Symbol('CORE_COMPONENT');\nexport const CORE_INSTANCE = Symbol('CORE_INSTANCE');\nexport const CORE_AS_PROPS = Symbol('CORE_AS_PROPS');\nexport const CORE_INIT = Symbol('CORE_INIT');\nexport const CONTEXT_COMPONENT = Symbol('CONTEXT_COMPONENT');\nexport const CREATE_COMPONENT = Symbol('CREATE_COMPONENT');\nexport const PARENT_COMPONENTS = Symbol('PARENT_COMPONENTS');\nexport const CHILDREN_COMPONENT = Symbol('CHILDREN_COMPONENT');\nexport const INHERITED_NAME = Symbol('INHERITED_NAME');\n"],"mappings":"AAAA,OAAO,IAAMA,cAAc,GAAGC,MAAM,CAAC,gBAAgB,CAAC;AACtD,OAAO,IAAMC,aAAa,GAAGD,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,IAAME,aAAa,GAAGF,MAAM,CAAC,eAAe,CAAC;AACpD,OAAO,IAAMG,SAAS,GAAGH,MAAM,CAAC,WAAW,CAAC;AAC5C,OAAO,IAAMI,iBAAiB,GAAGJ,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,IAAMK,gBAAgB,GAAGL,MAAM,CAAC,kBAAkB,CAAC;AAC1D,OAAO,IAAMM,iBAAiB,GAAGN,MAAM,CAAC,mBAAmB,CAAC;AAC5D,OAAO,IAAMO,kBAAkB,GAAGP,MAAM,CAAC,oBAAoB,CAAC;AAC9D,OAAO,IAAMQ,cAAc,GAAGR,MAAM,CAAC,gBAAgB,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
var _symbols = require("../core-types/symbols");
|
|
14
|
-
var _excluded = ["handlers", "getters"],
|
|
15
|
-
_excluded2 = ["handlers"];
|
|
16
|
-
var CHILDREN_SELF = Symbol('CHILDREN_SELF');
|
|
17
|
-
var GETTER_REG = /^get[\w]+Props$/;
|
|
18
|
-
function splitPropsAndGetters(props) {
|
|
19
|
-
return Object.entries(props).reduce(function (acc, _ref) {
|
|
20
|
-
var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
|
|
21
|
-
key = _ref2[0],
|
|
22
|
-
value = _ref2[1];
|
|
23
|
-
if (GETTER_REG.exec(key) === null) {
|
|
24
|
-
acc.props[key] = value;
|
|
25
|
-
} else {
|
|
26
|
-
acc.getters[key] = value;
|
|
27
|
-
}
|
|
28
|
-
return acc;
|
|
29
|
-
}, {
|
|
30
|
-
props: {},
|
|
31
|
-
getters: {}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function getterToArray(getter) {
|
|
35
|
-
if (!Array.isArray(getter)) {
|
|
36
|
-
return typeof getter === 'function' ? [getter] : [];
|
|
37
|
-
}
|
|
38
|
-
return getter;
|
|
39
|
-
}
|
|
40
|
-
function mergeObjects() {
|
|
41
|
-
var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
42
|
-
var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
43
|
-
var core = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, a), b);
|
|
44
|
-
return Object.keys(core).reduce(function (acc, key) {
|
|
45
|
-
a[key] = getterToArray(a[key]);
|
|
46
|
-
b[key] = getterToArray(b[key]);
|
|
47
|
-
acc[key] = [].concat((0, _toConsumableArray2["default"])(a[key]), (0, _toConsumableArray2["default"])(b[key]));
|
|
48
|
-
return acc;
|
|
49
|
-
}, {});
|
|
50
|
-
}
|
|
51
|
-
function assignGettersChain(getters) {
|
|
52
|
-
return function () {
|
|
53
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
54
|
-
return getters.reduce(function (acc, getter) {
|
|
55
|
-
return getter(acc);
|
|
56
|
-
}, props);
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function createChildren(Context, contexts) {
|
|
60
|
-
var Children = function Children() {
|
|
61
|
-
var children = Children.origin;
|
|
62
|
-
if (typeof children === 'function') {
|
|
63
|
-
var _reduce = [].concat((0, _toConsumableArray2["default"])(contexts), [Context]).reduce(function (acc, ctx) {
|
|
64
|
-
var _ref3 = _react["default"].useContext(ctx),
|
|
65
|
-
handlers = _ref3.handlers,
|
|
66
|
-
propsAndGetters = (0, _objectWithoutProperties2["default"])(_ref3, _excluded2);
|
|
67
|
-
var _splitPropsAndGetters = splitPropsAndGetters(propsAndGetters),
|
|
68
|
-
props = _splitPropsAndGetters.props,
|
|
69
|
-
getters = _splitPropsAndGetters.getters;
|
|
70
|
-
return Object.assign({}, acc, (0, _objectSpread2["default"])({
|
|
71
|
-
handlers: Object.assign({}, acc.handlers, handlers),
|
|
72
|
-
getters: mergeObjects(acc.getters, getters)
|
|
73
|
-
}, props));
|
|
74
|
-
}, Children.props),
|
|
75
|
-
_reduce$handlers = _reduce.handlers,
|
|
76
|
-
handlers = _reduce$handlers === void 0 ? {} : _reduce$handlers,
|
|
77
|
-
_reduce$getters = _reduce.getters,
|
|
78
|
-
getters = _reduce$getters === void 0 ? {} : _reduce$getters,
|
|
79
|
-
props = (0, _objectWithoutProperties2["default"])(_reduce, _excluded);
|
|
80
|
-
var mergedGetters = Object.entries(getters).reduce(function (acc, _ref4) {
|
|
81
|
-
var _ref5 = (0, _slicedToArray2["default"])(_ref4, 2),
|
|
82
|
-
key = _ref5[0],
|
|
83
|
-
value = _ref5[1];
|
|
84
|
-
acc[key] = assignGettersChain(value);
|
|
85
|
-
return acc;
|
|
86
|
-
}, {});
|
|
87
|
-
return children((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), mergedGetters), handlers);
|
|
88
|
-
} else if (children === undefined) {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
return children;
|
|
92
|
-
};
|
|
93
|
-
Children.origin = null;
|
|
94
|
-
Children.props = {};
|
|
95
|
-
Children[_symbols.CHILDREN_COMPONENT] = true;
|
|
96
|
-
return Children;
|
|
97
|
-
}
|
|
98
|
-
function Enhancement(Context, parent) {
|
|
99
|
-
return {
|
|
100
|
-
init: function init() {
|
|
101
|
-
var contexts = (Array.isArray(parent) ? parent : [parent]).map(function (component) {
|
|
102
|
-
return component[_symbols.CONTEXT_COMPONENT];
|
|
103
|
-
}).filter(Boolean);
|
|
104
|
-
this[CHILDREN_SELF] = createChildren(Context, contexts);
|
|
105
|
-
},
|
|
106
|
-
asProps: function asProps(props) {
|
|
107
|
-
// TODO: learn the reason what it was used for (by lsroman)
|
|
108
|
-
// this[CHILDREN_SELF].origin = _Children ? _Children.origin : children;
|
|
109
|
-
this[CHILDREN_SELF].origin = props.children;
|
|
110
|
-
this[CHILDREN_SELF].props = props;
|
|
111
|
-
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
112
|
-
Children: this[CHILDREN_SELF]
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
var _default = Enhancement;
|
|
118
|
-
exports["default"] = _default;
|
|
119
|
-
//# sourceMappingURL=Children.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Children.js","names":["_react","_interopRequireDefault","require","_symbols","_excluded","_excluded2","CHILDREN_SELF","Symbol","GETTER_REG","splitPropsAndGetters","props","Object","entries","reduce","acc","_ref","_ref2","_slicedToArray2","key","value","exec","getters","getterToArray","getter","Array","isArray","mergeObjects","a","arguments","length","undefined","b","core","_objectSpread2","keys","concat","_toConsumableArray2","assignGettersChain","createChildren","Context","contexts","Children","children","origin","_reduce","ctx","_ref3","React","useContext","handlers","propsAndGetters","_objectWithoutProperties2","_splitPropsAndGetters","assign","_reduce$handlers","_reduce$getters","mergedGetters","_ref4","_ref5","CHILDREN_COMPONENT","Enhancement","parent","init","map","component","CONTEXT_COMPONENT","filter","Boolean","asProps","_default","exports"],"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 = props;\n return {\n ...props,\n Children: this[CHILDREN_SELF],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA8E,IAAAE,SAAA;EAAAC,UAAA;AAE9E,IAAMC,aAAa,GAAGC,MAAM,CAAC,eAAe,CAAC;AAE7C,IAAMC,UAAU,GAAG,iBAAiB;AAEpC,SAASC,oBAAoBA,CAACC,KAAU,EAAE;EACxC,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,MAAM,CACjC,UAACC,GAAQ,EAAAC,IAAA,EAAmB;IAAA,IAAAC,KAAA,OAAAC,eAAA,aAAAF,IAAA;MAAhBG,GAAG,GAAAF,KAAA;MAAEG,KAAK,GAAAH,KAAA;IACpB,IAAIR,UAAU,CAACY,IAAI,CAACF,GAAG,CAAC,KAAK,IAAI,EAAE;MACjCJ,GAAG,CAACJ,KAAK,CA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AACA,MAAM,CAAC,EACxDE,GAAG,CAAC,UAACC,SAAS;QAAA,OAAKA,SAAS,CAACC,0BAAiB,CAAC;MAAA,EAAC,CAChDC,MAAM,CAACC,OAAO,CAAC;MAClB,IAAI,CAAC7D,aAAa,CAAC,GAAGgC,cAAc,CAACC,OAAO,EAAEC,QAAQ,CAAC;IACzD,CAAC;IACD4B,OAAO,EAAE,SAAAA,QAAqB1D,KAAU,EAAE;MACxC;MACA;MACA,IAAI,CAACJ,aAAa,CAAC,CAACqC,MAAM,GAAGjC,KAAK,CAACgC,QAAQ;MAC3C,IAAI,CAACpC,aAAa,CAAC,CAACI,KAAK,GAAGA,KAAK;MACjC,WAAAuB,cAAA,iBAAAA,cAAA,iBACKvB,KAAK;QACR+B,QAAQ,EAAE,IAAI,CAACnC,aAAa;MAAC;IAEjC;EACF,CAAC;AACH;AAAC,IAAA+D,QAAA,GAEcT,WAAW;AAAAU,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Children.mjs","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 = props;\n return {\n ...props,\n Children: this[CHILDREN_SELF],\n };\n },\n };\n}\n\nexport default Enhancement;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,2BAAuB;AAE7E,IAAMC,aAAa,GAAGC,MAAM,CAAC,eAAe,CAAC;AAE7C,IAAMC,UAAU,GAAG,iBAAiB;AAEpC,SAASC,oBAAoBA,CAACC,KAAU,EAAE;EACxC,OAAOC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,MAAM,CACjC,UAACC,GAAQ,EAAAC,IAAA,EAAmB;IAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAF,IAAA;MAAhBG,GAAG,GAAAF,KAAA;MAAEG,KAAK,GAAAH,KAAA;IACpB,IAAIR,UAAU,CAACY,IAAI,CAACF,GAAG,CAAC,KAAK,IAAI,EAAE;MACjCJ,GAAG,CAACJ,KAAK,CAACQ,GAAG,CAAC,GAAGC,KAAK;IACxB,CAAC,MAAM;MACLL,GAAG,CAACO,OAAO,CAACH,GAAG,CAAC,GAAGC,KAAK;IAC1B;IACA,OAAOL,GAAG;EACZ,CAAC,EACD;IAAEJ,KAAK,EAAE,CAAC,CAAC;IAAEW,OAAO,EAAE,CAAC;EAAE,CAAC,CAC3B;AACH;AAEA,SAASC,aAAaA,CAACC,MAAW,EAAE;EAClC,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,EAAE;IAC1B,OAAO,OAAOA,MAAM,KAAK,UAAU,GAAG,CAACA,MAAM,CAAC,GAAG,EAAE;EACrD;EACA,OAAOA,MAAM;AACf;AAEA,SAASG,YAAYA,CAAA,EAA2B;EAAA,IAA1BC,CAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAA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|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _assignProps = _interopRequireDefault(require("../utils/assignProps"));
|
|
13
|
-
var _ref4 = require("../utils/ref");
|
|
14
|
-
var _excluded = ["render"],
|
|
15
|
-
_excluded2 = ["Root", "styles", "children", "Children", "forwardRef"];
|
|
16
|
-
function createRootRender() {
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
var Root = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
19
|
-
var Tag = _ref.render,
|
|
20
|
-
source = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
21
|
-
var _Root$props = Root.props,
|
|
22
|
-
_Root = _Root$props.Root,
|
|
23
|
-
styles = _Root$props.styles,
|
|
24
|
-
children = _Root$props.children,
|
|
25
|
-
Children = _Root$props.Children,
|
|
26
|
-
_Root$props$forwardRe = _Root$props.forwardRef,
|
|
27
|
-
forwardRef = _Root$props$forwardRe === void 0 ? null : _Root$props$forwardRe,
|
|
28
|
-
props = (0, _objectWithoutProperties2["default"])(_Root$props, _excluded2);
|
|
29
|
-
var clearProps = Object.entries(props).reduce(function (props, _ref2) {
|
|
30
|
-
var _ref3 = (0, _slicedToArray2["default"])(_ref2, 2),
|
|
31
|
-
name = _ref3[0],
|
|
32
|
-
value = _ref3[1];
|
|
33
|
-
if (value !== undefined) {
|
|
34
|
-
props[name] = value;
|
|
35
|
-
}
|
|
36
|
-
return props;
|
|
37
|
-
}, {});
|
|
38
|
-
var child = {};
|
|
39
|
-
// TODO: need to find better check solution (by lsroman)
|
|
40
|
-
if (typeof Children.origin !== 'undefined') {
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
child.children = /*#__PURE__*/_react["default"].createElement(Children, null);
|
|
43
|
-
}
|
|
44
|
-
var other = (0, _assignProps["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, clearProps), {}, {
|
|
45
|
-
ref: (0, _ref4.useForkRef)(forwardRef, ref)
|
|
46
|
-
}), (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, child), source));
|
|
47
|
-
if (!Tag) {
|
|
48
|
-
throw new Error('`render` prop of Root is not provided');
|
|
49
|
-
}
|
|
50
|
-
if (Tag === _react["default"].Fragment) return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, other.children);
|
|
51
|
-
return /*#__PURE__*/_react["default"].createElement(Tag, other);
|
|
52
|
-
});
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
Root.props = {};
|
|
55
|
-
return Root;
|
|
56
|
-
}
|
|
57
|
-
function Enhancement() {
|
|
58
|
-
return {
|
|
59
|
-
init: function init() {
|
|
60
|
-
this.Root = createRootRender();
|
|
61
|
-
},
|
|
62
|
-
asProps: function asProps(props, WrapperComponent, isFunction) {
|
|
63
|
-
if (isFunction) {
|
|
64
|
-
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, {
|
|
65
|
-
Root: this.Root
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return props;
|
|
69
|
-
},
|
|
70
|
-
render: function render(_render, props) {
|
|
71
|
-
this.Root.props = props;
|
|
72
|
-
return _render;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
var _default = Enhancement;
|
|
77
|
-
exports["default"] = _default;
|
|
78
|
-
//# sourceMappingURL=Root.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Root.js","names":["_react","_interopRequireDefault","require","_assignProps","_ref4","_excluded","_excluded2","createRootRender","Root","React","forwardRef","_ref","ref","Tag","render","source","_objectWithoutProperties2","_Root$props","props","_Root","styles","children","Children","_Root$props$forwardRe","clearProps","Object","entries","reduce","_ref2","_ref3","_slicedToArray2","name","value","undefined","child","origin","createElement","other","assignProps","_objectSpread2","useForkRef","Error","Fragment","Enhancement","init","asProps","WrapperComponent","isFunction","_default","exports"],"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,IAAAA,MAAA,GAAAC,s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 @@
|
|
|
1
|
-
{"version":3,"file":"Root.mjs","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,0BAAsB;AAC9C,SAASC,UAAU,QAA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AU,CAACG,UAAU,EAAEE,GAAG;IAAC,IAAA4B,aAAA,CAAAA,aAAA,KAG7BJ,KAAK,GACLrB,MAAM,EAEZ;IACD,IAAI,CAACF,GAAG,EAAE;MACR,MAAM,IAAI4B,KAAK,CAAC,uCAAuC,CAAC;IAC1D;IACA,IAAI5B,GAAG,KAAKR,KAAK,CAACqC,QAAQ,EAAE,oBAAOrC,KAAA,CAAAiC,aAAA,CAACjC,KAAK,CAACqC,QAAQ,QAAEH,KAAK,CAACjB,QAAQ,CAAkB;IAEpF,oBAAOjB,KAAA,CAAAiC,aAAA,CAACzB,GAAG,EAAK0B,KAAK,CAAI;EAC3B,CAAC,CAAC;EACF;EACA9B,IAAI,CAACU,KAAK,GAAG,CAAC,CAAC;EACf,OAAOV,IAAI;AACb;AAEA,SAASkC,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,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
function arraysEqual(a, b) {
|
|
8
|
-
if (a.length !== b.length) return false;
|
|
9
|
-
for (var i = 0; i < a.length; i++) {
|
|
10
|
-
if (a[i] !== b[i]) return false;
|
|
11
|
-
}
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
function handlerBinder(fn) {
|
|
15
|
-
return function () {
|
|
16
|
-
for (var _len = arguments.length, depsArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
-
depsArgs[_key] = arguments[_key];
|
|
18
|
-
}
|
|
19
|
-
var memoizeds = [];
|
|
20
|
-
if (handlerBinder.hasher.has(fn)) {
|
|
21
|
-
memoizeds = handlerBinder.hasher.get(fn);
|
|
22
|
-
var memoized = memoizeds.find(function (memoized) {
|
|
23
|
-
return arraysEqual(memoized.deps, depsArgs);
|
|
24
|
-
});
|
|
25
|
-
if (memoized) return memoized.fn;
|
|
26
|
-
}
|
|
27
|
-
var bindFn = fn.apply(void 0, depsArgs).bind(fn);
|
|
28
|
-
memoizeds.push({
|
|
29
|
-
deps: depsArgs,
|
|
30
|
-
fn: bindFn
|
|
31
|
-
});
|
|
32
|
-
handlerBinder.hasher.set(fn, memoizeds);
|
|
33
|
-
return bindFn;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
handlerBinder.hasher = new WeakMap();
|
|
37
|
-
function Enhancement() {
|
|
38
|
-
return {
|
|
39
|
-
condition: function condition(Component, isFunction) {
|
|
40
|
-
return !isFunction;
|
|
41
|
-
},
|
|
42
|
-
init: function init() {
|
|
43
|
-
var _this = this;
|
|
44
|
-
Object.keys(this).filter(function (field) {
|
|
45
|
-
return field.startsWith('bindHandler');
|
|
46
|
-
}).forEach(function (name) {
|
|
47
|
-
_this[name] = handlerBinder(_this[name].bind(_this));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
var _default = Enhancement;
|
|
53
|
-
exports["default"] = _default;
|
|
54
|
-
//# 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","_default","exports"],"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,EAA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,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;AAAC,IAAAQ,QAAA,GAEcb,WAAW;AAAAc,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bindHandler.mjs","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,CAA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AAa,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,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
function Enhancement() {
|
|
10
|
-
return {
|
|
11
|
-
wrapperProps: function wrapperProps(props, WrapperComponent) {
|
|
12
|
-
return (0, _objectSpread2["default"])({
|
|
13
|
-
'data-ui-name': WrapperComponent.displayName
|
|
14
|
-
}, props);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
var _default = Enhancement;
|
|
19
|
-
exports["default"] = _default;
|
|
20
|
-
//# sourceMappingURL=dataName.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataName.js","names":["Enhancement","wrapperProps","props","WrapperComponent","_objectSpread2","displayName","_default","exports"],"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,WAAAC,cAAA;QACE,cAAc,EAAED,gBAAgB,CAACE;MAAW,GACzCH,KAAK;IAEZ;EACF,CAAC;AACH;AAAC,IAAAI,QAAA,GAEcN,WAAW;AAAAO,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataName.mjs","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,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
function Enhancement() {
|
|
8
|
-
return {
|
|
9
|
-
condition: function condition(Component) {
|
|
10
|
-
var _Component$enhance;
|
|
11
|
-
return Boolean((_Component$enhance = Component.enhance) === null || _Component$enhance === void 0 ? void 0 : _Component$enhance.length);
|
|
12
|
-
},
|
|
13
|
-
wrapperProps: function wrapperProps(props, WrapperComponent) {
|
|
14
|
-
return WrapperComponent.enhance.reduce(function (acc, enhance) {
|
|
15
|
-
return enhance(acc);
|
|
16
|
-
}, props);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
var _default = Enhancement;
|
|
21
|
-
exports["default"] = _default;
|
|
22
|
-
//# 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","_default","exports"],"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;AAAC,IAAAI,QAAA,GAEcZ,WAAW;AAAAa,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhance.mjs","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,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
function Enhancement() {
|
|
8
|
-
var defaultProps = {};
|
|
9
|
-
return {
|
|
10
|
-
condition: function condition(Component) {
|
|
11
|
-
if (!Component.defaultProps) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
if (typeof Component.defaultProps === 'function') {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
return Boolean(Object.keys(Component.defaultProps).length);
|
|
18
|
-
},
|
|
19
|
-
"static": function _static(WrapperComponent) {
|
|
20
|
-
defaultProps = WrapperComponent.defaultProps;
|
|
21
|
-
return {
|
|
22
|
-
defaultProps: {}
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
wrapperProps: function wrapperProps(props) {
|
|
26
|
-
if (typeof defaultProps === 'function') {
|
|
27
|
-
// TODO: optimization
|
|
28
|
-
return Object.assign({}, defaultProps(props), props);
|
|
29
|
-
}
|
|
30
|
-
return Object.assign({}, defaultProps, props);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
var _default = Enhancement;
|
|
35
|
-
exports["default"] = _default;
|
|
36
|
-
//# 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","_default","exports"],"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;AAAC,IAAAE,QAAA,GAEcb,WAAW;AAAAc,OAAA,cAAAD,QAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functionDefaultProps.mjs","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"}
|