@adobe/design-data-spec 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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "tokens": [],
3
+ "components": []
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-039",
6
+ "severity": "error",
7
+ "message_pattern": ".*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "foundationVersion": "1.0.0",
4
+ "include": ["not-a-valid-query"]
5
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "tokens": [],
3
+ "components": []
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": [
4
+ {
5
+ "rule_id": "SPEC-039",
6
+ "severity": "error",
7
+ "message_pattern": ".*bogusKey.*"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "foundationVersion": "1.0.0",
4
+ "include": ["component=button,bogusKey=foo"]
5
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "tokens": [],
3
+ "components": []
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "layer": 2,
3
+ "errors": []
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "specVersion": "1.0.0-draft",
3
+ "foundationVersion": "1.0.0",
4
+ "include": [
5
+ "component=button",
6
+ "component=button,state=hover",
7
+ "property=color-*"
8
+ ],
9
+ "exclude": ["component=button,colorScheme!=light"]
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-spec",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Design Data Specification — prose, JSON Schemas, rule catalog, and conformance fixtures for Spectrum design data",
5
5
  "type": "module",
6
6
  "repository": {
package/rules/rules.yaml CHANGED
@@ -383,3 +383,18 @@ rules:
383
383
  message: "Component '{component}' option '{option}' uses the obsolete `enum` keyword; replace with a `values` array so per-value lifecycle metadata can be expressed"
384
384
  spec_ref: spec/component-format.md#option-descriptor
385
385
  introduced_in: "1.0.0-draft"
386
+
387
+ - id: SPEC-039
388
+ name: manifest-query-parseable
389
+ severity: error
390
+ layer: 2
391
+ category: manifest
392
+ rfc: "#715"
393
+ assert: >
394
+ Each entry in 'manifest.include' and 'manifest.exclude' MUST parse as a valid query
395
+ expression per spec/query.md and MUST use only the supported query keys.
396
+ Entries that fail to parse, or that reference unsupported keys, are Layer 2 errors.
397
+ This rule lifts the deferred 'treat as opaque' clause from earlier 1.0.0-draft revisions.
398
+ message: "Manifest {array}[{idx}] failed to parse as a query: {error}"
399
+ spec_ref: spec/manifest.md#include--exclude
400
+ introduced_in: "1.0.0-draft"
package/spec/manifest.md CHANGED
@@ -26,9 +26,11 @@ A manifest **MUST** conform to [`manifest.schema.json`](../schemas/manifest.sche
26
26
 
27
27
  ### `include` / `exclude`
28
28
 
29
- **NORMATIVE:** Entries **MUST** be non-empty strings.
29
+ **NORMATIVE:** Each entry **MUST** be a non-empty string that parses as a valid query expression per [Query](query.md). An entry that fails to parse, or that references a key outside the [supported query key list](query.md#supported-keys), is a Layer 2 conformance error (SPEC-039 `manifest-query-parseable`).
30
30
 
31
- > **Note:** Query notation syntax is fully defined in [Query](query.md) and is normative for programmatic use. Its normative use in manifest `include`/`exclude` is deferred to a post-`1.0.0-draft` revision pending conformance fixtures; until then, implementations **MUST** treat manifest query values as opaque identifiers.
31
+ See [Query Formal grammar](query.md#formal-grammar) for the EBNF and [Query Supported keys](query.md#supported-keys) for the normative list of allowed keys.
32
+
33
+ > **Migration note (from earlier `1.0.0-draft` revisions):** Prior revisions instructed implementations to treat manifest query values as opaque identifiers. That clause is lifted as of this revision. Any manifest that uses non-query strings in `include`/`exclude` must be updated to use valid query notation; the SPEC-039 rule reports column-level parse errors to guide migration.
32
34
 
33
35
  ### `overrides`
34
36