@innovastudio/contentbuilder 1.5.215 → 1.5.217
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 +24 -15
- package/package.json +1 -1
- package/public/contentbuilder/contentbuilder.css +87 -29
- package/public/contentbuilder/contentbuilder.esm.js +4455 -696
- package/public/contentbuilder/contentbuilder.min.js +5 -5
- package/public/contentbuilder/lang/en.js +46 -0
- package/public/contentbuilder/lang/fr.js +46 -0
- package/readme.txt +2 -14
package/index.d.ts
CHANGED
|
@@ -212,6 +212,9 @@ interface ContentBuilderOptions {
|
|
|
212
212
|
pluginSettingsPosition?: 'center' | 'right' | 'left' | { top?: string | number; left?: string | number; right?: string | number; bottom?: string | number };
|
|
213
213
|
/** Default position of the button editor modal. Default 'center'. */
|
|
214
214
|
buttonEditorPosition?: 'center' | 'right' | 'left' | { top?: string | number; left?: string | number; right?: string | number; bottom?: string | number };
|
|
215
|
+
|
|
216
|
+
/** Default position of the element editor dock. Unset keeps the position from the stylesheet. */
|
|
217
|
+
elementEditorPosition?: 'right' | 'left' | { top?: string | number; left?: string | number; right?: string | number; bottom?: string | number };
|
|
215
218
|
useLightbox?: boolean;
|
|
216
219
|
lightboxArrow?: boolean;
|
|
217
220
|
imageRenameOnEdit?: boolean;
|
|
@@ -282,6 +285,27 @@ interface ContentBuilderOptions {
|
|
|
282
285
|
demoConversations?: any[];
|
|
283
286
|
startCodeChat?: boolean;
|
|
284
287
|
|
|
288
|
+
/**
|
|
289
|
+
* Which Code Chat engine handles a request.
|
|
290
|
+
*
|
|
291
|
+
* 'v1' (default) is the original: it plans the whole request up front, then
|
|
292
|
+
* carries the plan out. 'v2' is closed-loop — it acts, looks at the result,
|
|
293
|
+
* and decides the next step, editing one row at a time.
|
|
294
|
+
*
|
|
295
|
+
* 'v2' requires your `sendCommandUrl` route to handle the conversational
|
|
296
|
+
* request shape (a `messages` array plus `tools`, returning `message`).
|
|
297
|
+
* The bundled Node, PHP and Next.js examples already do. If yours does not,
|
|
298
|
+
* Code Chat says so on the first send rather than failing obscurely.
|
|
299
|
+
*
|
|
300
|
+
* Ignored in canvas mode: a freeform layout has no rows for v2's row-based
|
|
301
|
+
* editing, so Code Chat stays on 'v1' there.
|
|
302
|
+
*
|
|
303
|
+
* Both engines share the same chat panel, settings and model list, so
|
|
304
|
+
* switching changes how requests are fulfilled, not what users see.
|
|
305
|
+
* @default 'v1'
|
|
306
|
+
*/
|
|
307
|
+
chatEngine?: 'v1' | 'v2';
|
|
308
|
+
|
|
285
309
|
//-- Code Chat: vision / attachments
|
|
286
310
|
/** Let files be attached to a chat message. Off by default: the attach
|
|
287
311
|
* button is hidden and drag-and-drop and paste are not accepted. */
|
|
@@ -350,21 +374,6 @@ interface ContentBuilderOptions {
|
|
|
350
374
|
generateMediaUrl_Fal?: string;
|
|
351
375
|
checkRequestStatusUrl_Fal?: string;
|
|
352
376
|
getResultUrl_Fal?: string;
|
|
353
|
-
/** OpenRouter image provider (defaultImageGenerationProvider: 'openrouter').
|
|
354
|
-
* Same three-step request/status/result contract as the _Fal endpoints,
|
|
355
|
-
* including reference-image features (restyle / edit existing photos),
|
|
356
|
-
* which all three providers serve. */
|
|
357
|
-
generateMediaUrl_OpenRouter?: string;
|
|
358
|
-
checkRequestStatusUrl_OpenRouter?: string;
|
|
359
|
-
getResultUrl_OpenRouter?: string;
|
|
360
|
-
/** OpenAI image provider (defaultImageGenerationProvider: 'openai').
|
|
361
|
-
* The same three-step request/status/result contract as the _Fal and
|
|
362
|
-
* _OpenRouter endpoints, including reference-image features (an entry with
|
|
363
|
-
* image_input: true routes to /v1/images/edits). Distinct from the older
|
|
364
|
-
* one-shot generateMediaUrl_OpenAI_CreateImage(Edit) below. */
|
|
365
|
-
generateMediaUrl_OpenAI?: string;
|
|
366
|
-
checkRequestStatusUrl_OpenAI?: string;
|
|
367
|
-
getResultUrl_OpenAI?: string;
|
|
368
377
|
minimizeImageUrl?: string;
|
|
369
378
|
cleanup?: string;
|
|
370
379
|
generateMediaUrl_OpenAI_CreateImage?: string;
|
package/package.json
CHANGED
|
@@ -288,8 +288,8 @@ button:focus-visible {
|
|
|
288
288
|
.is-builder table.default td {
|
|
289
289
|
border: transparent 1px dashed;
|
|
290
290
|
}
|
|
291
|
-
.is-builder .cell-active .elm-active:not(button, table, [data-cb-type]) {
|
|
292
|
-
background: var(--cb-surface-2);
|
|
291
|
+
.is-builder .cell-active .elm-active:not(button, table, [data-cb-type], [data-cb-nohighlight]) {
|
|
292
|
+
background-image: linear-gradient(var(--cb-surface-2), var(--cb-surface-2));
|
|
293
293
|
}
|
|
294
294
|
.is-builder .cell-active table.default td,
|
|
295
295
|
.is-builder .cell-active table.default th {
|
|
@@ -311,7 +311,7 @@ button:focus-visible {
|
|
|
311
311
|
outline: 1px solid var(--cb-outline-inspected) !important;
|
|
312
312
|
}
|
|
313
313
|
.is-builder .elm-inspected .elm-active {
|
|
314
|
-
background: none;
|
|
314
|
+
background-image: none;
|
|
315
315
|
}
|
|
316
316
|
@keyframes elm-inspected-anim {
|
|
317
317
|
0% {
|
|
@@ -917,14 +917,18 @@ button:focus-visible {
|
|
|
917
917
|
position: fixed;
|
|
918
918
|
overflow: hidden;
|
|
919
919
|
width: 420px;
|
|
920
|
-
height:
|
|
921
|
-
|
|
920
|
+
height: fit-content;
|
|
921
|
+
max-height: min(600px, 100vh - 130px);
|
|
922
|
+
top: 0;
|
|
923
|
+
bottom: 0;
|
|
924
|
+
margin-top: auto;
|
|
925
|
+
margin-bottom: auto;
|
|
922
926
|
left: calc(50% - 200px);
|
|
923
927
|
right: 30%;
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
align-items:
|
|
928
|
+
box-sizing: border-box;
|
|
929
|
+
flex-direction: column;
|
|
930
|
+
justify-content: flex-start;
|
|
931
|
+
align-items: stretch;
|
|
928
932
|
}
|
|
929
933
|
[data-cb-ui] .is-modal.pluginsettings.active {
|
|
930
934
|
display: flex;
|
|
@@ -932,6 +936,8 @@ button:focus-visible {
|
|
|
932
936
|
[data-cb-ui] .is-modal.pluginsettings > div:not(.is-draggable) {
|
|
933
937
|
width: 100%;
|
|
934
938
|
margin-top: 30px;
|
|
939
|
+
flex: 1 1 auto;
|
|
940
|
+
min-height: 0;
|
|
935
941
|
}
|
|
936
942
|
[data-cb-ui] .is-modal.pluginsettings .is-modal-overlay {
|
|
937
943
|
display: none !important;
|
|
@@ -1144,11 +1150,14 @@ button:focus-visible {
|
|
|
1144
1150
|
z-index: 10002;
|
|
1145
1151
|
overflow: hidden;
|
|
1146
1152
|
width: 380px;
|
|
1147
|
-
height:
|
|
1148
|
-
|
|
1153
|
+
height: fit-content;
|
|
1154
|
+
max-height: min(537px, 100vh - 130px);
|
|
1155
|
+
top: 0;
|
|
1156
|
+
bottom: 0;
|
|
1157
|
+
margin-top: auto;
|
|
1158
|
+
margin-bottom: auto;
|
|
1149
1159
|
left: calc(50% - 190px);
|
|
1150
1160
|
right: auto;
|
|
1151
|
-
margin-top: -300px;
|
|
1152
1161
|
box-sizing: border-box;
|
|
1153
1162
|
padding: 0;
|
|
1154
1163
|
flex-direction: column;
|
|
@@ -2266,24 +2275,24 @@ button:focus-visible {
|
|
|
2266
2275
|
[data-cb-ui] .is-modal [class^=image-larger] {
|
|
2267
2276
|
flex: none;
|
|
2268
2277
|
}
|
|
2269
|
-
[data-cb-ui] .is-tool#divImageTool, [data-cb-ui] .is-tool.is-video-tool, [data-cb-ui] .is-tool.is-audio-tool, [data-cb-ui] .is-tool.is-plugin-tool, [data-cb-ui] .is-tool.is-iframe-tool {
|
|
2278
|
+
[data-cb-ui] .is-tool#divImageTool, [data-cb-ui] .is-tool.is-video-tool, [data-cb-ui] .is-tool.is-audio-tool, [data-cb-ui] .is-tool.is-plugin-tool, [data-cb-ui] .is-tool.is-cbcode-tool, [data-cb-ui] .is-tool.is-iframe-tool {
|
|
2270
2279
|
background: var(--cb-tool-surface) !important;
|
|
2271
2280
|
border: transparent 1px solid;
|
|
2272
2281
|
box-shadow: -1px 5px 8px 0px rgba(0, 0, 0, 0.08);
|
|
2273
2282
|
border-radius: 20px;
|
|
2274
2283
|
}
|
|
2275
|
-
[data-cb-ui] .is-tool#divImageTool > div, [data-cb-ui] .is-tool#divImageTool > button, [data-cb-ui] .is-tool.is-video-tool > div, [data-cb-ui] .is-tool.is-video-tool > button, [data-cb-ui] .is-tool.is-audio-tool > div, [data-cb-ui] .is-tool.is-audio-tool > button, [data-cb-ui] .is-tool.is-plugin-tool > div, [data-cb-ui] .is-tool.is-plugin-tool > button, [data-cb-ui] .is-tool.is-iframe-tool > div, [data-cb-ui] .is-tool.is-iframe-tool > button {
|
|
2284
|
+
[data-cb-ui] .is-tool#divImageTool > div, [data-cb-ui] .is-tool#divImageTool > button, [data-cb-ui] .is-tool.is-video-tool > div, [data-cb-ui] .is-tool.is-video-tool > button, [data-cb-ui] .is-tool.is-audio-tool > div, [data-cb-ui] .is-tool.is-audio-tool > button, [data-cb-ui] .is-tool.is-plugin-tool > div, [data-cb-ui] .is-tool.is-plugin-tool > button, [data-cb-ui] .is-tool.is-cbcode-tool > div, [data-cb-ui] .is-tool.is-cbcode-tool > button, [data-cb-ui] .is-tool.is-iframe-tool > div, [data-cb-ui] .is-tool.is-iframe-tool > button {
|
|
2276
2285
|
width: 35px;
|
|
2277
2286
|
height: 35px;
|
|
2278
2287
|
background: transparent;
|
|
2279
2288
|
}
|
|
2280
|
-
[data-cb-ui] .is-tool#divImageTool svg, [data-cb-ui] .is-tool.is-video-tool svg, [data-cb-ui] .is-tool.is-audio-tool svg, [data-cb-ui] .is-tool.is-plugin-tool svg, [data-cb-ui] .is-tool.is-iframe-tool svg {
|
|
2289
|
+
[data-cb-ui] .is-tool#divImageTool svg, [data-cb-ui] .is-tool.is-video-tool svg, [data-cb-ui] .is-tool.is-audio-tool svg, [data-cb-ui] .is-tool.is-plugin-tool svg, [data-cb-ui] .is-tool.is-cbcode-tool svg, [data-cb-ui] .is-tool.is-iframe-tool svg {
|
|
2281
2290
|
width: 17px;
|
|
2282
2291
|
height: 17px;
|
|
2283
2292
|
fill: var(--cb-tool-icon) !important;
|
|
2284
2293
|
color: var(--cb-tool-icon) !important;
|
|
2285
2294
|
}
|
|
2286
|
-
[data-cb-ui] .is-tool.is-video-tool > button, [data-cb-ui] .is-tool.is-audio-tool > button, [data-cb-ui] .is-tool.is-plugin-tool > button, [data-cb-ui] .is-tool.is-iframe-tool > button {
|
|
2295
|
+
[data-cb-ui] .is-tool.is-video-tool > button, [data-cb-ui] .is-tool.is-audio-tool > button, [data-cb-ui] .is-tool.is-plugin-tool > button, [data-cb-ui] .is-tool.is-cbcode-tool > button, [data-cb-ui] .is-tool.is-iframe-tool > button {
|
|
2287
2296
|
width: 35px !important;
|
|
2288
2297
|
height: 35px !important;
|
|
2289
2298
|
}
|
|
@@ -3221,20 +3230,15 @@ button:focus-visible {
|
|
|
3221
3230
|
gap: 3px;
|
|
3222
3231
|
}
|
|
3223
3232
|
[data-cb-ui] .elementstyles {
|
|
3224
|
-
width: 300px;
|
|
3225
3233
|
font-size: 13px;
|
|
3226
|
-
z-index: 10004;
|
|
3227
3234
|
}
|
|
3228
3235
|
[data-cb-ui] .elementstyles .elm-list {
|
|
3229
|
-
|
|
3230
|
-
width: 100%;
|
|
3231
|
-
position: absolute;
|
|
3232
|
-
top: 36px;
|
|
3233
|
-
left: 18px;
|
|
3236
|
+
flex: none;
|
|
3234
3237
|
box-sizing: border-box;
|
|
3235
3238
|
display: flex;
|
|
3236
3239
|
align-items: center;
|
|
3237
3240
|
flex-wrap: wrap;
|
|
3241
|
+
padding: 0 20px 8px;
|
|
3238
3242
|
font-size: 12px;
|
|
3239
3243
|
line-height: 1.3;
|
|
3240
3244
|
}
|
|
@@ -4092,7 +4096,7 @@ button:focus-visible {
|
|
|
4092
4096
|
display: none;
|
|
4093
4097
|
}
|
|
4094
4098
|
.is-builder[hideelementhighlight] .cell-active .elm-active {
|
|
4095
|
-
background-
|
|
4099
|
+
background-image: none;
|
|
4096
4100
|
}
|
|
4097
4101
|
.is-builder[minimal] .is-tool.is-col-tool .cell-more {
|
|
4098
4102
|
display: none;
|
|
@@ -10343,6 +10347,9 @@ iframe.wait-autoplay {
|
|
|
10343
10347
|
[data-cb-ui] #chatPanel .message.user .message-content {
|
|
10344
10348
|
background: var(--cb-fill);
|
|
10345
10349
|
color: var(--cb-text);
|
|
10350
|
+
/* Keep the line breaks of pasted text; long unbroken URLs still wrap */
|
|
10351
|
+
white-space: pre-wrap;
|
|
10352
|
+
overflow-wrap: anywhere;
|
|
10346
10353
|
}
|
|
10347
10354
|
[data-cb-ui] #chatPanel .message.assistant .message-content {
|
|
10348
10355
|
background: var(--cb-chat-bubble-bg);
|
|
@@ -10535,12 +10542,18 @@ iframe.wait-autoplay {
|
|
|
10535
10542
|
[data-cb-ui] #chatPanel .copy-button:hover {
|
|
10536
10543
|
background: var(--cb-fill-hover);
|
|
10537
10544
|
}
|
|
10538
|
-
[data-cb-ui] #chatPanel .quick-image-size-button {
|
|
10539
|
-
|
|
10545
|
+
[data-cb-ui] #chatPanel .input-area button.quick-image-size-button {
|
|
10546
|
+
/* Square for a short label ("4:3", "auto"), wider for a pixel size
|
|
10547
|
+
("1536x1024"), which does not fit in 48px. */
|
|
10548
|
+
min-width: 48px;
|
|
10549
|
+
width: auto;
|
|
10550
|
+
padding: 0 10px;
|
|
10551
|
+
flex: 0 0 auto;
|
|
10552
|
+
white-space: nowrap;
|
|
10540
10553
|
height: 48px;
|
|
10541
10554
|
border: none;
|
|
10542
10555
|
border-radius: 8px;
|
|
10543
|
-
font-size:
|
|
10556
|
+
font-size: 12px;
|
|
10544
10557
|
font-weight: 500;
|
|
10545
10558
|
cursor: pointer;
|
|
10546
10559
|
transition: background 0.2s;
|
|
@@ -10550,10 +10563,10 @@ iframe.wait-autoplay {
|
|
|
10550
10563
|
background: var(--cb-fill);
|
|
10551
10564
|
color: var(--cb-text);
|
|
10552
10565
|
}
|
|
10553
|
-
[data-cb-ui] #chatPanel .quick-image-size-button:hover:not(:disabled) {
|
|
10566
|
+
[data-cb-ui] #chatPanel .input-area button.quick-image-size-button:hover:not(:disabled) {
|
|
10554
10567
|
background: var(--cb-fill-hover);
|
|
10555
10568
|
}
|
|
10556
|
-
[data-cb-ui] #chatPanel .quick-image-size-button:disabled {
|
|
10569
|
+
[data-cb-ui] #chatPanel .input-area button.quick-image-size-button:disabled {
|
|
10557
10570
|
opacity: 0.6;
|
|
10558
10571
|
cursor: not-allowed;
|
|
10559
10572
|
}
|
|
@@ -12210,6 +12223,51 @@ iframe.wait-autoplay {
|
|
|
12210
12223
|
outline: var(--cb-field-focus-outline);
|
|
12211
12224
|
outline-offset: -2px;
|
|
12212
12225
|
}
|
|
12226
|
+
[data-cb-ui] .is-modal.elementstyles {
|
|
12227
|
+
position: fixed;
|
|
12228
|
+
top: 105px;
|
|
12229
|
+
right: 38px;
|
|
12230
|
+
left: auto;
|
|
12231
|
+
bottom: auto;
|
|
12232
|
+
width: 320px;
|
|
12233
|
+
height: auto;
|
|
12234
|
+
max-height: calc(100vh - 130px);
|
|
12235
|
+
background: var(--cb-modal-bg);
|
|
12236
|
+
display: none;
|
|
12237
|
+
flex-direction: column;
|
|
12238
|
+
justify-content: flex-start;
|
|
12239
|
+
align-items: stretch;
|
|
12240
|
+
z-index: 10004;
|
|
12241
|
+
}
|
|
12242
|
+
[data-cb-ui] .is-modal.elementstyles.active {
|
|
12243
|
+
display: flex;
|
|
12244
|
+
}
|
|
12245
|
+
[data-cb-ui] .is-modal.elementstyles .elm-dock {
|
|
12246
|
+
display: flex;
|
|
12247
|
+
flex-direction: column;
|
|
12248
|
+
min-height: 0;
|
|
12249
|
+
padding-top: 38px;
|
|
12250
|
+
}
|
|
12251
|
+
[data-cb-ui] .is-modal.elementstyles .elm-dock-content {
|
|
12252
|
+
overflow-y: auto;
|
|
12253
|
+
overflow-x: hidden;
|
|
12254
|
+
min-height: 0;
|
|
12255
|
+
}
|
|
12256
|
+
[data-cb-ui] .is-modal.elementstyles .elm-dock-foot {
|
|
12257
|
+
flex: none;
|
|
12258
|
+
display: flex;
|
|
12259
|
+
justify-content: flex-end;
|
|
12260
|
+
padding: 8px 12px 10px;
|
|
12261
|
+
border-top: 1px solid var(--cb-line);
|
|
12262
|
+
}
|
|
12263
|
+
[data-cb-ui] .is-modal.elementstyles .elm-dock-foot .elm-editstyle {
|
|
12264
|
+
width: 40px;
|
|
12265
|
+
height: 25px;
|
|
12266
|
+
font-family: sans-serif;
|
|
12267
|
+
font-size: 10px;
|
|
12268
|
+
font-weight: bold;
|
|
12269
|
+
padding: 0;
|
|
12270
|
+
}
|
|
12213
12271
|
[data-cb-ui] .is-modal.edittablestyle {
|
|
12214
12272
|
z-index: 10002;
|
|
12215
12273
|
position: fixed;
|