react-book-reader 1.1.7 → 1.1.8
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/lib/overlayer.js +175 -0
- package/lib/react-book-reader.es.js +6588 -918
- package/package.json +65 -64
- package/lib/comic-book-D8f_Cc7Q.js +0 -25
- package/lib/epub-vizLT02-.js +0 -681
- package/lib/fb2-DCqZtzQ5.js +0 -258
- package/lib/fflate-CExlDunL.js +0 -139
- package/lib/fixed-layout-CMyaX9h8.js +0 -195
- package/lib/mobi-CikMBloG.js +0 -960
- package/lib/paginator-CpnI4Urk.js +0 -748
- package/lib/pdf-D5_pBBCO.js +0 -109
- package/lib/search-aqQXTfxz.js +0 -72
- package/lib/tts-UQB-k9b_.js +0 -212
- package/lib/view-Ht0IwIBs.js +0 -774
- package/lib/zip-Bw0cufIw.js +0 -1509
package/package.json
CHANGED
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-book-reader",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "lib/react-book-reader.cjs.js",
|
|
6
|
-
"module": "lib/react-book-reader.es.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"lib"
|
|
9
|
-
],
|
|
10
|
-
"keywords": [
|
|
11
|
-
"react",
|
|
12
|
-
"ebook",
|
|
13
|
-
"reader",
|
|
14
|
-
"foliate-js",
|
|
15
|
-
"epub",
|
|
16
|
-
"MOBI",
|
|
17
|
-
"KF8",
|
|
18
|
-
"AZW3",
|
|
19
|
-
"FB2",
|
|
20
|
-
"CBZ",
|
|
21
|
-
"PDF"
|
|
22
|
-
],
|
|
23
|
-
"license": "Apache",
|
|
24
|
-
"homepage": "https://jinhuan138.github.io/react-book-reader/",
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "git@github.com:jinhuan138/react-book-reader.git"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"preinstall": "npx only-allow pnpm",
|
|
31
|
-
"dev": "vite",
|
|
32
|
-
"build": "vite build",
|
|
33
|
-
"preview": "vite preview",
|
|
34
|
-
"compile": "vite build",
|
|
35
|
-
"docs:dev": "npm -C docs run docs:dev",
|
|
36
|
-
"docs:build": "npm -C docs run docs:build",
|
|
37
|
-
"docs:preview": "npm -C docs run docs:preview"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@tailwindcss/vite": "^4.1.18",
|
|
41
|
-
"@types/node": "^25.2.0",
|
|
42
|
-
"@types/react": "^18.2.66",
|
|
43
|
-
"@types/react-dom": "^18.2.22",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
45
|
-
"@typescript-eslint/parser": "^7.2.0",
|
|
46
|
-
"@vitejs/plugin-react": "^4.2.1",
|
|
47
|
-
"eslint": "^8.57.0",
|
|
48
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
-
"eslint-plugin-react-refresh": "^0.4.6",
|
|
50
|
-
"prettier": "^3.
|
|
51
|
-
"react": "^18.3.1",
|
|
52
|
-
"react-book-reader": "
|
|
53
|
-
"react-dom": "^18.2.0",
|
|
54
|
-
"rollup-plugin-visualizer": "^6.0.5",
|
|
55
|
-
"tailwindcss": "^4.1.18",
|
|
56
|
-
"typescript": "^5.2.2",
|
|
57
|
-
"vite": "^7.3.1",
|
|
58
|
-
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "react-book-reader",
|
|
3
|
+
"version": "1.1.8",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "lib/react-book-reader.cjs.js",
|
|
6
|
+
"module": "lib/react-book-reader.es.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib"
|
|
9
|
+
],
|
|
10
|
+
"keywords": [
|
|
11
|
+
"react",
|
|
12
|
+
"ebook",
|
|
13
|
+
"reader",
|
|
14
|
+
"foliate-js",
|
|
15
|
+
"epub",
|
|
16
|
+
"MOBI",
|
|
17
|
+
"KF8",
|
|
18
|
+
"AZW3",
|
|
19
|
+
"FB2",
|
|
20
|
+
"CBZ",
|
|
21
|
+
"PDF"
|
|
22
|
+
],
|
|
23
|
+
"license": "Apache",
|
|
24
|
+
"homepage": "https://jinhuan138.github.io/react-book-reader/",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git@github.com:jinhuan138/react-book-reader.git"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"preinstall": "npx only-allow pnpm",
|
|
31
|
+
"dev": "vite",
|
|
32
|
+
"build": "vite build",
|
|
33
|
+
"preview": "vite preview",
|
|
34
|
+
"compile": "vite build",
|
|
35
|
+
"docs:dev": "npm -C docs run docs:dev",
|
|
36
|
+
"docs:build": "npm -C docs run docs:build",
|
|
37
|
+
"docs:preview": "npm -C docs run docs:preview"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
41
|
+
"@types/node": "^25.2.0",
|
|
42
|
+
"@types/react": "^18.2.66",
|
|
43
|
+
"@types/react-dom": "^18.2.22",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
45
|
+
"@typescript-eslint/parser": "^7.2.0",
|
|
46
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
47
|
+
"eslint": "^8.57.0",
|
|
48
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
50
|
+
"prettier": "^3.8.1",
|
|
51
|
+
"react": "^18.3.1",
|
|
52
|
+
"react-book-reader": "*",
|
|
53
|
+
"react-dom": "^18.2.0",
|
|
54
|
+
"rollup-plugin-visualizer": "^6.0.5",
|
|
55
|
+
"tailwindcss": "^4.1.18",
|
|
56
|
+
"typescript": "^5.2.2",
|
|
57
|
+
"vite": "^7.3.1",
|
|
58
|
+
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
59
|
+
"vite-plugin-static-copy": "^3.2.0",
|
|
60
|
+
"yet-another-react-lightbox-lite": "^1.10.0"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"core-js": "^3.48.0"
|
|
64
|
+
},
|
|
65
|
+
"packageManager": "pnpm@9.6.0"
|
|
65
66
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const h = ({ entries: i, loadBlob: a, getSize: l }, d) => {
|
|
2
|
-
const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), f = async (e) => {
|
|
3
|
-
if (r.has(e)) return r.get(e);
|
|
4
|
-
const o = URL.createObjectURL(await a(e)), n = URL.createObjectURL(
|
|
5
|
-
new Blob([`<!DOCTYPE html><html><head><meta charset="utf-8"></head><body style="margin: 0"><img src="${o}"></body></html>`], { type: "text/html" })
|
|
6
|
-
);
|
|
7
|
-
return s.set(e, [o, n]), r.set(e, n), n;
|
|
8
|
-
}, p = (e) => {
|
|
9
|
-
s.get(e)?.forEach?.((o) => URL.revokeObjectURL(o)), s.delete(e), r.delete(e);
|
|
10
|
-
}, g = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".jxl", ".avif"], c = i.map((e) => e.filename).filter((e) => g.some((o) => e.endsWith(o))).sort();
|
|
11
|
-
if (!c.length) throw new Error("No supported image files in archive");
|
|
12
|
-
const t = {};
|
|
13
|
-
return t.getCover = () => a(c[0]), t.metadata = { title: d.name }, t.sections = c.map((e) => ({
|
|
14
|
-
id: e,
|
|
15
|
-
load: () => f(e),
|
|
16
|
-
unload: () => p(e),
|
|
17
|
-
size: l(e)
|
|
18
|
-
})), t.toc = c.map((e) => ({ label: e, href: e })), t.rendition = { layout: "pre-paginated" }, t.resolveHref = (e) => ({ index: t.sections.findIndex((o) => o.id === e) }), t.splitTOCHref = (e) => [e, null], t.getTOCFragment = (e) => e.documentElement, t.destroy = () => {
|
|
19
|
-
for (const e of s.values())
|
|
20
|
-
for (const o of e) URL.revokeObjectURL(o);
|
|
21
|
-
}, t;
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
h as makeComicBook
|
|
25
|
-
};
|