@innovastudio/contentbuilder 1.3.73 → 1.3.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.3.73",
4
+ "version": "1.3.75",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -144,6 +144,8 @@ button:focus-visible {
144
144
  left: 0;
145
145
  background: rgba(0, 0, 0, 0.03);
146
146
  transform-origin: top left;
147
+ left: 5%;
148
+ top: -25%;
147
149
  }
148
150
 
149
151
  #_cbhtml .snippet-item {
@@ -21948,14 +21948,14 @@ const renderSnippetPanel = builder => {
21948
21948
 
21949
21949
  builder.sectionDropSetup();
21950
21950
  },
21951
- onMove: evt => {
21951
+ onMove: () => {
21952
21952
  let emptyinfo = builder.doc.querySelector('.row-add-initial'); // if there is empty info, remove it during snippet drag drop
21953
21953
  // if(emptyinfo) emptyinfo.parentNode.removeChild(emptyinfo);
21954
21954
 
21955
- if (emptyinfo) emptyinfo.style.display = 'none';
21956
- if (builder.sortableOnPage) if (evt.related.getBoundingClientRect().top < 0 || evt.related.getBoundingClientRect().top > window.innerHeight) {
21957
- return false;
21958
- }
21955
+ if (emptyinfo) emptyinfo.style.display = 'none'; // if(builder.sortableOnPage) if(evt.related.getBoundingClientRect().top<0 ||
21956
+ // evt.related.getBoundingClientRect().top>window.innerHeight) {
21957
+ // return false;
21958
+ // }
21959
21959
  },
21960
21960
  onStart: () => {
21961
21961
  // Remove .builder-active during dragging (because this class makes rows have border-right/left 120px)
@@ -76024,15 +76024,14 @@ class ContentBuilder {
76024
76024
  scroll: true,
76025
76025
  // invertSwap: true, /* https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#swap-threshold */
76026
76026
  group: 'shared',
76027
- direction: 'dummy',
76028
- // works well with border-right hack & empty-info
76027
+ // direction: 'dummy', // works well with border-right hack & empty-info
76029
76028
  animation: 300,
76030
76029
  handle: '.row-handle',
76031
76030
  // swapThreshold: 0.1, // this cause drag drop snippet sometimes difficult
76032
76031
  // invertedSwapThreshold: 0.1,
76033
76032
  sort: true,
76034
76033
  //new
76035
- swapThreshold: 0.5,
76034
+ // swapThreshold: 0.5,
76036
76035
  onChoose: () => {
76037
76036
  // Get zoom (scale) value
76038
76037
  let scale;
@@ -76064,6 +76063,8 @@ class ContentBuilder {
76064
76063
  if (oldCss) oldCss.parentNode.removeChild(oldCss);
76065
76064
  this.builderStuff.insertAdjacentHTML('afterbegin', newCss);
76066
76065
  }
76066
+
76067
+ this.sectionDropSetup(); // enable drop as section (ContentBox)
76067
76068
  },
76068
76069
  onStart: () => {
76069
76070
  this.uo.saveForUndo(); // Even if cancelled, saveForUndo will make sure not to save if there is no change
@@ -76072,6 +76073,8 @@ class ContentBuilder {
76072
76073
  },
76073
76074
  onEnd: () => {
76074
76075
  this.util.checkEmpty(); // for multiple instances check
76076
+
76077
+ if (this.sortableOnPage) this.sortableOnPage.destroy(); // enable drop as section (ContentBox)
76075
76078
  },
76076
76079
  onAdd: evt => {
76077
76080
  var itemEl = evt.item;
@@ -78557,8 +78560,8 @@ class ContentBuilder {
78557
78560
  animation: 150,
78558
78561
  sort: true,
78559
78562
  // draggable: '.dummy',
78560
- swapThreshold: 0.1,
78561
- invertSwap: true,
78563
+ // swapThreshold: 0.1,
78564
+ // invertSwap: true,
78562
78565
  onAdd: evt => {
78563
78566
  var itemEl = evt.item;
78564
78567