githubnext/chopinPublic

Let's compose rich plans together

Open rendered code, diff and diagram blocks by clicking or arrowing in

Clicking a preview opens its source with the caret where the click was
(the clicked line and column for code, the matching patch line for a diff,
the end for a diagram or formula). Code and diffs swap the coloured copy for
the source instead of showing both. Escape returns to the preview and holds
focus on it; Enter, Space or typing on a focused preview opens the source,
and ArrowUp/ArrowDown move on. Arrowing from a neighbouring block enters a
collapsed block instead of skipping it: the caret goes into code, and a
diagram is held as a block. A source the caret opened closes again when the
caret leaves; one opened with the toggle stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
C5MAMaggie Appleton and Claude Opus 5.5 authored
033018cPatch
Parent3070c24
6 files changed+636-18
StackedSplit
e2e/code.e2e.ts+106 โˆ’0
e2e/syntax-contrast.e2e.ts+4 โˆ’2
packages/editor/src/styles.css+43 โˆ’0
packages/editor/src/widgets/render-blocks.tsx+377 โˆ’16
packages/editor/src/widgets/source-offset.test.ts+50 โˆ’0
packages/editor/src/widgets/source-offset.ts+56 โˆ’0