vevet 1.4.27 → 2.0.1-dev.3
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/LICENSE +1 -1
- package/README.md +7 -71
- package/build/cdn/index.js +12 -0
- package/build/cdn/index.js.LICENSE.txt +14 -0
- package/build/cjs/app/Application.js +297 -0
- package/build/cjs/app/events/PageLoad.js +74 -0
- package/build/cjs/app/events/Viewport.js +303 -0
- package/build/cjs/base/Callbacks.js +232 -0
- package/build/cjs/base/Component.js +56 -0
- package/build/cjs/base/Module.js +262 -0
- package/build/cjs/base/MutableProp.js +165 -0
- package/build/cjs/base/Plugin.js +56 -0
- package/build/cjs/components/animation-frame/AnimationFrame.js +183 -0
- package/build/cjs/components/canvas/Ctx2D.js +200 -0
- package/build/cjs/components/canvas/Ctx2DPrerender.js +72 -0
- package/build/cjs/components/cursor/CustomCursor.js +344 -0
- package/build/cjs/components/dragger/Dragger.js +229 -0
- package/build/cjs/components/dragger/DraggerDirection.js +77 -0
- package/build/cjs/components/dragger/DraggerMove.js +84 -0
- package/build/cjs/components/loading/Preloader.js +229 -0
- package/build/cjs/components/loading/ProgressPreloader.js +377 -0
- package/build/cjs/components/page/Page.js +353 -0
- package/build/cjs/components/scroll/custom-scroll/CustomScroll.js +517 -0
- package/build/cjs/components/scroll/plugins/SmoothScrollDragPlugin.js +178 -0
- package/build/cjs/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +138 -0
- package/build/cjs/components/scroll/scrollable/ScrollEventsBase.js +133 -0
- package/build/cjs/components/scroll/scrollable/ScrollView.js +315 -0
- package/build/cjs/components/scroll/scrollbar/Bar.js +315 -0
- package/build/cjs/components/scroll/scrollbar/ScrollBar.js +206 -0
- package/build/cjs/components/scroll/smooth-scroll/SmoothScroll.js +625 -0
- package/build/cjs/components/scroll/types.js +2 -0
- package/build/cjs/components/split-text/SplitText.js +233 -0
- package/build/cjs/components/text/SplitText.js +329 -0
- package/build/cjs/components/timeline/StaticTimeline.js +137 -0
- package/build/cjs/components/timeline/Timeline.js +190 -0
- package/build/cjs/index.js +87 -0
- package/build/cjs/utils/common/index.js +12 -0
- package/build/cjs/utils/common/mergeWithoutArrays.js +19 -0
- package/build/cjs/utils/common/randID.js +11 -0
- package/build/cjs/utils/common/timeoutCallback.js +17 -0
- package/build/cjs/utils/errors.js +8 -0
- package/build/cjs/utils/listeners/index.js +10 -0
- package/build/cjs/utils/listeners/intersectionObserverSupported.js +11 -0
- package/build/cjs/utils/listeners/onScroll.js +47 -0
- package/build/cjs/utils/math/boundVal.js +16 -0
- package/build/cjs/utils/math/index.js +12 -0
- package/build/cjs/utils/math/lerp.js +15 -0
- package/build/cjs/utils/math/scopeProgress.js +25 -0
- package/build/cjs/utils/types/general.js +2 -0
- package/build/cjs/utils/types/utility.js +2 -0
- package/build/es/app/Application.js +210 -0
- package/build/es/app/events/PageLoad.js +47 -0
- package/build/es/app/events/Viewport.js +232 -0
- package/build/es/base/Callbacks.js +205 -0
- package/build/es/base/Component.js +32 -0
- package/build/es/base/Module.js +225 -0
- package/build/es/base/MutableProp.js +152 -0
- package/build/es/base/Plugin.js +31 -0
- package/build/es/components/animation-frame/AnimationFrame.js +145 -0
- package/build/es/components/canvas/Ctx2D.js +133 -0
- package/build/es/components/canvas/Ctx2DPrerender.js +37 -0
- package/build/es/components/cursor/CustomCursor.js +274 -0
- package/build/es/components/dragger/Dragger.js +175 -0
- package/build/es/components/dragger/DraggerDirection.js +42 -0
- package/build/es/components/dragger/DraggerMove.js +56 -0
- package/build/es/components/loading/Preloader.js +164 -0
- package/build/es/components/loading/ProgressPreloader.js +304 -0
- package/build/es/components/page/Page.js +283 -0
- package/build/es/components/scroll/custom-scroll/CustomScroll.js +486 -0
- package/build/es/components/scroll/plugins/SmoothScrollDragPlugin.js +140 -0
- package/build/es/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +109 -0
- package/build/es/components/scroll/scrollable/ScrollEventsBase.js +79 -0
- package/build/es/components/scroll/scrollable/ScrollView.js +264 -0
- package/build/es/components/scroll/scrollbar/Bar.js +262 -0
- package/build/es/components/scroll/scrollbar/ScrollBar.js +152 -0
- package/build/es/components/scroll/smooth-scroll/SmoothScroll.js +519 -0
- package/build/es/components/scroll/types.js +1 -0
- package/build/es/components/split-text/SplitText.js +199 -0
- package/build/es/components/text/SplitText.js +270 -0
- package/build/es/components/timeline/StaticTimeline.js +92 -0
- package/build/es/components/timeline/Timeline.js +141 -0
- package/build/es/index.js +37 -0
- package/build/es/utils/common/index.js +4 -0
- package/build/es/utils/common/mergeWithoutArrays.js +13 -0
- package/build/es/utils/common/randID.js +7 -0
- package/build/es/utils/common/timeoutCallback.js +14 -0
- package/build/es/utils/errors.js +5 -0
- package/build/es/utils/listeners/index.js +3 -0
- package/build/es/utils/listeners/intersectionObserverSupported.js +8 -0
- package/build/es/utils/listeners/onScroll.js +44 -0
- package/build/es/utils/math/boundVal.js +12 -0
- package/build/es/utils/math/index.js +4 -0
- package/build/es/utils/math/lerp.js +11 -0
- package/build/es/utils/math/scopeProgress.js +22 -0
- package/build/es/utils/types/general.js +1 -0
- package/build/es/utils/types/utility.js +1 -0
- package/build/types/app/Application.d.ts +161 -0
- package/build/types/app/Application.d.ts.map +1 -0
- package/build/types/app/events/PageLoad.d.ts +28 -0
- package/build/types/app/events/PageLoad.d.ts.map +1 -0
- package/build/types/app/events/Viewport.d.ts +137 -0
- package/build/types/app/events/Viewport.d.ts.map +1 -0
- package/build/types/base/Callbacks.d.ts +174 -0
- package/build/types/base/Callbacks.d.ts.map +1 -0
- package/build/types/base/Component.d.ts +48 -0
- package/build/types/base/Component.d.ts.map +1 -0
- package/build/types/base/Module.d.ts +179 -0
- package/build/types/base/Module.d.ts.map +1 -0
- package/build/types/base/MutableProp.d.ts +142 -0
- package/build/types/base/MutableProp.d.ts.map +1 -0
- package/build/types/base/Plugin.d.ts +35 -0
- package/build/types/base/Plugin.d.ts.map +1 -0
- package/build/types/components/animation-frame/AnimationFrame.d.ts +96 -0
- package/build/types/components/animation-frame/AnimationFrame.d.ts.map +1 -0
- package/build/types/components/canvas/Ctx2D.d.ts +111 -0
- package/build/types/components/canvas/Ctx2D.d.ts.map +1 -0
- package/build/types/components/canvas/Ctx2DPrerender.d.ts +41 -0
- package/build/types/components/canvas/Ctx2DPrerender.d.ts.map +1 -0
- package/build/types/components/cursor/CustomCursor.d.ts +181 -0
- package/build/types/components/cursor/CustomCursor.d.ts.map +1 -0
- package/build/types/components/dragger/Dragger.d.ts +120 -0
- package/build/types/components/dragger/Dragger.d.ts.map +1 -0
- package/build/types/components/dragger/DraggerDirection.d.ts +39 -0
- package/build/types/components/dragger/DraggerDirection.d.ts.map +1 -0
- package/build/types/components/dragger/DraggerMove.d.ts +49 -0
- package/build/types/components/dragger/DraggerMove.d.ts.map +1 -0
- package/build/types/components/loading/Preloader.d.ts +107 -0
- package/build/types/components/loading/Preloader.d.ts.map +1 -0
- package/build/types/components/loading/ProgressPreloader.d.ts +166 -0
- package/build/types/components/loading/ProgressPreloader.d.ts.map +1 -0
- package/build/types/components/page/Page.d.ts +126 -0
- package/build/types/components/page/Page.d.ts.map +1 -0
- package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts +322 -0
- package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts.map +1 -0
- package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts +97 -0
- package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts.map +1 -0
- package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts +34 -0
- package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts.map +1 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts +60 -0
- package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts.map +1 -0
- package/build/types/components/scroll/scrollable/ScrollView.d.ts +140 -0
- package/build/types/components/scroll/scrollable/ScrollView.d.ts.map +1 -0
- package/build/types/components/scroll/scrollbar/Bar.d.ts +84 -0
- package/build/types/components/scroll/scrollbar/Bar.d.ts.map +1 -0
- package/build/types/components/scroll/scrollbar/ScrollBar.d.ts +109 -0
- package/build/types/components/scroll/scrollbar/ScrollBar.d.ts.map +1 -0
- package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts +307 -0
- package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts.map +1 -0
- package/build/types/components/scroll/types.d.ts +11 -0
- package/build/types/components/scroll/types.d.ts.map +1 -0
- package/build/types/components/split-text/SplitText.d.ts +118 -0
- package/build/types/components/split-text/SplitText.d.ts.map +1 -0
- package/build/types/components/text/SplitText.d.ts +118 -0
- package/build/types/components/text/SplitText.d.ts.map +1 -0
- package/build/types/components/timeline/StaticTimeline.d.ts +92 -0
- package/build/types/components/timeline/StaticTimeline.d.ts.map +1 -0
- package/build/types/components/timeline/Timeline.d.ts +101 -0
- package/build/types/components/timeline/Timeline.d.ts.map +1 -0
- package/build/types/index.d.ts +38 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/utils/common/index.d.ts +5 -0
- package/build/types/utils/common/index.d.ts.map +1 -0
- package/build/types/utils/common/mergeWithoutArrays.d.ts +6 -0
- package/build/types/utils/common/mergeWithoutArrays.d.ts.map +1 -0
- package/build/types/utils/common/randID.d.ts +5 -0
- package/build/types/utils/common/randID.d.ts.map +1 -0
- package/build/types/utils/common/timeoutCallback.d.ts +6 -0
- package/build/types/utils/common/timeoutCallback.d.ts.map +1 -0
- package/build/types/utils/errors.d.ts +3 -0
- package/build/types/utils/errors.d.ts.map +1 -0
- package/build/types/utils/listeners/index.d.ts +4 -0
- package/build/types/utils/listeners/index.d.ts.map +1 -0
- package/build/types/utils/listeners/intersectionObserverSupported.d.ts +2 -0
- package/build/types/utils/listeners/intersectionObserverSupported.d.ts.map +1 -0
- package/build/types/utils/listeners/onScroll.d.ts +10 -0
- package/build/types/utils/listeners/onScroll.d.ts.map +1 -0
- package/build/types/utils/math/boundVal.d.ts +5 -0
- package/build/types/utils/math/boundVal.d.ts.map +1 -0
- package/build/types/utils/math/index.d.ts +5 -0
- package/build/types/utils/math/index.d.ts.map +1 -0
- package/build/types/utils/math/lerp.d.ts +5 -0
- package/build/types/utils/math/lerp.d.ts.map +1 -0
- package/build/types/utils/math/scopeProgress.d.ts +20 -0
- package/build/types/utils/math/scopeProgress.d.ts.map +1 -0
- package/build/types/utils/types/general.d.ts +7 -0
- package/build/types/utils/types/general.d.ts.map +1 -0
- package/build/types/utils/types/utility.d.ts +14 -0
- package/build/types/utils/types/utility.d.ts.map +1 -0
- package/package.json +88 -82
- package/src/cdn/index.js +3 -0
- package/src/sass/base.scss +3 -0
- package/src/sass/components/cursor/_custom-cursor.scss +63 -0
- package/src/sass/components/index.scss +6 -0
- package/src/sass/components/loading/_preloader.scss +15 -0
- package/src/sass/components/scroll/_scrollbar.scss +73 -0
- package/src/sass/components/scroll/_smooth-scroll.scss +17 -0
- package/src/sass/index.scss +3 -0
- package/src/sass/mixins/_scroll.scss +7 -0
- package/{dist/scss → src/sass}/mixins/_transition.scss +8 -4
- package/src/sass/mixins/_viewport.scss +69 -0
- package/src/sass/mixins/index.scss +3 -0
- package/src/ts/app/Application.ts +350 -0
- package/src/ts/app/events/PageLoad.ts +79 -0
- package/src/ts/app/events/Viewport.ts +365 -0
- package/src/ts/base/Callbacks.ts +380 -0
- package/src/ts/base/Component.ts +83 -0
- package/src/ts/base/Module.ts +385 -0
- package/src/ts/base/MutableProp.ts +242 -0
- package/src/ts/base/Plugin.ts +76 -0
- package/src/ts/components/animation-frame/AnimationFrame.ts +264 -0
- package/src/ts/components/canvas/Ctx2D.ts +260 -0
- package/src/ts/components/canvas/Ctx2DPrerender.ts +96 -0
- package/src/ts/components/cursor/CustomCursor.ts +462 -0
- package/src/ts/components/dragger/Dragger.ts +313 -0
- package/src/ts/components/dragger/DraggerDirection.ts +106 -0
- package/src/ts/components/dragger/DraggerMove.ts +114 -0
- package/src/ts/components/loading/Preloader.ts +279 -0
- package/src/ts/components/loading/ProgressPreloader.ts +484 -0
- package/src/ts/components/page/Page.ts +421 -0
- package/src/ts/components/scroll/plugins/SmoothScrollDragPlugin.ts +251 -0
- package/src/ts/components/scroll/plugins/SmoothScrollKeyboardPlugin.ts +166 -0
- package/src/ts/components/scroll/scrollable/ScrollEventsBase.ts +151 -0
- package/src/ts/components/scroll/scrollable/ScrollView.ts +435 -0
- package/src/ts/components/scroll/scrollbar/Bar.ts +364 -0
- package/src/ts/components/scroll/scrollbar/ScrollBar.ts +292 -0
- package/src/ts/components/scroll/smooth-scroll/SmoothScroll.ts +861 -0
- package/src/ts/components/scroll/types.ts +10 -0
- package/src/ts/components/text/SplitText.ts +418 -0
- package/src/ts/components/timeline/StaticTimeline.ts +197 -0
- package/src/ts/components/timeline/Timeline.ts +256 -0
- package/src/ts/index.ts +94 -0
- package/src/ts/utils/common/index.ts +9 -0
- package/src/ts/utils/common/mergeWithoutArrays.ts +20 -0
- package/src/ts/utils/common/randID.ts +9 -0
- package/src/ts/utils/common/timeoutCallback.ts +16 -0
- package/src/ts/utils/errors.ts +6 -0
- package/src/ts/utils/listeners/index.ts +7 -0
- package/src/ts/utils/listeners/intersectionObserverSupported.ts +10 -0
- package/src/ts/utils/listeners/onScroll.ts +56 -0
- package/src/ts/utils/math/boundVal.ts +15 -0
- package/src/ts/utils/math/index.ts +9 -0
- package/src/ts/utils/math/lerp.ts +16 -0
- package/src/ts/utils/math/scopeProgress.ts +23 -0
- package/src/ts/utils/types/general.ts +7 -0
- package/src/ts/utils/types/utility.ts +34 -0
- package/dist/js/AJAXEvent.js +0 -355
- package/dist/js/Application.js +0 -345
- package/dist/js/ColumnsModule.js +0 -392
- package/dist/js/CursorModule.js +0 -390
- package/dist/js/DraggerModule.js +0 -792
- package/dist/js/Event.js +0 -538
- package/dist/js/FilterModule.js +0 -943
- package/dist/js/FormModule.js +0 -706
- package/dist/js/FrameModule.js +0 -229
- package/dist/js/IntervalModule.js +0 -270
- package/dist/js/KeydownModule.js +0 -293
- package/dist/js/LoadEvent.js +0 -106
- package/dist/js/MenuBaseModule.js +0 -292
- package/dist/js/MenuModule.js +0 -265
- package/dist/js/MenuTimelineModule.js +0 -321
- package/dist/js/Module.js +0 -478
- package/dist/js/PageAjaxModule.js +0 -1010
- package/dist/js/PageLoadMediaPlugin.js +0 -285
- package/dist/js/PageModule.js +0 -440
- package/dist/js/PaginationModule.js +0 -961
- package/dist/js/PaginationScrollPlugin.js +0 -209
- package/dist/js/Plugin.js +0 -114
- package/dist/js/PopupModule.js +0 -942
- package/dist/js/PreloaderModule.js +0 -724
- package/dist/js/ResponsiveProp.js +0 -301
- package/dist/js/ScrollAnchorModule.js +0 -554
- package/dist/js/ScrollAnimateModule.js +0 -419
- package/dist/js/ScrollBarPlugin.js +0 -594
- package/dist/js/ScrollDragPlugin.js +0 -396
- package/dist/js/ScrollModule.js +0 -1071
- package/dist/js/ScrollViewModule.js +0 -388
- package/dist/js/SelectModule.js +0 -860
- package/dist/js/SliderCanvasModule.js +0 -733
- package/dist/js/SliderControlsPlugin.js +0 -247
- package/dist/js/SliderCounterPlugin.js +0 -278
- package/dist/js/SliderDotsPlugin.js +0 -270
- package/dist/js/SliderDragSwipePlugin.js +0 -245
- package/dist/js/SliderIntervalPlugin.js +0 -192
- package/dist/js/SliderKeydownPlugin.js +0 -185
- package/dist/js/SliderModule.js +0 -1062
- package/dist/js/SliderWheelPlugin.js +0 -194
- package/dist/js/TextAnimateModule.js +0 -663
- package/dist/js/TextSplitModule.js +0 -785
- package/dist/js/TimelineBaseModule.js +0 -405
- package/dist/js/TimelineModule.js +0 -494
- package/dist/js/URLEvent.js +0 -239
- package/dist/js/ViewportEvent.js +0 -465
- package/dist/js/WheelEventModule.js +0 -295
- package/dist/js/domChildOf.js +0 -46
- package/dist/js/domChildren.js +0 -47
- package/dist/js/domInsertAfter.js +0 -32
- package/dist/js/domRemoveChildren.js +0 -26
- package/dist/js/easing.js +0 -363
- package/dist/js/eventListenerAdd.js +0 -87
- package/dist/js/eventListenerGet.js +0 -49
- package/dist/js/eventListenerRemove.js +0 -36
- package/dist/js/generateId.js +0 -29
- package/dist/js/getBrowserName.js +0 -60
- package/dist/js/getOsName.js +0 -39
- package/dist/js/getVevetProperties.js +0 -22
- package/dist/js/index.js +0 -519
- package/dist/js/mathScopeProgress.js +0 -32
- package/dist/js/mathSpreadScopeProgress.js +0 -35
- package/dist/js/merge.js +0 -33
- package/dist/js/normalizeWheel.js +0 -97
- package/dist/js/text_animate_module_addons/_composite_elementary.js +0 -196
- package/dist/js/text_animate_module_addons/_elementary.js +0 -88
- package/dist/js/timeoutCallback.js +0 -26
- package/dist/js/vevet.js +0 -10
- package/dist/scss/_prefix.scss +0 -1
- package/dist/scss/classes/_clear.scss +0 -5
- package/dist/scss/classes/_col-row.scss +0 -48
- package/dist/scss/classes/_display.scss +0 -65
- package/dist/scss/classes/_document-reset.scss +0 -28
- package/dist/scss/classes/_document.scss +0 -7
- package/dist/scss/classes/_overflow.scss +0 -39
- package/dist/scss/classes/_position.scss +0 -55
- package/dist/scss/classes/_text.scss +0 -24
- package/dist/scss/classes/_transition.scss +0 -22
- package/dist/scss/classes/_wrap.scss +0 -31
- package/dist/scss/classes/index.scss +0 -14
- package/dist/scss/index.scss +0 -3
- package/dist/scss/mixins/_clear.scss +0 -6
- package/dist/scss/mixins/_display.scss +0 -6
- package/dist/scss/mixins/_form.scss +0 -14
- package/dist/scss/mixins/_position.scss +0 -42
- package/dist/scss/mixins/_reset.scss +0 -17
- package/dist/scss/mixins/_responsive.scss +0 -88
- package/dist/scss/mixins/index.scss +0 -7
- package/dist/scss/modules/columns/_settings.scss +0 -1
- package/dist/scss/modules/columns/index.scss +0 -19
- package/dist/scss/modules/cursor/_settings.scss +0 -7
- package/dist/scss/modules/cursor/index.scss +0 -15
- package/dist/scss/modules/form/_settings.scss +0 -15
- package/dist/scss/modules/form/index.scss +0 -57
- package/dist/scss/modules/index.scss +0 -11
- package/dist/scss/modules/menu/_button.scss +0 -58
- package/dist/scss/modules/menu/_menu.scss +0 -25
- package/dist/scss/modules/menu/_settings.scss +0 -23
- package/dist/scss/modules/menu/index.scss +0 -3
- package/dist/scss/modules/pagination/_settings.scss +0 -6
- package/dist/scss/modules/pagination/index.scss +0 -24
- package/dist/scss/modules/popup/_settings.scss +0 -26
- package/dist/scss/modules/popup/index.scss +0 -294
- package/dist/scss/modules/preloader/_settings.scss +0 -3
- package/dist/scss/modules/preloader/index.scss +0 -19
- package/dist/scss/modules/scroll/_settings.scss +0 -22
- package/dist/scss/modules/scroll/index.scss +0 -94
- package/dist/scss/modules/select/_settings.scss +0 -28
- package/dist/scss/modules/select/index.scss +0 -142
- package/dist/scss/modules/slider/_settings.scss +0 -35
- package/dist/scss/modules/slider/index.scss +0 -153
- package/dist/scss/modules/text/_settings.scss +0 -1
- package/dist/scss/modules/text/index.scss +0 -19
- package/dist/types/types.d.ts +0 -18763
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { Component, NComponent } from '../../../base/Component';
|
|
2
|
+
import { DeepRequired } from '../../../utils/types/utility';
|
|
3
|
+
import { AnimationFrame } from '../../animation-frame/AnimationFrame';
|
|
4
|
+
import { ScrollableElement } from '../types';
|
|
5
|
+
import { NCallbacks } from '../../../base/Callbacks';
|
|
6
|
+
export declare namespace NCustomScroll {
|
|
7
|
+
/**
|
|
8
|
+
* Static properties
|
|
9
|
+
*/
|
|
10
|
+
interface StaticProp extends NComponent.StaticProp {
|
|
11
|
+
/**
|
|
12
|
+
* Scroll elements
|
|
13
|
+
*/
|
|
14
|
+
selectors: {
|
|
15
|
+
/**
|
|
16
|
+
* Scrollable wrapper.
|
|
17
|
+
* You may pass either a CSS selector to find the element or the element itself.
|
|
18
|
+
* @default '#v-custom-scroll'
|
|
19
|
+
*/
|
|
20
|
+
outer: string | HTMLElement;
|
|
21
|
+
/**
|
|
22
|
+
* Scrollable elements inside the wrapper.
|
|
23
|
+
* You may pass either a CSS selector to find the elements or the elements themselves.
|
|
24
|
+
* @default '#v-custom-scroll'
|
|
25
|
+
*/
|
|
26
|
+
elements: false | string | NodeListOf<HTMLElement> | HTMLElement | HTMLElement[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Animation frame.
|
|
30
|
+
* Pass an AnimationFrame instance if you want to control the scrolling outside this class.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
animationFrame: false | AnimationFrame;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Changeable properties
|
|
37
|
+
*/
|
|
38
|
+
interface ChangeableProp extends NComponent.ChangeableProp {
|
|
39
|
+
/**
|
|
40
|
+
* If scrolling is enabled
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Recalculate sizes on each scroll update
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
recalculateSizes: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Use wheel event
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
useWheel: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If scrolling is horizontal
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
isHorizontal: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Automatically stop scrolling after the target and current values are approximated.
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
autoStop: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Linear interpolation ease
|
|
66
|
+
* @default 0.1
|
|
67
|
+
*/
|
|
68
|
+
lerp: number;
|
|
69
|
+
/**
|
|
70
|
+
* Sometimes scrolling may be choppy because of large decimal values in transforms.
|
|
71
|
+
* In such cases you may want to use this property.
|
|
72
|
+
* It works on the basis of "toFixed()" method
|
|
73
|
+
* @default false
|
|
74
|
+
*/
|
|
75
|
+
lerpToFixed: false | number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Available callbacks
|
|
79
|
+
*/
|
|
80
|
+
interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
81
|
+
'render': false;
|
|
82
|
+
'resize': false;
|
|
83
|
+
'approximate': false;
|
|
84
|
+
'wheel': WheelEvent;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
interface ScrollInnerElement extends HTMLElement {
|
|
88
|
+
customScrollTop: number;
|
|
89
|
+
customScrollLeft: number;
|
|
90
|
+
customScrollLerpEase: number;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create smooth scrolling.
|
|
94
|
+
*/
|
|
95
|
+
export declare class CustomScroll<StaticProp extends NCustomScroll.StaticProp = NCustomScroll.StaticProp, ChangeableProp extends NCustomScroll.ChangeableProp = NCustomScroll.ChangeableProp, CallbacksTypes extends NCustomScroll.CallbacksTypes = NCustomScroll.CallbacksTypes> extends Component<StaticProp, ChangeableProp, CallbacksTypes> implements ScrollableElement {
|
|
96
|
+
get prefix(): string;
|
|
97
|
+
/**
|
|
98
|
+
* Scroll parent
|
|
99
|
+
*/
|
|
100
|
+
protected _outer: HTMLElement;
|
|
101
|
+
get outer(): HTMLElement;
|
|
102
|
+
/**
|
|
103
|
+
* Scroll container. If the element does not exist indide the outer,
|
|
104
|
+
* it will be created automatically
|
|
105
|
+
*/
|
|
106
|
+
protected _container: HTMLElement;
|
|
107
|
+
get container(): HTMLElement;
|
|
108
|
+
/**
|
|
109
|
+
* If the container element existed before the class initialization
|
|
110
|
+
*/
|
|
111
|
+
protected _containerExists: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Scrollable elements
|
|
114
|
+
*/
|
|
115
|
+
protected _elements: ScrollInnerElement[];
|
|
116
|
+
get elements(): ScrollInnerElement[];
|
|
117
|
+
protected _elementsLength: number;
|
|
118
|
+
/**
|
|
119
|
+
* Scroll target value
|
|
120
|
+
*/
|
|
121
|
+
protected _targetLeft: number;
|
|
122
|
+
get targetLeft(): number;
|
|
123
|
+
set targetLeft(val: number);
|
|
124
|
+
/**
|
|
125
|
+
* Set value without animation request
|
|
126
|
+
*/
|
|
127
|
+
protected set targetLeftDry(val: number);
|
|
128
|
+
protected get targetLeftDry(): number;
|
|
129
|
+
/**
|
|
130
|
+
* Scroll target value
|
|
131
|
+
*/
|
|
132
|
+
protected _targetTop: number;
|
|
133
|
+
get targetTop(): number;
|
|
134
|
+
set targetTop(val: number);
|
|
135
|
+
/**
|
|
136
|
+
* Set value without animation request
|
|
137
|
+
*/
|
|
138
|
+
protected set targetTopDry(val: number);
|
|
139
|
+
protected get targetTopDry(): number;
|
|
140
|
+
/**
|
|
141
|
+
* Scroll left
|
|
142
|
+
*/
|
|
143
|
+
protected _scrollLeft: number;
|
|
144
|
+
get scrollLeft(): number;
|
|
145
|
+
set scrollLeft(val: number);
|
|
146
|
+
/**
|
|
147
|
+
* Scroll top
|
|
148
|
+
*/
|
|
149
|
+
protected _scrollTop: number;
|
|
150
|
+
get scrollTop(): number;
|
|
151
|
+
set scrollTop(val: number);
|
|
152
|
+
/**
|
|
153
|
+
* Scroll width
|
|
154
|
+
*/
|
|
155
|
+
protected _scrollWidth: number;
|
|
156
|
+
get scrollWidth(): number;
|
|
157
|
+
/**
|
|
158
|
+
* Scroll height
|
|
159
|
+
*/
|
|
160
|
+
protected _scrollHeight: number;
|
|
161
|
+
get scrollHeight(): number;
|
|
162
|
+
/**
|
|
163
|
+
* Parent width
|
|
164
|
+
*/
|
|
165
|
+
protected _clientWidth: number;
|
|
166
|
+
get clientWidth(): number;
|
|
167
|
+
/**
|
|
168
|
+
* Parent height
|
|
169
|
+
*/
|
|
170
|
+
protected _clientHeight: number;
|
|
171
|
+
get clientHeight(): number;
|
|
172
|
+
/**
|
|
173
|
+
* Maximum scrollable area of the X axis
|
|
174
|
+
*/
|
|
175
|
+
get maxScrollableWidth(): number;
|
|
176
|
+
/**
|
|
177
|
+
* Maximum scrollable area of the Y axis
|
|
178
|
+
*/
|
|
179
|
+
get maxScrollableHeight(): number;
|
|
180
|
+
/**
|
|
181
|
+
* If the approximation between the target and current scroll values must be instantaneous
|
|
182
|
+
*/
|
|
183
|
+
protected _instant: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Inner AnimationFrame.
|
|
186
|
+
* The AnimationFrame is not create if an outer AnimationFrame is passed in properties.
|
|
187
|
+
*/
|
|
188
|
+
protected _animationFrame?: AnimationFrame;
|
|
189
|
+
/**
|
|
190
|
+
* AnimationFrame callback is used for outer AnimationFrame only.
|
|
191
|
+
*/
|
|
192
|
+
protected _outerAnimationFrameEvent?: NCallbacks.AddedCallback;
|
|
193
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
194
|
+
protected _getDefaultProp(): DeepRequired<StaticProp & ChangeableProp> & {
|
|
195
|
+
selectors: {
|
|
196
|
+
outer: string | HTMLElement;
|
|
197
|
+
elements: string | false | HTMLElement | HTMLElement[] | {
|
|
198
|
+
[x: number]: HTMLElement;
|
|
199
|
+
item: (index: number) => HTMLElement;
|
|
200
|
+
forEach: (callbackfn: (value: HTMLElement, key: number, parent: NodeListOf<HTMLElement>) => void, thisArg?: any) => void;
|
|
201
|
+
entries: () => IterableIterator<[number, HTMLElement]>;
|
|
202
|
+
keys: () => IterableIterator<number>;
|
|
203
|
+
values: () => IterableIterator<HTMLElement>;
|
|
204
|
+
[Symbol.iterator]: () => IterableIterator<HTMLElement>;
|
|
205
|
+
readonly length: number;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
animationFrame: false | {
|
|
209
|
+
readonly isPlaying: boolean;
|
|
210
|
+
play: () => void;
|
|
211
|
+
pause: () => void;
|
|
212
|
+
readonly prop: {
|
|
213
|
+
parent: any;
|
|
214
|
+
fps: number;
|
|
215
|
+
run: boolean;
|
|
216
|
+
};
|
|
217
|
+
readonly callbacks: {
|
|
218
|
+
readonly callbacks: {
|
|
219
|
+
id: string;
|
|
220
|
+
on: boolean;
|
|
221
|
+
data: {
|
|
222
|
+
target: keyof import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes;
|
|
223
|
+
do: (arg: false | {
|
|
224
|
+
fps: number;
|
|
225
|
+
realFPS: number;
|
|
226
|
+
prevFrameDuration: number;
|
|
227
|
+
}) => void;
|
|
228
|
+
name: string;
|
|
229
|
+
timeout: number;
|
|
230
|
+
protected: boolean;
|
|
231
|
+
once: boolean;
|
|
232
|
+
};
|
|
233
|
+
}[];
|
|
234
|
+
add: <Target extends keyof import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes>(target: Target, func: (arg: import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes[Target]) => void, data?: NCallbacks.CallbackBaseSettings) => NCallbacks.AddedCallback;
|
|
235
|
+
remove: (id: string, removeProtected?: boolean) => boolean;
|
|
236
|
+
removeAll: (removeProtected?: boolean) => void;
|
|
237
|
+
turn: (id: string, enabled?: boolean) => boolean;
|
|
238
|
+
get: (id: string) => false | NCallbacks.CallbacksData<import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes>;
|
|
239
|
+
tbt: <T extends keyof import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes>(target: T, arg: import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes[T]) => void;
|
|
240
|
+
destroy: () => void;
|
|
241
|
+
};
|
|
242
|
+
readonly prefix: string;
|
|
243
|
+
readonly name: string;
|
|
244
|
+
readonly destroyed: boolean;
|
|
245
|
+
addResponsiveProp: (rules: import("../../..").NMutableProp.Responsive<import("../../animation-frame/AnimationFrame").NAnimationFrame.ChangeableProp>) => void;
|
|
246
|
+
changeProp: (prop?: import("../../animation-frame/AnimationFrame").NAnimationFrame.ChangeableProp) => void;
|
|
247
|
+
init: () => void;
|
|
248
|
+
addViewportCallback: (target: keyof import("../../..").NViewport.CallbacksTypes, func: (arg: import("../../..").NViewport.Changes) => void, data?: NCallbacks.CallbackBaseSettings) => NCallbacks.AddedCallback;
|
|
249
|
+
addCallback: <Target_1 extends keyof import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes>(target: Target_1, func: (arg: import("../../animation-frame/AnimationFrame").NAnimationFrame.CallbacksTypes[Target_1]) => void, data?: NCallbacks.CallbackBaseSettings) => NCallbacks.AddedCallback;
|
|
250
|
+
addEventListeners: <El extends import("vevet-dom").ListenerElement, Target_2 extends keyof HTMLElementEventMap, Callback extends (evt: HTMLElementEventMap[Target_2]) => void>(el: El, target: Target_2, callback: Callback, options?: import("vevet-dom").IAddEventListenerOptions) => import("vevet-dom").IAddEventListener;
|
|
251
|
+
destroy: () => void;
|
|
252
|
+
};
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
recalculateSizes: boolean;
|
|
255
|
+
useWheel: boolean;
|
|
256
|
+
isHorizontal: boolean;
|
|
257
|
+
autoStop: boolean;
|
|
258
|
+
lerp: number;
|
|
259
|
+
lerpToFixed: number | false;
|
|
260
|
+
};
|
|
261
|
+
protected _setEvents(): void;
|
|
262
|
+
protected _onPropMutate(): void;
|
|
263
|
+
/**
|
|
264
|
+
* Recalculate scroll sizes
|
|
265
|
+
*/
|
|
266
|
+
resize(
|
|
267
|
+
/**
|
|
268
|
+
* If the method was called natively on window resize
|
|
269
|
+
*/
|
|
270
|
+
native?: boolean): void;
|
|
271
|
+
/**
|
|
272
|
+
* Recalculate scroll sizes
|
|
273
|
+
*/
|
|
274
|
+
protected _recalculateSizes(): void;
|
|
275
|
+
/**
|
|
276
|
+
* Update elements' properties
|
|
277
|
+
*/
|
|
278
|
+
protected _updateElementsProp(): void;
|
|
279
|
+
/**
|
|
280
|
+
* Event on wheel
|
|
281
|
+
*/
|
|
282
|
+
protected _handleWheel(evt: WheelEvent): void;
|
|
283
|
+
/**
|
|
284
|
+
* Toggle animation: Enable / Disable scrolling
|
|
285
|
+
*/
|
|
286
|
+
protected _toggle(): void;
|
|
287
|
+
/**
|
|
288
|
+
* Enable scrolling
|
|
289
|
+
*/
|
|
290
|
+
enable(): void;
|
|
291
|
+
/**
|
|
292
|
+
* Disable scrolling
|
|
293
|
+
*/
|
|
294
|
+
disable(): void;
|
|
295
|
+
/**
|
|
296
|
+
* Render elements
|
|
297
|
+
*/
|
|
298
|
+
render(): void;
|
|
299
|
+
/**
|
|
300
|
+
* Calculate elements' values.
|
|
301
|
+
* @param {boolean} instant - If animation is to be implemented instantly.
|
|
302
|
+
*/
|
|
303
|
+
protected _calcElements(): void;
|
|
304
|
+
/**
|
|
305
|
+
* Interpolate values
|
|
306
|
+
*/
|
|
307
|
+
protected _lerp(current: number, target: number, ease?: number): number;
|
|
308
|
+
/**
|
|
309
|
+
* Get element ease
|
|
310
|
+
*/
|
|
311
|
+
protected _getLerpEase(el: ScrollInnerElement): number;
|
|
312
|
+
/**
|
|
313
|
+
* Render elements
|
|
314
|
+
*/
|
|
315
|
+
protected _renderElements(): void;
|
|
316
|
+
/**
|
|
317
|
+
* Destroy the scroll
|
|
318
|
+
*/
|
|
319
|
+
protected _destroy(): void;
|
|
320
|
+
}
|
|
321
|
+
export {};
|
|
322
|
+
//# sourceMappingURL=CustomScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomScroll.d.ts","sourceRoot":"","sources":["../../../../../src/ts/components/scroll/custom-scroll/CustomScroll.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,yBAAiB,aAAa,CAAC;IAE3B;;OAEG;IACH,UAAiB,UAAW,SAAQ,UAAU,CAAC,UAAU;QACrD;;WAEG;QACH,SAAS,EAAE;YACP;;;;eAIG;YACH,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;YAC5B;;;;eAIG;YACH,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,CA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{ DraggerMove, NDraggerMove } from '../../dragger/DraggerMove';
|
|
2
|
+
import { Plugin, NPlugin } from '../../../base/Plugin';
|
|
3
|
+
import { NCallbacks } from '../../../base/Callbacks';
|
|
4
|
+
import { SmoothScroll as SmoothScrollInstance } from '../smooth-scroll/SmoothScroll';
|
|
5
|
+
import { RequiredModuleProp } from '../../../utils/types/utility';
|
|
6
|
+
export declare namespace NSmoothScrollDragPlugin {
|
|
7
|
+
/**
|
|
8
|
+
* Static properties
|
|
9
|
+
*/
|
|
10
|
+
interface StaticProp extends NPlugin.StaticProp {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Changeable Properties
|
|
14
|
+
*/
|
|
15
|
+
interface ChangeableProp extends NPlugin.ChangeableProp {
|
|
16
|
+
/**
|
|
17
|
+
* If dragger is enabled
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Dragger speed
|
|
23
|
+
* @default 1
|
|
24
|
+
*/
|
|
25
|
+
speed?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Linear interpolation of SmoothScroll.
|
|
28
|
+
* If false, the current value will be used.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
lerp?: number | false;
|
|
32
|
+
/**
|
|
33
|
+
* If need to reverse dragger direction
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
reverseDir?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Available callbacks
|
|
40
|
+
*/
|
|
41
|
+
interface CallbacksTypes extends NPlugin.CallbacksTypes {
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A class for Plugins.
|
|
46
|
+
*/
|
|
47
|
+
export declare class SmoothScrollDragPlugin<StaticProp extends NSmoothScrollDragPlugin.StaticProp = NSmoothScrollDragPlugin.StaticProp, ChangeableProp extends NSmoothScrollDragPlugin.ChangeableProp = NSmoothScrollDragPlugin.ChangeableProp, CallbacksTypes extends NSmoothScrollDragPlugin.CallbacksTypes = NSmoothScrollDragPlugin.CallbacksTypes> extends Plugin<StaticProp, ChangeableProp, CallbacksTypes, SmoothScrollInstance> {
|
|
48
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
49
|
+
/**
|
|
50
|
+
* Dragger component
|
|
51
|
+
*/
|
|
52
|
+
protected _dragger?: DraggerMove;
|
|
53
|
+
/**
|
|
54
|
+
* Component events
|
|
55
|
+
*/
|
|
56
|
+
protected _componentEvents: NCallbacks.AddedCallback[];
|
|
57
|
+
/**
|
|
58
|
+
* If is dragging at the moment
|
|
59
|
+
*/
|
|
60
|
+
get isDragging(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Current lerp of SmoothScroll
|
|
63
|
+
*/
|
|
64
|
+
protected _currentLerp: number | false;
|
|
65
|
+
constructor(initialProp?: (StaticProp & ChangeableProp));
|
|
66
|
+
protected _constructor(): void;
|
|
67
|
+
protected _onPropMutate(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Add or remove dragger
|
|
70
|
+
*/
|
|
71
|
+
protected _toggleDragger(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Add dragger events
|
|
74
|
+
*/
|
|
75
|
+
protected _addDragger(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Remove dragger events
|
|
78
|
+
*/
|
|
79
|
+
protected _removeDragger(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Callback on dragging start
|
|
82
|
+
*/
|
|
83
|
+
protected _handleDragStart(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Callback on dragging move
|
|
86
|
+
*/
|
|
87
|
+
protected _handleDragMove(data: NDraggerMove.CallbacksTypes['move']): void;
|
|
88
|
+
/**
|
|
89
|
+
* Callback on dragging end
|
|
90
|
+
*/
|
|
91
|
+
protected _handleDragEnd(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Destroy the plugin
|
|
94
|
+
*/
|
|
95
|
+
protected _destroy(): void;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=SmoothScrollDragPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmoothScrollDragPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/ts/components/scroll/plugins/SmoothScrollDragPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAMlE,yBAAiB,uBAAuB,CAAC;IAErC;;OAEG;IACH,UAAiB,UAAW,SAAQ,OAAO,CAAC,UAAU;KAAG;IAEzD;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;QAC1D;;;WAGG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;;WAIG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QACtB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;KACxB;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;KAAG;CAEpE;AAID;;GAEG;AACH,qBAAa,sBAAsB,CAC/B,UAAU,SAAS,uBAAuB,CAAC,UAAU,GAC/C,uBAAuB,CAAC,UAAU,EACxC,cAAc,SAAS,uBAAuB,CAAC,cAAc,GACvD,uBAAuB,CAAC,cAAc,EAC5C,cAAc,SAAS,uBAAuB,CAAC,cAAc,GACvD,uBAAuB,CAAC,cAAc,CAC9C,SAAQ,MAAM,CACZ,UAAU,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,CACvB;IACG,SAAS,CAAC,eAAe,CACrB,CAAC,SAAS,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,KACvD,CAAC;IAUP;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC;IAEvD;;OAEG;IACH,IAAI,UAAU,YAKb;IAED;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC;gBAKnC,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC;IAO/C,SAAS,CAAC,YAAY;IAKtB,SAAS,CAAC,aAAa;IAOvB;;OAEG;IACH,SAAS,CAAC,cAAc;IAQxB;;OAEG;IACH,SAAS,CAAC,WAAW;IAoBrB;;OAEG;IACH,SAAS,CAAC,cAAc;IAgBxB;;OAEG;IACH,SAAS,CAAC,gBAAgB;IAoB1B;;OAEG;IACH,SAAS,CAAC,eAAe,CACrB,IAAI,EAAE,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC;IAe7C;;OAEG;IACH,SAAS,CAAC,cAAc;IAkBxB;;OAEG;IACH,SAAS,CAAC,QAAQ;CAIrB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Plugin, NPlugin } from '../../../base/Plugin';
|
|
2
|
+
import { SmoothScroll as SmoothScrollInstance } from '../smooth-scroll/SmoothScroll';
|
|
3
|
+
export declare namespace NSmoothScrollKeyboardPlugin {
|
|
4
|
+
/**
|
|
5
|
+
* Static properties
|
|
6
|
+
*/
|
|
7
|
+
interface StaticProp extends NPlugin.StaticProp {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Changeable Properties
|
|
11
|
+
*/
|
|
12
|
+
interface ChangeableProp extends NPlugin.ChangeableProp {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Available callbacks
|
|
16
|
+
*/
|
|
17
|
+
interface CallbacksTypes extends NPlugin.CallbacksTypes {
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A class for Plugins.
|
|
22
|
+
*/
|
|
23
|
+
export declare class SmoothScrollKeyboardPlugin<StaticProp extends NSmoothScrollKeyboardPlugin.StaticProp = NSmoothScrollKeyboardPlugin.StaticProp, ChangeableProp extends NSmoothScrollKeyboardPlugin.ChangeableProp = NSmoothScrollKeyboardPlugin.ChangeableProp, CallbacksTypes extends NSmoothScrollKeyboardPlugin.CallbacksTypes = NSmoothScrollKeyboardPlugin.CallbacksTypes> extends Plugin<StaticProp, ChangeableProp, CallbacksTypes, SmoothScrollInstance> {
|
|
24
|
+
protected _setEvents(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Event on a key pressed
|
|
27
|
+
*/
|
|
28
|
+
protected _handleKeydown(e: KeyboardEvent): void;
|
|
29
|
+
/**
|
|
30
|
+
* Handle Tab key pressed
|
|
31
|
+
*/
|
|
32
|
+
protected _handleTab(): void;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=SmoothScrollKeyboardPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmoothScrollKeyboardPlugin.d.ts","sourceRoot":"","sources":["../../../../../src/ts/components/scroll/plugins/SmoothScrollKeyboardPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,YAAY,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAIrF,yBAAiB,2BAA2B,CAAC;IAEzC;;OAEG;IACH,UAAiB,UAAW,SAAQ,OAAO,CAAC,UAAU;KAAG;IAEzD;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;KAAG;IAEjE;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;KAAG;CAEpE;AAID;;GAEG;AACH,qBAAa,0BAA0B,CACnC,UAAU,SAAS,2BAA2B,CAAC,UAAU,GACnD,2BAA2B,CAAC,UAAU,EAC5C,cAAc,SAAS,2BAA2B,CAAC,cAAc,GAC3D,2BAA2B,CAAC,cAAc,EAChD,cAAc,SAAS,2BAA2B,CAAC,cAAc,GAC3D,2BAA2B,CAAC,cAAc,CAClD,SAAQ,MAAM,CACZ,UAAU,EACV,cAAc,EACd,cAAc,EACd,oBAAoB,CACvB;IACG,SAAS,CAAC,UAAU;IASpB;;OAEG;IACH,SAAS,CAAC,cAAc,CAAE,CAAC,EAAE,aAAa;IA2E1C;;OAEG;IACH,SAAS,CAAC,UAAU;CA+BvB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Component, NComponent } from '../../../base/Component';
|
|
2
|
+
import { RequiredModuleProp } from '../../../utils/types/utility';
|
|
3
|
+
import { SmoothScroll } from '../smooth-scroll/SmoothScroll';
|
|
4
|
+
export declare namespace NScrollEventsBase {
|
|
5
|
+
/**
|
|
6
|
+
* Static properties
|
|
7
|
+
*/
|
|
8
|
+
interface StaticProp extends NComponent.StaticProp {
|
|
9
|
+
/**
|
|
10
|
+
* The scrollable element
|
|
11
|
+
* @default window
|
|
12
|
+
*/
|
|
13
|
+
container?: string | Element | SmoothScroll | Window;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Changeable properties
|
|
17
|
+
*/
|
|
18
|
+
interface ChangeableProp extends NComponent.ChangeableProp {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Available callbacks
|
|
22
|
+
*/
|
|
23
|
+
interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* BoundingRect
|
|
27
|
+
*/
|
|
28
|
+
interface BoundingRect {
|
|
29
|
+
top: number;
|
|
30
|
+
left: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A base for scroll event components
|
|
37
|
+
*/
|
|
38
|
+
export declare abstract class ScrollEventsBase<StaticProp extends NScrollEventsBase.StaticProp = NScrollEventsBase.StaticProp, ChangeableProp extends NScrollEventsBase.ChangeableProp = NScrollEventsBase.ChangeableProp, CallbacksTypes extends NScrollEventsBase.CallbacksTypes = NScrollEventsBase.CallbacksTypes> extends Component<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
39
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
40
|
+
/**
|
|
41
|
+
* Scroll container
|
|
42
|
+
*/
|
|
43
|
+
protected _scrollContainer: Element | SmoothScroll | Window;
|
|
44
|
+
get scrollContainer(): Element | Window | SmoothScroll<import("../smooth-scroll/SmoothScroll").NSmoothScroll.StaticProp, import("../smooth-scroll/SmoothScroll").NSmoothScroll.ChangeableProp, import("../smooth-scroll/SmoothScroll").NSmoothScroll.CallbacksTypes>;
|
|
45
|
+
get scrollableElement(): Element | SmoothScroll<import("../smooth-scroll/SmoothScroll").NSmoothScroll.StaticProp, import("../smooth-scroll/SmoothScroll").NSmoothScroll.ChangeableProp, import("../smooth-scroll/SmoothScroll").NSmoothScroll.CallbacksTypes>;
|
|
46
|
+
/**
|
|
47
|
+
* Parent of inner elements
|
|
48
|
+
*/
|
|
49
|
+
protected get domParent(): Element;
|
|
50
|
+
/**
|
|
51
|
+
* Used as a "root" for IntersectionObserver
|
|
52
|
+
*/
|
|
53
|
+
protected get intersectionRoot(): Element;
|
|
54
|
+
/**
|
|
55
|
+
* BoundingRect of 'scrollContainer'
|
|
56
|
+
*/
|
|
57
|
+
protected get scrollContainerBounding(): NScrollEventsBase.BoundingRect;
|
|
58
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=ScrollEventsBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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KpB;IAED;;OAEG;IACH,SAAS,KAAK,SAAS,YAStB;IAED;;OAEG;IACH,SAAS,KAAK,gBAAgB,YAS7B;IAED;;OAEG;IACH,SAAS,KAAK,uBAAuB,IAAK,iBAAiB,CAAC,YAAY,CAgBvE;gBAKG,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAC3C,IAAI,UAAO;CAgBlB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { SelectorAll } from 'vevet-dom';
|
|
2
|
+
import { ScrollEventsBase, NScrollEventsBase } from './ScrollEventsBase';
|
|
3
|
+
import { IRemovable } from '../../../utils/types/general';
|
|
4
|
+
import { RequiredModuleProp } from '../../../utils/types/utility';
|
|
5
|
+
export declare namespace NScrollView {
|
|
6
|
+
/**
|
|
7
|
+
* Static properties
|
|
8
|
+
*/
|
|
9
|
+
interface StaticProp extends NScrollEventsBase.StaticProp {
|
|
10
|
+
/**
|
|
11
|
+
* Elements to seek
|
|
12
|
+
* @default '.v-scroll-view__el'
|
|
13
|
+
*/
|
|
14
|
+
elements?: SelectorAll;
|
|
15
|
+
/**
|
|
16
|
+
* The moment at which the element is considered to be in the viewport.
|
|
17
|
+
* The value is calculated from top to bottom or from left to right.
|
|
18
|
+
* @default 0.95
|
|
19
|
+
*/
|
|
20
|
+
threshold?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Define what states to trace.
|
|
23
|
+
* @default 'in'
|
|
24
|
+
*/
|
|
25
|
+
states?: 'in' | 'inout';
|
|
26
|
+
/**
|
|
27
|
+
* A class to be toggled on state change
|
|
28
|
+
* @default 'viewed'
|
|
29
|
+
*/
|
|
30
|
+
classToToggle?: string;
|
|
31
|
+
/**
|
|
32
|
+
* If need to use delays on firstStart
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
useDelay?: false | {
|
|
36
|
+
max: number;
|
|
37
|
+
dir: 'x' | 'y';
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Use IntersectionObserver is supported
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
useIntersectionObserver?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Changeable properties
|
|
47
|
+
*/
|
|
48
|
+
interface ChangeableProp extends NScrollEventsBase.ChangeableProp {
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* View element
|
|
52
|
+
*/
|
|
53
|
+
interface El extends Element {
|
|
54
|
+
scrollViewIn?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Available callbacks
|
|
58
|
+
*/
|
|
59
|
+
interface CallbacksTypes extends NScrollEventsBase.CallbacksTypes {
|
|
60
|
+
'in': El;
|
|
61
|
+
'out': El;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Elements into viewport
|
|
66
|
+
*/
|
|
67
|
+
export declare class ScrollView<StaticProp extends NScrollView.StaticProp = NScrollView.StaticProp, ChangeableProp extends NScrollView.ChangeableProp = NScrollView.ChangeableProp, CallbacksTypes extends NScrollView.CallbacksTypes = NScrollView.CallbacksTypes> extends ScrollEventsBase<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
68
|
+
get prefix(): string;
|
|
69
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
70
|
+
/**
|
|
71
|
+
* Scroll event
|
|
72
|
+
*/
|
|
73
|
+
protected _scrollEvent?: IRemovable;
|
|
74
|
+
/**
|
|
75
|
+
* Intersection observer
|
|
76
|
+
*/
|
|
77
|
+
protected _intersectionObserver?: IntersectionObserver;
|
|
78
|
+
/**
|
|
79
|
+
* If first start
|
|
80
|
+
*/
|
|
81
|
+
protected _firstStart: boolean;
|
|
82
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
83
|
+
init(): void;
|
|
84
|
+
protected _setEvents(): void;
|
|
85
|
+
protected _onPropMutate(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Resize the scene
|
|
88
|
+
*/
|
|
89
|
+
resize(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Set View events: scroll or intersection
|
|
92
|
+
*/
|
|
93
|
+
protected _setViewEvents(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Remove View events: scroll or intersection
|
|
96
|
+
*/
|
|
97
|
+
protected _removeViewEvents(): void;
|
|
98
|
+
protected _elements: NScrollView.El[];
|
|
99
|
+
/**
|
|
100
|
+
* Element to seek
|
|
101
|
+
*/
|
|
102
|
+
get elements(): NScrollView.El[];
|
|
103
|
+
/**
|
|
104
|
+
* Update elements
|
|
105
|
+
*/
|
|
106
|
+
updateElements(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Event on IntersectionObserver
|
|
109
|
+
*/
|
|
110
|
+
protected _handleIntersectionObserver(data: IntersectionObserverEntry[]): void;
|
|
111
|
+
/**
|
|
112
|
+
* Event on Scroll
|
|
113
|
+
*/
|
|
114
|
+
protected _handleScroll(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Seek the elements by their bounding.
|
|
117
|
+
* Only if IntersectionObserver is not used.
|
|
118
|
+
*/
|
|
119
|
+
seekBounding(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Check element's bounding to define if it is in viewport
|
|
122
|
+
*/
|
|
123
|
+
protected _elementInViewportData(el: Element, parentBounding: NScrollEventsBase.BoundingRect): {
|
|
124
|
+
isIntersecting: boolean;
|
|
125
|
+
delay: number;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Event that is triggered when an element appears or disappears
|
|
129
|
+
*/
|
|
130
|
+
protected _handleInOut(el: NScrollView.El, inViewport: boolean, delay?: number): void;
|
|
131
|
+
/**
|
|
132
|
+
* Remove elements that are mo more in need
|
|
133
|
+
*/
|
|
134
|
+
protected _processUnusedElements(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Destroy the module
|
|
137
|
+
*/
|
|
138
|
+
protected _destroy(): void;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=ScrollView.d.ts.map
|