@innovastudio/contentbox 1.4.45 → 1.4.47
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.
|
4
|
+
"version": "1.4.47",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"files": [
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"webpack-dev-server": "^4.0.0"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
|
-
"@innovastudio/contentbuilder": "^1.3.
|
49
|
+
"@innovastudio/contentbuilder": "^1.3.53",
|
50
50
|
"js-beautify": "^1.14.0"
|
51
51
|
}
|
52
52
|
}
|
@@ -459,6 +459,12 @@ const prepareSvgIcons$1 = builder => {
|
|
459
459
|
<line x1="15" y1="16" x2="15" y2="20"></line>
|
460
460
|
</symbol>
|
461
461
|
|
462
|
+
<symbol id="icon-reload" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
463
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
464
|
+
<path d="M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1.002 7.935 1.007 9.425 4.747"></path>
|
465
|
+
<path d="M20 4v5h-5"></path>
|
466
|
+
</symbol>
|
467
|
+
|
462
468
|
</defs>
|
463
469
|
</svg>`;
|
464
470
|
const builderStuff = builder.builderStuff;
|
@@ -30761,10 +30767,10 @@ const renderQuickAdd = builder => {
|
|
30761
30767
|
elm = quickadd.querySelector('.add-image');
|
30762
30768
|
dom.addEventListener(elm, 'click', () => {
|
30763
30769
|
const mode = quickadd.getAttribute('data-mode');
|
30764
|
-
let html = `<img
|
30770
|
+
let html = `<img src="${builder.opts.snippetPath}example.png" alt="" />`;
|
30765
30771
|
|
30766
30772
|
if (builder.opts.snippetSampleImage) {
|
30767
|
-
html = `<img
|
30773
|
+
html = `<img src="${builder.opts.snippetSampleImage}" alt="" />`;
|
30768
30774
|
}
|
30769
30775
|
|
30770
30776
|
util.addContent(html, mode);
|
@@ -86594,7 +86600,10 @@ class Resize {
|
|
86594
86600
|
// setTimeout(()=>{
|
86595
86601
|
// col.click();
|
86596
86602
|
// },30);
|
86603
|
+
//Trigger Change event
|
86597
86604
|
|
86605
|
+
|
86606
|
+
this.builder.opts.onChange();
|
86598
86607
|
}
|
86599
86608
|
});
|
86600
86609
|
}
|
@@ -88937,11 +88946,8 @@ class ContentBuilder {
|
|
88937
88946
|
window.selectImage = this.selectImage.bind(this);
|
88938
88947
|
window.selectVideo = this.selectVideo.bind(this);
|
88939
88948
|
window.selectAsset = this.selectAsset.bind(this);
|
88940
|
-
window.imageLoaded = this.imageLoaded.bind(this); //this.imageLoaded;
|
88941
|
-
|
88942
88949
|
window.assetType = this.assetType.bind(this);
|
88943
88950
|
window.hideModal = this.hideModal.bind(this);
|
88944
|
-
this.win.imageLoaded = this.imageLoaded.bind(this); //this.imageLoaded;
|
88945
88951
|
} // constructor
|
88946
88952
|
// Convenience constructor, so that the plugin can be called directly using: ContentBuilder.run({ ... });
|
88947
88953
|
|
@@ -89929,10 +89935,6 @@ class ContentBuilder {
|
|
89929
89935
|
|
89930
89936
|
saveForUndo(checkLater) {
|
89931
89937
|
this.uo.saveForUndo(checkLater);
|
89932
|
-
}
|
89933
|
-
|
89934
|
-
imageLoaded(obj) {
|
89935
|
-
obj.removeAttribute('onload');
|
89936
89938
|
} // Module related
|
89937
89939
|
|
89938
89940
|
|
@@ -93597,6 +93599,23 @@ class AnimateScroll {
|
|
93597
93599
|
.is-modal.page-preview > div > div {
|
93598
93600
|
transition: all 0.1s ease;
|
93599
93601
|
}
|
93602
|
+
.is-modal.page-preview .is-modal-refresh,
|
93603
|
+
.is-modal.page-preview .is-modal-close {
|
93604
|
+
background:transparent !important;
|
93605
|
+
width:32px !important;
|
93606
|
+
height:32px !important;
|
93607
|
+
position:absolute !important;
|
93608
|
+
box-shadow:none !important;
|
93609
|
+
}
|
93610
|
+
.is-modal.page-preview .is-modal-refresh {
|
93611
|
+
top:2px;
|
93612
|
+
right:34px;
|
93613
|
+
}
|
93614
|
+
.is-modal.page-preview .is-modal-close {
|
93615
|
+
top:2px;
|
93616
|
+
right:2px;
|
93617
|
+
}
|
93618
|
+
|
93600
93619
|
.is-screen-1920 { width: 576px !important; }
|
93601
93620
|
.is-screen-1440 {
|
93602
93621
|
width: 431px !important;
|
@@ -93627,14 +93646,18 @@ class AnimateScroll {
|
|
93627
93646
|
.is-screen-375 .preview-screen {
|
93628
93647
|
width: 375px;height: 667px;transform: scale(0.446);
|
93629
93648
|
}
|
93649
|
+
.is-screen-375 .is-modal-bar > span {
|
93650
|
+
display: none;
|
93651
|
+
}
|
93630
93652
|
</style>
|
93631
|
-
|
93632
|
-
|
93633
93653
|
<div class="is-modal is-modal-content page-preview is-screen-1920" tabindex="-1" role="dialog" aria-modal="true" aria-hidden="true">
|
93634
93654
|
<div class="is-modal-bar is-draggable" draggable="">
|
93635
|
-
|
93655
|
+
<span>${out('Live Preview')}</span>
|
93656
|
+
<button class="is-modal-refresh" tabindex="-1" title="${out('Reload')}">
|
93657
|
+
<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-reload"></use></svg>
|
93658
|
+
</button>
|
93636
93659
|
<button class="is-modal-close" tabindex="-1" title="${out('Close')}">
|
93637
|
-
|
93660
|
+
<svg class="is-icon-flex" style="width:23px;height:23px;"><use xlink:href="#ion-ios-close-empty"></use></svg>
|
93638
93661
|
</button>
|
93639
93662
|
</div>
|
93640
93663
|
<div style="position:relative;position:absolute;top:0;left:0;width:100%;height:100%;border-top:transparent 35px solid;">
|
@@ -93642,7 +93665,7 @@ class AnimateScroll {
|
|
93642
93665
|
<iframe src="about:blank" style="box-sizing:border-box;width: 100%;height: 100%;position:absolute;"></iframe>
|
93643
93666
|
</div>
|
93644
93667
|
</div>
|
93645
|
-
<div style="position:absolute;left:
|
93668
|
+
<div style="position:absolute;left:3px;bottom:3px;border-radius:3px;display:flex;overflow:hidden;">
|
93646
93669
|
<button class="is-modal-size" tabindex="-1" title="${out('Screen Sizes')}" style="width:30px;height:30px;">
|
93647
93670
|
<svg class="is-icon-flex" style="width:23px;height:23px;"><use xlink:href="#icon-devices"></use></svg>
|
93648
93671
|
</button>
|
@@ -93919,12 +93942,13 @@ class AnimateScroll {
|
|
93919
93942
|
<div class="div-pin-spacing" style="display:none">
|
93920
93943
|
<div style="padding-top:10px;"><span>${out('Pin Spacing')}</span>: </div>
|
93921
93944
|
<div class="flex-wrap" style="padding:5px 0 10px">
|
93922
|
-
<button title="0" class="cmd-pin-space" data-value="
|
93923
|
-
<button title="
|
93924
|
-
<button title="
|
93925
|
-
<button title="
|
93926
|
-
<button title="
|
93927
|
-
<button title="
|
93945
|
+
<button title="0" class="cmd-pin-space" data-value="" style="width:100px">${out('No Spacing')}</button>
|
93946
|
+
<button title="0" class="cmd-pin-space" data-value="0" style="width:50px">100</button>
|
93947
|
+
<button title="20" class="cmd-pin-space" data-value="20" style="width:50px">120</button>
|
93948
|
+
<button title="40" class="cmd-pin-space" data-value="40" style="width:50px">140</button>
|
93949
|
+
<button title="60" class="cmd-pin-space" data-value="60" style="display:none;width:50px">160</button>
|
93950
|
+
<button title="80" class="cmd-pin-space" data-value="80" style="display:none;width:50px">180</button>
|
93951
|
+
<button title="100" class="cmd-pin-space" data-value="100" style="display:none;width:50px">1100</button>
|
93928
93952
|
</div>
|
93929
93953
|
</div>
|
93930
93954
|
<div class="flex-wrap" style="margin-top:10px;">
|
@@ -93934,7 +93958,8 @@ class AnimateScroll {
|
|
93934
93958
|
</div>
|
93935
93959
|
|
93936
93960
|
<div class="flex-wrap" style="margin-top:15px;">
|
93937
|
-
<button title="${out('Disable Smooth Animation')}" class="cmd-disable-smoothanim"
|
93961
|
+
<button title="${out('Disable Smooth Animation')}" class="cmd-disable-smoothanim" style="padding-left:15px;padding-right: 15px;">${out('Disable Smooth Animation')}</button>
|
93962
|
+
<button title="${out('Hidden on Start')}" class="cmd-hidden-onstart" style="padding-left:15px;padding-right: 15px;">${out('Hidden on Start')}</button>
|
93938
93963
|
</div>
|
93939
93964
|
|
93940
93965
|
<div style="display:flex;justify-content: flex-end;margin-top: 15px;margin-right: 20px;">
|
@@ -95770,14 +95795,14 @@ class AnimateScroll {
|
|
95770
95795
|
this.builder.editor.saveForUndo();
|
95771
95796
|
|
95772
95797
|
if (chkPinSection.checked) {
|
95773
|
-
section.classList.add('section-pin');
|
95774
|
-
|
95798
|
+
section.classList.add('section-pin'); // section.classList.add('pin-space-20');
|
95799
|
+
|
95775
95800
|
divPinSpacing.style.display = 'block';
|
95776
95801
|
let elms = divPinSpacing.querySelectorAll('.cmd-pin-space');
|
95777
95802
|
elms.forEach(elm => {
|
95778
95803
|
elm.classList.remove('on');
|
95779
95804
|
});
|
95780
|
-
let btn = divPinSpacing.querySelector('.cmd-pin-space[data-value="
|
95805
|
+
let btn = divPinSpacing.querySelector('.cmd-pin-space[data-value="0"]');
|
95781
95806
|
btn.classList.add('on');
|
95782
95807
|
} else {
|
95783
95808
|
section.classList.remove('section-pin');
|
@@ -95794,11 +95819,13 @@ class AnimateScroll {
|
|
95794
95819
|
if (!section) return;
|
95795
95820
|
let val = btn.getAttribute('data-value');
|
95796
95821
|
this.builder.editor.saveForUndo();
|
95822
|
+
section.classList.remove('no-spacing');
|
95797
95823
|
section.classList.remove('pin-space-20');
|
95798
95824
|
section.classList.remove('pin-space-40');
|
95799
95825
|
section.classList.remove('pin-space-60');
|
95800
95826
|
section.classList.remove('pin-space-80');
|
95801
95827
|
section.classList.remove('pin-space-100');
|
95828
|
+
if (val === '') section.classList.add('no-spacing');
|
95802
95829
|
if (val === '20') section.classList.add('pin-space-20');
|
95803
95830
|
if (val === '40') section.classList.add('pin-space-40');
|
95804
95831
|
if (val === '60') section.classList.add('pin-space-60');
|
@@ -95833,6 +95860,16 @@ class AnimateScroll {
|
|
95833
95860
|
|
95834
95861
|
this.applySimpleScroll();
|
95835
95862
|
});
|
95863
|
+
const btnHiddenOnStart = this.divAnimScrollSimple.querySelector('.cmd-hidden-onstart');
|
95864
|
+
btnHiddenOnStart.addEventListener('click', () => {
|
95865
|
+
if (btnHiddenOnStart.classList.contains('on')) {
|
95866
|
+
btnHiddenOnStart.classList.remove('on');
|
95867
|
+
} else {
|
95868
|
+
btnHiddenOnStart.classList.add('on');
|
95869
|
+
}
|
95870
|
+
|
95871
|
+
this.applySimpleScroll();
|
95872
|
+
});
|
95836
95873
|
const chkLivePreview = this.builder.sidebar.pageQuickSettings.querySelector('.cmd-live-preview');
|
95837
95874
|
chkLivePreview.addEventListener(this.builder.isTouchSupport ? 'touchstart' : 'click', () => {
|
95838
95875
|
if (chkLivePreview.checked) {
|
@@ -95921,6 +95958,17 @@ class AnimateScroll {
|
|
95921
95958
|
// },1000);
|
95922
95959
|
// };
|
95923
95960
|
|
95961
|
+
iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
|
95962
|
+
});
|
95963
|
+
const btnModalRefresh = modalPagePreview.querySelector('.is-modal-refresh');
|
95964
|
+
btnModalRefresh.addEventListener('click', () => {
|
95965
|
+
let html = this.builder.html();
|
95966
|
+
localStorage.setItem('preview-html', html);
|
95967
|
+
let mainCss = this.builder.mainCss();
|
95968
|
+
localStorage.setItem('preview-maincss', mainCss);
|
95969
|
+
let sectionCss = this.builder.sectionCss();
|
95970
|
+
localStorage.setItem('preview-sectioncss', sectionCss);
|
95971
|
+
const iframe = modalPagePreview.querySelector('iframe');
|
95924
95972
|
iframe.src = this.builder.previewURL + '?' + Math.floor(Date.now() / 1000);
|
95925
95973
|
}); // ---
|
95926
95974
|
//Extend onPageContentClick
|
@@ -96356,7 +96404,10 @@ class AnimateScroll {
|
|
96356
96404
|
elm.classList.remove('on');
|
96357
96405
|
});
|
96358
96406
|
|
96359
|
-
if (activeSection.classList.contains('
|
96407
|
+
if (activeSection.classList.contains('no-spacing')) {
|
96408
|
+
let btn = divPinSpacing.querySelector('.cmd-pin-space[data-value=""]');
|
96409
|
+
btn.classList.add('on');
|
96410
|
+
} else if (activeSection.classList.contains('pin-space-20')) {
|
96360
96411
|
let btn = divPinSpacing.querySelector('.cmd-pin-space[data-value="20"]');
|
96361
96412
|
btn.classList.add('on');
|
96362
96413
|
} else if (activeSection.classList.contains('pin-space-40')) {
|
@@ -96425,6 +96476,14 @@ class AnimateScroll {
|
|
96425
96476
|
} else {
|
96426
96477
|
btn.classList.remove('on');
|
96427
96478
|
}
|
96479
|
+
});
|
96480
|
+
const btnHiddenOnStart = this.modalAnimateScroll.querySelectorAll('.cmd-hidden-onstart');
|
96481
|
+
btnHiddenOnStart.forEach(btn => {
|
96482
|
+
if (activeElement.hasAttribute('data-hidden-onstart')) {
|
96483
|
+
btn.classList.add('on');
|
96484
|
+
} else {
|
96485
|
+
btn.classList.remove('on');
|
96486
|
+
}
|
96428
96487
|
}); // Simple Scroll
|
96429
96488
|
|
96430
96489
|
const inpSimpleScrollX_Start = this.modalAnimateScroll.querySelector('.inp-simplescroll-x-start');
|
@@ -97207,6 +97266,14 @@ class AnimateScroll {
|
|
97207
97266
|
activeElement.removeAttribute('data-smooth-scrolling');
|
97208
97267
|
}
|
97209
97268
|
|
97269
|
+
const btnHiddenOnStart = this.divAnimScrollSimple.querySelector('.cmd-hidden-onstart');
|
97270
|
+
|
97271
|
+
if (btnHiddenOnStart.classList.contains('on')) {
|
97272
|
+
activeElement.setAttribute('data-hidden-onstart', '');
|
97273
|
+
} else {
|
97274
|
+
activeElement.removeAttribute('data-hidden-onstart');
|
97275
|
+
}
|
97276
|
+
|
97210
97277
|
activeElement.style.transform = '';
|
97211
97278
|
activeElement.style.transition = '';
|
97212
97279
|
activeElement.style.opacity = ''; // console.log(activeElement);
|
@@ -100359,7 +100426,14 @@ class ContentBox {
|
|
100359
100426
|
builderStuff.style.position = 'fixed';
|
100360
100427
|
setTimeout(() => {
|
100361
100428
|
builderStuff.style.position = '';
|
100362
|
-
|
100429
|
+
|
100430
|
+
if (this.wrapperEl.getBoundingClientRect().left < 0) {
|
100431
|
+
builderStuff.style.position = 'fixed';
|
100432
|
+
setTimeout(() => {
|
100433
|
+
builderStuff.style.position = '';
|
100434
|
+
}, 1500);
|
100435
|
+
}
|
100436
|
+
}, 1500);
|
100363
100437
|
prepareSvgIcons$1(this); // Prepare icons (embed svg definitions for icons)
|
100364
100438
|
|
100365
100439
|
this.sidebar = new SideBar(this);
|
@@ -101033,23 +101107,23 @@ class ContentBox {
|
|
101033
101107
|
// Inside Container
|
101034
101108
|
const box = target.closest('.is-box');
|
101035
101109
|
|
101036
|
-
if (
|
101037
|
-
if (
|
101038
|
-
if (
|
101039
|
-
this.wrapperEl.classList.
|
101040
|
-
|
101110
|
+
if (box) {
|
101111
|
+
if (!target.closest('.is-tool') && !target.closest('.is-rowadd-tool')) {
|
101112
|
+
if (box.classList.contains('box-select')) {
|
101113
|
+
if (this.wrapperEl.classList.contains('is-container-edit')) {
|
101114
|
+
this.wrapperEl.classList.remove('is-container-edit');
|
101115
|
+
this.wrapperEl.classList.add('is-clean-edit');
|
101116
|
+
} else {
|
101117
|
+
this.wrapperEl.classList.add('is-container-edit');
|
101118
|
+
this.wrapperEl.classList.remove('is-clean-edit');
|
101119
|
+
}
|
101041
101120
|
} else {
|
101042
101121
|
this.wrapperEl.classList.add('is-container-edit');
|
101043
101122
|
this.wrapperEl.classList.remove('is-clean-edit');
|
101044
101123
|
}
|
101045
|
-
}
|
101046
|
-
|
101047
|
-
this.wrapperEl.classList.remove('is-clean-edit');
|
101048
|
-
}
|
101049
|
-
}
|
101124
|
+
} // clear
|
101125
|
+
|
101050
101126
|
|
101051
|
-
if (box) {
|
101052
|
-
// clear
|
101053
101127
|
const prevBox = this.doc.querySelector('.box-select');
|
101054
101128
|
if (prevBox) prevBox.classList.remove('box-select'); // select
|
101055
101129
|
|