@shing.wong/sure-factor 0.5.10 → 0.6.0

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,41 @@
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
+ ## [0.6.0] - 2026-11-19
7
+
8
+ ### Added — catalog schema extension (document parts)
9
+
10
+ - `CatalogComponent` gains five optional keys for **report entries**: `family`
11
+ (`structure | data | figure`), `data` (`entity`, `projection`, `shape`),
12
+ `print` (`keepTogether`, `breakBefore`, `repeatHeader` and pass-through print
13
+ declarations), `guards` (strings) and `fixture` (synthetic `input`/`expect`).
14
+ These are data, not a second registry: the catalog stays a sure-factor
15
+ `CatalogComponent`, and sure-store hosts the document-part entries.
16
+ - `isDocumentPart`, `validateDocumentPart`, `assertValidDocumentPart`,
17
+ `generateReportModule` and `COMPONENT_FAMILIES` are exported from the package
18
+ root. `generateReportModule` emits the dependency-free report contract
19
+ (`CSS_CLASSES`, `REPORT`, `PROJECTION`, `GUARDS`, `STYLE_BLOCKS`) consumed by
20
+ sure-document's renderer; no markup or sure-ui styles are generated here.
21
+
22
+ ### Fixed — guard drift
23
+
24
+ - A guard that references a projection the entry never declared now **fails
25
+ loudly** at validation/generation time with an error naming the guard, the
26
+ unknown projection and the declared `data.projection`. `P:` parameters,
27
+ function names and computed namespaces such as `totals` are not mistaken for
28
+ projections. Guards without a `data.projection` are rejected too.
29
+
30
+ ### Notes
31
+
32
+ - **The class-coverage guard was not weakened.** A report entry is a document
33
+ part semantically, but the template generator still emits a `sure-form`
34
+ wrapper and a `btn-primary` submit for every component; report entries keep
35
+ declaring `form` and `buttons` in `sure_ui`.
36
+ - Deferred until sure-ui ships the `document` and `figure` blocks: validating
37
+ report entries' `sure_ui` against the installed `COMPONENTS`. `sure-ui`
38
+ 0.3.5 has neither block, so the registry test deliberately does not check
39
+ them (named `TODO(sure-ui-blocks)` in `src/registry.test.ts`).
40
+
6
41
  ## [0.5.3] - 2026-10-23
7
42
 
