@radicool/throughline 0.22.0 → 0.24.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 (52) hide show
  1. package/README.md +5 -5
  2. package/adapters/codex/prompts/component-builder.md +12 -4
  3. package/adapters/cursor/.cursor/rules/component-builder.mdc +12 -4
  4. package/adapters/generic/skills/component-builder/SKILL.md +12 -4
  5. package/package.json +1 -1
  6. package/references/figma-checks.md +813 -0
  7. package/references/figma-component-standards.md +16 -38
  8. package/references/figma-scripting.md +6 -6
  9. package/references/proof-bundle.md +1 -0
  10. package/references/state-baseline.md +5 -3
  11. package/scripts/README.md +5 -2
  12. package/scripts/build-figma-checks.mjs +111 -0
  13. package/scripts/build-state-baseline.mjs +5 -3
  14. package/scripts/install.mjs +9 -4
  15. package/scripts/lib/component-states.mjs +4 -1
  16. package/scripts/lib/contrast.mjs +5 -2
  17. package/scripts/lib/figma-checks-read.figma.js +174 -0
  18. package/scripts/lib/figma-checks.mjs +385 -0
  19. package/scripts/lib/fixtures/figma-checks/avatar-not-in-table.json +44 -0
  20. package/scripts/lib/fixtures/figma-checks/button-ios-swift-skipped.json +86 -0
  21. package/scripts/lib/fixtures/figma-checks/button-missing-default.json +72 -0
  22. package/scripts/lib/fixtures/figma-checks/button-mui-ring.json +93 -0
  23. package/scripts/lib/fixtures/figma-checks/button-no-focus-variant.json +72 -0
  24. package/scripts/lib/fixtures/figma-checks/button-plain-frames.json +93 -0
  25. package/scripts/lib/fixtures/figma-checks/button-ring-child-not-absolute.json +95 -0
  26. package/scripts/lib/fixtures/figma-checks/button-ring-hidden.json +93 -0
  27. package/scripts/lib/fixtures/figma-checks/button-ring-unbound-colour.json +99 -0
  28. package/scripts/lib/fixtures/figma-checks/button-shadcn-filled.json +93 -0
  29. package/scripts/lib/fixtures/figma-checks/button-sparse.json +135 -0
  30. package/scripts/lib/fixtures/figma-checks/button-spread-zero.json +93 -0
  31. package/scripts/lib/fixtures/figma-checks/button-transparent-ring-child.json +95 -0
  32. package/scripts/lib/fixtures/figma-checks/button-vanilla-inside.json +88 -0
  33. package/scripts/lib/fixtures/figma-checks/button-vanilla-outside.json +88 -0
  34. package/scripts/lib/fixtures/figma-checks/button-wrong-combination.json +93 -0
  35. package/scripts/lib/fixtures/figma-checks/checkbox-checked-axis.real.json +246 -0
  36. package/scripts/lib/fixtures/figma-checks/checkbox-checked-synonym.json +88 -0
  37. package/scripts/lib/fixtures/figma-checks/checkbox-missing-selected.json +80 -0
  38. package/scripts/lib/fixtures/figma-checks/indicator-failed.json +106 -0
  39. package/scripts/lib/fixtures/figma-checks/input-control-layer-missing.json +67 -0
  40. package/scripts/lib/fixtures/figma-checks/input-control-layer-ring-on-wrapper.json +80 -0
  41. package/scripts/lib/fixtures/figma-checks/input-control-layer.json +80 -0
  42. package/scripts/lib/fixtures/figma-checks/input-mui-weight-unbound.json +67 -0
  43. package/scripts/lib/fixtures/figma-checks/input-mui.json +67 -0
  44. package/scripts/lib/fixtures/figma-checks/ring-single-mode.json +112 -0
  45. package/scripts/lib/fixtures/figma-checks/ring-translucent.json +111 -0
  46. package/scripts/lib/fixtures/figma-checks/sample-button.real.json +1498 -0
  47. package/scripts/lib/fixtures/figma-checks/sample-ring-on-muted-raw.json +113 -0
  48. package/scripts/lib/fixtures/figma-checks/sample-ring-passes.json +169 -0
  49. package/scripts/lib/fixtures/figma-checks/surface-missing.json +108 -0
  50. package/scripts/lib/fixtures/figma-checks/surface-single-mode.json +112 -0
  51. package/scripts/lib/fixtures/figma-checks/surface-translucent.json +112 -0
  52. package/scripts/lib/fixtures/figma-checks/zygarden-ring-light-fails.json +113 -0
