@radicool/throughline 0.21.4 → 0.23.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 (44) hide show
  1. package/README.md +5 -5
  2. package/adapters/codex/prompts/component-builder.md +12 -7
  3. package/adapters/codex/prompts/token-sync-layer.md +4 -1
  4. package/adapters/cursor/.cursor/rules/component-builder.mdc +12 -7
  5. package/adapters/cursor/.cursor/rules/token-sync-layer.mdc +4 -1
  6. package/adapters/generic/skills/component-builder/SKILL.md +12 -7
  7. package/adapters/generic/skills/token-sync-layer/SKILL.md +4 -1
  8. package/package.json +1 -1
  9. package/references/figma-checks.md +484 -0
  10. package/references/figma-component-standards.md +21 -53
  11. package/references/figma-scripting.md +8 -7
  12. package/references/state-baseline.md +27 -0
  13. package/scripts/README.md +5 -1
  14. package/scripts/build-figma-checks.mjs +98 -0
  15. package/scripts/build-state-baseline.mjs +71 -0
  16. package/scripts/install.mjs +9 -4
  17. package/scripts/lib/component-states.mjs +28 -7
  18. package/scripts/lib/figma-checks-read.figma.js +120 -0
  19. package/scripts/lib/figma-checks.mjs +240 -0
  20. package/scripts/lib/fixtures/figma-checks/avatar-not-in-table.json +43 -0
  21. package/scripts/lib/fixtures/figma-checks/button-ios-swift-skipped.json +85 -0
  22. package/scripts/lib/fixtures/figma-checks/button-missing-default.json +71 -0
  23. package/scripts/lib/fixtures/figma-checks/button-mui-ring.json +92 -0
  24. package/scripts/lib/fixtures/figma-checks/button-no-focus-variant.json +71 -0
  25. package/scripts/lib/fixtures/figma-checks/button-plain-frames.json +92 -0
  26. package/scripts/lib/fixtures/figma-checks/button-ring-child-not-absolute.json +94 -0
  27. package/scripts/lib/fixtures/figma-checks/button-ring-hidden.json +92 -0
  28. package/scripts/lib/fixtures/figma-checks/button-ring-unbound-colour.json +98 -0
  29. package/scripts/lib/fixtures/figma-checks/button-shadcn-filled.json +92 -0
  30. package/scripts/lib/fixtures/figma-checks/button-sparse.json +134 -0
  31. package/scripts/lib/fixtures/figma-checks/button-spread-zero.json +92 -0
  32. package/scripts/lib/fixtures/figma-checks/button-transparent-ring-child.json +94 -0
  33. package/scripts/lib/fixtures/figma-checks/button-vanilla-inside.json +87 -0
  34. package/scripts/lib/fixtures/figma-checks/button-vanilla-outside.json +87 -0
  35. package/scripts/lib/fixtures/figma-checks/button-wrong-combination.json +92 -0
  36. package/scripts/lib/fixtures/figma-checks/checkbox-checked-axis.real.json +245 -0
  37. package/scripts/lib/fixtures/figma-checks/checkbox-checked-synonym.json +87 -0
  38. package/scripts/lib/fixtures/figma-checks/checkbox-missing-selected.json +79 -0
  39. package/scripts/lib/fixtures/figma-checks/input-control-layer-missing.json +66 -0
  40. package/scripts/lib/fixtures/figma-checks/input-control-layer-ring-on-wrapper.json +79 -0
  41. package/scripts/lib/fixtures/figma-checks/input-control-layer.json +79 -0
  42. package/scripts/lib/fixtures/figma-checks/input-mui-weight-unbound.json +66 -0
  43. package/scripts/lib/fixtures/figma-checks/input-mui.json +66 -0
  44. package/scripts/lib/fixtures/figma-checks/sample-button.real.json +1497 -0
