@bettercms-ai/mcp 0.59.2 → 0.60.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.js CHANGED
@@ -2268,15 +2268,19 @@ var uiObject = z.object({
2268
2268
  collapsed: z.boolean().optional().describe("start this panel collapsed. Use it for long optional sections."),
2269
2269
  preview: z.object({
2270
2270
  title: z.string().min(1).optional().describe("CHILD KEY whose value titles a collapsed row"),
2271
+ subtitle: z.string().min(1).optional().describe("CHILD KEY whose value is the row's second line (e.g. 'level' \u2192 'Heading \xB7 h2')"),
2271
2272
  media: z.string().min(1).optional().describe("CHILD KEY whose value is the row's thumbnail (image/file/url all work)")
2272
2273
  }).optional().describe(
2273
- "how ONE ITEM summarises itself when collapsed. Both slots name a CHILD KEY of THIS field/prop \u2014 not a value, not a dotted path. Without it a repeater of testimonials reads 'Item 1, Item 2, Item 3'; with {title:'author', media:'avatar'} it reads the names with their faces."
2274
+ "how ONE ITEM summarises itself when collapsed. Every slot names a CHILD KEY of THIS field/prop \u2014 not a value, not a dotted path. Without it a repeater of testimonials reads 'Item 1, Item 2, Item 3'; with {title:'author', media:'avatar'} it reads the names with their faces."
2274
2275
  ),
2275
2276
  layout: z.enum(["list", "grid"]).optional().describe(
2276
2277
  "how the ITEMS are arranged. Omit (\u2261 'list') for rows of text; 'grid' for items whose thumbnail is the thing you scan \u2014 a gallery, a logo wall, a team. Same placement rule as `preview`."
2277
2278
  ),
2278
2279
  reorderable: z.boolean().optional().describe(
2279
2280
  "omit (\u2261 true) unless the order is PART OF THE MEANING. `false` LOCKS the list \u2014 a 'three steps' band that must stay three steps in that order, a nav whose order is semantic, a timeline. Valid only where there is a list to lock."
2281
+ ),
2282
+ control: z.enum(["segmented", "slider"]).optional().describe(
2283
+ "editor control for a LEAF. Omit for the default. 'segmented' on a select with a few short options (alignment, theme, size); 'slider' on a number that has config.min < config.max (opacity, columns). Anything else is refused with the rule named."
2280
2284
  )
2281
2285
  });
2282
2286
  var fieldShape = {
@@ -5896,8 +5900,8 @@ delivered value \u2014 they change editor chrome only.
5896
5900
  BARE KEY, and the key namespace is FLAT across the model (\xA7 the duplicate-key rule), so the
5897
5901
  key you reference must exist.
5898
5902
  - **\`ui.collapsed\`** \u2014 start a nesting field's panel closed. For long optional sections.
5899
- - **\`ui.preview\`** \u2014 how ONE ITEM of a nesting field summarises itself when collapsed. Both
5900
- slots name a **CHILD FIELD KEY of that field** \u2014 not a value, not a dotted path.
5903
+ - **\`ui.preview\`** \u2014 how ONE ITEM of a nesting field summarises itself when collapsed. Each
5904
+ slot (\`title\`, \`subtitle\`, \`media\`) names a **CHILD FIELD KEY of that field** \u2014 not a value, not a dotted path.
5901
5905
  Without it a repeater of ten testimonials reads "Item 1 \u2026 Item 10" and the author has to open
5902
5906
  each one to find the one they meant. \`media\` may point at an \`image\`, \`file\` or url-ish
5903
5907
  \`text\` child; the type is not constrained.
@@ -5909,19 +5913,25 @@ delivered value \u2014 they change editor chrome only.
5909
5913
  in that order, a nav whose order is semantic, a timeline. Locking a list nobody should reorder
5910
5914
  is the declaration there was previously no way to make; locking one out of tidiness takes a
5911
5915
  capability away from the author, so do not set it "just in case".
5916
+ - **\`ui.control\`** \u2014 which control a LEAF edits with; omit it for the default. \`'segmented'\` on a
5917
+ \`select\` with a few short options (alignment, theme, size: one click instead of a dropdown);
5918
+ \`'slider'\` on a \`number\` with \`config.min\` < \`config.max\` (opacity, columns). Anywhere else it
5919
+ is refused with the rule named.
5912
5920
 
5913
- **Five refusals, all deliberate, all 400 with the fix in the message.**
5921
+ **Six refusals, all deliberate, all 400 with the fix in the message.**
5914
5922
  1. An unknown key inside \`ui\` is REJECTED, not stripped. \`ui\` is a strict object precisely so
5915
5923
  that a typo is a refusal you can read instead of a 200 with your declaration gone.
5916
5924
  2. \`ui.preview\` on a LEAF field is refused \u2014 it summarises an item, and a leaf has no items.
5917
5925
  Valid on \`group\`, \`repeater\`, an \`array\` with \`config.zones\`, or \`modular\`.
5918
- 3. \`preview.title\` / \`preview.media\` naming a key that is not a child of that field is refused,
5926
+ 3. \`preview.title\` / \`preview.subtitle\` / \`preview.media\` naming a key that is not a child of that field is refused,
5919
5927
  and the error lists the valid child keys.
5920
5928
  4. \`ui.layout\` follows the same rule as \`preview\`: nesting fields only. A leaf has no items
5921
5929
  to arrange.
5922
5930
  5. \`ui.reorderable\` is STRICTER \u2014 it needs a LIST, not merely children. Valid on \`repeater\`,
5923
5931
  an \`array\` with \`config.zones.repeatable\`, or \`modular\`. A \`group\` (and a non-repeatable
5924
5932
  zone) holds exactly ONE item, so there is nothing there to drag and the write is refused.
5933
+ 6. \`ui.control\` outside its fit is refused: \`segmented\` needs a \`select\`, \`slider\` a \`number\`
5934
+ whose \`config.min\` and \`config.max\` are both set with min < max.
5925
5935
 
5926
5936
  **The same \`ui\` rides on COMPONENT PROPS.** \`create_component\` / \`update_component\` take it on
5927
5937
  each entry of \`props\`, with the placement rules the prop vocabulary implies: \`preview\` and
@@ -6583,9 +6593,10 @@ Read bettercms://playbook/schema section 14 first \u2014 it has the exact prop s
6583
6593
  **What you are setting** (all of these ride on any field, on create_content_model / create_page /
6584
6594
  add_field / add_page_field; none of them affect delivery):
6585
6595
  ui.collapsed start a nesting field's panel closed
6586
- ui.preview {title,media} which CHILD FIELD KEY titles a collapsed row, and which is its thumb
6596
+ ui.preview {title,subtitle,media} which CHILD FIELD KEY titles a collapsed row, its second line, its thumb
6587
6597
  ui.layout 'list'|'grid'|'table' how its items are arranged; table is for repeatable row schemas; omit for list
6588
6598
  ui.reorderable omit (= true) unless the ORDER IS THE MEANING; false LOCKS the list
6599
+ ui.control 'segmented'|'slider' a LEAF's control: segmented on a select, slider on a number with config.min < max
6589
6600
  helpText one line under the field: what to WRITE here
6590
6601
  showIf hide a field until another field has a value
6591
6602