@innovastudio/contentbox 1.6.102 → 1.6.104
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 +1 -0
- package/package.json +2 -2
- package/public/contentbox/contentbox.esm.js +22 -5
- package/public/contentbox/contentbox.min.js +2 -2
- package/readme.txt +26 -6
package/index.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@innovastudio/contentbox",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.6.
|
4
|
+
"version": "1.6.104",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbox/contentbox.esm.js",
|
7
7
|
"types": "index.d.ts",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"ws": "^8.13.0"
|
55
55
|
},
|
56
56
|
"dependencies": {
|
57
|
-
"@innovastudio/contentbuilder": "^1.5.
|
57
|
+
"@innovastudio/contentbuilder": "^1.5.101",
|
58
58
|
"js-beautify": "^1.14.0",
|
59
59
|
"sortablejs": "^1.15.2"
|
60
60
|
}
|
@@ -76260,10 +76260,13 @@ class Module {
|
|
76260
76260
|
let btnOk = moduleModal.querySelector('.input-ok');
|
76261
76261
|
dom.addEventListener(btnOk, 'click', () => {
|
76262
76262
|
let modalIframe = moduleModal.querySelector('iframe');
|
76263
|
-
if (modalIframe.contentWindow.construct) modalIframe.contentWindow.construct();
|
76263
|
+
if (modalIframe.contentWindow.construct) modalIframe.contentWindow.construct(); // transfer module code to hidContentModuleCode & hidContentModuleSettings for saving
|
76264
|
+
|
76264
76265
|
this.builder.uo.saveForUndo();
|
76265
76266
|
let module = this.builder.activeModule;
|
76266
76267
|
|
76268
|
+
// The saving (saved in data attributes)
|
76269
|
+
|
76267
76270
|
//Save Html (original)
|
76268
76271
|
module.setAttribute('data-html', encodeURIComponent(builderStuff.querySelector('#hidContentModuleCode').value));
|
76269
76272
|
|
@@ -112989,6 +112992,7 @@ ${answer}
|
|
112989
112992
|
let temperature = localStorage.getItem('_temp') || this.builder.temperature;
|
112990
112993
|
let topP = localStorage.getItem('_top_p') || this.builder.topP;
|
112991
112994
|
let num = 1;
|
112995
|
+
if (this.builder.settings.onStartRequest) this.builder.settings.onStartRequest();
|
112992
112996
|
const messages = {
|
112993
112997
|
question,
|
112994
112998
|
context,
|
@@ -112996,8 +113000,12 @@ ${answer}
|
|
112996
113000
|
functs,
|
112997
113001
|
temperature,
|
112998
113002
|
topP,
|
112999
|
-
num
|
113003
|
+
num,
|
113004
|
+
metadata: this.builder.settings.metadata || {}
|
113000
113005
|
};
|
113006
|
+
|
113007
|
+
// console.log(messages);
|
113008
|
+
|
113001
113009
|
try {
|
113002
113010
|
/*
|
113003
113011
|
const response = await fetch(this.builder.sendCommandUrl, {
|
@@ -123889,6 +123897,7 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
123889
123897
|
}
|
123890
123898
|
this.ai_width = width;
|
123891
123899
|
this.ai_height = height;
|
123900
|
+
if (this.settings.onStartRequest) this.settings.onStartRequest();
|
123892
123901
|
const messages = {
|
123893
123902
|
model,
|
123894
123903
|
prompt: prompt,
|
@@ -123899,8 +123908,12 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
123899
123908
|
guidance,
|
123900
123909
|
scheduler,
|
123901
123910
|
output_format: 'jpeg',
|
123902
|
-
folder_path: ''
|
123911
|
+
folder_path: '',
|
123912
|
+
metadata: this.settings.metadata || {}
|
123903
123913
|
};
|
123914
|
+
|
123915
|
+
// console.log(messages);
|
123916
|
+
|
123904
123917
|
try {
|
123905
123918
|
let url = this.textToImageUrl;
|
123906
123919
|
let headers = {
|
@@ -151802,6 +151815,7 @@ ${currentHtml}
|
|
151802
151815
|
let temperature = localStorage.getItem('_temp') || this.builder.temperature;
|
151803
151816
|
let topP = localStorage.getItem('_top_p') || this.builder.topP;
|
151804
151817
|
let num = 1;
|
151818
|
+
if (this.builder.settings.onStartRequest) this.builder.settings.onStartRequest();
|
151805
151819
|
const messages = {
|
151806
151820
|
question,
|
151807
151821
|
context,
|
@@ -151809,8 +151823,9 @@ ${currentHtml}
|
|
151809
151823
|
functs,
|
151810
151824
|
temperature,
|
151811
151825
|
topP,
|
151812
|
-
num
|
151813
|
-
|
151826
|
+
num,
|
151827
|
+
metadata: this.builder.settings.metadata || {}
|
151828
|
+
}; // console.log(messages);
|
151814
151829
|
|
151815
151830
|
try {
|
151816
151831
|
/*
|
@@ -159392,6 +159407,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
159392
159407
|
contentHtmlEnd: '</div></div></div>'
|
159393
159408
|
};
|
159394
159409
|
this.settings = Object.assign(this, defaults, settings);
|
159410
|
+
if (Object.keys(this.settings.lang).length > 0) window._txt = this.settings.lang;
|
159395
159411
|
|
159396
159412
|
if (this.clearPreferences) {
|
159397
159413
|
localStorage.removeItem('_disclaimershown');
|
@@ -159813,6 +159829,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
|
|
159813
159829
|
|
159814
159830
|
editorSetup() {
|
159815
159831
|
this.editor = new ContentBuilder({
|
159832
|
+
onStartRequest: this.settings.onStartRequest,
|
159816
159833
|
controlPanel: this.settings.controlPanel,
|
159817
159834
|
canvas: this.settings.canvas,
|
159818
159835
|
docContainer: this.settings.wrapper,
|