@prose-reader/archive-reader 1.339.0 → 1.340.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/dist/comicInfo/resolve.d.ts +5 -5
- package/dist/index/index.cjs +1 -1
- package/dist/index/index.cjs.map +1 -1
- package/dist/index/index.js +25 -19
- package/dist/index/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/opf/resolve.d.ts +2 -2
- package/dist/types/resolvedMetadata.d.ts +11 -4
- package/package.json +3 -3
package/dist/index/index.js
CHANGED
|
@@ -187,24 +187,24 @@ var pe = /* @__PURE__ */ new Set([
|
|
|
187
187
|
CommunityRating: "comic.communityRating",
|
|
188
188
|
Count: "belongsTo.series",
|
|
189
189
|
CoverArtist: "contributors",
|
|
190
|
-
Day: "
|
|
190
|
+
Day: "publication.edition.date",
|
|
191
191
|
Editor: "contributors",
|
|
192
192
|
Format: "comic.format",
|
|
193
193
|
Genre: "subjects",
|
|
194
194
|
GTIN: "identifiers",
|
|
195
|
-
Imprint: "imprint",
|
|
195
|
+
Imprint: "publication.edition.imprint",
|
|
196
196
|
Inker: "contributors",
|
|
197
197
|
LanguageISO: "languages",
|
|
198
198
|
Letterer: "contributors",
|
|
199
199
|
Locations: "comic.locations",
|
|
200
200
|
MainCharacterOrTeam: "comic.mainCharacterOrTeam",
|
|
201
201
|
Manga: "readingDirection",
|
|
202
|
-
Month: "
|
|
202
|
+
Month: "publication.edition.date",
|
|
203
203
|
Notes: "comic.notes",
|
|
204
204
|
Number: "belongsTo.series",
|
|
205
205
|
PageCount: "numberOfPages",
|
|
206
206
|
Penciller: "contributors",
|
|
207
|
-
Publisher: "publisher",
|
|
207
|
+
Publisher: "publication.edition.publisher",
|
|
208
208
|
Review: "comic.review",
|
|
209
209
|
ScanInformation: "comic.scanInformation",
|
|
210
210
|
Series: "belongsTo.series",
|
|
@@ -219,7 +219,7 @@ var pe = /* @__PURE__ */ new Set([
|
|
|
219
219
|
Volume: "comic.volume",
|
|
220
220
|
Web: "comic.web",
|
|
221
221
|
Writer: "contributors",
|
|
222
|
-
Year: "
|
|
222
|
+
Year: "publication.edition.date"
|
|
223
223
|
}, ge = (e) => {
|
|
224
224
|
switch (e.Manga) {
|
|
225
225
|
case "YesAndRightToLeft": return "rtl";
|
|
@@ -327,16 +327,18 @@ var pe = /* @__PURE__ */ new Set([
|
|
|
327
327
|
collection: n
|
|
328
328
|
});
|
|
329
329
|
}, V = (e) => {
|
|
330
|
-
let t = e.GTIN, n = I(t), r = I(e.LanguageISO), i = [...L(e.Genre), ...L(e.Tags)]
|
|
330
|
+
let t = e.GTIN, n = I(t), r = I(e.LanguageISO), i = [...L(e.Genre), ...L(e.Tags)], a = D({
|
|
331
|
+
date: ye(e),
|
|
332
|
+
publisher: I(e.Publisher),
|
|
333
|
+
imprint: I(e.Imprint)
|
|
334
|
+
});
|
|
331
335
|
return D({
|
|
332
336
|
title: I(e.Title),
|
|
333
337
|
description: I(e.Summary),
|
|
334
|
-
publisher:
|
|
335
|
-
imprint: I(e.Imprint),
|
|
338
|
+
publication: a.date !== void 0 || a.publisher !== void 0 || a.imprint !== void 0 ? { edition: a } : void 0,
|
|
336
339
|
languages: r === void 0 ? void 0 : [r],
|
|
337
340
|
subjects: B(i),
|
|
338
341
|
contributors: B(xe(e)),
|
|
339
|
-
published: ye(e),
|
|
340
342
|
readingDirection: ge(e),
|
|
341
343
|
numberOfPages: R(e.PageCount),
|
|
342
344
|
gtin: P(t),
|
|
@@ -704,12 +706,12 @@ var tt = { renditionLayout: "renditionLayout" }, nt = (e) => D({
|
|
|
704
706
|
title: "title",
|
|
705
707
|
creators: "contributors",
|
|
706
708
|
contributors: "contributors",
|
|
707
|
-
publisher: "publisher",
|
|
709
|
+
publisher: "publication.edition.publisher",
|
|
708
710
|
description: "description",
|
|
709
711
|
rights: "rights",
|
|
710
712
|
languages: "languages",
|
|
711
713
|
subjects: "subjects",
|
|
712
|
-
date: "
|
|
714
|
+
date: "publication.edition.date",
|
|
713
715
|
coverHref: "cover",
|
|
714
716
|
renditionLayoutMeta: "renditionLayout",
|
|
715
717
|
renditionFlowMeta: "renditionFlow",
|
|
@@ -802,16 +804,18 @@ var tt = { renditionLayout: "renditionLayout" }, nt = (e) => D({
|
|
|
802
804
|
let t = e.pageProgressionDirection?.trim().toLowerCase(), n = t === "ltr" || t === "rtl" ? t : void 0, r = e.renditionLayoutMeta?.trim().toLowerCase(), i = r === "reflowable" || r === "pre-paginated" ? r : void 0, a = ut(e.identifiers), o = pt(e), { series: s, collection: c } = yt(e.metas), l = s.length > 0 || c.length > 0 ? D({
|
|
803
805
|
series: s.length > 0 ? s : void 0,
|
|
804
806
|
collection: c.length > 0 ? c : void 0
|
|
805
|
-
}) : void 0
|
|
807
|
+
}) : void 0, u = D({
|
|
808
|
+
date: ct(e.date),
|
|
809
|
+
publisher: e.publisher
|
|
810
|
+
});
|
|
806
811
|
return D({
|
|
807
812
|
title: e.title,
|
|
808
813
|
description: e.description,
|
|
809
|
-
|
|
814
|
+
publication: u.date !== void 0 || u.publisher !== void 0 ? { edition: u } : void 0,
|
|
810
815
|
rights: e.rights,
|
|
811
816
|
languages: e.languages.length > 0 ? [...e.languages] : void 0,
|
|
812
817
|
subjects: e.subjects.length > 0 ? [...e.subjects] : void 0,
|
|
813
818
|
contributors: o.length > 0 ? o : void 0,
|
|
814
|
-
published: ct(e.date),
|
|
815
819
|
readingDirection: n,
|
|
816
820
|
renditionLayout: i,
|
|
817
821
|
renditionFlow: bt(e.renditionFlowMeta),
|
|
@@ -827,17 +831,19 @@ var tt = { renditionLayout: "renditionLayout" }, nt = (e) => D({
|
|
|
827
831
|
properties: e.metas.length > 0 ? [...e.metas] : void 0
|
|
828
832
|
});
|
|
829
833
|
}, Ct = (e) => e.kind === "comicInfo" ? V(e) : e.kind === "kobo" ? nt(e) : e.kind === "apple" ? k(e) : St(e), wt = (e) => {
|
|
830
|
-
let t = e.opf === void 0 ? void 0 : St(e.opf), n = e.comicInfo === void 0 ? void 0 : V(e.comicInfo), r = e.apple === void 0 ? void 0 : k(e.apple), i = e.kobo === void 0 ? void 0 : nt(e.kobo), a = [...t?.identifiers ?? [], ...n?.identifiers ?? []]
|
|
834
|
+
let t = e.opf === void 0 ? void 0 : St(e.opf), n = e.comicInfo === void 0 ? void 0 : V(e.comicInfo), r = e.apple === void 0 ? void 0 : k(e.apple), i = e.kobo === void 0 ? void 0 : nt(e.kobo), a = [...t?.identifiers ?? [], ...n?.identifiers ?? []], o = D({
|
|
835
|
+
date: t?.publication?.edition?.date ?? n?.publication?.edition?.date,
|
|
836
|
+
publisher: t?.publication?.edition?.publisher ?? n?.publication?.edition?.publisher,
|
|
837
|
+
imprint: t?.publication?.edition?.imprint ?? n?.publication?.edition?.imprint
|
|
838
|
+
});
|
|
831
839
|
return D({
|
|
832
840
|
title: t?.title ?? n?.title,
|
|
833
841
|
description: t?.description ?? n?.description,
|
|
834
|
-
|
|
835
|
-
imprint: n?.imprint,
|
|
842
|
+
publication: o.date !== void 0 || o.publisher !== void 0 || o.imprint !== void 0 ? { edition: o } : void 0,
|
|
836
843
|
rights: t?.rights,
|
|
837
844
|
languages: t?.languages ?? n?.languages,
|
|
838
845
|
subjects: t?.subjects ?? n?.subjects,
|
|
839
846
|
contributors: t?.contributors ?? n?.contributors,
|
|
840
|
-
published: t?.published ?? n?.published,
|
|
841
847
|
readingDirection: n?.readingDirection ?? t?.readingDirection,
|
|
842
848
|
renditionLayout: t?.renditionLayout ?? r?.renditionLayout ?? i?.renditionLayout,
|
|
843
849
|
renditionFlow: t?.renditionFlow,
|
|
@@ -967,7 +973,7 @@ var tt = { renditionLayout: "renditionLayout" }, nt = (e) => D({
|
|
|
967
973
|
}, Lt = ({ archive: e, opf: t, comicInfo: n, apple: r, kobo: i }) => {
|
|
968
974
|
let a = [];
|
|
969
975
|
return t !== void 0 && t.value === void 0 && (t.failed || st(e)) && a.push("opf"), n?.failed && a.push("comicInfo"), r?.failed && a.push("apple"), i?.failed && a.push("kobo"), a;
|
|
970
|
-
}, Rt =
|
|
976
|
+
}, Rt = 2, zt = async (e, t = {}) => {
|
|
971
977
|
let n = new Set(t.include ?? Ft), r = n.has("metadata"), i = n.has("sources"), a = n.has("readingOrder"), o = n.has("toc"), s = t.layoutScan === !0 && (r || a), c = r || i || a || o ? await $(() => Z(e), "opf") : void 0, l = c?.value, u = r || i || s, d = u ? await $(() => N(e), "comicInfo") : void 0, f = d?.value, p = u ? await $(() => E(e), "apple") : void 0, m = p?.value, h = u ? await $(() => et(e), "kobo") : void 0, g = h?.value, _ = r || s ? wt({
|
|
972
978
|
opf: l?.opf,
|
|
973
979
|
comicInfo: f,
|