@innovastudio/contentbuilder 1.4.106 → 1.4.108
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
    
    
| @@ -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();
         | 
| @@ -78983,6 +78984,7 @@ class ContentBuilder { | |
| 78983 78984 | 
             
                  imageEmbed: true,
         | 
| 78984 78985 | 
             
                  imageselect: '',
         | 
| 78985 78986 | 
             
                  fileselect: '',
         | 
| 78987 | 
            +
                  videoselect: '',
         | 
| 78986 78988 | 
             
                  imageSelect: '',
         | 
| 78987 78989 | 
             
                  fileSelect: '',
         | 
| 78988 78990 | 
             
                  videoSelect: '',
         | 
| @@ -82024,6 +82026,15 @@ class ContentBuilder { | |
| 82024 82026 | 
             
                if (this.viewImageUrl) {
         | 
| 82025 82027 | 
             
                  src = this.viewImageUrl + '?url=' + src;
         | 
| 82026 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 | 
            +
                }
         | 
| 82027 82038 | 
             
                const width = 512;
         | 
| 82028 82039 | 
             
                const height = 512;
         | 
| 82029 82040 | 
             
                const img = new Image();
         | 
| @@ -82051,7 +82062,7 @@ class ContentBuilder { | |
| 82051 82062 | 
             
                    body: JSON.stringify(messages)
         | 
| 82052 82063 | 
             
                  });
         | 
| 82053 82064 | 
             
                  const result = await response.json();
         | 
| 82054 | 
            -
                  callback( | 
| 82065 | 
            +
                  callback(result.url);
         | 
| 82055 82066 | 
             
                };
         | 
| 82056 82067 | 
             
              }
         | 
| 82057 82068 | 
             
              async generateImage(prompt, callback) {
         | 
| @@ -82095,7 +82106,7 @@ class ContentBuilder { | |
| 82095 82106 | 
             
                  if (this.imageAutoUpscale) {
         | 
| 82096 82107 | 
             
                    this.upscaleImage(imageUrl, callback);
         | 
| 82097 82108 | 
             
                  } else {
         | 
| 82098 | 
            -
                    callback( | 
| 82109 | 
            +
                    callback(imageUrl);
         | 
| 82099 82110 | 
             
                  }
         | 
| 82100 82111 | 
             
                } catch (error) {
         | 
| 82101 82112 | 
             
                  if (error.name === 'AbortError') ; else {
         |