@innovastudio/contentbox 1.6.150 → 1.6.152

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.
@@ -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-box-multiple"></use></svg>' + '</button>';
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);
@@ -31242,6 +31241,7 @@ class Util$1 {
31242
31241
  showRtePop(pop, onShow, btn) {
31243
31242
  const dom = this.dom;
31244
31243
  pop.style.display = 'flex';
31244
+ pop.setAttribute('aria-hidden', 'false');
31245
31245
  if (onShow) onShow();
31246
31246
  dom.removeClass(pop, 'deactive');
31247
31247
  dom.addClass(pop, 'active');
@@ -31306,6 +31306,7 @@ class Util$1 {
31306
31306
  pop.style.display = '';
31307
31307
  dom.removeClass(pop, 'active');
31308
31308
  dom.addClass(pop, 'deactive');
31309
+ pop.setAttribute('aria-hidden', 'true');
31309
31310
  }
31310
31311
  showPopOverlay(pop, cancelCallback, btn) {
31311
31312
  const builderStuff = this.builder.builderStuff;
@@ -31979,12 +31980,27 @@ class Util$1 {
31979
31980
  if (mode === 'cell' || mode === 'cell-right') {
31980
31981
  dom.moveAfter(cellElement, cell);
31981
31982
  }
31983
+ let element;
31984
+ if (cellElement.childNodes && cellElement.childNodes[0]) {
31985
+ element = cellElement.childNodes[0];
31986
+ }
31982
31987
  let builderActive = this.builder.doc.querySelector('.builder-active');
31983
31988
  if (builderActive) this.builder.applyBehaviorOn(builderActive);
31984
31989
  this.fixLayout(row);
31985
- cellElement.click(); //change active block to the newly created
31986
- }
31987
31990
 
31991
+ // cellElement.click(); //change active block to the newly created
31992
+ if (element && element.tagName.toLowerCase() === 'img') {
31993
+ element.onload = () => {
31994
+ element.click();
31995
+ element.onload = null;
31996
+ setTimeout(() => {
31997
+ this.builder.element.image.repositionImageTool();
31998
+ }, 100);
31999
+ };
32000
+ } else if (element) {
32001
+ element.click();
32002
+ }
32003
+ }
31988
32004
  if (mode === 'row') {
31989
32005
  this.builder.uo.saveForUndo();
31990
32006
  let rowElement, cellElement;
@@ -32022,11 +32038,26 @@ class Util$1 {
32022
32038
  }
32023
32039
  row.parentNode.insertBefore(rowElement, row);
32024
32040
  dom.moveAfter(rowElement, row);
32041
+ let element;
32042
+ if (rowElement.childNodes && rowElement.childNodes[0].childNodes && rowElement.childNodes[0].childNodes) {
32043
+ element = rowElement.childNodes[0].childNodes[0];
32044
+ }
32025
32045
  let builderActive = this.builder.doc.querySelector('.builder-active');
32026
32046
  if (builderActive) this.builder.applyBehaviorOn(builderActive);
32027
- cellElement.click(); //change active block to the newly created
32028
- }
32029
32047
 
32048
+ // cellElement.click(); //change active block to the newly created
32049
+ if (element && element.tagName.toLowerCase() === 'img') {
32050
+ element.onload = () => {
32051
+ element.click();
32052
+ element.onload = null;
32053
+ setTimeout(() => {
32054
+ this.builder.element.image.repositionImageTool();
32055
+ }, 100);
32056
+ };
32057
+ } else if (element) {
32058
+ element.click();
32059
+ }
32060
+ }
32030
32061
  if (mode === 'elm') {
32031
32062
  let elm = this.builder.activeElement; // See elementtool.js line 195-196. // document.querySelector('.elm-active');
32032
32063
  if (!elm) return;
@@ -32057,6 +32088,9 @@ class Util$1 {
32057
32088
  let checkLoad = setInterval(() => {
32058
32089
  if (newelement.complete) {
32059
32090
  newelement.click();
32091
+ setTimeout(() => {
32092
+ this.builder.element.image.repositionImageTool();
32093
+ }, 100);
32060
32094
  clearInterval(checkLoad);
32061
32095
  }
32062
32096
  }, 30);
@@ -42263,7 +42297,7 @@ const prepareSvgIcons = builder => {
42263
42297
  <circle cx="12" cy="16" r="1" />
42264
42298
  <path d="M8 11v-4a4 4 0 0 1 8 0v4" />
42265
42299
  </symbol>
42266
- <symbol viewBox="0 0 24 24" id="icon-code" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
42300
+ <symbol viewBox="0 0 24 24" id="icon-code" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
42267
42301
  <path stroke="none" d="M0 0h24v24H0z"/>
42268
42302
  <polyline points="7 8 3 12 7 16" />
42269
42303
  <polyline points="17 8 21 12 17 16" />
@@ -42551,7 +42585,7 @@ const prepareSvgIcons = builder => {
42551
42585
  <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
42586
  </symbol>
42553
42587
 
42554
- <symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="1.7" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
42588
+ <symbol id="icon-plus" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
42555
42589
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
42556
42590
  <line x1="12" y1="5" x2="12" y2="19"></line>
42557
42591
  <line x1="5" y1="12" x2="19" y2="12"></line>
@@ -94226,6 +94260,7 @@ class Rte {
94226
94260
  const top = btn.getBoundingClientRect().top;
94227
94261
  const left = btn.getBoundingClientRect().left;
94228
94262
  pop.style.display = 'flex';
94263
+ pop.setAttribute('aria-hidden', 'false');
94229
94264
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
94230
94265
  const h = pop.offsetHeight;
94231
94266
  if (!dom.hasClass(pop, 'active')) {
@@ -94260,6 +94295,7 @@ class Rte {
94260
94295
  const top = btn.getBoundingClientRect().top;
94261
94296
  const left = btn.getBoundingClientRect().left;
94262
94297
  pop.style.display = 'flex';
94298
+ pop.setAttribute('aria-hidden', 'false');
94263
94299
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
94264
94300
  const h = pop.offsetHeight;
94265
94301
  if (!dom.hasClass(pop, 'active')) {
@@ -95096,6 +95132,7 @@ class Rte {
95096
95132
  const top = btn.getBoundingClientRect().top;
95097
95133
  const left = btn.getBoundingClientRect().left;
95098
95134
  pop.style.display = 'flex';
95135
+ pop.setAttribute('aria-hidden', 'false');
95099
95136
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
95100
95137
  const h = pop.offsetHeight;
95101
95138
  if (!dom.hasClass(pop, 'active')) {
@@ -95422,6 +95459,7 @@ class Rte {
95422
95459
  const top = btn.getBoundingClientRect().top;
95423
95460
  const left = btn.getBoundingClientRect().left;
95424
95461
  pop.style.display = 'flex';
95462
+ pop.setAttribute('aria-hidden', 'false');
95425
95463
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
95426
95464
  const h = pop.offsetHeight;
95427
95465
  if (!dom.hasClass(pop, 'active')) {
@@ -96939,6 +96977,7 @@ class Rte {
96939
96977
  const top = btnRteIcons.getBoundingClientRect().top;
96940
96978
  const left = btnRteIcons.getBoundingClientRect().left;
96941
96979
  pop.style.display = 'flex';
96980
+ pop.setAttribute('aria-hidden', 'false');
96942
96981
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
96943
96982
  const h = pop.offsetHeight;
96944
96983
  if (!dom.hasClass(pop, 'active')) {
@@ -97026,6 +97065,7 @@ class Rte {
97026
97065
  });
97027
97066
  const pop = this.rteMoreOptions;
97028
97067
  pop.style.display = 'flex';
97068
+ pop.setAttribute('aria-hidden', 'false');
97029
97069
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
97030
97070
  const h = pop.offsetHeight;
97031
97071
  if (this.builder.opts.toolbar === 'left') {
@@ -97102,6 +97142,7 @@ class Rte {
97102
97142
  const top = btnElementRteMore.getBoundingClientRect().top;
97103
97143
  const left = btnElementRteMore.getBoundingClientRect().left;
97104
97144
  pop.style.display = 'flex';
97145
+ pop.setAttribute('aria-hidden', 'false');
97105
97146
  const w = pop.offsetWidth; //to get value, element must not hidden (display:none). So set display:flex before this.
97106
97147
  const h = pop.offsetHeight;
97107
97148
  if (this.builder.opts.toolbar === 'left') {
@@ -110406,6 +110447,10 @@ class Dictation {
110406
110447
  const inpCommandLang = this.modalConfig.querySelector('.input-command-lang');
110407
110448
  localStorage.setItem('_command_lang', inpCommandLang.value);
110408
110449
  this.builder.speechRecognitionLang = inpCommandLang.value;
110450
+ const inpImageModelSelect = this.modalConfig.querySelector('#inpImageModelSelect');
110451
+ localStorage.setItem('_image_model', inpImageModelSelect.value);
110452
+ const inpImageSizeSelect = this.modalConfig.querySelector('#inpImageSizeSelect');
110453
+ localStorage.setItem('_image_size', inpImageSizeSelect.value);
110409
110454
  this.builder.hideModal(this.modalConfig);
110410
110455
  });
110411
110456
  const btnConfigReset = this.modalConfig.querySelector('.input-reset');
@@ -110686,8 +110731,12 @@ class Dictation {
110686
110731
  let models = this.imageModels;
110687
110732
 
110688
110733
  // Default selections
110689
- const defaultModelId = this.builder.imageModel || 'fal-ai/flux-1/schnell';
110690
- const defaultSize = this.builder.imageSize || 'landscape_4_3';
110734
+ let defaultModelId = this.builder.imageModel || 'fal-ai/flux-1/schnell';
110735
+ let defaultSize = this.builder.imageSize || 'landscape_4_3';
110736
+ const storedModel = localStorage.getItem('_image_model');
110737
+ if (storedModel) defaultModelId = storedModel;
110738
+ const storedSize = localStorage.getItem('_image_size');
110739
+ if (storedSize) defaultSize = storedSize;
110691
110740
 
110692
110741
  // Helper: return available sizes for a model
110693
110742
  function getSizesForModel(modelId) {
@@ -110883,6 +110932,7 @@ class Dictation {
110883
110932
  return;
110884
110933
  }
110885
110934
  this.modalCommand.classList.add('active');
110935
+ this.modalCommand.setAttribute('aria-hidden', 'false');
110886
110936
  inpCommand.focus();
110887
110937
  localStorage.setItem('_dictation', '1');
110888
110938
  const chkAutoSend = this.builderStuff.querySelector('#chkAutoSendCommand');
@@ -119529,6 +119579,7 @@ class ContentBuilder {
119529
119579
  mediaSelect: '',
119530
119580
  // NEW: for image & video
119531
119581
 
119582
+ filePickerSize: 'medium',
119532
119583
  // selectIcon: '<svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg>',
119533
119584
  selectIcon: '<svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#icon-folder"></use></svg>',
119534
119585
  // NEW: for any other file select. Will be visible on hyperlink dialog, image dialog (image link), and Column Settings dialog (on Click tab)
@@ -120578,7 +120629,20 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
120578
120629
  } else if (this.opts.videoselect !== '') {
120579
120630
  this.opts.videoSelect = this.opts.videoselect;
120580
120631
  }
120581
- if (this.assetPanelFullScreen) {
120632
+ if (this.opts.filePicker) {
120633
+ this.opts.imageSelect = this.opts.filePicker;
120634
+ this.opts.videoSelect = this.opts.filePicker;
120635
+ this.opts.audioSelect = this.opts.filePicker;
120636
+ this.opts.fileSelect = this.opts.filePicker;
120637
+ this.opts.mediaSelect = this.opts.filePicker;
120638
+ // this.settings.otherSelect = this.settings.filePicker; // this enables additional selector button on link dialog
120639
+
120640
+ // backward compatible
120641
+ this.settings.imageselect = this.settings.filePicker;
120642
+ this.settings.fileselect = this.settings.filePicker;
120643
+ this.settings.videoselect = this.settings.filePicker;
120644
+ }
120645
+ if (this.assetPanelFullScreen || this.filePickerSize === 'fullscreen') {
120582
120646
  this.imageSelectWidth = '100vw';
120583
120647
  this.imageSelectHeight = '100vh';
120584
120648
  this.fileSelectWidth = '100vw';
@@ -120598,6 +120662,26 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
120598
120662
  this.mediaSelectMaxWidth = '100vw';
120599
120663
  this.otherSelectMaxWidth = '100vw';
120600
120664
  }
120665
+ if (this.filePickerSize === 'large') {
120666
+ this.imageSelectWidth = '100%';
120667
+ this.imageSelectHeight = '90vh';
120668
+ this.fileSelectWidth = '100%';
120669
+ this.fileSelectHeight = '90vh';
120670
+ this.videoSelectWidth = '100%';
120671
+ this.videoSelectHeight = '90vh';
120672
+ this.audioSelectWidth = '100%';
120673
+ this.audioSelectHeight = '90vh';
120674
+ this.mediaSelectWidth = '100%';
120675
+ this.mediaSelectHeight = '90vh';
120676
+ this.otherSelectWidth = '100%';
120677
+ this.otherSelectHeight = '90vh';
120678
+ this.imageSelectMaxWidth = '92vw';
120679
+ this.fileSelectMaxWidth = '92vw';
120680
+ this.videoSelectMaxWidth = '92vw';
120681
+ this.audioSelectMaxWidth = '92vw';
120682
+ this.mediaSelectMaxWidth = '92vw';
120683
+ this.otherSelectMaxWidth = '92vw';
120684
+ }
120601
120685
 
120602
120686
  // if(this.opts.largerImageHandler!=='') {
120603
120687
  // this.opts.mediaHandler = this.opts.largerImageHandler;
@@ -134610,63 +134694,97 @@ class Util {
134610
134694
  this.builder = builder;
134611
134695
  }
134612
134696
 
134613
- getPageTemplate(framework) {
134697
+ getPageTemplate(framework, options) {
134614
134698
  let pageTemplate = '';
134615
134699
 
134616
134700
  if (framework === '') {
134617
- pageTemplate = `
134618
- <!DOCTYPE html>
134619
- <html lang="en">
134620
- <head>
134621
- <meta charset="utf-8">
134622
- <title>Page</title>
134623
- <meta name="viewport" content="width=device-width, initial-scale=1">
134624
- <meta name="description" content="">
134625
- <link rel="shortcut icon" href="#">
134626
-
134627
- <link href="[%PATH%]/assets/minimalist-blocks/content.css" rel="stylesheet">
134628
- <link href="[%PATH%]/box/box-flex.css" rel="stylesheet">
134629
-
134630
- [%MAINCSS%]
134631
- [%SECTIONCSS%]
134632
- </head>
134633
- <body style="touch-action: pan-y">
134634
-
134635
- <main id="main">
134636
- <div class="is-wrapper">
134637
- [%CONTENT%]
134638
- </div>
134639
- </main>
134640
-
134641
- <link href="[%PATH%]/assets/scripts/glide/css/glide.core.css" rel="stylesheet">
134642
- <link href="[%PATH%]/assets/scripts/glide/css/glide.theme.css" rel="stylesheet">
134643
- <script src="[%PATH%]/assets/scripts/glide/glide.js"></script>
134644
-
134645
- <link href="[%PATH%]/assets/scripts/navbar/navbar.css" rel="stylesheet">
134646
- <script src="[%PATH%]/assets/scripts/navbar/navbar.min.js"></script>
134701
+ if (options.runtime) {
134702
+ pageTemplate = `
134703
+ <!DOCTYPE HTML>
134704
+ <html>
134705
+ <head>
134706
+ <meta charset="utf-8">
134707
+ <title>Page</title>
134708
+ <meta name="viewport" content="width=device-width, initial-scale=1">
134709
+ <meta name="description" content="A drag & drop HTML editor Javascript library for web applications.">
134710
+ <link rel="shortcut icon" href="#">
134711
+ [%MAINCSS%]
134712
+ [%SECTIONCSS%]
134713
+ <link href="[%PATH%]/runtime/contentbox-runtime.css" rel="stylesheet">
134714
+ </head>
134715
+ <body style="touch-action: pan-y">
134716
+
134717
+ <div class="is-wrapper">
134718
+ [%CONTENT%]
134719
+ </div>
134720
+
134721
+ <script src="[%PATH%]/runtime/contentbox-runtime.min.js"></script>
134722
+ <script>
134723
+ const libraryInstance = new ContentBoxRuntime();
134724
+ libraryInstance.init();
134725
+ </script>
134726
+
134727
+ <!-- Optional: smooth scrolling -->
134728
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js"></script>
134729
+
134730
+ </body>
134731
+ </html>
134732
+ `;
134733
+ } else {
134734
+ pageTemplate = `
134735
+ <!DOCTYPE html>
134736
+ <html lang="en">
134737
+ <head>
134738
+ <meta charset="utf-8">
134739
+ <title>Page</title>
134740
+ <meta name="viewport" content="width=device-width, initial-scale=1">
134741
+ <meta name="description" content="">
134742
+ <link rel="shortcut icon" href="#">
134647
134743
 
134648
- <script src="[%PATH%]/box/box-flex.js"></script>
134744
+ <link href="[%PATH%]/assets/minimalist-blocks/content.css" rel="stylesheet">
134745
+ <link href="[%PATH%]/box/box-flex.css" rel="stylesheet">
134746
+
134747
+ [%MAINCSS%]
134748
+ [%SECTIONCSS%]
134749
+ </head>
134750
+ <body style="touch-action: pan-y">
134649
134751
 
134650
- <!-- Optional: if you want to add smooth scrolling -->
134651
- <script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js"></script>
134652
- <script>
134653
- SmoothScroll({
134654
- frameRate: 150,
134655
- animationTime: 800,
134656
- stepSize: 120,
134657
- pulseAlgorithm: 1,
134658
- pulseScale: 4,
134659
- pulseNormalize: 1,
134660
- accelerationDelta: 300,
134661
- accelerationMax: 2,
134662
- keyboardSupport: 1,
134663
- arrowScroll: 50,
134664
- fixedBackground: 0
134665
- });
134666
- </script>
134667
- </body>
134668
- </html>
134669
- `;
134752
+ <main id="main">
134753
+ <div class="is-wrapper">
134754
+ [%CONTENT%]
134755
+ </div>
134756
+ </main>
134757
+
134758
+ <link href="[%PATH%]/assets/scripts/glide/css/glide.core.css" rel="stylesheet">
134759
+ <link href="[%PATH%]/assets/scripts/glide/css/glide.theme.css" rel="stylesheet">
134760
+ <script src="[%PATH%]/assets/scripts/glide/glide.js"></script>
134761
+
134762
+ <link href="[%PATH%]/assets/scripts/navbar/navbar.css" rel="stylesheet">
134763
+ <script src="[%PATH%]/assets/scripts/navbar/navbar.min.js"></script>
134764
+
134765
+ <script src="[%PATH%]/box/box-flex.js"></script>
134766
+
134767
+ <!-- Optional: if you want to add smooth scrolling -->
134768
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js"></script>
134769
+ <script>
134770
+ SmoothScroll({
134771
+ frameRate: 150,
134772
+ animationTime: 800,
134773
+ stepSize: 120,
134774
+ pulseAlgorithm: 1,
134775
+ pulseScale: 4,
134776
+ pulseNormalize: 1,
134777
+ accelerationDelta: 300,
134778
+ accelerationMax: 2,
134779
+ keyboardSupport: 1,
134780
+ arrowScroll: 50,
134781
+ fixedBackground: 0
134782
+ });
134783
+ </script>
134784
+ </body>
134785
+ </html>
134786
+ `;
134787
+ }
134670
134788
  } else if (framework === 'tailwind') {
134671
134789
  pageTemplate = `
134672
134790
  <!DOCTYPE html>
@@ -157659,64 +157777,13 @@ class ContentBox {
157659
157777
  maxColumns: 6,
157660
157778
  useLightbox: true,
157661
157779
  lightboxArrow: true,
157662
- themes: [['#ffffff', '', ''], ['#282828', 'dark', 'contentbuilder/themes/dark.css']
157663
- /*['#0088dc','colored','contentbuilder/themes/colored-blue.css'],
157664
- ['#006add','colored','contentbuilder/themes/colored-blue6.css'],
157665
- ['#0a4d92','colored','contentbuilder/themes/colored-darkblue.css'],
157666
- ['#96af16','colored','contentbuilder/themes/colored-green.css'],
157667
- ['#f3522b','colored','contentbuilder/themes/colored-orange.css'],
157668
- ['#b92ea6','colored','contentbuilder/themes/colored-magenta.css'],
157669
- ['#e73171','colored','contentbuilder/themes/colored-pink.css'],
157670
- ['#782ec5','colored','contentbuilder/themes/colored-purple.css'],
157671
- ['#ed2828','colored','contentbuilder/themes/colored-red.css'],
157672
- ['#f9930f','colored','contentbuilder/themes/colored-yellow.css'],
157673
- ['#13b34b','colored','contentbuilder/themes/colored-green4.css'],
157674
- ['#333333','colored-dark','contentbuilder/themes/colored-dark.css'],
157675
-
157676
- ['#dbe5f5','light','contentbuilder/themes/light-blue.css'],
157677
- ['#fbe6f2','light','contentbuilder/themes/light-pink.css'],
157678
- ['#dcdaf3','light','contentbuilder/themes/light-purple.css'],
157679
- ['#ffe9e0','light','contentbuilder/themes/light-red.css'],
157680
- ['#fffae5','light','contentbuilder/themes/light-yellow.css'],
157681
- ['#ddf3dc','light','contentbuilder/themes/light-green.css'],
157682
- ['#c7ebfd','light','contentbuilder/themes/light-blue2.css'],
157683
-
157684
- ['#ffd5f2','light','contentbuilder/themes/light-pink2.css'],
157685
- ['#eadafb','light','contentbuilder/themes/light-purple2.css'],
157686
- ['#c5d4ff','light','contentbuilder/themes/light-blue3.css'],
157687
- ['#ffefb1','light','contentbuilder/themes/light-yellow2.css'],
157688
- ['#fefefe','light','contentbuilder/themes/light-gray3.css'],
157689
- ['#e5e5e5','light','contentbuilder/themes/light-gray2.css'],
157690
- ['#dadada','light','contentbuilder/themes/light-gray.css'],
157691
- ['#3f4ec9','colored','contentbuilder/themes/colored-blue2.css'],
157692
- ['#6779d9','colored','contentbuilder/themes/colored-blue4.css'],
157693
- ['#10b9d7','colored','contentbuilder/themes/colored-blue3.css'],
157694
- ['#006add','colored','contentbuilder/themes/colored-blue5.css'],
157695
- ['#e92f94','colored','contentbuilder/themes/colored-pink3.css'],
157696
- ['#a761d9','colored','contentbuilder/themes/colored-purple2.css'],
157697
- ['#f9930f','colored','contentbuilder/themes/colored-yellow2.css'],
157698
- ['#f3522b','colored','contentbuilder/themes/colored-red3.css'],
157699
- ['#36b741','colored','contentbuilder/themes/colored-green2.css'],
157700
- ['#00c17c','colored','contentbuilder/themes/colored-green3.css'],
157701
- ['#fb3279','colored','contentbuilder/themes/colored-pink2.css'],
157702
- ['#ff6d13','colored','contentbuilder/themes/colored-orange2.css'],
157703
- ['#f13535','colored','contentbuilder/themes/colored-red2.css'],
157704
- ['#646464','colored','contentbuilder/themes/colored-gray.css'],
157705
- ['#3f4ec9','dark','contentbuilder/themes/dark-blue.css'],
157706
- ['#0b4d92','dark','contentbuilder/themes/dark-blue2.css'],
157707
- ['#006add','dark','contentbuilder/themes/dark-blue3.css'],
157708
- ['#5f3ebf','dark','contentbuilder/themes/dark-purple.css'],
157709
- ['#e92f69','dark','contentbuilder/themes/dark-pink.css'],
157710
- ['#4c4c4c','dark','contentbuilder/themes/dark-gray.css'],
157711
- ['#ed2828','dark','contentbuilder/themes/dark-red.css'],
157712
- ['#006add','colored','contentbuilder/themes/colored-blue8.css'],
157713
- ['#ff7723','colored','contentbuilder/themes/colored-orange3.css'],
157714
- ['#ff5722','colored','contentbuilder/themes/colored-red5.css'],
157715
- ['#f13535','colored','contentbuilder/themes/colored-red4.css'],
157716
- ['#00bd79','colored','contentbuilder/themes/colored-green5.css'],
157717
- ['#557ae9','colored','contentbuilder/themes/colored-blue7.css'],
157718
- ['#fb3279','colored','contentbuilder/themes/colored-pink4.css'],*/
157780
+
157781
+ /*
157782
+ themes: [
157783
+ ['#ffffff','',''],
157784
+ ['#282828','dark','contentbuilder/themes/dark.css'],
157719
157785
  ],
157786
+ */
157720
157787
  backgroundColor: '#f1f1f1',
157721
157788
  imageselect: '',
157722
157789
  fileselect: '',
@@ -157751,6 +157818,27 @@ class ContentBox {
157751
157818
  audioSelectMaxWidth: '1600px',
157752
157819
  mediaSelectMaxWidth: '1600px',
157753
157820
  otherSelectMaxWidth: '1600px',
157821
+
157822
+ /*
157823
+ imageSelectWidth: '100%',
157824
+ imageSelectHeight: '90vh',
157825
+ fileSelectWidth: '100%',
157826
+ fileSelectHeight: '90vh',
157827
+ videoSelectWidth: '100%',
157828
+ videoSelectHeight: '90vh',
157829
+ audioSelectWidth: '100%',
157830
+ audioSelectHeight: '90vh',
157831
+ mediaSelectWidth: '100%',
157832
+ mediaSelectHeight: '90vh',
157833
+ otherSelectWidth: '100%',
157834
+ otherSelectHeight: '90vh',
157835
+ imageSelectMaxWidth: '90vw',
157836
+ fileSelectMaxWidth: '90vw',
157837
+ videoSelectMaxWidth: '90vw',
157838
+ audioSelectMaxWidth: '90vw',
157839
+ mediaSelectMaxWidth: '90vw',
157840
+ otherSelectMaxWidth: '90vw',
157841
+ */
157754
157842
  assetPanelFullScreen: false,
157755
157843
  codeEditorWidth: '80vw',
157756
157844
  codeEditorHeight: '80vh',
@@ -160882,6 +160970,67 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
160882
160970
  this.settings.videoselect = this.settings.videoSelect;
160883
160971
  } else if (this.settings.videoselect !== '') {
160884
160972
  this.settings.videoSelect = this.settings.videoselect;
160973
+ }
160974
+
160975
+ if (this.settings.filePicker) {
160976
+ this.settings.imageSelect = this.settings.filePicker;
160977
+ this.settings.videoSelect = this.settings.filePicker;
160978
+ this.settings.audioSelect = this.settings.filePicker;
160979
+ this.settings.fileSelect = this.settings.filePicker;
160980
+ this.settings.mediaSelect = this.settings.filePicker; // this.settings.otherSelect = this.settings.filePicker; // this enables additional selector button on link dialog
160981
+ // backward compatible
160982
+
160983
+ this.settings.imageselect = this.settings.filePicker;
160984
+ this.settings.fileselect = this.settings.filePicker;
160985
+ this.settings.videoselect = this.settings.filePicker;
160986
+ }
160987
+
160988
+ const assetBasePath = this.settings.assetBasePath; // if set, must end with /
160989
+
160990
+ if (assetBasePath !== undefined) {
160991
+ this.settings.iframeSrc = settings.iframeSrc || `${assetBasePath}blank.html`; // Base path for general assets
160992
+
160993
+ this.settings.assetPath = settings.assetPath || `${assetBasePath}assets/`; // Font assets path
160994
+
160995
+ this.settings.fontAssetPath = settings.fontAssetPath || `${assetBasePath}assets/fonts/`; // Snippet file and related paths
160996
+
160997
+ this.settings.snippetUrl = settings.snippetUrl || `${assetBasePath}assets/minimalist-blocks/content.js`; // Full URL to snippet file
160998
+
160999
+ this.settings.snippetPath = settings.snippetPath || `${assetBasePath}assets/minimalist-blocks/`; // Base path for images and resources
161000
+
161001
+ this.settings.snippetPathReplace = settings.snippetPathReplace || ['assets/minimalist-blocks/', `${assetBasePath}assets/minimalist-blocks/`]; // Replace local image paths with remote URLs
161002
+ // Module and plugin paths
161003
+
161004
+ this.settings.modulePath = settings.modulePath || `${assetBasePath}assets/modules/`; // module files. Use local path to avoid CORS issues (e.g., public/assets/modules/)
161005
+
161006
+ this.settings.pluginPath = settings.pluginPath || `${assetBasePath}contentbuilder/`; // plugin files
161007
+ // Typography styles path
161008
+
161009
+ this.settings.contentStylePath = settings.contentStylePath || `${assetBasePath}assets/styles/`; // Templates path
161010
+
161011
+ this.settings.templates = settings.templates || [{
161012
+ url: `${assetBasePath}assets/templates-simple/templates.js`,
161013
+ path: `${assetBasePath}assets/templates-simple/`,
161014
+ pathReplace: [],
161015
+ numbering: true,
161016
+ showNumberOnHover: true
161017
+ }, {
161018
+ url: `${assetBasePath}assets/templates-quick/templates.js`,
161019
+ path: `${assetBasePath}assets/templates-quick/`,
161020
+ pathReplace: [],
161021
+ numbering: true,
161022
+ showNumberOnHover: true
161023
+ }, {
161024
+ url: `${assetBasePath}assets/templates-animated/templates.js`,
161025
+ path: `${assetBasePath}assets/templates-animated/`,
161026
+ pathReplace: [],
161027
+ numbering: true,
161028
+ showNumberOnHover: true
161029
+ }]; // Path adjustments for Form Builder
161030
+
161031
+ 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`;
161032
+ this.settings.exampleVideoUrl = settings.exampleVideoUrl || `${assetBasePath}assets/formfiles/ai-thhyR.mp4`;
161033
+ this.settings.exampleAudioUrl = settings.exampleAudioUrl || `${assetBasePath}assets/formfiles/ai-3EVMb.wav`;
160885
161034
  } // if(this.settings.largerImageHandler!=='') {
160886
161035
  // this.settings.mediaHandler = this.settings.largerImageHandler;
160887
161036
  // } else if(this.settings.mediaHandler!='') {
@@ -160926,10 +161075,6 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
160926
161075
 
160927
161076
  if (this.controlPanel) {
160928
161077
  this.controlpanel = new ControlPanel(this);
160929
- }
160930
-
160931
- if (!this.pageTemplate) {
160932
- this.pageTemplate = this.util.getPageTemplate(this.framework);
160933
161078
  } // IFRAME
160934
161079
 
160935
161080
 
@@ -161545,6 +161690,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
161545
161690
  onThemeChange: () => {
161546
161691
  this.refreshUIStyle();
161547
161692
  },
161693
+ filePicker: this.settings.filePicker,
161548
161694
  fileSelect: this.settings.fileSelect,
161549
161695
  imageSelect: this.settings.imageSelect,
161550
161696
  videoSelect: this.settings.videoSelect,
@@ -165069,7 +165215,14 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
165069
165215
  }
165070
165216
 
165071
165217
  export(options = {}, shortenOutput = false) {
165072
- let pageTemplate = this.pageTemplate;
165218
+ let pageTemplate;
165219
+
165220
+ if (this.pageTemplate) {
165221
+ pageTemplate = this.pageTemplate;
165222
+ } else {
165223
+ pageTemplate = this.util.getPageTemplate(this.framework, options);
165224
+ }
165225
+
165073
165226
  let output = ''; // [%CONTENT%]
165074
165227
 
165075
165228
  this.cleanupUnused();