Repository navigation
Releases
Releases · ripulio/swift-markdown-ui
MarkdownUI 2.5.1 — iOS List Link Fix, Swift 6 Sendable & OSS Polish
MarkdownUI 2.5.1 is a maintenance, Swift 6 concurrency, and open-source polish release on top of 2.5.0 (ripulio/swift-markdown-ui, maintained by Ripul).
1-Line Upgrade from Upstream 2.4.1
.package(url: "https://github.com/ripulio/swift-markdown-ui", from: "2.5.1")What's New in 2.5.1
- iOS list link hit-testing fix: On iOS, SwiftUI's
.textSelection(.enabled)expands each selectableTextresponder by±16 pt, which caused a following list item to eclipse links on the item above it. Lists containing a link above another item or sibling block now automatically disable.textSelectionon that list on iOS (hasOccludedListLink), leaving prose, link-free lists, and trailing-link lists unchanged. - Swift 6
Sendablesupport:MarkdownContent(and its underlyingBlockNodeAST types) now conform toSendablefor clean background-actor parsing, andThemeconforms to@unchecked Sendable(incorporating upstream#351). - Upgraded
Examples/BenchmarkApp: Measures attachedUIWindow/NSWindowhosts across settle ticks and compares.chat,.basic, and.gitHubdirectly against a closure-basedLegacy 2.4.1baseline and plainSwiftUI.Text. - Expanded documentation & community files: Added Light/Dark
Theme.chatRetina visuals, a new DocCChatAndStreamingguide,ARCHITECTURE.md,CHANGELOG.md,CONTRIBUTING.md, updated GitHub issue templates, and fixed DocC typos (upstream#354).
MarkdownUI 2.5.0 — Single-Pass Layout, Theme.chat & 120 Hz Streaming
MarkdownUI 2.5.0 is an actively maintained, 100% source-compatible continuation of gonzalezreal/swift-markdown-ui (2.4.1) with single-pass native SwiftUI layout, zero post-mount scroll jumps, and 120 Hz AI/LLM token streaming.
1-Line Upgrade from 2.4.1
.package(url: "https://github.com/ripulio/swift-markdown-ui", from: "2.5.0")Keep import MarkdownUI — all existing Theme, BlockStyle, and TextStyle APIs work unchanged.
Highlights
- 3×–10× faster settled layout out of the box —
Theme.basic,Theme.gitHub, andTheme.docCnow use declarative block margins, headings, paragraphs, and list items, unlocking single-passDirectBlockSequenceView+ParagraphStackLayoutautomatically with pixel and height parity against upstream2.4.1(and automatic fallback for custom.markdownBlockStyle(...)closures). - Measured on iPhone 15 Pro Max (
400ptwidth) — Settled layout dropped from 28.9 ms → 4.6 ms on a rich AI reply, 22.8 ms → 3.5 ms on a 16-item bullet list, and 30.1 ms → 3.0 ms on a 15×3 GFM table. - New
Theme.chatpreset — Purpose-built for AI assistants and messaging UIs (Markdown(reply).markdownTheme(.chat)): compact single-pass prose, headered code cards, accented callout blockquotes, and viewport-aware horizontal-scrolling GFM tables (AdaptiveTableLayout+ shape-batched borders and alternating stripes). - Zero scroll jumps & upstream bug fixes — Eliminates
GeometryReader/PreferenceKeyheight corrections, fixes newline-heavy paragraph hangs (upstream#312), dropped whitespace after styled spans (#402), inline/mixed image rendering (#420/#439), and preserves streaming child view state via structuralmarkdownBlockPathidentity. - Interactive
Examples/BenchmarkApp— New iOS + macOS app with live latency runner, 120 Hz streaming simulator, and theme gallery. - DocC & CI modernized — Added
.spi.ymlfor Swift Package Index DocC hosting and updated GitHub Actions CI tomacos-15.