vevet 3.3.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/AnimationFrame/index.js.map +1 -1
- package/lib/cjs/components/BaseTimeline/index.js.map +1 -1
- package/lib/cjs/components/Ctx2D/index.js.map +1 -1
- package/lib/cjs/components/CustomCursor/index.js.map +1 -1
- package/lib/cjs/components/DraggerBase/index.js.map +1 -1
- package/lib/cjs/components/DraggerMove/index.js.map +1 -1
- package/lib/cjs/components/Preloader/index.js.map +1 -1
- package/lib/cjs/components/ProgressPreloader/index.js.map +1 -1
- package/lib/cjs/components/ScrollBar/index.js.map +1 -1
- package/lib/cjs/components/ScrollView/index.js.map +1 -1
- package/lib/cjs/components/SmoothScroll/index.js.map +1 -1
- package/lib/cjs/components/SmoothScrollDragPlugin/index.js.map +1 -1
- package/lib/cjs/components/SmoothScrollKeyboardPlugin/index.js.map +1 -1
- package/lib/cjs/components/SplitText/index.js.map +1 -1
- package/lib/cjs/components/Timeline/index.js.map +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/components/AnimationFrame/index.js.map +1 -1
- package/lib/esm/components/BaseTimeline/index.js.map +1 -1
- package/lib/esm/components/Ctx2D/index.js.map +1 -1
- package/lib/esm/components/CustomCursor/index.js.map +1 -1
- package/lib/esm/components/DraggerBase/index.js.map +1 -1
- package/lib/esm/components/DraggerMove/index.js.map +1 -1
- package/lib/esm/components/Preloader/index.js.map +1 -1
- package/lib/esm/components/ProgressPreloader/index.js.map +1 -1
- package/lib/esm/components/ScrollBar/index.js.map +1 -1
- package/lib/esm/components/ScrollView/index.js.map +1 -1
- package/lib/esm/components/SmoothScroll/index.js.map +1 -1
- package/lib/esm/components/SmoothScrollDragPlugin/index.js.map +1 -1
- package/lib/esm/components/SmoothScrollKeyboardPlugin/index.js.map +1 -1
- package/lib/esm/components/SplitText/index.js.map +1 -1
- package/lib/esm/components/Timeline/index.js.map +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/components/AnimationFrame/index.d.ts +11 -11
- package/lib/types/components/AnimationFrame/index.d.ts.map +1 -1
- package/lib/types/components/BaseTimeline/index.d.ts +7 -4
- package/lib/types/components/BaseTimeline/index.d.ts.map +1 -1
- package/lib/types/components/Ctx2D/index.d.ts +6 -6
- package/lib/types/components/Ctx2D/index.d.ts.map +1 -1
- package/lib/types/components/CustomCursor/index.d.ts +20 -19
- package/lib/types/components/CustomCursor/index.d.ts.map +1 -1
- package/lib/types/components/DraggerBase/index.d.ts +11 -10
- package/lib/types/components/DraggerBase/index.d.ts.map +1 -1
- package/lib/types/components/DraggerMove/index.d.ts +1 -1
- package/lib/types/components/DraggerMove/index.d.ts.map +1 -1
- package/lib/types/components/Marquee/index.d.ts +2 -1
- package/lib/types/components/Marquee/index.d.ts.map +1 -1
- package/lib/types/components/Preloader/index.d.ts +7 -7
- package/lib/types/components/Preloader/index.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/index.d.ts +11 -9
- package/lib/types/components/ProgressPreloader/index.d.ts.map +1 -1
- package/lib/types/components/ScrollBar/index.d.ts +5 -4
- package/lib/types/components/ScrollBar/index.d.ts.map +1 -1
- package/lib/types/components/ScrollView/index.d.ts +1 -1
- package/lib/types/components/ScrollView/index.d.ts.map +1 -1
- package/lib/types/components/SmoothScroll/index.d.ts +6 -4
- package/lib/types/components/SmoothScroll/index.d.ts.map +1 -1
- package/lib/types/components/SmoothScrollDragPlugin/index.d.ts +12 -10
- package/lib/types/components/SmoothScrollDragPlugin/index.d.ts.map +1 -1
- package/lib/types/components/SmoothScrollKeyboardPlugin/index.d.ts +5 -4
- package/lib/types/components/SmoothScrollKeyboardPlugin/index.d.ts.map +1 -1
- package/lib/types/components/SplitText/index.d.ts +13 -13
- package/lib/types/components/SplitText/index.d.ts.map +1 -1
- package/lib/types/components/Timeline/index.d.ts +5 -5
- package/lib/types/components/Timeline/index.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AnimationFrame/index.ts +11 -11
- package/src/components/BaseTimeline/index.ts +4 -4
- package/src/components/Ctx2D/index.ts +6 -6
- package/src/components/CustomCursor/index.ts +19 -19
- package/src/components/DraggerBase/index.ts +10 -10
- package/src/components/DraggerMove/index.ts +1 -1
- package/src/components/Marquee/index.ts +1 -1
- package/src/components/Preloader/index.ts +7 -7
- package/src/components/ProgressPreloader/index.ts +9 -9
- package/src/components/ScrollBar/index.ts +4 -4
- package/src/components/ScrollView/index.ts +1 -1
- package/src/components/SmoothScroll/index.ts +4 -4
- package/src/components/SmoothScrollDragPlugin/index.ts +10 -10
- package/src/components/SmoothScrollKeyboardPlugin/index.ts +4 -4
- package/src/components/SplitText/index.ts +13 -13
- package/src/components/Timeline/index.ts +5 -5
- package/src/version.ts +1 -1
|
@@ -31,10 +31,10 @@ export class SmoothScrollDragPlugin<
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/** Dragger component */
|
|
34
|
-
|
|
34
|
+
protected _dragger?: DraggerMove;
|
|
35
35
|
|
|
36
36
|
/** Component callbacks */
|
|
37
|
-
|
|
37
|
+
protected _componentCallbacks?: NCallbacks.IAddedCallback[];
|
|
38
38
|
|
|
39
39
|
/** If is dragging at the moment */
|
|
40
40
|
get isDragging() {
|
|
@@ -44,7 +44,7 @@ export class SmoothScrollDragPlugin<
|
|
|
44
44
|
/**
|
|
45
45
|
* Current lerp of SmoothScroll
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
protected _prevComponentLerp?: number;
|
|
48
48
|
|
|
49
49
|
/** Initialize the class */
|
|
50
50
|
protected _init() {
|
|
@@ -60,7 +60,7 @@ export class SmoothScrollDragPlugin<
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/** Add or remove dragger */
|
|
63
|
-
|
|
63
|
+
protected _toggleDragger() {
|
|
64
64
|
if (this.props.isEnabled) {
|
|
65
65
|
this._addDragger();
|
|
66
66
|
} else {
|
|
@@ -69,7 +69,7 @@ export class SmoothScrollDragPlugin<
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/** Add dragger */
|
|
72
|
-
|
|
72
|
+
protected _addDragger() {
|
|
73
73
|
if (this._dragger) {
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
@@ -98,7 +98,7 @@ export class SmoothScrollDragPlugin<
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/** Remove dragger */
|
|
101
|
-
|
|
101
|
+
protected _removeDragger() {
|
|
102
102
|
if (!this._dragger) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
@@ -111,7 +111,7 @@ export class SmoothScrollDragPlugin<
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/** Check if dragging is available */
|
|
114
|
-
|
|
114
|
+
protected _getIsDragAvailable() {
|
|
115
115
|
const { component } = this;
|
|
116
116
|
|
|
117
117
|
if (!component.props.isEnabled) {
|
|
@@ -130,7 +130,7 @@ export class SmoothScrollDragPlugin<
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/** Callback on dragging start */
|
|
133
|
-
|
|
133
|
+
protected _handleDragStart() {
|
|
134
134
|
if (!this._getIsDragAvailable()) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
@@ -148,7 +148,7 @@ export class SmoothScrollDragPlugin<
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
/** Callback on drag move */
|
|
151
|
-
|
|
151
|
+
protected _handleDragMove({
|
|
152
152
|
event,
|
|
153
153
|
coords,
|
|
154
154
|
start,
|
|
@@ -199,7 +199,7 @@ export class SmoothScrollDragPlugin<
|
|
|
199
199
|
/**
|
|
200
200
|
* Callback on dragging end
|
|
201
201
|
*/
|
|
202
|
-
|
|
202
|
+
protected _handleDragEnd() {
|
|
203
203
|
const { component } = this;
|
|
204
204
|
|
|
205
205
|
// update styles
|
|
@@ -25,7 +25,7 @@ export class SmoothScrollKeyboardPlugin<
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
protected _tabDebounceTimeout?: NodeJS.Timeout;
|
|
29
29
|
|
|
30
30
|
/** Initialize the class */
|
|
31
31
|
protected _init() {
|
|
@@ -37,7 +37,7 @@ export class SmoothScrollKeyboardPlugin<
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/** Check if keyboard events may be ignored */
|
|
40
|
-
|
|
40
|
+
protected _canIgnoreKeyboardEvents() {
|
|
41
41
|
const { activeElement } = document;
|
|
42
42
|
|
|
43
43
|
return (
|
|
@@ -48,7 +48,7 @@ export class SmoothScrollKeyboardPlugin<
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/** Check if scroll container is in viewport */
|
|
51
|
-
|
|
51
|
+
protected _checkScrollContainerInViewport() {
|
|
52
52
|
const { viewport } = this.app;
|
|
53
53
|
|
|
54
54
|
const bounding = this.component.container.getBoundingClientRect();
|
|
@@ -62,7 +62,7 @@ export class SmoothScrollKeyboardPlugin<
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/** Check if scroll ended */
|
|
65
|
-
|
|
65
|
+
protected _checkIsEndOfScroll() {
|
|
66
66
|
const { component } = this;
|
|
67
67
|
|
|
68
68
|
return (
|
|
@@ -31,16 +31,16 @@ export class SplitText<
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/** Initial text */
|
|
34
|
-
|
|
34
|
+
protected _initialText: string;
|
|
35
35
|
|
|
36
36
|
/** Initial HTML content */
|
|
37
|
-
|
|
37
|
+
protected _initialHTML: string;
|
|
38
38
|
|
|
39
39
|
/** If the text is already split into letters and words */
|
|
40
|
-
|
|
40
|
+
protected _isBaseSplit: boolean;
|
|
41
41
|
|
|
42
42
|
/** Text container */
|
|
43
|
-
|
|
43
|
+
protected _container: HTMLElement;
|
|
44
44
|
|
|
45
45
|
/** Text container */
|
|
46
46
|
get container() {
|
|
@@ -48,7 +48,7 @@ export class SplitText<
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/** Letters */
|
|
51
|
-
|
|
51
|
+
protected _letters: NSplitText.ILetter[];
|
|
52
52
|
|
|
53
53
|
/** Letters */
|
|
54
54
|
get letters() {
|
|
@@ -56,7 +56,7 @@ export class SplitText<
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/** Words */
|
|
59
|
-
|
|
59
|
+
protected _words: NSplitText.IWord[];
|
|
60
60
|
|
|
61
61
|
/** Words */
|
|
62
62
|
get words() {
|
|
@@ -64,7 +64,7 @@ export class SplitText<
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/** Lines */
|
|
67
|
-
|
|
67
|
+
protected _lines: NSplitText.ILine[];
|
|
68
68
|
|
|
69
69
|
/** Lines */
|
|
70
70
|
get lines() {
|
|
@@ -112,7 +112,7 @@ export class SplitText<
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/** Set resize events */
|
|
115
|
-
|
|
115
|
+
protected _setResize() {
|
|
116
116
|
const { viewportTarget, resizeDebounce, hasLines } = this.props;
|
|
117
117
|
|
|
118
118
|
if (!hasLines) {
|
|
@@ -156,7 +156,7 @@ export class SplitText<
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/** Split the text into words */
|
|
159
|
-
|
|
159
|
+
protected _splitIntoWords() {
|
|
160
160
|
const chars = this._initialText.split('');
|
|
161
161
|
|
|
162
162
|
// create words
|
|
@@ -244,7 +244,7 @@ export class SplitText<
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/** Split the text into letters */
|
|
247
|
-
|
|
247
|
+
protected _splitIntoLetters() {
|
|
248
248
|
// check if need to have letters
|
|
249
249
|
if (!this.props.hasLetters) {
|
|
250
250
|
return;
|
|
@@ -283,7 +283,7 @@ export class SplitText<
|
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
/** Append split words to the container */
|
|
286
|
-
|
|
286
|
+
protected _appendWords() {
|
|
287
287
|
this._words.forEach((word) => {
|
|
288
288
|
this.container.appendChild(word.element);
|
|
289
289
|
|
|
@@ -298,7 +298,7 @@ export class SplitText<
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
/** Split the text into lines */
|
|
301
|
-
|
|
301
|
+
protected _splitIntoLines() {
|
|
302
302
|
// first of all, remove all previous lines
|
|
303
303
|
this._removeLines();
|
|
304
304
|
|
|
@@ -371,7 +371,7 @@ export class SplitText<
|
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
/** Remove all lines */
|
|
374
|
-
|
|
374
|
+
protected _removeLines() {
|
|
375
375
|
this._lines.forEach(({ element }) => element.remove());
|
|
376
376
|
this._lines = [];
|
|
377
377
|
|
|
@@ -21,10 +21,10 @@ export class Timeline<
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/** The animation frame */
|
|
24
|
-
|
|
24
|
+
protected _animationFrame?: number;
|
|
25
25
|
|
|
26
26
|
/** Last time when animationFrame callback has been called */
|
|
27
|
-
|
|
27
|
+
protected _animationFrameLastTime: number;
|
|
28
28
|
|
|
29
29
|
/** Timeline is playing */
|
|
30
30
|
get isPlaying() {
|
|
@@ -32,7 +32,7 @@ export class Timeline<
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/** Timeline is reversed */
|
|
35
|
-
|
|
35
|
+
protected _isReversed: boolean;
|
|
36
36
|
|
|
37
37
|
/** Timeline is reversed */
|
|
38
38
|
get isReversed() {
|
|
@@ -40,7 +40,7 @@ export class Timeline<
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/** Timeline is paused */
|
|
43
|
-
|
|
43
|
+
protected _isPaused: boolean;
|
|
44
44
|
|
|
45
45
|
/** Timeline is paused */
|
|
46
46
|
get isPaused() {
|
|
@@ -116,7 +116,7 @@ export class Timeline<
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/** Start animation */
|
|
119
|
-
|
|
119
|
+
protected _animate() {
|
|
120
120
|
if (this.isPaused) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const version = '3.
|
|
1
|
+
const version = '3.4.0';
|
|
2
2
|
export default version;
|