@motion-proto/live-tokens 0.74.0 → 0.76.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 +33 -38
- package/.claude/skills/live-tokens-create-component/SKILL copy.md +196 -0
- package/.claude/skills/live-tokens-create-component/SKILL.md +198 -146
- package/.claude/skills/live-tokens-create-component/references/contract-tests.md +95 -52
- package/.claude/skills/live-tokens-create-component/references/intrinsics.md +2 -2
- package/.claude/skills/live-tokens-create-component/references/linked-siblings.md +2 -2
- package/.claude/skills/live-tokens-create-component/references/sketch-mode.md +12 -12
- package/.claude/skills/live-tokens-create-component/references/token-naming.md +2 -1
- package/.claude/skills/live-tokens-create-page/SKILL.md +187 -0
- package/.claude/skills/live-tokens-create-page/references/interaction-sources.md +66 -0
- package/.claude/skills/live-tokens-create-page/references/layout-sources.md +87 -0
- package/.claude/skills/live-tokens-create-theme/SKILL.md +52 -48
- package/.claude/skills/live-tokens-create-theme/references/design-directions.md +1 -1
- package/.claude/skills/live-tokens-fix-findings/SKILL.md +69 -60
- package/.claude/skills/live-tokens-pick-component/SKILL.md +64 -79
- package/.claude/skills/live-tokens-set-colors/SKILL.md +47 -38
- package/.claude/skills/live-tokens-set-geometry/SKILL.md +58 -35
- package/.claude/skills/live-tokens-set-geometry/references/geometry-anchors.md +5 -3
- package/.claude/skills/live-tokens-set-type/SKILL.md +30 -30
- package/CHANGELOG.md +138 -0
- package/README.md +17 -7
- package/bin/check-component.mjs +91 -19
- package/bin/check-page.mjs +102 -21
- package/bin/cli.mjs +87 -113
- package/bin/contractRunner.mjs +945 -0
- package/bin/create.mjs +1 -1
- package/bin/lib/catalogue.mjs +37 -30
- package/bin/lib/findings.mjs +46 -15
- package/bin/lib/report.mjs +3 -3
- package/bin/lib/tokenVocabulary.mjs +4 -4
- package/bin/migrate-routes.mjs +5 -5
- package/bin/migrate.mjs +4 -4
- package/bin/save-theme.mjs +8 -9
- package/bin/set-colors.mjs +9 -11
- package/bin/set-geometry.mjs +7 -7
- package/bin/set-type.mjs +5 -7
- package/bin/setup-claude.mjs +110 -0
- package/dist-plugin/{chunk-W6Y4BWFB.js → chunk-6WGFOJXO.js} +22 -0
- package/dist-plugin/{chunk-7VRTBGJT.js → chunk-PDNL4NC5.js} +9 -2
- package/dist-plugin/{chunk-V3YF6CGT.js → chunk-SWXRVZKT.js} +43 -1
- package/dist-plugin/{dataPaths-BhWzd5cL.d.cts → dataPaths-BpIK_Obx.d.cts} +1 -0
- package/dist-plugin/{dataPaths-BhWzd5cL.d.ts → dataPaths-BpIK_Obx.d.ts} +1 -0
- package/dist-plugin/index.cjs +310 -147
- package/dist-plugin/index.d.cts +1 -1
- package/dist-plugin/index.d.ts +1 -1
- package/dist-plugin/index.js +218 -122
- package/dist-plugin/migrateData/index.cjs +66 -2
- package/dist-plugin/migrateData/index.d.cts +1 -1
- package/dist-plugin/migrateData/index.d.ts +1 -1
- package/dist-plugin/migrateData/index.js +3 -3
- package/dist-plugin/setColors/index.cjs +61 -4
- package/dist-plugin/setColors/index.d.cts +1 -1
- package/dist-plugin/setColors/index.d.ts +1 -1
- package/dist-plugin/setColors/index.js +5 -5
- package/dist-plugin/setGeometry/index.cjs +107 -44
- package/dist-plugin/setGeometry/index.d.cts +5 -5
- package/dist-plugin/setGeometry/index.d.ts +5 -5
- package/dist-plugin/setGeometry/index.js +51 -45
- package/dist-plugin/setType/index.cjs +15 -0
- package/dist-plugin/setType/index.d.cts +1 -1
- package/dist-plugin/setType/index.d.ts +1 -1
- package/dist-plugin/setType/index.js +1 -1
- package/dist-plugin/tokensCssMigrations/index.d.cts +1 -1
- package/dist-plugin/tokensCssMigrations/index.d.ts +1 -1
- package/dist-plugin/tokensCssMigrations/index.js +1 -1
- package/package.json +35 -8
- package/src/app/site.css +19 -9
- package/src/editor/bootstrap.ts +2 -0
- package/src/editor/component-editor/CollapsibleSectionEditor.svelte +4 -4
- package/src/editor/component-editor/DialogEditor.svelte +4 -4
- package/src/editor/component-editor/MenuSelectEditor.svelte +4 -1
- package/src/editor/component-editor/SegmentedControlEditor.svelte +6 -1
- package/src/editor/component-editor/TabBarEditor.svelte +1 -1
- package/src/editor/component-editor/TableEditor.svelte +2 -2
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +6 -3
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +41 -20
- package/src/editor/core/components/adjustAliases.ts +59 -45
- package/src/editor/core/components/aliasKinds.ts +9 -5
- package/src/editor/core/preview/themePreview.ts +9 -2
- package/src/editor/core/sketch/sketchLayer.ts +22 -0
- package/src/editor/core/store/editorStore.ts +10 -1
- package/src/editor/core/themes/buildColors.ts +3 -3
- package/src/editor/core/themes/liveStateStream.ts +26 -0
- package/src/editor/core/themes/migrations/2026-09-07-stroke-role-renames.ts +52 -0
- package/src/editor/core/themes/migrations/index.ts +2 -0
- package/src/editor/core/themes/themeDocumentSync.ts +22 -11
- package/src/editor/core/themes/themeService.ts +9 -2
- package/src/editor/pages/ComponentEditorPage.svelte +17 -1
- package/src/editor/pages/liveTokensEditorHandle.ts +23 -0
- package/src/editor/skill-atlas/SkillAtlas.svelte +75 -573
- package/src/editor/skill-atlas/TreeCanvas.svelte +263 -0
- package/src/editor/skill-atlas/TreeNodeCard.svelte +136 -53
- package/src/editor/skill-atlas/edges.ts +31 -0
- package/src/editor/skill-atlas/skillSources.generated.ts +20 -19
- package/src/editor/skill-atlas/skillTrees.ts +19 -3840
- package/src/editor/skill-atlas/trees/check-compliance.ts +183 -0
- package/src/editor/skill-atlas/trees/create-component.ts +275 -0
- package/src/editor/skill-atlas/trees/create-page.ts +320 -0
- package/src/editor/skill-atlas/trees/create-theme.ts +255 -0
- package/src/editor/skill-atlas/trees/fix-findings.ts +469 -0
- package/src/editor/skill-atlas/trees/pick-component.ts +300 -0
- package/src/editor/skill-atlas/trees/set-colors.ts +148 -0
- package/src/editor/skill-atlas/trees/set-geometry.ts +136 -0
- package/src/editor/skill-atlas/trees/set-type.ts +142 -0
- package/src/editor/skill-atlas/types.ts +3 -4
- package/src/editor/skill-atlas/wireLayout.ts +287 -0
- package/src/live-tokens/data/themes/autumn.json +15 -15
- package/src/live-tokens/data/themes/halloween.json +15 -15
- package/src/live-tokens/data/themes/midnight-study.json +15 -15
- package/src/live-tokens/data/themes/ocean.json +15 -15
- package/src/live-tokens/data/themes/royal-velvet.json +15 -15
- package/src/live-tokens/data/themes/sketchy.json +15 -15
- package/src/live-tokens/data/themes/spring-meadow.json +15 -15
- package/src/live-tokens/data/themes/sunset.json +15 -15
- package/src/system/components/Badge.svelte +7 -0
- package/src/system/components/Button.svelte +7 -0
- package/src/system/components/Callout.svelte +10 -6
- package/src/system/components/Card.svelte +23 -4
- package/src/system/components/CodeSnippet.svelte +4 -3
- package/src/system/components/CollapsibleSection.svelte +23 -8
- package/src/system/components/CornerBadge.svelte +6 -0
- package/src/system/components/Dialog.svelte +13 -6
- package/src/system/components/IconButton.svelte +9 -0
- package/src/system/components/Image.svelte +8 -0
- package/src/system/components/ImageLightbox.svelte +6 -0
- package/src/system/components/InlineEditActions.svelte +7 -0
- package/src/system/components/Input.svelte +7 -0
- package/src/system/components/MenuSelect.svelte +7 -0
- package/src/system/components/Notification.svelte +7 -0
- package/src/system/components/Panel.svelte +6 -0
- package/src/system/components/ProgressBar.svelte +5 -0
- package/src/system/components/RadioButton.svelte +11 -5
- package/src/system/components/SectionDivider.svelte +8 -0
- package/src/system/components/SegmentedControl.svelte +6 -0
- package/src/system/components/SideNavigation.svelte +6 -0
- package/src/system/components/Slider.svelte +7 -4
- package/src/system/components/TabBar.svelte +15 -9
- package/src/system/components/Table.svelte +8 -3
- package/src/system/components/Toggle.svelte +4 -4
- package/src/system/components/Tooltip.svelte +6 -0
- package/src/testing-js/chunk-AO7EZHYV.js +776 -0
- package/src/testing-js/chunk-AO7EZHYV.js.map +1 -0
- package/src/testing-js/chunk-FAFOAWYL.js +39 -0
- package/src/testing-js/chunk-FAFOAWYL.js.map +1 -0
- package/src/testing-js/chunk-L73N4NSO.js +23 -0
- package/src/testing-js/chunk-L73N4NSO.js.map +1 -0
- package/src/testing-js/chunk-LXR3MN6N.js +3063 -0
- package/src/testing-js/chunk-LXR3MN6N.js.map +1 -0
- package/src/testing-js/chunk-ZMSX6CXR.js +53 -0
- package/src/testing-js/chunk-ZMSX6CXR.js.map +1 -0
- package/src/testing-js/component-alias.contract.js +81 -0
- package/src/testing-js/component-alias.contract.js.map +1 -0
- package/src/testing-js/component-editor.contract.js +62 -0
- package/src/testing-js/component-editor.contract.js.map +1 -0
- package/src/testing-js/component-render.contract.js +568 -0
- package/src/testing-js/component-render.contract.js.map +1 -0
- package/src/testing-js/index.d.ts +293 -0
- package/src/testing-js/index.js +222 -0
- package/src/testing-js/index.js.map +1 -0
- package/src/testing-js/registry.contract.js +39 -0
- package/src/testing-js/registry.contract.js.map +1 -0
- package/src/testing-js/vitest-BE6uGF31.d.ts +73 -0
- package/src/testing-js/vitest.d.ts +3 -0
- package/src/testing-js/vitest.js +13 -0
- package/src/testing-js/vitest.js.map +1 -0
- package/template/README.md +13 -0
- package/template/_gitignore +6 -0
- package/template/package.json +3 -1
- package/template/src/pages/Home.svelte +4 -18
- package/.claude/skills/live-tokens-build-page/SKILL.md +0 -103
- package/.claude/skills/live-tokens-build-page/references/layout-sources.md +0 -48
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import type { SkillTree } from '../types';
|
|
2
|
+
|
|
3
|
+
export const pickComponent: SkillTree = {
|
|
4
|
+
"id": "live-tokens-pick-component",
|
|
5
|
+
"digest": "sha256:5e4ca458665c95fd",
|
|
6
|
+
"title": "pick-component",
|
|
7
|
+
"tagline": "Select a component from the catalogue",
|
|
8
|
+
"nodes": [
|
|
9
|
+
{
|
|
10
|
+
"id": "pk-trig",
|
|
11
|
+
"row": 0,
|
|
12
|
+
"kind": "trigger",
|
|
13
|
+
"title": "Check the catalogue",
|
|
14
|
+
"desc": "Recommends the shipped component that fits a UX need. The catalogue lists every registered component, shipped and custom, with its usage.",
|
|
15
|
+
"lines": [3, 3],
|
|
16
|
+
"anchor": "description: Recommend which shipped @motion-proto/live-toke"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "pk-fam",
|
|
20
|
+
"row": 1,
|
|
21
|
+
"kind": "decide",
|
|
22
|
+
"title": "Component purpose",
|
|
23
|
+
"desc": "Each family names its candidates and helps select one.",
|
|
24
|
+
"lines": [8, 8],
|
|
25
|
+
"anchor": "When more than one shipped component could fit, find the fam",
|
|
26
|
+
"chips": [
|
|
27
|
+
{
|
|
28
|
+
"label": "Action family",
|
|
29
|
+
"lines": [14, 14],
|
|
30
|
+
"anchor": "## Action family"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "Single-selection family",
|
|
34
|
+
"lines": [20, 20],
|
|
35
|
+
"anchor": "## Single-selection family"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"label": "Text entry",
|
|
39
|
+
"lines": [34, 34],
|
|
40
|
+
"anchor": "## Text entry"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"label": "On and off",
|
|
44
|
+
"lines": [43, 43],
|
|
45
|
+
"anchor": "## On and off"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "Container family",
|
|
49
|
+
"lines": [55, 55],
|
|
50
|
+
"anchor": "## Container family"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"label": "Messaging family",
|
|
54
|
+
"lines": [68, 68],
|
|
55
|
+
"anchor": "## Messaging family"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"label": "Display family",
|
|
59
|
+
"lines": [82, 82],
|
|
60
|
+
"anchor": "## Display family"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "pk-act",
|
|
66
|
+
"row": 2,
|
|
67
|
+
"kind": "chipset",
|
|
68
|
+
"title": "Action family",
|
|
69
|
+
"desc": "Does the action need a word, a glyph, or a confirm and cancel pair.",
|
|
70
|
+
"lines": [14, 18],
|
|
71
|
+
"anchor": "## Action family",
|
|
72
|
+
"anchorEnd": "The pair that confirms or cancels an inline edit: `InlineEdi"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "pk-sel",
|
|
76
|
+
"row": 2,
|
|
77
|
+
"kind": "chipset",
|
|
78
|
+
"title": "Single-selection family",
|
|
79
|
+
"desc": "How many options there are and what does the selection change.",
|
|
80
|
+
"lines": [20, 32],
|
|
81
|
+
"anchor": "## Single-selection family",
|
|
82
|
+
"anchorEnd": "The URL changes: `SideNavigation`. Sections inside one page:"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "pk-text",
|
|
86
|
+
"row": 2,
|
|
87
|
+
"kind": "chipset",
|
|
88
|
+
"title": "Text entry",
|
|
89
|
+
"desc": "If the options are known, use a list or select. Anything else is an input field.",
|
|
90
|
+
"lines": [34, 41],
|
|
91
|
+
"anchor": "## Text entry",
|
|
92
|
+
"anchorEnd": "A number where the position on a track carries the meaning ("
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "pk-bin",
|
|
96
|
+
"row": 2,
|
|
97
|
+
"kind": "chipset",
|
|
98
|
+
"title": "On and off",
|
|
99
|
+
"desc": "If two states have names of their own use segmented control or radio buttons.",
|
|
100
|
+
"lines": [43, 53],
|
|
101
|
+
"anchor": "## On and off",
|
|
102
|
+
"anchorEnd": "When the two states share the feature's one name, use `Toggl"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "pk-con",
|
|
106
|
+
"row": 2,
|
|
107
|
+
"kind": "chipset",
|
|
108
|
+
"title": "Container family",
|
|
109
|
+
"desc": "Is the block: an item, a section, collapsed content, or a decision.",
|
|
110
|
+
"lines": [55, 66],
|
|
111
|
+
"anchor": "## Container family",
|
|
112
|
+
"anchorEnd": "A set of items is one `Card` per item. A routine form goes i"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "pk-msg",
|
|
116
|
+
"row": 2,
|
|
117
|
+
"kind": "chipset",
|
|
118
|
+
"title": "Messaging family",
|
|
119
|
+
"desc": "What is the message about? What triggers it? Is it dismissable?",
|
|
120
|
+
"lines": [68, 80],
|
|
121
|
+
"anchor": "## Messaging family",
|
|
122
|
+
"anchorEnd": "`Badge` and `CornerBadge` differ in position only."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "pk-disp",
|
|
126
|
+
"row": 2,
|
|
127
|
+
"kind": "chipset",
|
|
128
|
+
"title": "Display family",
|
|
129
|
+
"desc": "Does the user view it, or interact with it?",
|
|
130
|
+
"lines": [82, 90],
|
|
131
|
+
"anchor": "## Display family",
|
|
132
|
+
"anchorEnd": "A titled break between the sections of one page: `SectionDiv"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "pk-fits",
|
|
136
|
+
"row": 3,
|
|
137
|
+
"kind": "decide",
|
|
138
|
+
"title": "Is there a match in the catalogue",
|
|
139
|
+
"desc": "Use a component from the catalogue if one fits, otherwise build a new one.",
|
|
140
|
+
"lines": [92, 96],
|
|
141
|
+
"anchor": "## Nothing fits",
|
|
142
|
+
"anchorEnd": "`npx live-tokens components <id>` prints one component's usa",
|
|
143
|
+
"chips": [
|
|
144
|
+
{
|
|
145
|
+
"label": "shipped component",
|
|
146
|
+
"lines": [12, 12],
|
|
147
|
+
"anchor": "Before choosing, run `npx live-tokens components`. The list "
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"label": "custom component",
|
|
151
|
+
"lines": [12, 12],
|
|
152
|
+
"anchor": "Before choosing, run `npx live-tokens components`. The list "
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"label": "native element",
|
|
156
|
+
"lines": [94, 94],
|
|
157
|
+
"anchor": "A native element with no chrome of its own needs no componen"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"label": "nothing in the catalogue fits",
|
|
161
|
+
"lines": [94, 94],
|
|
162
|
+
"anchor": "A native element with no chrome of its own needs no componen"
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "pk-inspect",
|
|
168
|
+
"row": 4,
|
|
169
|
+
"kind": "cli",
|
|
170
|
+
"title": "Check the component",
|
|
171
|
+
"desc": "See the component's props and usage before placing it.",
|
|
172
|
+
"lines": [96, 96],
|
|
173
|
+
"anchor": "`npx live-tokens components <id>` prints one component's usa"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"id": "pk-native",
|
|
177
|
+
"row": 4,
|
|
178
|
+
"kind": "step",
|
|
179
|
+
"title": "Use a native element",
|
|
180
|
+
"desc": "An element with no chrome of its own needs no component.",
|
|
181
|
+
"lines": [94, 94],
|
|
182
|
+
"anchor": "A native element with no chrome of its own needs no componen"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "pk-make",
|
|
186
|
+
"row": 4,
|
|
187
|
+
"kind": "hand",
|
|
188
|
+
"title": "Create a component",
|
|
189
|
+
"desc": "A piece with chrome that nothing in the catalogue fits goes to live-tokens-create-component.",
|
|
190
|
+
"lines": [94, 94],
|
|
191
|
+
"anchor": "A native element with no chrome of its own needs no componen"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "pk-page",
|
|
195
|
+
"row": 5,
|
|
196
|
+
"kind": "hand",
|
|
197
|
+
"title": "Return the selected component",
|
|
198
|
+
"desc": "The named component returns to live-tokens-create-page, which owns size, emphasis, and placement.",
|
|
199
|
+
"lines": [94, 94],
|
|
200
|
+
"anchor": "A native element with no chrome of its own needs no componen"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"edges": [
|
|
204
|
+
{
|
|
205
|
+
"to": "pk-fam",
|
|
206
|
+
"from": "pk-trig"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"to": "pk-act",
|
|
210
|
+
"from": "pk-fam",
|
|
211
|
+
"label": "Action family"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"to": "pk-sel",
|
|
215
|
+
"from": "pk-fam",
|
|
216
|
+
"label": "Single-selection family"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"to": "pk-text",
|
|
220
|
+
"from": "pk-fam",
|
|
221
|
+
"label": "Text entry"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"to": "pk-bin",
|
|
225
|
+
"from": "pk-fam",
|
|
226
|
+
"label": "On and off"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"to": "pk-con",
|
|
230
|
+
"from": "pk-fam",
|
|
231
|
+
"label": "Container family"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"to": "pk-msg",
|
|
235
|
+
"from": "pk-fam",
|
|
236
|
+
"label": "Messaging family"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"to": "pk-disp",
|
|
240
|
+
"from": "pk-fam",
|
|
241
|
+
"label": "Display family"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"to": "pk-inspect",
|
|
245
|
+
"from": "pk-fits",
|
|
246
|
+
"label": "shipped component"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"to": "pk-inspect",
|
|
250
|
+
"from": "pk-fits",
|
|
251
|
+
"label": "custom component"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"to": "pk-native",
|
|
255
|
+
"from": "pk-fits",
|
|
256
|
+
"label": "native element"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"to": "pk-make",
|
|
260
|
+
"from": "pk-fits",
|
|
261
|
+
"label": "nothing in the catalogue fits"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"to": "pk-page",
|
|
265
|
+
"from": "pk-inspect"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"to": "pk-page",
|
|
269
|
+
"from": "pk-native"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"to": "pk-fits",
|
|
273
|
+
"from": "pk-act"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"to": "pk-fits",
|
|
277
|
+
"from": "pk-sel"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"to": "pk-fits",
|
|
281
|
+
"from": "pk-text"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"to": "pk-fits",
|
|
285
|
+
"from": "pk-bin"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"to": "pk-fits",
|
|
289
|
+
"from": "pk-con"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"to": "pk-fits",
|
|
293
|
+
"from": "pk-msg"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"to": "pk-fits",
|
|
297
|
+
"from": "pk-disp"
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { SkillTree } from '../types';
|
|
2
|
+
|
|
3
|
+
export const setColors: SkillTree = {
|
|
4
|
+
"id": "live-tokens-set-colors",
|
|
5
|
+
"digest": "sha256:d83d60fcbfa2f662",
|
|
6
|
+
"title": "set-colors",
|
|
7
|
+
"tagline": "Set the Color Palettes",
|
|
8
|
+
"nodes": [
|
|
9
|
+
{
|
|
10
|
+
"id": "sc-trig",
|
|
11
|
+
"row": 0,
|
|
12
|
+
"kind": "trigger",
|
|
13
|
+
"title": "Set or refine a palette",
|
|
14
|
+
"desc": "Selects colors for a live tokens theme. Each palette is derived from an OKLCH base color, which is assigned a position based on luminance, and the rest of the family is generated around it. ",
|
|
15
|
+
"lines": [3, 3],
|
|
16
|
+
"anchor": "description: Set a live-tokens theme's color: ten OKLCH base"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "sc-anchor",
|
|
20
|
+
"row": 1,
|
|
21
|
+
"kind": "ref",
|
|
22
|
+
"title": "Look up the color anchor",
|
|
23
|
+
"desc": "The anchor keyword from create theme guides color selection.",
|
|
24
|
+
"lines": [19, 19],
|
|
25
|
+
"anchor": "Read the color intent and any anchor live-tokens-create-them",
|
|
26
|
+
"reference": "references/color-anchors.md"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "sc-input",
|
|
30
|
+
"row": 2,
|
|
31
|
+
"kind": "step",
|
|
32
|
+
"title": "Write the base colors",
|
|
33
|
+
"desc": "Ten base colors and a scheme in one file, chosen by six rules. Keep the file for refinements.",
|
|
34
|
+
"lines": [20, 20],
|
|
35
|
+
"anchor": "Translate the intent into ten base colors with the framework",
|
|
36
|
+
"chips": [
|
|
37
|
+
{
|
|
38
|
+
"label": "Chroma budget",
|
|
39
|
+
"lines": [56, 68],
|
|
40
|
+
"anchor": "## Chroma budget",
|
|
41
|
+
"anchorEnd": "A good theme reads as 3 or 4 hue families on screen, never 1"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Role ranges",
|
|
45
|
+
"lines": [70, 96],
|
|
46
|
+
"anchor": "## Per-role ranges",
|
|
47
|
+
"anchorEnd": "Blue tints cap very low at high L (H 264 at L 0.95 barely re"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"label": "Mood dials",
|
|
51
|
+
"lines": [98, 104],
|
|
52
|
+
"anchor": "## Mood dials",
|
|
53
|
+
"anchorEnd": "Avoid mid-lightness yellow-green (H 100 to 120 at L 0.5 to 0"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"label": "Gamut guardrails",
|
|
57
|
+
"lines": [106, 113],
|
|
58
|
+
"anchor": "## Gamut guardrails",
|
|
59
|
+
"anchorEnd": "Peak chroma anchors: red H20 C 0.25 at L 0.63; orange H60 C "
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"label": "Harmony",
|
|
63
|
+
"lines": [115, 121],
|
|
64
|
+
"anchor": "## Harmony",
|
|
65
|
+
"anchorEnd": "Drama or maximum contrast: complementary, triadic, or tetrad"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"label": "Canvas sky and shadows",
|
|
69
|
+
"lines": [123, 127],
|
|
70
|
+
"anchor": "## Canvas sky and shadows",
|
|
71
|
+
"anchorEnd": "Shadow opacity derives from Canvas lightness and re-derives "
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "sc-cli",
|
|
77
|
+
"row": 3,
|
|
78
|
+
"kind": "cli",
|
|
79
|
+
"title": "Set colors",
|
|
80
|
+
"desc": "The engine derives the theme's color from the ten base colors and checks every text pair for WCAG AA contrast.",
|
|
81
|
+
"lines": [21, 21],
|
|
82
|
+
"anchor": "Run `npx live-tokens set-colors scratch/<slug>-base-colors.j"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "sc-fail",
|
|
86
|
+
"row": 4,
|
|
87
|
+
"kind": "gate",
|
|
88
|
+
"title": "Correct the base colors",
|
|
89
|
+
"desc": "A text pair below WCAG AA fails the run. Exit 1 names the base color to change and how: raise its lightness or reduce its chroma.",
|
|
90
|
+
"lines": [22, 22],
|
|
91
|
+
"anchor": "Read the report. Exit 0 passes, and auto-corrected values co"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "sc-reply",
|
|
95
|
+
"row": 5,
|
|
96
|
+
"kind": "step",
|
|
97
|
+
"title": "Reply with the result",
|
|
98
|
+
"desc": "Report the anchor, the scheme, the hue families, the Canvas base color, and any auto-correction.",
|
|
99
|
+
"lines": [22, 23],
|
|
100
|
+
"anchor": "Read the report. Exit 0 passes, and auto-corrected values co",
|
|
101
|
+
"anchorEnd": "Reply with the anchor if any, the scheme, the hue families, "
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "sc-verify",
|
|
105
|
+
"row": 6,
|
|
106
|
+
"kind": "done",
|
|
107
|
+
"title": "Verify the color",
|
|
108
|
+
"desc": "The CLI passes, the app shows the new palette, and the theme reads as edited.",
|
|
109
|
+
"lines": [143, 149],
|
|
110
|
+
"anchor": "## Verify",
|
|
111
|
+
"anchorEnd": "To revert, re-run with the previous base color file, or load"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"edges": [
|
|
115
|
+
{
|
|
116
|
+
"to": "sc-anchor",
|
|
117
|
+
"from": "sc-trig"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"to": "sc-fail",
|
|
121
|
+
"from": "sc-cli",
|
|
122
|
+
"label": "exit 1"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"to": "sc-cli",
|
|
126
|
+
"from": "sc-fail",
|
|
127
|
+
"label": "rerun",
|
|
128
|
+
"back": true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"to": "sc-input",
|
|
132
|
+
"from": "sc-anchor"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"to": "sc-cli",
|
|
136
|
+
"from": "sc-input"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"to": "sc-reply",
|
|
140
|
+
"from": "sc-cli",
|
|
141
|
+
"label": "exit 0"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"to": "sc-verify",
|
|
145
|
+
"from": "sc-reply"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { SkillTree } from '../types';
|
|
2
|
+
|
|
3
|
+
export const setGeometry: SkillTree = {
|
|
4
|
+
"id": "live-tokens-set-geometry",
|
|
5
|
+
"digest": "sha256:fbe78a12bbd4791a",
|
|
6
|
+
"title": "set-geometry",
|
|
7
|
+
"tagline": "Set Spacing, Corner Radius, Line Weight",
|
|
8
|
+
"nodes": [
|
|
9
|
+
{
|
|
10
|
+
"id": "sg-trig",
|
|
11
|
+
"row": 0,
|
|
12
|
+
"kind": "trigger",
|
|
13
|
+
"title": "Set shape and spacing",
|
|
14
|
+
"desc": "Sets a theme's shape and spacing: corner radius, padding, gap, and border width, each moved along its scale per component.",
|
|
15
|
+
"lines": [3, 3],
|
|
16
|
+
"anchor": "description: Set a live-tokens theme's geometry: corner radi"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "sg-anchor",
|
|
20
|
+
"row": 1,
|
|
21
|
+
"kind": "ref",
|
|
22
|
+
"title": "Read the geometry anchor",
|
|
23
|
+
"desc": "An anchor's entry overrides the idiom table.",
|
|
24
|
+
"lines": [14, 14],
|
|
25
|
+
"anchor": "Read the geometry intent and the anchor, when live-tokens-cr",
|
|
26
|
+
"reference": "references/geometry-anchors.md"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "sg-input",
|
|
30
|
+
"row": 2,
|
|
31
|
+
"kind": "step",
|
|
32
|
+
"title": "Write the geometry",
|
|
33
|
+
"desc": "One file of changes, each global or targeted, setting a step or shifting by steps. Each idiom maps to a set of them, and every scale has a floor.",
|
|
34
|
+
"lines": [15, 15],
|
|
35
|
+
"anchor": "Write the ops file to `scratch/geometry-ops.json`.",
|
|
36
|
+
"chips": [
|
|
37
|
+
{
|
|
38
|
+
"label": "Idioms",
|
|
39
|
+
"lines": [44, 69],
|
|
40
|
+
"anchor": "## Idioms",
|
|
41
|
+
"anchorEnd": "Magnitude follows the qualifier. \"Slightly\" or \"a bit\" is 1 "
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Compact containers before controls",
|
|
45
|
+
"lines": [71, 94],
|
|
46
|
+
"anchor": "## Compact containers before controls",
|
|
47
|
+
"anchorEnd": "] }"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"label": "Scales",
|
|
51
|
+
"lines": [97, 101],
|
|
52
|
+
"anchor": "## Scales",
|
|
53
|
+
"anchorEnd": "An alias off the subset spends its first step reaching the s"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"label": "Floors",
|
|
57
|
+
"lines": [103, 109],
|
|
58
|
+
"anchor": "## Floors",
|
|
59
|
+
"anchorEnd": "The floor guards `-padding` only. A 2px gap between an icon "
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "sg-cli",
|
|
65
|
+
"row": 3,
|
|
66
|
+
"kind": "cli",
|
|
67
|
+
"title": "Run set-geometry",
|
|
68
|
+
"desc": "The command writes a buffer for every component the ops change.",
|
|
69
|
+
"lines": [16, 16],
|
|
70
|
+
"anchor": "Run `npx live-tokens set-geometry scratch/geometry-ops.json`"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "sg-fail",
|
|
74
|
+
"row": 4,
|
|
75
|
+
"kind": "gate",
|
|
76
|
+
"title": "Correct the geometry",
|
|
77
|
+
"desc": "Exit 1 names the op or the input to fix.",
|
|
78
|
+
"lines": [18, 18],
|
|
79
|
+
"anchor": "When the CLI exits 1, fix the op or the input the message na"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "sg-reply",
|
|
83
|
+
"row": 5,
|
|
84
|
+
"kind": "step",
|
|
85
|
+
"title": "Reply with the result",
|
|
86
|
+
"desc": "Report every alias that moved and any skip worth naming.",
|
|
87
|
+
"lines": [17, 19],
|
|
88
|
+
"anchor": "Read the report. It lists every changed alias, old and new, ",
|
|
89
|
+
"anchorEnd": "Reply with every alias that moved and any skip worth naming."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "sg-verify",
|
|
93
|
+
"row": 6,
|
|
94
|
+
"kind": "done",
|
|
95
|
+
"title": "Verify the geometry",
|
|
96
|
+
"desc": "The app shows the new shape and buttons still read as buttons.",
|
|
97
|
+
"lines": [115, 121],
|
|
98
|
+
"anchor": "## Verify",
|
|
99
|
+
"anchorEnd": "To revert, run the inverse ops, or load the open theme to di"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"edges": [
|
|
103
|
+
{
|
|
104
|
+
"to": "sg-anchor",
|
|
105
|
+
"from": "sg-trig"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"to": "sg-fail",
|
|
109
|
+
"from": "sg-cli",
|
|
110
|
+
"label": "exit 1"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"to": "sg-cli",
|
|
114
|
+
"from": "sg-fail",
|
|
115
|
+
"label": "rerun",
|
|
116
|
+
"back": true
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"to": "sg-input",
|
|
120
|
+
"from": "sg-anchor"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"to": "sg-cli",
|
|
124
|
+
"from": "sg-input"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"to": "sg-reply",
|
|
128
|
+
"from": "sg-cli",
|
|
129
|
+
"label": "exit 0"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"to": "sg-verify",
|
|
133
|
+
"from": "sg-reply"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
};
|