vue-book-reader 1.2.6 → 1.2.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.
|
@@ -2839,7 +2839,7 @@ let View$1 = class View extends HTMLElement {
|
|
|
2839
2839
|
const href_ = a2.getAttribute("href");
|
|
2840
2840
|
const href = ((_a = section == null ? void 0 : section.resolveHref) == null ? void 0 : _a.call(section, href_)) ?? href_;
|
|
2841
2841
|
if ((_b = book == null ? void 0 : book.isExternal) == null ? void 0 : _b.call(book, href))
|
|
2842
|
-
Promise.resolve(this.#emit("external-link", { a: a2,
|
|
2842
|
+
Promise.resolve(this.#emit("external-link", { a: a2, href_ }, true)).then((x2) => x2 ? globalThis.open(href_, "_blank") : null).catch((e3) => console.error(e3));
|
|
2843
2843
|
else Promise.resolve(this.#emit("link", { a: a2, href }, true)).then((x2) => x2 ? this.goTo(href) : null).catch((e3) => console.error(e3));
|
|
2844
2844
|
});
|
|
2845
2845
|
}
|
|
@@ -5569,6 +5569,7 @@ const makeFB2 = async (blob) => {
|
|
|
5569
5569
|
return ((_a = href == null ? void 0 : href.split("#")) == null ? void 0 : _a.map((x2) => Number(x2))) ?? [];
|
|
5570
5570
|
};
|
|
5571
5571
|
book.getTOCFragment = (doc2, id) => doc2.querySelector(`[${dataID}="${id}"]`);
|
|
5572
|
+
book.isExternal = (uri) => /^\w+:/i.test(uri);
|
|
5572
5573
|
book.destroy = () => {
|
|
5573
5574
|
for (const url of urls) URL.revokeObjectURL(url);
|
|
5574
5575
|
};
|
|
@@ -6082,8 +6083,8 @@ const makePDF = async (file) => {
|
|
|
6082
6083
|
};
|
|
6083
6084
|
const pdf2 = await pdfjsLib.getDocument({
|
|
6084
6085
|
range: transport,
|
|
6085
|
-
cMapUrl: pdfjsPath(
|
|
6086
|
-
standardFontDataUrl: pdfjsPath(
|
|
6086
|
+
// cMapUrl: pdfjsPath('cmaps/'),
|
|
6087
|
+
// standardFontDataUrl: pdfjsPath('standard_fonts/'),
|
|
6087
6088
|
isEvalSupported: false
|
|
6088
6089
|
}).promise;
|
|
6089
6090
|
const book = { rendition: { layout: "pre-paginated" } };
|
|
@@ -2846,7 +2846,7 @@
|
|
|
2846
2846
|
const href_ = a2.getAttribute("href");
|
|
2847
2847
|
const href = ((_a = section == null ? void 0 : section.resolveHref) == null ? void 0 : _a.call(section, href_)) ?? href_;
|
|
2848
2848
|
if ((_b = book == null ? void 0 : book.isExternal) == null ? void 0 : _b.call(book, href))
|
|
2849
|
-
Promise.resolve(this.#emit("external-link", { a: a2,
|
|
2849
|
+
Promise.resolve(this.#emit("external-link", { a: a2, href_ }, true)).then((x2) => x2 ? globalThis.open(href_, "_blank") : null).catch((e3) => console.error(e3));
|
|
2850
2850
|
else Promise.resolve(this.#emit("link", { a: a2, href }, true)).then((x2) => x2 ? this.goTo(href) : null).catch((e3) => console.error(e3));
|
|
2851
2851
|
});
|
|
2852
2852
|
}
|
|
@@ -5576,6 +5576,7 @@ body:not(.notesBodyType) > .title, body:not(.notesBodyType) > .epigraph {
|
|
|
5576
5576
|
return ((_a = href == null ? void 0 : href.split("#")) == null ? void 0 : _a.map((x2) => Number(x2))) ?? [];
|
|
5577
5577
|
};
|
|
5578
5578
|
book.getTOCFragment = (doc2, id) => doc2.querySelector(`[${dataID}="${id}"]`);
|
|
5579
|
+
book.isExternal = (uri) => /^\w+:/i.test(uri);
|
|
5579
5580
|
book.destroy = () => {
|
|
5580
5581
|
for (const url of urls) URL.revokeObjectURL(url);
|
|
5581
5582
|
};
|
|
@@ -6089,8 +6090,8 @@ body:not(.notesBodyType) > .title, body:not(.notesBodyType) > .epigraph {
|
|
|
6089
6090
|
};
|
|
6090
6091
|
const pdf2 = await pdfjsLib.getDocument({
|
|
6091
6092
|
range: transport,
|
|
6092
|
-
cMapUrl: pdfjsPath(
|
|
6093
|
-
standardFontDataUrl: pdfjsPath(
|
|
6093
|
+
// cMapUrl: pdfjsPath('cmaps/'),
|
|
6094
|
+
// standardFontDataUrl: pdfjsPath('standard_fonts/'),
|
|
6094
6095
|
isEvalSupported: false
|
|
6095
6096
|
}).promise;
|
|
6096
6097
|
const book = { rendition: { layout: "pre-paginated" } };
|