@innovastudio/contentbox 1.4.40 → 1.4.42

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.4.40",
4
+ "version": "1.4.42",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -95949,7 +95949,7 @@ class AnimateScroll {
95949
95949
  let sectionCss = this.builder.sectionCss();
95950
95950
  localStorage.setItem('preview-sectioncss', sectionCss); // this.adjustMarginBottom();
95951
95951
 
95952
- modalPagePreview.querySelector('iframe').src = this.builder.previewURL;
95952
+ modalPagePreview.querySelector('iframe').src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
95953
95953
  }
95954
95954
  };
95955
95955
 
@@ -96024,7 +96024,7 @@ class AnimateScroll {
96024
96024
  modalPagePreview.classList.add('active');
96025
96025
  btnOpenPreviewWindow.classList.add('on');
96026
96026
  const iframe = modalPagePreview.querySelector('iframe');
96027
- iframe.src = this.builder.previewURL; // this.adjustMarginBottom();
96027
+ iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000); // this.adjustMarginBottom();
96028
96028
 
96029
96029
  if (localStorage.getItem('_livepreviewscreen') != null) {
96030
96030
  modalPagePreview.classList.remove('is-screen-1920');
@@ -96139,7 +96139,16 @@ class AnimateScroll {
96139
96139
  btn.classList.add('on');
96140
96140
  }
96141
96141
 
96142
- this.read();
96142
+ try {
96143
+ this.read();
96144
+ } catch (e) {
96145
+ // Do Nothing
96146
+ if (this.builder.debug) {
96147
+ console.log('timeline read() error');
96148
+ console.log(e);
96149
+ }
96150
+ }
96151
+
96143
96152
  this.readAnimOnce();
96144
96153
  }
96145
96154
 
@@ -96326,7 +96335,12 @@ class AnimateScroll {
96326
96335
 
96327
96336
  read() {
96328
96337
  // clear
96329
- this.clearSettings(); // Section Pin
96338
+ this.clearSettings();
96339
+
96340
+ if (this.builder.debug) {
96341
+ console.log('1');
96342
+ } // Section Pin
96343
+
96330
96344
 
96331
96345
  const activeSection = this.builder.activeSection;
96332
96346
 
@@ -96376,10 +96390,19 @@ class AnimateScroll {
96376
96390
  }
96377
96391
  }
96378
96392
 
96393
+ if (this.builder.debug) {
96394
+ console.log('2');
96395
+ }
96396
+
96379
96397
  let activeElement;
96380
96398
  let target = this.getTarget();
96381
96399
  activeElement = target.element;
96382
- if (!activeElement) return; // Default
96400
+ if (!activeElement) return;
96401
+
96402
+ if (this.builder.debug) {
96403
+ console.log('3');
96404
+ } // Default
96405
+
96383
96406
 
96384
96407
  let btnBasic;
96385
96408
  if (activeElement.classList.contains('is-fadeIn')) btnBasic = this.modalAnimateScroll.querySelector('.cmd-basic-anim[data-value="is-fadeIn"]');
@@ -96424,7 +96447,12 @@ class AnimateScroll {
96424
96447
  } else {
96425
96448
  btn.classList.remove('on');
96426
96449
  }
96427
- }); // Simple Scroll
96450
+ });
96451
+
96452
+ if (this.builder.debug) {
96453
+ console.log('4');
96454
+ } // Simple Scroll
96455
+
96428
96456
 
96429
96457
  const inpSimpleScrollX_Start = this.modalAnimateScroll.querySelector('.inp-simplescroll-x-start');
96430
96458
  const inpSimpleScrollX_15 = this.modalAnimateScroll.querySelector('.inp-simplescroll-x-15');