@@ -0,0 +1,112 @@
1
+ {
2
+ "covers": "a single-mode ring is compared in both surface modes, matched after the fold",
3
+ "expect": {
4
+ "name": "Button",
5
+ "matrix": {
6
+ "variant": [
7
+ "primary"
8
+ ],
9
+ "state": [
10
+ "default",
11
+ "hover",
12
+ "focus",
13
+ "active",
14
+ "disabled"
15
+ ]
16
+ },
17
+ "uiFramework": "shadcn",
18
+ "surfaces": [
19
+ "color/bg/canvas"
20
+ ]
21
+ },
22
+ "snapshot": {
23
+ "type": "COMPONENT_SET",
24
+ "variantGroupProperties": {
25
+ "Variant": {
26
+ "values": [
27
+ "Primary"
28
+ ]
29
+ },
30
+ "State": {
31
+ "values": [
32
+ "Default",
33
+ "Hover",
34
+ "Focus",
35
+ "Active",
36
+ "Disabled"
37
+ ]
38
+ }
39
+ },
40
+ "children": [
41
+ {
42
+ "type": "COMPONENT",
43
+ "variantProperties": {
44
+ "Variant": "Primary",
45
+ "State": "Default"
46
+ }
47
+ },
48
+ {
49
+ "type": "COMPONENT",
50
+ "variantProperties": {
51
+ "Variant": "Primary",
52
+ "State": "Hover"
53
+ }
54
+ },
55
+ {
56
+ "type": "COMPONENT",
57
+ "variantProperties": {
58
+ "Variant": "Primary",
59
+ "State": "Focus"
60
+ },
61
+ "effects": [
62
+ {
63
+ "type": "DROP_SHADOW",
64
+ "visible": true,
65
+ "spread": 3,
66
+ "colorVariable": "color/focus/ring"
67
+ }
68
+ ],
69
+ "strokeAlign": "INSIDE",
70
+ "strokeVariables": [],
71
+ "strokeWeightBound": false,
72
+ "children": []
73
+ },
74
+ {
75
+ "type": "COMPONENT",
76
+ "variantProperties": {
77
+ "Variant": "Primary",
78
+ "State": "Active"
79
+ }
80
+ },
81
+ {
82
+ "type": "COMPONENT",
83
+ "variantProperties": {
84
+ "Variant": "Primary",
85
+ "State": "Disabled"
86
+ }
87
+ }
88
+ ],
89
+ "colors": {
90
+ "color/focus/ring": {
91
+ "modes": {
92
+ "Default": "#169c46"
93
+ },
94
+ "defaultMode": "Default"
95
+ },
96
+ "color/bg/canvas": {
97
+ "modes": {
98
+ "light": "#ffffff",
99
+ "dark": "#181818"
100
+ },
101
+ "defaultMode": "light"
102
+ }
103
+ },
104
+ "missingSurfaces": []
105
+ },
106
+ "expected": {
107
+ "structural-read-back": "pass",
108
+ "state-baseline": "pass",
109
+ "focus-indicator": "pass",
110
+ "focus-contrast": "pass"
111
+ }
112
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "covers": "a translucent ring is composited first: #00000033 over white is #cccccc, 1.6:1",
3
+ "expect": {
4
+ "name": "Button",
5
+ "matrix": {
6
+ "variant": [
7
+ "primary"
8
+ ],
9
+ "state": [
10
+ "default",
11
+ "hover",
12
+ "focus",
13
+ "active",
14
+ "disabled"
15
+ ]
16
+ },
17
+ "uiFramework": "shadcn",
18
+ "surfaces": [
19
+ "color/bg/canvas"
20
+ ]
21
+ },
22
+ "snapshot": {
23
+ "type": "COMPONENT_SET",
24
+ "variantGroupProperties": {
25
+ "Variant": {
26
+ "values": [
27
+ "Primary"
28
+ ]
29
+ },
30
+ "State": {
31
+ "values": [
32
+ "Default",
33
+ "Hover",
34
+ "Focus",
35
+ "Active",
36
+ "Disabled"
37
+ ]
38
+ }
39
+ },
40
+ "children": [
41
+ {
42
+ "type": "COMPONENT",
43
+ "variantProperties": {
44
+ "Variant": "Primary",
45
+ "State": "Default"
46
+ }
47
+ },
48
+ {
49
+ "type": "COMPONENT",
50
+ "variantProperties": {
51
+ "Variant": "Primary",
52
+ "State": "Hover"
53
+ }
54
+ },
55
+ {
56
+ "type": "COMPONENT",
57
+ "variantProperties": {
58
+ "Variant": "Primary",
59
+ "State": "Focus"
60
+ },
61
+ "effects": [
62
+ {
63
+ "type": "DROP_SHADOW",
64
+ "visible": true,
65
+ "spread": 3,
66
+ "colorVariable": "color/focus/ring"
67
+ }
68
+ ],
69
+ "strokeAlign": "INSIDE",
70
+ "strokeVariables": [],
71
+ "strokeWeightBound": false,
72
+ "children": []
73
+ },
74
+ {
75
+ "type": "COMPONENT",
76
+ "variantProperties": {
77
+ "Variant": "Primary",
78
+ "State": "Active"
79
+ }
80
+ },
81
+ {
82
+ "type": "COMPONENT",
83
+ "variantProperties": {
84
+ "Variant": "Primary",
85
+ "State": "Disabled"
86
+ }
87
+ }
88
+ ],
89
+ "colors": {
90
+ "color/focus/ring": {
91
+ "modes": {
92
+ "Default": "#00000033"
93
+ },
94
+ "defaultMode": "Default"
95
+ },
96
+ "color/bg/canvas": {
97
+ "modes": {
98
+ "Default": "#ffffff"
99
+ },
100
+ "defaultMode": "Default"
101
+ }
102
+ },
103
+ "missingSurfaces": []
104
+ },
105
+ "expected": {
106
+ "structural-read-back": "pass",
107
+ "state-baseline": "pass",
108
+ "focus-indicator": "pass",
109
+ "focus-contrast": "fail"
110
+ }
111
+ }