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,96 @@
|
|
|
1
|
+
import { Component, NComponent } from '../../base/Component';
|
|
2
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
3
|
+
export declare namespace NAnimationFrame {
|
|
4
|
+
/**
|
|
5
|
+
* Static properties
|
|
6
|
+
*/
|
|
7
|
+
interface StaticProp extends NComponent.StaticProp {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Changeable properties
|
|
11
|
+
*/
|
|
12
|
+
interface ChangeableProp extends NComponent.ChangeableProp {
|
|
13
|
+
/**
|
|
14
|
+
* Frames per second
|
|
15
|
+
* @default 140
|
|
16
|
+
*/
|
|
17
|
+
fps?: number;
|
|
18
|
+
/**
|
|
19
|
+
* If need to start the frame
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
run?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Available callbacks
|
|
26
|
+
*/
|
|
27
|
+
interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
28
|
+
'frame': {
|
|
29
|
+
fps: number;
|
|
30
|
+
realFPS: number;
|
|
31
|
+
prevFrameDuration: number;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Launch an animation frame with a certain FPS
|
|
37
|
+
*/
|
|
38
|
+
export declare class AnimationFrame<StaticProp extends NAnimationFrame.StaticProp = NAnimationFrame.StaticProp, ChangeableProp extends NAnimationFrame.ChangeableProp = NAnimationFrame.ChangeableProp, CallbacksTypes extends NAnimationFrame.CallbacksTypes = NAnimationFrame.CallbacksTypes> extends Component<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
39
|
+
/**
|
|
40
|
+
* If the frame is launched
|
|
41
|
+
*/
|
|
42
|
+
protected _isPlaying: boolean;
|
|
43
|
+
get isPlaying(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The animation frame
|
|
46
|
+
*/
|
|
47
|
+
protected _frame: number | null;
|
|
48
|
+
/**
|
|
49
|
+
* Previous frame segment
|
|
50
|
+
*/
|
|
51
|
+
protected _frameIndex: number;
|
|
52
|
+
/**
|
|
53
|
+
* Timestamp
|
|
54
|
+
*/
|
|
55
|
+
protected _timeStamp: null | number;
|
|
56
|
+
/**
|
|
57
|
+
* Previous frame duration
|
|
58
|
+
*/
|
|
59
|
+
protected _prevFrameTime: null | number;
|
|
60
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
61
|
+
/**
|
|
62
|
+
* Get default properties
|
|
63
|
+
*/
|
|
64
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
65
|
+
protected _constructor(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Create the frame
|
|
68
|
+
*/
|
|
69
|
+
protected _create(): void;
|
|
70
|
+
protected _onPropMutate(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Launch the animation frame.
|
|
73
|
+
*/
|
|
74
|
+
play(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Launch the animation frame.
|
|
77
|
+
*/
|
|
78
|
+
protected _play(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Stop the animation frame
|
|
81
|
+
*/
|
|
82
|
+
pause(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Stop the animation frame
|
|
85
|
+
*/
|
|
86
|
+
protected _pause(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Launch the animation frame.
|
|
89
|
+
*/
|
|
90
|
+
protected _animate(timestamp: number): void;
|
|
91
|
+
/**
|
|
92
|
+
* Destroy the animation frame
|
|
93
|
+
*/
|
|
94
|
+
protected _destroy(): void;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=AnimationFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationFrame.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/animation-frame/AnimationFrame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,yBAAiB,eAAe,CAAC;IAE7B;;OAEG;IACH,UAAiB,UAAW,SAAQ,UAAU,CAAC,UAAU;KAAI;IAE7D;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;QAC7D;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QACb;;;WAGG;QACH,GAAG,CAAC,EAAE,OAAO,CAAC;KACjB;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;QAC7D,OAAO,EAAE;YACL,GAAG,EAAE,MAAM,CAAC;YACZ,OAAO,EAAE,MAAM,CAAC;YAChB,iBAAiB,EAAE,MAAM,CAAC;SAC7B,CAAC;KACL;CAEJ;AAID;;GAEG;AACH,qBAAa,cAAc,CACvB,UAAU,SAAS,eAAe,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,EAC1E,cAAc,SAAS,eAAe,CAAC,cAAc,GAAG,eAAe,CAAC,cAAc,EACtF,cAAc,SAAS,eAAe,CAAC,cAAc,GAAG,eAAe,CAAC,cAAc,CACxF,SAAQ,SAAS,CACf,UAAU,EACV,cAAc,EACd,cAAc,CACjB;IACG;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC;IAC9B,IAAI,SAAS,YAEZ;IAED;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGhC;;OAEG;IACF,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,cAAc,EAAE,IAAI,GAAG,MAAM,CAAC;gBAKpC,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAC3C,IAAI,UAAO;IAef;;OAEG;IACH,SAAS,CAAC,eAAe,CACrB,CAAC,SAAS,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,KACvD,CAAC;IASP,SAAS,CAAC,YAAY;IAOtB;;OAEG;IACH,SAAS,CAAC,OAAO;IAMjB,SAAS,CAAC,aAAa;IAavB;;OAEG;IACI,IAAI;IAYX;;OAEG;IACH,SAAS,CAAC,KAAK;IAYf;;OAEG;IACI,KAAK;IASZ;;OAEG;IACH,SAAS,CAAC,MAAM;IAehB;;OAEG;IACH,SAAS,CAAC,QAAQ,CACd,SAAS,EAAE,MAAM;IA8CrB;;OAEG;IACH,SAAS,CAAC,QAAQ;CAIrB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Component, NComponent } from '../../base/Component';
|
|
2
|
+
import { NViewport } from '../../app/events/Viewport';
|
|
3
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
4
|
+
export declare namespace NCtx2D {
|
|
5
|
+
/**
|
|
6
|
+
* Static properties
|
|
7
|
+
*/
|
|
8
|
+
interface StaticProp extends NComponent.StaticProp {
|
|
9
|
+
/**
|
|
10
|
+
* The parent element of the canvas. If false, it will be Window.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
container?: false | Element;
|
|
14
|
+
/**
|
|
15
|
+
* Defines if you need to append the canvas element to the parent.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
append?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Update sizes on resize
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
updateOnResize?: boolean | keyof NViewport.CallbacksTypes;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Changeable properties
|
|
27
|
+
*/
|
|
28
|
+
interface ChangeableProp extends NComponent.ChangeableProp {
|
|
29
|
+
/**
|
|
30
|
+
* The width of the canvas (dpr = 1).
|
|
31
|
+
* If false, the width will be the same as of the parent.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
width?: false | number;
|
|
35
|
+
/**
|
|
36
|
+
* The height of the canvas (dpr = 1).
|
|
37
|
+
* If false, the height will be the same as of the parent.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
height?: false | number;
|
|
41
|
+
/**
|
|
42
|
+
* Device pixel ratio.
|
|
43
|
+
* If false, the value will be calculated automatically.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
dpr?: false | number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Available callbacks
|
|
50
|
+
*/
|
|
51
|
+
interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
52
|
+
'resize': false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Makes working with canvas easier.
|
|
57
|
+
* It creates an HTML5 Canvas element and its 2d context and can
|
|
58
|
+
* implement automatic resize.
|
|
59
|
+
*/
|
|
60
|
+
export declare class Ctx2D<StaticProp extends NCtx2D.StaticProp = NCtx2D.StaticProp, ChangeableProp extends NCtx2D.ChangeableProp = NCtx2D.ChangeableProp, CallbacksTypes extends NCtx2D.CallbacksTypes = NCtx2D.CallbacksTypes> extends Component<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
61
|
+
/**
|
|
62
|
+
* The parent container of the canvas
|
|
63
|
+
*/
|
|
64
|
+
get container(): false | Element;
|
|
65
|
+
/**
|
|
66
|
+
* The Canvas element itself
|
|
67
|
+
*/
|
|
68
|
+
protected _canvas: HTMLCanvasElement;
|
|
69
|
+
get canvas(): HTMLCanvasElement;
|
|
70
|
+
/**
|
|
71
|
+
* 2D Context
|
|
72
|
+
*/
|
|
73
|
+
protected _ctx: CanvasRenderingContext2D;
|
|
74
|
+
get ctx(): CanvasRenderingContext2D;
|
|
75
|
+
/**
|
|
76
|
+
* The width of the canvas
|
|
77
|
+
*/
|
|
78
|
+
protected _width: number;
|
|
79
|
+
get width(): number;
|
|
80
|
+
/**
|
|
81
|
+
* Canvas width without DPR
|
|
82
|
+
*/
|
|
83
|
+
get nonDPRWidth(): number;
|
|
84
|
+
/**
|
|
85
|
+
* The height of the canvas
|
|
86
|
+
*/
|
|
87
|
+
protected _height: number;
|
|
88
|
+
get height(): number;
|
|
89
|
+
/**
|
|
90
|
+
* Canvas height without DPR
|
|
91
|
+
*/
|
|
92
|
+
get nonDPRHeight(): number;
|
|
93
|
+
/**
|
|
94
|
+
* Device pixel ratio
|
|
95
|
+
*/
|
|
96
|
+
protected _dpr: number;
|
|
97
|
+
get dpr(): number;
|
|
98
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
99
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
100
|
+
protected _setEvents(): void;
|
|
101
|
+
protected _onPropMutate(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Resize the canvas
|
|
104
|
+
*/
|
|
105
|
+
resize(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Destroy the module
|
|
108
|
+
*/
|
|
109
|
+
protected _destroy(): void;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=Ctx2D.d.ts.map
|
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;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACrC,IAAI,MAAM,sBAET;IAED;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACzC,IAAI,GAAG,6BAEN;IAED;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,IAAI,KAAK,WAER;IACD;;OAEG;IACH,IAAI,WAAW,WAEd;IAED;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,IAAI,MAAM,WAET;IACD;;OAEG;IACH,IAAI,YAAY,WAEf;IAED;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;IACvB,IAAI,GAAG,WAEN;gBAKG,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAC3C,IAAI,UAAO;IAyBf,SAAS,CAAC,eAAe,CACrB,CAAC,SAAS,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,KACvD,CAAC;IAaP,SAAS,CAAC,UAAU;IAWpB,SAAS,CAAC,aAAa;IAOvB;;OAEG;IACI,MAAM;IA8Cb;;OAEG;IACH,SAAS,CAAC,QAAQ;CAOrB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseProp, PosRule } from 'get-image-pos';
|
|
2
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
3
|
+
import { Ctx2D, NCtx2D } from './Ctx2D';
|
|
4
|
+
export declare namespace NCtx2DPrerender {
|
|
5
|
+
/**
|
|
6
|
+
* Static properties
|
|
7
|
+
*/
|
|
8
|
+
interface StaticProp extends NCtx2D.StaticProp {
|
|
9
|
+
/**
|
|
10
|
+
* Media element
|
|
11
|
+
*/
|
|
12
|
+
media: BaseProp['source'] | false;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Changeable properties
|
|
16
|
+
*/
|
|
17
|
+
interface ChangeableProp extends NCtx2D.ChangeableProp {
|
|
18
|
+
/**
|
|
19
|
+
* Media position rule
|
|
20
|
+
*/
|
|
21
|
+
posRule?: PosRule;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Available callbacks
|
|
25
|
+
*/
|
|
26
|
+
interface CallbacksTypes extends NCtx2D.CallbacksTypes {
|
|
27
|
+
'prerender': false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The class allows you to prerender media for further use with reduced payloads.
|
|
32
|
+
*/
|
|
33
|
+
export declare class Ctx2DPrerender<StaticProp extends NCtx2DPrerender.StaticProp = NCtx2DPrerender.StaticProp, ChangeableProp extends NCtx2DPrerender.ChangeableProp = NCtx2DPrerender.ChangeableProp, CallbacksTypes extends NCtx2DPrerender.CallbacksTypes = NCtx2DPrerender.CallbacksTypes> extends Ctx2D<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
34
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
35
|
+
/**
|
|
36
|
+
* Resize the canvas
|
|
37
|
+
*/
|
|
38
|
+
resize(): void;
|
|
39
|
+
protected _prerender(): void;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=Ctx2DPrerender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ctx2DPrerender.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/canvas/Ctx2DPrerender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAIxC,yBAAiB,eAAe,CAAC;IAE7B;;OAEG;IACH,UAAiB,UAAW,SAAQ,MAAM,CAAC,UAAU;QACjD;;WAEG;QACH,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;KACrC;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,MAAM,CAAC,cAAc;QACzD;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,MAAM,CAAC,cAAc;QACzD,WAAW,EAAE,KAAK,CAAA;KACrB;CAEJ;AAID;;GAEG;AACH,qBAAa,cAAc,CACvB,UAAU,SAAS,eAAe,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,EAC1E,cAAc,SAAS,eAAe,CAAC,cAAc,GAAG,eAAe,CAAC,cAAc,EACtF,cAAc,SAAS,eAAe,CAAC,cAAc,GAAG,eAAe,CAAC,cAAc,CACxF,SAAQ,KAAK,CACX,UAAU,EACV,cAAc,EACd,cAAc,CACjB;IACG,SAAS,CAAC,eAAe,CACrB,CAAC,SAAS,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,KACvD,CAAC;IAQP;;OAEG;IACI,MAAM;IAKb,SAAS,CAAC,UAAU;CA0BvB"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { AnimationFrame } from '../animation-frame/AnimationFrame';
|
|
2
|
+
import { Component, NComponent } from '../../base/Component';
|
|
3
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
4
|
+
export declare namespace NCustomCursor {
|
|
5
|
+
/**
|
|
6
|
+
* Static properties
|
|
7
|
+
*/
|
|
8
|
+
interface StaticProp extends NComponent.StaticProp {
|
|
9
|
+
/**
|
|
10
|
+
* Cursor parent element
|
|
11
|
+
* @default window
|
|
12
|
+
*/
|
|
13
|
+
container?: Window | Element | string;
|
|
14
|
+
/**
|
|
15
|
+
* If need to launch cursor animation after anitialization
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
run?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If need to hide the native cursor
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
hideNativeCursor?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Changeable properties
|
|
27
|
+
*/
|
|
28
|
+
interface ChangeableProp extends NComponent.ChangeableProp {
|
|
29
|
+
render?: {
|
|
30
|
+
/**
|
|
31
|
+
* Linear interpolation of coordinates. Speed
|
|
32
|
+
* @default 0.2
|
|
33
|
+
*/
|
|
34
|
+
lerp?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Sometimes animation may be choppy because of large decimal values in transforms.
|
|
37
|
+
* In such cases you may want to use this property.
|
|
38
|
+
* It works on the basis of "toFixed()" method. Only integers
|
|
39
|
+
* @default 2
|
|
40
|
+
*/
|
|
41
|
+
lerpToFixed?: false | number;
|
|
42
|
+
/**
|
|
43
|
+
* On different screens with different FPS, scrolling may be faster or slower.
|
|
44
|
+
* This property is to normalize scrolling speed across different FPS.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
normalizeLerp?: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Automatically stop rendering after the target and current values are approximated.
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
autoStop?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Available callbacks
|
|
57
|
+
*/
|
|
58
|
+
interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
59
|
+
'create': {
|
|
60
|
+
outerCursor: HTMLElement;
|
|
61
|
+
innerCursor: HTMLElement;
|
|
62
|
+
};
|
|
63
|
+
'render': {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates a smooth custom cursor
|
|
71
|
+
*/
|
|
72
|
+
export declare class CustomCursor<StaticProp extends NCustomCursor.StaticProp = NCustomCursor.StaticProp, ChangeableProp extends NCustomCursor.ChangeableProp = NCustomCursor.ChangeableProp, CallbacksTypes extends NCustomCursor.CallbacksTypes = NCustomCursor.CallbacksTypes> extends Component<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
73
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
74
|
+
get prefix(): string;
|
|
75
|
+
/**
|
|
76
|
+
* Cursor container
|
|
77
|
+
*/
|
|
78
|
+
get container(): Element | Window;
|
|
79
|
+
protected _container: Element | Window;
|
|
80
|
+
protected _containerIsWindow: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The element for events
|
|
83
|
+
*/
|
|
84
|
+
get eventsContainer(): Element | Window;
|
|
85
|
+
/**
|
|
86
|
+
* The DOM parent for the cursor element
|
|
87
|
+
*/
|
|
88
|
+
get domContainer(): HTMLElement;
|
|
89
|
+
/**
|
|
90
|
+
* Cursor element (outer element)
|
|
91
|
+
*/
|
|
92
|
+
get outerCursor(): HTMLElement;
|
|
93
|
+
protected _outerCursor: HTMLElement;
|
|
94
|
+
/**
|
|
95
|
+
* Cursor element (inner element)
|
|
96
|
+
*/
|
|
97
|
+
get innerCursor(): HTMLElement;
|
|
98
|
+
protected _innerCursor: HTMLElement;
|
|
99
|
+
/**
|
|
100
|
+
* Animation frame
|
|
101
|
+
*/
|
|
102
|
+
protected _animationFrame: AnimationFrame;
|
|
103
|
+
/**
|
|
104
|
+
* Current FPS. Used to normalize LERP ease
|
|
105
|
+
*/
|
|
106
|
+
protected _currentFPS: number;
|
|
107
|
+
/**
|
|
108
|
+
* If can play animation
|
|
109
|
+
*/
|
|
110
|
+
protected _canPlay: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Current X coordinate relative to Window
|
|
113
|
+
*/
|
|
114
|
+
get x(): number;
|
|
115
|
+
protected _x: number;
|
|
116
|
+
/**
|
|
117
|
+
* Target coordinate
|
|
118
|
+
*/
|
|
119
|
+
protected _xTarget: number;
|
|
120
|
+
/**
|
|
121
|
+
* Current Y coordinate relative to Window
|
|
122
|
+
*/
|
|
123
|
+
get y(): number;
|
|
124
|
+
protected _y: number;
|
|
125
|
+
/**
|
|
126
|
+
* Target coordinate
|
|
127
|
+
*/
|
|
128
|
+
protected _yTarget: number;
|
|
129
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
130
|
+
protected _constructor(): void;
|
|
131
|
+
protected _setEvents(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Create custom cursor
|
|
134
|
+
*/
|
|
135
|
+
protected _createCursor(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Destroy the cursor
|
|
138
|
+
*/
|
|
139
|
+
protected _destroyCursor(): void;
|
|
140
|
+
/**
|
|
141
|
+
* Event on mouse enter
|
|
142
|
+
*/
|
|
143
|
+
protected _handleMouseEnter(evt: MouseEvent): void;
|
|
144
|
+
/**
|
|
145
|
+
* Event on mouse leave
|
|
146
|
+
*/
|
|
147
|
+
protected _handleMouseLeave(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Event on mouse move
|
|
150
|
+
*/
|
|
151
|
+
protected _handleMouseMove(evt: MouseEvent): void;
|
|
152
|
+
/**
|
|
153
|
+
* Event on mouse down
|
|
154
|
+
*/
|
|
155
|
+
protected _handleMouseDown(evt: MouseEvent): void;
|
|
156
|
+
/**
|
|
157
|
+
* Event on mouse up
|
|
158
|
+
*/
|
|
159
|
+
protected _handleMouseUp(): void;
|
|
160
|
+
/**
|
|
161
|
+
* Event on mouse down
|
|
162
|
+
*/
|
|
163
|
+
protected _handleWindowBlur(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Render the scene
|
|
166
|
+
*/
|
|
167
|
+
render(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Enable cursor
|
|
170
|
+
*/
|
|
171
|
+
enable(): void;
|
|
172
|
+
/**
|
|
173
|
+
* Disable cursor
|
|
174
|
+
*/
|
|
175
|
+
disable(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Destroy the module
|
|
178
|
+
*/
|
|
179
|
+
protected _destroy(): void;
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=CustomCursor.d.ts.map
|
|
@@ -0,0 +1 @@
|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EG;IACH,SAAS,CAAC,cAAc;IAaxB;;OAEG;IACH,SAAS,CAAC,iBAAiB,CACvB,GAAG,EAAE,UAAU;IAWnB;;OAEG;IACH,SAAS,CAAC,iBAAiB;IAI3B;;OAEG;IACH,SAAS,CAAC,gBAAgB,CACtB,GAAG,EAAE,UAAU;IAYnB;;OAEG;IACH,SAAS,CAAC,gBAAgB,CACtB,GAAG,EAAE,UAAU;IAQnB;;OAEG;IACH,SAAS,CAAC,cAAc;IAKxB;;OAEG;IACH,SAAS,CAAC,iBAAiB;IAM3B;;OAEG;IACI,MAAM;IA2Cb;;OAEG;IACI,MAAM;IAWb;;OAEG;IACI,OAAO;IAYd;;OAEG;IACH,SAAS,CAAC,QAAQ;CAKrB"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { IAddEventListener } from 'vevet-dom';
|
|
2
|
+
import { Component, NComponent } from '../../base/Component';
|
|
3
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
4
|
+
export declare namespace NDragger {
|
|
5
|
+
/**
|
|
6
|
+
* Static properties
|
|
7
|
+
*/
|
|
8
|
+
interface StaticProp extends NComponent.StaticProp {
|
|
9
|
+
/**
|
|
10
|
+
* Draggable element
|
|
11
|
+
* @default '#v-dragger'
|
|
12
|
+
*/
|
|
13
|
+
container?: string | Element | Window;
|
|
14
|
+
/**
|
|
15
|
+
* If need to use passive events
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
usePassive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Changeable properties
|
|
22
|
+
*/
|
|
23
|
+
interface ChangeableProp extends NComponent.ChangeableProp {
|
|
24
|
+
/**
|
|
25
|
+
* If events are enabled
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Available callbacks
|
|
32
|
+
*/
|
|
33
|
+
interface CallbacksTypes extends NComponent.CallbacksTypes {
|
|
34
|
+
'start': {
|
|
35
|
+
evt: MouseEvent | TouchEvent;
|
|
36
|
+
};
|
|
37
|
+
'end': false;
|
|
38
|
+
}
|
|
39
|
+
interface Coords {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Drag & Swipe events. An abstract class
|
|
46
|
+
*/
|
|
47
|
+
export declare abstract class Dragger<StaticProp extends NDragger.StaticProp = NDragger.StaticProp, ChangeableProp extends NDragger.ChangeableProp = NDragger.ChangeableProp, CallbacksTypes extends NDragger.CallbacksTypes = NDragger.CallbacksTypes> extends Component<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
48
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
49
|
+
get prefix(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Preloader container
|
|
52
|
+
*/
|
|
53
|
+
get container(): Element | Window;
|
|
54
|
+
protected _container: Element | Window;
|
|
55
|
+
/**
|
|
56
|
+
* Runtime events
|
|
57
|
+
*/
|
|
58
|
+
protected _runtimeEvents: IAddEventListener[];
|
|
59
|
+
/**
|
|
60
|
+
* If is dragging at the moment
|
|
61
|
+
*/
|
|
62
|
+
get isDragging(): boolean;
|
|
63
|
+
protected _isDragging: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Current pointer id
|
|
66
|
+
*/
|
|
67
|
+
protected _pointerID: number | null;
|
|
68
|
+
/**
|
|
69
|
+
* Current coordinates relative to the Window
|
|
70
|
+
*/
|
|
71
|
+
get coords(): NDragger.Coords;
|
|
72
|
+
protected _coords: NDragger.Coords;
|
|
73
|
+
/**
|
|
74
|
+
* Last coordinates relative to the window
|
|
75
|
+
*/
|
|
76
|
+
protected _prevCoords: NDragger.Coords;
|
|
77
|
+
/**
|
|
78
|
+
* Coordinates on drag start
|
|
79
|
+
*/
|
|
80
|
+
get startCoords(): NDragger.Coords;
|
|
81
|
+
protected _startCoords: NDragger.Coords;
|
|
82
|
+
constructor(initialProp?: (StaticProp & ChangeableProp), init?: boolean);
|
|
83
|
+
/**
|
|
84
|
+
* Set component events
|
|
85
|
+
*/
|
|
86
|
+
protected _setEvents(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Add runtime events
|
|
89
|
+
*/
|
|
90
|
+
protected _addRuntimeEvents(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Remove runtime events
|
|
93
|
+
*/
|
|
94
|
+
protected _removeRuntimeEvents(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Normalize event data.
|
|
97
|
+
*/
|
|
98
|
+
protected _normalizeEvent(e: MouseEvent | TouchEvent): {
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
id: number;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Event on start dragging
|
|
105
|
+
*/
|
|
106
|
+
protected _handleStart(e: MouseEvent | TouchEvent): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Event on drag end
|
|
109
|
+
*/
|
|
110
|
+
protected _handleEnd(e: TouchEvent | MouseEvent): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Cancel dragging
|
|
113
|
+
*/
|
|
114
|
+
cancel(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Destroy the module
|
|
117
|
+
*/
|
|
118
|
+
protected _destroy(): void;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=Dragger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dragger.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/dragger/Dragger.ts"],"names":[],"mappings":"AAAA,OAAO,EACe,iBAAiB,EACtC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,yBAAiB,QAAQ,CAAC;IAEtB;;OAEG;IACH,UAAiB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ACH,IAAI,MAAM,oBAET;IACD,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC;IACvC;;OAEG;IACH,IAAI,WAAW,oBAEd;IACD,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC;gBAKpC,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC,EAC3C,IAAI,UAAO;IAwBf;;OAEG;IACH,SAAS,CAAC,UAAU;IAcpB;;OAEG;IACH,SAAS,CAAC,iBAAiB;IA4B3B;;OAEG;IACH,SAAS,CAAC,oBAAoB;IAO9B;;OAEG;IACH,SAAS,CAAC,eAAe,CAAE,CAAC,EAAE,UAAU,GAAG,UAAU;;;;;IAoBrD;;OAEG;IACH,SAAS,CAAC,YAAY,CAAE,CAAC,EAAE,UAAU,GAAG,UAAU;IAsClD;;OAEG;IACH,SAAS,CAAC,UAAU,CAAE,CAAC,EAAE,UAAU,GAAG,UAAU;IAShD;;OAEG;IACI,MAAM;IAQb;;OAEG;IACH,SAAS,CAAC,QAAQ;CAIrB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RequiredModuleProp } from '../../utils/types/utility';
|
|
2
|
+
import { Dragger, NDragger } from './Dragger';
|
|
3
|
+
export declare namespace NDraggerDirection {
|
|
4
|
+
/**
|
|
5
|
+
* Static properties
|
|
6
|
+
*/
|
|
7
|
+
interface StaticProp extends NDragger.StaticProp {
|
|
8
|
+
/**
|
|
9
|
+
* The minimal swipe length (px) to launch events.
|
|
10
|
+
* @default 75
|
|
11
|
+
*/
|
|
12
|
+
min?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Changeable properties
|
|
16
|
+
*/
|
|
17
|
+
interface ChangeableProp extends NDragger.ChangeableProp {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Available callbacks
|
|
21
|
+
*/
|
|
22
|
+
interface CallbacksTypes extends NDragger.CallbacksTypes {
|
|
23
|
+
'up': false;
|
|
24
|
+
'down': false;
|
|
25
|
+
'left': false;
|
|
26
|
+
'right': false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Dragger that detects direction
|
|
31
|
+
*/
|
|
32
|
+
export declare class DraggerDirection<StaticProp extends NDraggerDirection.StaticProp = NDraggerDirection.StaticProp, ChangeableProp extends NDraggerDirection.ChangeableProp = NDraggerDirection.ChangeableProp, CallbacksTypes extends NDraggerDirection.CallbacksTypes = NDraggerDirection.CallbacksTypes> extends Dragger<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
33
|
+
protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
|
|
34
|
+
/**
|
|
35
|
+
* Event on drag end
|
|
36
|
+
*/
|
|
37
|
+
protected _handleEnd(e: TouchEvent | MouseEvent): boolean;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=DraggerDirection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggerDirection.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/dragger/DraggerDirection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI9C,yBAAiB,iBAAiB,CAAC;IAE/B;;OAEG;IACH,UAAiB,UAAW,SAAQ,QAAQ,CAAC,UAAU;QACnD;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KAChB;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,QAAQ,CAAC,cAAc;KAAI;IAEnE;;OAEG;IACH,UAAiB,cAAe,SAAQ,QAAQ,CAAC,cAAc;QAC3D,IAAI,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,KAAK,CAAC;QACd,MAAM,EAAE,KAAK,CAAC;QACd,OAAO,EAAE,KAAK,CAAC;KAClB;CAEJ;AAID;;GAEG;AACH,qBAAa,gBAAgB,CACzB,UAAU,SAAS,iBAAiB,CAAC,UAAU,GAAG,iBAAiB,CAAC,UAAU,EAC9E,cAAc,SAAS,iBAAiB,CAAC,cAAc,GAAG,iBAAiB,CAAC,cAAc,EAC1F,cAAc,SAAS,iBAAiB,CAAC,cAAc,GAAG,iBAAiB,CAAC,cAAc,CAC5F,SAAQ,OAAO,CACb,UAAU,EACV,cAAc,EACd,cAAc,CACjB;IACG,SAAS,CAAC,eAAe,CACrB,CAAC,SAAS,kBAAkB,CAAC,UAAU,GAAG,cAAc,CAAC,KACvD,CAAC;IASP;;OAEG;IACH,SAAS,CAAC,UAAU,CAAE,CAAC,EAAE,UAAU,GAAG,UAAU;CA0CnD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Dragger, NDragger } from './Dragger';
|
|
2
|
+
export declare namespace NDraggerMove {
|
|
3
|
+
/**
|
|
4
|
+
* Static properties
|
|
5
|
+
*/
|
|
6
|
+
interface StaticProp extends NDragger.StaticProp {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Changeable properties
|
|
10
|
+
*/
|
|
11
|
+
interface ChangeableProp extends NDragger.ChangeableProp {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Available callbacks
|
|
15
|
+
*/
|
|
16
|
+
interface CallbacksTypes extends NDragger.CallbacksTypes {
|
|
17
|
+
'move': {
|
|
18
|
+
evt: MouseEvent | TouchEvent;
|
|
19
|
+
start: NDragger.Coords;
|
|
20
|
+
coords: NDragger.Coords;
|
|
21
|
+
step: NDragger.Coords;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Dragger with 'move' callbacks and motion.
|
|
27
|
+
*/
|
|
28
|
+
export declare class DraggerMove<StaticProp extends NDraggerMove.StaticProp = NDraggerMove.StaticProp, ChangeableProp extends NDraggerMove.ChangeableProp = NDraggerMove.ChangeableProp, CallbacksTypes extends NDraggerMove.CallbacksTypes = NDraggerMove.CallbacksTypes> extends Dragger<StaticProp, ChangeableProp, CallbacksTypes> {
|
|
29
|
+
/**
|
|
30
|
+
* Step on move
|
|
31
|
+
*/
|
|
32
|
+
get stepCoords(): {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Add runtime events
|
|
38
|
+
*/
|
|
39
|
+
protected _addRuntimeEvents(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Event on move
|
|
42
|
+
*/
|
|
43
|
+
protected _handleMove(e: MouseEvent | TouchEvent): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Destroy the module
|
|
46
|
+
*/
|
|
47
|
+
protected _destroy(): void;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=DraggerMove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggerMove.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/dragger/DraggerMove.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI9C,yBAAiB,YAAY,CAAC;IAE1B;;OAEG;IACH,UAAiB,UAAW,SAAQ,QAAQ,CAAC,UAAU;KAAI;IAE3D;;OAEG;IACH,UAAiB,cAAe,SAAQ,QAAQ,CAAC,cAAc;KAAI;IAEnE;;OAEG;IACH,UAAiB,cAAe,SAAQ,QAAQ,CAAC,cAAc;QAC3D,MAAM,EAAE;YACJ,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC;YAC7B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC;YACxB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;SACzB,CAAC;KACL;CAEJ;AAID;;GAEG;AACH,qBAAa,WAAW,CACpB,UAAU,SAAS,YAAY,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,EACpE,cAAc,SAAS,YAAY,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,EAChF,cAAc,SAAS,YAAY,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAClF,SAAQ,OAAO,CACb,UAAU,EACV,cAAc,EACd,cAAc,CACjB;IACG;;OAEG;IACH,IAAI,UAAU;;;MAKb;IAID;;OAEG;IACH,SAAS,CAAC,iBAAiB;IAmB3B;;OAEG;IACH,SAAS,CAAC,WAAW,CAAE,CAAC,EAAE,UAAU,GAAG,UAAU;IAuBjD;;OAEG;IACH,SAAS,CAAC,QAAQ;CAGrB"}
|