vue-book-reader 1.1.5 → 1.1.7
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/index.css +22 -22
- package/lib/vue-book-reader.cjs.js +10 -10
- package/lib/vue-book-reader.es.js +10 -10
- package/lib/vue-book-reader.umd.js +11 -11
- package/package.json +2 -1
package/lib/index.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
.reader[data-v-
|
|
2
|
+
.reader[data-v-45c8d647] {
|
|
3
3
|
position: absolute;
|
|
4
4
|
inset: 50px 50px 20px;
|
|
5
5
|
}
|
|
6
|
-
.viewHolder[data-v-
|
|
6
|
+
.viewHolder[data-v-45c8d647] {
|
|
7
7
|
height: 100%;
|
|
8
8
|
width: 100%;
|
|
9
9
|
position: relative;
|
|
10
10
|
}
|
|
11
|
-
#viewer[data-v-
|
|
11
|
+
#viewer[data-v-45c8d647] {
|
|
12
12
|
height: 100%;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -83,15 +83,15 @@
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/* container */
|
|
86
|
-
.container[data-v-
|
|
86
|
+
.container[data-v-829d32cd] {
|
|
87
87
|
overflow: hidden;
|
|
88
88
|
position: relative;
|
|
89
89
|
height: 100%;
|
|
90
90
|
}
|
|
91
|
-
.containerExpanded[data-v-
|
|
91
|
+
.containerExpanded[data-v-829d32cd] {
|
|
92
92
|
transform: translateX(256px);
|
|
93
93
|
}
|
|
94
|
-
.readerArea[data-v-
|
|
94
|
+
.readerArea[data-v-829d32cd] {
|
|
95
95
|
position: relative;
|
|
96
96
|
z-index: 1;
|
|
97
97
|
height: 100%;
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
background-color: #fff;
|
|
100
100
|
transition: all 0.3s ease;
|
|
101
101
|
}
|
|
102
|
-
.container .titleArea[data-v-
|
|
102
|
+
.container .titleArea[data-v-829d32cd] {
|
|
103
103
|
position: absolute;
|
|
104
104
|
top: 20px;
|
|
105
105
|
left: 50px;
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/* toc */
|
|
115
|
-
.tocBackground[data-v-
|
|
115
|
+
.tocBackground[data-v-829d32cd] {
|
|
116
116
|
position: absolute;
|
|
117
117
|
left: 256px;
|
|
118
118
|
top: 0;
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
right: 0;
|
|
121
121
|
z-index: 1;
|
|
122
122
|
}
|
|
123
|
-
.tocArea[data-v-
|
|
123
|
+
.tocArea[data-v-829d32cd] {
|
|
124
124
|
position: absolute;
|
|
125
125
|
left: 0;
|
|
126
126
|
top: 0;
|
|
@@ -134,18 +134,18 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/* 滚动条 */
|
|
137
|
-
.tocArea[data-v-
|
|
137
|
+
.tocArea[data-v-829d32cd]::-webkit-scrollbar {
|
|
138
138
|
width: 5px;
|
|
139
139
|
height: 5px;
|
|
140
140
|
}
|
|
141
|
-
.tocArea[data-v-
|
|
141
|
+
.tocArea[data-v-829d32cd]::-webkit-scrollbar-thumb:vertical {
|
|
142
142
|
height: 5px;
|
|
143
143
|
background-color: rgba(0, 0, 0, 0.1);
|
|
144
144
|
border-radius: 0.5rem;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
/* tocButton */
|
|
148
|
-
.tocButton[data-v-
|
|
148
|
+
.tocButton[data-v-829d32cd] {
|
|
149
149
|
background: none;
|
|
150
150
|
border: none;
|
|
151
151
|
width: 32px;
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
outline: none;
|
|
158
158
|
cursor: pointer;
|
|
159
159
|
}
|
|
160
|
-
.tocButtonBar[data-v-
|
|
160
|
+
.tocButtonBar[data-v-829d32cd] {
|
|
161
161
|
position: absolute;
|
|
162
162
|
width: 60%;
|
|
163
163
|
background: #ccc;
|
|
@@ -167,12 +167,12 @@
|
|
|
167
167
|
top: 50%;
|
|
168
168
|
transition: all 0.5s ease;
|
|
169
169
|
}
|
|
170
|
-
.tocButtonExpanded[data-v-
|
|
170
|
+
.tocButtonExpanded[data-v-829d32cd] {
|
|
171
171
|
background: #f2f2f2;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
/* 翻页 */
|
|
175
|
-
.arrow[data-v-
|
|
175
|
+
.arrow[data-v-829d32cd] {
|
|
176
176
|
outline: none;
|
|
177
177
|
border: none;
|
|
178
178
|
background: none;
|
|
@@ -188,22 +188,22 @@
|
|
|
188
188
|
appearance: none;
|
|
189
189
|
font-weight: normal;
|
|
190
190
|
}
|
|
191
|
-
.arrow[data-v-
|
|
191
|
+
.arrow[data-v-829d32cd]:hover {
|
|
192
192
|
color: #777;
|
|
193
193
|
}
|
|
194
|
-
.arrow[data-v-
|
|
194
|
+
.arrow[data-v-829d32cd]:disabled {
|
|
195
195
|
cursor: not-allowed;
|
|
196
196
|
color: #e2e2e2;
|
|
197
197
|
}
|
|
198
|
-
.prev[data-v-
|
|
198
|
+
.prev[data-v-829d32cd] {
|
|
199
199
|
left: 1px;
|
|
200
200
|
}
|
|
201
|
-
.next[data-v-
|
|
201
|
+
.next[data-v-829d32cd] {
|
|
202
202
|
right: 1px;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
/* loading */
|
|
206
|
-
.loadingView[data-v-
|
|
206
|
+
.loadingView[data-v-829d32cd] {
|
|
207
207
|
position: absolute;
|
|
208
208
|
top: 50%;
|
|
209
209
|
left: 10%;
|
|
@@ -214,12 +214,12 @@
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
/* errorView */
|
|
217
|
-
.errorView[data-v-
|
|
217
|
+
.errorView[data-v-829d32cd] {
|
|
218
218
|
position: absolute;
|
|
219
219
|
top: 50%;
|
|
220
220
|
left: 10%;
|
|
221
221
|
right: 10%;
|
|
222
222
|
color: #c00;
|
|
223
223
|
text-align: center;
|
|
224
|
-
margin-top:
|
|
224
|
+
margin-top: -0.5em;
|
|
225
225
|
}
|
|
@@ -1163,6 +1163,7 @@ const _sfc_main$2 = {
|
|
|
1163
1163
|
const initBook = async () => {
|
|
1164
1164
|
Promise.resolve().then(() => require("./view-BWKNxnVD.cjs")).then((n) => n.view).then(async (res) => {
|
|
1165
1165
|
view = document.createElement("foliate-view");
|
|
1166
|
+
getRendition(view);
|
|
1166
1167
|
viewer.value.append(view);
|
|
1167
1168
|
if (url.value) {
|
|
1168
1169
|
view && view.close();
|
|
@@ -1191,9 +1192,6 @@ const _sfc_main$2 = {
|
|
|
1191
1192
|
})
|
|
1192
1193
|
);
|
|
1193
1194
|
registerEvents();
|
|
1194
|
-
view.addEventListener("load", () => {
|
|
1195
|
-
getRendition(view);
|
|
1196
|
-
});
|
|
1197
1195
|
tocChanged && tocChanged(book.toc);
|
|
1198
1196
|
if (location.value) {
|
|
1199
1197
|
view == null ? void 0 : view.goTo(location.value);
|
|
@@ -1255,7 +1253,7 @@ const _sfc_main$2 = {
|
|
|
1255
1253
|
};
|
|
1256
1254
|
}
|
|
1257
1255
|
};
|
|
1258
|
-
const BookView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
1256
|
+
const BookView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-45c8d647"]]);
|
|
1259
1257
|
const _hoisted_1$1 = ["onClick"];
|
|
1260
1258
|
const _hoisted_2$1 = { key: 0 };
|
|
1261
1259
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -1317,7 +1315,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1317
1315
|
}
|
|
1318
1316
|
});
|
|
1319
1317
|
const Toc = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-300395c2"]]);
|
|
1320
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
1318
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-829d32cd"), n = n(), vue.popScopeId(), n);
|
|
1321
1319
|
const _hoisted_1 = { class: "container" };
|
|
1322
1320
|
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", {
|
|
1323
1321
|
class: "tocButtonBar",
|
|
@@ -1373,12 +1371,14 @@ const _sfc_main = {
|
|
|
1373
1371
|
currentHref.value = (_a = detail.tocItem) == null ? void 0 : _a.href;
|
|
1374
1372
|
};
|
|
1375
1373
|
const onGetRendition = (val) => {
|
|
1376
|
-
var _a;
|
|
1377
1374
|
rendition = val;
|
|
1378
1375
|
getRendition && getRendition(rendition);
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1376
|
+
rendition.addEventListener("load", () => {
|
|
1377
|
+
var _a;
|
|
1378
|
+
const { book: book2 } = rendition;
|
|
1379
|
+
const title = (_a = book2.metadata) == null ? void 0 : _a.title;
|
|
1380
|
+
bookName.value = title || "";
|
|
1381
|
+
});
|
|
1382
1382
|
rendition.addEventListener("relocate", onRelocate);
|
|
1383
1383
|
};
|
|
1384
1384
|
const onTocChange = (_toc) => {
|
|
@@ -1467,7 +1467,7 @@ const _sfc_main = {
|
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
1469
|
};
|
|
1470
|
-
const VueReader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1470
|
+
const VueReader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-829d32cd"]]);
|
|
1471
1471
|
exports.BookView = BookView;
|
|
1472
1472
|
exports.VueReader = VueReader;
|
|
1473
1473
|
exports.default = VueReader;
|
|
@@ -1161,6 +1161,7 @@ const _sfc_main$2 = {
|
|
|
1161
1161
|
const initBook = async () => {
|
|
1162
1162
|
import("./view-DXqPfWdc.js").then((n) => n.v).then(async (res) => {
|
|
1163
1163
|
view = document.createElement("foliate-view");
|
|
1164
|
+
getRendition(view);
|
|
1164
1165
|
viewer.value.append(view);
|
|
1165
1166
|
if (url.value) {
|
|
1166
1167
|
view && view.close();
|
|
@@ -1189,9 +1190,6 @@ const _sfc_main$2 = {
|
|
|
1189
1190
|
})
|
|
1190
1191
|
);
|
|
1191
1192
|
registerEvents();
|
|
1192
|
-
view.addEventListener("load", () => {
|
|
1193
|
-
getRendition(view);
|
|
1194
|
-
});
|
|
1195
1193
|
tocChanged && tocChanged(book.toc);
|
|
1196
1194
|
if (location.value) {
|
|
1197
1195
|
view == null ? void 0 : view.goTo(location.value);
|
|
@@ -1253,7 +1251,7 @@ const _sfc_main$2 = {
|
|
|
1253
1251
|
};
|
|
1254
1252
|
}
|
|
1255
1253
|
};
|
|
1256
|
-
const BookView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
1254
|
+
const BookView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-45c8d647"]]);
|
|
1257
1255
|
const _hoisted_1$1 = ["onClick"];
|
|
1258
1256
|
const _hoisted_2$1 = { key: 0 };
|
|
1259
1257
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
@@ -1315,7 +1313,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1315
1313
|
}
|
|
1316
1314
|
});
|
|
1317
1315
|
const Toc = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-300395c2"]]);
|
|
1318
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
1316
|
+
const _withScopeId = (n) => (pushScopeId("data-v-829d32cd"), n = n(), popScopeId(), n);
|
|
1319
1317
|
const _hoisted_1 = { class: "container" };
|
|
1320
1318
|
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", {
|
|
1321
1319
|
class: "tocButtonBar",
|
|
@@ -1371,12 +1369,14 @@ const _sfc_main = {
|
|
|
1371
1369
|
currentHref.value = (_a = detail.tocItem) == null ? void 0 : _a.href;
|
|
1372
1370
|
};
|
|
1373
1371
|
const onGetRendition = (val) => {
|
|
1374
|
-
var _a;
|
|
1375
1372
|
rendition = val;
|
|
1376
1373
|
getRendition && getRendition(rendition);
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1374
|
+
rendition.addEventListener("load", () => {
|
|
1375
|
+
var _a;
|
|
1376
|
+
const { book: book2 } = rendition;
|
|
1377
|
+
const title = (_a = book2.metadata) == null ? void 0 : _a.title;
|
|
1378
|
+
bookName.value = title || "";
|
|
1379
|
+
});
|
|
1380
1380
|
rendition.addEventListener("relocate", onRelocate);
|
|
1381
1381
|
};
|
|
1382
1382
|
const onTocChange = (_toc) => {
|
|
@@ -1465,7 +1465,7 @@ const _sfc_main = {
|
|
|
1465
1465
|
};
|
|
1466
1466
|
}
|
|
1467
1467
|
};
|
|
1468
|
-
const VueReader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1468
|
+
const VueReader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-829d32cd"]]);
|
|
1469
1469
|
export {
|
|
1470
1470
|
BookView,
|
|
1471
1471
|
VueReader,
|
|
@@ -34,7 +34,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
34
34
|
|
|
35
35
|
var _a, _fakeWorkerId, _isWorkerDisabled, _workerPorts, _resolve, resolve_fn, _mainThreadWorkerMessageHandler, mainThreadWorkerMessageHandler_get;
|
|
36
36
|
var __vite_style__ = document.createElement("style");
|
|
37
|
-
__vite_style__.textContent = "\n.reader[data-v-
|
|
37
|
+
__vite_style__.textContent = "\n.reader[data-v-45c8d647] {\r\n position: absolute;\r\n inset: 50px 50px 20px;\n}\n.viewHolder[data-v-45c8d647] {\r\n height: 100%;\r\n width: 100%;\r\n position: relative;\n}\n#viewer[data-v-45c8d647] {\r\n height: 100%;\n}\r\n\r\n/* ↓ */\n.tocAreaButton .expansion[data-v-300395c2]::before {\r\n transform: rotate(-45deg) translateX(2.5px);\n}\n.tocAreaButton .expansion[data-v-300395c2]::after {\r\n transform: rotate(45deg) translateX(-2.5px);\n}\r\n\r\n/* ↑ */\n.tocAreaButton .open[data-v-300395c2]::before {\r\n transform: rotate(45deg) translateX(2.5px);\n}\n.tocAreaButton .open[data-v-300395c2]::after {\r\n transform: rotate(-45deg) translateX(-2.5px);\n}\n.tocAreaButton[data-v-300395c2] {\r\n user-select: none;\r\n appearance: none;\r\n background: none;\r\n border: none;\r\n display: block;\r\n font-family: sans-serif;\r\n width: 100%;\r\n font-size: 0.9em;\r\n text-align: left;\r\n padding: 0.9em 1em;\r\n border-bottom: 1px solid #ddd;\r\n color: #aaa;\r\n box-sizing: border-box;\r\n outline: none;\r\n cursor: pointer;\r\n position: relative;\n}\n.tocAreaButton[data-v-300395c2]:hover {\r\n background: rgba(0, 0, 0, 0.05);\n}\n.tocAreaButton[data-v-300395c2]:active {\r\n background: rgba(0, 0, 0, 0.1);\n}\n.active[data-v-300395c2] {\r\n color: #1565c0;\r\n border-bottom: 2px solid #1565c0;\n}\r\n\r\n/* 二级目录 */\n.tocAreaButton .expansion[data-v-300395c2] {\r\n cursor: pointer;\r\n transform: translateY(-50%);\r\n top: 50%;\r\n right: 12px;\r\n position: absolute;\r\n width: 10px;\r\n background-color: #a2a5b4;\r\n transition:\r\n transform 0.3s ease-in-out,\r\n top 0.3s ease-in-out;\n}\n.tocAreaButton .expansion[data-v-300395c2]::after,\r\n.tocAreaButton .expansion[data-v-300395c2]::before {\r\n content: '';\r\n position: absolute;\r\n width: 6px;\r\n height: 2px;\r\n background-color: currentcolor;\r\n border-radius: 2px;\r\n transition:\r\n transform 0.3s ease-in-out,\r\n top 0.3s ease-in-out;\n}\r\n\r\n/* container */\n.container[data-v-829d32cd] {\r\n overflow: hidden;\r\n position: relative;\r\n height: 100%;\n}\n.containerExpanded[data-v-829d32cd] {\r\n transform: translateX(256px);\n}\n.readerArea[data-v-829d32cd] {\r\n position: relative;\r\n z-index: 1;\r\n height: 100%;\r\n width: 100%;\r\n background-color: #fff;\r\n transition: all 0.3s ease;\n}\n.container .titleArea[data-v-829d32cd] {\r\n position: absolute;\r\n top: 20px;\r\n left: 50px;\r\n right: 50px;\r\n text-align: center;\r\n color: #999;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\n}\r\n\r\n/* toc */\n.tocBackground[data-v-829d32cd] {\r\n position: absolute;\r\n left: 256px;\r\n top: 0;\r\n bottom: 0;\r\n right: 0;\r\n z-index: 1;\n}\n.tocArea[data-v-829d32cd] {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n bottom: 0;\r\n z-index: 0;\r\n width: 256px;\r\n overflow-y: auto;\r\n -webkit-overflow-scrolling: touch;\r\n background: #f2f2f2;\r\n padding: 10px 0;\n}\r\n\r\n/* 滚动条 */\n.tocArea[data-v-829d32cd]::-webkit-scrollbar {\r\n width: 5px;\r\n height: 5px;\n}\n.tocArea[data-v-829d32cd]::-webkit-scrollbar-thumb:vertical {\r\n height: 5px;\r\n background-color: rgba(0, 0, 0, 0.1);\r\n border-radius: 0.5rem;\n}\r\n\r\n/* tocButton */\n.tocButton[data-v-829d32cd] {\r\n background: none;\r\n border: none;\r\n width: 32px;\r\n height: 32px;\r\n position: absolute;\r\n top: 10px;\r\n left: 10px;\r\n border-radius: 2px;\r\n outline: none;\r\n cursor: pointer;\n}\n.tocButtonBar[data-v-829d32cd] {\r\n position: absolute;\r\n width: 60%;\r\n background: #ccc;\r\n height: 2px;\r\n left: 50%;\r\n margin: -1px -30%;\r\n top: 50%;\r\n transition: all 0.5s ease;\n}\n.tocButtonExpanded[data-v-829d32cd] {\r\n background: #f2f2f2;\n}\r\n\r\n/* 翻页 */\n.arrow[data-v-829d32cd] {\r\n outline: none;\r\n border: none;\r\n background: none;\r\n position: absolute;\r\n top: 50%;\r\n margin-top: -32px;\r\n font-size: 64px;\r\n padding: 0 10px;\r\n color: #e2e2e2;\r\n font-family: arial, sans-serif;\r\n cursor: pointer;\r\n user-select: none;\r\n appearance: none;\r\n font-weight: normal;\n}\n.arrow[data-v-829d32cd]:hover {\r\n color: #777;\n}\n.arrow[data-v-829d32cd]:disabled {\r\n cursor: not-allowed;\r\n color: #e2e2e2;\n}\n.prev[data-v-829d32cd] {\r\n left: 1px;\n}\n.next[data-v-829d32cd] {\r\n right: 1px;\n}\r\n\r\n/* loading */\n.loadingView[data-v-829d32cd] {\r\n position: absolute;\r\n top: 50%;\r\n left: 10%;\r\n right: 10%;\r\n color: #ccc;\r\n text-align: center;\r\n margin-top: -0.5em;\n}\r\n\r\n/* errorView */\n.errorView[data-v-829d32cd] {\r\n position: absolute;\r\n top: 50%;\r\n left: 10%;\r\n right: 10%;\r\n color: #c00;\r\n text-align: center;\r\n margin-top: -0.5em;\n}\r\n";
|
|
38
38
|
document.head.appendChild(__vite_style__);
|
|
39
39
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
40
40
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -1199,6 +1199,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1199
1199
|
const initBook = async () => {
|
|
1200
1200
|
Promise.resolve().then(() => view).then(async (res) => {
|
|
1201
1201
|
view$1 = document.createElement("foliate-view");
|
|
1202
|
+
getRendition(view$1);
|
|
1202
1203
|
viewer.value.append(view$1);
|
|
1203
1204
|
if (url.value) {
|
|
1204
1205
|
view$1 && view$1.close();
|
|
@@ -1227,9 +1228,6 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1227
1228
|
})
|
|
1228
1229
|
);
|
|
1229
1230
|
registerEvents();
|
|
1230
|
-
view$1.addEventListener("load", () => {
|
|
1231
|
-
getRendition(view$1);
|
|
1232
|
-
});
|
|
1233
1231
|
tocChanged && tocChanged(book.toc);
|
|
1234
1232
|
if (location2.value) {
|
|
1235
1233
|
view$1 == null ? void 0 : view$1.goTo(location2.value);
|
|
@@ -1291,7 +1289,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1291
1289
|
};
|
|
1292
1290
|
}
|
|
1293
1291
|
};
|
|
1294
|
-
const BookView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
1292
|
+
const BookView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-45c8d647"]]);
|
|
1295
1293
|
const _hoisted_1$1 = ["onClick"];
|
|
1296
1294
|
const _hoisted_2$1 = { key: 0 };
|
|
1297
1295
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -1353,7 +1351,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1353
1351
|
}
|
|
1354
1352
|
});
|
|
1355
1353
|
const Toc = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-300395c2"]]);
|
|
1356
|
-
const _withScopeId = (n2) => (vue.pushScopeId("data-v-
|
|
1354
|
+
const _withScopeId = (n2) => (vue.pushScopeId("data-v-829d32cd"), n2 = n2(), vue.popScopeId(), n2);
|
|
1357
1355
|
const _hoisted_1 = { class: "container" };
|
|
1358
1356
|
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", {
|
|
1359
1357
|
class: "tocButtonBar",
|
|
@@ -1409,12 +1407,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1409
1407
|
currentHref.value = (_a2 = detail.tocItem) == null ? void 0 : _a2.href;
|
|
1410
1408
|
};
|
|
1411
1409
|
const onGetRendition = (val) => {
|
|
1412
|
-
var _a2;
|
|
1413
1410
|
rendition = val;
|
|
1414
1411
|
getRendition && getRendition(rendition);
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1412
|
+
rendition.addEventListener("load", () => {
|
|
1413
|
+
var _a2;
|
|
1414
|
+
const { book: book2 } = rendition;
|
|
1415
|
+
const title = (_a2 = book2.metadata) == null ? void 0 : _a2.title;
|
|
1416
|
+
bookName.value = title || "";
|
|
1417
|
+
});
|
|
1418
1418
|
rendition.addEventListener("relocate", onRelocate);
|
|
1419
1419
|
};
|
|
1420
1420
|
const onTocChange = (_toc) => {
|
|
@@ -1503,7 +1503,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
1505
|
};
|
|
1506
|
-
const VueReader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1506
|
+
const VueReader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-829d32cd"]]);
|
|
1507
1507
|
const findIndices = (arr, f2) => arr.map((x2, i2, a2) => f2(x2, i2, a2) ? i2 : null).filter((x2) => x2 != null);
|
|
1508
1508
|
const splitAt = (arr, is) => [-1, ...is, arr.length].reduce(({ xs, a: a2 }, b2) => ({ xs: (xs == null ? void 0 : xs.concat([arr.slice(a2 + 1, b2)])) ?? [], a: b2 }), {}).xs;
|
|
1509
1509
|
const concatArrays = (a2, b2) => a2.slice(0, -1).concat([a2[a2.length - 1].concat(b2[0])]).concat(b2.slice(1));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-book-reader",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/vue-book-reader.umd.js",
|
|
6
6
|
"module": "lib/vue-book-reader.es.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"keywords": [
|
|
11
11
|
"vue3",
|
|
12
12
|
"reader",
|
|
13
|
+
"ebooks",
|
|
13
14
|
"epub",
|
|
14
15
|
"MOBI",
|
|
15
16
|
"KF8",
|