vevet 2.0.1-dev.21 → 2.0.1-dev.25
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/build/cdn/index.js +1 -1
- package/build/cjs/components/scroll/scrollable/ScrollView.js +55 -26
- package/build/cjs/components/text/SplitText.js +4 -1
- package/build/es/components/scroll/scrollable/ScrollView.js +55 -26
- package/build/es/components/text/SplitText.js +4 -1
- package/build/types/components/scroll/scrollable/ScrollView.d.ts +12 -6
- package/build/types/components/scroll/scrollable/ScrollView.d.ts.map +1 -1
- package/build/types/components/text/SplitText.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ts/components/scroll/scrollable/ScrollView.ts +73 -34
- package/src/ts/components/text/SplitText.ts +4 -1
|
@@ -49,7 +49,8 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
49
49
|
if (init === void 0) { init = true; }
|
|
50
50
|
var _this = _super.call(this, initialProp, false) || this;
|
|
51
51
|
_this._scrollEvent = undefined;
|
|
52
|
-
_this.
|
|
52
|
+
_this._intersectionObserverIn = undefined;
|
|
53
|
+
_this._intersectionObserverOut = undefined;
|
|
53
54
|
_this._firstStart = true;
|
|
54
55
|
_this._elements = __spreadArray([], _this.prop.elements);
|
|
55
56
|
// initialize the class
|
|
@@ -117,17 +118,27 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
117
118
|
? 0 : scrollContainerBounding.width * (1 - this.prop.threshold) * -1;
|
|
118
119
|
var yMargin = this._firstStart
|
|
119
120
|
? 0 : scrollContainerBounding.height * (1 - this.prop.threshold) * -1;
|
|
120
|
-
// create intersection
|
|
121
|
-
this.
|
|
121
|
+
// create intersection observers
|
|
122
|
+
this._intersectionObserverIn = new IntersectionObserver(this._handleIntersectionObserverIn.bind(this), {
|
|
122
123
|
root: this.intersectionRoot,
|
|
123
124
|
threshold: 0,
|
|
124
125
|
rootMargin: "0px " + xMargin + "px " + yMargin + "px 0px",
|
|
125
126
|
});
|
|
126
|
-
// add elements
|
|
127
127
|
this.elements.forEach(function (el) {
|
|
128
128
|
var _a;
|
|
129
|
-
(_a = _this.
|
|
129
|
+
(_a = _this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.observe(el);
|
|
130
130
|
});
|
|
131
|
+
if (this.prop.states === 'inout') {
|
|
132
|
+
this._intersectionObserverOut = new IntersectionObserver(this._handleIntersectionObserverOut.bind(this), {
|
|
133
|
+
root: this.intersectionRoot,
|
|
134
|
+
threshold: 0,
|
|
135
|
+
rootMargin: '0px 0px 0px 0px',
|
|
136
|
+
});
|
|
137
|
+
this.elements.forEach(function (el) {
|
|
138
|
+
var _a;
|
|
139
|
+
(_a = _this._intersectionObserverOut) === null || _a === void 0 ? void 0 : _a.observe(el);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
131
142
|
}
|
|
132
143
|
else {
|
|
133
144
|
// set scroll bounding events
|
|
@@ -141,21 +152,22 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
141
152
|
* Remove View events: scroll or intersection
|
|
142
153
|
*/
|
|
143
154
|
ScrollView.prototype._removeViewEvents = function () {
|
|
155
|
+
var _a, _b;
|
|
144
156
|
// remove scroll events
|
|
145
157
|
if (this._scrollEvent) {
|
|
146
158
|
this._scrollEvent.remove();
|
|
147
159
|
this._scrollEvent = undefined;
|
|
148
160
|
}
|
|
149
|
-
// destroy intersection
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
161
|
+
// destroy intersection observers
|
|
162
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
163
|
+
this._intersectionObserverIn = undefined;
|
|
164
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
165
|
+
this._intersectionObserverOut = undefined;
|
|
154
166
|
};
|
|
155
167
|
/**
|
|
156
168
|
* Event on IntersectionObserver
|
|
157
169
|
*/
|
|
158
|
-
ScrollView.prototype.
|
|
170
|
+
ScrollView.prototype._handleIntersectionObserverIn = function (data) {
|
|
159
171
|
var parentBounding = this._firstStart ? this.scrollContainerBounding : false;
|
|
160
172
|
for (var index = 0; index < data.length; index += 1) {
|
|
161
173
|
var entry = data[index];
|
|
@@ -163,7 +175,9 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
163
175
|
if (this._firstStart && !!parentBounding && entry.isIntersecting) {
|
|
164
176
|
delay = this._elementInViewportData(entry.target, parentBounding).delay;
|
|
165
177
|
}
|
|
166
|
-
|
|
178
|
+
if (entry.isIntersecting) {
|
|
179
|
+
this._handleInOut(entry.target, entry.isIntersecting, delay);
|
|
180
|
+
}
|
|
167
181
|
}
|
|
168
182
|
this._processUnusedElements();
|
|
169
183
|
// change states
|
|
@@ -172,6 +186,17 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
172
186
|
this.resize();
|
|
173
187
|
}
|
|
174
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* Event on IntersectionObserver
|
|
191
|
+
*/
|
|
192
|
+
ScrollView.prototype._handleIntersectionObserverOut = function (data) {
|
|
193
|
+
for (var index = 0; index < data.length; index += 1) {
|
|
194
|
+
var entry = data[index];
|
|
195
|
+
if (!entry.isIntersecting) {
|
|
196
|
+
this._handleInOut(entry.target, entry.isIntersecting, 0);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
175
200
|
/**
|
|
176
201
|
* Event on Scroll
|
|
177
202
|
*/
|
|
@@ -194,7 +219,9 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
194
219
|
var el = this.elements[index];
|
|
195
220
|
var elData = this._elementInViewportData(el, scrollContainerBounding);
|
|
196
221
|
var delay = elData.isIntersecting ? elData.delay : 0;
|
|
197
|
-
|
|
222
|
+
if (typeof elData.isIntersecting === 'boolean') {
|
|
223
|
+
this._handleInOut(el, elData.isIntersecting, delay);
|
|
224
|
+
}
|
|
198
225
|
}
|
|
199
226
|
this._processUnusedElements();
|
|
200
227
|
// change states
|
|
@@ -210,7 +237,7 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
210
237
|
var threshold = this._firstStart ? 1 : propThreshold;
|
|
211
238
|
var bounding = el.getBoundingClientRect();
|
|
212
239
|
// check if the element is intersecting
|
|
213
|
-
var isIntersecting
|
|
240
|
+
var isIntersecting;
|
|
214
241
|
if (bounding.top < parentBounding.top + parentBounding.height * threshold
|
|
215
242
|
&& bounding.left < parentBounding.left + parentBounding.width * threshold) {
|
|
216
243
|
if (states === 'in') {
|
|
@@ -224,6 +251,10 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
224
251
|
isIntersecting = true;
|
|
225
252
|
}
|
|
226
253
|
}
|
|
254
|
+
else if (bounding.top > parentBounding.top + parentBounding.height
|
|
255
|
+
|| bounding.left > parentBounding.left + parentBounding.width) {
|
|
256
|
+
isIntersecting = false;
|
|
257
|
+
}
|
|
227
258
|
// calculate delay only if it is enabled & calculations
|
|
228
259
|
// are done for the first time
|
|
229
260
|
var delay = 0;
|
|
@@ -281,9 +312,9 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
281
312
|
// remove unused elements
|
|
282
313
|
var elementsToRemove = this._elements.filter(function (el) { return el.scrollViewIn; });
|
|
283
314
|
elementsToRemove.forEach(function (el) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
315
|
+
var _a, _b;
|
|
316
|
+
(_a = _this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.unobserve(el);
|
|
317
|
+
(_b = _this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.unobserve(el);
|
|
287
318
|
});
|
|
288
319
|
this._elements = this._elements.filter(function (el) { return !el.scrollViewIn; });
|
|
289
320
|
};
|
|
@@ -292,12 +323,12 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
292
323
|
*/
|
|
293
324
|
ScrollView.prototype.addElement = function (element) {
|
|
294
325
|
var _this = this;
|
|
326
|
+
var _a, _b;
|
|
295
327
|
var viewEl = element;
|
|
296
328
|
viewEl.scrollViewIn = undefined;
|
|
297
329
|
this._elements.push(element);
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
330
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.observe(element);
|
|
331
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.observe(element);
|
|
301
332
|
if (this.prop.enabled) {
|
|
302
333
|
this.seekBounding();
|
|
303
334
|
}
|
|
@@ -311,12 +342,12 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
311
342
|
* Remove a view element
|
|
312
343
|
*/
|
|
313
344
|
ScrollView.prototype.removeElement = function (element) {
|
|
345
|
+
var _a, _b;
|
|
314
346
|
var viewEl = element;
|
|
315
347
|
viewEl.scrollViewIn = undefined;
|
|
316
348
|
this._elements = this._elements.filter(function (el) { return el !== element; });
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
349
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.unobserve(element);
|
|
350
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.unobserve(element);
|
|
320
351
|
};
|
|
321
352
|
/**
|
|
322
353
|
* Remove all view elements
|
|
@@ -324,9 +355,7 @@ var ScrollView = /** @class */ (function (_super) {
|
|
|
324
355
|
ScrollView.prototype.removeElements = function () {
|
|
325
356
|
var _this = this;
|
|
326
357
|
this._elements.forEach(function (el) {
|
|
327
|
-
|
|
328
|
-
_this._intersectionObserver.unobserve(el);
|
|
329
|
-
}
|
|
358
|
+
_this.removeElement(el);
|
|
330
359
|
});
|
|
331
360
|
this._elements = [];
|
|
332
361
|
};
|
|
@@ -50,8 +50,11 @@ var SplitText = /** @class */ (function (_super) {
|
|
|
50
50
|
}
|
|
51
51
|
// get initial text
|
|
52
52
|
_this._initHTML = _this._container.innerHTML;
|
|
53
|
-
_this._initText = (_this._container.innerText || 'no rendered text').trim();
|
|
53
|
+
_this._initText = (_this._container.innerText || _this._container.innerHTML || 'no rendered text').trim();
|
|
54
54
|
_this._initText = _this._initText.replace(/\s+\n/gm, '\n');
|
|
55
|
+
_this._initText = _this._initText.replace(/<br>/gm, String.fromCharCode(10));
|
|
56
|
+
_this._initText = _this._initText.replace(/<br\/>/gm, String.fromCharCode(10));
|
|
57
|
+
_this._initText = _this._initText.replace(/<br \/>/gm, String.fromCharCode(10));
|
|
55
58
|
// set default vars
|
|
56
59
|
_this._isPrimarySplit = false;
|
|
57
60
|
_this._letters = [];
|
|
@@ -10,7 +10,8 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
10
10
|
constructor(initialProp, init = true) {
|
|
11
11
|
super(initialProp, false);
|
|
12
12
|
this._scrollEvent = undefined;
|
|
13
|
-
this.
|
|
13
|
+
this._intersectionObserverIn = undefined;
|
|
14
|
+
this._intersectionObserverOut = undefined;
|
|
14
15
|
this._firstStart = true;
|
|
15
16
|
this._elements = [...this.prop.elements];
|
|
16
17
|
// initialize the class
|
|
@@ -67,17 +68,27 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
67
68
|
? 0 : scrollContainerBounding.width * (1 - this.prop.threshold) * -1;
|
|
68
69
|
const yMargin = this._firstStart
|
|
69
70
|
? 0 : scrollContainerBounding.height * (1 - this.prop.threshold) * -1;
|
|
70
|
-
// create intersection
|
|
71
|
-
this.
|
|
71
|
+
// create intersection observers
|
|
72
|
+
this._intersectionObserverIn = new IntersectionObserver(this._handleIntersectionObserverIn.bind(this), {
|
|
72
73
|
root: this.intersectionRoot,
|
|
73
74
|
threshold: 0,
|
|
74
75
|
rootMargin: `0px ${xMargin}px ${yMargin}px 0px`,
|
|
75
76
|
});
|
|
76
|
-
// add elements
|
|
77
77
|
this.elements.forEach((el) => {
|
|
78
78
|
var _a;
|
|
79
|
-
(_a = this.
|
|
79
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.observe(el);
|
|
80
80
|
});
|
|
81
|
+
if (this.prop.states === 'inout') {
|
|
82
|
+
this._intersectionObserverOut = new IntersectionObserver(this._handleIntersectionObserverOut.bind(this), {
|
|
83
|
+
root: this.intersectionRoot,
|
|
84
|
+
threshold: 0,
|
|
85
|
+
rootMargin: '0px 0px 0px 0px',
|
|
86
|
+
});
|
|
87
|
+
this.elements.forEach((el) => {
|
|
88
|
+
var _a;
|
|
89
|
+
(_a = this._intersectionObserverOut) === null || _a === void 0 ? void 0 : _a.observe(el);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
81
92
|
}
|
|
82
93
|
else {
|
|
83
94
|
// set scroll bounding events
|
|
@@ -91,21 +102,22 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
91
102
|
* Remove View events: scroll or intersection
|
|
92
103
|
*/
|
|
93
104
|
_removeViewEvents() {
|
|
105
|
+
var _a, _b;
|
|
94
106
|
// remove scroll events
|
|
95
107
|
if (this._scrollEvent) {
|
|
96
108
|
this._scrollEvent.remove();
|
|
97
109
|
this._scrollEvent = undefined;
|
|
98
110
|
}
|
|
99
|
-
// destroy intersection
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
// destroy intersection observers
|
|
112
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
113
|
+
this._intersectionObserverIn = undefined;
|
|
114
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
115
|
+
this._intersectionObserverOut = undefined;
|
|
104
116
|
}
|
|
105
117
|
/**
|
|
106
118
|
* Event on IntersectionObserver
|
|
107
119
|
*/
|
|
108
|
-
|
|
120
|
+
_handleIntersectionObserverIn(data) {
|
|
109
121
|
const parentBounding = this._firstStart ? this.scrollContainerBounding : false;
|
|
110
122
|
for (let index = 0; index < data.length; index += 1) {
|
|
111
123
|
const entry = data[index];
|
|
@@ -113,7 +125,9 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
113
125
|
if (this._firstStart && !!parentBounding && entry.isIntersecting) {
|
|
114
126
|
delay = this._elementInViewportData(entry.target, parentBounding).delay;
|
|
115
127
|
}
|
|
116
|
-
|
|
128
|
+
if (entry.isIntersecting) {
|
|
129
|
+
this._handleInOut(entry.target, entry.isIntersecting, delay);
|
|
130
|
+
}
|
|
117
131
|
}
|
|
118
132
|
this._processUnusedElements();
|
|
119
133
|
// change states
|
|
@@ -122,6 +136,17 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
122
136
|
this.resize();
|
|
123
137
|
}
|
|
124
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Event on IntersectionObserver
|
|
141
|
+
*/
|
|
142
|
+
_handleIntersectionObserverOut(data) {
|
|
143
|
+
for (let index = 0; index < data.length; index += 1) {
|
|
144
|
+
const entry = data[index];
|
|
145
|
+
if (!entry.isIntersecting) {
|
|
146
|
+
this._handleInOut(entry.target, entry.isIntersecting, 0);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
125
150
|
/**
|
|
126
151
|
* Event on Scroll
|
|
127
152
|
*/
|
|
@@ -144,7 +169,9 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
144
169
|
const el = this.elements[index];
|
|
145
170
|
const elData = this._elementInViewportData(el, scrollContainerBounding);
|
|
146
171
|
const delay = elData.isIntersecting ? elData.delay : 0;
|
|
147
|
-
|
|
172
|
+
if (typeof elData.isIntersecting === 'boolean') {
|
|
173
|
+
this._handleInOut(el, elData.isIntersecting, delay);
|
|
174
|
+
}
|
|
148
175
|
}
|
|
149
176
|
this._processUnusedElements();
|
|
150
177
|
// change states
|
|
@@ -160,7 +187,7 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
160
187
|
const threshold = this._firstStart ? 1 : propThreshold;
|
|
161
188
|
const bounding = el.getBoundingClientRect();
|
|
162
189
|
// check if the element is intersecting
|
|
163
|
-
let isIntersecting
|
|
190
|
+
let isIntersecting;
|
|
164
191
|
if (bounding.top < parentBounding.top + parentBounding.height * threshold
|
|
165
192
|
&& bounding.left < parentBounding.left + parentBounding.width * threshold) {
|
|
166
193
|
if (states === 'in') {
|
|
@@ -174,6 +201,10 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
174
201
|
isIntersecting = true;
|
|
175
202
|
}
|
|
176
203
|
}
|
|
204
|
+
else if (bounding.top > parentBounding.top + parentBounding.height
|
|
205
|
+
|| bounding.left > parentBounding.left + parentBounding.width) {
|
|
206
|
+
isIntersecting = false;
|
|
207
|
+
}
|
|
177
208
|
// calculate delay only if it is enabled & calculations
|
|
178
209
|
// are done for the first time
|
|
179
210
|
let delay = 0;
|
|
@@ -228,9 +259,9 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
228
259
|
// remove unused elements
|
|
229
260
|
const elementsToRemove = this._elements.filter((el) => el.scrollViewIn);
|
|
230
261
|
elementsToRemove.forEach((el) => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
262
|
+
var _a, _b;
|
|
263
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.unobserve(el);
|
|
264
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.unobserve(el);
|
|
234
265
|
});
|
|
235
266
|
this._elements = this._elements.filter((el) => !el.scrollViewIn);
|
|
236
267
|
}
|
|
@@ -238,12 +269,12 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
238
269
|
* Add a view element
|
|
239
270
|
*/
|
|
240
271
|
addElement(element) {
|
|
272
|
+
var _a, _b;
|
|
241
273
|
const viewEl = element;
|
|
242
274
|
viewEl.scrollViewIn = undefined;
|
|
243
275
|
this._elements.push(element);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
276
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.observe(element);
|
|
277
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.observe(element);
|
|
247
278
|
if (this.prop.enabled) {
|
|
248
279
|
this.seekBounding();
|
|
249
280
|
}
|
|
@@ -257,21 +288,19 @@ export class ScrollView extends ScrollEventsBase {
|
|
|
257
288
|
* Remove a view element
|
|
258
289
|
*/
|
|
259
290
|
removeElement(element) {
|
|
291
|
+
var _a, _b;
|
|
260
292
|
const viewEl = element;
|
|
261
293
|
viewEl.scrollViewIn = undefined;
|
|
262
294
|
this._elements = this._elements.filter((el) => el !== element);
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
}
|
|
295
|
+
(_a = this._intersectionObserverIn) === null || _a === void 0 ? void 0 : _a.unobserve(element);
|
|
296
|
+
(_b = this._intersectionObserverOut) === null || _b === void 0 ? void 0 : _b.unobserve(element);
|
|
266
297
|
}
|
|
267
298
|
/**
|
|
268
299
|
* Remove all view elements
|
|
269
300
|
*/
|
|
270
301
|
removeElements() {
|
|
271
302
|
this._elements.forEach((el) => {
|
|
272
|
-
|
|
273
|
-
this._intersectionObserver.unobserve(el);
|
|
274
|
-
}
|
|
303
|
+
this.removeElement(el);
|
|
275
304
|
});
|
|
276
305
|
this._elements = [];
|
|
277
306
|
}
|
|
@@ -19,8 +19,11 @@ export class SplitText extends Component {
|
|
|
19
19
|
}
|
|
20
20
|
// get initial text
|
|
21
21
|
this._initHTML = this._container.innerHTML;
|
|
22
|
-
this._initText = (this._container.innerText || 'no rendered text').trim();
|
|
22
|
+
this._initText = (this._container.innerText || this._container.innerHTML || 'no rendered text').trim();
|
|
23
23
|
this._initText = this._initText.replace(/\s+\n/gm, '\n');
|
|
24
|
+
this._initText = this._initText.replace(/<br>/gm, String.fromCharCode(10));
|
|
25
|
+
this._initText = this._initText.replace(/<br\/>/gm, String.fromCharCode(10));
|
|
26
|
+
this._initText = this._initText.replace(/<br \/>/gm, String.fromCharCode(10));
|
|
24
27
|
// set default vars
|
|
25
28
|
this._isPrimarySplit = false;
|
|
26
29
|
this._letters = [];
|
|
@@ -78,9 +78,13 @@ export declare class ScrollView<StaticProp extends NScrollView.StaticProp = NScr
|
|
|
78
78
|
*/
|
|
79
79
|
protected _scrollEvent?: IRemovable;
|
|
80
80
|
/**
|
|
81
|
-
* Intersection observer
|
|
81
|
+
* Intersection observer - type IN
|
|
82
82
|
*/
|
|
83
|
-
protected
|
|
83
|
+
protected _intersectionObserverIn?: IntersectionObserver;
|
|
84
|
+
/**
|
|
85
|
+
* Intersection observer - type OUT
|
|
86
|
+
*/
|
|
87
|
+
protected _intersectionObserverOut?: IntersectionObserver;
|
|
84
88
|
/**
|
|
85
89
|
* If first start
|
|
86
90
|
*/
|
|
@@ -109,7 +113,11 @@ export declare class ScrollView<StaticProp extends NScrollView.StaticProp = NScr
|
|
|
109
113
|
/**
|
|
110
114
|
* Event on IntersectionObserver
|
|
111
115
|
*/
|
|
112
|
-
protected
|
|
116
|
+
protected _handleIntersectionObserverIn(data: IntersectionObserverEntry[]): void;
|
|
117
|
+
/**
|
|
118
|
+
* Event on IntersectionObserver
|
|
119
|
+
*/
|
|
120
|
+
protected _handleIntersectionObserverOut(data: IntersectionObserverEntry[]): void;
|
|
113
121
|
/**
|
|
114
122
|
* Event on Scroll
|
|
115
123
|
*/
|
|
@@ -137,9 +145,7 @@ export declare class ScrollView<StaticProp extends NScrollView.StaticProp = NScr
|
|
|
137
145
|
/**
|
|
138
146
|
* Add a view element
|
|
139
147
|
*/
|
|
140
|
-
addElement(element: Element):
|
|
141
|
-
remove: () => void;
|
|
142
|
-
};
|
|
148
|
+
addElement(element: Element): IRemovable;
|
|
143
149
|
/**
|
|
144
150
|
* Remove a view element
|
|
145
151
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../../src/ts/components/scroll/scrollable/ScrollView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAQlE,yBAAiB,WAAW,CAAC;IAEzB;;OAEG;IACH,UAAiB,UAAW,SAAQ,iBAAiB,CAAC,UAAU;QAC5D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U,EAAE,OAAO,EACnB,KAAK,SAAI;IAgCb;;OAEG;IACH,SAAS,CAAC,sBAAsB;IAchC;;OAEG;IACI,UAAU,CACb,OAAO,EAAE,OAAO,GACjB,UAAU;IAgBb;;OAEG;IACI,aAAa,CAChB,OAAO,EAAE,OAAO;IASpB;;OAEG;IACI,cAAc;IASrB;;OAEG;IACH,SAAS,CAAC,QAAQ;CAIrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitText.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/text/SplitText.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,yBAAiB,UAAU,CAAC;IAExB;;OAEG;IACH,UAAiB,UAAW,SAAQ,UAAU,CAAC,UAAU;QACrD;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC7B;;;WAGG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;WAGG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,SAAS,CAAC,cAAc,CAAC;KACnD;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;KAAI;IAErE;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;QAC7D,OAAO,EAAE,KAAK,CAAC;KAClB;IAED,UAAiB,IAAI;QACjB,EAAE,EAAE,WAAW,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;KAC5B;IAED,UAAiB,IAAI;QACjB,EAAE,EAAE,WAAW,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAA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;
|
|
1
|
+
{"version":3,"file":"SplitText.d.ts","sourceRoot":"","sources":["../../../../src/ts/components/text/SplitText.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,yBAAiB,UAAU,CAAC;IAExB;;OAEG;IACH,UAAiB,UAAW,SAAQ,UAAU,CAAC,UAAU;QACrD;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC7B;;;WAGG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;WAGG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,SAAS,CAAC,cAAc,CAAC;KACnD;IAED;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;KAAI;IAErE;;OAEG;IACH,UAAiB,cAAe,SAAQ,UAAU,CAAC,cAAc;QAC7D,OAAO,EAAE,KAAK,CAAC;KAClB;IAED,UAAiB,IAAI;QACjB,EAAE,EAAE,WAAW,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;KAC5B;IAED,UAAiB,IAAI;QACjB,EAAE,EAAE,WAAW,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;QACpB,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,UAAU,CAAC,EAAE,IAAI,CAAC;QAClB,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC;KAChC;IAED,UAAiB,MAAM;QACnB,EAAE,EAAE,WAAW,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;KACzB;CAE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