@bettercms-ai/types 1.59.0 → 1.61.0

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/dist/index.d.ts CHANGED
@@ -73,7 +73,7 @@ declare const BLOCK_FIELD_TYPES: readonly ["text", "longtext", "richtext", "imag
73
73
  * here is refused with `schema.block_field_unrenderable` only until its renderer ships, and then
74
74
  * joins this list. When this equals BLOCK_FIELD_TYPES (G7), the staging is over.
75
75
  */
76
- declare const BLOCK_FIELD_TYPES_RENDERABLE_NOW: readonly ["text", "longtext", "richtext", "image", "link", "slug", "email", "phone", "color", "select", "number", "rating", "date", "datetime", "boolean", "video", "file", "tags", "reference"];
76
+ declare const BLOCK_FIELD_TYPES_RENDERABLE_NOW: readonly ["text", "longtext", "richtext", "image", "link", "slug", "email", "phone", "color", "select", "number", "rating", "date", "datetime", "boolean", "video", "file", "tags", "reference", "object", "array"];
77
77
  /** `openMode` values (content-model.ts OpenMode). */
78
78
  declare const OPEN_MODES: readonly ["inline", "drill", "popover", "dialog"];
79
79
  /**
@@ -103,10 +103,21 @@ interface V2VariantMeta {
103
103
  icon?: DockIconName;
104
104
  description?: string;
105
105
  }
106
- /** `components.v2` / `published_v2`. Category and icon are native columns. */
106
+ /**
107
+ * `components.v2` / `published_v2`. Category and icon are native columns. The `dock*` keys are
108
+ * SERVER-OWNED (written only by update_component `dockTabs` / `dockDesign`, never in V2_KEYS, so a
109
+ * client `v2` block cannot carry them; a `v2` write keeps the stored ones). @see Component.dockTabs
110
+ */
107
111
  interface ComponentV2 {
108
112
  shape?: V2Shape;
109
113
  placement?: V2Placement;
114
+ dockTabs?: "none";
115
+ dockDesign?: "tab" | "fold";
116
+ dockOrigin?: "human" | "agent" | "derived";
117
+ dockBefore?: {
118
+ dockTabs: "none" | null;
119
+ dockDesign: "tab" | "fold" | null;
120
+ };
110
121
  }
111
122
  /** `content_models.v2`. Icon and preview are native (`icon`, `list_preview`). */
112
123
  interface ContentModelV2 {
@@ -222,7 +233,7 @@ declare const isDeriveReservedKey: (key: string) => boolean;
222
233
  */
223
234
  declare const PRIMITIVE_ARRAY_RULE: {
224
235
  readonly itemTypes: readonly ["text", "number", "date", "image", "link", "richtext"];
225
- readonly configKeys: readonly ["itemType", "minItems", "maxItems", "aliases"];
236
+ readonly configKeys: readonly ["itemType", "minItems", "maxItems", "aliases", "item"];
226
237
  readonly notWithZones: readonly ["image", "link", "richtext"];
227
238
  };
228
239
  declare function canonicalJson(value: unknown): string;
@@ -2887,6 +2898,15 @@ interface ComponentTab {
2887
2898
  icon?: DockIconName;
2888
2899
  order?: number;
2889
2900
  }
2901
+ /** `dockTabs: "none"`: draw the props with no tab strip. A stored `ui.tab` is kept, only ignored. */
2902
+ type ComponentDockTabs = "none";
2903
+ /** Where a designable section's Design controls go: `tab` = the outer Content | Design, `fold` = a Design group under the content. */
2904
+ type ComponentDockDesign = "tab" | "fold";
2905
+ /** The dock arrangement an agent's write replaced, which Revert restores. @see Component.dockOrigin */
2906
+ interface ComponentDockBefore {
2907
+ dockTabs: ComponentDockTabs | null;
2908
+ dockDesign: ComponentDockDesign | null;
2909
+ }
2890
2910
  interface Component {
2891
2911
  id: string;
2892
2912
  workspaceId: string;
@@ -2913,6 +2933,15 @@ interface Component {
2913
2933
  preview?: ComponentPreview | null;
2914
2934
  /** The block icon (a /kit schema's document-level `icon`): root crumb, slot rows, slot child frames. Null/absent = unset. */
2915
2935
  icon?: DockIconName | null;
2936
+ /**
2937
+ * The dock arrangement (stored in `components.v2`, served top level). Null/absent = the default:
2938
+ * tabs as the props declare them, Design as its own tab. Authoring chrome, component-wide.
2939
+ */
2940
+ dockTabs?: ComponentDockTabs | null;
2941
+ dockDesign?: ComponentDockDesign | null;
2942
+ /** Who last set `dockTabs` / `dockDesign` (server-owned), and with an agent the state Revert restores. */
2943
+ dockOrigin?: "human" | "agent" | "derived" | null;
2944
+ dockBefore?: ComponentDockBefore | null;
2916
2945
  /** Declared tabs no top-level prop sits in. Null/absent = none. @see ComponentTab */
2917
2946
  tabs?: ComponentTab[] | null;
2918
2947
  /** The bettercms://kit entry its V2 dock UI was built from (a kit-catalog id). Null/absent = none named. */
package/dist/index.js CHANGED
@@ -4624,7 +4624,9 @@ var BLOCK_FIELD_TYPES_RENDERABLE_NOW = [
4624
4624
  "video",
4625
4625
  "file",
4626
4626
  "tags",
4627
- "reference"
4627
+ "reference",
4628
+ "object",
4629
+ "array"
4628
4630
  ];
4629
4631
  var OPEN_MODES = ["inline", "drill", "popover", "dialog"];
4630
4632
  var OPEN_MODE_TYPES = ["object", "array", "group", "repeater", "table", "code"];
@@ -4712,7 +4714,8 @@ var isReservedKey = (key) => KEY_FORBIDDEN.has(key) || KEY_RESERVED.has(key) ||
4712
4714
  var isDeriveReservedKey = (key) => isReservedKey(key) || DERIVE_MINTED_RESERVED.has(key);
4713
4715
  var PRIMITIVE_ARRAY_RULE = {
4714
4716
  itemTypes: ["text", "number", "date", "image", "link", "richtext"],
4715
- configKeys: ["itemType", "minItems", "maxItems", "aliases"],
4717
+ // `item`: the per-item settings (the arrayItemSettings shape), as a component's `config.item`.
4718
+ configKeys: ["itemType", "minItems", "maxItems", "aliases", "item"],
4716
4719
  notWithZones: ["image", "link", "richtext"]
4717
4720
  };
4718
4721
  function canonicalNumber(value) {