@texuli/spec 0.8.0 → 0.10.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/README.md +42 -11
- package/dist/build.d.ts +5 -0
- package/dist/build.js +1 -0
- package/dist/codegen/kotlin-tokens.d.ts +38 -0
- package/dist/codegen/kotlin-tokens.js +138 -0
- package/dist/codegen/kotlin.d.ts +3 -1
- package/dist/codegen/kotlin.js +5 -2
- package/dist/design-system/index.d.ts +11 -0
- package/dist/design-system/index.js +10 -0
- package/dist/design-system/schema.d.ts +3 -0
- package/dist/design-system/schema.js +164 -0
- package/dist/design-system/validate.d.ts +69 -0
- package/dist/design-system/validate.js +273 -0
- package/dist/design-system/vocabulary.d.ts +70 -0
- package/dist/design-system/vocabulary.js +351 -0
- package/dist/format.js +10 -1
- package/dist/generated/typescript/blueprint.d.ts +69 -12
- package/dist/generated/typescript/blueprint.js +1 -1
- package/dist/generated/typescript/catalog-schema.js +1 -1
- package/dist/generated/typescript/design-system.d.ts +1110 -0
- package/dist/generated/typescript/design-system.js +3 -0
- package/dist/generated/typescript/diagnostics.js +1 -1
- package/dist/generated/typescript/manifest.js +1 -1
- package/dist/generated/typescript/vocabulary.d.ts +15 -1
- package/dist/generated/typescript/vocabulary.js +2 -2
- package/dist/generated/typescript/workflow.js +1 -1
- package/dist/migrations/0.8.0-0.9.0.d.ts +8 -0
- package/dist/migrations/0.8.0-0.9.0.js +11 -0
- package/dist/migrations/0.9.0-0.10.0.d.ts +10 -0
- package/dist/migrations/0.9.0-0.10.0.js +13 -0
- package/dist/migrations/index.js +4 -0
- package/dist/validate.js +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated by @texuli/spec from schemas/diagnostics.schema.json. Do not edit: run the spec generator.
|
|
2
|
-
// Spec 0.
|
|
2
|
+
// Spec 0.10.0, digest afcb9e3ed6b74b833a0f7477a657168621785ee98602ff582aa047e2d86aef17
|
|
3
3
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated by @texuli/spec from schemas/manifest.schema.json. Do not edit: run the spec generator.
|
|
2
|
-
// Spec 0.
|
|
2
|
+
// Spec 0.10.0, digest afcb9e3ed6b74b833a0f7477a657168621785ee98602ff582aa047e2d86aef17
|
|
3
3
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The built catalog this vocabulary was projected from. */
|
|
2
|
-
export declare const SPEC_CATALOG_HASH = "
|
|
2
|
+
export declare const SPEC_CATALOG_HASH = "1372c1dde6017747a7fd62bf309b2c30484effeae209585b46c97506b0a8842c";
|
|
3
3
|
/** Every closed component id, sorted. */
|
|
4
4
|
export declare const SPEC_COMPONENT_IDS: readonly ["action-form", "alert", "alert-dialog", "analytics-grid", "app-nav", "badge", "banner", "blocks-code", "blocks-data", "blocks-diagram", "blocks-embed", "blocks-interactive", "blocks-map", "blocks-media", "blocks-structure", "blocks-text", "breadcrumb", "button", "button-group", "callout", "canvas", "card", "charts-area", "charts-bar", "charts-bubble", "charts-bullet", "charts-canvas-renderer", "charts-cartesian", "charts-combo", "charts-donut", "charts-funnel", "charts-gauge", "charts-geo-map", "charts-geo-point-map", "charts-heatmap", "charts-line", "charts-network", "charts-pie", "charts-progress-ring", "charts-sankey", "charts-scatter", "charts-sparkline", "charts-stacked-bar", "charts-sunburst", "charts-treemap", "chat-message", "chat-thread", "checkbox", "chip", "code", "combobox", "command-palette", "content-layout", "context-menu", "context-menu-trigger", "control-choice", "control-filter", "control-slider", "control-toggle", "data-board", "data-calendar", "data-cohort-table", "data-dashboard", "data-dashboard-widget", "data-files", "data-filter-builder", "data-grid", "data-map", "data-notification-inbox", "data-timeline", "data-tree-view", "deck-slide", "description", "detail-panel", "dialog", "document", "drawer", "dropdown-menu", "dropdown-menu-content", "dropdown-menu-item", "dropdown-menu-trigger", "empty-state", "error-state", "field", "field-error", "flow-action", "flow-view", "form", "form-field", "form-submit", "host-region", "hover-card", "hover-card-content", "icon-button", "inline-text", "input", "input-group", "kbd", "kpi", "label", "layout-auth-split", "layout-blog", "layout-card", "layout-chrome", "layout-dashboard-grid", "layout-deck", "layout-doc", "layout-docs", "layout-drawer", "layout-dual-sidebar", "layout-editorial", "layout-grid", "layout-host", "layout-landing", "layout-marketing", "layout-page", "layout-pricing", "layout-row", "layout-settings", "layout-sidebar", "layout-split", "layout-stack", "layout-tile", "layout-top-nav", "layout-wizard", "media-composition-canvas", "media-composition-svg", "media-image", "menubar", "menubar-trigger", "multi-select", "nav-icon", "navigation-menu", "pagination", "popover", "popover-content", "radio", "radio-group", "responsive-modal", "schema-form", "screen-outlet", "select", "select-content", "select-group", "select-item", "select-label", "select-portal", "select-separator", "select-trigger", "select-value", "select-viewport", "sheet", "sidebar", "sortable-list", "split-view", "spreadsheet", "stat", "stepper", "switch", "table", "tag", "text-counter", "textarea", "time-field", "timeline", "toaster", "tooltip", "workflow-graph"];
|
|
5
5
|
export type SpecComponentId = (typeof SPEC_COMPONENT_IDS)[number];
|
|
@@ -154,20 +154,24 @@ export interface SpecComponentProps {
|
|
|
154
154
|
description: string;
|
|
155
155
|
fullDomain?: string;
|
|
156
156
|
interactive?: string;
|
|
157
|
+
locale?: string;
|
|
157
158
|
mode?: 'light' | 'dark';
|
|
158
159
|
series: readonly unknown[];
|
|
159
160
|
title: string;
|
|
160
161
|
visibleDomain?: string;
|
|
162
|
+
xKind?: 'linear' | 'category' | 'time';
|
|
161
163
|
};
|
|
162
164
|
'charts-bar': {
|
|
163
165
|
annotations?: string;
|
|
164
166
|
description: string;
|
|
165
167
|
fullDomain?: string;
|
|
166
168
|
interactive?: string;
|
|
169
|
+
locale?: string;
|
|
167
170
|
mode?: 'light' | 'dark';
|
|
168
171
|
series: readonly unknown[];
|
|
169
172
|
title: string;
|
|
170
173
|
visibleDomain?: string;
|
|
174
|
+
xKind?: 'linear' | 'category' | 'time';
|
|
171
175
|
};
|
|
172
176
|
'charts-bubble': {
|
|
173
177
|
annotations?: string;
|
|
@@ -202,20 +206,24 @@ export interface SpecComponentProps {
|
|
|
202
206
|
fullDomain?: string;
|
|
203
207
|
interactive?: string;
|
|
204
208
|
kind: 'line' | 'area' | 'bar' | 'stacked-bar' | 'combo';
|
|
209
|
+
locale?: string;
|
|
205
210
|
mode?: 'light' | 'dark';
|
|
206
211
|
series: readonly unknown[];
|
|
207
212
|
title: string;
|
|
208
213
|
visibleDomain?: string;
|
|
214
|
+
xKind?: 'linear' | 'category' | 'time';
|
|
209
215
|
};
|
|
210
216
|
'charts-combo': {
|
|
211
217
|
annotations?: string;
|
|
212
218
|
description: string;
|
|
213
219
|
fullDomain?: string;
|
|
214
220
|
interactive?: string;
|
|
221
|
+
locale?: string;
|
|
215
222
|
mode?: 'light' | 'dark';
|
|
216
223
|
series: readonly unknown[];
|
|
217
224
|
title: string;
|
|
218
225
|
visibleDomain?: string;
|
|
226
|
+
xKind?: 'linear' | 'category' | 'time';
|
|
219
227
|
};
|
|
220
228
|
'charts-donut': {
|
|
221
229
|
data: readonly unknown[];
|
|
@@ -281,10 +289,12 @@ export interface SpecComponentProps {
|
|
|
281
289
|
description: string;
|
|
282
290
|
fullDomain?: string;
|
|
283
291
|
interactive?: string;
|
|
292
|
+
locale?: string;
|
|
284
293
|
mode?: 'light' | 'dark';
|
|
285
294
|
series: readonly unknown[];
|
|
286
295
|
title: string;
|
|
287
296
|
visibleDomain?: string;
|
|
297
|
+
xKind?: 'linear' | 'category' | 'time';
|
|
288
298
|
};
|
|
289
299
|
'charts-network': {
|
|
290
300
|
description?: string;
|
|
@@ -350,10 +360,12 @@ export interface SpecComponentProps {
|
|
|
350
360
|
description: string;
|
|
351
361
|
fullDomain?: string;
|
|
352
362
|
interactive?: string;
|
|
363
|
+
locale?: string;
|
|
353
364
|
mode?: 'light' | 'dark';
|
|
354
365
|
series: readonly unknown[];
|
|
355
366
|
title: string;
|
|
356
367
|
visibleDomain?: string;
|
|
368
|
+
xKind?: 'linear' | 'category' | 'time';
|
|
357
369
|
};
|
|
358
370
|
'charts-sunburst': {
|
|
359
371
|
description: string;
|
|
@@ -433,6 +445,7 @@ export interface SpecComponentProps {
|
|
|
433
445
|
recentEmptyLabel?: string;
|
|
434
446
|
recentItems?: readonly unknown[];
|
|
435
447
|
recentLabel?: string;
|
|
448
|
+
searchLabel?: string;
|
|
436
449
|
shortcut?: boolean;
|
|
437
450
|
size?: 'sm' | 'md' | 'lg';
|
|
438
451
|
title?: string;
|
|
@@ -520,6 +533,7 @@ export interface SpecComponentProps {
|
|
|
520
533
|
'data-filter-builder': {
|
|
521
534
|
disabled?: boolean;
|
|
522
535
|
fields: readonly unknown[];
|
|
536
|
+
issues?: readonly unknown[];
|
|
523
537
|
label: string;
|
|
524
538
|
maxDepth?: number;
|
|
525
539
|
value?: Readonly<Record<string, unknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by @texuli/spec from catalog/components.json. Do not edit: run the spec generator.
|
|
2
|
-
// Spec 0.
|
|
2
|
+
// Spec 0.10.0, digest afcb9e3ed6b74b833a0f7477a657168621785ee98602ff582aa047e2d86aef17
|
|
3
3
|
/** The built catalog this vocabulary was projected from. */
|
|
4
|
-
export const SPEC_CATALOG_HASH = '
|
|
4
|
+
export const SPEC_CATALOG_HASH = '1372c1dde6017747a7fd62bf309b2c30484effeae209585b46c97506b0a8842c';
|
|
5
5
|
/** Every closed component id, sorted. */
|
|
6
6
|
export const SPEC_COMPONENT_IDS = [
|
|
7
7
|
'action-form',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated by @texuli/spec from schemas/workflow.schema.json. Do not edit: run the spec generator.
|
|
2
|
-
// Spec 0.
|
|
2
|
+
// Spec 0.10.0, digest afcb9e3ed6b74b833a0f7477a657168621785ee98602ff582aa047e2d86aef17
|
|
3
3
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SpecMigration } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 0.8.0 → 0.9.0 is additive (PLAN_011 T-gaps-87-95): it refreshes the catalog
|
|
4
|
+
* projection (the button pending note and the gap props that reach the
|
|
5
|
+
* manifests) and removes nothing. Every 0.8.0 envelope is a valid 0.9.0
|
|
6
|
+
* envelope, so the step only stamps `spec`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const migration080to090: SpecMigration;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.8.0 → 0.9.0 is additive (PLAN_011 T-gaps-87-95): it refreshes the catalog
|
|
3
|
+
* projection (the button pending note and the gap props that reach the
|
|
4
|
+
* manifests) and removes nothing. Every 0.8.0 envelope is a valid 0.9.0
|
|
5
|
+
* envelope, so the step only stamps `spec`.
|
|
6
|
+
*/
|
|
7
|
+
export const migration080to090 = Object.freeze({
|
|
8
|
+
from: '0.8.0',
|
|
9
|
+
to: '0.9.0',
|
|
10
|
+
migrate: (envelope) => ({ ...envelope, spec: '0.9.0' }),
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SpecMigration } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 0.9.0 → 0.10.0 is additive (PLAN_011 T-ds-spec, ADR-021): it adds the
|
|
4
|
+
* design-system document schema (`schemas/design-system.schema.json`, the
|
|
5
|
+
* `@texuli/spec/design-system` subpath) and the optional envelope
|
|
6
|
+
* `designSystem` (`$defs.designSystemReference`, T-ds-blueprint, ADR-024).
|
|
7
|
+
* Every 0.9.0 envelope is a valid 0.10.0 envelope, so the step only stamps
|
|
8
|
+
* `spec`: it never adds, moves or reads a `designSystem`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const migration090to0100: SpecMigration;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.9.0 → 0.10.0 is additive (PLAN_011 T-ds-spec, ADR-021): it adds the
|
|
3
|
+
* design-system document schema (`schemas/design-system.schema.json`, the
|
|
4
|
+
* `@texuli/spec/design-system` subpath) and the optional envelope
|
|
5
|
+
* `designSystem` (`$defs.designSystemReference`, T-ds-blueprint, ADR-024).
|
|
6
|
+
* Every 0.9.0 envelope is a valid 0.10.0 envelope, so the step only stamps
|
|
7
|
+
* `spec`: it never adds, moves or reads a `designSystem`.
|
|
8
|
+
*/
|
|
9
|
+
export const migration090to0100 = Object.freeze({
|
|
10
|
+
from: '0.9.0',
|
|
11
|
+
to: '0.10.0',
|
|
12
|
+
migrate: (envelope) => ({ ...envelope, spec: '0.10.0' }),
|
|
13
|
+
});
|
package/dist/migrations/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { migration040to050 } from "./0.4.0-0.5.0.js";
|
|
|
6
6
|
import { migration050to060 } from "./0.5.0-0.6.0.js";
|
|
7
7
|
import { migration060to070 } from "./0.6.0-0.7.0.js";
|
|
8
8
|
import { migration070to080 } from "./0.7.0-0.8.0.js";
|
|
9
|
+
import { migration080to090 } from "./0.8.0-0.9.0.js";
|
|
10
|
+
import { migration090to0100 } from "./0.9.0-0.10.0.js";
|
|
9
11
|
/** The version an envelope without `spec` was written for. */
|
|
10
12
|
export const UNDECLARED_SPEC_VERSION = '0.2.0';
|
|
11
13
|
/** Every step, in order; each `to` is the next step's `from`. */
|
|
@@ -16,6 +18,8 @@ export const SPEC_MIGRATIONS = Object.freeze([
|
|
|
16
18
|
migration050to060,
|
|
17
19
|
migration060to070,
|
|
18
20
|
migration070to080,
|
|
21
|
+
migration080to090,
|
|
22
|
+
migration090to0100,
|
|
19
23
|
]);
|
|
20
24
|
/**
|
|
21
25
|
* Bring a blueprint envelope up to `target` (the current spec by default)
|
package/dist/validate.js
CHANGED
|
@@ -31,6 +31,18 @@ export function validateBlueprint(input, documents, options = {}) {
|
|
|
31
31
|
message: 'The blueprint is bound to another catalog.',
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
+
// Spec 0.10.0 (ADR-024): the schema has no unions, so "exactly one of ref
|
|
35
|
+
// and inline" is checked here. The inline document's own rules belong to
|
|
36
|
+
// `checkDesignSystemReference` (`@texuli/spec/design-system`), which
|
|
37
|
+
// `@texuli/catalog`'s `validateDraft` runs through the host's check.
|
|
38
|
+
const system = input.designSystem;
|
|
39
|
+
if (isRecord(system) && Object.hasOwn(system, 'ref') === Object.hasOwn(system, 'inline')) {
|
|
40
|
+
diagnostics.push({
|
|
41
|
+
code: 'schema',
|
|
42
|
+
path: '$.designSystem',
|
|
43
|
+
message: 'one-of: A design system sets exactly one of ref and inline.',
|
|
44
|
+
});
|
|
45
|
+
}
|
|
34
46
|
const { workflowSchema: schema, validateWorkflowGraph: validate } = documents;
|
|
35
47
|
const workflow = schema && validate ? { schema, validate } : undefined;
|
|
36
48
|
const state = checkStateDeclarations(input.state, diagnostics, workflow);
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The semantic version of the spec documents in this package. */
|
|
2
|
-
export declare const SPEC_VERSION = "0.
|
|
2
|
+
export declare const SPEC_VERSION = "0.10.0";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The semantic version of the spec documents in this package. */
|
|
2
|
-
export const SPEC_VERSION = '0.
|
|
2
|
+
export const SPEC_VERSION = '0.10.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texuli/spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "The schema-first blueprint contract: JSON schemas, the catalog vocabulary, deterministic TypeScript and Kotlin projections, and the conformance harness.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"svelte",
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"./source": {
|
|
55
55
|
"types": "./dist/source.d.ts",
|
|
56
56
|
"default": "./dist/source.js"
|
|
57
|
+
},
|
|
58
|
+
"./design-system": {
|
|
59
|
+
"types": "./dist/design-system/index.d.ts",
|
|
60
|
+
"default": "./dist/design-system/index.js"
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
"files": [
|