@shing.wong/sure-factor 0.5.10 → 0.6.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/CHANGELOG.md CHANGED
@@ -3,6 +3,54 @@
3
3
  All notable changes to this package are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
+ ## [Unreleased]
7
+
8
+ ### Changed
9
+
10
+ - Bumped `@shing.wong/sure-ui` to `^0.3.6` (publishes the `document` and
11
+ `figure` blocks) and refreshed `package-lock.json`.
12
+ - Enabled the document-part `sure_ui` block check. `unpublishedBlocks` (exported
13
+ from the package root) validates every report entry's declared blocks against
14
+ the installed sure-ui `COMPONENTS`, so `document`/`figure` now pass and an
15
+ unpublished block fails loudly instead of being deferred. This completes the
16
+ follow-up to the 0.6.0 catalog schema extension. The `form` + `buttons`
17
+ template class-coverage guard is unchanged.
18
+
19
+ ## [0.6.0] - 2026-11-19
20
+
21
+ ### Added — catalog schema extension (document parts)
22
+
23
+ - `CatalogComponent` gains five optional keys for **report entries**: `family`
24
+ (`structure | data | figure`), `data` (`entity`, `projection`, `shape`),
25
+ `print` (`keepTogether`, `breakBefore`, `repeatHeader` and pass-through print
26
+ declarations), `guards` (strings) and `fixture` (synthetic `input`/`expect`).
27
+ These are data, not a second registry: the catalog stays a sure-factor
28
+ `CatalogComponent`, and sure-store hosts the document-part entries.
29
+ - `isDocumentPart`, `validateDocumentPart`, `assertValidDocumentPart`,
30
+ `generateReportModule` and `COMPONENT_FAMILIES` are exported from the package
31
+ root. `generateReportModule` emits the dependency-free report contract
32
+ (`CSS_CLASSES`, `REPORT`, `PROJECTION`, `GUARDS`, `STYLE_BLOCKS`) consumed by
33
+ sure-document's renderer; no markup or sure-ui styles are generated here.
34
+
35
+ ### Fixed — guard drift
36
+
37
+ - A guard that references a projection the entry never declared now **fails
38
+ loudly** at validation/generation time with an error naming the guard, the
39
+ unknown projection and the declared `data.projection`. `P:` parameters,
40
+ function names and computed namespaces such as `totals` are not mistaken for
41
+ projections. Guards without a `data.projection` are rejected too.
42
+
43
+ ### Notes
44
+
45
+ - **The class-coverage guard was not weakened.** A report entry is a document
46
+ part semantically, but the template generator still emits a `sure-form`
47
+ wrapper and a `btn-primary` submit for every component; report entries keep
48
+ declaring `form` and `buttons` in `sure_ui`.
49
+ - Deferred until sure-ui ships the `document` and `figure` blocks: validating
50
+ report entries' `sure_ui` against the installed `COMPONENTS`. `sure-ui`
51
+ 0.3.5 has neither block, so the registry test deliberately does not check
52
+ them (named `TODO(sure-ui-blocks)` in `src/registry.test.ts`).
53
+
6
54
  ## [0.5.3] - 2026-10-23
7
55
 
8
56
  ### Fixed
package/README.md CHANGED
@@ -223,6 +223,44 @@ security:
223
223
  | `crud-resource` | Full CRUD with table + modal | inline, toast, statusBar, sidePanel | `.sure-crud__*` |
224
224
  | `search-filter` | Search with filter controls | inline, toast | `.sure-search__*` |
225
225
 
226
+ ### Document parts (report entries)
227
+
228
+ A catalog entry may describe a **document part** instead of a form. Five optional
229
+ keys extend `CatalogComponent` for this; they are data, not a second registry
230
+ (the entries themselves live in `sure-store/components/`):
231
+
232
+ | Key | Shape | Purpose |
233
+ |-----|-------|---------|
234
+ | `family` | `structure \| data \| figure` | which part of a document this is |
235
+ | `data` | `{ entity?, projection?, shape? }` | store name, the closed set of column names, and shape (`record \| rows \| series \| none \| derived`) |
236
+ | `print` | `{ keepTogether?, breakBefore?, repeatHeader?, … }` | the three checked booleans; other print declarations pass through to sure-document |
237
+ | `guards` | `string[]` | expressions to verify at render time |
238
+ | `fixture` | `{ input?, expect? }` | seeded, synthetic input and the facts its output must hold |
239
+
240
+ ```ts
241
+ import {
242
+ isDocumentPart, validateDocumentPart, generateReportModule,
243
+ } from '@shing.wong/sure-factor'
244
+
245
+ const issues = validateDocumentPart(component) // [] when safe to generate from
246
+ if (isDocumentPart(component)) {
247
+ const source = generateReportModule(component) // report contract module
248
+ }
249
+ ```
250
+
251
+ A guard may name a projection as `F:name`, as `rows.name` (or `record.name`,
252
+ `data.name`, `series.name`), or as a bare identifier. `P:name` names a
253
+ parameter, and function names and computed namespaces such as `totals` are not
254
+ projections. **A guard that references an undeclared projection fails loudly**,
255
+ naming the guard and the missing name.
256
+
257
+ A report entry is a document part semantically, **not** a form — but the
258
+ template generator still emits a form wrapper and a submit button for every
259
+ component. Report entries therefore keep declaring `form` and `buttons` in
260
+ `sure_ui`; the registry test enforces this and the guard was not weakened.
261
+ Styling the new `document` and `figure` blocks is deferred until sure-ui
262
+ publishes them (the installed version has neither).
263
+
226
264
  ## Tiers
