next-flipbook 0.8.9 → 0.10.0
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/LICENSE +97 -21
- package/README.md +25 -3
- package/dist/core/appearance/AppearanceStore.d.ts +71 -0
- package/dist/core/appearance/AppearanceStore.d.ts.map +1 -0
- package/dist/core/appearance/AppearanceStore.js +130 -0
- package/dist/core/appearance/AppearanceStore.js.map +1 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/types.d.ts +22 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/license/check.d.ts +19 -0
- package/dist/license/check.d.ts.map +1 -0
- package/dist/license/check.js +42 -0
- package/dist/license/check.js.map +1 -0
- package/dist/license/format.d.ts +47 -0
- package/dist/license/format.d.ts.map +1 -0
- package/dist/license/format.js +114 -0
- package/dist/license/format.js.map +1 -0
- package/dist/license/index.d.ts +10 -0
- package/dist/license/index.d.ts.map +1 -0
- package/dist/license/index.js +7 -0
- package/dist/license/index.js.map +1 -0
- package/dist/license/publicKey.d.ts +10 -0
- package/dist/license/publicKey.d.ts.map +1 -0
- package/dist/license/publicKey.js +14 -0
- package/dist/license/publicKey.js.map +1 -0
- package/dist/license/revoked.d.ts +8 -0
- package/dist/license/revoked.d.ts.map +1 -0
- package/dist/license/revoked.js +8 -0
- package/dist/license/revoked.js.map +1 -0
- package/dist/license/types.d.ts +76 -0
- package/dist/license/types.d.ts.map +1 -0
- package/dist/license/types.js +2 -0
- package/dist/license/types.js.map +1 -0
- package/dist/license/verify.d.ts +25 -0
- package/dist/license/verify.d.ts.map +1 -0
- package/dist/license/verify.js +48 -0
- package/dist/license/verify.js.map +1 -0
- package/dist/license/warn.d.ts +14 -0
- package/dist/license/warn.d.ts.map +1 -0
- package/dist/license/warn.js +47 -0
- package/dist/license/warn.js.map +1 -0
- package/dist/pdf/readPageText.d.ts +14 -0
- package/dist/pdf/readPageText.d.ts.map +1 -0
- package/dist/pdf/readPageText.js +37 -0
- package/dist/pdf/readPageText.js.map +1 -0
- package/dist/pdf/session.d.ts.map +1 -1
- package/dist/pdf/session.js +2 -1
- package/dist/pdf/session.js.map +1 -1
- package/dist/pdf/types.d.ts +2 -0
- package/dist/pdf/types.d.ts.map +1 -1
- package/dist/react/backgroundChoices.d.ts +18 -0
- package/dist/react/backgroundChoices.d.ts.map +1 -0
- package/dist/react/backgroundChoices.js +44 -0
- package/dist/react/backgroundChoices.js.map +1 -0
- package/dist/react/components/FlipBook.d.ts.map +1 -1
- package/dist/react/components/FlipBook.js +5 -4
- package/dist/react/components/FlipBook.js.map +1 -1
- package/dist/react/components/FlipBookBackgroundControl.d.ts +11 -0
- package/dist/react/components/FlipBookBackgroundControl.d.ts.map +1 -0
- package/dist/react/components/FlipBookBackgroundControl.js +157 -0
- package/dist/react/components/FlipBookBackgroundControl.js.map +1 -0
- package/dist/react/components/FlipBookLicenseMark.d.ts +11 -0
- package/dist/react/components/FlipBookLicenseMark.d.ts.map +1 -0
- package/dist/react/components/FlipBookLicenseMark.js +46 -0
- package/dist/react/components/FlipBookLicenseMark.js.map +1 -0
- package/dist/react/components/FlipBookLicenseProvider.d.ts +18 -0
- package/dist/react/components/FlipBookLicenseProvider.d.ts.map +1 -0
- package/dist/react/components/FlipBookLicenseProvider.js +17 -0
- package/dist/react/components/FlipBookLicenseProvider.js.map +1 -0
- package/dist/react/components/FlipBookProvider.d.ts.map +1 -1
- package/dist/react/components/FlipBookProvider.js +19 -2
- package/dist/react/components/FlipBookProvider.js.map +1 -1
- package/dist/react/components/FlipBookSidePanel.d.ts.map +1 -1
- package/dist/react/components/FlipBookSidePanel.js +2 -1
- package/dist/react/components/FlipBookSidePanel.js.map +1 -1
- package/dist/react/components/FlipBookStage.d.ts.map +1 -1
- package/dist/react/components/FlipBookStage.js +4 -3
- package/dist/react/components/FlipBookStage.js.map +1 -1
- package/dist/react/components/FlipBookThumbnailSizeControl.d.ts +12 -0
- package/dist/react/components/FlipBookThumbnailSizeControl.d.ts.map +1 -0
- package/dist/react/components/FlipBookThumbnailSizeControl.js +20 -0
- package/dist/react/components/FlipBookThumbnailSizeControl.js.map +1 -0
- package/dist/react/components/FlipBookThumbnails.d.ts +4 -1
- package/dist/react/components/FlipBookThumbnails.d.ts.map +1 -1
- package/dist/react/components/FlipBookThumbnails.js +20 -4
- package/dist/react/components/FlipBookThumbnails.js.map +1 -1
- package/dist/react/components/FlipBookToolbar.d.ts.map +1 -1
- package/dist/react/components/FlipBookToolbar.js +3 -1
- package/dist/react/components/FlipBookToolbar.js.map +1 -1
- package/dist/react/components/FlipBookToolbarButton.d.ts +2 -0
- package/dist/react/components/FlipBookToolbarButton.d.ts.map +1 -1
- package/dist/react/components/FlipBookToolbarButton.js +2 -2
- package/dist/react/components/FlipBookToolbarButton.js.map +1 -1
- package/dist/react/components/Thumbnail.js +7 -1
- package/dist/react/components/Thumbnail.js.map +1 -1
- package/dist/react/context.d.ts +9 -0
- package/dist/react/context.d.ts.map +1 -1
- package/dist/react/context.js.map +1 -1
- package/dist/react/controller.d.ts +2 -0
- package/dist/react/controller.d.ts.map +1 -1
- package/dist/react/controller.js +6 -1
- package/dist/react/controller.js.map +1 -1
- package/dist/react/hooks/useAppearance.d.ts +14 -0
- package/dist/react/hooks/useAppearance.d.ts.map +1 -0
- package/dist/react/hooks/useAppearance.js +27 -0
- package/dist/react/hooks/useAppearance.js.map +1 -0
- package/dist/react/hooks/useBookExtras.d.ts +2 -0
- package/dist/react/hooks/useBookExtras.d.ts.map +1 -1
- package/dist/react/hooks/useBookExtras.js +16 -1
- package/dist/react/hooks/useBookExtras.js.map +1 -1
- package/dist/react/hooks/useFlipBook.d.ts +4 -0
- package/dist/react/hooks/useFlipBook.d.ts.map +1 -1
- package/dist/react/hooks/useFlipBook.js +5 -2
- package/dist/react/hooks/useFlipBook.js.map +1 -1
- package/dist/react/hooks/useLicense.d.ts +9 -0
- package/dist/react/hooks/useLicense.d.ts.map +1 -0
- package/dist/react/hooks/useLicense.js +32 -0
- package/dist/react/hooks/useLicense.js.map +1 -0
- package/dist/react/icons.d.ts +1 -1
- package/dist/react/icons.d.ts.map +1 -1
- package/dist/react/icons.js +1 -0
- package/dist/react/icons.js.map +1 -1
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/licenseContext.d.ts +3 -0
- package/dist/react/licenseContext.d.ts.map +1 -0
- package/dist/react/licenseContext.js +5 -0
- package/dist/react/licenseContext.js.map +1 -0
- package/dist/react/locale.d.ts.map +1 -1
- package/dist/react/locale.js +10 -0
- package/dist/react/locale.js.map +1 -1
- package/dist/types/index.d.ts +64 -3
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
DRAFT FOR REVIEW. DELETE THIS BANNER ONLY AFTER A LAWYER HAS REVIEWED THIS TEXT.
|
|
2
|
+
|
|
3
|
+
This is a starting template written by an AI assistant, not legal advice and not the work of a
|
|
4
|
+
lawyer. It says what the author asked for: the package is not free, and one license key covers one
|
|
5
|
+
website. Whether it says that in a way that holds up in your country, and what else it needs
|
|
6
|
+
(governing law, a limit on liability that the law of your customers' countries allows, how
|
|
7
|
+
contributions to the repository are licensed), is for a lawyer to decide. Fill in the [bracketed]
|
|
8
|
+
parts. `npm run verify:release` refuses to publish a package while this banner is here.
|
|
9
|
+
|
|
10
|
+
----------------------------------------------------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
next-flipbook Commercial License
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2026 Samith Mendis ("the Licensor"). All rights reserved.
|
|
15
|
+
|
|
16
|
+
This license applies to next-flipbook version [0.10.0] and later ("the Software"). Earlier versions
|
|
17
|
+
that were published under the MIT License stay under the MIT License, for the people who received
|
|
18
|
+
them under it.
|
|
19
|
+
|
|
20
|
+
1. Definitions
|
|
21
|
+
|
|
22
|
+
"License Key" is the text the Licensor issues, which names one website.
|
|
23
|
+
"Licensed Website" is the website name a License Key names, and the subdomains of that name.
|
|
24
|
+
"Project" is the one website or web application that is served from the Licensed Website.
|
|
25
|
+
"Development Address" is a local or private-network address: localhost, an address in a private
|
|
26
|
+
range (10.x.x.x, 172.16-31.x.x, 192.168.x.x, 127.x.x.x), or a name ending in .local, .localhost,
|
|
27
|
+
.test or .internal.
|
|
28
|
+
|
|
29
|
+
2. What you may do
|
|
30
|
+
|
|
31
|
+
a. Evaluate the Software, in development or in a trial, on any Development Address, with no License
|
|
32
|
+
Key and at no charge.
|
|
33
|
+
b. With a valid License Key for a Licensed Website, use the Software in the Project, in
|
|
34
|
+
production and in testing, and include it in the Project's build and in what the Project
|
|
35
|
+
sends to its visitors.
|
|
36
|
+
c. Read the source code, for the purpose of understanding the Software and fixing your own use of it.
|
|
37
|
+
|
|
38
|
+
This is a non-exclusive, non-transferable, non-sublicensable license, worldwide, for the term of
|
|
39
|
+
the License Key.
|
|
40
|
+
|
|
41
|
+
3. One key, one project
|
|
42
|
+
|
|
43
|
+
A License Key is for the Project on its Licensed Website, and for nothing else. You may not use a
|
|
44
|
+
License Key on any other website or in any other project, and may not give, sell, publish or
|
|
45
|
+
share it so that another party can use it. A second website, or a project for a different
|
|
46
|
+
customer, needs its own License Key. [An agency that builds sites for clients needs a License Key
|
|
47
|
+
for each client's site.]
|
|
48
|
+
|
|
49
|
+
4. What you may not do
|
|
50
|
+
|
|
51
|
+
a. Remove, hide, disable or work around the license check, the watermark or the console warning,
|
|
52
|
+
or change the Software so that a website without a valid License Key looks as if it had one.
|
|
53
|
+
b. Sell, rent, sublicense, publish, or otherwise make the Software available to others, whole or in
|
|
54
|
+
part, in source form, compiled form, or inside a package, template or library of your own,
|
|
55
|
+
except as part of the Project's own output to its visitors.
|
|
56
|
+
c. Use the Software to make a product that competes with it.
|
|
57
|
+
d. Use the Software in production on a website that has no valid License Key.
|
|
58
|
+
|
|
59
|
+
5. Term, and ending the license
|
|
60
|
+
|
|
61
|
+
A License Key is valid until the end date it carries, or without end if it carries none. The
|
|
62
|
+
Licensor may withdraw a License Key if you break this license, or if the fee for it is not paid
|
|
63
|
+
[when due]. When a License Key ends or is withdrawn, the Software shows its watermark on the
|
|
64
|
+
Licensed Website, and you must stop using the Software there in production, or obtain a new
|
|
65
|
+
License Key. A withdrawal takes effect for a website when it installs a version of the Software
|
|
66
|
+
that lists the withdrawal.
|
|
67
|
+
|
|
68
|
+
6. Ownership
|
|
69
|
+
|
|
70
|
+
The Software is licensed, not sold. The Licensor keeps all rights in it that this license does not
|
|
71
|
+
give you. Nothing here gives you any right to the name "next-flipbook".
|
|
72
|
+
|
|
73
|
+
7. Other people's software
|
|
74
|
+
|
|
75
|
+
The Software uses other software, such as PDF.js and React, which stays under its own license. This
|
|
76
|
+
license does not change those.
|
|
77
|
+
|
|
78
|
+
8. No warranty
|
|
79
|
+
|
|
80
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING THE
|
|
81
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
82
|
+
|
|
83
|
+
9. Limit of liability
|
|
84
|
+
|
|
85
|
+
TO THE EXTENT THE LAW ALLOWS, THE LICENSOR IS NOT LIABLE FOR ANY INDIRECT OR CONSEQUENTIAL LOSS, OR FOR
|
|
86
|
+
ANY LOSS OF PROFIT, DATA OR BUSINESS, ARISING FROM THE SOFTWARE, AND THE LICENSOR'S TOTAL LIABILITY IS
|
|
87
|
+
LIMITED TO THE FEE YOU PAID FOR THE LICENSE KEY IN THE [12] MONTHS BEFORE THE CLAIM.
|
|
88
|
+
[A lawyer should check this against the law of the places your customers are in.]
|
|
89
|
+
|
|
90
|
+
10. Law
|
|
91
|
+
|
|
92
|
+
This license is governed by the law of [COUNTRY], and the courts of [PLACE] decide any dispute
|
|
93
|
+
about it, unless the law of your country does not allow that.
|
|
94
|
+
|
|
95
|
+
11. Contact
|
|
96
|
+
|
|
97
|
+
Samith Mendis, samithmendis.01@gmail.com, https://github.com/dsamithmendis
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ A realistic, responsive flipbook engine for React and Next.js.
|
|
|
4
4
|
|
|
5
5
|
Give it a PDF, images or React components and it gives you a book: a physical page-turn animation you can grab and drag, pinch and double-tap zoom, thumbnails, bookmarks, text search and a table of contents, single or two-page layout that follows the container size, keyboard navigation, accessible controls and right-to-left support. The engine has no React or Next.js dependency, and the React layer is a thin, SSR-safe shell around it.
|
|
6
6
|
|
|
7
|
-
> **Status: Phase 7 (0.
|
|
7
|
+
> **Status: Phase 7 (0.10.0).** PDFs (PDF.js), images and custom React pages; drag, swipe and zoom; a toolbar with thumbnails (their size can be set), bookmarks, a changeable background, fullscreen, download, print and share; text search, the PDF's table of contents, clickable PDF links, hotspots, overlays, deep links and a saved reading place; bounded memory on very long PDFs, with benchmarks; linted, with end-to-end, accessibility and visual tests and CI. A license key per website. Not built yet: autoplay, hard pages, page curl, sound, plugins. The API only exposes what is implemented.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -14,6 +14,24 @@ npm install next-flipbook
|
|
|
14
14
|
|
|
15
15
|
Requires React 18 or newer. The package is ESM-only. `pdfjs-dist` is installed with it and is loaded only when a PDF is shown, in its own chunk, so image-only books never download it.
|
|
16
16
|
|
|
17
|
+
### License key
|
|
18
|
+
|
|
19
|
+
next-flipbook is not free: a website that uses it in production needs a **license key**, and one key works on one website. Anyone can install it and try it. Without a valid key the viewer shows an "Unlicensed copy" watermark and writes one warning to the console, and it keeps working. `localhost` and private-network addresses never need a key.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<FlipBook source="/magazine.pdf" licenseKey="FB1.eyJ2Ijox…" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or once for the whole app, in the root layout:
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { FlipBookLicenseProvider } from "next-flipbook";
|
|
29
|
+
|
|
30
|
+
<FlipBookLicenseProvider licenseKey={process.env.NEXT_PUBLIC_FLIPBOOK_LICENSE_KEY}>{children}</FlipBookLicenseProvider>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
How keys work, what a visitor and a developer see, and how to make keys: [docs/licensing.md](docs/licensing.md).
|
|
34
|
+
|
|
17
35
|
## Quick start: a PDF
|
|
18
36
|
|
|
19
37
|
```tsx
|
|
@@ -134,6 +152,7 @@ ref.current?.getCacheStats(); // what the viewer holds: cached pages, thumbnails
|
|
|
134
152
|
|
|
135
153
|
| Prop | Default | Notes |
|
|
136
154
|
| --- | --- | --- |
|
|
155
|
+
| `licenseKey` | none | The key you were given for this website. Without a valid one the viewer shows a watermark and one console warning, and keeps working. `localhost` and private addresses need none. `<FlipBookLicenseProvider>` sets it for every viewer below it. See [docs/licensing.md](docs/licensing.md). |
|
|
137
156
|
| `source` | none | A PDF: URL, `File`, `Blob`, `ArrayBuffer` or `Uint8Array`. Pass `source` or `pages`, not both. Keep it referentially stable: a new value loads a new document. |
|
|
138
157
|
| `pages` | none | Strings (image URLs), `{ type: "image", src, alt?, width?, height? }`, `{ type: "custom", component? \| render? }` or `{ type: "pdf", source, page }`. |
|
|
139
158
|
| `pdf` | none | `workerSrc`, `renderScale`, `maxCanvasPixels`, `maxCacheBytes`, `maxTextCacheBytes`, `cleanupAfterPages`, `password`, `withCredentials`, `httpHeaders`, `maxConcurrentRenders`, `documentParams`, `loadPdfjs`. See [docs/pdf.md](docs/pdf.md). |
|
|
@@ -151,10 +170,11 @@ ref.current?.getCacheStats(); // what the viewer holds: cached pages, thumbnails
|
|
|
151
170
|
| `shadow`, `shadowIntensity` | `true`, `0.5` | Dynamic shading during turns. |
|
|
152
171
|
| `reducedMotion` | `"auto"` | Follows `prefers-reduced-motion`; page changes become instant. |
|
|
153
172
|
| `theme` | none | `"light"` or `"dark"`. |
|
|
154
|
-
| `background` |
|
|
173
|
+
| `background`, `backgroundControl`, `backgroundColors`, `onBackgroundChange` | theme | Any CSS background, including `"transparent"`; a toolbar button with a color picker; the colors it offers; a callback. Also `setBackground()` on the ref. |
|
|
155
174
|
| `toolbar`, `navigation`, `keyboard` | `true` | The bottom bar; its previous/next/counter; arrow keys, Home, End, `+` `-` `0` zoom, `F` fullscreen, `B` bookmark. |
|
|
156
175
|
| `fullscreen` | `true` | Button and `F`. Fills the window where the browser API is missing. |
|
|
157
176
|
| `thumbnails`, `defaultThumbnailsOpen` | `false` | Thumbnail panel: sidebar, or bottom sheet when narrow. |
|
|
177
|
+
| `thumbnailSize`, `thumbnailSizeControl`, `onThumbnailSizeChange` | `"medium"`, `false` | Width of the page previews in the panel (a number of pixels, or `"small"`, `"medium"`, `"large"`), a slider for the reader, and a callback. Also `setThumbnailSize()` on the ref. |
|
|
158
178
|
| `bookmarks` | `false` | `true` or `{ value, defaultValue, onChange, persist, storage }`. The reader's own bookmarks, not a PDF's outline. |
|
|
159
179
|
| `download`, `print`, `share` | `false` | `true` or options: `{ filename, url }`, `{ scale }`, `{ url, title, text }`. See [docs/toolbar.md](docs/toolbar.md). |
|
|
160
180
|
| `onShare`, `onFullscreenChange` | none | Take over sharing; fullscreen entered or left. |
|
|
@@ -275,6 +295,8 @@ node benchmarks/browser.mjs # a real Chromium on the demo's /l
|
|
|
275
295
|
|
|
276
296
|
What was measured, on what, and what it does not show: [docs/performance.md](docs/performance.md).
|
|
277
297
|
|
|
298
|
+
License keys are made with `npm run license -- …` (see [docs/licensing.md](docs/licensing.md)), and `npm run verify:release` checks that a package is ready to be published.
|
|
299
|
+
|
|
278
300
|
Layout: `packages/flipbook` is the library, `demo/next-app` is the App Router demo, `benchmarks` holds the benchmarks, `docs` holds design notes. See [docs/architecture.md](docs/architecture.md).
|
|
279
301
|
|
|
280
302
|
## Author
|
|
@@ -283,4 +305,4 @@ Samith Mendis ([@dsamithmendis](https://github.com/dsamithmendis)) · samithmend
|
|
|
283
305
|
|
|
284
306
|
## License
|
|
285
307
|
|
|
286
|
-
|
|
308
|
+
Commercial: one license key per website. See [LICENSE](LICENSE) and [docs/licensing.md](docs/licensing.md).
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** Named sizes for the page previews in the side panel. */
|
|
2
|
+
export type ThumbnailSizeName = "small" | "medium" | "large";
|
|
3
|
+
/** A preview width in CSS pixels, or one of the names. */
|
|
4
|
+
export type ThumbnailSize = number | ThumbnailSizeName;
|
|
5
|
+
/** Width in pixels of each named size. */
|
|
6
|
+
export declare const THUMBNAIL_SIZE_NAMES: Readonly<Record<ThumbnailSizeName, number>>;
|
|
7
|
+
export declare const DEFAULT_THUMBNAIL_WIDTH: number;
|
|
8
|
+
export declare const MIN_THUMBNAIL_WIDTH = 48;
|
|
9
|
+
export declare const MAX_THUMBNAIL_WIDTH = 240;
|
|
10
|
+
/**
|
|
11
|
+
* A usable width in pixels: names become their width, numbers are rounded and kept between
|
|
12
|
+
* `MIN_THUMBNAIL_WIDTH` and `MAX_THUMBNAIL_WIDTH`. Returns null for anything else (`null`,
|
|
13
|
+
* `undefined`, `NaN`, an unknown name), which callers read as "use the default".
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveThumbnailSize(size: ThumbnailSize | null | undefined): number | null;
|
|
16
|
+
/** A CSS background with the spaces trimmed, or null for an empty or non-string value. */
|
|
17
|
+
export declare function normalizeBackground(value: string | null | undefined): string | null;
|
|
18
|
+
export interface AppearanceSnapshot {
|
|
19
|
+
/** Width in pixels of one page preview in the side panel. */
|
|
20
|
+
readonly thumbnailSize: number;
|
|
21
|
+
/** The CSS background in use, or null for the theme's own. */
|
|
22
|
+
readonly background: string | null;
|
|
23
|
+
}
|
|
24
|
+
/** What the props say. The reader's own choices, made with the controls, are layered on top. */
|
|
25
|
+
export interface AppearanceDefaults {
|
|
26
|
+
thumbnailSize?: ThumbnailSize | null;
|
|
27
|
+
background?: string | null;
|
|
28
|
+
}
|
|
29
|
+
/** The part of the snapshot that a reader or the controller changed. */
|
|
30
|
+
export interface AppearanceChange {
|
|
31
|
+
thumbnailSize?: number;
|
|
32
|
+
background?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* How the viewer looks, where that can be changed while it runs: the size of the page previews
|
|
36
|
+
* and the background. Each has a default from the props, and a choice made later (by the reader,
|
|
37
|
+
* or from code through the controller) replaces it until the prop itself changes. Framework-free,
|
|
38
|
+
* like the other stores, so `ref.current.setBackground("transparent")` works from anywhere.
|
|
39
|
+
*/
|
|
40
|
+
export declare class AppearanceStore {
|
|
41
|
+
private defaults;
|
|
42
|
+
private pickedSize;
|
|
43
|
+
private pickedBackground;
|
|
44
|
+
private snapshot;
|
|
45
|
+
private readonly listeners;
|
|
46
|
+
private readonly pickListeners;
|
|
47
|
+
constructor(initial?: AppearanceDefaults);
|
|
48
|
+
readonly getSnapshot: () => AppearanceSnapshot;
|
|
49
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
50
|
+
/**
|
|
51
|
+
* Called for every change made through `setThumbnailSize()` or `setBackground()`, with only the
|
|
52
|
+
* values that changed. Not called when the defaults change: that is the app's own doing.
|
|
53
|
+
*/
|
|
54
|
+
onPick(listener: (change: AppearanceChange) => void): () => void;
|
|
55
|
+
/** The values the props ask for. */
|
|
56
|
+
getDefaults(): AppearanceSnapshot;
|
|
57
|
+
/**
|
|
58
|
+
* The props changed. A default that is now different replaces the reader's choice for that
|
|
59
|
+
* setting, so a value you set from code is not undone by an older pick. One that is unchanged
|
|
60
|
+
* leaves the choice alone.
|
|
61
|
+
*/
|
|
62
|
+
setDefaults(next: AppearanceDefaults): void;
|
|
63
|
+
/** Sets the preview width, or goes back to the default with `null`. */
|
|
64
|
+
setThumbnailSize(size: ThumbnailSize | null): void;
|
|
65
|
+
/** Sets any CSS background, `"transparent"` included, or goes back to the default with `null`. */
|
|
66
|
+
setBackground(background: string | null): void;
|
|
67
|
+
private static resolveDefaults;
|
|
68
|
+
private compute;
|
|
69
|
+
private update;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=AppearanceStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearanceStore.d.ts","sourceRoot":"","sources":["../../../src/core/appearance/AppearanceStore.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7D,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,iBAAiB,CAAC;AAEvD,0CAA0C;AAC1C,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAI5E,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAA8B,CAAC;AACnE,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAS1F;AAED,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAInF;AAED,MAAM,WAAW,kBAAkB;IACjC,6DAA6D;IAC7D,Q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AO;IAOf,OAAO,CAAC,MAAM;CAef"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/** Width in pixels of each named size. */
|
|
2
|
+
export const THUMBNAIL_SIZE_NAMES = {
|
|
3
|
+
small: 64,
|
|
4
|
+
medium: 96,
|
|
5
|
+
large: 144,
|
|
6
|
+
};
|
|
7
|
+
export const DEFAULT_THUMBNAIL_WIDTH = THUMBNAIL_SIZE_NAMES.medium;
|
|
8
|
+
export const MIN_THUMBNAIL_WIDTH = 48;
|
|
9
|
+
export const MAX_THUMBNAIL_WIDTH = 240;
|
|
10
|
+
/**
|
|
11
|
+
* A usable width in pixels: names become their width, numbers are rounded and kept between
|
|
12
|
+
* `MIN_THUMBNAIL_WIDTH` and `MAX_THUMBNAIL_WIDTH`. Returns null for anything else (`null`,
|
|
13
|
+
* `undefined`, `NaN`, an unknown name), which callers read as "use the default".
|
|
14
|
+
*/
|
|
15
|
+
export function resolveThumbnailSize(size) {
|
|
16
|
+
let width = size;
|
|
17
|
+
if (typeof size === "string") {
|
|
18
|
+
width = Object.prototype.hasOwnProperty.call(THUMBNAIL_SIZE_NAMES, size)
|
|
19
|
+
? THUMBNAIL_SIZE_NAMES[size]
|
|
20
|
+
: null;
|
|
21
|
+
}
|
|
22
|
+
if (typeof width !== "number" || !Number.isFinite(width))
|
|
23
|
+
return null;
|
|
24
|
+
return Math.min(MAX_THUMBNAIL_WIDTH, Math.max(MIN_THUMBNAIL_WIDTH, Math.round(width)));
|
|
25
|
+
}
|
|
26
|
+
/** A CSS background with the spaces trimmed, or null for an empty or non-string value. */
|
|
27
|
+
export function normalizeBackground(value) {
|
|
28
|
+
if (typeof value !== "string")
|
|
29
|
+
return null;
|
|
30
|
+
const trimmed = value.trim();
|
|
31
|
+
return trimmed === "" ? null : trimmed;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* How the viewer looks, where that can be changed while it runs: the size of the page previews
|
|
35
|
+
* and the background. Each has a default from the props, and a choice made later (by the reader,
|
|
36
|
+
* or from code through the controller) replaces it until the prop itself changes. Framework-free,
|
|
37
|
+
* like the other stores, so `ref.current.setBackground("transparent")` works from anywhere.
|
|
38
|
+
*/
|
|
39
|
+
export class AppearanceStore {
|
|
40
|
+
constructor(initial = {}) {
|
|
41
|
+
this.pickedSize = null;
|
|
42
|
+
this.pickedBackground = null;
|
|
43
|
+
this.listeners = new Set();
|
|
44
|
+
this.pickListeners = new Set();
|
|
45
|
+
this.getSnapshot = () => this.snapshot;
|
|
46
|
+
this.subscribe = (listener) => {
|
|
47
|
+
this.listeners.add(listener);
|
|
48
|
+
return () => {
|
|
49
|
+
this.listeners.delete(listener);
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
this.defaults = AppearanceStore.resolveDefaults(initial);
|
|
53
|
+
this.snapshot = this.compute();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Called for every change made through `setThumbnailSize()` or `setBackground()`, with only the
|
|
57
|
+
* values that changed. Not called when the defaults change: that is the app's own doing.
|
|
58
|
+
*/
|
|
59
|
+
onPick(listener) {
|
|
60
|
+
this.pickListeners.add(listener);
|
|
61
|
+
return () => {
|
|
62
|
+
this.pickListeners.delete(listener);
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** The values the props ask for. */
|
|
66
|
+
getDefaults() {
|
|
67
|
+
return this.defaults;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The props changed. A default that is now different replaces the reader's choice for that
|
|
71
|
+
* setting, so a value you set from code is not undone by an older pick. One that is unchanged
|
|
72
|
+
* leaves the choice alone.
|
|
73
|
+
*/
|
|
74
|
+
setDefaults(next) {
|
|
75
|
+
const defaults = AppearanceStore.resolveDefaults(next);
|
|
76
|
+
this.update(() => {
|
|
77
|
+
if (defaults.thumbnailSize !== this.defaults.thumbnailSize)
|
|
78
|
+
this.pickedSize = null;
|
|
79
|
+
if (defaults.background !== this.defaults.background)
|
|
80
|
+
this.pickedBackground = null;
|
|
81
|
+
this.defaults = defaults;
|
|
82
|
+
}, false);
|
|
83
|
+
}
|
|
84
|
+
/** Sets the preview width, or goes back to the default with `null`. */
|
|
85
|
+
setThumbnailSize(size) {
|
|
86
|
+
this.update(() => {
|
|
87
|
+
this.pickedSize = resolveThumbnailSize(size);
|
|
88
|
+
}, true);
|
|
89
|
+
}
|
|
90
|
+
/** Sets any CSS background, `"transparent"` included, or goes back to the default with `null`. */
|
|
91
|
+
setBackground(background) {
|
|
92
|
+
this.update(() => {
|
|
93
|
+
this.pickedBackground = normalizeBackground(background);
|
|
94
|
+
}, true);
|
|
95
|
+
}
|
|
96
|
+
static resolveDefaults(input) {
|
|
97
|
+
return {
|
|
98
|
+
thumbnailSize: resolveThumbnailSize(input.thumbnailSize) ?? DEFAULT_THUMBNAIL_WIDTH,
|
|
99
|
+
background: normalizeBackground(input.background),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
compute() {
|
|
103
|
+
return {
|
|
104
|
+
thumbnailSize: this.pickedSize ?? this.defaults.thumbnailSize,
|
|
105
|
+
background: this.pickedBackground ?? this.defaults.background,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
update(change, announce) {
|
|
109
|
+
const before = this.snapshot;
|
|
110
|
+
change();
|
|
111
|
+
const after = this.compute();
|
|
112
|
+
const sizeChanged = after.thumbnailSize !== before.thumbnailSize;
|
|
113
|
+
const backgroundChanged = after.background !== before.background;
|
|
114
|
+
if (!sizeChanged && !backgroundChanged)
|
|
115
|
+
return;
|
|
116
|
+
this.snapshot = after;
|
|
117
|
+
for (const listener of [...this.listeners])
|
|
118
|
+
listener();
|
|
119
|
+
if (!announce)
|
|
120
|
+
return;
|
|
121
|
+
const patch = {};
|
|
122
|
+
if (sizeChanged)
|
|
123
|
+
patch.thumbnailSize = after.thumbnailSize;
|
|
124
|
+
if (backgroundChanged)
|
|
125
|
+
patch.background = after.background;
|
|
126
|
+
for (const listener of [...this.pickListeners])
|
|
127
|
+
listener(patch);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=AppearanceStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearanceStore.js","sourceRoot":"","sources":["../../../src/core/appearance/AppearanceStore.ts"],"names":[],"mappings":"AAMA,0CAA0C;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAgD;IAC/E,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC,MAAM,CAAC;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEvC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAsC;IACzE,IAAI,KAAK,GAAY,IAAI,CAAC;IAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC;YACtE,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC;YAC5B,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,mBAAmB,CAAC,KAAgC;IAClE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAA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C;QAC7B,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,KAAK,MAAM,CAAC,aAAa,CAAC;QACjE,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU,CAAC;QACjE,IAAI,CAAC,WAAW,IAAI,CAAC,iBAAiB;YAAE,OAAO;QAC/C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YAAE,QAAQ,EAAE,CAAC;QACvD,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,KAAK,GAAqB,EAAE,CAAC;QACnC,IAAI,WAAW;YAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC3D,IAAI,iBAAiB;YAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;QAC3D,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;YAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;CACF"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -25,11 +25,13 @@ export { SearchController } from "./search/SearchController.js";
|
|
|
25
25
|
export type { Highlight, SearchControllerOptions, SearchResult, SearchSnapshot, SearchSource, SearchStatus, } from "./search/SearchController.js";
|
|
26
26
|
export { readReadingState, writeReadingState } from "./persistence/readingState.js";
|
|
27
27
|
export type { ReadingState, StorageLike } from "./persistence/readingState.js";
|
|
28
|
+
export { AppearanceStore, DEFAULT_THUMBNAIL_WIDTH, MAX_THUMBNAIL_WIDTH, MIN_THUMBNAIL_WIDTH, THUMBNAIL_SIZE_NAMES, normalizeBackground, resolveThumbnailSize, } from "./appearance/AppearanceStore.js";
|
|
29
|
+
export type { AppearanceChange, AppearanceDefaults, AppearanceSnapshot, ThumbnailSize, ThumbnailSizeName, } from "./appearance/AppearanceStore.js";
|
|
28
30
|
export { UiStore } from "./ui/UiStore.js";
|
|
29
31
|
export type { FullscreenMode, PanelId, UiDeps, UiNotice, UiSnapshot } from "./ui/UiStore.js";
|
|
30
32
|
export { PageCache } from "./cache/PageCache.js";
|
|
31
33
|
export type { PageCacheHooks, PageCacheLimits, PageCacheStats } from "./cache/PageCache.js";
|
|
32
34
|
export { FlipBookRuntimeError, toFlipBookError } from "./errors.js";
|
|
33
35
|
export type { FlipBookError, FlipBookErrorCode } from "./errors.js";
|
|
34
|
-
export type { EngineConfig, EngineConfigPatch, EngineEventMap, EngineOptions, EngineState, FlipBookController, FlipBookDirection, FlipBookActionControls, FlipBookBookmarkControls, FlipBookCacheControls, FlipBookCacheStats, FlipBookFullscreenControls, FlipBookNavigation, FlipBookOutlineControls, FlipBookOutlineItem, FlipBookPanelControls, FlipBookSearchControls, FlipBookZoomControls, FlipBookMode, FlipBookView, TurnState, WhileTurning, } from "./types.js";
|
|
36
|
+
export type { EngineConfig, EngineConfigPatch, EngineEventMap, EngineOptions, EngineState, FlipBookController, FlipBookDirection, FlipBookActionControls, FlipBookAppearanceControls, FlipBookBookmarkControls, FlipBookCacheControls, FlipBookCacheStats, FlipBookFullscreenControls, FlipBookNavigation, FlipBookOutlineControls, FlipBookOutlineItem, FlipBookPanelControls, FlipBookSearchControls, FlipBookZoomControls, FlipBookMode, FlipBookView, TurnState, WhileTurning, } from "./types.js";
|
|
35
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,SAAS,GACV,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAA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AAsB,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EACV,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,YAAY,GACb,MAAM,YAAY,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { buildPageText, compileQuery, estimateTextBytes, findMatches } from "./s
|
|
|
13
13
|
export { pageTextFromImage } from "./search/imageText.js";
|
|
14
14
|
export { SearchController } from "./search/SearchController.js";
|
|
15
15
|
export { readReadingState, writeReadingState } from "./persistence/readingState.js";
|
|
16
|
+
export { AppearanceStore, DEFAULT_THUMBNAIL_WIDTH, MAX_THUMBNAIL_WIDTH, MIN_THUMBNAIL_WIDTH, THUMBNAIL_SIZE_NAMES, normalizeBackground, resolveThumbnailSize, } from "./appearance/AppearanceStore.js";
|
|
16
17
|
export { UiStore } from "./ui/UiStore.js";
|
|
17
18
|
export { PageCache } from "./cache/PageCache.js";
|
|
18
19
|
export { FlipBookRuntimeError, toFlipBookError } from "./errors.js";
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,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M,sBAAsB,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { PageCacheStats } from "./cache/PageCache.js";
|
|
|
3
3
|
import type { SearchResult } from "./search/SearchController.js";
|
|
4
4
|
import type { PanelId } from "./ui/UiStore.js";
|
|
5
5
|
import type { Spread } from "./layout/spreads.js";
|
|
6
|
+
import type { ThumbnailSize } from "./appearance/AppearanceStore.js";
|
|
6
7
|
/** How many pages are visible at once. */
|
|
7
8
|
export type FlipBookView = "single" | "double";
|
|
8
9
|
/** `auto` picks `single` or `double` from the container width. */
|
|
@@ -120,6 +121,26 @@ export interface FlipBookPanelControls {
|
|
|
120
121
|
togglePanel: (panel: PanelId) => void;
|
|
121
122
|
getPanel: () => PanelId | null;
|
|
122
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* How the viewer looks. These work whether or not the matching toolbar control is shown, and a
|
|
126
|
+
* value set here replaces the `thumbnailSize` and `background` props until a prop changes.
|
|
127
|
+
*/
|
|
128
|
+
export interface FlipBookAppearanceControls {
|
|
129
|
+
/**
|
|
130
|
+
* Width of one page preview in the side panel: a number of pixels (kept between 48 and 240) or
|
|
131
|
+
* `"small"`, `"medium"` or `"large"`. `null` goes back to the `thumbnailSize` prop.
|
|
132
|
+
*/
|
|
133
|
+
setThumbnailSize: (size: ThumbnailSize | null) => void;
|
|
134
|
+
/** The preview width in use, in pixels. */
|
|
135
|
+
getThumbnailSize: () => number;
|
|
136
|
+
/**
|
|
137
|
+
* Any CSS background: a color, `"transparent"`, a gradient. `null` goes back to the `background`
|
|
138
|
+
* prop, or the theme's own when there is none.
|
|
139
|
+
*/
|
|
140
|
+
setBackground: (background: string | null) => void;
|
|
141
|
+
/** The background in use, or `null` for the theme's own. */
|
|
142
|
+
getBackground: () => string | null;
|
|
143
|
+
}
|
|
123
144
|
/** Toolbar actions, for use from your own UI. Each resolves when it is done and never rejects. */
|
|
124
145
|
export interface FlipBookActionControls {
|
|
125
146
|
download: () => Promise<void>;
|
|
@@ -169,5 +190,5 @@ export interface FlipBookCacheControls {
|
|
|
169
190
|
getCacheStats: () => FlipBookCacheStats;
|
|
170
191
|
}
|
|
171
192
|
/** Imperative API, available from `ref`, `useFlipBook()` and `renderToolbar`. */
|
|
172
|
-
export type FlipBookController = FlipBookNavigation & FlipBookZoomControls & FlipBookFullscreenControls & FlipBookBookmarkControls & FlipBookPanelControls & FlipBookActionControls & FlipBookSearchControls & FlipBookOutlineControls & FlipBookCacheControls;
|
|
193
|
+
export type FlipBookController = FlipBookNavigation & FlipBookZoomControls & FlipBookFullscreenControls & FlipBookBookmarkControls & FlipBookPanelControls & FlipBookAppearanceControls & FlipBookActionControls & FlipBookSearchControls & FlipBookOutlineControls & FlipBookCacheControls;
|
|
173
194
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KA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iG;IACjG,KAAK,EAAE,cAAc,CAAC;IACtB,+CAA+C;IAC/C,UAAU,EAAE,cAAc,CAAC;IAC3B,wDAAwD;IACxD,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC;AAED,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC,sGAAsG;IACtG,aAAa,EAAE,MAAM,kBAAkB,CAAC;CACzC;AAED,iFAAiF;AACjF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GACjD,oBAAoB,GACpB,0BAA0B,GAC1B,wBAAwB,GACxB,qBAAqB,GACrB,0BAA0B,GAC1B,sBAAsB,GACtB,sBAAsB,GACtB,uBAAuB,GACvB,qBAAqB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./react/index.js";
|
|
2
|
-
export type { AspectRatioProp, BookmarkOptions, BookmarkStorage, CustomPage, DownloadOptions, EngineState, FlipBookBookProps, FlipBookController, FlipBookDirection, FlipBookError, FlipBookErrorCode, FlipBookFeatures, FlipBookHotspot, FlipBookLink, FlipBookLocale, FlipBookMode, FlipBookPage, FlipBookPageInput, FlipBookProps, FlipBookStageProps, FlipBookTheme, FlipBookTurnEvent, FlipBookView, ImagePage, ImageTextBox, PasswordReason, PersistStateOptions, PdfOptions, PdfPage, PdfSource, PrintOptions, SearchOptions, ShareOptions, PanelId, UiSnapshot, UrlStateOptions, WhileTurning, ZoomSnapshot, } from "./types/index.js";
|
|
2
|
+
export type { AppearanceSnapshot, AspectRatioProp, BackgroundChoice, BookmarkOptions, BookmarkStorage, CustomPage, DownloadOptions, EngineState, FlipBookAppearanceControls, FlipBookBookProps, FlipBookController, FlipBookDirection, FlipBookError, FlipBookErrorCode, FlipBookFeatures, FlipBookHotspot, FlipBookLink, FlipBookLocale, FlipBookMode, FlipBookPage, FlipBookPageInput, FlipBookProps, FlipBookStageProps, FlipBookTheme, FlipBookTurnEvent, FlipBookView, ImagePage, ImageTextBox, PasswordReason, PersistStateOptions, PdfOptions, PdfPage, PdfSource, PrintOptions, SearchOptions, ShareOptions, ThumbnailSize, ThumbnailSizeName, PanelId, UiSnapshot, UrlStateOptions, WhileTurning, ZoomSnapshot, } from "./types/index.js";
|
|
3
3
|
export type { FlipBookCacheControls, FlipBookCacheStats, FlipBookOutlineControls, FlipBookOutlineItem, FlipBookSearchControls, SearchResult, SearchSnapshot, StorageLike, } from "./core/index.js";
|
|
4
|
+
export { LICENSE_INFO_URL, hostMatchesDomain, isDevelopmentHost, parseLicenseKey, verifyLicense } from "./license/index.js";
|
|
5
|
+
export type { LicenseProblem, LicensePayload, LicensePublicKey, LicenseStatus, VerifyLicenseOptions } from "./license/index.js";
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,YAAY,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EACf,WAAW,EACX,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,eAAe,EACf,YAAY,EACZ,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC5H,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAyDjC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { LicensePublicKey, LicenseStatus } from "./types.js";
|
|
2
|
+
/** The website the page is on, or null where there is no page (server rendering). */
|
|
3
|
+
export declare function currentHostname(): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* The license status of `key` for the website this page is on. Every viewer on a page asks the
|
|
6
|
+
* same question, so the check runs once per key and the answer is shared. On the server it answers
|
|
7
|
+
* `pending`: the check belongs to the browser, and the server's HTML has to match the browser's
|
|
8
|
+
* first render.
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkLicense(key: string | undefined): Promise<LicenseStatus>;
|
|
11
|
+
/** Forgets the answers. For tests: a page never needs it. */
|
|
12
|
+
export declare function resetLicenseChecks(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Checks keys against another public key, or against the package's own again with `undefined`. For
|
|
15
|
+
* tests, which sign keys with a key of their own. It is not exported from the package (nothing in
|
|
16
|
+
* `exports` reaches this file), so an app cannot swap the key.
|
|
17
|
+
*/
|
|
18
|
+
export declare function overrideLicensePublicKey(key: LicensePublicKey | null | undefined): void;
|
|
19
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/license/check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAOlE,qFAAqF;AACrF,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CAU5E;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAGvF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LICENSE_PUBLIC_KEY } from "./publicKey.js";
|
|
2
|
+
import { REVOKED_LICENSE_IDS } from "./revoked.js";
|
|
3
|
+
import { verifyLicense } from "./verify.js";
|
|
4
|
+
const PENDING = { state: "pending" };
|
|
5
|
+
const answers = new Map();
|
|
6
|
+
let publicKey = LICENSE_PUBLIC_KEY;
|
|
7
|
+
/** The website the page is on, or null where there is no page (server rendering). */
|
|
8
|
+
export function currentHostname() {
|
|
9
|
+
return typeof location === "undefined" ? null : location.hostname;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The license status of `key` for the website this page is on. Every viewer on a page asks the
|
|
13
|
+
* same question, so the check runs once per key and the answer is shared. On the server it answers
|
|
14
|
+
* `pending`: the check belongs to the browser, and the server's HTML has to match the browser's
|
|
15
|
+
* first render.
|
|
16
|
+
*/
|
|
17
|
+
export function checkLicense(key) {
|
|
18
|
+
const hostname = currentHostname();
|
|
19
|
+
if (hostname === null)
|
|
20
|
+
return Promise.resolve(PENDING);
|
|
21
|
+
const id = `${hostname}\n${key ?? ""}`;
|
|
22
|
+
let answer = answers.get(id);
|
|
23
|
+
if (!answer) {
|
|
24
|
+
answer = verifyLicense({ key, hostname, publicKey, revoked: REVOKED_LICENSE_IDS });
|
|
25
|
+
answers.set(id, answer);
|
|
26
|
+
}
|
|
27
|
+
return answer;
|
|
28
|
+
}
|
|
29
|
+
/** Forgets the answers. For tests: a page never needs it. */
|
|
30
|
+
export function resetLicenseChecks() {
|
|
31
|
+
answers.clear();
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Checks keys against another public key, or against the package's own again with `undefined`. For
|
|
35
|
+
* tests, which sign keys with a key of their own. It is not exported from the package (nothing in
|
|
36
|
+
* `exports` reaches this file), so an app cannot swap the key.
|
|
37
|
+
*/
|
|
38
|
+
export function overrideLicensePublicKey(key) {
|
|
39
|
+
publicKey = key === undefined ? LICENSE_PUBLIC_KEY : key;
|
|
40
|
+
answers.clear();
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/license/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAkB,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AACpD,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkC,CAAC;AAC1D,IAAI,SAAS,GAA4B,kBAAkB,CAAC;AAE5D,qFAAqF;AACrF,MAAM,UAAU,eAAe;IAC7B,OAAO,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACpE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,GAAuB;IAClD,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;IACnC,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,EAAE,GAAG,GAAG,QAAQ,KAAK,GAAG,IAAI,EAAE,EAAE,CAAC;IACvC,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,aAAa,CAAC,EAAE,G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