@innovastudio/contentbox 1.6.198 → 1.6.199

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
@@ -407,13 +407,38 @@ interface ContentBoxOptions {
407
407
  */
408
408
  context?: 'all' | 'selection' | 'optimized';
409
409
  /**
410
- * Include the optional Motion Path animation context (`data-fx-path`) — moving
411
- * an object along a curved path through waypoints. A rare, story-page effect,
412
- * so it's off by default; when on, it rides along wherever the animation
413
- * framework is included in an AI code request.
414
- * @default false
410
+ * Allow the AI to author Motion Path animations (`data-fx-path`) — moving an
411
+ * object along a curved path through waypoints.
412
+ *
413
+ * On by default. The reference is not sent with every request: it is
414
+ * included only when a request actually calls for a path, or when the markup
415
+ * being edited already contains one. Every ContentBox runtime renders the
416
+ * result, so an authored path needs no extra setup to publish.
417
+ *
418
+ * When off, the AI never authors a path. It is still shown the reference in
419
+ * preserve-only form if the content it is editing already contains
420
+ * `data-fx-path`, so an existing path survives an unrelated edit.
421
+ * @default true
415
422
  */
416
423
  motionPath?: boolean;
424
+ /**
425
+ * Which Code Chat engine handles requests.
426
+ * - 'v1' — the task-pipeline engine: a request is classified into tasks up
427
+ * front, then each is executed.
428
+ * - 'v2' — the closed-loop engine: the model works through tools and looks
429
+ * at the page between steps, so it can read a section before
430
+ * editing it and adapt when something fails.
431
+ *
432
+ * 'v2' requires your `sendCommandUrl` route to handle the conversational
433
+ * request shape (a `messages` array plus `tools`, returning `message`).
434
+ * The bundled Node, PHP and Next.js examples already do. If yours does not,
435
+ * Code Chat says so on the first send rather than failing obscurely.
436
+ *
437
+ * Both engines share the same chat panel, settings and model list, so
438
+ * switching changes how requests are fulfilled, not what users see.
439
+ * @default 'v1'
440
+ */
441
+ chatEngine?: 'v1' | 'v2';
417
442
 
418
443
  //-- Code Chat: vision / attachments
419
444
  /** Let files be attached to a chat message. Off by default: the attach
@@ -483,21 +508,6 @@ interface ContentBoxOptions {
483
508
  generateMediaUrl_Fal?: string;
484
509
  checkRequestStatusUrl_Fal?: string;
485
510
  getResultUrl_Fal?: string;
486
- /** OpenRouter image provider (defaultImageGenerationProvider: 'openrouter').
487
- * Same three-step request/status/result contract as the _Fal endpoints,
488
- * including reference-image features (restyle / edit existing photos),
489
- * which all three providers serve. */
490
- generateMediaUrl_OpenRouter?: string;
491
- checkRequestStatusUrl_OpenRouter?: string;
492
- getResultUrl_OpenRouter?: string;
493
- /** OpenAI image provider (defaultImageGenerationProvider: 'openai').
494
- * The same three-step request/status/result contract as the _Fal and
495
- * _OpenRouter endpoints, including reference-image features (an entry with
496
- * image_input: true routes to /v1/images/edits). Distinct from the older
497
- * one-shot generateMediaUrl_OpenAI_CreateImage(Edit) below. */
498
- generateMediaUrl_OpenAI?: string;
499
- checkRequestStatusUrl_OpenAI?: string;
500
- getResultUrl_OpenAI?: string;
501
511
  minimizeImageUrl?: string;
502
512
  cleanup?: string;
503
513
  generateMediaUrl_OpenAI_CreateImage?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@innovastudio/contentbox",
4
- "version": "1.6.198",
4
+ "version": "1.6.199",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "types": "index.d.ts",
@@ -22,7 +22,8 @@
22
22
  "test:devicerow": "node tests/device-row.mjs",
23
23
  "test:canvas": "node tests/canvas-size.mjs",
24
24
  "test:fonts": "node tests/fonts.mjs",
25
- "test": "node tests/box-structure.mjs && node tests/content-size-handles.mjs && node tests/spacing-panels.mjs && node tests/panel-section-state.mjs && node tests/device-row.mjs && node tests/canvas-size.mjs && node tests/fonts.mjs"
25
+ "test:mode": "node tests/mode-buttons.mjs",
26
+ "test": "node tests/box-structure.mjs && node tests/content-size-handles.mjs && node tests/spacing-panels.mjs && node tests/panel-section-state.mjs && node tests/device-row.mjs && node tests/canvas-size.mjs && node tests/fonts.mjs && node tests/mode-buttons.mjs"
26
27
  },
