feat(outline): outline type + outliner — S3 (#109)
CI / ci (push) Canceled after 0s

Dedicated block surface (ADR-0013, #105 variant B): OutlineTree
parses/serializes plain nested-bullet markdown leniently and
normalizes on save; the outliner promotes one NSTextView over the
focused row with LogSeq-style keys (Tab/⇧Tab, ⌥↑/⌥↓ subtree move,
↑/↓ hop, ⇧↑/⇧↓ block selection, ⌘↑/⌥↓ fold, Enter split), folds
session-scoped by runtime node UUID. New Outline ⇧⌘N stages a
type: outline draft through the existing autosave/conflict
machinery; reading renders the serialized markdown unchanged.

Outline rows use the body face at its natural line box — the prose
CSS-1.8 lineHeightMultiple grew the focused row and detached the
bullet (test-pinned). Finish-audit fixes included: paste-multiline
sanitizing at setText, dead Enter disjunct, dead Row.path.

Closes #109
This commit is contained in:
AlexKucera committed 2026-10-15 13:09:31 +02:00
1 parent e55747e7fe
commit c23ee0f62f
21 files changed
+1809 -21

No files matched your search

+13
View File
@@ -39,6 +39,19 @@ struct ProsePresenterTests {
// MARK: Attribute map parity
@Test func `outline rows use the body face at its natural line box`() {
// #109 cursor-jank fix: the live outline row must NOT carry the prose
// 1.8 lineHeightMultiple — an inflated fragment grows the focused row
// and detaches the bullet. Natural box, body face, nothing else.
let attrs = ProseTypography.outlineRowAttributes
let font = attrs[.font] as? NSFont
#expect(font === ProseTypography.bodyFont)
guard let style = attrs[.paragraphStyle] as? NSParagraphStyle else {
return // no paragraph style = natural line box — the point
}
#expect(style.lineHeightMultiple == 0) // set → would inflate the row
}
@Test func `heading ladder matches reading CSS`() {
let attributed = ProsePresenter.attribute("# H1\n\n## H2\n\n### H3\n\n#### H4")
let ns = attributed.string as NSString