@aestheticfunction/dspack-emit 0.3.2 → 0.4.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/README.md +29 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +34 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/targets/a2ui/surface.js +7 -0
- package/dist/transform/profile-load.d.ts +19 -0
- package/dist/transform/profile-load.js +56 -0
- package/dist/transform/profile-schema.d.ts +8 -0
- package/dist/transform/profile-schema.js +382 -0
- package/dist/transform/scaffold.d.ts +40 -0
- package/dist/transform/scaffold.js +171 -0
- package/dist/validate/ajv.js +2 -4
- package/dist/validate/meta/catalog-meta.d.ts +10 -0
- package/dist/validate/meta/catalog-meta.js +157 -0
- package/package.json +5 -2
- package/src/browser-boundary.test.ts +47 -0
- package/src/cli.ts +35 -9
- package/src/index.ts +2 -0
- package/src/profile-load.test.ts +144 -0
- package/src/schema-mirrors.test.ts +30 -0
- package/src/targets/a2ui/surface.ts +10 -0
- package/src/transform/profile-load.ts +70 -0
- package/src/transform/profile-schema.ts +382 -0
- package/src/transform/profile.v1.schema.json +153 -0
- package/src/transform/scaffold.ts +229 -0
- package/src/validate/ajv.ts +2 -6
- package/src/validate/meta/catalog-meta.ts +167 -0
- package/dist/validate/meta/a2ui-catalog.meta.0_9_1.json +0 -39
- package/dist/validate/meta/a2ui-catalog.meta.1_0.json +0 -34
package/README.md
CHANGED
|
@@ -7,6 +7,12 @@ governed dspack surfaces into protocol targets — an
|
|
|
7
7
|
**[json-render](https://github.com/vercel-labs/json-render) catalog/registry
|
|
8
8
|
modules + specs**.
|
|
9
9
|
|
|
10
|
+
> Part of the [dspack ecosystem](https://github.com/aestheticfunction) — the organization profile has the full map of how the repositories fit together.
|
|
11
|
+
>
|
|
12
|
+
> **Kind:** library (npm `@aestheticfunction/dspack-emit`) · **Audience:** engineers wiring dspack contracts and surfaces to rendering protocols · **Neighbors:** consumes [dspack](https://github.com/aestheticfunction/dspack) contracts; consumed by [dspack-gen](https://github.com/aestheticfunction/dspack-gen) and [dspack-studio](https://github.com/aestheticfunction/dspack-studio) ([hosted replay](https://studio.aesthetic-function.com)); pairs with [ds-mcp](https://github.com/aestheticfunction/ds-mcp) in the demo
|
|
13
|
+
>
|
|
14
|
+
> **Mapping your own design system?** Profiles are pure data you author in your own codebase against this package — the walkthrough is [docs/PROFILES.md](docs/PROFILES.md); the broader adoption journey starts at [ADOPTING.md](https://github.com/aestheticfunction/dspack/blob/main/ADOPTING.md).
|
|
15
|
+
|
|
10
16
|
> **Naming note:** this repo was renamed from `dspack-to-a2ui` to `dspack-emit`
|
|
11
17
|
> when the second target landed (ADR-D2; the old GitHub URL redirects). The
|
|
12
18
|
> npm package is **`@aestheticfunction/dspack-emit`** from `0.3.0`; the last
|
|
@@ -80,6 +86,28 @@ Or directly:
|
|
|
80
86
|
npm run transform -- --in input/shadcn-ui.dspack.json --a2ui-version 1.0 --out out
|
|
81
87
|
```
|
|
82
88
|
|
|
89
|
+
### Profiles as JSON (`--profile`, `loadProfile`, `scaffoldProfile`)
|
|
90
|
+
|
|
91
|
+
The `Profile` has always been pure data; it is now also *reachable* as data.
|
|
92
|
+
A `*.profile.json` document (schema:
|
|
93
|
+
[`src/transform/profile.v1.schema.json`](src/transform/profile.v1.schema.json),
|
|
94
|
+
a 1:1 mirror of the `Profile` type plus a `profileVersion: "1"` envelope)
|
|
95
|
+
drives the engine byte-identically to a TypeScript profile. The package
|
|
96
|
+
installs a `dspack-emit` bin, so out-of-repo contracts emit from any CI:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
dspack-emit --in acme-ui.dspack.json --a2ui-version 0.9.1 --out out \
|
|
100
|
+
--profile acme.profile.json --emit-surface surfaces/status-report.dsurface.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
A malformed profile is refused before the engine runs (`ProfileLoadError`
|
|
104
|
+
with pathed findings; CLI exit 2). `scaffoldProfile(doc, { catalogIdBase })`
|
|
105
|
+
produces a mechanical 1:1 starting draft plus `notes` naming every judgment
|
|
106
|
+
call it deliberately did not make — see
|
|
107
|
+
[docs/PROFILES.md](docs/PROFILES.md). With `--profile` and no `--surface`,
|
|
108
|
+
the repo-relative sample-surface default is skipped (gate A3 then covers
|
|
109
|
+
`--emit-surface` output only).
|
|
110
|
+
|
|
83
111
|
### Versioned emitter (`--a2ui-version 0.9.1 | 1.0`)
|
|
84
112
|
|
|
85
113
|
The mapper targets and validates the **v1.0** catalog schema as the primary line, and
|
|
@@ -119,7 +147,7 @@ before anything reaches this emitter.
|
|
|
119
147
|
The input contract is now **dspack v0.4**, whose `examples[]` embed *dspack
|
|
120
148
|
surface* documents — a protocol-neutral component tree in dspack vocabulary
|
|
121
149
|
(schema: `dspack.surface.v0_1.schema.json` in the dspack repo). This repo
|
|
122
|
-
compiles those surfaces to A2UI v0.9 messages:
|
|
150
|
+
compiles those surfaces to A2UI v0.9.1 messages:
|
|
123
151
|
|
|
124
152
|
```bash
|
|
125
153
|
npm run transform -- --in input/shadcn-ui.dspack.json --a2ui-version 0.9.1 --out out \
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
export {};
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* dspack-emit CLI.
|
|
3
|
+
* dspack-emit CLI (also installed as the `dspack-emit` bin).
|
|
4
4
|
*
|
|
5
5
|
* tsx src/cli.ts --in <dspack.json> --a2ui-version <0.9.1|1.0> --out <dir> [--surface <surface.json>]
|
|
6
|
-
* [--emit-surface <surface.dsurface.json>]
|
|
6
|
+
* [--profile <profile.json>] [--emit-surface <surface.dsurface.json>]
|
|
7
7
|
* tsx src/cli.ts --target json-render --in <dspack.json> --out <dir>
|
|
8
8
|
* [--emit-surface <surface.dsurface.json>]
|
|
9
9
|
*
|
|
10
|
+
* --profile loads a JSON mapping profile (validated against
|
|
11
|
+
* profile.v1.schema.json via loadProfile) instead of the built-in shadcn
|
|
12
|
+
* profile — the flag that makes out-of-repo contracts emittable from CI.
|
|
13
|
+
* When --profile is given and --surface is not, the sample-surface default
|
|
14
|
+
* (a repo-relative fixture) is skipped and gate A3 runs on --emit-surface
|
|
15
|
+
* output only.
|
|
16
|
+
*
|
|
10
17
|
* Default target (a2ui): emits a versioned A2UI catalog + a
|
|
11
18
|
* validation/fidelity report. Exits non-zero if the hard gate (catalog schema
|
|
12
19
|
* validation) fails, so it is CI-friendly. With --emit-surface, additionally
|
|
@@ -24,6 +31,8 @@
|
|
|
24
31
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
25
32
|
import { basename, join, resolve } from "node:path";
|
|
26
33
|
import { transform } from "./transform/index.js";
|
|
34
|
+
import { shadcnProfile } from "./transform/profiles.js";
|
|
35
|
+
import { loadProfile, ProfileLoadError } from "./transform/profile-load.js";
|
|
27
36
|
import { emitSurface, EmitSurfaceError } from "./targets/a2ui/surface.js";
|
|
28
37
|
import { generateJsonRenderModules } from "./targets/json-render/codegen.js";
|
|
29
38
|
import { emitJsonRenderSpec, EmitJsonRenderError, validateSpecAgainstModel } from "./targets/json-render/emit.js";
|
|
@@ -65,12 +74,16 @@ function parseArgs(argv) {
|
|
|
65
74
|
const input = m.get("in");
|
|
66
75
|
if (!input)
|
|
67
76
|
fail("--in <dspack.json> is required");
|
|
77
|
+
const profile = m.get("profile");
|
|
68
78
|
return {
|
|
69
79
|
target,
|
|
70
80
|
in: input,
|
|
71
81
|
version: (version ?? "0.9.1"),
|
|
72
82
|
out: m.get("out") ?? "out",
|
|
73
|
-
|
|
83
|
+
// The sample-surface default is a repo-relative fixture; external callers
|
|
84
|
+
// (--profile) get a vacuous A3 unless they pass --surface/--emit-surface.
|
|
85
|
+
surface: m.get("surface") ?? (profile ? undefined : "surface/settings-card.surface.json"),
|
|
86
|
+
profile,
|
|
74
87
|
emitSurface: m.get("emit-surface"),
|
|
75
88
|
strictCoverage: m.get("strict-coverage") === "true",
|
|
76
89
|
};
|
|
@@ -131,8 +144,21 @@ function main() {
|
|
|
131
144
|
jsonRenderMain(args, doc);
|
|
132
145
|
return;
|
|
133
146
|
}
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
let profile = shadcnProfile;
|
|
148
|
+
if (args.profile) {
|
|
149
|
+
try {
|
|
150
|
+
profile = loadProfile(JSON.parse(readFileSync(resolve(args.profile), "utf8")));
|
|
151
|
+
}
|
|
152
|
+
catch (e) {
|
|
153
|
+
if (e instanceof ProfileLoadError) {
|
|
154
|
+
console.error(`error: --profile ${args.profile}: ${e.message}`);
|
|
155
|
+
process.exit(2);
|
|
156
|
+
}
|
|
157
|
+
throw e;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const surface = args.surface ? JSON.parse(readFileSync(resolve(args.surface), "utf8")) : { messages: [] };
|
|
161
|
+
const { catalog, mapping, validation, report } = transform(doc, args.version, surface, profile);
|
|
136
162
|
mkdirSync(resolve(args.out), { recursive: true });
|
|
137
163
|
const base = resolve(args.out);
|
|
138
164
|
writeFileSync(join(base, `catalog.${seg}.json`), JSON.stringify(catalog, null, 2) + "\n");
|
|
@@ -156,7 +182,7 @@ function main() {
|
|
|
156
182
|
const csr = JSON.parse(readFileSync(resolve(args.emitSurface), "utf8"));
|
|
157
183
|
let emitted;
|
|
158
184
|
try {
|
|
159
|
-
emitted = emitSurface(csr, doc);
|
|
185
|
+
emitted = emitSurface(csr, doc, { profile });
|
|
160
186
|
}
|
|
161
187
|
catch (e) {
|
|
162
188
|
if (e instanceof EmitSurfaceError) {
|
|
@@ -172,7 +198,7 @@ function main() {
|
|
|
172
198
|
console.log(`${tag} note ${w.code}: ${w.message}`);
|
|
173
199
|
// Gate A3 over the emitted surface: its instances must validate against the
|
|
174
200
|
// catalog generated in this same run.
|
|
175
|
-
const check = transform(doc, args.version, { messages: emitted.messages });
|
|
201
|
+
const check = transform(doc, args.version, { messages: emitted.messages }, profile);
|
|
176
202
|
const instanceGate = check.validation.gates.find((g) => g.name === "instance");
|
|
177
203
|
console.log(`${tag} emitted surface -> ${outPath}`);
|
|
178
204
|
console.log(`${tag} ${instanceGate?.pass ? "PASS" : "FAIL"} instance (emitted surface vs generated catalog)`);
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { transform, transformFromJson, type TransformOutput } from "./transform/index.js";
|
|
9
9
|
export { shadcnProfile, type Profile, type ComponentPlan, type SurfacePlanDirectives } from "./transform/profiles.js";
|
|
10
|
+
export { loadProfile, profileSchema, ProfileLoadError, type ProfileLoadIssue } from "./transform/profile-load.js";
|
|
11
|
+
export { scaffoldProfile, type ScaffoldOptions, type ScaffoldResult, type ScaffoldNote } from "./transform/scaffold.js";
|
|
10
12
|
export { validateCatalog, extractInstances, type ValidationReport, type GateResult } from "./validate/ajv.js";
|
|
11
13
|
export { emitSurface, slug, EmitSurfaceError, type EmitSurfaceResult, type EmitSurfaceOptions, } from "./targets/a2ui/surface.js";
|
|
12
14
|
export { emitJsonRenderSpec, validateSpecAgainstModel, EmitJsonRenderError, type EmitJsonRenderResult, type EmitJsonRenderOptions, type JsonRenderSpec, type JsonRenderElement, type SpecFinding, } from "./targets/json-render/emit.js";
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { transform, transformFromJson } from "./transform/index.js";
|
|
9
9
|
export { shadcnProfile } from "./transform/profiles.js";
|
|
10
|
+
export { loadProfile, profileSchema, ProfileLoadError } from "./transform/profile-load.js";
|
|
11
|
+
export { scaffoldProfile } from "./transform/scaffold.js";
|
|
10
12
|
export { validateCatalog, extractInstances } from "./validate/ajv.js";
|
|
11
13
|
export { emitSurface, slug, EmitSurfaceError, } from "./targets/a2ui/surface.js";
|
|
12
14
|
export { emitJsonRenderSpec, validateSpecAgainstModel, EmitJsonRenderError, } from "./targets/json-render/emit.js";
|
|
@@ -72,6 +72,13 @@ class SurfaceEmitter {
|
|
|
72
72
|
emitNode(node, path) {
|
|
73
73
|
const plan = this.byDspackId.get(node.component);
|
|
74
74
|
if (!plan) {
|
|
75
|
+
// A declared casualty refuses with its authored reason — the refusal is
|
|
76
|
+
// the profile author's decision, and the message should say so.
|
|
77
|
+
const casualty = this.profile.casualtyComponents.find((c) => c.dspackId === node.component);
|
|
78
|
+
if (casualty) {
|
|
79
|
+
throw new EmitSurfaceError(`component '${node.component}' is a declared casualty (${casualty.class}) of the ` +
|
|
80
|
+
`'${this.profile.catalogTitle}' profile: ${casualty.reason}`, path);
|
|
81
|
+
}
|
|
75
82
|
throw new EmitSurfaceError(`unknown component '${node.component}': not a mapped component of the '${this.profile.catalogTitle}' profile ` +
|
|
76
83
|
`(sub-components are consumed by their compound parent and cannot be emitted standalone)`, path);
|
|
77
84
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Profile } from "./profiles.js";
|
|
2
|
+
/** The profile schema, as shipped (also exported for hosts that surface it in UI). */
|
|
3
|
+
export { profileSchema } from "./profile-schema.js";
|
|
4
|
+
export interface ProfileLoadIssue {
|
|
5
|
+
/** JSON path into the offending document (ajv instancePath). */
|
|
6
|
+
path: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ProfileLoadError extends Error {
|
|
10
|
+
readonly issues: ProfileLoadIssue[];
|
|
11
|
+
constructor(issues: ProfileLoadIssue[]);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Validate `json` as a v1 profile document and return the engine-ready
|
|
15
|
+
* `Profile`. The `profileVersion` envelope field is stripped — it belongs to
|
|
16
|
+
* the document format, not the engine. Top-level `x-` extension keys are
|
|
17
|
+
* preserved (the engine ignores them; provenance tools may not).
|
|
18
|
+
*/
|
|
19
|
+
export declare function loadProfile(json: unknown): Profile;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile-as-data: load a mapping Profile from JSON.
|
|
3
|
+
*
|
|
4
|
+
* The Profile has always been pure data (profiles.ts); this module makes it
|
|
5
|
+
* *reachable* as data. `loadProfile` validates an untrusted JSON value against
|
|
6
|
+
* schema `profile.v1.schema.json` (a one-to-one mirror of the TypeScript
|
|
7
|
+
* `Profile` interface plus a `profileVersion` envelope const) and returns the
|
|
8
|
+
* engine-ready `Profile`. Validation gates shape only — every judgment call
|
|
9
|
+
* (valueMaps, casualties, surface plans) stays with the profile's author.
|
|
10
|
+
*
|
|
11
|
+
* Toolchain: ajv draft 2020-12, `strict: false`, ajv-formats — the same
|
|
12
|
+
* convention as the catalog gates (src/validate/ajv.ts) and the dspack
|
|
13
|
+
* harness.
|
|
14
|
+
*/
|
|
15
|
+
import Ajv2020 from "ajv/dist/2020.js";
|
|
16
|
+
import addFormats from "ajv-formats";
|
|
17
|
+
import { profileSchema } from "./profile-schema.js";
|
|
18
|
+
/** The profile schema, as shipped (also exported for hosts that surface it in UI). */
|
|
19
|
+
export { profileSchema } from "./profile-schema.js";
|
|
20
|
+
export class ProfileLoadError extends Error {
|
|
21
|
+
issues;
|
|
22
|
+
constructor(issues) {
|
|
23
|
+
super(`profile does not conform to profile.v1.schema.json (${issues.length} issue${issues.length === 1 ? "" : "s"}): ` +
|
|
24
|
+
issues
|
|
25
|
+
.slice(0, 3)
|
|
26
|
+
.map((i) => `${i.path || "$"}: ${i.message}`)
|
|
27
|
+
.join("; ") +
|
|
28
|
+
(issues.length > 3 ? "; …" : ""));
|
|
29
|
+
this.issues = issues;
|
|
30
|
+
this.name = "ProfileLoadError";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
let compiled;
|
|
34
|
+
function validator() {
|
|
35
|
+
if (!compiled) {
|
|
36
|
+
const ajv = new Ajv2020({ strict: false, allErrors: true, validateFormats: true });
|
|
37
|
+
addFormats(ajv);
|
|
38
|
+
compiled = ajv.compile(profileSchema);
|
|
39
|
+
}
|
|
40
|
+
return compiled;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Validate `json` as a v1 profile document and return the engine-ready
|
|
44
|
+
* `Profile`. The `profileVersion` envelope field is stripped — it belongs to
|
|
45
|
+
* the document format, not the engine. Top-level `x-` extension keys are
|
|
46
|
+
* preserved (the engine ignores them; provenance tools may not).
|
|
47
|
+
*/
|
|
48
|
+
export function loadProfile(json) {
|
|
49
|
+
const validate = validator();
|
|
50
|
+
if (!validate(json)) {
|
|
51
|
+
const errors = (validate.errors ?? []);
|
|
52
|
+
throw new ProfileLoadError(errors.map((e) => ({ path: e.instancePath ?? "", message: e.message ?? "invalid" })));
|
|
53
|
+
}
|
|
54
|
+
const { profileVersion: _envelope, ...profile } = json;
|
|
55
|
+
return profile;
|
|
56
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime mirror of profile.v1.schema.json. The .json file stays the
|
|
3
|
+
* reviewable schema document (docs/PROFILES.md links it); this constant
|
|
4
|
+
* exists because loadProfile must run in a browser bundle (dspack-studio
|
|
5
|
+
* composer), where readFileSync is not available. src/schema-mirrors.test.ts
|
|
6
|
+
* asserts mirror and JSON stay identical — edit both together.
|
|
7
|
+
*/
|
|
8
|
+
export declare const profileSchema: Record<string, unknown>;
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime mirror of profile.v1.schema.json. The .json file stays the
|
|
3
|
+
* reviewable schema document (docs/PROFILES.md links it); this constant
|
|
4
|
+
* exists because loadProfile must run in a browser bundle (dspack-studio
|
|
5
|
+
* composer), where readFileSync is not available. src/schema-mirrors.test.ts
|
|
6
|
+
* asserts mirror and JSON stay identical — edit both together.
|
|
7
|
+
*/
|
|
8
|
+
export const profileSchema = {
|
|
9
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10
|
+
"$id": "https://aestheticfunction.github.io/dspack-emit/schema/profile.v1.schema.json",
|
|
11
|
+
"title": "dspack-emit a2ui Profile v1",
|
|
12
|
+
"description": "JSON form of the a2ui target's mapping Profile. Mirrors the TypeScript Profile interface in src/transform/profiles.ts one to one; loadProfile() validates against this schema before the engine runs.",
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"patternProperties": {
|
|
16
|
+
"^x-": {}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"profileVersion",
|
|
20
|
+
"catalogTitle",
|
|
21
|
+
"catalogDescription",
|
|
22
|
+
"catalogIdBase",
|
|
23
|
+
"instructions",
|
|
24
|
+
"primaryColorToken",
|
|
25
|
+
"components",
|
|
26
|
+
"synthesized",
|
|
27
|
+
"casualtyComponents",
|
|
28
|
+
"surfaceSynthesis"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"profileVersion": {
|
|
32
|
+
"const": "1"
|
|
33
|
+
},
|
|
34
|
+
"catalogTitle": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"catalogDescription": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1
|
|
41
|
+
},
|
|
42
|
+
"catalogIdBase": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "uri",
|
|
45
|
+
"pattern": "^https://"
|
|
46
|
+
},
|
|
47
|
+
"instructions": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"primaryColorToken": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": [
|
|
54
|
+
"category",
|
|
55
|
+
"name"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"category": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
},
|
|
62
|
+
"name": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"components": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"$ref": "#/$defs/componentPlan"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"synthesized": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"$ref": "#/$defs/componentPlan"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"casualtyComponents": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"patternProperties": {
|
|
86
|
+
"^x-": {}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"dspackId",
|
|
90
|
+
"attempted",
|
|
91
|
+
"class",
|
|
92
|
+
"reason"
|
|
93
|
+
],
|
|
94
|
+
"properties": {
|
|
95
|
+
"dspackId": {
|
|
96
|
+
"$ref": "#/$defs/dspackId"
|
|
97
|
+
},
|
|
98
|
+
"attempted": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"minLength": 1
|
|
101
|
+
},
|
|
102
|
+
"class": {
|
|
103
|
+
"enum": [
|
|
104
|
+
"maps-cleanly",
|
|
105
|
+
"synthesis-defaults",
|
|
106
|
+
"lossy",
|
|
107
|
+
"cannot-represent"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"reason": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"intentionallyOmitted": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": {
|
|
120
|
+
"$ref": "#/$defs/dspackId"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"surfaceSynthesis": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": [
|
|
127
|
+
"textComponent",
|
|
128
|
+
"textProp",
|
|
129
|
+
"wrapComponent",
|
|
130
|
+
"wrapChildrenProp"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"textComponent": {
|
|
134
|
+
"$ref": "#/$defs/a2uiName"
|
|
135
|
+
},
|
|
136
|
+
"textProp": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1
|
|
139
|
+
},
|
|
140
|
+
"wrapComponent": {
|
|
141
|
+
"$ref": "#/$defs/a2uiName"
|
|
142
|
+
},
|
|
143
|
+
"wrapChildrenProp": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"$defs": {
|
|
151
|
+
"dspackId": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
154
|
+
},
|
|
155
|
+
"a2uiName": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$"
|
|
158
|
+
},
|
|
159
|
+
"componentPlan": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"patternProperties": {
|
|
163
|
+
"^x-": {}
|
|
164
|
+
},
|
|
165
|
+
"required": [
|
|
166
|
+
"a2ui",
|
|
167
|
+
"commons",
|
|
168
|
+
"structural",
|
|
169
|
+
"required"
|
|
170
|
+
],
|
|
171
|
+
"properties": {
|
|
172
|
+
"a2ui": {
|
|
173
|
+
"$ref": "#/$defs/a2uiName"
|
|
174
|
+
},
|
|
175
|
+
"dspackId": {
|
|
176
|
+
"$ref": "#/$defs/dspackId"
|
|
177
|
+
},
|
|
178
|
+
"description": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"commons": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 1
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"structural": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"additionalProperties": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": [
|
|
194
|
+
"schema",
|
|
195
|
+
"description",
|
|
196
|
+
"synthNote"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"schema": {},
|
|
200
|
+
"description": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"minLength": 1
|
|
203
|
+
},
|
|
204
|
+
"synthNote": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"minLength": 1
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"propMap": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"additionalProperties": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"required": [
|
|
217
|
+
"a2ui",
|
|
218
|
+
"kind"
|
|
219
|
+
],
|
|
220
|
+
"properties": {
|
|
221
|
+
"a2ui": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"minLength": 1
|
|
224
|
+
},
|
|
225
|
+
"kind": {
|
|
226
|
+
"enum": [
|
|
227
|
+
"enum",
|
|
228
|
+
"string",
|
|
229
|
+
"boolean",
|
|
230
|
+
"number"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"targetEnum": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
238
|
+
"minItems": 1
|
|
239
|
+
},
|
|
240
|
+
"valueMap": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"additionalProperties": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"default": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
},
|
|
249
|
+
"description": {
|
|
250
|
+
"type": "string"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"required": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"items": {
|
|
258
|
+
"type": "string"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"surfacePlan": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"additionalProperties": false,
|
|
264
|
+
"properties": {
|
|
265
|
+
"subText": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"additionalProperties": {
|
|
268
|
+
"type": "string"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"subButtonText": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"additionalProperties": {
|
|
274
|
+
"type": "string"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"actionProp": {
|
|
278
|
+
"type": "string"
|
|
279
|
+
},
|
|
280
|
+
"textChildProp": {
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
"textProp": {
|
|
284
|
+
"type": "string"
|
|
285
|
+
},
|
|
286
|
+
"childProp": {
|
|
287
|
+
"type": "string"
|
|
288
|
+
},
|
|
289
|
+
"childrenProp": {
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
"structuralPassthrough": {
|
|
293
|
+
"type": "array",
|
|
294
|
+
"items": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"subTable": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"additionalProperties": false,
|
|
301
|
+
"required": [
|
|
302
|
+
"caption",
|
|
303
|
+
"header",
|
|
304
|
+
"headerCell",
|
|
305
|
+
"body",
|
|
306
|
+
"row",
|
|
307
|
+
"cell",
|
|
308
|
+
"targetCaption",
|
|
309
|
+
"targetColumns",
|
|
310
|
+
"targetRows",
|
|
311
|
+
"drops"
|
|
312
|
+
],
|
|
313
|
+
"properties": {
|
|
314
|
+
"caption": {
|
|
315
|
+
"type": "string"
|
|
316
|
+
},
|
|
317
|
+
"header": {
|
|
318
|
+
"type": "string"
|
|
319
|
+
},
|
|
320
|
+
"headerCell": {
|
|
321
|
+
"type": "string"
|
|
322
|
+
},
|
|
323
|
+
"body": {
|
|
324
|
+
"type": "string"
|
|
325
|
+
},
|
|
326
|
+
"row": {
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"cell": {
|
|
330
|
+
"type": "string"
|
|
331
|
+
},
|
|
332
|
+
"targetCaption": {
|
|
333
|
+
"type": "string"
|
|
334
|
+
},
|
|
335
|
+
"targetColumns": {
|
|
336
|
+
"type": "string"
|
|
337
|
+
},
|
|
338
|
+
"targetRows": {
|
|
339
|
+
"type": "string"
|
|
340
|
+
},
|
|
341
|
+
"drops": {
|
|
342
|
+
"type": "object",
|
|
343
|
+
"additionalProperties": {
|
|
344
|
+
"type": "string"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"subFlatten": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"additionalProperties": false,
|
|
352
|
+
"required": [
|
|
353
|
+
"transparent",
|
|
354
|
+
"asText"
|
|
355
|
+
],
|
|
356
|
+
"properties": {
|
|
357
|
+
"transparent": {
|
|
358
|
+
"type": "array",
|
|
359
|
+
"items": {
|
|
360
|
+
"$ref": "#/$defs/dspackId"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"asText": {
|
|
364
|
+
"type": "object",
|
|
365
|
+
"additionalProperties": {
|
|
366
|
+
"type": "string"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"subCoverage": {
|
|
374
|
+
"type": "object",
|
|
375
|
+
"additionalProperties": {
|
|
376
|
+
"type": "string"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|