Skip to content

Releases: jtCodes/EPUBReaderSwiftUI

v1.2.0

Choose a tag to compare

@jtCodes jtCodes released this 11 Apr 18:42
fc55327

Highlights

  • Added first-class highlighting support, including a built-in highlight edit popover.
  • Added highlight notes support.
  • Added full bookmarks support (toggle, list, navigate, delete, count badge, and richer metadata).
  • Improved reader overlay behavior and UX, including preventing overlay toggles when tapping highlights.
  • Updated default overlay font controls to a two-step interaction (show slider only after explicit tap).

Added

  • Highlight model and wiring in the reader flow.
  • Built-in highlight edit sheet/popover.
  • Note field support for highlights.
  • Bookmark model and reader actions:
    • Toggle bookmark at current location.
    • Bookmark list sheet with navigate/delete.
    • Bookmark count badge and current-page bookmark state.
    • Better chapter/title and text preview handling.

Changed

  • Default overlay top and bottom bars were redesigned for a cleaner layout.
  • Font sizing controls were compacted and then updated to a two-step reveal pattern.
  • Interaction handling now suppresses accidental overlay toggles on highlight taps.

Documentation

  • README updates to reflect new highlighting/bookmark capabilities and behavior changes.

Commits Included

  • 263140a - Update EPUBReaderSwiftUI.swift
  • a108b6e - Update EPUBReaderSwiftUI.swift
  • e6232a9 - Add bookmarks support to EPUB reader
  • 4be2794 - Update README.md
  • 958f459 - Suppress overlay toggle on highlight taps
  • 03a0d04 - Add note support to EPUB highlights
  • 7b98e0f - Add default highlight edit sheet and popover
  • 9cbe480 - Add highlight support to EPUBReaderSwiftUI
  • 6eb7a4c - Update README.md

v1.1.0

Choose a tag to compare

@jtCodes jtCodes released this 11 Apr 03:22
58efa0a

Release Notes — v1.1.0 (since v1.0.2)

Breaking Changes

  • EPUBReaderView is now generic: EPUBReaderView<Overlay, TOCView> — the struct has two type parameters for the overlay and TOC view. Existing call sites using the default overlay/TOC compile without changes thanks to constrained extensions, but if you stored the type explicitly (e.g. var reader: EPUBReaderView) you'll need to update it.
  • ReadingPreferences → EPUBReaderSwiftUIPreferences: The type is renamed. A public typealias ReadingPreferences = EPUBReaderSwiftUIPreferences is provided for backward compatibility, but consider migrating.
  • TableOfContentsView → DefaultEPUBReaderTOCView: Same treatment — typealias keeps old code compiling, but the canonical name changed.
  • TOCRow removed: The internal TOCRow helper struct is eliminated; its logic is inlined into DefaultEPUBReaderTOCView.
  • loadEPUB(from:initialLocator:) → loadEPUB(source:initialLocator:): The view-model load method now takes an EPUBSource enum instead of a raw URL. This is internal API but relevant if you subclassed or called the VM directly.

New Public API

Symbol Kind Description
EPUBSource enum .fileURL(URL) / .remoteURL(String, useCache:) — unified input for local and remote EPUBs.
EPUBReaderOverlayContext struct Bundles all reader state & actions (title, author, currentLocator, showControls, fontSize, close(), showTableOfContents(), toggleControls(), goToProgression(_:)) for custom overlays.
EPUBReaderTOCContext struct Bundles TOC state & actions (tableOfContents, currentLocator, navigateToLink(_:), dismiss()) for custom TOC views.
DefaultEPUBReaderOverlay View The built-in overlay, now a standalone public view you can reuse or wrap.
DefaultEPUBReaderTOCView View The built-in TOC, also extracted as a standalone public view.
EPUBReaderSwiftUILocator typealias = Locator — lets consumers avoid import ReadiumShared.
EPUBReaderSwiftUILink typealias = ReadiumShared.Link — same convenience.
goToProgression(_:) VM method Navigate to an arbitrary 0…1 overall progression.

New Initializers on EPUBReaderView

All existing init(url:…) / init(remoteURL:…) / init(source:…) signatures still work unchanged (constrained extensions default Overlay and TOCView). New overloads add:

// Custom overlay only (default TOC)
init(source:…, overlay:)
init(remoteURL:…, overlay:)
init(url:…, overlay:)

// Custom overlay + custom TOC
init(source:…, overlay:, tocView:)
init(remoteURL:…, overlay:, tocView:)
init(url:…, overlay:, tocView:)

Both overlay and tocView closures are @ViewBuilder and receive their respective context struct.

Other Changes

  • ReadiumShared is re-exported (@_exported import) — consumers no longer need an explicit import ReadiumShared for Locator, Link, etc.
  • loadingMessage is now @Published on the view model, so the loading screen shows "Downloading EPUB…" vs "Loading EPUB…" depending on the source.
  • Remote EPUB support baked into EPUBReaderView — pass a remoteURL: string directly; the view handles download, caching, and error states internally (no more manual EPUBDownloader dance required at the call site).

Migration Checklist

  1. Replace explicit ReadingPreferences with EPUBReaderSwiftUIPreferences (or keep using the typealias).
  2. Replace explicit TableOfContentsView(tableOfContents:onSelectLink:) with DefaultEPUBReaderTOCView(context:) if you were constructing it manually.
  3. If you want the old behavior with zero UI changes, no action needed — the default-overlay/default-TOC constrained extensions match the old signatures exactly.

1.0.2

Choose a tag to compare

@jtCodes jtCodes released this 05 Nov 03:44
30278ce

What's Changed

  • Add caching option to EPUB download method by @jtCodes in #1

New Contributors

Full Changelog: v1.0.1...v1.0.2

1.0.1

Choose a tag to compare

@jtCodes jtCodes released this 05 Nov 02:26

Full Changelog: v1.0.0...v1.0.1

1.0.0

Choose a tag to compare

@jtCodes jtCodes released this 25 Oct 16:11
24be9ff
Enhance README with images and updated description

Added images and refined project description.