@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,320 @@
|
|
|
1
|
+
import type { SkillTree } from '../types';
|
|
2
|
+
|
|
3
|
+
export const createPage: SkillTree = {
|
|
4
|
+
"id": "live-tokens-create-page",
|
|
5
|
+
"digest": "sha256:00cc1191fecc9707",
|
|
6
|
+
"title": "create-page",
|
|
7
|
+
"tagline": "Create a Page Using Live Tokens",
|
|
8
|
+
"nodes": [
|
|
9
|
+
{
|
|
10
|
+
"id": "cp-trig",
|
|
11
|
+
"row": 0,
|
|
12
|
+
"kind": "trigger",
|
|
13
|
+
"title": "Create a page",
|
|
14
|
+
"desc": "Builds a page from the shipped components at their defaults and the theme's text styles.",
|
|
15
|
+
"lines": [3, 3],
|
|
16
|
+
"anchor": "description: Create a page in a @motion-proto/live-tokens pr"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "cp-project",
|
|
20
|
+
"row": 1,
|
|
21
|
+
"kind": "step",
|
|
22
|
+
"title": "Read the project",
|
|
23
|
+
"desc": "The existing pages and where they live, how App.svelte wires routes, the column count in tokens.css, and the catalogue.",
|
|
24
|
+
"lines": [12, 12],
|
|
25
|
+
"anchor": "Read the project first: the existing pages and where they li"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "cp-layout",
|
|
29
|
+
"row": 2,
|
|
30
|
+
"kind": "chipset",
|
|
31
|
+
"title": "Lay out the sections",
|
|
32
|
+
"desc": "Name each section by its purpose, then take its column spans from the layout that matches how the reader moves through the page.",
|
|
33
|
+
"lines": [13, 13],
|
|
34
|
+
"anchor": "Read the page top to bottom and name each section by its pur",
|
|
35
|
+
"chips": [
|
|
36
|
+
{
|
|
37
|
+
"label": "Stacked sections",
|
|
38
|
+
"lines": [31, 31],
|
|
39
|
+
"anchor": "| Stacked sections | The reader moves top to bottom: an open"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"label": "Main with a supporting pane",
|
|
43
|
+
"lines": [32, 32],
|
|
44
|
+
"anchor": "| Main with a supporting pane | One region is the work and t"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"label": "List with detail",
|
|
48
|
+
"lines": [33, 33],
|
|
49
|
+
"anchor": "| List with detail | The reader picks an item from a list an"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"label": "Grid of equals",
|
|
53
|
+
"lines": [34, 34],
|
|
54
|
+
"anchor": "| Grid of equals | The reader compares or scans items of one"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"label": "Single column",
|
|
58
|
+
"lines": [35, 35],
|
|
59
|
+
"anchor": "| Single column | The reader fills a form or reads at length"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "cp-grid",
|
|
65
|
+
"row": 3,
|
|
66
|
+
"kind": "chipset",
|
|
67
|
+
"title": "Place the sections on the grid",
|
|
68
|
+
"desc": "The page is a grid of the theme's column count. Each section spans it, then repeats its columns so children line up with the page. Separate with space first, then a hairline, then a surface.",
|
|
69
|
+
"lines": [14, 14],
|
|
70
|
+
"anchor": "Build the page grid and place each section on it. Separate t",
|
|
71
|
+
"chips": [
|
|
72
|
+
{
|
|
73
|
+
"label": "Grid",
|
|
74
|
+
"lines": [39, 50],
|
|
75
|
+
"anchor": "### Grid",
|
|
76
|
+
"anchorEnd": "A grid that follows the page columns takes `var(--columns-co"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"label": "Separation",
|
|
80
|
+
"lines": [52, 69],
|
|
81
|
+
"anchor": "### Separation",
|
|
82
|
+
"anchorEnd": "`references/layout-sources.md` names the sources for these l"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "cp-containers",
|
|
88
|
+
"row": 4,
|
|
89
|
+
"kind": "chipset",
|
|
90
|
+
"title": "Choose containers by purpose",
|
|
91
|
+
"desc": "Each purpose has its container. Panel is a stage, Card is titled content.",
|
|
92
|
+
"lines": [15, 15],
|
|
93
|
+
"anchor": "Give each section its container from the Containers by purpo",
|
|
94
|
+
"chips": [
|
|
95
|
+
{
|
|
96
|
+
"label": "Stage",
|
|
97
|
+
"lines": [73, 74],
|
|
98
|
+
"anchor": "`Panel` is a stage: a canvas, a player, a preview. `minHeigh",
|
|
99
|
+
"anchorEnd": "An empty stage shows a heading that names the condition and "
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"label": "Card",
|
|
103
|
+
"lines": [75, 76],
|
|
104
|
+
"anchor": "`Card` is a titled block of content. Its `title` prop is the",
|
|
105
|
+
"anchorEnd": "A container in a tool UI labels itself: `Card variant=\"bare\""
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"label": "Form",
|
|
109
|
+
"lines": [77, 78],
|
|
110
|
+
"anchor": "A form puts the essential fields first and the secondary fie",
|
|
111
|
+
"anchorEnd": "A row of fields is a flex row with `gap: var(--space-20)`. E"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"label": "Buttons",
|
|
115
|
+
"lines": [79, 80],
|
|
116
|
+
"anchor": "A toolbar is a flex row of Buttons on the section's bottom e",
|
|
117
|
+
"anchorEnd": "A vertical stack of Buttons sets `fullWidth` on each Button."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"label": "Picker",
|
|
121
|
+
"lines": [81, 81],
|
|
122
|
+
"anchor": "`MenuSelect` renders its list open. For a picker, toggle it "
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "cp-component",
|
|
128
|
+
"row": 5,
|
|
129
|
+
"kind": "chipset",
|
|
130
|
+
"title": "Match a component to each need",
|
|
131
|
+
"desc": "Use a shipped component when one fits, and pass only the props it declares. When two could fit, pick-component chooses. When nothing in the catalogue fits, create-component builds it. A native element with no chrome needs no component.",
|
|
132
|
+
"lines": [16, 16],
|
|
133
|
+
"anchor": "Match a shipped component to each need. When two could fit, ",
|
|
134
|
+
"chips": [
|
|
135
|
+
{
|
|
136
|
+
"label": "Components",
|
|
137
|
+
"lines": [83, 90],
|
|
138
|
+
"anchor": "## Components",
|
|
139
|
+
"anchorEnd": "Text inside a `Card` or a `CollapsibleSection` takes the con"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"label": "pick-component",
|
|
143
|
+
"lines": [16, 16],
|
|
144
|
+
"anchor": "Match a shipped component to each need. When two could fit, "
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"label": "create-component",
|
|
148
|
+
"lines": [16, 16],
|
|
149
|
+
"anchor": "Match a shipped component to each need. When two could fit, "
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "cp-hierarchy",
|
|
155
|
+
"row": 6,
|
|
156
|
+
"kind": "chipset",
|
|
157
|
+
"title": "Set the tokens and the hierarchy",
|
|
158
|
+
"desc": "Page CSS takes a token wherever one exists. One text style per element, the shipped size on every control, one primary Button per page, and one space step per position.",
|
|
159
|
+
"lines": [17, 18],
|
|
160
|
+
"anchor": "Write the page CSS in design tokens.",
|
|
161
|
+
"anchorEnd": "Set the hierarchy: one text style per element, the shipped s",
|
|
162
|
+
"chips": [
|
|
163
|
+
{
|
|
164
|
+
"label": "Tokens",
|
|
165
|
+
"lines": [92, 97],
|
|
166
|
+
"anchor": "## Tokens",
|
|
167
|
+
"anchorEnd": "A value that comes from data, such as a sheet's padding in p"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"label": "Type",
|
|
171
|
+
"lines": [101, 116],
|
|
172
|
+
"anchor": "### Type",
|
|
173
|
+
"anchorEnd": "Use the semantic element for each place: one `h1`, an `h2` f"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"label": "Size and emphasis",
|
|
177
|
+
"lines": [118, 126],
|
|
178
|
+
"anchor": "### Size",
|
|
179
|
+
"anchorEnd": "In a row of actions the primary sits last, on the right. Up "
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"label": "Spacing",
|
|
183
|
+
"lines": [128, 142],
|
|
184
|
+
"anchor": "### Spacing",
|
|
185
|
+
"anchorEnd": "Every section after the first opens with a hairline: `paddin"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "cp-route",
|
|
191
|
+
"row": 7,
|
|
192
|
+
"kind": "chipset",
|
|
193
|
+
"title": "Assign page routes",
|
|
194
|
+
"desc": "Add the route the way App.svelte already wires routes, with a lazy import and the source path. The lazy import keeps page CSS off the editor routes.",
|
|
195
|
+
"lines": [19, 19],
|
|
196
|
+
"anchor": "Add the route, with a lazy import and the source path.",
|
|
197
|
+
"chips": [
|
|
198
|
+
{
|
|
199
|
+
"label": "LiveTokensRouter",
|
|
200
|
+
"lines": [148, 148],
|
|
201
|
+
"anchor": "`<LiveTokensRouter pages={...}>`: add a `pages` entry with `"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"label": "LiveEditorOverlay",
|
|
205
|
+
"lines": [149, 149],
|
|
206
|
+
"anchor": "Manual `<LiveEditorOverlay>`: dispatch with `$derived.by(() "
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "cp-check",
|
|
212
|
+
"row": 8,
|
|
213
|
+
"kind": "step",
|
|
214
|
+
"title": "Run live-tokens-check-compliance",
|
|
215
|
+
"desc": "Its report goes to live-tokens-fix-findings until the page is clean.",
|
|
216
|
+
"lines": [20, 20],
|
|
217
|
+
"anchor": "Run **live-tokens-check-compliance**, then check the rendere"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "cp-verify",
|
|
221
|
+
"row": 9,
|
|
222
|
+
"kind": "chipset",
|
|
223
|
+
"title": "Check the page in the browser",
|
|
224
|
+
"desc": "The checkers cannot see a layout. Open the page at its width and check each line.",
|
|
225
|
+
"lines": [168, 185],
|
|
226
|
+
"anchor": "The checkers cannot see a layout. Open the page at the width",
|
|
227
|
+
"anchorEnd": "`references/interaction-sources.md` names the sources for th",
|
|
228
|
+
"chips": [
|
|
229
|
+
{
|
|
230
|
+
"label": "Structure",
|
|
231
|
+
"lines": [170, 175],
|
|
232
|
+
"anchor": "The first section holds what the user came for.",
|
|
233
|
+
"anchorEnd": "Every control stays inside its wrapper. A `width: 100%` fiel"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"label": "Actions",
|
|
237
|
+
"lines": [176, 179],
|
|
238
|
+
"anchor": "The actions sit where the eye goes last, with the one primar",
|
|
239
|
+
"anchorEnd": "An action that runs longer than a moment shows progress in a"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"label": "Fields",
|
|
243
|
+
"lines": [180, 181],
|
|
244
|
+
"anchor": "Every field has a default, and Reset restores it.",
|
|
245
|
+
"anchorEnd": "Secondary settings sit in a `CollapsibleSection`. Every cont"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"label": "Words and access",
|
|
249
|
+
"lines": [182, 183],
|
|
250
|
+
"anchor": "Labels use the user's words, such as \"Export slices\".",
|
|
251
|
+
"anchorEnd": "Every `img` has `alt` text. Focus order follows the reading "
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "cp-read",
|
|
257
|
+
"row": 10,
|
|
258
|
+
"kind": "step",
|
|
259
|
+
"title": "Read the page twice",
|
|
260
|
+
"desc": "From a distance only the sections show. Up close, every border and bar earns its place or goes.",
|
|
261
|
+
"lines": [187, 187],
|
|
262
|
+
"anchor": "Then read the page from a distance: the sections and their e"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "cp-reply",
|
|
266
|
+
"row": 11,
|
|
267
|
+
"kind": "done",
|
|
268
|
+
"title": "Reply with the result",
|
|
269
|
+
"desc": "The sections and the layout each took, the components placed, the route, and the compliance result.",
|
|
270
|
+
"lines": [21, 21],
|
|
271
|
+
"anchor": "Reply with the sections and the layout each took, the compon"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"edges": [
|
|
275
|
+
{
|
|
276
|
+
"from": "cp-trig",
|
|
277
|
+
"to": "cp-project"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"from": "cp-project",
|
|
281
|
+
"to": "cp-layout"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"from": "cp-layout",
|
|
285
|
+
"to": "cp-grid"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"from": "cp-grid",
|
|
289
|
+
"to": "cp-containers"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"from": "cp-containers",
|
|
293
|
+
"to": "cp-component"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"from": "cp-component",
|
|
297
|
+
"to": "cp-hierarchy"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"from": "cp-hierarchy",
|
|
301
|
+
"to": "cp-route"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"from": "cp-route",
|
|
305
|
+
"to": "cp-check"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"from": "cp-check",
|
|
309
|
+
"to": "cp-verify"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"from": "cp-verify",
|
|
313
|
+
"to": "cp-read"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"from": "cp-read",
|
|
317
|
+
"to": "cp-reply"
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
};
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import type { SkillTree } from '../types';
|
|
2
|
+
|
|
3
|
+
export const createTheme: SkillTree = {
|
|
4
|
+
"id": "live-tokens-create-theme",
|
|
5
|
+
"digest": "sha256:9de2cd5d34861cd6",
|
|
6
|
+
"title": "create-theme",
|
|
7
|
+
"tagline": "Create a Live Tokens Theme",
|
|
8
|
+
"nodes": [
|
|
9
|
+
{
|
|
10
|
+
"id": "ct-trig",
|
|
11
|
+
"row": 0,
|
|
12
|
+
"kind": "trigger",
|
|
13
|
+
"title": "Create or refine a theme",
|
|
14
|
+
"desc": "A theme has three dimensions: color, typography, and geometry. The skill adjusts design token values and their assignment to semantic properties to create a new theme.",
|
|
15
|
+
"lines": [3, 3],
|
|
16
|
+
"anchor": "description: Create or modify a complete live-tokens theme f"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "ct-direction",
|
|
20
|
+
"row": 1,
|
|
21
|
+
"kind": "step",
|
|
22
|
+
"title": "Generate the design direction",
|
|
23
|
+
"desc": "A short summary of the request: the mood, and the intent it sets for color, type, and geometry.",
|
|
24
|
+
"lines": [27, 27],
|
|
25
|
+
"anchor": "Read the request once and generate the design direction base"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "ct-index",
|
|
29
|
+
"row": 2,
|
|
30
|
+
"kind": "ref",
|
|
31
|
+
"title": "Name the anchor",
|
|
32
|
+
"desc": "The anchor is a keyword for the mood, idiom, or season. Each dimension has a lookup table that helps guide choices based on the anchor.",
|
|
33
|
+
"lines": [28, 28],
|
|
34
|
+
"anchor": "Read `references/design-directions.md` and name the **anchor",
|
|
35
|
+
"reference": "references/design-directions.md"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "ct-colors",
|
|
39
|
+
"row": 3,
|
|
40
|
+
"kind": "step",
|
|
41
|
+
"title": "Set colors",
|
|
42
|
+
"desc": "Turns the color intent into the theme's color.",
|
|
43
|
+
"lines": [30, 30],
|
|
44
|
+
"anchor": "Invoke **live-tokens-set-colors** with the anchor and the co"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "ct-type",
|
|
48
|
+
"row": 3,
|
|
49
|
+
"kind": "step",
|
|
50
|
+
"title": "Set type",
|
|
51
|
+
"desc": "Turns the type intent into a font pairing.",
|
|
52
|
+
"lines": [31, 31],
|
|
53
|
+
"anchor": "Invoke **live-tokens-set-type** with the anchor and the type"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "ct-geo",
|
|
57
|
+
"row": 3,
|
|
58
|
+
"kind": "step",
|
|
59
|
+
"title": "Set-Geometry",
|
|
60
|
+
"desc": "Turns the geometry intent into each component's shape and spacing.",
|
|
61
|
+
"lines": [32, 32],
|
|
62
|
+
"anchor": "Invoke **live-tokens-set-geometry** with the anchor and the "
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "ct-save",
|
|
66
|
+
"row": 4,
|
|
67
|
+
"kind": "cli",
|
|
68
|
+
"title": "Save the theme",
|
|
69
|
+
"desc": "The buffers become a saved theme, and the editor loads it.",
|
|
70
|
+
"lines": [33, 33],
|
|
71
|
+
"anchor": "Take the theme name from the design direction and run `npx l"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "ct-assemble",
|
|
75
|
+
"row": 5,
|
|
76
|
+
"kind": "step",
|
|
77
|
+
"title": "Reply with the result",
|
|
78
|
+
"desc": "Reply with the design direction, what each set skill did, any dimension omitted, and anything flagged by a skill.",
|
|
79
|
+
"lines": [34, 34],
|
|
80
|
+
"anchor": "Assemble the three set skill responses into the assembled re"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "ct-ver",
|
|
84
|
+
"row": 6,
|
|
85
|
+
"kind": "step",
|
|
86
|
+
"title": "Verify the theme",
|
|
87
|
+
"desc": "Each set skill passed, the theme is saved, and the app shows it.",
|
|
88
|
+
"lines": [78, 84],
|
|
89
|
+
"anchor": "## Verify",
|
|
90
|
+
"anchorEnd": "To return to the previous theme, load it from the Theme pane"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "ct-refine-q",
|
|
94
|
+
"row": 7,
|
|
95
|
+
"kind": "decide",
|
|
96
|
+
"title": "User feedback",
|
|
97
|
+
"desc": "The user sees the theme and may ask for a change. One adjective usually names one dimension and goes to that set skill. A change across dimensions starts again from the design direction.",
|
|
98
|
+
"lines": [53, 76],
|
|
99
|
+
"anchor": "## Refining a theme",
|
|
100
|
+
"anchorEnd": "loading it from the editor's Theme panel; loading clears the",
|
|
101
|
+
"chips": [
|
|
102
|
+
{
|
|
103
|
+
"label": "color",
|
|
104
|
+
"lines": [60, 60],
|
|
105
|
+
"anchor": "| warmer, cooler, calmer, louder, lighter, darker, moodier, "
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"label": "type",
|
|
109
|
+
"lines": [61, 61],
|
|
110
|
+
"anchor": "| more editorial, friendlier, more technical, a serif for he"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"label": "geometry",
|
|
114
|
+
"lines": [62, 62],
|
|
115
|
+
"anchor": "| rounder, sharper, pill buttons, tighter, airier, thicker b"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"label": "spans dimensions",
|
|
119
|
+
"lines": [69, 71],
|
|
120
|
+
"anchor": "Keep this skill for a refinement that spans dimensions (\"mak",
|
|
121
|
+
"anchorEnd": "and route all three again."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"label": "no refinement",
|
|
125
|
+
"lines": [67, 67],
|
|
126
|
+
"anchor": "When no refinement is requested, the theme is complete."
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "ct-refine-colors",
|
|
132
|
+
"row": 8,
|
|
133
|
+
"kind": "hand",
|
|
134
|
+
"title": "Set colors (adjust)",
|
|
135
|
+
"desc": "Any request that names color, such as warmer, calmer, darker, or more contrast, goes to live-tokens-set-colors.",
|
|
136
|
+
"lines": [60, 60],
|
|
137
|
+
"anchor": "| warmer, cooler, calmer, louder, lighter, darker, moodier, "
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "ct-refine-type",
|
|
141
|
+
"row": 8,
|
|
142
|
+
"kind": "hand",
|
|
143
|
+
"title": "Set type (adjust)",
|
|
144
|
+
"desc": "Any request that names type, such as more editorial, friendlier, or a serif for headings, goes to live-tokens-set-type.",
|
|
145
|
+
"lines": [61, 61],
|
|
146
|
+
"anchor": "| more editorial, friendlier, more technical, a serif for he"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "ct-refine-geometry",
|
|
150
|
+
"row": 8,
|
|
151
|
+
"kind": "hand",
|
|
152
|
+
"title": "Set geometry (adjust)",
|
|
153
|
+
"desc": "Any request that names geometry, such as rounder, pill buttons, tighter, or thicker borders, goes to live-tokens-set-geometry.",
|
|
154
|
+
"lines": [62, 62],
|
|
155
|
+
"anchor": "| rounder, sharper, pill buttons, tighter, airier, thicker b"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "ct-done",
|
|
159
|
+
"row": 9,
|
|
160
|
+
"kind": "done",
|
|
161
|
+
"title": "Theme complete",
|
|
162
|
+
"desc": "The theme is saved, open in the editor, and shown in the app.",
|
|
163
|
+
"lines": [78, 84],
|
|
164
|
+
"anchor": "## Verify",
|
|
165
|
+
"anchorEnd": "To return to the previous theme, load it from the Theme pane"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"edges": [
|
|
169
|
+
{
|
|
170
|
+
"to": "ct-direction",
|
|
171
|
+
"from": "ct-trig"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"to": "ct-index",
|
|
175
|
+
"from": "ct-direction"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"to": "ct-assemble",
|
|
179
|
+
"from": "ct-save"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"to": "ct-ver",
|
|
183
|
+
"from": "ct-assemble"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"to": "ct-refine-q",
|
|
187
|
+
"from": "ct-ver"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"to": "ct-refine-colors",
|
|
191
|
+
"from": "ct-refine-q",
|
|
192
|
+
"label": "color"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"to": "ct-refine-type",
|
|
196
|
+
"from": "ct-refine-q",
|
|
197
|
+
"label": "type"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"to": "ct-refine-geometry",
|
|
201
|
+
"from": "ct-refine-q",
|
|
202
|
+
"label": "geometry"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"to": "ct-direction",
|
|
206
|
+
"from": "ct-refine-q",
|
|
207
|
+
"label": "spans dimensions",
|
|
208
|
+
"back": true
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"to": "ct-done",
|
|
212
|
+
"from": "ct-refine-q",
|
|
213
|
+
"label": "no refinement"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"to": "ct-colors",
|
|
217
|
+
"from": "ct-index"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"to": "ct-save",
|
|
221
|
+
"from": "ct-colors"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"to": "ct-type",
|
|
225
|
+
"from": "ct-index"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"to": "ct-save",
|
|
229
|
+
"from": "ct-type"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"to": "ct-geo",
|
|
233
|
+
"from": "ct-index"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"to": "ct-save",
|
|
237
|
+
"from": "ct-geo"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"to": "ct-refine-q",
|
|
241
|
+
"from": "ct-refine-colors",
|
|
242
|
+
"back": true
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"to": "ct-refine-q",
|
|
246
|
+
"from": "ct-refine-type",
|
|
247
|
+
"back": true
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"to": "ct-refine-q",
|
|
251
|
+
"from": "ct-refine-geometry",
|
|
252
|
+
"back": true
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
};
|