27
28
  "keywords": [],
28
29
  "author": "",
@@ -67,7 +68,7 @@
67
68
  "ws": "^8.13.0"
68
69
  },
69
70
  "dependencies": {
70
- "@innovastudio/contentbuilder": "^1.5.216",
71
+ "@innovastudio/contentbuilder": "^1.5.217",
71
72
  "js-beautify": "^1.14.0",
72
73
  "marked": "^17.0.0",
73
74
  "sortablejs": "^1.15.2"
@@ -499,6 +499,9 @@ body.dark .motion-dock iframe, body.dark .cascade-dock iframe, body.dark .is-con
499
499
  line-height: 1.6;
500
500
  }
501
501
  .builder-ui .panel-plugin .cb-settings-form {
502
+ margin-top: 0;
503
+ }
504
+ .builder-ui .panel-plugin * ~ .cb-settings-form {
502
505
  margin-top: 20px;
503
506
  }
504
507
  .builder-ui .flex-unit {
@@ -925,6 +928,9 @@ body.controlpanel .builder-ui .is-controlpanel {
925
928
  right: 0px;
926
929
  box-shadow: rgba(0, 0, 0, 0.05) 0 0 16px 0px;
927
930
  }
931
+ body.controlpanel [data-cb-ui] .is-modal.elementstyles {
932
+ right: 310px;
933
+ }
928
934
  body.controlpanel .is-wrapper {
929
935
  width: calc(100% - 290px) !important;
930
936
  margin-left: 0 !important;
@@ -1076,7 +1082,7 @@ body.controlpanel .is-wrapper {
1076
1082
  font-family: sans-serif;
1077
1083
  font-weight: 300;
1078
1084
  font-size: 20px;
1079
- margin: 15px 0 12px;
1085
+ margin: 15px 0 0;
1080
1086
  }
1081
1087
  .builder-ui .is-controlpanel [class^=panel-] {
1082
1088
  display: none;
@@ -1145,6 +1151,10 @@ body.controlpanel .is-wrapper {
1145
1151
  .builder-ui .is-controlpanel [class^=panel-] .submain {
1146
1152
  padding: 0 24px 16px;
1147
1153
  }
1154
+ .builder-ui .is-controlpanel [class^=panel-] .submain > div:first-child {
1155
+ /* plugin custom settings */
1156
+ margin-top: 5px;
1157
+ }
1148
1158
  .builder-ui .is-controlpanel [class^=panel-] .subpanel {
1149
1159
  padding: 14px 24px 15px;
1150
1160
  width: 100%;
@@ -4493,6 +4503,9 @@ body.fullview.fullview-scaled .is-content-view > div.iframe-resizer {
4493
4503
  #chatPanel .message.user .message-content {
4494
4504
  background: var(--cb-fill);
4495
4505
  color: var(--cb-text);
4506
+ /* Keep the line breaks of pasted text; long unbroken URLs still wrap */
4507
+ white-space: pre-wrap;
4508
+ overflow-wrap: anywhere;
4496
4509
  }
4497
4510
 
4498
4511
  #chatPanel .message.assistant .message-content {
@@ -4712,12 +4725,18 @@ body.fullview.fullview-scaled .is-content-view > div.iframe-resizer {
4712
4725
  background: var(--cb-fill-hover);
4713
4726
  }
4714
4727
 
4715
- #chatPanel .quick-image-size-button {
4716
- width: 48px;
4728
+ #chatPanel .input-area button.quick-image-size-button {
4729
+ /* Square for a short label ("4:3", "auto"), wider for a pixel size
4730
+ ("1536x1024"), which does not fit in 48px. */
4731
+ min-width: 48px;
4732
+ width: auto;
4733
+ padding: 0 10px;
4734
+ flex: 0 0 auto;
4735
+ white-space: nowrap;
4717
4736
  height: 48px;
4718
4737
  border: none;
4719
4738
  border-radius: 8px;
4720
- font-size: 13px;
4739
+ font-size: 12px;
4721
4740
  font-weight: 500;
4722
4741
  cursor: pointer;
4723
4742
  transition: background 0.2s;