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.
- package/LICENSE +21 -21
- package/README.md +215 -659
- package/adapters/README.md +46 -46
- package/adapters/css.ts +116 -116
- package/adapters/js.ts +14 -14
- package/adapters/json.ts +45 -45
- package/cli/build-css.ts +32 -32
- package/cli/commands/build.ts +65 -65
- package/cli/commands/graph.d.ts.map +1 -1
- package/cli/commands/graph.js +26 -10
- package/cli/commands/graph.ts +180 -137
- package/cli/commands/index.ts +7 -7
- package/cli/commands/patch-apply.ts +80 -80
- package/cli/commands/patch.ts +22 -22
- package/cli/commands/set.d.ts.map +1 -1
- package/cli/commands/set.js +12 -4
- package/cli/commands/set.ts +239 -225
- package/cli/commands/utils.ts +50 -50
- package/cli/commands/validate.d.ts.map +1 -1
- package/cli/commands/validate.js +86 -33
- package/cli/commands/validate.ts +176 -115
- package/cli/commands/why.d.ts.map +1 -1
- package/cli/commands/why.js +86 -20
- package/cli/commands/why.ts +158 -46
- package/cli/config-schema.ts +27 -27
- package/cli/config.ts +35 -35
- package/cli/constraint-registry.d.ts +101 -0
- package/cli/constraint-registry.d.ts.map +1 -0
- package/cli/constraint-registry.js +225 -0
- package/cli/constraint-registry.ts +304 -0
- package/cli/constraints-loader.d.ts +30 -0
- package/cli/constraints-loader.d.ts.map +1 -0
- package/cli/constraints-loader.js +58 -0
- package/cli/constraints-loader.ts +83 -0
- package/cli/cross-axis-loader.d.ts +91 -0
- package/cli/cross-axis-loader.d.ts.map +1 -0
- package/cli/cross-axis-loader.js +222 -0
- package/cli/cross-axis-loader.ts +289 -0
- package/cli/dcv.js +4 -0
- package/cli/dcv.ts +111 -107
- package/cli/engine-helpers.d.ts +33 -0
- package/cli/engine-helpers.d.ts.map +1 -1
- package/cli/engine-helpers.js +87 -22
- package/cli/engine-helpers.ts +133 -61
- package/cli/graph-poset.ts +74 -74
- package/cli/json-output.d.ts +64 -0
- package/cli/json-output.d.ts.map +1 -0
- package/cli/json-output.js +107 -0
- package/cli/json-output.ts +177 -0
- package/cli/result.ts +27 -27
- package/cli/run.ts +54 -54
- package/cli/smoke-test.ts +40 -40
- package/cli/types.d.ts +6 -0
- package/cli/types.d.ts.map +1 -1
- package/cli/types.ts +84 -78
- package/core/breakpoints.ts +50 -50
- package/core/cli-format.ts +31 -31
- package/core/color.ts +148 -148
- package/core/constraints/cross-axis.ts +114 -114
- package/core/constraints/monotonic-lightness.ts +38 -38
- package/core/constraints/monotonic.ts +74 -74
- package/core/constraints/threshold.ts +43 -43
- package/core/constraints/wcag.ts +70 -70
- package/core/cross-axis-config.d.ts +29 -0
- package/core/cross-axis-config.d.ts.map +1 -1
- package/core/cross-axis-config.js +29 -0
- package/core/cross-axis-config.ts +181 -151
- package/core/engine.d.ts +95 -0
- package/core/engine.d.ts.map +1 -1
- package/core/engine.js +22 -0
- package/core/engine.ts +167 -65
- package/core/flatten.ts +116 -116
- package/core/image-export.ts +48 -48
- package/core/index.d.ts +9 -30
- package/core/index.d.ts.map +1 -1
- package/core/index.js +7 -54
- package/core/index.ts +10 -72
- package/core/patch.ts +134 -134
- package/core/poset.ts +311 -311
- package/core/why.ts +63 -63
- package/package.json +96 -90
- package/themes/color.lg.order.json +15 -15
- package/themes/color.md.order.json +15 -15
- package/themes/color.order.json +15 -15
- package/themes/color.sm.order.json +15 -15
- package/themes/cross-axis.rules.json +35 -35
- package/themes/cross-axis.sm.rules.json +12 -12
- package/themes/layout.lg.order.json +18 -18
- package/themes/layout.md.order.json +18 -18
- package/themes/layout.order.json +18 -18
- package/themes/layout.sm.order.json +18 -18
- package/themes/spacing.order.json +14 -14
- package/themes/typography.lg.order.json +15 -15
- package/themes/typography.md.order.json +15 -15
- package/themes/typography.order.json +15 -15
- package/themes/typography.sm.order.json +15 -15
- package/dist/test-overrides-removal.json +0 -4
- package/dist/tmp.patch.json +0 -35
- package/tokens/overrides/base.json +0 -22
- package/tokens/overrides/lg.json +0 -20
- package/tokens/overrides/md.json +0 -16
- package/tokens/overrides/sm.json +0 -16
- package/tokens/overrides/viol.color.json +0 -6
- package/tokens/overrides/viol.typography.json +0 -6
- package/tokens/tokens.demo-violations.json +0 -116
- package/tokens/tokens.example.json +0 -128
- package/tokens/tokens.json +0 -67
- package/tokens/tokens.multi-violations.json +0 -21
- package/tokens/tokens.schema.d.ts +0 -2298
- package/tokens/tokens.schema.d.ts.map +0 -1
- package/tokens/tokens.schema.js +0 -148
- package/tokens/tokens.schema.ts +0 -196
- package/tokens/tokens.test.json +0 -38
- package/tokens/tokens.touch-violation.json +0 -8
- package/tokens/typography.classes.css +0 -11
- package/tokens/typography.css +0 -20
package/tokens/tokens.json
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"color": {
|
|
3
|
-
"palette": {
|
|
4
|
-
"brand": {
|
|
5
|
-
"600": { "$type": "color", "$value": "#7e3ff2" },
|
|
6
|
-
"700": { "$type": "color", "$value": "#6a29e6" }
|
|
7
|
-
},
|
|
8
|
-
"gray": {
|
|
9
|
-
"0": { "$type": "color", "$value": "#fafafa" },
|
|
10
|
-
"50": { "$type": "color", "$value": "#f4f4f5" },
|
|
11
|
-
"900": { "$type": "color", "$value": "#1e1e20" }
|
|
12
|
-
},
|
|
13
|
-
"white": { "$type": "color", "$value": "#fff" }
|
|
14
|
-
},
|
|
15
|
-
"role": {
|
|
16
|
-
"text": {
|
|
17
|
-
"default": { "$value": "{color.palette.gray.900}" },
|
|
18
|
-
"muted": { "$value": "#555b66" }
|
|
19
|
-
},
|
|
20
|
-
"bg": {
|
|
21
|
-
"surface": { "$value": "{color.palette.gray.0}" },
|
|
22
|
-
"elevated": { "$value": "{color.palette.gray.50}" }
|
|
23
|
-
},
|
|
24
|
-
"accent": {
|
|
25
|
-
"default": { "$value": "{color.palette.brand.600}" },
|
|
26
|
-
"hover": { "$value": "{color.palette.brand.700}" }
|
|
27
|
-
},
|
|
28
|
-
"on": { "accent": { "$value": "{color.palette.white}" } },
|
|
29
|
-
"focus": { "ring": { "$value": "{color.palette.brand.600}" } }
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"size": {
|
|
33
|
-
"spacing": {
|
|
34
|
-
"2": { "$value": "0.5rem" },
|
|
35
|
-
"2-5": { "$value": "0.625rem" },
|
|
36
|
-
"3": { "$value": "0.75rem" },
|
|
37
|
-
"4": { "$value": "1rem" },
|
|
38
|
-
"6": { "$value": "1.5rem" }
|
|
39
|
-
},
|
|
40
|
-
"radius": { "md": { "$value": "0.5rem" } },
|
|
41
|
-
"border": { "1": { "$value": "1px" } },
|
|
42
|
-
"offset": { "hairline": { "$value": "1px" } }
|
|
43
|
-
},
|
|
44
|
-
"motion": {
|
|
45
|
-
"duration": { "fast": { "$value": "150ms" } },
|
|
46
|
-
"easing": { "standard": { "$value": "cubic-bezier(.2,.9,.1,1)" } },
|
|
47
|
-
"depth": { "kick": { "$value": "1px" } }
|
|
48
|
-
},
|
|
49
|
-
"elevation": { "1": { "$value": "0 1px 2px #0000001a, 0 1px 1px #0000000f" } },
|
|
50
|
-
"typography": {
|
|
51
|
-
"font": { "sans": { "$value": "system-ui, -apple-system, segoe ui, roboto, sans-serif" } },
|
|
52
|
-
"weight": {
|
|
53
|
-
"regular": { "$value": 400 },
|
|
54
|
-
"medium": { "$value": 500 },
|
|
55
|
-
"semibold": { "$value": 600 },
|
|
56
|
-
"body": { "$value": 400 }
|
|
57
|
-
},
|
|
58
|
-
"size": {
|
|
59
|
-
"sm": { "$value": "0.875rem" },
|
|
60
|
-
"base": { "$value": "1rem" },
|
|
61
|
-
"body": { "$value": "16px" },
|
|
62
|
-
"h2": { "$value": "20px" },
|
|
63
|
-
"h3": { "$value": "18px" }
|
|
64
|
-
},
|
|
65
|
-
"lineHeight": { "tight": { "$value": "1.25" }, "base": { "$value": "1.6" } }
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schemaVersion": "1.0.0",
|
|
3
|
-
"control": {
|
|
4
|
-
"size": {
|
|
5
|
-
"min": { "$type": "dimension", "$value": "30px" }
|
|
6
|
-
}
|
|
7
|
-
},
|
|
8
|
-
"typography": {
|
|
9
|
-
"size": {
|
|
10
|
-
"h1": { "$type": "fontSize", "$value": "16px" },
|
|
11
|
-
"h2": { "$type": "fontSize", "$value": "20px" },
|
|
12
|
-
"h3": { "$type": "fontSize", "$value": "18px" }
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"layout": {
|
|
16
|
-
"padding": {
|
|
17
|
-
"card": { "$type": "dimension", "$value": "24px" },
|
|
18
|
-
"chip": { "$type": "dimension", "$value": "32px" }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|