@motion-proto/live-tokens 0.78.0 → 0.80.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 (172) hide show
  1. package/.claude/skills/live-tokens-check-compliance/SKILL.md +49 -38
  2. package/.claude/skills/live-tokens-create-component/SKILL.md +23 -28
  3. package/.claude/skills/live-tokens-create-component/references/contract-tests.md +61 -0
  4. package/.claude/skills/live-tokens-create-component/references/sketch-mode.md +2 -2
  5. package/.claude/skills/live-tokens-create-component/references/token-naming.md +6 -15
  6. package/.claude/skills/live-tokens-create-page/SKILL.md +6 -4
  7. package/.claude/skills/live-tokens-create-theme/references/design-directions.md +1 -1
  8. package/.claude/skills/live-tokens-pick-component/SKILL.md +3 -3
  9. package/.claude/skills/live-tokens-set-colors/references/color-anchors.md +1 -1
  10. package/.claude/skills/live-tokens-set-geometry/SKILL.md +1 -1
  11. package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +1 -1
  12. package/CHANGELOG.md +271 -0
  13. package/README.md +10 -16
  14. package/bin/check-component.mjs +154 -551
  15. package/bin/check-page.mjs +57 -541
  16. package/bin/cli.mjs +93 -16
  17. package/bin/contractRunner.mjs +37 -91
  18. package/bin/lib/buildChecks.mjs +32 -0
  19. package/bin/lib/catalogue.mjs +161 -34
  20. package/bin/lib/componentSource.mjs +152 -0
  21. package/bin/lib/cssValues.mjs +9 -0
  22. package/bin/lib/dataDir.mjs +126 -0
  23. package/bin/lib/findings.mjs +103 -12
  24. package/bin/lib/fixers.mjs +64 -0
  25. package/bin/lib/geometry.mjs +92 -0
  26. package/bin/lib/pageSource.mjs +230 -0
  27. package/bin/lib/report.mjs +57 -59
  28. package/bin/lib/tokenVocabulary.mjs +104 -34
  29. package/bin/migrate-build-script.mjs +66 -0
  30. package/bin/migrate.mjs +5 -0
  31. package/bin/rules/componentStructure.mjs +344 -0
  32. package/bin/rules/componentUse.mjs +313 -0
  33. package/bin/rules/importsAndRoutes.mjs +136 -0
  34. package/bin/rules/testRuns.mjs +122 -0
  35. package/bin/rules/tokens.mjs +426 -0
  36. package/bin/setup-claude.mjs +1 -2
  37. package/dist-plugin/{chunk-PDNL4NC5.js → chunk-D4WRIKEZ.js} +7 -2
  38. package/dist-plugin/{chunk-SWXRVZKT.js → chunk-REBHE3ZM.js} +414 -1
  39. package/dist-plugin/index.cjs +470 -19
  40. package/dist-plugin/index.d.cts +1 -0
  41. package/dist-plugin/index.d.ts +1 -0
  42. package/dist-plugin/index.js +87 -55
  43. package/dist-plugin/migrateData/index.cjs +422 -4
  44. package/dist-plugin/migrateData/index.js +2 -2
  45. package/dist-plugin/setColors/index.cjs +414 -1
  46. package/dist-plugin/setColors/index.d.cts +1 -1
  47. package/dist-plugin/setColors/index.d.ts +1 -1
  48. package/dist-plugin/setColors/index.js +1 -1
  49. package/dist-plugin/setGeometry/index.cjs +423 -13
  50. package/dist-plugin/setGeometry/index.d.cts +3 -3
  51. package/dist-plugin/setGeometry/index.d.ts +3 -3
  52. package/dist-plugin/setGeometry/index.js +10 -13
  53. package/dist-plugin/setType/index.d.cts +1 -1
  54. package/dist-plugin/setType/index.d.ts +1 -1
  55. package/dist-plugin/{themeTypes-BxRtuN5V.d.cts → themeTypes-B8_Idrp4.d.cts} +2 -2
  56. package/dist-plugin/{themeTypes-BxRtuN5V.d.ts → themeTypes-B8_Idrp4.d.ts} +2 -2
  57. package/package.json +2 -2
  58. package/src/editor/component-editor/CalloutEditor.svelte +2 -2
  59. package/src/editor/component-editor/CollapsibleSectionEditor.svelte +14 -15
  60. package/src/editor/component-editor/CornerBadgeEditor.svelte +14 -14
  61. package/src/editor/component-editor/DialogEditor.svelte +5 -5
  62. package/src/editor/component-editor/InlineEditActionsEditor.svelte +2 -2
  63. package/src/editor/component-editor/RadioButtonEditor.svelte +21 -21
  64. package/src/editor/component-editor/SectionDividerEditor.svelte +7 -7
  65. package/src/editor/component-editor/SegmentedControlEditor.svelte +5 -5
  66. package/src/editor/component-editor/SideNavigationEditor.svelte +25 -25
  67. package/src/editor/component-editor/TabBarEditor.svelte +6 -6
  68. package/src/editor/component-editor/TableEditor.svelte +6 -6
  69. package/src/editor/component-editor/ToggleEditor.svelte +2 -2
  70. package/src/editor/component-editor/index.ts +3 -0
  71. package/src/editor/component-editor/registry.ts +57 -1
  72. package/src/editor/component-editor/scaffolding/TokenLayout.svelte +14 -14
  73. package/src/editor/component-editor/scaffolding/VariantGroup.svelte +3 -0
  74. package/src/editor/component-editor/scaffolding/types.ts +15 -0
  75. package/src/editor/core/components/adjustAliases.ts +4 -4
  76. package/src/editor/core/components/aliasKinds.ts +20 -19
  77. package/src/editor/core/sketch/sketchLayer.ts +3 -3
  78. package/src/editor/core/themes/migrateComponentConfig.ts +14 -6
  79. package/src/editor/core/themes/migrations/2026-09-13-badge-brand.ts +42 -0
  80. package/src/editor/core/themes/migrations/2026-09-13-collapsiblesection-open.ts +33 -0
  81. package/src/editor/core/themes/migrations/2026-09-13-cornerbadge-prefix.ts +70 -0
  82. package/src/editor/core/themes/migrations/2026-09-13-hairline.ts +92 -0
  83. package/src/editor/core/themes/migrations/2026-09-13-indicator.ts +54 -0
  84. package/src/editor/core/themes/migrations/2026-09-13-sectiondivider-surface.ts +36 -0
  85. package/src/editor/core/themes/migrations/2026-09-13-selected-state.ts +124 -0
  86. package/src/editor/core/themes/migrations/2026-09-13-toggle-label.ts +31 -0
  87. package/src/editor/core/themes/migrations/index.ts +16 -0
  88. package/src/editor/core/themes/themeService.ts +3 -3
  89. package/src/editor/core/themes/themeTypes.ts +13 -15
  90. package/src/editor/docs/Docs.svelte +1 -1
  91. package/src/editor/docs/content/light-and-dark.md +3 -3
  92. package/src/editor/docs/content.generated.ts +1 -1
  93. package/src/editor/index.ts +1 -0
  94. package/src/editor/overlay/LiveEditorOverlay.svelte +15 -0
  95. package/src/editor/skill-atlas/SkillAtlas.svelte +4 -4
  96. package/src/editor/skill-atlas/TreeNodeCard.svelte +4 -4
  97. package/src/editor/skill-atlas/skillSources.generated.ts +11 -14
  98. package/src/editor/skill-atlas/skillTrees.ts +1 -3
  99. package/src/editor/skill-atlas/trees/check-compliance.ts +37 -149
  100. package/src/editor/skill-atlas/trees/create-component.ts +62 -64
  101. package/src/editor/skill-atlas/trees/create-page.ts +38 -17
  102. package/src/editor/skill-atlas/trees/pick-component.ts +3 -3
  103. package/src/editor/skill-atlas/trees/set-geometry.ts +1 -1
  104. package/src/editor/ui/UIPaletteSelector.svelte +11 -15
  105. package/src/editor/ui/variantScales.ts +8 -8
  106. package/src/live-tokens/data/themes/autumn.json +188 -188
  107. package/src/live-tokens/data/themes/halloween.json +188 -188
  108. package/src/live-tokens/data/themes/midnight-study.json +245 -245
  109. package/src/live-tokens/data/themes/ocean.json +188 -188
  110. package/src/live-tokens/data/themes/royal-velvet.json +188 -188
  111. package/src/live-tokens/data/themes/sketchy.json +188 -188
  112. package/src/live-tokens/data/themes/spring-meadow.json +188 -188
  113. package/src/live-tokens/data/themes/sunset.json +188 -188
  114. package/src/system/components/Badge.svelte +27 -23
  115. package/src/system/components/Button.svelte +13 -7
  116. package/src/system/components/Callout.svelte +16 -11
  117. package/src/system/components/Card.svelte +22 -15
  118. package/src/system/components/CodeSnippet.svelte +10 -6
  119. package/src/system/components/CollapsibleSection.svelte +81 -76
  120. package/src/system/components/CornerBadge.svelte +78 -72
  121. package/src/system/components/Dialog.svelte +21 -18
  122. package/src/system/components/IconButton.svelte +13 -9
  123. package/src/system/components/Image.svelte +14 -8
  124. package/src/system/components/ImageLightbox.svelte +10 -6
  125. package/src/system/components/InlineEditActions.svelte +17 -14
  126. package/src/system/components/Input.svelte +13 -7
  127. package/src/system/components/MenuSelect.svelte +13 -7
  128. package/src/system/components/Notification.svelte +17 -11
  129. package/src/system/components/Panel.svelte +13 -6
  130. package/src/system/components/ProgressBar.svelte +10 -5
  131. package/src/system/components/RadioButton.svelte +33 -30
  132. package/src/system/components/SectionDivider.svelte +28 -21
  133. package/src/system/components/SegmentedControl.svelte +27 -23
  134. package/src/system/components/SideNavigation.svelte +175 -171
  135. package/src/system/components/Slider.svelte +11 -7
  136. package/src/system/components/TabBar.svelte +53 -49
  137. package/src/system/components/Table.svelte +20 -15
  138. package/src/system/components/Toggle.svelte +14 -10
  139. package/src/system/components/Tooltip.svelte +10 -6
  140. package/src/system/styles/CONVENTIONS.md +3 -4
  141. package/src/testing-js/chunk-3UKGXCDL.js +48 -0
  142. package/src/testing-js/chunk-3UKGXCDL.js.map +1 -0
  143. package/src/testing-js/{chunk-FAFOAWYL.js → chunk-Q3YIAAG3.js} +17 -3
  144. package/src/testing-js/chunk-Q3YIAAG3.js.map +1 -0
  145. package/src/testing-js/{chunk-GNIUPIU2.js → chunk-U7OJE5DU.js} +18 -18
  146. package/src/testing-js/chunk-U7OJE5DU.js.map +1 -0
  147. package/src/testing-js/{chunk-4JQX6WWL.js → chunk-ZMZQZ33J.js} +474 -166
  148. package/src/testing-js/chunk-ZMZQZ33J.js.map +1 -0
  149. package/src/testing-js/component-behavior.contract.js +155 -0
  150. package/src/testing-js/component-behavior.contract.js.map +1 -0
  151. package/src/testing-js/component-editor.contract.js +6 -4
  152. package/src/testing-js/component-editor.contract.js.map +1 -1
  153. package/src/testing-js/component-render.contract.js +14 -10
  154. package/src/testing-js/component-render.contract.js.map +1 -1
  155. package/src/testing-js/index.d.ts +44 -4
  156. package/src/testing-js/index.js +13 -7
  157. package/src/testing-js/index.js.map +1 -1
  158. package/src/testing-js/page-compliance.contract.js +48 -10
  159. package/src/testing-js/page-compliance.contract.js.map +1 -1
  160. package/src/testing-js/registry.contract.js +5 -3
  161. package/src/testing-js/registry.contract.js.map +1 -1
  162. package/src/testing-js/{vitest-C-wNWcoA.d.ts → vitest-BMLIbDs2.d.ts} +8 -2
  163. package/src/testing-js/vitest.d.ts +1 -1
  164. package/src/testing-js/vitest.js +2 -1
  165. package/template/package.json +1 -2
  166. package/template/vite.config.ts +3 -2
  167. package/.claude/skills/live-tokens-create-component/SKILL copy.md +0 -196
  168. package/.claude/skills/live-tokens-fix-findings/SKILL.md +0 -105
  169. package/src/editor/skill-atlas/trees/fix-findings.ts +0 -504
  170. package/src/testing-js/chunk-4JQX6WWL.js.map +0 -1
  171. package/src/testing-js/chunk-FAFOAWYL.js.map +0 -1
  172. package/src/testing-js/chunk-GNIUPIU2.js.map +0 -1
