@design-token-kit/core 0.2.0 → 0.3.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.
Files changed (28) hide show
  1. package/LICENSE +159 -159
  2. package/README.md +57 -57
  3. package/lib/index.d.ts +132 -17
  4. package/lib/index.js +724 -624
  5. package/lib/schemas/2025.10/format/group.json +55 -55
  6. package/lib/schemas/2025.10/format/groupOrToken.json +15 -15
  7. package/lib/schemas/2025.10/format/token.json +425 -425
  8. package/lib/schemas/2025.10/format/tokenType.json +23 -23
  9. package/lib/schemas/2025.10/format/values/border.json +45 -45
  10. package/lib/schemas/2025.10/format/values/color.json +515 -515
  11. package/lib/schemas/2025.10/format/values/cubicBezier.json +57 -57
  12. package/lib/schemas/2025.10/format/values/dimension.json +35 -35
  13. package/lib/schemas/2025.10/format/values/duration.json +35 -35
  14. package/lib/schemas/2025.10/format/values/fontFamily.json +34 -34
  15. package/lib/schemas/2025.10/format/values/fontWeight.json +39 -39
  16. package/lib/schemas/2025.10/format/values/gradient.json +53 -53
  17. package/lib/schemas/2025.10/format/values/number.json +8 -8
  18. package/lib/schemas/2025.10/format/values/shadow.json +103 -103
  19. package/lib/schemas/2025.10/format/values/strokeStyle.json +64 -64
  20. package/lib/schemas/2025.10/format/values/transition.json +45 -45
  21. package/lib/schemas/2025.10/format/values/typography.json +73 -73
  22. package/lib/schemas/2025.10/format.json +106 -106
  23. package/lib/schemas/2025.10/resolver/modifier.json +85 -85
  24. package/lib/schemas/2025.10/resolver/resolutionOrder.json +117 -117
  25. package/lib/schemas/2025.10/resolver/set.json +71 -71
  26. package/lib/schemas/2025.10/resolver.json +62 -62
  27. package/lib/schemas/hrdt-tokens.json +533 -533
  28. package/package.json +3 -2
