@bettercms-ai/kit 2.0.0 → 2.0.1
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 +12 -4
- package/dist/adapters/lossy.js +19 -8
- package/dist/adapters/lossy.js.map +1 -1
- package/dist/adapters/prod-types.d.ts +46 -14
- package/dist/adapters/prod-types.js +37 -35
- package/dist/adapters/prod-types.js.map +1 -1
- package/dist/adapters/schema.d.ts +39 -0
- package/dist/adapters/schema.js +281 -82
- package/dist/adapters/schema.js.map +1 -1
- package/dist/context.d.ts +39 -0
- package/dist/context.js +40 -1
- package/dist/context.js.map +1 -1
- package/dist/controls/form-picker-register.d.ts +7 -1
- package/dist/controls/form-picker-register.js +1 -5
- package/dist/controls/form-picker-register.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/link.d.ts +11 -4
- package/dist/controls/link.js +120 -202
- package/dist/controls/link.js.map +1 -1
- package/dist/controls/location.js +3 -8
- package/dist/controls/location.js.map +1 -1
- package/dist/controls/media.d.ts +0 -14
- package/dist/controls/media.js +52 -95
- package/dist/controls/media.js.map +1 -1
- package/dist/controls/reference-services.d.ts +23 -2
- package/dist/controls/reference.d.ts +2 -2
- package/dist/controls/reference.js +79 -28
- package/dist/controls/reference.js.map +1 -1
- package/dist/controls/rich-text/article-shell.d.ts +145 -0
- package/dist/controls/rich-text/article-shell.js +514 -0
- package/dist/controls/rich-text/article-shell.js.map +1 -0
- package/dist/controls/rich-text/author.d.ts +25 -0
- package/dist/controls/rich-text/author.js +107 -0
- package/dist/controls/rich-text/author.js.map +1 -0
- package/dist/controls/rich-text/blocks.d.ts +19 -2
- package/dist/controls/rich-text/blocks.js +275 -638
- package/dist/controls/rich-text/blocks.js.map +1 -1
- package/dist/controls/rich-text/button.d.ts +23 -0
- package/dist/controls/rich-text/button.js +81 -0
- package/dist/controls/rich-text/button.js.map +1 -0
- package/dist/controls/rich-text/catalog.d.ts +2 -5
- package/dist/controls/rich-text/catalog.js +121 -7
- package/dist/controls/rich-text/catalog.js.map +1 -1
- package/dist/controls/rich-text/checklist.d.ts +24 -0
- package/dist/controls/rich-text/checklist.js +115 -0
- package/dist/controls/rich-text/checklist.js.map +1 -0
- package/dist/controls/rich-text/codec.d.ts +15 -1
- package/dist/controls/rich-text/codec.js +11 -1
- package/dist/controls/rich-text/codec.js.map +1 -1
- package/dist/controls/rich-text/columns.d.ts +41 -0
- package/dist/controls/rich-text/columns.js +181 -0
- package/dist/controls/rich-text/columns.js.map +1 -0
- package/dist/controls/rich-text/control.js +1 -0
- package/dist/controls/rich-text/control.js.map +1 -1
- package/dist/controls/rich-text/dom.d.ts +84 -4
- package/dist/controls/rich-text/dom.js +171 -10
- package/dist/controls/rich-text/dom.js.map +1 -1
- package/dist/controls/rich-text/editor.d.ts +4 -2
- package/dist/controls/rich-text/editor.js +199 -26
- package/dist/controls/rich-text/editor.js.map +1 -1
- package/dist/controls/rich-text/embed.d.ts +28 -0
- package/dist/controls/rich-text/embed.js +210 -0
- package/dist/controls/rich-text/embed.js.map +1 -0
- package/dist/controls/rich-text/footnote.d.ts +41 -0
- package/dist/controls/rich-text/footnote.js +185 -0
- package/dist/controls/rich-text/footnote.js.map +1 -0
- package/dist/controls/rich-text/gallery.d.ts +28 -0
- package/dist/controls/rich-text/gallery.js +167 -0
- package/dist/controls/rich-text/gallery.js.map +1 -0
- package/dist/controls/rich-text/link-form.d.ts +13 -1
- package/dist/controls/rich-text/link-form.js +41 -7
- package/dist/controls/rich-text/link-form.js.map +1 -1
- package/dist/controls/rich-text/ops.js +6 -0
- package/dist/controls/rich-text/ops.js.map +1 -1
- package/dist/controls/rich-text/related.d.ts +49 -0
- package/dist/controls/rich-text/related.js +233 -0
- package/dist/controls/rich-text/related.js.map +1 -0
- package/dist/controls/rich-text/toc.d.ts +47 -0
- package/dist/controls/rich-text/toc.js +160 -0
- package/dist/controls/rich-text/toc.js.map +1 -0
- package/dist/controls/slot-register.d.ts +6 -1
- package/dist/controls/slot-register.js +1 -4
- package/dist/controls/slot-register.js.map +1 -1
- package/dist/core/core.d.ts +11 -3
- package/dist/core/core.js +24 -6
- package/dist/core/core.js.map +1 -1
- package/dist/core/facets.d.ts +16 -0
- package/dist/core/facets.js +17 -1
- package/dist/core/facets.js.map +1 -1
- package/dist/core/index.js +2 -2
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/ledgers/exclusions.v1.js +141 -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 +156 -153
- package/dist/schema/types.d.ts +17 -0
- package/dist/schema/types.js.map +1 -1
- package/dist/styles.css +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/dist/ui/autocomplete.d.ts +29 -1
- package/dist/ui/autocomplete.js +102 -47
- package/dist/ui/autocomplete.js.map +1 -1
- package/dist/ui/button.js +3 -5
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/index.js +2 -2
- package/dist/ui/overlay.d.ts +4 -1
- package/dist/ui/overlay.js +2 -1
- package/dist/ui/overlay.js.map +1 -1
- package/dist/ui/toast.js +1 -1
- package/package.json +8 -2
package/dist/core/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","names":[],"sources":["../../src/core/core.ts"],"sourcesContent":["/**\n * THE CORE SCHEMA `C` (P2 C1): one canonical, versioned form of a V2 schema that both directions meet in.\n *\n * normV2: V2 → C canonical JSON (sorted keys, no undefined) of the V2 schema, with V2's own equivalences folded\n * embedV2: C → V2 the schema C holds\n * embedProd: C → prod the prod adapter (fromTypeSchema, the façade) on embedV2(c)\n * normProd: prod → C normV2 of what the prod schema reads back as (toTypeSchema / propsToTypeSchema, the façades)\n *\n * Laws (PBT, src/core/__tests__): norm∘embed = id on C (P1); normProd(embedProd(c)) equals c except under the paths\n * the adapter names (P2); prod zod accepts embedProd(c) (P3); every named loss is excluded, pending or out of its bound\n * (P4); both normalisers are idempotent (P5); the hash is byte-stable (P6); one prod key per facet (P7); out-of-domain\n * prod keys survive a write (P8).\n *\n * V2's equivalences folded by normV2 (what the V2 engine draws the same, so C cannot tell apart):\n * - a list's itemNoun equal to the engine's fallback (lib/schema.ts itemNoun) is the absent one\n * - a fieldset a field names but the schema does not declare is the declared { name, title: name } (engine/field-list\n * arrange), appended after the declared ones in first-use order\n */\nimport { fromTypeSchema, propsToTypeSchema, toTypeSchema, type AdapterTarget, type FromTypeSchemaResult, type ToTypeSchemaOptions } from \"../adapters/schema\";\nimport { isHostConfigKey, SERVER_CONFIG_KEYS, type CatalogItem, type LossyItem } from \"../adapters/lossy\";\nimport type { ProdComponent, ProdContentModel } from \"../adapters/prod-types\";\nimport { itemNoun } from \"../lib/schema\";\nimport type { FieldSchema, TypeSchema } from \"../schema/types\";\nimport { facetOf, type FacetRow } from \"./facets\";\n\nexport const CORE_VERSION = 1 as const;\n\nexport interface CoreSchema {\n v: typeof CORE_VERSION;\n schema: TypeSchema;\n}\n\ntype Obj = Record<string, unknown>;\nconst isObj = (v: unknown): v is Obj => !!v && typeof v === \"object\" && !Array.isArray(v);\n\n/** Canonical JSON value: object keys sorted, undefined dropped, arrays in their order (order is meaning). */\nexport function canonical<T>(v: T): T {\n if (Array.isArray(v)) return v.map(canonical) as T;\n if (!isObj(v)) return v;\n const out: Obj = {};\n for (const k of Object.keys(v).sort()) if (v[k] !== undefined) out[k] = canonical(v[k]);\n return out as T;\n}\n\nfunction foldField(f: FieldSchema): FieldSchema {\n const out: FieldSchema = { ...f };\n if (out.fields) out.fields = out.fields.map(foldField);\n if (Array.isArray(out.of)) out.of = out.of.map(foldField);\n if (out.slotSettings) out.slotSettings = out.slotSettings.map(foldField);\n if (out.itemNoun !== undefined && out.itemNoun === itemNoun({ ...out, itemNoun: undefined })) delete out.itemNoun;\n return out;\n}\n\n/** The fieldsets fields name, depth first, the way the adapter visits them (fromTypeSchema propSetsFor / fieldsetsFor). */\nfunction namedSets(fields: FieldSchema[], out: string[] = []): string[] {\n for (const f of fields) {\n if (f.fieldset !== undefined && !out.includes(f.fieldset)) out.push(f.fieldset);\n if (f.fields) namedSets(f.fields, out);\n if (Array.isArray(f.of)) for (const i of f.of) if (i.fields) namedSets(i.fields, out);\n }\n return out;\n}\n\nexport function normV2(v2: TypeSchema): CoreSchema {\n const schema: TypeSchema = { ...v2, fields: v2.fields.map(foldField) };\n const declared = new Set((v2.fieldsets ?? []).map((s) => s.name));\n const undeclared = namedSets(v2.fields).filter((n) => !declared.has(n));\n if (undeclared.length) schema.fieldsets = [...(v2.fieldsets ?? []), ...undeclared.map((name) => ({ name, title: name }))];\n return { v: CORE_VERSION, schema: canonical(schema) };\n}\n\nexport const embedV2 = (c: CoreSchema): TypeSchema => structuredClone(c.schema);\n\nexport function embedProd(c: CoreSchema, lane: \"fields\"): FromTypeSchemaResult<ProdContentModel>;\nexport function embedProd(c: CoreSchema, lane: \"props\"): FromTypeSchemaResult<ProdComponent>;\nexport function embedProd(c: CoreSchema, lane: AdapterTarget): FromTypeSchemaResult<ProdContentModel | ProdComponent>;\nexport function embedProd(c: CoreSchema, lane: AdapterTarget) {\n return lane === \"fields\" ? fromTypeSchema(embedV2(c), \"fields\") : fromTypeSchema(embedV2(c), \"props\");\n}\n\nexport function normProd(prod: ProdContentModel | ProdComponent, lane: AdapterTarget, opts: ToTypeSchemaOptions = {}): CoreSchema {\n return normV2(lane === \"fields\" ? toTypeSchema(prod as ProdContentModel, opts) : propsToTypeSchema(prod as ProdComponent, opts));\n}\n\n/** Byte-stable serialisation of C: the hash input, and the form fixtures are frozen in. */\nexport const coreJson = (c: CoreSchema): string => JSON.stringify(canonical(c));\n\n/** `schema_hash`: \"v1:\" + sha256 of coreJson (Web Crypto: the same in the browser, Node and Bun). */\nexport async function coreHash(c: CoreSchema): Promise<string> {\n const bytes = new Uint8Array(await crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(coreJson(c))));\n return `v${CORE_VERSION}:${[...bytes].map((b) => b.toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\n/** The leaf paths where two JSON values differ (\"/fields/0/title\"); a missing object or list compares as an empty one. */\nexport function leafDiff(a: unknown, b: unknown, path = \"\", out: string[] = []): string[] {\n const obj = (x: unknown) => x === undefined || isObj(x);\n const arr = (x: unknown) => x === undefined || Array.isArray(x);\n if ((isObj(a) || isObj(b)) && obj(a) && obj(b)) {\n const A = (a ?? {}) as Obj;\n const B = (b ?? {}) as Obj;\n for (const k of new Set([...Object.keys(A), ...Object.keys(B)])) leafDiff(A[k], B[k], `${path}/${k}`, out);\n } else if ((Array.isArray(a) || Array.isArray(b)) && arr(a) && arr(b)) {\n const A = (a ?? []) as unknown[];\n const B = (b ?? []) as unknown[];\n for (let i = 0; i < Math.max(A.length, B.length); i++) leafDiff(A[i], B[i], `${path}/${i}`, out);\n } else if (JSON.stringify(a) !== JSON.stringify(b)) out.push(path);\n return out;\n}\n\nconst under = (path: string, root: string) => path === root || path.startsWith(`${root}/`);\n\nexport interface CoreLossItem {\n path: string;\n feature: string;\n facet: FacetRow | undefined;\n}\n\nexport interface CoreRoundTrip {\n prod: ProdContentModel | ProdComponent;\n back: CoreSchema;\n /** the paths where C and normProd(embedProd(C)) differ */\n diffs: string[];\n /** loss(c): each item the adapter names that has a difference under it (an item C's equivalences absorb is no loss) */\n loss: CoreLossItem[];\n /** a difference no named item covers: a silent drop (P2 fails on any) */\n unreported: string[];\n}\n\n/** C through prod and back, against the lane's read: the oracle P2 and P4 assert on. */\nexport function roundTripCore(c: CoreSchema, lane: AdapterTarget): CoreRoundTrip {\n const r = embedProd(c, lane);\n const back = normProd(r.schema, lane, { blockModels: r.blockModels });\n // the props lane reads each top-level field's default-group placement back explicitly: compare it as such\n const want = lane === \"props\" ? normV2(withDefaultGroups(c.schema)).schema : c.schema;\n const diffs = leafDiff(want, back.schema);\n const named: (LossyItem | CatalogItem)[] = [...r.lossy, ...r.catalog];\n return {\n prod: r.schema,\n back,\n diffs,\n loss: named.filter((l) => diffs.some((d) => under(d, l.path))).map((l) => ({ path: l.path, feature: l.feature, facet: facetOf(l.feature) })),\n unreported: diffs.filter((d) => !named.some((l) => under(d, l.path))),\n };\n}\n\nfunction withDefaultGroups(s: TypeSchema): TypeSchema {\n const d = (s.groups?.find((g) => g.default) ?? s.groups?.[0])?.name;\n return d === undefined ? s : { ...s, fields: s.fields.map((f) => (f.group === undefined ? { ...f, group: d } : f)) };\n}\n\n/* ── P8: out-of-domain prod keys survive a write ── */\n\ntype ProdDef = Obj & { key?: string; type?: string; config?: Obj; fields?: ProdDef[] };\nconst OUT_OF_DOMAIN_KEYS = [\"target\", \"stale\", \"origin\"] as const;\n\n/** One written definition with the out-of-domain keys of the stored one it replaces (same key) carried over. */\nfunction carryDef(written: ProdDef, stored: ProdDef | undefined): ProdDef {\n if (!stored) return written;\n const out: ProdDef = { ...written };\n for (const k of OUT_OF_DOMAIN_KEYS) if (stored[k] !== undefined && out[k] === undefined) out[k] = stored[k];\n const type = String(written.type ?? \"\");\n const host = Object.entries(stored.config ?? {}).filter(([k, v]) => v !== undefined && (isHostConfigKey(type, k) || SERVER_CONFIG_KEYS.has(k)) && out.config?.[k] === undefined);\n if (host.length || out.config) out.config = { ...(out.config ?? {}), ...Object.fromEntries(host) };\n // nested definitions: a model field's fields, a prop's config.fields\n if (Array.isArray(written.fields)) out.fields = carryList(written.fields, stored.fields);\n const cf = out.config?.fields;\n if (Array.isArray(cf)) out.config = { ...out.config, fields: carryList(cf as ProdDef[], stored.config?.fields as ProdDef[] | undefined) };\n return out;\n}\n\nconst carryList = (written: ProdDef[], stored: ProdDef[] | undefined) => written.map((w) => carryDef(w, stored?.find((s) => s.key === w.key)));\n\n/**\n * A prod definition written from C, with every out-of-domain key (facets.ts OUT_OF_DOMAIN: a prop's binding, host and\n * server config) the stored definition held carried over by key. What write_schema stores (C6).\n */\nexport function preserveOutOfDomain<T extends ProdContentModel | ProdComponent>(written: T, stored: T | undefined, lane: AdapterTarget): T {\n if (!stored) return written;\n const list = lane === \"fields\" ? \"fields\" : \"props\";\n const w = written as unknown as Obj;\n const s = stored as unknown as Obj;\n return { ...w, [list]: carryList((w[list] as ProdDef[]) ?? [], s[list] as ProdDef[] | undefined) } as unknown as T;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAa,eAAe;AAQ5B,IAAM,SAAS,MAAyB,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,CAAC,MAAM,QAAQ,CAAC;;AAGxF,SAAgB,UAAa,GAAS;CACpC,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO,EAAE,IAAI,SAAS;CAC5C,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO;CACtB,MAAM,MAAW,CAAC;CAClB,KAAK,MAAM,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,EAAE,OAAO,KAAA,GAAW,IAAI,KAAK,UAAU,EAAE,EAAE;CACtF,OAAO;AACT;AAEA,SAAS,UAAU,GAA6B;CAC9C,MAAM,MAAmB,EAAE,GAAG,EAAE;CAChC,IAAI,IAAI,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,SAAS;CACrD,IAAI,MAAM,QAAQ,IAAI,EAAE,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,SAAS;CACxD,IAAI,IAAI,cAAc,IAAI,eAAe,IAAI,aAAa,IAAI,SAAS;CACvE,IAAI,IAAI,aAAa,KAAA,KAAa,IAAI,aAAa,SAAS;EAAE,GAAG;EAAK,UAAU,KAAA;CAAU,CAAC,GAAG,OAAO,IAAI;CACzG,OAAO;A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,OAAO,OAAO,QAAQ,QAAQ,EAAE;CACtC,MAAM,OAAO,OAAO,QAAQ,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,OAAO,MAAM,KAAA,MAAc,gBAAgB,MAAM,CAAC,KAAK,mBAAmB,IAAI,CAAC,MAAM,IAAI,SAAS,OAAO,KAAA,CAAS;CAC/K,IAAI,KAAK,UAAU,IAAI,QAAQ,IAAI,SAAS;EAAE,GAAI,IAAI,UAAU,CAAC;EAAI,GAAG,OAAO,YAAY,IAAI;CAAE;CAEjG,IAAI,MAAM,QAAQ,QAAQ,MAAM,GAAG,IAAI,SAAS,UAAU,QAAQ,QAAQ,OAAO,MAAM;CACvF,MAAM,KAAK,IAAI,QAAQ;CACvB,IAAI,MAAM,QAAQ,EAAE,GAAG,IAAI,SAAS;EAAE,GAAG,IAAI;EAAQ,QAAQ,UAAU,IAAiB,OAAO,QAAQ,MAA+B;CAAE;CACxI,OAAO;AACT;AAEA,IAAM,aAAa,SAAoB,WAAkC,QAAQ,KAAK,MAAM,SAAS,GAAG,QAAQ,MAAM,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;;;;;AAM7I,SAAgB,oBAAgE,SAAY,QAAuB,MAAwB;CACzI,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,OAAO,SAAS,WAAW,WAAW;CAC5C,MAAM,IAAI;CACV,MAAM,IAAI;CACV,OAAO;EAAE,GAAG;GAAI,OAAO,UAAW,EAAE,SAAuB,CAAC,GAAG,EAAE,KAA8B;CAAE;AACnG"}
|
|
1
|
+
{"version":3,"file":"core.js","names":[],"sources":["../../src/core/core.ts"],"sourcesContent":["/**\n * THE CORE SCHEMA `C` (P2 C1): one canonical, versioned form of a V2 schema that both directions meet in.\n *\n * normV2: V2 → C canonical JSON (sorted keys, no undefined) of the V2 schema, with V2's own equivalences folded\n * embedV2: C → V2 the schema C holds\n * embedProd: C → prod the prod adapter (fromTypeSchema, the façade) on embedV2(c)\n * normProd: prod → C normV2 of what the prod schema reads back as (toTypeSchema / propsToTypeSchema, the façades)\n *\n * Laws (PBT, src/core/__tests__): norm∘embed = id on C (P1); normProd(embedProd(c)) equals c except under the paths\n * the adapter names (P2); prod zod accepts embedProd(c) (P3); every named loss is excluded, pending or out of its bound\n * (P4); both normalisers are idempotent (P5); the hash is byte-stable (P6); one prod key per facet (P7); out-of-domain\n * prod keys survive a write (P8). The hash is `core1:` + sha256 of types' canonicalJson.\n *\n * V2's equivalences folded by normV2 (what the V2 engine draws the same, so C cannot tell apart):\n * - a list's itemNoun equal to the engine's fallback (lib/schema.ts itemNoun) is the absent one\n * - a fieldset a field names but the schema does not declare is the declared { name, title: name } (engine/field-list\n * arrange), appended after the declared ones in first-use order\n * - a rich text's references naming neither posts nor authors are the absent ones\n * - a rich text's features are read through types normaliseRichTextFeatures (an alias is its names: `headings` is\n * h1–h6), each name once; naming every RICHTEXT_FEATURES entry, in any order, is the absent list (V2 offers them all)\n */\nimport { fromTypeSchema, propsToTypeSchema, toTypeSchema, type AdapterTarget, type FromTypeSchemaResult, type ToTypeSchemaOptions } from \"../adapters/schema\";\nimport { isHostConfigKey, SERVER_CONFIG_KEYS, type CatalogItem, type LossyItem } from \"../adapters/lossy\";\nimport type { ProdComponent, ProdContentModel } from \"../adapters/prod-types\";\nimport { canonicalJson, normaliseRichTextFeatures, RICHTEXT_FEATURES, type RichTextFeature } from \"@bettercms-ai/types\";\nimport { itemNoun } from \"../lib/schema\";\nimport type { FieldSchema, TypeSchema } from \"../schema/types\";\nimport { facetOf, type FacetRow } from \"./facets\";\n\nexport const CORE_VERSION = 1 as const;\n\nexport interface CoreSchema {\n v: typeof CORE_VERSION;\n schema: TypeSchema;\n}\n\ntype Obj = Record<string, unknown>;\nconst isObj = (v: unknown): v is Obj => !!v && typeof v === \"object\" && !Array.isArray(v);\n\n/** Canonical JSON value: object keys sorted, undefined dropped, arrays in their order (order is meaning). */\nexport function canonical<T>(v: T): T {\n if (Array.isArray(v)) return v.map(canonical) as T;\n if (!isObj(v)) return v;\n const out: Obj = {};\n for (const k of Object.keys(v).sort()) if (v[k] !== undefined) out[k] = canonical(v[k]);\n return out as T;\n}\n\n/** Every feature, canonical: RICHTEXT_FEATURES through normaliseRichTextFeatures, so no alias is ever in it. */\nconst ALL_RICH_FEATURES = normaliseRichTextFeatures(RICHTEXT_FEATURES).features;\n\nfunction foldField(f: FieldSchema): FieldSchema {\n const out: FieldSchema = { ...f };\n if (out.fields) out.fields = out.fields.map(foldField);\n if (Array.isArray(out.of)) out.of = out.of.map(foldField);\n if (out.slotSettings) out.slotSettings = out.slotSettings.map(foldField);\n if (out.itemNoun !== undefined && out.itemNoun === itemNoun({ ...out, itemNoun: undefined })) delete out.itemNoun;\n if (out.references && out.references.posts === undefined && out.references.authors === undefined) delete out.references;\n if (Array.isArray(out.features)) {\n const { features, unknown } = normaliseRichTextFeatures(out.features.filter((x) => typeof x === \"string\"));\n const names = [...new Set<string>([...features, ...unknown])];\n if (unknown.length === 0 && ALL_RICH_FEATURES.every((x) => names.includes(x))) delete out.features;\n // an unknown name stays (a schema read from JSON can hold one): the write names it, it is never dropped silently\n else out.features = names as RichTextFeature[];\n }\n return out;\n}\n\n/** The fieldsets fields name, depth first, the way the adapter visits them (fromTypeSchema propSetsFor / fieldsetsFor). */\nfunction namedSets(fields: FieldSchema[], out: string[] = []): string[] {\n for (const f of fields) {\n if (f.fieldset !== undefined && !out.includes(f.fieldset)) out.push(f.fieldset);\n if (f.fields) namedSets(f.fields, out);\n if (Array.isArray(f.of)) for (const i of f.of) if (i.fields) namedSets(i.fields, out);\n }\n return out;\n}\n\nexport function normV2(v2: TypeSchema): CoreSchema {\n const schema: TypeSchema = { ...v2, fields: v2.fields.map(foldField) };\n const declared = new Set((v2.fieldsets ?? []).map((s) => s.name));\n const undeclared = namedSets(v2.fields).filter((n) => !declared.has(n));\n if (undeclared.length) schema.fieldsets = [...(v2.fieldsets ?? []), ...undeclared.map((name) => ({ name, title: name }))];\n return { v: CORE_VERSION, schema: canonical(schema) };\n}\n\nexport const embedV2 = (c: CoreSchema): TypeSchema => structuredClone(c.schema);\n\nexport function embedProd(c: CoreSchema, lane: \"fields\"): FromTypeSchemaResult<ProdContentModel>;\nexport function embedProd(c: CoreSchema, lane: \"props\"): FromTypeSchemaResult<ProdComponent>;\nexport function embedProd(c: CoreSchema, lane: AdapterTarget): FromTypeSchemaResult<ProdContentModel | ProdComponent>;\nexport function embedProd(c: CoreSchema, lane: AdapterTarget) {\n return lane === \"fields\" ? fromTypeSchema(embedV2(c), \"fields\") : fromTypeSchema(embedV2(c), \"props\");\n}\n\nexport function normProd(prod: ProdContentModel | ProdComponent, lane: AdapterTarget, opts: ToTypeSchemaOptions = {}): CoreSchema {\n return normV2(lane === \"fields\" ? toTypeSchema(prod as ProdContentModel, opts) : propsToTypeSchema(prod as ProdComponent, opts));\n}\n\n/** Byte-stable serialisation of C: types' canonicalJson (the bytes the backend's schema_hash is taken over, same rules). */\nexport const coreJson = (c: CoreSchema): string => canonicalJson(c);\n\n/**\n * A Core hash's prefix: `core<v>:`. Disjoint from the backend's `schema_hash` prefix (`v<n>:`, taken over a stored\n * definition, types' schemaHashInput), so a Core hash can never be read as, or compared with, a stored one.\n */\nexport const CORE_HASH_PREFIX = `core${CORE_VERSION}:` as const;\n\n/** CORE_HASH_PREFIX + sha256 of coreJson (Web Crypto: the same in the browser, Node and Bun). */\nexport async function coreHash(c: CoreSchema): Promise<string> {\n const bytes = new Uint8Array(await crypto.subtle.digest(\"SHA-256\", new TextEncoder().encode(coreJson(c))));\n return `${CORE_HASH_PREFIX}${[...bytes].map((b) => b.toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\n/** The leaf paths where two JSON values differ (\"/fields/0/title\"); a missing object or list compares as an empty one. */\nexport function leafDiff(a: unknown, b: unknown, path = \"\", out: string[] = []): string[] {\n const obj = (x: unknown) => x === undefined || isObj(x);\n const arr = (x: unknown) => x === undefined || Array.isArray(x);\n if ((isObj(a) || isObj(b)) && obj(a) && obj(b)) {\n const A = (a ?? {}) as Obj;\n const B = (b ?? {}) as Obj;\n for (const k of new Set([...Object.keys(A), ...Object.keys(B)])) leafDiff(A[k], B[k], `${path}/${k}`, out);\n } else if ((Array.isArray(a) || Array.isArray(b)) && arr(a) && arr(b)) {\n const A = (a ?? []) as unknown[];\n const B = (b ?? []) as unknown[];\n for (let i = 0; i < Math.max(A.length, B.length); i++) leafDiff(A[i], B[i], `${path}/${i}`, out);\n } else if (JSON.stringify(a) !== JSON.stringify(b)) out.push(path);\n return out;\n}\n\nconst under = (path: string, root: string) => path === root || path.startsWith(`${root}/`);\n\nexport interface CoreLossItem {\n path: string;\n feature: string;\n facet: FacetRow | undefined;\n}\n\nexport interface CoreRoundTrip {\n prod: ProdContentModel | ProdComponent;\n back: CoreSchema;\n /** the paths where C and normProd(embedProd(C)) differ */\n diffs: string[];\n /** loss(c): each item the adapter names that has a difference under it (an item C's equivalences absorb is no loss) */\n loss: CoreLossItem[];\n /** a difference no named item covers: a silent drop (P2 fails on any) */\n unreported: string[];\n}\n\n/** C through prod and back, against the lane's read: the oracle P2 and P4 assert on. */\nexport function roundTripCore(c: CoreSchema, lane: AdapterTarget): CoreRoundTrip {\n const r = embedProd(c, lane);\n const back = normProd(r.schema, lane, { blockModels: r.blockModels });\n // the props lane reads each top-level field's default-group placement back explicitly: compare it as such\n const want = lane === \"props\" ? normV2(withDefaultGroups(c.schema)).schema : c.schema;\n const diffs = leafDiff(want, back.schema);\n const named: (LossyItem | CatalogItem)[] = [...r.lossy, ...r.catalog];\n return {\n prod: r.schema,\n back,\n diffs,\n loss: named.filter((l) => diffs.some((d) => under(d, l.path))).map((l) => ({ path: l.path, feature: l.feature, facet: facetOf(l.feature) })),\n unreported: diffs.filter((d) => !named.some((l) => under(d, l.path))),\n };\n}\n\nfunction withDefaultGroups(s: TypeSchema): TypeSchema {\n const d = (s.groups?.find((g) => g.default) ?? s.groups?.[0])?.name;\n return d === undefined ? s : { ...s, fields: s.fields.map((f) => (f.group === undefined ? { ...f, group: d } : f)) };\n}\n\n/* ── P8: out-of-domain prod keys survive a write ── */\n\ntype ProdDef = Obj & { key?: string; type?: string; config?: Obj; fields?: ProdDef[] };\nconst OUT_OF_DOMAIN_KEYS = [\"target\", \"stale\", \"origin\"] as const;\n\n/** One written definition with the out-of-domain keys of the stored one it replaces (same key) carried over. */\nfunction carryDef(written: ProdDef, stored: ProdDef | undefined): ProdDef {\n if (!stored) return written;\n const out: ProdDef = { ...written };\n for (const k of OUT_OF_DOMAIN_KEYS) if (stored[k] !== undefined && out[k] === undefined) out[k] = stored[k];\n const type = String(written.type ?? \"\");\n const host = Object.entries(stored.config ?? {}).filter(([k, v]) => v !== undefined && (isHostConfigKey(type, k) || SERVER_CONFIG_KEYS.has(k)) && out.config?.[k] === undefined);\n if (host.length || out.config) out.config = { ...(out.config ?? {}), ...Object.fromEntries(host) };\n // nested definitions: a model field's fields, a prop's config.fields\n if (Array.isArray(written.fields)) out.fields = carryList(written.fields, stored.fields);\n const cf = out.config?.fields;\n if (Array.isArray(cf)) out.config = { ...out.config, fields: carryList(cf as ProdDef[], stored.config?.fields as ProdDef[] | undefined) };\n return out;\n}\n\nconst carryList = (written: ProdDef[], stored: ProdDef[] | undefined) => written.map((w) => carryDef(w, stored?.find((s) => s.key === w.key)));\n\n/**\n * A prod definition written from C, with every out-of-domain key (facets.ts OUT_OF_DOMAIN: a prop's binding, host and\n * server config) the stored definition held carried over by key. What write_schema stores (C6).\n */\nexport function preserveOutOfDomain<T extends ProdContentModel | ProdComponent>(written: T, stored: T | undefined, lane: AdapterTarget): T {\n if (!stored) return written;\n const list = lane === \"fields\" ? \"fields\" : \"props\";\n const w = written as unknown as Obj;\n const s = stored as unknown as Obj;\n return { ...w, [list]: carryList((w[list] as ProdDef[]) ?? [], s[list] as ProdDef[] | undefined) } as unknown as T;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,eAAe;AAQ5B,IAAM,S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A,GAAW,IAAI,KAAK,OAAO;CACzG,MAAM,OAAO,OAAO,QAAQ,QAAQ,EAAE;CACtC,MAAM,OAAO,OAAO,QAAQ,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,OAAO,MAAM,KAAA,MAAc,gBAAgB,MAAM,CAAC,KAAK,mBAAmB,IAAI,CAAC,MAAM,IAAI,SAAS,OAAO,KAAA,CAAS;CAC/K,IAAI,KAAK,UAAU,IAAI,QAAQ,IAAI,SAAS;EAAE,GAAI,IAAI,UAAU,CAAC;EAAI,GAAG,OAAO,YAAY,IAAI;CAAE;CAEjG,IAAI,MAAM,QAAQ,QAAQ,MAAM,GAAG,IAAI,SAAS,UAAU,QAAQ,QAAQ,OAAO,MAAM;CACvF,MAAM,KAAK,IAAI,QAAQ;CACvB,IAAI,MAAM,QAAQ,EAAE,GAAG,IAAI,SAAS;EAAE,GAAG,IAAI;EAAQ,QAAQ,UAAU,IAAiB,OAAO,QAAQ,MAA+B;CAAE;CACxI,OAAO;AACT;AAEA,IAAM,aAAa,SAAoB,WAAkC,QAAQ,KAAK,MAAM,SAAS,GAAG,QAAQ,MAAM,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;;;;;AAM7I,SAAgB,oBAAgE,SAAY,QAAuB,MAAwB;CACzI,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,OAAO,SAAS,WAAW,WAAW;CAC5C,MAAM,IAAI;CACV,MAAM,IAAI;CACV,OAAO;EAAE,GAAG;GAAI,OAAO,UAAW,EAAE,SAAuB,CAAC,GAAG,EAAE,KAA8B;CAAE;AACnG"}
|
package/dist/core/facets.d.ts
CHANGED
|
@@ -341,6 +341,22 @@ export declare const FACETS: {
|
|
|
341
341
|
readonly "preview icon": FacetRow;
|
|
342
342
|
readonly "preview path": FacetRow;
|
|
343
343
|
readonly "unsupported key": FacetRow;
|
|
344
|
+
readonly "richtext references": {
|
|
345
|
+
readonly row: "B RT8";
|
|
346
|
+
readonly carrier: "value";
|
|
347
|
+
readonly props: readonly ["config.references"];
|
|
348
|
+
readonly fields: readonly ["config.references"];
|
|
349
|
+
readonly bound: "REFERENCES_MODEL_ID";
|
|
350
|
+
readonly status: "landed";
|
|
351
|
+
};
|
|
352
|
+
readonly "richtext features": {
|
|
353
|
+
readonly row: "B RT0";
|
|
354
|
+
readonly carrier: "value";
|
|
355
|
+
readonly props: readonly ["config.features"];
|
|
356
|
+
readonly fields: readonly ["config.features"];
|
|
357
|
+
readonly bound: "RICHTEXT_FEATURES";
|
|
358
|
+
readonly status: "landed";
|
|
359
|
+
};
|
|
344
360
|
};
|
|
345
361
|
export declare const facetOf: (feature: string) => FacetRow | undefined;
|
|
346
362
|
/** The owner-signed exclusions: what may be lost by design (shopify until its pipeline, and two deliberate backend rules). */
|
package/dist/core/facets.js
CHANGED
|
@@ -323,7 +323,23 @@ var FACETS = {
|
|
|
323
323
|
"item icon": corpusFix("ui.icon (list)", "ui.icon (list)", "DOCK_ICON_NAMES"),
|
|
324
324
|
"preview icon": corpusFix("ui.preview.icon", "ui.preview.icon", "DOCK_ICON_NAMES"),
|
|
325
325
|
"preview path": corpusFix("ui.preview.{title,subtitle,media}", "ui.preview.{title,subtitle,media}", "PREVIEW_PATH"),
|
|
326
|
-
"unsupported key": corpusFix("—", "—", "V2_SCHEMA_KEYS")
|
|
326
|
+
"unsupported key": corpusFix("—", "—", "V2_SCHEMA_KEYS"),
|
|
327
|
+
"richtext references": {
|
|
328
|
+
row: "B RT8",
|
|
329
|
+
carrier: "value",
|
|
330
|
+
props: ["config.references"],
|
|
331
|
+
fields: ["config.references"],
|
|
332
|
+
bound: "REFERENCES_MODEL_ID",
|
|
333
|
+
status: "landed"
|
|
334
|
+
},
|
|
335
|
+
"richtext features": {
|
|
336
|
+
row: "B RT0",
|
|
337
|
+
carrier: "value",
|
|
338
|
+
props: ["config.features"],
|
|
339
|
+
fields: ["config.features"],
|
|
340
|
+
bound: "RICHTEXT_FEATURES",
|
|
341
|
+
status: "landed"
|
|
342
|
+
}
|
|
327
343
|
};
|
|
328
344
|
var facetOf = (feature) => FACETS[feature];
|
|
329
345
|
/** The owner-signed exclusions: what may be lost by design (shopify until its pipeline, and two deliberate backend rules). */
|
package/dist/core/facets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets.js","names":[],"sources":["../../src/core/facets.ts"],"sourcesContent":["/**\n * THE FACET TABLE (kit-facet-table.v3.md, G0b closed 2026-10-23): every V2 schema facet the adapter can name, with the\n * ONE prod key per lane that stores it. `satisfies Record<V2Facet, FacetRow>` makes it total: a feature added to\n * FEATURES or CATALOG (adapters/lossy.ts) without a row here fails tsc.\n *\n * Carriers are `value` (an explicit stored key) and `excluded` (owner-signed). A `bound` names the one shared constant\n * the V2 authoring rule and the prod zod rule both read: a value inside it is carried, one outside it is refused with\n * the facet's name. `status` is \"landed\" when the adapter carries the facet today, else the step that lands it.\n * Prod-only keys V2 has no concept of are not facets: OUT_OF_DOMAIN, preserved on every write (PBT P8).\n */\nimport type { CatalogFeature, LossyFeature } from \"../adapters/lossy\";\n\n/** Prod keys with no V2 concept (facet table §B.1): never written from V2, carried through a write from the stored definition. */\nexport const OUT_OF_DOMAIN = {\n \"prop target\": \"a prop's binding: props[].target (+ stale, origin)\",\n \"host config\": \"HOST_CONFIG_KEYS + SERVER_CONFIG_KEYS in a field's or prop's config (adapters/lossy.ts)\",\n} as const satisfies Partial<Record<CatalogFeature, string>>;\nexport type OutOfDomainFeature = keyof typeof OUT_OF_DOMAIN;\n\nexport type V2Facet = Exclude<LossyFeature | CatalogFeature, OutOfDomainFeature>;\n\nexport interface FacetRow {\n /** facet table v3: an A row number, or the B group */\n row: string;\n carrier: \"value\" | \"excluded\";\n /** the prod key(s) per lane, one per shape the facet takes; [] = the facet does not arise in that lane */\n props: readonly string[];\n fields: readonly string[];\n /** the shared constant: inside it the facet is carried, outside it the facet is refused by name */\n bound?: string;\n status: \"landed\" | `pending:${string}`;\n /** a facet stored at another facet's key (kind:page is the shape facet's value \"page\") */\n foldedInto?: V2Facet;\n}\n\nconst corpusFix = (props: string, fields: string, bound: string): FacetRow => ({ row: \"B corpus-fix\", carrier: \"value\", props: [props], fields: [fields], bound, status: \"landed\" });\n\nexport const FACETS = {\n /* ── A: hit by the corpus ── */\n ai: { row: \"A1\", carrier: \"value\", props: [\"props[].ai\"], fields: [\"fields[].ai\"], status: \"pending:C3\" },\n category: { row: \"A2\", carrier: \"value\", props: [\"components.category\"], fields: [\"content_models.v2.category\"], bound: \"CATEGORY_ORDER\", status: \"pending:C3+C5\" },\n variants: {\n row: \"A3\",\n carrier: \"value\",\n props: [\"component_variant_groups (+ components.variant_group_id, variant_input_mappings; order/icon/description → component_variant_groups.v2.variants)\"],\n fields: [\"fields[_variant] select + showIf {field:_variant}; content_models.v2.variants{slug → {icon, description}}\"],\n status: \"pending:C4\",\n },\n \"block icon\": { row: \"A4\", carrier: \"value\", props: [\"components.icon\"], fields: [\"content_models.icon\"], bound: \"DOCK_ICON_NAMES\", status: \"pending:C1-model-settings\" },\n \"document preview\": { row: \"A5\", carrier: \"value\", props: [\"components.preview\"], fields: [\"content_models.list_preview\"], status: \"pending:C3\" },\n \"document preview path\": { row: \"B catalog\", carrier: \"value\", props: [\"components.preview (path rule widened)\"], fields: [], status: \"pending:C3\" },\n \"kind:global\": { row: \"A6\", carrier: \"value\", props: [\"components.v2.shape\"], fields: [\"content_models.v2.shape\"], status: \"pending:C5\" },\n \"kind:entry (props)\": { row: \"A6\", carrier: \"value\", props: [\"components.v2.shape\"], fields: [], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"kind:block (fields)\": { row: \"A6\", carrier: \"value\", props: [], fields: [\"content_models.v2.shape\"], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"kind:page\": { row: \"A22\", carrier: \"value\", props: [], fields: [\"content_models.v2.shape\"], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"kind:object\": { row: \"A6\", carrier: \"value\", props: [], fields: [\"content_models.v2.shape\"], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"groups>3\": { row: \"A7\", carrier: \"value\", props: [\"components.tabs\"], fields: [\"content_models.fieldsets[kind:tab]\"], bound: \"TAB_MAX\", status: \"pending:C3+C8\" },\n \"item openMode\": {\n row: \"A8\",\n carrier: \"value\",\n props: [\"config.item.openMode (object item)\", \"config.itemTypes[i].openMode (polymorphic)\"],\n fields: [\"ui.blocks[slug].openMode (modular)\"],\n status: \"pending:C3\",\n },\n \"reference target\": { row: \"A9\", carrier: \"value\", props: [\"config.targets\"], fields: [\"config.targets\"], bound: \"REF_TARGET_KINDS\", status: \"landed\" },\n \"type:slot\": { row: \"A10\", carrier: \"value\", props: [\"props[] type slot (config.allow)\"], fields: [\"fields[] type slot (config.blockSlugs)\"], bound: \"SLOT_BLOCK_SLUGS_REQUIRED\", status: \"landed\" },\n \"block model field\": { row: \"A11\", carrier: \"value\", props: [], fields: [\"kind:'block' model fields[]\"], bound: \"BLOCK_FIELD_TYPES\", status: \"pending:G7\" },\n \"shopify reference\": { row: \"A12\", carrier: \"excluded\", props: [], fields: [], status: \"landed\" },\n \"type:table\": { row: \"A13\", carrier: \"value\", props: [\"props[] type table (config.mode data)\"], fields: [\"fields[] type table\"], status: \"landed\" },\n \"group (nested)\": { row: \"A14\", carrier: \"value\", props: [\"ui.tab {id}\"], fields: [\"ui.tab {id} (nested field)\"], bound: \"TAB_MAX\", status: \"landed\" },\n \"fieldset collision\": { row: \"A15\", carrier: \"value\", props: [\"ui.group {id}\"], fields: [\"fieldsetId\"], bound: \"TAB_FIELDSET_ID_UNIQUE\", status: \"landed\" },\n \"segmented fallback\": { row: \"A16\", carrier: \"value\", props: [\"ui.control segmented\"], fields: [\"ui.control segmented\"], bound: \"SEGMENTED_MAX\", status: \"pending:C3\" },\n \"fieldset (derived)\": { row: \"A17\", carrier: \"value\", props: [\"ui.group (prop group)\"], fields: [\"content_models.fieldsets\"], status: \"landed\" },\n \"itemNoun (derived)\": { row: \"A18\", carrier: \"value\", props: [\"ui.itemLabel\"], fields: [\"ui.itemTitle\"], status: \"landed\" },\n \"reference filter\": { row: \"A19\", carrier: \"value\", props: [\"config.filter\"], fields: [\"config.filter\"], bound: \"REFERENCE_FILTER_MAX\", status: \"landed\" },\n condition: { row: \"A20\", carrier: \"value\", props: [\"showIf (+ scope)\"], fields: [\"showIf (+ scope)\"], bound: \"SHOW_IF_SCOPES\", status: \"pending:C3\" },\n openMode: { row: \"A21\", carrier: \"value\", props: [\"props[].openMode\"], fields: [\"fields[].openMode\"], bound: \"OPEN_MODE_TYPES\", status: \"pending:C9\" },\n \"slot allow\": { row: \"A23\", carrier: \"value\", props: [\"config.allow\"], fields: [\"config.blockSlugs\"], bound: \"SLOT_ALLOW\", status: \"landed\" },\n\n /* ── B: in the code, not hit by the corpus ── */\n \"type:polymorphic-array\": { row: \"B structural\", carrier: \"value\", props: [\"props[] type table (config.mode types)\"], fields: [\"fields[] type modular\"], status: \"pending:C3\" },\n \"item chrome (types)\": { row: \"B structural\", carrier: \"value\", props: [\"config.itemTypes[i] {icon, preview}\"], fields: [\"ui.blocks[slug] {icon, preview}\"], status: \"pending:C3\" },\n \"type:primitive-array\": { row: \"B decided\", carrier: \"value\", props: [\"config.itemType (widened)\"], fields: [\"config.itemType (widened)\"], status: \"pending:C3\" },\n \"depth>10\": { row: \"B decided\", carrier: \"value\", props: [\"nesting\"], fields: [\"nesting\"], bound: \"DEPTH_MAX\", status: \"landed\" },\n slotSettings: { row: \"B decided (BUILD)\", carrier: \"value\", props: [\"config.settings: FieldDef[]\"], fields: [\"config.settings: FieldDef[]\"], bound: \"SLOT_SETTINGS_MAX\", status: \"pending:C3\" },\n \"block placement\": { row: \"B catalog\", carrier: \"value\", props: [\"components.v2.placement\"], fields: [\"content_models.v2.placement\"], status: \"pending:C5\" },\n \"seeded instance\": { row: \"B catalog\", carrier: \"excluded\", props: [], fields: [], status: \"landed\" },\n \"not applicable (props)\": { row: \"B catalog\", carrier: \"excluded\", props: [], fields: [], status: \"landed\" },\n \"type name\": corpusFix(\"components.slug\", \"content_models.slug\", \"SLUG_RE\"),\n \"group name>40\": corpusFix(\"components.tabs[].id\", \"content_models.fieldsets[].id\", \"TAB_NAME_MAX\"),\n \"group title\": corpusFix(\"components.tabs[].name\", \"content_models.fieldsets[].name\", \"TAB_TITLE\"),\n \"group default\": corpusFix(\"components.tabs[0]\", \"content_models.fieldsets[0]\", \"TAB_DEFAULT_FIRST\"),\n \"group icon\": corpusFix(\"components.tabs[].icon\", \"content_models.fieldsets[].icon\", \"DOCK_ICON_NAMES\"),\n \"group name collision\": corpusFix(\"components.tabs[].name\", \"content_models.fieldsets[].name\", \"TAB_NAME_UNIQUE\"),\n \"prop tab limit\": corpusFix(\"components.tabs\", \"content_models.fieldsets\", \"PROP_TAB_MAX\"),\n \"fieldset spans groups\": corpusFix(\"ui.group.tab\", \"fieldsets[].tab\", \"FIELDSET_ONE_TAB\"),\n \"fieldset (props)\": corpusFix(\"ui.group (first prop)\", \"content_models.fieldsets\", \"PROP_GROUP_DEFINED_ON_USE\"),\n \"fieldset name>limit\": corpusFix(\"ui.group.label\", \"content_models.fieldsets[].name\", \"FIELDSET_NAME_MAX\"),\n \"duplicate name\": corpusFix(\"props[].key\", \"fields[].key\", \"KEY_UNIQUE\"),\n \"reserved name\": { row: \"B corpus-fix\", carrier: \"value\", props: [], fields: [\"fields[].key\"], bound: \"KEY_RESERVED + KEY_FORMAT\", status: \"landed\" },\n rows: corpusFix(\"ui.rows\", \"ui.rows\", \"UI_ROWS_MAX\"),\n synced: corpusFix(\"ui.synced\", \"ui.synced\", \"SYNCED_FROM_MAX\"),\n valueShape: corpusFix(\"ui.valueShape\", \"ui.valueShape\", \"VALUE_SHAPE_TYPES\"),\n \"default value\": corpusFix(\"props[].defaultValue\", \"fields[].defaultValue\", \"VALUE_SCHEMAS\"),\n icon: corpusFix(\"ui.icon\", \"ui.icon\", \"DOCK_ICON_NAMES\"),\n layout: corpusFix(\"ui.control / ui.layout\", \"ui.control / ui.layout\", \"CONTROL_TYPES\"),\n \"help>limit\": corpusFix(\"helpText / placeholder / helpMore\", \"helpText / ui.placeholder / helpMore\", \"HELP_CAPS\"),\n \"option icon\": corpusFix(\"options[].icon\", \"options[].icon\", \"DOCK_ICON_NAMES\"),\n \"option description\": corpusFix(\"options[].description\", \"options[].description\", \"OPTION_DESCRIPTION_MAX\"),\n access: corpusFix(\"ui.access\", \"ui.access\", \"ACCESS_CAPS\"),\n timezone: corpusFix(\"config.timezone\", \"config.timezone\", \"TIMEZONE\"),\n \"reference order\": corpusFix(\"config.contentModelId|allowedModelSlugs, config.targets\", \"config.contentModelId|allowedModelSlugs, config.targets\", \"REFERENCE_TO_ORDER\"),\n \"numeric unit\": corpusFix(\"config.unit\", \"config.unit\", \"NUMBER_UNIT_MAX\"),\n \"rating bounds\": corpusFix(\"config.min/max/step (rating)\", \"config.min/max/step (rating)\", \"RATING_BOUNDS\"),\n \"scale rules\": corpusFix(\"config.scale\", \"config.scale\", \"SCALE_RULES\"),\n \"validation.patternMessage\": corpusFix(\"config.patternMessage\", \"config.patternMessage\", \"PATTERN_MESSAGE_MAX\"),\n \"validation.pattern\": corpusFix(\"config.pattern\", \"config.pattern\", \"PATTERN_MAX\"),\n \"validation.length\": corpusFix(\"config.minLength/maxLength\", \"config.minLength/maxLength\", \"LENGTH_TYPES\"),\n \"validation.items\": corpusFix(\"config.minItems/maxItems\", \"config.minItems/maxItems\", \"LIST_ITEMS_CAP\"),\n \"validation.unique\": corpusFix(\"props[].unique\", \"fields[].unique\", \"UNIQUE_TYPES\"),\n \"validation.recommendedMax\": corpusFix(\"props[].recommendedMax\", \"fields[].recommendedMax\", \"RECOMMENDED_MAX\"),\n \"item identity\": corpusFix(\"ui.itemName / ui.itemTitle\", \"ui.itemName / ui.itemTitle\", \"ITEM_NAME_RE\"),\n \"item settings\": corpusFix(\"config.item\", \"config.item\", \"ARRAY_ITEM_SETTINGS\"),\n itemNoun: corpusFix(\"ui.itemLabel\", \"ui.itemLabel\", \"ITEM_LABEL_MAX\"),\n \"item icon\": corpusFix(\"ui.icon (list)\", \"ui.icon (list)\", \"DOCK_ICON_NAMES\"),\n \"preview icon\": corpusFix(\"ui.preview.icon\", \"ui.preview.icon\", \"DOCK_ICON_NAMES\"),\n \"preview path\": corpusFix(\"ui.preview.{title,subtitle,media}\", \"ui.preview.{title,subtitle,media}\", \"PREVIEW_PATH\"),\n \"unsupported key\": corpusFix(\"—\", \"—\", \"V2_SCHEMA_KEYS\"),\n} as const satisfies Record<V2Facet, FacetRow>;\n\nexport const facetOf = (feature: string): FacetRow | undefined => (FACETS as Record<string, FacetRow>)[feature];\n\n/** The owner-signed exclusions: what may be lost by design (shopify until its pipeline, and two deliberate backend rules). */\nexport const EXCLUDED: readonly V2Facet[] = (Object.keys(FACETS) as V2Facet[]).filter((f) => FACETS[f].carrier === \"excluded\");\n"],"mappings":";;AAaA,IAAa,gBAAgB;CAC3B,eAAe;CACf,eAAe;AACjB;AAmBA,IAAM,aAAa,OAAe,QAAgB,WAA6B;CAAE,KAAK;CAAgB,SAAS;CAAS,OAAO,CAAC,KAAK;CAAG,QAAQ,CAAC,MAAM;CAAG;CAAO,QAAQ;AAAS;AAElL,IAAa,SAAS;CAEpB,IAAI;EAAE,KAAK;EAAM,SAAS;EAAS,OAAO,CAAC,YAAY;EAAG,QAAQ,CAAC,aAAa;EAAG,QAAQ;CAAa;CACxG,UAAU;EAAE,KAAK;EAAM,SAAS;EAAS,OAAO,CAAC,qBAAqB;EAAG,QAAQ,CAAC,4BAA4B;EAAG,OAAO;EAAkB,QAAQ;CAAgB;CAClK,UAAU;EACR,KAAK;EACL,SAAS;EACT,OAAO,CAAC,iJAAiJ;EACzJ,QAAQ,CAAC,2GAA2G;EACpH,QAAQ;CACV;CACA,cAAc;EAAE,KAAK;EAAM,SAAS;EAAS,OAAO,CAAC,iBAAiB;EAAG,QAAQ,CAAC,qBAAqB;EAAG,OAAO;EAAmB,QAAQ;CAA4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AAc;CACzG,oBAAoB,UAAU,4BAA4B,4BAA4B,gBAAgB;CACtG,qBAAqB,UAAU,kBAAkB,mBAAmB,cAAc;CAClF,6BAA6B,UAAU,0BAA0B,2BAA2B,iBAAiB;CAC7G,iBAAiB,UAAU,8BAA8B,8BAA8B,cAAc;CACrG,iBAAiB,UAAU,eAAe,eAAe,qBAAqB;CAC9E,UAAU,UAAU,gBAAgB,gBAAgB,gBAAgB;CACpE,aAAa,UAAU,kBAAkB,kBAAkB,iBAAiB;CAC5E,gBAAgB,UAAU,mBAAmB,mBAAmB,iBAAiB;CACjF,gBAAgB,UAAU,qCAAqC,qCAAqC,cAAc;CAClH,mBAAmB,UAAU,KAAK,KAAK,gBAAgB;AACzD;AAEA,IAAa,WAAW,YAA2C,OAAoC;;AAGvG,IAAa,WAAgC,OAAO,KAAK,MAAM,CAAC,CAAe,QAAQ,MAAM,OAAO,EAAE,CAAC,YAAY,UAAU"}
|
|
1
|
+
{"version":3,"file":"facets.js","names":[],"sources":["../../src/core/facets.ts"],"sourcesContent":["/**\n * THE FACET TABLE (kit-facet-table.v3.md, G0b closed 2026-10-23): every V2 schema facet the adapter can name, with the\n * ONE prod key per lane that stores it. `satisfies Record<V2Facet, FacetRow>` makes it total: a feature added to\n * FEATURES or CATALOG (adapters/lossy.ts) without a row here fails tsc.\n *\n * Carriers are `value` (an explicit stored key) and `excluded` (owner-signed). A `bound` names the one shared constant\n * the V2 authoring rule and the prod zod rule both read: a value inside it is carried, one outside it is refused with\n * the facet's name. `status` is \"landed\" when the adapter carries the facet today, else the step that lands it.\n * Prod-only keys V2 has no concept of are not facets: OUT_OF_DOMAIN, preserved on every write (PBT P8).\n */\nimport type { CatalogFeature, LossyFeature } from \"../adapters/lossy\";\n\n/** Prod keys with no V2 concept (facet table §B.1): never written from V2, carried through a write from the stored definition. */\nexport const OUT_OF_DOMAIN = {\n \"prop target\": \"a prop's binding: props[].target (+ stale, origin)\",\n \"host config\": \"HOST_CONFIG_KEYS + SERVER_CONFIG_KEYS in a field's or prop's config (adapters/lossy.ts)\",\n} as const satisfies Partial<Record<CatalogFeature, string>>;\nexport type OutOfDomainFeature = keyof typeof OUT_OF_DOMAIN;\n\nexport type V2Facet = Exclude<LossyFeature | CatalogFeature, OutOfDomainFeature>;\n\nexport interface FacetRow {\n /** facet table v3: an A row number, or the B group */\n row: string;\n carrier: \"value\" | \"excluded\";\n /** the prod key(s) per lane, one per shape the facet takes; [] = the facet does not arise in that lane */\n props: readonly string[];\n fields: readonly string[];\n /** the shared constant: inside it the facet is carried, outside it the facet is refused by name */\n bound?: string;\n status: \"landed\" | `pending:${string}`;\n /** a facet stored at another facet's key (kind:page is the shape facet's value \"page\") */\n foldedInto?: V2Facet;\n}\n\nconst corpusFix = (props: string, fields: string, bound: string): FacetRow => ({ row: \"B corpus-fix\", carrier: \"value\", props: [props], fields: [fields], bound, status: \"landed\" });\n\nexport const FACETS = {\n /* ── A: hit by the corpus ── */\n ai: { row: \"A1\", carrier: \"value\", props: [\"props[].ai\"], fields: [\"fields[].ai\"], status: \"pending:C3\" },\n category: { row: \"A2\", carrier: \"value\", props: [\"components.category\"], fields: [\"content_models.v2.category\"], bound: \"CATEGORY_ORDER\", status: \"pending:C3+C5\" },\n variants: {\n row: \"A3\",\n carrier: \"value\",\n props: [\"component_variant_groups (+ components.variant_group_id, variant_input_mappings; order/icon/description → component_variant_groups.v2.variants)\"],\n fields: [\"fields[_variant] select + showIf {field:_variant}; content_models.v2.variants{slug → {icon, description}}\"],\n status: \"pending:C4\",\n },\n \"block icon\": { row: \"A4\", carrier: \"value\", props: [\"components.icon\"], fields: [\"content_models.icon\"], bound: \"DOCK_ICON_NAMES\", status: \"pending:C1-model-settings\" },\n \"document preview\": { row: \"A5\", carrier: \"value\", props: [\"components.preview\"], fields: [\"content_models.list_preview\"], status: \"pending:C3\" },\n \"document preview path\": { row: \"B catalog\", carrier: \"value\", props: [\"components.preview (path rule widened)\"], fields: [], status: \"pending:C3\" },\n \"kind:global\": { row: \"A6\", carrier: \"value\", props: [\"components.v2.shape\"], fields: [\"content_models.v2.shape\"], status: \"pending:C5\" },\n \"kind:entry (props)\": { row: \"A6\", carrier: \"value\", props: [\"components.v2.shape\"], fields: [], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"kind:block (fields)\": { row: \"A6\", carrier: \"value\", props: [], fields: [\"content_models.v2.shape\"], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"kind:page\": { row: \"A22\", carrier: \"value\", props: [], fields: [\"content_models.v2.shape\"], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"kind:object\": { row: \"A6\", carrier: \"value\", props: [], fields: [\"content_models.v2.shape\"], status: \"pending:C5\", foldedInto: \"kind:global\" },\n \"groups>3\": { row: \"A7\", carrier: \"value\", props: [\"components.tabs\"], fields: [\"content_models.fieldsets[kind:tab]\"], bound: \"TAB_MAX\", status: \"pending:C3+C8\" },\n \"item openMode\": {\n row: \"A8\",\n carrier: \"value\",\n props: [\"config.item.openMode (object item)\", \"config.itemTypes[i].openMode (polymorphic)\"],\n fields: [\"ui.blocks[slug].openMode (modular)\"],\n status: \"pending:C3\",\n },\n \"reference target\": { row: \"A9\", carrier: \"value\", props: [\"config.targets\"], fields: [\"config.targets\"], bound: \"REF_TARGET_KINDS\", status: \"landed\" },\n \"type:slot\": { row: \"A10\", carrier: \"value\", props: [\"props[] type slot (config.allow)\"], fields: [\"fields[] type slot (config.blockSlugs)\"], bound: \"SLOT_BLOCK_SLUGS_REQUIRED\", status: \"landed\" },\n \"block model field\": { row: \"A11\", carrier: \"value\", props: [], fields: [\"kind:'block' model fields[]\"], bound: \"BLOCK_FIELD_TYPES\", status: \"pending:G7\" },\n \"shopify reference\": { row: \"A12\", carrier: \"excluded\", props: [], fields: [], status: \"landed\" },\n \"type:table\": { row: \"A13\", carrier: \"value\", props: [\"props[] type table (config.mode data)\"], fields: [\"fields[] type table\"], status: \"landed\" },\n \"group (nested)\": { row: \"A14\", carrier: \"value\", props: [\"ui.tab {id}\"], fields: [\"ui.tab {id} (nested field)\"], bound: \"TAB_MAX\", status: \"landed\" },\n \"fieldset collision\": { row: \"A15\", carrier: \"value\", props: [\"ui.group {id}\"], fields: [\"fieldsetId\"], bound: \"TAB_FIELDSET_ID_UNIQUE\", status: \"landed\" },\n \"segmented fallback\": { row: \"A16\", carrier: \"value\", props: [\"ui.control segmented\"], fields: [\"ui.control segmented\"], bound: \"SEGMENTED_MAX\", status: \"pending:C3\" },\n \"fieldset (derived)\": { row: \"A17\", carrier: \"value\", props: [\"ui.group (prop group)\"], fields: [\"content_models.fieldsets\"], status: \"landed\" },\n \"itemNoun (derived)\": { row: \"A18\", carrier: \"value\", props: [\"ui.itemLabel\"], fields: [\"ui.itemTitle\"], status: \"landed\" },\n \"reference filter\": { row: \"A19\", carrier: \"value\", props: [\"config.filter\"], fields: [\"config.filter\"], bound: \"REFERENCE_FILTER_MAX\", status: \"landed\" },\n condition: { row: \"A20\", carrier: \"value\", props: [\"showIf (+ scope)\"], fields: [\"showIf (+ scope)\"], bound: \"SHOW_IF_SCOPES\", status: \"pending:C3\" },\n openMode: { row: \"A21\", carrier: \"value\", props: [\"props[].openMode\"], fields: [\"fields[].openMode\"], bound: \"OPEN_MODE_TYPES\", status: \"pending:C9\" },\n \"slot allow\": { row: \"A23\", carrier: \"value\", props: [\"config.allow\"], fields: [\"config.blockSlugs\"], bound: \"SLOT_ALLOW\", status: \"landed\" },\n\n /* ── B: in the code, not hit by the corpus ── */\n \"type:polymorphic-array\": { row: \"B structural\", carrier: \"value\", props: [\"props[] type table (config.mode types)\"], fields: [\"fields[] type modular\"], status: \"pending:C3\" },\n \"item chrome (types)\": { row: \"B structural\", carrier: \"value\", props: [\"config.itemTypes[i] {icon, preview}\"], fields: [\"ui.blocks[slug] {icon, preview}\"], status: \"pending:C3\" },\n \"type:primitive-array\": { row: \"B decided\", carrier: \"value\", props: [\"config.itemType (widened)\"], fields: [\"config.itemType (widened)\"], status: \"pending:C3\" },\n \"depth>10\": { row: \"B decided\", carrier: \"value\", props: [\"nesting\"], fields: [\"nesting\"], bound: \"DEPTH_MAX\", status: \"landed\" },\n slotSettings: { row: \"B decided (BUILD)\", carrier: \"value\", props: [\"config.settings: FieldDef[]\"], fields: [\"config.settings: FieldDef[]\"], bound: \"SLOT_SETTINGS_MAX\", status: \"pending:C3\" },\n \"block placement\": { row: \"B catalog\", carrier: \"value\", props: [\"components.v2.placement\"], fields: [\"content_models.v2.placement\"], status: \"pending:C5\" },\n \"seeded instance\": { row: \"B catalog\", carrier: \"excluded\", props: [], fields: [], status: \"landed\" },\n \"not applicable (props)\": { row: \"B catalog\", carrier: \"excluded\", props: [], fields: [], status: \"landed\" },\n \"type name\": corpusFix(\"components.slug\", \"content_models.slug\", \"SLUG_RE\"),\n \"group name>40\": corpusFix(\"components.tabs[].id\", \"content_models.fieldsets[].id\", \"TAB_NAME_MAX\"),\n \"group title\": corpusFix(\"components.tabs[].name\", \"content_models.fieldsets[].name\", \"TAB_TITLE\"),\n \"group default\": corpusFix(\"components.tabs[0]\", \"content_models.fieldsets[0]\", \"TAB_DEFAULT_FIRST\"),\n \"group icon\": corpusFix(\"components.tabs[].icon\", \"content_models.fieldsets[].icon\", \"DOCK_ICON_NAMES\"),\n \"group name collision\": corpusFix(\"components.tabs[].name\", \"content_models.fieldsets[].name\", \"TAB_NAME_UNIQUE\"),\n \"prop tab limit\": corpusFix(\"components.tabs\", \"content_models.fieldsets\", \"PROP_TAB_MAX\"),\n \"fieldset spans groups\": corpusFix(\"ui.group.tab\", \"fieldsets[].tab\", \"FIELDSET_ONE_TAB\"),\n \"fieldset (props)\": corpusFix(\"ui.group (first prop)\", \"content_models.fieldsets\", \"PROP_GROUP_DEFINED_ON_USE\"),\n \"fieldset name>limit\": corpusFix(\"ui.group.label\", \"content_models.fieldsets[].name\", \"FIELDSET_NAME_MAX\"),\n \"duplicate name\": corpusFix(\"props[].key\", \"fields[].key\", \"KEY_UNIQUE\"),\n \"reserved name\": { row: \"B corpus-fix\", carrier: \"value\", props: [], fields: [\"fields[].key\"], bound: \"KEY_RESERVED + KEY_FORMAT\", status: \"landed\" },\n rows: corpusFix(\"ui.rows\", \"ui.rows\", \"UI_ROWS_MAX\"),\n synced: corpusFix(\"ui.synced\", \"ui.synced\", \"SYNCED_FROM_MAX\"),\n valueShape: corpusFix(\"ui.valueShape\", \"ui.valueShape\", \"VALUE_SHAPE_TYPES\"),\n \"default value\": corpusFix(\"props[].defaultValue\", \"fields[].defaultValue\", \"VALUE_SCHEMAS\"),\n icon: corpusFix(\"ui.icon\", \"ui.icon\", \"DOCK_ICON_NAMES\"),\n layout: corpusFix(\"ui.control / ui.layout\", \"ui.control / ui.layout\", \"CONTROL_TYPES\"),\n \"help>limit\": corpusFix(\"helpText / placeholder / helpMore\", \"helpText / ui.placeholder / helpMore\", \"HELP_CAPS\"),\n \"option icon\": corpusFix(\"options[].icon\", \"options[].icon\", \"DOCK_ICON_NAMES\"),\n \"option description\": corpusFix(\"options[].description\", \"options[].description\", \"OPTION_DESCRIPTION_MAX\"),\n access: corpusFix(\"ui.access\", \"ui.access\", \"ACCESS_CAPS\"),\n timezone: corpusFix(\"config.timezone\", \"config.timezone\", \"TIMEZONE\"),\n \"reference order\": corpusFix(\"config.contentModelId|allowedModelSlugs, config.targets\", \"config.contentModelId|allowedModelSlugs, config.targets\", \"REFERENCE_TO_ORDER\"),\n \"numeric unit\": corpusFix(\"config.unit\", \"config.unit\", \"NUMBER_UNIT_MAX\"),\n \"rating bounds\": corpusFix(\"config.min/max/step (rating)\", \"config.min/max/step (rating)\", \"RATING_BOUNDS\"),\n \"scale rules\": corpusFix(\"config.scale\", \"config.scale\", \"SCALE_RULES\"),\n \"validation.patternMessage\": corpusFix(\"config.patternMessage\", \"config.patternMessage\", \"PATTERN_MESSAGE_MAX\"),\n \"validation.pattern\": corpusFix(\"config.pattern\", \"config.pattern\", \"PATTERN_MAX\"),\n \"validation.length\": corpusFix(\"config.minLength/maxLength\", \"config.minLength/maxLength\", \"LENGTH_TYPES\"),\n \"validation.items\": corpusFix(\"config.minItems/maxItems\", \"config.minItems/maxItems\", \"LIST_ITEMS_CAP\"),\n \"validation.unique\": corpusFix(\"props[].unique\", \"fields[].unique\", \"UNIQUE_TYPES\"),\n \"validation.recommendedMax\": corpusFix(\"props[].recommendedMax\", \"fields[].recommendedMax\", \"RECOMMENDED_MAX\"),\n \"item identity\": corpusFix(\"ui.itemName / ui.itemTitle\", \"ui.itemName / ui.itemTitle\", \"ITEM_NAME_RE\"),\n \"item settings\": corpusFix(\"config.item\", \"config.item\", \"ARRAY_ITEM_SETTINGS\"),\n itemNoun: corpusFix(\"ui.itemLabel\", \"ui.itemLabel\", \"ITEM_LABEL_MAX\"),\n \"item icon\": corpusFix(\"ui.icon (list)\", \"ui.icon (list)\", \"DOCK_ICON_NAMES\"),\n \"preview icon\": corpusFix(\"ui.preview.icon\", \"ui.preview.icon\", \"DOCK_ICON_NAMES\"),\n \"preview path\": corpusFix(\"ui.preview.{title,subtitle,media}\", \"ui.preview.{title,subtitle,media}\", \"PREVIEW_PATH\"),\n \"unsupported key\": corpusFix(\"—\", \"—\", \"V2_SCHEMA_KEYS\"),\n\n /* ── RT0 (kit-richtext-blocks-plan.md): a rich text's features, written as the full V2 set when V2 names none ── */\n \"richtext references\": { row: \"B RT8\", carrier: \"value\", props: [\"config.references\"], fields: [\"config.references\"], bound: \"REFERENCES_MODEL_ID\", status: \"landed\" },\n \"richtext features\": { row: \"B RT0\", carrier: \"value\", props: [\"config.features\"], fields: [\"config.features\"], bound: \"RICHTEXT_FEATURES\", status: \"landed\" },\n} as const satisfies Record<V2Facet, FacetRow>;\n\nexport const facetOf = (feature: string): FacetRow | undefined => (FACETS as Record<string, FacetRow>)[feature];\n\n/** The owner-signed exclusions: what may be lost by design (shopify until its pipeline, and two deliberate backend rules). */\nexport const EXCLUDED: readonly V2Facet[] = (Object.keys(FACETS) as V2Facet[]).filter((f) => FACETS[f].carrier === \"excluded\");\n"],"mappings":";;AAaA,IA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,qBAAqB;EAAE,KAAK;EAAS,SAAS;EAAS,OAAO,CAAC,iBAAiB;EAAG,QAAQ,CAAC,iBAAiB;EAAG,OAAO;EAAqB,QAAQ;CAAS;AAC/J;AAEA,IAAa,WAAW,YAA2C,OAAoC;;AAGvG,IAAa,WAAgC,OAAO,KAAK,MAAM,CAAC,CAAe,QAAQ,MAAM,OAAO,EAAE,CAAC,YAAY,UAAU"}
|
package/dist/core/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EXCLUDED, FACETS, OUT_OF_DOMAIN, facetOf } from "./facets.js";
|
|
2
|
-
import { CORE_VERSION, canonical, coreHash, coreJson, embedProd, embedV2, leafDiff, normProd, normV2, preserveOutOfDomain, roundTripCore } from "./core.js";
|
|
3
|
-
export { CORE_VERSION, EXCLUDED, FACETS, OUT_OF_DOMAIN, canonical, coreHash, coreJson, embedProd, embedV2, facetOf, leafDiff, normProd, normV2, preserveOutOfDomain, roundTripCore };
|
|
2
|
+
import { CORE_HASH_PREFIX, CORE_VERSION, canonical, coreHash, coreJson, embedProd, embedV2, leafDiff, normProd, normV2, preserveOutOfDomain, roundTripCore } from "./core.js";
|
|
3
|
+
export { CORE_HASH_PREFIX, CORE_VERSION, EXCLUDED, FACETS, OUT_OF_DOMAIN, canonical, coreHash, coreJson, embedProd, embedV2, facetOf, leafDiff, normProd, normV2, preserveOutOfDomain, roundTripCore };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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
|
-
import { AI_PRESETS, DEFAULT_ENV, FieldHeaderSlot, FormProvider, KitEnvProvider, KitSectionTitle, KitServicesProvider, SITE_PALETTE, fieldAccessOf, registerKitServices, resolveFieldAccess, seesDevSurfaces, useForm, useKitEnv, useKitServices, visibleFields, visibleSchema } from "./context.js";
|
|
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";
|
|
7
|
+
import { Spinner } from "./ui/spinner.js";
|
|
7
8
|
import { Button, HintTooltip, IconButton, RevealLink, Sparkle, TooltipScope, buttonVariants, iconButtonVariants } from "./ui/button.js";
|
|
8
9
|
import { ShortcutHint, ShortcutHintsProvider, shortcutHintsOn, useShortcutHints } from "./ui/shortcut-hint.js";
|
|
9
10
|
import { Checkbox, ChoiceCard, ChoiceList, Progress, Radio, RadioGroup, Segmented, Slider, Switch, ToggleGroup, ToggleItem } from "./ui/controls.js";
|
|
@@ -18,6 +19,7 @@ import { groupSummary } from "./engine/group-summary.js";
|
|
|
18
19
|
import { AnimatedFields, Appear, BreakpointGroup, FieldInset, FieldSection, FieldUnit, FieldUnitRow, FieldsetSection, GroupTabs, InsetScope, RHYTHM, arrangeFields, defaultGroup, isBreakpointName, isShort, useGroupStatus, useInsetDepth, useRhythm } from "./engine/grouping.js";
|
|
19
20
|
import { Field, HelpMore, Input, Label, SearchInput, Textarea } from "./ui/input.js";
|
|
20
21
|
import { Highlight, SEARCH_THRESHOLD, Select, filterOptions, matchPositions, matchScore, nodeText, selectTriggerClass } from "./ui/select.js";
|
|
22
|
+
import { Autocomplete } from "./ui/autocomplete.js";
|
|
21
23
|
import { FieldList } from "./engine/field-list.js";
|
|
22
24
|
import { ItemList, OrderLockSlot, SharedSortProvider, arrayMove, useDragReorder, useSharedSort } from "./engine/item-list.js";
|
|
23
25
|
import { ARRAY_CONTROLS, ArrayField, RowList, RowsHostContext, rowToggleField, useDrill, useListOps } from "./engine/array.js";
|
|
@@ -29,19 +31,28 @@ import { FrameHeader, FrameSlotsProvider, FrameStage, FrameView, HistoryView, fr
|
|
|
29
31
|
import { COALESCE_MS, SchemaForm, UNDO_STEPS } from "./engine/schema-form.js";
|
|
30
32
|
import { BlockPicker, SlotField, useAvailableBlocks } from "./engine/slot.js";
|
|
31
33
|
import { ACTIONS, ACTION_WHEN_READ_ONLY, CONTROLS, FallbackControl, KitField, LegacyFallback, NavRow, NestedForm, plainOf, useFieldAccess, withDefaultHelp } from "./engine/kit-field.js";
|
|
34
|
+
import "./controls/code-register.js";
|
|
35
|
+
import "./controls/date-register.js";
|
|
36
|
+
import "./controls/reference-register.js";
|
|
37
|
+
import "./controls/form-picker-register.js";
|
|
38
|
+
import "./controls/icon-register.js";
|
|
32
39
|
import { controls_exports, registerKitControls } from "./controls/index.js";
|
|
40
|
+
import "./controls/json-register.js";
|
|
41
|
+
import "./controls/location-register.js";
|
|
42
|
+
import "./controls/media-register.js";
|
|
43
|
+
import "./controls/rich-text/index.js";
|
|
44
|
+
import "./controls/slot-register.js";
|
|
45
|
+
import "./controls/table/index.js";
|
|
33
46
|
import { CAP_IDS } from "./schema/sources.js";
|
|
34
47
|
import { blockDefToSchema, fieldDefToSchema, fieldDefsToSchema, inferField, propDefToField, titleFromKey } from "./schema/adapters.js";
|
|
35
48
|
import { ActionTray, TrayMeta, TrayMore, actionTrayClass, relTime } from "./ui/action-tray.js";
|
|
36
49
|
import { ModeBar, ModeBarDot, ModeBarLink } from "./ui/mode-bar.js";
|
|
37
|
-
import { Spinner } from "./ui/spinner.js";
|
|
38
50
|
import { Tab, TabList, TabPanel, Tabs } from "./ui/tab.js";
|
|
39
51
|
import { KitToaster, kitToast, kitToastManager } from "./ui/toast.js";
|
|
40
|
-
import { Autocomplete } from "./ui/autocomplete.js";
|
|
41
52
|
import "./kit.css";
|
|
42
53
|
//#region src/index.ts
|
|
43
54
|
registerKitControls();
|
|
44
55
|
//#endregion
|
|
45
|
-
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, 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 };
|
|
46
57
|
|
|
47
58
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @bettercms-ai/kit entry point (in-app: \"@/kit\"). Importing it loads kit.css, whose tokens apply only\n * inside [data-kit-scope].\n *\n * scale.ts, table.ts and lib/utils.ts each export their own `formatNumber`, so they are not re-exported\n * here: import them by path (\"@/kit/schema/scale\", \"@/kit/schema/table\", \"@/kit/lib/utils\").\n */\nimport \"./kit.css\";\nimport { registerKitControls } from \"./controls\";\n\nexport * from \"./schema/types\";\nexport * from \"./schema/sources\";\nexport * from \"./schema/help\";\nexport * from \"./schema/adapters\";\nexport { cn } from \"./lib/cn\";\nexport * from \"./ui\";\n\n/* the form engine, its runtime contexts, and the V2 ↔ prod schema and value adapters */\nexport * from \"./context\";\nexport type { ControlProps } from \"./types\";\nexport * from \"./engine/schema-form\";\nexport * from \"./engine/kit-field\";\nexport * from \"./engine/field-shell\";\nexport * from \"./engine/bits\";\nexport * from \"./engine/group-summary\";\n/* layout (grouping.tsx's FieldList takes `renderField`; the engine's FieldList is field-list's, drawing KitField) */\nexport {\n RHYTHM, useRhythm, InsetScope, useInsetDepth, useGroupStatus, Appear, AnimatedFields, FieldSection, FieldInset, FieldUnit, FieldUnitRow,\n isBreakpointName, BreakpointGroup, arrangeFields, defaultGroup, GroupTabs, FieldsetSection, isShort,\n type GroupStatus, type RenderField, type GroupTabItem, type FieldSectionProps,\n} from \"./engine/grouping\";\nexport * from \"./engine/field-list\";\nexport * from \"./engine/array\";\nexport * from \"./engine/item-list\";\nexport * from \"./engine/slot\";\nexport {\n FrameSlotsProvider, useFrameSlots, FrameView, frameContext, FrameHeader, HistoryView, parentOfField, parentTitleOf, frameDirection,\n useFrameNavigation, FrameStage, type FrameFieldListProps, type FrameSlots,\n} from \"./engine/frame\";\nexport * from \"./engine/breadcrumb\";\nexport { resolveFrames, rootFrame, isDrillable, type Frame } from \"./lib/frames\";\nexport * from \"./adapters/schema\";\nexport * from \"./adapters/values\";\n/* the prod model's names (Fieldset, OpenMode, ScaleUnit, SelectOption) collide with the kit's own, so they live under `prod` */\nexport * as prod from \"./adapters/prod-types\";\nexport type { LossyFeature } from \"./adapters/lossy\";\n\n/* controls: each register file adds its types to the engine's dispatch tables (one import per lane file) */\nimport \"./controls/date-register\";\nimport \"./controls/icon-register\";\nimport \"./controls/code-register\";\nimport \"./controls/json-register\";\nimport \"./controls/location-register\";\nimport \"./controls/media-register\";\nimport \"./controls/reference-register\";\nimport \"./controls/form-picker-register\";\nimport \"./controls/slot-register\";\nimport \"./controls/rich-text\";\nimport \"./controls/table\";\n/* the ported controls: registered once here, so any host that loads the kit draws them instead of its legacy control.\n Their helpers keep short names (str, toNum…), so they live under `controls`. */\nexport * as controls from \"./controls\";\nexport { registerKitControls };\nregisterKitControls();\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @bettercms-ai/kit entry point (in-app: \"@/kit\"). Importing it loads kit.css, whose tokens apply only\n * inside [data-kit-scope].\n *\n * scale.ts, table.ts and lib/utils.ts each export their own `formatNumber`, so they are not re-exported\n * here: import them by path (\"@/kit/schema/scale\", \"@/kit/schema/table\", \"@/kit/lib/utils\").\n */\nimport \"./kit.css\";\nimport { registerKitControls } from \"./controls\";\n\nexport * from \"./schema/types\";\nexport * from \"./schema/sources\";\nexport * from \"./schema/help\";\nexport * from \"./schema/adapters\";\nexport { cn } from \"./lib/cn\";\nexport * from \"./ui\";\n\n/* the form engine, its runtime contexts, and the V2 ↔ prod schema and value adapters */\nexport * from \"./context\";\nexport type { ControlProps } from \"./types\";\nexport * from \"./engine/schema-form\";\nexport * from \"./engine/kit-field\";\nexport * from \"./engine/field-shell\";\nexport * from \"./engine/bits\";\nexport * from \"./engine/group-summary\";\n/* layout (grouping.tsx's FieldList takes `renderField`; the engine's FieldList is field-list's, drawing KitField) */\nexport {\n RHYTHM, useRhythm, InsetScope, useInsetDepth, useGroupStatus, Appear, AnimatedFields, FieldSection, FieldInset, FieldUnit, FieldUnitRow,\n isBreakpointName, BreakpointGroup, arrangeFields, defaultGroup, GroupTabs, FieldsetSection, isShort,\n type GroupStatus, type RenderField, type GroupTabItem, type FieldSectionProps,\n} from \"./engine/grouping\";\nexport * from \"./engine/field-list\";\nexport * from \"./engine/array\";\nexport * from \"./engine/item-list\";\nexport * from \"./engine/slot\";\nexport {\n FrameSlotsProvider, useFrameSlots, FrameView, frameContext, FrameHeader, HistoryView, parentOfField, parentTitleOf, frameDirection,\n useFrameNavigation, FrameStage, type FrameFieldListProps, type FrameSlots,\n} from \"./engine/frame\";\nexport * from \"./engine/breadcrumb\";\nexport { resolveFrames, rootFrame, isDrillable, type Frame } from \"./lib/frames\";\nexport * from \"./adapters/schema\";\nexport * from \"./adapters/values\";\n/* the prod model's names (Fieldset, OpenMode, ScaleUnit, SelectOption) collide with the kit's own, so they live under `prod` */\nexport * as prod from \"./adapters/prod-types\";\nexport type { LossyFeature } from \"./adapters/lossy\";\n\n/* controls: each register file adds its types to the engine's dispatch tables (one import per lane file) */\nimport \"./controls/date-register\";\nimport \"./controls/icon-register\";\nimport \"./controls/code-register\";\nimport \"./controls/json-register\";\nimport \"./controls/location-register\";\nimport \"./controls/media-register\";\nimport \"./controls/reference-register\";\nimport \"./controls/form-picker-register\";\nimport \"./controls/slot-register\";\nimport \"./controls/rich-text\";\nimport \"./controls/table\";\n/* the ported controls: registered once here, so any host that loads the kit draws them instead of its legacy control.\n Their helpers keep short names (str, toNum…), so they live under `controls`. */\nexport * as controls from \"./controls\";\nexport { registerKitControls };\nregisterKitControls();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,oBAAoB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
"id": "top-level-layout-key",
|
|
37
|
+
"plane": "schema",
|
|
38
|
+
"feature": "reserved name",
|
|
39
|
+
"pattern": "^/fields/\\d+/name ",
|
|
40
|
+
"key": "layout",
|
|
41
|
+
"reason": "A model's top-level field named `layout` (rich-blog-post, journalStory) collides with the API's address prefix (KEY_RESERVED): the key is stored as `layoutField`. Below the top level `layout` and `page` are kept (019141ffc).",
|
|
42
|
+
"signedBy": "owner 2026-10-24"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "block-shaped-model-layout-key",
|
|
46
|
+
"plane": "schema",
|
|
47
|
+
"feature": "reserved name",
|
|
48
|
+
"pattern": "^/fields/\\d+/of/\\d+/fields/\\d+/name ",
|
|
49
|
+
"key": "layout",
|
|
50
|
+
"reason": "A modular item type's own top-level field named `layout` (polymorphic-modules galleryModule), when the item type is a model whose v2.shape is \"block\" (a field no block primitive renders keeps it one): such a model can hold entries, so the key stays KEY_RESERVED (bc9ba34a3) and is stored as `layoutField`. On a kind \"block\" model it is kept.",
|
|
51
|
+
"signedBy": "owner 2026-10-24"
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
var equivalences = [
|
|
55
|
+
{
|
|
56
|
+
"id": "variant",
|
|
57
|
+
"plane": "value",
|
|
58
|
+
"key": "_variant",
|
|
59
|
+
"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.",
|
|
60
|
+
"recovery": "_variant is recovered from the component id: the family member the placement names is the V2 variant."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "global",
|
|
64
|
+
"plane": "value",
|
|
65
|
+
"key": "_ref | _overrides",
|
|
66
|
+
"moves": "A global block instance's reference and override map are the placement itself in prod (componentId + overrides), not props.",
|
|
67
|
+
"recovery": "_ref / _overrides resolve to the placement value: the placement's component and its overrides are V2's _ref and _overrides."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "asset",
|
|
71
|
+
"plane": "value",
|
|
72
|
+
"key": "image width | height",
|
|
73
|
+
"moves": "An image's pixel size is kept on the media asset, never in the value (values.ts imageToProd).",
|
|
74
|
+
"recovery": "width / height read back from the media asset (the kit's image control reads them through useMediaAsset)."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "zone",
|
|
78
|
+
"plane": "value",
|
|
79
|
+
"key": "datetime [Zone]",
|
|
80
|
+
"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.",
|
|
81
|
+
"recovery": "A datetime without a zone round-trips to the same instant, displayed in the site time zone (the stated display rule)."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "rel",
|
|
85
|
+
"plane": "value",
|
|
86
|
+
"key": "rel follow",
|
|
87
|
+
"moves": "\"follow\" is no rel: the backend's rel list is nofollow, sponsored and ugc.",
|
|
88
|
+
"recovery": "\"follow\" ⇔ no rel: the link and button controls show an unset rel as Do-follow and never write it."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "item-open-mode",
|
|
92
|
+
"plane": "schema",
|
|
93
|
+
"feature": "item openMode",
|
|
94
|
+
"key": "of[0].openMode",
|
|
95
|
+
"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.",
|
|
96
|
+
"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.",
|
|
97
|
+
"proof": "bettercms-v2-demo-himanshu/src/components/kit/lib/schema.ts:42-46 (itemOpenMode)",
|
|
98
|
+
"ruledBy": "bettercms-ff 2026-10-24 (G-REMAIN B1)"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "variant-group",
|
|
102
|
+
"plane": "schema",
|
|
103
|
+
"feature": "variants",
|
|
104
|
+
"key": "variants",
|
|
105
|
+
"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.",
|
|
106
|
+
"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.",
|
|
107
|
+
"proof": "kit-roundtrip.test.ts props lane: each member through componentSchemas.create, the group's v2 through variantGroupV2Schema, read back in the stored order",
|
|
108
|
+
"carriedBy": "variantFamilyFromTypeSchema",
|
|
109
|
+
"ruledBy": "bettercms-ff 2026-10-24 (3c); bettercms-72 2026-10-24 (planner in the kit)"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "fieldset-derived",
|
|
113
|
+
"plane": "schema",
|
|
114
|
+
"feature": "fieldset (derived)",
|
|
115
|
+
"key": "fieldset",
|
|
116
|
+
"moves": "A field naming a fieldset the schema does not declare sits in a section of that name: a model section (kind group) or a prop group, which the read side declares.",
|
|
117
|
+
"recovery": "The read declares the fieldset { name, title: name }, which is what V2's engine draws for an undeclared one.",
|
|
118
|
+
"proof": "bettercms-v2-demo-himanshu/src/components/kit/engine/field-list.tsx (arrange: an undeclared fieldset is a section titled by its name)",
|
|
119
|
+
"ruledBy": "bettercms-72 2026-10-24 (B3)"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"id": "item-noun-derived",
|
|
123
|
+
"plane": "schema",
|
|
124
|
+
"feature": "itemNoun (derived)",
|
|
125
|
+
"key": "itemNoun",
|
|
126
|
+
"moves": "A list with no itemNoun keeps its item title in ui.itemLabel, and the read names the noun from it.",
|
|
127
|
+
"recovery": "V2 itemNoun(list) falls back to the item title, the same noun the read side names.",
|
|
128
|
+
"proof": "bettercms-v2-demo-himanshu/src/components/kit/lib/schema.ts (itemNoun: the item title when the list declares none)",
|
|
129
|
+
"ruledBy": "bettercms-72 2026-10-24 (B3)"
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
var exclusions_v1_default = {
|
|
133
|
+
about,
|
|
134
|
+
version: 1,
|
|
135
|
+
exclusions,
|
|
136
|
+
equivalences
|
|
137
|
+
};
|
|
138
|
+
//#endregion
|
|
139
|
+
export { about, exclusions_v1_default as default, equivalences, exclusions };
|
|
140
|
+
|
|
141
|
+
//# 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 \"id\": \"top-level-layout-key\",\n \"plane\": \"schema\",\n \"feature\": \"reserved name\",\n \"pattern\": \"^/fields/\\\\d+/name \",\n \"key\": \"layout\",\n \"reason\": \"A model's top-level field named `layout` (rich-blog-post, journalStory) collides with the API's address prefix (KEY_RESERVED): the key is stored as `layoutField`. Below the top level `layout` and `page` are kept (019141ffc).\",\n \"signedBy\": \"owner 2026-10-24\"\n },\n {\n \"id\": \"block-shaped-model-layout-key\",\n \"plane\": \"schema\",\n \"feature\": \"reserved name\",\n \"pattern\": \"^/fields/\\\\d+/of/\\\\d+/fields/\\\\d+/name \",\n \"key\": \"layout\",\n \"reason\": \"A modular item type's own top-level field named `layout` (polymorphic-modules galleryModule), when the item type is a model whose v2.shape is \\\"block\\\" (a field no block primitive renders keeps it one): such a model can hold entries, so the key stays KEY_RESERVED (bc9ba34a3) and is stored as `layoutField`. On a kind \\\"block\\\" model it is kept.\",\n \"signedBy\": \"owner 2026-10-24\"\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 \"id\": \"fieldset-derived\",\n \"plane\": \"schema\",\n \"feature\": \"fieldset (derived)\",\n \"key\": \"fieldset\",\n \"moves\": \"A field naming a fieldset the schema does not declare sits in a section of that name: a model section (kind group) or a prop group, which the read side declares.\",\n \"recovery\": \"The read declares the fieldset { name, title: name }, which is what V2's engine draws for an undeclared one.\",\n \"proof\": \"bettercms-v2-demo-himanshu/src/components/kit/engine/field-list.tsx (arrange: an undeclared fieldset is a section titled by its name)\",\n \"ruledBy\": \"bettercms-72 2026-10-24 (B3)\"\n },\n {\n \"id\": \"item-noun-derived\",\n \"plane\": \"schema\",\n \"feature\": \"itemNoun (derived)\",\n \"key\": \"itemNoun\",\n \"moves\": \"A list with no itemNoun keeps its item title in ui.itemLabel, and the read names the noun from it.\",\n \"recovery\": \"V2 itemNoun(list) falls back to the item title, the same noun the read side names.\",\n \"proof\": \"bettercms-v2-demo-himanshu/src/components/kit/lib/schema.ts (itemNoun: the item title when the list declares none)\",\n \"ruledBy\": \"bettercms-72 2026-10-24 (B3)\"\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,KAAK,OA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