227
265
 
228
266
  Generation progresses through three quality tiers — same schema, different output depth:
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Catalog schema extension — document parts (0.6).
3
+ *
4
+ * A catalog entry may describe a document part (a report) instead of a form.
5
+ * The five extension keys (`family`, `data`, `print`, `guards`, `fixture`) are
6
+ * pure data: this module only checks their shape and, critically, checks that
7
+ * a guard does not reference a projection the entry never declared.
8
+ *
9
+ * No sure-ui styles are composed here. Report parts declare the `document`
10
+ * and `figure` blocks, which sure-ui publishes from 0.3.6; the registry test
11
+ * checks those declarations against the installed `COMPONENTS` via
12
+ * `unpublishedBlocks`. The generated report module carries the contract
13
+ * (layout data, guards, classes) and leaves runtime rendering to sure-document.
14
+ */
15
+ import type { CatalogComponent, ComponentFamily } from './types.js';
16
+ /** The closed set of document-part families. */
17
+ export declare const COMPONENT_FAMILIES: readonly ComponentFamily[];
18
+ /**
19
+ * Declared `sure_ui` blocks that the installed sure-ui does not publish.
20
+ *
21
+ * `knownBlocks` is supplied by the caller — normally sure-ui's `COMPONENTS`
22
+ * export — so this module stays dependency-free and never evaluates strings:
23
+ * it is a plain membership test over the closed `sure_ui` declaration. An empty
24
+ * result means every declared block has shipped styles; a non-empty result
25
+ * names each offending component (`name: block`) so the registry test fails
26
+ * loudly. No dynamic code execution of the declarations is involved.
27
+ */
28
+ export declare function unpublishedBlocks(component: Pick<CatalogComponent, 'name' | 'sure_ui'>, knownBlocks: ReadonlySet<string>): string[];
29
+ /** True when an entry opts into the document-part extension. */
30
+ export declare function isDocumentPart(component: Partial<CatalogComponent>): boolean;
31
+ export interface DocumentPartIssue {
32
+ /** Short machine-readable reason. */
33
+ code: 'BAD_FAMILY' | 'BAD_SHAPE' | 'GUARD_WITHOUT_PROJECTION' | 'UNKNOWN_PROJECTION' | 'BAD_FIXTURE';
34
+ /** Human-readable, names the offending value. */
35
+ message: string;
36
+ }
37
+ /**
38
+ * Validate the document-part keys of a catalog entry. Returns all issues;
39
+ * an empty array means the entry is safe to generate from. Form entries (no
40
+ * extension keys) are always valid here — the existing template contract
41
+ * covers them.
42
+ */
43
+ export declare function validateDocumentPart(component: CatalogComponent): DocumentPartIssue[];
44
+ /** Throw with every issue joined — "fails loudly" for the generator/loader. */
45
+ export declare function assertValidDocumentPart(component: CatalogComponent): void;
46
+ /**
47
+ * Emit the report module for a document-part entry: the typed contract a
48
+ * sure-document `renderReport` consumes. No markup is generated here —
49
+ * rendering is sure-document's job and the classes are the only coupling.
50
+ *
51
+ * The generated `STYLE_BLOCKS` is intentionally the catalog's `sure_ui` list.
52
+ * Every declared block is checked against the installed sure-ui `COMPONENTS`
53
+ * by the registry test (`unpublishedBlocks`), so a document part cannot name a
54
+ * block with no shipped styles — `document` and `figure` are published as of
55
+ * sure-ui 0.3.6.
56
+ */
57
+ export declare function generateReportModule(component: CatalogComponent): string;
58
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EAChB,MAAM,YAAY,CAAA;AAEnB,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAA6C,CAAA;AAEtG;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC,EACrD,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,MAAM,EAAE,CAKV;AAcD,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAM5E;AAwCD,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,0BAA0B,GAAG,oBAAoB,GAAG,aAAa,CAAA;IACpG,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,iBAAiB,EAAE,CA4CrF;AAED,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAKzE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAiCxE"}
@@ -0,0 +1,170 @@
1
+ /** The closed set of document-part families. */
2
+ export const COMPONENT_FAMILIES = ['structure', 'data', 'figure'];
3
+ /**
4
+ * Declared `sure_ui` blocks that the installed sure-ui does not publish.
5
+ *
6
+ * `knownBlocks` is supplied by the caller — normally sure-ui's `COMPONENTS`
7
+ * export — so this module stays dependency-free and never evaluates strings:
8
+ * it is a plain membership test over the closed `sure_ui` declaration. An empty
9
+ * result means every declared block has shipped styles; a non-empty result
10
+ * names each offending component (`name: block`) so the registry test fails
11
+ * loudly. No dynamic code execution of the declarations is involved.
12
+ */
13
+ export function unpublishedBlocks(component, knownBlocks) {
14
+ const label = component.name || 'unnamed component';
15
+ return (component.sure_ui ?? [])
16
+ .filter((block) => !knownBlocks.has(block))
17
+ .map((block) => `${label}: ${block}`);
18
+ }
19
+ const DATA_SHAPES = ['record', 'rows', 'series', 'none', 'derived'];
20
+ /** Bindings whose dotted leaves are projection names (e.g. `rows.amount`). */
21
+ const ROW_BINDINGS = new Set(['rows', 'row', 'record', 'data', 'series', 'item', 'fields', 'input']);
22
+ /** Words that are operators, builtins or computed namespaces, not projections. */
23
+ const NON_PROJECTIONS = new Set([
24
+ 'true', 'false', 'null', 'undefined', 'and', 'or', 'not', 'in',
25
+ 'sum', 'sub', 'ifpresent', 'min', 'max', 'count', 'abs', 'round', 'len',
26
+ 'totals', 'F', 'P',
27
+ ]);
28
+ /** True when an entry opts into the document-part extension. */
29
+ export function isDocumentPart(component) {
30
+ return component.family !== undefined
31
+ || component.data !== undefined
32
+ || component.print !== undefined
33
+ || component.guards !== undefined
34
+ || component.fixture !== undefined;
35
+ }
36
+ /**
37
+ * Extract every projection name a guard expression references.
38
+ *
39
+ * Three reference forms are understood (the closed vocabulary of
40
+ * sure-document `design §5`, plus the dotted form used in `docs/catalog.md`):
41
+ *
42
+ * - `F:name` — field of the current row (design §5)
43
+ * - `rows.name` — dotted access under a row binding, incl. `record`,
44
+ * `data`, `series`
45
+ * - `name` — a bare identifier used as a value
46
+ *
47
+ * `P:name` names a parameter, not a projection, and is ignored; so are
48
+ * function names, keywords and computed namespaces such as `totals`. This is
49
+ * a scanner, not an evaluator — no dynamic code execution of guard strings.
50
+ */
51
+ function projectionRefs(expr) {
52
+ const refs = new Set();
53
+ for (const m of expr.matchAll(/\bF:([A-Za-z_]\w*)/g))
54
+ refs.add(m[1]);
55
+ const params = [...expr.matchAll(/\bP:([A-Za-z_]\w*)/g)].map((m) => m[1]);
56
+ for (const m of expr.matchAll(/\b([A-Za-z_]\w*)\.([A-Za-z_]\w*)/g)) {
57
+ if (ROW_BINDINGS.has(m[1]))
58
+ refs.add(m[2]);
59
+ }
60
+ for (const m of expr.matchAll(/\b([A-Za-z_]\w*)\b(?!\s*\()/g)) {
61
+ const id = m[1];
62
+ if (NON_PROJECTIONS.has(id) || params.includes(id))
63
+ continue;
64
+ // A dotted leaf was already captured above; a dotted *root* is a binding.
65
+ if (new RegExp(`\\.${id}\\b`).test(expr))
66
+ continue;
67
+ if (new RegExp(`\\b${id}\\s*\\.`).test(expr))
68
+ continue;
69
+ refs.add(id);
70
+ }
71
+ return [...refs];
72
+ }
73
+ /**
74
+ * Validate the document-part keys of a catalog entry. Returns all issues;
75
+ * an empty array means the entry is safe to generate from. Form entries (no
76
+ * extension keys) are always valid here — the existing template contract
77
+ * covers them.
78
+ */
79
+ export function validateDocumentPart(component) {
80
+ if (!isDocumentPart(component))
81
+ return [];
82
+ const issues = [];
83
+ const label = component.name || 'unnamed component';
84
+ if (component.family !== undefined && !COMPONENT_FAMILIES.includes(component.family)) {
85
+ issues.push({
86
+ code: 'BAD_FAMILY',
87
+ message: `${label}: family "${component.family}" is not one of ${COMPONENT_FAMILIES.join(', ')}`,
88
+ });
89
+ }
90
+ if (component.data?.shape !== undefined && !DATA_SHAPES.includes(component.data.shape)) {
91
+ issues.push({
92
+ code: 'BAD_SHAPE',
93
+ message: `${label}: data.shape "${component.data.shape}" is not one of ${DATA_SHAPES.join(', ')}`,
94
+ });
95
+ }
96
+ if (component.fixture !== undefined
97
+ && (typeof component.fixture !== 'object' || component.fixture === null || Array.isArray(component.fixture))) {
98
+ issues.push({ code: 'BAD_FIXTURE', message: `${label}: fixture must be a mapping` });
99
+ }
100
+ const guards = component.guards ?? [];
101
+ const projection = component.data?.projection ?? [];
102
+ if (guards.length > 0 && projection.length === 0) {
103
+ issues.push({
104
+ code: 'GUARD_WITHOUT_PROJECTION',
105
+ message: `${label}: declares guards but no data.projection to check them against`,
106
+ });
107
+ }
108
+ for (const guard of guards) {
109
+ for (const ref of projectionRefs(guard)) {
110
+ if (!projection.includes(ref)) {
111
+ issues.push({
112
+ code: 'UNKNOWN_PROJECTION',
113
+ message: `${label}: guard "${guard}" references projection "${ref}" which is not declared in data.projection [${projection.join(', ')}]`,
114
+ });
115
+ }
116
+ }
117
+ }
118
+ return issues;
119
+ }
120
+ /** Throw with every issue joined — "fails loudly" for the generator/loader. */
121
+ export function assertValidDocumentPart(component) {
122
+ const issues = validateDocumentPart(component);
123
+ if (issues.length > 0) {
124
+ throw new Error(`Invalid document part: ${issues.map((i) => i.message).join('; ')}`);
125
+ }
126
+ }
127
+ /**
128
+ * Emit the report module for a document-part entry: the typed contract a
129
+ * sure-document `renderReport` consumes. No markup is generated here —
130
+ * rendering is sure-document's job and the classes are the only coupling.
131
+ *
132
+ * The generated `STYLE_BLOCKS` is intentionally the catalog's `sure_ui` list.
133
+ * Every declared block is checked against the installed sure-ui `COMPONENTS`
134
+ * by the registry test (`unpublishedBlocks`), so a document part cannot name a
135
+ * block with no shipped styles — `document` and `figure` are published as of
136
+ * sure-ui 0.3.6.
137
+ */
138
+ export function generateReportModule(component) {
139
+ assertValidDocumentPart(component);
140
+ if (!isDocumentPart(component)) {
141
+ throw new Error(`${component.name}: not a document part — no extension keys declared`);
142
+ }
143
+ const report = {
144
+ family: component.family ?? null,
145
+ data: component.data ?? null,
146
+ print: component.print ?? null,
147
+ guards: component.guards ?? [],
148
+ fixture: component.fixture ?? null,
149
+ };
150
+ return `// Generated by sure-factor from catalog/${component.name}.yaml — do not edit.
151
+ // Report part (family: ${component.family ?? 'unspecified'}). The markup is
152
+ // composed by sure-document; this module is its layout/data contract.
153
+
154
+ /** Class names from the catalog entry — the only coupling to the markup. */
155
+ export const CSS_CLASSES = ${JSON.stringify(component.cssClasses ?? {}, null, 2)} as const
156
+
157
+ /** Declared data shape and print/guard/fixture contract. */
158
+ export const REPORT = ${JSON.stringify(report, null, 2)} as const
159
+
160
+ /** Projections a guard is allowed to name. */
161
+ export const PROJECTION = ${JSON.stringify(component.data?.projection ?? [], null, 2)} as const
162
+
163
+ /** Guards to evaluate against the rendered figures at verify time. */
164
+ export const GUARDS = ${JSON.stringify(component.guards ?? [], null, 2)} as const
165
+
166
+ /** sure-ui blocks the markup needs styled. */
167
+ export const STYLE_BLOCKS = ${JSON.stringify(component.sure_ui ?? [], null, 2)} as const
168
+ `;
169
+ }
170
+ //# sourceMappingURL=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ode, formatGeneratedOutput, formatGeneratedStoreOutput } from './format.js';
13
13
  export type { FormattedOutput, FormattedStoreOutput } from './format.js';
14
14
  export type { CatalogType, CatalogComponent, CatalogAsset } from './types.js';
15
+ export type { ComponentFamily, ComponentDataShape, ComponentData, ComponentPrint, ComponentFixture, } from './types.js';
16
+ export { COMPONENT_FAMILIES, unpublishedBlocks, isDocumentPart, validateDocumentPart, assertValidDocumentPart, generateReportModule, type DocumentPartIssue, } from './catalog.js';
15
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACpG,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAExE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAA;AAE7G,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC/H,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAChF,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1E,OAAO,EAAE,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AAM,aAAa,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC9F,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC3F,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACxE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC7E,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -17,4 +17,5 @@ export { renderFooter, escapeHtml, safeHref, FOOTER_CLASSES } from './footer.js'
17
17
  export { renderMarkdown } from './markdown.js';
18
18
  export { toYaml, toJson, fromJson, toMarkdown, toXml, fromXml, convert } from './serialize.js';
19
19
  export { formatCode, formatGeneratedOutput, formatGeneratedStoreOutput } from './format.js';
20
+ export { COMPONENT_FAMILIES, unpublishedBlocks, isDocumentPart, validateDocumentPart, assertValidDocumentPart, generateReportModule, } from './catalog.js';
20
21
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,gBAAgB;AAChB,2EAA2E;AAC3E,0EAA0E;AAC1E,4EAA4E;AAC5E,4EAA4E;AAC5E,EAAE;AACF,aAAa;AACb,OAAO,EAAE,gBAAgB,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BAAqB,CAAA;AAC/H,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAC9F,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAU3F,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,cAAc,CAAA"}
package/dist/types.d.ts CHANGED
@@ -82,6 +82,42 @@ export interface CatalogComponent {
82
82
  * the blocks shipped to style it.
83
83
  */
84
84
  sure_ui?: string[];
85
+ family?: ComponentFamily;
86
+ data?: ComponentData;
87
+ print?: ComponentPrint;
88
+ guards?: string[];
89
+ fixture?: ComponentFixture;
90
+ }
91
+ /** Document-part families — see sure-document `docs/catalog.md §3`. */
92
+ export type ComponentFamily = 'structure' | 'data' | 'figure';
93
+ /** The shape of the rows a document part consumes. */
94
+ export type ComponentDataShape = 'record' | 'rows' | 'series' | 'none' | 'derived';
95
+ /**
96
+ * Where a document part gets its data from. `projection` is the closed set of
97
+ * column names a guard may reference; a guard that names anything else fails
98
+ * validation (`src/catalog.ts`). The catalog owns no query logic — the store
99
+ * name and projection are declarations the host resolves.
100
+ */
101
+ export interface ComponentData {
102
+ entity?: string;
103
+ projection?: string[];
104
+ shape?: ComponentDataShape;
105
+ }
106
+ /**
107
+ * Print declarations for a document part. The three booleans are the ones
108
+ * sure-factor validates; the rest are passed through to sure-document as data
109
+ * (paper, margins, binding, scale, …), never interpreted here.
110
+ */
111
+ export interface ComponentPrint {
112
+ keepTogether?: boolean;
113
+ breakBefore?: boolean;
114
+ repeatHeader?: boolean;
115
+ [key: string]: unknown;
116
+ }
117
+ /** A seeded, synthetic example: input rows plus the facts the output must hold. */
118
+ export interface ComponentFixture {
119
+ input?: Record<string, unknown>;
120
+ expect?: Record<string, unknown>;
85
121
  }
86
122
  export interface CatalogAsset {
87
123
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;IAChE,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CA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GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;CACb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shing.wong/sure-factor",
3
- "version": "0.5.10",
3
+ "version": "0.6.1",
4
4
  "description": "Database schema to production-grade UI — type catalog, validation, sanitization, i18n, audio, and tiered code generation.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -84,7 +84,7 @@
84
84
  "database-schema"
85
85
  ],
86
86
  "dependencies": {
87
- "@shing.wong/sure-ui": "^0.3.5",
87
+ "@shing.wong/sure-ui": "^0.3.6",
88
88
  "pg": "^8.23.0",
89
89
  "prettier": "^3.9.6"
90
90
  },