@bettercms-ai/mcp 0.73.1 → 0.73.2

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.js CHANGED
@@ -2989,7 +2989,8 @@ var PARAM_TEXT = {
2989
2989
  recommendedMax: "a SOFT limit (characters, items or value): the editor warns past it, never refuses",
2990
2990
  openMode: "object/array/group/repeater: how the value (or each row) opens: 'inline', 'drill', 'popover' or 'dialog'",
2991
2991
  fromBuiltin: "a builtin:* id from list_components: copies it into the project; fields you send win",
2992
- componentPreview: "how ONE instance reads as a ROW in a parent's slot list (a /kit schema's document-level `preview`): {title?, subtitle?, media?} each a TOP-LEVEL prop key (422 preview_key_unknown otherwise), fallback? a literal row label (\u2264120), icon? a dock icon name. null clears it",
2992
+ componentPreview: "a slot row's look: {title?, subtitle?, media?} TOP-LEVEL prop keys, fallback?, icon?; null clears. \xA73 of bettercms://playbook/schema",
2993
+ componentIcon: "the block icon, a dock icon name; null clears. \xA73 of bettercms://playbook/schema",
2993
2994
  describes: "for editors: what it is and holds; omitted: written for you",
2994
2995
  runtimeBundle: "instead of pageId: the server-app bundle cleanup",
2995
2996
  pageRef: "page id or path ('/de/about'); a bare slug only when one page has it",
@@ -3723,7 +3724,7 @@ function buildToolDefs(deps) {
3723
3724
  ]).describe("block type; section/slider/tabs/columns nest child blocks"),
3724
3725
  id: z.string().min(1).describe("stable unique block id"),
3725
3726
  props: z.record(z.string(), z.unknown()).describe(
3726
- "per-type props: heading {text, level}; text/richtext {html} (NOT {text}), and both also take level 1-6, rendering the html AS that <hN> with inline marks kept (one line of inline copy only) \u2014 use it for a title that carries a styled span; image {src, alt}; button {text, href, variant? (hosted pages; else a Button component), size? sm|md|lg, fullWidth?, arrow? boolean, icon? ui.icon name, newTab? boolean, rel? nofollow|sponsored|ugc}; spacer {height}; video {url}; form {formId}; component {componentId, overrides?}; navbar {links:[{label,href}], logo?, cta?}; footer {columns, copyright?}; section {children: block[]}; columns {columns: block[][], gap} \u2014 a column may hold ANY block; slider {slides:[{id,children}]}; tabs {tabs:[{id,label,children}]}; collection {cardComponentId?, source? {modelId}, limit?, filters?, sort?, pinnedIds?, excludeCurrent?}: a collection's published entries as cards (every prop: skill content-modeling)"
3727
+ "per-type props by block type: \xA75 of bettercms://playbook/schema (text/richtext {html}, NOT {text}; button {text, href, variant?, size? sm|md|lg, fullWidth?}; component {componentId, overrides?}). Containers nest blocks to any depth."
3727
3728
  ),
