@bettercms-ai/kit 2.0.0-next.5 → 2.0.0-next.7
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/lossy.d.ts +3 -3
- package/dist/adapters/lossy.js +3 -3
- package/dist/adapters/lossy.js.map +1 -1
- package/dist/adapters/prod-types.d.ts +48 -4
- package/dist/adapters/prod-types.js +4 -3
- package/dist/adapters/prod-types.js.map +1 -1
- package/dist/adapters/schema.d.ts +39 -0
- package/dist/adapters/schema.js +177 -32
- package/dist/adapters/schema.js.map +1 -1
- package/dist/controls/icon.d.ts +1 -1
- package/dist/controls/icon.js +1 -1
- package/dist/controls/icon.js.map +1 -1
- package/dist/controls/reference.js +10 -3
- package/dist/controls/reference.js.map +1 -1
- package/dist/controls/rich-text/article-shell.js +4 -1
- package/dist/controls/rich-text/article-shell.js.map +1 -1
- package/dist/controls/rich-text/blocks.js +2 -1
- package/dist/controls/rich-text/blocks.js.map +1 -1
- package/dist/controls/rich-text/codec.d.ts +2 -0
- package/dist/controls/rich-text/codec.js.map +1 -1
- package/dist/controls/rich-text/related.d.ts +7 -2
- package/dist/controls/rich-text/related.js +14 -5
- package/dist/controls/rich-text/related.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/ledgers/exclusions.v1.js +103 -0
- package/dist/ledgers/exclusions.v1.js.map +1 -0
- package/dist/library/coverage.d.ts +13 -1
- package/dist/library/coverage.js +12 -1
- package/dist/library/coverage.js.map +1 -1
- package/dist/library/kit-catalog.json +149 -149
- package/dist/schema/types.d.ts +1 -0
- package/dist/schema/types.js.map +1 -1
- package/dist/testing/coverage-extras.d.ts +8 -0
- package/dist/testing/coverage-extras.js +44 -0
- package/dist/testing/coverage-extras.js.map +1 -0
- package/dist/testing/exclusions.d.ts +30 -0
- package/dist/testing/exclusions.js +13 -0
- package/dist/testing/exclusions.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related.js","names":[],"sources":["../../../src/controls/rich-text/related.tsx"],"sourcesContent":["/**\n * RICH TEXT · Related posts (kit-richtext-ui-spec.md §6): V2's article block, stored as the PT block object\n * `{ _type: \"relatedPosts\", title?, mode, count, posts: { _ref }[] }`. Each post's title, cover, category and URL are\n * derived from the referenced or queried entries, never stored.\n *\n * modes e1 2026-10-24 (signed deviation from V2's Automatic | Hand-picked): Same topic (topic) · Newest (newest) ·\n * Hand-picked (manual). \"How many\" shows for the two automatic modes, Posts for Hand-picked. The schema's\n * `hidden` is \"show only when\" (schema/types.ts), as V2's was.\n * form V2 article.ts:167-195: Title (≤40, default \"Related stories\"), Stories (segmented), How many (1–6),\n * Posts (1–6 unique references to the field's collection). Four settings → the floating panel (D54).\n * preview V2 article-blocks.tsx:572-597: the title with the automatic mode's tag, three post cards (4:3 cover,\n * two-line title, category); \"Pick stories\" when Hand-picked holds nothing that resolves.\n * data KitServices.resolveRichTextRefs (useRichTextRefs): ids for Hand-picked, a query for the automatic modes.\n * A fresh insert focuses the card (V2 article-blocks.tsx:131).\n */\nimport * as React from \"react\";\nimport { IconPlus } from \"@tabler/icons-react\";\nimport { useRichTextRefs, type KitRichTextRefRequest } from \"../../context\";\nimport type { TypeSchema } from \"../../schema/types\";\nimport { ArticleEmpty, ArticlePanelBlock } from \"./article-shell\";\nimport type { IslandCtx } from \"./blocks\";\nimport type { IslandEl } from \"./dom\";\n\nexport type RelatedMode = \"topic\" | \"newest\" | \"manual\";\nexport interface RelatedModel {\n title: string;\n mode: RelatedMode;\n count: number;\n /** entry ids, Hand-picked only; the PT form wraps each as `{ _key, _ref }` */\n posts: string[];\n}\nexport const RELATED_LABEL = \"Related posts\";\n/** `topic: false`: the collection has nothing to rank Same topic by, so a new block is Newest. */\nexport const relatedDefault = (topic = true): RelatedModel => ({ title: \"Related stories\", mode: topic ? \"topic\" : \"newest\", count: 3, posts: [] });\n/** Why Same topic is not offered (RichTextRead.references.topic false; the entry write's relatedPosts.no_topic_field). */\nexport const NO_TOPIC_REASON = \"Same topic needs a tags or category field on this collection.\";\nconst MODE_TAG: Record<Exclude<RelatedMode, \"manual\">, string> = { topic: \"Same topic\", newest: \"Newest\" };\nconst asMode = (v: unknown): RelatedMode => (v === \"newest\" || v === \"manual\" ? v : \"topic\");\nconst clampCount = (v: unknown) => Math.min(6, Math.max(1, Math.round(Number(v) || 3)));\n\n/**\n * The panel form; `to` is the field's collection. \"How many\" explains the chosen automatic mode. With `topic` false,\n * Same topic is left out and Stories says why (a stored Same topic block keeps the option, so its value still shows).\n */\nexport const relatedSchema = (to: string[], mode: RelatedMode, topic = true): TypeSchema => ({\n name: \"relatedPosts\",\n title: RELATED_LABEL,\n kind: \"object\",\n icon: \"news\",\n fields: [\n { name: \"title\", title: \"Title\", type: \"string\", validation: { max: 40 } },\n {\n name: \"mode\",\n title: \"Stories\",\n type: \"select\",\n layout: \"segmented\",\n initialValue: topic ? \"topic\" : \"newest\",\n options: [\n ...(topic || mode === \"topic\" ? [{ value: \"topic\", label: \"Same topic\" }] : []),\n { value: \"newest\", label: \"Newest\" },\n { value: \"manual\", label: \"Hand-picked\" },\n ],\n ...(topic ? {} : { description: NO_TOPIC_REASON }),\n },\n {\n name: \"count\",\n title: \"How many\",\n type: \"number\",\n hidden: { field: \"mode\", op: \"in\", value: [\"topic\", \"newest\"] },\n numeric: { min: 1, max: 6, step: 1 },\n description: mode === \"newest\" ? \"Newest first.\" : \"Same topic, newest first.\",\n },\n {\n name: \"posts\",\n title: \"Posts\",\n type: \"array\",\n hidden: { field: \"mode\", equals: \"manual\" },\n validation: { min: 1, max: 6, unique: true },\n of: [{ name: \"post\", title: \"Post\", type: \"reference\", reference: { to } }],\n },\n ],\n});\n\n/** What the preview asks the host for: the picked ids, or the automatic mode's query. */\nexport function relatedRequest(m: RelatedModel, collection?: string, excludeId?: string): KitRichTextRefRequest | null {\n if (m.mode === \"manual\") return m.posts.length ? { kind: \"relatedPosts\", ids: m.posts } : null;\n return { kind: \"relatedPosts\", query: { collection, mode: m.mode, count: m.count, excludeId } };\n}\n\nexport function RelatedPreview({ m, onPick, ro, collection, excludeId }: { m: RelatedModel; onPick: () => void; ro: boolean; collection?: string; excludeId?: string }) {\n const { items, loading, error } = useRichTextRefs(relatedRequest(m, collection, excludeId));\n // Hand-picked keeps the picked order; a post that no longer resolves is skipped (V2 .filter)\n const posts = m.mode === \"manual\" ? m.posts.map((id) => items.find((x) => x.id === id)).filter((x): x is NonNullable<typeof x> => !!x) : items;\n if (m.mode === \"manual\" && !loading && !error && !posts.length)\n return <ArticleEmpty icon={<IconPlus stroke={1.5} />} title={m.title || RELATED_LABEL} action=\"Pick stories\" onAction={onPick} ro={ro} />;\n return (\n <aside className=\"rounded-kit-lg border border-kit-line bg-kit-surface px-4 py-3\" aria-label={m.title || RELATED_LABEL} aria-busy={loading || undefined}>\n <div className=\"mb-2 flex items-baseline gap-2\">\n {m.title ? (\n <p data-field=\"title\" className=\"text-kit-sm font-semibold text-kit-fg\">\n {m.title}\n </p>\n ) : null}\n {m.mode !== \"manual\" ? (\n <span data-field=\"mode\" className=\"text-kit-2xs text-kit-fg-3\">\n {MODE_TAG[m.mode]}\n </span>\n ) : null}\n </div>\n {error ? (\n <p role=\"status\" className=\"text-kit-sm text-kit-warning-fg\">\n The stories couldn't load: {error}\n </p>\n ) : (\n <ul className=\"m-0 grid grid-cols-3 gap-3 p-0\" data-field={m.mode === \"manual\" ? \"posts\" : \"count\"}>\n {posts.map((e) => (\n <li key={e.id} className=\"min-w-0 list-none\">\n {e.cover ? (\n <img src={e.cover} alt=\"\" draggable={false} className=\"block aspect-[4/3] w-full rounded-kit-md border border-kit-line object-cover\" />\n ) : (\n <div className=\"aspect-[4/3] rounded-kit-md bg-kit-muted\" />\n )}\n <p className=\"mt-1.5 line-clamp-2 text-kit-xs font-medium leading-snug text-kit-fg\">{e.title}</p>\n {e.category ? <p className=\"mt-0.5 truncate text-kit-2xs text-kit-fg-3\">{e.category}</p> : null}\n </li>\n ))}\n </ul>\n )}\n </aside>\n );\n}\n\nexport function RelatedBlock({\n m, set, el, ctx, autoFocus, collection, excludeId, topic = true,\n}: {\n m: RelatedModel;\n set: (fn: (m: RelatedModel) => RelatedModel, label?: string) => void;\n el: IslandEl;\n ctx: IslandCtx;\n autoFocus: boolean;\n /** the posts collection (the field's config) */\n collection: string;\n /** the entry being edited, left out of the automatic modes */\n excludeId?: string;\n /** false: the collection has no topic field, so Same topic is not offered */\n topic?: boolean;\n}) {\n const schema = React.useMemo(() => relatedSchema([collection], m.mode, topic), [collection, m.mode, topic]);\n return (\n <ArticlePanelBlock<RelatedModel>\n label={RELATED_LABEL}\n kind=\"related\"\n schema={schema}\n m={m}\n set={set}\n el={el}\n ctx={ctx}\n autoFocus={autoFocus}\n openOnInsert={false}\n toForm={(x) => ({ title: x.title, mode: x.mode, count: x.count, posts: x.posts })}\n fromForm={(v) => ({\n title: String(v.title ?? \"\"),\n mode: asMode(v.mode),\n count: clampCount(v.count),\n posts: Array.isArray(v.posts) ? v.posts.filter((x): x is string => typeof x === \"string\") : [],\n })}\n >\n {(open, ro) => <RelatedPreview m={m} onPick={() => open(\"posts\")} ro={ro} collection={collection} excludeId={excludeId} />}\n </ArticlePanelBlock>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BA,IAAa,gBAAgB;;AAE7B,IAAa,kBAAkB,QAAQ,UAAwB;CAAE,OAAO;CAAmB,MAAM,QAAQ,UAAU;CAAU,OAAO;CAAG,OAAO,CAAC;AAAE;;AAEjJ,IAAa,kBAAkB;AAC/B,IAAM,WAA2D;CAAE,OAAO;CAAc,QAAQ;AAAS;AACzG,IAAM,UAAU,MAA6B,MAAM,YAAY,MAAM,WAAW,IAAI;AACpF,IAAM,cAAc,MAAe,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;;;;;AAMtF,IAAa,iBAAiB,IAAc,MAAmB,QAAQ,UAAsB;CAC3F,MAAM;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,UAAA,EAAE;KAAY,CAAA,IAAI;IACzF;GARK,GAAA,EAAE,EAQP,CACL;EACC,CAAA,CAED;;AAEX;AAEA,SAAgB,aAAa,EAC3B,GAAG,KAAK,IAAI,KAAK,WAAW,YAAY,WAAW,QAAQ,QAa1D;CACD,MAAM,SAAS,MAAM,cAAc,cAAc,CAAC,UAAU,GAAG,EAAE,MAAM,KAAK,GAAG;EAAC;EAAY,EAAE;EAAM;CAAK,CAAC;CAC1G,OACE,oBAAC,mBAAD;EACE,OAAO;EACP,MAAK;EACG;EACL;EACE;EACD;EACC;EACM;EACX,cAAc;EACd,SAAS,OAAO;GAAE,OAAO,EAAE;GAAO,MAAM,EAAE;GAAM,OAAO,EAAE;GAAO,OAAO,EAAE;EAAM;EAC/E,WAAW,OAAO;GAChB,OAAO,OAAO,EAAE,SAAS,EAAE;GAC3B,MAAM,OAAO,EAAE,IAAI;GACnB,OAAO,WAAW,EAAE,KAAK;GACzB,OAAO,MAAM,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,MAAmB,OAAO,MAAM,QAAQ,IAAI,CAAC;EAC/F;EAEE,WAAA,MAAM,OAAO,oBAAC,gBAAD;GAAmB;GAAG,cAAc,KAAK,OAAO;GAAO;GAAgB;GAAuB;EAAY,CAAA;CACxG,CAAA;AAEvB"}
|
|
1
|
+
{"version":3,"file":"related.js","names":[],"sources":["../../../src/controls/rich-text/related.tsx"],"sourcesContent":["/**\n * RICH TEXT · Related posts (kit-richtext-ui-spec.md §6): V2's article block, stored as the PT block object\n * `{ _type: \"relatedPosts\", title?, mode, count, posts: { _ref }[] }`. Each post's title, cover, category and URL are\n * derived from the referenced or queried entries, never stored.\n *\n * modes e1 2026-10-24 (signed deviation from V2's Automatic | Hand-picked): Same topic (topic) · Newest (newest) ·\n * Hand-picked (manual). \"How many\" shows for the two automatic modes, Posts for Hand-picked. The schema's\n * `hidden` is \"show only when\" (schema/types.ts), as V2's was.\n * form V2 article.ts:167-195: Title (≤40, default \"Related stories\"), Stories (segmented), How many (1–6),\n * Posts (1–6 unique references to the field's collection). Four settings → the floating panel (D54).\n * preview V2 article-blocks.tsx:572-597: the title with the automatic mode's tag, three post cards (4:3 cover,\n * two-line title, category); \"Pick stories\" when Hand-picked holds nothing that resolves.\n * data KitServices.resolveRichTextRefs (useRichTextRefs): ids for Hand-picked, a query for the automatic modes.\n * A fresh insert focuses the card (V2 article-blocks.tsx:131).\n */\nimport * as React from \"react\";\nimport { IconPlus } from \"@tabler/icons-react\";\nimport { useRichTextRefs, type KitRichTextRefRequest } from \"../../context\";\nimport type { TypeSchema } from \"../../schema/types\";\nimport { ArticleEmpty, ArticlePanelBlock } from \"./article-shell\";\nimport type { IslandCtx } from \"./blocks\";\nimport type { IslandEl } from \"./dom\";\n\nexport type RelatedMode = \"topic\" | \"newest\" | \"manual\";\nexport interface RelatedModel {\n title: string;\n mode: RelatedMode;\n count: number;\n /** entry ids, Hand-picked only; the PT form wraps each as `{ _key, _ref }` */\n posts: string[];\n}\nexport const RELATED_LABEL = \"Related posts\";\n/** `topic: false`: the collection has nothing to rank Same topic by, so a new block is Newest. */\nexport const relatedDefault = (topic = true): RelatedModel => ({ title: \"Related stories\", mode: topic ? \"topic\" : \"newest\", count: 3, posts: [] });\n/** Why Same topic is not offered (RichTextRead.references.topic false; the entry write's relatedPosts.no_topic_field). */\nexport const NO_TOPIC_REASON = \"Same topic needs a tags or category field on this collection.\";\nconst MODE_TAG: Record<Exclude<RelatedMode, \"manual\">, string> = { topic: \"Same topic\", newest: \"Newest\" };\nconst asMode = (v: unknown): RelatedMode => (v === \"newest\" || v === \"manual\" ? v : \"topic\");\nconst clampCount = (v: unknown) => Math.min(6, Math.max(1, Math.round(Number(v) || 3)));\n\n/**\n * The panel form; `to` is the field's collection. \"How many\" explains the chosen automatic mode. With `topic` false,\n * Same topic is left out and Stories says why (a stored Same topic block keeps the option, so its value still shows).\n */\nexport const relatedSchema = (to: string[], mode: RelatedMode, topic = true, pick: { noun?: string; excludeId?: string } = {}): TypeSchema => ({\n name: \"relatedPosts\",\n title: RELATED_LABEL,\n kind: \"object\",\n icon: \"news\",\n fields: [\n { name: \"title\", title: \"Title\", type: \"string\", validation: { max: 40 } },\n {\n name: \"mode\",\n title: \"Stories\",\n type: \"select\",\n layout: \"segmented\",\n initialValue: topic ? \"topic\" : \"newest\",\n options: [\n ...(topic || mode === \"topic\" ? [{ value: \"topic\", label: \"Same topic\" }] : []),\n { value: \"newest\", label: \"Newest\" },\n { value: \"manual\", label: \"Hand-picked\" },\n ],\n ...(topic ? {} : { description: NO_TOPIC_REASON }),\n },\n {\n name: \"count\",\n title: \"How many\",\n type: \"number\",\n hidden: { field: \"mode\", op: \"in\", value: [\"topic\", \"newest\"] },\n numeric: { min: 1, max: 6, step: 1 },\n description: mode === \"newest\" ? \"Newest first.\" : \"Same topic, newest first.\",\n },\n {\n name: \"posts\",\n title: \"Posts\",\n type: \"array\",\n hidden: { field: \"mode\", equals: \"manual\" },\n validation: { min: 1, max: 6, unique: true },\n // Hand-picked never lists the entry being edited, and names a post as its collection does\n of: [{ name: \"post\", title: \"Post\", type: \"reference\", reference: { to, ...(pick.noun ? { noun: pick.noun } : {}), ...(pick.excludeId ? { excludeId: pick.excludeId } : {}) } }],\n },\n ],\n});\n\n/** What the preview asks the host for: the picked ids, or the automatic mode's query. */\nexport function relatedRequest(m: RelatedModel, collection?: string, excludeId?: string): KitRichTextRefRequest | null {\n if (m.mode === \"manual\") return m.posts.length ? { kind: \"relatedPosts\", ids: m.posts } : null;\n return { kind: \"relatedPosts\", query: { collection, mode: m.mode, count: m.count, excludeId } };\n}\n\nexport function RelatedPreview({ m, onPick, ro, collection, excludeId }: { m: RelatedModel; onPick: () => void; ro: boolean; collection?: string; excludeId?: string }) {\n const { items, loading, error } = useRichTextRefs(relatedRequest(m, collection, excludeId));\n // Hand-picked keeps the picked order; a post that no longer resolves is skipped (V2 .filter)\n const posts = m.mode === \"manual\" ? m.posts.map((id) => items.find((x) => x.id === id)).filter((x): x is NonNullable<typeof x> => !!x) : items;\n if (m.mode === \"manual\" && !loading && !error && !posts.length)\n return <ArticleEmpty icon={<IconPlus stroke={1.5} />} title={m.title || RELATED_LABEL} action=\"Pick stories\" onAction={onPick} ro={ro} />;\n return (\n <aside className=\"rounded-kit-lg border border-kit-line bg-kit-surface px-4 py-3\" aria-label={m.title || RELATED_LABEL} aria-busy={loading || undefined}>\n <div className=\"mb-2 flex items-baseline gap-2\">\n {m.title ? (\n <p data-field=\"title\" className=\"text-kit-sm font-semibold text-kit-fg\">\n {m.title}\n </p>\n ) : null}\n {m.mode !== \"manual\" ? (\n <span data-field=\"mode\" className=\"text-kit-2xs text-kit-fg-3\">\n {MODE_TAG[m.mode]}\n </span>\n ) : null}\n </div>\n {error ? (\n <p role=\"status\" className=\"text-kit-sm text-kit-warning-fg\">\n The stories couldn't load: {error}\n </p>\n ) : (\n <ul className=\"m-0 grid grid-cols-3 gap-3 p-0\" data-field={m.mode === \"manual\" ? \"posts\" : \"count\"}>\n {posts.map((e) => (\n <li key={e.id} className=\"min-w-0 list-none\">\n {e.cover ? (\n <img src={e.cover} alt=\"\" draggable={false} className=\"block aspect-[4/3] w-full rounded-kit-md border border-kit-line object-cover\" />\n ) : (\n <div className=\"aspect-[4/3] rounded-kit-md bg-kit-muted\" />\n )}\n <p className=\"mt-1.5 line-clamp-2 text-kit-xs font-medium leading-snug text-kit-fg\">{e.title}</p>\n {e.category ? <p className=\"mt-0.5 truncate text-kit-2xs text-kit-fg-3\">{e.category}</p> : null}\n </li>\n ))}\n </ul>\n )}\n </aside>\n );\n}\n\nexport function RelatedBlock({\n m, set, el, ctx, autoFocus, collection, excludeId, topic = true, noun,\n}: {\n m: RelatedModel;\n set: (fn: (m: RelatedModel) => RelatedModel, label?: string) => void;\n el: IslandEl;\n ctx: IslandCtx;\n autoFocus: boolean;\n /** the posts collection (the field's config) */\n collection: string;\n /** the entry being edited, left out of the automatic modes */\n excludeId?: string;\n /** false: the collection has no topic field, so Same topic is not offered */\n topic?: boolean;\n /** what one post is called (the collection's singular); absent → the picker's own noun */\n noun?: string;\n}) {\n const schema = React.useMemo(() => relatedSchema([collection], m.mode, topic, { noun, excludeId }), [collection, m.mode, topic, noun, excludeId]);\n return (\n <ArticlePanelBlock<RelatedModel>\n label={RELATED_LABEL}\n kind=\"related\"\n schema={schema}\n m={m}\n set={set}\n el={el}\n ctx={ctx}\n autoFocus={autoFocus}\n openOnInsert={false}\n toForm={(x) => ({ title: x.title, mode: x.mode, count: x.count, posts: x.posts })}\n fromForm={(v) => ({\n title: String(v.title ?? \"\"),\n mode: asMode(v.mode),\n count: clampCount(v.count),\n posts: Array.isArray(v.posts) ? v.posts.filter((x): x is string => typeof x === \"string\") : [],\n })}\n >\n {(open, ro) => <RelatedPreview m={m} onPick={() => open(\"posts\")} ro={ro} collection={collection} excludeId={excludeId} />}\n </ArticlePanelBlock>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+BA,IAAa,gBAAgB;;AAE7B,IAAa,kBAAkB,QAAQ,UAAwB;CAAE,OAAO;CAAmB,MAAM,QAAQ,UAAU;CAAU,OAAO;CAAG,OAAO,CAAC;AAAE;;AAEjJ,IAAa,kBAAkB;AAC/B,IAAM,WAA2D;CAAE,OAAO;CAAc,QAAQ;AAAS;AACzG,IAAM,UAAU,MAA6B,MAAM,YAAY,MAAM,WAAW,IAAI;AACpF,IAAM,cAAc,MAAe,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;;;;;AAMtF,IAAa,iBAAiB,IAAc,MAAmB,QAAQ,MAAM,OAA8C,CAAC,OAAmB;CAC7I,MAAM;CACN,OAAO;CACP,MAAM;CACN,MAAM;CACN,QAAQ;EACN;GAAE,MAAM;GAAS,OAAO;GAAS,MAAM;GAAU,YAAY,EAAE,KAAK,GAAG;EAAE;EACzE;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ;GACR,cAA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ACL;EACC,CAAA,CAED;;AAEX;AAEA,SAAgB,aAAa,EAC3B,GAAG,KAAK,IAAI,KAAK,WAAW,YAAY,WAAW,QAAQ,MAAM,QAehE;CACD,MAAM,SAAS,MAAM,cAAc,cAAc,CAAC,UAAU,GAAG,EAAE,MAAM,OAAO;EAAE;EAAM;CAAU,CAAC,GAAG;EAAC;EAAY,EAAE;EAAM;EAAO;EAAM;CAAS,CAAC;CAChJ,OACE,oBAAC,mBAAD;EACE,OAAO;EACP,MAAK;EACG;EACL;EACE;EACD;EACC;EACM;EACX,cAAc;EACd,SAAS,OAAO;GAAE,OAAO,EAAE;GAAO,MAAM,EAAE;GAAM,OAAO,EAAE;GAAO,OAAO,EAAE;EAAM;EAC/E,WAAW,OAAO;GAChB,OAAO,OAAO,EAAE,SAAS,EAAE;GAC3B,MAAM,OAAO,EAAE,IAAI;GACnB,OAAO,WAAW,EAAE,KAAK;GACzB,OAAO,MAAM,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,MAAmB,OAAO,MAAM,QAAQ,IAAI,CAAC;EAC/F;EAEE,WAAA,MAAM,OAAO,oBAAC,gBAAD;GAAmB;GAAG,cAAc,KAAK,OAAO;GAAO;GAAgB;GAAuB;EAAY,CAAA;CACxG,CAAA;AAEvB"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { prod_types_exports } from "./adapters/prod-types.js";
|
|
2
2
|
import { buttonFromProd, buttonToProd, codeFromProd, codeToProd, cropPreset, cropRect, dateFromProd, dateToProd, datetimeFromProd, datetimeToProd, imageFromProd, imageToProd, isCropRect, isDockIcon, linkFromProd, linkToProd, listFromProd, listToProd, parseTargetTag, ratingFromProd, ratingToProd, referenceFromProd, referenceToProd, scaleFromProd, scaleToProd, tableFromProd, tableToProd, tagsFromProd, tagsToProd, targetTag, typedRowsFromProd, typedRowsToProd, videoFromProd, videoToProd, zoneListFromProd, zoneListToProd } from "./adapters/values.js";
|
|
3
|
-
import { CATEGORY_TO_PROD, SHOPIFY_REF_LOCK, fromTypeSchema, leafValuePlan, planFromProd, planToProd, propsToTypeSchema, schemaSlugOf, toTypeSchema } from "./adapters/schema.js";
|
|
3
|
+
import { CATEGORY_TO_PROD, SHOPIFY_REF_LOCK, fromTypeSchema, leafValuePlan, planFromProd, planToProd, propsToTypeSchema, schemaSlugOf, toTypeSchema, variantFamilyFromTypeSchema, variantFamilyToTypeSchema, variantGroupV2 } from "./adapters/schema.js";
|
|
4
4
|
import { cn } from "./lib/cn.js";
|
|
5
5
|
import { AI_PRESETS, DEFAULT_ENV, FieldHeaderSlot, FormProvider, KitEnvProvider, KitSectionTitle, KitServicesProvider, SITE_PALETTE, fieldAccessOf, registerKitServices, resolveFieldAccess, seesDevSurfaces, useForm, useKitEnv, useKitServices, useRichTextRefs, visibleFields, visibleSchema } from "./context.js";
|
|
6
6
|
import { FieldDescribedByContext, FieldLabelledByContext, useFieldDescribedBy, useFieldId, useFieldLabelledBy } from "./ui/field-context.js";
|
|
@@ -53,6 +53,6 @@ import "./kit.css";
|
|
|
53
53
|
//#region src/index.ts
|
|
54
54
|
registerKitControls();
|
|
55
55
|
//#endregion
|
|
56
|
-
export { ACTIONS, ACTION_WHEN_READ_ONLY, AGENT_PRESENCE, AI_PRESETS, ARRAY_CONTROLS, ActionTray, AnimatedFields, Appear, ArrayField, Autocomplete, Avatar, AvatarStack, Badge, BlockPicker, BreakpointGroup, Button, CAP_IDS, CATEGORY_TO_PROD, COALESCE_MS, CONTROLS, Card, CardHeader, Checkbox, ChoiceCard, ChoiceList, ChoiceSwitch, DEFAULT_ENV, DEV_FIELD, DEV_ONLY_FIELD, Dot, EmptyState, ExpandedEditorModal, FLOATING_LAYER, FallbackControl, Field, FieldDescribedByContext, FieldHeaderSlot, FieldInset, FieldLabelledByContext, FieldList, FieldSection, FieldShell, FieldUnit, FieldUnitRow, FieldsetSection, FlowBody, FlowClose, FlowFooter, FlowHeader, FlowLabel, FlowModal, FormProvider, FrameCrumbs, FrameHeader, FrameSlotsProvider, FrameStage, FrameView, GroupTabs, HELP_STRINGS, HISTORY_SEGMENT, HeaderStatus, HelpMore, Highlight, HintTooltip, HistoryView, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, Input, InsetScope, IssueDot, ItemList, Kbd, Kbdish, KitBreadcrumb, KitEnvProvider, KitField, KitSectionTitle, KitServicesProvider, KitToaster, LABEL_HINT_AT, Label, LegacyFallback, Menu, MenuCheckItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Modal, ModalBody, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalTrigger, ModeBar, ModeBarDot, ModeBarLink, MoreOptions, NavRow, NestedForm, OptionRow, OrderLockSlot, PageHeader, PeerStack, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RHYTHM, Radio, RadioGroup, RevealLink, RowChrome, RowList, RowsHostContext, SEARCH_THRESHOLD, SEGMENTED_MAX, SEGMENTED_MAX_LABEL, SHOPIFY_REF_LOCK, SITE_PALETTE, SchemaForm, SearchInput, Segmented, Select, Separator, SettingsSection, SharedSortProvider, Sheet, SheetClose, SheetContent, SheetTrigger, ShortcutHint, ShortcutHintsProvider, Skeleton, Slider, SlotField, Sparkle, Spinner, Stat, StatusMark, StatusPill, Switch, Tab, TabList, TabPanel, Table, Tabs, Td, Textarea, Th, Thumb, ToggleGroup, ToggleItem, Tooltip, TooltipProvider, TooltipScope, Tr, TrayMeta, TrayMore, UNDO_STEPS, actionTrayClass, apiName, arrangeFields, arrayMove, avatarRingSpread, badgeVariants, blockDefToSchema, buttonFromProd, buttonToProd, buttonVariants, cn, codeFromProd, codeToProd, colorFor, controls_exports as controls, conventionalHelp, cropPreset, cropRect, crumbSignature, dateFromProd, dateToProd, datetimeFromProd, datetimeToProd, defaultGroup, fieldAccessOf, fieldDefToSchema, fieldDefsToSchema, filterOptions, fitsSegmented, frameContext, frameDirection, framesToCrumbs, fromTypeSchema, groupSummary, iconButtonVariants, imageFromProd, imageToProd, inferField, initials, isBreakpointName, isCropRect, isDockIcon, isDrillable, isShort, kitPathItems, kitToast, kitToastManager, leafValuePlan, linkFromProd, linkToProd, listFromProd, listToProd, matchPositions, matchScore, nodeText, parentOfField, parentTitleOf, parseTargetTag, plainOf, planFromProd, planToProd, presenceColor, presenceSlot, prod_types_exports as prod, propDefToField, propsToTypeSchema, ratingFromProd, ratingToProd, referenceFromProd, referenceToProd, registerKitControls, registerKitServices, registerPresenceRoster, relTime, resetFieldClipboard, resolveFieldAccess, resolveFrames, resolveHelp, rootFrame, rowToggleField, scaleFromProd, scaleToProd, schemaSlugOf, seesDevSurfaces, selectTriggerClass, shortcutHintsOn, statusMap, tableFromProd, tableToProd, tagsFromProd, tagsToProd, targetTag, titleFromKey, toTypeSchema, typedRowsFromProd, typedRowsToProd, useAvailableBlocks, useDragReorder, useDrill, useFieldAccess, useFieldDescribedBy, useFieldId, useFieldLabelledBy, useFocusReturn, useForm, useFrameNavigation, useFrameSlots, useGroupStatus, useInsetDepth, useKitEnv, useKitServices, useListOps, useRhythm, useRichTextRefs, useSharedSort, useShortcutHints, videoFromProd, videoToProd, visibleFields, visibleSchema, withDefaultHelp, zoneListFromProd, zoneListToProd };
|
|
56
|
+
export { ACTIONS, ACTION_WHEN_READ_ONLY, AGENT_PRESENCE, AI_PRESETS, ARRAY_CONTROLS, ActionTray, AnimatedFields, Appear, ArrayField, Autocomplete, Avatar, AvatarStack, Badge, BlockPicker, BreakpointGroup, Button, CAP_IDS, CATEGORY_TO_PROD, COALESCE_MS, CONTROLS, Card, CardHeader, Checkbox, ChoiceCard, ChoiceList, ChoiceSwitch, DEFAULT_ENV, DEV_FIELD, DEV_ONLY_FIELD, Dot, EmptyState, ExpandedEditorModal, FLOATING_LAYER, FallbackControl, Field, FieldDescribedByContext, FieldHeaderSlot, FieldInset, FieldLabelledByContext, FieldList, FieldSection, FieldShell, FieldUnit, FieldUnitRow, FieldsetSection, FlowBody, FlowClose, FlowFooter, FlowHeader, FlowLabel, FlowModal, FormProvider, FrameCrumbs, FrameHeader, FrameSlotsProvider, FrameStage, FrameView, GroupTabs, HELP_STRINGS, HISTORY_SEGMENT, HeaderStatus, HelpMore, Highlight, HintTooltip, HistoryView, HoverCard, HoverCardContent, HoverCardTrigger, IconButton, Input, InsetScope, IssueDot, ItemList, Kbd, Kbdish, KitBreadcrumb, KitEnvProvider, KitField, KitSectionTitle, KitServicesProvider, KitToaster, LABEL_HINT_AT, Label, LegacyFallback, Menu, MenuCheckItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, Modal, ModalBody, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalTrigger, ModeBar, ModeBarDot, ModeBarLink, MoreOptions, NavRow, NestedForm, OptionRow, OrderLockSlot, PageHeader, PeerStack, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RHYTHM, Radio, RadioGroup, RevealLink, RowChrome, RowList, RowsHostContext, SEARCH_THRESHOLD, SEGMENTED_MAX, SEGMENTED_MAX_LABEL, SHOPIFY_REF_LOCK, SITE_PALETTE, SchemaForm, SearchInput, Segmented, Select, Separator, SettingsSection, SharedSortProvider, Sheet, SheetClose, SheetContent, SheetTrigger, ShortcutHint, ShortcutHintsProvider, Skeleton, Slider, SlotField, Sparkle, Spinner, Stat, StatusMark, StatusPill, Switch, Tab, TabList, TabPanel, Table, Tabs, Td, Textarea, Th, Thumb, ToggleGroup, ToggleItem, Tooltip, TooltipProvider, TooltipScope, Tr, TrayMeta, TrayMore, UNDO_STEPS, actionTrayClass, apiName, arrangeFields, arrayMove, avatarRingSpread, badgeVariants, blockDefToSchema, buttonFromProd, buttonToProd, buttonVariants, cn, codeFromProd, codeToProd, colorFor, controls_exports as controls, conventionalHelp, cropPreset, cropRect, crumbSignature, dateFromProd, dateToProd, datetimeFromProd, datetimeToProd, defaultGroup, fieldAccessOf, fieldDefToSchema, fieldDefsToSchema, filterOptions, fitsSegmented, frameContext, frameDirection, framesToCrumbs, fromTypeSchema, groupSummary, iconButtonVariants, imageFromProd, imageToProd, inferField, initials, isBreakpointName, isCropRect, isDockIcon, isDrillable, isShort, kitPathItems, kitToast, kitToastManager, leafValuePlan, linkFromProd, linkToProd, listFromProd, listToProd, matchPositions, matchScore, nodeText, parentOfField, parentTitleOf, parseTargetTag, plainOf, planFromProd, planToProd, presenceColor, presenceSlot, prod_types_exports as prod, propDefToField, propsToTypeSchema, ratingFromProd, ratingToProd, referenceFromProd, referenceToProd, registerKitControls, registerKitServices, registerPresenceRoster, relTime, resetFieldClipboard, resolveFieldAccess, resolveFrames, resolveHelp, rootFrame, rowToggleField, scaleFromProd, scaleToProd, schemaSlugOf, seesDevSurfaces, selectTriggerClass, shortcutHintsOn, statusMap, tableFromProd, tableToProd, tagsFromProd, tagsToProd, targetTag, titleFromKey, toTypeSchema, typedRowsFromProd, typedRowsToProd, useAvailableBlocks, useDragReorder, useDrill, useFieldAccess, useFieldDescribedBy, useFieldId, useFieldLabelledBy, useFocusReturn, useForm, useFrameNavigation, useFrameSlots, useGroupStatus, useInsetDepth, useKitEnv, useKitServices, useListOps, useRhythm, useRichTextRefs, useSharedSort, useShortcutHints, variantFamilyFromTypeSchema, variantFamilyToTypeSchema, variantGroupV2, videoFromProd, videoToProd, visibleFields, visibleSchema, withDefaultHelp, zoneListFromProd, zoneListToProd };
|
|
57
57
|
|
|
58
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
//#region ledgers/exclusions.v1.json
|
|
2
|
+
var about = "What the V2 → prod mapping does not carry, and why that is no loss. `exclusions`: owner-signed losses (kit-facet-table.v3.md: row 12, row 9's Shopify subset, and B's two 'CATALOG not hit' rules); nothing goes here unsigned. `equivalences`: representation moves, where prod holds the same fact elsewhere; each names the recovery its proof checks (the dashboard's kitCorpusDock gate). A lost key the gate finds must match an exclusion or a proven equivalence, or it is a gap.";
|
|
3
|
+
var exclusions = [
|
|
4
|
+
{
|
|
5
|
+
"id": "shopify-reference",
|
|
6
|
+
"plane": "schema",
|
|
7
|
+
"feature": "shopify reference",
|
|
8
|
+
"reason": "A Shopify product reference: prod has no Shopify integration behind a reference yet (deferred:shopify); the backend refuses the target by name (reference_target_unsupported).",
|
|
9
|
+
"signedBy": "owner, G0a (kit-facet-table.v3.md row 12)"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "reference-target-shopify",
|
|
13
|
+
"plane": "schema",
|
|
14
|
+
"feature": "reference target",
|
|
15
|
+
"pattern": "shopify",
|
|
16
|
+
"reason": "The Shopify subset of reference targets on any reference field (row 9): the rest of reference targets are stored natively (config.targets).",
|
|
17
|
+
"signedBy": "owner, G0a (kit-facet-table.v3.md row 9)"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "reference_in_definition",
|
|
21
|
+
"plane": "schema",
|
|
22
|
+
"feature": "seeded instance",
|
|
23
|
+
"key": "reference_in_definition",
|
|
24
|
+
"reason": "A seeded instance's reference value in a component definition: deliberate backend rule; a definition names no entry, the placement does.",
|
|
25
|
+
"signedBy": "owner (kit-facet-table.v3.md B, 'CATALOG not hit')"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "unique_prop_scope",
|
|
29
|
+
"plane": "schema",
|
|
30
|
+
"feature": "not applicable (props)",
|
|
31
|
+
"key": "unique_prop_scope",
|
|
32
|
+
"reason": "A uniqueness rule scoped to a component prop: deliberate backend rule; uniqueness is a collection's, not a placement's.",
|
|
33
|
+
"signedBy": "owner (kit-facet-table.v3.md B, 'CATALOG not hit')"
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
var equivalences = [
|
|
37
|
+
{
|
|
38
|
+
"id": "variant",
|
|
39
|
+
"plane": "value",
|
|
40
|
+
"key": "_variant",
|
|
41
|
+
"moves": "V2's block variant is the component itself in prod: one component per variant sharing a sectionType; a slot child names its variant's component in _type.",
|
|
42
|
+
"recovery": "_variant is recovered from the component id: the family member the placement names is the V2 variant."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "global",
|
|
46
|
+
"plane": "value",
|
|
47
|
+
"key": "_ref | _overrides",
|
|
48
|
+
"moves": "A global block instance's reference and override map are the placement itself in prod (componentId + overrides), not props.",
|
|
49
|
+
"recovery": "_ref / _overrides resolve to the placement value: the placement's component and its overrides are V2's _ref and _overrides."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "asset",
|
|
53
|
+
"plane": "value",
|
|
54
|
+
"key": "image width | height",
|
|
55
|
+
"moves": "An image's pixel size is kept on the media asset, never in the value (values.ts imageToProd).",
|
|
56
|
+
"recovery": "width / height read back from the media asset (the kit's image control reads them through useMediaAsset)."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "zone",
|
|
60
|
+
"plane": "value",
|
|
61
|
+
"key": "datetime [Zone]",
|
|
62
|
+
"moves": "A datetime on a field with no fixed zone is stored as the instant and its offset; V2's date control writes a [Zone] only for a fixed-zone field.",
|
|
63
|
+
"recovery": "A datetime without a zone round-trips to the same instant, displayed in the site time zone (the stated display rule)."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "rel",
|
|
67
|
+
"plane": "value",
|
|
68
|
+
"key": "rel follow",
|
|
69
|
+
"moves": "\"follow\" is no rel: the backend's rel list is nofollow, sponsored and ugc.",
|
|
70
|
+
"recovery": "\"follow\" ⇔ no rel: the link and button controls show an unset rel as Do-follow and never write it."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "item-open-mode",
|
|
74
|
+
"plane": "schema",
|
|
75
|
+
"feature": "item openMode",
|
|
76
|
+
"key": "of[0].openMode",
|
|
77
|
+
"moves": "A list of object items opens as the LIST says: prod keeps one openMode per list (the array field's, a table prop's), and V2's engine reads only that one.",
|
|
78
|
+
"recovery": "V2 itemOpenMode(list) = list.openMode ?? (one small object item ? inline : drill); the item's own openMode never contributes, so the stored list openMode yields the same mode.",
|
|
79
|
+
"proof": "bettercms-v2-demo-himanshu/src/components/kit/lib/schema.ts:42-46 (itemOpenMode)",
|
|
80
|
+
"ruledBy": "bettercms-ff 2026-10-24 (G-REMAIN B1)"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "variant-group",
|
|
84
|
+
"plane": "schema",
|
|
85
|
+
"feature": "variants",
|
|
86
|
+
"key": "variants",
|
|
87
|
+
"moves": "A block's variants on the component side are its variant family: one component per V2 variant (sectionType = the block's title, name = the variant's, slug = the block's slug + '-' + the variant id) and a component_variant_groups row whose v2.variants lists the members in order with their description.",
|
|
88
|
+
"recovery": "variantFamilyToTypeSchema: the group's members in v2.variants order; each variant's id is the member slug after the group slug, its name the member's name, its description the meta's.",
|
|
89
|
+
"proof": "kit-roundtrip.test.ts props lane: each member through componentSchemas.create, the group's v2 through variantGroupV2Schema, read back in the stored order",
|
|
90
|
+
"carriedBy": "variantFamilyFromTypeSchema",
|
|
91
|
+
"ruledBy": "bettercms-ff 2026-10-24 (3c); bettercms-72 2026-10-24 (planner in the kit)"
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
var exclusions_v1_default = {
|
|
95
|
+
about,
|
|
96
|
+
version: 1,
|
|
97
|
+
exclusions,
|
|
98
|
+
equivalences
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
export { about, exclusions_v1_default as default, equivalences, exclusions };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=exclusions.v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exclusions.v1.js","names":[],"sources":["../../ledgers/exclusions.v1.json"],"sourcesContent":["{\n \"about\": \"What the V2 → prod mapping does not carry, and why that is no loss. `exclusions`: owner-signed losses (kit-facet-table.v3.md: row 12, row 9's Shopify subset, and B's two 'CATALOG not hit' rules); nothing goes here unsigned. `equivalences`: representation moves, where prod holds the same fact elsewhere; each names the recovery its proof checks (the dashboard's kitCorpusDock gate). A lost key the gate finds must match an exclusion or a proven equivalence, or it is a gap.\",\n \"version\": 1,\n \"exclusions\": [\n {\n \"id\": \"shopify-reference\",\n \"plane\": \"schema\",\n \"feature\": \"shopify reference\",\n \"reason\": \"A Shopify product reference: prod has no Shopify integration behind a reference yet (deferred:shopify); the backend refuses the target by name (reference_target_unsupported).\",\n \"signedBy\": \"owner, G0a (kit-facet-table.v3.md row 12)\"\n },\n {\n \"id\": \"reference-target-shopify\",\n \"plane\": \"schema\",\n \"feature\": \"reference target\",\n \"pattern\": \"shopify\",\n \"reason\": \"The Shopify subset of reference targets on any reference field (row 9): the rest of reference targets are stored natively (config.targets).\",\n \"signedBy\": \"owner, G0a (kit-facet-table.v3.md row 9)\"\n },\n {\n \"id\": \"reference_in_definition\",\n \"plane\": \"schema\",\n \"feature\": \"seeded instance\",\n \"key\": \"reference_in_definition\",\n \"reason\": \"A seeded instance's reference value in a component definition: deliberate backend rule; a definition names no entry, the placement does.\",\n \"signedBy\": \"owner (kit-facet-table.v3.md B, 'CATALOG not hit')\"\n },\n {\n \"id\": \"unique_prop_scope\",\n \"plane\": \"schema\",\n \"feature\": \"not applicable (props)\",\n \"key\": \"unique_prop_scope\",\n \"reason\": \"A uniqueness rule scoped to a component prop: deliberate backend rule; uniqueness is a collection's, not a placement's.\",\n \"signedBy\": \"owner (kit-facet-table.v3.md B, 'CATALOG not hit')\"\n }\n ],\n \"equivalences\": [\n {\n \"id\": \"variant\",\n \"plane\": \"value\",\n \"key\": \"_variant\",\n \"moves\": \"V2's block variant is the component itself in prod: one component per variant sharing a sectionType; a slot child names its variant's component in _type.\",\n \"recovery\": \"_variant is recovered from the component id: the family member the placement names is the V2 variant.\"\n },\n {\n \"id\": \"global\",\n \"plane\": \"value\",\n \"key\": \"_ref | _overrides\",\n \"moves\": \"A global block instance's reference and override map are the placement itself in prod (componentId + overrides), not props.\",\n \"recovery\": \"_ref / _overrides resolve to the placement value: the placement's component and its overrides are V2's _ref and _overrides.\"\n },\n {\n \"id\": \"asset\",\n \"plane\": \"value\",\n \"key\": \"image width | height\",\n \"moves\": \"An image's pixel size is kept on the media asset, never in the value (values.ts imageToProd).\",\n \"recovery\": \"width / height read back from the media asset (the kit's image control reads them through useMediaAsset).\"\n },\n {\n \"id\": \"zone\",\n \"plane\": \"value\",\n \"key\": \"datetime [Zone]\",\n \"moves\": \"A datetime on a field with no fixed zone is stored as the instant and its offset; V2's date control writes a [Zone] only for a fixed-zone field.\",\n \"recovery\": \"A datetime without a zone round-trips to the same instant, displayed in the site time zone (the stated display rule).\"\n },\n {\n \"id\": \"rel\",\n \"plane\": \"value\",\n \"key\": \"rel follow\",\n \"moves\": \"\\\"follow\\\" is no rel: the backend's rel list is nofollow, sponsored and ugc.\",\n \"recovery\": \"\\\"follow\\\" ⇔ no rel: the link and button controls show an unset rel as Do-follow and never write it.\"\n },\n {\n \"id\": \"item-open-mode\",\n \"plane\": \"schema\",\n \"feature\": \"item openMode\",\n \"key\": \"of[0].openMode\",\n \"moves\": \"A list of object items opens as the LIST says: prod keeps one openMode per list (the array field's, a table prop's), and V2's engine reads only that one.\",\n \"recovery\": \"V2 itemOpenMode(list) = list.openMode ?? (one small object item ? inline : drill); the item's own openMode never contributes, so the stored list openMode yields the same mode.\",\n \"proof\": \"bettercms-v2-demo-himanshu/src/components/kit/lib/schema.ts:42-46 (itemOpenMode)\",\n \"ruledBy\": \"bettercms-ff 2026-10-24 (G-REMAIN B1)\"\n },\n {\n \"id\": \"variant-group\",\n \"plane\": \"schema\",\n \"feature\": \"variants\",\n \"key\": \"variants\",\n \"moves\": \"A block's variants on the component side are its variant family: one component per V2 variant (sectionType = the block's title, name = the variant's, slug = the block's slug + '-' + the variant id) and a component_variant_groups row whose v2.variants lists the members in order with their description.\",\n \"recovery\": \"variantFamilyToTypeSchema: the group's members in v2.variants order; each variant's id is the member slug after the group slug, its name the member's name, its description the meta's.\",\n \"proof\": \"kit-roundtrip.test.ts props lane: each member through componentSchemas.create, the group's v2 through variantGroupV2Schema, read back in the stored order\",\n \"carriedBy\": \"variantFamilyFromTypeSchema\",\n \"ruledBy\": \"bettercms-ff 2026-10-24 (3c); bettercms-72 2026-10-24 (planner in the kit)\"\n }\n ]\n}\n"],"mappings":""}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage matrix logic: what the library actually tests. Entries against edge cases, field types (how many
|
|
3
|
+
* fields of each) or schema features, plus the deepest drill-in per entry and the columns nothing (or too little)
|
|
4
|
+
* tests. The V2 /kit/coverage page computed this inline; it lives here so the page only draws it.
|
|
5
|
+
*/
|
|
6
|
+
import type { SchemaType } from "../schema/types";
|
|
1
7
|
import { type EntryStats } from "./analysis";
|
|
2
8
|
import { type CatalogCategory, type CatalogItem } from "./catalog";
|
|
3
9
|
export type CoverageView = "tags" | "types" | "features";
|
|
@@ -36,5 +42,11 @@ export interface Coverage {
|
|
|
36
42
|
fields: number;
|
|
37
43
|
deepest: number;
|
|
38
44
|
};
|
|
45
|
+
/** kit-own extras (testing/coverage-extras), their own row: the types only they exercise, never counted as V2's */
|
|
46
|
+
extras: {
|
|
47
|
+
rows: CoverageRow[];
|
|
48
|
+
typesOnlyHere: SchemaType[];
|
|
49
|
+
typesUsedWithExtras: number;
|
|
50
|
+
};
|
|
39
51
|
}
|
|
40
|
-
export declare function coverageOf(view: CoverageView, withCore: boolean, catalog?: CatalogItem[]): Coverage;
|
|
52
|
+
export declare function coverageOf(view: CoverageView, withCore: boolean, catalog?: CatalogItem[], extras?: CatalogItem[]): Coverage;
|
package/dist/library/coverage.js
CHANGED
|
@@ -7,7 +7,7 @@ function typeColumns(rows) {
|
|
|
7
7
|
for (const r of rows) for (const t of Object.keys(r.s.types)) if (!TYPE_COLUMNS.includes(t)) extra.add(t);
|
|
8
8
|
return [...TYPE_COLUMNS, ...[...extra].sort()];
|
|
9
9
|
}
|
|
10
|
-
function coverageOf(view, withCore, catalog = CATALOG) {
|
|
10
|
+
function coverageOf(view, withCore, catalog = CATALOG, extras = []) {
|
|
11
11
|
const items = catalog.filter((c) => withCore || !c.core);
|
|
12
12
|
const rows = items.map((it) => ({
|
|
13
13
|
it,
|
|
@@ -35,6 +35,12 @@ function coverageOf(view, withCore, catalog = CATALOG) {
|
|
|
35
35
|
count: totals[i]
|
|
36
36
|
})).filter((x) => x.count < bar);
|
|
37
37
|
const categories = categoriesOf(items);
|
|
38
|
+
const extraRows = extras.map((it) => ({
|
|
39
|
+
it,
|
|
40
|
+
s: statsOf(it, blocksFor(it).resolve)
|
|
41
|
+
}));
|
|
42
|
+
const used = (rs, t) => rs.some((r) => (r.s.types[t] ?? 0) > 0);
|
|
43
|
+
const allTypes = typeColumns([...rows, ...extraRows]);
|
|
38
44
|
return {
|
|
39
45
|
rows,
|
|
40
46
|
columns,
|
|
@@ -50,6 +56,11 @@ function coverageOf(view, withCore, catalog = CATALOG) {
|
|
|
50
56
|
typesTotal: types.length,
|
|
51
57
|
fields: rows.reduce((n, r) => n + r.s.fields, 0),
|
|
52
58
|
deepest: rows.reduce((m, r) => Math.max(m, r.s.depth), 0)
|
|
59
|
+
},
|
|
60
|
+
extras: {
|
|
61
|
+
rows: extraRows,
|
|
62
|
+
typesOnlyHere: allTypes.filter((t) => used(extraRows, t) && !used(rows, t)),
|
|
63
|
+
typesUsedWithExtras: allTypes.filter((t) => used(rows, t) || used(extraRows, t)).length
|
|
53
64
|
}
|
|
54
65
|
};
|
|
55
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage.js","names":[],"sources":["../../src/library/coverage.ts"],"sourcesContent":["/**\n * Coverage matrix logic: what the library actually tests. Entries against edge cases, field types (how many\n * fields of each) or schema features, plus the deepest drill-in per entry and the columns nothing (or too little)\n * tests. The V2 /kit/coverage page computed this inline; it lives here so the page only draws it.\n */\nimport type { SchemaType } from \"../schema/types\";\nimport { FEATURE_COLUMNS, statsOf, TYPE_COLUMNS, type EntryStats } from \"./analysis\";\nimport { blocksFor, CATALOG, categoriesOf, EDGE_TAGS, type CatalogCategory, type CatalogItem } from \"./catalog\";\n\nexport type CoverageView = \"tags\" | \"types\" | \"features\";\n\nexport interface CoverageColumn {\n key: string;\n label: string;\n hint?: string;\n /** 0 when the entry does not test it; a count for field types, 1 otherwise */\n get: (it: CatalogItem, s: EntryStats) => number;\n}\n\nexport interface CoverageRow {\n it: CatalogItem;\n s: EntryStats;\n}\n\nexport interface Coverage {\n rows: CoverageRow[];\n columns: CoverageColumn[];\n /** per column: how many entries test it */\n totals: number[];\n /** columns under the bar: fewer than 3 entries for edge cases, none for field types; never flagged for features */\n thin: { column: CoverageColumn; count: number }[];\n categories: { category: CatalogCategory; count: number }[];\n facts: { sections: number; categories: number; tagsCovered: number; tagsTotal: number; typesUsed: number; typesTotal: number; fields: number; deepest: number };\n}\n\n/** Field-type columns: the fixed reading order, then any type the schema language grows later, sorted. */\nfunction typeColumns(rows: CoverageRow[]): SchemaType[] {\n const extra = new Set<string>();\n for (const r of rows) for (const t of Object.keys(r.s.types)) if (!(TYPE_COLUMNS as string[]).includes(t)) extra.add(t);\n return [...TYPE_COLUMNS, ...([...extra].sort() as SchemaType[])];\n}\n\nexport function coverageOf(view: CoverageView, withCore: boolean, catalog: CatalogItem[] = CATALOG): Coverage {\n const items = catalog.filter((c) => withCore || !c.core);\n const rows = items.map((it) => ({ it, s: statsOf(it, blocksFor(it).resolve) }));\n const types = typeColumns(rows);\n const columns: CoverageColumn[] =\n view === \"tags\"\n ? EDGE_TAGS.map((t) => ({ key: t.tag, label: t.label, hint: t.hint, get: (it) => (it.tags.includes(t.tag) ? 1 : 0) }))\n : view === \"types\"\n ? types.map((t) => ({ key: t, label: t, get: (_it, s) => s.types[t] ?? 0 }))\n : FEATURE_COLUMNS.map((f) => ({ key: f.key, label: f.label, get: (_it, s) => (s.features[f.key] ? 1 : 0) }));\n const totals = columns.map((c) => rows.reduce((n, r) => n + (c.get(r.it, r.s) > 0 ? 1 : 0), 0));\n const bar = view === \"tags\" ? 3 : 1;\n const thin = view === \"features\" ? [] : columns.map((column, i) => ({ column, count: totals[i] })).filter((x) => x.count < bar);\n const categories = categoriesOf(items);\n return {\n rows,\n columns,\n totals,\n thin,\n categories,\n facts: {\n sections: rows.length,\n categories: categories.length,\n tagsCovered: EDGE_TAGS.filter((t) => rows.some((r) => r.it.tags.includes(t.tag))).length,\n tagsTotal: EDGE_TAGS.length,\n typesUsed: types.filter((t) => rows.some((r) => (r.s.types[t] ?? 0) > 0)).length,\n typesTotal: types.length,\n fields: rows.reduce((n, r) => n + r.s.fields, 0),\n deepest: rows.reduce((m, r) => Math.max(m, r.s.depth), 0),\n },\n };\n}\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"coverage.js","names":[],"sources":["../../src/library/coverage.ts"],"sourcesContent":["/**\n * Coverage matrix logic: what the library actually tests. Entries against edge cases, field types (how many\n * fields of each) or schema features, plus the deepest drill-in per entry and the columns nothing (or too little)\n * tests. The V2 /kit/coverage page computed this inline; it lives here so the page only draws it.\n */\nimport type { SchemaType } from \"../schema/types\";\nimport { FEATURE_COLUMNS, statsOf, TYPE_COLUMNS, type EntryStats } from \"./analysis\";\nimport { blocksFor, CATALOG, categoriesOf, EDGE_TAGS, type CatalogCategory, type CatalogItem } from \"./catalog\";\n\nexport type CoverageView = \"tags\" | \"types\" | \"features\";\n\nexport interface CoverageColumn {\n key: string;\n label: string;\n hint?: string;\n /** 0 when the entry does not test it; a count for field types, 1 otherwise */\n get: (it: CatalogItem, s: EntryStats) => number;\n}\n\nexport interface CoverageRow {\n it: CatalogItem;\n s: EntryStats;\n}\n\nexport interface Coverage {\n rows: CoverageRow[];\n columns: CoverageColumn[];\n /** per column: how many entries test it */\n totals: number[];\n /** columns under the bar: fewer than 3 entries for edge cases, none for field types; never flagged for features */\n thin: { column: CoverageColumn; count: number }[];\n categories: { category: CatalogCategory; count: number }[];\n facts: { sections: number; categories: number; tagsCovered: number; tagsTotal: number; typesUsed: number; typesTotal: number; fields: number; deepest: number };\n /** kit-own extras (testing/coverage-extras), their own row: the types only they exercise, never counted as V2's */\n extras: { rows: CoverageRow[]; typesOnlyHere: SchemaType[]; typesUsedWithExtras: number };\n}\n\n/** Field-type columns: the fixed reading order, then any type the schema language grows later, sorted. */\nfunction typeColumns(rows: CoverageRow[]): SchemaType[] {\n const extra = new Set<string>();\n for (const r of rows) for (const t of Object.keys(r.s.types)) if (!(TYPE_COLUMNS as string[]).includes(t)) extra.add(t);\n return [...TYPE_COLUMNS, ...([...extra].sort() as SchemaType[])];\n}\n\nexport function coverageOf(view: CoverageView, withCore: boolean, catalog: CatalogItem[] = CATALOG, extras: CatalogItem[] = []): Coverage {\n const items = catalog.filter((c) => withCore || !c.core);\n const rows = items.map((it) => ({ it, s: statsOf(it, blocksFor(it).resolve) }));\n const types = typeColumns(rows);\n const columns: CoverageColumn[] =\n view === \"tags\"\n ? EDGE_TAGS.map((t) => ({ key: t.tag, label: t.label, hint: t.hint, get: (it) => (it.tags.includes(t.tag) ? 1 : 0) }))\n : view === \"types\"\n ? types.map((t) => ({ key: t, label: t, get: (_it, s) => s.types[t] ?? 0 }))\n : FEATURE_COLUMNS.map((f) => ({ key: f.key, label: f.label, get: (_it, s) => (s.features[f.key] ? 1 : 0) }));\n const totals = columns.map((c) => rows.reduce((n, r) => n + (c.get(r.it, r.s) > 0 ? 1 : 0), 0));\n const bar = view === \"tags\" ? 3 : 1;\n const thin = view === \"features\" ? [] : columns.map((column, i) => ({ column, count: totals[i] })).filter((x) => x.count < bar);\n const categories = categoriesOf(items);\n const extraRows = extras.map((it) => ({ it, s: statsOf(it, blocksFor(it).resolve) }));\n const used = (rs: CoverageRow[], t: SchemaType) => rs.some((r) => (r.s.types[t] ?? 0) > 0);\n const allTypes = typeColumns([...rows, ...extraRows]);\n return {\n rows,\n columns,\n totals,\n thin,\n categories,\n facts: {\n sections: rows.length,\n categories: categories.length,\n tagsCovered: EDGE_TAGS.filter((t) => rows.some((r) => r.it.tags.includes(t.tag))).length,\n tagsTotal: EDGE_TAGS.length,\n typesUsed: types.filter((t) => rows.some((r) => (r.s.types[t] ?? 0) > 0)).length,\n typesTotal: types.length,\n fields: rows.reduce((n, r) => n + r.s.fields, 0),\n deepest: rows.reduce((m, r) => Math.max(m, r.s.depth), 0),\n },\n extras: {\n rows: extraRows,\n typesOnlyHere: allTypes.filter((t) => used(extraRows, t) && !used(rows, t)),\n typesUsedWithExtras: allTypes.filter((t) => used(rows, t) || used(extraRows, t)).length,\n },\n };\n}\n"],"mappings":";;;;AAsCA,SAAS,YAAY,MAAmC;CACtD,MAAM,wBAAQ,IAAI,IAAY;CAC9B,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,OAAO,KAAK,EAAE,EAAE,KAAK,GAAG,IAAI,CAAE,aAA0B,SAAS,CAAC,GAAG,MAAM,IAAI,CAAC;CACtH,OAAO,CAAC,GAAG,cAAc,GAAI,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,CAAkB;AACjE;AAEA,SAAgB,WAAW,MAAoB,UAAmB,UAAyB,SAAS,SAAwB,CAAC,GAAa;CACxI,MAAM,QAAQ,QAAQ,QAAQ,MAAM,YAAY,CAAC,EAAE,IAAI;CACvD,MAAM,OAAO,MAAM,KAAK,QAAQ;EAAE;EAAI,GAAG,QAAQ,IAAI,UAAU,EAAE,CAAC,CAAC,OAAO;CAAE,EAAE;CAC9E,MAAM,QAAQ,YAAY,IAAI;CAC9B,MAAM,UACJ,SAAS,SACL,UAAU,KAAK,OAAO;EAAE,KAAK,EAAE;EAAK,OAAO,EAAE;EAAO,MAAM,EAAE;EAAM,MAAM,OAAQ,GAAG,KAAK,SAAS,EAAE,GAAG,IAAI,IAAI;CAAG,EAAE,IACnH,SAAS,UACP,MAAM,KAAK,OAAO;EAAE,KAAK;EAAG,OAAO;EAAG,MAAM,KAAK,MAAM,EAAE,MAAM,MAAM;CAAE,EAAE,IACzE,gBAAgB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