@innovastudio/contentbox 1.6.167 → 1.6.169

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.
@@ -10321,12 +10321,17 @@ class Text {
10321
10321
  const anchorNode = selection.anchorNode;
10322
10322
  if (!anchorNode) return false;
10323
10323
  let container = anchorNode.nodeType !== Node.TEXT_NODE && anchorNode.nodeType !== Node.COMMENT_NODE ? anchorNode : anchorNode.parentElement;
10324
+
10325
+ if (container && container.closest('.is-overlay') && this.builder.controlpanel.activeElement) {
10326
+ return this.builder.controlpanel.activeElement; // container => is-overlay when drag & drop bloxk
10327
+ }
10324
10328
  /*
10325
10329
  There is a strange behavior that when clicking an icon i.icon and then clicking its div wrapper,
10326
10330
  the window.getSelection stays on the icon, not the div.
10327
10331
  To fix this, we check icon selection and compare it with the actual clicked element
10328
10332
  */
10329
10333
 
10334
+
10330
10335
  if (container && container.classList.contains('icon') && this.builder.editor.inspectedElement) {
10331
10336
  if (container !== this.builder.editor.inspectedElement) {
10332
10337
  container = this.builder.editor.inspectedElement;
@@ -12327,7 +12332,7 @@ class SettingsUIGenerator$1 {
12327
12332
 
12328
12333
  if (!plugin || !plugin.settings) {
12329
12334
  // console.warn(`Plugin "${pluginName}" has no settings schema`);
12330
- return this.createEmptyForm();
12335
+ if (!plugin.editor) return this.createEmptyForm();
12331
12336
  }
12332
12337
 
12333
12338
  const form = document.createElement('div');
@@ -13812,41 +13817,43 @@ class PanelBox {
13812
13817
  </div>
13813
13818
  </div>
13814
13819
 
13815
- <div class="flex">
13816
- <div class="mr-8">
13817
- <div class="label mt-3">${out('Background Color')}:</div>
13818
- <div class="group">
13819
- <button title="${out('Color')}" class="btn-color is-btn-color"></button>
13820
+ <div class="box-bg-settings">
13821
+ <div class="flex">
13822
+ <div class="mr-8">
13823
+ <div class="label mt-3">${out('Background Color')}:</div>
13824
+ <div class="group">
13825
+ <button title="${out('Color')}" class="btn-color is-btn-color"></button>
13826
+ </div>
13820
13827
  </div>
13821
- </div>
13822
- <div>
13823
- <div class="label mt-3">${out('Gradient')}:</div>
13824
- <div class="group">
13825
- <button title="${out('Gradient')}" class="btn-gradient is-btn-color"></button>
13828
+ <div>
13829
+ <div class="label mt-3">${out('Gradient')}:</div>
13830
+ <div class="group">
13831
+ <button title="${out('Gradient')}" class="btn-gradient is-btn-color"></button>
13832
+ </div>
13826
13833
  </div>
13827
13834
  </div>
13828
- </div>
13829
13835
 
13830
- <div class="label mt-3">${out('Background Image')}:</div>
13836
+ <div class="label mt-3">${out('Background Image')}:</div>
13831
13837
 
13832
- <div class="asset-preview"></div>
13838
+ <div class="asset-preview"></div>
13833
13839
 
13834
- <div class="imagesource mt-1 mb-1">
13835
- <input type="text" class="inp-src">
13836
- </div>
13840
+ <div class="imagesource mt-1 mb-1">
13841
+ <input type="text" class="inp-src">
13842
+ </div>
13837
13843
 
13838
- <div class="group mt-2">
13839
- <input class="inp-file" type="file" accept="image/*" style="display:none"/>
13840
- <button title="${out('Upload')}" class="btn-upload"><svg><use xlink:href="#icon-upload"></use></svg></button>
13841
- <button title="${out('Select')}" class="btn-asset"><svg><use xlink:href="#icon-folder"></use></svg></button>
13842
- <button title="${out('Adjust')}" class="btn-adjust"><svg style="width:14px;height:14px;"><use xlink:href="#icon-tool"></use></svg></button>
13843
- <button title="${out('Clear')}" class="btn-clear"><svg><use xlink:href="#icon-eraser"></use></svg></button>
13844
- </div>
13844
+ <div class="group mt-2">
13845
+ <input class="inp-file" type="file" accept="image/*" style="display:none"/>
13846
+ <button title="${out('Upload')}" class="btn-upload"><svg><use xlink:href="#icon-upload"></use></svg></button>
13847
+ <button title="${out('Select')}" class="btn-asset"><svg><use xlink:href="#icon-folder"></use></svg></button>
13848
+ <button title="${out('Adjust')}" class="btn-adjust"><svg style="width:14px;height:14px;"><use xlink:href="#icon-tool"></use></svg></button>
13849
+ <button title="${out('Clear')}" class="btn-clear"><svg><use xlink:href="#icon-eraser"></use></svg></button>
13850
+ </div>
13845
13851
 
13846
- <label class="label checkbox grayscale mt-2" style="margin-bottom:16px">
13847
- <input type="checkbox" class="chk-grayscale" />
13848
- <span>${out('Grayscale')}</span>
13849
- </label>
13852
+ <label class="label checkbox grayscale mt-2" style="margin-bottom:16px">
13853
+ <input type="checkbox" class="chk-grayscale" />
13854
+ <span>${out('Grayscale')}</span>
13855
+ </label>
13856
+ </div>
13850
13857
 
13851
13858
  <div class="defaulttextcolor">
13852
13859
  <div class="label mt-3">${out('Text Color')}:</div>
@@ -13886,7 +13893,7 @@ class PanelBox {
13886
13893
 
13887
13894
  </div>
13888
13895
 
13889
- <div class="submain box-plugin-settings">
13896
+ <div class="submain box-plugin-settings panel-plugin">
13890
13897
 
13891
13898
  <hr style="width: 100%;border-bottom: #ededed 2px solid;margin-top: 20px;">
13892
13899
 
@@ -15275,7 +15282,14 @@ class PanelBox {
15275
15282
 
15276
15283
  const divPluginSettings = panel.querySelector('.box-plugin-settings');
15277
15284
  this.divPluginSettings = divPluginSettings;
15278
- const runtime = this.builder.win.builderRuntime;
15285
+ const runtime = this.builder.win.builderRuntime; // Reset (can be changed by renderPluginSettings)
15286
+
15287
+ const divBgSettings = this.panel.querySelector('.box-bg-settings');
15288
+ divBgSettings.style.display = '';
15289
+ this.divBgSettings = divBgSettings;
15290
+ const divPanelTitle = this.panel.parentNode.querySelector('.part-title');
15291
+ divPanelTitle.style.display = '';
15292
+ this.divPanelTitle = divPanelTitle;
15279
15293
 
15280
15294
  if (overlayContent && runtime) {
15281
15295
  const currentElement = overlayContent.querySelector('[data-cb-type]');
@@ -15286,6 +15300,8 @@ class PanelBox {
15286
15300
  } else {
15287
15301
  divPluginSettings.style.display = 'none';
15288
15302
  }
15303
+ } else {
15304
+ divPluginSettings.style.display = 'none';
15289
15305
  }
15290
15306
  }
15291
15307
 
@@ -15300,6 +15316,21 @@ class PanelBox {
15300
15316
  const plugin = runtime.getPlugin(pluginName);
15301
15317
  if (!plugin) return;
15302
15318
  let displayName = out(plugin.displayName || plugin.name);
15319
+
15320
+ if (plugin.contentbox) {
15321
+ if (!plugin.contentbox.bg) {
15322
+ this.divBgSettings.style.display = 'none';
15323
+ }
15324
+
15325
+ if (!plugin.contentbox.text) {
15326
+ this.divDefaultTextColor.style.display = 'none';
15327
+ }
15328
+
15329
+ if (!plugin.contentbox.title) {
15330
+ this.divPanelTitle.style.display = 'none';
15331
+ }
15332
+ }
15333
+
15303
15334
  const divTitle = document.createElement('h3');
15304
15335
  divTitle.style.cssText = 'font-family: sans-serif;font-weight: 300;font-size: 20px;margin: 0 0 12px;';
15305
15336
  divTitle.innerText = displayName;
@@ -22721,8 +22752,8 @@ class SpacingContainer {
22721
22752
  <button title="110" data-topspacing="11">110</button>
22722
22753
  <button title="120" data-topspacing="12">120</button>
22723
22754
  <button title="140" data-topspacing="14">140</button>
22724
- <!--<button title="160" data-topspacing="16">160</button>
22725
- <button title="200" data-topspacing="20">200</button>-->
22755
+ <button title="160" data-topspacing="16">160</button>
22756
+ <button title="200" data-topspacing="20">200</button>
22726
22757
  <button title="${out('Clear')}" data-topspacing=""><svg><use xlink:href="#icon-eraser"></use></svg></button>
22727
22758
  </div>
22728
22759
 
@@ -22745,6 +22776,8 @@ class SpacingContainer {
22745
22776
  <button title="110" data-bottomspacing="11">110</button>
22746
22777
  <button title="120" data-bottomspacing="12">120</button>
22747
22778
  <button title="140" data-bottomspacing="14">140</button>
22779
+ <button title="160" data-bottomspacing="16">160</button>
22780
+ <button title="200" data-bottomspacing="20">200</button>
22748
22781
  <button title="${out('Clear')}" data-bottomspacing=""><svg><use xlink:href="#icon-eraser"></use></svg></button>
22749
22782
  </div>
22750
22783
 
@@ -22767,6 +22800,8 @@ class SpacingContainer {
22767
22800
  <button title="110" data-leftspacing="11">110</button>
22768
22801
  <button title="120" data-leftspacing="12">120</button>
22769
22802
  <button title="140" data-leftspacing="14">140</button>
22803
+ <button title="160" data-leftspacing="16">160</button>
22804
+ <button title="200" data-leftspacing="20">200</button>
22770
22805
  <button title="${out('Clear')}" data-leftspacing=""><svg><use xlink:href="#icon-eraser"></use></svg></button>
22771
22806
  </div>
22772
22807
 
@@ -22789,6 +22824,8 @@ class SpacingContainer {
22789
22824
  <button title="110" data-rightspacing="11">110</button>
22790
22825
  <button title="120" data-rightspacing="12">120</button>
22791
22826
  <button title="140" data-rightspacing="14">140</button>
22827
+ <button title="160" data-rightspacing="16">160</button>
22828
+ <button title="200" data-rightspacing="20">200</button>
22792
22829
  <button title="${out('Clear')}" data-rightspacing=""><svg><use xlink:href="#icon-eraser"></use></svg></button>
22793
22830
  </div>
22794
22831
  </div>
@@ -25245,7 +25282,7 @@ class Element$2 {
25245
25282
 
25246
25283
  getDeviceTarget(divTarget) {
25247
25284
  const btn = divTarget.querySelector('button.on');
25248
- return btn.getAttribute('data-device');
25285
+ if (btn) return btn.getAttribute('data-device');else return '';
25249
25286
  }
25250
25287
 
25251
25288
  realtimeVisibility(elm) {
@@ -26355,7 +26392,8 @@ class ControlPanel {
26355
26392
  this.panelRow = controlPanel.querySelector('.panel-row');
26356
26393
  this.panelContainer = controlPanel.querySelector('.panel-container');
26357
26394
  this.panelBlock = controlPanel.querySelector('.panel-block');
26358
- this.panelBox = controlPanel.querySelector('.panel-box');
26395
+ this.panelBox = controlPanel.querySelector('.panel-box'); // also has .panel-plugin inside
26396
+
26359
26397
  this.panelSection = controlPanel.querySelector('.panel-section');
26360
26398
  this.breadcrumb = controlPanel.querySelector('.part-breadcrumb');
26361
26399
  this.title = controlPanel.querySelector('.part-title');
@@ -27090,6 +27128,9 @@ class ControlPanel {
27090
27128
  } else if (element.classList.contains('ovl')) {
27091
27129
  element = element.parentNode.querySelector('iframe');
27092
27130
  this.activeElement = element;
27131
+ } else if (element.classList.contains('embed-responsive')) {
27132
+ element = element.parentNode.querySelector('iframe');
27133
+ this.activeElement = element;
27093
27134
  }
27094
27135
 
27095
27136
  if (element.closest('[data-html]') && !element.closest('[data-subblock]')) {
@@ -27120,7 +27161,7 @@ class ControlPanel {
27120
27161
  } else {
27121
27162
  if (element.querySelector('.icon') && element.childElementCount === 1) ;
27122
27163
 
27123
- if (element.closest('[data-cb-type]')) {
27164
+ if (element.closest('[data-cb-type]') && !element.closest('.is-subblock')) {
27124
27165
  const runtime = this.builder.win.builderRuntime;
27125
27166
 
27126
27167
  if (runtime) {
@@ -32508,6 +32549,7 @@ class Util$1 {
32508
32549
  }
32509
32550
 
32510
32551
  hideModal(modal) {
32552
+ if (!modal) return;
32511
32553
  this.builder.doc.activeElement.blur();
32512
32554
  document.activeElement.blur();
32513
32555
  // this.builder.doc.body.focus();
@@ -32916,13 +32958,24 @@ class Util$1 {
32916
32958
  element.click();
32917
32959
  }
32918
32960
  }
32961
+ let editingInsidePlugin = false;
32962
+ let elm = this.builder.activeElement;
32963
+ const plugin = elm.closest('[data-cb-type]');
32964
+ const subblock = elm.closest('.is-subblock');
32965
+ if (plugin && subblock) {
32966
+ editingInsidePlugin = true;
32967
+ }
32919
32968
  if (mode === 'elm') {
32920
32969
  let elm = this.builder.activeElement; // See elementtool.js line 195-196. // document.querySelector('.elm-active');
32921
32970
  if (!elm) return;
32922
32971
  this.builder.uo.saveForUndo();
32923
32972
  let element = elm;
32924
32973
  let newelement;
32925
- if (!element.nextElementSibling && !element.closest('[data-subblock]')) {
32974
+ const plugin = element.closest('[data-cb-type]');
32975
+ if (plugin) {
32976
+ element.insertAdjacentHTML('afterend', html);
32977
+ newelement = element.nextElementSibling;
32978
+ } else if (!element.nextElementSibling && !element.closest('[data-subblock]')) {
32926
32979
  // active element is div.display > p.
32927
32980
  let activeCol = this.builder.activeCol;
32928
32981
  let current;
@@ -32976,7 +33029,7 @@ class Util$1 {
32976
33029
  this.builder.opts.onRender();
32977
33030
 
32978
33031
  // Reinit after drag drop block
32979
- if (this.builder.win.builderRuntime) this.builder.win.builderRuntime.reinitialize();
33032
+ if (this.builder.win.builderRuntime && !editingInsidePlugin) this.builder.win.builderRuntime.reinitialize();
32980
33033
  setTimeout(() => {
32981
33034
  this.builder.makeSortable(this.builder.doc);
32982
33035
  }, 400);
@@ -42465,17 +42518,32 @@ class HtmlUtil {
42465
42518
  grid = element.querySelector('.grid-sortable');
42466
42519
  }
42467
42520
  element.removeAttribute('id');
42521
+
42522
+ // Clean index in sortable grid
42468
42523
  if (grid) {
42469
42524
  Array.from(grid.children).forEach(elm => {
42470
42525
  elm.removeAttribute('data-index');
42471
42526
  elm.removeAttribute('data-item-id');
42472
42527
  });
42473
42528
  }
42474
- const elms = element.querySelectorAll('[data-scroll], [data-scroll-once]');
42529
+
42530
+ // Clean data-edit-id in editable area
42531
+ let editables = element.querySelectorAll('.edit');
42532
+ editables.forEach(area => {
42533
+ area.removeAttribute('data-edit-id');
42534
+ });
42535
+ let elms = element.querySelectorAll('[data-scroll], [data-scroll-once]');
42475
42536
  elms.forEach(elm => {
42476
42537
  elm.removeAttribute('data-scroll');
42477
42538
  elm.removeAttribute('data-scroll-once');
42478
42539
  });
42540
+ elms = element.querySelectorAll('.elm-active, .icon-active');
42541
+ elms.forEach(elm => {
42542
+ elm.classList.remove('elm-active');
42543
+ elm.classList.remove('icon-active');
42544
+ });
42545
+ const oldEditables = element.querySelectorAll('[contenteditable="true"]');
42546
+ oldEditables.forEach(el => el.removeAttribute('contenteditable'));
42479
42547
  });
42480
42548
  html = '';
42481
42549
  if (multiple) {
@@ -74932,6 +75000,8 @@ class ButtonEditor {
74932
75000
  <span>${util.out('Padding Left/Right')}</span>:
74933
75001
  </div>
74934
75002
  <div class="flex flex-row" style="margin-top:5px">
75003
+ <button title="2" data-command="0" class="paddingx-command" style="margin-right:4px">0</button>
75004
+ <button title="2" data-command="1" class="paddingx-command" style="margin-right:4px">1</button>
74935
75005
  <button title="2" data-command="2" class="paddingx-command" style="margin-right:4px">2</button>
74936
75006
  <button title="3" data-command="3" class="paddingx-command" style="margin-right:4px">3</button>
74937
75007
  <button title="4" data-command="4" class="paddingx-command" style="margin-right:4px">4</button>
@@ -75437,6 +75507,12 @@ class ButtonEditor {
75437
75507
  const val = btn.getAttribute('data-command');
75438
75508
  const activeButton = this.builder.activeButton || this.builder.activeLinkButton || this.builder.activeLink;
75439
75509
  dom.removeClassesByPrefix(activeButton, 'px-');
75510
+ if (val === '0') {
75511
+ dom.addClass(activeButton, 'px-0');
75512
+ }
75513
+ if (val === '1') {
75514
+ dom.addClass(activeButton, 'px-1');
75515
+ }
75440
75516
  if (val === '2') {
75441
75517
  dom.addClass(activeButton, 'px-2');
75442
75518
  }
@@ -76504,6 +76580,144 @@ class ButtonEditor {
76504
76580
  bg: 'rgba(191, 245, 110, 1)',
76505
76581
  hoverBg: 'rgba(183, 236, 103, 1)'
76506
76582
  },
76583
+ // Square buttons
76584
+ {
76585
+ type: 'solid',
76586
+ shape: 'square',
76587
+ text: 'Read More',
76588
+ color: 'rgb(24, 24, 27)',
76589
+ bg: 'transparent',
76590
+ hoverBg: 'transparent',
76591
+ customClasses: 'underline px-0'
76592
+ }, {
76593
+ type: 'outline',
76594
+ shape: 'square',
76595
+ text: 'Read More'
76596
+ }, {
76597
+ type: 'solid',
76598
+ shape: 'square',
76599
+ text: 'Read More',
76600
+ color: 'rgb(24, 24, 27)',
76601
+ bg: 'rgb(240, 240, 241)',
76602
+ hoverBg: 'rgb(236, 236, 238)'
76603
+ }, {
76604
+ type: 'solid',
76605
+ shape: 'square',
76606
+ text: 'Read More',
76607
+ color: 'rgb(250, 250, 250)',
76608
+ bg: 'rgb(24, 24, 27)',
76609
+ hoverBg: 'rgb(63, 63, 70)'
76610
+ }, {
76611
+ type: 'outline',
76612
+ shape: 'square',
76613
+ text: 'Read More',
76614
+ color: 'rgb(250, 250, 250)',
76615
+ bg: 'transparent',
76616
+ hoverBg: 'transparent'
76617
+ }, {
76618
+ type: 'solid',
76619
+ shape: 'square',
76620
+ text: 'Read More',
76621
+ color: '#ffffff',
76622
+ bg: 'rgba(13, 151, 255, 1)',
76623
+ hoverBg: 'rgba(7, 138, 237, 1)'
76624
+ }, {
76625
+ type: 'solid',
76626
+ shape: 'square',
76627
+ text: 'Read More',
76628
+ color: '#ffffff',
76629
+ bg: '#3b82f6',
76630
+ hoverBg: 'rgba(47, 116, 228, 1)'
76631
+ }, {
76632
+ type: 'solid',
76633
+ shape: 'square',
76634
+ text: 'Read More',
76635
+ color: 'rgb(24, 24, 27)',
76636
+ bg: '#fff',
76637
+ hoverBg: 'rgba(248, 248, 250, 1)'
76638
+ },
76639
+ // Colors
76640
+ {
76641
+ type: 'solid',
76642
+ shape: 'square',
76643
+ size: 'medium',
76644
+ text: 'Read More',
76645
+ color: 'rgb(24, 24, 27)',
76646
+ bg: 'rgba(111, 235, 255, 1)',
76647
+ hoverBg: 'rgba(98, 230, 252, 1)'
76648
+ }, {
76649
+ type: 'solid',
76650
+ shape: 'square',
76651
+ size: 'medium',
76652
+ text: 'Read More',
76653
+ color: '#ffffff',
76654
+ bg: 'rgba(19, 166, 27, 1)',
76655
+ hoverBg: 'rgba(17, 155, 25, 1)'
76656
+ }, {
76657
+ type: 'solid',
76658
+ shape: 'square',
76659
+ size: 'medium',
76660
+ text: 'Read More',
76661
+ color: 'rgb(24, 24, 27)',
76662
+ bg: 'rgba(254, 235, 101, 1)',
76663
+ hoverBg: 'rgba(249, 229, 85, 1)'
76664
+ }, {
76665
+ type: 'solid',
76666
+ shape: 'square',
76667
+ size: 'medium',
76668
+ text: 'Read More',
76669
+ color: '#ffffff',
76670
+ bg: 'rgba(251, 45, 45, 1)',
76671
+ hoverBg: 'rgba(239, 38, 36, 1)'
76672
+ }, {
76673
+ type: 'solid',
76674
+ shape: 'square',
76675
+ size: 'medium',
76676
+ text: 'Read More',
76677
+ color: '#ffffff',
76678
+ bg: 'rgba(255, 122, 0, 1)',
76679
+ hoverBg: 'rgba(248, 109, 2, 1)'
76680
+ }, {
76681
+ type: 'solid',
76682
+ shape: 'square',
76683
+ size: 'medium',
76684
+ text: 'Read More',
76685
+ color: '#ffffff',
76686
+ bg: 'rgba(255, 68, 179, 1)',
76687
+ hoverBg: 'rgba(240, 46, 169, 1)'
76688
+ }, {
76689
+ type: 'solid',
76690
+ shape: 'square',
76691
+ size: 'medium',
76692
+ text: 'Read More',
76693
+ color: 'rgb(24, 24, 27)',
76694
+ bg: 'rgba(148, 251, 208, 1)',
76695
+ hoverBg: 'rgba(133, 244, 198, 1)'
76696
+ }, {
76697
+ type: 'solid',
76698
+ shape: 'square',
76699
+ size: 'medium',
76700
+ text: 'Read More',
76701
+ color: '#ffffff',
76702
+ bg: 'rgba(91, 73, 228, 1)',
76703
+ hoverBg: 'rgba(77, 59, 208, 1)'
76704
+ }, {
76705
+ type: 'solid',
76706
+ shape: 'square',
76707
+ size: 'medium',
76708
+ text: 'Read More',
76709
+ color: '#ffffff',
76710
+ bg: 'rgba(142, 67, 237, 1)',
76711
+ hoverBg: 'rgba(122, 52, 212, 1)'
76712
+ }, {
76713
+ type: 'solid',
76714
+ shape: 'square',
76715
+ size: 'medium',
76716
+ text: 'Read More',
76717
+ color: 'rgb(24, 24, 27)',
76718
+ bg: 'rgba(191, 245, 110, 1)',
76719
+ hoverBg: 'rgba(183, 236, 103, 1)'
76720
+ },
76507
76721
  // Rounded buttons - Small
76508
76722
  {
76509
76723
  type: 'solid',
@@ -77087,6 +77301,152 @@ class ButtonEditor {
77087
77301
  color: 'rgb(24, 24, 27)',
77088
77302
  bg: 'rgba(191, 245, 110, 1)',
77089
77303
  hoverBg: 'rgba(183, 236, 103, 1)'
77304
+ },
77305
+ // Square buttons - Large
77306
+ {
77307
+ type: 'solid',
77308
+ shape: 'square',
77309
+ size: 'large',
77310
+ text: 'Read More',
77311
+ color: 'rgb(24, 24, 27)',
77312
+ bg: 'transparent',
77313
+ hoverBg: 'transparent',
77314
+ customClasses: 'underline'
77315
+ }, {
77316
+ type: 'outline',
77317
+ shape: 'square',
77318
+ size: 'large',
77319
+ text: 'Read More'
77320
+ }, {
77321
+ type: 'solid',
77322
+ shape: 'square',
77323
+ size: 'large',
77324
+ text: 'Read More',
77325
+ color: 'rgb(24, 24, 27)',
77326
+ bg: 'rgb(240, 240, 241)',
77327
+ hoverBg: 'rgb(236, 236, 238)'
77328
+ }, {
77329
+ type: 'solid',
77330
+ shape: 'square',
77331
+ size: 'large',
77332
+ text: 'Read More',
77333
+ color: 'rgb(250, 250, 250)',
77334
+ bg: 'rgb(24, 24, 27)',
77335
+ hoverBg: 'rgb(63, 63, 70)'
77336
+ }, {
77337
+ type: 'outline',
77338
+ shape: 'square',
77339
+ size: 'large',
77340
+ text: 'Read More',
77341
+ color: 'rgb(250, 250, 250)',
77342
+ bg: 'transparent',
77343
+ hoverBg: 'transparent'
77344
+ }, {
77345
+ type: 'solid',
77346
+ shape: 'square',
77347
+ size: 'large',
77348
+ text: 'Read More',
77349
+ color: '#ffffff',
77350
+ bg: 'rgba(13, 151, 255, 1)',
77351
+ hoverBg: 'rgba(7, 138, 237, 1)'
77352
+ }, {
77353
+ type: 'solid',
77354
+ shape: 'square',
77355
+ size: 'large',
77356
+ text: 'Read More',
77357
+ color: '#ffffff',
77358
+ bg: '#3b82f6',
77359
+ hoverBg: 'rgba(47, 116, 228, 1)'
77360
+ }, {
77361
+ type: 'solid',
77362
+ shape: 'square',
77363
+ size: 'large',
77364
+ text: 'Read More',
77365
+ color: 'rgb(24, 24, 27)',
77366
+ bg: '#fff',
77367
+ hoverBg: 'rgba(248, 248, 250, 1)'
77368
+ },
77369
+ // Colors
77370
+ {
77371
+ type: 'solid',
77372
+ shape: 'square',
77373
+ size: 'large',
77374
+ text: 'Read More',
77375
+ color: 'rgb(24, 24, 27)',
77376
+ bg: 'rgba(111, 235, 255, 1)',
77377
+ hoverBg: 'rgba(98, 230, 252, 1)'
77378
+ }, {
77379
+ type: 'solid',
77380
+ shape: 'square',
77381
+ size: 'large',
77382
+ text: 'Read More',
77383
+ color: '#ffffff',
77384
+ bg: 'rgba(19, 166, 27, 1)',
77385
+ hoverBg: 'rgba(17, 155, 25, 1)'
77386
+ }, {
77387
+ type: 'solid',
77388
+ shape: 'square',
77389
+ size: 'large',
77390
+ text: 'Read More',
77391
+ color: 'rgb(24, 24, 27)',
77392
+ bg: 'rgba(254, 235, 101, 1)',
77393
+ hoverBg: 'rgba(249, 229, 85, 1)'
77394
+ }, {
77395
+ type: 'solid',
77396
+ shape: 'square',
77397
+ size: 'large',
77398
+ text: 'Read More',
77399
+ color: '#ffffff',
77400
+ bg: 'rgba(251, 45, 45, 1)',
77401
+ hoverBg: 'rgba(239, 38, 36, 1)'
77402
+ }, {
77403
+ type: 'solid',
77404
+ shape: 'square',
77405
+ size: 'large',
77406
+ text: 'Read More',
77407
+ color: '#ffffff',
77408
+ bg: 'rgba(255, 122, 0, 1)',
77409
+ hoverBg: 'rgba(248, 109, 2, 1)'
77410
+ }, {
77411
+ type: 'solid',
77412
+ shape: 'square',
77413
+ size: 'large',
77414
+ text: 'Read More',
77415
+ color: '#ffffff',
77416
+ bg: 'rgba(255, 68, 179, 1)',
77417
+ hoverBg: 'rgba(240, 46, 169, 1)'
77418
+ }, {
77419
+ type: 'solid',
77420
+ shape: 'square',
77421
+ size: 'large',
77422
+ text: 'Read More',
77423
+ color: 'rgb(24, 24, 27)',
77424
+ bg: 'rgba(148, 251, 208, 1)',
77425
+ hoverBg: 'rgba(133, 244, 198, 1)'
77426
+ }, {
77427
+ type: 'solid',
77428
+ shape: 'square',
77429
+ size: 'large',
77430
+ text: 'Read More',
77431
+ color: '#ffffff',
77432
+ bg: 'rgba(91, 73, 228, 1)',
77433
+ hoverBg: 'rgba(77, 59, 208, 1)'
77434
+ }, {
77435
+ type: 'solid',
77436
+ shape: 'square',
77437
+ size: 'large',
77438
+ text: 'Read More',
77439
+ color: '#ffffff',
77440
+ bg: 'rgba(142, 67, 237, 1)',
77441
+ hoverBg: 'rgba(122, 52, 212, 1)'
77442
+ }, {
77443
+ type: 'solid',
77444
+ shape: 'square',
77445
+ size: 'large',
77446
+ text: 'Read More',
77447
+ color: 'rgb(24, 24, 27)',
77448
+ bg: 'rgba(191, 245, 110, 1)',
77449
+ hoverBg: 'rgba(183, 236, 103, 1)'
77090
77450
  }];
77091
77451
  let templates = buttonConfigs.map(config => this.generateButton(config));
77092
77452
  const moreTemplates = [];
@@ -78202,7 +78562,7 @@ class SettingsUIGenerator {
78202
78562
  const plugin = this.runtime.getPlugin(pluginName);
78203
78563
  if (!plugin || !plugin.settings) {
78204
78564
  console.warn(`Plugin "${pluginName}" has no settings schema`);
78205
- return this.createEmptyForm();
78565
+ if (!plugin.editor) return this.createEmptyForm();
78206
78566
  }
78207
78567
  const form = document.createElement('div');
78208
78568
  form.className = 'cb-settings-form';
@@ -80962,8 +81322,10 @@ class Element$1 {
80962
81322
  subblock = true;
80963
81323
  }
80964
81324
  }
80965
- if (elm.closest('[data-cb-type]')) {
81325
+ const plugin = elm.closest('[data-cb-type]');
81326
+ if (plugin) {
80966
81327
  customcode = true;
81328
+ subblock = elm.closest('.is-subblock');
80967
81329
  }
80968
81330
  if (!customcode && !noedit && !_protected || subblock) {
80969
81331
  //previously this is commented: && !noedit && !_protected
@@ -85076,6 +85438,7 @@ class ColumnTool {
85076
85438
  }
85077
85439
  click(col) {
85078
85440
  this.columnTool = col.parentNode.querySelector('.is-col-tool');
85441
+ if (!this.columnTool) return;
85079
85442
  this.columnTool.style.left = col.offsetLeft + 'px';
85080
85443
  this.columnTool.style.top = col.offsetTop + 'px';
85081
85444
  const btnAdd = this.columnTool.querySelector('.cell-add');
@@ -90111,7 +90474,15 @@ class ElementTool {
90111
90474
  if (elm.closest('.is-subblock')) {
90112
90475
  subblock = true;
90113
90476
  }
90114
-
90477
+ const plugin = elm.closest('[data-cb-type]');
90478
+ if (plugin && subblock) {
90479
+ elm.remove();
90480
+ this.elementTool.style.display = 'none';
90481
+ //Trigger Change event
90482
+ this.builder.opts.onChange();
90483
+ if (this.builder.onSelectChange) this.builder.onSelectChange();
90484
+ return;
90485
+ }
90115
90486
  /*
90116
90487
  if(dom.hasClass(elm.parentNode, 'cell-active') || elm.parentNode.hasAttribute('data-subblock')) {
90117
90488
  // Level 1
@@ -90470,7 +90841,7 @@ class ElementTool {
90470
90841
  subblock = true;
90471
90842
  }
90472
90843
  const plugin = elm.closest('[data-cb-type]');
90473
- if ((customcode || noedit || _protected) && !subblock) ; else if (plugin) {
90844
+ if ((customcode || noedit || _protected) && !subblock) ; else if (plugin && !subblock) {
90474
90845
  activeElement = plugin;
90475
90846
  } else {
90476
90847
  const tagName = elm.tagName.toLowerCase();
@@ -125344,7 +125715,21 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
125344
125715
  newCol.children[0].click();
125345
125716
  }, 400);
125346
125717
  } else {
125347
- newCol.children[0].click(); // Focus on first element
125718
+ const spacer = newCol.querySelector('.spacer');
125719
+ setTimeout(() => {
125720
+ try {
125721
+ if (spacer) {
125722
+ if (newCol.parentNode.nextElementSibling) {
125723
+ const elm = newCol.parentNode.nextElementSibling.querySelector('h1,h2,h3,h4,h5,h6,p,img,[data-cb-type]');
125724
+ if (elm) elm.click();else newCol.click();
125725
+ }
125726
+ } else {
125727
+ newCol.children[0].click(); // Focus on first element
125728
+ }
125729
+ } catch (e) {
125730
+ // Do Nothing
125731
+ }
125732
+ }, 400);
125348
125733
  }
125349
125734
  }
125350
125735
  }
@@ -160300,7 +160685,7 @@ class ContentBox {
160300
160685
  'title': 'Sections'
160301
160686
  }, {
160302
160687
  'name': 'snippet',
160303
- 'title': 'Content Blocks'
160688
+ 'title': 'Blocks'
160304
160689
  }, {
160305
160690
  'name': 'typography',
160306
160691
  'title': 'Typography'
@@ -164672,7 +165057,15 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
164672
165057
 
164673
165058
  if (this.UIColor) {
164674
165059
  this.editor.setUIColor(this.UIColor.mode, this.UIColor.css);
164675
- }
165060
+ } // Prepare for tooltip
165061
+
165062
+
165063
+ const sidebar = this.builderStuff.querySelector('.is-sidebar');
165064
+ let elms = sidebar.querySelectorAll('[title]');
165065
+ Array.prototype.forEach.call(elms, elm => {
165066
+ elm.setAttribute('data-title', elm.getAttribute('title'));
165067
+ this.editor.tooltip.set(elm, 5, 3);
165068
+ });
164676
165069
  } // editorSetup
164677
165070
  // Live Preview
164678
165071