aub-workspace 0.3.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/LICENSE +201 -0
- package/README.md +23 -0
- package/bin/aub-workspace.mjs +246 -0
- package/package.json +32 -0
- package/vendor/aub/apps/editor/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/vendor/aub/apps/editor/dist/assets/angular-importer.lib-dB_jK4mR.js +32 -0
- package/vendor/aub/apps/editor/dist/assets/canvas-tools-CuYC7cA2.js +364 -0
- package/vendor/aub/apps/editor/dist/assets/design-bridge.lib-DJvaK6AX.js +1 -0
- package/vendor/aub/apps/editor/dist/assets/export-agent-prompt.lib-BsP0KNqo.js +2 -0
- package/vendor/aub/apps/editor/dist/assets/export-md.lib-DdmdeWgO.js +3 -0
- package/vendor/aub/apps/editor/dist/assets/handoff-package.lib-DDYpcEma.js +20 -0
- package/vendor/aub/apps/editor/dist/assets/implementation-report.lib-CmsSB_8s.js +1 -0
- package/vendor/aub/apps/editor/dist/assets/index-BCH-ek3h.js +2 -0
- package/vendor/aub/apps/editor/dist/assets/index-lAnc928Q.css +1 -0
- package/vendor/aub/apps/editor/dist/assets/index-vt1nM1M4.js +507 -0
- package/vendor/aub/apps/editor/dist/assets/jszip.min-CRfXyL92.js +12 -0
- package/vendor/aub/apps/editor/dist/assets/react-vendor-ByX9Pqse.js +40 -0
- package/vendor/aub/apps/editor/dist/brand/android-chrome-192x192.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/android-chrome-512x512.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/app-icon-1024.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/app-icon-192.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/app-icon-512.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/apple-touch-icon.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/aub-logo-mark.svg +28 -0
- package/vendor/aub/apps/editor/dist/brand/favicon-16x16.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon-32x32.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon-48x48.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon.ico +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon.svg +9 -0
- package/vendor/aub/apps/editor/dist/brand/maskable-icon-512.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/mstile-150x150.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/safari-pinned-tab.svg +8 -0
- package/vendor/aub/apps/editor/dist/browserconfig.xml +9 -0
- package/vendor/aub/apps/editor/dist/index.html +22 -0
- package/vendor/aub/apps/editor/dist/manifest.webmanifest +28 -0
- package/vendor/aub/apps/editor/dist/template-previews/admin-table.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/booking.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/calendar.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/catalog.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/chat.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/checkout.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/crm.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/dashboard.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/feed.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/files.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/kanban.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/landing.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/mail.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/onboarding.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/pricing.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/product-detail.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/settings.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/wiki.png +0 -0
- package/vendor/aub/apps/mcp-server/dist/aub.js +15 -0
- package/vendor/aub/apps/mcp-server/dist/context.js +1 -0
- package/vendor/aub/apps/mcp-server/dist/http.js +123 -0
- package/vendor/aub/apps/mcp-server/dist/index.js +23 -0
- package/vendor/aub/apps/mcp-server/dist/repo.js +17 -0
- package/vendor/aub/apps/mcp-server/dist/schema.js +42 -0
- package/vendor/aub/apps/mcp-server/dist/server.js +80 -0
- package/vendor/aub/apps/mcp-server/dist/tools/approve-component-candidate.js +27 -0
- package/vendor/aub/apps/mcp-server/dist/tools/diff-blueprints.js +27 -0
- package/vendor/aub/apps/mcp-server/dist/tools/export-handoff.js +87 -0
- package/vendor/aub/apps/mcp-server/dist/tools/export-prompt.js +35 -0
- package/vendor/aub/apps/mcp-server/dist/tools/export-template-authoring-prompt.js +13 -0
- package/vendor/aub/apps/mcp-server/dist/tools/generate-template-from-source.js +25 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-aub-session.js +13 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-blueprint.js +28 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-project.js +45 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-workspace-status.js +10 -0
- package/vendor/aub/apps/mcp-server/dist/tools/import-design-bridge.js +62 -0
- package/vendor/aub/apps/mcp-server/dist/tools/list-blueprints.js +11 -0
- package/vendor/aub/apps/mcp-server/dist/tools/list-projects.js +11 -0
- package/vendor/aub/apps/mcp-server/dist/tools/lock-blueprint.js +33 -0
- package/vendor/aub/apps/mcp-server/dist/tools/migrate-blueprint.js +38 -0
- package/vendor/aub/apps/mcp-server/dist/tools/resolve-component.js +51 -0
- package/vendor/aub/apps/mcp-server/dist/tools/scaffold-blueprint.js +53 -0
- package/vendor/aub/apps/mcp-server/dist/tools/scan-project-ui.js +18 -0
- package/vendor/aub/apps/mcp-server/dist/tools/submit-report.js +48 -0
- package/vendor/aub/apps/mcp-server/dist/tools/update-aub-session.js +14 -0
- package/vendor/aub/apps/mcp-server/dist/tools/validate-blueprint.js +67 -0
- package/vendor/aub/apps/mcp-server/dist/tools/validate-project.js +74 -0
- package/vendor/aub/apps/mcp-server/dist/tools/write-blueprint.js +72 -0
- package/vendor/aub/apps/mcp-server/dist/workspace.js +138 -0
- package/vendor/aub/docs/agent-handoff.md +85 -0
- package/vendor/aub/docs/agent-handoff.zh-Hant.md +85 -0
- package/vendor/aub/docs/template-authoring-agent.md +86 -0
- package/vendor/aub/schema/aub-ci.schema.json +34 -0
- package/vendor/aub/schema/aub.registry.schema.json +118 -0
- package/vendor/aub/schema/design-bridge.schema.json +44 -0
- package/vendor/aub/schema/implementation-report.schema.json +93 -0
- package/vendor/aub/schema/project-types.ts +72 -0
- package/vendor/aub/schema/registry/components.json +118 -0
- package/vendor/aub/schema/types.js +13 -0
- package/vendor/aub/schema/types.ts +348 -0
- package/vendor/aub/schema/ui-blueprint-lock.schema.json +61 -0
- package/vendor/aub/schema/ui-blueprint.schema.json +1339 -0
- package/vendor/aub/schema/ui-project.schema.json +139 -0
- package/vendor/aub/scripts/agent-implementation-benchmark.lib.mjs +125 -0
- package/vendor/aub/scripts/angular-importer.lib.mjs +982 -0
- package/vendor/aub/scripts/check-editor-bundle-budget.mjs +36 -0
- package/vendor/aub/scripts/ci-verify.lib.mjs +256 -0
- package/vendor/aub/scripts/ci-verify.mjs +45 -0
- package/vendor/aub/scripts/create-authoring-kit.mjs +84 -0
- package/vendor/aub/scripts/create-implementation-report.mjs +24 -0
- package/vendor/aub/scripts/design-bridge.lib.d.mts +32 -0
- package/vendor/aub/scripts/design-bridge.lib.mjs +69 -0
- package/vendor/aub/scripts/diff-blueprint.lib.d.mts +18 -0
- package/vendor/aub/scripts/diff-blueprint.lib.mjs +148 -0
- package/vendor/aub/scripts/diff-blueprint.mjs +25 -0
- package/vendor/aub/scripts/export-agent-prompt.lib.d.mts +10 -0
- package/vendor/aub/scripts/export-agent-prompt.lib.mjs +160 -0
- package/vendor/aub/scripts/export-agent-prompt.mjs +79 -0
- package/vendor/aub/scripts/export-md.lib.d.mts +3 -0
- package/vendor/aub/scripts/export-md.lib.mjs +302 -0
- package/vendor/aub/scripts/export-md.mjs +43 -0
- package/vendor/aub/scripts/generate-registry-artifacts.lib.mjs +118 -0
- package/vendor/aub/scripts/generate-registry-artifacts.mjs +65 -0
- package/vendor/aub/scripts/generate-site-locales.mjs +545 -0
- package/vendor/aub/scripts/handoff-package.lib.d.mts +20 -0
- package/vendor/aub/scripts/handoff-package.lib.mjs +111 -0
- package/vendor/aub/scripts/implementation-report.lib.d.mts +21 -0
- package/vendor/aub/scripts/implementation-report.lib.mjs +97 -0
- package/vendor/aub/scripts/import-angular-component.mjs +72 -0
- package/vendor/aub/scripts/import-design-bridge.mjs +59 -0
- package/vendor/aub/scripts/lock-blueprint.lib.d.mts +23 -0
- package/vendor/aub/scripts/lock-blueprint.lib.mjs +58 -0
- package/vendor/aub/scripts/lock-blueprint.mjs +36 -0
- package/vendor/aub/scripts/migrate-blueprint-cli.mjs +28 -0
- package/vendor/aub/scripts/migrate-blueprint.d.mts +5 -0
- package/vendor/aub/scripts/migrate-blueprint.mjs +95 -0
- package/vendor/aub/scripts/package-workspace-cli.mjs +34 -0
- package/vendor/aub/scripts/project.lib.d.mts +44 -0
- package/vendor/aub/scripts/project.lib.mjs +175 -0
- package/vendor/aub/scripts/project.mjs +332 -0
- package/vendor/aub/scripts/registry.lib.d.mts +52 -0
- package/vendor/aub/scripts/registry.lib.mjs +222 -0
- package/vendor/aub/scripts/run-agent-implementation.mjs +423 -0
- package/vendor/aub/scripts/run-agent-readability.mjs +145 -0
- package/vendor/aub/scripts/run-ollama-prompt.mjs +30 -0
- package/vendor/aub/scripts/scaffold-blueprint.lib.d.mts +38 -0
- package/vendor/aub/scripts/scaffold-blueprint.lib.mjs +316 -0
- package/vendor/aub/scripts/scaffold-blueprint.mjs +86 -0
- package/vendor/aub/scripts/score-agent-implementation.mjs +27 -0
- package/vendor/aub/scripts/score-agent-readability.mjs +54 -0
- package/vendor/aub/scripts/sync-brand-assets.mjs +33 -0
- package/vendor/aub/scripts/validate-blueprint.lib.d.mts +14 -0
- package/vendor/aub/scripts/validate-blueprint.lib.mjs +136 -0
- package/vendor/aub/scripts/validate.mjs +128 -0
- package/vendor/aub/scripts/verify-implementation-report.mjs +36 -0
- package/vendor/aub/scripts/workspace-loop.lib.d.mts +17 -0
- package/vendor/aub/scripts/workspace-loop.lib.mjs +674 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aub.dev/schema/implementation-report/1.0.0",
|
|
4
|
+
"title": "AUB Implementation Report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"format",
|
|
9
|
+
"format_version",
|
|
10
|
+
"blueprint",
|
|
11
|
+
"implementation",
|
|
12
|
+
"node_mappings",
|
|
13
|
+
"acceptance_results",
|
|
14
|
+
"unresolved"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"format": { "const": "aub-implementation-report" },
|
|
18
|
+
"format_version": { "const": "1.0.0" },
|
|
19
|
+
"blueprint": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["screen_id", "version"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"screen_id": { "type": "string", "minLength": 1 },
|
|
25
|
+
"version": { "type": "string", "minLength": 1 }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"implementation": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["framework", "route", "files"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"framework": { "type": "string" },
|
|
34
|
+
"route": { "type": "string" },
|
|
35
|
+
"files": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string", "minLength": 1 },
|
|
38
|
+
"uniqueItems": true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"node_mappings": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": { "$ref": "#/$defs/nodeMapping" }
|
|
45
|
+
},
|
|
46
|
+
"acceptance_results": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": { "$ref": "#/$defs/acceptanceResult" }
|
|
49
|
+
},
|
|
50
|
+
"unresolved": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": { "type": "string", "minLength": 1 }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"$defs": {
|
|
56
|
+
"nodeMapping": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"required": ["node_id", "status", "component"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"node_id": { "type": "string", "minLength": 1 },
|
|
62
|
+
"status": { "enum": ["mapped", "unmapped"] },
|
|
63
|
+
"component": { "type": "string" },
|
|
64
|
+
"file": { "type": "string" },
|
|
65
|
+
"selector": { "type": "string" },
|
|
66
|
+
"notes": { "type": "string" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"acceptanceResult": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["acceptance_id", "status", "evidence"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"acceptance_id": { "type": "string", "minLength": 1 },
|
|
75
|
+
"status": { "enum": ["pass", "fail", "needs-review"] },
|
|
76
|
+
"evidence": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "$ref": "#/$defs/evidence" }
|
|
79
|
+
},
|
|
80
|
+
"notes": { "type": "string" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"evidence": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"required": ["type", "reference"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"type": { "enum": ["screenshot", "file", "dom", "command", "interaction", "note"] },
|
|
89
|
+
"reference": { "type": "string", "minLength": 1 }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Blueprint Project TypeScript types.
|
|
3
|
+
*
|
|
4
|
+
* These types are the TypeScript surface of `ui-project.schema.json`.
|
|
5
|
+
* They are hand-maintained to match the schema field-for-field.
|
|
6
|
+
*
|
|
7
|
+
* Synchronization rule: when the JSON Schema changes, update these types in
|
|
8
|
+
* the same commit. A validation test in `tests/project.test.mjs` round-trips
|
|
9
|
+
* the example project through both surfaces to catch drift.
|
|
10
|
+
*
|
|
11
|
+
* Source of truth: `schema/ui-project.schema.json`
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { SemVer } from './types';
|
|
15
|
+
|
|
16
|
+
/** Project schema version track. Independent from the Blueprint schema version. */
|
|
17
|
+
export type ProjectVersion = '0.1.0';
|
|
18
|
+
|
|
19
|
+
/** What causes a navigation between screens. */
|
|
20
|
+
export type NavigationTrigger =
|
|
21
|
+
| 'click'
|
|
22
|
+
| 'submit'
|
|
23
|
+
| 'change'
|
|
24
|
+
| 'load'
|
|
25
|
+
| 'system'
|
|
26
|
+
| 'gesture';
|
|
27
|
+
|
|
28
|
+
/** Reference to a member single-screen Blueprint file. */
|
|
29
|
+
export interface ProjectScreenRef {
|
|
30
|
+
/** Screen identifier. MUST match the referenced Blueprint's screen.id. */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Optional display name. Defaults to the referenced Blueprint's screen.name. */
|
|
33
|
+
name?: string;
|
|
34
|
+
/** Relative path (from the project file) to a .ui.json or .ui.yaml Blueprint. */
|
|
35
|
+
path: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Directed navigation edge between two screens. */
|
|
39
|
+
export interface NavigationEdge {
|
|
40
|
+
/** Source screen id (must be a declared screen). */
|
|
41
|
+
from: string;
|
|
42
|
+
/** Destination screen id (must be a declared screen). */
|
|
43
|
+
to: string;
|
|
44
|
+
/** What causes the navigation. */
|
|
45
|
+
trigger?: NavigationTrigger;
|
|
46
|
+
/** Optional id of the source-screen interaction that triggers this navigation. */
|
|
47
|
+
interaction_id?: string;
|
|
48
|
+
/** Optional human-readable label for the edge. */
|
|
49
|
+
label?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Top-level multi-screen project document. */
|
|
53
|
+
export interface Project {
|
|
54
|
+
/** Semantic version of the project schema this document conforms to. */
|
|
55
|
+
version: ProjectVersion & SemVer;
|
|
56
|
+
/** Unique project identifier. */
|
|
57
|
+
id: string;
|
|
58
|
+
/** Human-readable project name. */
|
|
59
|
+
name: string;
|
|
60
|
+
/** Optional summary of the product or flow. */
|
|
61
|
+
description?: string;
|
|
62
|
+
/** Member screens. At least one required. */
|
|
63
|
+
screens: ProjectScreenRef[];
|
|
64
|
+
/** Screen id where the flow starts. MUST match a declared screen. */
|
|
65
|
+
entry_screen: string;
|
|
66
|
+
/** Directed navigation edges between screens. */
|
|
67
|
+
navigation?: NavigationEdge[];
|
|
68
|
+
/** Optional project-level shared design tokens; member screens may override. */
|
|
69
|
+
design_system?: Record<string, unknown>;
|
|
70
|
+
/** Optional metadata about how this project document was produced. */
|
|
71
|
+
provenance?: Record<string, unknown>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../ui-blueprint.schema.json",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Canonical registry of UI Blueprint component types. This file is the source of truth — the JSON Schema enum in ui-blueprint.schema.json must stay in sync. The editor (Phase 2) reads this file to render the component palette.",
|
|
5
|
+
"categories": [
|
|
6
|
+
{
|
|
7
|
+
"id": "layout",
|
|
8
|
+
"name": "Layout",
|
|
9
|
+
"description": "Containers and structural primitives. Arrange children in flex/grid. Never hold business content directly.",
|
|
10
|
+
"types": [
|
|
11
|
+
{ "name": "app_shell", "displayName": "App Shell", "isContainer": true, "description": "Top-level layout container." },
|
|
12
|
+
{ "name": "page", "displayName": "Page", "isContainer": true, "description": "A full-screen scrollable content area." },
|
|
13
|
+
{ "name": "section", "displayName": "Section", "isContainer": true, "description": "Logical grouping of related nodes." },
|
|
14
|
+
{ "name": "header", "displayName": "Header", "isContainer": true, "description": "Top region of a screen, usually with title and actions." },
|
|
15
|
+
{ "name": "sidebar", "displayName": "Sidebar", "isContainer": true, "description": "Vertical navigation column." },
|
|
16
|
+
{ "name": "top_bar", "displayName": "Top Bar", "isContainer": true, "description": "Horizontal header with logo, search, and user actions." },
|
|
17
|
+
{ "name": "bottom_nav", "displayName": "Bottom Nav", "isContainer": true, "description": "Mobile-first horizontal nav at screen bottom." },
|
|
18
|
+
{ "name": "stack", "displayName": "Stack", "isContainer": true, "description": "Generic flex container, defaults to column." },
|
|
19
|
+
{ "name": "grid", "displayName": "Grid", "isContainer": true, "description": "CSS-grid container with declared columns." },
|
|
20
|
+
{ "name": "split_pane", "displayName": "Split Pane", "isContainer": true, "description": "Master/detail two-pane layout." },
|
|
21
|
+
{ "name": "scroll_area", "displayName": "Scroll Area", "isContainer": true, "description": "Scrollable region with fixed dimensions." }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "visual",
|
|
26
|
+
"name": "Visual",
|
|
27
|
+
"description": "Common visual building blocks used to reproduce hierarchy, branding, and content density.",
|
|
28
|
+
"types": [
|
|
29
|
+
{ "name": "heading", "displayName": "Heading", "isContainer": false, "description": "Semantic heading with declared typography.", "typicalContent": ["text"] },
|
|
30
|
+
{ "name": "text", "displayName": "Text", "isContainer": false, "description": "Paragraph, caption, or helper text.", "typicalContent": ["text"] },
|
|
31
|
+
{ "name": "card", "displayName": "Card", "isContainer": true, "description": "Framed group of related content and actions." },
|
|
32
|
+
{ "name": "image", "displayName": "Image", "isContainer": false, "description": "Image with source and alternative text.", "typicalContent": ["src", "alt"] },
|
|
33
|
+
{ "name": "icon", "displayName": "Icon", "isContainer": false, "description": "Named interface icon.", "typicalContent": ["icon", "label"] },
|
|
34
|
+
{ "name": "avatar", "displayName": "Avatar", "isContainer": false, "description": "User or entity avatar.", "typicalContent": ["src", "alt"] },
|
|
35
|
+
{ "name": "badge", "displayName": "Badge", "isContainer": false, "description": "Status or count badge.", "typicalContent": ["text", "variant"] },
|
|
36
|
+
{ "name": "tag", "displayName": "Tag", "isContainer": false, "description": "Compact categorical label.", "typicalContent": ["text"] },
|
|
37
|
+
{ "name": "divider", "displayName": "Divider", "isContainer": false, "description": "Visual separator between content groups." },
|
|
38
|
+
{ "name": "link", "displayName": "Link", "isContainer": false, "description": "Inline navigation action.", "typicalContent": ["text", "action"] }
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "data",
|
|
43
|
+
"name": "Data",
|
|
44
|
+
"description": "Data display primitives. Bind to data sources, render collections and aggregates.",
|
|
45
|
+
"types": [
|
|
46
|
+
{ "name": "metric_card", "displayName": "Metric Card", "isContainer": false, "description": "Single KPI with label, value, and delta.", "typicalContent": ["label", "data_binding"] },
|
|
47
|
+
{ "name": "data_table", "displayName": "Data Table", "isContainer": false, "description": "Tabular data with declared columns, sort, filter.", "typicalContent": ["columns", "data_binding"] },
|
|
48
|
+
{ "name": "list", "displayName": "List", "isContainer": true, "description": "Vertical collection of items." },
|
|
49
|
+
{ "name": "detail_panel", "displayName": "Detail Panel", "isContainer": true, "description": "Right-side drawer or modal for row/record detail." },
|
|
50
|
+
{ "name": "chart_placeholder", "displayName": "Chart Placeholder", "isContainer": false, "description": "Render slot for a chart library (recharts, visx, etc.)." },
|
|
51
|
+
{ "name": "timeline", "displayName": "Timeline", "isContainer": true, "description": "Chronological event list." },
|
|
52
|
+
{ "name": "activity_feed", "displayName": "Activity Feed", "isContainer": true, "description": "Reverse-chronological event stream." }
|
|
53
|
+
,{ "name": "calendar", "displayName": "Calendar", "isContainer": false, "description": "Month, week, or agenda calendar." }
|
|
54
|
+
,{ "name": "kanban_board", "displayName": "Kanban Board", "isContainer": true, "description": "Horizontal workflow board containing columns." }
|
|
55
|
+
,{ "name": "kanban_column", "displayName": "Kanban Column", "isContainer": true, "description": "Workflow stage containing task cards." }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "form",
|
|
60
|
+
"name": "Form",
|
|
61
|
+
"description": "Form containers and inputs. Every input has a label and a value-binding path.",
|
|
62
|
+
"types": [
|
|
63
|
+
{ "name": "form", "displayName": "Form", "isContainer": true, "description": "Form container with declared submit action.", "typicalContent": ["action"] },
|
|
64
|
+
{ "name": "field_group", "displayName": "Field Group", "isContainer": true, "description": "Visually grouped fields with shared label/legend." },
|
|
65
|
+
{ "name": "text_input", "displayName": "Text Input", "isContainer": false, "description": "Single-line text input.", "typicalContent": ["label", "placeholder"] },
|
|
66
|
+
{ "name": "select", "displayName": "Select", "isContainer": false, "description": "Dropdown selector.", "typicalContent": ["label", "items"] },
|
|
67
|
+
{ "name": "checkbox", "displayName": "Checkbox", "isContainer": false, "description": "Boolean toggle with label.", "typicalContent": ["label"] },
|
|
68
|
+
{ "name": "radio_group", "displayName": "Radio Group", "isContainer": false, "description": "Single-choice from a set of options.", "typicalContent": ["label", "items"] },
|
|
69
|
+
{ "name": "toggle", "displayName": "Toggle", "isContainer": false, "description": "On/off switch with label.", "typicalContent": ["label"] },
|
|
70
|
+
{ "name": "slider", "displayName": "Slider", "isContainer": false, "description": "Numeric range input.", "typicalContent": ["label"] },
|
|
71
|
+
{ "name": "date_picker", "displayName": "Date Picker", "isContainer": false, "description": "Calendar-based date input.", "typicalContent": ["label"] },
|
|
72
|
+
{ "name": "file_upload", "displayName": "File Upload", "isContainer": false, "description": "Drag/drop or browse file input.", "typicalContent": ["label"] }
|
|
73
|
+
,{ "name": "textarea", "displayName": "Textarea", "isContainer": false, "description": "Multi-line text input.", "typicalContent": ["label", "placeholder"] }
|
|
74
|
+
,{ "name": "search_input", "displayName": "Search Input", "isContainer": false, "description": "Search field with query intent.", "typicalContent": ["label", "placeholder", "action"] }
|
|
75
|
+
,{ "name": "rich_text_editor", "displayName": "Rich Text Editor", "isContainer": true, "description": "Document editing surface with toolbar and body." }
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "action",
|
|
80
|
+
"name": "Action",
|
|
81
|
+
"description": "Triggers and actions. Always have an action intent and a target.",
|
|
82
|
+
"types": [
|
|
83
|
+
{ "name": "button", "displayName": "Button", "isContainer": false, "description": "Primary action button. Must declare action intent.", "typicalContent": ["text", "action"] },
|
|
84
|
+
{ "name": "icon_button", "displayName": "Icon Button", "isContainer": false, "description": "Icon-only button. Must have an accessible label.", "typicalContent": ["label", "action"] },
|
|
85
|
+
{ "name": "button_group", "displayName": "Button Group", "isContainer": true, "description": "Cluster of related buttons." },
|
|
86
|
+
{ "name": "menu", "displayName": "Menu", "isContainer": true, "description": "Dropdown menu of actions.", "typicalContent": ["label", "items"] },
|
|
87
|
+
{ "name": "toolbar", "displayName": "Toolbar", "isContainer": true, "description": "Horizontal action bar." },
|
|
88
|
+
{ "name": "command_palette", "displayName": "Command Palette", "isContainer": true, "description": "Cmd-K style searchable action list." }
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "feedback",
|
|
93
|
+
"name": "Feedback",
|
|
94
|
+
"description": "User feedback surfaces — modals, toasts, alerts, and explicit state placeholders.",
|
|
95
|
+
"types": [
|
|
96
|
+
{ "name": "modal", "displayName": "Modal", "isContainer": true, "description": "Centered blocking dialog." },
|
|
97
|
+
{ "name": "drawer", "displayName": "Drawer", "isContainer": true, "description": "Side-sliding panel." },
|
|
98
|
+
{ "name": "toast", "displayName": "Toast", "isContainer": false, "description": "Transient feedback message." },
|
|
99
|
+
{ "name": "alert", "displayName": "Alert", "isContainer": false, "description": "Inline message (info/warn/error)." },
|
|
100
|
+
{ "name": "empty_state", "displayName": "Empty State", "isContainer": false, "description": "Placeholder for empty collections. Must be wired via content.empty_state.", "typicalContent": ["text", "action"] },
|
|
101
|
+
{ "name": "loading_state", "displayName": "Loading State", "isContainer": false, "description": "Placeholder for in-flight data." },
|
|
102
|
+
{ "name": "error_state", "displayName": "Error State", "isContainer": false, "description": "Placeholder for fetch failure." }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "navigation",
|
|
107
|
+
"name": "Navigation",
|
|
108
|
+
"description": "Navigation primitives. Always link to a target screen or anchor.",
|
|
109
|
+
"types": [
|
|
110
|
+
{ "name": "tabs", "displayName": "Tabs", "isContainer": true, "description": "Tabbed view selector." },
|
|
111
|
+
{ "name": "breadcrumb", "displayName": "Breadcrumb", "isContainer": false, "description": "Hierarchical location indicator." },
|
|
112
|
+
{ "name": "pagination", "displayName": "Pagination", "isContainer": false, "description": "Page navigation for collections." },
|
|
113
|
+
{ "name": "stepper", "displayName": "Stepper", "isContainer": true, "description": "Multi-step flow indicator." },
|
|
114
|
+
{ "name": "nav_item", "displayName": "Nav Item", "isContainer": false, "description": "Single link in a sidebar/top_nav. Must declare action.", "typicalContent": ["label", "action"] }
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Blueprint TypeScript types.
|
|
3
|
+
*
|
|
4
|
+
* These types are the TypeScript surface of `ui-blueprint.schema.json`.
|
|
5
|
+
* They are hand-maintained to match the schema field-for-field.
|
|
6
|
+
*
|
|
7
|
+
* Synchronization rule: when the JSON Schema changes, update these types in
|
|
8
|
+
* the same commit. A validation test in `tests/types.test.ts` round-trips
|
|
9
|
+
* `examples/dashboard.ui.json` through both surfaces to catch drift.
|
|
10
|
+
*
|
|
11
|
+
* Source of truth: `schema/ui-blueprint.schema.json`
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Blueprint TypeScript types.
|
|
3
|
+
*
|
|
4
|
+
* These types are the TypeScript surface of `ui-blueprint.schema.json`.
|
|
5
|
+
* They are hand-maintained to match the schema field-for-field.
|
|
6
|
+
*
|
|
7
|
+
* Synchronization rule: when the JSON Schema changes, update these types in
|
|
8
|
+
* the same commit. A validation test in `tests/types.test.ts` round-trips
|
|
9
|
+
* `examples/dashboard.ui.json` through both surfaces to catch drift.
|
|
10
|
+
*
|
|
11
|
+
* Source of truth: `schema/ui-blueprint.schema.json`
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export type SemVer = `${number}.${number}.${number}`;
|
|
15
|
+
|
|
16
|
+
/** Top-level document. */
|
|
17
|
+
export interface Blueprint {
|
|
18
|
+
/** Semantic version of the schema this document conforms to. */
|
|
19
|
+
version: SemVer;
|
|
20
|
+
/** Screen metadata. */
|
|
21
|
+
screen: Screen;
|
|
22
|
+
/** At least one viewport. */
|
|
23
|
+
viewports: Viewport[];
|
|
24
|
+
/** Tree of semantic UI nodes. The first node MUST be the root. */
|
|
25
|
+
nodes: UINode[];
|
|
26
|
+
/** User-driven interactions. */
|
|
27
|
+
interactions: Interaction[];
|
|
28
|
+
/** Per-viewport rules that override or transform node layout. */
|
|
29
|
+
responsive: Responsive[];
|
|
30
|
+
/** Verifiable acceptance items. >=5 per screen. */
|
|
31
|
+
acceptance: Acceptance[];
|
|
32
|
+
/** Shared visual vocabulary used by nodes. */
|
|
33
|
+
design_system?: DesignSystem;
|
|
34
|
+
/** Optional origin metadata for imported Blueprints. */
|
|
35
|
+
provenance?: Provenance;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface Screen {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
type: ScreenType;
|
|
42
|
+
platform: Platform;
|
|
43
|
+
primary_user_goal: string;
|
|
44
|
+
notes?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ScreenType =
|
|
48
|
+
| 'dashboard'
|
|
49
|
+
| 'form'
|
|
50
|
+
| 'landing'
|
|
51
|
+
| 'settings'
|
|
52
|
+
| 'admin_table'
|
|
53
|
+
| 'detail'
|
|
54
|
+
| 'auth'
|
|
55
|
+
| 'error'
|
|
56
|
+
| 'empty'
|
|
57
|
+
| 'workspace'
|
|
58
|
+
| 'communication'
|
|
59
|
+
| 'content'
|
|
60
|
+
| 'commerce'
|
|
61
|
+
| 'calendar'
|
|
62
|
+
| 'files'
|
|
63
|
+
| 'onboarding';
|
|
64
|
+
|
|
65
|
+
export type Platform = 'web' | 'mobile-web' | 'ios' | 'android' | 'desktop';
|
|
66
|
+
|
|
67
|
+
export interface Viewport {
|
|
68
|
+
id: 'desktop' | 'tablet' | 'mobile' | 'wide';
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// <generated:component-types>
|
|
74
|
+
/** Semantic component type — agents read this to know WHAT a node is. */
|
|
75
|
+
export type ComponentType =
|
|
76
|
+
| 'app_shell' | 'page' | 'section' | 'header' | 'sidebar' | 'top_bar' | 'bottom_nav' | 'stack' | 'grid' | 'split_pane' | 'scroll_area'
|
|
77
|
+
| 'heading' | 'text' | 'card' | 'image' | 'icon' | 'avatar' | 'badge' | 'tag' | 'divider' | 'link'
|
|
78
|
+
| 'metric_card' | 'data_table' | 'list' | 'detail_panel' | 'chart_placeholder' | 'timeline' | 'activity_feed' | 'calendar' | 'kanban_board' | 'kanban_column'
|
|
79
|
+
| 'form' | 'field_group' | 'text_input' | 'select' | 'checkbox' | 'radio_group' | 'toggle' | 'slider' | 'date_picker' | 'file_upload' | 'textarea' | 'search_input' | 'rich_text_editor'
|
|
80
|
+
| 'button' | 'icon_button' | 'button_group' | 'menu' | 'toolbar' | 'command_palette'
|
|
81
|
+
| 'modal' | 'drawer' | 'toast' | 'alert' | 'empty_state' | 'loading_state' | 'error_state'
|
|
82
|
+
| 'tabs' | 'breadcrumb' | 'pagination' | 'stepper' | 'nav_item';
|
|
83
|
+
|
|
84
|
+
export type ContainerComponentType = Extract<
|
|
85
|
+
ComponentType,
|
|
86
|
+
| 'app_shell' | 'page' | 'section' | 'header' | 'sidebar' | 'top_bar' | 'bottom_nav' | 'stack' | 'grid' | 'split_pane' | 'scroll_area'
|
|
87
|
+
| 'card'
|
|
88
|
+
| 'list' | 'detail_panel' | 'timeline' | 'activity_feed' | 'kanban_board' | 'kanban_column'
|
|
89
|
+
| 'form' | 'field_group' | 'rich_text_editor'
|
|
90
|
+
| 'button_group' | 'menu' | 'toolbar' | 'command_palette'
|
|
91
|
+
| 'modal' | 'drawer'
|
|
92
|
+
| 'tabs' | 'stepper'
|
|
93
|
+
>;
|
|
94
|
+
|
|
95
|
+
export type LeafComponentType = Exclude<ComponentType, ContainerComponentType>;
|
|
96
|
+
// </generated:component-types>
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* A fully resolved component type: a core type or a namespaced project
|
|
100
|
+
* extension type (e.g. `acme:data_card`) declared in aub.registry.json.
|
|
101
|
+
*/
|
|
102
|
+
export type ResolvedComponentType = ComponentType | `${string}:${string}`;
|
|
103
|
+
|
|
104
|
+
export type NodeState =
|
|
105
|
+
| 'default' | 'hover' | 'focus' | 'active' | 'disabled'
|
|
106
|
+
| 'loading' | 'empty' | 'error' | 'selected';
|
|
107
|
+
|
|
108
|
+
export interface UINode {
|
|
109
|
+
id: string;
|
|
110
|
+
type: ComponentType;
|
|
111
|
+
name: string;
|
|
112
|
+
/** Agent-facing role/intent. WHY this node exists. */
|
|
113
|
+
role: string;
|
|
114
|
+
parent_id: string | null;
|
|
115
|
+
children?: string[];
|
|
116
|
+
layout?: Layout;
|
|
117
|
+
/** Exact geometry per viewport. Used when the parent layout mode is freeform. */
|
|
118
|
+
placements?: Partial<Record<ViewportId, Placement>>;
|
|
119
|
+
content?: Content;
|
|
120
|
+
style?: Style;
|
|
121
|
+
states?: NodeState[];
|
|
122
|
+
constraints?: NodeConstraints;
|
|
123
|
+
source?: SourceReference;
|
|
124
|
+
bindings?: Bindings;
|
|
125
|
+
validation?: NodeValidation;
|
|
126
|
+
initial_state?: InitialState;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface Provenance {
|
|
130
|
+
source_kind: 'native' | 'angular-component' | 'html' | 'figma' | 'penpot' | 'image' | 'other';
|
|
131
|
+
framework?: string;
|
|
132
|
+
importer_version: string;
|
|
133
|
+
entry_file?: string;
|
|
134
|
+
source_files: string[];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface SourceReference {
|
|
138
|
+
file: string;
|
|
139
|
+
line?: number;
|
|
140
|
+
column?: number;
|
|
141
|
+
selector?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface Bindings {
|
|
145
|
+
value?: string;
|
|
146
|
+
options?: string;
|
|
147
|
+
visibility?: string;
|
|
148
|
+
enabled?: string;
|
|
149
|
+
repeat?: string;
|
|
150
|
+
selected?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface NodeValidation {
|
|
154
|
+
required?: boolean;
|
|
155
|
+
pattern?: string;
|
|
156
|
+
min_length?: number;
|
|
157
|
+
max_length?: number;
|
|
158
|
+
min?: number;
|
|
159
|
+
max?: number;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface InitialState {
|
|
163
|
+
visibility?: 'visible' | 'hidden';
|
|
164
|
+
expanded?: boolean;
|
|
165
|
+
selected?: boolean;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface NodeConstraints {
|
|
169
|
+
min_width?: number;
|
|
170
|
+
max_width?: number;
|
|
171
|
+
min_height?: number;
|
|
172
|
+
max_height?: number;
|
|
173
|
+
/** Minimum interactive area in pixels (Apple HIG 44, Material 48). */
|
|
174
|
+
touch_target_min?: number;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface Layout {
|
|
178
|
+
mode?: 'auto' | 'freeform';
|
|
179
|
+
display?: 'flex' | 'grid' | 'block' | 'inline' | 'none';
|
|
180
|
+
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
181
|
+
wrap?: boolean;
|
|
182
|
+
grid?: GridConfig;
|
|
183
|
+
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
184
|
+
justify?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
185
|
+
gap?: Spacing;
|
|
186
|
+
padding?: PaddingBox;
|
|
187
|
+
width?: Size;
|
|
188
|
+
height?: Size;
|
|
189
|
+
min_width?: Size;
|
|
190
|
+
max_width?: Size;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export type ViewportId = Viewport['id'];
|
|
194
|
+
|
|
195
|
+
export interface Placement {
|
|
196
|
+
x: number;
|
|
197
|
+
y: number;
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
z_index?: number;
|
|
201
|
+
order?: number;
|
|
202
|
+
grow?: number;
|
|
203
|
+
basis?: number;
|
|
204
|
+
grid_column?: number;
|
|
205
|
+
grid_row?: number;
|
|
206
|
+
column_span?: number;
|
|
207
|
+
row_span?: number;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface GridConfig {
|
|
211
|
+
columns?: number;
|
|
212
|
+
rows?: number;
|
|
213
|
+
template?: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface Spacing {
|
|
217
|
+
x?: number;
|
|
218
|
+
y?: number;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface PaddingBox {
|
|
222
|
+
top?: number;
|
|
223
|
+
right?: number;
|
|
224
|
+
bottom?: number;
|
|
225
|
+
left?: number;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface Size {
|
|
229
|
+
value: number;
|
|
230
|
+
unit: 'px' | '%' | 'rem' | 'vw' | 'vh';
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface Content {
|
|
234
|
+
text?: string;
|
|
235
|
+
placeholder?: string;
|
|
236
|
+
/** Symbolic reference to a data source, e.g. 'metrics.revenue.current'. */
|
|
237
|
+
data_binding?: string;
|
|
238
|
+
columns?: TableColumn[];
|
|
239
|
+
items?: ListItem[];
|
|
240
|
+
/** Symbolic action intent, e.g. 'submit', 'navigate:/settings'. */
|
|
241
|
+
action?: string;
|
|
242
|
+
/** Accessible label for form inputs and icon buttons. */
|
|
243
|
+
label?: string;
|
|
244
|
+
empty_state?: string;
|
|
245
|
+
loading_state?: string;
|
|
246
|
+
error_state?: string;
|
|
247
|
+
src?: string;
|
|
248
|
+
alt?: string;
|
|
249
|
+
icon?: string;
|
|
250
|
+
value?: string;
|
|
251
|
+
helper_text?: string;
|
|
252
|
+
variant?: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface TableColumn {
|
|
256
|
+
id: string;
|
|
257
|
+
header: string;
|
|
258
|
+
data_binding?: string;
|
|
259
|
+
sortable?: boolean;
|
|
260
|
+
filterable?: boolean;
|
|
261
|
+
cell_kind?: 'text' | 'number' | 'date' | 'link' | 'icon' | 'action' | 'status' | 'checkbox';
|
|
262
|
+
icon?: string;
|
|
263
|
+
action?: string;
|
|
264
|
+
sticky?: boolean;
|
|
265
|
+
align?: 'start' | 'center' | 'end';
|
|
266
|
+
visible_when?: string;
|
|
267
|
+
width?: Size;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface ListItem {
|
|
271
|
+
id: string;
|
|
272
|
+
label?: string;
|
|
273
|
+
icon?: string;
|
|
274
|
+
action?: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface Style {
|
|
278
|
+
/** Design tokens applied to this node. */
|
|
279
|
+
tokens?: Record<string, string>;
|
|
280
|
+
elevation?: number;
|
|
281
|
+
background?: string;
|
|
282
|
+
foreground?: string;
|
|
283
|
+
border?: string;
|
|
284
|
+
typography?: string;
|
|
285
|
+
radius?: string;
|
|
286
|
+
shadow?: string;
|
|
287
|
+
opacity?: number;
|
|
288
|
+
variant?: string;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export interface DesignSystem {
|
|
292
|
+
name: string;
|
|
293
|
+
colors?: Record<string, string>;
|
|
294
|
+
typography?: Record<string, string>;
|
|
295
|
+
spacing?: Record<string, string>;
|
|
296
|
+
radii?: Record<string, string>;
|
|
297
|
+
shadows?: Record<string, string>;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export type InteractionTrigger =
|
|
301
|
+
| 'click' | 'double_click' | 'hover' | 'focus' | 'blur'
|
|
302
|
+
| 'change' | 'submit' | 'key_enter' | 'key_escape'
|
|
303
|
+
| 'swipe_left' | 'swipe_right' | 'load' | 'scroll';
|
|
304
|
+
|
|
305
|
+
export interface Interaction {
|
|
306
|
+
id: string;
|
|
307
|
+
trigger: InteractionTrigger;
|
|
308
|
+
source_node_id: string;
|
|
309
|
+
/** Verb-noun form: 'navigate:/foo', 'open:bar', 'submit:form_x'. */
|
|
310
|
+
action: string;
|
|
311
|
+
/** Optional target node id or route. */
|
|
312
|
+
target?: string;
|
|
313
|
+
/** What changes as a result. Must be observable and verifiable. */
|
|
314
|
+
result_state: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export type ResponsiveViewport = 'desktop' | 'tablet' | 'mobile' | 'wide';
|
|
318
|
+
|
|
319
|
+
export type ResponsiveRule =
|
|
320
|
+
| 'keep' | 'hide' | 'drawer' | 'bottom_nav' | 'stack' | 'scroll'
|
|
321
|
+
| 'card_list' | 'col_reduce' | 'collapse' | 'expand'
|
|
322
|
+
| 'icon_only' | 'label_only';
|
|
323
|
+
|
|
324
|
+
export interface Responsive {
|
|
325
|
+
viewport: ResponsiveViewport;
|
|
326
|
+
rule: ResponsiveRule;
|
|
327
|
+
target_node_id: string;
|
|
328
|
+
/** Specific property overrides. Empty object means no change beyond the rule. */
|
|
329
|
+
changes: Record<string, unknown>;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export type AcceptanceType = 'layout' | 'interaction' | 'responsive' | 'a11y' | 'content' | 'performance';
|
|
333
|
+
export type AcceptancePriority = 'blocker' | 'must' | 'should' | 'nice';
|
|
334
|
+
export type VerificationMethod =
|
|
335
|
+
| 'manual_visual' | 'manual_ia_review'
|
|
336
|
+
| 'dom_query' | 'computed_style' | 'axe_audit'
|
|
337
|
+
| 'screenshot_diff' | 'interaction_replay' | 'code_diff';
|
|
338
|
+
|
|
339
|
+
export interface Acceptance {
|
|
340
|
+
id: string;
|
|
341
|
+
type: AcceptanceType;
|
|
342
|
+
/** Verifiable assertion. Must be testable, not subjective. */
|
|
343
|
+
statement: string;
|
|
344
|
+
/** Node id, viewport id, or selector pattern. */
|
|
345
|
+
target: string;
|
|
346
|
+
priority: AcceptancePriority;
|
|
347
|
+
verification_method: VerificationMethod;
|
|
348
|
+
}
|