{"_id":"b-epub","_rev":"4-8d0451bcbaf6f2a95ac07c379722236f","name":"b-epub","dist-tags":{"latest":"0.0.19"},"versions":{"0.0.16":{"name":"b-epub","version":"0.0.16","_id":"b-epub@0.0.16","maintainers":[{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"}],"dist":{"shasum":"903313f9ea00524fb21076a81c256e59e6239a7f","tarball":"https://registry.npmjs.org/b-epub/-/b-epub-0.0.16.tgz","fileCount":23,"integrity":"sha512-AgwIKgELw+iLzkc3a8WOQEuI9WVcKGdNoPDC6gJE8BJMj7u7QtN3ofHL852iFCvkeJ5L/6XVwldfg5fS7ptc0A==","signatures":[{"sig":"MEUCIB8VpM/2La+u7jMTeCN/4onFmaKQ+bdDCLtvoQdd1pYnAiEA2UNazBSlnacR7Cb/DE5b6kzEErtbv9lnYBZNUxHJhi4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":596013},"module":"fesm2022/b-epub.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/b-epub.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"0425011795e7d89c49d37b3578380021d89c0bce","typings":"index.d.ts","_npmUser":{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"},"_npmVersion":"10.9.2","description":"A premium, feature-rich, and fully responsive EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.","directories":{},"sideEffects":false,"_nodeVersion":"22.15.1","dependencies":{"tslib":"^2.3.0","epubjs":"^0.3.93"},"_hasShrinkwrap":false,"peerDependencies":{"ngx-editor":">=19.0.0-beta.1","@angular/cdk":"^19.0.0","@angular/core":"^19.2.0","@angular/common":"^19.2.0"},"_npmOperationalInternal":{"tmp":"tmp/b-epub_0.0.16_1768294460999_0.05762274109175758","host":"s3://npm-registry-packages-npm-production"}},"0.0.17":{"name":"b-epub","version":"0.0.17","_id":"b-epub@0.0.17","maintainers":[{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"}],"dist":{"shasum":"64320b38cc86e3ec3ee7df6e594d4e85627c7610","tarball":"https://registry.npmjs.org/b-epub/-/b-epub-0.0.17.tgz","fileCount":23,"integrity":"sha512-CtYjf+miyfHhqfkGUjPY2Zym++3ClkdU7tmmeRy7SlxLg5SdD9J2cngnzA7xgR23sWF/dtGOL3EfFeVF18DB1Q==","signatures":[{"sig":"MEQCICOy/zEcuuVCgvrlJOfFzW6FdUtQYWFDufadMWFktbd/AiADPRw+Pc2EW1MQXfhzP3mEjBudl2aVsM4Jc13WiFcPcw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":596092},"module":"fesm2022/b-epub.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/b-epub.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"0425011795e7d89c49d37b3578380021d89c0bce","typings":"index.d.ts","_npmUser":{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"},"_npmVersion":"10.8.2","description":"A premium, feature-rich, and fully responsive EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.","directories":{},"sideEffects":false,"_nodeVersion":"18.20.8","dependencies":{"tslib":"^2.3.0","epubjs":"^0.3.93"},"_hasShrinkwrap":false,"peerDependencies":{"ngx-editor":">=16.0.0","@angular/cdk":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@angular/core":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@angular/common":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/b-epub_0.0.17_1768389698821_0.17689512831346899","host":"s3://npm-registry-packages-npm-production"}},"0.0.18":{"name":"b-epub","version":"0.0.18","_id":"b-epub@0.0.18","maintainers":[{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"}],"dist":{"shasum":"15e8583a9039374f9f5368614ae87e4d31cabe1e","tarball":"https://registry.npmjs.org/b-epub/-/b-epub-0.0.18.tgz","fileCount":23,"integrity":"sha512-WMKqgWEFMqeNa6x+aPNo0qhrWPsFgRu4uMqjd+judz5AuDy4BjLbN0RCFlgmg7boOYMlXxBHTUTxT+rPjJGldg==","signatures":[{"sig":"MEQCIDubwX/O6Vmga1/k3TWfb+jqqDWoyhXcrzn2jAHExSqPAiAN7Bui2BiW8R8XczXgHxOmmRep9gzNGjVg9nztHAUdZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":596083},"module":"fesm2022/b-epub.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/b-epub.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"0425011795e7d89c49d37b3578380021d89c0bce","typings":"index.d.ts","_npmUser":{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"},"_npmVersion":"10.8.2","description":"A premium, feature-rich, and fully responsive EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.","directories":{},"sideEffects":false,"_nodeVersion":"18.20.8","dependencies":{"tslib":"^2.3.0","epubjs":"^0.3.93"},"_hasShrinkwrap":false,"peerDependencies":{"ngx-editor":">=16.0.0","@angular/cdk":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@angular/core":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@angular/common":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/b-epub_0.0.18_1768395573879_0.5657157704504634","host":"s3://npm-registry-packages-npm-production"}},"0.0.19":{"name":"b-epub","version":"0.0.19","peerDependencies":{"@angular/common":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@angular/core":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","@angular/cdk":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","ngx-editor":">=16.0.0"},"dependencies":{"tslib":"^2.3.0","epubjs":"^0.3.93"},"sideEffects":false,"module":"fesm2022/b-epub.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/b-epub.mjs"}},"_id":"b-epub@0.0.19","gitHead":"4a65b2be0ceb7b664df2513b55e52790e78019e8","description":"A premium, feature-rich, and fully responsive EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-PsouIRuM763cGelkOOmm2C7ByK+5fa/o1z6ujwu8h2uMJWR/ZVJmHSSfk/Fp7xQ0/88SI9lGHFa1+uASlRwgsQ==","shasum":"24ba2300ce1e6bcbfe3e720e37830f89bf7f86be","tarball":"https://registry.npmjs.org/b-epub/-/b-epub-0.0.19.tgz","fileCount":23,"unpackedSize":596083,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQyKYlOaBdfmAbSNJ7jcYb/ncn3GInmfJwNgRb6vSjjQIhAMSkntMM2s2/ryKuuMcPFS4MDBhD1YRJIFuYH/UjhmAh"}]},"_npmUser":{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"},"directories":{},"maintainers":[{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/b-epub_0.0.19_1768471530901_0.7187533954014176"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-13T08:54:20.998Z","modified":"2026-01-15T10:05:31.204Z","0.0.16":"2026-01-13T08:54:21.204Z","0.0.17":"2026-01-14T11:21:39.050Z","0.0.18":"2026-01-14T12:59:34.031Z","0.0.19":"2026-01-15T10:05:31.091Z"},"description":"A premium, feature-rich, and fully responsive EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.","maintainers":[{"name":"brandoptics_developer","email":"brandopticsprojects@gmail.com"}],"readme":"# b-epub 📖\n\nA premium, feature-rich, and fully responsive EPUB reader library for Angular applications. Built with performance, aesthetics, and ease of use in mind.\n\n## ✨ Features\n\n- **📖 Smooth Reading**: Powered by `epub.js` for reliable and high-performance rendering.\n- **📱 Fully Responsive**: Optimized mobile-first design that adapts flawlessly to phones, tablets, and desktops.\n- **🔒 Free Sample Mode**: Built-in support for restricting content (by percentage or pages) with a premium \"Preview End\" modal and call-to-actions.\n- **💎 Premium Aesthetics**: Modern glassmorphism UI, smooth animations, and refined typography.\n- **🌓 Aesthetic Dark Mode**: Deeply integrated dark mode with `rgb(32 33 32)` background for eye comfort.\n- **🖋️ Rich Text Notes**: Integrated `ngx-editor` for creating professionally formatted notes.\n- **📚 Beautiful TOC**: Hierarchical Table of Contents with smooth navigation.\n- **🖼️ Cover Preview**: Pulse-animated book cover previews during load.\n- **🏷️ State-Managed Annotations**: Fully event-driven highlights, underlines, and bookmarks.\n- **🔍 Advanced Search**: Case-insensitive search with highlighted snippets and navigation.\n- **⚙️ Highly Customizable**: extensive configuration options for menus, tools, and behaviors.\n\n---\n\n## 🚀 Installation\n\nInstall the package via npm:\n\n```bash\nnpm install b-epub --legacy-peer-deps\n```\n\n**Peer Dependencies**:\nEnsure the following peer dependencies are installed:\n\n```bash\nnpm install epubjs ngx-editor @angular/cdk --save\n```\n\n---\n\n## 🛠 Setup\n\n### 1. Import EpubReaderModule\n\nAdd `EpubReaderModule` to your application module:\n\n```typescript\nimport { EpubReaderModule } from 'b-epub';\n\n@NgModule({\n  imports: [\n    EpubReaderModule,\n    // ... other imports\n  ]\n})\nexport class AppModule { }\n```\n\n### 2. Include Required Styles\n\nAdd the necessary styles to your `styles.scss` (or `angular.json` styles array):\n\n```scss\n/* In styles.scss */\n@import \"ngx-editor/lib/styles/editor.scss\";\n```\n\n---\n\n## 📖 Usage\n\n### Basic Usage\n\n```html\n<b-epub [epubBlob]=\"myEpubBlob\"></b-epub>\n```\n\n### Advanced Usage (Free Sample & Annotations)\n\nThe component is designed to be stateless regarding annotations, allowing the parent application to manage persistence. It also supports a robust \"Free Sample\" mode.\n\n```html\n<b-epub \n  [epubBlob]=\"bookBlob\" \n  [coverPage]=\"coverImageUrl\"\n  [freeSample]=\"true\"\n  [sampleLimit]=\"10\"\n  [sampleLimitType]=\"'percentage'\"\n  (onBuyNow)=\"handleBuyNow()\"\n  [underlineCfiList]=\"myUnderlines\"\n  [highlightCfiList]=\"myHighlights\"\n  [bookmarkCfiList]=\"myBookmarks\"\n  (underlineAddRequest)=\"onUnderlineAdd($event)\"\n  (highlightAddRequest)=\"onHighlightAdd($event)\"\n  (bookmarkAddRequest)=\"onBookmarkAdd($event)\">\n</b-epub>\n```\n\n---\n\n## ⚙️ Configuration\n\n### 📥 Inputs\n\n| Input | Type | Default | Description |\n|---|---|---|---|\n| `epubBlob` | `Blob` | `null` | **Required**. Local Blob object of the EPUB file. |\n| `coverPage` | `string` | `null` | URL of the book cover image (for loading & preview screens). |\n| `logo` | `string` | `null` | URL of your brand logo to display in the header. |\n| **Sample Mode** | | | |\n| `freeSample` | `boolean` | `false` | Enables restricted access mode (\"Free Sample\"). |\n| `sampleLimit` | `number` | `10` | The limit for the sample (percentage or pages). |\n| `sampleLimitType` | `'percentage' \\| 'pages'` | `'percentage'` | The type of limit to apply. |\n| **Annotations** | | | |\n| `underlineCfiList` | `string[]` \\| `UnderlinePayload[]` | `[]` | List of underlines to render. |\n| `highlightCfiList` | `HighlightPayload[]` | `[]` | List of highlights to render. |\n| `bookmarkCfiList` | `string[]` | `[]` | List of bookmarks to render. |\n| `pagePosition` | `string` | `null` | The specific CFI location to navigate to continuously. |\n| **Customization** | | | |\n| `colourCodeList` | `string[]` | `['#F44336', ...]` | Palette for highlight colors. |\n| `underlineColor` | `string` | `null` | Default underline color (if not using list). |\n| `menuConfig` | `MenuConfig` | `null` | Custom configuration for menus and quick actions. |\n| **Feature Toggles** | | | |\n| `enableDarkMode` | `boolean` | `true` | Enable/Disable Dark Mode button. |\n| `enableSearch` | `boolean` | `true` | Enable/Disable Search tool. |\n| `enableHighlights` | `boolean` | `true` | Enable/Disable Highlight & Underline tools. |\n| `enableBookmarks` | `boolean` | `true` | Enable/Disable Bookmark tool. |\n| `enableNotes` | `boolean` | `true` | Enable/Disable Note creation. |\n| `enableChapterList` | `boolean` | `true` | Enable/Disable TOC navigation. |\n| `enableFontSize` | `boolean` | `true` | Enable/Disable font size controls. |\n| `enableTextSelection` | `boolean` | `true` | Allow/Disallow text selection. |\n\n### 📤 Outputs\n\n| Output | Payload | Description |\n|---|---|---|\n| **Commercial** | | |\n| `onBuyNow` | `void` | Emitted when the user clicks \"Buy\" in the preview modal or footer. |\n| `onSubscribe` | `void` | Emitted when the user clicks \"Subscribe\" (if configured). |\n| `onLoginRedirect` | `void` | Emitted when a restricted action requires login. |\n| **Annotations** | | |\n| `underlineAddRequest` | `UnderlinePayload` | request to add an underline. |\n| `underlineRemoveRequest` | `{cfi: string}` | Request to remove an underline. |\n| `highlightAddRequest` | `HighlightPayload` | Request to add a highlight. |\n| `highlightRemoveRequest` | `{cfi: string}` | Request to remove a highlight. |\n| `bookmarkAddRequest` | `BookmarkPayload` | Request to add a bookmark. |\n| `bookmarkRemoveRequest` | `BookmarkPayload` | Request to remove a bookmark. |\n| **State** | | |\n| `pagePositionOnDestroy` | `string` | Emits the last reading location (CFI) on component destroy. |\n| `customMenuAction` | `{id: string, data: any}` | Emits when a custom menu item is triggered. |\n\n---\n\n## 📄 License\n\nMIT\n","readmeFilename":"README.md"}