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 CHANGED
@@ -1,63 +1,81 @@
1
- # EpubReader
1
+ # epub-flow 📖
2
2
 
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
3
+ A premium, feature-rich EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.
4
4
 
5
- ## Code scaffolding
5
+ ## Features
6
6
 
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
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
- ```bash
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
- ng build epub-reader
19
+ npm install epub-flow ngx-editor epubjs
25
20
  ```
26
21
 
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
22
+ ## 🛠 Setup
28
23
 
29
- ### Publishing the Library
24
+ ### 1. Import EpubReaderModule
30
25
 
31
- Once the project is built, you can publish your library by following these steps:
26
+ Add `EpubReaderModule` to your `AppModule` or standalone component:
32
27
 
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/epub-reader
36
- ```
28
+ ```typescript
29
+ import { EpubReaderModule } from 'epub-flow';
37
30
 
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
42
-
43
- ## Running unit tests
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
- ## Running end-to-end tests
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
- For end-to-end (e2e) testing, run:
43
+ ## 📖 Usage
54
44
 
55
- ```bash
56
- ng e2e
45
+ ### Basic Usage
46
+ ```html
47
+ <epub-flow [epubUrl]="'assets/books/sample.epub'"></epub-flow>
57
48
  ```
58
49
 
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
60
-
61
- ## Additional Resources
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
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
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