@@ -0,0 +1,79 @@
1
+ {
2
+ "covers": "wrapped control: ring checked on the named controlLayer, not on the variant",
3
+ "expect": {
4
+ "name": "Input",
5
+ "matrix": {
6
+ "state": [
7
+ "default",
8
+ "hover",
9
+ "focus",
10
+ "disabled"
11
+ ]
12
+ },
13
+ "uiFramework": "tailwind",
14
+ "controlLayer": "Control"
15
+ },
16
+ "snapshot": {
17
+ "type": "COMPONENT_SET",
18
+ "variantGroupProperties": {
19
+ "State": {
20
+ "values": [
21
+ "Default",
22
+ "Hover",
23
+ "Focus",
24
+ "Disabled"
25
+ ]
26
+ }
27
+ },
28
+ "children": [
29
+ {
30
+ "type": "COMPONENT",
31
+ "variantProperties": {
32
+ "State": "Default"
33
+ }
34
+ },
35
+ {
36
+ "type": "COMPONENT",
37
+ "variantProperties": {
38
+ "State": "Hover"
39
+ }
40
+ },
41
+ {
42
+ "type": "COMPONENT",
43
+ "variantProperties": {
44
+ "State": "Focus"
45
+ },
46
+ "effects": [],
47
+ "strokeAlign": "INSIDE",
48
+ "strokeVariables": [],
49
+ "strokeWeightBound": false,
50
+ "children": [],
51
+ "controlLayer": {
52
+ "effects": [
53
+ {
54
+ "type": "DROP_SHADOW",
55
+ "visible": true,
56
+ "spread": 3,
57
+ "colorVariable": "color/focus/ring"
58
+ }
59
+ ],
60
+ "strokeAlign": "INSIDE",
61
+ "strokeVariables": [],
62
+ "strokeWeightBound": false,
63
+ "children": []
64
+ }
65
+ },
66
+ {
67
+ "type": "COMPONENT",
68
+ "variantProperties": {
69
+ "State": "Disabled"
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ "expected": {
75
+ "structural-read-back": "pass",
76
+ "state-baseline": "pass",
77
+ "focus-indicator": "pass"
78
+ }
79
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "covers": "mui input with a bound colour but a raw stroke weight",
3
+ "expect": {
4
+ "name": "Input",
5
+ "matrix": {
6
+ "state": [
7
+ "default",
8
+ "hover",
9
+ "focus",
10
+ "disabled"
11
+ ]
12
+ },
13
+ "uiFramework": "mui"
14
+ },
15
+ "snapshot": {
16
+ "type": "COMPONENT_SET",
17
+ "variantGroupProperties": {
18
+ "State": {
19
+ "values": [
20
+ "Default",
21
+ "Hover",
22
+ "Focus",
23
+ "Disabled"
24
+ ]
25
+ }
26
+ },
27
+ "children": [
28
+ {
29
+ "type": "COMPONENT",
30
+ "variantProperties": {
31
+ "State": "Default"
32
+ }
33
+ },
34
+ {
35
+ "type": "COMPONENT",
36
+ "variantProperties": {
37
+ "State": "Hover"
38
+ }
39
+ },
40
+ {
41
+ "type": "COMPONENT",
42
+ "variantProperties": {
43
+ "State": "Focus"
44
+ },
45
+ "effects": [],
46
+ "strokeAlign": "INSIDE",
47
+ "strokeVariables": [
48
+ "border/focus"
49
+ ],
50
+ "strokeWeightBound": false,
51
+ "children": []
52
+ },
53
+ {
54
+ "type": "COMPONENT",
55
+ "variantProperties": {
56
+ "State": "Disabled"
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ "expected": {
62
+ "structural-read-back": "pass",
63
+ "state-baseline": "pass",
64
+ "focus-indicator": "fail"
65
+ }
66
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "covers": "mui input: own stroke bound to a focus variable and weight bound",
3
+ "expect": {
4
+ "name": "Text Field",
5
+ "matrix": {
6
+ "state": [
7
+ "default",
8
+ "hover",
9
+ "focus",
10
+ "disabled"
11
+ ]
12
+ },
13
+ "uiFramework": "mui"
14
+ },
15
+ "snapshot": {
16
+ "type": "COMPONENT_SET",
17
+ "variantGroupProperties": {
18
+ "State": {
19
+ "values": [
20
+ "Default",
21
+ "Hover",
22
+ "Focus",
23
+ "Disabled"
24
+ ]
25
+ }
26
+ },
27
+ "children": [
28
+ {
29
+ "type": "COMPONENT",
30
+ "variantProperties": {
31
+ "State": "Default"
32
+ }
33
+ },
34
+ {
35
+ "type": "COMPONENT",
36
+ "variantProperties": {
37
+ "State": "Hover"
38
+ }
39
+ },
40
+ {
41
+ "type": "COMPONENT",
42
+ "variantProperties": {
43
+ "State": "Focus"
44
+ },
45
+ "effects": [],
46
+ "strokeAlign": "INSIDE",
47
+ "strokeVariables": [
48
+ "border/focus"
49
+ ],
50
+ "strokeWeightBound": true,
51
+ "children": []
52
+ },
53
+ {
54
+ "type": "COMPONENT",
55
+ "variantProperties": {
56
+ "State": "Disabled"
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ "expected": {
62
+ "structural-read-back": "pass",
63
+ "state-baseline": "pass",
64
+ "focus-indicator": "pass"
65
+ }
66
+ }