@motion-proto/live-tokens 0.77.0 → 0.79.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/.claude/skills/live-tokens-check-compliance/SKILL.md +60 -29
- package/.claude/skills/live-tokens-create-component/SKILL.md +23 -28
- package/.claude/skills/live-tokens-create-component/references/contract-tests.md +61 -0
- package/.claude/skills/live-tokens-create-component/references/sketch-mode.md +2 -2
- package/.claude/skills/live-tokens-create-component/references/token-naming.md +6 -15
- package/.claude/skills/live-tokens-create-page/SKILL.md +9 -6
- package/.claude/skills/live-tokens-create-theme/references/design-directions.md +1 -1
- package/.claude/skills/live-tokens-pick-component/SKILL.md +3 -3
- package/.claude/skills/live-tokens-set-colors/references/color-anchors.md +1 -1
- package/.claude/skills/live-tokens-set-geometry/SKILL.md +1 -1
- package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +1 -1
- package/CHANGELOG.md +284 -0
- package/README.md +9 -15
- package/bin/check-component.mjs +152 -551
- package/bin/check-page.mjs +56 -420
- package/bin/cli.mjs +83 -15
- package/bin/contractRunner.mjs +380 -120
- package/bin/lib/catalogue.mjs +161 -34
- package/bin/lib/componentSource.mjs +152 -0
- package/bin/lib/cssValues.mjs +9 -0
- package/bin/lib/dataDir.mjs +126 -0
- package/bin/lib/findings.mjs +103 -12
- package/bin/lib/fixers.mjs +64 -0
- package/bin/lib/geometry.mjs +92 -0
- package/bin/lib/pageRoutes.mjs +309 -0
- package/bin/lib/pageSource.mjs +230 -0
- package/bin/lib/report.mjs +57 -59
- package/bin/lib/tokenVocabulary.mjs +104 -34
- package/bin/rules/componentStructure.mjs +344 -0
- package/bin/rules/componentUse.mjs +313 -0
- package/bin/rules/importsAndRoutes.mjs +136 -0
- package/bin/rules/testRuns.mjs +122 -0
- package/bin/rules/tokens.mjs +363 -0
- package/bin/setup-claude.mjs +1 -2
- package/dist-plugin/{chunk-PDNL4NC5.js → chunk-D4WRIKEZ.js} +7 -2
- package/dist-plugin/{chunk-SWXRVZKT.js → chunk-REBHE3ZM.js} +414 -1
- package/dist-plugin/index.cjs +432 -15
- package/dist-plugin/index.js +8 -9
- package/dist-plugin/migrateData/index.cjs +422 -4
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/setColors/index.cjs +414 -1
- package/dist-plugin/setColors/index.d.cts +1 -1
- package/dist-plugin/setColors/index.d.ts +1 -1
- package/dist-plugin/setColors/index.js +1 -1
- package/dist-plugin/setGeometry/index.cjs +423 -13
- package/dist-plugin/setGeometry/index.d.cts +3 -3
- package/dist-plugin/setGeometry/index.d.ts +3 -3
- package/dist-plugin/setGeometry/index.js +10 -13
- package/dist-plugin/setType/index.d.cts +1 -1
- package/dist-plugin/setType/index.d.ts +1 -1
- package/dist-plugin/{themeTypes-BxRtuN5V.d.cts → themeTypes-B8_Idrp4.d.cts} +2 -2
- package/dist-plugin/{themeTypes-BxRtuN5V.d.ts → themeTypes-B8_Idrp4.d.ts} +2 -2
- package/package.json +6 -4
- package/src/editor/component-editor/CalloutEditor.svelte +2 -2
- package/src/editor/component-editor/CollapsibleSectionEditor.svelte +14 -15
- package/src/editor/component-editor/CornerBadgeEditor.svelte +14 -14
- package/src/editor/component-editor/DialogEditor.svelte +5 -5
- package/src/editor/component-editor/InlineEditActionsEditor.svelte +2 -2
- package/src/editor/component-editor/RadioButtonEditor.svelte +21 -21
- package/src/editor/component-editor/SectionDividerEditor.svelte +7 -7
- package/src/editor/component-editor/SegmentedControlEditor.svelte +5 -5
- package/src/editor/component-editor/SideNavigationEditor.svelte +25 -25
- package/src/editor/component-editor/TabBarEditor.svelte +6 -6
- package/src/editor/component-editor/TableEditor.svelte +6 -6
- package/src/editor/component-editor/ToggleEditor.svelte +2 -2
- package/src/editor/component-editor/index.ts +3 -0
- package/src/editor/component-editor/registry.ts +57 -1
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +14 -14
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +3 -0
- package/src/editor/component-editor/scaffolding/types.ts +15 -0
- package/src/editor/core/components/adjustAliases.ts +4 -4
- package/src/editor/core/components/aliasKinds.ts +20 -19
- package/src/editor/core/sketch/sketchLayer.ts +3 -3
- package/src/editor/core/themes/migrateComponentConfig.ts +14 -6
- package/src/editor/core/themes/migrations/2026-09-13-badge-brand.ts +42 -0
- package/src/editor/core/themes/migrations/2026-09-13-collapsiblesection-open.ts +33 -0
- package/src/editor/core/themes/migrations/2026-09-13-cornerbadge-prefix.ts +70 -0
- package/src/editor/core/themes/migrations/2026-09-13-hairline.ts +92 -0
- package/src/editor/core/themes/migrations/2026-09-13-indicator.ts +54 -0
- package/src/editor/core/themes/migrations/2026-09-13-sectiondivider-surface.ts +36 -0
- package/src/editor/core/themes/migrations/2026-09-13-selected-state.ts +124 -0
- package/src/editor/core/themes/migrations/2026-09-13-toggle-label.ts +31 -0
- package/src/editor/core/themes/migrations/index.ts +16 -0
- package/src/editor/core/themes/themeService.ts +3 -3
- package/src/editor/core/themes/themeTypes.ts +13 -15
- package/src/editor/docs/Docs.svelte +1 -1
- package/src/editor/docs/content/light-and-dark.md +3 -3
- package/src/editor/docs/content.generated.ts +1 -1
- package/src/editor/index.ts +1 -0
- package/src/editor/overlay/ColumnsOverlay.svelte +1 -1
- package/src/editor/overlay/LiveEditorOverlay.svelte +16 -0
- package/src/editor/overlay/LiveTokensRouter.svelte +1 -0
- package/src/editor/skill-atlas/SkillAtlas.svelte +4 -4
- package/src/editor/skill-atlas/TreeNodeCard.svelte +4 -4
- package/src/editor/skill-atlas/skillSources.generated.ts +11 -14
- package/src/editor/skill-atlas/skillTrees.ts +1 -3
- package/src/editor/skill-atlas/trees/check-compliance.ts +258 -93
- package/src/editor/skill-atlas/trees/create-component.ts +73 -62
- package/src/editor/skill-atlas/trees/create-page.ts +54 -33
- package/src/editor/skill-atlas/trees/pick-component.ts +3 -3
- package/src/editor/skill-atlas/trees/set-geometry.ts +1 -1
- package/src/editor/ui/UIPaletteSelector.svelte +11 -15
- package/src/editor/ui/variantScales.ts +8 -8
- package/src/live-tokens/data/themes/autumn.json +188 -188
- package/src/live-tokens/data/themes/halloween.json +188 -188
- package/src/live-tokens/data/themes/midnight-study.json +245 -245
- package/src/live-tokens/data/themes/ocean.json +188 -188
- package/src/live-tokens/data/themes/royal-velvet.json +188 -188
- package/src/live-tokens/data/themes/sketchy.json +188 -188
- package/src/live-tokens/data/themes/spring-meadow.json +188 -188
- package/src/live-tokens/data/themes/sunset.json +188 -188
- package/src/system/components/Badge.svelte +27 -23
- package/src/system/components/Button.svelte +13 -7
- package/src/system/components/Callout.svelte +16 -11
- package/src/system/components/Card.svelte +22 -15
- package/src/system/components/CodeSnippet.svelte +10 -6
- package/src/system/components/CollapsibleSection.svelte +68 -63
- package/src/system/components/CornerBadge.svelte +78 -72
- package/src/system/components/Dialog.svelte +21 -18
- package/src/system/components/IconButton.svelte +13 -9
- package/src/system/components/Image.svelte +14 -8
- package/src/system/components/ImageLightbox.svelte +10 -6
- package/src/system/components/InlineEditActions.svelte +17 -14
- package/src/system/components/Input.svelte +13 -7
- package/src/system/components/MenuSelect.svelte +13 -7
- package/src/system/components/Notification.svelte +17 -11
- package/src/system/components/Panel.svelte +13 -6
- package/src/system/components/ProgressBar.svelte +10 -5
- package/src/system/components/RadioButton.svelte +33 -30
- package/src/system/components/SectionDivider.svelte +28 -21
- package/src/system/components/SegmentedControl.svelte +27 -23
- package/src/system/components/SideNavigation.svelte +175 -171
- package/src/system/components/Slider.svelte +11 -7
- package/src/system/components/TabBar.svelte +53 -49
- package/src/system/components/Table.svelte +20 -15
- package/src/system/components/Toggle.svelte +14 -10
- package/src/system/components/Tooltip.svelte +10 -6
- package/src/system/styles/CONVENTIONS.md +3 -4
- package/src/testing-js/chunk-3UKGXCDL.js +48 -0
- package/src/testing-js/chunk-3UKGXCDL.js.map +1 -0
- package/src/testing-js/{chunk-ZMSX6CXR.js → chunk-NB3NZRBM.js} +13 -2
- package/src/testing-js/chunk-NB3NZRBM.js.map +1 -0
- package/src/testing-js/{chunk-FAFOAWYL.js → chunk-Q3YIAAG3.js} +17 -3
- package/src/testing-js/chunk-Q3YIAAG3.js.map +1 -0
- package/src/testing-js/{chunk-7TI7Z6Y6.js → chunk-U7OJE5DU.js} +19 -19
- package/src/testing-js/chunk-U7OJE5DU.js.map +1 -0
- package/src/testing-js/{chunk-L73N4NSO.js → chunk-WIZ6W7UT.js} +2 -2
- package/src/testing-js/{chunk-4JQX6WWL.js → chunk-ZMZQZ33J.js} +474 -166
- package/src/testing-js/chunk-ZMZQZ33J.js.map +1 -0
- package/src/testing-js/component-alias.contract.js +2 -2
- package/src/testing-js/component-behavior.contract.js +155 -0
- package/src/testing-js/component-behavior.contract.js.map +1 -0
- package/src/testing-js/component-editor.contract.js +7 -5
- package/src/testing-js/component-editor.contract.js.map +1 -1
- package/src/testing-js/component-render.contract.js +15 -11
- package/src/testing-js/component-render.contract.js.map +1 -1
- package/src/testing-js/index.d.ts +50 -4
- package/src/testing-js/index.js +32 -8
- package/src/testing-js/index.js.map +1 -1
- package/src/testing-js/page-compliance.contract.js +867 -0
- package/src/testing-js/page-compliance.contract.js.map +1 -0
- package/src/testing-js/registry.contract.js +5 -3
- package/src/testing-js/registry.contract.js.map +1 -1
- package/src/testing-js/{vitest-BE6uGF31.d.ts → vitest-BMLIbDs2.d.ts} +29 -3
- package/src/testing-js/vitest.d.ts +1 -1
- package/src/testing-js/vitest.js +3 -2
- package/template/README.md +16 -9
- package/template/package.json +2 -2
- package/template/src/pages/Home.svelte +13 -0
- package/.claude/skills/live-tokens-create-component/SKILL copy.md +0 -196
- package/.claude/skills/live-tokens-fix-findings/SKILL.md +0 -98
- package/src/editor/skill-atlas/trees/fix-findings.ts +0 -469
- package/src/testing-js/chunk-4JQX6WWL.js.map +0 -1
- package/src/testing-js/chunk-7TI7Z6Y6.js.map +0 -1
- package/src/testing-js/chunk-FAFOAWYL.js.map +0 -1
- package/src/testing-js/chunk-ZMSX6CXR.js.map +0 -1
- /package/src/testing-js/{chunk-L73N4NSO.js.map → chunk-WIZ6W7UT.js.map} +0 -0
|
@@ -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
|
|
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,347 @@ import type { SkillTree } from '../types';
|
|
|
2
2
|
|
|
3
3
|
export const checkCompliance: SkillTree = {
|
|
4
4
|
"id": "live-tokens-check-compliance",
|
|
5
|
-
"digest": "sha256:
|
|
5
|
+
"digest": "sha256:7ea9c74741740d5c",
|
|
6
6
|
"title": "check-compliance",
|
|
7
|
-
"tagline": "Check
|
|
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": "
|
|
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 the project until both checkers exit 0.",
|
|
15
15
|
"lines": [3, 3],
|
|
16
|
-
"anchor": "description:
|
|
16
|
+
"anchor": "description: Check an existing @motion-proto/live-tokens pro"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"id": "cc2-run",
|
|
20
20
|
"row": 1,
|
|
21
21
|
"kind": "cli",
|
|
22
22
|
"title": "Generate the compliance report",
|
|
23
|
-
"desc": "
|
|
24
|
-
"lines": [
|
|
25
|
-
"anchor": "Run `npx live-tokens report`.
|
|
23
|
+
"desc": "One run reads the whole project: pending migrations, component facts, findings, and usage.",
|
|
24
|
+
"lines": [14, 14],
|
|
25
|
+
"anchor": "Run `npx live-tokens report --json`. Read it in its own key "
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"id": "cc2-sections",
|
|
29
29
|
"row": 2,
|
|
30
30
|
"kind": "chipset",
|
|
31
31
|
"title": "Read the report sections",
|
|
32
|
-
"desc": "
|
|
33
|
-
"lines": [
|
|
34
|
-
"anchor": "
|
|
32
|
+
"desc": "The report's own key order, from project facts to usage.",
|
|
33
|
+
"lines": [37, 46],
|
|
34
|
+
"anchor": "## Report sections",
|
|
35
|
+
"anchorEnd": "| Project components unused (`usage.customUnused`) | The pro",
|
|
35
36
|
"chips": [
|
|
36
37
|
{
|
|
37
38
|
"label": "Pending token migrations",
|
|
38
|
-
"lines": [
|
|
39
|
+
"lines": [41, 41],
|
|
39
40
|
"anchor": "| Pending token migrations (`migrations`) | Whether `tokens."
|
|
40
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"label": "Component facts",
|
|
44
|
+
"lines": [42, 42],
|
|
45
|
+
"anchor": "| Component facts (`components[]`) | Every component the pro"
|
|
46
|
+
},
|
|
41
47
|
{
|
|
42
48
|
"label": "Checker findings by rule",
|
|
43
|
-
"lines": [
|
|
49
|
+
"lines": [43, 43],
|
|
44
50
|
"anchor": "| Checker findings by rule (`findings.pages`, `findings.comp"
|
|
45
51
|
},
|
|
46
52
|
{
|
|
47
|
-
"label": "
|
|
48
|
-
"lines": [
|
|
49
|
-
"anchor": "|
|
|
53
|
+
"label": "Components each page renders",
|
|
54
|
+
"lines": [44, 44],
|
|
55
|
+
"anchor": "| Components each page renders (`usage.byPage`) | Which comp"
|
|
50
56
|
},
|
|
51
57
|
{
|
|
52
|
-
"label": "
|
|
53
|
-
"lines": [
|
|
54
|
-
"anchor": "|
|
|
58
|
+
"label": "Shipped components no page renders",
|
|
59
|
+
"lines": [45, 45],
|
|
60
|
+
"anchor": "| Shipped components no page renders (`usage.unusedShipped`)"
|
|
55
61
|
},
|
|
56
62
|
{
|
|
57
|
-
"label": "
|
|
58
|
-
"lines": [
|
|
59
|
-
"anchor": "|
|
|
63
|
+
"label": "Project components unused",
|
|
64
|
+
"lines": [46, 46],
|
|
65
|
+
"anchor": "| Project components unused (`usage.customUnused`) | The pro"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "cc2-migrate",
|
|
71
|
+
"row": 3,
|
|
72
|
+
"kind": "cli",
|
|
73
|
+
"title": "Run the token migrations",
|
|
74
|
+
"desc": "Bring tokens.css up to the installed package and heal the data tree. A stale file shows as unknown tokens.",
|
|
75
|
+
"lines": [15, 15],
|
|
76
|
+
"anchor": "Run `npx live-tokens migrate --check` to see the plan, then "
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "cc2-check",
|
|
80
|
+
"row": 4,
|
|
81
|
+
"kind": "cli",
|
|
82
|
+
"title": "Run both checkers",
|
|
83
|
+
"desc": "Each applies every auto repair, checks again, and returns the fixes beside the findings that remain.",
|
|
84
|
+
"lines": [16, 20],
|
|
85
|
+
"anchor": "Run both checkers with `--json`. Each first applies every fi",
|
|
86
|
+
"anchorEnd": "```"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "cc2-read",
|
|
90
|
+
"row": 5,
|
|
91
|
+
"kind": "chipset",
|
|
92
|
+
"title": "Read what remains",
|
|
93
|
+
"desc": "Every finding left carries its guidance and a repair of choice or authored.",
|
|
94
|
+
"lines": [21, 21],
|
|
95
|
+
"anchor": "Read what remains. Each finding carries the fields under Fin",
|
|
96
|
+
"chips": [
|
|
97
|
+
{
|
|
98
|
+
"label": "guidance",
|
|
99
|
+
"lines": [55, 55],
|
|
100
|
+
"anchor": "| `guidance` | How to make the repair: the token for the rol"
|
|
60
101
|
},
|
|
61
102
|
{
|
|
62
|
-
"label": "
|
|
63
|
-
"lines": [
|
|
64
|
-
"anchor": "|
|
|
103
|
+
"label": "repair",
|
|
104
|
+
"lines": [56, 56],
|
|
105
|
+
"anchor": "| `repair` | `auto`, `choice`, or `authored`. See Repair lev"
|
|
65
106
|
},
|
|
66
107
|
{
|
|
67
|
-
"label": "
|
|
68
|
-
"lines": [
|
|
69
|
-
"anchor": "|
|
|
108
|
+
"label": "exception",
|
|
109
|
+
"lines": [57, 57],
|
|
110
|
+
"anchor": "| `exception` | The narrower config entry that records a dec"
|
|
70
111
|
},
|
|
71
112
|
{
|
|
72
|
-
"label": "
|
|
73
|
-
"lines": [
|
|
74
|
-
"anchor": "|
|
|
113
|
+
"label": "details",
|
|
114
|
+
"lines": [58, 58],
|
|
115
|
+
"anchor": "| `details` | Per-rule data the message already states in pr"
|
|
75
116
|
}
|
|
76
117
|
]
|
|
77
118
|
},
|
|
78
119
|
{
|
|
79
|
-
"id": "cc2-
|
|
80
|
-
"row":
|
|
81
|
-
"kind": "
|
|
82
|
-
"title": "
|
|
83
|
-
"desc": "
|
|
84
|
-
"lines": [
|
|
85
|
-
"anchor": "
|
|
120
|
+
"id": "cc2-group",
|
|
121
|
+
"row": 6,
|
|
122
|
+
"kind": "step",
|
|
123
|
+
"title": "Group findings by rule",
|
|
124
|
+
"desc": "Errors first, largest group first. Warnings only when the repair scope includes them.",
|
|
125
|
+
"lines": [22, 22],
|
|
126
|
+
"anchor": "Group the findings by rule. Take the largest error group fir"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"id": "cc2-repair",
|
|
130
|
+
"row": 7,
|
|
131
|
+
"kind": "chipset",
|
|
132
|
+
"title": "Repair from guidance",
|
|
133
|
+
"desc": "Every repair follows its finding's guidance, within the scope rules.",
|
|
134
|
+
"lines": [23, 23],
|
|
135
|
+
"anchor": "Make every repair in the group from its `guidance`, within S",
|
|
86
136
|
"chips": [
|
|
87
137
|
{
|
|
88
|
-
"label": "
|
|
89
|
-
"lines": [
|
|
90
|
-
"anchor": "
|
|
138
|
+
"label": "choice",
|
|
139
|
+
"lines": [65, 65],
|
|
140
|
+
"anchor": "**`choice`.** A role or an ambiguous value determines the fi"
|
|
91
141
|
},
|
|
92
142
|
{
|
|
93
|
-
"label": "
|
|
94
|
-
"lines": [
|
|
95
|
-
"anchor": "
|
|
143
|
+
"label": "authored",
|
|
144
|
+
"lines": [66, 66],
|
|
145
|
+
"anchor": "**`authored`.** New code is the fix: a runtime that has to s"
|
|
96
146
|
},
|
|
97
147
|
{
|
|
98
|
-
"label": "
|
|
99
|
-
"lines": [
|
|
100
|
-
"anchor": "
|
|
148
|
+
"label": "No new tokens",
|
|
149
|
+
"lines": [70, 70],
|
|
150
|
+
"anchor": "Add no token to `tokens.css`. Map a literal with no matching"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"label": "Name the shift",
|
|
154
|
+
"lines": [71, 71],
|
|
155
|
+
"anchor": "When the nearest token differs from the literal, use the tok"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"label": "Deliberate exceptions",
|
|
159
|
+
"lines": [72, 72],
|
|
160
|
+
"anchor": "Any finding, at any repair level, can stay as a deliberate e"
|
|
101
161
|
}
|
|
102
162
|
]
|
|
103
163
|
},
|
|
104
164
|
{
|
|
105
|
-
"id": "cc2-
|
|
106
|
-
"row":
|
|
165
|
+
"id": "cc2-rerun",
|
|
166
|
+
"row": 8,
|
|
107
167
|
"kind": "cli",
|
|
108
|
-
"title": "
|
|
109
|
-
"desc": "
|
|
168
|
+
"title": "Rerun both checkers",
|
|
169
|
+
"desc": "Run both checkers again to see what remains.",
|
|
110
170
|
"lines": [24, 24],
|
|
111
|
-
"anchor": "
|
|
171
|
+
"anchor": "Run both checkers again. When repairable findings remain in "
|
|
112
172
|
},
|
|
113
173
|
{
|
|
114
|
-
"id": "cc2-
|
|
115
|
-
"row":
|
|
116
|
-
"kind": "
|
|
117
|
-
"title": "
|
|
118
|
-
"desc": "
|
|
174
|
+
"id": "cc2-repeat",
|
|
175
|
+
"row": 9,
|
|
176
|
+
"kind": "gate",
|
|
177
|
+
"title": "Regroup the remaining findings",
|
|
178
|
+
"desc": "Findings a token can fix go back through grouping.",
|
|
119
179
|
"lines": [24, 24],
|
|
120
|
-
"anchor": "
|
|
180
|
+
"anchor": "Run both checkers again. When repairable findings remain in "
|
|
121
181
|
},
|
|
122
182
|
{
|
|
123
|
-
"id": "cc2-
|
|
124
|
-
"row":
|
|
183
|
+
"id": "cc2-unresolved",
|
|
184
|
+
"row": 9,
|
|
185
|
+
"kind": "step",
|
|
186
|
+
"title": "Record the unresolved findings",
|
|
187
|
+
"desc": "A finding no token fits stays, and the reply says why.",
|
|
188
|
+
"lines": [70, 70],
|
|
189
|
+
"anchor": "Add no token to `tokens.css`. Map a literal with no matching"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "cc2-strict",
|
|
193
|
+
"row": 10,
|
|
194
|
+
"kind": "cli",
|
|
195
|
+
"title": "Run strict checks",
|
|
196
|
+
"desc": "Strict mode counts every warning as an error.",
|
|
197
|
+
"lines": [25, 25],
|
|
198
|
+
"anchor": "When the errors are clear, run both checkers with `--strict`"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "cc2-warnings",
|
|
202
|
+
"row": 11,
|
|
203
|
+
"kind": "decide",
|
|
204
|
+
"title": "Warning scope",
|
|
205
|
+
"desc": "Warnings are cleared when the request includes them. Otherwise the user chooses.",
|
|
206
|
+
"lines": [25, 26],
|
|
207
|
+
"anchor": "When the errors are clear, run both checkers with `--strict`",
|
|
208
|
+
"anchorEnd": "When the repair scope includes warnings, return to step 5 wi"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "cc2-warning-loop",
|
|
212
|
+
"row": 12,
|
|
213
|
+
"kind": "gate",
|
|
214
|
+
"title": "Include warnings in the repair scope",
|
|
215
|
+
"desc": "The warnings go back through grouping, with --strict on every run.",
|
|
216
|
+
"lines": [26, 26],
|
|
217
|
+
"anchor": "When the repair scope includes warnings, return to step 5 wi"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "cc2-build",
|
|
221
|
+
"row": 13,
|
|
222
|
+
"kind": "step",
|
|
223
|
+
"title": "Gate the existing build",
|
|
224
|
+
"desc": "check:design runs both checkers with --no-fix, and the build runs it first once both exit 0.",
|
|
225
|
+
"lines": [76, 76],
|
|
226
|
+
"anchor": "When `package.json` has no `check:design` script, add `\"chec"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"id": "cc2-reply",
|
|
230
|
+
"row": 14,
|
|
125
231
|
"kind": "chipset",
|
|
126
|
-
"title": "
|
|
127
|
-
"desc": "
|
|
128
|
-
"lines": [
|
|
129
|
-
"anchor": "
|
|
232
|
+
"title": "Reply with the results",
|
|
233
|
+
"desc": "The report's picture, the fixes the checkers applied, the remaining changes by rule, the findings left with their reasons, and both exit codes.",
|
|
234
|
+
"lines": [28, 33],
|
|
235
|
+
"anchor": "Reply with:",
|
|
236
|
+
"anchorEnd": "both checker commands with their exit codes"
|
|
130
237
|
},
|
|
131
238
|
{
|
|
132
|
-
"id": "cc2-
|
|
133
|
-
"row":
|
|
134
|
-
"kind": "
|
|
135
|
-
"title": "
|
|
136
|
-
"desc": "
|
|
137
|
-
"lines": [
|
|
138
|
-
"anchor": "Reply with
|
|
139
|
-
"anchorEnd": "
|
|
239
|
+
"id": "cc2-done",
|
|
240
|
+
"row": 15,
|
|
241
|
+
"kind": "done",
|
|
242
|
+
"title": "Results complete",
|
|
243
|
+
"desc": "Both checkers pass, or every finding left has a reason.",
|
|
244
|
+
"lines": [28, 33],
|
|
245
|
+
"anchor": "Reply with:",
|
|
246
|
+
"anchorEnd": "both checker commands with their exit codes"
|
|
140
247
|
}
|
|
141
248
|
],
|
|
142
249
|
"edges": [
|
|
143
250
|
{
|
|
144
|
-
"
|
|
145
|
-
"
|
|
251
|
+
"from": "cc2-trig",
|
|
252
|
+
"to": "cc2-run"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"from": "cc2-run",
|
|
256
|
+
"to": "cc2-sections"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"from": "cc2-sections",
|
|
260
|
+
"to": "cc2-migrate"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"from": "cc2-migrate",
|
|
264
|
+
"to": "cc2-check"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"from": "cc2-check",
|
|
268
|
+
"to": "cc2-read",
|
|
269
|
+
"label": "findings"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"from": "cc2-check",
|
|
273
|
+
"to": "cc2-strict",
|
|
274
|
+
"label": "exit 0"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"from": "cc2-read",
|
|
278
|
+
"to": "cc2-group"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"from": "cc2-group",
|
|
282
|
+
"to": "cc2-repair"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"from": "cc2-repair",
|
|
286
|
+
"to": "cc2-rerun"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"from": "cc2-rerun",
|
|
290
|
+
"to": "cc2-repeat",
|
|
291
|
+
"label": "repairable findings"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"from": "cc2-repeat",
|
|
295
|
+
"to": "cc2-group",
|
|
296
|
+
"label": "return to step 5",
|
|
297
|
+
"back": true
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"from": "cc2-rerun",
|
|
301
|
+
"to": "cc2-unresolved",
|
|
302
|
+
"label": "no token fits"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"from": "cc2-unresolved",
|
|
306
|
+
"to": "cc2-reply"
|
|
146
307
|
},
|
|
147
308
|
{
|
|
148
|
-
"
|
|
149
|
-
"
|
|
309
|
+
"from": "cc2-rerun",
|
|
310
|
+
"to": "cc2-strict",
|
|
311
|
+
"label": "errors clear"
|
|
150
312
|
},
|
|
151
313
|
{
|
|
152
|
-
"
|
|
153
|
-
"
|
|
314
|
+
"from": "cc2-strict",
|
|
315
|
+
"to": "cc2-warnings",
|
|
316
|
+
"label": "warnings"
|
|
154
317
|
},
|
|
155
318
|
{
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"label": "
|
|
319
|
+
"from": "cc2-strict",
|
|
320
|
+
"to": "cc2-build",
|
|
321
|
+
"label": "strict checks pass"
|
|
159
322
|
},
|
|
160
323
|
{
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"label": "
|
|
324
|
+
"from": "cc2-warnings",
|
|
325
|
+
"to": "cc2-warning-loop",
|
|
326
|
+
"label": "repair scope includes warnings"
|
|
164
327
|
},
|
|
165
328
|
{
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"label": "
|
|
329
|
+
"from": "cc2-warnings",
|
|
330
|
+
"to": "cc2-build",
|
|
331
|
+
"label": "user defers warnings"
|
|
169
332
|
},
|
|
170
333
|
{
|
|
171
|
-
"
|
|
172
|
-
"
|
|
334
|
+
"from": "cc2-warning-loop",
|
|
335
|
+
"to": "cc2-group",
|
|
336
|
+
"label": "use --strict",
|
|
337
|
+
"back": true
|
|
173
338
|
},
|
|
174
339
|
{
|
|
175
|
-
"
|
|
176
|
-
"
|
|
340
|
+
"from": "cc2-build",
|
|
341
|
+
"to": "cc2-reply"
|
|
177
342
|
},
|
|
178
343
|
{
|
|
179
|
-
"
|
|
180
|
-
"
|
|
344
|
+
"from": "cc2-reply",
|
|
345
|
+
"to": "cc2-done"
|
|
181
346
|
}
|
|
182
347
|
]
|
|
183
348
|
};
|