8
43
  ### 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,45 @@
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. The installed sure-ui does not yet
10
+ * publish the `document`/`figure` blocks those parts need, so the generated
11
+ * report module carries the contract (layout data, guards, classes) and leaves
12
+ * runtime rendering to sure-document. See the TODO in `generateReportModule`.
13
+ */
14
+ import type { CatalogComponent, ComponentFamily } from './types.js';
15
+ /** The closed set of document-part families. */
16
+ export declare const COMPONENT_FAMILIES: readonly ComponentFamily[];
17
+ /** True when an entry opts into the document-part extension. */
18
+ export declare function isDocumentPart(component: Partial<CatalogComponent>): boolean;
19
+ export interface DocumentPartIssue {
20
+ /** Short machine-readable reason. */
21
+ code: 'BAD_FAMILY' | 'BAD_SHAPE' | 'GUARD_WITHOUT_PROJECTION' | 'UNKNOWN_PROJECTION' | 'BAD_FIXTURE';
22
+ /** Human-readable, names the offending value. */
23
+ message: string;
24
+ }
25
+ /**
26
+ * Validate the document-part keys of a catalog entry. Returns all issues;
27
+ * an empty array means the entry is safe to generate from. Form entries (no
28
+ * extension keys) are always valid here — the existing template contract
29
+ * covers them.
30
+ */
31
+ export declare function validateDocumentPart(component: CatalogComponent): DocumentPartIssue[];
32
+ /** Throw with every issue joined — "fails loudly" for the generator/loader. */
33
+ export declare function assertValidDocumentPart(component: CatalogComponent): void;
34
+ /**
35
+ * Emit the report module for a document-part entry: the typed contract a
36
+ * sure-document `renderReport` consumes. No markup is generated here —
37
+ * rendering is sure-document's job and the classes are the only coupling.
38
+ *
39
+ * The generated `STYLE_BLOCKS` is intentionally the catalog's `sure_ui` list.
40
+ * TODO(sure-ui): once the `document` and `figure` blocks are published, add a
41
+ * check that every report entry's `sure_ui` names a shipped block (the registry
42
+ * test cannot do that against the installed sure-ui, which has neither block).
43
+ */
44
+ export declare function generateReportModule(component: CatalogComponent): string;
45
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EAChB,MAAM,YAAY,CAAA;AAEnB,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAA6C,CAAA;AActG,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;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,CAiCxE"}
@@ -0,0 +1,153 @@
1
+ /** The closed set of document-part families. */
2
+ export const COMPONENT_FAMILIES = ['structure', 'data', 'figure'];
3
+ const DATA_SHAPES = ['record', 'rows', 'series', 'none', 'derived'];
4
+ /** Bindings whose dotted leaves are projection names (e.g. `rows.amount`). */
5
+ const ROW_BINDINGS = new Set(['rows', 'row', 'record', 'data', 'series', 'item', 'fields', 'input']);
6
+ /** Words that are operators, builtins or computed namespaces, not projections. */
7
+ const NON_PROJECTIONS = new Set([
8
+ 'true', 'false', 'null', 'undefined', 'and', 'or', 'not', 'in',
9
+ 'sum', 'sub', 'ifpresent', 'min', 'max', 'count', 'abs', 'round', 'len',
10
+ 'totals', 'F', 'P',
11
+ ]);
12
+ /** True when an entry opts into the document-part extension. */
13
+ export function isDocumentPart(component) {
14
+ return component.family !== undefined
15
+ || component.data !== undefined
16
+ || component.print !== undefined
17
+ || component.guards !== undefined
18
+ || component.fixture !== undefined;
19
+ }
20
+ /**
21
+ * Extract every projection name a guard expression references.
22
+ *
23
+ * Three reference forms are understood (the closed vocabulary of
24
+ * sure-document `design §5`, plus the dotted form used in `docs/catalog.md`):
25
+ *
26
+ * - `F:name` — field of the current row (design §5)
27
+ * - `rows.name` — dotted access under a row binding, incl. `record`,
28
+ * `data`, `series`
29
+ * - `name` — a bare identifier used as a value
30
+ *
31
+ * `P:name` names a parameter, not a projection, and is ignored; so are
32
+ * function names, keywords and computed namespaces such as `totals`. This is
33
+ * a scanner, not an evaluator — no dynamic code execution of guard strings.
34
+ */
35
+ function projectionRefs(expr) {
36
+ const refs = new Set();
37
+ for (const m of expr.matchAll(/\bF:([A-Za-z_]\w*)/g))
38
+ refs.add(m[1]);
39
+ const params = [...expr.matchAll(/\bP:([A-Za-z_]\w*)/g)].map((m) => m[1]);
40
+ for (const m of expr.matchAll(/\b([A-Za-z_]\w*)\.([A-Za-z_]\w*)/g)) {
41
+ if (ROW_BINDINGS.has(m[1]))
42
+ refs.add(m[2]);
43
+ }
44
+ for (const m of expr.matchAll(/\b([A-Za-z_]\w*)\b(?!\s*\()/g)) {
45
+ const id = m[1];
46
+ if (NON_PROJECTIONS.has(id) || params.includes(id))
47
+ continue;
48
+ // A dotted leaf was already captured above; a dotted *root* is a binding.
49
+ if (new RegExp(`\\.${id}\\b`).test(expr))
50
+ continue;
51
+ if (new RegExp(`\\b${id}\\s*\\.`).test(expr))
52
+ continue;
53
+ refs.add(id);
54
+ }
55
+ return [...refs];
56
+ }
57
+ /**
58
+ * Validate the document-part keys of a catalog entry. Returns all issues;
59
+ * an empty array means the entry is safe to generate from. Form entries (no
60
+ * extension keys) are always valid here — the existing template contract
61
+ * covers them.
62
+ */
63
+ export function validateDocumentPart(component) {
64
+ if (!isDocumentPart(component))
65
+ return [];
66
+ const issues = [];
67
+ const label = component.name || 'unnamed component';
68
+ if (component.family !== undefined && !COMPONENT_FAMILIES.includes(component.family)) {
69
+ issues.push({
70
+ code: 'BAD_FAMILY',
71
+ message: `${label}: family "${component.family}" is not one of ${COMPONENT_FAMILIES.join(', ')}`,
72
+ });
73
+ }
74
+ if (component.data?.shape !== undefined && !DATA_SHAPES.includes(component.data.shape)) {
75
+ issues.push({
76
+ code: 'BAD_SHAPE',
77
+ message: `${label}: data.shape "${component.data.shape}" is not one of ${DATA_SHAPES.join(', ')}`,
78
+ });
79
+ }
80
+ if (component.fixture !== undefined
81
+ && (typeof component.fixture !== 'object' || component.fixture === null || Array.isArray(component.fixture))) {
82
+ issues.push({ code: 'BAD_FIXTURE', message: `${label}: fixture must be a mapping` });
83
+ }
84
+ const guards = component.guards ?? [];
85
+ const projection = component.data?.projection ?? [];
86
+ if (guards.length > 0 && projection.length === 0) {
87
+ issues.push({
88
+ code: 'GUARD_WITHOUT_PROJECTION',
89
+ message: `${label}: declares guards but no data.projection to check them against`,
90
+ });
91
+ }
92
+ for (const guard of guards) {
93
+ for (const ref of projectionRefs(guard)) {
94
+ if (!projection.includes(ref)) {
95
+ issues.push({
96
+ code: 'UNKNOWN_PROJECTION',
97
+ message: `${label}: guard "${guard}" references projection "${ref}" which is not declared in data.projection [${projection.join(', ')}]`,
98
+ });
99
+ }
100
+ }
101
+ }
102
+ return issues;
103
+ }
104
+ /** Throw with every issue joined — "fails loudly" for the generator/loader. */
105
+ export function assertValidDocumentPart(component) {
106
+ const issues = validateDocumentPart(component);
107
+ if (issues.length > 0) {
108
+ throw new Error(`Invalid document part: ${issues.map((i) => i.message).join('; ')}`);
109
+ }
110
+ }
111
+ /**
112
+ * Emit the report module for a document-part entry: the typed contract a
113
+ * sure-document `renderReport` consumes. No markup is generated here —
114
+ * rendering is sure-document's job and the classes are the only coupling.
115
+ *
116
+ * The generated `STYLE_BLOCKS` is intentionally the catalog's `sure_ui` list.
117
+ * TODO(sure-ui): once the `document` and `figure` blocks are published, add a
118
+ * check that every report entry's `sure_ui` names a shipped block (the registry
119
+ * test cannot do that against the installed sure-ui, which has neither block).
120
+ */
121
+ export function generateReportModule(component) {
122
+ assertValidDocumentPart(component);
123
+ if (!isDocumentPart(component)) {
124
+ throw new Error(`${component.name}: not a document part — no extension keys declared`);
125
+ }
126
+ const report = {
127
+ family: component.family ?? null,
128
+ data: component.data ?? null,
129
+ print: component.print ?? null,
130
+ guards: component.guards ?? [],
131
+ fixture: component.fixture ?? null,
132
+ };
133
+ return `// Generated by sure-factor from catalog/${component.name}.yaml — do not edit.
134
+ // Report part (family: ${component.family ?? 'unspecified'}). The markup is
135
+ // composed by sure-document; this module is its layout/data contract.
136
+
137
+ /** Class names from the catalog entry — the only coupling to the markup. */
138
+ export const CSS_CLASSES = ${JSON.stringify(component.cssClasses ?? {}, null, 2)} as const
139
+
140
+ /** Declared data shape and print/guard/fixture contract. */
141
+ export const REPORT = ${JSON.stringify(report, null, 2)} as const
142
+
143
+ /** Projections a guard is allowed to name. */
144
+ export const PROJECTION = ${JSON.stringify(component.data?.projection ?? [], null, 2)} as const
145
+
146
+ /** Guards to evaluate against the rendered figures at verify time. */
147
+ export const GUARDS = ${JSON.stringify(component.guards ?? [], null, 2)} as const
148
+
149
+ /** sure-ui blocks the markup needs styled. */
150
+ export const STYLE_BLOCKS = ${JSON.stringify(component.sure_ui ?? [], null, 2)} as const
151
+ `;
152
+ }
153
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAmBA,gDAAgD;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAA+B,CA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IAAI,IAAI;KACnC,CAAA;IAED,OAAO,4CAA4C,SAAS,CAAC,IAAI;0BACzC,SAAS,CAAC,MAAM,IAAI,aAAa;;;;6BAI9B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;;;wBAGxD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;;;4BAG3B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;;;wBAG7D,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;;;8BAGzC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;CAC7E,CAAA;AACD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -12,4 +12,6 @@ export { toYaml, toJson, fromJson, toMarkdown, toXml, fromXml, convert } from '.
12
12
  export { formatCode, 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, 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,CAA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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, 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,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAGpG,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,gBAAgB,EAAwB,MAAM,YAAY,CAAA;AAE7G,OAAO,EAAE,eAAe,EAA6C,MAAM,eAAe,CAAA;AAC1F,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAIlB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,aAAa,EAA8E,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;AAEhF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,E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ponent {
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,MA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pB,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B;AAED,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE7D,sDAAsD;AACtD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAA;AAElF;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,CAAC,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.0",
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": {