Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## Unreleased
- **The HUD is four groups, and every control names itself.** After the spacer: **save state** (versions wearing the autosave dot as a badge — green the file has everything, amber saved in this browser, red nothing persists; click opens the versions menu, whose first row is the full save status and a `Save ⌘S` button) · a hairline · **edit** (`+`, a new **duplicate** button — the selected rows offset 16px and re-selected, else the slide after itself, in the sheet the selected slides — guides, spellcheck) · **file** (save a copy when storage is blocked, PDF) · **view** (contact sheet, full screen, shortcuts). Hovering any control shows its name and its key at once (`data-tip`; the OS `title` delay is gone). Keys: **C** opens the contact sheet (was G), **G** toggles guides + snap; ⌘P and ⌘D leave the shortcut list — the PDF and duplicate buttons are the doors. The ⓘ popover is three columns by what a key acts on: slides · rows · file. Gate: test/hud.test.mjs; the SKILL.md HUD manifest moved with it.

## 0.6.1 — links open, and the gap gate
- **A link opens, in every mode.** Presenting, a click on a linked row (a CTA box, its label) or on an inline `<a>` run opens it in a new tab — the press on a link is now left alone, where before it selected the row and the re-render destroyed the node under the pointer, so the browser's click never reached the anchor and nothing opened. Editing, a plain click still selects and drags the row; **⌘-click** (Ctrl-click off Mac) opens the link and touches neither the selection nor the row, while ⌘-click on an unlinked row multi-selects as before; an inline run's own click never navigates while editing. Every linked row and run carries a hover hint: `⌘-click opens <url>` while editing, the url alone while presenting. ⌘P pages carry the anchors, the `⤓` PDF its `/Link` annotations, as before. Help menu names the gesture. Gate: test/links.test.mjs (live, four proofs: presenting, editing, hint, print + PDF).
- **The gap gate: air is part of the contract.** Every collision check lived in `verify` — glyph rects, sampled strokes, `elementFromPoint` — which needs Playwright, runs after the deck exists and only reports; the agent then nudged coordinates by hand and the next deck repeated the cycle. `validate` now refuses the layout that WOULD collide: every row's declared box owes its neighbours `styles.gap` (default 4px, the offset the chart library itself leaves between a bar and its value), and two boxes closer than that, or overlapping, fail the contract — unless one is wholly inside a painted non-text row (a title on its card), they share a `group` (a card and its rows are one thing), or one says `over:1`. Two graphics touching is layout, not collision. Severity follows what the model states: an overlap on an axis both rows declare is an error; one resting on an estimate — a text row's height from its line count, a `w:'auto'` row's width from `cw` × chars — is a `~` warning, because a guess may not block a build. Master rows a slide shows are in the slide's set, so a footer chip and a late row owe each other the same air. Roles gain `cw`, the measured average glyph width in em: the neutral roles carry theirs (0.45–0.47 sans, 0.69–0.73 uppercase mono, measured in Chromium), the text-fit heuristic uses it in place of the blanket 0.55 (which ran ~20% wide on a sans and ~20% narrow on a mono chip), and a wrap is counted only past 12% over the box because the estimates run up to ~11% wide on headline strings. `style.json` may carry `gap` and per-role `cw`; `mergeStyle` carries both. Gates: 2px between two declared chips fails with both rows and the distance named, 4px passes, `styles.gap: 12` raises the bar, a label inside a card passes and one straddling its border fails with the depth, group/over/graphic-graphic pass, an estimated overlap is a `~` warning, an auto-width mono chip is judged at its measured width, a hidden master row leaves the set, the four examples are clean.
Expand Down
4 changes: 2 additions & 2 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ Fix the model, not the output. Re-run until `VERIFY PASS`. Attach `verify-out/re
### Step 6 — hand-off notes for the human editor
Say, in this order:
1. Where the file is and that it opens from disk in any browser, no install, no network.
2. **HUD (the full set, left to right):** prev / next (chevrons) · autosave dot (green = the file has everything · amber = saved in this browser, N edits not in the file yet · red = nothing persists; click = ⌘S) · `+` (Text / Box / Slide) · contact sheet (grid icon; G or Esc) · spellcheck (spell-check icon; on by default, dims when off) · grid + guides + snap (grip icon, a 3×3 dot lattice; **off by default**, dims when off: a 16px dot grid over the slide — one dot per intersection — and this slide's layout lines — its slot edges, the content margin and the canvas mid-lines, every one seated on the grid — of which only the line being held shows, while it is held; a drag, a resize or a connector nib snaps to a layout line within 10px (a held line keeps its grip 4px further), else to the grid; a circle snaps by its centre; a connector end also snaps to the eight 45° rays out of its other end, same reach and hold measured across the ray — per browser, never in the model, never in present, print or the PDF) · save a copy (copy icon — only shown when the browser blocks storage) · versions (history icon: pin this version, restore an earlier one) · PDF (file-down icon) · fullscreen (maximize icon; F) · shortcuts (question mark). The icons are Lucide shapes with movingicons.dev motion — each playing once on load and once per hover, never on a loop.
<!-- HUD: prev next autosave addbtn grid-btn spell snap savecopy vers pdf fs help -->
2. **HUD (the full set, left to right), four groups after the spacer, a hairline between groups; every control names itself and its key on hover (`data-tip`, instant — never the OS title delay):** prev / next (chevrons; ← →) · **save state:** versions (history icon wearing the autosave dot as a badge: green = the file has everything · amber = saved in this browser, N edits not in the file yet · red = nothing persists; click opens the versions menu, whose first row is `Save ⌘S` · pin · restore) · **edit:** `+` (Text / Box / Slide) · duplicate (copy-plus icon: the selected rows, offset 16px, the copies become the selection · else the slide, after itself · in the sheet, the selected slides) · grid + guides + snap (grip icon; **G**; off by default, dims when off: a 16px dot grid over the slide and this slide's layout lines — slot edges, the content margin, the canvas mid-lines — of which only the line being held shows; a drag, a resize or a connector nib snaps to a line within 10px, else to the grid; a circle snaps by its centre; a connector end also snaps to the eight 45° rays out of its other end; never in present, print, the sheet, the PDF or the saved file) · spellcheck (spell-check icon; on by default, dims when off; the browser's own — it marks the row you type in, never present, print or PDF) · **file:** save a copy (only when the browser blocks storage) · PDF (⤓) · **view:** contact sheet (grid icon; **C** or Esc) · full screen (**F**) · shortcuts (ⓘ; a three-column popover: slides · rows · file; ⌘P and ⌘D are not shortcuts — the PDF and duplicate buttons are the only doors).
<!-- HUD: prev next vers autosave addbtn dup snap spell savecopy pdf grid-btn fs help -->
This manifest is a contract: the gate compares it against the template, so the HUD cannot gain or lose a control without this line changing. While presenting, the HUD peeks back as a centred pill above the bottom edge — never over the page counter in the corner. On the contact sheet the HUD stays, pinned above the thumbnails, with prev/next/present disabled (the sheet is the navigator) and `+` adding a slide after the current one. Drag to move (a connector travels whole — both ends and every control point; a `group` travels whole and wears one dashed box), ⌘-click to multi-select (or to take one member of a group alone), drag from empty canvas for a marquee that takes every row it wholly contains (⇧ adds to the selection), double-click to retype, corner nib to resize, a connector's **point nibs** move one end (or a curve's control point) while a drag on its shaft moves it whole, ⌘Z to undo (persists across reloads), ⌘B / ⌘I / ⌘U mark a text selection or a whole selected row. Selecting text shows a floating toolbar: role segment, **B / I / U / S̶ / link** (marks never change size; the link takes http, https or mailto — an empty field unlinks), the deck's own colours as swatches, "Apply to all slides".
3. **Contact sheet:** live thumbnails 3-across; click / ⌘ / shift select, double-click opens, grab-and-drag reorders (mouse or touch — the other cells slide aside), ⌫ deletes (never the last), ⌘C ⌘V ⌘D ⌘Z. It also opens in present mode.
4. **PDF:** links become real `/Link` annotations, so a LinkedIn document post is clickable. the PDF button downloads a **true slide-sized PDF written inside the file** — no library, no server. Each slide is rasterised from its live DOM (SVG `foreignObject` → canvas at 2× → JPEG) onto a W×H pt page, so a 16:9 deck is a 16:9 PDF with no letterboxing; fonts must be local (they are — the deck loads none). Verified in Chromium; **Safari's `foreignObject` path is unconfirmed** — if rasterising throws or the canvas is tainted, the PDF button falls back to `print()`. **⌘P is the paper path:** one page per slide, each with its own background, on a **named** page size — Letter (A4 for `document-a4`) — because Safari ignores pixel `@page` sizes; the slide is zoomed to the printable width. Choose "Save as PDF" there for a paper-shaped file.
Expand Down
Loading
Loading