3728
3729
  style: z.record(z.string(), z.unknown()).optional().describe(
3729
3730
  "design tokens: theme, bg (none|surface|muted|accent|dark|custom), bgCustom hex, paddingTop/paddingBottom/paddingSides px, contentWidth (narrow|default|wide|full), align, corner, shadow, borderTop/borderBottom, border (all four sides, in the text colour), hideOn [mobile|tablet|desktop] (all three hides it on the page: kept in the draft, never published). A real marketing band is a `section` block carrying bg + padding + contentWidth."
@@ -4092,6 +4093,7 @@ function buildToolDefs(deps) {
4092
4093
  allowedOn: allowedOn.optional(),
4093
4094
  description: z.string().optional().describe(PARAM_TEXT.describes),
4094
4095
  preview: componentPreviewArg.optional(),
4096
+ icon: dockIconArg.nullable().optional().describe(PARAM_TEXT.componentIcon),
4095
4097
  blockJson: z.array(blockObject).default([]).describe("the component's block tree"),
4096
4098
  props: z.array(componentPropObject).default([]).describe(
4097
4099
  "overridable fields. DECLARE A PROP \u2014 WITH A `target` \u2014 for every string, link and image a marketer will ever touch: only the leaves a prop targets are click-to-edit. Each one may carry `ui` to say how its control presents in the inspector \u2014 a collapsed group, what titles and thumbnails a table's rows, whether that table's rows can be dragged at all. 'button' is ONE unit {label, href, variant?, size?, arrow?, icon?, newTab?} on a button block's 'props', never a text prop plus a url prop. 'link' an href, 'date' YYYY-MM-DD, 'color' a hex, 'file' {url, name?}, 'icon' an icon name or an image, 'multiselect' a string[] from config.options (required). " + SLOT_MULTIPLE_NOTE + " " + PROP_V2_NOTE
@@ -4109,6 +4111,7 @@ function buildToolDefs(deps) {
4109
4111
  allowedOn: allowedOn.optional().describe("REPLACES the placement allowlist"),
4110
4112
  description: z.string().optional(),
4111
4113
  preview: componentPreviewArg.optional(),
4114
+ icon: dockIconArg.nullable().optional().describe(PARAM_TEXT.componentIcon),
4112
4115
  blockJson: z.array(blockObject).optional().describe("REPLACES the block tree"),
4113
4116
  props: z.array(componentPropObject).optional().describe(
4114
4117
  "REPLACES the prop array \u2014 include every prop you want to keep, WITH its stored `ui`, or that prop's authoring chrome is dropped along with the prop. Read get_component first."
@@ -6544,7 +6547,10 @@ dashboard's prop editor renders. \`helpText\` is three-state: a string is yours,
6544
6547
  purpose (send it for a prop whose /kit schema has no description; nothing refills it), and omitted
6545
6548
  lets the platform write one. They are HINTS: nothing on the write path refuses a placement
6546
6549
  that leaves a required prop empty, so \`get_site_composition\` is what reports one.
6547
- A /kit schema's document-level \`preview\` \u2192 the component's \`preview\` ({title?, subtitle?, media?} are top-level prop keys, plus \`fallback?\`, \`icon?\`); slot rows read it.
6550
+ A /kit schema's document-level \`preview\` \u2192 the component's \`preview\`: how ONE instance reads as a ROW in a parent's slot list. {title?, subtitle?, media?} each name a TOP-LEVEL prop key (422 \`preview_key_unknown\` otherwise), \`fallback?\` is a literal row label (\u2264 120) and \`icon?\` a dock icon name; null clears it.
6551
+ A /kit schema's document-level \`icon\` \u2192 the component's \`icon\` (a dock icon name from bettercms://icons/dock, null clears): the block icon on the root crumb, slot rows and slot child frames.
6552
+
6553
+ **Prop types, one rule each.** 'select' REQUIRES \`config.options\` (a default must be one of them). 'group'/'table'/'object' REQUIRE \`config.fields\` (\`[{key,label,type,options?,fields?}]\`); a group writes an object, a table an array of them (\`config.mode: 'data'\`: ONE V2 table value, no fields). 'number' takes optional \`config.min/max/step\`. 'slot' holds ONE nested component instance: \`target.path: 'props'\` on an EMPTY component block (\`props.componentId: ""\`), \`config.componentIds\` restricts fills, defaultValue \`{componentId, overrides?}\`. 'form' holds ONE Form document: \`target.path: 'props'\` on an EMPTY form block (\`props.formId: ""\`), defaultValue \`{formId}\`, never the hydrated \`{formId, form}\` (400); do NOT re-declare the form's FIELDS as props, the Form document owns them. 'button' is ONE unit \`{label, href, variant?, size?, arrow?, icon?, newTab?}\` on a button block's 'props', never a text prop plus a url prop. 'link' an href, 'date' YYYY-MM-DD, 'color' a hex, 'file' \`{url, name?}\`, 'icon' an icon name or an image, 'multiselect' a string[] from \`config.options\` (required).
6548
6554
 
6549
6555
  \u{1F534} **On a components-first page, \`props\` is the ONLY editing surface.** Click-to-edit binds
6550
6556
  \`heading\`/\`text\`/\`button\`/\`image\` blocks; it does **not** bind a \`component\` block, because
@@ -6602,8 +6608,10 @@ config keys (\`componentIds\`, \`multiple\`, \`minItems\`/\`maxItems\`, \`slotSe
6602
6608
  sits at its key in the object or row, \`{ componentId, overrides? }\` or a list with
6603
6609
  \`config.multiple\`, judged like a slot prop's: the same allowlist, depth cap and cycle refusal.
6604
6610
  A list of several item shapes on a component is a \`table\` prop with
6605
- \`config.mode: 'types'\` and \`config.itemTypes: [{ name, label?, fields }]\`, rows
6606
- \`[{ _key?, _type: '<name>', ...values }]\`.
6611
+ \`config.mode: 'types'\` and \`config.itemTypes: [{ name, label?, fields, preview?, icon? }]\`, rows
6612
+ \`[{ _key?, _type: '<name>', ...values }]\`. An item type's \`preview\` names its OWN fields (dotted ok, \`<table>.caption\`).
6613
+
6614
+ **Block props by type** (a block's \`props\` in any \`blockJson\`): heading {text, level 1-6}; text/richtext {html} (NOT {text}), both also take level 1-6, rendering the html AS that <hN> with inline marks kept (one line of inline copy only); image {src (asset url), alt, caption?}; button {text, href, variant (hosted pages; else a Button component), size sm|md|lg, fullWidth, arrow, icon (a ui.icon name), newTab, rel nofollow|sponsored|ugc}; spacer {height px}; video {url, poster?}; form {formId}; component {componentId, overrides?}; navbar {links:[{label,href}], logo?, cta?}; footer {columns:[{heading?,links}], copyright?}; section {children: block[], background?, paddingY?, maxWidth?}; columns {columns: block[][], gap} (a column may hold ANY block); slider {slides:[{id,children:block[]}]}; tabs {tabs:[{id,label,children:block[]}]}; collection {cardComponentId?, source? {modelId}, limit?, filters?, sort?, pinnedIds?, excludeCurrent?}: a collection's published entries as cards. Containers nest blocks to any depth.
6607
6615
 
6608
6616
  A component inside a \`richtext\` value is \`{ _type: 'bcmsBlock', _key, schemaKey: 'component',
6609
6617
  schemaLabel?, fields: { componentId, overrides?, variant? } }\` and FOLLOWS the component: publishing
@@ -7255,7 +7263,7 @@ conversion is yours to write.
7255
7263
  markup inside a \`text\` field.
7256
7264
  **Prose MIGRATED from another CMS needs one extra check.** Every block's \`_type\` must be one
7257
7265
  this platform stores \u2014 \`block\`, \`table\` (\`{_type:"table", rows:[{_key, cells:[{_key,
7258
- content:[...blocks], header?, group?}], group?}], caption?, notes?, rowGroups?, columnGroups?}\`,
7266
+ content:[...blocks], header?, group?, highlight?, sortable?}], group?, footer?, highlight?}], caption?, notes?, rowGroups?, columnGroups?, filterable?, jsonLd?: {type: "ItemList"|"Dataset"|"Offers", axis?, priceRow?}, design?: {responsive?: "stack"|"cards", sticky?}}\`,
7259
7267
  groups \`[{_key, label}]\`; Sanity's row of plain strings, \`rows:[{cells:["a","b"]}]\`,
7260
7268
  is admitted too), \`bcmsCode\`, \`bcmsDivider\`, \`bcmsMention\`, \`pullQuote\`
7261
7269
  (\`{quote, name, role?, link?}\`), \`keyTakeaways\` (\`{title?, points:[...strings]}\`,