@adobe/design-data-spec 3.4.0 → 3.5.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.
@@ -0,0 +1,38 @@
1
+ {
2
+ "tokens": [
3
+ {
4
+ "name": {
5
+ "component": "accordion",
6
+ "property": "top-to-text-compact-medium"
7
+ },
8
+ "value": "5px",
9
+ "uuid": "aaaaaaaa-0058-4000-8000-000000000001",
10
+ "lifecycle": {
11
+ "deprecatedIn": "14.3.0",
12
+ "replacedBy": "aaaaaaaa-0058-4000-8000-000000000002"
13
+ }
14
+ },
15
+ {
16
+ "name": { "property": "base-padding-vertical-medium" },
17
+ "value": "5px",
18
+ "uuid": "aaaaaaaa-0058-4000-8000-000000000002"
19
+ }
20
+ ],
21
+ "relationships": [
22
+ {
23
+ "scope": {
24
+ "component": "accordion",
25
+ "property": "top-to-text-compact-medium"
26
+ },
27
+ "$ref": "aaaaaaaa-0058-4000-8000-000000000001"
28
+ }
29
+ ],
30
+ "components": [
31
+ {
32
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/v0/components/accordion.json",
33
+ "name": "accordion",
34
+ "displayName": "Accordion",
35
+ "meta": { "category": "actions" }
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-058",
6
+ "severity": "warning",
7
+ "message_pattern": ".*deprecated in 14.3.0.*aaaaaaaa-0058-4000-8000-000000000002.*"
8
+ }
9
+ ]
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-spec",
3
- "version": "3.4.0",
3
+ "version": "3.5.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": {
package/rules/rules.yaml CHANGED
@@ -690,3 +690,20 @@ rules:
690
690
  message: "Relationship '{relationship}' may need a legacyKey to round-trip through the legacy generator"
691
691
  spec_ref: spec/relationship-format.md#legacy-fields-interim
692
692
  introduced_in: "1.0.0-draft"
693
+
694
+ - id: SPEC-058
695
+ name: ctr-ref-not-deprecated
696
+ severity: warning
697
+ layer: 2
698
+ category: naming-consistency
699
+ note: >
700
+ Warning, not error: some deprecated targets have no `replacedBy` (or an ambiguous
701
+ array-form one) and can't be auto-corrected without manual triage, so this can't be
702
+ a hard gate yet.
703
+ assert: >
704
+ A relationship-only CTR's `$ref` (no `uuid`/`legacyKey`) SHOULD NOT resolve to a
705
+ token whose `lifecycle.deprecatedIn` is set. A value-owning CTR (`uuid`/`legacyKey`
706
+ present) is exempt — it legitimately *is* the deprecated token record.
707
+ message: "Relationship $ref {ref} resolves to a token deprecated in {deprecatedIn}"
708
+ spec_ref: spec/relationship-format.md#legacy-fields-interim
709
+ introduced_in: "1.0.0-draft"
package/spec/manifest.md CHANGED
@@ -61,6 +61,16 @@ Each override object **MUST** include enough information to identify a target to
61
61
 
62
62
  **NORMATIVE:** Overrides **MUST NOT** change the resolved type of the token (aligns with [Cascade — type safety](cascade.md)).
63
63
 
64
+ An override is applied as a new **platform-layer** record, not an in-place edit of the
65
+ foundation record it targets — the original foundation record is left untouched.
66
+ [Query](query.md) reports records across all cascade layers, so a query over an overridden
67
+ token's selector returns both the untouched foundation record and the new platform-layer
68
+ record (e.g. an override on a `state=disabled` token increases the matching count by one,
69
+ rather than replacing an existing match). Only [`resolve` / `resolve_property`](cascade.md)
70
+ apply `Foundation < Platform < Product` precedence to select a single winner. Tooling that
71
+ counts "tokens a platform ships" from `query` output should resolve first, or it will
72
+ double-count overridden tokens.
73
+
64
74
  ### `extensions`
65
75
 
66
76
  **RECOMMENDED:** `extensions` follows the same structural conventions as foundation token files (tokens, mode sets) and **SHOULD** be validated with the same Layer 1 and Layer 2 rules.
@@ -132,6 +142,11 @@ A platform **MAY** declare formatting rules that control how structured name obj
132
142
 
133
143
  **RECOMMENDED:** Validators resolve `foundationVersion` against a registry or lockfile and report mismatches as errors or warnings per product policy.
134
144
 
145
+ **RECOMMENDED:** Validators confirm the resolved `foundationVersion` provides a cascade-format
146
+ dataset (`packages/design-data/*`), not a pre-cascade legacy release predating the structured
147
+ `name` object, mode sets, and UUIDs — a manifest cascaded against a pre-cascade pin is not
148
+ meaningful. Report a pre-cascade pin as an error per product policy.
149
+
135
150
  ## Automated upgrades
136
151
 
137
152
  **OPTIONAL:** Workflows **MAY** open upgrade PRs when `foundationVersion` lags the latest release; details are out of scope for this document (see [#715](https://github.com/adobe/spectrum-design-data/discussions/715)).
package/spec/mode-sets.md CHANGED
@@ -27,11 +27,11 @@ A **mode set declaration** is a JSON object describing one axis of variation. It
27
27
 
28
28
  These mode sets are declared in the `mode-sets/` catalog (see [Mode Set catalog](#mode-set-catalog)) and **SHOULD** be used consistently across Spectrum-compatible datasets:
29
29
 
30
- | `name` | `modes` | `default` | Notes |
31
- | ------------- | ---------------------------- | --------- | --------------------------------------------------------------------------------- |
32
- | `colorScheme` | `light`, `dark`, `wireframe` | `light` | Theme / appearance. |
33
- | `scale` | `desktop`, `mobile` | `desktop` | Density scale. Legacy names; desktop = medium, mobile = large in W3C terminology. |
34
- | `contrast` | `regular`, `high` | `regular` | Accessibility contrast level. |
30
+ | `name` | `modes` | `default` | Notes |
31
+ | ------------- | ---------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
32
+ | `colorScheme` | `light`, `dark`, `wireframe` | `light` | Theme / appearance. |
33
+ | `scale` | `desktop`, `mobile` | `desktop` | Density scale. Legacy names; desktop = medium, mobile = large in W3C terminology. |
34
+ | `contrast` | `regular`, `high` | `regular` | Accessibility contrast level. iOS platform data authors `increased` as a synonym for `high` — treat the two as the same crosswalk term, not distinct values. |
35
35
 
36
36
  ## Mode Set catalog
37
37