@@ -96517,6 +96545,10 @@ class AnimateScroll {
96517
96545
  inpSimpleScrollOpacity_85.value = '';
96518
96546
  inpSimpleScrollOpacity_End.value = '';
96519
96547
 
96548
+ if (this.builder.debug) {
96549
+ console.log('5');
96550
+ }
96551
+
96520
96552
  if (activeElement.hasAttribute('data-bottom-top') && activeElement.hasAttribute('data-top-bottom') && !(activeElement.hasAttribute('data-center-bottom') || activeElement.hasAttribute('data-100-top') || activeElement.hasAttribute('data-50-top') || activeElement.hasAttribute('data-top')) || activeElement.hasAttribute('data-in') || activeElement.hasAttribute('data-in-150') || activeElement.hasAttribute('data-in-300') || activeElement.hasAttribute('data-cen--150') || activeElement.hasAttribute('data-cen') || activeElement.hasAttribute('data-cen-150') || activeElement.hasAttribute('data-out--300') || activeElement.hasAttribute('data-out--150') || activeElement.hasAttribute('data-out')) {
96521
96553
  let dummyElm = document.querySelector('.dummy-elm'); // read v1
96522
96554
 
@@ -96640,7 +96672,12 @@ class AnimateScroll {
96640
96672
  if (transform.translateY) inpSimpleScrollY_End.value = transform.translateY.replace('px', '');
96641
96673
  if (transform.scale) inpSimpleScrollScale_End.value = transform.scale;
96642
96674
  if (transform.rotate) inpSimpleScrollRotate_End.value = transform.rotate;
96643
- if (transform.opacity) inpSimpleScrollOpacity_End.value = transform.opacity; // ---/read
96675
+ if (transform.opacity) inpSimpleScrollOpacity_End.value = transform.opacity;
96676
+
96677
+ if (this.builder.debug) {
96678
+ console.log('timeline read() ok1');
96679
+ } // ---/read
96680
+
96644
96681
 
96645
96682
  if (!this.modalAnimateScroll.querySelector('.cmd-start.on')) {
96646
96683
  // default
@@ -96660,9 +96697,17 @@ class AnimateScroll {
96660
96697
  if (btn) btn.classList.add('on');
96661
96698
  }
96662
96699
 
96700
+ if (this.builder.debug) {
96701
+ console.log('timeline read() ok2');
96702
+ }
96703
+
96663
96704
  return true;
96664
96705
  } // Scroll
96665
- // enter start
96706
+
96707
+
96708
+ if (this.builder.debug) {
96709
+ console.log('6');
96710
+ } // enter start
96666
96711
 
96667
96712
 
96668
96713
  let css1 = activeElement.getAttribute('data-bottom-top');
@@ -96725,6 +96770,10 @@ class AnimateScroll {
96725
96770
  if (btn) btn.classList.add('on');
96726
96771
  }
96727
96772
 
96773
+ if (this.builder.debug) {
96774
+ console.log('7');
96775
+ }
96776
+
96728
96777
  let dummyElm = document.querySelector('.dummy-elm');
96729
96778
  dummyElm.style.cssText = css1;
96730
96779
  let transform = this.getTransform(dummyElm, css1); // console.log(transform);
@@ -96783,6 +96832,10 @@ class AnimateScroll {
96783
96832
  if (transform.opacity) {
96784
96833
  btn = this.divEnterAnim.querySelector('.cmd-fade');
96785
96834
  if (btn) btn.classList.add('on');
96835
+ }
96836
+
96837
+ if (this.builder.debug) {
96838
+ console.log('8');
96786
96839
  } // --- LEAVE ---
96787
96840
 
96788
96841
 
@@ -96849,6 +96902,10 @@ class AnimateScroll {
96849
96902
  }
96850
96903
  }
96851
96904
 
96905
+ if (this.builder.debug) {
96906
+ console.log('9');
96907
+ }
96908
+
96852
96909
  const inpScale_leave = this.divLeaveAnim.querySelector('.inp-scale');
96853
96910
 
96854
96911
  if (transform.scale) {
@@ -96871,6 +96928,10 @@ class AnimateScroll {
96871
96928
  if (btn) btn.classList.add('on');
96872
96929
  }
96873
96930
 
96931
+ if (this.builder.debug) {
96932
+ console.log('10');
96933
+ }
96934
+
96874
96935
  return true;
96875
96936
  }
96876
96937