@adobe/design-data-spec 4.13.0 → 4.14.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/package.json +1 -1
- package/rules/rules.yaml +17 -0
- package/spec/component-visuals.md +2 -0
package/package.json
CHANGED
package/rules/rules.yaml
CHANGED
|
@@ -1153,3 +1153,20 @@ rules:
|
|
|
1153
1153
|
message: "Derived context '{context}' of '{component}' ({from}): the token value differs from the formula at {scale} for {sizes}"
|
|
1154
1154
|
spec_ref: spec/component-visuals.md#derived-contexts
|
|
1155
1155
|
introduced_in: "1.0.0-draft"
|
|
1156
|
+
|
|
1157
|
+
- id: SPEC-088
|
|
1158
|
+
name: relationship-duplicate-record
|
|
1159
|
+
severity: warning
|
|
1160
|
+
layer: 2
|
|
1161
|
+
category: relationship
|
|
1162
|
+
note: >
|
|
1163
|
+
An exact duplicate adds nothing to resolution, and a changelog that pairs records by
|
|
1164
|
+
identity cannot tell the copies apart. Records with different `setUuid` are not duplicates.
|
|
1165
|
+
SPEC-072 may also report a pair whose token has a scale counterpart, so the two rules can
|
|
1166
|
+
overlap.
|
|
1167
|
+
assert: >
|
|
1168
|
+
Two relationship records in the same file SHOULD NOT have equal scope, context,
|
|
1169
|
+
`$ref` (or inline value) and `setUuid`.
|
|
1170
|
+
message: "Relationship {scope} (context '{context}') repeats an earlier record with the same {ref_or_value}; remove the duplicate"
|
|
1171
|
+
spec_ref: spec/relationship-format.md
|
|
1172
|
+
introduced_in: "1.0.0-draft"
|
|
@@ -239,6 +239,8 @@ The scene graph is the contract between resolution and output:
|
|
|
239
239
|
|
|
240
240
|
A build step **MAY** pre-resolve every `token` and `relationship` binding per `size|colorScheme|scale` into a ranked list of candidates (`{value, token, states}`), so a renderer needs no token graph. Only state-dependent selection remains at render time: take the first candidate whose `states` all apply, else the first. Backends that consume compiled recipes (for example the dependency-free JS runtime emitted by `design-data site`) **MUST** produce the same scene as the Rust reference renderer; the reference renderer is the source of truth and parity is tested.
|
|
241
241
|
|
|
242
|
+
A compiled recipe **MUST NOT** depend on the request's `icon`: the request icon is applied when the scene is solved. For this a compiled content icon part (`icon.content: true`) carries `iconChoices`, an object mapping `set:name` to the key in the recipe's `drawings` of that icon's drawing at the part's scale (an icon with no usable drawing is absent), so a backend with one precompiled variant and no icon catalog can honour the request icon with the rules in [Icons](#icons). `iconChoices` is absent when the build had no icon catalog. Backends that predate `iconChoices` ignore it, and the existing `drawing`, `drawingMiss` and `drawings` fields are unchanged.
|
|
243
|
+
|
|
242
244
|
## Backend and tooling decisions (research outcomes)
|
|
243
245
|
|
|
244
246
|
These record the research behind this draft and are not normative.
|