@innovastudio/contentbuilder 1.5.125 → 1.5.127
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
@@ -304,10 +304,12 @@ declare class ContentBuilder {
|
|
304
304
|
openAIAssistant(): void;
|
305
305
|
closeAIAssistant(): void;
|
306
306
|
saveForUndo(): void;
|
307
|
-
selectAsset(s: string, f?: boolean)
|
308
|
-
|
309
|
-
|
310
|
-
|
307
|
+
selectAsset(s: string, f?: boolean): void;
|
308
|
+
hideModal(modal?: HTMLElement): void;
|
309
|
+
closeAsset(): void;
|
310
|
+
addBlock(html: string, blockContainer?: HTMLElement): void;
|
311
|
+
addPage(box?: HTMLElement): void;
|
312
|
+
setPageSize(s?: string): void;
|
311
313
|
openPageOptions(): void;
|
312
314
|
print(): void;
|
313
315
|
|
package/package.json
CHANGED
@@ -5489,12 +5489,12 @@ button:focus-visible {
|
|
5489
5489
|
align-items: center;
|
5490
5490
|
}
|
5491
5491
|
.is-tool.is-row-tool svg {
|
5492
|
-
fill: #fff
|
5493
|
-
color: #fff
|
5492
|
+
fill: #fff;
|
5493
|
+
color: #fff;
|
5494
5494
|
}
|
5495
5495
|
.is-tool.is-row-tool svg * {
|
5496
|
-
fill: #fff
|
5497
|
-
color: #fff
|
5496
|
+
fill: #fff;
|
5497
|
+
color: #fff;
|
5498
5498
|
}
|
5499
5499
|
.is-tool.is-row-tool .row-handle {
|
5500
5500
|
display: flex;
|
@@ -5559,14 +5559,14 @@ button:focus-visible {
|
|
5559
5559
|
background: rgba(255, 85, 4, 0.9);
|
5560
5560
|
}
|
5561
5561
|
.is-tool.is-col-tool svg {
|
5562
|
-
fill: #fff
|
5562
|
+
fill: #fff;
|
5563
5563
|
/* $ui-columntool-colored-button-svg-fill */
|
5564
|
-
color: #fff
|
5564
|
+
color: #fff;
|
5565
5565
|
}
|
5566
5566
|
.is-tool.is-col-tool svg * {
|
5567
|
-
fill: #fff
|
5567
|
+
fill: #fff;
|
5568
5568
|
/* $ui-columntool-colored-button-svg-fill */
|
5569
|
-
color: #fff
|
5569
|
+
color: #fff;
|
5570
5570
|
}
|
5571
5571
|
.is-tool.is-col-tool .cell-more svg {
|
5572
5572
|
width: 14px;
|
@@ -5655,6 +5655,11 @@ button:focus-visible {
|
|
5655
5655
|
}
|
5656
5656
|
.is-builder[gray] .is-tool.is-row-tool svg {
|
5657
5657
|
fill: #000;
|
5658
|
+
color: #000;
|
5659
|
+
}
|
5660
|
+
.is-builder[gray] .is-tool.is-row-tool svg * {
|
5661
|
+
fill: #000;
|
5662
|
+
color: #000;
|
5658
5663
|
}
|
5659
5664
|
.is-builder[gray] .is-tool.is-row-tool .row-handle {
|
5660
5665
|
display: flex;
|
@@ -5715,8 +5720,13 @@ button:focus-visible {
|
|
5715
5720
|
.is-builder[gray] .is-tool.is-col-tool svg {
|
5716
5721
|
width: 18px;
|
5717
5722
|
height: 18px;
|
5718
|
-
fill: #000
|
5723
|
+
fill: #000;
|
5719
5724
|
/* $ui-columntool-grayed-button-svg-fill */
|
5725
|
+
color: #000;
|
5726
|
+
}
|
5727
|
+
.is-builder[gray] .is-tool.is-col-tool svg * {
|
5728
|
+
fill: #000;
|
5729
|
+
color: #000;
|
5720
5730
|
}
|
5721
5731
|
.is-builder[gray] .is-tool.is-col-tool .cell-more svg {
|
5722
5732
|
width: 12px;
|
@@ -5823,7 +5833,7 @@ button:focus-visible {
|
|
5823
5833
|
}
|
5824
5834
|
.is-builder[clean] .is-tool.is-row-tool .row-grideditor {
|
5825
5835
|
display: block;
|
5826
|
-
background:
|
5836
|
+
background: rgba(216, 200, 6, 0.9);
|
5827
5837
|
}
|
5828
5838
|
.is-builder[clean] .is-tool.is-row-tool .row-grideditor svg {
|
5829
5839
|
fill: #000 !important;
|
@@ -5849,6 +5859,9 @@ button:focus-visible {
|
|
5849
5859
|
.is-builder[clean] .row-active:not([data-protected]) {
|
5850
5860
|
outline: 1px solid rgba(132, 132, 132, 0.2);
|
5851
5861
|
}
|
5862
|
+
.is-builder[clean][gray] .is-tool.is-row-tool .row-grideditor {
|
5863
|
+
background: transparent;
|
5864
|
+
}
|
5852
5865
|
.is-builder[leftrowtool] .is-tool.is-row-tool {
|
5853
5866
|
right: auto;
|
5854
5867
|
left: -40px;
|
@@ -45576,6 +45576,11 @@ class DragDropImageUploader {
|
|
45576
45576
|
}
|
45577
45577
|
_onDragOver(e) {
|
45578
45578
|
e.preventDefault();
|
45579
|
+
|
45580
|
+
// Only allow highlighting when dragging files (not snippets, etc.)
|
45581
|
+
if (!e.dataTransfer.types.includes('Files')) {
|
45582
|
+
return;
|
45583
|
+
}
|
45579
45584
|
const img = this._getImageUnderCursor(e);
|
45580
45585
|
if (img) {
|
45581
45586
|
if (this.targetImage && this.targetImage !== img) {
|
@@ -46719,6 +46724,8 @@ class Image$1 {
|
|
46719
46724
|
const util = this.builder.util;
|
46720
46725
|
let isModule = dom.parentsHasAttribute(elm, 'data-html');
|
46721
46726
|
if (isModule) {
|
46727
|
+
// Now this block is not used anymore, since direct image embed/change is disabled for modules (e.g. slider). See click(e) line 1577
|
46728
|
+
|
46722
46729
|
if (this.imageTool) this.imageTool.style.display = '';
|
46723
46730
|
|
46724
46731
|
// Extra: make image[data-image-embed] clickable/editable
|
@@ -46891,6 +46898,12 @@ class Image$1 {
|
|
46891
46898
|
const util = this.builder.util;
|
46892
46899
|
const dom = this.builder.dom;
|
46893
46900
|
let elm = e.target;
|
46901
|
+
if (elm.closest('[data-html]')) {
|
46902
|
+
// Do not show imageTool if the image is inside a code block
|
46903
|
+
this.builder.activeImage = null;
|
46904
|
+
this.hideImageTool();
|
46905
|
+
return;
|
46906
|
+
}
|
46894
46907
|
|
46895
46908
|
//Image
|
46896
46909
|
if (elm.tagName.toLowerCase() === 'img') {
|
@@ -52075,19 +52088,19 @@ class RowTool {
|
|
52075
52088
|
if (!rowtool) {
|
52076
52089
|
let html = `<div class="is-tool is-row-tool" style="${!this.builder.rowTool && this.builder.rowTool !== '' ? 'display:none;' : ''}">
|
52077
52090
|
<div title="${util.out('Move')}" role="button" tabindex="-1" class="row-handle" style="${this.builder.rowHandle ? '' : 'display:none;'}width:100%;cursor:move;text-align:center;"><svg class="is-icon-flex"><use xlink:href="#ion-move"></use></svg></div>
|
52078
|
-
<button type="button" tabindex="-1" title="${util.out('More')}" class="row-more"><svg class="is-icon-flex" style="
|
52091
|
+
<button type="button" tabindex="-1" title="${util.out('More')}" class="row-more"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-dots2"></use></svg></button>
|
52079
52092
|
<button type="button" tabindex="-1" title="${util.out('Grid Editor')}" class="row-grideditor"><svg class="is-icon-flex"><use xlink:href="#ion-grid"></use></svg></button>
|
52080
|
-
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="row-remove"><svg class="is-icon-flex" style="
|
52093
|
+
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="row-remove"><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-trash2"></use></svg></button>
|
52081
52094
|
</div>
|
52082
52095
|
<div class="is-tool is-col-tool">
|
52083
52096
|
<button type="button" tabindex="-1" title="${util.out('Add')}" class="cell-add">
|
52084
|
-
<svg class="is-icon-flex" style="
|
52097
|
+
<svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-plus"></use></svg>
|
52085
52098
|
</button>
|
52086
52099
|
<button type="button" tabindex="-1" title="${util.out('More')}" class="cell-more">
|
52087
|
-
<svg class="is-icon-flex" style="
|
52100
|
+
<svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-dots2"></use></svg>
|
52088
52101
|
</button>
|
52089
52102
|
<button type="button" tabindex="-1" title="${util.out('Delete')}" class="cell-remove">
|
52090
|
-
<svg class="is-icon-flex" style="
|
52103
|
+
<svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#icon-trash2"></use></svg>
|
52091
52104
|
</button>
|
52092
52105
|
</div>
|
52093
52106
|
`;
|
@@ -61789,7 +61802,7 @@ class Preferences {
|
|
61789
61802
|
</select>
|
61790
61803
|
</label>
|
61791
61804
|
|
61792
|
-
${this.builder.themes ? `
|
61805
|
+
${this.builder.themes && this.builder.themes.length > 0 ? `
|
61793
61806
|
<label style="${this.builder.isTouchSupport ? 'display:none;' : 'display:block;'}margin-top:10px;margin-bottom:5px;">
|
61794
61807
|
${util.out('Theme')}:
|
61795
61808
|
${htmlThemes}
|
@@ -83720,7 +83733,7 @@ class Dictation {
|
|
83720
83733
|
}
|
83721
83734
|
}
|
83722
83735
|
let bImageGeneration = false;
|
83723
|
-
if (this.builder.textToImageUrl) {
|
83736
|
+
if (this.builder.textToImageUrl || this.builder.generateMediaUrl_Fal) {
|
83724
83737
|
bImageGeneration = true;
|
83725
83738
|
}
|
83726
83739
|
for (const key in commandInfo) {
|
@@ -83858,7 +83871,7 @@ class Dictation {
|
|
83858
83871
|
const btnScopeOthers = this.modalCommand.querySelector('.scope-others');
|
83859
83872
|
const btnScopeImage = this.modalCommand.querySelector('.scope-image');
|
83860
83873
|
btnScopeBlock.disabled = true;
|
83861
|
-
if (this.builder.textToImageUrl && !this.builder.hideImageGeneration) btnScopeImage.style.display = ''; // show generate image button
|
83874
|
+
if ((this.builder.textToImageUrl || this.builder.generateMediaUrl_Fal) && !this.builder.hideImageGeneration) btnScopeImage.style.display = ''; // show generate image button
|
83862
83875
|
|
83863
83876
|
const assistModeBtns = modalCommand.querySelectorAll('.div-assistant-mode button');
|
83864
83877
|
assistModeBtns.forEach(btn => {
|
@@ -94849,6 +94862,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
94849
94862
|
window.selectImage = this.selectImage.bind(this);
|
94850
94863
|
window.selectVideo = this.selectVideo.bind(this);
|
94851
94864
|
window.selectAsset = this.selectAsset.bind(this);
|
94865
|
+
window.closeAsset = this.closeAsset.bind(this);
|
94852
94866
|
window.assetType = this.assetType.bind(this);
|
94853
94867
|
window.hideModal = this.hideModal.bind(this);
|
94854
94868
|
window.generateImage = this.generateImage.bind(this);
|
@@ -97354,6 +97368,20 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
97354
97368
|
this.util._hideModal(modal); // this _hideModal will also trigger cancelCallback defined by showModal. This is done by programmatically click the overlay.
|
97355
97369
|
}
|
97356
97370
|
|
97371
|
+
closeAsset() {
|
97372
|
+
let modal = document.querySelector('.is-modal.videoselect.active');
|
97373
|
+
if (modal) this.hideModal(modal);
|
97374
|
+
modal = document.querySelector('.is-modal.imageselect.active');
|
97375
|
+
if (modal) this.hideModal(modal);
|
97376
|
+
modal = document.querySelector('.is-modal.fileselect.active');
|
97377
|
+
if (modal) this.hideModal(modal);
|
97378
|
+
modal = document.querySelector('.is-modal.audioselect.active');
|
97379
|
+
if (modal) this.hideModal(modal);
|
97380
|
+
modal = document.querySelector('.is-modal.mediaselect.active');
|
97381
|
+
if (modal) this.hideModal(modal);
|
97382
|
+
modal = document.querySelector('.is-modal.otherselect.active');
|
97383
|
+
if (modal) this.hideModal(modal);
|
97384
|
+
}
|
97357
97385
|
draggable(selector) {
|
97358
97386
|
new Draggable$2({
|
97359
97387
|
selector: selector
|
@@ -97965,7 +97993,8 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
97965
97993
|
async waitingResultFal(jsonBody, requestId) {
|
97966
97994
|
jsonBody.request_id = requestId;
|
97967
97995
|
const getResultEndpoint = (model, requestId) => {
|
97968
|
-
let endpoint =
|
97996
|
+
let endpoint = 'https://queue.fal.run/{MODEL}/requests/{REQUEST_ID}';
|
97997
|
+
endpoint = endpoint.replace('{REQUEST_ID}', requestId);
|
97969
97998
|
let firstTwoParts = model.split('/').slice(0, 2).join('/');
|
97970
97999
|
endpoint = endpoint.replace('{MODEL}', firstTwoParts);
|
97971
98000
|
return endpoint;
|
@@ -98044,7 +98073,8 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
98044
98073
|
}
|
98045
98074
|
let requestId = result.request_id;
|
98046
98075
|
const getStatusEndpoint = (model, requestId) => {
|
98047
|
-
let endpoint =
|
98076
|
+
let endpoint = 'https://queue.fal.run/{MODEL}/requests/{REQUEST_ID}/status';
|
98077
|
+
endpoint = endpoint.replace('{REQUEST_ID}', requestId);
|
98048
98078
|
let firstTwoParts = model.split('/').slice(0, 2).join('/');
|
98049
98079
|
endpoint = endpoint.replace('{MODEL}', firstTwoParts);
|
98050
98080
|
return endpoint;
|