design-constraint-validator 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.
Files changed (116) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +215 -659
  3. package/adapters/README.md +46 -46
  4. package/adapters/css.ts +116 -116
  5. package/adapters/js.ts +14 -14
  6. package/adapters/json.ts +45 -45
  7. package/cli/build-css.ts +32 -32
  8. package/cli/commands/build.ts +65 -65
  9. package/cli/commands/graph.d.ts.map +1 -1
  10. package/cli/commands/graph.js +26 -10
  11. package/cli/commands/graph.ts +180 -137
  12. package/cli/commands/index.ts +7 -7
  13. package/cli/commands/patch-apply.ts +80 -80
  14. package/cli/commands/patch.ts +22 -22
  15. package/cli/commands/set.d.ts.map +1 -1
  16. package/cli/commands/set.js +12 -4
  17. package/cli/commands/set.ts +239 -225
  18. package/cli/commands/utils.ts +50 -50
  19. package/cli/commands/validate.d.ts.map +1 -1
  20. package/cli/commands/validate.js +86 -33
  21. package/cli/commands/validate.ts +176 -115
  22. package/cli/commands/why.d.ts.map +1 -1
  23. package/cli/commands/why.js +86 -20
  24. package/cli/commands/why.ts +158 -46
  25. package/cli/config-schema.ts +27 -27
  26. package/cli/config.ts +35 -35
  27. package/cli/constraint-registry.d.ts +101 -0
  28. package/cli/constraint-registry.d.ts.map +1 -0
  29. package/cli/constraint-registry.js +225 -0
  30. package/cli/constraint-registry.ts +304 -0
  31. package/cli/constraints-loader.d.ts +30 -0
  32. package/cli/constraints-loader.d.ts.map +1 -0
  33. package/cli/constraints-loader.js +58 -0
  34. package/cli/constraints-loader.ts +83 -0
  35. package/cli/cross-axis-loader.d.ts +91 -0
  36. package/cli/cross-axis-loader.d.ts.map +1 -0
  37. package/cli/cross-axis-loader.js +222 -0
  38. package/cli/cross-axis-loader.ts +289 -0
  39. package/cli/dcv.js +4 -0
  40. package/cli/dcv.ts +111 -107
  41. package/cli/engine-helpers.d.ts +33 -0
  42. package/cli/engine-helpers.d.ts.map +1 -1
  43. package/cli/engine-helpers.js +87 -22
  44. package/cli/engine-helpers.ts +133 -61
  45. package/cli/graph-poset.ts +74 -74
  46. package/cli/json-output.d.ts +64 -0
  47. package/cli/json-output.d.ts.map +1 -0
  48. package/cli/json-output.js +107 -0
  49. package/cli/json-output.ts +177 -0
  50. package/cli/result.ts +27 -27
  51. package/cli/run.ts +54 -54
  52. package/cli/smoke-test.ts +40 -40
  53. package/cli/types.d.ts +6 -0
  54. package/cli/types.d.ts.map +1 -1
  55. package/cli/types.ts +84 -78
  56. package/core/breakpoints.ts +50 -50
  57. package/core/cli-format.ts +31 -31
  58. package/core/color.ts +148 -148
  59. package/core/constraints/cross-axis.ts +114 -114
  60. package/core/constraints/monotonic-lightness.ts +38 -38
  61. package/core/constraints/monotonic.ts +74 -74
  62. package/core/constraints/threshold.ts +43 -43
  63. package/core/constraints/wcag.ts +70 -70
  64. package/core/cross-axis-config.d.ts +29 -0
  65. package/core/cross-axis-config.d.ts.map +1 -1
  66. package/core/cross-axis-config.js +29 -0
  67. package/core/cross-axis-config.ts +181 -151
  68. package/core/engine.d.ts +95 -0
  69. package/core/engine.d.ts.map +1 -1
  70. package/core/engine.js +22 -0
  71. package/core/engine.ts +167 -65
  72. package/core/flatten.ts +116 -116
  73. package/core/image-export.ts +48 -48
  74. package/core/index.d.ts +9 -30
  75. package/core/index.d.ts.map +1 -1
  76. package/core/index.js +7 -54
  77. package/core/index.ts +10 -72
  78. package/core/patch.ts +134 -134
  79. package/core/poset.ts +311 -311
  80. package/core/why.ts +63 -63
  81. package/package.json +96 -90
  82. package/themes/color.lg.order.json +15 -15
  83. package/themes/color.md.order.json +15 -15
  84. package/themes/color.order.json +15 -15
  85. package/themes/color.sm.order.json +15 -15
  86. package/themes/cross-axis.rules.json +35 -35
  87. package/themes/cross-axis.sm.rules.json +12 -12
  88. package/themes/layout.lg.order.json +18 -18
  89. package/themes/layout.md.order.json +18 -18
  90. package/themes/layout.order.json +18 -18
  91. package/themes/layout.sm.order.json +18 -18
  92. package/themes/spacing.order.json +14 -14
  93. package/themes/typography.lg.order.json +15 -15
  94. package/themes/typography.md.order.json +15 -15
  95. package/themes/typography.order.json +15 -15
  96. package/themes/typography.sm.order.json +15 -15
  97. package/dist/test-overrides-removal.json +0 -4
  98. package/dist/tmp.patch.json +0 -35
  99. package/tokens/overrides/base.json +0 -22
  100. package/tokens/overrides/lg.json +0 -20
  101. package/tokens/overrides/md.json +0 -16
  102. package/tokens/overrides/sm.json +0 -16
  103. package/tokens/overrides/viol.color.json +0 -6
  104. package/tokens/overrides/viol.typography.json +0 -6
  105. package/tokens/tokens.demo-violations.json +0 -116
  106. package/tokens/tokens.example.json +0 -128
  107. package/tokens/tokens.json +0 -67
  108. package/tokens/tokens.multi-violations.json +0 -21
  109. package/tokens/tokens.schema.d.ts +0 -2298
  110. package/tokens/tokens.schema.d.ts.map +0 -1
  111. package/tokens/tokens.schema.js +0 -148
  112. package/tokens/tokens.schema.ts +0 -196
  113. package/tokens/tokens.test.json +0 -38
  114. package/tokens/tokens.touch-violation.json +0 -8
  115. package/tokens/typography.classes.css +0 -11
  116. package/tokens/typography.css +0 -20
