nodality 1.0.76 → 1.0.78
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/dist/animator.cjs.js +1 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/appleanim.cjs.js.LICENSE.txt +1 -1
- package/dist/appleanim.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/betaDesktopBar.esm.js +1 -1
- package/dist/betaDesktopBar.esm.js.LICENSE.txt +1 -1
- package/dist/betaMobileBar.esm.js +1 -1
- package/dist/betaMobileBar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/cardGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/cardGetter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/datalist.cjs.js.LICENSE.txt +1 -1
- package/dist/datalist.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.cjs.js.LICENSE.txt +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/dropdown.esm.js.LICENSE.txt +1 -1
- package/dist/elementMapper.cjs.js +1 -1
- package/dist/elementMapper.cjs.js.LICENSE.txt +1 -1
- package/dist/elementMapper.esm.js +1 -1
- package/dist/elementMapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flexCard.cjs.js +1 -1
- package/dist/flexCard.cjs.js.LICENSE.txt +1 -1
- package/dist/flexCard.esm.js +1 -1
- package/dist/flexCard.esm.js.LICENSE.txt +1 -1
- package/dist/flexGrid.cjs.js +1 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +1 -1
- package/dist/flexGrid.esm.js +1 -1
- package/dist/flexGrid.esm.js.LICENSE.txt +1 -1
- package/dist/flexRow.cjs.js +1 -1
- package/dist/flexRow.cjs.js.LICENSE.txt +1 -1
- package/dist/flexRow.esm.js +1 -1
- package/dist/flexRow.esm.js.LICENSE.txt +1 -1
- package/dist/floatingInput.cjs.js +1 -1
- package/dist/floatingInput.cjs.js.LICENSE.txt +1 -1
- package/dist/floatingInput.esm.js +1 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontalScroller.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/imagePicker.cjs.js +1 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +1 -1
- package/dist/imagePicker.esm.js +1 -1
- package/dist/imagePicker.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/linkGetter.cjs.js +1 -1
- package/dist/linkGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/linkGetter.esm.js +1 -1
- package/dist/linkGetter.esm.js.LICENSE.txt +1 -1
- package/dist/metaAdder.cjs.js.LICENSE.txt +1 -1
- package/dist/metaAdder.esm.js.LICENSE.txt +1 -1
- package/dist/modal2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitchers.esm.js +1 -1
- package/dist/multiswitchers.esm.js.LICENSE.txt +1 -1
- package/dist/newNavBar.cjs.js +1 -1
- package/dist/newNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/newNavBar.esm.js +1 -1
- package/dist/newNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.cjs.js +1 -1
- package/dist/scrollvideo.cjs.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.esm.js.LICENSE.txt +1 -1
- package/dist/sideBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideBar.esm.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.cjs.js +1 -1
- package/dist/sideNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.esm.js +1 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/simpleBar.cjs.js +1 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +1 -1
- package/dist/simpleBar.esm.js +1 -1
- package/dist/simpleBar.esm.js.LICENSE.txt +1 -1
- package/dist/slider2025.cjs.js +1 -1
- package/dist/slider2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider2025.esm.js +1 -1
- package/dist/slider2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/textField.cjs.js +1 -1
- package/dist/textField.cjs.js.LICENSE.txt +1 -1
- package/dist/textField.esm.js +1 -1
- package/dist/textField.esm.js.LICENSE.txt +1 -1
- package/dist/transformanim.cjs.js.LICENSE.txt +1 -1
- package/dist/transformanim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoomCard.cjs.js +1 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +1 -1
- package/dist/zoomCard.esm.js +1 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +1 -1
- package/layout/DEPRECATED-PARAGRAPH.js +1 -1
- package/layout/animator.js +114 -108
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base-2.js +1 -1
- package/layout/base.js +1 -1
- package/layout/betaDesktopBar.js +1 -1
- package/layout/betaMobileBar.js +1 -1
- package/layout/box.js +1 -1
- package/layout/button.js +1 -1
- package/layout/cards.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/cleanRow.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/custom.js +1 -1
- package/layout/divImage.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/dropdown2025.js +1 -1
- package/layout/emptyElement.js +1 -1
- package/layout/externalStylesheet.js +1 -1
- package/layout/flexCard.js +1 -1
- package/layout/flexGrid.js +1 -1
- package/layout/flexrow.js +1 -1
- package/layout/footer.js +1 -1
- package/layout/formComponents/custom.js +1 -1
- package/layout/formComponents/dataList.js +1 -1
- package/layout/formComponents/floatingInput.js +1 -1
- package/layout/formComponents/form-all.js +1 -1
- package/layout/formComponents/form.js +1 -1
- package/layout/formComponents/imagePicker.js +1 -1
- package/layout/formComponents/picker.js +1 -1
- package/layout/formComponents/radio.js +1 -1
- package/layout/formComponents/radiogroup.js +1 -1
- package/layout/formComponents/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-new.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/gridSwitcher.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontalScroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.js +1 -1
- package/layout/list.js +1 -1
- package/layout/metaAdder.js +1 -1
- package/layout/modal2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/navBar.js +1 -1
- package/layout/navFactor/customDiv.js +1 -1
- package/layout/newFlatAdder.js +1 -1
- package/layout/newNavBar copy 2.js +1 -1
- package/layout/newNavBar copy.js +1 -1
- package/layout/newNavBar.js +1 -1
- package/layout/offsetContainer.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/savedNewNavBar.js +1 -1
- package/layout/scrollvideo.js +1 -1
- package/layout/sideBar.js +1 -1
- package/layout/sideNavBar.js +1 -1
- package/layout/simpleBar.js +1 -1
- package/layout/slider2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text.js +3 -1
- package/layout/textField.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/withoutNew.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoomCard.js +1 -1
- package/lib/AppleAnim.js +1 -1
- package/lib/KeyframeAnimation.js +1 -1
- package/lib/Stacker.js +1 -1
- package/lib/TransformAnim.js +1 -1
- package/lib/cardGetter.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/elementMapper.js +1 -1
- package/lib/linkGetter.js +1 -1
- package/lib/scrollvideo.js +1 -1
- package/package.json +1 -1
package/layout/animator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.78
|
|
3
3
|
* (c) 2025 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -16,6 +16,8 @@ class Animator {
|
|
|
16
16
|
isMovedUp: false,
|
|
17
17
|
isMovedDown: false
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
this.openedElements = new WeakMap();
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
isHidden(hide){
|
|
@@ -323,49 +325,11 @@ class Animator {
|
|
|
323
325
|
window.addEventListener("resize", react);
|
|
324
326
|
react();
|
|
325
327
|
}*/
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
xs: 0, // less than 576px
|
|
331
|
-
sm: 576,
|
|
332
|
-
md: 768,
|
|
333
|
-
lg: 992,
|
|
334
|
-
xl: 1200,
|
|
335
|
-
xxl: 1400
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
// ✅ Normalize breakpoints (string → numeric)
|
|
339
|
-
arr.forEach(item => {
|
|
340
|
-
if (breakpoints[item.breakpoint] !== undefined) {
|
|
341
|
-
item._value = breakpoints[item.breakpoint];
|
|
342
|
-
} else {
|
|
343
|
-
item._value = parseInt(item.breakpoint, 10); // handles "1200px" or "768"
|
|
344
|
-
}
|
|
328
|
+
respad(arr) {
|
|
329
|
+
this._applyResponsive(arr, (applied) => {
|
|
330
|
+
console.log("Applying padding for", applied.breakpoint);
|
|
331
|
+
this.pad(applied.values);
|
|
345
332
|
});
|
|
346
|
-
|
|
347
|
-
// ✅ Sort by numeric value (small → large)
|
|
348
|
-
arr.sort((a, b) => a._value - b._value);
|
|
349
|
-
|
|
350
|
-
const react = () => {
|
|
351
|
-
const width = window.innerWidth;
|
|
352
|
-
let applied = null;
|
|
353
|
-
|
|
354
|
-
// ✅ Find the LAST matching breakpoint (≤ width)
|
|
355
|
-
for (let i = 0; i < arr.length; i++) {
|
|
356
|
-
if (width >= arr[i]._value) {
|
|
357
|
-
applied = arr[i];
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
if (applied) {
|
|
362
|
-
console.log("Applying padding for", applied.breakpoint);
|
|
363
|
-
this.pad(applied.values);
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
window.addEventListener("resize", react);
|
|
368
|
-
react();
|
|
369
333
|
}
|
|
370
334
|
|
|
371
335
|
|
|
@@ -385,10 +349,10 @@ class Animator {
|
|
|
385
349
|
react();
|
|
386
350
|
}*/
|
|
387
351
|
|
|
388
|
-
|
|
352
|
+
_applyResponsive(arr, applyFn) {
|
|
389
353
|
const breakpoints = {
|
|
390
354
|
default: 0,
|
|
391
|
-
xs: 0,
|
|
355
|
+
xs: 0,
|
|
392
356
|
sm: 576,
|
|
393
357
|
md: 768,
|
|
394
358
|
lg: 992,
|
|
@@ -396,108 +360,80 @@ class Animator {
|
|
|
396
360
|
xxl: 1400
|
|
397
361
|
};
|
|
398
362
|
|
|
399
|
-
// ✅ Normalize breakpoints
|
|
363
|
+
// ✅ Normalize breakpoints
|
|
400
364
|
arr.forEach(item => {
|
|
401
365
|
if (breakpoints[item.breakpoint] !== undefined) {
|
|
402
366
|
item._value = breakpoints[item.breakpoint];
|
|
403
367
|
} else {
|
|
404
|
-
item._value = parseInt(item.breakpoint, 10); //
|
|
368
|
+
item._value = parseInt(item.breakpoint, 10); // e.g. "700px" → 700
|
|
405
369
|
}
|
|
406
370
|
});
|
|
407
371
|
|
|
408
|
-
// ✅ Sort
|
|
372
|
+
// ✅ Sort by numeric value ascending
|
|
409
373
|
arr.sort((a, b) => a._value - b._value);
|
|
410
374
|
|
|
375
|
+
const defaultItem = arr.find(item => item.breakpoint === "default");
|
|
376
|
+
|
|
411
377
|
const react = () => {
|
|
412
378
|
const width = window.innerWidth;
|
|
413
|
-
let applied = null;
|
|
379
|
+
let applied = defaultItem || null;
|
|
414
380
|
|
|
415
|
-
// ✅
|
|
381
|
+
// ✅ Apply the FIRST breakpoint whose max-width matches
|
|
416
382
|
for (let i = 0; i < arr.length; i++) {
|
|
417
|
-
|
|
418
|
-
|
|
383
|
+
const bp = arr[i];
|
|
384
|
+
if (bp.breakpoint !== "default" && width <= bp._value) {
|
|
385
|
+
applied = bp;
|
|
386
|
+
break;
|
|
419
387
|
}
|
|
420
388
|
}
|
|
421
389
|
|
|
422
390
|
if (applied) {
|
|
423
|
-
|
|
424
|
-
this.mar(applied.values);
|
|
391
|
+
applyFn(applied);
|
|
425
392
|
}
|
|
426
393
|
};
|
|
427
394
|
|
|
395
|
+
// Prevent duplicate listeners
|
|
396
|
+
if (this._responsiveHandler) window.removeEventListener("resize", this._responsiveHandler);
|
|
397
|
+
this._responsiveHandler = react;
|
|
398
|
+
|
|
428
399
|
window.addEventListener("resize", react);
|
|
429
400
|
react();
|
|
430
401
|
}
|
|
431
402
|
|
|
432
|
-
|
|
403
|
+
resmar(arr) {
|
|
404
|
+
this._applyResponsive(arr, (applied) => {
|
|
405
|
+
console.log("Applying margin for", applied.breakpoint);
|
|
406
|
+
this.mar(applied.values);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
433
409
|
|
|
434
|
-
const breakpoints = {
|
|
435
|
-
default: 0,
|
|
436
|
-
xs: 0, // less than 576px
|
|
437
|
-
sm: 576,
|
|
438
|
-
md: 768,
|
|
439
|
-
lg: 992,
|
|
440
|
-
xl: 1200,
|
|
441
|
-
xxl: 1400
|
|
442
|
-
};
|
|
443
410
|
|
|
444
|
-
|
|
445
|
-
console.log(arr);
|
|
446
|
-
// Save the original styles
|
|
411
|
+
resprop(arr) {
|
|
447
412
|
this.prevStyles = {};
|
|
448
413
|
for (let i = 0; i < this.res.style.length; i++) {
|
|
449
|
-
|
|
414
|
+
const prop = this.res.style[i];
|
|
450
415
|
this.prevStyles[prop] = this.res.style[prop];
|
|
451
|
-
console.log("kio");
|
|
452
416
|
}
|
|
453
417
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
if (breakpoints[item.breakpoint] !== undefined) {
|
|
457
|
-
item._value = breakpoints[item.breakpoint];
|
|
458
|
-
} else {
|
|
459
|
-
item._value = parseInt(item.breakpoint, 10); // handles "1200px" or "768"
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
// ✅ Sort by numeric value (small → large)
|
|
464
|
-
arr.sort((a, b) => a._value - b._value);
|
|
465
|
-
|
|
466
|
-
console.log("Sorted breakpoints:", arr);
|
|
418
|
+
this._applyResponsive(arr, (applied) => {
|
|
419
|
+
console.log("Applying styles for", applied.breakpoint);
|
|
467
420
|
|
|
468
|
-
|
|
469
|
-
// Reset styles
|
|
421
|
+
// Reset to previous styles
|
|
470
422
|
for (const key in this.prevStyles) {
|
|
471
423
|
this.res.style[key] = this.prevStyles[key];
|
|
472
424
|
}
|
|
473
425
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
for (let i = 0; i < arr.length; i++) {
|
|
479
|
-
if (width <= arr[i]._value) {
|
|
480
|
-
applied = arr[i];
|
|
481
|
-
break; // stop at the first matching
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
if (applied) {
|
|
486
|
-
console.log("Applying styles for", applied.breakpoint);
|
|
487
|
-
for (const key in applied) {
|
|
488
|
-
if (key !== "breakpoint" && key !== "_value") {
|
|
489
|
-
this.res.style[key] = applied[key];
|
|
490
|
-
}
|
|
426
|
+
// Apply responsive props
|
|
427
|
+
for (const key in applied) {
|
|
428
|
+
if (key !== "breakpoint" && key !== "_value" && key !== "values") {
|
|
429
|
+
this.res.style[key] = applied[key];
|
|
491
430
|
}
|
|
492
431
|
}
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
window.addEventListener("resize", react);
|
|
497
|
-
react();
|
|
432
|
+
});
|
|
498
433
|
}
|
|
499
434
|
|
|
500
435
|
|
|
436
|
+
|
|
501
437
|
/*resprop(arr) {
|
|
502
438
|
|
|
503
439
|
this.prevBackground = this.res.style.background;
|
|
@@ -1566,7 +1502,7 @@ if (operations.includes("gradient")){
|
|
|
1566
1502
|
if (this.text){
|
|
1567
1503
|
|
|
1568
1504
|
|
|
1569
|
-
this.res.textContent = this.text; //"a"
|
|
1505
|
+
//this.res.textContent = this.text; //"a"
|
|
1570
1506
|
}
|
|
1571
1507
|
this.res.style['-webkit-text-fill-color'] = 'transparent';
|
|
1572
1508
|
|
|
@@ -1741,7 +1677,32 @@ this.res.appendChild(t);
|
|
|
1741
1677
|
}*/
|
|
1742
1678
|
|
|
1743
1679
|
|
|
1680
|
+
|
|
1744
1681
|
if (operations.includes("spana") || operations.includes("span")) {
|
|
1682
|
+
|
|
1683
|
+
const overlay = document.createElement("div");
|
|
1684
|
+
overlay.setAttribute("id", "oroa");
|
|
1685
|
+
Object.assign(overlay.style, {
|
|
1686
|
+
position: "absolute",
|
|
1687
|
+
inset: "0",
|
|
1688
|
+
background: "linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",
|
|
1689
|
+
WebkitBackgroundClip: "text",
|
|
1690
|
+
WebkitTextFillColor: "transparent",
|
|
1691
|
+
pointerEvents: "none",
|
|
1692
|
+
});
|
|
1693
|
+
|
|
1694
|
+
/*
|
|
1695
|
+
if (!this.res.querySelector("#oroa") && operations.includes("gradient")){
|
|
1696
|
+
// Set text content
|
|
1697
|
+
overlay.textContent = "SWIM FREE";
|
|
1698
|
+
overlay.style.position = "relative";
|
|
1699
|
+
this.res.appendChild(overlay);
|
|
1700
|
+
}*/
|
|
1701
|
+
|
|
1702
|
+
// 🛑 prevent re-creating spans on resize
|
|
1703
|
+
if (this.res && this.res.querySelector('span')) return;
|
|
1704
|
+
|
|
1705
|
+
|
|
1745
1706
|
this.res = this.resCopy;
|
|
1746
1707
|
this.res.textContent = ""; // clear current content
|
|
1747
1708
|
|
|
@@ -1865,6 +1826,51 @@ window.addEventListener(this.openTag, () => {
|
|
|
1865
1826
|
|
|
1866
1827
|
}
|
|
1867
1828
|
|
|
1829
|
+
if (this.options.animation && this.options.animation.op.fireAt === "inview") {
|
|
1830
|
+
let ass = this.options.animation.op;
|
|
1831
|
+
this.res.animate(ass.keyframesClose, { duration: 0, fill: "forwards" });
|
|
1832
|
+
|
|
1833
|
+
let hasOpened = false;
|
|
1834
|
+
|
|
1835
|
+
const observer = new IntersectionObserver((entries, observer) => {
|
|
1836
|
+
entries.forEach(entry => {
|
|
1837
|
+
if (entry.isIntersecting && !hasOpened) {
|
|
1838
|
+
hasOpened = true;
|
|
1839
|
+
this.res.animate(ass.keyframesOpen, ass.openOptions);
|
|
1840
|
+
observer.disconnect();
|
|
1841
|
+
}
|
|
1842
|
+
});
|
|
1843
|
+
});
|
|
1844
|
+
|
|
1845
|
+
observer.observe(this.res);
|
|
1846
|
+
}
|
|
1847
|
+
/*
|
|
1848
|
+
if (!this.openedElements.get(this.res)) {
|
|
1849
|
+
const ass = this.options.animation.op;
|
|
1850
|
+
|
|
1851
|
+
this.res.querySelectorAll('span').forEach(span => {
|
|
1852
|
+
if (!span._hasOpened) {
|
|
1853
|
+
span.animate(ass.keyframesClose, { duration: 0, fill: "forwards" });
|
|
1854
|
+
|
|
1855
|
+
const observer = new IntersectionObserver(entries => {
|
|
1856
|
+
entries.forEach(entry => {
|
|
1857
|
+
if (entry.isIntersecting && !span._hasOpened) {
|
|
1858
|
+
span._hasOpened = true;
|
|
1859
|
+
span.animate(ass.keyframesOpen, ass.openOptions);
|
|
1860
|
+
observer.disconnect();
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
});
|
|
1864
|
+
|
|
1865
|
+
observer.observe(span);
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
}*/
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
/*
|
|
1868
1874
|
if (this.options.animation && this.options.animation.op.fireAt && this.options.animation.op.fireAt === "inview") {
|
|
1869
1875
|
|
|
1870
1876
|
let ass = this.options.animation.op;
|
|
@@ -1888,7 +1894,7 @@ window.addEventListener(this.openTag, () => {
|
|
|
1888
1894
|
|
|
1889
1895
|
// Start observing the element
|
|
1890
1896
|
observer.observe(this.res);
|
|
1891
|
-
}
|
|
1897
|
+
}*/
|
|
1892
1898
|
|
|
1893
1899
|
|
|
1894
1900
|
}
|
package/layout/audio.js
CHANGED
package/layout/audionew.js
CHANGED
package/layout/base-2.js
CHANGED
package/layout/base.js
CHANGED
package/layout/betaDesktopBar.js
CHANGED
package/layout/betaMobileBar.js
CHANGED
package/layout/box.js
CHANGED
package/layout/button.js
CHANGED
package/layout/cards.js
CHANGED
package/layout/center.js
CHANGED
package/layout/checkbox.js
CHANGED
package/layout/circle.js
CHANGED
package/layout/cleanRow.js
CHANGED
package/layout/code.js
CHANGED
package/layout/container.js
CHANGED
package/layout/custom.js
CHANGED
package/layout/divImage.js
CHANGED
package/layout/dropdown.js
CHANGED
package/layout/dropdown2025.js
CHANGED
package/layout/emptyElement.js
CHANGED
package/layout/flexCard.js
CHANGED
package/layout/flexGrid.js
CHANGED
package/layout/flexrow.js
CHANGED
package/layout/footer.js
CHANGED
package/layout/free.js
CHANGED
package/layout/grid-new.js
CHANGED
package/layout/grid.js
CHANGED
package/layout/gridSwitcher.js
CHANGED
package/layout/group.js
CHANGED
package/layout/header.js
CHANGED
package/layout/image-old.js
CHANGED