@erclx/canon 5.53.0 → 5.55.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 +18 -0
- package/README.md +10 -9
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/canon-cli/SKILL.md +5 -5
- package/claude/skills/create-skill/SKILL.md +1 -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/document-health/SKILL.md +6 -6
- package/claude/skills/document-repair/SKILL.md +5 -5
- package/claude/skills/draw-figure/REQUIREMENT.md +1 -1
- package/claude/skills/draw-figure/SKILL.md +1 -1
- package/claude/skills/pick-by-eye/REQUIREMENT.md +4 -4
- 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/target-check/SKILL.md +6 -8
- package/claude/skills/target-check/references/domains.md +1 -4
- package/claude/skills/target-setup/SKILL.md +8 -8
- package/claude/skills/target-update/SKILL.md +5 -5
- package/claude/skills/teach-craft/REQUIREMENT.md +1 -1
- package/claude/skills/teach-craft/SKILL.md +32 -1
- package/claude/skills/teach-craft/references/adopted.md +113 -0
- package/claude/skills/teach-craft/references/lesson-craft.md +10 -2
- package/claude/skills/teach-craft/references/pedagogy.md +29 -2
- package/docs/agents/install-and-sync.md +2 -10
- package/docs/agents/output-shape.md +11 -10
- package/docs/target/migrations.md +8 -3
- package/docs/target/projects.md +1 -1
- package/docs/target/sync.md +1 -1
- package/docs/workflow/skill-map.md +0 -1
- 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 -5
- package/scripts/core/install-check.sh +1 -1
- package/scripts/lib/ui.sh +12 -65
- package/src/audits/run.ts +1 -1
- package/src/claude/cases/misc.ts +0 -5
- package/src/claude/routing.ts +1 -1
- package/src/claude/skills-audit.ts +1 -0
- package/src/cli/help.ts +0 -3
- package/src/cli/run.ts +5 -6
- package/src/cli/ui.ts +87 -28
- package/src/cli.ts +6 -2
- package/src/commands/claude.ts +2 -3
- package/src/commands/design.ts +20 -324
- package/src/commands/gate.ts +5 -3
- package/src/commands/gov.ts +11 -21
- package/src/commands/labels.ts +1 -1
- package/src/commands/pr.ts +1 -1
- package/src/commands/sync.ts +5 -6
- package/src/commands/tooling.ts +5 -8
- package/src/commands/transcripts.ts +6 -11
- package/src/design/regen.ts +5 -32
- package/src/design/render.ts +1 -1
- package/src/design/tokens.ts +3 -2
- package/src/gate/sequencer.ts +1 -1
- package/src/gate/stages.ts +4 -20
- package/src/gov/audit.ts +1 -6
- package/src/hooks/post-merge.ts +2 -5
- package/src/markdown/scope.ts +2 -4
- package/src/process/harness.ts +3 -4
- package/src/sandbox/equivalence.ts +0 -1
- package/src/sandbox/provision.ts +8 -13
- package/src/sandbox/scenario.ts +6 -12
- package/src/shipped/references.ts +1 -2
- package/src/sync/check.ts +4 -29
- package/src/sync/engine.ts +3 -8
- package/src/sync/stamp.ts +6 -6
- package/src/sync/target.ts +1 -4
- package/src/sync/workflow.ts +3 -5
- package/src/tooling/verify-stack.ts +1 -1
- package/tooling/base/configs/.husky/post-merge +6 -10
- 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/governance/rules/ui/canvas.md +0 -13
- package/scripts/core/check-color-source.sh +0 -51
- 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/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
|
@@ -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
|
-
}
|