Map #20 execution child, built per decisions #68/#69/#70: - ReadingPresenter: block-aware renderer (ADR-0010 stance) — blank-line split, one block per chunk; lists (bullets + ordered + nesting + auto-renumber via per-level counters — one rendering path), headings by level (h1 = slot size, h2 = 0.77x, ### = body+1, #### floors at bold body), HR via the editing syntaxOnly predicate, fenced code, blockquotes (QuoteTextBlock hairline), tables (NSTextTable 1px border, delimiter-row alignment), images (hover payload), links styled + retained. Footnotes stay fallback. Source ranges ride every block (click→edit map). - ReadingSurface: read-only selectable NSTextView canvas (#68: a presentation of the same TextKit2 document). Tap with no selection after mouseDown returns = edit intent at the clicked block (the tracking-loop fix); ⌘-click opens links; scroll tracking feeds the flip-back caret; image hover NSPopover loads off-main. - ProseTypography (#70): three role slots — Body / Headings / Code — each {face, size}, UserDefaults six values, member-based font resolution (family+weight lookup misresolves Concourse Book→Thin), silent system fallback; both prose surfaces read them; editing presenter's headings + dimmed syntax rewired through the slots. - PostEditorView: Read⇄Edit toolbar button (far left) + View menu "Toggle Reading Mode" + ⌘R; reading state transient per open; drafts included (draft mirror); flip-back caret hint applied once per token. - SettingsPaneView: Typography section — three slot rows (family picker incl. current face not in the installed list + size field). - kitchen-sink.md (+png): corpus piece exercising constructs absent from the eight posts, per #69. Verified: 94 unit tests (renderer classification, renumbering, source ranges, fallbacks) + UI smoke; PERF-3k renders 128 blocks in ~17 ms; live-app probe — Read renders kitchen-sink markers-hidden, renumbered, byte-stable file after full round-trip; click-to-edit flips at the clicked paragraph; typography ladder pixel-verified (20/15 ink px).
1.4 KiB
1.4 KiB
Kitchen sink
This post exercises every construct the reading renderer must render — one of each, plus the nesting and auto-numbering cases. Not for reading pleasure; for calibration of constructs absent from the corpus.
Lists
Bulleted, ordered, nested, and deliberately mis-numbered source (1. 1. 1. must read 1, 2, 3):
- top bullet one
- top bullet two
- nested bullet two-one
- nested bullet two-two
- deeper nesting, four-space style
- back to top level
-
first
-
second, source says 1
-
third, source still says 1
-
outer one
- inner one
- inner two
-
outer two
Mixed nesting:
- numbered top
- bullet under a number
- bullet deeper
- bullet under a number
Table
| Construct | State | Notes |
|---|---|---|
| bullets | rendered | hanging indent |
| ordered | rendered | auto-renumbered |
| table | rendered | 1px border, centred ---: cell |
Quote
A blockquote line carrying italic and
code.
Nested quote: one level deeper via the doubled marker.
Code
let calm = true
// fenced block: mono face, no inline parse
Image
Hover shows the picture; the line itself stays text:
Inline
A paragraph with emphasis, strong, inline code, and a link — plain click drops to editing per #68; ⌘-click opens.
Rule
End of the sink.
