@innovastudio/contentbox 1.5.86 → 1.5.87

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/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.86",
4
+ "version": "1.5.87",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "files": [
@@ -18,6 +18,7 @@
18
18
  "author": "",
19
19
  "license": "SEE LICENSE IN license.txt",
20
20
  "devDependencies": {
21
+ "@aws-sdk/client-s3": "^3.414.0",
21
22
  "@babel/core": "^7.15.0",
22
23
  "@babel/plugin-proposal-class-properties": "^7.14.5",
23
24
  "@babel/plugin-transform-runtime": "^7.17.0",
@@ -51,7 +52,7 @@
51
52
  "ws": "^8.13.0"
52
53
  },
53
54
  "dependencies": {
54
- "@innovastudio/contentbuilder": "^1.4.107",
55
+ "@innovastudio/contentbuilder": "^1.4.108",
55
56
  "js-beautify": "^1.14.0"
56
57
  }
57
58
  }
@@ -64949,6 +64949,7 @@ class Image$1 {
64949
64949
  });
64950
64950
  document.querySelector('.moveable-control-box').style.display = 'none';
64951
64951
  imageResizer.addEventListener('click', () => {
64952
+ if (!this.builder.activeImage) return;
64952
64953
  this.builder.activeImage.click();
64953
64954
  this.repositionImageTool();
64954
64955
  this.builder.elmTool.repositionElementTool();
@@ -97143,6 +97144,15 @@ class ContentBuilder {
97143
97144
  if (this.viewImageUrl) {
97144
97145
  src = this.viewImageUrl + '?url=' + src;
97145
97146
  }
97147
+ if (src.includes('http') && this.viewFileUrl) {
97148
+ /*
97149
+ Can be from:
97150
+ External site,
97151
+ ex:
97152
+ http://bucket-name.s3-website-us-east-1.amazonaws.com/readme.txt
97153
+ */
97154
+ src = this.viewFileUrl + '?url=' + src;
97155
+ }
97146
97156
  const width = 512;
97147
97157
  const height = 512;
97148
97158
  const img = new Image();
@@ -97170,7 +97180,7 @@ class ContentBuilder {
97170
97180
  body: JSON.stringify(messages)
97171
97181
  });
97172
97182
  const result = await response.json();
97173
- callback([result.url]);
97183
+ callback(result.url);
97174
97184
  };
97175
97185
  }
97176
97186
  async generateImage(prompt, callback) {
@@ -97214,7 +97224,7 @@ class ContentBuilder {
97214
97224
  if (this.imageAutoUpscale) {
97215
97225
  this.upscaleImage(imageUrl, callback);
97216
97226
  } else {
97217
- callback([imageUrl]);
97227
+ callback(imageUrl);
97218
97228
  }
97219
97229
  } catch (error) {
97220
97230
  if (error.name === 'AbortError') ; else {
@@ -117869,7 +117879,8 @@ class ContentBox {
117869
117879
  // upscaleImageUrl: '', // To enable AI image generation
117870
117880
  // controlNetUrl: '',
117871
117881
  // saveTextUrl: '',
117872
- // viewImageUrl: '',
117882
+ // viewUrl: '',
117883
+ // viewFileUrl: '',
117873
117884
  // imageModel: 'realistic-vision-v3',
117874
117885
  // imageNegativePrompt: '',
117875
117886
  // imageSteps: 25,
@@ -118441,7 +118452,8 @@ Add an image for each feature.`, 'Revise the headline, paragraph, and all the te
118441
118452
  upscaleImageUrl: this.settings.upscaleImageUrl,
118442
118453
  controlNetUrl: this.settings.controlNetUrl,
118443
118454
  saveTextUrl: this.settings.saveTextUrl,
118444
- viewImageUrl: this.settings.viewImageUrl,
118455
+ viewUrl: this.settings.viewUrl,
118456
+ viewFileUrl: this.settings.viewFileUrl,
118445
118457
  imageModel: this.settings.imageModel,
118446
118458
  imageNegativePrompt: this.settings.imageNegativePrompt,
118447
118459
  imageSteps: this.settings.imageSteps,