@innovastudio/contentbuilder 1.4.107 → 1.4.110

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.4.107",
4
+ "version": "1.4.110",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -49831,6 +49831,7 @@ class Image$1 {
49831
49831
  });
49832
49832
  document.querySelector('.moveable-control-box').style.display = 'none';
49833
49833
  imageResizer.addEventListener('click', () => {
49834
+ if (!this.builder.activeImage) return;
49834
49835
  this.builder.activeImage.click();
49835
49836
  this.repositionImageTool();
49836
49837
  this.builder.elmTool.repositionElementTool();
@@ -78192,7 +78193,7 @@ class Dictation {
78192
78193
  const btnScopeOthers = this.modalCommand.querySelector('.scope-others');
78193
78194
  const btnScopeImage = this.modalCommand.querySelector('.scope-image');
78194
78195
  btnScopeBlock.disabled = true;
78195
- if (this.builder.textToImageUrl) btnScopeImage.style.display = ''; // show generate image button
78196
+ if (this.builder.textToImageUrl && !this.builder.hideImageGeneration) btnScopeImage.style.display = ''; // show generate image button
78196
78197
 
78197
78198
  const assistModeBtns = modalCommand.querySelectorAll('.div-assistant-mode button');
78198
78199
  assistModeBtns.forEach(btn => {
@@ -82025,6 +82026,15 @@ class ContentBuilder {
82025
82026
  if (this.viewImageUrl) {
82026
82027
  src = this.viewImageUrl + '?url=' + src;
82027
82028
  }
82029
+ if (src.includes('http') && this.viewFileUrl) {
82030
+ /*
82031
+ Can be from:
82032
+ External site,
82033
+ ex:
82034
+ http://bucket-name.s3-website-us-east-1.amazonaws.com/readme.txt
82035
+ */
82036
+ src = this.viewFileUrl + '?url=' + src;
82037
+ }
82028
82038
  const width = 512;
82029
82039
  const height = 512;
82030
82040
  const img = new Image();
@@ -82052,7 +82062,7 @@ class ContentBuilder {
82052
82062
  body: JSON.stringify(messages)
82053
82063
  });
82054
82064
  const result = await response.json();
82055
- callback([result.url]);
82065
+ callback(result.url);
82056
82066
  };
82057
82067
  }
82058
82068
  async generateImage(prompt, callback) {
@@ -82096,7 +82106,7 @@ class ContentBuilder {
82096
82106
  if (this.imageAutoUpscale) {
82097
82107
  this.upscaleImage(imageUrl, callback);
82098
82108
  } else {
82099
- callback([imageUrl]);
82109
+ callback(imageUrl);
82100
82110
  }
82101
82111
  } catch (error) {
82102
82112
  if (error.name === 'AbortError') ; else {