0.7.0 — Scroll-away header & reading column
Highlights
Two big editor-layout features land in this release: an opt-in centered reading column with full-width table breakout (readingWidth), and a scroll-away header API — the engine can now host an embedder-supplied SwiftUI view above the document body that scrolls with the content and collapses to a pinned top row.
Main changes
- Reading column (
readingWidth) — opt-in fixed wrap width, centered by position (no re-wrap on resize); wide tables break out to the full window width like Google Docs (#60). - Scroll-away header —
NativeTextViewWrappergainsheader: AnyView?,headerCollapsedHeight: CGFloat, andheaderExpanded: Bool. The hosted view scrolls with the document, stays fully interactive, refreshes on every SwiftUI update, and animates between collapsed and expanded; composes withreadingWidth(#61). - Empty-document placeholder — new
placeholder: NSAttributedString?ghost text rendered at the first-line position inside the scrolled content: it sits below the header band, tracks its reveal animation, and hides on the first keystroke (#61). - Band-aware bottom overscroll — the header band counts toward the overscroll activation, so short documents under an expanded header can scroll the band away instead of pinning the caret to the viewport bottom; the comfortable slack stays viewport-based, so long documents behave exactly as before (#61).
- Spell-check suppression on code —
MarkdownASTStylerstamps.spellingState: 0on fenced code blocks and inlinecode, completing the existing convention (links, wiki-links, LaTeX, tables) (#64, thanks @Ender-Wang).
Breaking
- The scroll view's
documentViewis now always an engine-internal container view, never theNSTextViewitself. Embedders that reached intoscrollView.documentViewmust adapt. - The enclosing scroll view no longer applies a hard-coded
top: 55.4content inset; the default is0on every edge. Opt back in viaconfig.safeAreaInsets = SafeAreaInsets(top: …).
Bundled fixes
Height-neutral trailing empty line (typing on the last line at max overscroll no longer shifts the bottom scroll limit), scroll-to-reveal regressions in the reading column, header/body compositing during responsive scroll, live-resize scroll-position restoration.
Tests
swift test — 89 tests across 10 suites.
Full changelog: 0.6.0...0.7.0
What's Changed
- docs: update ARCHITECTURE.md for the AST pipeline by @luca-chen198 in #53
- Add opt-in readingWidth: full-width table breakout by @luca-chen198 in #60
- feat: stamp
.spellingState: 0on fenced code blocks and inlinecodeby @Ender-Wang in #64 - Scrolling header API for the markdown editor (+ live-scroll stability) by @Nicolas-Py in #61
New Contributors
- @Ender-Wang made their first contribution in #64
Full Changelog: 0.6.0...0.7.0