@adobe/design-data-spec 4.8.0 → 4.8.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.
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tokens": [
|
|
3
|
+
{
|
|
4
|
+
"name": {
|
|
5
|
+
"component": "accordion",
|
|
6
|
+
"property": "gap",
|
|
7
|
+
"scale": "desktop"
|
|
8
|
+
},
|
|
9
|
+
"value": "8px",
|
|
10
|
+
"uuid": "aaaaaaaa-0072-4000-8000-000000000001"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": {
|
|
14
|
+
"component": "accordion",
|
|
15
|
+
"property": "gap",
|
|
16
|
+
"scale": "mobile"
|
|
17
|
+
},
|
|
18
|
+
"value": "10px",
|
|
19
|
+
"uuid": "aaaaaaaa-0072-4000-8000-000000000002"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"relationships": [
|
|
23
|
+
{
|
|
24
|
+
"scope": {
|
|
25
|
+
"component": "accordion",
|
|
26
|
+
"property": "gap"
|
|
27
|
+
},
|
|
28
|
+
"context": "Spacing",
|
|
29
|
+
"$ref": "aaaaaaaa-0072-4000-8000-000000000001"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"scope": {
|
|
33
|
+
"component": "accordion",
|
|
34
|
+
"property": "gap"
|
|
35
|
+
},
|
|
36
|
+
"context": "Spacing",
|
|
37
|
+
"$ref": "aaaaaaaa-0072-4000-8000-000000000001"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"components": [
|
|
41
|
+
{
|
|
42
|
+
"$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/accordion.json",
|
|
43
|
+
"name": "accordion",
|
|
44
|
+
"displayName": "Accordion",
|
|
45
|
+
"meta": {
|
|
46
|
+
"category": "actions"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
package/package.json
CHANGED
package/rules/rules.yaml
CHANGED
|
@@ -724,3 +724,18 @@ rules:
|
|
|
724
724
|
message: "Alias {token} sets {field}={ownValue} but its $ref chain resolves to a token with {field}={leafValue}"
|
|
725
725
|
spec_ref: spec/cascade.md#alias-resolution
|
|
726
726
|
introduced_in: "1.0.0-draft"
|
|
727
|
+
- id: SPEC-072
|
|
728
|
+
name: relationship-duplicate-ref-scale-counterpart
|
|
729
|
+
severity: warning
|
|
730
|
+
layer: 2
|
|
731
|
+
category: relationship
|
|
732
|
+
note: >
|
|
733
|
+
Typically a desktop and a mobile record where the second was copied without repointing it,
|
|
734
|
+
so the other scale's token is never reachable through the relationship. A repeated record
|
|
735
|
+
on a token with no scale counterpart is not reported.
|
|
736
|
+
assert: >
|
|
737
|
+
Two relationship records with the same scope, context and `$ref` SHOULD NOT both point at
|
|
738
|
+
a token that has a scale counterpart (the same name with another `scale` value).
|
|
739
|
+
message: "Relationship {scope} references {ref} twice, but the token has a {scale} counterpart ({counterpart}); point one record at it"
|
|
740
|
+
spec_ref: spec/relationship-format.md
|
|
741
|
+
introduced_in: "1.0.0-draft"
|
package/spec/manifest.md
CHANGED
|
@@ -69,15 +69,16 @@ Each override object **MUST** include enough information to identify a target to
|
|
|
69
69
|
|
|
70
70
|
**NORMATIVE:** Overrides **MUST NOT** change the resolved type of the token (aligns with [Cascade — type safety](cascade.md)).
|
|
71
71
|
|
|
72
|
-
An override
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
An override **replaces** the foundation record for that platform's graph: the replacement keeps the target's key and `uuid`, sits at the **platform** layer, and keeps every other field of the original record (`$schema`, `$valueType`, `lifecycle`, `description`, `conceptId`, and so on). Only `value` or `$ref` changes; an override that supplies `$ref` removes `value`, and one that supplies `value` removes `$ref`. The foundation package on disk is untouched. [Query](query.md) returns one record per token, and [`resolve` / `resolve_property`](cascade.md) still apply `Foundation < Platform < Product` precedence, so a platform override beats the foundation value and a product override beats both.
|
|
73
|
+
|
|
74
|
+
**Provenance.** A replaced record carries two in-memory markers so tooling can tell where it came from:
|
|
75
|
+
|
|
76
|
+
| Field | Value |
|
|
77
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
78
|
+
| `overriddenBy` | `{ "platform": "<manifest platform>" }` when the manifest sets `platform`; otherwise `{ "manifest": "manifest.json" }` (the literal file name; the manifest's real path is not recorded). |
|
|
79
|
+
| `overriddenFrom` | `{ "value": <foundation value> }` or `{ "$ref": <foundation $ref> }`. The first override's history is kept, so it is always the foundation value, even when a token is overridden more than once (the last override wins for the value). |
|
|
80
|
+
|
|
81
|
+
These markers exist only on the platform's in-memory records. They are not written to token files and are **not** serialized in legacy output.
|
|
81
82
|
|
|
82
83
|
### Identity fields
|
|
83
84
|
|