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,5 +1,5 @@
|
|
|
1
1
|
import { selectOne } from 'vevet-dom';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CustomScroll } from '../CustomScroll';
|
|
3
3
|
import { NScrollSectionProgress } from './types';
|
|
4
4
|
import { Component as ComponentClass } from '@/base/Component';
|
|
5
5
|
import { clampScope } from '@/utils/math';
|
|
@@ -10,7 +10,8 @@ import { getApp } from '@/utils/internal/getApp';
|
|
|
10
10
|
export type { NScrollSectionProgress };
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* `SectionScrollProgress` is a component that traces the scroll progress of a specified section.
|
|
14
|
+
* It provides the progress of entering the viewport, moving within it, and exiting it.
|
|
14
15
|
*/
|
|
15
16
|
export class SectionScrollProgress<
|
|
16
17
|
StaticProps extends
|
|
@@ -23,67 +24,99 @@ export class SectionScrollProgress<
|
|
|
23
24
|
protected _getDefaultProps() {
|
|
24
25
|
return {
|
|
25
26
|
...super._getDefaultProps(),
|
|
26
|
-
|
|
27
|
+
scrollContainer: window,
|
|
27
28
|
viewportTarget: 'any',
|
|
28
29
|
resizeTimeout: 0,
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
/**
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The container element in which the section is being scrolled.
|
|
35
|
+
*/
|
|
36
|
+
protected _scrollContainer: Element | CustomScroll | Window;
|
|
34
37
|
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Returns the scroll container.
|
|
40
|
+
*
|
|
41
|
+
* @returns {Element | CustomScroll | Window} The scroll container.
|
|
42
|
+
*/
|
|
36
43
|
get scrollContainer() {
|
|
37
44
|
return this._scrollContainer;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The section element that is being tracked for scroll progress.
|
|
49
|
+
*/
|
|
41
50
|
protected _section: Element;
|
|
42
51
|
|
|
43
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Returns the section element being tracked.
|
|
54
|
+
*/
|
|
44
55
|
get section() {
|
|
45
56
|
return this._section;
|
|
46
57
|
}
|
|
47
58
|
|
|
48
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Global scope of the scrolling section, from the point it enters to the point it exits the viewport.
|
|
61
|
+
*/
|
|
49
62
|
protected _scopeGlobal: [number, number];
|
|
50
63
|
|
|
51
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Returns the global scope of the scrolling section.
|
|
66
|
+
*/
|
|
52
67
|
get scopeGlobal() {
|
|
53
68
|
return this._scopeGlobal;
|
|
54
69
|
}
|
|
55
70
|
|
|
56
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Scope representing the section appearing from the bottom to the top of the viewport.
|
|
73
|
+
*/
|
|
57
74
|
protected _scopeIn: [number, number];
|
|
58
75
|
|
|
59
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Returns the scope of the section appearing in the viewport.
|
|
78
|
+
*/
|
|
60
79
|
get scopeIn() {
|
|
61
80
|
return this._scopeIn;
|
|
62
81
|
}
|
|
63
82
|
|
|
64
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Scope representing the movement of the section within the viewport.
|
|
85
|
+
*/
|
|
65
86
|
protected _scopeMove: [number, number];
|
|
66
87
|
|
|
67
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Returns the scope of the section moving through the viewport.
|
|
90
|
+
*/
|
|
68
91
|
get scopeMove() {
|
|
69
92
|
return this._scopeMove;
|
|
70
93
|
}
|
|
71
94
|
|
|
72
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Scope representing the section disappearing from the viewport, from bottom to top.
|
|
97
|
+
*/
|
|
73
98
|
protected _scopeOut: [number, number];
|
|
74
99
|
|
|
75
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Returns the scope of the section disappearing from the viewport.
|
|
102
|
+
*/
|
|
76
103
|
get scopeOut() {
|
|
77
104
|
return this._scopeOut;
|
|
78
105
|
}
|
|
79
106
|
|
|
80
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Tracks the previous progress of the global scroll.
|
|
109
|
+
*/
|
|
81
110
|
protected _prevProgressGlobal: number;
|
|
82
111
|
|
|
83
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Tracks the current global progress of the scroll through the section.
|
|
114
|
+
*/
|
|
84
115
|
protected _progressGlobal: number;
|
|
85
116
|
|
|
86
|
-
/**
|
|
117
|
+
/**
|
|
118
|
+
* Returns the current global progress of the scroll.
|
|
119
|
+
*/
|
|
87
120
|
get progressGlobal() {
|
|
88
121
|
return this._progressGlobal;
|
|
89
122
|
}
|
|
@@ -92,24 +125,27 @@ export class SectionScrollProgress<
|
|
|
92
125
|
this._progressGlobal = value;
|
|
93
126
|
}
|
|
94
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Throttling index to control how often the section's rendering calculations are performed.
|
|
130
|
+
*/
|
|
95
131
|
protected _frameThrottleIndex: number;
|
|
96
132
|
|
|
97
133
|
constructor(initialProps?: StaticProps & ChangeableProps, canInit = true) {
|
|
98
134
|
super(initialProps, false);
|
|
99
135
|
|
|
100
|
-
const {
|
|
136
|
+
const { scrollContainer, section } = this.props;
|
|
101
137
|
|
|
102
|
-
//
|
|
103
|
-
if (typeof
|
|
104
|
-
this._scrollContainer = selectOne(
|
|
138
|
+
// Get the scroll container
|
|
139
|
+
if (typeof scrollContainer === 'string') {
|
|
140
|
+
this._scrollContainer = selectOne(scrollContainer) as Element;
|
|
105
141
|
} else {
|
|
106
|
-
this._scrollContainer =
|
|
142
|
+
this._scrollContainer = scrollContainer as any;
|
|
107
143
|
}
|
|
108
144
|
|
|
109
|
-
//
|
|
145
|
+
// Get the section element
|
|
110
146
|
this._section = selectOne(section) as Element;
|
|
111
147
|
|
|
112
|
-
//
|
|
148
|
+
// Set default values
|
|
113
149
|
this._prevProgressGlobal = -0.001;
|
|
114
150
|
this._progressGlobal = -0.001;
|
|
115
151
|
this._scopeGlobal = [0, 0];
|
|
@@ -118,19 +154,24 @@ export class SectionScrollProgress<
|
|
|
118
154
|
this._scopeOut = [0, 0];
|
|
119
155
|
this._frameThrottleIndex = 0;
|
|
120
156
|
|
|
121
|
-
//
|
|
157
|
+
// Initialize the component
|
|
122
158
|
if (canInit) {
|
|
123
159
|
this.init();
|
|
124
160
|
}
|
|
125
161
|
}
|
|
126
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Initializes the `SectionScrollProgress` component and sets up scroll and resize events.
|
|
165
|
+
*/
|
|
127
166
|
protected _init() {
|
|
128
167
|
super._init();
|
|
129
168
|
|
|
130
169
|
this._setEvents();
|
|
131
170
|
}
|
|
132
171
|
|
|
133
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* Sets the resize and scroll events for monitoring the section's scroll progress.
|
|
174
|
+
*/
|
|
134
175
|
protected _setEvents() {
|
|
135
176
|
const { viewportTarget, resizeDebounce } = this.props;
|
|
136
177
|
|
|
@@ -145,13 +186,13 @@ export class SectionScrollProgress<
|
|
|
145
186
|
const loadEvent = getApp().onPageLoad();
|
|
146
187
|
loadEvent.then(() => resizeHandler.debounceResize()).catch(() => {});
|
|
147
188
|
|
|
148
|
-
//
|
|
189
|
+
// Set up scroll event
|
|
149
190
|
const scrollEvent = onScroll({
|
|
150
191
|
container: this.scrollContainer,
|
|
151
192
|
callback: (data) => this._render(data),
|
|
152
193
|
});
|
|
153
194
|
|
|
154
|
-
// destroy
|
|
195
|
+
// Clean up actions on destroy
|
|
155
196
|
this.addDestroyableAction(() => {
|
|
156
197
|
resizeHandler.remove();
|
|
157
198
|
loadEvent.cancel();
|
|
@@ -165,58 +206,72 @@ export class SectionScrollProgress<
|
|
|
165
206
|
this.resize();
|
|
166
207
|
}
|
|
167
208
|
|
|
168
|
-
/**
|
|
209
|
+
/**
|
|
210
|
+
* Returns the progress of the section as it appears in the viewport.
|
|
211
|
+
*/
|
|
169
212
|
get progressIn() {
|
|
170
213
|
return clampScope(this.progressGlobal, this.scopeIn) || 0;
|
|
171
214
|
}
|
|
172
215
|
|
|
173
|
-
/**
|
|
216
|
+
/**
|
|
217
|
+
* Returns the progress of the section as it exits the viewport.
|
|
218
|
+
*/
|
|
174
219
|
get progressOut() {
|
|
175
220
|
return clampScope(this.progressGlobal, this.scopeOut) || 0;
|
|
176
221
|
}
|
|
177
222
|
|
|
178
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* Returns the progress of the section as it moves through the viewport.
|
|
225
|
+
*/
|
|
179
226
|
get progressMove() {
|
|
180
227
|
return clampScope(this.progressGlobal, this.scopeMove) || 0;
|
|
181
228
|
}
|
|
182
229
|
|
|
183
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* Resizes the section and recalculates the scroll progress.
|
|
232
|
+
*/
|
|
184
233
|
public resize() {
|
|
185
234
|
const scrollValues = getScrollValues(this.scrollContainer);
|
|
186
235
|
if (!scrollValues) {
|
|
187
236
|
return;
|
|
188
237
|
}
|
|
189
238
|
|
|
190
|
-
//
|
|
239
|
+
// Trigger resize callback
|
|
191
240
|
this.callbacks.tbt('resize', undefined);
|
|
192
241
|
|
|
193
|
-
//
|
|
242
|
+
// Render the section
|
|
194
243
|
this._render(scrollValues, true);
|
|
195
244
|
}
|
|
196
245
|
|
|
197
|
-
/**
|
|
246
|
+
/**
|
|
247
|
+
* Calculates the scroll scopes for the section.
|
|
248
|
+
*/
|
|
198
249
|
protected _calculateScopes({ scrollTop }: IGetScrollValues) {
|
|
199
250
|
const { height: vHeight } = getApp().viewport;
|
|
200
251
|
const sectionBounding = this.section.getBoundingClientRect();
|
|
201
252
|
|
|
202
|
-
//
|
|
253
|
+
// Calculate scroll scopes
|
|
203
254
|
const inStart = scrollTop + sectionBounding.top - vHeight;
|
|
204
255
|
const moveEnd = scrollTop + sectionBounding.top + sectionBounding.height;
|
|
205
256
|
const scrollLine = moveEnd - inStart;
|
|
206
257
|
this._scopeGlobal = [inStart, moveEnd];
|
|
207
258
|
|
|
208
|
-
//
|
|
259
|
+
// Calculate individual scopes
|
|
209
260
|
this._scopeIn = [0, vHeight / scrollLine];
|
|
210
261
|
this._scopeOut = [1 - vHeight / scrollLine, 1];
|
|
211
262
|
this._scopeMove = [this._scopeIn[1], this._scopeOut[0]];
|
|
212
263
|
}
|
|
213
264
|
|
|
214
|
-
/**
|
|
265
|
+
/**
|
|
266
|
+
* Determines whether the section can be rendered based on scroll progress changes.
|
|
267
|
+
*/
|
|
215
268
|
protected _canRender(isForce = false) {
|
|
216
269
|
return isForce || this.progressGlobal !== this._prevProgressGlobal;
|
|
217
270
|
}
|
|
218
271
|
|
|
219
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* Renders the section by updating its scroll progress and triggering callbacks.
|
|
274
|
+
*/
|
|
220
275
|
protected _render(scrollValues: IGetScrollValues, isForce = false) {
|
|
221
276
|
this._frameThrottleIndex += 1;
|
|
222
277
|
|
|
@@ -231,6 +286,7 @@ export class SectionScrollProgress<
|
|
|
231
286
|
return;
|
|
232
287
|
}
|
|
233
288
|
|
|
289
|
+
// Trigger render callback
|
|
234
290
|
this.callbacks.tbt('render', undefined);
|
|
235
291
|
}
|
|
236
292
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
2
|
import React, { FC, useEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { CustomScroll } from '../../CustomScroll';
|
|
4
4
|
import { SectionScrollProgress } from '..';
|
|
5
5
|
|
|
6
6
|
export const WithCustomScrollComponent: FC = () => {
|
|
@@ -11,7 +11,7 @@ export const WithCustomScrollComponent: FC = () => {
|
|
|
11
11
|
return undefined;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const scroll = new CustomScroll({
|
|
15
15
|
container: containerRef.current,
|
|
16
16
|
});
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ export const WithCustomScrollComponent: FC = () => {
|
|
|
19
19
|
|
|
20
20
|
const sectionHandlers = Array.from(sections).map((section) => {
|
|
21
21
|
const handler = new SectionScrollProgress({
|
|
22
|
-
|
|
22
|
+
scrollContainer: scroll,
|
|
23
23
|
section,
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -40,7 +40,7 @@ export const WithCustomScrollComponent: FC = () => {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
return () => {
|
|
43
|
-
|
|
43
|
+
scroll.destroy();
|
|
44
44
|
sectionHandlers.forEach((handler) => handler.destroy());
|
|
45
45
|
};
|
|
46
46
|
}, []);
|
|
@@ -48,10 +48,10 @@ export const WithCustomScrollComponent: FC = () => {
|
|
|
48
48
|
return (
|
|
49
49
|
<div
|
|
50
50
|
ref={containerRef}
|
|
51
|
-
className="v-
|
|
51
|
+
className="v-custom-scroll"
|
|
52
52
|
style={{ height: '100vh', backgroundColor: '#ccc' }}
|
|
53
53
|
>
|
|
54
|
-
<div className="v-
|
|
54
|
+
<div className="v-custom-scroll__wrapper">
|
|
55
55
|
<div
|
|
56
56
|
className="js-section"
|
|
57
57
|
style={{
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import { NComponent } from '@/base/Component/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CustomScroll } from '../CustomScroll';
|
|
3
3
|
import { TOnResizeTarget } from '@/utils/listeners/onResize';
|
|
4
4
|
|
|
5
5
|
export namespace NScrollSectionProgress {
|
|
6
6
|
export interface IStaticProps extends NComponent.IStaticProps {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The section element that is being tracked for scroll progress.
|
|
9
|
+
* This can be a CSS selector or a direct reference to the element.
|
|
9
10
|
*/
|
|
10
11
|
section: string | Element;
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
|
-
*
|
|
14
|
+
* The scrollable container in which the section is being scrolled.
|
|
15
|
+
* This can be a CSS selector, a reference to an element, a custom scroll instance, or the window object.
|
|
13
16
|
* @default window
|
|
14
17
|
*/
|
|
15
|
-
|
|
18
|
+
scrollContainer?: string | Element | CustomScroll | Window;
|
|
19
|
+
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
21
|
+
* The target viewport for observing resize events.
|
|
18
22
|
* @default 'any'
|
|
19
23
|
*/
|
|
20
24
|
viewportTarget?: TOnResizeTarget;
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
|
-
*
|
|
27
|
+
* The timeout for debouncing resize events (in milliseconds).
|
|
28
|
+
* This defines the delay before executing the resize handler.
|
|
23
29
|
* @default 0
|
|
24
30
|
*/
|
|
25
31
|
resizeDebounce?: number;
|
|
@@ -28,7 +34,14 @@ export namespace NScrollSectionProgress {
|
|
|
28
34
|
export interface IChangeableProps extends NComponent.IChangeableProps {}
|
|
29
35
|
|
|
30
36
|
export interface ICallbacksTypes extends NComponent.ICallbacksTypes {
|
|
37
|
+
/**
|
|
38
|
+
* Callback triggered during the render process when the section's scroll progress is updated.
|
|
39
|
+
*/
|
|
31
40
|
render: undefined;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Callback triggered when the section or viewport is resized.
|
|
44
|
+
*/
|
|
32
45
|
resize: undefined;
|
|
33
46
|
}
|
|
34
47
|
}
|