@erclx/canon 5.52.0 → 5.54.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/CHANGELOG.md +17 -0
- package/README.md +11 -13
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/canon-cli/SKILL.md +5 -8
- package/claude/skills/context-fold/REQUIREMENT.md +0 -1
- package/claude/skills/design-identity/REQUIREMENT.md +2 -2
- package/claude/skills/design-identity/SKILL.md +6 -6
- package/claude/skills/design-record/REQUIREMENT.md +2 -2
- package/claude/skills/design-record/SKILL.md +4 -4
- package/claude/skills/design-record/references/folder.md +1 -1
- package/claude/skills/design-taste/REQUIREMENT.md +1 -1
- package/claude/skills/design-taste/references/kinds.md +0 -1
- package/claude/skills/draw-figure/REQUIREMENT.md +3 -4
- package/claude/skills/draw-figure/SKILL.md +5 -6
- package/claude/skills/draw-figure/references/figures.md +0 -1
- package/claude/skills/draw-figure/references/hand-drawn.md +1 -1
- package/claude/skills/pick-by-eye/REQUIREMENT.md +4 -5
- package/claude/skills/pick-by-eye/SKILL.md +34 -41
- package/claude/skills/pick-by-eye/references/board.md +42 -0
- package/claude/skills/pick-by-eye/references/live-arms.md +3 -3
- package/claude/skills/plan-groundwork/SKILL.md +1 -1
- package/claude/skills/teach-craft/REQUIREMENT.md +30 -0
- package/claude/skills/teach-craft/SKILL.md +70 -0
- package/claude/skills/teach-craft/references/adopted.md +113 -0
- package/claude/skills/teach-craft/references/lesson-craft.md +60 -0
- package/claude/skills/{teach-workspace → teach-craft}/references/pedagogy.md +41 -6
- package/docs/agents/audits.md +0 -1
- package/docs/agents/install-and-sync.md +0 -8
- package/docs/target/migrations.md +16 -2
- package/docs/target/projects.md +1 -1
- package/docs/workflow/parallel-features.md +1 -1
- package/docs/workflow/skill-map-on-request.md +10 -22
- package/docs/workflow/skill-map.md +11 -14
- package/docs/workflow/visual-design-workflow.md +1 -4
- package/governance/detect.toml +1 -6
- package/governance/renames.toml +0 -1
- package/package.json +2 -8
- package/scripts/core/regen-web-previews.ts +2 -67
- package/src/audits/catalog.ts +0 -1
- package/src/browser/engine.ts +3 -6
- package/src/capture/render.ts +1 -1
- package/src/claude/cases/authoring.ts +0 -12
- package/src/claude/cases/misc.ts +0 -22
- package/src/claude/cases/workflow.ts +2 -38
- package/src/claude/skills-audit.ts +1 -1
- package/src/cli/help.ts +0 -10
- package/src/cli.ts +0 -8
- package/src/commands/design.ts +16 -315
- package/src/commands/records.ts +0 -1
- package/src/commands/serve.ts +2 -2
- package/src/commands/sync.ts +4 -5
- package/src/design/components.ts +8 -1514
- package/src/design/css.ts +5 -6
- package/src/design/fonts.ts +3 -5
- package/src/design/regen.ts +5 -32
- package/src/design/render.ts +1 -1
- package/src/design/tokens.ts +3 -2
- package/src/driver/drive.ts +3 -4
- package/src/driver/steps.ts +2 -5
- package/src/gate/stages.ts +4 -10
- package/src/gov/audit.ts +1 -6
- package/src/inventory/walk.ts +1 -1
- package/src/markdown/scope.ts +6 -35
- package/src/records/validate.ts +4 -176
- package/src/sandbox/equivalence.ts +0 -5
- package/src/shipped/references.ts +1 -2
- package/src/sync/check.ts +4 -29
- package/src/sync/stamp.ts +6 -6
- package/src/sync/target.ts +1 -4
- package/tooling/claude/reference.md +1 -1
- package/tooling/claude/seeds/canon/DESIGN.md +1 -1
- package/claude/skills/canvas-board/REQUIREMENT.md +0 -35
- package/claude/skills/canvas-board/SKILL.md +0 -143
- package/claude/skills/canvas-board/references/canvas.md +0 -170
- package/claude/skills/draft-and-pick/REQUIREMENT.md +0 -26
- package/claude/skills/draft-and-pick/SKILL.md +0 -11
- package/claude/skills/draft-doc/REQUIREMENT.md +0 -26
- package/claude/skills/draft-doc/SKILL.md +0 -11
- package/claude/skills/draft-figure/REQUIREMENT.md +0 -26
- package/claude/skills/draft-figure/SKILL.md +0 -11
- package/claude/skills/draft-identity/REQUIREMENT.md +0 -26
- package/claude/skills/draft-identity/SKILL.md +0 -11
- package/claude/skills/draft-ready/REQUIREMENT.md +0 -26
- package/claude/skills/draft-ready/SKILL.md +0 -11
- package/claude/skills/draft-screencast/REQUIREMENT.md +0 -26
- package/claude/skills/draft-screencast/SKILL.md +0 -11
- package/claude/skills/draft-slides/REQUIREMENT.md +0 -26
- package/claude/skills/draft-slides/SKILL.md +0 -11
- package/claude/skills/make-deck/REQUIREMENT.md +0 -36
- package/claude/skills/make-deck/SKILL.md +0 -80
- package/claude/skills/make-deck/references/deck.md +0 -183
- package/claude/skills/read-frames/REQUIREMENT.md +0 -30
- package/claude/skills/read-frames/SKILL.md +0 -55
- package/claude/skills/record-screencast/REQUIREMENT.md +0 -35
- package/claude/skills/record-screencast/SKILL.md +0 -99
- package/claude/skills/script-screencast/REQUIREMENT.md +0 -34
- package/claude/skills/script-screencast/SKILL.md +0 -70
- package/claude/skills/script-screencast/references/beats-template.md +0 -119
- package/claude/skills/teach-workspace/REQUIREMENT.md +0 -34
- package/claude/skills/teach-workspace/SKILL.md +0 -196
- package/claude/skills/teach-workspace/references/glossary.md +0 -90
- package/claude/skills/teach-workspace/references/lesson-build.md +0 -106
- package/claude/skills/teach-workspace/references/lesson-craft.md +0 -135
- package/claude/skills/teach-workspace/references/promotion-fold.md +0 -35
- package/claude/skills/teach-workspace/references/promotion.md +0 -116
- package/claude/skills/teach-workspace/references/revisit.md +0 -28
- package/claude/skills/teach-workspace/references/teach.md +0 -211
- package/claude/skills/video-craft/REQUIREMENT.md +0 -35
- package/claude/skills/video-craft/SKILL.md +0 -96
- package/claude/skills/video-craft/references/adopted.md +0 -110
- package/governance/rules/ui/canvas.md +0 -13
- package/src/canvas/address.ts +0 -227
- package/src/canvas/arrange.ts +0 -66
- package/src/canvas/capture.ts +0 -391
- package/src/canvas/client/app.tsx +0 -188
- package/src/canvas/client/inspector/align-grid.tsx +0 -162
- package/src/canvas/client/inspector/color-field.tsx +0 -398
- package/src/canvas/client/inspector/color-inputs.tsx +0 -139
- package/src/canvas/client/inspector/color-picker.tsx +0 -668
- package/src/canvas/client/inspector/color-space.ts +0 -240
- package/src/canvas/client/inspector/field.tsx +0 -263
- package/src/canvas/client/inspector/fields.css +0 -763
- package/src/canvas/client/inspector/section.tsx +0 -27
- package/src/canvas/client/inspector/size-field.tsx +0 -69
- package/src/canvas/client/inspector/token-select.tsx +0 -109
- package/src/canvas/client/inspector/values.ts +0 -297
- package/src/canvas/client/inspector.tsx +0 -692
- package/src/canvas/client/keys.ts +0 -71
- package/src/canvas/client/layers.tsx +0 -118
- package/src/canvas/client/main.tsx +0 -71
- package/src/canvas/client/pages-panel.tsx +0 -212
- package/src/canvas/client/panel-handle.tsx +0 -90
- package/src/canvas/client/selection.tsx +0 -199
- package/src/canvas/client/shell.css +0 -762
- package/src/canvas/client/state.ts +0 -792
- package/src/canvas/client/surface.tsx +0 -803
- package/src/canvas/client/theme-panel.tsx +0 -55
- package/src/canvas/client/tools.tsx +0 -153
- package/src/canvas/content.ts +0 -781
- package/src/canvas/edit.ts +0 -575
- package/src/canvas/editing.ts +0 -203
- package/src/canvas/fit.ts +0 -238
- package/src/canvas/global.d.ts +0 -15
- package/src/canvas/history.ts +0 -116
- package/src/canvas/index.html +0 -20
- package/src/canvas/server.ts +0 -766
- package/src/canvas/tokens.ts +0 -221
- package/src/commands/canvas.ts +0 -1097
- package/src/commands/demo.ts +0 -542
- package/src/commands/slides.ts +0 -184
- package/src/commands/teach.ts +0 -1401
- package/src/demo/beats.ts +0 -135
- package/src/demo/compile.ts +0 -350
- package/src/demo/container.ts +0 -219
- package/src/demo/cursors.ts +0 -55
- package/src/demo/drive.ts +0 -442
- package/src/demo/pointer.ts +0 -178
- package/src/demo/theme.ts +0 -112
- package/src/demo/timeline.ts +0 -64
- package/src/design/adapter.ts +0 -59
- package/src/design/base.css +0 -203
- package/src/design/brand-favicon.ts +0 -18
- package/src/design/neutral.ts +0 -127
- package/src/design/project-fonts.ts +0 -392
- package/src/slides/convert/chart.ts +0 -165
- package/src/slides/convert/deck.ts +0 -244
- package/src/slides/convert/export.ts +0 -567
- package/src/slides/convert/master.ts +0 -198
- package/src/slides/convert/shapes.ts +0 -804
- package/src/slides/convert/svg.ts +0 -38
- package/src/slides/convert/walk.ts +0 -671
- package/src/slides/decks.ts +0 -110
- package/src/slides/open.ts +0 -18
- package/src/slides/package/fonts.ts +0 -301
- package/src/slides/package/motion.ts +0 -316
- package/src/slides/package/test-face.ts +0 -113
- package/src/teach/browser/compile.ts +0 -44
- package/src/teach/browser/dismiss.ts +0 -76
- package/src/teach/browser/focus-line.ts +0 -19
- package/src/teach/browser/glossary-filter.ts +0 -44
- package/src/teach/browser/head.ts +0 -30
- package/src/teach/browser/quiz.ts +0 -19
- package/src/teach/browser/reload.ts +0 -9
- package/src/teach/browser/sidebar.ts +0 -233
- package/src/teach/browser/theme.ts +0 -18
- package/src/teach/components/code.tsx +0 -24
- package/src/teach/components/heading.tsx +0 -11
- package/src/teach/components/list.tsx +0 -17
- package/src/teach/components/paragraph.tsx +0 -29
- package/src/teach/components/refs.tsx +0 -28
- package/src/teach/cross-references.ts +0 -78
- package/src/teach/fonts.ts +0 -16
- package/src/teach/highlight.ts +0 -71
- package/src/teach/html/jsx-dev-runtime.ts +0 -13
- package/src/teach/html/jsx-runtime.ts +0 -113
- package/src/teach/html/raw.ts +0 -28
- package/src/teach/lesson.ts +0 -178
- package/src/teach/nav.ts +0 -1337
- package/src/teach/render.ts +0 -240
- package/src/teach/workspace.ts +0 -1164
- package/src/teach/write-if-changed.ts +0 -17
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource preact */
|
|
2
|
-
import type { JSX } from 'preact'
|
|
3
|
-
import { tokens } from '@/canvas/client/state'
|
|
4
|
-
import type { Token, TokenKind } from '@/canvas/tokens'
|
|
5
|
-
|
|
6
|
-
const KIND_LABEL: Record<TokenKind, string> = {
|
|
7
|
-
color: 'Color',
|
|
8
|
-
spacing: 'Spacing',
|
|
9
|
-
radius: 'Radius',
|
|
10
|
-
'font-family': 'Font family',
|
|
11
|
-
'font-size': 'Font size',
|
|
12
|
-
other: 'Other',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* A swatch paints the value in the chrome's document, where the frame's own
|
|
17
|
-
* custom properties are not defined, so a value still naming one shows none.
|
|
18
|
-
*/
|
|
19
|
-
function Swatch({ token }: { readonly token: Token }): JSX.Element | null {
|
|
20
|
-
const paint = token.resolved ?? token.value
|
|
21
|
-
if (paint.includes('var(')) return null
|
|
22
|
-
return (
|
|
23
|
-
<span class="swatch" aria-hidden="true" style={{ background: paint }} />
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Read-only: the frames' tokens are edited in their stylesheet, not here. */
|
|
28
|
-
export function ThemePanel(): JSX.Element {
|
|
29
|
-
const groups = tokens.value?.groups ?? []
|
|
30
|
-
return (
|
|
31
|
-
<section aria-label="Theme">
|
|
32
|
-
{groups.length === 0 ? (
|
|
33
|
-
<p class="empty">
|
|
34
|
-
No tokens resolve for this project, so there is nothing to list.{' '}
|
|
35
|
-
{tokens.value?.notice ?? ''}
|
|
36
|
-
</p>
|
|
37
|
-
) : (
|
|
38
|
-
groups.map((group) => (
|
|
39
|
-
<div key={group.kind}>
|
|
40
|
-
<h2 class="section-label">{KIND_LABEL[group.kind]}</h2>
|
|
41
|
-
<ul class="tokens" aria-label={`${KIND_LABEL[group.kind]} tokens`}>
|
|
42
|
-
{group.tokens.map((token) => (
|
|
43
|
-
<li key={token.name} class="token" title={token.value}>
|
|
44
|
-
{group.kind === 'color' ? <Swatch token={token} /> : null}
|
|
45
|
-
<span class="row-label">{token.name}</span>
|
|
46
|
-
<span class="row-meta token-value">{token.value}</span>
|
|
47
|
-
</li>
|
|
48
|
-
))}
|
|
49
|
-
</ul>
|
|
50
|
-
</div>
|
|
51
|
-
))
|
|
52
|
-
)}
|
|
53
|
-
</section>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource preact */
|
|
2
|
-
import type { JSX } from 'preact'
|
|
3
|
-
import {
|
|
4
|
-
activeTool,
|
|
5
|
-
history,
|
|
6
|
-
panelsHidden,
|
|
7
|
-
redo,
|
|
8
|
-
shownTool,
|
|
9
|
-
type Tool,
|
|
10
|
-
togglePanels,
|
|
11
|
-
undo,
|
|
12
|
-
} from '@/canvas/client/state'
|
|
13
|
-
|
|
14
|
-
interface ToolButton {
|
|
15
|
-
readonly tool: Tool
|
|
16
|
-
readonly name: string
|
|
17
|
-
readonly key: string
|
|
18
|
-
readonly icon: JSX.Element
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const TOOLS: readonly ToolButton[] = [
|
|
22
|
-
{
|
|
23
|
-
tool: 'move',
|
|
24
|
-
name: 'Move',
|
|
25
|
-
key: 'V',
|
|
26
|
-
icon: (
|
|
27
|
-
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
28
|
-
<path d="M3.5 2.5l9 4.2-3.9 1.2-1.4 3.8z" />
|
|
29
|
-
</svg>
|
|
30
|
-
),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
tool: 'pan',
|
|
34
|
-
name: 'Pan',
|
|
35
|
-
key: 'H',
|
|
36
|
-
icon: (
|
|
37
|
-
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
38
|
-
<path d="M5.5 8.5V4a1 1 0 0 1 2 0v3.5M7.5 7V2.8a1 1 0 0 1 2 0V7M9.5 7V3.6a1 1 0 0 1 2 0V8M11.5 7.5a1 1 0 0 1 2 0v2.2A4.8 4.8 0 0 1 8.7 14.5h-.6a4.3 4.3 0 0 1-3.2-1.4L2.6 10.6a1 1 0 0 1 1.5-1.4l1.4 1.3" />
|
|
39
|
-
</svg>
|
|
40
|
-
),
|
|
41
|
-
},
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
interface HistoryButton {
|
|
45
|
-
readonly name: 'Undo' | 'Redo'
|
|
46
|
-
readonly shortcut: string
|
|
47
|
-
readonly keys: string
|
|
48
|
-
readonly run: () => Promise<void>
|
|
49
|
-
readonly icon: JSX.Element
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** The modifier the platform names for undo, Cmd on macOS and Ctrl elsewhere. */
|
|
53
|
-
const MOD = /Mac|iPhone|iPad/.test(globalThis.navigator?.platform ?? '')
|
|
54
|
-
? 'Cmd'
|
|
55
|
-
: 'Ctrl'
|
|
56
|
-
|
|
57
|
-
const HISTORY_BUTTONS: readonly HistoryButton[] = [
|
|
58
|
-
{
|
|
59
|
-
name: 'Undo',
|
|
60
|
-
shortcut: `${MOD}+Z`,
|
|
61
|
-
keys: 'Control+Z Meta+Z',
|
|
62
|
-
run: () => undo(),
|
|
63
|
-
icon: (
|
|
64
|
-
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
65
|
-
<path d="M5.5 3.5L2.5 6.5l3 3M2.5 6.5h7a4 4 0 0 1 0 8H7" />
|
|
66
|
-
</svg>
|
|
67
|
-
),
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: 'Redo',
|
|
71
|
-
shortcut: `${MOD}+Shift+Z`,
|
|
72
|
-
keys: 'Control+Shift+Z Meta+Shift+Z Control+Y',
|
|
73
|
-
run: () => redo(),
|
|
74
|
-
icon: (
|
|
75
|
-
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
76
|
-
<path d="M10.5 3.5l3 3-3 3M13.5 6.5h-7a4 4 0 0 0 0 8H9" />
|
|
77
|
-
</svg>
|
|
78
|
-
),
|
|
79
|
-
},
|
|
80
|
-
]
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* The tool strip floating at the surface's left edge, one button a tool, then
|
|
84
|
-
* undo and redo, each disabled while the server holds nothing to step.
|
|
85
|
-
*/
|
|
86
|
-
export function ToolStrip(): JSX.Element {
|
|
87
|
-
const shown = shownTool.value
|
|
88
|
-
const { canUndo, canRedo } = history.value
|
|
89
|
-
return (
|
|
90
|
-
<div
|
|
91
|
-
class="tools"
|
|
92
|
-
role="toolbar"
|
|
93
|
-
aria-label="Tools"
|
|
94
|
-
aria-orientation="vertical"
|
|
95
|
-
>
|
|
96
|
-
{TOOLS.map(({ tool, name, key, icon }) => (
|
|
97
|
-
<button
|
|
98
|
-
key={tool}
|
|
99
|
-
type="button"
|
|
100
|
-
class="tool-button"
|
|
101
|
-
aria-label={`${name} (${key})`}
|
|
102
|
-
aria-keyshortcuts={key}
|
|
103
|
-
aria-pressed={shown === tool ? 'true' : 'false'}
|
|
104
|
-
title={`${name} (${key})`}
|
|
105
|
-
data-tool={tool}
|
|
106
|
-
onClick={() => {
|
|
107
|
-
activeTool.value = tool
|
|
108
|
-
}}
|
|
109
|
-
>
|
|
110
|
-
{icon}
|
|
111
|
-
</button>
|
|
112
|
-
))}
|
|
113
|
-
<span class="tools-divider" aria-hidden="true" />
|
|
114
|
-
{HISTORY_BUTTONS.map(({ name, shortcut, keys, run, icon }) => (
|
|
115
|
-
<button
|
|
116
|
-
key={name}
|
|
117
|
-
type="button"
|
|
118
|
-
class="tool-button"
|
|
119
|
-
aria-label={`${name} (${shortcut})`}
|
|
120
|
-
aria-keyshortcuts={keys}
|
|
121
|
-
title={`${name} (${shortcut})`}
|
|
122
|
-
disabled={name === 'Undo' ? !canUndo : !canRedo}
|
|
123
|
-
onClick={() => void run()}
|
|
124
|
-
>
|
|
125
|
-
{icon}
|
|
126
|
-
</button>
|
|
127
|
-
))}
|
|
128
|
-
<span class="tools-divider" aria-hidden="true" />
|
|
129
|
-
<PanelsButton />
|
|
130
|
-
</div>
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/** Named by what a press does now, so the panels come back by mouse too. */
|
|
135
|
-
function PanelsButton(): JSX.Element {
|
|
136
|
-
const name = panelsHidden.value ? 'Show panels' : 'Hide panels'
|
|
137
|
-
return (
|
|
138
|
-
<button
|
|
139
|
-
type="button"
|
|
140
|
-
class="tool-button"
|
|
141
|
-
aria-label={`${name} (\\)`}
|
|
142
|
-
aria-keyshortcuts="\\"
|
|
143
|
-
title={`${name} (\\)`}
|
|
144
|
-
data-panels={panelsHidden.value ? 'hidden' : 'shown'}
|
|
145
|
-
onClick={togglePanels}
|
|
146
|
-
>
|
|
147
|
-
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
148
|
-
<rect x="2" y="3" width="12" height="10" rx="1.5" />
|
|
149
|
-
{panelsHidden.value ? null : <path d="M5.5 3v10M10.5 3v10" />}
|
|
150
|
-
</svg>
|
|
151
|
-
</button>
|
|
152
|
-
)
|
|
153
|
-
}
|