@dr33m/react-native-readium 5.0.0-rc.18 → 5.0.0-rc.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -3
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -1,12 +1,46 @@
1
1
  # react-native-readium
2
2
 
3
- [![NPM version](https://img.shields.io/npm/v/react-native-readium.svg?color=success&label=npm%20package&logo=npm)](https://www.npmjs.com/package/react-native-readium)
3
+ > **This is a fork of [5-stones/react-native-readium](https://github.com/5-stones/react-native-readium) maintained on the [`open-citadel-main`](https://github.com/dr-33-m/react-native-readium/tree/open-citadel-main) branch for the [Open Citadel](https://github.com/dr-33-m/open-citadel) project.**
4
+ > Published to npm as [`@dr33m/react-native-readium`](https://www.npmjs.com/package/@dr33m/react-native-readium).
5
+ >
6
+ > See [What this fork adds](#what-this-fork-adds) for the full list of changes on top of upstream.
7
+
8
+ [![NPM version](https://img.shields.io/npm/v/%40dr33m%2Freact-native-readium/next.svg?color=success&label=npm%20package&logo=npm)](https://www.npmjs.com/package/@dr33m/react-native-readium)
4
9
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
5
10
  ![PRs welcome!](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
6
11
  ![This project is released under the MIT license](https://img.shields.io/badge/license-MIT-blue.svg)
7
12
 
8
13
  ---
9
14
 
15
+ ## What this fork adds
16
+
17
+ This fork is built on top of `5.0.0-rc.17` of the upstream package and adds the following on the `open-citadel-main` branch:
18
+
19
+ ### Text-to-Speech (TTS)
20
+
21
+ Full TTS support for EPUB books on Android and iOS:
22
+
23
+ - **Android** — powered by the Readium `readium-navigator-media-tts` module, which uses the platform `TextToSpeech` engine (no ExoPlayer dependency).
24
+ - **iOS** — powered by `AVSpeechSynthesizer` via the Readium Swift Toolkit's `PublicationSpeechSynthesizer`.
25
+ - New prop **`tts`** — pass a `TTSConfig` object to start, stop, pause, resume, or seek TTS playback.
26
+ - New callback **`onTTSStateChange`** — fires whenever TTS state changes (`playing`, `paused`, `stopped`).
27
+ - New callback **`onTTSLocatorChange`** — fires with the current `Locator` as TTS advances through the book, allowing the UI to follow along.
28
+ - New callback **`onTTSError`** — fires with an error message if TTS fails to initialise or encounters a read error.
29
+
30
+ ### Android Storage Access Framework (SAF) support
31
+
32
+ `ReaderService.openPublication` now accepts `content://` URIs (Android SAF) in addition to raw file paths. The display name is resolved from the content resolver so bookId and file extension are always correctly extracted.
33
+
34
+ ### EPUB-only routing
35
+
36
+ PDF support has been removed from this fork (it was experimental and caused crashes). Only EPUB publications are opened; any other format logs a warning and returns gracefully. `pdfFactory` is explicitly set to `null` in `DefaultPublicationParser`.
37
+
38
+ ### Readium Kotlin Toolkit bump
39
+
40
+ Android native dependencies updated to `readium-kotlin-toolkit 3.1.2` (from `3.1.0` in upstream rc.17). The `readium-adapter-pdfium` dependency is removed entirely.
41
+
42
+ ---
43
+
10
44
  ## Have A Bug/Feature You Care About?
11
45
 
12
46
  We :heart: open source. We work on the things that are important to us when
@@ -60,13 +94,13 @@ This library uses [Nitro Modules](https://nitro.margelo.com/) and supports both
60
94
  **NPM**
61
95
 
62
96
  ```sh
63
- npm install react-native-readium react-native-nitro-modules
97
+ npm install @dr33m/react-native-readium@next react-native-nitro-modules
64
98
  ```
65
99
 
66
100
  **Yarn**
67
101
 
68
102
  ```sh
69
- yarn add react-native-readium react-native-nitro-modules
103
+ yarn add @dr33m/react-native-readium@next react-native-nitro-modules
70
104
  ```
71
105
 
72
106
  #### iOS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dr33m/react-native-readium",
3
- "version": "5.0.0-rc.18",
3
+ "version": "5.0.0-rc.19",
4
4
  "description": "A react-native wrapper for https://readium.org/",
5
5
  "main": "lib/src/index",
6
6
  "types": "lib/src/index.d.ts",
@@ -61,7 +61,12 @@
61
61
  "e-reader",
62
62
  "read"
63
63
  ],
64
- "repository": "http://github.com/5-stones/react-native-readium",
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "https://github.com/dr-33-m/react-native-readium.git",
67
+ "directory": ".",
68
+ "branch": "open-citadel-main"
69
+ },
65
70
  "author": "Jacob Spizziri <jspizziri@weare5stones.com> (https://github.com/jspizziri)",
66
71
  "license": "MIT",
67
72
  "bugs": {