@innovastudio/contentbox 1.6.149 → 1.6.151
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/index.d.ts
CHANGED
@@ -81,6 +81,10 @@ interface ContentBoxOptions {
|
|
81
81
|
audioSelect?: string;
|
82
82
|
mediaSelect?: string;
|
83
83
|
|
84
|
+
filePicker?: string;
|
85
|
+
|
86
|
+
assetBasePath?: string;
|
87
|
+
|
84
88
|
selectIcon?: string;
|
85
89
|
otherSelectCaption?: string;
|
86
90
|
otherSelectIcon?: string;
|
@@ -148,7 +152,8 @@ interface ContentBoxOptions {
|
|
148
152
|
photoselect?: string;
|
149
153
|
moduleConfig?: any[];
|
150
154
|
|
151
|
-
|
155
|
+
upload?: (file: File) => Promise<any>;
|
156
|
+
uploadFile?: (e: Event) => Promise<any>;
|
152
157
|
|
153
158
|
largerImageHandler?: string;
|
154
159
|
onLargerImageUpload?: () => void;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@innovastudio/contentbox",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.6.
|
4
|
+
"version": "1.6.151",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"types": "index.d.ts",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"ws": "^8.13.0"
|
60
60
|
},
|
61
61
|
"dependencies": {
|
62
|
-
"@innovastudio/contentbuilder": "^1.5.
|
62
|
+
"@innovastudio/contentbuilder": "^1.5.149",
|
63
63
|
"js-beautify": "^1.14.0",
|
64
64
|
"sortablejs": "^1.15.2"
|
65
65
|
}
|
@@ -2363,8 +2363,8 @@ body.frame-center.controlpanel .is-content-view {
|
|
2363
2363
|
cursor: pointer;
|
2364
2364
|
}
|
2365
2365
|
#_cbhtml .is-sidebar button.is-sidebar-button svg {
|
2366
|
-
width:
|
2367
|
-
height:
|
2366
|
+
width: 18px;
|
2367
|
+
height: 18px;
|
2368
2368
|
}
|
2369
2369
|
#_cbhtml .is-sidebar button.is-sidebar-button span {
|
2370
2370
|
font-family: serif;
|
@@ -363,7 +363,7 @@ const prepareSvgIcons$1 = builder => {
|
|
363
363
|
<path d="M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"></path>
|
364
364
|
</symbol>
|
365
365
|
|
366
|
-
<symbol id="icon-typography" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
366
|
+
<symbol id="icon-typography" viewBox="0 0 24 24" stroke-width="1,3" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
367
367
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
368
368
|
<line x1="4" y1="20" x2="7" y2="20"></line>
|
369
369
|
<line x1="14" y1="20" x2="21" y2="20"></line>
|
@@ -372,12 +372,6 @@ const prepareSvgIcons$1 = builder => {
|
|
372
372
|
<polyline points="5 20 11 4 13 4 20 20"></polyline>
|
373
373
|
</symbol>
|
374
374
|
|
375
|
-
<symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
376
|
-
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
377
|
-
<line x1="12" y1="5" x2="12" y2="19"></line>
|
378
|
-
<line x1="5" y1="12" x2="19" y2="12"></line>
|
379
|
-
</symbol>
|
380
|
-
|
381
375
|
<symbol id="icon-hand-move" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
382
376
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
383
377
|
<path d="M8 13v-8.5a1.5 1.5 0 0 1 3 0v7.5"></path>
|
@@ -388,7 +382,7 @@ const prepareSvgIcons$1 = builder => {
|
|
388
382
|
<path d="M14 3.458c1.32 .354 2.558 .902 3.685 1.612"></path>
|
389
383
|
</symbol>
|
390
384
|
|
391
|
-
<symbol id="icon-wand" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
385
|
+
<symbol id="icon-wand" viewBox="0 0 24 24" stroke-width="1.05" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
392
386
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
393
387
|
<polyline points="6 21 21 6 18 3 3 18 6 21"></polyline>
|
394
388
|
<line x1="15" y1="6" x2="18" y2="9"></line>
|
@@ -622,7 +616,7 @@ const prepareSvgIcons$1 = builder => {
|
|
622
616
|
<path d="M6 15l6 -6l6 6"></path>
|
623
617
|
</symbol>
|
624
618
|
|
625
|
-
<symbol id="icon-anim-timeline" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
619
|
+
<symbol id="icon-anim-timeline" viewBox="0 0 24 24" stroke-width="1.1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
626
620
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
627
621
|
<path d="M9.225 18.412a1.595 1.595 0 0 1 -1.225 .588c-.468 0 -.914 -.214 -1.225 -.588l-4.361 -5.248a1.844 1.844 0 0 1 0 -2.328l4.361 -5.248a1.595 1.595 0 0 1 1.225 -.588c.468 0 .914 .214 1.225 .588l4.361 5.248a1.844 1.844 0 0 1 0 2.328l-4.361 5.248z"></path>
|
628
622
|
<path d="M17 5l4.586 5.836a1.844 1.844 0 0 1 0 2.328l-4.586 5.836"></path>
|
@@ -631,6 +625,9 @@ const prepareSvgIcons$1 = builder => {
|
|
631
625
|
<symbol id="icon-download" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
632
626
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" /><path d="M7 11l5 5l5 -5" /><path d="M12 4l0 12" />
|
633
627
|
</symbol>
|
628
|
+
<symbol id="icon-blocks" viewBox="0 0 24 24" stroke-width="1.3" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
629
|
+
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z" /><path d="M4 4l0 .01" /><path d="M8 4l0 .01" /><path d="M12 4l0 .01" /><path d="M16 4l0 .01" /><path d="M4 8l0 .01" /><path d="M4 12l0 .01" /><path d="M4 16l0 .01" />
|
630
|
+
</symbol>
|
634
631
|
|
635
632
|
</defs>
|
636
633
|
</svg>`;
|
@@ -979,7 +976,7 @@ class SideBar {
|
|
979
976
|
'<svg class="svg-icon"><use xlink:href="#icon-plus"></use></svg>' + '</button>';
|
980
977
|
} else if (button.name === 'snippet') {
|
981
978
|
html += '<button class="is-sidebar-button" tabindex="-1" data-content="divSidebarSnippets" data-title="' + out(button.title) + '" title="' + out(button.title) + '">' + // '<svg class="svg-icon"><use xlink:href="#icon-align-center"></use></svg>' +
|
982
|
-
'<svg class="svg-icon"><use xlink:href="#icon-
|
979
|
+
'<svg class="svg-icon" style="width:20px;height:20px"><use xlink:href="#icon-blocks"></use></svg>' + '</button>';
|
983
980
|
} else if (button.name === 'typography') {
|
984
981
|
if (this.builder.enableContentStyle) {
|
985
982
|
html += '<button class="is-sidebar-button" tabindex="-1" data-content="divSidebarTypography" data-command="typography" data-title="' + out(button.title) + '" title="' + out(button.title) + '">' + // '<span style="">a</span>' +
|
@@ -25259,12 +25256,14 @@ class Settings {
|
|
25259
25256
|
<option value="actual">${out('Actual')}</option>
|
25260
25257
|
</select>
|
25261
25258
|
|
25259
|
+
${this.builder.themes && this.builder.themes.length > 0 ? `
|
25262
25260
|
<div class="label">${out('Theme')}:</div>
|
25263
25261
|
<div class="group">
|
25264
25262
|
<button type="button" title="${out('Light')}" data-theme="light" style="background:#fff;border:rgb(132 132 132 / 16%) 1px solid;"></button>
|
25265
25263
|
<button type="button" title="${out('Dark')}" data-theme="dark" style="background:#000;border:rgba(0,0,0,0.15) 1px solid;"></button>
|
25266
25264
|
</div>
|
25267
|
-
|
25265
|
+
` : ''}
|
25266
|
+
|
25268
25267
|
</div>
|
25269
25268
|
`;
|
25270
25269
|
dialog.insertAdjacentHTML('beforeend', html);
|
@@ -42263,7 +42262,7 @@ const prepareSvgIcons = builder => {
|
|
42263
42262
|
<circle cx="12" cy="16" r="1" />
|
42264
42263
|
<path d="M8 11v-4a4 4 0 0 1 8 0v4" />
|
42265
42264
|
</symbol>
|
42266
|
-
<symbol viewBox="0 0 24 24" id="icon-code" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
42265
|
+
<symbol viewBox="0 0 24 24" id="icon-code" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
42267
42266
|
<path stroke="none" d="M0 0h24v24H0z"/>
|
42268
42267
|
<polyline points="7 8 3 12 7 16" />
|
42269
42268
|
<polyline points="17 8 21 12 17 16" />
|
@@ -42551,7 +42550,7 @@ const prepareSvgIcons = builder => {
|
|
42551
42550
|
<path d="M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2" /><path d="M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4" /><path d="M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z" />
|
42552
42551
|
</symbol>
|
42553
42552
|
|
42554
|
-
<symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="1.
|
42553
|
+
<symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
42555
42554
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
42556
42555
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
42557
42556
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
@@ -110406,6 +110405,10 @@ class Dictation {
|
|
110406
110405
|
const inpCommandLang = this.modalConfig.querySelector('.input-command-lang');
|
110407
110406
|
localStorage.setItem('_command_lang', inpCommandLang.value);
|
110408
110407
|
this.builder.speechRecognitionLang = inpCommandLang.value;
|
110408
|
+
const inpImageModelSelect = this.modalConfig.querySelector('#inpImageModelSelect');
|
110409
|
+
localStorage.setItem('_image_model', inpImageModelSelect.value);
|
110410
|
+
const inpImageSizeSelect = this.modalConfig.querySelector('#inpImageSizeSelect');
|
110411
|
+
localStorage.setItem('_image_size', inpImageSizeSelect.value);
|
110409
110412
|
this.builder.hideModal(this.modalConfig);
|
110410
110413
|
});
|
110411
110414
|
const btnConfigReset = this.modalConfig.querySelector('.input-reset');
|
@@ -110686,8 +110689,12 @@ class Dictation {
|
|
110686
110689
|
let models = this.imageModels;
|
110687
110690
|
|
110688
110691
|
// Default selections
|
110689
|
-
|
110690
|
-
|
110692
|
+
let defaultModelId = this.builder.imageModel || 'fal-ai/flux-1/schnell';
|
110693
|
+
let defaultSize = this.builder.imageSize || 'landscape_4_3';
|
110694
|
+
const storedModel = localStorage.getItem('_image_model');
|
110695
|
+
if (storedModel) defaultModelId = storedModel;
|
110696
|
+
const storedSize = localStorage.getItem('_image_size');
|
110697
|
+
if (storedSize) defaultSize = storedSize;
|
110691
110698
|
|
110692
110699
|
// Helper: return available sizes for a model
|
110693
110700
|
function getSizesForModel(modelId) {
|
@@ -120459,17 +120466,27 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
120459
120466
|
|
120460
120467
|
this.opts = Object.assign(this, defaults, opts);
|
120461
120468
|
if (this.opts.uploadFile) {
|
120462
|
-
const uploadHandler =
|
120463
|
-
|
120464
|
-
|
120465
|
-
|
120466
|
-
|
120469
|
+
const uploadHandler = async e => {
|
120470
|
+
const data = await this.opts.uploadFile(e);
|
120471
|
+
this.returnUrl(data.url);
|
120472
|
+
};
|
120473
|
+
this.onImageUpload = uploadHandler;
|
120474
|
+
this.onVideoUpload = uploadHandler;
|
120475
|
+
this.onAudioUpload = uploadHandler;
|
120476
|
+
this.onMediaUpload = uploadHandler;
|
120477
|
+
this.onFileUpload = uploadHandler;
|
120478
|
+
}
|
120479
|
+
if (this.opts.upload) {
|
120480
|
+
const uploadHandler = async e => {
|
120481
|
+
const file = e.target.files[0];
|
120482
|
+
const data = await this.opts.upload(file);
|
120483
|
+
this.returnUrl(data.url);
|
120467
120484
|
};
|
120468
|
-
this.onImageUpload = uploadHandler
|
120469
|
-
this.onVideoUpload = uploadHandler
|
120470
|
-
this.onAudioUpload = uploadHandler
|
120471
|
-
this.onMediaUpload = uploadHandler
|
120472
|
-
this.onFileUpload = uploadHandler
|
120485
|
+
this.onImageUpload = uploadHandler;
|
120486
|
+
this.onVideoUpload = uploadHandler;
|
120487
|
+
this.onAudioUpload = uploadHandler;
|
120488
|
+
this.onMediaUpload = uploadHandler;
|
120489
|
+
this.onFileUpload = uploadHandler;
|
120473
120490
|
}
|
120474
120491
|
if (this.opts.basePath) {
|
120475
120492
|
this.opts.assetPath = this.opts.basePath + 'assets/';
|
@@ -120568,6 +120585,19 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
120568
120585
|
} else if (this.opts.videoselect !== '') {
|
120569
120586
|
this.opts.videoSelect = this.opts.videoselect;
|
120570
120587
|
}
|
120588
|
+
if (this.opts.filePicker) {
|
120589
|
+
this.opts.imageSelect = this.opts.filePicker;
|
120590
|
+
this.opts.videoSelect = this.opts.filePicker;
|
120591
|
+
this.opts.audioSelect = this.opts.filePicker;
|
120592
|
+
this.opts.fileSelect = this.opts.filePicker;
|
120593
|
+
this.opts.mediaSelect = this.opts.filePicker;
|
120594
|
+
// this.settings.otherSelect = this.settings.filePicker; // this enables additional selector button on link dialog
|
120595
|
+
|
120596
|
+
// backward compatible
|
120597
|
+
this.settings.imageselect = this.settings.filePicker;
|
120598
|
+
this.settings.fileselect = this.settings.filePicker;
|
120599
|
+
this.settings.videoselect = this.settings.filePicker;
|
120600
|
+
}
|
120571
120601
|
if (this.assetPanelFullScreen) {
|
120572
120602
|
this.imageSelectWidth = '100vw';
|
120573
120603
|
this.imageSelectHeight = '100vh';
|
@@ -134600,63 +134630,97 @@ class Util {
|
|
134600
134630
|
this.builder = builder;
|
134601
134631
|
}
|
134602
134632
|
|
134603
|
-
getPageTemplate(framework) {
|
134633
|
+
getPageTemplate(framework, options) {
|
134604
134634
|
let pageTemplate = '';
|
134605
134635
|
|
134606
134636
|
if (framework === '') {
|
134607
|
-
|
134608
|
-
|
134609
|
-
|
134610
|
-
|
134611
|
-
|
134612
|
-
|
134613
|
-
|
134614
|
-
|
134615
|
-
|
134616
|
-
|
134617
|
-
|
134618
|
-
|
134619
|
-
|
134620
|
-
|
134621
|
-
|
134622
|
-
|
134623
|
-
|
134624
|
-
|
134625
|
-
|
134626
|
-
|
134627
|
-
|
134628
|
-
|
134629
|
-
|
134630
|
-
|
134631
|
-
|
134632
|
-
|
134633
|
-
|
134634
|
-
|
134635
|
-
|
134636
|
-
|
134637
|
+
if (options.runtime) {
|
134638
|
+
pageTemplate = `
|
134639
|
+
<!DOCTYPE HTML>
|
134640
|
+
<html>
|
134641
|
+
<head>
|
134642
|
+
<meta charset="utf-8">
|
134643
|
+
<title>Page</title>
|
134644
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
134645
|
+
<meta name="description" content="A drag & drop HTML editor Javascript library for web applications.">
|
134646
|
+
<link rel="shortcut icon" href="#">
|
134647
|
+
[%MAINCSS%]
|
134648
|
+
[%SECTIONCSS%]
|
134649
|
+
<link href="[%PATH%]/runtime/contentbox-runtime.css" rel="stylesheet">
|
134650
|
+
</head>
|
134651
|
+
<body style="touch-action: pan-y">
|
134652
|
+
|
134653
|
+
<div class="is-wrapper">
|
134654
|
+
[%CONTENT%]
|
134655
|
+
</div>
|
134656
|
+
|
134657
|
+
<script src="[%PATH%]/runtime/contentbox-runtime.min.js"></script>
|
134658
|
+
<script>
|
134659
|
+
const libraryInstance = new ContentBoxRuntime();
|
134660
|
+
libraryInstance.init();
|
134661
|
+
</script>
|
134662
|
+
|
134663
|
+
<!-- Optional: smooth scrolling -->
|
134664
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js"></script>
|
134665
|
+
|
134666
|
+
</body>
|
134667
|
+
</html>
|
134668
|
+
`;
|
134669
|
+
} else {
|
134670
|
+
pageTemplate = `
|
134671
|
+
<!DOCTYPE html>
|
134672
|
+
<html lang="en">
|
134673
|
+
<head>
|
134674
|
+
<meta charset="utf-8">
|
134675
|
+
<title>Page</title>
|
134676
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
134677
|
+
<meta name="description" content="">
|
134678
|
+
<link rel="shortcut icon" href="#">
|
134637
134679
|
|
134638
|
-
|
134680
|
+
<link href="[%PATH%]/assets/minimalist-blocks/content.css" rel="stylesheet">
|
134681
|
+
<link href="[%PATH%]/box/box-flex.css" rel="stylesheet">
|
134682
|
+
|
134683
|
+
[%MAINCSS%]
|
134684
|
+
[%SECTIONCSS%]
|
134685
|
+
</head>
|
134686
|
+
<body style="touch-action: pan-y">
|
134639
134687
|
|
134640
|
-
|
134641
|
-
|
134642
|
-
|
134643
|
-
|
134644
|
-
|
134645
|
-
|
134646
|
-
|
134647
|
-
|
134648
|
-
|
134649
|
-
|
134650
|
-
|
134651
|
-
|
134652
|
-
|
134653
|
-
|
134654
|
-
|
134655
|
-
|
134656
|
-
|
134657
|
-
|
134658
|
-
|
134659
|
-
|
134688
|
+
<main id="main">
|
134689
|
+
<div class="is-wrapper">
|
134690
|
+
[%CONTENT%]
|
134691
|
+
</div>
|
134692
|
+
</main>
|
134693
|
+
|
134694
|
+
<link href="[%PATH%]/assets/scripts/glide/css/glide.core.css" rel="stylesheet">
|
134695
|
+
<link href="[%PATH%]/assets/scripts/glide/css/glide.theme.css" rel="stylesheet">
|
134696
|
+
<script src="[%PATH%]/assets/scripts/glide/glide.js"></script>
|
134697
|
+
|
134698
|
+
<link href="[%PATH%]/assets/scripts/navbar/navbar.css" rel="stylesheet">
|
134699
|
+
<script src="[%PATH%]/assets/scripts/navbar/navbar.min.js"></script>
|
134700
|
+
|
134701
|
+
<script src="[%PATH%]/box/box-flex.js"></script>
|
134702
|
+
|
134703
|
+
<!-- Optional: if you want to add smooth scrolling -->
|
134704
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js"></script>
|
134705
|
+
<script>
|
134706
|
+
SmoothScroll({
|
134707
|
+
frameRate: 150,
|
134708
|
+
animationTime: 800,
|
134709
|
+
stepSize: 120,
|
134710
|
+
pulseAlgorithm: 1,
|
134711
|
+
pulseScale: 4,
|
134712
|
+
pulseNormalize: 1,
|
134713
|
+
accelerationDelta: 300,
|
134714
|
+
accelerationMax: 2,
|
134715
|
+
keyboardSupport: 1,
|
134716
|
+
arrowScroll: 50,
|
134717
|
+
fixedBackground: 0
|
134718
|
+
});
|
134719
|
+
</script>
|
134720
|
+
</body>
|
134721
|
+
</html>
|
134722
|
+
`;
|
134723
|
+
}
|
134660
134724
|
} else if (framework === 'tailwind') {
|
134661
134725
|
pageTemplate = `
|
134662
134726
|
<!DOCTYPE html>
|
@@ -157649,64 +157713,13 @@ class ContentBox {
|
|
157649
157713
|
maxColumns: 6,
|
157650
157714
|
useLightbox: true,
|
157651
157715
|
lightboxArrow: true,
|
157652
|
-
|
157653
|
-
/*
|
157654
|
-
[
|
157655
|
-
|
157656
|
-
|
157657
|
-
['#f3522b','colored','contentbuilder/themes/colored-orange.css'],
|
157658
|
-
['#b92ea6','colored','contentbuilder/themes/colored-magenta.css'],
|
157659
|
-
['#e73171','colored','contentbuilder/themes/colored-pink.css'],
|
157660
|
-
['#782ec5','colored','contentbuilder/themes/colored-purple.css'],
|
157661
|
-
['#ed2828','colored','contentbuilder/themes/colored-red.css'],
|
157662
|
-
['#f9930f','colored','contentbuilder/themes/colored-yellow.css'],
|
157663
|
-
['#13b34b','colored','contentbuilder/themes/colored-green4.css'],
|
157664
|
-
['#333333','colored-dark','contentbuilder/themes/colored-dark.css'],
|
157665
|
-
|
157666
|
-
['#dbe5f5','light','contentbuilder/themes/light-blue.css'],
|
157667
|
-
['#fbe6f2','light','contentbuilder/themes/light-pink.css'],
|
157668
|
-
['#dcdaf3','light','contentbuilder/themes/light-purple.css'],
|
157669
|
-
['#ffe9e0','light','contentbuilder/themes/light-red.css'],
|
157670
|
-
['#fffae5','light','contentbuilder/themes/light-yellow.css'],
|
157671
|
-
['#ddf3dc','light','contentbuilder/themes/light-green.css'],
|
157672
|
-
['#c7ebfd','light','contentbuilder/themes/light-blue2.css'],
|
157673
|
-
|
157674
|
-
['#ffd5f2','light','contentbuilder/themes/light-pink2.css'],
|
157675
|
-
['#eadafb','light','contentbuilder/themes/light-purple2.css'],
|
157676
|
-
['#c5d4ff','light','contentbuilder/themes/light-blue3.css'],
|
157677
|
-
['#ffefb1','light','contentbuilder/themes/light-yellow2.css'],
|
157678
|
-
['#fefefe','light','contentbuilder/themes/light-gray3.css'],
|
157679
|
-
['#e5e5e5','light','contentbuilder/themes/light-gray2.css'],
|
157680
|
-
['#dadada','light','contentbuilder/themes/light-gray.css'],
|
157681
|
-
['#3f4ec9','colored','contentbuilder/themes/colored-blue2.css'],
|
157682
|
-
['#6779d9','colored','contentbuilder/themes/colored-blue4.css'],
|
157683
|
-
['#10b9d7','colored','contentbuilder/themes/colored-blue3.css'],
|
157684
|
-
['#006add','colored','contentbuilder/themes/colored-blue5.css'],
|
157685
|
-
['#e92f94','colored','contentbuilder/themes/colored-pink3.css'],
|
157686
|
-
['#a761d9','colored','contentbuilder/themes/colored-purple2.css'],
|
157687
|
-
['#f9930f','colored','contentbuilder/themes/colored-yellow2.css'],
|
157688
|
-
['#f3522b','colored','contentbuilder/themes/colored-red3.css'],
|
157689
|
-
['#36b741','colored','contentbuilder/themes/colored-green2.css'],
|
157690
|
-
['#00c17c','colored','contentbuilder/themes/colored-green3.css'],
|
157691
|
-
['#fb3279','colored','contentbuilder/themes/colored-pink2.css'],
|
157692
|
-
['#ff6d13','colored','contentbuilder/themes/colored-orange2.css'],
|
157693
|
-
['#f13535','colored','contentbuilder/themes/colored-red2.css'],
|
157694
|
-
['#646464','colored','contentbuilder/themes/colored-gray.css'],
|
157695
|
-
['#3f4ec9','dark','contentbuilder/themes/dark-blue.css'],
|
157696
|
-
['#0b4d92','dark','contentbuilder/themes/dark-blue2.css'],
|
157697
|
-
['#006add','dark','contentbuilder/themes/dark-blue3.css'],
|
157698
|
-
['#5f3ebf','dark','contentbuilder/themes/dark-purple.css'],
|
157699
|
-
['#e92f69','dark','contentbuilder/themes/dark-pink.css'],
|
157700
|
-
['#4c4c4c','dark','contentbuilder/themes/dark-gray.css'],
|
157701
|
-
['#ed2828','dark','contentbuilder/themes/dark-red.css'],
|
157702
|
-
['#006add','colored','contentbuilder/themes/colored-blue8.css'],
|
157703
|
-
['#ff7723','colored','contentbuilder/themes/colored-orange3.css'],
|
157704
|
-
['#ff5722','colored','contentbuilder/themes/colored-red5.css'],
|
157705
|
-
['#f13535','colored','contentbuilder/themes/colored-red4.css'],
|
157706
|
-
['#00bd79','colored','contentbuilder/themes/colored-green5.css'],
|
157707
|
-
['#557ae9','colored','contentbuilder/themes/colored-blue7.css'],
|
157708
|
-
['#fb3279','colored','contentbuilder/themes/colored-pink4.css'],*/
|
157716
|
+
|
157717
|
+
/*
|
157718
|
+
themes: [
|
157719
|
+
['#ffffff','',''],
|
157720
|
+
['#282828','dark','contentbuilder/themes/dark.css'],
|
157709
157721
|
],
|
157722
|
+
*/
|
157710
157723
|
backgroundColor: '#f1f1f1',
|
157711
157724
|
imageselect: '',
|
157712
157725
|
fileselect: '',
|
@@ -157741,6 +157754,27 @@ class ContentBox {
|
|
157741
157754
|
audioSelectMaxWidth: '1600px',
|
157742
157755
|
mediaSelectMaxWidth: '1600px',
|
157743
157756
|
otherSelectMaxWidth: '1600px',
|
157757
|
+
|
157758
|
+
/*
|
157759
|
+
imageSelectWidth: '100%',
|
157760
|
+
imageSelectHeight: '90vh',
|
157761
|
+
fileSelectWidth: '100%',
|
157762
|
+
fileSelectHeight: '90vh',
|
157763
|
+
videoSelectWidth: '100%',
|
157764
|
+
videoSelectHeight: '90vh',
|
157765
|
+
audioSelectWidth: '100%',
|
157766
|
+
audioSelectHeight: '90vh',
|
157767
|
+
mediaSelectWidth: '100%',
|
157768
|
+
mediaSelectHeight: '90vh',
|
157769
|
+
otherSelectWidth: '100%',
|
157770
|
+
otherSelectHeight: '90vh',
|
157771
|
+
imageSelectMaxWidth: '90vw',
|
157772
|
+
fileSelectMaxWidth: '90vw',
|
157773
|
+
videoSelectMaxWidth: '90vw',
|
157774
|
+
audioSelectMaxWidth: '90vw',
|
157775
|
+
mediaSelectMaxWidth: '90vw',
|
157776
|
+
otherSelectMaxWidth: '90vw',
|
157777
|
+
*/
|
157744
157778
|
assetPanelFullScreen: false,
|
157745
157779
|
codeEditorWidth: '80vw',
|
157746
157780
|
codeEditorHeight: '80vh',
|
@@ -160787,24 +160821,41 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
160787
160821
|
}
|
160788
160822
|
|
160789
160823
|
if (this.uploadFile) {
|
160790
|
-
const uploadHandler =
|
160791
|
-
|
160792
|
-
|
160824
|
+
const uploadHandler = async e => {
|
160825
|
+
const data = await this.uploadFile(e);
|
160826
|
+
this.returnUrl(data.url);
|
160827
|
+
};
|
160793
160828
|
|
160794
|
-
|
160795
|
-
|
160796
|
-
|
160797
|
-
|
160798
|
-
|
160799
|
-
|
160829
|
+
this.onImageUpload = uploadHandler;
|
160830
|
+
this.onVideoUpload = uploadHandler;
|
160831
|
+
this.onAudioUpload = uploadHandler;
|
160832
|
+
this.onMediaUpload = uploadHandler;
|
160833
|
+
this.onFileUpload = uploadHandler; // Cover upload needs special handling
|
160834
|
+
|
160835
|
+
this.onUploadCoverImage = async e => {
|
160836
|
+
const data = await this.uploadFile(e);
|
160837
|
+
this.boxImage(data.url);
|
160800
160838
|
};
|
160839
|
+
}
|
160840
|
+
|
160841
|
+
if (this.upload) {
|
160842
|
+
const uploadHandler = async e => {
|
160843
|
+
const file = e.target.files[0];
|
160844
|
+
const data = await this.upload(file);
|
160845
|
+
this.returnUrl(data.url);
|
160846
|
+
};
|
160847
|
+
|
160848
|
+
this.onImageUpload = uploadHandler;
|
160849
|
+
this.onVideoUpload = uploadHandler;
|
160850
|
+
this.onAudioUpload = uploadHandler;
|
160851
|
+
this.onMediaUpload = uploadHandler;
|
160852
|
+
this.onFileUpload = uploadHandler; // Cover upload needs special handling
|
160801
160853
|
|
160802
|
-
this.onUploadCoverImage =
|
160803
|
-
|
160804
|
-
|
160805
|
-
|
160806
|
-
|
160807
|
-
this.onFileUpload = uploadHandler('file');
|
160854
|
+
this.onUploadCoverImage = async e => {
|
160855
|
+
const file = e.target.files[0];
|
160856
|
+
const data = await this.upload(file);
|
160857
|
+
this.boxImage(data.url);
|
160858
|
+
};
|
160808
160859
|
}
|
160809
160860
|
|
160810
160861
|
if (this.topSpace) {
|
@@ -160855,6 +160906,67 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
160855
160906
|
this.settings.videoselect = this.settings.videoSelect;
|
160856
160907
|
} else if (this.settings.videoselect !== '') {
|
160857
160908
|
this.settings.videoSelect = this.settings.videoselect;
|
160909
|
+
}
|
160910
|
+
|
160911
|
+
if (this.settings.filePicker) {
|
160912
|
+
this.settings.imageSelect = this.settings.filePicker;
|
160913
|
+
this.settings.videoSelect = this.settings.filePicker;
|
160914
|
+
this.settings.audioSelect = this.settings.filePicker;
|
160915
|
+
this.settings.fileSelect = this.settings.filePicker;
|
160916
|
+
this.settings.mediaSelect = this.settings.filePicker; // this.settings.otherSelect = this.settings.filePicker; // this enables additional selector button on link dialog
|
160917
|
+
// backward compatible
|
160918
|
+
|
160919
|
+
this.settings.imageselect = this.settings.filePicker;
|
160920
|
+
this.settings.fileselect = this.settings.filePicker;
|
160921
|
+
this.settings.videoselect = this.settings.filePicker;
|
160922
|
+
}
|
160923
|
+
|
160924
|
+
const assetBasePath = this.settings.assetBasePath; // if set, must end with /
|
160925
|
+
|
160926
|
+
if (assetBasePath !== undefined) {
|
160927
|
+
this.settings.iframeSrc = settings.iframeSrc || `${assetBasePath}blank.html`; // Base path for general assets
|
160928
|
+
|
160929
|
+
this.settings.assetPath = settings.assetPath || `${assetBasePath}assets/`; // Font assets path
|
160930
|
+
|
160931
|
+
this.settings.fontAssetPath = settings.fontAssetPath || `${assetBasePath}assets/fonts/`; // Snippet file and related paths
|
160932
|
+
|
160933
|
+
this.settings.snippetUrl = settings.snippetUrl || `${assetBasePath}assets/minimalist-blocks/content.js`; // Full URL to snippet file
|
160934
|
+
|
160935
|
+
this.settings.snippetPath = settings.snippetPath || `${assetBasePath}assets/minimalist-blocks/`; // Base path for images and resources
|
160936
|
+
|
160937
|
+
this.settings.snippetPathReplace = settings.snippetPathReplace || ['assets/minimalist-blocks/', `${assetBasePath}assets/minimalist-blocks/`]; // Replace local image paths with remote URLs
|
160938
|
+
// Module and plugin paths
|
160939
|
+
|
160940
|
+
this.settings.modulePath = settings.modulePath || `${assetBasePath}assets/modules/`; // module files. Use local path to avoid CORS issues (e.g., public/assets/modules/)
|
160941
|
+
|
160942
|
+
this.settings.pluginPath = settings.pluginPath || `${assetBasePath}contentbuilder/`; // plugin files
|
160943
|
+
// Typography styles path
|
160944
|
+
|
160945
|
+
this.settings.contentStylePath = settings.contentStylePath || `${assetBasePath}assets/styles/`; // Templates path
|
160946
|
+
|
160947
|
+
this.settings.templates = settings.templates || [{
|
160948
|
+
url: `${assetBasePath}assets/templates-simple/templates.js`,
|
160949
|
+
path: `${assetBasePath}assets/templates-simple/`,
|
160950
|
+
pathReplace: [],
|
160951
|
+
numbering: true,
|
160952
|
+
showNumberOnHover: true
|
160953
|
+
}, {
|
160954
|
+
url: `${assetBasePath}assets/templates-quick/templates.js`,
|
160955
|
+
path: `${assetBasePath}assets/templates-quick/`,
|
160956
|
+
pathReplace: [],
|
160957
|
+
numbering: true,
|
160958
|
+
showNumberOnHover: true
|
160959
|
+
}, {
|
160960
|
+
url: `${assetBasePath}assets/templates-animated/templates.js`,
|
160961
|
+
path: `${assetBasePath}assets/templates-animated/`,
|
160962
|
+
pathReplace: [],
|
160963
|
+
numbering: true,
|
160964
|
+
showNumberOnHover: true
|
160965
|
+
}]; // Path adjustments for Form Builder
|
160966
|
+
|
160967
|
+
this.settings.assetsFolder = settings.assetsFolder || `${assetBasePath}assets/formfiles/`, this.settings.templatesUrl = settings.templatesUrl || `${assetBasePath}assets/templates.json`, this.settings.exampleImageUrl = settings.exampleImageUrl || `${assetBasePath}assets/formfiles/ai-V8Khk.jpg`;
|
160968
|
+
this.settings.exampleVideoUrl = settings.exampleVideoUrl || `${assetBasePath}assets/formfiles/ai-thhyR.mp4`;
|
160969
|
+
this.settings.exampleAudioUrl = settings.exampleAudioUrl || `${assetBasePath}assets/formfiles/ai-3EVMb.wav`;
|
160858
160970
|
} // if(this.settings.largerImageHandler!=='') {
|
160859
160971
|
// this.settings.mediaHandler = this.settings.largerImageHandler;
|
160860
160972
|
// } else if(this.settings.mediaHandler!='') {
|
@@ -160899,10 +161011,6 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
160899
161011
|
|
160900
161012
|
if (this.controlPanel) {
|
160901
161013
|
this.controlpanel = new ControlPanel(this);
|
160902
|
-
}
|
160903
|
-
|
160904
|
-
if (!this.pageTemplate) {
|
160905
|
-
this.pageTemplate = this.util.getPageTemplate(this.framework);
|
160906
161014
|
} // IFRAME
|
160907
161015
|
|
160908
161016
|
|
@@ -161518,6 +161626,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
161518
161626
|
onThemeChange: () => {
|
161519
161627
|
this.refreshUIStyle();
|
161520
161628
|
},
|
161629
|
+
filePicker: this.settings.filePicker,
|
161521
161630
|
fileSelect: this.settings.fileSelect,
|
161522
161631
|
imageSelect: this.settings.imageSelect,
|
161523
161632
|
videoSelect: this.settings.videoSelect,
|
@@ -165042,7 +165151,14 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
165042
165151
|
}
|
165043
165152
|
|
165044
165153
|
export(options = {}, shortenOutput = false) {
|
165045
|
-
let pageTemplate
|
165154
|
+
let pageTemplate;
|
165155
|
+
|
165156
|
+
if (this.pageTemplate) {
|
165157
|
+
pageTemplate = this.pageTemplate;
|
165158
|
+
} else {
|
165159
|
+
pageTemplate = this.util.getPageTemplate(this.framework, options);
|
165160
|
+
}
|
165161
|
+
|
165046
165162
|
let output = ''; // [%CONTENT%]
|
165047
165163
|
|
165048
165164
|
this.cleanupUnused();
|