@innovastudio/contentbox 1.5.85 → 1.5.87

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.5.85",
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.106",
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();
@@ -94101,6 +94102,7 @@ class ContentBuilder {
94101
94102
  imageEmbed: true,
94102
94103
  imageselect: '',
94103
94104
  fileselect: '',
94105
+ videoselect: '',
94104
94106
  imageSelect: '',
94105
94107
  fileSelect: '',
94106
94108
  videoSelect: '',
@@ -97142,6 +97144,15 @@ class ContentBuilder {
97142
97144
  if (this.viewImageUrl) {
97143
97145
  src = this.viewImageUrl + '?url=' + src;
97144
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
+ }
97145
97156
  const width = 512;
97146
97157
  const height = 512;
97147
97158
  const img = new Image();
@@ -97169,7 +97180,7 @@ class ContentBuilder {
97169
97180
  body: JSON.stringify(messages)
97170
97181
  });
97171
97182
  const result = await response.json();
97172
- callback([result.url]);
97183
+ callback(result.url);
97173
97184
  };
97174
97185
  }
97175
97186
  async generateImage(prompt, callback) {
@@ -97213,7 +97224,7 @@ class ContentBuilder {
97213
97224
  if (this.imageAutoUpscale) {
97214
97225
  this.upscaleImage(imageUrl, callback);
97215
97226
  } else {
97216
- callback([imageUrl]);
97227
+ callback(imageUrl);
97217
97228
  }
97218
97229
  } catch (error) {
97219
97230
  if (error.name === 'AbortError') ; else {
@@ -117868,7 +117879,8 @@ class ContentBox {
117868
117879
  // upscaleImageUrl: '', // To enable AI image generation
117869
117880
  // controlNetUrl: '',
117870
117881
  // saveTextUrl: '',
117871
- // viewImageUrl: '',
117882
+ // viewUrl: '',
117883
+ // viewFileUrl: '',
117872
117884
  // imageModel: 'realistic-vision-v3',
117873
117885
  // imageNegativePrompt: '',
117874
117886
  // imageSteps: 25,
@@ -118440,7 +118452,8 @@ Add an image for each feature.`, 'Revise the headline, paragraph, and all the te
118440
118452
  upscaleImageUrl: this.settings.upscaleImageUrl,
118441
118453
  controlNetUrl: this.settings.controlNetUrl,
118442
118454
  saveTextUrl: this.settings.saveTextUrl,
118443
- viewImageUrl: this.settings.viewImageUrl,
118455
+ viewUrl: this.settings.viewUrl,
118456
+ viewFileUrl: this.settings.viewFileUrl,
118444
118457
  imageModel: this.settings.imageModel,
118445
118458
  imageNegativePrompt: this.settings.imageNegativePrompt,
118446
118459
  imageSteps: this.settings.imageSteps,
@@ -120005,9 +120018,9 @@ Add an image for each feature.`, 'Revise the headline, paragraph, and all the te
120005
120018
  let contentStylePath = this.settings.contentStylePath; //Add contentCss
120006
120019
 
120007
120020
  if (contentCss) {
120008
- let exist = false;
120021
+ let exist = false; // let links = window.parent._cb.doc.getElementsByTagName('link');
120009
120022
 
120010
- let links = window.parent._cb.doc.getElementsByTagName('link');
120023
+ let links = this.doc.getElementsByTagName('link');
120011
120024
 
120012
120025
  for (let i = 0; i < links.length; i++) {
120013
120026
  let src = links[i].href.toLowerCase();