feat: add CBZ and DiViNa comic support#155
Open
ddfreiling wants to merge 22 commits into
Open
Conversation
Adds comic reading on iOS via the existing EPUB fixed-layout navigator (upstream deprecated CBZNavigatorViewController in favour of it), plus the shared Dart plumbing so the public API treats comics consistently. CBZ (raw image archive): - Publication.conformsToReadiumDivina helper (CBZ parses to the DiViNa profile). - B&W comic mode now covers the FXL page image (body > img) in addition to Nota's bespoke EPUB comic DOM; EPUBReaderView propagates the CSS vars into the FXL blob-iframe via window.spread.eval for divina publications. DiViNa narrated comic (Guided Navigation): - containsGuidedNavigation / isAudioBook now recognise DiViNa, not only EPUB, so a DiViNa carrying a guided-navigation document drives the existing media-overlay audio pipeline (audioref/textref -> audio reading order + page-synced text locators). Panel zoom is intentionally out of scope here; imgref #xywh regions are carried in the asset for that follow-up. - bin/make_comic_divina.py converts the EPUB+MO comic webpub into a native DiViNa + guided-navigation package. Example app (smoke-test target): .cbz/.divina added to the asset allowlist, "Comic" book-format label, and the generated test assets. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- sample_comic.cbz: synthetic 3-page CBZ for the raw-image path. - 50272-nota-comics.divina: the Nota narrated comic re-expressed as a DiViNa + Guided Navigation package, generated from 50272-nota-comics.webpub via bin/make_comic_divina.py (see example/assets/pubs/README.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- bin/download_sample_fixtures: downloads fat sample fixtures (Pepper & Carrot ep01 as CBZ, CC-BY 4.0) that are excluded from the repo via .gitignore. Packages individual low-res JPEGs from peppercarrot.com into a CBZ with ComicInfo.xml. Idempotent; --force to re-download. - sample_comic.cbz: regenerated with realistic 600×900 page dimensions and ComicInfo.xml (title, series, author). The previous 100×150 size caused exaggerated letterboxing in the FXL spread. - toc.page.dart: replace "[NO_TITLE]" fallback with basenameWithoutExtension of the href so image-only publications (CBZ, DiViNa) show readable page identifiers instead of a literal placeholder. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
was not implemented upstream (but is in swift-toolkit)
…-ffb425 * origin/main: chore: reduce claude.md size chore: make vscode recognize web test files chore: allow Claude Code to launch example web app via Claude_preview fix(iOS): observed crash issue when starting MO playback
ts-toolkit ships no DiViNa/image navigator — WebPubNavigator builds an HTML iframe per resource and throws on non-HTML media types. Fill the gap with a minimal FlutterDivinaNavigator that pages through reading-order images one <img> at a time. - New FlutterDivinaNavigator: image pager with RTL awareness, position list, locator emission, and destroy() cleanup. Mirrors the VisualNavigatorLike interface so ReadiumReader drives it uniformly. - ReadiumReader: route conformsToDivina publications to the new navigator through a _comicNav / _visualNav indirection; all navigation methods (goTo, goRight/Left/Forward/Backward, goToProgression) work for DiViNa. - Example: add test-divina fixture (manifest + images + guided-navigation.json) and register it in webManifestList.json. Guided Navigation (audio sync) is not yet wired — render-only for now; the fixture includes a guided-navigation.json for the follow-up commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire guided-navigation audio support for the web DiViNa navigator, matching the page-level playback that native (iOS/Android) supports. - openPublication: detect guided-navigation.json at DiViNa open time using the existing detectGuidedNavigation() helper. - audioEnable: when _comicNav is active (DiViNa), branch to a page-only sync callback instead of the EPUB iframe path. - _syncDivinaToMediaOverlayLocator: new helper that navigates the FlutterDivinaNavigator to the page identified by textLocator.href on each audio cue advance. Panel-level xywh fragments are present in the locator but not acted on (no zoom implemented yet). - stop(): clear _lastMediaOverlayLocatorKey unconditionally for any guided-nav publication; restrict applyDecorations to EPUB (_nav) only. The full guided-navigation audio pipeline reuses the existing initializeGuidedNavigationNavigator / FlutterAudioNavigator path — only the visual-sync callback is different. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Not sure about the failing test? |
Carry Guided Navigation imgref xywh panel regions through sync narration locators so comic navigators can frame narration cues.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add pure comic transform helpers, gesture-driven zoom and pan in the DiViNa navigator, and audio cue auto-pan support for panel regions.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the Flutter API and web bridge for toggling DiViNa comic auto-pan, surface narration sync state, and show a re-sync control in the example app.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
supports client-controlled re-sync, when taking manual control of panning
includes tests and better improved teardown
* main: ci: use temurin distribution for java builds ci(web): build the web reader bundle (/readiumReader.js) in CI ci: build webview helpers in all native pipelines via shared action ci(ios): align build-ios DerivedData cache key with integration test fix(ios): build webview helper assets in CI; guard missing-asset crash ci(ios): collect crash logs from failed integration tests ci(ios): use expanded reporter fix(ios): ttsEnable was not awaited properly ci: ensure gradle wrapper is created before tests ci: fix missing dependencies in test workflow chore: more branch safety mechanisms chore: update changelog chore: update documentation chore: update CI test workflow chore: add tests for fontSize issue fix!: EPUBPreferences.fontSize is now a double ratio, not a percentage int chore: resolve bin/install issue with older npm versions chore(claude): instructions on finising worktree branches fix: EpubColumnCount should serialize correctly for all platforms chore: minor cleanup of build scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.