@aestheticfunction/dspack-emit 0.4.0 → 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/dist/transform/profile-load.d.ts +2 -2
- package/dist/transform/profile-load.js +3 -5
- package/dist/transform/profile-schema.d.ts +8 -0
- package/dist/transform/profile-schema.js +382 -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 +2 -2
- package/src/browser-boundary.test.ts +47 -0
- package/src/schema-mirrors.test.ts +30 -0
- package/src/transform/profile-load.ts +4 -7
- package/src/transform/profile-schema.ts +382 -0
- package/src/validate/ajv.ts +2 -6
- package/src/validate/meta/catalog-meta.ts +167 -0
- package/dist/transform/profile.v1.schema.json +0 -153
- 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
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://aestheticfunction.github.io/dspack-emit/schema/profile.v1.schema.json",
|
|
4
|
-
"title": "dspack-emit a2ui Profile v1",
|
|
5
|
-
"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.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"patternProperties": { "^x-": {} },
|
|
9
|
-
"required": [
|
|
10
|
-
"profileVersion",
|
|
11
|
-
"catalogTitle",
|
|
12
|
-
"catalogDescription",
|
|
13
|
-
"catalogIdBase",
|
|
14
|
-
"instructions",
|
|
15
|
-
"primaryColorToken",
|
|
16
|
-
"components",
|
|
17
|
-
"synthesized",
|
|
18
|
-
"casualtyComponents",
|
|
19
|
-
"surfaceSynthesis"
|
|
20
|
-
],
|
|
21
|
-
"properties": {
|
|
22
|
-
"profileVersion": { "const": "1" },
|
|
23
|
-
"catalogTitle": { "type": "string", "minLength": 1 },
|
|
24
|
-
"catalogDescription": { "type": "string", "minLength": 1 },
|
|
25
|
-
"catalogIdBase": { "type": "string", "format": "uri", "pattern": "^https://" },
|
|
26
|
-
"instructions": { "type": "string" },
|
|
27
|
-
"primaryColorToken": {
|
|
28
|
-
"type": "object",
|
|
29
|
-
"additionalProperties": false,
|
|
30
|
-
"required": ["category", "name"],
|
|
31
|
-
"properties": {
|
|
32
|
-
"category": { "type": "string", "minLength": 1 },
|
|
33
|
-
"name": { "type": "string", "minLength": 1 }
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"components": { "type": "array", "items": { "$ref": "#/$defs/componentPlan" } },
|
|
37
|
-
"synthesized": { "type": "array", "items": { "$ref": "#/$defs/componentPlan" } },
|
|
38
|
-
"casualtyComponents": {
|
|
39
|
-
"type": "array",
|
|
40
|
-
"items": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"additionalProperties": false,
|
|
43
|
-
"patternProperties": { "^x-": {} },
|
|
44
|
-
"required": ["dspackId", "attempted", "class", "reason"],
|
|
45
|
-
"properties": {
|
|
46
|
-
"dspackId": { "$ref": "#/$defs/dspackId" },
|
|
47
|
-
"attempted": { "type": "string", "minLength": 1 },
|
|
48
|
-
"class": { "enum": ["maps-cleanly", "synthesis-defaults", "lossy", "cannot-represent"] },
|
|
49
|
-
"reason": { "type": "string", "minLength": 1 }
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"intentionallyOmitted": { "type": "array", "items": { "$ref": "#/$defs/dspackId" } },
|
|
54
|
-
"surfaceSynthesis": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"additionalProperties": false,
|
|
57
|
-
"required": ["textComponent", "textProp", "wrapComponent", "wrapChildrenProp"],
|
|
58
|
-
"properties": {
|
|
59
|
-
"textComponent": { "$ref": "#/$defs/a2uiName" },
|
|
60
|
-
"textProp": { "type": "string", "minLength": 1 },
|
|
61
|
-
"wrapComponent": { "$ref": "#/$defs/a2uiName" },
|
|
62
|
-
"wrapChildrenProp": { "type": "string", "minLength": 1 }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"$defs": {
|
|
67
|
-
"dspackId": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
68
|
-
"a2uiName": { "type": "string", "pattern": "^[A-Z][A-Za-z0-9]*$" },
|
|
69
|
-
"componentPlan": {
|
|
70
|
-
"type": "object",
|
|
71
|
-
"additionalProperties": false,
|
|
72
|
-
"patternProperties": { "^x-": {} },
|
|
73
|
-
"required": ["a2ui", "commons", "structural", "required"],
|
|
74
|
-
"properties": {
|
|
75
|
-
"a2ui": { "$ref": "#/$defs/a2uiName" },
|
|
76
|
-
"dspackId": { "$ref": "#/$defs/dspackId" },
|
|
77
|
-
"description": { "type": "string" },
|
|
78
|
-
"commons": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
79
|
-
"structural": {
|
|
80
|
-
"type": "object",
|
|
81
|
-
"additionalProperties": {
|
|
82
|
-
"type": "object",
|
|
83
|
-
"additionalProperties": false,
|
|
84
|
-
"required": ["schema", "description", "synthNote"],
|
|
85
|
-
"properties": {
|
|
86
|
-
"schema": {},
|
|
87
|
-
"description": { "type": "string", "minLength": 1 },
|
|
88
|
-
"synthNote": { "type": "string", "minLength": 1 }
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"propMap": {
|
|
93
|
-
"type": "object",
|
|
94
|
-
"additionalProperties": {
|
|
95
|
-
"type": "object",
|
|
96
|
-
"additionalProperties": false,
|
|
97
|
-
"required": ["a2ui", "kind"],
|
|
98
|
-
"properties": {
|
|
99
|
-
"a2ui": { "type": "string", "minLength": 1 },
|
|
100
|
-
"kind": { "enum": ["enum", "string", "boolean", "number"] },
|
|
101
|
-
"targetEnum": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
102
|
-
"valueMap": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
103
|
-
"default": { "type": "string" },
|
|
104
|
-
"description": { "type": "string" }
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"required": { "type": "array", "items": { "type": "string" } },
|
|
109
|
-
"surfacePlan": {
|
|
110
|
-
"type": "object",
|
|
111
|
-
"additionalProperties": false,
|
|
112
|
-
"properties": {
|
|
113
|
-
"subText": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
114
|
-
"subButtonText": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
115
|
-
"actionProp": { "type": "string" },
|
|
116
|
-
"textChildProp": { "type": "string" },
|
|
117
|
-
"textProp": { "type": "string" },
|
|
118
|
-
"childProp": { "type": "string" },
|
|
119
|
-
"childrenProp": { "type": "string" },
|
|
120
|
-
"structuralPassthrough": { "type": "array", "items": { "type": "string" } },
|
|
121
|
-
"subTable": {
|
|
122
|
-
"type": "object",
|
|
123
|
-
"additionalProperties": false,
|
|
124
|
-
"required": ["caption", "header", "headerCell", "body", "row", "cell", "targetCaption", "targetColumns", "targetRows", "drops"],
|
|
125
|
-
"properties": {
|
|
126
|
-
"caption": { "type": "string" },
|
|
127
|
-
"header": { "type": "string" },
|
|
128
|
-
"headerCell": { "type": "string" },
|
|
129
|
-
"body": { "type": "string" },
|
|
130
|
-
"row": { "type": "string" },
|
|
131
|
-
"cell": { "type": "string" },
|
|
132
|
-
"targetCaption": { "type": "string" },
|
|
133
|
-
"targetColumns": { "type": "string" },
|
|
134
|
-
"targetRows": { "type": "string" },
|
|
135
|
-
"drops": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"subFlatten": {
|
|
139
|
-
"type": "object",
|
|
140
|
-
"additionalProperties": false,
|
|
141
|
-
"required": ["transparent", "asText"],
|
|
142
|
-
"properties": {
|
|
143
|
-
"transparent": { "type": "array", "items": { "$ref": "#/$defs/dspackId" } },
|
|
144
|
-
"asText": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"subCoverage": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://rdombrowski.dev/meta/a2ui-catalog.v0_9_1.json",
|
|
4
|
-
"title": "A2UI catalog shape (v0.9.1)",
|
|
5
|
-
"description": "Structural invariants an A2UI v0.9.1 catalog must satisfy, derived from the checked-in basic catalog fixture. The version-distinguishing requirement is $defs.theme (with primaryColor).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["$schema", "$id", "catalogId", "title", "description", "components", "$defs"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"catalogId": { "type": "string", "format": "uri" },
|
|
10
|
-
"$id": { "type": "string", "format": "uri" },
|
|
11
|
-
"components": {
|
|
12
|
-
"type": "object",
|
|
13
|
-
"minProperties": 1,
|
|
14
|
-
"additionalProperties": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"required": ["allOf", "unevaluatedProperties"],
|
|
17
|
-
"properties": {
|
|
18
|
-
"allOf": { "type": "array", "minItems": 1 },
|
|
19
|
-
"unevaluatedProperties": { "const": false }
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"$defs": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": ["anyComponent", "theme"],
|
|
26
|
-
"not": { "required": ["surfaceProperties"] },
|
|
27
|
-
"properties": {
|
|
28
|
-
"anyComponent": { "type": "object", "required": ["oneOf"] },
|
|
29
|
-
"theme": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"required": ["properties"],
|
|
32
|
-
"properties": {
|
|
33
|
-
"properties": { "type": "object", "required": ["primaryColor"] }
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://rdombrowski.dev/meta/a2ui-catalog.v1_0.json",
|
|
4
|
-
"title": "A2UI catalog shape (v1.0)",
|
|
5
|
-
"description": "Structural invariants an A2UI v1.0 catalog must satisfy, derived from the checked-in basic catalog fixture. The version-distinguishing requirement is $defs.surfaceProperties (and the absence of $defs.theme).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["$schema", "$id", "catalogId", "title", "description", "components", "$defs"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"catalogId": { "type": "string", "format": "uri" },
|
|
10
|
-
"$id": { "type": "string", "format": "uri" },
|
|
11
|
-
"instructions": { "type": "string" },
|
|
12
|
-
"components": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"minProperties": 1,
|
|
15
|
-
"additionalProperties": {
|
|
16
|
-
"type": "object",
|
|
17
|
-
"required": ["allOf", "unevaluatedProperties"],
|
|
18
|
-
"properties": {
|
|
19
|
-
"allOf": { "type": "array", "minItems": 1 },
|
|
20
|
-
"unevaluatedProperties": { "const": false }
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"$defs": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"required": ["anyComponent", "surfaceProperties"],
|
|
27
|
-
"not": { "required": ["theme"] },
|
|
28
|
-
"properties": {
|
|
29
|
-
"anyComponent": { "type": "object", "required": ["oneOf"] },
|
|
30
|
-
"surfaceProperties": { "type": "object", "required": ["properties"] }
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|