Canvas + writing pass: Shift-constrain, theme tints, markdown writing, focus mode#48
Merged
Conversation
…ement tints - Holding Shift while drawing or resizing snaps rectangle→square, ellipse→circle, diamond→uniform; read live off the modifier flags (flagsChanged re-emits the draft mid-gesture). Lines, arrows, and freehand stay freeform. Resize squares to the larger side anchored at the opposite corner. - Element tints are theme-relative: ThemeFlavor.tints holds six slots in fixed semantic order (red…purple); elements store the slot INDEX, so a "green" shape re-resolves when the theme changes. Bottom-bar swatch expands into the tint row (colors new elements + the selection); the text-selection bar carries the same swatches; the live editor re-inks non-chip runs immediately.
The plain text with @tokens stays the agent-facing source of truth — everything here is interaction + display-only styling on top of it. - Click = caret: a plain click on a text card places the caret and you are writing — no select-first ritual. Drag still moves; ⇧/⌘ clicks still multi-select; shapes keep click-to-select. - Markdown writing: live-styled #/##/### headings, **bold**, *italic*, `code`, > quotes (syntax kept while editing, markers dimmed); lists and checkboxes auto-continue on Enter (numbers increment, empty item exits); clicking a checkbox toggles it; done lines dim + strike. - Cards at rest hide the syntax: bold renders bold, headings lose their hashes, "- " becomes a real bullet, checkboxes become ☐/☑ glyphs. Click in and the literal markdown returns for editing. - Selection bar: heading/bold/italic/code/quote actions (toggle-aware, undo-safe) plus the ink picker collapsed to the current swatch, expanding in place. - Focus mode (⇧⌘F, also in ⌘K): the current card expands into a centered writing sheet at 100% scale; Esc or click-away returns to the board.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #46 — the canvas drawing polish and the writing experience pass.
Canvas
ThemeFlavor.tints(six semantic slots); elements store the slot INDEX so a "green" shape re-resolves per theme. Bottom-bar swatch expands into the tint row; applies to new elements and the selection.Writing ("make the canvas exceptional at writing")
-becomes •, checkboxes become ☐/☑; click in and the literal markdown returns.Includes a sync-merge of release-1.3.0 (PR #47 engines work) —
currentTintandaskEnginecoexist in the selection overlays.Test plan
swift test— 61/61 green on the merged tree.