@adobe/design-data-spec 4.6.0 → 4.8.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.6.0",
3
+ "version": "4.8.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": {
@@ -21,6 +21,8 @@
21
21
  "exports": {
22
22
  "./package.json": "./package.json",
23
23
  "./schemas/token.schema.json": "./schemas/token.schema.json",
24
+ "./schemas/token-file.json": "./schemas/token-file.json",
25
+ "./schemas/token-types/*": "./schemas/token-types/*",
24
26
  "./schemas/mode-set.schema.json": "./schemas/mode-set.schema.json",
25
27
  "./schemas/field.schema.json": "./schemas/field.schema.json",
26
28
  "./schemas/manifest.schema.json": "./schemas/manifest.schema.json",
@@ -12,7 +12,7 @@
12
12
  "foundationVersion": {
13
13
  "type": "string",
14
14
  "minLength": 1,
15
- "description": "Pin to a foundation release (semver or tag)."
15
+ "description": "Pin to a foundation release (semver or tag), e.g. \"@adobe/spectrum-design-data@3.5.0\"."
16
16
  },
17
17
  "platform": {
18
18
  "type": "string",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "extends": {
30
30
  "type": "string",
31
- "description": "Which registry this extends (sizes, states, variants, etc.)"
31
+ "description": "Foundation registry (field name or file basename) or active mode-set name whose existing ids or modes this annotates (e.g. states or contrast)."
32
32
  },
33
33
  "extensions": {
34
34
  "type": "array",
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-file.json",
4
+ "title": "Spectrum token file",
5
+ "description": "Top-level shape for legacy Spectrum token JSON files (packages/tokens/src/*.json). Each property key is a token name; each value is a token object with a $schema discriminator.",
6
+ "type": "object",
7
+ "patternProperties": {
8
+ "^[a-z0-9]+(-[a-z0-9]+)*$": {
9
+ "anyOf": [
10
+ { "$ref": "token-types/alias.json" },
11
+ { "$ref": "token-types/alignment.json" },
12
+ { "$ref": "token-types/color.json" },
13
+ { "$ref": "token-types/color-set.json" },
14
+ { "$ref": "token-types/dimension.json" },
15
+ { "$ref": "token-types/drop-shadow.json" },
16
+ { "$ref": "token-types/font-family.json" },
17
+ { "$ref": "token-types/font-size.json" },
18
+ { "$ref": "token-types/font-style.json" },
19
+ { "$ref": "token-types/font-weight.json" },
20
+ { "$ref": "token-types/gradient-stop.json" },
21
+ { "$ref": "token-types/multiplier.json" },
22
+ { "$ref": "token-types/opacity.json" },
23
+ { "$ref": "token-types/scale-set.json" },
24
+ { "$ref": "token-types/set.json" },
25
+ { "$ref": "token-types/system-set.json" },
26
+ { "$ref": "token-types/text-transform.json" },
27
+ { "$ref": "token-types/token.json" },
28
+ { "$ref": "token-types/typography.json" }
29
+ ]
30
+ }
31
+ },
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/alias.json",
4
+ "title": "Alias",
5
+ "description": "A token that references another token. Accepts both the legacy value-form ('{name}') and the cascade canonical form ('$ref': '<uuid>').",
6
+ "type": "object",
7
+ "required": ["$schema", "uuid"],
8
+ "oneOf": [
9
+ {
10
+ "description": "Legacy format: alias target wrapped in curly braces, e.g. {blue-100}.",
11
+ "required": ["value"],
12
+ "not": { "required": ["$ref"] },
13
+ "properties": {
14
+ "value": {
15
+ "type": "string",
16
+ "pattern": "^\\{(\\w|-)*\\}$"
17
+ }
18
+ }
19
+ },
20
+ {
21
+ "description": "Cascade canonical format: alias target UUID (rename-proof, resolvable via uuid_index).",
22
+ "required": ["$ref"],
23
+ "not": { "required": ["value"] },
24
+ "properties": {
25
+ "$ref": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ }
29
+ }
30
+ }
31
+ ],
32
+ "properties": {
33
+ "$schema": {
34
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/alias.json"
35
+ },
36
+ "name": {},
37
+ "component": {},
38
+ "private": {},
39
+ "deprecated": {},
40
+ "deprecated_comment": {},
41
+ "description": {},
42
+ "uuid": {
43
+ "type": "string",
44
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
45
+ "format": "uuid"
46
+ },
47
+ "set_schema": {
48
+ "type": "string",
49
+ "description": "Set-level schema URL carried from the cascade migration."
50
+ },
51
+ "conceptId": {
52
+ "type": "string",
53
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
54
+ "format": "uuid",
55
+ "description": "Canonical concept-level UUID shared by every mode row of this design concept. Additive to the per-value uuid (which remains the $ref/diff/replacedBy/sync anchor)."
56
+ },
57
+ "replaced_by": {
58
+ "oneOf": [
59
+ { "type": "string", "format": "uuid" },
60
+ {
61
+ "type": "array",
62
+ "items": { "type": "string", "format": "uuid" },
63
+ "minItems": 1
64
+ }
65
+ ]
66
+ },
67
+ "introduced": { "type": "string" },
68
+ "plannedRemoval": { "type": "string" }
69
+ }
70
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/alignment.json",
4
+ "title": "Alignment",
5
+ "description": "Defines an alignment value (horizontal, vertical, or text) along a single axis. Keyword values are direction-aware: 'start' and 'end' resolve based on writing mode or layout direction.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/alignment.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["start", "center", "end"],
19
+ "default": "start"
20
+ },
21
+ "component": {},
22
+ "private": {},
23
+ "deprecated": {},
24
+ "deprecated_comment": {},
25
+ "description": {},
26
+ "uuid": {}
27
+ }
28
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/angle.json",
4
+ "title": "Angle",
5
+ "description": "An angle in degrees, e.g. for rotation or gradient direction. Positive values rotate clockwise from horizontal.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/angle.json"
15
+ },
16
+ "value": {
17
+ "type": "number"
18
+ },
19
+ "component": {},
20
+ "private": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "description": {},
24
+ "uuid": {}
25
+ }
26
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color-set.json",
4
+ "title": "Color set",
5
+ "description": "A set that contains color values that change based on color theme.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "set.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color-set.json"
15
+ },
16
+ "sets": {
17
+ "type": "object",
18
+ "anyOf": [
19
+ {
20
+ "properties": {
21
+ "light": {
22
+ "$ref": "color.json"
23
+ },
24
+ "dark": {
25
+ "$ref": "color.json"
26
+ },
27
+ "wireframe": {
28
+ "$ref": "color.json"
29
+ }
30
+ },
31
+ "required": ["light", "dark", "wireframe"]
32
+ },
33
+ {
34
+ "properties": {
35
+ "light": {
36
+ "$ref": "alias.json"
37
+ },
38
+ "dark": {
39
+ "$ref": "alias.json"
40
+ },
41
+ "wireframe": {
42
+ "$ref": "alias.json"
43
+ }
44
+ },
45
+ "required": ["light", "dark", "wireframe"]
46
+ },
47
+ {
48
+ "properties": {
49
+ "light": {
50
+ "$ref": "opacity.json"
51
+ },
52
+ "dark": {
53
+ "$ref": "opacity.json"
54
+ },
55
+ "wireframe": {
56
+ "$ref": "opacity.json"
57
+ }
58
+ },
59
+ "required": ["light", "dark", "wireframe"]
60
+ }
61
+ ]
62
+ },
63
+ "component": {},
64
+ "private": {},
65
+ "deprecated": {},
66
+ "deprecated_comment": {},
67
+ "description": {},
68
+ "renamed": {},
69
+ "uuid": {},
70
+ "conceptId": {}
71
+ },
72
+ "required": ["sets", "uuid"]
73
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color.json",
4
+ "title": "Color",
5
+ "description": "Color token schema.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/color.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^rgba\\((([0-1]?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5]),\\s?){3}(0|1|0?\\.\\d+)\\)|rgb\\(([0-1]?[0-9]?[0-9]?|2[0-4][0-9]|25[0-5]){1,3}(,\\s?\\d{1,3}%?){2}\\)$"
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json",
4
+ "title": "Dimension",
5
+ "description": "Pixel or relative dimension.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/dimension.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em|%))|0|\\d+dp$"
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/drop-shadow.json",
4
+ "title": "Drop Shadow",
5
+ "description": "A composite token that defines a drop shadow.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/drop-shadow.json"
15
+ },
16
+ "value": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "properties": {
21
+ "x": {
22
+ "type": "string",
23
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em|%))|0|\\d+dp$"
24
+ },
25
+ "y": {
26
+ "type": "string",
27
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em|%))|0|\\d+dp$"
28
+ },
29
+ "blur": {
30
+ "type": "string",
31
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em|%))|0|\\d+dp$"
32
+ },
33
+ "spread": {
34
+ "type": "string",
35
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em|%))|0|\\d+dp$"
36
+ },
37
+ "color": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ "required": ["x", "y", "blur", "spread", "color"]
42
+ },
43
+ "minItems": 1
44
+ },
45
+ "component": {},
46
+ "private": {},
47
+ "deprecated": {},
48
+ "deprecated_comment": {},
49
+ "description": {},
50
+ "uuid": {}
51
+ }
52
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-family.json",
4
+ "title": "Font family",
5
+ "description": "A font family token defines a font family that can be used in a component.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-family.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:\"?\\w+\"? ?,? ?)*\"?\\w+\"?$"
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-size.json",
4
+ "title": "Dimension",
5
+ "description": "Pixel, rem, and em font sizes dimension.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-size.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:-?((?:\\d+\\.?\\d*)|(?:\\.?\\d+))(px|rem|em))$"
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-style.json",
4
+ "title": "Font style",
5
+ "description": "Sets whether a font should be styled with a normal, italic, or oblique face from its font-family",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-style.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["italic", "normal"]
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-weight.json",
4
+ "title": "Font weight",
5
+ "description": "Defines sets the weight (or boldness) of the font",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/font-weight.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["light", "regular", "medium", "bold", "extra-bold", "black"]
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/gradient-stop.json",
4
+ "title": "Color Stop",
5
+ "description": "Gradient stop positions, being a ratio along the gradient's axis. Start is 0, end is 1.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/gradient-stop.json"
15
+ },
16
+ "value": {
17
+ "type": "number",
18
+ "minimum": 0,
19
+ "maximum": 1
20
+ },
21
+ "component": {},
22
+ "private": {},
23
+ "deprecated": {},
24
+ "deprecated_comment": {},
25
+ "description": {},
26
+ "uuid": {}
27
+ }
28
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/multiplier.json",
4
+ "title": "Multiplier",
5
+ "description": "A float used to multiply a value by a given amount. Used for line-height, margin, and width/height (dimension) multipliers.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/multiplier.json"
15
+ },
16
+ "value": {
17
+ "type": "number"
18
+ },
19
+ "component": {},
20
+ "private": {},
21
+ "deprecated": {},
22
+ "deprecated_comment": {},
23
+ "description": {},
24
+ "uuid": {}
25
+ }
26
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/opacity.json",
4
+ "title": "Opacity",
5
+ "description": "A percentage measurement of the opacity.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/opacity.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "pattern": "^(?:\\d+(?:\\.\\d)+%)|(?:1|0)(?:\\.0)?|0?\\.\\d*$"
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json",
4
+ "title": "Scale set",
5
+ "description": "A set that contains dimension values that change based on platform scale.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "set.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/scale-set.json"
15
+ },
16
+ "sets": {
17
+ "type": "object",
18
+ "properties": {
19
+ "mobile": {
20
+ "anyOf": [
21
+ {
22
+ "$ref": "dimension.json"
23
+ },
24
+ {
25
+ "$ref": "font-size.json"
26
+ },
27
+ {
28
+ "$ref": "alias.json"
29
+ },
30
+ {
31
+ "$ref": "multiplier.json"
32
+ }
33
+ ]
34
+ },
35
+ "desktop": {
36
+ "anyOf": [
37
+ {
38
+ "$ref": "dimension.json"
39
+ },
40
+ {
41
+ "$ref": "font-size.json"
42
+ },
43
+ {
44
+ "$ref": "alias.json"
45
+ },
46
+ {
47
+ "$ref": "multiplier.json"
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ "required": ["mobile", "desktop"]
53
+ },
54
+ "component": {},
55
+ "private": {},
56
+ "deprecated": {},
57
+ "deprecated_comment": {},
58
+ "description": {},
59
+ "renamed": {},
60
+ "uuid": {},
61
+ "conceptId": {}
62
+ },
63
+ "required": ["sets", "uuid"]
64
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/set.json",
4
+ "title": "sets",
5
+ "description": "A generic token set.",
6
+ "type": "object",
7
+ "properties": {
8
+ "sets": {
9
+ "type": "object"
10
+ },
11
+ "component": {
12
+ "type": "string"
13
+ },
14
+ "deprecated": {
15
+ "type": "boolean"
16
+ },
17
+ "deprecated_comment": {
18
+ "type": "string"
19
+ },
20
+ "renamed": {
21
+ "type": "string",
22
+ "description": "New token name if this token has been renamed. Use for 1:1 complete replacements."
23
+ },
24
+ "description": {
25
+ "type": "string",
26
+ "description": "Plain text describing the token's purpose (aligns with DTCG $description)."
27
+ }
28
+ },
29
+ "required": ["sets"]
30
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/system-set.json",
4
+ "title": "System set",
5
+ "description": "A set that contains tokens that change based on system.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "set.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/system-set.json"
15
+ },
16
+ "sets": {
17
+ "type": "object",
18
+ "anyOf": [
19
+ {
20
+ "properties": {
21
+ "spectrum": {
22
+ "$ref": "token.json"
23
+ },
24
+ "express": {
25
+ "$ref": "token.json"
26
+ }
27
+ },
28
+ "required": ["spectrum", "express"]
29
+ },
30
+ {
31
+ "properties": {
32
+ "spectrum": {
33
+ "$ref": "alias.json"
34
+ },
35
+ "express": {
36
+ "$ref": "alias.json"
37
+ }
38
+ },
39
+ "required": ["spectrum", "express"]
40
+ },
41
+ {
42
+ "properties": {
43
+ "spectrum": {
44
+ "$ref": "color-set.json"
45
+ },
46
+ "express": {
47
+ "$ref": "color-set.json"
48
+ }
49
+ },
50
+ "required": ["spectrum", "express"]
51
+ },
52
+ {
53
+ "properties": {
54
+ "spectrum": {
55
+ "$ref": "scale-set.json"
56
+ },
57
+ "express": {
58
+ "$ref": "scale-set.json"
59
+ }
60
+ },
61
+ "required": ["spectrum", "express"]
62
+ },
63
+ {
64
+ "properties": {
65
+ "spectrum": {
66
+ "$ref": "dimension.json"
67
+ },
68
+ "express": {
69
+ "$ref": "scale-set.json"
70
+ }
71
+ },
72
+ "required": ["spectrum", "express"]
73
+ }
74
+ ]
75
+ },
76
+ "component": {},
77
+ "private": {},
78
+ "deprecated": {},
79
+ "deprecated_comment": {},
80
+ "description": {},
81
+ "renamed": {},
82
+ "uuid": {},
83
+ "conceptId": {}
84
+ },
85
+ "required": ["sets"]
86
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/text-transform.json",
4
+ "title": "Text transform",
5
+ "description": "A token that specifies how to capitalize an element's text.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/text-transform.json"
15
+ },
16
+ "value": {
17
+ "type": "string",
18
+ "enum": ["uppercase", "lowercase", "capitalize", "none"]
19
+ },
20
+ "component": {},
21
+ "private": {},
22
+ "deprecated": {},
23
+ "deprecated_comment": {},
24
+ "description": {},
25
+ "uuid": {}
26
+ }
27
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/token.json",
4
+ "title": "Token",
5
+ "description": "A general token.",
6
+ "type": "object",
7
+ "properties": {
8
+ "value": {
9
+ "anyOf": [
10
+ {
11
+ "type": "number"
12
+ },
13
+ {
14
+ "type": "string"
15
+ },
16
+ {
17
+ "type": "object"
18
+ },
19
+ {
20
+ "type": "array"
21
+ }
22
+ ]
23
+ },
24
+ "component": {
25
+ "type": "string"
26
+ },
27
+ "private": {
28
+ "type": "boolean",
29
+ "default": false
30
+ },
31
+ "deprecated": {
32
+ "type": ["boolean", "string"],
33
+ "default": false,
34
+ "description": "Boolean (legacy) or version string (cascade). Truthy = deprecated."
35
+ },
36
+ "deprecated_comment": {
37
+ "type": "string"
38
+ },
39
+ "renamed": {
40
+ "type": "string",
41
+ "description": "Legacy format: new token name. Use replaced_by (UUID) in cascade format instead."
42
+ },
43
+ "replaced_by": {
44
+ "oneOf": [
45
+ { "type": "string", "format": "uuid" },
46
+ {
47
+ "type": "array",
48
+ "items": { "type": "string", "format": "uuid" },
49
+ "minItems": 1
50
+ }
51
+ ],
52
+ "description": "UUID(s) of the replacement token(s). Array form requires deprecated_comment."
53
+ },
54
+ "plannedRemoval": {
55
+ "type": "string",
56
+ "description": "Spec version when token will be removed."
57
+ },
58
+ "description": {
59
+ "type": "string",
60
+ "description": "Plain text describing the token's purpose (aligns with DTCG $description)."
61
+ },
62
+ "uuid": {
63
+ "type": "string",
64
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
65
+ "format": "uuid"
66
+ },
67
+ "conceptId": {
68
+ "type": "string",
69
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
70
+ "format": "uuid",
71
+ "description": "Canonical concept-level UUID shared by every mode row of this design concept. Additive to the per-value uuid (which remains the $ref/diff/replacedBy/sync anchor)."
72
+ }
73
+ },
74
+ "required": ["value", "uuid"]
75
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/typography.json",
4
+ "title": "Typography",
5
+ "description": "A composite typography token.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "token.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "$schema": {
14
+ "const": "https://opensource.adobe.com/spectrum-design-data/schemas/token-types/typography.json"
15
+ },
16
+ "value": {
17
+ "type": "object",
18
+ "properties": {
19
+ "fontFamily": {
20
+ "type": "string",
21
+ "pattern": "^\\{(\\w|-)*\\}$"
22
+ },
23
+ "fontSize": {
24
+ "type": "string",
25
+ "pattern": "^\\{(\\w|-)*\\}$"
26
+ },
27
+ "fontWeight": {
28
+ "type": "string",
29
+ "pattern": "^\\{(\\w|-)*\\}$"
30
+ },
31
+ "letterSpacing": {
32
+ "type": "string",
33
+ "pattern": "^\\{(\\w|-)*\\}$"
34
+ },
35
+ "lineHeight": {
36
+ "type": "string",
37
+ "pattern": "^\\{(\\w|-)*\\}$"
38
+ }
39
+ }
40
+ },
41
+ "component": {},
42
+ "private": {},
43
+ "deprecated": {},
44
+ "deprecated_comment": {},
45
+ "description": {},
46
+ "uuid": {}
47
+ }
48
+ }
package/spec/manifest.md CHANGED
@@ -8,26 +8,26 @@ This document defines the **platform manifest**: how a platform implementation r
8
8
 
