@innovastudio/contentbox 1.6.198 → 1.6.200

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
@@ -386,6 +386,15 @@ interface ContentBoxOptions {
386
386
  onStartRequest?: () => void;
387
387
 
388
388
  defaultImageGenerationProvider?: string;
389
+
390
+ /* 3D asset generation (image-to-3D). Rides the same provider endpoints
391
+ as image generation; presence of models3D enables the Code Chat tool. */
392
+ default3DGenerationProvider?: string;
393
+ models3D?: { id: string; label?: string }[];
394
+
395
+ /* Let Code Chat screenshot a 3D scene it built and correct it before
396
+ answering. Off by default; needs a code model that reads images. */
397
+ renderSelfCheck?: boolean;
389
398
  imageModel?: string;
390
399
  imageSize?: string;
391
400
  imageGenerationModels?: any[];
@@ -407,13 +416,38 @@ interface ContentBoxOptions {
407
416
  */
408
417
  context?: 'all' | 'selection' | 'optimized';
409
418
  /**
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
419
+ * Allow the AI to author Motion Path animations (`data-fx-path`) — moving an
420
+ * object along a curved path through waypoints.
421
+ *
422
+ * On by default. The reference is not sent with every request: it is
423
+ * included only when a request actually calls for a path, or when the markup
424
+ * being edited already contains one. Every ContentBox runtime renders the
425
+ * result, so an authored path needs no extra setup to publish.
426
+ *
427
+ * When off, the AI never authors a path. It is still shown the reference in
428
+ * preserve-only form if the content it is editing already contains
429
+ * `data-fx-path`, so an existing path survives an unrelated edit.
430
+ * @default true
415
431
  */
416
432
  motionPath?: boolean;
433
+ /**
434
+ * Which Code Chat engine handles requests.
435
+ * - 'v1' — the task-pipeline engine: a request is classified into tasks up
436
+ * front, then each is executed.
437
+ * - 'v2' — the closed-loop engine: the model works through tools and looks
438
+ * at the page between steps, so it can read a section before
439
+ * editing it and adapt when something fails.
440
+ *
441
+ * 'v2' requires your `sendCommandUrl` route to handle the conversational
442
+ * request shape (a `messages` array plus `tools`, returning `message`).
443
+ * The bundled Node, PHP and Next.js examples already do. If yours does not,
444
+ * Code Chat says so on the first send rather than failing obscurely.
445
+ *
446
+ * Both engines share the same chat panel, settings and model list, so
447
+ * switching changes how requests are fulfilled, not what users see.
448
+ * @default 'v1'
449
+ */
450
+ chatEngine?: 'v1' | 'v2';
417
451
 
418
452
  //-- Code Chat: vision / attachments
419
453
  /** Let files be attached to a chat message. Off by default: the attach
@@ -483,21 +517,6 @@ interface ContentBoxOptions {
483
517
  generateMediaUrl_Fal?: string;
484
518
  checkRequestStatusUrl_Fal?: string;
485
519
  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
520
  minimizeImageUrl?: string;
502
521
  cleanup?: string;
503
522
  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.200",
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,9 +68,13 @@
67
68
  "ws": "^8.13.0"
68
69
  },
69
70
  "dependencies": {
70
- "@innovastudio/contentbuilder": "^1.5.216",
71
+ "@gltf-transform/core": "^4.5.0",
72
+ "@gltf-transform/extensions": "^4.5.0",
73
+ "@gltf-transform/functions": "^4.5.0",
74
+ "@innovastudio/contentbuilder": "^1.5.218",
71
75
  "js-beautify": "^1.14.0",
72
76
  "marked": "^17.0.0",
77
+ "meshoptimizer": "^1.2.0",
73
78
  "sortablejs": "^1.15.2"
74
79
  }
75
80
  }
@@ -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%;
@@ -1856,9 +1866,6 @@ body.controlpanel .is-wrapper {
1856
1866
  box-shadow: 6px 14px 20px 0px rgba(95, 95, 95, 0.08);
1857
1867
  }
1858
1868
 
1859
- .snippet-item {
1860
- cursor: move !important;
1861
- }
1862
1869
  .snippet-item.sortable-chosen {
1863
1870
  height: auto;
1864
1871
  }
@@ -4493,6 +4500,9 @@ body.fullview.fullview-scaled .is-content-view > div.iframe-resizer {
4493
4500
  #chatPanel .message.user .message-content {
4494
4501
  background: var(--cb-fill);
4495
4502
  color: var(--cb-text);
4503
+ /* Keep the line breaks of pasted text; long unbroken URLs still wrap */
4504
+ white-space: pre-wrap;
4505
+ overflow-wrap: anywhere;
4496
4506
  }
4497
4507
 
4498
4508
  #chatPanel .message.assistant .message-content {
@@ -4712,12 +4722,18 @@ body.fullview.fullview-scaled .is-content-view > div.iframe-resizer {
4712
4722
  background: var(--cb-fill-hover);
4713
4723
  }
4714
4724
 
4715
- #chatPanel .quick-image-size-button {
4716
- width: 48px;
4725
+ #chatPanel .input-area button.quick-image-size-button {
4726
+ /* Square for a short label ("4:3", "auto"), wider for a pixel size
4727
+ ("1536x1024"), which does not fit in 48px. */
4728
+ min-width: 48px;
4729
+ width: auto;
4730
+ padding: 0 10px;
4731
+ flex: 0 0 auto;
4732
+ white-space: nowrap;
4717
4733
  height: 48px;
4718
4734
  border: none;
4719
4735
  border-radius: 8px;
4720
- font-size: 13px;
4736
+ font-size: 12px;
4721
4737
  font-weight: 500;
4722
4738
  cursor: pointer;
4723
4739
  transition: background 0.2s;