epub-flow 0.0.1 → 0.0.3
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.
- package/README.md +62 -44
- package/epub-flow-0.0.3.tgz +0 -0
- package/fesm2022/epub-flow.mjs +158 -84
- package/fesm2022/epub-flow.mjs.map +1 -1
- package/lib/add-notes/add-notes.component.d.ts +3 -3
- package/lib/epub-common-popup/epub-common-popup.component.d.ts +5 -5
- package/lib/epub-notification/notification-toast.component.d.ts +14 -0
- package/lib/epub-notification/notification.service.d.ts +21 -0
- package/lib/epub-reader.module.d.ts +5 -8
- package/lib/reader-main/reader-main.component.d.ts +4 -4
- package/package.json +2 -4
- package/public-api.d.ts +2 -0
- package/epub-flow-0.0.1.tgz +0 -0
package/README.md
CHANGED
|
@@ -1,63 +1,81 @@
|
|
|
1
|
-
#
|
|
1
|
+
# epub-flow 📖
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A premium, feature-rich EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## ✨ Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- 📖 **Smooth Reading**: Powered by Epub.js for reliable rendering.
|
|
8
|
+
- 🌓 **Aesthetic Transitions**: Integrated Light and Dark modes with smooth color transitions.
|
|
9
|
+
- 📚 **Beautiful TOC**: Hierarchical Table of Contents with dot leaders and indentation.
|
|
10
|
+
- 🖼️ **Cover Preview**: Custom loading screen with pulse-animated book cover previews.
|
|
11
|
+
- 🏷️ **Annotations**: Support for highlights, notes, and bookmarks.
|
|
12
|
+
- 📱 **Responsive**: Mobile-first design that looks great on any screen size.
|
|
13
|
+
- 🔍 **Search**: Full-text search with highlighting in result snippets.
|
|
14
|
+
- 🛠️ **Configurable**: Toggle features like search, notes, font controls, etc.
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building
|
|
20
|
-
|
|
21
|
-
To build the library, run:
|
|
16
|
+
## 🚀 Installation
|
|
22
17
|
|
|
23
18
|
```bash
|
|
24
|
-
|
|
19
|
+
npm install epub-flow ngx-editor epubjs
|
|
25
20
|
```
|
|
26
21
|
|
|
27
|
-
|
|
22
|
+
## 🛠 Setup
|
|
28
23
|
|
|
29
|
-
###
|
|
24
|
+
### 1. Import EpubReaderModule
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
Add `EpubReaderModule` to your `AppModule` or standalone component:
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
cd dist/epub-reader
|
|
36
|
-
```
|
|
28
|
+
```typescript
|
|
29
|
+
import { EpubReaderModule } from 'epub-flow';
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
ng test
|
|
31
|
+
@NgModule({
|
|
32
|
+
imports: [
|
|
33
|
+
EpubReaderModule,
|
|
34
|
+
// ... other imports
|
|
35
|
+
]
|
|
36
|
+
})
|
|
37
|
+
export class AppModule { }
|
|
49
38
|
```
|
|
50
39
|
|
|
51
|
-
|
|
40
|
+
### 2. Required Styles
|
|
41
|
+
The package is designed to be standalone. You only need to ensure your global `styles.scss` is set up for your application. No external UI library styles are required.
|
|
52
42
|
|
|
53
|
-
|
|
43
|
+
## 📖 Usage
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
### Basic Usage
|
|
46
|
+
```html
|
|
47
|
+
<epub-flow [epubUrl]="'assets/books/sample.epub'"></epub-flow>
|
|
57
48
|
```
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
### Advanced Usage with Feature Toggles
|
|
51
|
+
```html
|
|
52
|
+
<epub-flow
|
|
53
|
+
[epubBlob]="currentBlob"
|
|
54
|
+
[coverPage]="'assets/cover.jpg'"
|
|
55
|
+
[enableDarkMode]="true"
|
|
56
|
+
[enableSearch]="true"
|
|
57
|
+
[enableHighlights]="true"
|
|
58
|
+
[enableBookmarks]="true"
|
|
59
|
+
[enableChapterList]="true"
|
|
60
|
+
[enableTextSelection]="true">
|
|
61
|
+
</epub-flow>
|
|
62
|
+
```
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
## ⚙️ Configuration (Inputs)
|
|
65
|
+
|
|
66
|
+
| Input | Type | Default | Description |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| `epubUrl` | `string` | `null` | URL to a remote EPUB file. |
|
|
69
|
+
| `epubBlob` | `Blob` | `null` | Local Blob or File object for direct loading. |
|
|
70
|
+
| `coverPage` | `string` | `null` | URL to a cover image displayed during loading. |
|
|
71
|
+
| `bookId` | `string \| number` | `0` | Unique ID for backend integration. |
|
|
72
|
+
| `enableDarkMode` | `boolean` | `true` | Toggle Dark Mode availability. |
|
|
73
|
+
| `enableSearch` | `boolean` | `true` | Toggle Search tool. |
|
|
74
|
+
| `enableHighlights` | `boolean` | `true` | Toggle Highlighting tools. |
|
|
75
|
+
| `enableBookmarks` | `boolean` | `true` | Toggle Bookmarking. |
|
|
76
|
+
| `enableChapterList` | `boolean` | `true` | Toggle Table of Contents. |
|
|
77
|
+
| `enableFontSize` | `boolean` | `true` | Toggle Font size controls. |
|
|
78
|
+
| `enableNotes` | `boolean` | `true` | Toggle Note creation. |
|
|
79
|
+
|
|
80
|
+
## 📄 License
|
|
81
|
+
MIT
|
|
Binary file
|