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,37 @@
|
|
|
1
|
+
import * as common from './utils/common';
|
|
2
|
+
import * as listeners from './utils/listeners';
|
|
3
|
+
import * as math from './utils/math';
|
|
4
|
+
import * as GeneralTypes from './utils/types/general';
|
|
5
|
+
import { Application } from './app/Application';
|
|
6
|
+
import { Viewport } from './app/events/Viewport';
|
|
7
|
+
import { PageLoad } from './app/events/PageLoad';
|
|
8
|
+
import { Callbacks } from './base/Callbacks';
|
|
9
|
+
import { MutableProp } from './base/MutableProp';
|
|
10
|
+
import { Module } from './base/Module';
|
|
11
|
+
import { Component } from './base/Component';
|
|
12
|
+
import { Plugin } from './base/Plugin';
|
|
13
|
+
import { Page } from './components/page/Page';
|
|
14
|
+
import { AnimationFrame } from './components/animation-frame/AnimationFrame';
|
|
15
|
+
import { StaticTimeline } from './components/timeline/StaticTimeline';
|
|
16
|
+
import { Timeline } from './components/timeline/Timeline';
|
|
17
|
+
import { Preloader } from './components/loading/Preloader';
|
|
18
|
+
import { ProgressPreloader } from './components/loading/ProgressPreloader';
|
|
19
|
+
import { Dragger } from './components/dragger/Dragger';
|
|
20
|
+
import { DraggerMove } from './components/dragger/DraggerMove';
|
|
21
|
+
import { DraggerDirection } from './components/dragger/DraggerDirection';
|
|
22
|
+
import { Ctx2D } from './components/canvas/Ctx2D';
|
|
23
|
+
import { Ctx2DPrerender } from './components/canvas/Ctx2DPrerender';
|
|
24
|
+
import { SmoothScroll } from './components/scroll/smooth-scroll/SmoothScroll';
|
|
25
|
+
import { ScrollBar } from './components/scroll/scrollbar/ScrollBar';
|
|
26
|
+
import { ScrollEventsBase } from './components/scroll/scrollable/ScrollEventsBase';
|
|
27
|
+
import { ScrollView } from './components/scroll/scrollable/ScrollView';
|
|
28
|
+
import { SmoothScrollKeyboardPlugin } from './components/scroll/plugins/SmoothScrollKeyboardPlugin';
|
|
29
|
+
import { SmoothScrollDragPlugin } from './components/scroll/plugins/SmoothScrollDragPlugin';
|
|
30
|
+
import { SplitText } from './components/text/SplitText';
|
|
31
|
+
import { CustomCursor } from './components/cursor/CustomCursor';
|
|
32
|
+
const utils = {
|
|
33
|
+
common,
|
|
34
|
+
listeners,
|
|
35
|
+
math,
|
|
36
|
+
};
|
|
37
|
+
export { utils, GeneralTypes, Application, Viewport, PageLoad, Callbacks, MutableProp, Module, Component, Plugin, Page, AnimationFrame, StaticTimeline, Timeline, Preloader, ProgressPreloader, Dragger, DraggerMove, DraggerDirection, Ctx2D, Ctx2DPrerender, SmoothScroll, ScrollBar, ScrollEventsBase, ScrollView, SmoothScrollKeyboardPlugin, SmoothScrollDragPlugin, SplitText, CustomCursor, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import mergeWith from 'lodash.mergewith';
|
|
2
|
+
/**
|
|
3
|
+
* Deep merge of two objects except for arrays.
|
|
4
|
+
* The function doesn't change the "object" and "source".
|
|
5
|
+
*/
|
|
6
|
+
export default function mergeWithoutArrays(object, source) {
|
|
7
|
+
return mergeWith(object, source, (objValue, srcValue) => {
|
|
8
|
+
if (Array.isArray(objValue)) {
|
|
9
|
+
return srcValue;
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Launch a function in a certain amount of time
|
|
3
|
+
* If the timeout argument is zero, the callback will be launched synchronously
|
|
4
|
+
*/
|
|
5
|
+
export default function timeoutCallback(callback, timeout) {
|
|
6
|
+
if (timeout === 0) {
|
|
7
|
+
callback();
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
setTimeout(() => {
|
|
11
|
+
callback();
|
|
12
|
+
}, timeout);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { addEventListener, selectOne } from 'vevet-dom';
|
|
2
|
+
import { SmoothScroll } from '../../components/scroll/smooth-scroll/SmoothScroll';
|
|
3
|
+
/**
|
|
4
|
+
* Add OnScroll event
|
|
5
|
+
*/
|
|
6
|
+
export default function onScroll(selector, callback) {
|
|
7
|
+
const listeners = [];
|
|
8
|
+
if (selector instanceof SmoothScroll) {
|
|
9
|
+
selector.addCallback('scroll', () => {
|
|
10
|
+
callback({
|
|
11
|
+
scrollTop: selector.scrollTop,
|
|
12
|
+
scrollLeft: selector.scrollLeft,
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
let outer;
|
|
18
|
+
if (typeof selector === 'string') {
|
|
19
|
+
outer = selectOne(selector);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
outer = selector;
|
|
23
|
+
}
|
|
24
|
+
if (outer) {
|
|
25
|
+
listeners.push(addEventListener(outer, 'scroll', () => {
|
|
26
|
+
const scrollTop = outer instanceof Window
|
|
27
|
+
? outer.pageYOffset : outer.scrollTop;
|
|
28
|
+
const scrollLeft = outer instanceof Window
|
|
29
|
+
? outer.pageXOffset : outer.scrollLeft;
|
|
30
|
+
callback({
|
|
31
|
+
scrollTop,
|
|
32
|
+
scrollLeft,
|
|
33
|
+
});
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
remove: () => {
|
|
39
|
+
listeners.forEach((listener) => {
|
|
40
|
+
listener.remove();
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear interpolation
|
|
3
|
+
*/
|
|
4
|
+
export default function lerp(current, target, ease, approximationLeft = 0.001) {
|
|
5
|
+
const val = current * (1 - ease) + target * ease;
|
|
6
|
+
const diff = Math.abs(target - val);
|
|
7
|
+
if (diff <= approximationLeft) {
|
|
8
|
+
return target;
|
|
9
|
+
}
|
|
10
|
+
return val;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get progress relatively to the scope.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
*
|
|
6
|
+
* scopeProgress(.35, [0, 1]);
|
|
7
|
+
* // => .5
|
|
8
|
+
* scopeProgress(.35, [.25, 1]);
|
|
9
|
+
* // => .133
|
|
10
|
+
*/
|
|
11
|
+
export default function scopeProgress(
|
|
12
|
+
/**
|
|
13
|
+
* Current progress
|
|
14
|
+
*/
|
|
15
|
+
progress,
|
|
16
|
+
/**
|
|
17
|
+
* Progress scope
|
|
18
|
+
*/
|
|
19
|
+
scope) {
|
|
20
|
+
const result = (progress - scope[0]) / (scope[1] - scope[0]);
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { EasingType } from 'easing-progress';
|
|
2
|
+
import PCancelable from 'p-cancelable';
|
|
3
|
+
import { Viewport } from './events/Viewport';
|
|
4
|
+
import { PageLoad } from './events/PageLoad';
|
|
5
|
+
import { Page } from '../components/page/Page';
|
|
6
|
+
export declare namespace NApplication {
|
|
7
|
+
/**
|
|
8
|
+
* Properties
|
|
9
|
+
*/
|
|
10
|
+
type Prop = {
|
|
11
|
+
/**
|
|
12
|
+
* Tablet identification max width
|
|
13
|
+
* @default 1199
|
|
14
|
+
*/
|
|
15
|
+
tablet: number;
|
|
16
|
+
/**
|
|
17
|
+
* Phone identification max width
|
|
18
|
+
* @default 899
|
|
19
|
+
*/
|
|
20
|
+
phone: number;
|
|
21
|
+
/**
|
|
22
|
+
* Vevet prefix
|
|
23
|
+
* @default 'v-'
|
|
24
|
+
*/
|
|
25
|
+
prefix: string;
|
|
26
|
+
/**
|
|
27
|
+
* Timeout of viewport callbacks
|
|
28
|
+
* @default 0
|
|
29
|
+
*/
|
|
30
|
+
viewportResizeTimeout: number;
|
|
31
|
+
/**
|
|
32
|
+
* Easing function that is used in animation as the default value
|
|
33
|
+
* @default [.25, .1, .25, 1]
|
|
34
|
+
*/
|
|
35
|
+
easing: EasingType;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Vevet Application
|
|
40
|
+
*/
|
|
41
|
+
export declare class Application<PageInstance extends Page = Page> {
|
|
42
|
+
/**
|
|
43
|
+
* Application properties.
|
|
44
|
+
*/
|
|
45
|
+
protected _prop: NApplication.Prop;
|
|
46
|
+
/**
|
|
47
|
+
* Application properties.
|
|
48
|
+
*/
|
|
49
|
+
get prop(): NApplication.Prop;
|
|
50
|
+
/**
|
|
51
|
+
* Default properties.
|
|
52
|
+
*/
|
|
53
|
+
get defaultProp(): NApplication.Prop;
|
|
54
|
+
/**
|
|
55
|
+
* Vevet prefix.
|
|
56
|
+
*/
|
|
57
|
+
protected _prefix: string;
|
|
58
|
+
get prefix(): string;
|
|
59
|
+
/**
|
|
60
|
+
* If is phone
|
|
61
|
+
*/
|
|
62
|
+
protected _isPhone: boolean;
|
|
63
|
+
get isPhone(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* If tablet
|
|
66
|
+
*/
|
|
67
|
+
protected _isTablet: boolean;
|
|
68
|
+
get isTablet(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* If mobile device
|
|
71
|
+
*/
|
|
72
|
+
protected _isMobile: boolean;
|
|
73
|
+
get isMobile(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* If desktop device
|
|
76
|
+
*/
|
|
77
|
+
protected _isDesktop: boolean;
|
|
78
|
+
get isDesktop(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* OS name
|
|
81
|
+
*/
|
|
82
|
+
protected _osName: string;
|
|
83
|
+
get osName(): string;
|
|
84
|
+
/**
|
|
85
|
+
* OS name
|
|
86
|
+
*/
|
|
87
|
+
protected _browserName: string;
|
|
88
|
+
get browserName(): string;
|
|
89
|
+
/**
|
|
90
|
+
* @example
|
|
91
|
+
* const app = Application({
|
|
92
|
+
* page: 'home'
|
|
93
|
+
* });
|
|
94
|
+
*/
|
|
95
|
+
constructor(data?: Partial<NApplication.Prop>);
|
|
96
|
+
/**
|
|
97
|
+
* Get document element.
|
|
98
|
+
*/
|
|
99
|
+
get doc(): Document;
|
|
100
|
+
/**
|
|
101
|
+
* Get HTML element
|
|
102
|
+
*/
|
|
103
|
+
get html(): HTMLElement;
|
|
104
|
+
/**
|
|
105
|
+
* Get body element.
|
|
106
|
+
*/
|
|
107
|
+
get body(): HTMLElement;
|
|
108
|
+
/**
|
|
109
|
+
* Pages (instances)
|
|
110
|
+
*/
|
|
111
|
+
protected _pages: PageInstance[];
|
|
112
|
+
/**
|
|
113
|
+
* Get an array of existing pages.
|
|
114
|
+
* A new element is added to the array when {@linkcode Vevet.Page.create} is called.
|
|
115
|
+
*/
|
|
116
|
+
get pages(): PageInstance[];
|
|
117
|
+
/**
|
|
118
|
+
* Current Page (instance).
|
|
119
|
+
*/
|
|
120
|
+
protected _page: false | PageInstance;
|
|
121
|
+
/**
|
|
122
|
+
* Get the current page instance.
|
|
123
|
+
*/
|
|
124
|
+
get page(): false | PageInstance;
|
|
125
|
+
/**
|
|
126
|
+
* Set the current page instance.
|
|
127
|
+
*/
|
|
128
|
+
set page(val: false | PageInstance);
|
|
129
|
+
/**
|
|
130
|
+
* Action on page created
|
|
131
|
+
*/
|
|
132
|
+
onPageCreated(): PCancelable<PageInstance>;
|
|
133
|
+
/**
|
|
134
|
+
* Action on page shown
|
|
135
|
+
*/
|
|
136
|
+
onPageShown(): PCancelable<PageInstance>;
|
|
137
|
+
/**
|
|
138
|
+
* Page Load Callbacks
|
|
139
|
+
*/
|
|
140
|
+
protected _pageLoad: PageLoad;
|
|
141
|
+
get pageLoad(): PageLoad;
|
|
142
|
+
/**
|
|
143
|
+
* Action on page laoded
|
|
144
|
+
*/
|
|
145
|
+
onPageLoaded(): PCancelable<any>;
|
|
146
|
+
/**
|
|
147
|
+
* Viewport Callbacks
|
|
148
|
+
*/
|
|
149
|
+
protected _viewport: Viewport;
|
|
150
|
+
get viewport(): Viewport;
|
|
151
|
+
/**
|
|
152
|
+
* Defines that you're using Vevet.
|
|
153
|
+
*/
|
|
154
|
+
protected _sayHi(): void;
|
|
155
|
+
}
|
|
156
|
+
declare global {
|
|
157
|
+
interface Window {
|
|
158
|
+
vevetApp: Application<Page>;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=Application.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../../../src/ts/app/Application.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAI/C,yBAAiB,YAAY,CAAC;IAE1B;;OAEG;IACH,KAAY,IAAI,GAAG;QACf;;;WAGG;QACH,MAAM,EAAE,MAAM,CAA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IACH,IAAI,KAAK,mBAER;IAED;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAAS;IAC9C;;OAEG;IACH,IAAI,IAAI,IAMO,KAAK,GAAG,YAAY,CAJlC;IACD;;OAEG;IACH,IAAI,IAAI,CAAE,GAAG,EAAE,KAAK,GAAG,YAAY,EAElC;IAED;;OAEG;IACI,aAAa;IAkBpB;;OAEG;IACI,WAAW;IAgBlB;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC9B,IAAI,QAAQ,aAEX;IAED;;OAEG;IACI,YAAY;IAUnB;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC9B,IAAI,QAAQ,aAEX;IAID;;OAEG;IACH,SAAS,CAAC,MAAM;CAanB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KAC/B;CACJ"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Callbacks, NCallbacks } from '../../base/Callbacks';
|
|
2
|
+
export declare namespace NPageLoad {
|
|
3
|
+
interface CallbacksTypes extends NCallbacks.CallbacksTypes {
|
|
4
|
+
'': false;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Callbacks on page loaded.
|
|
9
|
+
*/
|
|
10
|
+
export declare class PageLoad extends Callbacks<NPageLoad.CallbacksTypes> {
|
|
11
|
+
/**
|
|
12
|
+
* If the page is loaded.
|
|
13
|
+
*/
|
|
14
|
+
protected _loaded: boolean;
|
|
15
|
+
get loaded(): boolean;
|
|
16
|
+
constructor();
|
|
17
|
+
protected _setEvents(): void;
|
|
18
|
+
/**
|
|
19
|
+
* When the page is loaded.
|
|
20
|
+
*/
|
|
21
|
+
protected _handleLoaded(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Add a callback on page load.
|
|
24
|
+
* If the page is already loaded, the callback will be immediately triggered.
|
|
25
|
+
*/
|
|
26
|
+
onLoaded(callback: Function): NCallbacks.AddedCallback;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=PageLoad.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLoad.d.ts","sourceRoot":"","sources":["../../../../src/ts/app/events/PageLoad.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAI7D,yBAAiB,SAAS,CAAC;IAEvB,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;QAC7D,EAAE,EAAE,KAAK,CAAC;KACb;CAEJ;AAID;;GAEG;AACH,qBAAa,QAAS,SAAQ,SAAS,CACnC,SAAS,CAAC,cAAc,CAC3B;IACG;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,IAAI,MAAM,YAET;;IAUD,SAAS,CAAC,UAAU;IAYpB;;OAEG;IACH,SAAS,CAAC,aAAa;IAcvB;;;OAGG;IACI,QAAQ,CACX,QAAQ,EAAE,QAAQ;CAQzB"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Callbacks, NCallbacks } from '../../base/Callbacks';
|
|
2
|
+
export declare namespace NViewport {
|
|
3
|
+
/**
|
|
4
|
+
* Callbacks argument. Changes in viewport
|
|
5
|
+
*/
|
|
6
|
+
interface Changes {
|
|
7
|
+
widthChanged: boolean;
|
|
8
|
+
heightChanged: boolean;
|
|
9
|
+
orientationChanged: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Available callbacks
|
|
13
|
+
*/
|
|
14
|
+
interface CallbacksTypes extends NCallbacks.CallbacksTypes {
|
|
15
|
+
/**
|
|
16
|
+
* When the width is changed regardless of the height
|
|
17
|
+
*/
|
|
18
|
+
'w': Changes;
|
|
19
|
+
/**
|
|
20
|
+
* When the height is changed regardless of the width
|
|
21
|
+
*/
|
|
22
|
+
'h': Changes;
|
|
23
|
+
/**
|
|
24
|
+
* When both the width and height are changed
|
|
25
|
+
*/
|
|
26
|
+
'wh': Changes;
|
|
27
|
+
/**
|
|
28
|
+
* When both the width and height are changed
|
|
29
|
+
*/
|
|
30
|
+
'hw': Changes;
|
|
31
|
+
/**
|
|
32
|
+
* When only the width is changed
|
|
33
|
+
*/
|
|
34
|
+
'w_': Changes;
|
|
35
|
+
/**
|
|
36
|
+
* When only the height is changed
|
|
37
|
+
*/
|
|
38
|
+
'h_': Changes;
|
|
39
|
+
/**
|
|
40
|
+
* Any change
|
|
41
|
+
*/
|
|
42
|
+
'': Changes;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Callbacks on window resize.
|
|
47
|
+
* Here the names of the OS, Browser, and Device are also available. <br>
|
|
48
|
+
*/
|
|
49
|
+
export declare class Viewport extends Callbacks<NViewport.CallbacksTypes> {
|
|
50
|
+
/**
|
|
51
|
+
* Current Viewport width
|
|
52
|
+
*/
|
|
53
|
+
protected _width: number;
|
|
54
|
+
get width(): number;
|
|
55
|
+
/**
|
|
56
|
+
* Current Viewport height
|
|
57
|
+
*/
|
|
58
|
+
protected _height: number;
|
|
59
|
+
get height(): number;
|
|
60
|
+
/**
|
|
61
|
+
* Get VW value
|
|
62
|
+
*/
|
|
63
|
+
get vw(): number;
|
|
64
|
+
/**
|
|
65
|
+
* Get VH value
|
|
66
|
+
*/
|
|
67
|
+
get vh(): number;
|
|
68
|
+
/**
|
|
69
|
+
* Previous Viewport size
|
|
70
|
+
*/
|
|
71
|
+
protected _prevSize: {
|
|
72
|
+
w: number;
|
|
73
|
+
h: number;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Get previous Viewport size
|
|
77
|
+
*/
|
|
78
|
+
get prevSize(): {
|
|
79
|
+
w: number;
|
|
80
|
+
h: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* If width greater than height.
|
|
84
|
+
*/
|
|
85
|
+
get isLandscape(): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* If width less than height.
|
|
88
|
+
*/
|
|
89
|
+
get isPortrait(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* If desktop size
|
|
92
|
+
*/
|
|
93
|
+
protected _isDesktop: boolean;
|
|
94
|
+
get isDesktop(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* If tablet size
|
|
97
|
+
*/
|
|
98
|
+
protected _isTablet: boolean;
|
|
99
|
+
get isTablet(): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* If phone size
|
|
102
|
+
*/
|
|
103
|
+
protected _isPhone: boolean;
|
|
104
|
+
get isPhone(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Device pixel ratio
|
|
107
|
+
*/
|
|
108
|
+
get dpr(): number;
|
|
109
|
+
/**
|
|
110
|
+
* Device pixel ratio. For non-mobile devices it is always 1.
|
|
111
|
+
*/
|
|
112
|
+
get lowerDesktopDPR(): number;
|
|
113
|
+
constructor();
|
|
114
|
+
protected _constructor(): void;
|
|
115
|
+
protected _setEvents(): void;
|
|
116
|
+
/**
|
|
117
|
+
* Set viewport values
|
|
118
|
+
*/
|
|
119
|
+
protected _setValues(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Change classes of the document element.
|
|
122
|
+
*/
|
|
123
|
+
protected _updateClasses(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Change breakpoint classes of the document element.
|
|
126
|
+
*/
|
|
127
|
+
protected _updateBreakpointClasses(activeType: string, types: string[]): void;
|
|
128
|
+
/**
|
|
129
|
+
* Update CSS vars
|
|
130
|
+
*/
|
|
131
|
+
protected _updateCSSVars(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Launch callbacks on resize.
|
|
134
|
+
*/
|
|
135
|
+
protected _onResize(): void;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=Viewport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Viewport.d.ts","sourceRoot":"","sources":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