@cagov/ca-ds 1.0.0 → 1.1.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 +4 -2
- package/THIRD-PARTY-LICENSES.txt +690 -0
- package/ca-ds.js +48337 -0
- package/package.json +5 -31
- package/bin/ca-ds.js +0 -5
- package/src/cli/add.js +0 -134
- package/src/cli/build.js +0 -15
- package/src/cli/diff.js +0 -39
- package/src/cli/eject.js +0 -112
- package/src/cli/exit.js +0 -22
- package/src/cli/format.js +0 -52
- package/src/cli/init.js +0 -148
- package/src/cli/install.js +0 -178
- package/src/cli/items.js +0 -10
- package/src/cli/login.js +0 -331
- package/src/cli/main.js +0 -108
- package/src/cli/new.js +0 -230
- package/src/cli/outdated.js +0 -74
- package/src/cli/pack.js +0 -75
- package/src/cli/preview.js +0 -31
- package/src/cli/publish.js +0 -295
- package/src/cli/pull.js +0 -208
- package/src/cli/remote.js +0 -52
- package/src/cli/remove.js +0 -69
- package/src/cli/update.js +0 -223
- package/src/cli/validate.js +0 -131
- package/src/lib/browser.js +0 -12
- package/src/lib/build.js +0 -249
- package/src/lib/bundle.js +0 -148
- package/src/lib/catalog.js +0 -44
- package/src/lib/checks.js +0 -31
- package/src/lib/collection.js +0 -65
- package/src/lib/emblem.js +0 -29
- package/src/lib/fixtures.js +0 -59
- package/src/lib/floor.js +0 -79
- package/src/lib/glyph.js +0 -148
- package/src/lib/image.js +0 -138
- package/src/lib/json-text.js +0 -213
- package/src/lib/keys.js +0 -322
- package/src/lib/links.js +0 -321
- package/src/lib/markdown.js +0 -408
- package/src/lib/merge.js +0 -93
- package/src/lib/pack.js +0 -30
- package/src/lib/page-schema.js +0 -368
- package/src/lib/page.js +0 -372
- package/src/lib/patch.js +0 -9
- package/src/lib/regions.js +0 -173
- package/src/lib/registry.js +0 -371
- package/src/lib/release.js +0 -119
- package/src/lib/repoints.js +0 -120
- package/src/lib/resolve.js +0 -32
- package/src/lib/schema.js +0 -28
- package/src/lib/serial.js +0 -4
- package/src/lib/serialize.js +0 -444
- package/src/lib/structured.js +0 -72
- package/src/lib/system.js +0 -13
- package/src/lib/targets.js +0 -85
- package/src/lib/terms.js +0 -11
- package/src/lib/token-view.js +0 -289
- package/src/lib/tokens.js +0 -247
- package/src/lib/version.js +0 -34
- package/src/preview/frame.js +0 -75
- package/src/preview/pages.js +0 -128
- package/src/preview/screenshots.js +0 -72
- package/src/preview/server.js +0 -378
- package/src/preview/shell.js +0 -153
- package/src/schema/a11y.schema.json +0 -56
- package/src/schema/collection.lock.schema.json +0 -58
- package/src/schema/collection.schema.json +0 -65
- package/src/schema/composition.schema.json +0 -98
- package/src/schema/contract.schema.json +0 -116
- package/src/schema/interface.schema.json +0 -257
- package/src/schema/item.schema.json +0 -362
- package/src/schema/release.schema.json +0 -39
- package/src/schema/system.schema.json +0 -75
- package/src/schema/variants.schema.json +0 -60
- package/src/validate/collection.js +0 -19
- package/src/validate/collisions.js +0 -124
- package/src/validate/context.js +0 -357
- package/src/validate/facts.js +0 -253
- package/src/validate/files.js +0 -103
- package/src/validate/findings.js +0 -19
- package/src/validate/glyphs.js +0 -126
- package/src/validate/html.js +0 -215
- package/src/validate/imports.js +0 -29
- package/src/validate/index.js +0 -75
- package/src/validate/item.js +0 -47
- package/src/validate/links.js +0 -113
- package/src/validate/manifest.js +0 -147
- package/src/validate/media.js +0 -65
- package/src/validate/page.js +0 -74
- package/src/validate/prefixes.js +0 -58
- package/src/validate/relations.js +0 -310
- package/src/validate/release.js +0 -109
- package/src/validate/skill.js +0 -122
- package/src/validate/structured.js +0 -335
- package/src/validate/tasc.js +0 -80
- package/src/validate/template.js +0 -129
- package/src/validate/tokens.js +0 -154
- package/src/validate/zip.js +0 -40
- /package/{src/preview/preview.css → preview.css} +0 -0
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "interface.schema.json",
|
|
4
|
-
"title": "<name>.interface.json",
|
|
5
|
-
"description": "A component's interface: every name a consumer may write, the elements, attributes and values, children, classes, knobs, markers, and events. A name outside it is invented. Platform-global attributes appear only where the component gives them a meaning the platform doesn't, and tokens never appear, since the token layer names them.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"minProperties": 1,
|
|
9
|
-
"properties": {
|
|
10
|
-
"$comment": {
|
|
11
|
-
"description": "A note for maintainers. It carries no data.",
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"elements": {
|
|
15
|
-
"description": "The <ca-*> elements the component owns, keyed by tag, and the extension records of elements other items own.",
|
|
16
|
-
"type": "object",
|
|
17
|
-
"minProperties": 1,
|
|
18
|
-
"propertyNames": { "pattern": "^ca-[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
19
|
-
"additionalProperties": { "$ref": "#/$defs/element" }
|
|
20
|
-
},
|
|
21
|
-
"classes": {
|
|
22
|
-
"description": "The .ca-* classes the component owns, a base class first and its modifiers after it.",
|
|
23
|
-
"type": "array",
|
|
24
|
-
"minItems": 1,
|
|
25
|
-
"items": { "$ref": "#/$defs/class" }
|
|
26
|
-
},
|
|
27
|
-
"properties": {
|
|
28
|
-
"description": "The knobs a class collection publishes. An element's knobs sit on the element.",
|
|
29
|
-
"$ref": "#/$defs/properties"
|
|
30
|
-
},
|
|
31
|
-
"markers": {
|
|
32
|
-
"description": "Attributes a class collection's CSS reads off the elements it styles, such as aria-label sizing an icon-only button. An element's markers sit on the element.",
|
|
33
|
-
"$ref": "#/$defs/markers"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"$defs": {
|
|
37
|
-
"text": { "type": "string", "minLength": 1 },
|
|
38
|
-
"tag": {
|
|
39
|
-
"description": "An element form in angle brackets, which may carry the attributes it must be authored with, such as <p aria-live=\"polite\">.",
|
|
40
|
-
"type": "string",
|
|
41
|
-
"pattern": "^<[a-z][a-z0-9-]*( [^>]*)?>$"
|
|
42
|
-
},
|
|
43
|
-
"element": {
|
|
44
|
-
"type": "object",
|
|
45
|
-
"additionalProperties": false,
|
|
46
|
-
"required": ["meaning"],
|
|
47
|
-
"properties": {
|
|
48
|
-
"extends": {
|
|
49
|
-
"description": "The item that owns the element, by scoped name, which makes this record an extension record. An extension record holds only the names the component adds: attributes, values of an owner's attribute, children, knobs, markers, and events. An attribute the owner declares lists only the added values, with the owner's absent.",
|
|
50
|
-
"type": "string",
|
|
51
|
-
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*/[a-z0-9]+(-[a-z0-9]+)*$"
|
|
52
|
-
},
|
|
53
|
-
"meaning": {
|
|
54
|
-
"description": "One sentence on what the element is, or in an extension record, on what the component adds to it.",
|
|
55
|
-
"$ref": "#/$defs/text"
|
|
56
|
-
},
|
|
57
|
-
"attributes": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"minItems": 1,
|
|
60
|
-
"items": { "$ref": "#/$defs/attribute" }
|
|
61
|
-
},
|
|
62
|
-
"children": {
|
|
63
|
-
"description": "What goes directly inside the element, slotted or not.",
|
|
64
|
-
"type": "array",
|
|
65
|
-
"minItems": 1,
|
|
66
|
-
"items": { "$ref": "#/$defs/child" }
|
|
67
|
-
},
|
|
68
|
-
"properties": { "$ref": "#/$defs/properties" },
|
|
69
|
-
"markers": { "$ref": "#/$defs/markers" },
|
|
70
|
-
"events": {
|
|
71
|
-
"type": "array",
|
|
72
|
-
"minItems": 1,
|
|
73
|
-
"items": { "$ref": "#/$defs/event" }
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"attribute": {
|
|
78
|
-
"type": "object",
|
|
79
|
-
"additionalProperties": false,
|
|
80
|
-
"required": ["name", "values", "absent", "meaning"],
|
|
81
|
-
"properties": {
|
|
82
|
-
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
83
|
-
"values": {
|
|
84
|
-
"type": "array",
|
|
85
|
-
"minItems": 1,
|
|
86
|
-
"items": { "$ref": "#/$defs/value" }
|
|
87
|
-
},
|
|
88
|
-
"absent": { "$ref": "#/$defs/absent" },
|
|
89
|
-
"meaning": { "$ref": "#/$defs/text" }
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"value": {
|
|
93
|
-
"description": "A string is a literal value. The objects are a boolean's presence, an inclusive range, and an open set described in words.",
|
|
94
|
-
"oneOf": [
|
|
95
|
-
{ "type": "string", "minLength": 1 },
|
|
96
|
-
{
|
|
97
|
-
"type": "object",
|
|
98
|
-
"additionalProperties": false,
|
|
99
|
-
"required": ["boolean"],
|
|
100
|
-
"properties": { "boolean": { "const": true } }
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"type": "object",
|
|
104
|
-
"additionalProperties": false,
|
|
105
|
-
"required": ["range"],
|
|
106
|
-
"properties": {
|
|
107
|
-
"range": {
|
|
108
|
-
"type": "array",
|
|
109
|
-
"prefixItems": [{ "type": "string" }, { "type": "string" }],
|
|
110
|
-
"minItems": 2,
|
|
111
|
-
"maxItems": 2
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"type": "object",
|
|
117
|
-
"additionalProperties": false,
|
|
118
|
-
"required": ["open"],
|
|
119
|
-
"properties": { "open": { "$ref": "#/$defs/text" } }
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
|
-
"absent": {
|
|
124
|
-
"description": "What an absent attribute means: a value it resolves to, a behavior in words, required for no designed absent state, or script-set for an attribute the element's own script sets and the author never writes.",
|
|
125
|
-
"oneOf": [
|
|
126
|
-
{
|
|
127
|
-
"type": "object",
|
|
128
|
-
"additionalProperties": false,
|
|
129
|
-
"required": ["value"],
|
|
130
|
-
"properties": { "value": { "type": "string", "minLength": 1 } }
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"type": "object",
|
|
134
|
-
"additionalProperties": false,
|
|
135
|
-
"required": ["behavior"],
|
|
136
|
-
"properties": { "behavior": { "$ref": "#/$defs/text" } }
|
|
137
|
-
},
|
|
138
|
-
{ "const": "required" },
|
|
139
|
-
{ "const": "script-set" }
|
|
140
|
-
]
|
|
141
|
-
},
|
|
142
|
-
"required": {
|
|
143
|
-
"description": "true, false, or the condition under which it's required.",
|
|
144
|
-
"oneOf": [
|
|
145
|
-
{ "type": "boolean" },
|
|
146
|
-
{
|
|
147
|
-
"type": "object",
|
|
148
|
-
"additionalProperties": false,
|
|
149
|
-
"required": ["when"],
|
|
150
|
-
"properties": { "when": { "$ref": "#/$defs/text" } }
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
},
|
|
154
|
-
"child": {
|
|
155
|
-
"type": "object",
|
|
156
|
-
"additionalProperties": false,
|
|
157
|
-
"required": ["slot", "element", "required", "meaning"],
|
|
158
|
-
"properties": {
|
|
159
|
-
"slot": {
|
|
160
|
-
"description": "The slot name, or null for a child that takes no slot.",
|
|
161
|
-
"oneOf": [{ "type": "null" }, { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }]
|
|
162
|
-
},
|
|
163
|
-
"element": {
|
|
164
|
-
"description": "The element forms the child may take, or any for any element, or flow for any flow content.",
|
|
165
|
-
"oneOf": [
|
|
166
|
-
{ "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/tag" } },
|
|
167
|
-
{ "enum": ["any", "flow"] }
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
"required": { "$ref": "#/$defs/required" },
|
|
171
|
-
"meaning": { "$ref": "#/$defs/text" }
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
"class": {
|
|
175
|
-
"type": "object",
|
|
176
|
-
"additionalProperties": false,
|
|
177
|
-
"required": ["name", "meaning"],
|
|
178
|
-
"properties": {
|
|
179
|
-
"name": { "type": "string", "pattern": "^\\.ca-[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
180
|
-
"on": {
|
|
181
|
-
"description": "The elements the class is valid on. Absent means any.",
|
|
182
|
-
"type": "array",
|
|
183
|
-
"minItems": 1,
|
|
184
|
-
"items": { "$ref": "#/$defs/tag" }
|
|
185
|
-
},
|
|
186
|
-
"modifies": {
|
|
187
|
-
"description": "The base class a modifier pairs with.",
|
|
188
|
-
"type": "string",
|
|
189
|
-
"pattern": "^\\.ca-[a-z0-9]+(-[a-z0-9]+)*$"
|
|
190
|
-
},
|
|
191
|
-
"meaning": { "$ref": "#/$defs/text" }
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
"properties": {
|
|
195
|
-
"description": "Knobs: the public custom properties the component's own CSS declares or reads with a fallback, each a per-instance input with no design default, a hook a state reads, or a read-only value the component computes that another component reads. Never a token, since the token file names it, and never private plumbing, which takes the --_ca- prefix.",
|
|
196
|
-
"type": "array",
|
|
197
|
-
"minItems": 1,
|
|
198
|
-
"items": {
|
|
199
|
-
"type": "object",
|
|
200
|
-
"additionalProperties": false,
|
|
201
|
-
"required": ["name", "default", "meaning"],
|
|
202
|
-
"properties": {
|
|
203
|
-
"name": { "type": "string", "pattern": "^--ca-[a-z0-9]+(-[a-z0-9_]+)*$" },
|
|
204
|
-
"default": {
|
|
205
|
-
"description": "The knob's first value in the reference CSS, a declaration or a var() read's fallback, or null for none. A default naming a token points at it.",
|
|
206
|
-
"oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }]
|
|
207
|
-
},
|
|
208
|
-
"pairs": {
|
|
209
|
-
"description": "The attributes, or attribute=\"value\" pairs, that re-point the knob. Absent means none does. Each attribute is one the same element takes.",
|
|
210
|
-
"type": "array",
|
|
211
|
-
"minItems": 1,
|
|
212
|
-
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(=\"[^\"]+\")?$" }
|
|
213
|
-
},
|
|
214
|
-
"meaning": { "$ref": "#/$defs/text" }
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
"markers": {
|
|
219
|
-
"type": "array",
|
|
220
|
-
"minItems": 1,
|
|
221
|
-
"items": {
|
|
222
|
-
"type": "object",
|
|
223
|
-
"additionalProperties": false,
|
|
224
|
-
"required": ["attribute", "on", "required", "meaning"],
|
|
225
|
-
"properties": {
|
|
226
|
-
"attribute": {
|
|
227
|
-
"description": "The attribute, or attribute=\"value\".",
|
|
228
|
-
"type": "string",
|
|
229
|
-
"pattern": "^[a-z][a-z0-9-]*(=\"[^\"]+\")?$"
|
|
230
|
-
},
|
|
231
|
-
"on": {
|
|
232
|
-
"description": "The element or class the attribute is read on.",
|
|
233
|
-
"type": "array",
|
|
234
|
-
"minItems": 1,
|
|
235
|
-
"items": { "type": "string", "minLength": 1 }
|
|
236
|
-
},
|
|
237
|
-
"required": { "$ref": "#/$defs/required" },
|
|
238
|
-
"meaning": { "$ref": "#/$defs/text" }
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
"event": {
|
|
243
|
-
"type": "object",
|
|
244
|
-
"additionalProperties": false,
|
|
245
|
-
"required": ["name", "detail", "cancelable", "meaning"],
|
|
246
|
-
"properties": {
|
|
247
|
-
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
248
|
-
"detail": {
|
|
249
|
-
"description": "The detail object's shape, or null for none.",
|
|
250
|
-
"oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1 }]
|
|
251
|
-
},
|
|
252
|
-
"cancelable": { "type": "boolean" },
|
|
253
|
-
"meaning": { "$ref": "#/$defs/text" }
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "item.schema.json",
|
|
4
|
-
"title": "item.json",
|
|
5
|
-
"description": "The manifest at the root of every registry item folder.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": ["name", "kind", "version", "title", "description", "files", "source"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"$comment": {
|
|
11
|
-
"description": "A note for maintainers. It carries no data.",
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
"name": { "$ref": "#/$defs/scopedName" },
|
|
15
|
-
"kind": { "enum": ["component", "tokens", "template", "guidance", "media", "page", "skill"] },
|
|
16
|
-
"version": { "$ref": "#/$defs/semver" },
|
|
17
|
-
"title": { "$ref": "#/$defs/text" },
|
|
18
|
-
"description": { "$ref": "#/$defs/text" },
|
|
19
|
-
"doc": {
|
|
20
|
-
"description": "The item's prose entry file.",
|
|
21
|
-
"$ref": "#/$defs/path"
|
|
22
|
-
},
|
|
23
|
-
"files": {
|
|
24
|
-
"description": "Every file the item ships.",
|
|
25
|
-
"type": "array",
|
|
26
|
-
"minItems": 1,
|
|
27
|
-
"items": { "$ref": "#/$defs/file" }
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"description": "Non-foundation items this one needs, each with a version range.",
|
|
31
|
-
"type": "object",
|
|
32
|
-
"propertyNames": { "$ref": "#/$defs/scopedName" },
|
|
33
|
-
"additionalProperties": { "$ref": "#/$defs/range" }
|
|
34
|
-
},
|
|
35
|
-
"partOf": {
|
|
36
|
-
"description": "The component a part belongs to, its parent, by scoped name in the part's own namespace. The parent lists the part in its dependencies. Allowed on kind component alone.",
|
|
37
|
-
"$ref": "#/$defs/scopedName"
|
|
38
|
-
},
|
|
39
|
-
"remixOf": {
|
|
40
|
-
"description": "The component a remix adds to, its base, by scoped name. The base sits in the remix's dependencies, and every selector the remix ships names its key. Allowed on kind component alone.",
|
|
41
|
-
"$ref": "#/$defs/scopedName"
|
|
42
|
-
},
|
|
43
|
-
"members": {
|
|
44
|
-
"description": "The items this one contains, by scoped name, sorted. Resolve and bundles never expand them. The validator checks the order and the names.",
|
|
45
|
-
"type": "array",
|
|
46
|
-
"minItems": 1,
|
|
47
|
-
"uniqueItems": true,
|
|
48
|
-
"items": { "$ref": "#/$defs/scopedName" }
|
|
49
|
-
},
|
|
50
|
-
"media": {
|
|
51
|
-
"description": "A media leaf's alt text, renditions, and origin. Allowed on kind media alone. The validator checks each rendition against its file.",
|
|
52
|
-
"type": "object",
|
|
53
|
-
"additionalProperties": false,
|
|
54
|
-
"required": ["alt", "renditions"],
|
|
55
|
-
"properties": {
|
|
56
|
-
"alt": {
|
|
57
|
-
"description": "The item's alt text.",
|
|
58
|
-
"$ref": "#/$defs/text"
|
|
59
|
-
},
|
|
60
|
-
"renditions": {
|
|
61
|
-
"type": "array",
|
|
62
|
-
"minItems": 1,
|
|
63
|
-
"items": { "$ref": "#/$defs/rendition" }
|
|
64
|
-
},
|
|
65
|
-
"origin": { "$ref": "#/$defs/origin" }
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"related": {
|
|
69
|
-
"description": "Escalations: a condition and the items to load when it holds.",
|
|
70
|
-
"type": "array",
|
|
71
|
-
"items": { "$ref": "#/$defs/related" }
|
|
72
|
-
},
|
|
73
|
-
"tasks": { "$ref": "#/$defs/tasks" },
|
|
74
|
-
"slug": {
|
|
75
|
-
"description": "A page's path on the docs site: one lowercase segment, as a name is spelled, or the empty string for the home page. Allowed on kind page alone.",
|
|
76
|
-
"type": "string",
|
|
77
|
-
"pattern": "^([a-z0-9]+(-[a-z0-9]+)*)?$"
|
|
78
|
-
},
|
|
79
|
-
"region": {
|
|
80
|
-
"description": "The shell region a region page fills, which gives it no URL of its own. Allowed on kind page alone.",
|
|
81
|
-
"enum": ["footer"]
|
|
82
|
-
},
|
|
83
|
-
"placement": {
|
|
84
|
-
"description": "Where the docs site links a page: sidebar, among the sidebar's fixed links, or none, the default. Allowed on kind page alone.",
|
|
85
|
-
"enum": ["sidebar", "none"]
|
|
86
|
-
},
|
|
87
|
-
"requires": {
|
|
88
|
-
"description": "The system release range a community item was validated with.",
|
|
89
|
-
"$ref": "#/$defs/range"
|
|
90
|
-
},
|
|
91
|
-
"forkedFrom": {
|
|
92
|
-
"description": "The installed item this one was ejected from, as <scope>/<name>@<version>.",
|
|
93
|
-
"type": "string",
|
|
94
|
-
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*/[a-z0-9]+(-[a-z0-9]+)*@(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$"
|
|
95
|
-
},
|
|
96
|
-
"source": {
|
|
97
|
-
"description": "The repo path the item was packed from.",
|
|
98
|
-
"$ref": "#/$defs/path"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"allOf": [
|
|
102
|
-
{
|
|
103
|
-
"description": "Every kind but `page` carries `tasks`, and so does a media collection. A media leaf may carry none.",
|
|
104
|
-
"if": {
|
|
105
|
-
"required": ["kind"],
|
|
106
|
-
"anyOf": [
|
|
107
|
-
{ "properties": { "kind": { "const": "page" } } },
|
|
108
|
-
{ "properties": { "kind": { "const": "media" } }, "not": { "required": ["members"] } }
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
"else": { "required": ["tasks"] }
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"description": "Every kind but `tokens` and `media` carries a `doc`.",
|
|
115
|
-
"if": { "properties": { "kind": { "not": { "enum": ["tokens", "media"] } } } },
|
|
116
|
-
"then": { "required": ["doc"] }
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"description": "`partOf` and `remixOf` are allowed on kind `component` alone.",
|
|
120
|
-
"if": { "properties": { "kind": { "not": { "const": "component" } } } },
|
|
121
|
-
"then": { "not": { "anyOf": [{ "required": ["partOf"] }, { "required": ["remixOf"] }] } }
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"description": "The `media` block is allowed on kind `media` alone.",
|
|
125
|
-
"if": { "properties": { "kind": { "not": { "const": "media" } } } },
|
|
126
|
-
"then": { "not": { "required": ["media"] } }
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"description": "A media item with `members` is a collection, which carries a `doc` and no `media` block.",
|
|
130
|
-
"if": { "required": ["kind", "members"], "properties": { "kind": { "const": "media" } } },
|
|
131
|
-
"then": { "required": ["doc"], "not": { "required": ["media"] } }
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"description": "A media item without `members` is a leaf, which carries a `media` block.",
|
|
135
|
-
"if": { "required": ["kind"], "properties": { "kind": { "const": "media" } }, "not": { "required": ["members"] } },
|
|
136
|
-
"then": { "required": ["media"] }
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"description": "`slug`, `region`, and `placement` are allowed on kind `page` alone.",
|
|
140
|
-
"if": { "properties": { "kind": { "not": { "const": "page" } } } },
|
|
141
|
-
"then": { "not": { "anyOf": [{ "required": ["slug"] }, { "required": ["region"] }, { "required": ["placement"] }] } }
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"description": "A page carries exactly one of `slug` and `region`.",
|
|
145
|
-
"if": { "required": ["kind"], "properties": { "kind": { "const": "page" } } },
|
|
146
|
-
"then": { "oneOf": [{ "required": ["slug"] }, { "required": ["region"] }] }
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"description": "A skill's doc is `SKILL.md`, at the folder's root.",
|
|
150
|
-
"if": { "required": ["kind"], "properties": { "kind": { "const": "skill" } } },
|
|
151
|
-
"then": { "properties": { "doc": { "const": "SKILL.md" } } }
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"description": "A region page has no URL, so it takes no `placement`.",
|
|
155
|
-
"if": { "required": ["kind", "region"], "properties": { "kind": { "const": "page" } } },
|
|
156
|
-
"then": { "not": { "required": ["placement"] } }
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"$defs": {
|
|
160
|
-
"text": { "type": "string", "minLength": 1 },
|
|
161
|
-
"scopedName": {
|
|
162
|
-
"description": "A publisher scope and an item name, as in standard/button.",
|
|
163
|
-
"type": "string",
|
|
164
|
-
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*/[a-z0-9]+(-[a-z0-9]+)*$"
|
|
165
|
-
},
|
|
166
|
-
"semver": {
|
|
167
|
-
"type": "string",
|
|
168
|
-
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$"
|
|
169
|
-
},
|
|
170
|
-
"range": {
|
|
171
|
-
"description": "A semver range, as npm writes one.",
|
|
172
|
-
"type": "string",
|
|
173
|
-
"pattern": "^[0-9A-Za-z.^~<>=|*x+ -]+$"
|
|
174
|
-
},
|
|
175
|
-
"path": {
|
|
176
|
-
"description": "A path relative to the item folder, with no leading slash and no parent segment.",
|
|
177
|
-
"type": "string",
|
|
178
|
-
"minLength": 1,
|
|
179
|
-
"pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$"
|
|
180
|
-
},
|
|
181
|
-
"file": {
|
|
182
|
-
"type": "object",
|
|
183
|
-
"additionalProperties": false,
|
|
184
|
-
"required": ["path"],
|
|
185
|
-
"properties": {
|
|
186
|
-
"path": { "$ref": "#/$defs/path" },
|
|
187
|
-
"role": {
|
|
188
|
-
"description": "css and js are entries the bundle loads, in listed order. css-partial is a stylesheet an entry imports. reference-html is an example, and the first one listed is the default. contract, interface, variants, and accessibility are a component's structured files, and composition is a template's, each held by its own schema. script, reference, and asset are a skill's files under scripts/, references/, and assets/.",
|
|
189
|
-
"enum": ["doc", "reference-html", "css", "css-partial", "js", "tokens", "font", "image", "license", "contract", "interface", "variants", "accessibility", "composition", "script", "reference", "asset"]
|
|
190
|
-
},
|
|
191
|
-
"title": {
|
|
192
|
-
"description": "An example's name, for the docs site and the previewer.",
|
|
193
|
-
"$ref": "#/$defs/text"
|
|
194
|
-
},
|
|
195
|
-
"description": {
|
|
196
|
-
"description": "One sentence on what the example shows and when to use it. An agent picks examples by it.",
|
|
197
|
-
"$ref": "#/$defs/text"
|
|
198
|
-
},
|
|
199
|
-
"summary": {
|
|
200
|
-
"description": "One sentence for a person reading the docs site, in place of the description there. An agent reads the description and ignores the summary.",
|
|
201
|
-
"$ref": "#/$defs/text"
|
|
202
|
-
},
|
|
203
|
-
"frame": { "$ref": "#/$defs/frame" },
|
|
204
|
-
"shows": { "$ref": "#/$defs/shows" },
|
|
205
|
-
"site": {
|
|
206
|
-
"description": "How the docs site shows the example. demo, the default, is a live preview over the code, code is the code alone, image is an image over the code, and hidden leaves the example off the site. An agent ignores it.",
|
|
207
|
-
"enum": ["demo", "code", "image", "hidden"]
|
|
208
|
-
},
|
|
209
|
-
"image": { "$ref": "#/$defs/exampleImage" }
|
|
210
|
-
},
|
|
211
|
-
"allOf": [
|
|
212
|
-
{
|
|
213
|
-
"description": "An example carries a title and a description.",
|
|
214
|
-
"if": { "required": ["role"], "properties": { "role": { "const": "reference-html" } } },
|
|
215
|
-
"then": { "required": ["title", "description"] }
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"description": "title, description, summary, frame, shows, site, and image describe an example alone.",
|
|
219
|
-
"if": { "not": { "required": ["role"], "properties": { "role": { "const": "reference-html" } } } },
|
|
220
|
-
"then": { "not": { "anyOf": [{ "required": ["title"] }, { "required": ["description"] }, { "required": ["summary"] }, { "required": ["frame"] }, { "required": ["shows"] }, { "required": ["site"] }, { "required": ["image"] }] } }
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"description": "An example the docs site shows as an image names the image, and no other example names one.",
|
|
224
|
-
"if": { "required": ["site"], "properties": { "site": { "const": "image" } } },
|
|
225
|
-
"then": { "required": ["image"] },
|
|
226
|
-
"else": { "not": { "required": ["image"] } }
|
|
227
|
-
}
|
|
228
|
-
]
|
|
229
|
-
},
|
|
230
|
-
"exampleImage": {
|
|
231
|
-
"description": "The image the docs site shows in place of an example's live preview, such as a screenshot or an illustration. Each path is a file the item declares with role image. With both, the docs site shows the one for its theme.",
|
|
232
|
-
"type": "object",
|
|
233
|
-
"additionalProperties": false,
|
|
234
|
-
"required": ["alt"],
|
|
235
|
-
"anyOf": [{ "required": ["light"] }, { "required": ["dark"] }],
|
|
236
|
-
"properties": {
|
|
237
|
-
"light": { "description": "The image for the light scheme.", "$ref": "#/$defs/path" },
|
|
238
|
-
"dark": { "description": "The image for the dark scheme.", "$ref": "#/$defs/path" },
|
|
239
|
-
"alt": { "description": "The image's alt text, which describes the picture.", "$ref": "#/$defs/text" }
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
"frame": {
|
|
243
|
-
"description": "The page frame the docs site and the previewer render an example in. Without one, the example renders bare, inside a gutter.",
|
|
244
|
-
"type": "object",
|
|
245
|
-
"additionalProperties": false,
|
|
246
|
-
"required": ["placement"],
|
|
247
|
-
"properties": {
|
|
248
|
-
"format": {
|
|
249
|
-
"description": "The <ca-layout> format, a value a remix of the layout declares. Absent means the base.",
|
|
250
|
-
"$ref": "#/$defs/text"
|
|
251
|
-
},
|
|
252
|
-
"placement": {
|
|
253
|
-
"description": "Where the example sits: main as the first child of <main>, layout as a direct child of <ca-layout> ahead of the header, where the example carries its own slot, header in place of the page's <header>, and footer in place of its <footer>.",
|
|
254
|
-
"enum": ["main", "layout", "header", "footer"]
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
"shows": {
|
|
259
|
-
"description": "What an example demonstrates: each key a <ca-*> element or a .ca-* class, each value the attributes the example sets on it, a string value or true for a boolean's presence. {} is the default configuration. The validator checks that an element in the file matches each entry.",
|
|
260
|
-
"type": "object",
|
|
261
|
-
"minProperties": 1,
|
|
262
|
-
"propertyNames": { "pattern": "^(ca-[a-z0-9]+(-[a-z0-9]+)*|\\.ca-[a-z0-9]+(-[a-z0-9]+)*)$" },
|
|
263
|
-
"additionalProperties": {
|
|
264
|
-
"type": "object",
|
|
265
|
-
"propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" },
|
|
266
|
-
"additionalProperties": { "anyOf": [{ "type": "string" }, { "const": true }] }
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
"tasks": {
|
|
270
|
-
"description": "The task phrases that route an agent here. A page and a media leaf may carry none, so no task routes to them.",
|
|
271
|
-
"type": "array",
|
|
272
|
-
"minItems": 1,
|
|
273
|
-
"items": { "$ref": "#/$defs/text" }
|
|
274
|
-
},
|
|
275
|
-
"target": {
|
|
276
|
-
"type": "object",
|
|
277
|
-
"additionalProperties": false,
|
|
278
|
-
"required": ["item"],
|
|
279
|
-
"properties": {
|
|
280
|
-
"item": { "$ref": "#/$defs/scopedName" },
|
|
281
|
-
"section": {
|
|
282
|
-
"description": "A heading in the target's doc, quoted exactly.",
|
|
283
|
-
"$ref": "#/$defs/text"
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
"related": {
|
|
288
|
-
"type": "object",
|
|
289
|
-
"additionalProperties": false,
|
|
290
|
-
"required": ["when", "load"],
|
|
291
|
-
"properties": {
|
|
292
|
-
"when": { "$ref": "#/$defs/text" },
|
|
293
|
-
"load": {
|
|
294
|
-
"type": "array",
|
|
295
|
-
"minItems": 1,
|
|
296
|
-
"items": { "$ref": "#/$defs/target" }
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
"pixels": { "type": "integer", "minimum": 1 },
|
|
301
|
-
"rendition": {
|
|
302
|
-
"type": "object",
|
|
303
|
-
"additionalProperties": false,
|
|
304
|
-
"required": ["file", "width", "height"],
|
|
305
|
-
"properties": {
|
|
306
|
-
"file": {
|
|
307
|
-
"description": "A path in the item's own files list.",
|
|
308
|
-
"$ref": "#/$defs/path"
|
|
309
|
-
},
|
|
310
|
-
"width": {
|
|
311
|
-
"description": "In pixels. A PNG's, WebP's, or JPEG's matches its file's header.",
|
|
312
|
-
"$ref": "#/$defs/pixels"
|
|
313
|
-
},
|
|
314
|
-
"height": {
|
|
315
|
-
"description": "In pixels. A PNG's, WebP's, or JPEG's matches its file's header.",
|
|
316
|
-
"$ref": "#/$defs/pixels"
|
|
317
|
-
},
|
|
318
|
-
"variant": {
|
|
319
|
-
"description": "A label for a rendition that differs from the others by more than size, such as gradient.",
|
|
320
|
-
"type": "string",
|
|
321
|
-
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
|
|
322
|
-
},
|
|
323
|
-
"original": {
|
|
324
|
-
"description": "True for the master file the other renditions come from.",
|
|
325
|
-
"type": "boolean"
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
"origin": {
|
|
330
|
-
"description": "Where the item came from. Every field is optional.",
|
|
331
|
-
"type": "object",
|
|
332
|
-
"additionalProperties": false,
|
|
333
|
-
"properties": {
|
|
334
|
-
"ai-generated": {
|
|
335
|
-
"description": "True for media a model generated. False when left out.",
|
|
336
|
-
"type": "boolean"
|
|
337
|
-
},
|
|
338
|
-
"ai-generator": {
|
|
339
|
-
"description": "The model, such as OpenAI gpt-image (ChatGPT).",
|
|
340
|
-
"$ref": "#/$defs/text"
|
|
341
|
-
},
|
|
342
|
-
"ai-prompt": {
|
|
343
|
-
"description": "The prompt that generated it.",
|
|
344
|
-
"$ref": "#/$defs/text"
|
|
345
|
-
},
|
|
346
|
-
"source-type": {
|
|
347
|
-
"description": "A term of the IPTC digital source type vocabulary, the last segment of its URI, such as trainedAlgorithmicMedia or digitalCreation.",
|
|
348
|
-
"type": "string",
|
|
349
|
-
"pattern": "^[a-z][A-Za-z]*$"
|
|
350
|
-
},
|
|
351
|
-
"creator": { "$ref": "#/$defs/text" },
|
|
352
|
-
"copyright": { "$ref": "#/$defs/text" },
|
|
353
|
-
"attribution": { "$ref": "#/$defs/text" },
|
|
354
|
-
"licensor": { "$ref": "#/$defs/text" },
|
|
355
|
-
"license": {
|
|
356
|
-
"description": "Free text, with an SPDX identifier where one applies.",
|
|
357
|
-
"$ref": "#/$defs/text"
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "release.schema.json",
|
|
4
|
-
"title": "release.json",
|
|
5
|
-
"description": "A packed system release: its tag, the foundation, fixtures, and presets as of the tag, and one entry per item ZIP, in load order.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": ["tag", "foundation", "presets", "items"],
|
|
9
|
-
"properties": {
|
|
10
|
-
"tag": { "$ref": "system.schema.json#/$defs/tag" },
|
|
11
|
-
"foundation": { "$ref": "system.schema.json#/properties/foundation" },
|
|
12
|
-
"fixtures": { "$ref": "system.schema.json#/properties/fixtures" },
|
|
13
|
-
"presets": { "$ref": "system.schema.json#/properties/presets" },
|
|
14
|
-
"items": {
|
|
15
|
-
"description": "Every item in the release, each after the items it depends on, so ingesting them in order meets every dependency first.",
|
|
16
|
-
"type": "array",
|
|
17
|
-
"minItems": 1,
|
|
18
|
-
"items": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"additionalProperties": false,
|
|
21
|
-
"required": ["name", "version", "file", "sha256"],
|
|
22
|
-
"properties": {
|
|
23
|
-
"name": { "$ref": "system.schema.json#/$defs/scopedName" },
|
|
24
|
-
"version": { "$ref": "system.schema.json#/$defs/semver" },
|
|
25
|
-
"file": {
|
|
26
|
-
"description": "The ZIP's file name in the release folder, <scope>-<name>-<version>.zip.",
|
|
27
|
-
"type": "string",
|
|
28
|
-
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*-[0-9A-Za-z.+-]+\\.zip$"
|
|
29
|
-
},
|
|
30
|
-
"sha256": {
|
|
31
|
-
"description": "The SHA-256 of the ZIP's bytes, in lowercase hex.",
|
|
32
|
-
"type": "string",
|
|
33
|
-
"pattern": "^[0-9a-f]{64}$"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|