@adobe/design-data-spec 4.9.0 → 4.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-spec",
3
- "version": "4.9.0",
3
+ "version": "4.11.0",
4
4
  "description": "Design Data Specification — prose, JSON Schemas, rule catalog, and conformance fixtures for the design data format",
5
5
  "type": "module",
6
6
  "repository": {
@@ -213,6 +213,10 @@
213
213
  "type": "boolean",
214
214
  "description": "True when a bound token's own record is unchanged but its alias-resolved value changed."
215
215
  },
216
+ "reachedBy": {
217
+ "enum": ["tokenBinding"],
218
+ "description": "Set when the component reaches the changed token only through its tokenBindings (by token name), not through a relationship. Absent for relationship-reached and component-owned changes."
219
+ },
216
220
  "contexts": {
217
221
  "type": "array",
218
222
  "items": {
@@ -2,14 +2,18 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/component-spec-sheet.schema.json",
4
4
  "title": "Component spec sheet (draft)",
5
- "description": "Draft model of a per-component spec sheet generated by `design-data spec-sheet`: pages of blocks, one block per relationship context. Renderers draw each block's scene and add no layout of their own.",
5
+ "description": "Draft model of a per-component spec sheet generated by `design-data spec-sheet`: pages of blocks, one block per relationship context, plus one generated block per relationship property for records that carry no context. Renderers draw each block's scene and add no layout of their own.",
6
6
  "type": "object",
7
- "required": ["specVersion", "component", "size", "block", "pages"],
7
+ "required": ["specVersion", "component", "visual", "size", "block", "pages"],
8
8
  "properties": {
9
9
  "$schema": { "type": "string" },
10
10
  "specVersion": { "type": "string" },
11
11
  "component": { "type": "string" },
12
12
  "displayName": { "type": "string" },
13
+ "visual": {
14
+ "description": "True when the component has a visual recipe. False marks a table-only sheet: blocks carry token rows but no render, and views show \"No visual recipe yet\". The same stub is the starting point for a new component.",
15
+ "type": "boolean"
16
+ },
13
17
  "datasetRevision": {
14
18
  "description": "Dataset revision (git commit) the sheet and its changelog were generated from.",
15
19
  "type": ["string", "null"]
@@ -50,6 +54,8 @@
50
54
  "id",
51
55
  "page",
52
56
  "title",
57
+ "titleSource",
58
+ "records",
53
59
  "render",
54
60
  "rows",
55
61
  "notes",
@@ -60,10 +66,22 @@
60
66
  "id": { "type": "string" },
61
67
  "page": { "type": "string" },
62
68
  "title": {
63
- "description": "The relationship context string the block documents.",
69
+ "description": "The relationship context string the block documents, or, when titleSource is \"property\", the relationship property written as words.",
64
70
  "type": "string"
65
71
  },
66
- "render": { "$ref": "#/$defs/render" },
72
+ "titleSource": {
73
+ "description": "\"context\": titled by an authored relationship context. \"property\": generated for records without a context, one block per relationship property; views mark these so they read differently from authored groups. A generated block has an unmarked render (no highlight, markers or measurements) and no changes.",
74
+ "enum": ["context", "property"]
75
+ },
76
+ "records": {
77
+ "description": "Relationship records the block's rows show.",
78
+ "type": "integer",
79
+ "minimum": 0
80
+ },
81
+ "render": {
82
+ "description": "The block's visual. Null on a table-only sheet (visual is false).",
83
+ "oneOf": [{ "$ref": "#/$defs/render" }, { "type": "null" }]
84
+ },
67
85
  "rows": { "type": "array", "items": { "$ref": "#/$defs/row" } },
68
86
  "notes": { "type": "array", "items": { "type": "string" } },
69
87
  "changes": {
@@ -150,7 +168,7 @@
150
168
  }
151
169
  },
152
170
  "measurements": {
153
- "description": "Scene measurements the block shows: those whose relationship context is the block title. `index` points into scene.measurements and `label` is the relationship property.",
171
+ "description": "Scene measurements the block shows on the Layout page: those whose relationship context is the block title (kinds `height`, `width`, `padding`, `gap`, `radius`, `border`, `focus-thickness`, `focus-gap`, `press`). A block renders in the states and options its bindings need (a focus ring in `keyboard-focus`, a pressed scale in `down`). `index` points into scene.measurements and `label` is the relationship property.",
154
172
  "type": "array",
155
173
  "items": {
156
174
  "type": "object",
@@ -182,8 +200,20 @@
182
200
  },
183
201
  "item": {
184
202
  "type": "object",
185
- "required": ["label", "marker", "size", "states", "token", "values"],
203
+ "required": [
204
+ "label",
205
+ "marker",
206
+ "size",
207
+ "states",
208
+ "source",
209
+ "token",
210
+ "values"
211
+ ],
186
212
  "properties": {
213
+ "source": {
214
+ "description": "\"token\": the record references a token with $ref. \"inline\": the record carries its own value and no token; token.uuid is null and token.name is the record's legacy key or property.",
215
+ "enum": ["token", "inline"]
216
+ },
187
217
  "label": {
188
218
  "description": "Option label from component options or the registry.",
189
219
  "type": "string"
@@ -205,7 +235,7 @@
205
235
  "additionalProperties": false
206
236
  },
207
237
  "values": {
208
- "description": "Token value per scale (`desktop`, `mobile`), or `value` when the token has no scale. An alias shows as {\"alias\": name}.",
238
+ "description": "Token value per scale (`desktop`, `mobile`) or color scheme (`light`, `dark`, `wireframe`), or `value` when the token has neither. An alias shows as {\"alias\": name}.",
209
239
  "type": "object"
210
240
  }
211
241
  },
@@ -19,7 +19,7 @@ A removed and an added option, state, anatomy part or slot that differ only by n
19
19
 
20
20
  ## Attribution
21
21
 
22
- Each change attaches to a component, to the relationship context (the spec-sheet block title) it appears under, and to a **source**: the PR number in the squash subject (`... (#123)`), otherwise the commit sha and subject. A global token reaches a component through the relationships that bind it. A token a component binds whose own record is unchanged but whose alias-resolved value moved is an **indirect** change. Registry and mode-set changes are not fanned out to components.
22
+ Each change attaches to a component, to the relationship context (the spec-sheet block title) it appears under, and to a **source**: the PR number in the squash subject (`... (#123)`), otherwise the commit sha and subject. A global token reaches a component through the relationships that bind it. A token a component names only in `tokenBindings` (by token name) also reaches it; those entries carry `reachedBy: "tokenBinding"`. A token a component binds whose own record is unchanged but whose alias-resolved value moved is an **indirect** change. Registry and mode-set changes are not fanned out to components.
23
23
 
24
24
  A record's own `rationale` is copied into the entry when present. History comes from the diff; the source is the fallback reason.
25
25