@@ -1,18 +1,18 @@
1
- {
2
- "$description": "Layout hierarchy order constraints - container widths grow, padding hierarchy, gutters ≤ paddings, control touch targets",
3
- "order": [
4
- ["layout.container.xs", "<=", "layout.container.sm"],
5
- ["layout.container.sm", "<=", "layout.container.md"],
6
- ["layout.container.md", "<=", "layout.container.lg"],
7
- ["layout.container.lg", "<=", "layout.container.xl"],
8
-
9
- ["layout.padding.page", ">=", "layout.padding.section"],
10
- ["layout.padding.section", ">=", "layout.padding.card"],
11
- ["layout.padding.card", ">=", "layout.padding.chip"],
12
-
13
- ["layout.grid.gutter", "<=", "layout.padding.section"],
14
- ["layout.grid.gutter", "<=", "layout.padding.card"],
15
-
16
- ["control.size.min", ">=", "layout.padding.card"]
17
- ]
18
- }
1
+ {
2
+ "$description": "Layout hierarchy order constraints - container widths grow, padding hierarchy, gutters ≤ paddings, control touch targets",
3
+ "order": [
4
+ ["layout.container.xs", "<=", "layout.container.sm"],
5
+ ["layout.container.sm", "<=", "layout.container.md"],
6
+ ["layout.container.md", "<=", "layout.container.lg"],
7
+ ["layout.container.lg", "<=", "layout.container.xl"],
8
+
9
+ ["layout.padding.page", ">=", "layout.padding.section"],
10
+ ["layout.padding.section", ">=", "layout.padding.card"],
11
+ ["layout.padding.card", ">=", "layout.padding.chip"],
12
+
13
+ ["layout.grid.gutter", "<=", "layout.padding.section"],
14
+ ["layout.grid.gutter", "<=", "layout.padding.card"],
15
+
16
+ ["control.size.min", ">=", "layout.padding.card"]
17
+ ]
18
+ }
@@ -1,18 +1,18 @@
1
- {
2
- "$description": "Layout hierarchy order constraints - SM breakpoint specific",
3
- "order": [
4
- ["layout.container.xs", "<=", "layout.container.sm"],
5
- ["layout.container.sm", "<=", "layout.container.md"],
6
- ["layout.container.md", "<=", "layout.container.lg"],
7
- ["layout.container.lg", "<=", "layout.container.xl"],
8
-
9
- ["layout.padding.page", ">=", "layout.padding.section"],
10
- ["layout.padding.section", ">=", "layout.padding.card"],
11
- ["layout.padding.card", ">=", "layout.padding.chip"],
12
-
13
- ["layout.grid.gutter", "<=", "layout.padding.section"],
14
- ["layout.grid.gutter", "<=", "layout.padding.card"],
15
-
16
- ["control.size.min", ">=", "layout.padding.card"]
17
- ]
18
- }
1
+ {
2
+ "$description": "Layout hierarchy order constraints - SM breakpoint specific",
3
+ "order": [
4
+ ["layout.container.xs", "<=", "layout.container.sm"],
5
+ ["layout.container.sm", "<=", "layout.container.md"],
6
+ ["layout.container.md", "<=", "layout.container.lg"],
7
+ ["layout.container.lg", "<=", "layout.container.xl"],
8
+
9
+ ["layout.padding.page", ">=", "layout.padding.section"],
10
+ ["layout.padding.section", ">=", "layout.padding.card"],
11
+ ["layout.padding.card", ">=", "layout.padding.chip"],
12
+
13
+ ["layout.grid.gutter", "<=", "layout.padding.section"],
14
+ ["layout.grid.gutter", "<=", "layout.padding.card"],
15
+
16
+ ["control.size.min", ">=", "layout.padding.card"]
17
+ ]
18
+ }
@@ -1,14 +1,14 @@
1
- {
2
- "$description": "Spacing scale order constraints - defines monotonic spacing hierarchy",
3
- "order": [
4
- ["size.spacing.12", ">=", "size.spacing.10"],
5
- ["size.spacing.10", ">=", "size.spacing.8"],
6
- ["size.spacing.8", ">=", "size.spacing.6"],
7
- ["size.spacing.6", ">=", "size.spacing.4"],
8
- ["size.spacing.4", ">=", "size.spacing.3"],
9
- ["size.spacing.3", ">=", "size.spacing.2-5"],
10
- ["size.spacing.2-5", ">=", "size.spacing.2"],
11
- ["size.spacing.2", ">=", "size.spacing.1"],
12
- ["size.spacing.1", ">=", "size.spacing.0-5"]
13
- ]
14
- }
1
+ {
2
+ "$description": "Spacing scale order constraints - defines monotonic spacing hierarchy",
3
+ "order": [
4
+ ["size.spacing.12", ">=", "size.spacing.10"],
5
+ ["size.spacing.10", ">=", "size.spacing.8"],
6
+ ["size.spacing.8", ">=", "size.spacing.6"],
7
+ ["size.spacing.6", ">=", "size.spacing.4"],
8
+ ["size.spacing.4", ">=", "size.spacing.3"],
9
+ ["size.spacing.3", ">=", "size.spacing.2-5"],
10
+ ["size.spacing.2-5", ">=", "size.spacing.2"],
11
+ ["size.spacing.2", ">=", "size.spacing.1"],
12
+ ["size.spacing.1", ">=", "size.spacing.0-5"]
13
+ ]
14
+ }
@@ -1,15 +1,15 @@
1
- {
2
- "$description": "Typography hierarchy order constraints - LG breakpoint specific",
3
- "order": [
4
- ["typography.size.h1", ">=", "typography.size.h2"],
5
- ["typography.size.h2", ">=", "typography.size.h3"],
6
- ["typography.size.h3", ">=", "typography.size.h4"],
7
- ["typography.size.h4", ">=", "typography.size.h5"],
8
- ["typography.size.h5", ">=", "typography.size.h6"],
9
-
10
- ["typography.size.xl", ">=", "typography.size.lg"],
11
- ["typography.size.lg", ">=", "typography.size.base"],
12
- ["typography.size.base", ">=", "typography.size.sm"],
13
- ["typography.size.sm", ">=", "typography.size.xs"]
14
- ]
15
- }
1
+ {
2
+ "$description": "Typography hierarchy order constraints - LG breakpoint specific",
3
+ "order": [
4
+ ["typography.size.h1", ">=", "typography.size.h2"],
5
+ ["typography.size.h2", ">=", "typography.size.h3"],
6
+ ["typography.size.h3", ">=", "typography.size.h4"],
7
+ ["typography.size.h4", ">=", "typography.size.h5"],
8
+ ["typography.size.h5", ">=", "typography.size.h6"],
9
+
10
+ ["typography.size.xl", ">=", "typography.size.lg"],
11
+ ["typography.size.lg", ">=", "typography.size.base"],
12
+ ["typography.size.base", ">=", "typography.size.sm"],
13
+ ["typography.size.sm", ">=", "typography.size.xs"]
14
+ ]
15
+ }
@@ -1,15 +1,15 @@
1
- {
2
- "$description": "Typography hierarchy order constraints - MD breakpoint specific",
3
- "order": [
4
- ["typography.size.h1", ">=", "typography.size.h2"],
5
- ["typography.size.h2", ">=", "typography.size.h3"],
6
- ["typography.size.h3", ">=", "typography.size.h4"],
7
- ["typography.size.h4", ">=", "typography.size.h5"],
8
- ["typography.size.h5", ">=", "typography.size.h6"],
9
-
10
- ["typography.size.xl", ">=", "typography.size.lg"],
11
- ["typography.size.lg", ">=", "typography.size.base"],
12
- ["typography.size.base", ">=", "typography.size.sm"],
13
- ["typography.size.sm", ">=", "typography.size.xs"]
14
- ]
15
- }
1
+ {
2
+ "$description": "Typography hierarchy order constraints - MD breakpoint specific",
3
+ "order": [
4
+ ["typography.size.h1", ">=", "typography.size.h2"],
5
+ ["typography.size.h2", ">=", "typography.size.h3"],
6
+ ["typography.size.h3", ">=", "typography.size.h4"],
7
+ ["typography.size.h4", ">=", "typography.size.h5"],
8
+ ["typography.size.h5", ">=", "typography.size.h6"],
9
+
10
+ ["typography.size.xl", ">=", "typography.size.lg"],
11
+ ["typography.size.lg", ">=", "typography.size.base"],
12
+ ["typography.size.base", ">=", "typography.size.sm"],
13
+ ["typography.size.sm", ">=", "typography.size.xs"]
14
+ ]
15
+ }
@@ -1,15 +1,15 @@
1
- {
2
- "$description": "Typography hierarchy order constraints - defines that h1 ≥ h2 ≥ ... ≥ h6 by font size",
3
- "order": [
4
- ["typography.size.h1", ">=", "typography.size.h2"],
5
- ["typography.size.h2", ">=", "typography.size.h3"],
6
- ["typography.size.h3", ">=", "typography.size.h4"],
7
- ["typography.size.h4", ">=", "typography.size.h5"],
8
- ["typography.size.h5", ">=", "typography.size.h6"],
9
-
10
- ["typography.size.xl", ">=", "typography.size.lg"],
11
- ["typography.size.lg", ">=", "typography.size.base"],
12
- ["typography.size.base", ">=", "typography.size.sm"],
13
- ["typography.size.sm", ">=", "typography.size.xs"]
14
- ]
15
- }
1
+ {
2
+ "$description": "Typography hierarchy order constraints - defines that h1 ≥ h2 ≥ ... ≥ h6 by font size",
3
+ "order": [
4
+ ["typography.size.h1", ">=", "typography.size.h2"],
5
+ ["typography.size.h2", ">=", "typography.size.h3"],
6
+ ["typography.size.h3", ">=", "typography.size.h4"],
7
+ ["typography.size.h4", ">=", "typography.size.h5"],
8
+ ["typography.size.h5", ">=", "typography.size.h6"],
9
+
10
+ ["typography.size.xl", ">=", "typography.size.lg"],
11
+ ["typography.size.lg", ">=", "typography.size.base"],
12
+ ["typography.size.base", ">=", "typography.size.sm"],
13
+ ["typography.size.sm", ">=", "typography.size.xs"]
14
+ ]
15
+ }
@@ -1,15 +1,15 @@
1
- {
2
- "$description": "Typography hierarchy order constraints - SM breakpoint specific",
3
- "order": [
4
- ["typography.size.h1", ">=", "typography.size.h2"],
5
- ["typography.size.h2", ">=", "typography.size.h3"],
6
- ["typography.size.h3", ">=", "typography.size.h4"],
7
- ["typography.size.h4", ">=", "typography.size.h5"],
8
- ["typography.size.h5", ">=", "typography.size.h6"],
9
-
10
- ["typography.size.xl", ">=", "typography.size.lg"],
11
- ["typography.size.lg", ">=", "typography.size.base"],
12
- ["typography.size.base", ">=", "typography.size.sm"],
13
- ["typography.size.sm", ">=", "typography.size.xs"]
14
- ]
15
- }
1
+ {
2
+ "$description": "Typography hierarchy order constraints - SM breakpoint specific",
3
+ "order": [
4
+ ["typography.size.h1", ">=", "typography.size.h2"],
5
+ ["typography.size.h2", ">=", "typography.size.h3"],
6
+ ["typography.size.h3", ">=", "typography.size.h4"],
7
+ ["typography.size.h4", ">=", "typography.size.h5"],
8
+ ["typography.size.h5", ">=", "typography.size.h6"],
9
+
10
+ ["typography.size.xl", ">=", "typography.size.lg"],
11
+ ["typography.size.lg", ">=", "typography.size.base"],
12
+ ["typography.size.base", ">=", "typography.size.sm"],
13
+ ["typography.size.sm", ">=", "typography.size.xs"]
14
+ ]
15
+ }
@@ -1,4 +0,0 @@
1
- {
2
- "color.palette.brand.600": "#ffffff",
3
- "color.palette.brand.700": null
4
- }
@@ -1,35 +0,0 @@
1
- {
2
- "version": 1,
3
- "generatedAt": "2025-11-01T06:31:35.033Z",
4
- "baseFile": "tokens/tokens.example.json",
5
- "changes": [
6
- {
7
- "id": "color.palette.brand.600",
8
- "from": "oklch(0.62 0.18 260)",
9
- "to": "#ffffff",
10
- "type": "modify"
11
- },
12
- {
13
- "id": "color.palette.brand.700",
14
- "from": "oklch(0.56 0.19 260)",
15
- "to": null,
16
- "type": "remove"
17
- },
18
- {
19
- "id": "color.role.accent.default",
20
- "from": "oklch(0.62 0.18 260)",
21
- "to": "#ffffff",
22
- "type": "modify"
23
- }
24
- ],
25
- "patch": {
26
- "color.palette.brand.600": "#ffffff",
27
- "color.palette.brand.700": null,
28
- "color.role.accent.default": "#ffffff"
29
- },
30
- "hash": "e925a3d3532d35c4a569788d9b061fda15f0b5b904867094b3cba727091edf3c",
31
- "baseTokensHash": "9c75c6bc19e4700ab5393e9118c6ce5596727e0fdbba890aaef1ebb831868c26",
32
- "meta": {
33
- "changeCount": 3
34
- }
35
- }
@@ -1,22 +0,0 @@
1
- {
2
- "overrides": {
3
- "color": {
4
- "palette": {
5
- "brand": {
6
- "600": {
7
- "$value": "oklch(0.620 0.180 171)"
8
- }
9
- }
10
- }
11
- },
12
- "typography": {
13
- "font": {
14
- "body": {
15
- "$value": "Lora"
16
- }
17
- }
18
- }
19
- },
20
- "links": {},
21
- "expressions": {}
22
- }
@@ -1,20 +0,0 @@
1
- {
2
- "type": {
3
- "size": {
4
- "h1": "oklch(0.15 0.01 0) 3rem/1.1 'Segoe UI', system-ui",
5
- "h2": "oklch(0.15 0.01 0) 2.25rem/1.2 'Segoe UI', system-ui",
6
- "body": "oklch(0.20 0.01 0) 1.125rem/1.7 'Segoe UI', system-ui"
7
- },
8
- "weight": {
9
- "body": "300"
10
- }
11
- },
12
- "dimension": {
13
- "spacing": {
14
- "scale": {
15
- "section": "4rem",
16
- "component": "2rem"
17
- }
18
- }
19
- }
20
- }
@@ -1,16 +0,0 @@
1
- {
2
- "type": {
3
- "size": {
4
- "h1": "oklch(0.15 0.01 0) 2.25rem/1.2 'Segoe UI', system-ui",
5
- "body": "oklch(0.20 0.01 0) 1rem/1.6 'Segoe UI', system-ui"
6
- }
7
- },
8
- "dimension": {
9
- "spacing": {
10
- "scale": {
11
- "section": "2.5rem",
12
- "component": "1.25rem"
13
- }
14
- }
15
- }
16
- }
@@ -1,16 +0,0 @@
1
- {
2
- "type": {
3
- "size": {
4
- "body": "oklch(0.20 0.01 0) 0.875rem/1.5 'Segoe UI', system-ui",
5
- "caption": "oklch(0.20 0.01 0) 0.75rem/1.4 'Segoe UI', system-ui"
6
- }
7
- },
8
- "dimension": {
9
- "spacing": {
10
- "scale": {
11
- "section": "1.5rem",
12
- "component": "0.75rem"
13
- }
14
- }
15
- }
16
- }
@@ -1,6 +0,0 @@
1
- {
2
- "overrides": {
3
- "color.palette.brand.500": "oklch(62% 0.12 29)",
4
- "color.palette.brand.600": "oklch(80% 0.10 29)"
5
- }
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "overrides": {
3
- "typography.size.h1": "1rem",
4
- "typography.size.h2": "1.25rem"
5
- }
6
- }
@@ -1,116 +0,0 @@
1
- {
2
- "$schemaVersion": "1.0.0",
3
-
4
- "color": {
5
- "palette": {
6
- "gray": {
7
- "0": { "$type": "color", "$value": "oklch(0.99 0.001 95)" },
8
- "300": { "$type": "color", "$value": "oklch(0.75 0.01 95)" },
9
- "400": { "$type": "color", "$value": "oklch(0.65 0.015 95)" },
10
- "500": { "$type": "color", "$value": "oklch(0.55 0.02 95)" },
11
- "600": { "$type": "color", "$value": "oklch(0.45 0.02 95)" },
12
- "900": { "$type": "color", "$value": "oklch(0.20 0.02 95)" }
13
- },
14
- "brand": {
15
- "400": { "$type": "color", "$value": "oklch(0.70 0.15 260)" },
16
- "500": { "$type": "color", "$value": "oklch(0.62 0.12 29)" },
17
- "600": { "$type": "color", "$value": "oklch(0.80 0.10 29)" },
18
- "700": { "$type": "color", "$value": "oklch(0.56 0.19 260)" }
19
- },
20
- "danger": {
21
- "600": { "$type": "color", "$value": "oklch(0.60 0.25 25)" },
22
- "700": { "$type": "color", "$value": "oklch(0.55 0.28 25)" }
23
- },
24
- "white": { "$type": "color", "$value": "oklch(1 0 0)" }
25
- },
26
-
27
- "role": {
28
- "text": {
29
- "default": { "$type": "color", "$value": "{color.palette.gray.900}" },
30
- "muted": { "$type": "color", "$value": "oklch(0.55 0.02 95)" }
31
- },
32
- "surface": {
33
- "default": { "$type": "color", "$value": "{color.palette.gray.0}" },
34
- "hover": { "$type": "color", "$value": "oklch(0.95 0.001 95)" }
35
- },
36
- "accent": {
37
- "default": { "$type": "color", "$value": "{color.palette.brand.500}" }
38
- },
39
- "danger": {
40
- "default": { "$type": "color", "$value": "{color.palette.danger.600}" }
41
- }
42
- }
43
- },
44
-
45
- "spacing": {
46
- "0": { "$type": "dimension", "$value": "0px" },
47
- "0.5": { "$type": "dimension", "$value": "2px" },
48
- "1": { "$type": "dimension", "$value": "4px" },
49
- "2": { "$type": "dimension", "$value": "8px" },
50
- "2.5": { "$type": "dimension", "$value": "10px" },
51
- "3": { "$type": "dimension", "$value": "12px" },
52
- "4": { "$type": "dimension", "$value": "16px" },
53
- "6": { "$type": "dimension", "$value": "24px" },
54
- "8": { "$type": "dimension", "$value": "32px" },
55
- "10": { "$type": "dimension", "$value": "40px" },
56
- "12": { "$type": "dimension", "$value": "48px" }
57
- },
58
-
59
- "typography": {
60
- "font": {
61
- "body": { "$type": "fontFamily", "$value": "system-ui, 'Inter', sans-serif" }
62
- },
63
- "size": {
64
- "h1": { "$type": "fontSize", "$value": "16px" },
65
- "h2": { "$type": "fontSize", "$value": "20px" },
66
- "h3": { "$type": "fontSize", "$value": "18px" },
67
- "h4": { "$type": "fontSize", "$value": "16px" },
68
- "h5": { "$type": "fontSize", "$value": "14px" },
69
- "h6": { "$type": "fontSize", "$value": "12px" },
70
- "xl": { "$type": "fontSize", "$value": "20px" },
71
- "lg": { "$type": "fontSize", "$value": "18px" },
72
- "base": { "$type": "fontSize", "$value": "16px" },
73
- "sm": { "$type": "fontSize", "$value": "14px" },
74
- "xs": { "$type": "fontSize", "$value": "12px" },
75
- "body": { "$type": "fontSize", "$value": "clamp(1rem, 0.95rem + 0.5vw, 1.125rem)" }
76
- },
77
- "lineHeight": {
78
- "body": { "$type": "lineHeight", "$value": 1.6 }
79
- }
80
- },
81
-
82
- "motion": {
83
- "duration": {
84
- "fast": { "$type": "duration", "$value": "150ms" }
85
- },
86
- "easing": {
87
- "standard": { "$type": "easing", "$value": "cubic-bezier(.2,.9,.1,1)" }
88
- }
89
- },
90
-
91
- "elevation": {
92
- "1": {
93
- "$type": "shadow",
94
- "$value": "0 1px 2px oklch(0.2 0 0 / 0.1), 0 1px 1px oklch(0.2 0 0 / 0.06)"
95
- }
96
- },
97
-
98
- "layout": {
99
- "container": {
100
- "xs": { "$type": "dimension", "$value": "540px" },
101
- "sm": { "$type": "dimension", "$value": "640px" },
102
- "md": { "$type": "dimension", "$value": "768px" },
103
- "lg": { "$type": "dimension", "$value": "1024px" },
104
- "xl": { "$type": "dimension", "$value": "1280px" }
105
- },
106
- "padding": {
107
- "page": { "$type": "dimension", "$value": "48px" },
108
- "section": { "$type": "dimension", "$value": "32px" },
109
- "card": { "$type": "dimension", "$value": "24px" },
110
- "chip": { "$type": "dimension", "$value": "8px" }
111
- },
112
- "grid": {
113
- "gutter": { "$type": "dimension", "$value": "16px" }
114
- }
115
- }
116
- }
@@ -1,128 +0,0 @@
1
- {
2
- "$schemaVersion": "1.0.0",
3
-
4
- "color": {
5
- "palette": {
6
- "gray": {
7
- "0": { "$type": "color", "$value": "oklch(0.99 0.001 95)" },
8
- "300": { "$type": "color", "$value": "oklch(0.75 0.01 95)" },
9
- "400": { "$type": "color", "$value": "oklch(0.65 0.015 95)" },
10
- "500": { "$type": "color", "$value": "oklch(0.55 0.02 95)" },
11
- "600": { "$type": "color", "$value": "oklch(0.45 0.02 95)" },
12
- "900": { "$type": "color", "$value": "oklch(0.20 0.02 95)" }
13
- },
14
- "brand": {
15
- "400": { "$type": "color", "$value": "oklch(0.70 0.15 260)" },
16
- "500": { "$type": "color", "$value": "oklch(0.66 0.16 260)" },
17
- "600": { "$type": "color", "$value": "oklch(0.62 0.18 260)" },
18
- "700": { "$type": "color", "$value": "oklch(0.56 0.19 260)" }
19
- },
20
- "danger": {
21
- "600": { "$type": "color", "$value": "oklch(0.60 0.25 25)" },
22
- "700": { "$type": "color", "$value": "oklch(0.55 0.28 25)" }
23
- },
24
- "white": { "$type": "color", "$value": "oklch(1 0 0)" }
25
- },
26
-
27
- "role": {
28
- "text": {
29
- "default": { "$type": "color", "$value": "{color.palette.gray.900}" },
30
- "muted": { "$type": "color", "$value": "oklch(0.55 0.02 95)" }
31
- },
32
- "bg": {
33
- "surface": { "$type": "color", "$value": "{color.palette.gray.0}" }
34
- },
35
- "accent": {
36
- "default": { "$type": "color", "$value": "{color.palette.brand.600}" },
37
- "hover": { "$type": "color", "$value": "{color.palette.brand.700}" }
38
- },
39
- "danger": {
40
- "default": { "$type": "color", "$value": "{color.palette.danger.600}" },
41
- "hover": { "$type": "color", "$value": "{color.palette.danger.700}" }
42
- },
43
- "on": {
44
- "accent": { "$type": "color", "$value": "{color.palette.white}" },
45
- "danger": { "$type": "color", "$value": "{color.palette.white}" }
46
- },
47
- "focus": {
48
- "ring": { "$type": "color", "$value": "oklch(0.62 0.18 260 / 0.5)" }
49
- }
50
- }
51
- },
52
-
53
- "size": {
54
- "spacing": {
55
- "2": { "$type": "dimension", "$value": "0.5rem" },
56
- "3": { "$type": "dimension", "$value": "0.75rem" },
57
- "4": { "$type": "dimension", "$value": "1rem" },
58
- "5": { "$type": "dimension", "$value": "1.25rem" },
59
- "6": { "$type": "dimension", "$value": "1.5rem" }
60
- },
61
- "radius": {
62
- "md": { "$type": "borderRadius", "$value": "0.5rem" }
63
- },
64
- "border": {
65
- "1": { "$type": "dimension", "$value": "1px" }
66
- }
67
- },
68
-
69
- "typography": {
70
- "font": {
71
- "body": { "$type": "fontFamily", "$value": "system-ui, 'Inter', sans-serif" }
72
- },
73
- "size": {
74
- "body": { "$type": "fontSize", "$value": "clamp(1rem, 0.95rem + 0.5vw, 1.125rem)" },
75
- "h2": { "$type": "fontSize", "$value": "22px" },
76
- "h3": { "$type": "fontSize", "$value": "18px" }
77
- },
78
- "lineHeight": {
79
- "body": { "$type": "lineHeight", "$value": 1.6 }
80
- },
81
- "weight": {
82
- "body": { "$type": "fontWeight", "$value": 400 },
83
- "emphasis": { "$type": "fontWeight", "$value": 600 },
84
- "strong": { "$type": "fontWeight", "$value": 700 }
85
- }
86
- },
87
-
88
- "motion": {
89
- "duration": {
90
- "fast": { "$type": "duration", "$value": "150ms" }
91
- },
92
- "easing": {
93
- "standard": { "$type": "easing", "$value": "cubic-bezier(.2,.9,.1,1)" }
94
- }
95
- },
96
-
97
- "elevation": {
98
- "1": {
99
- "$type": "shadow",
100
- "$value": "0 1px 2px oklch(0.2 0 0 / 0.1), 0 1px 1px oklch(0.2 0 0 / 0.06)"
101
- }
102
- },
103
-
104
- "control": {
105
- "size": {
106
- "min": { "$type": "dimension", "$value": "30px" }
107
- }
108
- },
109
-
110
- "layout": {
111
- "container": {
112
- "xs": { "$type": "dimension", "$value": "540px" },
113
- "sm": { "$type": "dimension", "$value": "640px" },
114
- "md": { "$type": "dimension", "$value": "768px" },
115
- "lg": { "$type": "dimension", "$value": "1024px" },
116
- "xl": { "$type": "dimension", "$value": "1280px" }
117
- },
118
- "padding": {
119
- "page": { "$type": "dimension", "$value": "48px" },
120
- "section": { "$type": "dimension", "$value": "32px" },
121
- "card": { "$type": "dimension", "$value": "24px" },
122
- "chip": { "$type": "dimension", "$value": "8px" }
123
- },
124
- "grid": {
125
- "gutter": { "$type": "dimension", "$value": "16px" }
126
- }
127
- }
128
- }