@innovastudio/contentbuilder 1.5.155 → 1.5.157

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
@@ -330,5 +330,6 @@ declare class ContentBuilder {
330
330
  print(): void;
331
331
 
332
332
  generateImage(prompt: string, callback?: () => void): void;
333
+ openFilePicker(type?: string, callback?: () => void): void;
333
334
  }
334
335
  export default ContentBuilder;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.155",
4
+ "version": "1.5.157",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -3974,7 +3974,9 @@ button:focus-visible {
3974
3974
  box-shadow: none;
3975
3975
  }
3976
3976
  #_cbhtml input[type=text],
3977
- .is-ui input[type=text] {
3977
+ #_cbhtml input[type=number],
3978
+ .is-ui input[type=text],
3979
+ .is-ui input[type=number] {
3978
3980
  width: 100%;
3979
3981
  height: 43px;
3980
3982
  box-sizing: border-box;
@@ -3992,14 +3994,20 @@ button:focus-visible {
3992
3994
  background-color: #f6f6f6;
3993
3995
  }
3994
3996
  #_cbhtml input[type=text]:focus,
3995
- .is-ui input[type=text]:focus {
3997
+ #_cbhtml input[type=number]:focus,
3998
+ .is-ui input[type=text]:focus,
3999
+ .is-ui input[type=number]:focus {
3996
4000
  outline: #3e93f7 2px solid;
3997
4001
  outline-offset: -2px;
3998
4002
  box-shadow: none;
3999
4003
  }
4000
4004
  #_cbhtml input[type=text] [type=checkbox], #_cbhtml input[type=text] [type=radio],
4005
+ #_cbhtml input[type=number] [type=checkbox],
4006
+ #_cbhtml input[type=number] [type=radio],
4001
4007
  .is-ui input[type=text] [type=checkbox],
4002
- .is-ui input[type=text] [type=radio] {
4008
+ .is-ui input[type=text] [type=radio],
4009
+ .is-ui input[type=number] [type=checkbox],
4010
+ .is-ui input[type=number] [type=radio] {
4003
4011
  position: relative;
4004
4012
  opacity: 1;
4005
4013
  margin-top: 0;
@@ -14481,6 +14481,8 @@ class HtmlUtil {
14481
14481
  }
14482
14482
  util.clearControls(); // NEW
14483
14483
 
14484
+ // Re-init plugins
14485
+ if (this.builder.win.builderRuntime) this.builder.win.builderRuntime.reinitialize();
14484
14486
  this.builder.hideModal(modal);
14485
14487
  }
14486
14488
  viewHtmlExternal() {
@@ -15027,6 +15029,34 @@ class HtmlUtil {
15027
15029
  elm.innerHTML = '';
15028
15030
  });
15029
15031
  }
15032
+
15033
+ // Clean all interactive components
15034
+ const components = tmp.querySelectorAll('[data-cb-type]');
15035
+ components.forEach(element => {
15036
+ const original = element.getAttribute('data-cb-original-content');
15037
+ if (original) {
15038
+ // Restore original HTML
15039
+ element.innerHTML = original;
15040
+
15041
+ // Remove runtime-added attributes
15042
+ element.removeAttribute('data-cb-original-content');
15043
+
15044
+ // element.removeAttribute('data-cb-logo-loop-initialized');
15045
+
15046
+ Array.from(element.attributes).forEach(attr => {
15047
+ const name = attr.name;
15048
+ // Remove any attribute that starts with "data-cb-" and ends with "-initialized"
15049
+ if (name.startsWith('data-cb-') && name.endsWith('-initialized')) {
15050
+ element.removeAttribute(name);
15051
+ }
15052
+ });
15053
+ element.removeAttribute('data-cb-editmode');
15054
+
15055
+ // Remove runtime-added classes
15056
+ const type = element.getAttribute('data-cb-type');
15057
+ element.classList.remove(`cb-${type}`);
15058
+ }
15059
+ });
15030
15060
  html = '';
15031
15061
  if (multiple) {
15032
15062
  //ContentBox
@@ -15882,7 +15912,7 @@ const prepareSvgIcons = builder => {
15882
15912
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
15883
15913
  <path d="M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2"></path>
15884
15914
  </symbol>
15885
- <symbol id="icon-folder" viewBox="0 0 24 24" stroke-width="1" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
15915
+ <symbol id="icon-folder" viewBox="0 0 24 24" stroke-width="1.4" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
15886
15916
  <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
15887
15917
  <path d="M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2.5"></path>
15888
15918
  <path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"></path>
@@ -52664,6 +52694,9 @@ class Element$1 {
52664
52694
  subblock = true;
52665
52695
  }
52666
52696
  }
52697
+ if (elm.closest('[data-cb-type]')) {
52698
+ customcode = true;
52699
+ }
52667
52700
  if (!customcode && !noedit && !_protected || subblock) {
52668
52701
  //previously this is commented: && !noedit && !_protected
52669
52702
 
@@ -62306,6 +62339,7 @@ class ElementTool {
62306
62339
  let elm = this.builder.activeElement;
62307
62340
  if (!elm) return;
62308
62341
  if (elm.closest('.is-dock')) return;
62342
+ if (elm.closest('[data-cb-type]')) return;
62309
62343
  let top, left;
62310
62344
  if (!this.builder.iframe) {
62311
62345
  top = elm.getBoundingClientRect().top + window.pageYOffset;
@@ -97797,6 +97831,9 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
97797
97831
  }
97798
97832
  });
97799
97833
  }
97834
+ openFilePicker(type, callback) {
97835
+ this.openAssetSelect(type, callback);
97836
+ }
97800
97837
  openAssetSelect(targetAssetType, callback, defaultValue) {
97801
97838
  const inpUrl = document.createElement('input');
97802
97839