Extract SeeCode diagram renderer for Chopin #405
- MA
## Summary
- Extracts SeeCode's rendering core into `@chopin/diagrams`, with bounded declarative input, structured errors, 42 diagram types, 15 aliases, and a resolved fixture for every type. - Adds a scoped React viewer with tracing, inspection, step controls, reduced-motion support, and Chopin colours and fonts. - Adds a development-only gallery and document specimen, with [source provenance and MIT licence](https://github.com/githubnext/chopin/blob/666448b2/packages/diagrams/PROVENANCE.md).
## Preview

The specimen uses the static document viewer's frame. Diagram specs are not yet persisted authored-document nodes.
Run `CHOPIN_DEV_WEB_PORT=5173 bun run --cwd apps/web dev`, then open `http://127.0.0.1:5173/diagram-gallery`.
## Checks
- `bun run ci`, `bun run types`, `bun run build` - Focused Bun tests: 62 passed, 1,374 assertions - Focused Playwright gallery tests: 13 passed across wide and narrow viewports; one intentional wide skip - Production build excludes the development gallery; the dedicated gallery suite runs in CI - Normal and thermonuclear reviews completed; their actionable findings are addressed
The shared-icon policy test exempts only the diagram viewer's SVG canvas, which is visualization content rather than interface icon artwork. Its controls use the existing theme focus rules.
Persisted document integration, Planner diagram selection, decision Save, and the separate OpenUI/component-preview trials are outside this PR.
MaggieAppletonhead-ref-force-pushed 6fb2fc2a5144last month on GitHub
MaggieAppletonhead-ref-force-pushed 666448b2d85dlast month on GitHub
MaggieAppletonmerged 1db741fcc37flast month on GitHub
MaggieAppletonhead-ref-deletedlast month on GitHub