The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
## Changelog
### Added
#### Shared
* You can now use `DefaultHTTPClientDelegate.httpClient(_:request:didReceive:completion:)` to handle authentication challenges (e.g. Basic) with `DefaultHTTPClient`.
#### Navigator
* The `AudioNavigator` API has been promoted to stable and ships with a new Preferences API.
* The new `NavigatorDelegate.didFailToLoadResourceAt(_:didFailToLoadResourceAt:withError:)` delegate API notifies when an error occurs while loading a publication resource (contributed by [@ettore](https://github.com/readium/swift-toolkit/pull/400)).
### Fixed
* [#390](https://github.com/readium/swift-toolkit/issues/390) Fixed logger not logging above the minimum severity level (contributed by [@ettore](https://github.com/readium/swift-toolkit/pull/391)).
#### Navigator
* From iOS 13 to 15, PDF text selection is disabled on protected publications disabling the **Copy** editing action.
* The **Share** editing action is disabled for any protected publication.
* Fixed starting the TTS from the current EPUB position.
* [#396](https://github.com/readium/swift-toolkit/issues/396) Ensure we stop the activity indicator when an EPUB resource fails to load correctly (contributed by [@ettore](https://github.com/readium/swift-toolkit/pull/397)).
#### Streamer
* [#399](https://github.com/readium/swift-toolkit/discussions/399) Zipped Audio Books and standalone audio files are now recognized.
## Commits
* Adjust the audio session strategy for the `AudioNavigator` by @mickael-menu in https://github.com/readium/swift-toolkit/pull/357
* Fix Copy and Share editing actions by @mickael-menu in https://github.com/readium/swift-toolkit/pull/364
* Fix 367: Fix initial location when in landscape landscape by @chrfalch in https://github.com/readium/swift-toolkit/pull/368
* Fix TTS issue by @mickael-menu in https://github.com/readium/swift-toolkit/pull/369
* Add a new form-based bug report issue template by @mickael-menu in https://github.com/readium/swift-toolkit/pull/374
* Update file headers by @mickael-menu in https://github.com/readium/swift-toolkit/pull/378
* Initial pass at `Locator.Locations.time` by @domkm in https://github.com/readium/swift-toolkit/pull/382
* Preferences API for `AudioNavigator` by @mickael-menu in https://github.com/readium/swift-toolkit/pull/389
* Compare loggable SeverityLevel by its numeric (not string) value by @ettore in https://github.com/readium/swift-toolkit/pull/391
* Switch to pnpm by @mickael-menu in https://github.com/readium/swift-toolkit/pull/392
* Turn off spinner if spread doesn't begin loading by @ettore in https://github.com/readium/swift-toolkit/pull/397
* Sniff audio clips by @mickael-menu in https://github.com/readium/swift-toolkit/pull/403
* Use ReadiumGCDWebServer* symbols by @ettore in https://github.com/readium/swift-toolkit/pull/404
* Bubble up errors while loading Resources by @ettore in https://github.com/readium/swift-toolkit/pull/400
* Fix ReadiumGCDWebServer integration for CocoaPods and Carthage by @mickael-menu in https://github.com/readium/swift-toolkit/pull/406
* Handle authentication challenges with `DefaultHTTPClient` by @mickael-menu in https://github.com/readium/swift-toolkit/pull/409
* 2.7.0 by @mickael-menu in https://github.com/readium/swift-toolkit/pull/410
## New Contributors
* @domkm made their first contribution in https://github.com/readium/swift-toolkit/pull/382
* @ettore made their first contribution in https://github.com/readium/swift-toolkit/pull/391
**Full Changelog**: https://github.com/readium/swift-toolkit/compare/2.6.1...2.7.0
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
### Added
#### Navigator
* You can now customize the playback refresh rate of `_AudiobookNavigator` in its configuration.
* The EPUB navigator automatically moves to the next resource when VoiceOver reaches the end of the current one.
### Changed
#### Navigator
* You should not subclass `PDFNavigatorViewController` anymore. If you need to override `setupPDFView`, you can do so by implementing the `PDFNavigatorDelegate` protocol.
### Fixed
#### Shared
* Zipped Audio Book archives are now detected even if they contain bitmap entries.
#### Navigator
* [#344](https://github.com/readium/swift-toolkit/issues/344) EPUB: Fixed lost position when rotating quickly the screen several times.
* [#350](https://github.com/readium/swift-toolkit/discussions/350) Restore the ability to subclass the `PDFNavigatorViewController`.
* Fixed activating the scroll mode when VoiceOver is enabled in the EPUB navigator.
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
* Support for Xcode 15.
### Added
#### Navigator
* The `PublicationSpeechSynthesizer` (TTS) now supports background playback by default.
* You will need to enable the **Audio Background Mode** in your app's build info.
* Support for non-linear EPUB resources with an opt-in in reading apps (contributed by @chrfalch in [#332](https://github.com/readium/swift-toolkit/pull/332) and [#331](https://github.com/readium/swift-toolkit/pull/331)).
1. Override loading non-linear resources with `VisualNavigatorDelegate.navigator(_:shouldNavigateToLink:)`.
2. Present a new `EPUBNavigatorViewController` by providing a custom `readingOrder` with only this resource to the constructor.
### Fixed
#### Navigator
* Improved performance when adding hundreds of HTML decorations at once.
* Fixed broadcasting the `PublicationSpeechSynthesizer` with AirPlay when the screen is locked.
### Changed
#### Navigator
* `AudioSession` and `NowPlayingInfo` are now stable!
* You need to provide the configuration of the Audio Session to the constructor of `PublicationSpeechSynthesizer`, instead of `AVTTSEngine`.
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
* The Readium toolkit now requires iOS 11.0+.
### Added
#### Navigator
* The `auto` spread setting is now available for fixed-layout EPUBs. It will display two pages in landscape and a single one in portrait.
#### Streamer
* The EPUB content iterator now returns `audio` and `video` elements and fill in the `progression` and `totalProgression` locator properties.
### Changed
#### Navigator
* `EPUBNavigatorViewController.firstVisibleElementLocator()` now returns the first *block* element that is visible on the screen, even if it starts on previous pages.
* This is used to make sure the user will not miss any context when restoring a TTS session in the middle of a resource.
### Fixed
#### Navigator
* Fixed the PDF `auto` spread setting and scaling pages when rotating the screen.
* Fixed navigating to the first chapter of an audiobook with a single resource (contributed by [@grighakobian](https://github.com/readium/swift-toolkit/pull/292)).
* Prevent auto-playing videos in EPUB publications.
* Fixed various memory leaks and data races.
* The `WKWebView` is now inspectable again with Safari starting from iOS 16.4.
* Fixed crash in the `PublicationSpeechSynthesizer` when closing the navigator without stopping it first.
* Fixed pausing the `PublicationSpeechSynthesizer` right before starting the utterance.
* Fixed the audio session kept opened while the app is in the background and paused.
* Fixed the **Attribute dir redefined** error when the EPUB resource already has a `dir` attribute.
* [#309](https://github.com/readium/swift-toolkit/issues/309) Fixed restoring the EPUB location when the application was killed in the background (contributed by [@triin-ko](https://github.com/readium/swift-toolkit/pull/311)).
#### Streamer
* Fix issue with the TTS starting from the beginning of the chapter instead of the current position.
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
### Added
#### Streamer
* Positions computation, TTS and search is now enabled for Readium Web Publications conforming to the [EPUB profile](https://readium.org/webpub-manifest/profiles/epub.html).
#### Navigator
* New `VisualNavigatorDelegate` APIs to handle keyboard events (contributed by [@lukeslu](https://github.com/readium/swift-toolkit/pull/267)).
* This can be used to turn pages with the arrow keys, for example.
* [Support for custom fonts with the EPUB navigator](Documentation/Guides/EPUB%20Fonts.md).
* A brand new user preferences API for configuring the EPUB and PDF Navigators. This new API is easier and safer to use. To learn how to integrate it in your app, [please refer to the user guide](Documentation/Guides/Navigator%20Preferences.md) and [migration guide](Documentation/Migration%20Guide.md).
* New EPUB user preferences:
* `fontWeight` - Base text font weight.
* `textNormalization` - Normalize font style, weight and variants, which improves accessibility.
* `imageFilter` - Filter applied to images in dark theme (darken, invert colors)
* `language` - Language of the publication content.
* `readingProgression` - Direction of the reading progression across resources, e.g. RTL.
* `typeScale` - Scale applied to all element font sizes.
* `paragraphIndent` - Text indentation for paragraphs.
* `paragraphSpacing` - Vertical margins for paragraphs.
* `hyphens` - Enable hyphenation.
* `ligatures` - Enable ligatures in Arabic.
* New PDF user preferences:
* `backgroundColor` - Background color behind the document pages.
* `offsetFirstPage` - Indicate if the first page should be displayed in its own spread.
* `pageSpacing` - Spacing between pages in points.
* `readingProgression` - Direction of the reading progression across resources, e.g. RTL.
* `scrollAxis` - Scrolling direction when `scroll` is enabled.
* `scroll` - Indicate if pages should be handled using scrolling instead of pagination.
* `spread` - Enable dual-page mode.
* `visibleScrollbar` - Indicate whether the scrollbar should be visible while scrolling.
* The new `DirectionalNavigationAdapter` component helps you to turn pages with the arrows and space keyboard keys or taps on the edge of the screen.
### Deprecated
#### Streamer
* `PublicationServer` is deprecated. See the [the migration guide](Documentation/Migration%20Guide.md#2.5.0) to migrate the HTTP server.
#### Navigator
* The EPUB `UserSettings` component is deprecated and replaced by the new Preferences API. [Take a look at the user guide](Documentation/Guides/Navigator%20Preferences.md) and [migration guide](Documentation/Migration%20Guide.md).
### Changed
#### Navigator
* The `define` editing action replaces `lookup` on iOS 16+. When enabled, it will show both the "Look Up" and "Search Web" menu items.
* Prevent navigation in the EPUB while it is being loaded.
### Fixed
#### Navigator
* Fixed a race condition issue with the `AVTTSEngine`, when pausing utterances.
* Fixed crash with `PublicationSpeechSynthesizer`, when the currently played word cannot be resolved.
* Fixed EPUB tap event sent twice when using a mouse (e.g. on Apple Silicon or with a mouse on an iPad).
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
### Added
#### Shared
* Support for the accessibility metadata in RWPM per [Schema.org Accessibility Properties for Discoverability Vocabulary](https://www.w3.org/2021/a11y-discov-vocab/latest/).
* [Extract the raw content (text, images, etc.) of a publication](Documentation/Guides/Content.md).
#### Navigator
* [A brand new text-to-speech implementation](Documentation/Guides/TTS.md).
#### Streamer
* Parse EPUB accessibility metadata ([see documentation](https://readium.org/architecture/streamer/parser/a11y-metadata-parsing)).
### Deprecated
#### Shared
* `Locator(link: Link)` is deprecated as it may create an incorrect `Locator` if the link `type` is missing.
* Use `publication.locate(Link)` instead.
### Fixed
* [#244](https://github.com/readium/swift-toolkit/issues/244) Fixed build with Xcode 14 and Carthage/CocoaPods.
#### Navigator
* Fixed memory leaks in the EPUB and PDF navigators.
* [#61](https://github.com/readium/swift-toolkit/issues/61) Fixed serving EPUB resources when the HREF contains an anchor or query parameters.
* Performance issue with EPUB fixed-layout when spreads are enabled.
* Disable scrolling in EPUB fixed-layout resources, in case the viewport is incorrectly set.
* Fix vertically bouncing EPUB resources in iOS 16.
#### Streamer
* Fixed memory leak in the `PublicationServer`.
#### LCP
* The LCP authentication dialog is now fully localized and supports Dark Mode (contributed by [@openm1nd](https://github.com/readium/swift-toolkit/pull/50)).
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
### Added
#### Shared
* Get the sanitized `Locator` text ready for user display with `locator.text.sanitized()`.
* A new `Publication.conforms(to:)` API to identify the profile of a publication.
* Support for the [`conformsTo` RWPM metadata](https://github.com/readium/webpub-manifest/issues/65), to identify the profile of a `Publication`.
* Support for right-to-left PDF documents by extracting the reading progression from the `ViewerPreferences/Direction` metadata.
* HTTP client:
* A new `HTTPClient.download()` API to download HTTP resources to a temporary location.
* `HTTPRequest` and `DefaultHTTPClient` take an optional `userAgent` property to customize the user agent.
#### Navigator
* The new `NavigatorDelegate.navigator(_:didJumpTo:)` API is called every time the navigator jumps to an explicit location, which might break the linear reading progression.
* For example, it is called when clicking on internal links or programmatically calling `Navigator.go(to:)`, but not when turning pages.
* You can use this callback to implement a navigation history by differentiating between continuous and discontinuous moves.
### Deprecated
#### Shared
* `Publication.format` is now deprecated in favor of the new `Publication.conforms(to:)` API which is more accurate.
* For example, replace `publication.format == .epub` with `publication.conforms(to: .epub)` before opening a publication with the `EPUBNavigatorViewController`.
### Changed
#### LCP
* The `LCPService` now uses a provided `HTTPClient` instance for all HTTP requests.
### Fixed
#### Navigator
* [#14](https://github.com/readium/swift-toolkit/issues/14) Backward compatibility (iOS 10+) of JavaScript files is now handled with Babel.
* Throttle the reload of EPUB spreads to avoid losing the position when the reader gets back to the foreground.
#### LCP
* Fixed the notification of acquisition progress.
[Take a look at the migration guide](Documentation/Migration%20Guide.md)
### Added
#### Shared
* Support for Paragraph Margins user setting.
#### Navigator
* A new `translate` EPUB and PDF editing action is available for iOS 15.
### Fixed
#### Shared
* Improved performances of the search service used with EPUB.
#### Navigator
* Fixed turning pages of an EPUB reflowable resource with an odd number of columns. A virtual blank trailing column is appended to the resource when displayed as two columns.