@adobe/design-data-spec 4.6.0 → 4.7.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 +3 -1
- package/schemas/manifest.schema.json +1 -1
- package/schemas/token-file.json +33 -0
- package/schemas/token-types/alias.json +70 -0
- package/schemas/token-types/alignment.json +28 -0
- package/schemas/token-types/angle.json +26 -0
- package/schemas/token-types/color-set.json +73 -0
- package/schemas/token-types/color.json +27 -0
- package/schemas/token-types/dimension.json +27 -0
- package/schemas/token-types/drop-shadow.json +52 -0
- package/schemas/token-types/font-family.json +27 -0
- package/schemas/token-types/font-size.json +27 -0
- package/schemas/token-types/font-style.json +27 -0
- package/schemas/token-types/font-weight.json +27 -0
- package/schemas/token-types/gradient-stop.json +28 -0
- package/schemas/token-types/multiplier.json +26 -0
- package/schemas/token-types/opacity.json +27 -0
- package/schemas/token-types/scale-set.json +64 -0
- package/schemas/token-types/set.json +30 -0
- package/schemas/token-types/system-set.json +86 -0
- package/schemas/token-types/text-transform.json +27 -0
- package/schemas/token-types/token.json +75 -0
- package/schemas/token-types/typography.json +48 -0
- package/spec/manifest.md +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/design-data-spec",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.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",
|
|
@@ -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
|
@@ -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
|
|