@@ -7,9 +7,8 @@ import { pickComponent } from './trees/pick-component';
7
7
  import { createPage } from './trees/create-page';
8
8
  import { createComponent } from './trees/create-component';
9
9
  import { checkCompliance } from './trees/check-compliance';
10
- import { fixFindings } from './trees/fix-findings';
11
10
 
12
- // Tab order: the theme route and its three set skills, the page path, then the audit pair.
11
+ // Tab order: the theme route and its three set skills, the page path, then the audit.
13
12
  export const skillTrees: Record<string, SkillTree> = {
14
13
  'create-theme': createTheme,
15
14
  'set-colors': setColors,
@@ -19,5 +18,4 @@ export const skillTrees: Record<string, SkillTree> = {
19
18
  'create-page': createPage,
20
19
  'create-component': createComponent,
21
20
  'check-compliance': checkCompliance,
22
- 'fix-findings': fixFindings,
23
21
  };
@@ -2,182 +2,70 @@ import type { SkillTree } from '../types';
2
2
 
3
3
  export const checkCompliance: SkillTree = {
4
4
  "id": "live-tokens-check-compliance",
5
- "digest": "sha256:6ec5bd44eeee644c",
5
+ "digest": "sha256:d6a1cdc3c9aead66",
6
6
  "title": "check-compliance",
7
- "tagline": "Check to Ensure Live Tokens Is Used",
7
+ "tagline": "Check and Fix a Project's Use of Live Tokens",
8
8
  "nodes": [
9
9
  {
10
10
  "id": "cc2-trig",
11
11
  "row": 0,
12
12
  "kind": "trigger",
13
- "title": "Review design-system compliance",
14
- "desc": "Checks for correct use of components, properties, and tokens.",
13
+ "title": "Check and fix design-system compliance",
14
+ "desc": "Checks for correct use of components, properties, and tokens, and fixes what it finds.",
15
15
  "lines": [3, 3],
16
- "anchor": "description: Report an existing project's adherence to @moti"
16
+ "anchor": "description: Check an existing @motion-proto/live-tokens pro"
17
17
  },
18
18
  {
19
- "id": "cc2-run",
19
+ "id": "cc2-check",
20
20
  "row": 1,
21
21
  "kind": "cli",
22
- "title": "Generate the compliance report",
23
- "desc": "Provides a report of fixes for the fix-findings skill",
24
- "lines": [8, 8],
25
- "anchor": "Run `npx live-tokens report`. The CLI prints a report with t"
22
+ "title": "Run the checks",
23
+ "desc": "Both checkers bring tokens.css up to the installed package and apply every fix they can, then return the fixes beside the judgment calls that remain.",
24
+ "lines": [14, 18],
25
+ "anchor": "Run both checkers with `--json`. Each first brings `tokens.c",
26
+ "anchorEnd": "```"
26
27
  },
27
28
  {
28
- "id": "cc2-sections",
29
+ "id": "cc2-judge",
29
30
  "row": 2,
30
- "kind": "chipset",
31
- "title": "Read the report sections",
32
- "desc": "Fixes in the report are listed by section.",
33
- "lines": [19, 19],
34
- "anchor": "Read each section of the report with the Report sections tab",
35
- "chips": [
36
- {
37
- "label": "Pending token migrations",
38
- "lines": [32, 32],
39
- "anchor": "| Pending token migrations (`migrations`) | Whether `tokens."
40
- },
41
- {
42
- "label": "Checker findings by rule",
43
- "lines": [33, 33],
44
- "anchor": "| Checker findings by rule (`findings.pages`, `findings.comp"
45
- },
46
- {
47
- "label": "Tokens a component never reads",
48
- "lines": [34, 34],
49
- "anchor": "| Tokens a component never reads (`components[].unread`) | T"
50
- },
51
- {
52
- "label": "Component registration",
53
- "lines": [35, 35],
54
- "anchor": "| Component registration (`components[].registered`) | Wheth"
55
- },
56
- {
57
- "label": "Component usage comment",
58
- "lines": [36, 36],
59
- "anchor": "| Component usage comment (`components[].described`) | Wheth"
60
- },
61
- {
62
- "label": "Components each page renders",
63
- "lines": [37, 37],
64
- "anchor": "| Components each page renders (`usage.byPage`) | Which comp"
65
- },
66
- {
67
- "label": "Shipped components no page renders",
68
- "lines": [38, 38],
69
- "anchor": "| Shipped components no page renders (`usage.unusedShipped`)"
70
- },
71
- {
72
- "label": "Project components unregistered or unused",
73
- "lines": [39, 39],
74
- "anchor": "| Project components unregistered or unused (`usage.customUn"
75
- }
76
- ]
31
+ "kind": "gate",
32
+ "title": "Make the judgment calls",
33
+ "desc": "Each judgment call carries its guidance. Make each call, then run the checks again.",
34
+ "lines": [19, 21],
35
+ "anchor": "Read what remains. Each finding carries the fields under Fin",
36
+ "anchorEnd": "Make every repair in the group from its `guidance`, within S"
77
37
  },
78
38
  {
79
- "id": "cc2-drill-q",
39
+ "id": "cc2-reply",
80
40
  "row": 3,
81
- "kind": "decide",
82
- "title": "Get details",
83
- "desc": "A finding may need more about one component or one token scale, such as space or color.",
84
- "lines": [20, 20],
85
- "anchor": "When a finding needs component or token scale details, run t",
86
- "chips": [
87
- {
88
- "label": "component",
89
- "lines": [26, 26],
90
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
91
- },
92
- {
93
- "label": "token scale",
94
- "lines": [26, 26],
95
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
96
- },
97
- {
98
- "label": "continue with classification",
99
- "lines": [21, 21],
100
- "anchor": "Classify each finding as Mechanical, Judgement, or Deliberat"
101
- }
102
- ]
103
- },
104
- {
105
- "id": "cc2-component",
106
- "row": 4,
107
- "kind": "cli",
108
- "title": "Inspect the component",
109
- "desc": "Shows one component's props and usage.",
110
- "lines": [26, 26],
111
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
112
- },
113
- {
114
- "id": "cc2-scale",
115
- "row": 4,
116
- "kind": "cli",
117
- "title": "Inspect the token scale",
118
- "desc": "Shows every token in one scale, such as space or color, with its value.",
119
- "lines": [26, 26],
120
- "anchor": "For one component, run `npx live-tokens components <id>`. Fo"
121
- },
122
- {
123
- "id": "cc2-classify",
124
- "row": 6,
125
- "kind": "chipset",
126
- "title": "Classify the findings",
127
- "desc": "Mechanical maps a value to an existing token.\nJudgement asks the user to decide.\nDeliberate records a decision the project made.",
128
- "lines": [21, 21],
129
- "anchor": "Classify each finding as Mechanical, Judgement, or Deliberat"
130
- },
131
- {
132
- "id": "cc2-handoff",
133
- "row": 7,
134
- "kind": "hand",
135
- "title": "live-tokens-fix-findings",
136
- "desc": "Reply with the findings and the fixes, in the order the repair skill takes them, and hand it the list.",
137
- "lines": [22, 24],
138
- "anchor": "Reply with the findings of each section in the table's order",
139
- "anchorEnd": "End with the hand-off: run **live-tokens-fix-findings** on t"
41
+ "kind": "done",
42
+ "title": "Reply with the results",
43
+ "desc": "The fixes, the judgment calls made, the findings left with their reasons, and both exit codes.",
44
+ "lines": [25, 29],
45
+ "anchor": "Reply with:",
46
+ "anchorEnd": "both checker commands with their exit codes"
140
47
  }
141
48
  ],
142
49
  "edges": [
143
50
  {
144
- "to": "cc2-run",
145
- "from": "cc2-trig"
146
- },
147
- {
148
- "to": "cc2-sections",
149
- "from": "cc2-run"
150
- },
151
- {
152
- "to": "cc2-drill-q",
153
- "from": "cc2-sections"
154
- },
155
- {
156
- "to": "cc2-component",
157
- "from": "cc2-drill-q",
158
- "label": "component"
159
- },
160
- {
161
- "to": "cc2-scale",
162
- "from": "cc2-drill-q",
163
- "label": "token scale"
164
- },
165
- {
166
- "to": "cc2-classify",
167
- "from": "cc2-drill-q",
168
- "label": "continue with classification"
51
+ "from": "cc2-trig",
52
+ "to": "cc2-check"
169
53
  },
170
54
  {
171
- "to": "cc2-classify",
172
- "from": "cc2-component"
55
+ "from": "cc2-check",
56
+ "to": "cc2-judge",
57
+ "label": "judgment calls"
173
58
  },
174
59
  {
175
- "to": "cc2-classify",
176
- "from": "cc2-scale"
60
+ "from": "cc2-check",
61
+ "to": "cc2-reply",
62
+ "label": "fixed"
177
63
  },
178
64
  {
179
- "to": "cc2-handoff",
180
- "from": "cc2-classify"
65
+ "from": "cc2-judge",
66
+ "to": "cc2-check",
67
+ "label": "rerun",
68
+ "back": true
181
69
  }
182
70
  ]
183
71
  };
@@ -2,7 +2,7 @@ import type { SkillTree } from '../types';
2
2
 
3
3
  export const createComponent: SkillTree = {
4
4
  "id": "live-tokens-create-component",
5
- "digest": "sha256:6f7b5810d03739a0",
5
+ "digest": "sha256:64a50a8081b1f789",
6
6
  "title": "create-component",
7
7
  "tagline": "Create a LiveTokens Component",
8
8
  "nodes": [
@@ -26,27 +26,27 @@ export const createComponent: SkillTree = {
26
26
  "chips": [
27
27
  {
28
28
  "label": "Config",
29
- "lines": [41, 41],
29
+ "lines": [43, 43],
30
30
  "anchor": "Read the project's `package.json`, `live-tokens.config.json`"
31
31
  },
32
32
  {
33
33
  "label": "Catalogue",
34
- "lines": [42, 42],
34
+ "lines": [44, 44],
35
35
  "anchor": "Run `npx live-tokens components`. The list holds every compo"
36
36
  },
37
37
  {
38
38
  "label": "Token scales",
39
- "lines": [43, 43],
39
+ "lines": [45, 45],
40
40
  "anchor": "Run `npx live-tokens tokens --scale <name>` for each token s"
41
41
  },
42
42
  {
43
43
  "label": "Shipped pair",
44
- "lines": [44, 44],
44
+ "lines": [46, 46],
45
45
  "anchor": "Read a shipped runtime and editor pair: `Toggle` for interac"
46
46
  },
47
47
  {
48
48
  "label": "Suffixes",
49
- "lines": [45, 45],
49
+ "lines": [47, 47],
50
50
  "anchor": "Read `references/token-naming.md` for the suffixes that sele"
51
51
  }
52
52
  ]
@@ -62,31 +62,31 @@ export const createComponent: SkillTree = {
62
62
  "chips": [
63
63
  {
64
64
  "label": "Design model",
65
- "lines": [20, 35],
65
+ "lines": [20, 37],
66
66
  "anchor": "## Design model",
67
- "anchorEnd": "Props carry content and behavior: a value, a label, a callba"
67
+ "anchorEnd": "Prop names follow the shipped components. `label` names a co"
68
68
  },
69
69
  {
70
70
  "label": "Parts, variants, and states",
71
- "lines": [49, 65],
71
+ "lines": [51, 67],
72
72
  "anchor": "## Variants and states",
73
73
  "anchorEnd": "A component supplies its variants. The page chooses the one "
74
74
  },
75
75
  {
76
76
  "label": "Property map",
77
- "lines": [69, 82],
77
+ "lines": [71, 84],
78
78
  "anchor": "Before writing a file, identify the component's parts, text ",
79
79
  "anchorEnd": "Assign from the tokens the project has. Match the token scal"
80
80
  },
81
81
  {
82
82
  "label": "Name shape",
83
- "lines": [84, 96],
83
+ "lines": [86, 98],
84
84
  "anchor": "A property name starts with the component id and ends with t",
85
85
  "anchorEnd": "For a state that affects several parts, follow Toggle: `--to"
86
86
  },
87
87
  {
88
88
  "label": "Shipped role names",
89
- "lines": [98, 98],
89
+ "lines": [100, 100],
90
90
  "anchor": "Name a role as the shipped component that paints the same th"
91
91
  }
92
92
  ]
@@ -95,36 +95,36 @@ export const createComponent: SkillTree = {
95
95
  "id": "cc-runtime",
96
96
  "row": 3,
97
97
  "kind": "chipset",
98
- "title": "Write the component runtime ",
99
- "desc": "Start with the usage comment. Declare every property with its token, and read it in the CSS.",
98
+ "title": "Write the component runtime",
99
+ "desc": "Start with the catalogue export. Declare every property with its token, and read it in the CSS.",
100
100
  "lines": [14, 14],
101
- "anchor": "Write the runtime file: the usage comment and the `:global(:",
101
+ "anchor": "Write the runtime file: the catalogue export and the `:globa",
102
102
  "chips": [
103
103
  {
104
- "label": "Usage comment",
105
- "lines": [104, 111],
106
- "anchor": "Open the file with an HTML comment in the shape every shippe",
107
- "anchorEnd": "-->"
104
+ "label": "Catalogue entry",
105
+ "lines": [106, 118],
106
+ "anchor": "Open the file with a `<script module lang=\"ts\">` block that ",
107
+ "anchorEnd": "```"
108
108
  },
109
109
  {
110
110
  "label": "Root block",
111
- "lines": [114, 142],
111
+ "lines": [120, 148],
112
112
  "anchor": "Declare every editable property in a literal `:global(:root)",
113
113
  "anchorEnd": "The excerpt shows the chain for part of the property map. Ev"
114
114
  },
115
115
  {
116
116
  "label": "Intrinsics",
117
- "lines": [142, 142],
117
+ "lines": [148, 148],
118
118
  "anchor": "The excerpt shows the chain for part of the property map. Ev"
119
119
  },
120
120
  {
121
121
  "label": "Sketch mode",
122
- "lines": [215, 215],
122
+ "lines": [223, 223],
123
123
  "anchor": "Every component joins the sketch layer: read `references/ske"
124
124
  },
125
125
  {
126
126
  "label": "Fixed overlays",
127
- "lines": [217, 217],
127
+ "lines": [225, 225],
128
128
  "anchor": "A fixed overlay portals to `<body>`: read `references/fixed-"
129
129
  }
130
130
  ]
@@ -140,22 +140,22 @@ export const createComponent: SkillTree = {
140
140
  "chips": [
141
141
  {
142
142
  "label": "Schema",
143
- "lines": [148, 148],
143
+ "lines": [154, 154],
144
144
  "anchor": "A `<script module>` block exports `component`, the id, and `"
145
145
  },
146
146
  {
147
147
  "label": "Preview props",
148
- "lines": [149, 149],
148
+ "lines": [155, 155],
149
149
  "anchor": "The instance script imports the runtime component and the ed"
150
150
  },
151
151
  {
152
152
  "label": "Markup",
153
- "lines": [150, 150],
153
+ "lines": [156, 156],
154
154
  "anchor": "The markup mounts `ComponentEditorBase` with one `VariantGro"
155
155
  },
156
156
  {
157
157
  "label": "Linked siblings",
158
- "lines": [186, 186],
158
+ "lines": [192, 192],
159
159
  "anchor": "When variants share a value, read `references/linked-sibling"
160
160
  }
161
161
  ]
@@ -171,23 +171,23 @@ export const createComponent: SkillTree = {
171
171
  "chips": [
172
172
  {
173
173
  "label": "Shared module",
174
- "lines": [190, 204],
174
+ "lines": [196, 212],
175
175
  "anchor": "Register the component in `src/registerComponents.ts`, a reg",
176
176
  "anchorEnd": "});"
177
177
  },
178
178
  {
179
179
  "label": "Import and name it",
180
- "lines": [207, 207],
180
+ "lines": [215, 215],
181
181
  "anchor": "Import the module from `src/main.ts`, before `bootLiveTokens"
182
182
  },
183
183
  {
184
184
  "label": "Contract",
185
- "lines": [207, 207],
185
+ "lines": [215, 215],
186
186
  "anchor": "Import the module from `src/main.ts`, before `bootLiveTokens"
187
187
  },
188
188
  {
189
189
  "label": "First-party",
190
- "lines": [211, 211],
190
+ "lines": [219, 219],
191
191
  "anchor": "Inside the live-tokens repository, a first-party component k"
192
192
  }
193
193
  ]
@@ -195,51 +195,37 @@ export const createComponent: SkillTree = {
195
195
  {
196
196
  "id": "cc-checks",
197
197
  "row": 6,
198
- "kind": "chipset",
199
- "title": "Run the checks",
200
- "desc": "Get a report from check-compliance, then run check-component --tests until it passes with the contract's suites covered.",
201
- "lines": [17, 17],
202
- "anchor": "Run **live-tokens-check-compliance**, then `npx live-tokens ",
203
- "chips": [
204
- {
205
- "label": "Compliance and tests",
206
- "lines": [221, 221],
207
- "anchor": "Run **live-tokens-check-compliance** and address its finding"
208
- },
209
- {
210
- "label": "Svelte check and build",
211
- "lines": [222, 222],
212
- "anchor": "Run the project's Svelte check and its build."
213
- },
214
- {
215
- "label": "Component tests",
216
- "lines": [17, 17],
217
- "anchor": "Run **live-tokens-check-compliance**, then `npx live-tokens "
218
- },
219
- {
220
- "label": "Rule table",
221
- "lines": [227, 237],
222
- "anchor": "| `fix` | Section |",
223
- "anchorEnd": "| `coverage` | Add the missing contract, or complete the run"
224
- }
225
- ]
198
+ "kind": "cli",
199
+ "title": "Run check-component",
200
+ "desc": "check-component <id> --tests --strict --json applies every auto repair, runs the contract suites, and returns the fixes beside the remaining findings and coverage by rule.",
201
+ "lines": [229, 229],
202
+ "anchor": "Run `npx live-tokens check-component <id> --tests --strict -"
226
203
  },
227
204
  {
228
- "id": "cc-reply",
205
+ "id": "cc-repair",
229
206
  "row": 7,
207
+ "kind": "gate",
208
+ "title": "Repair from guidance",
209
+ "desc": "Each remaining finding carries its guidance. Make each repair, then run check-component again until coverage is complete.",
210
+ "lines": [230, 230],
211
+ "anchor": "Each remaining finding carries a rule id, a line, and its `g"
212
+ },
213
+ {
214
+ "id": "cc-reply",
215
+ "row": 8,
230
216
  "kind": "step",
231
217
  "title": "Reply with the result",
232
- "desc": "The files, the id, the props, and each check's result.",
218
+ "desc": "The files, the id, the props, and the result of check-component, the Svelte check, and the build.",
233
219
  "lines": [18, 18],
234
220
  "anchor": "Reply with the files, the id, the props, and each check's re"
235
221
  },
236
222
  {
237
223
  "id": "cc-page",
238
- "row": 8,
224
+ "row": 9,
239
225
  "kind": "hand",
240
226
  "title": "live-tokens-create-page",
241
227
  "desc": "The component is done. Placing it on a page is the next skill.",
242
- "lines": [241, 241],
228
+ "lines": [236, 236],
243
229
  "anchor": "Then place the component on a page with **live-tokens-create"
244
230
  }
245
231
  ],
@@ -270,7 +256,19 @@ export const createComponent: SkillTree = {
270
256
  },
271
257
  {
272
258
  "from": "cc-checks",
273
- "to": "cc-reply"
259
+ "to": "cc-repair",
260
+ "label": "findings"
261
+ },
262
+ {
263
+ "from": "cc-repair",
264
+ "to": "cc-checks",
265
+ "label": "rerun",
266
+ "back": true
267
+ },
268
+ {
269
+ "from": "cc-checks",
270
+ "to": "cc-reply",
271
+ "label": "exit 0"
274
272
  },
275
273
  {
276
274
  "from": "cc-reply",
@@ -2,7 +2,7 @@ import type { SkillTree } from '../types';
2
2
 
3
3
  export const createPage: SkillTree = {
4
4
  "id": "live-tokens-create-page",
5
- "digest": "sha256:7d816fe66d20567c",
5
+ "digest": "sha256:0d78d225ef7199e2",
6
6
  "title": "create-page",
7
7
  "tagline": "Create a Page Using Live Tokens",
8
8
  "nodes": [
@@ -210,43 +210,52 @@ export const createPage: SkillTree = {
210
210
  {
211
211
  "id": "cp-check",
212
212
  "row": 8,
213
- "kind": "step",
214
- "title": "Run both checkers",
215
- "desc": "live-tokens-check-compliance reads the source. check-page --tests --strict proves the rendered page at its route. Both reports go to live-tokens-fix-findings until the page is clean.",
216
- "lines": [20, 20],
217
- "anchor": "Run **live-tokens-check-compliance** and `npx live-tokens ch"
213
+ "kind": "cli",
214
+ "title": "Run check-page",
215
+ "desc": "check-page --tests --strict --json applies every auto repair, proves the rendered page at its own route, and returns the fixes beside the remaining findings.",
216
+ "lines": [168, 168],
217
+ "anchor": "Run `npx live-tokens check-page <file> --tests --strict --js"
218
218
  },
219
219
  {
220
- "id": "cp-verify",
220
+ "id": "cp-repair",
221
221
  "row": 9,
222
+ "kind": "gate",
223
+ "title": "Repair from guidance",
224
+ "desc": "Each remaining finding carries its guidance. Make each repair, then run check-page again.",
225
+ "lines": [170, 170],
226
+ "anchor": "Each remaining finding carries a rule id, a line, and its `g"
227
+ },
228
+ {
229
+ "id": "cp-verify",
230
+ "row": 10,
222
231
  "kind": "chipset",
223
232
  "title": "Check the page in the browser",
224
233
  "desc": "The checkers cannot see a layout. Open the page at its width and check each line.",
225
- "lines": [170, 186],
234
+ "lines": [172, 188],
226
235
  "anchor": "The checkers cannot see a layout. Open the page at the width",
227
236
  "anchorEnd": "`references/interaction-sources.md` names the sources for th",
228
237
  "chips": [
229
238
  {
230
239
  "label": "Structure",
231
- "lines": [172, 176],
240
+ "lines": [174, 178],
232
241
  "anchor": "The first section holds what the user came for.",
233
242
  "anchorEnd": "The containers in a section align at the bottom."
234
243
  },
235
244
  {
236
245
  "label": "Actions",
237
- "lines": [177, 180],
246
+ "lines": [179, 182],
238
247
  "anchor": "The actions sit where the eye goes last, with the one primar",
239
248
  "anchorEnd": "An action that runs longer than a moment shows progress in a"
240
249
  },
241
250
  {
242
251
  "label": "Fields",
243
- "lines": [181, 182],
252
+ "lines": [183, 184],
244
253
  "anchor": "Every field has a default, and Reset restores it.",
245
254
  "anchorEnd": "Secondary settings sit in a `CollapsibleSection`. Every cont"
246
255
  },
247
256
  {
248
257
  "label": "Words and access",
249
- "lines": [183, 184],
258
+ "lines": [185, 186],
250
259
  "anchor": "Labels use the user's words, such as \"Export slices\".",
251
260
  "anchorEnd": "Every `img` has `alt` text. Focus order follows the reading "
252
261
  }
@@ -254,19 +263,19 @@ export const createPage: SkillTree = {
254
263
  },
255
264
  {
256
265
  "id": "cp-read",
257
- "row": 10,
266
+ "row": 11,
258
267
  "kind": "step",
259
268
  "title": "Read the page twice",
260
269
  "desc": "From a distance only the sections show. Up close, every border and bar earns its place or goes.",
261
- "lines": [188, 188],
270
+ "lines": [190, 190],
262
271
  "anchor": "Then read the page from a distance: the sections and their e"
263
272
  },
264
273
  {
265
274
  "id": "cp-reply",
266
- "row": 11,
275
+ "row": 12,
267
276
  "kind": "done",
268
277
  "title": "Reply with the result",
269
- "desc": "The sections and the layout each took, the components placed, the route, and the compliance result.",
278
+ "desc": "The sections and the layout each took, the components placed, the route, and the check-page result.",
270
279
  "lines": [21, 21],
271
280
  "anchor": "Reply with the sections and the layout each took, the compon"
272
281
  }
@@ -306,7 +315,19 @@ export const createPage: SkillTree = {
306
315
  },
307
316
  {
308
317
  "from": "cp-check",
309
- "to": "cp-verify"
318
+ "to": "cp-repair",
319
+ "label": "findings"
320
+ },
321
+ {
322
+ "from": "cp-repair",
323
+ "to": "cp-check",
324
+ "label": "rerun",
325
+ "back": true
326
+ },
327
+ {
328
+ "from": "cp-check",
329
+ "to": "cp-verify",
330
+ "label": "exit 0"
310
331
  },
311
332
  {
312
333
  "from": "cp-verify",
@@ -2,7 +2,7 @@ import type { SkillTree } from '../types';
2
2
 
3
3
  export const pickComponent: SkillTree = {
4
4
  "id": "live-tokens-pick-component",
5
- "digest": "sha256:5e4ca458665c95fd",
5
+ "digest": "sha256:fa031772b2802175",
6
6
  "title": "pick-component",
7
7
  "tagline": "Select a component from the catalogue",
8
8
  "nodes": [
@@ -139,7 +139,7 @@ export const pickComponent: SkillTree = {
139
139
  "desc": "Use a component from the catalogue if one fits, otherwise build a new one.",
140
140
  "lines": [92, 96],
141
141
  "anchor": "## Nothing fits",
142
- "anchorEnd": "`npx live-tokens components <id>` prints one component's usa",
142
+ "anchorEnd": "`npx live-tokens components <id>` prints one component's cat",
143
143
  "chips": [
144
144
  {
145
145
  "label": "shipped component",
@@ -170,7 +170,7 @@ export const pickComponent: SkillTree = {
170
170
  "title": "Check the component",
171
171
  "desc": "See the component's props and usage before placing it.",
172
172
  "lines": [96, 96],
173
- "anchor": "`npx live-tokens components <id>` prints one component's usa"
173
+ "anchor": "`npx live-tokens components <id>` prints one component's cat"
174
174
  },
175
175
  {
176
176
  "id": "pk-native",