9
9
  The manifest supports a fixed, enumerated set of operations against the foundation — it does **not** allow overriding, aliasing, or removing arbitrary foundation artifacts. Support is concentrated on tokens; translations and schemas have no manifest-level override mechanism at all.
10
10
 
11
- | Operation | Supported? | Field | Applies to |
12
- | --------------------------------------------------- | ------------------------------------------------------------ | --------------------------------- | --------------------------- |
13
- | Remove / exclude | Yes | `exclude` | Tokens only |
14
- | Include / whitelist | Yes | `include` | Tokens only |
15
- | Override value (type-preserving) | Yes | `overrides[].value` | Tokens only |
16
- | Override → re-alias | Yes | `overrides[].$ref` | Tokens only |
17
- | Add new tokens (may alias via `$ref`) | Yes | `extensions/tokens/` | Tokens |
18
- | Add / replace components | Yes | `extensions/components/` | Components |
19
- | Add / replace field declarations | Yes | `extensions/fields/` | Fields |
20
- | Add / replace guideline documents | Yes | `extensions/guidelines/` | Guidelines |
21
- | Declare / replace platform-local mode set | Yes | `extensions/mode-sets/` | Mode sets |
22
- | Add / remove / retarget a single mode; remove a set | Yes | `extensions/mode-sets/` (`op`) | Mode sets |
23
- | Add relationships/CTRs; override/remove by `uuid` | Yes | `extensions/relationships/` | Relationships (CTRs) |
24
- | Add / remove naming exceptions | Yes | `namingExceptions` | Naming validation |
25
- | Annotate existing terminology (cannot add new ids) | Yes | `extensions/platform-extensions/` | Existing registry ids |
26
- | Upsert / remove own implementation mappings | Yes | `extensions/implementations/` | Component `implementations` |
27
- | Restrict allowed mode-set values | Yes | `modeSetRestrictions` | Mode sets |
28
- | Reformat name serialization | Schema-declared only, not yet applied by the reference SDK | `formatting` | Token name strings |
29
- | Override/remove/alias translations | No | — | — |
30
- | Override Layer-1 schemas | No (decided; see [spike](manifest-schema-override-spike.md)) | — | — |
11
+ | Operation | Supported? | Field | Applies to |
12
+ | --------------------------------------------------- | ------------------------------------------------------------ | --------------------------------- | ------------------------------ |
13
+ | Remove / exclude | Yes | `exclude` | Tokens only |
14
+ | Include / whitelist | Yes | `include` | Tokens only |
15
+ | Override value (type-preserving) | Yes | `overrides[].value` | Tokens only |
16
+ | Override → re-alias | Yes | `overrides[].$ref` | Tokens only |
17
+ | Add new tokens (may alias via `$ref`) | Yes | `extensions/tokens/` | Tokens |
18
+ | Add / replace components | Yes | `extensions/components/` | Components |
19
+ | Add / replace field declarations | Yes | `extensions/fields/` | Fields |
20
+ | Add / replace guideline documents | Yes | `extensions/guidelines/` | Guidelines |
21
+ | Declare / replace platform-local mode set | Yes | `extensions/mode-sets/` | Mode sets |
22
+ | Add / remove / retarget a single mode; remove a set | Yes | `extensions/mode-sets/` (`op`) | Mode sets |
23
+ | Add relationships/CTRs; override/remove by `uuid` | Yes | `extensions/relationships/` | Relationships (CTRs) |
24
+ | Add / remove naming exceptions | Yes | `namingExceptions` | Naming validation |
25
+ | Annotate existing terminology (cannot add new ids) | Yes | `extensions/platform-extensions/` | Existing registry ids or modes |
26
+ | Upsert / remove own implementation mappings | Yes | `extensions/implementations/` | Component `implementations` |
27
+ | Restrict allowed mode-set values | Yes | `modeSetRestrictions` | Mode sets |
28
+ | Reformat name serialization | Schema-declared only, not yet applied by the reference SDK | `formatting` | Token name strings |
29
+ | Override/remove/alias translations | No | — | — |
30
+ | Override Layer-1 schemas | No (decided; see [spike](manifest-schema-override-spike.md)) | — | — |
31
31
 
