@bettercms-ai/kit 3.1.14 → 3.1.16
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/dom.d.ts +3 -0
- package/dist/controls/rich-text/dom.js +6 -1
- package/dist/controls/rich-text/dom.js.map +1 -1
- package/dist/controls/rich-text/editor.js +6 -4
- package/dist/controls/rich-text/editor.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/controls/rich-text/ops.d.ts +2 -2
- package/dist/controls/rich-text/ops.js +28 -7
- package/dist/controls/rich-text/ops.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-form.js","names":[],"sources":["../../src/engine/schema-form.tsx"],"sourcesContent":["/**\n * <SchemaForm> — the BetterCMS Block Kit form engine (V2 HEAD 9829bf1 kit/engine/schema-form.tsx). One schema in, one\n * value out; renders through the shared field chrome; owns validation visibility, per-field undo + history (coalesced\n * 900ms, 50 steps), the published baseline (changed dots, Reset to published) and the navigation path.\n *\n * <SchemaForm schema={faq} value={v} onChange={setV} variant=\"panel\" />\n *\n * `path` is controllable so a canvas can sync selection <-> breadcrumb both ways. Frames (root, drilled object, array\n * item, slot block, button, history) come from lib/frames `resolveFrames`; the drill-in stage, crumbs and keys\n * (Esc / Alt+Up/Down) from frame.tsx and breadcrumb.tsx; the layout of each frame from grouping.tsx through field-list.\n *\n * The host provides the kit scope (`data-kit-scope`) around the form; the form never declares one of its own, so a\n * dark host scope is never reset to light inside it.\n */\nimport * as React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport type { Condition, FieldPath, FieldSchema, TypeSchema } from \"../schema/types\";\nimport { DEFAULT_ENV, fieldAccessOf, FormProvider, KitEnvProvider, useForm, useKitEnv, visibleSchema, type FormApi, type HistoryEntry, type KitEnv, type KitPeer, type Swatch } from \"../context\";\nimport { resolveFrames } from \"../lib/frames\";\nimport { getIn, isObj, keyStartsWith, pathEq, pathKey, same, setIn } from \"../lib/path\";\nimport { condCtx, failingRules, isHidden } from \"../lib/schema\";\nimport { collectIssues, type KitIssue, type UniquePeers } from \"../lib/validate\";\nimport { RowsHostContext } from \"./array\";\nimport { crumbSignature, FrameCrumbs, framesToCrumbs, type KitCrumb } from \"./breadcrumb\";\nimport { FieldList, type FieldListProps } from \"./field-list\";\nimport { FrameSlotsProvider, FrameStage, useFrameNavigation, type FrameSlots } from \"./frame\";\nimport { FieldList as GroupedFieldList, FieldSection } from \"./grouping\";\nimport { KitField, NestedForm } from \"./kit-field\";\nimport { TableFrame } from \"../controls/table/table\";\nimport { ButtonScreen } from \"../controls/button\";\n\nexport interface SchemaFormProps {\n schema: TypeSchema;\n value: Record<string, unknown>;\n onChange: (value: Record<string, unknown>) => void;\n /** controlled navigation path ([] = root). Omit for uncontrolled. */\n path?: FieldPath;\n defaultPath?: FieldPath;\n onPathChange?: (path: FieldPath) => void;\n /** \"panel\" = 320–420px inspector; \"document\" = the wide document editor column */\n variant?: \"panel\" | \"document\";\n /** resolve a block type (slot children) to its schema */\n resolveSchema?: (blockType: string) => TypeSchema | undefined;\n /** blocks offered by \"+ Add block\" (filtered by each slot's allow list) */\n blockLibrary?: TypeSchema[];\n /** the published version: enables changed dots and \"Reset to published\" */\n published?: Record<string, unknown>;\n /**\n * Component instance (CPO D28): values come from `from` unless a top-level key is in `overridden`. Overridden fields\n * get an accent dot + \"Reset\"; inherited ones read muted. `onReset(key)` drops one override.\n */\n inherited?: { from: string; overridden: string[]; onReset: (key: string) => void };\n /** pathKey → teammates in that field (\"items.1.answer\") */\n presence?: Record<string, KitPeer | KitPeer[]>;\n /** pathKey → open comment threads */\n comments?: Record<string, number>;\n /** host comment system. When set, the field comment chip opens the host's popover/panel instead of the kit's. */\n onComment?: KitEnv[\"onComment\"];\n /** \"Open {title}\" on a reference: the host opens the referenced entry (e.g. a stacked panel) */\n onOpenReference?: KitEnv[\"onOpenReference\"];\n /** D61: the host's Review changes markers (while its History panel is open) */\n review?: KitEnv[\"review\"];\n /** D61 field ⋯ › History: the host opens its History panel on this field (see `KitEnv.onFieldHistory`). Keep it stable. */\n onFieldHistory?: KitEnv[\"onFieldHistory\"];\n /** the whole form is read-only for the lens (fields with their own `access.edit` still follow `env.can`) */\n readOnly?: boolean;\n /** validate everything now (after a publish attempt) */\n showErrors?: boolean;\n /** document identity + site context */\n env?: {\n docId?: string;\n docTitle?: string;\n urlPrefix?: string;\n isPublished?: boolean;\n /** the slug is the document's address (KitEnv.slugIsAddress) */\n slugIsAddress?: boolean;\n palette?: Swatch[];\n syncedFrom?: string;\n /** D58: the host's access check (`useCan` at the host). Omitted → allow-all (staff tools, demos). */\n can?: KitEnv[\"can\"];\n /** CPO D39: \"tooltip\" moves help lines behind the ⓘ (dense hosts) */\n helpDisplay?: KitEnv[\"helpDisplay\"];\n /** \"quiet\" field chrome for meta-forms (see `KitEnv.fieldChrome`) */\n fieldChrome?: KitEnv[\"fieldChrome\"];\n /** the host's own controls by path key (see `KitEnv.controls`); keep it stable */\n controls?: KitEnv[\"controls\"];\n /** the host's chip summary for collapsed fieldsets (see `KitEnv.sectionSummary`); keep it stable */\n sectionSummary?: KitEnv[\"sectionSummary\"];\n };\n /**\n * Issues the host computes itself (a live check the schema can't express), merged with the form's own. A host issue on a\n * path the form already flags is dropped; `live` ones show while typing; `fix` adds one action after the message.\n */\n extraIssues?: KitIssue[];\n /** Root fields with `validation.unique`: the values the model's other records hold (V2). Absent: not checked. Keep it stable. */\n uniquePeers?: UniquePeers;\n /** The host's access check (V2 `KitEnv.can`), the same as `env.can`; `env.can` wins when both are set. */\n can?: KitEnv[\"can\"];\n /**\n * D70 (V2 `KitEnv.hiddenLine`): keep the fields that would leave the form in place as the host's line instead. `why`\n * says what hid it: \"rule\" (its condition doesn't hold for the current value) or \"access\" (the lens can't `view` it);\n * `failed` holds the rules that don't hold (\"Badge is not Sale\"), [] for access.\n * The schema preview draws its dashed \"Hidden for Editor\" / \"Hidden: …\" lines with it. Absent: hidden fields leave the\n * form, as in every editor. Keep it stable (a new function re-renders the form).\n */\n hiddenLine?: (field: FieldSchema, path: FieldPath, why: HiddenWhy, failed: Condition[]) => React.ReactNode;\n /** own scroll container (default: panel yes, document no) */\n scroll?: boolean;\n /** rendered above the breadcrumb (e.g. a block header) */\n header?: React.ReactNode;\n /** label of the root crumb (defaults to schema.title) */\n rootLabel?: string;\n /**\n * Host-owned trail (CPO D38): the form stops rendering its own breadcrumb and reports the drill-in crumbs\n * instead, so a host with its own path header shows ONE breadcrumb. Navigate with `onPathChange`. Called in a\n * layout effect, so the host header never lags a frame.\n */\n onCrumbs?: (crumbs: KitCrumb[]) => void;\n onIssuesChange?: (issues: KitIssue[]) => void;\n /** imperative navigation for hosts (e.g. a dialog's Escape: go up one level before closing) */\n navRef?: React.Ref<{ back: () => boolean }>;\n className?: string;\n}\n\nexport const COALESCE_MS = 900;\nexport const UNDO_STEPS = 50;\nconst HISTORY_ENTRIES = 30;\n\n/* The frame pieces other lanes own, handed to frame.tsx (which never imports them directly). ButtonScreen (link\n control) and TableFrame (table control) arrive with the controls lanes; until then the header title reads the\n button's label the way V2's `normLink(v).label` does.\n The getters read the imports at render, not at module evaluation: kit-field → array / field-list → schema-form →\n kit-field is a cycle, and an eager read would hit the TDZ the day one of them becomes a const or memo(). */\nconst buttonLabel = (v: unknown) => ({ label: isObj(v) && typeof v.label === \"string\" ? v.label : undefined });\nconst FRAME_SLOTS: FrameSlots = {\n get FieldList() {\n return FieldList;\n },\n get FieldSection() {\n return FieldSection;\n },\n get TableFrame() {\n return TableFrame;\n },\n get ButtonScreen() {\n return ButtonScreen;\n },\n normLink: buttonLabel,\n};\nconst ROWS_HOST = {\n get NestedForm() {\n return NestedForm;\n },\n};\n\n/* ── archived fields leave every form ───────────────────────────────── */\n/** Drop archived fields at every depth (V2 registry: \"What a form renders: archived fields left out (their values stay\n * stored)\"). Same object back when nothing is archived, so a form with none renders exactly as before. */\nfunction liveFields(fields: FieldSchema[]): FieldSchema[] {\n let changed = false;\n const out: FieldSchema[] = [];\n for (const f of fields) {\n if (f.archived) {\n changed = true;\n continue;\n }\n let g = f;\n if (f.fields) {\n const n = liveFields(f.fields);\n if (n !== f.fields) g = { ...g, fields: n };\n }\n if (Array.isArray(f.of)) {\n const n = liveFields(f.of);\n if (n !== f.of) g = { ...g, of: n };\n }\n if (f.slotSettings) {\n const n = liveFields(f.slotSettings);\n if (n !== f.slotSettings) g = { ...g, slotSettings: n };\n }\n if (g !== f) changed = true;\n out.push(g);\n }\n return changed ? out : fields;\n}\nfunction liveSchema(schema: TypeSchema): TypeSchema {\n const fields = liveFields(schema.fields);\n return fields === schema.fields ? schema : { ...schema, fields };\n}\n\n/* ── hiddenLine: hidden fields kept in place as the host's line ──────── */\nexport type HiddenWhy = \"rule\" | \"access\";\nconst GHOST = \"__ghost\";\ntype Ghost = { why: HiddenWhy; field: FieldSchema; failed: Condition[] };\ntype GhostField = FieldSchema & { [GHOST]?: Ghost };\nconst HiddenLineCtx = React.createContext<SchemaFormProps[\"hiddenLine\"]>(undefined);\n\n/** A stand-in that keeps a hidden field's place: no value rules, no condition, nothing to validate or drill into. */\nfunction ghostOf(f: FieldSchema, why: HiddenWhy, failed: Condition[] = []): GhostField {\n return { name: f.name, title: f.title, type: f.type === \"object\" || f.type === \"array\" || f.type === \"slot\" ? \"string\" : f.type, fieldset: f.fieldset, group: f.group, readOnly: true, [GHOST]: { why, field: f, failed } };\n}\n\n/** `visibleSchema`, except that a field the lens can't view stays as a ghost (top level and inside objects). */\nfunction lensGhosts(schema: TypeSchema, can: KitEnv[\"can\"]): TypeSchema {\n const walk = (fields: FieldSchema[]): FieldSchema[] =>\n fields.map((f) => {\n const a = fieldAccessOf(f);\n if (a?.view && !can(a.view)) return ghostOf(f, \"access\");\n return f.type === \"object\" && f.fields ? { ...f, fields: walk(f.fields) } : f;\n });\n return { ...schema, fields: walk(schema.fields) };\n}\n\n/** The frame's field list with condition-hidden fields kept as ghosts, every ghost drawn by the host's line. */\nfunction GhostFieldList(props: FieldListProps) {\n const form = useForm()!;\n const line = React.useContext(HiddenLineCtx)!;\n const raw = form.getAt(props.basePath);\n const parent = isObj(raw) ? raw : {};\n const cc = condCtx(form, props.basePath);\n const fields = props.fields.map((f) => ((f as GhostField)[GHOST] || f.hidden === true || !isHidden(f, parent, cc) ? f : ghostOf(f, \"rule\", failingRules(f, parent, cc))));\n return (\n <GroupedFieldList\n {...props}\n fields={fields}\n renderField={(f, path, p) => {\n const g = (f as GhostField)[GHOST];\n return g ? (\n <div data-field-key={pathKey(path)} data-ghost={g.why}>\n {line(g.field, path, g.why, g.failed)}\n </div>\n ) : (\n <KitField field={f} path={path} parent={p} />\n );\n }}\n />\n );\n}\nconst GHOST_SLOTS: FrameSlots = {\n get FieldList() {\n return GhostFieldList;\n },\n get FieldSection() {\n return FieldSection;\n },\n get TableFrame() {\n return TableFrame;\n },\n get ButtonScreen() {\n return ButtonScreen;\n },\n normLink: buttonLabel,\n};\n\nexport function SchemaForm({\n schema: schemaIn,\n value,\n onChange,\n path: controlledPath,\n defaultPath,\n onPathChange,\n variant = \"panel\",\n resolveSchema: resolveIn,\n blockLibrary,\n published,\n inherited,\n presence,\n comments,\n onComment,\n onOpenReference,\n review,\n onFieldHistory,\n readOnly,\n showErrors = false,\n env: envIn,\n scroll,\n header,\n rootLabel,\n onCrumbs,\n onIssuesChange,\n navRef,\n className,\n can: canIn,\n hiddenLine,\n extraIssues,\n uniquePeers,\n}: SchemaFormProps) {\n const outerCan = useKitEnv().can;\n const can = envIn?.can ?? canIn ?? outerCan; // a nested form (dialog object, article block) inherits its host form's check\n /* D58: fields the lens can't view are dropped from the schema here, once: not rendered, not validated (with\n `hiddenLine`, they stay as ghosts: a place and a line, still nothing to validate) */\n const schema = React.useMemo(() => {\n const live = liveSchema(schemaIn);\n return hiddenLine ? lensGhosts(live, can) : visibleSchema(live, can);\n }, [schemaIn, can, hiddenLine]);\n const resolveSchema = React.useMemo(\n () =>\n resolveIn\n ? (t: string) => {\n const s = resolveIn(t);\n return s && visibleSchema(liveSchema(s), can);\n }\n : undefined,\n [resolveIn, can],\n );\n const docId = envIn?.docId ?? schema.name;\n const ownScroll = scroll ?? variant === \"panel\";\n\n /* value + baseline */\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const [baseline, setBaseline] = React.useState(value);\n const stacks = React.useRef(new Map<string, { path: FieldPath; values: unknown[]; at: number }>());\n const log = React.useRef(new Map<string, HistoryEntry[]>());\n const memory = React.useRef(new Map<string, unknown>());\n const [aiKeys, setAiKeys] = React.useState<Set<string>>(() => new Set());\n const [touched, setTouched] = React.useState<Set<string>>(() => new Set());\n const editing = React.useRef(new Set<string>());\n const [, bump] = React.useReducer((x: number) => x + 1, 0);\n React.useEffect(() => {\n setBaseline(valueRef.current);\n stacks.current.clear();\n log.current.clear();\n memory.current.clear();\n setTouched(new Set());\n setAiKeys(new Set());\n }, [docId]);\n\n /* navigation */\n const [innerPath, setInnerPath] = React.useState<FieldPath>(defaultPath ?? []);\n const rawPath = controlledPath ?? innerPath;\n const { frames, path } = React.useMemo(() => resolveFrames(schema, value, rawPath, resolveSchema), [schema, value, rawPath, resolveSchema]);\n const navigate = React.useCallback(\n (p: FieldPath) => {\n if (controlledPath === undefined) setInnerPath(p);\n onPathChange?.(p);\n },\n [controlledPath, onPathChange],\n );\n /* a path that no longer resolves (a removed item, a hidden field) settles on the deepest frame that does */\n React.useEffect(() => {\n if (!pathEq(path, rawPath)) navigate(path);\n }, [path, rawPath, navigate]);\n /* V2: a new document starts at its root (an uncontrolled path never carries the last document's drill or history).\n Skips the mount run so `defaultPath` survives. */\n const lastDoc = React.useRef(docId);\n React.useEffect(() => {\n if (lastDoc.current === docId) return;\n lastDoc.current = docId;\n if (controlledPath === undefined) setInnerPath([]);\n }, [docId]); // eslint-disable-line react-hooks/exhaustive-deps\n\n /* writes */\n const setAt = React.useCallback<FormApi[\"setAt\"]>(\n (p, v, opts) => {\n const prev = getIn(valueRef.current, p);\n if (same(prev, v)) return;\n const key = pathKey(p);\n if (opts?.record !== false) {\n const now = Date.now();\n const st = stacks.current.get(key) ?? { path: p, values: [], at: 0 };\n if (!st.values.length || now - st.at > COALESCE_MS) st.values = [...st.values, prev].slice(-UNDO_STEPS);\n st.at = now;\n stacks.current.set(key, st);\n const h = log.current.get(key) ?? [];\n const entry: HistoryEntry = { value: v, at: now, by: \"You\", label: opts?.label };\n log.current.set(key, h.length && now - h[0].at < COALESCE_MS && !opts?.label ? [entry, ...h.slice(1)] : [entry, ...h].slice(0, HISTORY_ENTRIES));\n editing.current.add(key);\n }\n const next = setIn(valueRef.current, p, v);\n valueRef.current = next;\n onChange(next);\n },\n [onChange],\n );\n\n /* validation */\n const issueList = React.useMemo(() => {\n // the variant the form draws: the value's own, else the schema's first (as condCtx reads it for rendering)\n const variant = typeof value._variant === \"string\" ? value._variant : schema.variants?.[0]?.id;\n const own = collectIssues(schema.fields, value, [], resolveSchema, [], { root: value, variant }, uniquePeers);\n return extraIssues?.length ? [...own, ...extraIssues.filter((x) => !own.some((o) => o.key === x.key))] : own;\n }, [schema, value, resolveSchema, extraIssues, uniquePeers]);\n const issues = React.useMemo(() => new Map(issueList.map((i) => [i.key, i])), [issueList]);\n React.useEffect(() => onIssuesChange?.(issueList), [issueList, onIssuesChange]);\n const isVisible = React.useCallback(\n (i: KitIssue) => showErrors || !!i.live || touched.has(i.key) || (i.kind === \"rule\" && !editing.current.has(i.key)),\n [showErrors, touched],\n );\n\n const api: FormApi = {\n schema,\n value,\n setAt,\n getAt: (p) => getIn(value, p),\n baselineAt: (p) => getIn(baseline, p),\n publishedAt: (p) => getIn(published, p),\n hasPublished: !!published,\n inherited: inherited ? { from: inherited.from, isOverridden: (k) => inherited.overridden.includes(k), reset: inherited.onReset } : undefined,\n path,\n navigate,\n canNavigate: true,\n resolveSchema,\n blockLibrary,\n issues,\n visibleIssue: (k) => {\n const i = issues.get(k);\n return i && isVisible(i) ? i : undefined;\n },\n rollup: (prefix) => {\n const pk = pathKey(prefix);\n let errors = 0;\n let warnings = 0;\n for (const i of issueList) if (keyStartsWith(i.key, pk) && isVisible(i)) i.level === \"error\" ? errors++ : warnings++;\n return { errors, warnings };\n },\n touch: (k) => {\n editing.current.delete(k);\n if (!touched.has(k)) setTouched((s) => new Set(s).add(k));\n },\n showAllErrors: showErrors,\n canUndo: (k) => !!stacks.current.get(k)?.values.length,\n undo: (k) => {\n const st = stacks.current.get(k);\n if (!st?.values.length) return;\n const prev = st.values[st.values.length - 1];\n st.values = st.values.slice(0, -1);\n st.at = 0;\n const next = setIn(valueRef.current, st.path, prev);\n valueRef.current = next;\n onChange(next);\n bump();\n },\n history: (k) => log.current.get(k) ?? [],\n aiKeys,\n markAi: (k, on) =>\n setAiKeys((s) => {\n const n = new Set(s);\n if (on) n.add(k);\n else n.delete(k);\n return n;\n }),\n memory: memory.current,\n };\n\n const normPresence = React.useMemo(() => {\n const out: Record<string, KitPeer[]> = {};\n for (const [k, v] of Object.entries(presence ?? {})) out[k] = Array.isArray(v) ? v : [v];\n return out;\n }, [presence]);\n const env: KitEnv = React.useMemo(\n () => ({\n ...DEFAULT_ENV,\n variant,\n docId,\n docTitle: envIn?.docTitle,\n urlPrefix: envIn?.urlPrefix,\n /* a published copy proves \"live\"; its absence proves nothing (the dock has none), so it stays unknown */\n isPublished: envIn?.isPublished ?? (published ? true : undefined),\n slugIsAddress: envIn?.slugIsAddress,\n palette: envIn?.palette ?? DEFAULT_ENV.palette,\n readOnly: !!readOnly,\n can,\n presence: normPresence,\n comments: comments ?? {},\n onComment,\n onOpenReference,\n syncedFrom: envIn?.syncedFrom,\n helpDisplay: envIn?.helpDisplay,\n review,\n onFieldHistory,\n fieldChrome: envIn?.fieldChrome,\n controls: envIn?.controls,\n sectionSummary: envIn?.sectionSummary,\n }),\n [variant, docId, envIn?.docTitle, envIn?.urlPrefix, envIn?.isPublished, envIn?.slugIsAddress, envIn?.palette, envIn?.syncedFrom, envIn?.helpDisplay, envIn?.fieldChrome, envIn?.controls, envIn?.sectionSummary, published, readOnly, can, normPresence, comments, onComment, onOpenReference, review, onFieldHistory],\n );\n\n React.useImperativeHandle(\n navRef,\n () => ({\n back: () => {\n if (frames.length < 2) return false;\n navigate(frames[frames.length - 2].path);\n return true;\n },\n }),\n [frames, navigate],\n );\n\n /* drill-in stage: direction-aware slide, scroll memory, focus on the entering frame, Esc / Alt+Up/Down */\n const root = React.useRef<HTMLDivElement>(null);\n const scroller = React.useRef<HTMLDivElement>(null);\n const nav = useFrameNavigation({ frames, navigate, root, scroller });\n\n const crumbs = framesToCrumbs(frames, schema, api.rollup, rootLabel);\n const crumbSig = crumbSignature(crumbs);\n const onCrumbsRef = React.useRef(onCrumbs);\n onCrumbsRef.current = onCrumbs;\n React.useLayoutEffect(() => {\n onCrumbsRef.current?.(crumbs);\n }, [crumbSig]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const syncedNote = envIn?.syncedFrom ? (\n <p className=\"mb-5 flex items-start gap-2 rounded-kit-lg bg-kit-info-soft px-3 py-2 text-kit-xs text-kit-info-fg\">\n <span className=\"mt-0.5 size-1.5 shrink-0 rounded-full bg-kit-info\" aria-hidden />\n <span>\n Synced from <span className=\"font-medium\">{envIn.syncedFrom}</span>. Changes here apply on every page that uses it.\n </span>\n </p>\n ) : null;\n const body = <FrameStage review={!!review} frames={frames} frameKey={nav.frameKey} dir={nav.dir} rootLabel={rootLabel ?? schema.title} variant={variant} before={syncedNote} />;\n\n return (\n <KitEnvProvider value={env}>\n <FormProvider value={api}>\n <HiddenLineCtx.Provider value={hiddenLine}>\n <FrameSlotsProvider value={hiddenLine ? GHOST_SLOTS : FRAME_SLOTS}>\n <RowsHostContext.Provider value={ROWS_HOST}>\n <div ref={root} onKeyDown={nav.onKeyDown} className={cn(\"flex min-h-0 min-w-0 flex-col\", ownScroll && \"h-full\", className)} data-kit-form={schema.name}>\n {header}\n {onCrumbs ? null : <FrameCrumbs crumbs={crumbs} onNavigate={navigate} variant={variant} />}\n {ownScroll ? (\n <div ref={scroller} className=\"@container min-h-0 flex-1 overflow-y-auto overscroll-contain\">\n {body}\n </div>\n ) : (\n <div className=\"@container\">{body}</div>\n )}\n </div>\n </RowsHostContext.Provider>\n </FrameSlotsProvider>\n </HiddenLineCtx.Provider>\n </FormProvider>\n </KitEnvProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4HA,IAAa,cAAc;AAC3B,IAAa,aAAa;AAC1B,IAAM,kBAAkB;AAOxB,IAAM,eAAe,OAAgB,EAAE,OAAO,MAAM,CAAC,KAAK,OAAO,EAAE,UAAU,WAAW,EAAE,QAAQ,KAAA,EAAU;AAC5G,IAAM,cAA0B;CAC9B,IAAI,YAAY;EACd,OAAO;CACT;CACA,IAAI,eAAe;EACjB,OAAO;CACT;CACA,IAAI,aAAa;EACf,OAAO;CACT;CACA,IAAI,eAAe;EACjB,OAAO;CACT;CACA,UAAU;AACZ;AACA,IAAM,YAAY,EAChB,IAAI,aAAa;CACf,OAAO;AACT,EACF;;;AAKA,SAAS,WAAW,QAAsC;CACxD,IAAI,UAAU;CACd,MAAM,MAAqB,CAAC;CAC5B,KAAK,MAAM,KAAK,QAAQ;EACtB,IAAI,EAAE,UAAU;GACd,UAAU;GACV;EACF;EACA,IAAI,IAAI;EACR,IAAI,EAAE,QAAQ;GACZ,MAAM,IAAI,WAAW,EAAE,MAAM;GAC7B,IAAI,MAAM,EAAE,QAAQ,IAAI;IAAE,GAAG;IAAG,QAAQ;GAAE;EAC5C;EACA,IAAI,MAAM,QAAQ,EAAE,EAA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chemaForm> — the BetterCMS Block Kit form engine (V2 HEAD 9829bf1 kit/engine/schema-form.tsx). One schema in, one\n * value out; renders through the shared field chrome; owns validation visibility, per-field undo + history (coalesced\n * 900ms, 50 steps), the published baseline (changed dots, Reset to published) and the navigation path.\n *\n * <SchemaForm schema={faq} value={v} onChange={setV} variant=\"panel\" />\n *\n * `path` is controllable so a canvas can sync selection <-> breadcrumb both ways. Frames (root, drilled object, array\n * item, slot block, button, history) come from lib/frames `resolveFrames`; the drill-in stage, crumbs and keys\n * (Esc / Alt+Up/Down) from frame.tsx and breadcrumb.tsx; the layout of each frame from grouping.tsx through field-list.\n *\n * The host provides the kit scope (`data-kit-scope`) around the form; the form never declares one of its own, so a\n * dark host scope is never reset to light inside it.\n */\nimport * as React from \"react\";\nimport { cn } from \"../lib/cn\";\nimport type { Condition, FieldPath, FieldSchema, TypeSchema } from \"../schema/types\";\nimport { DEFAULT_ENV, fieldAccessOf, FormProvider, KitEnvProvider, useForm, useKitEnv, visibleSchema, type FormApi, type HistoryEntry, type KitEnv, type KitPeer, type Swatch } from \"../context\";\nimport { resolveFrames } from \"../lib/frames\";\nimport { getIn, isObj, keyStartsWith, pathEq, pathKey, same, setIn } from \"../lib/path\";\nimport { condCtx, failingRules, isHidden } from \"../lib/schema\";\nimport { collectIssues, type KitIssue, type UniquePeers } from \"../lib/validate\";\nimport { RowsHostContext } from \"./array\";\nimport { crumbSignature, FrameCrumbs, framesToCrumbs, type KitCrumb } from \"./breadcrumb\";\nimport { FieldList, type FieldListProps } from \"./field-list\";\nimport { FrameSlotsProvider, FrameStage, useFrameNavigation, type FrameSlots } from \"./frame\";\nimport { FieldList as GroupedFieldList, FieldSection } from \"./grouping\";\nimport { KitField, NestedForm } from \"./kit-field\";\nimport { TableFrame } from \"../controls/table/table\";\nimport { ButtonScreen } from \"../controls/button\";\n\nexport interface SchemaFormProps {\n schema: TypeSchema;\n value: Record<string, unknown>;\n onChange: (value: Record<string, unknown>) => void;\n /** controlled navigation path ([] = root). Omit for uncontrolled. */\n path?: FieldPath;\n defaultPath?: FieldPath;\n onPathChange?: (path: FieldPath) => void;\n /** \"panel\" = 320–420px inspector; \"document\" = the wide document editor column */\n variant?: \"panel\" | \"document\";\n /** resolve a block type (slot children) to its schema */\n resolveSchema?: (blockType: string) => TypeSchema | undefined;\n /** blocks offered by \"+ Add block\" (filtered by each slot's allow list) */\n blockLibrary?: TypeSchema[];\n /** the published version: enables changed dots and \"Reset to published\" */\n published?: Record<string, unknown>;\n /**\n * Component instance (CPO D28): values come from `from` unless a top-level key is in `overridden`. Overridden fields\n * get an accent dot + \"Reset\"; inherited ones read muted. `onReset(key)` drops one override.\n */\n inherited?: { from: string; overridden: string[]; onReset: (key: string) => void };\n /** pathKey → teammates in that field (\"items.1.answer\") */\n presence?: Record<string, KitPeer | KitPeer[]>;\n /** pathKey → open comment threads */\n comments?: Record<string, number>;\n /** host comment system. When set, the field comment chip opens the host's popover/panel instead of the kit's. */\n onComment?: KitEnv[\"onComment\"];\n /** \"Open {title}\" on a reference: the host opens the referenced entry (e.g. a stacked panel) */\n onOpenReference?: KitEnv[\"onOpenReference\"];\n /** D61: the host's Review changes markers (while its History panel is open) */\n review?: KitEnv[\"review\"];\n /** D61 field ⋯ › History: the host opens its History panel on this field (see `KitEnv.onFieldHistory`). Keep it stable. */\n onFieldHistory?: KitEnv[\"onFieldHistory\"];\n /** the whole form is read-only for the lens (fields with their own `access.edit` still follow `env.can`) */\n readOnly?: boolean;\n /** validate everything now (after a publish attempt) */\n showErrors?: boolean;\n /** document identity + site context */\n env?: {\n docId?: string;\n docTitle?: string;\n urlPrefix?: string;\n isPublished?: boolean;\n /** the slug is the document's address (KitEnv.slugIsAddress) */\n slugIsAddress?: boolean;\n palette?: Swatch[];\n syncedFrom?: string;\n /** D58: the host's access check (`useCan` at the host). Omitted → allow-all (staff tools, demos). */\n can?: KitEnv[\"can\"];\n /** CPO D39: \"tooltip\" moves help lines behind the ⓘ (dense hosts) */\n helpDisplay?: KitEnv[\"helpDisplay\"];\n /** \"quiet\" field chrome for meta-forms (see `KitEnv.fieldChrome`) */\n fieldChrome?: KitEnv[\"fieldChrome\"];\n /** the host's own controls by path key (see `KitEnv.controls`); keep it stable */\n controls?: KitEnv[\"controls\"];\n /** the host's chip summary for collapsed fieldsets (see `KitEnv.sectionSummary`); keep it stable */\n sectionSummary?: KitEnv[\"sectionSummary\"];\n };\n /**\n * Issues the host computes itself (a live check the schema can't express), merged with the form's own. A host issue on a\n * path the form already flags is dropped; `live` ones show while typing; `fix` adds one action after the message.\n */\n extraIssues?: KitIssue[];\n /** Root fields with `validation.unique`: the values the model's other records hold (V2). Absent: not checked. Keep it stable. */\n uniquePeers?: UniquePeers;\n /** The host's access check (V2 `KitEnv.can`), the same as `env.can`; `env.can` wins when both are set. */\n can?: KitEnv[\"can\"];\n /**\n * D70 (V2 `KitEnv.hiddenLine`): keep the fields that would leave the form in place as the host's line instead. `why`\n * says what hid it: \"rule\" (its condition doesn't hold for the current value) or \"access\" (the lens can't `view` it);\n * `failed` holds the rules that don't hold (\"Badge is not Sale\"), [] for access.\n * The schema preview draws its dashed \"Hidden for Editor\" / \"Hidden: …\" lines with it. Absent: hidden fields leave the\n * form, as in every editor. Keep it stable (a new function re-renders the form).\n */\n hiddenLine?: (field: FieldSchema, path: FieldPath, why: HiddenWhy, failed: Condition[]) => React.ReactNode;\n /** own scroll container (default: panel yes, document no) */\n scroll?: boolean;\n /** rendered above the breadcrumb (e.g. a block header) */\n header?: React.ReactNode;\n /** label of the root crumb (defaults to schema.title) */\n rootLabel?: string;\n /**\n * Host-owned trail (CPO D38): the form stops rendering its own breadcrumb and reports the drill-in crumbs\n * instead, so a host with its own path header shows ONE breadcrumb. Navigate with `onPathChange`. Called in a\n * layout effect, so the host header never lags a frame.\n */\n onCrumbs?: (crumbs: KitCrumb[]) => void;\n onIssuesChange?: (issues: KitIssue[]) => void;\n /** imperative navigation for hosts (e.g. a dialog's Escape: go up one level before closing) */\n navRef?: React.Ref<{ back: () => boolean }>;\n className?: string;\n}\n\nexport const COALESCE_MS = 900;\nexport const UNDO_STEPS = 50;\nconst HISTORY_ENTRIES = 30;\n\n/* The frame pieces other lanes own, handed to frame.tsx (which never imports them directly). ButtonScreen (link\n control) and TableFrame (table control) arrive with the controls lanes; until then the header title reads the\n button's label the way V2's `normLink(v).label` does.\n The getters read the imports at render, not at module evaluation: kit-field → array / field-list → schema-form →\n kit-field is a cycle, and an eager read would hit the TDZ the day one of them becomes a const or memo(). */\nconst buttonLabel = (v: unknown) => ({ label: isObj(v) && typeof v.label === \"string\" ? v.label : undefined });\nconst FRAME_SLOTS: FrameSlots = {\n get FieldList() {\n return FieldList;\n },\n get FieldSection() {\n return FieldSection;\n },\n get TableFrame() {\n return TableFrame;\n },\n get ButtonScreen() {\n return ButtonScreen;\n },\n normLink: buttonLabel,\n};\nconst ROWS_HOST = {\n get NestedForm() {\n return NestedForm;\n },\n};\n\n/* ── archived fields leave every form ───────────────────────────────── */\n/** Drop archived fields at every depth (V2 registry: \"What a form renders: archived fields left out (their values stay\n * stored)\"). Same object back when nothing is archived, so a form with none renders exactly as before. */\nfunction liveFields(fields: FieldSchema[]): FieldSchema[] {\n let changed = false;\n const out: FieldSchema[] = [];\n for (const f of fields) {\n if (f.archived) {\n changed = true;\n continue;\n }\n let g = f;\n if (f.fields) {\n const n = liveFields(f.fields);\n if (n !== f.fields) g = { ...g, fields: n };\n }\n if (Array.isArray(f.of)) {\n const n = liveFields(f.of);\n if (n !== f.of) g = { ...g, of: n };\n }\n if (f.slotSettings) {\n const n = liveFields(f.slotSettings);\n if (n !== f.slotSettings) g = { ...g, slotSettings: n };\n }\n if (g !== f) changed = true;\n out.push(g);\n }\n return changed ? out : fields;\n}\nfunction liveSchema(schema: TypeSchema): TypeSchema {\n const fields = liveFields(schema.fields);\n return fields === schema.fields ? schema : { ...schema, fields };\n}\n\n/* ── hiddenLine: hidden fields kept in place as the host's line ──────── */\nexport type HiddenWhy = \"rule\" | \"access\";\nconst GHOST = \"__ghost\";\ntype Ghost = { why: HiddenWhy; field: FieldSchema; failed: Condition[] };\ntype GhostField = FieldSchema & { [GHOST]?: Ghost };\nconst HiddenLineCtx = React.createContext<SchemaFormProps[\"hiddenLine\"]>(undefined);\n\n/** A stand-in that keeps a hidden field's place: no value rules, no condition, nothing to validate or drill into. */\nfunction ghostOf(f: FieldSchema, why: HiddenWhy, failed: Condition[] = []): GhostField {\n return { name: f.name, title: f.title, type: f.type === \"object\" || f.type === \"array\" || f.type === \"slot\" ? \"string\" : f.type, fieldset: f.fieldset, group: f.group, readOnly: true, [GHOST]: { why, field: f, failed } };\n}\n\n/** `visibleSchema`, except that a field the lens can't view stays as a ghost (top level and inside objects). */\nfunction lensGhosts(schema: TypeSchema, can: KitEnv[\"can\"]): TypeSchema {\n const walk = (fields: FieldSchema[]): FieldSchema[] =>\n fields.map((f) => {\n const a = fieldAccessOf(f);\n if (a?.view && !can(a.view)) return ghostOf(f, \"access\");\n return f.type === \"object\" && f.fields ? { ...f, fields: walk(f.fields) } : f;\n });\n return { ...schema, fields: walk(schema.fields) };\n}\n\n/** The frame's field list with condition-hidden fields kept as ghosts, every ghost drawn by the host's line. */\nfunction GhostFieldList(props: FieldListProps) {\n const form = useForm()!;\n const line = React.useContext(HiddenLineCtx)!;\n const raw = form.getAt(props.basePath);\n const parent = isObj(raw) ? raw : {};\n const cc = condCtx(form, props.basePath);\n const fields = props.fields.map((f) => ((f as GhostField)[GHOST] || f.hidden === true || !isHidden(f, parent, cc) ? f : ghostOf(f, \"rule\", failingRules(f, parent, cc))));\n return (\n <GroupedFieldList\n {...props}\n fields={fields}\n renderField={(f, path, p) => {\n const g = (f as GhostField)[GHOST];\n return g ? (\n <div data-field-key={pathKey(path)} data-ghost={g.why}>\n {line(g.field, path, g.why, g.failed)}\n </div>\n ) : (\n <KitField field={f} path={path} parent={p} />\n );\n }}\n />\n );\n}\nconst GHOST_SLOTS: FrameSlots = {\n get FieldList() {\n return GhostFieldList;\n },\n get FieldSection() {\n return FieldSection;\n },\n get TableFrame() {\n return TableFrame;\n },\n get ButtonScreen() {\n return ButtonScreen;\n },\n normLink: buttonLabel,\n};\n\nexport function SchemaForm({\n schema: schemaIn,\n value,\n onChange,\n path: controlledPath,\n defaultPath,\n onPathChange,\n variant = \"panel\",\n resolveSchema: resolveIn,\n blockLibrary,\n published,\n inherited,\n presence,\n comments,\n onComment,\n onOpenReference,\n review,\n onFieldHistory,\n readOnly,\n showErrors = false,\n env: envIn,\n scroll,\n header,\n rootLabel,\n onCrumbs,\n onIssuesChange,\n navRef,\n className,\n can: canIn,\n hiddenLine,\n extraIssues,\n uniquePeers,\n}: SchemaFormProps) {\n const outerCan = useKitEnv().can;\n const can = envIn?.can ?? canIn ?? outerCan; // a nested form (dialog object, article block) inherits its host form's check\n /* D58: fields the lens can't view are dropped from the schema here, once: not rendered, not validated (with\n `hiddenLine`, they stay as ghosts: a place and a line, still nothing to validate) */\n const schema = React.useMemo(() => {\n const live = liveSchema(schemaIn);\n return hiddenLine ? lensGhosts(live, can) : visibleSchema(live, can);\n }, [schemaIn, can, hiddenLine]);\n const resolveSchema = React.useMemo(\n () =>\n resolveIn\n ? (t: string) => {\n const s = resolveIn(t);\n return s && visibleSchema(liveSchema(s), can);\n }\n : undefined,\n [resolveIn, can],\n );\n const docId = envIn?.docId ?? schema.name;\n const ownScroll = scroll ?? variant === \"panel\";\n\n /* value + baseline */\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const [baseline, setBaseline] = React.useState(value);\n const stacks = React.useRef(new Map<string, { path: FieldPath; values: unknown[]; at: number }>());\n const log = React.useRef(new Map<string, HistoryEntry[]>());\n const memory = React.useRef(new Map<string, unknown>());\n const [aiKeys, setAiKeys] = React.useState<Set<string>>(() => new Set());\n const [touched, setTouched] = React.useState<Set<string>>(() => new Set());\n const editing = React.useRef(new Set<string>());\n const [, bump] = React.useReducer((x: number) => x + 1, 0);\n React.useEffect(() => {\n setBaseline(valueRef.current);\n stacks.current.clear();\n log.current.clear();\n memory.current.clear();\n setTouched(new Set());\n setAiKeys(new Set());\n }, [docId]);\n\n /* navigation */\n const [innerPath, setInnerPath] = React.useState<FieldPath>(defaultPath ?? []);\n const rawPath = controlledPath ?? innerPath;\n const { frames, path } = React.useMemo(() => resolveFrames(schema, value, rawPath, resolveSchema), [schema, value, rawPath, resolveSchema]);\n const navigate = React.useCallback(\n (p: FieldPath) => {\n if (controlledPath === undefined) setInnerPath(p);\n onPathChange?.(p);\n },\n [controlledPath, onPathChange],\n );\n /* a path that no longer resolves (a removed item, a hidden field) settles on the deepest frame that does */\n React.useEffect(() => {\n if (!pathEq(path, rawPath)) navigate(path);\n }, [path, rawPath, navigate]);\n /* V2: a new document starts at its root (an uncontrolled path never carries the last document's drill or history).\n Skips the mount run so `defaultPath` survives. */\n const lastDoc = React.useRef(docId);\n React.useEffect(() => {\n if (lastDoc.current === docId) return;\n lastDoc.current = docId;\n if (controlledPath === undefined) setInnerPath([]);\n }, [docId]); // eslint-disable-line react-hooks/exhaustive-deps\n\n /* writes */\n const setAt = React.useCallback<FormApi[\"setAt\"]>(\n (p, v, opts) => {\n const prev = getIn(valueRef.current, p);\n if (same(prev, v)) return;\n const key = pathKey(p);\n if (opts?.record !== false) {\n const now = Date.now();\n const st = stacks.current.get(key) ?? { path: p, values: [], at: 0 };\n if (!st.values.length || now - st.at > COALESCE_MS) st.values = [...st.values, prev].slice(-UNDO_STEPS);\n st.at = now;\n stacks.current.set(key, st);\n const h = log.current.get(key) ?? [];\n const entry: HistoryEntry = { value: v, at: now, by: \"You\", label: opts?.label };\n log.current.set(key, h.length && now - h[0].at < COALESCE_MS && !opts?.label ? [entry, ...h.slice(1)] : [entry, ...h].slice(0, HISTORY_ENTRIES));\n editing.current.add(key);\n }\n const next = setIn(valueRef.current, p, v);\n valueRef.current = next;\n onChange(next);\n },\n [onChange],\n );\n\n /* validation */\n const issueList = React.useMemo(() => {\n // the variant the form draws: the value's own, else the schema's first (as condCtx reads it for rendering)\n const variant = typeof value._variant === \"string\" ? value._variant : schema.variants?.[0]?.id;\n const own = collectIssues(schema.fields, value, [], resolveSchema, [], { root: value, variant }, uniquePeers);\n return extraIssues?.length ? [...own, ...extraIssues.filter((x) => !own.some((o) => o.key === x.key))] : own;\n }, [schema, value, resolveSchema, extraIssues, uniquePeers]);\n const issues = React.useMemo(() => new Map(issueList.map((i) => [i.key, i])), [issueList]);\n React.useEffect(() => onIssuesChange?.(issueList), [issueList, onIssuesChange]);\n const isVisible = React.useCallback(\n (i: KitIssue) => showErrors || !!i.live || touched.has(i.key) || (i.kind === \"rule\" && !editing.current.has(i.key)),\n [showErrors, touched],\n );\n\n const api: FormApi = {\n schema,\n value,\n setAt,\n getAt: (p) => getIn(value, p),\n baselineAt: (p) => getIn(baseline, p),\n publishedAt: (p) => getIn(published, p),\n hasPublished: !!published,\n inherited: inherited ? { from: inherited.from, isOverridden: (k) => inherited.overridden.includes(k), reset: inherited.onReset } : undefined,\n path,\n navigate,\n canNavigate: true,\n resolveSchema,\n blockLibrary,\n issues,\n visibleIssue: (k) => {\n const i = issues.get(k);\n return i && isVisible(i) ? i : undefined;\n },\n rollup: (prefix) => {\n const pk = pathKey(prefix);\n let errors = 0;\n let warnings = 0;\n for (const i of issueList) if (keyStartsWith(i.key, pk) && isVisible(i)) i.level === \"error\" ? errors++ : warnings++;\n return { errors, warnings };\n },\n touch: (k) => {\n editing.current.delete(k);\n if (!touched.has(k)) setTouched((s) => new Set(s).add(k));\n },\n showAllErrors: showErrors,\n canUndo: (k) => !!stacks.current.get(k)?.values.length,\n undo: (k) => {\n const st = stacks.current.get(k);\n if (!st?.values.length) return;\n const prev = st.values[st.values.length - 1];\n st.values = st.values.slice(0, -1);\n st.at = 0;\n const next = setIn(valueRef.current, st.path, prev);\n valueRef.current = next;\n onChange(next);\n bump();\n },\n history: (k) => log.current.get(k) ?? [],\n aiKeys,\n markAi: (k, on) =>\n setAiKeys((s) => {\n const n = new Set(s);\n if (on) n.add(k);\n else n.delete(k);\n return n;\n }),\n memory: memory.current,\n };\n\n const normPresence = React.useMemo(() => {\n const out: Record<string, KitPeer[]> = {};\n for (const [k, v] of Object.entries(presence ?? {})) out[k] = Array.isArray(v) ? v : [v];\n return out;\n }, [presence]);\n const env: KitEnv = React.useMemo(\n () => ({\n ...DEFAULT_ENV,\n variant,\n docId,\n docTitle: envIn?.docTitle,\n urlPrefix: envIn?.urlPrefix,\n /* a published copy proves \"live\"; its absence proves nothing (the dock has none), so it stays unknown */\n isPublished: envIn?.isPublished ?? (published ? true : undefined),\n slugIsAddress: envIn?.slugIsAddress,\n palette: envIn?.palette ?? DEFAULT_ENV.palette,\n readOnly: !!readOnly,\n can,\n presence: normPresence,\n comments: comments ?? {},\n onComment,\n onOpenReference,\n syncedFrom: envIn?.syncedFrom,\n helpDisplay: envIn?.helpDisplay,\n review,\n onFieldHistory,\n fieldChrome: envIn?.fieldChrome,\n controls: envIn?.controls,\n sectionSummary: envIn?.sectionSummary,\n }),\n [variant, docId, envIn?.docTitle, envIn?.urlPrefix, envIn?.isPublished, envIn?.slugIsAddress, envIn?.palette, envIn?.syncedFrom, envIn?.helpDisplay, envIn?.fieldChrome, envIn?.controls, envIn?.sectionSummary, published, readOnly, can, normPresence, comments, onComment, onOpenReference, review, onFieldHistory],\n );\n\n React.useImperativeHandle(\n navRef,\n () => ({\n back: () => {\n if (frames.length < 2) return false;\n navigate(frames[frames.length - 2].path);\n return true;\n },\n }),\n [frames, navigate],\n );\n\n /* drill-in stage: direction-aware slide, scroll memory, focus on the entering frame, Esc / Alt+Up/Down */\n const root = React.useRef<HTMLDivElement>(null);\n const scroller = React.useRef<HTMLDivElement>(null);\n const nav = useFrameNavigation({ frames, navigate, root, scroller });\n\n const crumbs = framesToCrumbs(frames, schema, api.rollup, rootLabel);\n const crumbSig = crumbSignature(crumbs);\n const onCrumbsRef = React.useRef(onCrumbs);\n onCrumbsRef.current = onCrumbs;\n React.useLayoutEffect(() => {\n onCrumbsRef.current?.(crumbs);\n }, [crumbSig]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const syncedNote = envIn?.syncedFrom ? (\n <p className=\"mb-5 flex items-start gap-2 rounded-kit-lg bg-kit-info-soft px-3 py-2 text-kit-xs text-kit-info-fg\">\n <span className=\"mt-0.5 size-1.5 shrink-0 rounded-full bg-kit-info\" aria-hidden />\n <span>\n Synced from <span className=\"font-medium\">{envIn.syncedFrom}</span>. Changes here apply on every page that uses it.\n </span>\n </p>\n ) : null;\n const body = <FrameStage review={!!review} frames={frames} frameKey={nav.frameKey} dir={nav.dir} rootLabel={rootLabel ?? schema.title} variant={variant} before={syncedNote} />;\n\n return (\n <KitEnvProvider value={env}>\n <FormProvider value={api}>\n <HiddenLineCtx.Provider value={hiddenLine}>\n <FrameSlotsProvider value={hiddenLine ? GHOST_SLOTS : FRAME_SLOTS}>\n <RowsHostContext.Provider value={ROWS_HOST}>\n <div\n ref={root}\n onKeyDown={(e) => {\n nav.onKeyDown(e);\n // DK-010: Backspace / Delete pressed on a control that is not a text box (a button, chip, switch, option)\n // ends here. A host that deletes its selection on those keys must never hear them from inside the form.\n const t = e.target as HTMLElement;\n if ((e.key === \"Backspace\" || e.key === \"Delete\") && !e.metaKey && !e.ctrlKey && !e.altKey && !(t.matches(\"input,textarea,select\") || t.isContentEditable)) e.stopPropagation();\n }}\n className={cn(\"flex min-h-0 min-w-0 flex-col\", ownScroll && \"h-full\", className)} data-kit-form={schema.name}>\n {header}\n {onCrumbs ? null : <FrameCrumbs crumbs={crumbs} onNavigate={navigate} variant={variant} />}\n {ownScroll ? (\n <div ref={scroller} className=\"@container min-h-0 flex-1 overflow-y-auto overscroll-contain\">\n {body}\n </div>\n ) : (\n <div className=\"@container\">{body}</div>\n )}\n </div>\n </RowsHostContext.Provider>\n </FrameSlotsProvider>\n </HiddenLineCtx.Provider>\n </FormProvider>\n </KitEnvProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4HA,IAAa,cAAc;AAC3B,IAAa,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AAD;EAAgB,OAAO;EACrB,UAAA,oBAAC,cAAD;GAAc,OAAO;GACnB,UAAA,oBAAC,cAAc,UAAf;IAAwB,OAAO;IAC/B,UAAA,oBAAC,oBAAD;KAAoB,OAAO,aAAa,cAAc;KACpD,UAAA,oBAAC,gBAAgB,UAAjB;MAA0B,OAAO;MAC/B,UAAA,qBAAC,OAAD;OACE,KAAK;OACL,YAAY,MAAM;QAChB,IAAI,UAAU,CAAC;QAGf,MAAM,IAAI,EAAE;QACZ,KAAK,EAAE,QAAQ,eAAe,EAAE,QAAQ,aAAa,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,QAAQ,uBAAuB,KAAK,EAAE,oBAAoB,EAAE,gBAAgB;OAChL;OACA,WAAW,GAAG,iCAAiC,aAAa,UAAU,SAAS;OAAG,iBAAe,OAAO;OAT1G,UAAA;QAUG;QACA,WAAW,OAAO,oBAAC,aAAD;SAAqB;SAAQ,YAAY;SAAmB;QAAU,CAAA;QACxF,YACC,oBAAC,OAAD;SAAK,KAAK;SAAU,WAAU;SAC3B,UAAA;QACE,CAAA,IAEL,oBAAC,OAAD;SAAK,WAAU;SAAc,UAAA;QAAU,CAAA;OAEtC;;KACmB,CAAA;IACR,CAAA;GACI,CAAA;EACZ,CAAA;CACA,CAAA;AAEpB"}
|
|
@@ -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"}}},
|