@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.
Files changed (127) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +10 -9
  3. package/claude/.claude-plugin/plugin.json +1 -1
  4. package/claude/skills/canon-cli/SKILL.md +5 -5
  5. package/claude/skills/create-skill/SKILL.md +1 -1
  6. package/claude/skills/design-identity/REQUIREMENT.md +2 -2
  7. package/claude/skills/design-identity/SKILL.md +6 -6
  8. package/claude/skills/design-record/REQUIREMENT.md +2 -2
  9. package/claude/skills/design-record/SKILL.md +4 -4
  10. package/claude/skills/design-record/references/folder.md +1 -1
  11. package/claude/skills/design-taste/REQUIREMENT.md +1 -1
  12. package/claude/skills/document-health/SKILL.md +6 -6
  13. package/claude/skills/document-repair/SKILL.md +5 -5
  14. package/claude/skills/draw-figure/REQUIREMENT.md +1 -1
  15. package/claude/skills/draw-figure/SKILL.md +1 -1
  16. package/claude/skills/pick-by-eye/REQUIREMENT.md +4 -4
  17. package/claude/skills/pick-by-eye/SKILL.md +34 -41
  18. package/claude/skills/pick-by-eye/references/board.md +42 -0
  19. package/claude/skills/pick-by-eye/references/live-arms.md +3 -3
  20. package/claude/skills/plan-groundwork/SKILL.md +1 -1
  21. package/claude/skills/target-check/SKILL.md +6 -8
  22. package/claude/skills/target-check/references/domains.md +1 -4
  23. package/claude/skills/target-setup/SKILL.md +8 -8
  24. package/claude/skills/target-update/SKILL.md +5 -5
  25. package/claude/skills/teach-craft/REQUIREMENT.md +1 -1
  26. package/claude/skills/teach-craft/SKILL.md +32 -1
  27. package/claude/skills/teach-craft/references/adopted.md +113 -0
  28. package/claude/skills/teach-craft/references/lesson-craft.md +10 -2
  29. package/claude/skills/teach-craft/references/pedagogy.md +29 -2
  30. package/docs/agents/install-and-sync.md +2 -10
  31. package/docs/agents/output-shape.md +11 -10
  32. package/docs/target/migrations.md +8 -3
  33. package/docs/target/projects.md +1 -1
  34. package/docs/target/sync.md +1 -1
  35. package/docs/workflow/skill-map.md +0 -1
  36. package/docs/workflow/visual-design-workflow.md +1 -4
  37. package/governance/detect.toml +1 -6
  38. package/governance/renames.toml +0 -1
  39. package/package.json +2 -5
  40. package/scripts/core/install-check.sh +1 -1
  41. package/scripts/lib/ui.sh +12 -65
  42. package/src/audits/run.ts +1 -1
  43. package/src/claude/cases/misc.ts +0 -5
  44. package/src/claude/routing.ts +1 -1
  45. package/src/claude/skills-audit.ts +1 -0
  46. package/src/cli/help.ts +0 -3
  47. package/src/cli/run.ts +5 -6
  48. package/src/cli/ui.ts +87 -28
  49. package/src/cli.ts +6 -2
  50. package/src/commands/claude.ts +2 -3
  51. package/src/commands/design.ts +20 -324
  52. package/src/commands/gate.ts +5 -3
  53. package/src/commands/gov.ts +11 -21
  54. package/src/commands/labels.ts +1 -1
  55. package/src/commands/pr.ts +1 -1
  56. package/src/commands/sync.ts +5 -6
  57. package/src/commands/tooling.ts +5 -8
  58. package/src/commands/transcripts.ts +6 -11
  59. package/src/design/regen.ts +5 -32
  60. package/src/design/render.ts +1 -1
  61. package/src/design/tokens.ts +3 -2
  62. package/src/gate/sequencer.ts +1 -1
  63. package/src/gate/stages.ts +4 -20
  64. package/src/gov/audit.ts +1 -6
  65. package/src/hooks/post-merge.ts +2 -5
  66. package/src/markdown/scope.ts +2 -4
  67. package/src/process/harness.ts +3 -4
  68. package/src/sandbox/equivalence.ts +0 -1
  69. package/src/sandbox/provision.ts +8 -13
  70. package/src/sandbox/scenario.ts +6 -12
  71. package/src/shipped/references.ts +1 -2
  72. package/src/sync/check.ts +4 -29
  73. package/src/sync/engine.ts +3 -8
  74. package/src/sync/stamp.ts +6 -6
  75. package/src/sync/target.ts +1 -4
  76. package/src/sync/workflow.ts +3 -5
  77. package/src/tooling/verify-stack.ts +1 -1
  78. package/tooling/base/configs/.husky/post-merge +6 -10
  79. package/tooling/claude/reference.md +1 -1
  80. package/tooling/claude/seeds/canon/DESIGN.md +1 -1
  81. package/claude/skills/canvas-board/REQUIREMENT.md +0 -35
  82. package/claude/skills/canvas-board/SKILL.md +0 -143
  83. package/claude/skills/canvas-board/references/canvas.md +0 -170
  84. package/governance/rules/ui/canvas.md +0 -13
  85. package/scripts/core/check-color-source.sh +0 -51
  86. package/src/canvas/address.ts +0 -227
  87. package/src/canvas/arrange.ts +0 -66
  88. package/src/canvas/capture.ts +0 -391
  89. package/src/canvas/client/app.tsx +0 -188
  90. package/src/canvas/client/inspector/align-grid.tsx +0 -162
  91. package/src/canvas/client/inspector/color-field.tsx +0 -398
  92. package/src/canvas/client/inspector/color-inputs.tsx +0 -139
  93. package/src/canvas/client/inspector/color-picker.tsx +0 -668
  94. package/src/canvas/client/inspector/color-space.ts +0 -240
  95. package/src/canvas/client/inspector/field.tsx +0 -263
  96. package/src/canvas/client/inspector/fields.css +0 -763
  97. package/src/canvas/client/inspector/section.tsx +0 -27
  98. package/src/canvas/client/inspector/size-field.tsx +0 -69
  99. package/src/canvas/client/inspector/token-select.tsx +0 -109
  100. package/src/canvas/client/inspector/values.ts +0 -297
  101. package/src/canvas/client/inspector.tsx +0 -692
  102. package/src/canvas/client/keys.ts +0 -71
  103. package/src/canvas/client/layers.tsx +0 -118
  104. package/src/canvas/client/main.tsx +0 -71
  105. package/src/canvas/client/pages-panel.tsx +0 -212
  106. package/src/canvas/client/panel-handle.tsx +0 -90
  107. package/src/canvas/client/selection.tsx +0 -199
  108. package/src/canvas/client/shell.css +0 -762
  109. package/src/canvas/client/state.ts +0 -792
  110. package/src/canvas/client/surface.tsx +0 -803
  111. package/src/canvas/client/theme-panel.tsx +0 -55
  112. package/src/canvas/client/tools.tsx +0 -153
  113. package/src/canvas/content.ts +0 -781
  114. package/src/canvas/edit.ts +0 -575
  115. package/src/canvas/editing.ts +0 -203
  116. package/src/canvas/fit.ts +0 -238
  117. package/src/canvas/global.d.ts +0 -15
  118. package/src/canvas/history.ts +0 -116
  119. package/src/canvas/index.html +0 -20
  120. package/src/canvas/server.ts +0 -766
  121. package/src/canvas/tokens.ts +0 -221
  122. package/src/commands/canvas.ts +0 -1097
  123. package/src/design/adapter.ts +0 -59
  124. package/src/design/base.css +0 -203
  125. package/src/design/brand-favicon.ts +0 -18
  126. package/src/design/neutral.ts +0 -127
  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
- }