@texuli/spec 0.9.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 +33 -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 +67 -11
- 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 +3 -1
- package/dist/generated/typescript/vocabulary.js +2 -2
- package/dist/generated/typescript/workflow.js +1 -1
- 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 +2 -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];
|
|
@@ -445,6 +445,7 @@ export interface SpecComponentProps {
|
|
|
445
445
|
recentEmptyLabel?: string;
|
|
446
446
|
recentItems?: readonly unknown[];
|
|
447
447
|
recentLabel?: string;
|
|
448
|
+
searchLabel?: string;
|
|
448
449
|
shortcut?: boolean;
|
|
449
450
|
size?: 'sm' | 'md' | 'lg';
|
|
450
451
|
title?: string;
|
|
@@ -532,6 +533,7 @@ export interface SpecComponentProps {
|
|
|
532
533
|
'data-filter-builder': {
|
|
533
534
|
disabled?: boolean;
|
|
534
535
|
fields: readonly unknown[];
|
|
536
|
+
issues?: readonly unknown[];
|
|
535
537
|
label: string;
|
|
536
538
|
maxDepth?: number;
|
|
537
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,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
|
@@ -7,6 +7,7 @@ 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
9
|
import { migration080to090 } from "./0.8.0-0.9.0.js";
|
|
10
|
+
import { migration090to0100 } from "./0.9.0-0.10.0.js";
|
|
10
11
|
/** The version an envelope without `spec` was written for. */
|
|
11
12
|
export const UNDECLARED_SPEC_VERSION = '0.2.0';
|
|
12
13
|
/** Every step, in order; each `to` is the next step's `from`. */
|
|
@@ -18,6 +19,7 @@ export const SPEC_MIGRATIONS = Object.freeze([
|
|
|
18
19
|
migration060to070,
|
|
19
20
|
migration070to080,
|
|
20
21
|
migration080to090,
|
|
22
|
+
migration090to0100,
|
|
21
23
|
]);
|
|
22
24
|
/**
|
|
23
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": [
|