@@ -1,57 +1,57 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/cubicBezier.json",
4
- "title": "Cubic Bezier Value",
5
- "description": "Value schema for cubicBezier type tokens. Represents how the value of an animated property progresses towards completion over the duration of an animation, effectively creating visual effects such as acceleration, deceleration, and bounce.",
6
- "type": "array",
7
- "items": [
8
- {
9
- "$ref": "#/definitions/xCoordinate",
10
- "description": "P1x - X coordinate of first control point"
11
- },
12
- {
13
- "$ref": "#/definitions/yCoordinate",
14
- "description": "P1y - Y coordinate of first control point"
15
- },
16
- {
17
- "$ref": "#/definitions/xCoordinate",
18
- "description": "P2x - X coordinate of second control point"
19
- },
20
- {
21
- "$ref": "#/definitions/yCoordinate",
22
- "description": "P2y - Y coordinate of second control point"
23
- }
24
- ],
25
- "additionalItems": false,
26
- "minItems": 4,
27
- "maxItems": 4,
28
- "definitions": {
29
- "xCoordinate": {
30
- "title": "X Coordinate",
31
- "description": "X coordinate of control point (must be between 0 and 1)",
32
- "oneOf": [
33
- {
34
- "type": "number",
35
- "minimum": 0,
36
- "maximum": 1
37
- },
38
- {
39
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
40
- }
41
- ]
42
- },
43
- "yCoordinate": {
44
- "title": "Y Coordinate",
45
- "description": "Y coordinate of control point (can be any real number)",
46
- "oneOf": [
47
- {
48
- "type": "number"
49
- },
50
- {
51
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
52
- }
53
- ]
54
- }
55
- }
56
- }
57
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/cubicBezier.json",
4
+ "title": "Cubic Bezier Value",
5
+ "description": "Value schema for cubicBezier type tokens. Represents how the value of an animated property progresses towards completion over the duration of an animation, effectively creating visual effects such as acceleration, deceleration, and bounce.",
6
+ "type": "array",
7
+ "items": [
8
+ {
9
+ "$ref": "#/definitions/xCoordinate",
10
+ "description": "P1x - X coordinate of first control point"
11
+ },
12
+ {
13
+ "$ref": "#/definitions/yCoordinate",
14
+ "description": "P1y - Y coordinate of first control point"
15
+ },
16
+ {
17
+ "$ref": "#/definitions/xCoordinate",
18
+ "description": "P2x - X coordinate of second control point"
19
+ },
20
+ {
21
+ "$ref": "#/definitions/yCoordinate",
22
+ "description": "P2y - Y coordinate of second control point"
23
+ }
24
+ ],
25
+ "additionalItems": false,
26
+ "minItems": 4,
27
+ "maxItems": 4,
28
+ "definitions": {
29
+ "xCoordinate": {
30
+ "title": "X Coordinate",
31
+ "description": "X coordinate of control point (must be between 0 and 1)",
32
+ "oneOf": [
33
+ {
34
+ "type": "number",
35
+ "minimum": 0,
36
+ "maximum": 1
37
+ },
38
+ {
39
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
40
+ }
41
+ ]
42
+ },
43
+ "yCoordinate": {
44
+ "title": "Y Coordinate",
45
+ "description": "Y coordinate of control point (can be any real number)",
46
+ "oneOf": [
47
+ {
48
+ "type": "number"
49
+ },
50
+ {
51
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ }
57
+
@@ -1,35 +1,35 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/dimension.json",
4
- "title": "Dimension Value",
5
- "description": "Value schema for dimension type tokens. Represents an amount of distance in a single dimension in the UI, such as a position, width, height, radius, or thickness.",
6
- "type": "object",
7
- "properties": {
8
- "value": {
9
- "description": "An integer or floating-point value representing the numeric value.",
10
- "oneOf": [
11
- {
12
- "type": "number"
13
- },
14
- {
15
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
16
- }
17
- ]
18
- },
19
- "unit": {
20
- "description": "Unit of distance. Supported values: 'px' (idealized pixel, equivalent to dp on Android and pt on iOS), 'rem' (multiple of system's default font size).",
21
- "oneOf": [
22
- {
23
- "type": "string",
24
- "enum": ["px", "rem"]
25
- },
26
- {
27
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
28
- }
29
- ]
30
- }
31
- },
32
- "required": ["value", "unit"],
33
- "additionalProperties": false
34
- }
35
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/dimension.json",
4
+ "title": "Dimension Value",
5
+ "description": "Value schema for dimension type tokens. Represents an amount of distance in a single dimension in the UI, such as a position, width, height, radius, or thickness.",
6
+ "type": "object",
7
+ "properties": {
8
+ "value": {
9
+ "description": "An integer or floating-point value representing the numeric value.",
10
+ "oneOf": [
11
+ {
12
+ "type": "number"
13
+ },
14
+ {
15
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
16
+ }
17
+ ]
18
+ },
19
+ "unit": {
20
+ "description": "Unit of distance. Supported values: 'px' (idealized pixel, equivalent to dp on Android and pt on iOS), 'rem' (multiple of system's default font size).",
21
+ "oneOf": [
22
+ {
23
+ "type": "string",
24
+ "enum": ["px", "rem"]
25
+ },
26
+ {
27
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ "required": ["value", "unit"],
33
+ "additionalProperties": false
34
+ }
35
+
@@ -1,35 +1,35 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/duration.json",
4
- "title": "Duration Value",
5
- "description": "Value schema for duration type tokens. Represents the length of time in milliseconds an animation or animation cycle takes to complete.",
6
- "type": "object",
7
- "properties": {
8
- "value": {
9
- "description": "An integer or floating-point value representing the numeric value.",
10
- "oneOf": [
11
- {
12
- "type": "number"
13
- },
14
- {
15
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
16
- }
17
- ]
18
- },
19
- "unit": {
20
- "description": "Unit of time. Supported values: 'ms' (millisecond), 's' (second).",
21
- "oneOf": [
22
- {
23
- "type": "string",
24
- "enum": ["ms", "s"]
25
- },
26
- {
27
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
28
- }
29
- ]
30
- }
31
- },
32
- "required": ["value", "unit"],
33
- "additionalProperties": false
34
- }
35
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/duration.json",
4
+ "title": "Duration Value",
5
+ "description": "Value schema for duration type tokens. Represents the length of time in milliseconds an animation or animation cycle takes to complete.",
6
+ "type": "object",
7
+ "properties": {
8
+ "value": {
9
+ "description": "An integer or floating-point value representing the numeric value.",
10
+ "oneOf": [
11
+ {
12
+ "type": "number"
13
+ },
14
+ {
15
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
16
+ }
17
+ ]
18
+ },
19
+ "unit": {
20
+ "description": "Unit of time. Supported values: 'ms' (millisecond), 's' (second).",
21
+ "oneOf": [
22
+ {
23
+ "type": "string",
24
+ "enum": ["ms", "s"]
25
+ },
26
+ {
27
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ "required": ["value", "unit"],
33
+ "additionalProperties": false
34
+ }
35
+
@@ -1,34 +1,34 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/fontFamily.json",
4
- "title": "Font Family Value",
5
- "description": "Value schema for fontFamily type tokens. Represents a font name or an array of font names (ordered from most to least preferred).",
6
- "oneOf": [
7
- {
8
- "type": "string",
9
- "description": "A single font name",
10
- "not": {
11
- "$ref": "../../format.json#/definitions/curlyBraceReference"
12
- }
13
- },
14
- {
15
- "type": "array",
16
- "description": "An array of font names, ordered from most to least preferred",
17
- "items": {
18
- "oneOf": [
19
- {
20
- "type": "string",
21
- "not": {
22
- "$ref": "../../format.json#/definitions/curlyBraceReference"
23
- }
24
- },
25
- {
26
- "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
27
- }
28
- ]
29
- },
30
- "minItems": 1
31
- }
32
- ]
33
- }
34
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/fontFamily.json",
4
+ "title": "Font Family Value",
5
+ "description": "Value schema for fontFamily type tokens. Represents a font name or an array of font names (ordered from most to least preferred).",
6
+ "oneOf": [
7
+ {
8
+ "type": "string",
9
+ "description": "A single font name",
10
+ "not": {
11
+ "$ref": "../../format.json#/definitions/curlyBraceReference"
12
+ }
13
+ },
14
+ {
15
+ "type": "array",
16
+ "description": "An array of font names, ordered from most to least preferred",
17
+ "items": {
18
+ "oneOf": [
19
+ {
20
+ "type": "string",
21
+ "not": {
22
+ "$ref": "../../format.json#/definitions/curlyBraceReference"
23
+ }
24
+ },
25
+ {
26
+ "$ref": "../../format.json#/definitions/jsonPointerReferenceObject"
27
+ }
28
+ ]
29
+ },
30
+ "minItems": 1
31
+ }
32
+ ]
33
+ }
34
+
@@ -1,39 +1,39 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/fontWeight.json",
4
- "title": "Font Weight Value",
5
- "description": "Value schema for fontWeight type tokens. Represents a font weight as per the OpenType wght tag specification. Lower numbers represent lighter weights, higher numbers represent thicker weights.",
6
- "oneOf": [
7
- {
8
- "type": "number",
9
- "description": "Numeric font weight value",
10
- "minimum": 1,
11
- "maximum": 1000
12
- },
13
- {
14
- "type": "string",
15
- "description": "Pre-defined font weight string value",
16
- "enum": [
17
- "thin",
18
- "hairline",
19
- "extra-light",
20
- "ultra-light",
21
- "light",
22
- "normal",
23
- "regular",
24
- "book",
25
- "medium",
26
- "semi-bold",
27
- "demi-bold",
28
- "bold",
29
- "extra-bold",
30
- "ultra-bold",
31
- "black",
32
- "heavy",
33
- "extra-black",
34
- "ultra-black"
35
- ]
36
- }
37
- ]
38
- }
39
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/fontWeight.json",
4
+ "title": "Font Weight Value",
5
+ "description": "Value schema for fontWeight type tokens. Represents a font weight as per the OpenType wght tag specification. Lower numbers represent lighter weights, higher numbers represent thicker weights.",
6
+ "oneOf": [
7
+ {
8
+ "type": "number",
9
+ "description": "Numeric font weight value",
10
+ "minimum": 1,
11
+ "maximum": 1000
12
+ },
13
+ {
14
+ "type": "string",
15
+ "description": "Pre-defined font weight string value",
16
+ "enum": [
17
+ "thin",
18
+ "hairline",
19
+ "extra-light",
20
+ "ultra-light",
21
+ "light",
22
+ "normal",
23
+ "regular",
24
+ "book",
25
+ "medium",
26
+ "semi-bold",
27
+ "demi-bold",
28
+ "bold",
29
+ "extra-bold",
30
+ "ultra-bold",
31
+ "black",
32
+ "heavy",
33
+ "extra-black",
34
+ "ultra-black"
35
+ ]
36
+ }
37
+ ]
38
+ }
39
+
@@ -1,53 +1,53 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/gradient.json",
4
- "title": "Gradient Value",
5
- "description": "Value schema for gradient type tokens. Represents a color gradient.",
6
- "type": "array",
7
- "items": {
8
- "oneOf": [
9
- {
10
- "$ref": "#/definitions/gradientStop"
11
- },
12
- {
13
- "$ref": "../../format.json#/definitions/tokenValueReference"
14
- }
15
- ]
16
- },
17
- "minItems": 1,
18
- "definitions": {
19
- "gradientStop": {
20
- "title": "Gradient Stop",
21
- "type": "object",
22
- "properties": {
23
- "color": {
24
- "description": "The color value at the stop's position on the gradient",
25
- "oneOf": [
26
- {
27
- "$ref": "color.json"
28
- },
29
- {
30
- "$ref": "../../format.json#/definitions/tokenValueReference"
31
- }
32
- ]
33
- },
34
- "position": {
35
- "description": "The position of the stop along the gradient's axis (range [0, 1]). Values outside this range are clamped.",
36
- "oneOf": [
37
- {
38
- "type": "number",
39
- "minimum": 0,
40
- "maximum": 1
41
- },
42
- {
43
- "$ref": "../../format.json#/definitions/tokenValueReference"
44
- }
45
- ]
46
- }
47
- },
48
- "required": ["color", "position"],
49
- "additionalProperties": false
50
- }
51
- }
52
- }
53
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/gradient.json",
4
+ "title": "Gradient Value",
5
+ "description": "Value schema for gradient type tokens. Represents a color gradient.",
6
+ "type": "array",
7
+ "items": {
8
+ "oneOf": [
9
+ {
10
+ "$ref": "#/definitions/gradientStop"
11
+ },
12
+ {
13
+ "$ref": "../../format.json#/definitions/tokenValueReference"
14
+ }
15
+ ]
16
+ },
17
+ "minItems": 1,
18
+ "definitions": {
19
+ "gradientStop": {
20
+ "title": "Gradient Stop",
21
+ "type": "object",
22
+ "properties": {
23
+ "color": {
24
+ "description": "The color value at the stop's position on the gradient",
25
+ "oneOf": [
26
+ {
27
+ "$ref": "color.json"
28
+ },
29
+ {
30
+ "$ref": "../../format.json#/definitions/tokenValueReference"
31
+ }
32
+ ]
33
+ },
34
+ "position": {
35
+ "description": "The position of the stop along the gradient's axis (range [0, 1]). Values outside this range are clamped.",
36
+ "oneOf": [
37
+ {
38
+ "type": "number",
39
+ "minimum": 0,
40
+ "maximum": 1
41
+ },
42
+ {
43
+ "$ref": "../../format.json#/definitions/tokenValueReference"
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ "required": ["color", "position"],
49
+ "additionalProperties": false
50
+ }
51
+ }
52
+ }
53
+
@@ -1,8 +1,8 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://www.designtokens.org/schemas/2025.10/format/values/number.json",
4
- "title": "Number Value",
5
- "description": "Value schema for number type tokens. Numbers can be positive, negative and have fractions. Example uses are gradient stop positions or unitless line heights.",
6
- "type": "number"
7
- }
8
-
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://www.designtokens.org/schemas/2025.10/format/values/number.json",
4
+ "title": "Number Value",
5
+ "description": "Value schema for number type tokens. Numbers can be positive, negative and have fractions. Example uses are gradient stop positions or unitless line heights.",
6
+ "type": "number"
7
+ }
8
+