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
|
@@ -3,119 +3,169 @@ import { NModule } from './types';
|
|
|
3
3
|
import { NMutableProps } from '../MutableProps';
|
|
4
4
|
import { Callbacks, NCallbacks } from '../Callbacks';
|
|
5
5
|
import { TRequiredModuleProp } from '../../types/utility';
|
|
6
|
-
import { createViewport } from '../../
|
|
6
|
+
import { createViewport } from '../../Vevet/events/createViewport';
|
|
7
7
|
export type { NModule };
|
|
8
8
|
type TViewportAdd = ReturnType<typeof createViewport>['callbacks']['add'];
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* A base class for modules that handle responsive properties, event listeners, and custom callbacks.
|
|
11
|
+
* This class provides a structure for modules that can dynamically respond to viewport changes, property mutations, and various lifecycle events.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* interface IStaticProps extends NModule.IStaticProps {
|
|
16
|
+
* staticName: 'My name';
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* interface IChangeableProps extends NModule.IChangeableProps {
|
|
20
|
+
* weight: number;
|
|
21
|
+
* height: number;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* interface ICallbacks extends NModule.ICallbacksTypes {}
|
|
25
|
+
*
|
|
26
|
+
* const module = new Module<IStaticProps, IChangeableProps, ICallbacks>({
|
|
27
|
+
* staticName: 'My name',
|
|
28
|
+
* weight: 70,
|
|
29
|
+
* height: 175,
|
|
30
|
+
* }, false);
|
|
31
|
+
*
|
|
32
|
+
* module.addResponsiveProps({
|
|
33
|
+
* breakpoint: 'viewport_phone',
|
|
34
|
+
* settings: {
|
|
35
|
+
* weight: 80,
|
|
36
|
+
* },
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* module.init();
|
|
40
|
+
*
|
|
41
|
+
* module.addCallback('propsMutate', () => console.log('mutate props'));
|
|
42
|
+
* module.addCallback('destroy', () => console.log('destroy'));
|
|
11
43
|
*/
|
|
12
44
|
export declare class Module<StaticProps extends NModule.IStaticProps = NModule.IStaticProps, ChangeableProps extends NModule.IChangeableProps = NModule.IChangeableProps, CallbacksTypes extends NModule.ICallbacksTypes = NModule.ICallbacksTypes> {
|
|
13
45
|
/**
|
|
14
|
-
*
|
|
46
|
+
* Retrieves the default properties for the module. This method is intended to be overridden in subclasses to provide default values for the module's properties.
|
|
15
47
|
*/
|
|
16
48
|
protected _getDefaultProps(): {};
|
|
17
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* The current properties of the module, which include both static and changeable properties.
|
|
51
|
+
* These can be retrieved dynamically during the module's lifecycle.
|
|
52
|
+
*/
|
|
18
53
|
get props(): TRequiredModuleProp<StaticProps & ChangeableProps>;
|
|
19
|
-
/**
|
|
54
|
+
/** Manages the module's mutable properties */
|
|
20
55
|
private _mutableProps;
|
|
21
|
-
/**
|
|
56
|
+
/** Manages the module's callbacks */
|
|
22
57
|
private _callbacks;
|
|
23
|
-
/** Module Callbacks */
|
|
24
|
-
get callbacks(): Callbacks<CallbacksTypes>;
|
|
25
|
-
/** Module listeners */
|
|
26
|
-
private _listeners;
|
|
27
58
|
/**
|
|
28
|
-
*
|
|
59
|
+
* Retrieves the module's registered callbacks.
|
|
29
60
|
*/
|
|
61
|
+
get callbacks(): Callbacks<CallbacksTypes>;
|
|
62
|
+
/** Holds the list of event listeners added to the module */
|
|
63
|
+
private _listeners;
|
|
64
|
+
/** Stores actions that need to be executed when the module is destroyed */
|
|
30
65
|
private _destroyableActions;
|
|
31
|
-
/**
|
|
32
|
-
* Classnames to remove
|
|
33
|
-
*/
|
|
66
|
+
/** Stores the class names to be removed when the module is destroyed */
|
|
34
67
|
private _classNamesToRemove;
|
|
35
|
-
/**
|
|
68
|
+
/** The name of the module, derived from the class name */
|
|
36
69
|
get name(): string;
|
|
37
|
-
/**
|
|
70
|
+
/** Optional prefix for class names used by the module */
|
|
38
71
|
get prefix(): string;
|
|
39
|
-
/**
|
|
72
|
+
/** Tracks whether the module has been initialized */
|
|
40
73
|
private _isInitialized;
|
|
41
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Checks if the module has been initialized.
|
|
76
|
+
*/
|
|
42
77
|
get isInitialized(): boolean;
|
|
43
|
-
/**
|
|
78
|
+
/** Tracks whether the module has been destroyed */
|
|
44
79
|
private _isDestroyed;
|
|
45
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Checks if the module has been destroyed.
|
|
82
|
+
*/
|
|
46
83
|
get isDestroyed(): boolean;
|
|
47
84
|
/**
|
|
48
|
-
*
|
|
85
|
+
* Creates a new instance of the Module class.
|
|
86
|
+
*
|
|
87
|
+
* @param initialProps - The initial static and changeable properties to be used by the module.
|
|
88
|
+
* @param canInit - Whether to automatically initialize the module after construction. Set this to `false` if you want to add responsive properties before initializing.
|
|
89
|
+
*/
|
|
90
|
+
constructor(initialProps?: StaticProps & ChangeableProps, canInit?: boolean);
|
|
91
|
+
/**
|
|
92
|
+
* Adds responsive property rules to the module. This must be done before initialization.
|
|
49
93
|
*
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
* }
|
|
53
|
-
|
|
54
|
-
* interface IChangeableProps extends NModule.IChangeableProps {
|
|
55
|
-
* weight: number;
|
|
56
|
-
* height: number;
|
|
57
|
-
* }
|
|
58
|
-
|
|
59
|
-
* interface ICallbacks extends NModule.ICallbacksTypes {}
|
|
60
|
-
|
|
61
|
-
* const module = new Module<IStaticProps, IChangeableProps, ICallbacks>(
|
|
62
|
-
* {
|
|
63
|
-
* staticName: 'My name',
|
|
64
|
-
* weight: 70,
|
|
65
|
-
* height: 175,
|
|
66
|
-
* },
|
|
67
|
-
* false
|
|
68
|
-
* );
|
|
69
|
-
|
|
70
|
-
* module.addResponsiveProps({
|
|
71
|
-
* breakpoint: 'viewport_phone',
|
|
72
|
-
* settings: {
|
|
73
|
-
* weight: 80,
|
|
74
|
-
* },
|
|
75
|
-
* });
|
|
76
|
-
|
|
77
|
-
* module.init();
|
|
78
|
-
|
|
79
|
-
* module.addCallback('propsMutate', () => console.log('mutate props'));
|
|
80
|
-
|
|
81
|
-
* module.addCallback('destroy', () => console.log('destroy'));
|
|
82
|
-
*/
|
|
83
|
-
constructor(
|
|
84
|
-
/** Initial properties */
|
|
85
|
-
initialProps?: StaticProps & ChangeableProps,
|
|
86
|
-
/**
|
|
87
|
-
* Defines if you need to call {@linkcode Module.init} at the constructor's end.
|
|
88
|
-
* If you want to add responsive properties, set this parameter to `false`.
|
|
89
|
-
*/
|
|
90
|
-
canInit?: boolean);
|
|
91
|
-
/** Add responsive rules */
|
|
94
|
+
* @param rules - The responsive property rules to be added.
|
|
95
|
+
*/
|
|
92
96
|
addResponsiveProps(rules: NMutableProps.IResponsive<ChangeableProps>): void;
|
|
93
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Updates the changeable properties of the module.
|
|
99
|
+
*
|
|
100
|
+
* @param props - The properties to be updated.
|
|
101
|
+
*/
|
|
94
102
|
changeProps(props: Partial<ChangeableProps>): void;
|
|
95
103
|
/**
|
|
96
|
-
* This method is called
|
|
104
|
+
* This method is called internally when the module's properties change.
|
|
97
105
|
*/
|
|
98
106
|
protected _onPropsMutate(): void;
|
|
99
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Initializes the module. Calls the internal `_init` method and marks the module as initialized.
|
|
109
|
+
*/
|
|
100
110
|
init(): void;
|
|
101
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Additional initialization logic that can be overridden in subclasses.
|
|
113
|
+
*/
|
|
102
114
|
protected _init(): void;
|
|
103
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Adds an action to the list of actions to be executed when the module is destroyed.
|
|
117
|
+
*
|
|
118
|
+
* @param action - The function to execute during destruction.
|
|
119
|
+
*/
|
|
104
120
|
protected addDestroyableAction(action: () => void): void;
|
|
105
121
|
/**
|
|
106
|
-
*
|
|
122
|
+
* Adds a viewport callback that will be automatically removed when the module is destroyed.
|
|
123
|
+
*
|
|
124
|
+
* @param target - The viewport target (e.g., width or height).
|
|
125
|
+
* @param action - The callback function to execute when the viewport target changes.
|
|
126
|
+
* @param data - Additional data for the callback.
|
|
107
127
|
*/
|
|
108
128
|
addViewportCallback(target: Parameters<TViewportAdd>[0], action: Parameters<TViewportAdd>[1], data?: Parameters<TViewportAdd>[2]): void;
|
|
109
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* Adds a custom callback to the module.
|
|
131
|
+
*
|
|
132
|
+
* @param target - The event type to listen for (e.g., 'propsChange', 'destroy').
|
|
133
|
+
* @param action - The function to execute when the event is triggered.
|
|
134
|
+
* @param settings - Additional settings for the callback.
|
|
135
|
+
*/
|
|
110
136
|
addCallback<T extends keyof CallbacksTypes>(target: T, action: NCallbacks.TAction<CallbacksTypes[T]>, settings?: NCallbacks.ISettings): NCallbacks.IAddedCallback;
|
|
111
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* Adds a DOM event listener that will be automatically removed when the module is destroyed.
|
|
139
|
+
*
|
|
140
|
+
* @param el - The target element for the event listener.
|
|
141
|
+
* @param target - The event type to listen for (e.g., 'click', 'resize').
|
|
142
|
+
* @param callback - The callback function to execute when the event is triggered.
|
|
143
|
+
* @param options - Additional options for the event listener.
|
|
144
|
+
*/
|
|
112
145
|
addEventListener<El extends ListenerElement, Target extends keyof HTMLElementEventMap, Callback extends (evt: HTMLElementEventMap[Target]) => void>(el: El, target: Target, callback: Callback, options?: IAddEventListenerOptions): IAddEventListener;
|
|
146
|
+
/**
|
|
147
|
+
* Helper function to generate class names with the module's prefix.
|
|
148
|
+
*
|
|
149
|
+
* @param classNames - The class names to generate.
|
|
150
|
+
* @returns A string of class names with the module's prefix applied.
|
|
151
|
+
*/
|
|
113
152
|
protected className(...classNames: string[]): string;
|
|
114
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Toggles a class name on an element, and keeps track of it for removal when the module is destroyed.
|
|
155
|
+
*
|
|
156
|
+
* @param element - The target DOM element.
|
|
157
|
+
* @param className - The class name to toggle.
|
|
158
|
+
* @param isActive - Whether the class should be added or removed.
|
|
159
|
+
*/
|
|
115
160
|
protected toggleClassName(element: Element, className: string, isActive: boolean): void;
|
|
116
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Destroys the module, cleaning up resources, callbacks, and event listeners.
|
|
163
|
+
*/
|
|
117
164
|
destroy(): void;
|
|
118
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Internal method to handle the destruction of the module.
|
|
167
|
+
* It removes all callbacks, destroys properties, and cleans up event listeners and class names.
|
|
168
|
+
*/
|
|
119
169
|
protected _destroy(): void;
|
|
120
170
|
}
|
|
121
171
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/Module/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/Module/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,YAAY,EAAE,OAAO,EAAE,CAAC;AAExB,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,MAAM,CACjB,WAAW,SAAS,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,EAC/D,eAAe,SAAS,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,EAC3E,cAAc,SAAS,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe;IAExE;;OAEG;IACH,SAAS,CAAC,gBAAgB;IAI1B;;;OAGG;IACH,IAAI,KAAK,uDAIR;IAED,8CAA8C;IAC9C,OAAO,CAAC,aAAa,CAA6C;IAElE,qCAAqC;IACrC,OAAO,CAAC,UAAU,CAA4B;IAE9C;;OAEG;IACH,IAAI,SAAS,8BAEZ;IAED,4DAA4D;IAC5D,OAAO,CAAC,UAAU,CAAsB;IAExC,2EAA2E;IAC3E,OAAO,CAAC,mBAAmB,CAAiB;IAE5C,wEAAwE;IACxE,OAAO,CAAC,mBAAmB,CAAgC;IAE3D,0DAA0D;IAC1D,IAAI,IAAI,WAEP;IAED,yDAAyD;IACzD,IAAI,MAAM,WAET;IAED,qDAAqD;IACrD,OAAO,CAAC,cAAc,CAAS;IAE/B;;OAEG;IACH,IAAI,aAAa,YAEhB;IAED,mDAAmD;IACnD,OAAO,CAAC,YAAY,CAAS;IAE7B;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;;;;OAKG;gBACS,YAAY,CAAC,EAAE,WAAW,GAAG,eAAe,EAAE,OAAO,UAAO;IA0BxE;;;;OAIG;IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,eAAe,CAAC;IAU3E;;;;OAIG;IACI,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;IAUlD;;OAEG;IACH,SAAS,CAAC,cAAc;IAIxB;;OAEG;IACI,IAAI;IAUX;;OAEG;IACH,SAAS,CAAC,KAAK;IAEf;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,MAAM,EAAE,MAAM,IAAI;IAIjD;;;;;;OAMG;IACI,mBAAmB,CACxB,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACnC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EACnC,IAAI,GAAE,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAM;IAUxC;;;;;;OAMG;IACI,WAAW,CAAC,CAAC,SAAS,MAAM,cAAc,EAC/C,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAC7C,QAAQ,GAAE,UAAU,CAAC,SAAc;IAKrC;;;;;;;OAOG;IACI,gBAAgB,CACrB,EAAE,SAAS,eAAe,EAC1B,MAAM,SAAS,MAAM,mBAAmB,EACxC,QAAQ,SAAS,CAAC,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,KAAK,IAAI,EAE3D,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,wBAAwB,GACjC,iBAAiB;IAgBpB;;;;;OAKG;IACH,SAAS,CAAC,SAAS,CAAC,GAAG,UAAU,EAAE,MAAM,EAAE;IAI3C;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,CACvB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,OAAO;IAWnB;;OAEG;IACI,OAAO;IAQd;;;OAGG;IACH,SAAS,CAAC,QAAQ;CAenB"}
|
|
@@ -1,23 +1,49 @@
|
|
|
1
1
|
import { NCallbacks } from '../Callbacks/types';
|
|
2
2
|
export declare namespace NModule {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Interface representing the properties that can change dynamically.
|
|
5
|
+
* These properties may be updated during window resize events or through
|
|
6
|
+
* the {@linkcode Module.changeProps} method.
|
|
5
7
|
*/
|
|
6
8
|
interface IChangeableProps {
|
|
7
9
|
__fixHelperChangeableProps?: any;
|
|
8
10
|
}
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Interface representing static properties that remain constant and do not change
|
|
13
|
+
* after initialization.
|
|
14
|
+
*/
|
|
10
15
|
interface IStaticProps {
|
|
11
16
|
__fixHelperStaticProps?: any;
|
|
12
17
|
}
|
|
13
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Defines the available callback types for the module.
|
|
20
|
+
* These callbacks allow interaction with specific module events.
|
|
21
|
+
*/
|
|
14
22
|
interface ICallbacksTypes extends NCallbacks.ITypes {
|
|
23
|
+
/**
|
|
24
|
+
* Triggered when the module is destroyed.
|
|
25
|
+
*/
|
|
15
26
|
destroy: undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Triggered when module properties are manually changed.
|
|
29
|
+
*/
|
|
16
30
|
propsChange: undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Triggered when module properties mutate due to responsive settings or other updates.
|
|
33
|
+
*/
|
|
17
34
|
propsMutate: undefined;
|
|
18
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents the class names to be removed from an element when the module is destroyed.
|
|
38
|
+
*/
|
|
19
39
|
interface IClassNamesToRemove {
|
|
40
|
+
/**
|
|
41
|
+
* The DOM element from which the class name should be removed.
|
|
42
|
+
*/
|
|
20
43
|
element: Element;
|
|
44
|
+
/**
|
|
45
|
+
* The class name that should be removed from the element.
|
|
46
|
+
*/
|
|
21
47
|
className: string;
|
|
22
48
|
}
|
|
23
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/Module/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,yBAAiB,OAAO,CAAC;IACvB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/Module/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,yBAAiB,OAAO,CAAC;IACvB;;;;OAIG;IACH,UAAiB,gBAAgB;QAC/B,0BAA0B,CAAC,EAAE,GAAG,CAAC;KAClC;IAED;;;OAGG;IACH,UAAiB,YAAY;QAC3B,sBAAsB,CAAC,EAAE,GAAG,CAAC;KAC9B;IAED;;;OAGG;IACH,UAAiB,eAAgB,SAAQ,UAAU,CAAC,MAAM;QACxD;;WAEG;QACH,OAAO,EAAE,SAAS,CAAC;QAEnB;;WAEG;QACH,WAAW,EAAE,SAAS,CAAC;QAEvB;;WAEG;QACH,WAAW,EAAE,SAAS,CAAC;KACxB;IAED;;OAEG;IACH,UAAiB,mBAAmB;QAClC;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;QAEjB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|
|
@@ -1,135 +1,92 @@
|
|
|
1
1
|
import { NMutableProps } from './types';
|
|
2
2
|
export type { NMutableProps };
|
|
3
3
|
/**
|
|
4
|
-
* A class for
|
|
5
|
-
*
|
|
6
|
-
* There are two ways to change properties:
|
|
7
|
-
* - To set a resize-listener on window (or use {@linkcode Viewport}).
|
|
8
|
-
* When the window is resized, change the properties with the help of
|
|
9
|
-
* {@linkcode MutableProps.changeProps}
|
|
10
|
-
*
|
|
11
|
-
* - The second way is to use the MutableProps and add responsive properties
|
|
12
|
-
* with help of {@linkcode MutableProps.addResponsiveProps}.
|
|
4
|
+
* A class for managing mutable properties that can change based on window size (responsive design).
|
|
5
|
+
* This allows certain properties to update dynamically when the window is resized or in response to manual changes.
|
|
13
6
|
*
|
|
14
7
|
* @example
|
|
15
8
|
*
|
|
16
9
|
* interface IStatic {
|
|
17
10
|
* static: string;
|
|
18
11
|
* }
|
|
19
|
-
|
|
12
|
+
*
|
|
20
13
|
* interface IChangeable {
|
|
21
14
|
* changeable: string;
|
|
22
15
|
* }
|
|
23
|
-
|
|
16
|
+
*
|
|
24
17
|
* const props = new MutableProps<IStatic, IChangeable>({
|
|
25
18
|
* static: '',
|
|
26
19
|
* changeable: 'something',
|
|
27
20
|
* });
|
|
28
|
-
|
|
21
|
+
*
|
|
29
22
|
* props.addResponsiveProps({
|
|
30
23
|
* breakpoint: 'viewport_phone',
|
|
31
24
|
* settings: {
|
|
32
25
|
* changeable: 'phone',
|
|
33
26
|
* },
|
|
34
27
|
* });
|
|
35
|
-
|
|
28
|
+
*
|
|
36
29
|
* props.changeProps({ changeable: 'changed' });
|
|
37
30
|
*/
|
|
38
|
-
export declare class MutableProps<
|
|
39
|
-
/**
|
|
40
|
-
* Static Properties (they never change)
|
|
41
|
-
*/
|
|
42
|
-
StaticProps extends Record<string, any>,
|
|
43
|
-
/**
|
|
44
|
-
* Mutable Properties
|
|
45
|
-
* (may change on window resize or through {@linkcode MutableProps.changeProps})
|
|
46
|
-
*/
|
|
47
|
-
ChangeableProps extends Record<string, any>> {
|
|
48
|
-
/**
|
|
49
|
-
* The properties that were set while initialization.
|
|
50
|
-
* These properties will nevet change.
|
|
51
|
-
*/
|
|
52
|
-
private _initProps;
|
|
53
|
-
/**
|
|
54
|
-
* A callback that is launched when properties are changed
|
|
55
|
-
*/
|
|
31
|
+
export declare class MutableProps<StaticProps extends Record<string, any>, ChangeableProps extends Record<string, any>> {
|
|
56
32
|
private _onMutate;
|
|
57
|
-
/**
|
|
58
|
-
* Name of the responsive properties.
|
|
59
|
-
*/
|
|
60
33
|
private _name;
|
|
61
34
|
/**
|
|
62
|
-
*
|
|
63
|
-
* These properties
|
|
35
|
+
* A reference to the original properties (both static and changeable).
|
|
36
|
+
* These properties are only updated manually via {@linkcode changeProps}.
|
|
64
37
|
*/
|
|
65
38
|
private _refProps;
|
|
66
39
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
40
|
+
* The current active properties. These can be updated through both window resizing
|
|
41
|
+
* (via responsive rules) and manual changes through {@linkcode changeProps}.
|
|
69
42
|
*/
|
|
70
43
|
private _props;
|
|
71
44
|
/**
|
|
72
|
-
* A set of responsive rules
|
|
45
|
+
* A set of responsive rules defining how properties should change based on viewport size or device type.
|
|
46
|
+
* Each rule is defined by a breakpoint and corresponding property settings.
|
|
73
47
|
*/
|
|
74
48
|
private _responsiveRules;
|
|
75
49
|
/**
|
|
76
|
-
*
|
|
50
|
+
* The active breakpoints currently applied to the properties.
|
|
77
51
|
*/
|
|
78
|
-
|
|
52
|
+
private _activeBreakpoints;
|
|
79
53
|
/**
|
|
80
|
-
*
|
|
54
|
+
* A callback used to update properties when the viewport size changes.
|
|
81
55
|
*/
|
|
82
56
|
private _viewportCallback?;
|
|
83
57
|
/**
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
private _activeBreakpoints;
|
|
87
|
-
/**
|
|
88
|
-
* @example
|
|
89
|
-
*
|
|
90
|
-
* const static = {
|
|
91
|
-
* myProp: true,
|
|
92
|
-
* };
|
|
93
|
-
*
|
|
94
|
-
* const responsive = [
|
|
95
|
-
* {
|
|
96
|
-
* breakpoint: 'm',
|
|
97
|
-
* settings: {
|
|
98
|
-
* myProp: false
|
|
99
|
-
* }
|
|
100
|
-
* }
|
|
101
|
-
* ];
|
|
58
|
+
* Initializes the `MutableProps` instance with static and changeable properties,
|
|
59
|
+
* and sets up a mutation callback to be called when properties change.
|
|
102
60
|
*
|
|
103
|
-
*
|
|
61
|
+
* @param initProps - Initial properties, including both static and changeable properties.
|
|
62
|
+
* @param _onMutate - Callback function triggered whenever the properties change.
|
|
63
|
+
* @param _name - The name used to identify the set of responsive properties.
|
|
104
64
|
*/
|
|
105
|
-
constructor(
|
|
65
|
+
constructor(initProps: StaticProps & ChangeableProps, _onMutate?: () => void, _name?: string);
|
|
106
66
|
/**
|
|
107
|
-
*
|
|
108
|
-
* These
|
|
67
|
+
* Retrieves the current properties.
|
|
68
|
+
* These may change either due to responsive rules or through manual updates.
|
|
109
69
|
*/
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* A callback that is launched when properties are changed
|
|
113
|
-
*/
|
|
114
|
-
_onMutate?: () => void,
|
|
115
|
-
/**
|
|
116
|
-
* Name of the responsive properties.
|
|
117
|
-
*/
|
|
118
|
-
_name?: string);
|
|
70
|
+
get props(): StaticProps & ChangeableProps;
|
|
119
71
|
/**
|
|
120
|
-
*
|
|
72
|
+
* Adds responsive rules that define how the properties should change based on viewport breakpoints.
|
|
73
|
+
*
|
|
74
|
+
* @param rules - Responsive rules specifying breakpoints and corresponding property settings.
|
|
121
75
|
*/
|
|
122
76
|
addResponsiveProps(rules: NMutableProps.IResponsive<ChangeableProps>): void;
|
|
123
77
|
/**
|
|
124
|
-
*
|
|
78
|
+
* Handles updating the properties based on the current viewport size.
|
|
79
|
+
* It checks all responsive rules and applies the appropriate settings for active breakpoints.
|
|
125
80
|
*/
|
|
126
81
|
private _responseProps;
|
|
127
82
|
/**
|
|
128
|
-
*
|
|
83
|
+
* Manually changes the properties. The updated properties persist and trigger the mutation callback.
|
|
84
|
+
*
|
|
85
|
+
* @param props - A partial set of changeable properties to be updated.
|
|
129
86
|
*/
|
|
130
87
|
changeProps(props: Partial<ChangeableProps>): void;
|
|
131
88
|
/**
|
|
132
|
-
*
|
|
89
|
+
* Cleans up and destroys the responsive properties.
|
|
133
90
|
*/
|
|
134
91
|
destroy(): void;
|
|
135
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/MutableProps/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/MutableProps/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,YAAY,CACvB,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvC,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAwCzC,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,KAAK;IAvCf;;;OAGG;IACH,OAAO,CAAC,SAAS,CAAgC;IAEjD;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAgC;IAE9C;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAoD;IAE5E;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAAsB;IAEhD;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAAC,CAA4B;IAEtD;;;;;;;OAOG;gBAED,SAAS,EAAE,WAAW,GAAG,eAAe,EAChC,SAAS,GAAE,MAAM,IAAe,EAChC,KAAK,SAAqB;IAOpC;;;OAGG;IACH,IAAI,KAAK,kCAER;IAED;;;;OAIG;IACI,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,eAAe,CAAC;IAgB3E;;;OAGG;IACH,OAAO,CAAC,cAAc;IA2DtB;;;;OAIG;IACI,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC;IAOlD;;OAEG;IACI,OAAO;CAKf"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
export declare namespace NMutableProps {
|
|
2
2
|
interface IResponsive<S> {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Defines the breakpoint at which the properties should change.
|
|
5
|
+
* The `breakpoint` can represent either a specific screen width (in pixels)
|
|
6
|
+
* or a predefined device type or viewport size.
|
|
7
|
+
*
|
|
5
8
|
* Available breakpoints:
|
|
6
9
|
* <ul>
|
|
7
|
-
* <li>
|
|
8
|
-
* <li>'
|
|
9
|
-
* <li>'
|
|
10
|
-
* <li>'
|
|
11
|
-
* <li>'
|
|
12
|
-
* <li>'
|
|
13
|
-
* <li>'
|
|
10
|
+
* <li><code>number</code> - Width breakpoint in pixels, e.g., 768 for tablets or 1024 for desktops.</li>
|
|
11
|
+
* <li><code>'viewport_desktop'</code> - When the viewport width is categorized as desktop size.</li>
|
|
12
|
+
* <li><code>'viewport_tablet'</code> - When the viewport width is categorized as tablet size.</li>
|
|
13
|
+
* <li><code>'viewport_phone'</code> - When the viewport width is categorized as phone size.</li>
|
|
14
|
+
* <li><code>'device_phone'</code> - When the user is on a phone device, regardless of viewport size.</li>
|
|
15
|
+
* <li><code>'device_tablet'</code> - When the user is on a tablet device, regardless of viewport size.</li>
|
|
16
|
+
* <li><code>'device_mobile'</code> - When the user is on any mobile device (either phone or tablet).</li>
|
|
14
17
|
* </ul>
|
|
15
18
|
*/
|
|
16
19
|
breakpoint: number | 'viewport_desktop' | 'viewport_tablet' | 'viewport_phone' | 'device_phone' | 'device_tablet' | 'device_mobile';
|
|
20
|
+
/**
|
|
21
|
+
* The property settings that should be applied when the defined breakpoint is matched.
|
|
22
|
+
*/
|
|
17
23
|
settings: Partial<S>;
|
|
18
24
|
}
|
|
19
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/MutableProps/types.ts"],"names":[],"mappings":"AAAA,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,WAAW,CAAC,CAAC;QAC5B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/MutableProps/types.ts"],"names":[],"mappings":"AAAA,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,WAAW,CAAC,CAAC;QAC5B;;;;;;;;;;;;;;;WAeG;QACH,UAAU,EACN,MAAM,GACN,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,eAAe,CAAC;QAEpB;;WAEG;QACH,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;KACtB;CACF"}
|
|
@@ -2,13 +2,36 @@ import { Module } from '../Module';
|
|
|
2
2
|
import { NPlugin } from './types';
|
|
3
3
|
export type { NPlugin };
|
|
4
4
|
/**
|
|
5
|
-
* A class for Plugins.
|
|
5
|
+
* A base abstract class for Plugins that extend the functionality of components.
|
|
6
|
+
* A plugin is designed to attach to a component and modify or enhance its behavior.
|
|
7
|
+
* It inherits from the {@link Module} class and adds functionality to work with a component.
|
|
6
8
|
*/
|
|
7
9
|
export declare abstract class Plugin<StaticProps extends NPlugin.IStaticProps = NPlugin.IStaticProps, ChangeableProps extends NPlugin.IChangeableProps = NPlugin.IChangeableProps, CallbacksTypes extends NPlugin.ICallbacksTypes = NPlugin.ICallbacksTypes, Component = any> extends Module<StaticProps, ChangeableProps, CallbacksTypes> {
|
|
10
|
+
/**
|
|
11
|
+
* Constructs the plugin.
|
|
12
|
+
*
|
|
13
|
+
* @param initialProps - Initial static and changeable properties for the plugin.
|
|
14
|
+
*/
|
|
8
15
|
constructor(initialProps?: StaticProps & ChangeableProps);
|
|
16
|
+
/**
|
|
17
|
+
* The component to which the plugin is attached.
|
|
18
|
+
* This property must be set before initializing the plugin.
|
|
19
|
+
*/
|
|
9
20
|
private _component;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the component to which this plugin is attached.
|
|
23
|
+
*/
|
|
10
24
|
get component(): Component;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the component for this plugin. This method is called by the parent component when the plugin is added.
|
|
27
|
+
*/
|
|
11
28
|
set component(value: Component);
|
|
29
|
+
/**
|
|
30
|
+
* Initializes the plugin and ensures it is properly associated with a component.
|
|
31
|
+
* If the component is not set before calling `init`, it throws an error.
|
|
32
|
+
*
|
|
33
|
+
* @throws {Error} If `component` is not set.
|
|
34
|
+
*/
|
|
12
35
|
init(): void;
|
|
13
36
|
}
|
|
14
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/Plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,YAAY,EAAE,OAAO,EAAE,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/Plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,YAAY,EAAE,OAAO,EAAE,CAAC;AAExB;;;;GAIG;AACH,8BAAsB,MAAM,CAC1B,WAAW,SAAS,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,EAC/D,eAAe,SAAS,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,EAC3E,cAAc,SAAS,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,EACxE,SAAS,GAAG,GAAG,CACf,SAAQ,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,cAAc,CAAC;IAC5D;;;;OAIG;gBACS,YAAY,CAAC,EAAE,WAAW,GAAG,eAAe;IAIxD;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAa;IAE/B;;OAEG;IACH,IAAI,SAAS,cAEZ;IAED;;OAEG;IACH,IAAI,SAAS,CAAC,KAAK,WAAA,EAElB;IAED;;;;;OAKG;IACI,IAAI;CASZ"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { NModule } from '../Module/types';
|
|
2
2
|
export declare namespace NPlugin {
|
|
3
|
+
/**
|
|
4
|
+
* Static properties for plugins. These properties remain constant throughout the lifecycle of the plugin.
|
|
5
|
+
*/
|
|
3
6
|
interface IStaticProps extends NModule.IStaticProps {
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Changeable properties for plugins. These properties can change dynamically during the lifecycle of the plugin.
|
|
10
|
+
* Extends from {@link NModule.IChangeableProps}, providing plugins with the ability to update their properties over time.
|
|
11
|
+
*/
|
|
5
12
|
interface IChangeableProps extends NModule.IChangeableProps {
|
|
6
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Defines the available callback types for plugins. These callbacks allow plugins to respond to lifecycle events or property changes.
|
|
16
|
+
* Extends from {@link NModule.ICallbacksTypes}, meaning that plugins share the same callback structure as modules.
|
|
17
|
+
*/
|
|
7
18
|
interface ICallbacksTypes extends NModule.ICallbacksTypes {
|
|
8
19
|
}
|
|
9
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/Plugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,yBAAiB,OAAO,CAAC;IACvB,UAAiB,YAAa,SAAQ,OAAO,CAAC,YAAY;KAAG;IAE7D,UAAiB,gBAAiB,SAAQ,OAAO,CAAC,gBAAgB;KAAG;IAErE,UAAiB,eAAgB,SAAQ,OAAO,CAAC,eAAe;KAAG;CACpE"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/Plugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,yBAAiB,OAAO,CAAC;IACvB;;OAEG;IACH,UAAiB,YAAa,SAAQ,OAAO,CAAC,YAAY;KAAG;IAE7D;;;OAGG;IACH,UAAiB,gBAAiB,SAAQ,OAAO,CAAC,gBAAgB;KAAG;IAErE;;;OAGG;IACH,UAAiB,eAAgB,SAAQ,OAAO,CAAC,eAAe;KAAG;CACpE"}
|