32
32
  ## Manifest document
33
33
 
@@ -35,10 +35,10 @@ A manifest **MUST** conform to [`manifest.schema.json`](../schemas/manifest.sche
35
35
 
36
36
  ## Required fields
37
37
 
38
- | Field | Type | Description |
39
- | ------------------- | ------ | ------------------------------------------------------------- |
40
- | `specVersion` | string | **MUST** be `1.0.0-draft` for documents targeting this draft. |
41
- | `foundationVersion` | string | Pin to a released foundation version (semver or tag string). |
38
+ | Field | Type | Description |
39
+ | ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | `specVersion` | string | **MUST** be `1.0.0-draft` for documents targeting this draft. |
41
+ | `foundationVersion` | string | Pin to a released foundation version (semver or tag string). Spectrum platforms use the canonical package tag `@adobe/spectrum-design-data@<version>`, not the generated legacy `@adobe/spectrum-tokens`. |
42
42
 
43
43
  ## Optional fields
44
44
 
@@ -215,11 +215,12 @@ a new axis.
215
215
 
216
216
  #### `extensions/platform-extensions/`
217
217
 
218
- Platform terminology annotations layered onto **existing** foundation registry entries (for
219
- example, platform-specific state names). **NORMATIVE:** each file **MUST** validate against
220
- `platform-extension.json`, and every `termId` **MUST** already exist in the referenced
221
- foundation registry — this mechanism annotates existing ids, it does **NOT** introduce new
222
- ones.
218
+ Platform terminology annotations for **existing** registry entries or mode-set values (for
219
+ example, platform-specific state or contrast names). **NORMATIVE:** each file **MUST**
220
+ validate against `platform-extension.json`. `extends` **MUST** name a foundation registry
221
+ (by field name or registry-file basename) or an active mode set. Every `termId` **MUST**
222
+ exist in that registry or the mode set's `modes`, after applying the manifest's mode-set
223
+ edits. This mechanism annotates existing ids and modes; it does **NOT** introduce new ones.
223
224
 
224
225
  #### `extensions/implementations/`
225
226