vevet 3.19.2 → 4.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -18
- package/lib/cjs/{Application → Vevet}/events/createOnPageLoad/index.js +7 -7
- package/lib/cjs/Vevet/events/createOnPageLoad/index.js.map +1 -0
- package/lib/cjs/Vevet/events/createOnPageLoad/types.js.map +1 -0
- package/lib/cjs/{Application → Vevet}/events/createViewport/index.js +19 -25
- package/lib/cjs/Vevet/events/createViewport/index.js.map +1 -0
- package/lib/cjs/Vevet/events/createViewport/types.js.map +1 -0
- package/lib/cjs/Vevet/exported.js +3 -0
- package/lib/cjs/Vevet/exported.js.map +1 -0
- package/lib/cjs/Vevet/global.js +3 -0
- package/lib/cjs/Vevet/global.js.map +1 -0
- package/lib/cjs/Vevet/index.js +94 -0
- package/lib/cjs/Vevet/index.js.map +1 -0
- package/lib/cjs/{Application → Vevet}/types.js.map +1 -1
- package/lib/cjs/{utils/internal → Vevet/utils}/fetchWebpSupport.js +1 -1
- package/lib/cjs/Vevet/utils/fetchWebpSupport.js.map +1 -0
- package/lib/cjs/Vevet/utils/getDeviceInfo.js.map +1 -0
- package/lib/cjs/base/Callbacks/index.js +65 -48
- package/lib/cjs/base/Callbacks/index.js.map +1 -1
- package/lib/cjs/base/Component/index.js +15 -4
- package/lib/cjs/base/Component/index.js.map +1 -1
- package/lib/cjs/base/Module/index.js +118 -64
- package/lib/cjs/base/Module/index.js.map +1 -1
- package/lib/cjs/base/MutableProps/index.js +30 -55
- package/lib/cjs/base/MutableProps/index.js.map +1 -1
- package/lib/cjs/base/Plugin/index.js +20 -1
- package/lib/cjs/base/Plugin/index.js.map +1 -1
- package/lib/cjs/components/AnimationFrame/index.js +14 -21
- package/lib/cjs/components/AnimationFrame/index.js.map +1 -1
- package/lib/cjs/components/Ctx2D/index.js +40 -25
- package/lib/cjs/components/Ctx2D/index.js.map +1 -1
- package/lib/cjs/components/Ctx2DPrerender/index.js +17 -7
- package/lib/cjs/components/Ctx2DPrerender/index.js.map +1 -1
- package/lib/cjs/components/CustomCursor/index.js +75 -51
- package/lib/cjs/components/CustomCursor/index.js.map +1 -1
- package/lib/cjs/components/{SmoothScroll → CustomScroll}/AnimatonFrame.js +2 -2
- package/lib/cjs/components/{SmoothScroll → CustomScroll}/AnimatonFrame.js.map +1 -1
- package/lib/cjs/components/{SmoothScroll → CustomScroll}/Elements.js +9 -9
- package/lib/cjs/components/{SmoothScroll → CustomScroll}/Elements.js.map +1 -1
- package/lib/cjs/components/{SmoothScroll → CustomScroll}/index.js +72 -66
- package/lib/cjs/components/CustomScroll/index.js.map +1 -0
- package/lib/cjs/components/CustomScroll/types.js.map +1 -0
- package/lib/cjs/components/{SmoothScrollDragPlugin → CustomScrollDragPlugin}/index.js +45 -44
- package/lib/cjs/components/CustomScrollDragPlugin/index.js.map +1 -0
- package/lib/cjs/components/CustomScrollDragPlugin/types.js.map +1 -0
- package/lib/cjs/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/index.js +51 -47
- package/lib/cjs/components/CustomScrollKeyboardPlugin/index.js.map +1 -0
- package/lib/cjs/components/CustomScrollKeyboardPlugin/types.js.map +1 -0
- package/lib/cjs/components/DraggerBase/index.js +74 -26
- package/lib/cjs/components/DraggerBase/index.js.map +1 -1
- package/lib/cjs/components/DraggerDirection/index.js +12 -6
- package/lib/cjs/components/DraggerDirection/index.js.map +1 -1
- package/lib/cjs/components/DraggerMove/index.js +44 -13
- package/lib/cjs/components/DraggerMove/index.js.map +1 -1
- package/lib/cjs/components/Marquee/index.js +240 -160
- package/lib/cjs/components/Marquee/index.js.map +1 -1
- package/lib/cjs/components/Preloader/index.js +45 -16
- package/lib/cjs/components/Preloader/index.js.map +1 -1
- package/lib/cjs/components/ProgressPreloader/index.js +79 -41
- package/lib/cjs/components/ProgressPreloader/index.js.map +1 -1
- package/lib/cjs/components/ProgressPreloader/utils/preloadCustomElement.js +12 -1
- package/lib/cjs/components/ProgressPreloader/utils/preloadCustomElement.js.map +1 -1
- package/lib/cjs/components/ScrollBar/Bar/index.js +90 -36
- package/lib/cjs/components/ScrollBar/Bar/index.js.map +1 -1
- package/lib/cjs/components/ScrollBar/index.js +59 -20
- package/lib/cjs/components/ScrollBar/index.js.map +1 -1
- package/lib/cjs/components/ScrollView/index.js +56 -20
- package/lib/cjs/components/ScrollView/index.js.map +1 -1
- package/lib/cjs/components/SectionScrollProgress/index.js +68 -31
- package/lib/cjs/components/SectionScrollProgress/index.js.map +1 -1
- package/lib/cjs/components/SlideProgress/index.js +72 -38
- package/lib/cjs/components/SlideProgress/index.js.map +1 -1
- package/lib/cjs/components/SplitText/index.js +52 -23
- package/lib/cjs/components/SplitText/index.js.map +1 -1
- package/lib/cjs/components/SplitText/utils/splitBase.js +6 -1
- package/lib/cjs/components/SplitText/utils/splitBase.js.map +1 -1
- package/lib/cjs/components/SplitText/utils/wrapLetters.js +11 -3
- package/lib/cjs/components/SplitText/utils/wrapLetters.js.map +1 -1
- package/lib/cjs/components/SplitText/utils/wrapLines.js +11 -5
- package/lib/cjs/components/SplitText/utils/wrapLines.js.map +1 -1
- package/lib/cjs/components/SplitText/utils/wrapWords.js +13 -2
- package/lib/cjs/components/SplitText/utils/wrapWords.js.map +1 -1
- package/lib/cjs/components/Timeline/index.js +77 -21
- package/lib/cjs/components/Timeline/index.js.map +1 -1
- package/lib/cjs/components/index.js +4 -4
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/index.js +10 -3
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types/index.js +19 -0
- package/lib/cjs/types/index.js.map +1 -0
- package/lib/cjs/utils/common/PCancelable.js +16 -0
- package/lib/cjs/utils/common/PCancelable.js.map +1 -1
- package/lib/cjs/utils/common/normalizedTimeoutCallback.js +19 -4
- package/lib/cjs/utils/common/normalizedTimeoutCallback.js.map +1 -1
- package/lib/cjs/utils/common/objectKeys.js +11 -1
- package/lib/cjs/utils/common/objectKeys.js.map +1 -1
- package/lib/cjs/utils/common/pickObjectProps.js +14 -2
- package/lib/cjs/utils/common/pickObjectProps.js.map +1 -1
- package/lib/cjs/utils/common/times.js +12 -3
- package/lib/cjs/utils/common/times.js.map +1 -1
- package/lib/cjs/utils/common/uid.js +4 -2
- package/lib/cjs/utils/common/uid.js.map +1 -1
- package/lib/cjs/utils/image/load.js +3 -3
- package/lib/cjs/utils/image/load.js.map +1 -1
- package/lib/cjs/utils/image/pathsToProps.js +12 -5
- package/lib/cjs/utils/image/pathsToProps.js.map +1 -1
- package/lib/cjs/utils/image/sizesToSrcSet.js +7 -3
- package/lib/cjs/utils/image/sizesToSrcSet.js.map +1 -1
- package/lib/cjs/utils/internal/getApp.js +12 -0
- package/lib/cjs/utils/internal/getApp.js.map +1 -1
- package/lib/cjs/utils/listeners/isIntersectionObserverSupported.js +1 -1
- package/lib/cjs/utils/listeners/onResize.js +13 -12
- package/lib/cjs/utils/listeners/onResize.js.map +1 -1
- package/lib/cjs/utils/math/clamp.js +10 -5
- package/lib/cjs/utils/math/clamp.js.map +1 -1
- package/lib/cjs/utils/math/clampScope.js +8 -1
- package/lib/cjs/utils/math/clampScope.js.map +1 -1
- package/lib/cjs/utils/math/easing.js +6 -2
- package/lib/cjs/utils/math/easing.js.map +1 -1
- package/lib/cjs/utils/math/inScope.js +6 -3
- package/lib/cjs/utils/math/inScope.js.map +1 -1
- package/lib/cjs/utils/math/lerp.js +11 -3
- package/lib/cjs/utils/math/lerp.js.map +1 -1
- package/lib/cjs/utils/math/normalizeNestedScope.js +12 -3
- package/lib/cjs/utils/math/normalizeNestedScope.js.map +1 -1
- package/lib/cjs/utils/math/scoped.js +18 -7
- package/lib/cjs/utils/math/scoped.js.map +1 -1
- package/lib/cjs/utils/math/spreadScope.js +17 -3
- package/lib/cjs/utils/math/spreadScope.js.map +1 -1
- package/lib/cjs/utils/math/wrap.js +9 -3
- package/lib/cjs/utils/math/wrap.js.map +1 -1
- package/lib/cjs/utils/scroll/getScrollValues.js +13 -1
- package/lib/cjs/utils/scroll/getScrollValues.js.map +1 -1
- package/lib/cjs/utils/scroll/isPageScrolling.js +30 -0
- package/lib/cjs/utils/scroll/isPageScrolling.js.map +1 -1
- package/lib/cjs/utils/scroll/normalizeWheel.js +7 -2
- package/lib/cjs/utils/scroll/normalizeWheel.js.map +1 -1
- package/lib/cjs/utils/scroll/onScroll.js +14 -7
- package/lib/cjs/utils/scroll/onScroll.js.map +1 -1
- package/lib/cjs/utils/scroll/scrollTo.js +8 -7
- package/lib/cjs/utils/scroll/scrollTo.js.map +1 -1
- package/lib/cjs/utils/scroll/scrollToElement.js +8 -6
- package/lib/cjs/utils/scroll/scrollToElement.js.map +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/{Application → Vevet}/events/createOnPageLoad/index.js +7 -7
- package/lib/esm/Vevet/events/createOnPageLoad/index.js.map +1 -0
- package/lib/esm/Vevet/events/createOnPageLoad/types.js.map +1 -0
- package/lib/esm/{Application → Vevet}/events/createViewport/index.js +20 -26
- package/lib/esm/Vevet/events/createViewport/index.js.map +1 -0
- package/lib/esm/Vevet/events/createViewport/types.js.map +1 -0
- package/lib/esm/Vevet/exported.js +2 -0
- package/lib/esm/Vevet/exported.js.map +1 -0
- package/lib/esm/Vevet/global.js +2 -0
- package/lib/esm/Vevet/global.js.map +1 -0
- package/lib/esm/Vevet/index.js +72 -0
- package/lib/esm/Vevet/index.js.map +1 -0
- package/lib/esm/{Application → Vevet}/types.js.map +1 -1
- package/lib/esm/{utils/internal → Vevet/utils}/fetchWebpSupport.js +1 -1
- package/lib/esm/Vevet/utils/fetchWebpSupport.js.map +1 -0
- package/lib/esm/Vevet/utils/getDeviceInfo.js.map +1 -0
- package/lib/esm/base/Callbacks/index.js +66 -48
- package/lib/esm/base/Callbacks/index.js.map +1 -1
- package/lib/esm/base/Component/index.js +15 -4
- package/lib/esm/base/Component/index.js.map +1 -1
- package/lib/esm/base/Module/index.js +119 -65
- package/lib/esm/base/Module/index.js.map +1 -1
- package/lib/esm/base/MutableProps/index.js +35 -60
- package/lib/esm/base/MutableProps/index.js.map +1 -1
- package/lib/esm/base/Plugin/index.js +20 -1
- package/lib/esm/base/Plugin/index.js.map +1 -1
- package/lib/esm/components/AnimationFrame/index.js +14 -21
- package/lib/esm/components/AnimationFrame/index.js.map +1 -1
- package/lib/esm/components/Ctx2D/index.js +40 -25
- package/lib/esm/components/Ctx2D/index.js.map +1 -1
- package/lib/esm/components/Ctx2DPrerender/index.js +17 -7
- package/lib/esm/components/Ctx2DPrerender/index.js.map +1 -1
- package/lib/esm/components/CustomCursor/index.js +75 -51
- package/lib/esm/components/CustomCursor/index.js.map +1 -1
- package/lib/esm/components/{SmoothScroll → CustomScroll}/AnimatonFrame.js +2 -2
- package/lib/esm/components/{SmoothScroll → CustomScroll}/AnimatonFrame.js.map +1 -1
- package/lib/esm/components/{SmoothScroll → CustomScroll}/Elements.js +8 -8
- package/lib/esm/components/{SmoothScroll → CustomScroll}/Elements.js.map +1 -1
- package/lib/esm/components/{SmoothScroll → CustomScroll}/index.js +30 -24
- package/lib/esm/components/CustomScroll/index.js.map +1 -0
- package/lib/esm/components/CustomScroll/types.js.map +1 -0
- package/lib/esm/components/{SmoothScrollDragPlugin → CustomScrollDragPlugin}/index.js +28 -27
- package/lib/esm/components/CustomScrollDragPlugin/index.js.map +1 -0
- package/lib/esm/components/CustomScrollDragPlugin/types.js.map +1 -0
- package/lib/esm/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/index.js +37 -33
- package/lib/esm/components/CustomScrollKeyboardPlugin/index.js.map +1 -0
- package/lib/esm/components/CustomScrollKeyboardPlugin/types.js.map +1 -0
- package/lib/esm/components/DraggerBase/index.js +74 -28
- package/lib/esm/components/DraggerBase/index.js.map +1 -1
- package/lib/esm/components/DraggerDirection/index.js +12 -6
- package/lib/esm/components/DraggerDirection/index.js.map +1 -1
- package/lib/esm/components/DraggerMove/index.js +44 -13
- package/lib/esm/components/DraggerMove/index.js.map +1 -1
- package/lib/esm/components/Marquee/index.js +220 -161
- package/lib/esm/components/Marquee/index.js.map +1 -1
- package/lib/esm/components/Preloader/index.js +45 -16
- package/lib/esm/components/Preloader/index.js.map +1 -1
- package/lib/esm/components/ProgressPreloader/index.js +79 -40
- package/lib/esm/components/ProgressPreloader/index.js.map +1 -1
- package/lib/esm/components/ProgressPreloader/utils/preloadCustomElement.js +12 -1
- package/lib/esm/components/ProgressPreloader/utils/preloadCustomElement.js.map +1 -1
- package/lib/esm/components/ScrollBar/Bar/index.js +89 -32
- package/lib/esm/components/ScrollBar/Bar/index.js.map +1 -1
- package/lib/esm/components/ScrollBar/index.js +49 -15
- package/lib/esm/components/ScrollBar/index.js.map +1 -1
- package/lib/esm/components/ScrollView/index.js +56 -20
- package/lib/esm/components/ScrollView/index.js.map +1 -1
- package/lib/esm/components/SectionScrollProgress/index.js +68 -31
- package/lib/esm/components/SectionScrollProgress/index.js.map +1 -1
- package/lib/esm/components/SlideProgress/index.js +72 -38
- package/lib/esm/components/SlideProgress/index.js.map +1 -1
- package/lib/esm/components/SplitText/index.js +52 -23
- package/lib/esm/components/SplitText/index.js.map +1 -1
- package/lib/esm/components/SplitText/utils/splitBase.js +6 -1
- package/lib/esm/components/SplitText/utils/splitBase.js.map +1 -1
- package/lib/esm/components/SplitText/utils/wrapLetters.js +11 -3
- package/lib/esm/components/SplitText/utils/wrapLetters.js.map +1 -1
- package/lib/esm/components/SplitText/utils/wrapLines.js +11 -5
- package/lib/esm/components/SplitText/utils/wrapLines.js.map +1 -1
- package/lib/esm/components/SplitText/utils/wrapWords.js +13 -2
- package/lib/esm/components/SplitText/utils/wrapWords.js.map +1 -1
- package/lib/esm/components/Timeline/index.js +70 -22
- package/lib/esm/components/Timeline/index.js.map +1 -1
- package/lib/esm/components/index.js +4 -4
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/index.js +9 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types/index.js +3 -0
- package/lib/esm/types/index.js.map +1 -0
- package/lib/esm/utils/common/PCancelable.js +16 -0
- package/lib/esm/utils/common/PCancelable.js.map +1 -1
- package/lib/esm/utils/common/normalizedTimeoutCallback.js +19 -4
- package/lib/esm/utils/common/normalizedTimeoutCallback.js.map +1 -1
- package/lib/esm/utils/common/objectKeys.js +11 -1
- package/lib/esm/utils/common/objectKeys.js.map +1 -1
- package/lib/esm/utils/common/pickObjectProps.js +14 -2
- package/lib/esm/utils/common/pickObjectProps.js.map +1 -1
- package/lib/esm/utils/common/times.js +12 -3
- package/lib/esm/utils/common/times.js.map +1 -1
- package/lib/esm/utils/common/uid.js +4 -2
- package/lib/esm/utils/common/uid.js.map +1 -1
- package/lib/esm/utils/image/load.js +3 -3
- package/lib/esm/utils/image/load.js.map +1 -1
- package/lib/esm/utils/image/pathsToProps.js +12 -5
- package/lib/esm/utils/image/pathsToProps.js.map +1 -1
- package/lib/esm/utils/image/sizesToSrcSet.js +7 -3
- package/lib/esm/utils/image/sizesToSrcSet.js.map +1 -1
- package/lib/esm/utils/internal/getApp.js +12 -0
- package/lib/esm/utils/internal/getApp.js.map +1 -1
- package/lib/esm/utils/listeners/isIntersectionObserverSupported.js +1 -1
- package/lib/esm/utils/listeners/onResize.js +11 -12
- package/lib/esm/utils/listeners/onResize.js.map +1 -1
- package/lib/esm/utils/math/clamp.js +10 -5
- package/lib/esm/utils/math/clamp.js.map +1 -1
- package/lib/esm/utils/math/clampScope.js +8 -1
- package/lib/esm/utils/math/clampScope.js.map +1 -1
- package/lib/esm/utils/math/easing.js +6 -2
- package/lib/esm/utils/math/easing.js.map +1 -1
- package/lib/esm/utils/math/inScope.js +6 -3
- package/lib/esm/utils/math/inScope.js.map +1 -1
- package/lib/esm/utils/math/lerp.js +11 -3
- package/lib/esm/utils/math/lerp.js.map +1 -1
- package/lib/esm/utils/math/normalizeNestedScope.js +12 -3
- package/lib/esm/utils/math/normalizeNestedScope.js.map +1 -1
- package/lib/esm/utils/math/scoped.js +17 -6
- package/lib/esm/utils/math/scoped.js.map +1 -1
- package/lib/esm/utils/math/spreadScope.js +17 -3
- package/lib/esm/utils/math/spreadScope.js.map +1 -1
- package/lib/esm/utils/math/wrap.js +9 -3
- package/lib/esm/utils/math/wrap.js.map +1 -1
- package/lib/esm/utils/scroll/getScrollValues.js +13 -1
- package/lib/esm/utils/scroll/getScrollValues.js.map +1 -1
- package/lib/esm/utils/scroll/isPageScrolling.js +30 -0
- package/lib/esm/utils/scroll/isPageScrolling.js.map +1 -1
- package/lib/esm/utils/scroll/normalizeWheel.js +7 -2
- package/lib/esm/utils/scroll/normalizeWheel.js.map +1 -1
- package/lib/esm/utils/scroll/onScroll.js +14 -7
- package/lib/esm/utils/scroll/onScroll.js.map +1 -1
- package/lib/esm/utils/scroll/scrollTo.js +8 -7
- package/lib/esm/utils/scroll/scrollTo.js.map +1 -1
- package/lib/esm/utils/scroll/scrollToElement.js +8 -6
- package/lib/esm/utils/scroll/scrollToElement.js.map +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/styles/base.scss +0 -2
- package/lib/styles/components/CustomCursor.scss +7 -7
- package/{src/styles/components/SmoothScroll.scss → lib/styles/components/CustomScroll.scss} +3 -3
- package/lib/styles/components/Preloader.scss +1 -1
- package/lib/styles/components/ScrollBar.scss +4 -4
- package/lib/styles/components/index.scss +1 -1
- package/lib/styles/index.scss +0 -1
- package/lib/types/Vevet/events/createOnPageLoad/index.d.ts +3 -0
- package/lib/types/Vevet/events/createOnPageLoad/index.d.ts.map +1 -0
- package/lib/types/Vevet/events/createOnPageLoad/types.d.ts +20 -0
- package/lib/types/Vevet/events/createOnPageLoad/types.d.ts.map +1 -0
- package/lib/types/Vevet/events/createViewport/index.d.ts +4 -0
- package/lib/types/Vevet/events/createViewport/index.d.ts.map +1 -0
- package/lib/types/Vevet/events/createViewport/types.d.ts +85 -0
- package/lib/types/Vevet/events/createViewport/types.d.ts.map +1 -0
- package/lib/types/Vevet/exported.d.ts +6 -0
- package/lib/types/Vevet/exported.d.ts.map +1 -0
- package/lib/types/Vevet/global.d.ts +51 -0
- package/lib/types/Vevet/global.d.ts.map +1 -0
- package/lib/types/Vevet/index.d.ts +4 -0
- package/lib/types/Vevet/index.d.ts.map +1 -0
- package/lib/types/Vevet/types.d.ts +43 -0
- package/lib/types/Vevet/types.d.ts.map +1 -0
- package/lib/types/Vevet/utils/fetchWebpSupport.d.ts +3 -0
- package/lib/types/Vevet/utils/fetchWebpSupport.d.ts.map +1 -0
- package/lib/types/Vevet/utils/getDeviceInfo.d.ts.map +1 -0
- package/lib/types/base/Callbacks/index.d.ts +67 -46
- package/lib/types/base/Callbacks/index.d.ts.map +1 -1
- package/lib/types/base/Callbacks/types.d.ts +46 -14
- package/lib/types/base/Callbacks/types.d.ts.map +1 -1
- package/lib/types/base/Component/index.d.ts +19 -5
- package/lib/types/base/Component/index.d.ts.map +1 -1
- package/lib/types/base/Component/types.d.ts +15 -3
- package/lib/types/base/Component/types.d.ts.map +1 -1
- package/lib/types/base/Module/index.d.ts +124 -74
- package/lib/types/base/Module/index.d.ts.map +1 -1
- package/lib/types/base/Module/types.d.ts +29 -3
- package/lib/types/base/Module/types.d.ts.map +1 -1
- package/lib/types/base/MutableProps/index.d.ts +34 -77
- package/lib/types/base/MutableProps/index.d.ts.map +1 -1
- package/lib/types/base/MutableProps/types.d.ts +14 -8
- package/lib/types/base/MutableProps/types.d.ts.map +1 -1
- package/lib/types/base/Plugin/index.d.ts +24 -1
- package/lib/types/base/Plugin/index.d.ts.map +1 -1
- package/lib/types/base/Plugin/types.d.ts +11 -0
- package/lib/types/base/Plugin/types.d.ts.map +1 -1
- package/lib/types/components/AnimationFrame/index.d.ts +20 -18
- package/lib/types/components/AnimationFrame/index.d.ts.map +1 -1
- package/lib/types/components/AnimationFrame/types.d.ts +18 -3
- package/lib/types/components/AnimationFrame/types.d.ts.map +1 -1
- package/lib/types/components/Ctx2D/index.d.ts +37 -15
- package/lib/types/components/Ctx2D/index.d.ts.map +1 -1
- package/lib/types/components/Ctx2D/types.d.ts +40 -13
- package/lib/types/components/Ctx2D/types.d.ts.map +1 -1
- package/lib/types/components/Ctx2DPrerender/index.d.ts +13 -4
- package/lib/types/components/Ctx2DPrerender/index.d.ts.map +1 -1
- package/lib/types/components/Ctx2DPrerender/types.d.ts +13 -2
- package/lib/types/components/Ctx2DPrerender/types.d.ts.map +1 -1
- package/lib/types/components/CustomCursor/index.d.ts +59 -36
- package/lib/types/components/CustomCursor/index.d.ts.map +1 -1
- package/lib/types/components/CustomCursor/types.d.ts +52 -12
- package/lib/types/components/CustomCursor/types.d.ts.map +1 -1
- package/lib/types/components/{SmoothScroll → CustomScroll}/AnimatonFrame.d.ts.map +1 -1
- package/lib/types/components/{SmoothScroll → CustomScroll}/Elements.d.ts +3 -3
- package/lib/types/components/{SmoothScroll → CustomScroll}/Elements.d.ts.map +1 -1
- package/lib/types/components/{SmoothScroll → CustomScroll}/index.d.ts +46 -32
- package/lib/types/components/CustomScroll/index.d.ts.map +1 -0
- package/lib/types/components/CustomScroll/types.d.ts +137 -0
- package/lib/types/components/CustomScroll/types.d.ts.map +1 -0
- package/lib/types/components/CustomScrollDragPlugin/index.d.ts +62 -0
- package/lib/types/components/CustomScrollDragPlugin/index.d.ts.map +1 -0
- package/lib/types/components/CustomScrollDragPlugin/types.d.ts +52 -0
- package/lib/types/components/CustomScrollDragPlugin/types.d.ts.map +1 -0
- package/lib/types/components/CustomScrollKeyboardPlugin/index.d.ts +47 -0
- package/lib/types/components/CustomScrollKeyboardPlugin/index.d.ts.map +1 -0
- package/lib/types/components/CustomScrollKeyboardPlugin/types.d.ts +16 -0
- package/lib/types/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/types.d.ts.map +1 -1
- package/lib/types/components/DraggerBase/index.d.ts +93 -28
- package/lib/types/components/DraggerBase/index.d.ts.map +1 -1
- package/lib/types/components/DraggerBase/types.d.ts +21 -3
- package/lib/types/components/DraggerBase/types.d.ts.map +1 -1
- package/lib/types/components/DraggerDirection/index.d.ts +6 -2
- package/lib/types/components/DraggerDirection/index.d.ts.map +1 -1
- package/lib/types/components/DraggerDirection/types.d.ts +15 -1
- package/lib/types/components/DraggerDirection/types.d.ts.map +1 -1
- package/lib/types/components/DraggerMove/index.d.ts +38 -8
- package/lib/types/components/DraggerMove/index.d.ts.map +1 -1
- package/lib/types/components/DraggerMove/types.d.ts +15 -2
- package/lib/types/components/DraggerMove/types.d.ts.map +1 -1
- package/lib/types/components/Marquee/index.d.ts +59 -36
- package/lib/types/components/Marquee/index.d.ts.map +1 -1
- package/lib/types/components/Marquee/types.d.ts +18 -8
- package/lib/types/components/Marquee/types.d.ts.map +1 -1
- package/lib/types/components/Preloader/index.d.ts +52 -15
- package/lib/types/components/Preloader/index.d.ts.map +1 -1
- package/lib/types/components/Preloader/types.d.ts +16 -5
- package/lib/types/components/Preloader/types.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/index.d.ts +85 -25
- package/lib/types/components/ProgressPreloader/index.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/types.d.ts +51 -14
- package/lib/types/components/ProgressPreloader/types.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/utils/preloadCustomElement.d.ts +3 -0
- package/lib/types/components/ProgressPreloader/utils/preloadCustomElement.d.ts.map +1 -1
- package/lib/types/components/ScrollBar/Bar/index.d.ts +81 -16
- package/lib/types/components/ScrollBar/Bar/index.d.ts.map +1 -1
- package/lib/types/components/ScrollBar/Bar/types.d.ts +38 -16
- package/lib/types/components/ScrollBar/Bar/types.d.ts.map +1 -1
- package/lib/types/components/ScrollBar/index.d.ts +49 -12
- package/lib/types/components/ScrollBar/index.d.ts.map +1 -1
- package/lib/types/components/ScrollBar/types.d.ts +8 -6
- package/lib/types/components/ScrollBar/types.d.ts.map +1 -1
- package/lib/types/components/ScrollView/index.d.ts +65 -21
- package/lib/types/components/ScrollView/index.d.ts.map +1 -1
- package/lib/types/components/SectionScrollProgress/index.d.ts +83 -28
- package/lib/types/components/SectionScrollProgress/index.d.ts.map +1 -1
- package/lib/types/components/SectionScrollProgress/types.d.ts +15 -6
- package/lib/types/components/SectionScrollProgress/types.d.ts.map +1 -1
- package/lib/types/components/SlideProgress/index.d.ts +59 -24
- package/lib/types/components/SlideProgress/index.d.ts.map +1 -1
- package/lib/types/components/SlideProgress/types.d.ts +24 -15
- package/lib/types/components/SlideProgress/types.d.ts.map +1 -1
- package/lib/types/components/SplitText/index.d.ts +64 -18
- package/lib/types/components/SplitText/index.d.ts.map +1 -1
- package/lib/types/components/SplitText/types.d.ts +36 -8
- package/lib/types/components/SplitText/types.d.ts.map +1 -1
- package/lib/types/components/SplitText/utils/splitBase.d.ts +3 -1
- package/lib/types/components/SplitText/utils/splitBase.d.ts.map +1 -1
- package/lib/types/components/SplitText/utils/wrapLetters.d.ts +3 -1
- package/lib/types/components/SplitText/utils/wrapLetters.d.ts.map +1 -1
- package/lib/types/components/SplitText/utils/wrapLines.d.ts +3 -1
- package/lib/types/components/SplitText/utils/wrapLines.d.ts.map +1 -1
- package/lib/types/components/SplitText/utils/wrapWords.d.ts +3 -1
- package/lib/types/components/SplitText/utils/wrapWords.d.ts.map +1 -1
- package/lib/types/components/Timeline/index.d.ts +69 -21
- package/lib/types/components/Timeline/index.d.ts.map +1 -1
- package/lib/types/components/Timeline/types.d.ts +32 -7
- package/lib/types/components/Timeline/types.d.ts.map +1 -1
- package/lib/types/components/index.d.ts +4 -4
- package/lib/types/components/index.d.ts.map +1 -1
- package/lib/types/index.d.ts +9 -2
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/types/index.d.ts +3 -0
- package/lib/types/types/index.d.ts.map +1 -0
- package/lib/types/types/utility.d.ts +2 -3
- package/lib/types/types/utility.d.ts.map +1 -1
- package/lib/types/utils/common/PCancelable.d.ts +16 -0
- package/lib/types/utils/common/PCancelable.d.ts.map +1 -1
- package/lib/types/utils/common/normalizedTimeoutCallback.d.ts +19 -4
- package/lib/types/utils/common/normalizedTimeoutCallback.d.ts.map +1 -1
- package/lib/types/utils/common/objectKeys.d.ts +11 -1
- package/lib/types/utils/common/objectKeys.d.ts.map +1 -1
- package/lib/types/utils/common/pickObjectProps.d.ts +14 -2
- package/lib/types/utils/common/pickObjectProps.d.ts.map +1 -1
- package/lib/types/utils/common/times.d.ts +12 -3
- package/lib/types/utils/common/times.d.ts.map +1 -1
- package/lib/types/utils/common/uid.d.ts +4 -2
- package/lib/types/utils/common/uid.d.ts.map +1 -1
- package/lib/types/utils/image/load.d.ts +8 -5
- package/lib/types/utils/image/load.d.ts.map +1 -1
- package/lib/types/utils/image/pathsToProps.d.ts +10 -4
- package/lib/types/utils/image/pathsToProps.d.ts.map +1 -1
- package/lib/types/utils/image/sizesToSrcSet.d.ts +7 -3
- package/lib/types/utils/image/sizesToSrcSet.d.ts.map +1 -1
- package/lib/types/utils/internal/getApp.d.ts +9 -1
- package/lib/types/utils/internal/getApp.d.ts.map +1 -1
- package/lib/types/utils/listeners/isIntersectionObserverSupported.d.ts +1 -1
- package/lib/types/utils/listeners/onResize.d.ts +11 -12
- package/lib/types/utils/listeners/onResize.d.ts.map +1 -1
- package/lib/types/utils/math/clamp.d.ts +7 -2
- package/lib/types/utils/math/clamp.d.ts.map +1 -1
- package/lib/types/utils/math/clampScope.d.ts +8 -1
- package/lib/types/utils/math/clampScope.d.ts.map +1 -1
- package/lib/types/utils/math/easing.d.ts +4 -1
- package/lib/types/utils/math/easing.d.ts.map +1 -1
- package/lib/types/utils/math/inScope.d.ts +5 -2
- package/lib/types/utils/math/inScope.d.ts.map +1 -1
- package/lib/types/utils/math/lerp.d.ts +10 -2
- package/lib/types/utils/math/lerp.d.ts.map +1 -1
- package/lib/types/utils/math/normalizeNestedScope.d.ts +12 -3
- package/lib/types/utils/math/normalizeNestedScope.d.ts.map +1 -1
- package/lib/types/utils/math/scoped.d.ts +16 -5
- package/lib/types/utils/math/scoped.d.ts.map +1 -1
- package/lib/types/utils/math/spreadScope.d.ts +17 -3
- package/lib/types/utils/math/spreadScope.d.ts.map +1 -1
- package/lib/types/utils/math/wrap.d.ts +9 -3
- package/lib/types/utils/math/wrap.d.ts.map +1 -1
- package/lib/types/utils/scroll/getScrollValues.d.ts +13 -1
- package/lib/types/utils/scroll/getScrollValues.d.ts.map +1 -1
- package/lib/types/utils/scroll/isPageScrolling.d.ts +20 -0
- package/lib/types/utils/scroll/isPageScrolling.d.ts.map +1 -1
- package/lib/types/utils/scroll/normalizeWheel.d.ts +10 -2
- package/lib/types/utils/scroll/normalizeWheel.d.ts.map +1 -1
- package/lib/types/utils/scroll/onScroll.d.ts +10 -5
- package/lib/types/utils/scroll/onScroll.d.ts.map +1 -1
- package/lib/types/utils/scroll/scrollTo.d.ts +12 -9
- package/lib/types/utils/scroll/scrollTo.d.ts.map +1 -1
- package/lib/types/utils/scroll/scrollToElement.d.ts +9 -7
- package/lib/types/utils/scroll/scrollToElement.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +6 -7
- package/src/{Application → Vevet}/events/createOnPageLoad/index.ts +8 -8
- package/src/Vevet/events/createOnPageLoad/types.ts +21 -0
- package/src/{Application → Vevet}/events/createViewport/index.ts +33 -35
- package/src/{Application → Vevet}/events/createViewport/stories/index.tsx +7 -5
- package/src/Vevet/events/createViewport/types.ts +93 -0
- package/src/Vevet/exported.ts +15 -0
- package/src/Vevet/global.ts +51 -0
- package/src/Vevet/index.ts +98 -0
- package/src/{Application → Vevet}/stories/index.tsx +2 -2
- package/src/Vevet/types.ts +48 -0
- package/src/base/Callbacks/index.ts +70 -51
- package/src/base/Callbacks/types.ts +53 -14
- package/src/base/Component/index.ts +19 -5
- package/src/base/Component/types.ts +15 -3
- package/src/base/Module/index.ts +125 -78
- package/src/base/Module/types.ts +32 -3
- package/src/base/MutableProps/index.ts +44 -73
- package/src/base/MutableProps/types.ts +15 -8
- package/src/base/Plugin/index.ts +24 -1
- package/src/base/Plugin/types.ts +11 -0
- package/src/components/AnimationFrame/index.ts +21 -28
- package/src/components/AnimationFrame/types.ts +23 -3
- package/src/components/Ctx2D/index.ts +46 -34
- package/src/components/Ctx2D/types.ts +53 -13
- package/src/components/Ctx2DPrerender/index.ts +18 -7
- package/src/components/Ctx2DPrerender/types.ts +13 -2
- package/src/components/CustomCursor/index.ts +85 -60
- package/src/components/CustomCursor/stories/index.tsx +0 -3
- package/src/components/CustomCursor/types.ts +63 -12
- package/src/components/{SmoothScroll → CustomScroll}/AnimatonFrame.ts +2 -2
- package/src/components/{SmoothScroll → CustomScroll}/Elements.ts +14 -14
- package/src/components/{SmoothScroll → CustomScroll}/index.ts +61 -44
- package/src/components/{SmoothScroll → CustomScroll}/stories/Default.tsx +8 -8
- package/src/components/{SmoothScroll → CustomScroll}/stories/WithHorizontal.tsx +9 -9
- package/src/components/{SmoothScroll → CustomScroll}/stories/WithInnerLerp.tsx +9 -9
- package/src/components/{SmoothScroll → CustomScroll}/stories/index.stories.tsx +1 -1
- package/src/components/CustomScroll/types.ts +165 -0
- package/src/components/{SmoothScrollDragPlugin → CustomScrollDragPlugin}/index.ts +41 -41
- package/src/components/{SmoothScrollDragPlugin → CustomScrollDragPlugin}/stories/index.stories.tsx +1 -1
- package/src/components/{SmoothScrollDragPlugin → CustomScrollDragPlugin}/stories/index.tsx +10 -10
- package/src/components/CustomScrollDragPlugin/types.ts +59 -0
- package/src/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/index.ts +47 -43
- package/src/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/stories/index.stories.tsx +1 -1
- package/src/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/stories/index.tsx +10 -10
- package/src/components/{SmoothScrollKeyboardPlugin → CustomScrollKeyboardPlugin}/types.ts +6 -2
- package/src/components/DraggerBase/index.ts +101 -37
- package/src/components/DraggerBase/types.ts +25 -3
- package/src/components/DraggerDirection/index.ts +12 -6
- package/src/components/DraggerDirection/types.ts +18 -1
- package/src/components/DraggerMove/index.ts +44 -13
- package/src/components/DraggerMove/types.ts +17 -2
- package/src/components/Marquee/index.ts +255 -186
- package/src/components/Marquee/stories/index.tsx +16 -2
- package/src/components/Marquee/types.ts +18 -8
- package/src/components/Preloader/index.ts +56 -20
- package/src/components/Preloader/types.ts +18 -5
- package/src/components/ProgressPreloader/index.ts +104 -48
- package/src/components/ProgressPreloader/types.ts +65 -14
- package/src/components/ProgressPreloader/utils/preloadCustomElement.ts +13 -2
- package/src/components/ScrollBar/Bar/index.ts +112 -62
- package/src/components/ScrollBar/Bar/types.ts +46 -17
- package/src/components/ScrollBar/index.ts +65 -20
- package/src/components/ScrollBar/stories/{WithSmoothScrollComponent.tsx → WithCustomScrollComponent.tsx} +5 -5
- package/src/components/ScrollBar/stories/index.stories.tsx +3 -3
- package/src/components/ScrollBar/types.ts +10 -6
- package/src/components/ScrollView/index.ts +73 -27
- package/src/components/ScrollView/stories/index.tsx +5 -2
- package/src/components/SectionScrollProgress/index.ts +97 -41
- package/src/components/SectionScrollProgress/stories/WithCustomScroll.tsx +6 -6
- package/src/components/SectionScrollProgress/types.ts +19 -6
- package/src/components/SlideProgress/index.ts +78 -45
- package/src/components/SlideProgress/types.ts +24 -15
- package/src/components/SplitText/index.ts +71 -31
- package/src/components/SplitText/types.ts +48 -8
- package/src/components/SplitText/utils/splitBase.ts +6 -2
- package/src/components/SplitText/utils/wrapLetters.ts +11 -3
- package/src/components/SplitText/utils/wrapLines.ts +11 -5
- package/src/components/SplitText/utils/wrapWords.ts +14 -3
- package/src/components/Timeline/index.ts +98 -26
- package/src/components/Timeline/stories/index.stories.tsx +0 -5
- package/src/components/Timeline/types.ts +37 -7
- package/src/components/index.ts +4 -4
- package/src/index.ts +14 -4
- package/src/styles/base.scss +0 -2
- package/src/styles/components/CustomCursor.scss +7 -7
- package/{lib/styles/components/SmoothScroll.scss → src/styles/components/CustomScroll.scss} +3 -3
- package/src/styles/components/Preloader.scss +1 -1
- package/src/styles/components/ScrollBar.scss +4 -4
- package/src/styles/components/index.scss +1 -1
- package/src/styles/index.scss +0 -1
- package/src/types/index.ts +2 -0
- package/src/types/utility.ts +2 -2
- package/src/utils/common/PCancelable.ts +17 -0
- package/src/utils/common/normalizedTimeoutCallback.ts +19 -4
- package/src/utils/common/objectKeys.ts +12 -2
- package/src/utils/common/pickObjectProps.ts +16 -4
- package/src/utils/common/times.ts +12 -3
- package/src/utils/common/uid.ts +5 -3
- package/src/utils/image/load.ts +9 -4
- package/src/utils/image/pathsToProps.ts +12 -5
- package/src/utils/image/sizesToSrcSet.ts +7 -3
- package/src/utils/internal/getApp.ts +25 -0
- package/src/utils/listeners/isIntersectionObserverSupported.ts +1 -1
- package/src/utils/listeners/onResize.ts +16 -21
- package/src/utils/math/clamp.ts +10 -5
- package/src/utils/math/clampScope.ts +9 -2
- package/src/utils/math/easing.ts +6 -2
- package/src/utils/math/inScope.ts +6 -3
- package/src/utils/math/lerp.ts +11 -3
- package/src/utils/math/normalizeNestedScope.ts +12 -3
- package/src/utils/math/scoped.ts +17 -6
- package/src/utils/math/spreadScope.ts +17 -3
- package/src/utils/math/wrap.ts +9 -3
- package/src/utils/scroll/getScrollValues.ts +13 -1
- package/src/utils/scroll/isPageScrolling.ts +31 -0
- package/src/utils/scroll/normalizeWheel.ts +10 -2
- package/src/utils/scroll/onScroll.ts +18 -11
- package/src/utils/scroll/scrollTo.ts +16 -10
- package/src/utils/scroll/scrollToElement.ts +9 -7
- package/src/version.ts +1 -1
- package/lib/cjs/Application/events/createOnPageLoad/index.js.map +0 -1
- package/lib/cjs/Application/events/createOnPageLoad/types.js.map +0 -1
- package/lib/cjs/Application/events/createViewport/index.js.map +0 -1
- package/lib/cjs/Application/events/createViewport/types.js.map +0 -1
- package/lib/cjs/Application/index.js +0 -222
- package/lib/cjs/Application/index.js.map +0 -1
- package/lib/cjs/components/BaseTimeline/index.js +0 -125
- package/lib/cjs/components/BaseTimeline/index.js.map +0 -1
- package/lib/cjs/components/BaseTimeline/types.js.map +0 -1
- package/lib/cjs/components/SmoothScroll/index.js.map +0 -1
- package/lib/cjs/components/SmoothScroll/types.js.map +0 -1
- package/lib/cjs/components/SmoothScrollDragPlugin/index.js.map +0 -1
- package/lib/cjs/components/SmoothScrollDragPlugin/types.js.map +0 -1
- package/lib/cjs/components/SmoothScrollKeyboardPlugin/index.js.map +0 -1
- package/lib/cjs/components/SmoothScrollKeyboardPlugin/types.js +0 -3
- package/lib/cjs/components/SmoothScrollKeyboardPlugin/types.js.map +0 -1
- package/lib/cjs/utils/internal/fetchWebpSupport.js.map +0 -1
- package/lib/cjs/utils/internal/getDeviceInfo.js.map +0 -1
- package/lib/cjs/vevet.js +0 -6
- package/lib/cjs/vevet.js.map +0 -1
- package/lib/esm/Application/events/createOnPageLoad/index.js.map +0 -1
- package/lib/esm/Application/events/createOnPageLoad/types.js.map +0 -1
- package/lib/esm/Application/events/createViewport/index.js.map +0 -1
- package/lib/esm/Application/events/createViewport/types.js.map +0 -1
- package/lib/esm/Application/index.js +0 -134
- package/lib/esm/Application/index.js.map +0 -1
- package/lib/esm/components/BaseTimeline/index.js +0 -75
- package/lib/esm/components/BaseTimeline/index.js.map +0 -1
- package/lib/esm/components/BaseTimeline/types.js.map +0 -1
- package/lib/esm/components/SmoothScroll/index.js.map +0 -1
- package/lib/esm/components/SmoothScroll/types.js.map +0 -1
- package/lib/esm/components/SmoothScrollDragPlugin/index.js.map +0 -1
- package/lib/esm/components/SmoothScrollDragPlugin/types.js.map +0 -1
- package/lib/esm/components/SmoothScrollKeyboardPlugin/index.js.map +0 -1
- package/lib/esm/components/SmoothScrollKeyboardPlugin/types.js +0 -2
- package/lib/esm/components/SmoothScrollKeyboardPlugin/types.js.map +0 -1
- package/lib/esm/utils/internal/fetchWebpSupport.js.map +0 -1
- package/lib/esm/utils/internal/getDeviceInfo.js.map +0 -1
- package/lib/esm/vevet.js +0 -3
- package/lib/esm/vevet.js.map +0 -1
- package/lib/styles/globals/index.scss +0 -18
- package/lib/types/Application/events/createOnPageLoad/index.d.ts +0 -5
- package/lib/types/Application/events/createOnPageLoad/index.d.ts.map +0 -1
- package/lib/types/Application/events/createOnPageLoad/types.d.ts +0 -5
- package/lib/types/Application/events/createOnPageLoad/types.d.ts.map +0 -1
- package/lib/types/Application/events/createViewport/index.d.ts +0 -20
- package/lib/types/Application/events/createViewport/index.d.ts.map +0 -1
- package/lib/types/Application/events/createViewport/types.d.ts +0 -52
- package/lib/types/Application/events/createViewport/types.d.ts.map +0 -1
- package/lib/types/Application/index.d.ts +0 -89
- package/lib/types/Application/index.d.ts.map +0 -1
- package/lib/types/Application/types.d.ts +0 -41
- package/lib/types/Application/types.d.ts.map +0 -1
- package/lib/types/components/BaseTimeline/index.d.ts +0 -40
- package/lib/types/components/BaseTimeline/index.d.ts.map +0 -1
- package/lib/types/components/BaseTimeline/types.d.ts +0 -34
- package/lib/types/components/BaseTimeline/types.d.ts.map +0 -1
- package/lib/types/components/SmoothScroll/index.d.ts.map +0 -1
- package/lib/types/components/SmoothScroll/types.d.ts +0 -105
- package/lib/types/components/SmoothScroll/types.d.ts.map +0 -1
- package/lib/types/components/SmoothScrollDragPlugin/index.d.ts +0 -50
- package/lib/types/components/SmoothScrollDragPlugin/index.d.ts.map +0 -1
- package/lib/types/components/SmoothScrollDragPlugin/types.d.ts +0 -39
- package/lib/types/components/SmoothScrollDragPlugin/types.d.ts.map +0 -1
- package/lib/types/components/SmoothScrollKeyboardPlugin/index.d.ts +0 -31
- package/lib/types/components/SmoothScrollKeyboardPlugin/index.d.ts.map +0 -1
- package/lib/types/components/SmoothScrollKeyboardPlugin/types.d.ts +0 -12
- package/lib/types/utils/internal/fetchWebpSupport.d.ts +0 -3
- package/lib/types/utils/internal/fetchWebpSupport.d.ts.map +0 -1
- package/lib/types/utils/internal/getDeviceInfo.d.ts.map +0 -1
- package/lib/types/vevet.d.ts +0 -3
- package/lib/types/vevet.d.ts.map +0 -1
- package/src/Application/events/createOnPageLoad/types.ts +0 -5
- package/src/Application/events/createViewport/types.ts +0 -55
- package/src/Application/index.ts +0 -204
- package/src/Application/types.ts +0 -41
- package/src/components/BaseTimeline/index.ts +0 -123
- package/src/components/BaseTimeline/stories/Basic.tsx +0 -65
- package/src/components/BaseTimeline/stories/Nested.tsx +0 -108
- package/src/components/BaseTimeline/stories/index.stories.tsx +0 -16
- package/src/components/BaseTimeline/types.ts +0 -36
- package/src/components/SmoothScroll/types.ts +0 -114
- package/src/components/SmoothScrollDragPlugin/types.ts +0 -40
- package/src/components/Timeline/stories/Nested.tsx +0 -135
- package/src/styles/globals/index.scss +0 -18
- package/src/vevet.ts +0 -4
- /package/lib/cjs/{Application → Vevet}/events/createOnPageLoad/types.js +0 -0
- /package/lib/cjs/{Application → Vevet}/events/createViewport/types.js +0 -0
- /package/lib/cjs/{Application → Vevet}/types.js +0 -0
- /package/lib/cjs/{utils/internal → Vevet/utils}/getDeviceInfo.js +0 -0
- /package/lib/cjs/components/{BaseTimeline → CustomScroll}/types.js +0 -0
- /package/lib/cjs/components/{SmoothScroll → CustomScrollDragPlugin}/types.js +0 -0
- /package/lib/cjs/components/{SmoothScrollDragPlugin → CustomScrollKeyboardPlugin}/types.js +0 -0
- /package/lib/esm/{Application → Vevet}/events/createOnPageLoad/types.js +0 -0
- /package/lib/esm/{Application → Vevet}/events/createViewport/types.js +0 -0
- /package/lib/esm/{Application → Vevet}/types.js +0 -0
- /package/lib/esm/{utils/internal → Vevet/utils}/getDeviceInfo.js +0 -0
- /package/lib/esm/components/{BaseTimeline → CustomScroll}/types.js +0 -0
- /package/lib/esm/components/{SmoothScroll → CustomScrollDragPlugin}/types.js +0 -0
- /package/lib/esm/components/{SmoothScrollDragPlugin → CustomScrollKeyboardPlugin}/types.js +0 -0
- /package/lib/types/{utils/internal → Vevet/utils}/getDeviceInfo.d.ts +0 -0
- /package/lib/types/components/{SmoothScroll → CustomScroll}/AnimatonFrame.d.ts +0 -0
- /package/src/{Application → Vevet}/events/.eslintrc +0 -0
- /package/src/{Application → Vevet}/events/createViewport/stories/index.stories.tsx +0 -0
- /package/src/{Application → Vevet}/stories/index.stories.tsx +0 -0
- /package/src/{utils/internal → Vevet/utils}/fetchWebpSupport.ts +0 -0
- /package/src/{utils/internal → Vevet/utils}/getDeviceInfo.ts +0 -0
|
@@ -1,81 +1,121 @@
|
|
|
1
1
|
import { NComponent } from '../../base/Component/types';
|
|
2
2
|
export declare namespace NCustomCursor {
|
|
3
|
+
/**
|
|
4
|
+
* Static properties that do not change after initialization.
|
|
5
|
+
*/
|
|
3
6
|
interface IStaticProps extends NComponent.IStaticProps {
|
|
4
7
|
/**
|
|
5
|
-
*
|
|
8
|
+
* The container where the custom cursor will be active.
|
|
9
|
+
* Can be the `window`, a specific DOM element, or a string selector.
|
|
6
10
|
* @default window
|
|
7
11
|
*/
|
|
8
12
|
container: Window | Element | string;
|
|
9
13
|
/**
|
|
10
|
-
*
|
|
14
|
+
* Determines whether the native cursor should be hidden.
|
|
11
15
|
* @default false
|
|
12
16
|
*/
|
|
13
17
|
isNativeCursorHidden?: boolean;
|
|
14
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Changeable properties that can be updated dynamically during the lifecycle of the custom cursor.
|
|
21
|
+
*/
|
|
15
22
|
interface IChangeableProps extends NComponent.IChangeableProps {
|
|
16
23
|
/**
|
|
17
|
-
*
|
|
24
|
+
* Enables or disables the custom cursor.
|
|
18
25
|
* @default true
|
|
19
26
|
*/
|
|
20
27
|
isEnabled?: boolean;
|
|
21
28
|
/**
|
|
29
|
+
* The width of the custom cursor.
|
|
22
30
|
* @default 50
|
|
23
31
|
*/
|
|
24
32
|
width?: number;
|
|
25
33
|
/**
|
|
34
|
+
* The height of the custom cursor.
|
|
26
35
|
* @default 50
|
|
27
36
|
*/
|
|
28
37
|
height?: number;
|
|
29
38
|
/**
|
|
30
|
-
*
|
|
39
|
+
* Linear interpolation factor for smooth cursor movement.
|
|
40
|
+
* A value between `0` and `1` where higher values result in faster movement.
|
|
31
41
|
* @default 0.2
|
|
32
42
|
*/
|
|
33
43
|
lerp?: number;
|
|
34
44
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
45
|
+
* Normalizes the animation speed across different screens with varying FPS.
|
|
46
|
+
* Ensures consistent movement speed across different devices.
|
|
37
47
|
* @default true
|
|
38
48
|
*/
|
|
39
49
|
isFpsNormalized?: boolean;
|
|
40
50
|
/**
|
|
41
|
-
* Automatically
|
|
51
|
+
* Automatically stops rendering the cursor once the target coordinates and size
|
|
52
|
+
* approximate the current ones closely enough.
|
|
42
53
|
* @default true
|
|
43
54
|
*/
|
|
44
55
|
shouldAutoStop?: boolean;
|
|
45
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Types of callbacks available for the custom cursor component.
|
|
59
|
+
*/
|
|
46
60
|
interface ICallbacksTypes extends NComponent.ICallbacksTypes {
|
|
61
|
+
/**
|
|
62
|
+
* Triggered when the custom cursor is created.
|
|
63
|
+
* Provides access to the outer and inner HTML elements of the cursor.
|
|
64
|
+
*/
|
|
47
65
|
create: {
|
|
48
66
|
outerElement: HTMLElement;
|
|
49
67
|
innerElement: HTMLElement;
|
|
50
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Triggered on each render to update the cursor's position.
|
|
71
|
+
* Provides the current x and y coordinates.
|
|
72
|
+
*/
|
|
51
73
|
render: IVector2;
|
|
52
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Represents 2D vector coordinates for cursor position (x, y).
|
|
77
|
+
*/
|
|
53
78
|
interface IVector2 {
|
|
54
79
|
x: number;
|
|
55
80
|
y: number;
|
|
56
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Describes the cursor’s coordinates and size for rendering.
|
|
84
|
+
*/
|
|
57
85
|
interface ICoords {
|
|
58
86
|
x: number;
|
|
59
87
|
y: number;
|
|
60
88
|
width: number;
|
|
61
89
|
height: number;
|
|
62
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Information about the hovered element, which can affect cursor behavior.
|
|
93
|
+
*/
|
|
63
94
|
interface IHoveredElement {
|
|
64
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* The element currently being hovered over.
|
|
97
|
+
*/
|
|
65
98
|
element: Element;
|
|
66
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Whether the hover state should "stick" to the element,
|
|
101
|
+
* meaning the cursor remains over the element even after moving away.
|
|
102
|
+
*/
|
|
67
103
|
isSticky?: boolean;
|
|
68
104
|
/**
|
|
69
|
-
*
|
|
105
|
+
* The target width of the cursor when hovering over this element.
|
|
106
|
+
* Can be set to a specific number, `false` (no change), or `auto`.
|
|
70
107
|
* @default 'auto'
|
|
71
108
|
*/
|
|
72
109
|
width?: false | number | 'auto';
|
|
73
110
|
/**
|
|
74
|
-
*
|
|
111
|
+
* The target height of the cursor when hovering over this element.
|
|
112
|
+
* Can be set to a specific number, `false` (no change), or `auto`.
|
|
75
113
|
* @default 'auto'
|
|
76
114
|
*/
|
|
77
115
|
height?: false | number | 'auto';
|
|
78
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* Padding around the cursor when hovering over this element.
|
|
118
|
+
*/
|
|
79
119
|
padding?: number;
|
|
80
120
|
}
|
|
81
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomCursor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,YAAa,SAAQ,UAAU,CAAC,YAAY;QAC3D
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomCursor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,yBAAiB,aAAa,CAAC;IAC7B;;OAEG;IACH,UAAiB,YAAa,SAAQ,UAAU,CAAC,YAAY;QAC3D;;;;WAIG;QACH,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;QAErC;;;WAGG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC;IAED;;OAEG;IACH,UAAiB,gBAAiB,SAAQ,UAAU,CAAC,gBAAgB;QACnE;;;WAGG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;;;WAIG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;;WAIG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAE1B;;;;WAIG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B;IAED;;OAEG;IACH,UAAiB,eAAgB,SAAQ,UAAU,CAAC,eAAe;QACjE;;;WAGG;QACH,MAAM,EAAE;YACN,YAAY,EAAE,WAAW,CAAC;YAC1B,YAAY,EAAE,WAAW,CAAC;SAC3B,CAAC;QAEF;;;WAGG;QACH,MAAM,EAAE,QAAQ,CAAC;KAClB;IAED;;OAEG;IACH,UAAiB,QAAQ;QACvB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX;IAED;;OAEG;IACH,UAAiB,OAAO;QACtB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB;IAED;;OAEG;IACH,UAAiB,eAAe;QAC9B;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;QAEjB;;;WAGG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;;;WAIG;QACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAEhC;;;;WAIG;QACH,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAEjC;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatonFrame.d.ts","sourceRoot":"","sources":["../../../../src/components/
|
|
1
|
+
{"version":3,"file":"AnimatonFrame.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomScroll/AnimatonFrame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG1E,UAAU,MAAM;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,GAAG,EAAE,mBAAmB,GAAG,KAAK,CAAC;CAClC;AAED,qBAAa,cAAc;IAkBb,OAAO,CAAC,MAAM;IAjB1B,4BAA4B;IAC5B,OAAO,CAAC,IAAI,CAAC,CAAsB;IAEnC,OAAO,CAAC,MAAM,CAAC,CAA4B;IAE3C,OAAO,KAAK,GAAG,GAEd;IAED,IAAI,IAAI,WAEP;IAED,OAAO,KAAK,KAAK,GAEhB;gBAEmB,MAAM,EAAE,MAAM;IAE3B,MAAM;IAwBb,wBAAwB;IACjB,OAAO;IAOP,OAAO;CAKf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NCustomScroll } from './types';
|
|
2
2
|
type TPickedProps = 'elements' | 'hasWillChange' | 'translatePrecision';
|
|
3
|
-
interface IProps extends Required<Pick<
|
|
3
|
+
interface IProps extends Required<Pick<NCustomScroll.IStaticProps, TPickedProps>> {
|
|
4
4
|
container: Element;
|
|
5
5
|
wrapperClassName: string;
|
|
6
6
|
}
|
|
@@ -10,7 +10,7 @@ export declare class Elements {
|
|
|
10
10
|
get wrapper(): HTMLElement;
|
|
11
11
|
private _wrapperExists;
|
|
12
12
|
private _elements;
|
|
13
|
-
get elements():
|
|
13
|
+
get elements(): NCustomScroll.IElement[];
|
|
14
14
|
get props(): IProps;
|
|
15
15
|
constructor(_props: IProps);
|
|
16
16
|
/** Create scrollable wrapper */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Elements.d.ts","sourceRoot":"","sources":["../../../../src/components/
|
|
1
|
+
{"version":3,"file":"Elements.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomScroll/Elements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,KAAK,YAAY,GAAG,UAAU,GAAG,eAAe,GAAG,oBAAoB,CAAC;AAExE,UAAU,MACR,SAAQ,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,QAAQ;IAmBP,OAAO,CAAC,MAAM;IAlB1B,OAAO,CAAC,QAAQ,CAAe;IAE/B,IAAI,OAAO,gBAEV;IAED,OAAO,CAAC,cAAc,CAAW;IAEjC,OAAO,CAAC,SAAS,CAA4B;IAE7C,IAAI,QAAQ,6BAEX;IAED,IAAI,KAAK,WAER;gBAEmB,MAAM,EAAE,MAAM;IAKlC,gCAAgC;IAChC,OAAO,CAAC,cAAc;IAqBtB,iCAAiC;IACjC,OAAO,CAAC,eAAe;IAqBvB,kCAAkC;IAC3B,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAgBxD,OAAO,CAAC,WAAW;IAUnB,sBAAsB;IACf,MAAM;IAWb,8CAA8C;IACvC,UAAU;IAUV,OAAO;CAkBf"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Component as ComponentClass } from '../../base/Component';
|
|
3
|
-
import {
|
|
3
|
+
import { NCustomScroll } from './types';
|
|
4
4
|
import { IScrollLike } from '../../types/general';
|
|
5
5
|
import { Elements } from './Elements';
|
|
6
6
|
import { AnimationFrame } from './AnimatonFrame';
|
|
7
|
-
export type {
|
|
7
|
+
export type { NCustomScroll };
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Custom smooth scrolling component that replaces native scrolling behavior.
|
|
10
|
+
* It provides smooth interpolation, custom scroll events, and integration with other elements.
|
|
11
|
+
*
|
|
12
|
+
* @requires Requires styles: `@import '~vevet/lib/styles/components/CustomScroll';`
|
|
10
13
|
*/
|
|
11
|
-
export declare class
|
|
14
|
+
export declare class CustomScroll<StaticProps extends NCustomScroll.IStaticProps = NCustomScroll.IStaticProps, ChangeableProps extends NCustomScroll.IChangeableProps = NCustomScroll.IChangeableProps, CallbacksTypes extends NCustomScroll.ICallbacksTypes = NCustomScroll.ICallbacksTypes> extends ComponentClass<StaticProps, ChangeableProps, CallbacksTypes> implements IScrollLike {
|
|
12
15
|
protected _getDefaultProps(): {
|
|
13
16
|
container: string;
|
|
14
17
|
elements: boolean;
|
|
@@ -19,6 +22,7 @@ export declare class SmoothScroll<StaticProps extends NSmoothScroll.IStaticProps
|
|
|
19
22
|
translatePrecision: number;
|
|
20
23
|
isEnabled: boolean;
|
|
21
24
|
hasWheel: boolean;
|
|
25
|
+
wheelSpeed: number;
|
|
22
26
|
direction: string;
|
|
23
27
|
isInversedHandlerDirection: boolean;
|
|
24
28
|
shouldAutoStop: boolean;
|
|
@@ -28,79 +32,89 @@ export declare class SmoothScroll<StaticProps extends NSmoothScroll.IStaticProps
|
|
|
28
32
|
lerpApproximation: number;
|
|
29
33
|
};
|
|
30
34
|
get prefix(): string;
|
|
31
|
-
/** Scroll container */
|
|
35
|
+
/** Scroll container element */
|
|
32
36
|
protected _container: HTMLElement;
|
|
33
|
-
/** Scroll container */
|
|
37
|
+
/** Scroll container element */
|
|
34
38
|
get container(): HTMLElement;
|
|
39
|
+
/**
|
|
40
|
+
* Internal handler for the scroll elements
|
|
41
|
+
* @ignore
|
|
42
|
+
*/
|
|
35
43
|
protected _elements: Elements;
|
|
36
44
|
/**
|
|
37
|
-
* Scroll wrapper. If the element does not exist indide the `container`,
|
|
38
|
-
* it will be created automatically
|
|
45
|
+
* Scroll wrapper. If the element does not exist indide the `container`, it will be created automatically
|
|
39
46
|
*/
|
|
40
47
|
get wrapper(): HTMLElement;
|
|
41
|
-
/** `scrollLeft` target value */
|
|
48
|
+
/** The `scrollLeft` target value */
|
|
42
49
|
protected _targetLeft: number;
|
|
43
|
-
/** `scrollLeft` target value */
|
|
50
|
+
/** The `scrollLeft` target value */
|
|
44
51
|
get targetLeft(): number;
|
|
45
52
|
set targetLeft(value: number);
|
|
46
53
|
/** Update `targetLeft` without animation */
|
|
47
54
|
protected setTargetLeft(value: number): void;
|
|
48
|
-
/** `scrollTop` target value */
|
|
55
|
+
/** The `scrollTop` target value */
|
|
49
56
|
protected _targetTop: number;
|
|
50
|
-
/** `scrollTop` target value */
|
|
57
|
+
/** The `scrollTop` target value */
|
|
51
58
|
get targetTop(): number;
|
|
52
59
|
set targetTop(value: number);
|
|
53
60
|
/** Update `targetTop` without animation */
|
|
54
61
|
protected setTargetTop(value: number): void;
|
|
55
|
-
/** `scrollLeft` */
|
|
62
|
+
/** The current `scrollLeft` value */
|
|
56
63
|
protected _scrollLeft: number;
|
|
57
|
-
/** `scrollLeft` */
|
|
64
|
+
/** The current `scrollLeft` value */
|
|
58
65
|
get scrollLeft(): number;
|
|
59
66
|
set scrollLeft(value: number);
|
|
60
|
-
/** `scrollTop` */
|
|
67
|
+
/** The current `scrollTop` value */
|
|
61
68
|
protected _scrollTop: number;
|
|
62
|
-
/** `scrollTop` */
|
|
69
|
+
/** The current `scrollTop` value */
|
|
63
70
|
get scrollTop(): number;
|
|
64
71
|
set scrollTop(value: number);
|
|
65
|
-
/**
|
|
72
|
+
/** The scroll width of the container */
|
|
66
73
|
protected _scrollWidth: number;
|
|
67
|
-
/**
|
|
74
|
+
/** The scroll width of the container */
|
|
68
75
|
get scrollWidth(): number;
|
|
69
|
-
/**
|
|
76
|
+
/** The scroll height of the container */
|
|
70
77
|
protected _scrollHeight: number;
|
|
71
|
-
/**
|
|
78
|
+
/** The scroll width of the container */
|
|
72
79
|
get scrollHeight(): number;
|
|
73
|
-
/**
|
|
80
|
+
/** The container width */
|
|
74
81
|
protected _clientWidth: number;
|
|
75
|
-
/**
|
|
82
|
+
/** The container width */
|
|
76
83
|
get clientWidth(): number;
|
|
77
|
-
/**
|
|
84
|
+
/** The container height */
|
|
78
85
|
protected _clientHeight: number;
|
|
79
|
-
/**
|
|
86
|
+
/** The container height */
|
|
80
87
|
get clientHeight(): number;
|
|
81
|
-
/**
|
|
88
|
+
/** The wrapper width */
|
|
82
89
|
protected _wrapperWidth: number;
|
|
83
|
-
/**
|
|
90
|
+
/** The wrapper height */
|
|
84
91
|
protected _wrapperHeight: number;
|
|
85
92
|
/** Maximum scrollable area of the X axis */
|
|
86
93
|
get maxScrollableWidth(): number;
|
|
87
94
|
/** Maximum scrollable area of the Y axis */
|
|
88
95
|
get maxScrollableHeight(): number;
|
|
89
|
-
/**
|
|
96
|
+
/** The container has scroll */
|
|
90
97
|
get hasScroll(): boolean;
|
|
91
98
|
/** If the approximation between the target and current scroll values must be instantaneous */
|
|
92
99
|
protected _isInstant?: boolean;
|
|
93
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Animation frame
|
|
102
|
+
* @ignore
|
|
103
|
+
*/
|
|
94
104
|
protected _raf: AnimationFrame;
|
|
95
105
|
/** Frame index */
|
|
96
106
|
protected _frameIndex: number;
|
|
97
|
-
/**
|
|
107
|
+
/** Use equal lerp for all elements */
|
|
98
108
|
protected _isEqualLerp: boolean;
|
|
99
|
-
/**
|
|
109
|
+
/** Disable timeout */
|
|
100
110
|
protected _disableDelayDebounce?: NodeJS.Timeout;
|
|
101
|
-
|
|
111
|
+
/** If the component is a custom scroll */
|
|
112
|
+
get isCustomScroll(): boolean;
|
|
102
113
|
constructor(initialProps?: StaticProps & ChangeableProps, canInit?: boolean);
|
|
103
114
|
protected _init(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Sets the class names for the elements.
|
|
117
|
+
*/
|
|
104
118
|
protected _setClassNames(isActive: boolean): void;
|
|
105
119
|
/** Set events */
|
|
106
120
|
protected _setEvents(): void;
|
|
@@ -135,7 +149,7 @@ export declare class SmoothScroll<StaticProps extends NSmoothScroll.IStaticProps
|
|
|
135
149
|
/** Interpolate values */
|
|
136
150
|
protected _lerp(current: number, target: number, ease?: number): number;
|
|
137
151
|
/** Get lerp */
|
|
138
|
-
protected _getLerp(element?:
|
|
152
|
+
protected _getLerp(element?: NCustomScroll.IElement): number;
|
|
139
153
|
/** Scroll to */
|
|
140
154
|
scrollTo({ top, left, behavior }: ScrollToOptions): void;
|
|
141
155
|
/** Destroy the module */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomScroll/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;;;;GAKG;AACH,qBAAa,YAAY,CACrB,WAAW,SAAS,aAAa,CAAC,YAAY,GAAG,aAAa,CAAC,YAAY,EAC3E,eAAe,SACb,aAAa,CAAC,gBAAgB,GAAG,aAAa,CAAC,gBAAgB,EACjE,cAAc,SACZ,aAAa,CAAC,eAAe,GAAG,aAAa,CAAC,eAAe,CAEjE,SAAQ,cAAc,CAAC,WAAW,EAAE,eAAe,EAAE,cAAc,CACnE,YAAW,WAAW;IAEtB,SAAS,CAAC,gBAAgB;;;;;;;;;;;;;;;;;;;IAuB1B,IAAI,MAAM,WAET;IAED,+BAA+B;IAC/B,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;IAElC,+BAA+B;IAC/B,IAAI,SAAS,gBAEZ;IAED;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC;IAE9B;;OAEG;IACH,IAAI,OAAO,gBAEV;IAED,oCAAoC;IACpC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAE9B,oCAAoC;IACpC,IAAI,UAAU,WAEb;IAED,IAAI,UAAU,CAAC,KAAK,QAAA,EAGnB;IAED,4CAA4C;IAC5C,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM;IAIrC,mCAAmC;IACnC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAE7B,mCAAmC;IACnC,IAAI,SAAS,WAEZ;IAED,IAAI,SAAS,CAAC,KAAK,QAAA,EAGlB;IAED,2CAA2C;IAC3C,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM;IAIpC,qCAAqC;IACrC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAE9B,qCAAqC;IACrC,IAAI,UAAU,WAEb;IAED,IAAI,UAAU,CAAC,KAAK,QAAA,EAQnB;IAED,oCAAoC;IACpC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAE7B,oCAAoC;IACpC,IAAI,SAAS,WAEZ;IAED,IAAI,SAAS,CAAC,KAAK,QAAA,EAQlB;IAED,wCAAwC;IACxC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAE/B,wCAAwC;IACxC,IAAI,WAAW,WAEd;IAED,yCAAyC;IACzC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC;IAEhC,wCAAwC;IACxC,IAAI,YAAY,WAEf;IAED,0BAA0B;IAC1B,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAE/B,0BAA0B;IAC1B,IAAI,WAAW,WAEd;IAED,2BAA2B;IAC3B,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC;IAEhC,2BAA2B;IAC3B,IAAI,YAAY,WAEf;IAED,wBAAwB;IACxB,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC;IAEhC,yBAAyB;IACzB,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC;IAEjC,4CAA4C;IAC5C,IAAI,kBAAkB,WAErB;IAED,4CAA4C;IAC5C,IAAI,mBAAmB,WAEtB;IAED,+BAA+B;IAC/B,IAAI,SAAS,YAEZ;IAED,8FAA8F;IAC9F,SAAS,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,cAAc,CAAC;IAE/B,kBAAkB;IAClB,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAE9B,sCAAsC;IACtC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC;IAEhC,sBAAsB;IACtB,SAAS,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC;IAEjD,0CAA0C;IAC1C,IAAI,cAAc,YAEjB;gBAEW,YAAY,CAAC,EAAE,WAAW,GAAG,eAAe,EAAE,OAAO,UAAO;IAwDxE,SAAS,CAAC,KAAK;IAOf;;OAEG;IACH,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO;IAU1C,iBAAiB;IACjB,SAAS,CAAC,UAAU;IAepB,wBAAwB;IACxB,SAAS,CAAC,UAAU;IA8BpB,iCAAiC;IACjC,SAAS,CAAC,cAAc;IASxB,+BAA+B;IAC/B,SAAS,CAAC,YAAY;IAWtB,uBAAuB;IAChB,MAAM,CAAC,QAAQ,UAAQ;IAU9B,uBAAuB;IACvB,SAAS,CAAC,OAAO;IACf,yDAAyD;IACzD,QAAQ,UAAQ;IAuClB,qBAAqB;IACd,WAAW,CAAC,KAAK,EAAE,UAAU;IA0CpC,mDAAmD;IACnD,SAAS,CAAC,OAAO;IAQjB,uBAAuB;IACvB,SAAS,CAAC,OAAO;IAQjB,wBAAwB;IACxB,SAAS,CAAC,QAAQ;IAIlB,sBAAsB;IACf,MAAM;IAsBb,8BAA8B;IAC9B,SAAS,CAAC,iBAAiB;IAK3B,iCAAiC;IACjC,SAAS,CAAC,mBAAmB;IAqB7B,gEAAgE;IAChE,SAAS,CAAC,cAAc;IAgBxB,yBAAyB;IACzB,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,SAAkB;IASvE,eAAe;IACf,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,QAAQ;IAYnD,gBAAgB;IACT,QAAQ,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,eAAe;IAsBxD,yBAAyB;IACzB,SAAS,CAAC,QAAQ;CAcnB"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { NComponent } from '../../base/Component/types';
|
|
2
|
+
import { AnimationFrame } from '../AnimationFrame';
|
|
3
|
+
import { TOnResizeTarget } from '../../utils/listeners/onResize';
|
|
4
|
+
export declare namespace NCustomScroll {
|
|
5
|
+
interface IStaticProps extends NComponent.IStaticProps {
|
|
6
|
+
/**
|
|
7
|
+
* Selector or HTMLElement for the scrollable container.
|
|
8
|
+
* @default '#v-custom-scroll'
|
|
9
|
+
*/
|
|
10
|
+
container?: string | HTMLElement;
|
|
11
|
+
/**
|
|
12
|
+
* Defines the scrollable elements inside the wrapper. Can be a selector, a list of elements, or a single element.
|
|
13
|
+
* If set to `false`, no specific elements are defined.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
elements?: false | string | NodeListOf<HTMLElement> | HTMLElement | HTMLElement[];
|
|
17
|
+
/**
|
|
18
|
+
* Optional `AnimationFrame` instance to control scrolling animation externally.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
animationFrame?: false | AnimationFrame;
|
|
22
|
+
/**
|
|
23
|
+
* Target for the viewport resize event.
|
|
24
|
+
* @default 'any'
|
|
25
|
+
*/
|
|
26
|
+
viewportTarget?: TOnResizeTarget;
|
|
27
|
+
/**
|
|
28
|
+
* Timeout value for the resize event, useful for debouncing resize calculations.
|
|
29
|
+
* @default 0
|
|
30
|
+
*/
|
|
31
|
+
resizeDebounce?: number;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the `will-change` CSS property will be applied to the scrollable elements to improve performance.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
hasWillChange?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Sets precision for the `transform` property by limiting the number of decimal places.
|
|
39
|
+
* Helps prevent choppy scrolling caused by large decimal values in transforms.
|
|
40
|
+
* Set to `false` to disable precision rounding.
|
|
41
|
+
* @default 2
|
|
42
|
+
*/
|
|
43
|
+
translatePrecision?: false | number;
|
|
44
|
+
}
|
|
45
|
+
interface IChangeableProps extends NComponent.IChangeableProps {
|
|
46
|
+
/**
|
|
47
|
+
* If `true`, scrolling is enabled.
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
isEnabled?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* If `true`, enables scrolling via mouse wheel.
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
hasWheel?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Defines the scroll speed multiplier for the mouse wheel.
|
|
58
|
+
* @default 1
|
|
59
|
+
*/
|
|
60
|
+
wheelSpeed?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Defines the main scrolling direction. Can be either horizontal or vertical.
|
|
63
|
+
* @default 'vertical'
|
|
64
|
+
*/
|
|
65
|
+
direction?: 'horizontal' | 'vertical';
|
|
66
|
+
/**
|
|
67
|
+
* Inverts the scroll direction. Useful for reversed scrolling behaviors.
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
isInversedHandlerDirection?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Automatically stops the animation frame when the target and current scroll values are equal.
|
|
73
|
+
* Improves performance by preventing unnecessary renders.
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
shouldAutoStop?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* If `true`, stops propagation of the scroll event to parent elements.
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
hasStopPropagation?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Linear interpolation factor for smooth scrolling. Scroll elements can override this value using the `customScrollLerp` property or the "data-custom-scroll-lerp" attribute.
|
|
84
|
+
* @default 0.1
|
|
85
|
+
*/
|
|
86
|
+
lerp?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Normalizes the scroll speed across different screens by accounting for varying FPS rates.
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
isFpsNormalized?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Approximation factor for interpolation, used to prevent animation from getting too slow at very small differences between current and target values.
|
|
94
|
+
* @default 0.1
|
|
95
|
+
*/
|
|
96
|
+
lerpApproximation?: number;
|
|
97
|
+
}
|
|
98
|
+
interface ICallbacksTypes extends NComponent.ICallbacksTypes {
|
|
99
|
+
/**
|
|
100
|
+
* Fired when the component renders a new scroll frame.
|
|
101
|
+
*/
|
|
102
|
+
render: undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Fired when the component or viewport is resized.
|
|
105
|
+
*/
|
|
106
|
+
resize: undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Fired when a scroll event is detected from a mouse wheel interaction.
|
|
109
|
+
*/
|
|
110
|
+
wheel: IWheelParameter;
|
|
111
|
+
}
|
|
112
|
+
interface IWheelParameter {
|
|
113
|
+
/**
|
|
114
|
+
* The original wheel event that triggered the scroll.
|
|
115
|
+
*/
|
|
116
|
+
event: WheelEvent;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Represents a scrollable element within the CustomScroll component.
|
|
120
|
+
* These elements can track custom scroll positions and include custom interpolation settings.
|
|
121
|
+
*/
|
|
122
|
+
interface IElement extends HTMLElement {
|
|
123
|
+
/**
|
|
124
|
+
* The current custom scroll top value for this element.
|
|
125
|
+
*/
|
|
126
|
+
customScrollTop: number;
|
|
127
|
+
/**
|
|
128
|
+
* The current custom scroll left value for this element.
|
|
129
|
+
*/
|
|
130
|
+
customScrollLeft: number;
|
|
131
|
+
/**
|
|
132
|
+
* Optional custom interpolation (lerp) value specific to this element.
|
|
133
|
+
*/
|
|
134
|
+
customScrollLerp?: number;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomScroll/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,YAAa,SAAQ,UAAU,CAAC,YAAY;QAC3D;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;QAEjC;;;;WAIG;QACH,QAAQ,CAAC,EACL,KAAK,GACL,MAAM,GACN,UAAU,CAAC,WAAW,CAAC,GACvB,WAAW,GACX,WAAW,EAAE,CAAC;QAElB;;;WAGG;QACH,cAAc,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;QAExC;;;WAGG;QACH,cAAc,CAAC,EAAE,eAAe,CAAC;QAEjC;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;;WAGG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QAExB;;;;;WAKG;QACH,kBAAkB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;KACrC;IAED,UAAiB,gBAAiB,SAAQ,UAAU,CAAC,gBAAgB;QACnE;;;WAGG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;;WAGG;QACH,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;QAEtC;;;WAGG;QACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;QAErC;;;;WAIG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;QAEzB;;;WAGG;QACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAE7B;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAE1B;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;IAED,UAAiB,eAAgB,SAAQ,UAAU,CAAC,eAAe;QACjE;;WAEG;QACH,MAAM,EAAE,SAAS,CAAC;QAElB;;WAEG;QACH,MAAM,EAAE,SAAS,CAAC;QAElB;;WAEG;QACH,KAAK,EAAE,eAAe,CAAC;KACxB;IAED,UAAiB,eAAe;QAC9B;;WAEG;QACH,KAAK,EAAE,UAAU,CAAC;KACnB;IAED;;;OAGG;IACH,UAAiB,QAAS,SAAQ,WAAW;QAC3C;;WAEG;QACH,eAAe,EAAE,MAAM,CAAC;QAExB;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;QAEzB;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Plugin } from '../../base/Plugin';
|
|
2
|
+
import { NCustomScrollDragPlugin } from './types';
|
|
3
|
+
import type { CustomScroll as CustomScrollInstance } from '../CustomScroll';
|
|
4
|
+
import { DraggerMove, NDraggerMove } from '../DraggerMove';
|
|
5
|
+
import { NCallbacks } from '../../base/Callbacks';
|
|
6
|
+
export type { NCustomScrollDragPlugin };
|
|
7
|
+
/**
|
|
8
|
+
* Plugin to add dragging functionality to a `CustomScroll` instance.
|
|
9
|
+
* It allows the user to control the scroll by dragging within the container.
|
|
10
|
+
*/
|
|
11
|
+
export declare class CustomScrollDragPlugin<StaticProp extends NCustomScrollDragPlugin.IStaticProps = NCustomScrollDragPlugin.IStaticProps, ChangeableProp extends NCustomScrollDragPlugin.IChangeableProps = NCustomScrollDragPlugin.IChangeableProps, CallbacksTypes extends NCustomScrollDragPlugin.ICallbacksTypes = NCustomScrollDragPlugin.ICallbacksTypes> extends Plugin<StaticProp, ChangeableProp, CallbacksTypes, CustomScrollInstance> {
|
|
12
|
+
protected _getDefaultProps(): {
|
|
13
|
+
isEnabled: boolean;
|
|
14
|
+
speed: number;
|
|
15
|
+
lerp: boolean;
|
|
16
|
+
stopPropagationThreshold: boolean;
|
|
17
|
+
stopPropagationDirection: string;
|
|
18
|
+
};
|
|
19
|
+
/** Instance of the DraggerMove component that handles dragging. */
|
|
20
|
+
protected _dragger?: DraggerMove;
|
|
21
|
+
/** List of callbacks added to the CustomScroll instance. */
|
|
22
|
+
protected _componentCallbacks?: NCallbacks.IAddedCallback[];
|
|
23
|
+
/** Holds the previous lerp value of the CustomScroll component. */
|
|
24
|
+
protected _prevComponentLerp?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether dragging is currently active.
|
|
27
|
+
*/
|
|
28
|
+
get isDragging(): boolean;
|
|
29
|
+
protected _init(): void;
|
|
30
|
+
protected _onPropsMutate(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Enables or disables the dragger based on the `isEnabled` property.
|
|
33
|
+
*/
|
|
34
|
+
protected _toggleDragger(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Adds the dragger functionality to the CustomScroll instance.
|
|
37
|
+
*/
|
|
38
|
+
protected _addDragger(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Removes the dragger and cleans up callbacks.
|
|
41
|
+
*/
|
|
42
|
+
protected _removeDragger(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Determines if dragging is possible based on the current scroll state.
|
|
45
|
+
*/
|
|
46
|
+
protected _getIsDragAvailable(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Handles the start of dragging.
|
|
49
|
+
*/
|
|
50
|
+
protected _handleDragStart(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Handles the dragging move event and updates scroll values.
|
|
53
|
+
*/
|
|
54
|
+
protected _handleDragMove({ event, coords, start, step, }: NDraggerMove.ICallbacksTypes['move']): void;
|
|
55
|
+
/**
|
|
56
|
+
* Handles the end of dragging and restores the scroll state.
|
|
57
|
+
*/
|
|
58
|
+
protected _handleDragEnd(): void;
|
|
59
|
+
/** Cleans up and destroys the plugin. */
|
|
60
|
+
protected _destroy(): void;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomScrollDragPlugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAExC;;;GAGG;AACH,qBAAa,sBAAsB,CACjC,UAAU,SACR,uBAAuB,CAAC,YAAY,GAAG,uBAAuB,CAAC,YAAY,EAC7E,cAAc,SACZ,uBAAuB,CAAC,gBAAgB,GAAG,uBAAuB,CAAC,gBAAgB,EACrF,cAAc,SACZ,uBAAuB,CAAC,eAAe,GAAG,uBAAuB,CAAC,eAAe,CACnF,SAAQ,MAAM,CACd,UAAU,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,CACrB;IACC,SAAS,CAAC,gBAAgB;;;;;;;IAW1B,mEAAmE;IACnE,SAAS,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEjC,4DAA4D;IAC5D,SAAS,CAAC,mBAAmB,CAAC,EAAE,UAAU,CAAC,cAAc,EAAE,CAAC;IAE5D,mEAAmE;IACnE,SAAS,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAEtC;;OAEG;IACH,IAAI,UAAU,YAEb;IAED,SAAS,CAAC,KAAK;IAMf,SAAS,CAAC,cAAc;IAMxB;;OAEG;IACH,SAAS,CAAC,cAAc;IAQxB;;OAEG;IACH,SAAS,CAAC,WAAW;IA4BrB;;OAEG;IACH,SAAS,CAAC,cAAc;IAYxB;;OAEG;IACH,SAAS,CAAC,mBAAmB;IAiB7B;;OAEG;IACH,SAAS,CAAC,gBAAgB;IAe1B;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,EACxB,KAAK,EACL,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC;IAqCvC;;OAEG;IACH,SAAS,CAAC,cAAc;IAcxB,yCAAyC;IACzC,SAAS,CAAC,QAAQ;CAKnB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { NPlugin } from '../../base/Plugin/types';
|
|
2
|
+
export declare namespace NCustomScrollDragPlugin {
|
|
3
|
+
interface IStaticProps extends NPlugin.IStaticProps {
|
|
4
|
+
}
|
|
5
|
+
interface IChangeableProps extends NPlugin.IChangeableProps {
|
|
6
|
+
/**
|
|
7
|
+
* Determines if the dragger functionality is enabled.
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
isEnabled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Defines the speed of the dragger movement.
|
|
13
|
+
* Higher values make the dragging movement faster.
|
|
14
|
+
* @default 1
|
|
15
|
+
*/
|
|
16
|
+
speed?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Custom linear interpolation (lerp) value for smooth scrolling.
|
|
19
|
+
* If set to `false`, the lerp value from the `CustomScroll` instance is used.
|
|
20
|
+
* Values range between 0 and 1, with 1 being an instant scroll.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
lerp?: number | false;
|
|
24
|
+
/**
|
|
25
|
+
* Threshold in pixels to stop the event propagation during a drag.
|
|
26
|
+
* If set to `false`, no threshold is applied.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
stopPropagationThreshold?: false | number;
|
|
30
|
+
/**
|
|
31
|
+
* Defines the direction in which to stop event propagation.
|
|
32
|
+
* Either the X-axis ('x') or the Y-axis ('y').
|
|
33
|
+
* @default 'y'
|
|
34
|
+
*/
|
|
35
|
+
stopPropagationDirection?: 'x' | 'y';
|
|
36
|
+
}
|
|
37
|
+
interface ICallbacksTypes extends NPlugin.ICallbacksTypes {
|
|
38
|
+
/**
|
|
39
|
+
* Fired when dragging starts.
|
|
40
|
+
*/
|
|
41
|
+
start: undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Fired while dragging is in progress.
|
|
44
|
+
*/
|
|
45
|
+
move: undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Fired when dragging ends.
|
|
48
|
+
*/
|
|
49
|
+
end: undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CustomScrollDragPlugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,yBAAiB,uBAAuB,CAAC;IACvC,UAAiB,YAAa,SAAQ,OAAO,CAAC,YAAY;KAAG;IAE7D,UAAiB,gBAAiB,SAAQ,OAAO,CAAC,gBAAgB;QAChE;;;WAGG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;;;WAIG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;;;WAKG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QAEtB;;;;WAIG;QACH,wBAAwB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;QAE1C;;;;WAIG;QACH,wBAAwB,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;KACtC;IAED,UAAiB,eAAgB,SAAQ,OAAO,CAAC,eAAe;QAC9D;;WAEG;QACH,KAAK,EAAE,SAAS,CAAC;QAEjB;;WAEG;QACH,IAAI,EAAE,SAAS,CAAC;QAEhB;;WAEG;QACH,GAAG,EAAE,SAAS,CAAC;KAChB;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Plugin } from '../../base/Plugin';
|
|
3
|
+
import { NCustomScrollKeyboardPlugin } from './types';
|
|
4
|
+
import type { CustomScroll as CustomScrollInstance } from '../CustomScroll';
|
|
5
|
+
export type { NCustomScrollKeyboardPlugin };
|
|
6
|
+
/**
|
|
7
|
+
* CustomScrollKeyboardPlugin adds keyboard navigation functionality to the `CustomScroll` component.
|
|
8
|
+
* It allows scrolling the container using keyboard arrow keys, space bar, page up/down, home, end, and tab.
|
|
9
|
+
*/
|
|
10
|
+
export declare class CustomScrollKeyboardPlugin<StaticProps extends NCustomScrollKeyboardPlugin.IStaticProps = NCustomScrollKeyboardPlugin.IStaticProps, ChangeableProps extends NCustomScrollKeyboardPlugin.IChangeableProps = NCustomScrollKeyboardPlugin.IChangeableProps, CallbacksTypes extends NCustomScrollKeyboardPlugin.ICallbacksTypes = NCustomScrollKeyboardPlugin.ICallbacksTypes> extends Plugin<StaticProps, ChangeableProps, CallbacksTypes, CustomScrollInstance> {
|
|
11
|
+
protected _getDefaultProps(): {
|
|
12
|
+
iterator: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Timeout for handling the Tab key navigation.
|
|
16
|
+
*/
|
|
17
|
+
protected _tabTimeout?: NodeJS.Timeout;
|
|
18
|
+
/** Initializes the plugin by adding event listeners for keyboard events. */
|
|
19
|
+
protected _init(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Determines if keyboard events should be ignored, based on the currently active element.
|
|
22
|
+
*/
|
|
23
|
+
protected _canIgnoreEvents(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the scroll container is visible in the viewport.
|
|
26
|
+
*/
|
|
27
|
+
protected _isInViewport(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Determines whether the scroll has reached its end.
|
|
30
|
+
*/
|
|
31
|
+
protected _checkIsEndOfScroll(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Handles the `keydown` event for navigating the scrollable container with the keyboard.
|
|
34
|
+
*/
|
|
35
|
+
protected _handleKeydown(event: KeyboardEvent): void;
|
|
36
|
+
/**
|
|
37
|
+
* Handles the Tab key for focusing elements inside the scrollable container and adjusting the scroll position.
|
|
38
|
+
*/
|
|
39
|
+
protected _handleTab(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Handles the Spacebar key to scroll down the container by a fixed amount.
|
|
42
|
+
*/
|
|
43
|
+
protected _handleSpace(event: KeyboardEvent): void;
|
|
44
|
+
/** Destroys the plugin and clears any timeouts or event listeners. */
|
|
45
|
+
protected _destroy(): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|