@bettercms-ai/kit 3.1.14 → 3.1.15
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/adapters/prod-types.d.ts +2 -0
- package/dist/adapters/prod-types.js.map +1 -1
- package/dist/adapters/schema.js +9 -1
- package/dist/adapters/schema.js.map +1 -1
- package/dist/controls/choice.js +10 -0
- package/dist/controls/choice.js.map +1 -1
- package/dist/controls/rich-text/markdown.js +57 -7
- package/dist/controls/rich-text/markdown.js.map +1 -1
- package/dist/engine/schema-form.js +5 -1
- package/dist/engine/schema-form.js.map +1 -1
- package/dist/library/kit-catalog.json +1 -1
- package/package.json +1 -1
|
@@ -1397,7 +1397,7 @@
|
|
|
1397
1397
|
{"id":"accordion-feature-image-swap","name":"Accordion features with image swap","category":"Features & storytelling","kind":"block","tags":["repeater","media-heavy","a11y","variants","rich-text"],"proves":"One required image per item drives a shared media slot · open-state as design, not content","why":"Each accordion item OWNS the image shown while it is open, so the image lives on the item (required) rather than in a parallel array the editor would have to keep in sync. Which item starts open is a design toggle, not a per-item boolean, so there can never be two “default open” items. It is an array, not the FAQ block: these are product features with media, not questions, and must not emit FAQPage JSON-LD.","htmlSignals":["`<details>/<summary>` or buttons with `aria-expanded` in one column, and ONE large image in the other column","JS that swaps the image `src` (or toggles opacity on stacked images) when a row opens","Several `<img>` stacked absolutely with only one visible, one per accordion row"],"mcp":"Count accordion rows and images: if image count equals row count (stacked or swapped), map row i → image i. Summary/button text → title, revealed content → body (portable rich text, keep links), trailing link → link. If rows have NO images, this is an FAQ or plain accordion, not this entry. Image column side → variant. If the first row is expanded by default → isFirstOpen; a progress bar on the open row → autoplay.","pitfalls":["Images of different aspect ratios cause the layout to jump on every click — warn when the source images differ.","Do not tag these rows as FAQ structured data — they are not questions."],"notCarried":["variants"],"component":{"name":"Accordion features","slug":"accordion-features","props":[{"key":"eyebrow","label":"Eyebrow","type":"text","config":{"maxLength":32},"ui":{"tab":{"id":"content","label":"Content","order":0}}},{"key":"heading","label":"Heading","type":"text","required":true,"ai":true,"recommendedMax":60,"localized":true,"ui":{"tab":{"id":"content"}}},{"key":"items","label":"Features","type":"table","config":{"minItems":2,"maxItems":7,"fields":[{"key":"title","label":"Title","type":"text","required":true,"ai":true,"localized":true,"config":{"maxLength":56}},{"key":"body","label":"Body","type":"richtext","ai":true,"localized":true,"config":{"features":["bold","italic","underline","strikethrough","code","highlight","blockquote","horizontalRule","orderedList","unorderedList","checklist","link","internalLink","inlineImage","videoEmbed","codeBlock","table","columns","h1","h2","h3","h4","h5","h6","gallery","embed","tableOfContents","relatedPosts","authorBio","footnotes","button"]}},{"key":"image","label":"Image","type":"image","helpText":"Replaces the main image while this row is open.","required":true,"ui":{"tab":{"id":"media"}}},{"key":"link","label":"Link","type":"link"}]},"ui":{"itemLabel":"Feature","icon":"chevron-down","preview":{"title":"title","media":"image","fallback":"Untitled feature"},"tab":{"id":"content"}}},{"key":"isFirstOpen","label":"Open the first feature","type":"boolean","defaultValue":true,"ui":{"tab":{"id":"design","label":"Design","order":2}}},{"key":"autoplay","label":"Play automatically","type":"boolean","ui":{"tab":{"id":"design"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design"}}}],"description":"An accordion of features; opening one swaps the image beside it","category":"Features & storytelling","icon":"list-details","preview":{"title":"heading","icon":"layout-list"},"tabs":[{"id":"media","label":"Media","order":1}]}},
|
|
1398
1398
|
{"id":"comparison-vs-competitors","name":"Comparison vs competitors","category":"Features & storytelling","kind":"block","tags":["deep-nesting","conditional","repeater","validation","a11y","variants"],"proves":"Brand columns + one `table` keyed by brand key (reorder-safe) · row groups · Yes / no with words · partial answers as Text cells · source in the table's own note + a required last-checked date","why":"A comparison table is 2-D data: brand COLUMNS (name, logo, badge, price, button: the header) + one `table` (CPO D42) whose brand columns are keyed by the same `key`, so adding or reordering a competitor never shifts a value into the wrong column. Rows sit in row groups (tbody + th scope=rowgroup) instead of 5 drill levels. Brand columns are Yes / no, written as ✓ plus the words 'Included' / 'Not included'; a row of words is a Text row and a partial answer is one Text cell ('Partly: rules written by hand'); explainers are footnotes, so their words stay on the page. The source line is the table's own note (rendered under the table and linked with aria-describedby), not a second block field; the last-checked date is a required field because comparative advertising claims go stale. If the same competitors appear on several pages, columns should become references to a `col_competitors` collection.","htmlSignals":["A `<table>` (or CSS grid) whose header row contains brand names/logos, with the first data column of capability names","Cells containing check/cross SVGs, ✓ ✗ characters or `aria-label=\"Included\"`","One header column visually highlighted (tinted background, “Recommended” badge)","`<tbody>` sections or full-width rows acting as group headers (`colspan`)","Small print below: “Compared on …”, “Based on public pricing”, trademark notice"],"mcp":"Header cells → columns (slugify the name for `key`; img → logo; highlighted column → isHighlighted + badge text) AND the table's brand columns with `_key` = that key, type Yes / no. Body via the table detector (docs/TABLES.md): first cell → row header (tooltip → footnote); check icon/✓/“Yes”/aria-label included → true; cross/✗/“—”/“No” → false; “Limited”/“Partial” + words → a Text cell with those words; a row of words → row type Text. Full-width rows (colspan) start a row group. Small print under the table (source, trademark notice) → the table's `notes`; parse a date in it → verifiedOn, otherwise set verifiedOn to the import date and flag it for review. Never emit a separate `footnote` field on the block.","pitfalls":["RESOLVED (D42): cells are keyed by column; never emit positional cells.","Icons without text alternatives fail screen readers; the enum lets the renderer output “Included”/“Not included”.","Comparative claims without a date and source are a legal risk — `verifiedOn` is required on purpose."],"notCarried":["variants"],"component":{"name":"Competitor comparison","slug":"competitor-comparison","props":[{"key":"eyebrow","label":"Eyebrow","type":"text","config":{"maxLength":32},"ui":{"tab":{"id":"content","label":"Content"}}},{"key":"heading","label":"Heading","type":"text","required":true,"ai":true,"recommendedMax":60,"localized":true,"ui":{"tab":{"id":"content"}}},{"key":"intro","label":"Intro","type":"longtext","localized":true,"ui":{"rows":2,"tab":{"id":"content"}}},{"key":"columns","label":"Columns","type":"table","helpText":"The first column is you.","config":{"minItems":2,"maxItems":5,"fields":[{"key":"key","label":"Key","type":"slug","required":true,"unique":true,"readOnly":"developer","lockReason":"The table's column uses this key. Changing it would orphan its cells.","ui":{"access":{"edit":"schema.manage"}}},{"key":"name","label":"Name","type":"text","required":true,"config":{"maxLength":24}},{"key":"logo","label":"Logo","type":"image","helpText":"SVG or a transparent PNG."},{"key":"isHighlighted","label":"Highlight this column","type":"boolean"},{"key":"badge","label":"Badge","type":"text","showIf":{"match":"all","rules":[{"field":"isHighlighted","op":"eq","value":"true"}]},"placeholder":"Best value","config":{"maxLength":16}},{"key":"price","label":"Price line","type":"text","placeholder":"$29 / month","config":{"maxLength":24}},{"key":"button","label":"Button","type":"button","showIf":{"match":"all","rules":[{"field":"isHighlighted","op":"eq","value":"true"}]}}]},"ui":{"itemLabel":"Column","icon":"columns","preview":{"title":"name","subtitle":"key","media":"logo","fallback":"Untitled column"},"tab":{"id":"columns","label":"Brands"}}},{"key":"comparison","label":"Comparison","type":"table","required":true,"localized":true,"config":{"mode":"data","maxColumns":6,"maxRows":60,"columnTypes":["text","boolean","number","money","rating","link"],"jsonLd":["ItemList"],"settings":{"totals":false,"phones":[]}},"ui":{"tab":{"id":"content"}}},{"key":"verifiedOn","label":"Last checked","type":"date","helpText":"Shown under the table.","required":true,"ui":{"tab":{"id":"content"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design","label":"Design"}}}],"description":"Your product against alternatives, row by row: included, not included, or a few words","category":"Features & storytelling","icon":"vs","preview":{"title":"heading","icon":"table"}}},
|
|
1399
1399
|
{"id":"stats-band","name":"Stats band","category":"Features & storytelling","kind":"block","tags":["repeater","validation","variants","a11y","localized"],"proves":"Numbers stored as numbers (prefix/value/suffix) so they localise and count up · per-stat source + as-of date","why":"A stat is split into prefix · number · suffix so the number is real data: it can animate, be formatted per locale (1.2M vs 1,2 M) and be checked. The core `statBlock` stores a display string (\"120k+\") for quick bento cells — this section is for numbers that matter and need a SOURCE and AS-OF date (health, finance and B2B claims get audited). Count-up is design; the renderer skips it under reduced motion and always outputs the final number in the HTML.","htmlSignals":["A row of 2–5 items each with a very large number (font-size ≥ 2.5rem) and a small label beneath","`data-count`, `data-target`, `countup`, `odometer` attributes or classes","Numbers with units/magnitudes: “94%”, “$2.4B”, “11 min”, “10k+”","Footnote markers (*, †, superscript numbers) linking to a sources line"],"mcp":"Parse each big number with a regex: leading non-digits → prefix, the number (strip thousands separators; respect the page locale's decimal mark) → value, trailing text → suffix (keep the leading space if present), digits after the decimal → decimals. Prefer the `data-target`/`data-count` attribute over the visible text when both exist (the visible text may be mid-animation “0”). Label → label. Footnote text with a URL → source; any date in it → asOf. Presence of count-up attributes → useCountUp true.","pitfalls":["Scraping during a count-up animation captures “0” — read the data attribute or wait for the final value.","“1.2M” is value 1.2 + suffix M, not 1200000 with no suffix, unless the design formats compact numbers itself."],"notCarried":["variants"],"component":{"name":"Stats band","slug":"stats-band","props":[{"key":"heading","label":"Heading","type":"text","helpText":"Heading + stats layout only.","ai":true,"recommendedMax":60,"localized":true,"ui":{"tab":{"id":"content","label":"Content"}}},{"key":"stats","label":"Stats","type":"table","config":{"minItems":2,"maxItems":5,"fields":[{"key":"prefix","label":"Before","type":"text","helpText":"Shown before the number, e.g. $.","placeholder":"$","config":{"maxLength":3}},{"key":"value","label":"Number","type":"number","helpText":"Digits only. Formatting is added per language.","required":true,"config":{"step":0.1}},{"key":"suffix","label":"After","type":"text","helpText":"Shown after the number, e.g. %, k+, yrs.","placeholder":"k+","config":{"maxLength":6}},{"key":"decimals","label":"Decimals","type":"number","defaultValue":0,"advanced":true,"config":{"min":0,"max":2,"step":1}},{"key":"label","label":"Label","type":"text","required":true,"localized":true,"config":{"maxLength":48}},{"key":"source","label":"Source","type":"link"},{"key":"asOf","label":"As of","type":"date"}]},"ui":{"itemLabel":"Stat","icon":"number","preview":{"title":"label","subtitle":"value","fallback":"Untitled stat"},"tab":{"id":"content"}}},{"key":"useCountUp","label":"Count up on scroll","type":"boolean","defaultValue":true,"ui":{"tab":{"id":"design","label":"Design"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design"}}}],"description":"Three to five big numbers in a row, each with its source","category":"Features & storytelling","icon":"chart-bar","preview":{"title":"heading","icon":"chart-bar"}}},
|
|
1400
|
-
{"id":"manifesto-pull-quote","name":"Manifesto / pull quote","category":"Features & storytelling","kind":"block","tags":["conditional","rich-text","variants","localized"],"proves":"Mode select swaps an array of rich-text lines for a single quote · overlay shown only when a background exists (notEmpty)","why":"One block covers both a multi-line manifesto and a single pull quote because they share attribution and treatment; a `mode` select decides which content field shows so editors never see both. Each manifesto line is a tiny RICH-TEXT value (italic for emphasis only) rather than a plain string with markup, so emphasis survives translation. Attribution is a small inline object. The overlay slider only appears when a background image exists (`notEmpty` condition).","htmlSignals":["Very large type (≥ 2.5rem) over a full-width section with a few short lines or one `<blockquote>`","`<blockquote>` with `<cite>` or a `<figcaption>` holding name/role, often with a signature `<img>`","Lines revealed one at a time on scroll (`data-aos`, GSAP `SplitText`, staggered opacity)"],"mcp":"One `<blockquote>` (or one paragraph in display type) → mode quote, quote text WITHOUT surrounding quotation marks (the renderer adds typographic quotes). Several short display-size lines/paragraphs → mode lines, one line per element, keeping `<em>`/`<i>` as italic marks and dropping spans used only for color. `<cite>`/caption → attribution.name / role; signature image → attribution.signature. Section background-image → background + overlay from the gradient/scrim opacity.","pitfalls":["Quotation marks typed into content double up with the design's quotes — strip them.","Lines split by `<br>` inside one paragraph are still separate lines."],"notCarried":["
|
|
1400
|
+
{"id":"manifesto-pull-quote","name":"Manifesto / pull quote","category":"Features & storytelling","kind":"block","tags":["conditional","rich-text","variants","localized"],"proves":"Mode select swaps an array of rich-text lines for a single quote · overlay shown only when a background exists (notEmpty)","why":"One block covers both a multi-line manifesto and a single pull quote because they share attribution and treatment; a `mode` select decides which content field shows so editors never see both. Each manifesto line is a tiny RICH-TEXT value (italic for emphasis only) rather than a plain string with markup, so emphasis survives translation. Attribution is a small inline object. The overlay slider only appears when a background image exists (`notEmpty` condition).","htmlSignals":["Very large type (≥ 2.5rem) over a full-width section with a few short lines or one `<blockquote>`","`<blockquote>` with `<cite>` or a `<figcaption>` holding name/role, often with a signature `<img>`","Lines revealed one at a time on scroll (`data-aos`, GSAP `SplitText`, staggered opacity)"],"mcp":"One `<blockquote>` (or one paragraph in display type) → mode quote, quote text WITHOUT surrounding quotation marks (the renderer adds typographic quotes). Several short display-size lines/paragraphs → mode lines, one line per element, keeping `<em>`/`<i>` as italic marks and dropping spans used only for color. `<cite>`/caption → attribution.name / role; signature image → attribution.signature. Section background-image → background + overlay from the gradient/scrim opacity.","pitfalls":["Quotation marks typed into content double up with the design's quotes — strip them.","Lines split by `<br>` inside one paragraph are still separate lines."],"notCarried":["variants"],"component":{"name":"Manifesto","slug":"manifesto","props":[{"key":"eyebrow","label":"Eyebrow","type":"text","config":{"maxLength":32},"ui":{"tab":{"id":"content","label":"Content"}}},{"key":"mode","label":"Content","type":"select","defaultValue":"lines","config":{"options":[{"label":"Lines","value":"lines"},{"label":"Quote","value":"quote"}]},"ui":{"control":"segmented","tab":{"id":"content"}}},{"key":"lines","label":"Lines","type":"array","showIf":{"match":"all","rules":[{"field":"mode","op":"eq","value":"lines"}]},"config":{"minItems":2,"maxItems":8,"itemType":"richtext","item":{"localized":true,"helpText":"Italic words are emphasised.","features":["italic"]}},"ui":{"itemLabel":"Line","tab":{"id":"content"}}},{"key":"quote","label":"Quote","type":"longtext","helpText":"Without quotation marks; the design adds them.","required":true,"showIf":{"match":"all","rules":[{"field":"mode","op":"eq","value":"quote"}]},"recommendedMax":220,"localized":true,"ui":{"rows":4,"tab":{"id":"content"}}},{"key":"attribution","label":"Attribution","type":"object","openMode":"inline","config":{"fields":[{"key":"name","label":"Name","type":"text","config":{"maxLength":48}},{"key":"role","label":"Role","type":"text","localized":true,"config":{"maxLength":64}},{"key":"signature","label":"Signature","type":"image","helpText":"A transparent PNG or SVG."}]},"ui":{"icon":"signature","tab":{"id":"content"}}},{"key":"background","label":"Background image","type":"image","ui":{"tab":{"id":"media","label":"Media"}}},{"key":"overlay","label":"Image overlay","type":"number","defaultValue":45,"showIf":{"match":"all","rules":[{"field":"background","op":"notEmpty"}]},"config":{"min":0,"max":80,"step":5,"unit":"%"},"ui":{"control":"slider","tab":{"id":"design","label":"Design"}}},{"key":"size","label":"Type size","type":"select","defaultValue":"xl","config":{"options":[{"label":"Large","value":"lg"},{"label":"Extra large","value":"xl"},{"label":"Display","value":"display"}]},"ui":{"control":"segmented","tab":{"id":"design"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design"}}}],"description":"A big-type statement of belief or a single pull quote, with attribution","category":"Features & storytelling","icon":"blockquote","preview":{"title":"eyebrow","subtitle":"attribution.name","icon":"quote"}}},
|
|
1401
1401
|
{"id":"problem-solution","name":"Problem → solution","category":"Features & storytelling","kind":"block","tags":["repeater","variants","validation"],"proves":"Pairs keep both columns aligned · column labels as small objects with defaults","why":"Problems and solutions are stored as PAIRS, not two independent arrays, because the strongest version of this section lines each pain up with its fix — two arrays drift (four problems, three solutions) and the paired layout breaks. The two-column variant reads the same data column-wise. Column labels and summaries are small objects with sensible defaults so the common case needs no typing.","htmlSignals":["Two columns labeled “Before / After”, “Without X / With X”, “The old way / The new way”","One column with ✗ / red / strikethrough items, the other with ✓ / green items","Equal item counts in both columns, often vertically aligned"],"mcp":"Find the two lists; take their headers → problem.label / solution.label. If counts match, zip item i of each list into a pair; if they differ, create pairs for the shorter length and append the leftovers with an empty partner and a review flag. Small numeric callouts (“6 hours saved”) → metric. Strike-through/red styling → tone warning. Layout: rows where each problem sits next to its fix → pairs, two independent stacks → columns.","pitfalls":["Unequal lists in the source must not be silently truncated — flag them."],"notCarried":["variants"],"component":{"name":"Problem and solution","slug":"problem-solution","props":[{"key":"eyebrow","label":"Eyebrow","type":"text","config":{"maxLength":32},"ui":{"tab":{"id":"content","label":"Content"}}},{"key":"heading","label":"Heading","type":"text","required":true,"ai":true,"recommendedMax":60,"localized":true,"ui":{"tab":{"id":"content"}}},{"key":"problem","label":"Problem side","type":"object","config":{"fields":[{"key":"label","label":"Column label","type":"text","defaultValue":"Without Ledgerly","localized":true,"config":{"maxLength":32}},{"key":"summary","label":"Summary","type":"longtext","localized":true,"ui":{"rows":2}}]},"ui":{"icon":"alert-triangle","tab":{"id":"content"}}},{"key":"solution","label":"Solution side","type":"object","config":{"fields":[{"key":"label","label":"Column label","type":"text","defaultValue":"With Ledgerly","localized":true,"config":{"maxLength":32}},{"key":"summary","label":"Summary","type":"longtext","localized":true,"ui":{"rows":2}},{"key":"button","label":"Button","type":"button"}]},"ui":{"icon":"circle-check","tab":{"id":"content"}}},{"key":"pairs","label":"Pairs","type":"table","config":{"minItems":2,"maxItems":6,"fields":[{"key":"problem","label":"Problem","type":"text","required":true,"ai":true,"localized":true,"config":{"maxLength":90}},{"key":"solution","label":"Solution","type":"text","required":true,"ai":true,"localized":true,"config":{"maxLength":90}},{"key":"metric","label":"Proof","type":"text","localized":true,"placeholder":"4 hours saved a month","config":{"maxLength":40}}]},"ui":{"itemLabel":"Pair","icon":"arrows-exchange","preview":{"title":"problem","subtitle":"solution","fallback":"Untitled pair"},"tab":{"id":"content"}}},{"key":"tone","label":"Problem tone","type":"select","defaultValue":"muted","config":{"options":[{"label":"Muted","value":"muted"},{"label":"Warning","value":"warning"}]},"ui":{"control":"segmented","tab":{"id":"design","label":"Design"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design"}}}],"description":"The pain your buyer has today, set against how you fix it","category":"Features & storytelling","icon":"arrows-exchange","preview":{"title":"heading","icon":"arrows-exchange"}}},
|
|
1402
1402
|
{"id":"integrations-grid","name":"Integrations grid","category":"Features & storytelling","kind":"block","tags":["dynamic-query","references","conditional","variants","media-heavy"],"proves":"Dynamic query vs manual references to a collection · filter chips derived from referenced categories","why":"Integrations are REFERENCED, not inlined: each one has its own detail page (/integrations/stripe), logo, category and description, and appears on several pages — that is a collection (`col_integrations`) with a category reference (`col_integration_categories`). The section stores only HOW to pick: a dynamic query (categories, featured, limit, sort) so new integrations appear automatically, or a manual list of references for a curated row. Filter chips are derived from the categories of what is shown, so there is no second list to maintain. Inline the items only when the site has no integration pages and fewer than ~12 logos.","htmlSignals":["A grid of 12+ tiles each with a third-party logo, a product name and a short line, linking to `/integrations/<slug>`","Filter chips or a sidebar of categories (“All”, “Payments”, “CRM”) with `data-filter`/`aria-pressed`","A search input filtering the tiles; a “See all integrations” link"],"mcp":"If tiles link to per-integration pages (shared `/integrations/` prefix), create or match `col_integrations` entries (name, slug from href, logo, one-line description, category from the active filter or a `data-category` attribute) and set source to `query` with the categories present. If tiles do not link anywhere, use source `manual` and create entries anyway so logos are reusable. Filter chip labels → integration category entries (skip “All”). A visible search box → showSearch. Count tiles shown before a “See all” link → limit.","pitfalls":["Brand logos have usage rules — keep the original SVG, never recolor it in content; `isMonochrome` is a render-time filter.","Category options cannot come from a sibling array in our schema, which is exactly why categories are a referenced collection."],"notCarried":["variants"],"component":{"name":"Integrations grid","slug":"integrations-grid","props":[{"key":"eyebrow","label":"Eyebrow","type":"text","config":{"maxLength":32},"ui":{"tab":{"id":"content","label":"Content"}}},{"key":"heading","label":"Heading","type":"text","required":true,"ai":true,"recommendedMax":60,"localized":true,"ui":{"tab":{"id":"content"}}},{"key":"subheading","label":"Subheading","type":"longtext","localized":true,"ui":{"rows":2,"tab":{"id":"content"}}},{"key":"source","label":"Which integrations","type":"select","defaultValue":"query","config":{"options":[{"label":"From the Integrations collection","value":"query","description":"New integrations appear here on their own"},{"label":"Pick them","value":"manual","description":"A fixed list in your order"}]},"ui":{"control":"radio","tab":{"id":"content"}}},{"key":"categories","label":"Categories","type":"multi-reference","helpText":"Leave empty for all categories.","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"config":{"contentModelId":"col_integration_categories"},"ui":{"tab":{"id":"content"}}},{"key":"showFeaturedOnly","label":"Featured only","type":"boolean","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"ui":{"tab":{"id":"content"}}},{"key":"limit","label":"How many","type":"number","defaultValue":24,"showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"config":{"min":4,"max":96,"step":4},"ui":{"tab":{"id":"content"}}},{"key":"sort","label":"Sort by","type":"select","defaultValue":"popular","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"config":{"options":[{"label":"Most used","value":"popular"},{"label":"A to Z","value":"az"},{"label":"Newest","value":"new"}]},"ui":{"tab":{"id":"content"}}},{"key":"items","label":"Integrations","type":"multi-reference","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"manual"}]},"config":{"min":4,"max":48,"contentModelId":"col_integrations"},"ui":{"itemLabel":"Integration","layout":"gallery","itemName":"integration","tab":{"id":"content"}}},{"key":"showFilter","label":"Show category filter","type":"boolean","defaultValue":true,"ui":{"tab":{"id":"content"}}},{"key":"showSearch","label":"Show search","type":"boolean","ui":{"tab":{"id":"content"}}},{"key":"viewAllButton","label":"View all button","type":"button","helpText":"Hidden when everything already fits.","ui":{"tab":{"id":"content"}}},{"key":"columns","label":"Columns on desktop","type":"number","defaultValue":4,"config":{"min":3,"max":6,"step":1},"ui":{"control":"slider","tab":{"id":"design","label":"Design"}}},{"key":"isMonochrome","label":"Monochrome logos","type":"boolean","ui":{"tab":{"id":"design"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design"}}}],"description":"Logos of the tools you connect with, filterable by category, each linking to its page","category":"Features & storytelling","icon":"plug-connected","preview":{"title":"heading","icon":"plug-connected"}}},
|
|
1403
1403
|
{"id":"testimonial-grid","name":"Testimonial grid","category":"Social proof","kind":"block","tags":["references","dynamic-query","conditional","variants","validation"],"proves":"References to a Testimonials collection · pick vs query (tags, limit, min rating) · uniqueness","why":"Testimonials are REFERENCES to `col_testimonials` because the same quote appears on the home page, product pages and the reviews page, and each one carries facts that must not drift between copies: the customer's consent date, their exact words, rating, photo and the product they bought. The section only stores which ones and how many. A query mode (by tag, limit, minimum rating) keeps product pages fresh without hand-curation. Inline the quotes only for a one-off campaign page whose quotes appear nowhere else.","htmlSignals":["A grid/masonry (`column-count`, `grid-auto-flow: dense`) of 3+ cards each with a quote, a person name, a role/company and often an avatar","Star ratings (5 SVG stars, `aria-label=\"5 out of 5 stars\"`, ★ characters)","`<blockquote>` + `<figcaption>`/`<cite>` per card","Headings like “What customers say”, “Reviews”, “Loved by …”"],"mcp":"For each card, create or match a `col_testimonials` entry: quote (strip surrounding quotation marks), name, role, company, photo, rating (count filled stars or parse aria-label), product if the card names one. Match existing entries by name + first 40 characters of the quote before creating. Store references in source `pick` in DOM order. Uniform card heights → grid; varying heights → masonry; one large first card → featured. Never import a testimonial without a name — flag it.","pitfalls":["Inlining quotes creates copies that drift when the customer asks for an edit or removal — reference them.","Grids look broken with 4 or 5 items in a 3-column layout; validation nudges multiples of 3.","Do not emit Review JSON-LD for testimonials about your own business — Google ignores self-serving reviews."],"notCarried":["variants"],"component":{"name":"Testimonial grid","slug":"testimonial-grid","props":[{"key":"eyebrow","label":"Eyebrow","type":"text","config":{"maxLength":32},"ui":{"tab":{"id":"content","label":"Content"}}},{"key":"heading","label":"Heading","type":"text","required":true,"ai":true,"recommendedMax":60,"localized":true,"ui":{"tab":{"id":"content"}}},{"key":"source","label":"Which testimonials","type":"select","defaultValue":"pick","config":{"options":[{"label":"Pick them","value":"pick","description":"A fixed set in your order"},{"label":"Latest matching","value":"query","description":"Filled from the collection by tag"}]},"ui":{"control":"radio","tab":{"id":"content"}}},{"key":"testimonials","label":"Testimonials","type":"multi-reference","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"pick"}]},"unique":true,"config":{"min":3,"max":12,"contentModelId":"col_testimonials"},"ui":{"itemLabel":"Testimonial","tab":{"id":"content"}}},{"key":"tags","label":"Tagged","type":"tags","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"ui":{"tab":{"id":"content"}}},{"key":"limit","label":"How many","type":"number","defaultValue":6,"showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"config":{"min":3,"max":12,"step":3},"ui":{"tab":{"id":"content"}}},{"key":"minRating","label":"Minimum rating","type":"rating","helpText":"Leave empty to include quotes without a rating.","showIf":{"match":"all","rules":[{"field":"source","op":"eq","value":"query"}]},"config":{"step":0.1},"ui":{"tab":{"id":"content"}}},{"key":"showRating","label":"Show rating","type":"boolean","defaultValue":true,"ui":{"tab":{"id":"design","label":"Design"}}},{"key":"showPhotos","label":"Show photos","type":"boolean","defaultValue":true,"ui":{"tab":{"id":"design"}}},{"key":"button","label":"Button","type":"button","ui":{"tab":{"id":"content"}}},{"key":"theme","label":"Theme","type":"select","defaultValue":"light","config":{"options":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"},{"label":"Brand","value":"brand"}]},"ui":{"control":"segmented","tab":{"id":"design"}}}],"description":"Customer quotes from the Testimonials collection, in a grid or masonry","category":"Social proof","icon":"message-star","preview":{"title":"heading","icon":"message-star"}}},
|