@prose-reader/archive-reader 1.344.0 → 1.345.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/cover/resolveArchiveCover.d.ts +1 -1
- package/dist/index/index.cjs +4 -4
- package/dist/index/index.cjs.map +1 -1
- package/dist/index/index.js +497 -484
- package/dist/index/index.js.map +1 -1
- package/dist/index.d.ts +24 -24
- package/dist/{apple → metadata/apple}/readArchiveApple.d.ts +1 -1
- package/dist/{apple → metadata/apple}/resolve.d.ts +1 -1
- package/dist/{comicInfo → metadata/comicInfo}/getArchiveHasComicInfo.d.ts +1 -1
- package/dist/{comicInfo → metadata/comicInfo}/readArchiveComicInfo.d.ts +1 -1
- package/dist/{comicInfo → metadata/comicInfo}/resolve.d.ts +1 -1
- package/dist/{kobo → metadata/kobo}/readArchiveKobo.d.ts +1 -1
- package/dist/{kobo → metadata/kobo}/resolve.d.ts +1 -1
- package/dist/metadata/opf/getArchiveOpfInfo.d.ts +5 -0
- package/dist/{opf → metadata/opf}/getSpineItemFilesFromArchive.d.ts +2 -2
- package/dist/{opf → metadata/opf}/isArchiveEpub.d.ts +1 -1
- package/dist/{opf → metadata/opf}/readArchiveOpf.d.ts +1 -1
- package/dist/{opf → metadata/opf}/resolve.d.ts +1 -1
- package/dist/readingOrder/resolveArchiveReadingOrder.d.ts +1 -1
- package/dist/resolve.d.ts +4 -4
- package/dist/resolveArchive.d.ts +4 -4
- package/dist/resolveMetadata.d.ts +4 -4
- package/dist/toc/nav.d.ts +1 -1
- package/dist/toc/ncx.d.ts +1 -1
- package/dist/toc/resolveArchiveToc.d.ts +1 -1
- package/dist/types/resolvedMetadata.d.ts +10 -7
- package/package.json +3 -3
- package/dist/opf/getArchiveOpfInfo.d.ts +0 -5
- /package/dist/{apple → metadata/apple}/parse.d.ts +0 -0
- /package/dist/{apple → metadata/apple}/parse.test.d.ts +0 -0
- /package/dist/{apple → metadata/apple}/readArchiveApple.test.d.ts +0 -0
- /package/dist/{apple → metadata/apple}/resolve.test.d.ts +0 -0
- /package/dist/{comicInfo → metadata/comicInfo}/manga.d.ts +0 -0
- /package/dist/{comicInfo → metadata/comicInfo}/manga.test.d.ts +0 -0
- /package/dist/{comicInfo → metadata/comicInfo}/parse.d.ts +0 -0
- /package/dist/{comicInfo → metadata/comicInfo}/parse.test.d.ts +0 -0
- /package/dist/{comicInfo → metadata/comicInfo}/readArchiveComicInfo.test.d.ts +0 -0
- /package/dist/{comicInfo → metadata/comicInfo}/resolve.test.d.ts +0 -0
- /package/dist/{kobo → metadata/kobo}/parse.d.ts +0 -0
- /package/dist/{kobo → metadata/kobo}/parse.test.d.ts +0 -0
- /package/dist/{kobo → metadata/kobo}/readArchiveKobo.test.d.ts +0 -0
- /package/dist/{kobo → metadata/kobo}/resolve.test.d.ts +0 -0
- /package/dist/{opf → metadata/opf}/parse.d.ts +0 -0
- /package/dist/{opf → metadata/opf}/parse.test.d.ts +0 -0
- /package/dist/{opf → metadata/opf}/resolve.test.d.ts +0 -0
- /package/dist/{opf → metadata/opf}/spineItemrefProperties.d.ts +0 -0
- /package/dist/{opf → metadata/opf}/spineItemrefProperties.test.d.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export type { AppleDisplayOption, AppleMetadata } from './apple/parse.ts';
|
|
2
|
-
export { APPLE_IBOOKS_DISPLAY_OPTIONS_FILENAME, parseAppleDisplayOptionsXml, } from './apple/parse.ts';
|
|
3
|
-
export { readArchiveApple } from './apple/readArchiveApple.ts';
|
|
4
|
-
export { appleMetadataHomes } from './apple/resolve.ts';
|
|
5
1
|
export { createArchive } from './archives/createArchive.ts';
|
|
6
2
|
export { createArchiveFromArrayBufferList } from './archives/createArchiveFromArrayBufferList.ts';
|
|
7
3
|
export { type ArchiveEntry, type CreateArchiveFromEntriesOptions, createArchiveFromEntries, } from './archives/createArchiveFromEntries.ts';
|
|
@@ -12,27 +8,31 @@ export { getArchiveImageRecords, isImageRecord, } from './archives/images.ts';
|
|
|
12
8
|
export { readRecordAsText } from './archives/readRecordAsText.ts';
|
|
13
9
|
export type { Archive, ArchiveRecord, DirectoryRecord, FileRecord, } from './archives/types.ts';
|
|
14
10
|
export { getArchiveFileRecordByUri, isDirectoryRecord, isFileRecord, } from './archives/types.ts';
|
|
15
|
-
export { getArchiveHasComicInfo } from './comicInfo/getArchiveHasComicInfo.ts';
|
|
16
|
-
export type { ComicInfoManga } from './comicInfo/manga.ts';
|
|
17
|
-
export { COMIC_INFO_MANGA_VALUES, isComicInfoManga } from './comicInfo/manga.ts';
|
|
18
|
-
export type { ComicInfo, ComicInfoKnownField } from './comicInfo/parse.ts';
|
|
19
|
-
export { COMIC_INFO_FILENAME, COMIC_INFO_KNOWN_FIELDS, parseComicInfo, } from './comicInfo/parse.ts';
|
|
20
|
-
export { readArchiveComicInfo } from './comicInfo/readArchiveComicInfo.ts';
|
|
21
|
-
export { comicInfoMetadataHomes } from './comicInfo/resolve.ts';
|
|
22
11
|
export { resolveArchiveCover } from './cover/resolveArchiveCover.ts';
|
|
23
|
-
export type { KoboMetadata } from './kobo/parse.ts';
|
|
24
|
-
export { KOBO_DISPLAY_OPTIONS_FILENAME, parseKoboXml } from './kobo/parse.ts';
|
|
25
|
-
export { readArchiveKobo } from './kobo/readArchiveKobo.ts';
|
|
26
|
-
export { koboMetadataHomes } from './kobo/resolve.ts';
|
|
27
12
|
export { readingOrderDocumentsAllHaveViewport } from './layout/scanReadingOrderDocumentsViewport.ts';
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export
|
|
32
|
-
export {
|
|
33
|
-
export type {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
13
|
+
export type { AppleDisplayOption, AppleMetadata, } from './metadata/apple/parse.ts';
|
|
14
|
+
export { APPLE_IBOOKS_DISPLAY_OPTIONS_FILENAME, parseAppleDisplayOptionsXml, } from './metadata/apple/parse.ts';
|
|
15
|
+
export { readArchiveApple } from './metadata/apple/readArchiveApple.ts';
|
|
16
|
+
export { appleMetadataHomes } from './metadata/apple/resolve.ts';
|
|
17
|
+
export { getArchiveHasComicInfo } from './metadata/comicInfo/getArchiveHasComicInfo.ts';
|
|
18
|
+
export type { ComicInfoManga } from './metadata/comicInfo/manga.ts';
|
|
19
|
+
export { COMIC_INFO_MANGA_VALUES, isComicInfoManga, } from './metadata/comicInfo/manga.ts';
|
|
20
|
+
export type { ComicInfo, ComicInfoKnownField, } from './metadata/comicInfo/parse.ts';
|
|
21
|
+
export { COMIC_INFO_FILENAME, COMIC_INFO_KNOWN_FIELDS, parseComicInfo, } from './metadata/comicInfo/parse.ts';
|
|
22
|
+
export { readArchiveComicInfo } from './metadata/comicInfo/readArchiveComicInfo.ts';
|
|
23
|
+
export { comicInfoMetadataHomes } from './metadata/comicInfo/resolve.ts';
|
|
24
|
+
export type { KoboMetadata } from './metadata/kobo/parse.ts';
|
|
25
|
+
export { KOBO_DISPLAY_OPTIONS_FILENAME, parseKoboXml, } from './metadata/kobo/parse.ts';
|
|
26
|
+
export { readArchiveKobo } from './metadata/kobo/readArchiveKobo.ts';
|
|
27
|
+
export { koboMetadataHomes } from './metadata/kobo/resolve.ts';
|
|
28
|
+
export { getArchiveOpfInfo } from './metadata/opf/getArchiveOpfInfo.ts';
|
|
29
|
+
export { getSpineItemFilesFromArchive } from './metadata/opf/getSpineItemFilesFromArchive.ts';
|
|
30
|
+
export { isArchiveEpub } from './metadata/opf/isArchiveEpub.ts';
|
|
31
|
+
export type { OpfContributor, OpfGuideReference, OpfIdentifier, OpfMetadata, OpfMetaEntry, OpfSpineManifestItem, OpfSpineRow, } from './metadata/opf/parse.ts';
|
|
32
|
+
export { parseOpf } from './metadata/opf/parse.ts';
|
|
33
|
+
export type { ArchiveOpfParsed } from './metadata/opf/readArchiveOpf.ts';
|
|
34
|
+
export { readArchiveOpf } from './metadata/opf/readArchiveOpf.ts';
|
|
35
|
+
export { opfMetadataHomes } from './metadata/opf/resolve.ts';
|
|
36
36
|
export type { ArchiveReadingOrderItem } from './readingOrder/resolveArchiveReadingOrder.ts';
|
|
37
37
|
export { resolveArchiveReadingOrder } from './readingOrder/resolveArchiveReadingOrder.ts';
|
|
38
38
|
export type { ResolvedArchiveInput } from './resolve.ts';
|
|
@@ -43,7 +43,7 @@ export type { ResolveMetadataSources } from './resolveMetadata.ts';
|
|
|
43
43
|
export { resolveMetadata } from './resolveMetadata.ts';
|
|
44
44
|
export { resolveArchiveToc } from './toc/resolveArchiveToc.ts';
|
|
45
45
|
export type { ArchiveTocItem } from './toc/types.ts';
|
|
46
|
-
export type { ResolvedAppleMetadata, ResolvedCollection, ResolvedComicMetadata, ResolvedConfidence, ResolvedContributor, ResolvedContributorRole, ResolvedCover, ResolvedDate, ResolvedKoboMetadata, ResolvedMetadata, ResolvedMetadataHome, ResolvedProperty, ResolvedPublication, ResolvedPublicationInfo, } from './types/resolvedMetadata.ts';
|
|
46
|
+
export type { KnownMetadataIdentifierScheme, MetadataIdentifier, MetadataIdentifierScheme, ResolvedAppleMetadata, ResolvedCollection, ResolvedComicMetadata, ResolvedConfidence, ResolvedContributor, ResolvedContributorRole, ResolvedCover, ResolvedDate, ResolvedKoboMetadata, ResolvedMetadata, ResolvedMetadataHome, ResolvedMetadataIdentifier, ResolvedProperty, ResolvedPublication, ResolvedPublicationInfo, } from './types/resolvedMetadata.ts';
|
|
47
47
|
export { normalizeGtin } from './utils/normalizeGtin.ts';
|
|
48
48
|
export { normalizeIsbn } from './utils/normalizeIsbn.ts';
|
|
49
49
|
export { parseW3cDtfDate } from './utils/parseW3cDtfDate.ts';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Archive, FileRecord } from '
|
|
1
|
+
import { Archive, FileRecord } from '../../archives/types.ts';
|
|
2
2
|
export declare const getArchiveHasComicInfo: (archive: Archive) => FileRecord | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Archive } from '
|
|
1
|
+
import { Archive } from '../../archives/types.ts';
|
|
2
2
|
import { ArchiveOpfParsed } from './readArchiveOpf.ts';
|
|
3
3
|
export declare const getSpineItemFilesFromArchive: ({ archive, archiveOpf, }: {
|
|
4
4
|
archive: Archive;
|
|
5
5
|
archiveOpf: ArchiveOpfParsed | undefined;
|
|
6
|
-
}) => Promise<import('
|
|
6
|
+
}) => Promise<import('../../index.ts').ArchiveRecord[]>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Archive } from '
|
|
1
|
+
import { Archive } from '../../archives/types.ts';
|
|
2
2
|
export declare const isArchiveEpub: (archive: Archive) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Archive } from '../archives/types.ts';
|
|
2
|
-
import { ArchiveOpfParsed } from '../opf/readArchiveOpf.ts';
|
|
2
|
+
import { ArchiveOpfParsed } from '../metadata/opf/readArchiveOpf.ts';
|
|
3
3
|
export type ArchiveReadingOrderItem = {
|
|
4
4
|
readonly uri: string;
|
|
5
5
|
readonly id?: string;
|
package/dist/resolve.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppleMetadata } from './apple/parse.ts';
|
|
2
|
-
import { ComicInfo } from './comicInfo/parse.ts';
|
|
3
|
-
import { KoboMetadata } from './kobo/parse.ts';
|
|
4
|
-
import { OpfMetadata } from './opf/parse.ts';
|
|
1
|
+
import { AppleMetadata } from './metadata/apple/parse.ts';
|
|
2
|
+
import { ComicInfo } from './metadata/comicInfo/parse.ts';
|
|
3
|
+
import { KoboMetadata } from './metadata/kobo/parse.ts';
|
|
4
|
+
import { OpfMetadata } from './metadata/opf/parse.ts';
|
|
5
5
|
import { ResolvedMetadata } from './types/resolvedMetadata.ts';
|
|
6
6
|
export type ResolvedArchiveInput = ComicInfo | KoboMetadata | AppleMetadata | OpfMetadata;
|
|
7
7
|
export declare const resolveArchiveMetadata: (input: ResolvedArchiveInput) => ResolvedMetadata;
|
package/dist/resolveArchive.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AppleMetadata } from './apple/parse.ts';
|
|
2
1
|
import { Archive } from './archives/types.ts';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { AppleMetadata } from './metadata/apple/parse.ts';
|
|
3
|
+
import { ComicInfo } from './metadata/comicInfo/parse.ts';
|
|
4
|
+
import { KoboMetadata } from './metadata/kobo/parse.ts';
|
|
5
|
+
import { ArchiveOpfParsed } from './metadata/opf/readArchiveOpf.ts';
|
|
6
6
|
import { ArchiveReadingOrderItem } from './readingOrder/resolveArchiveReadingOrder.ts';
|
|
7
7
|
import { ArchiveTocItem } from './toc/types.ts';
|
|
8
8
|
import { ResolvedMetadata } from './types/resolvedMetadata.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppleMetadata } from './apple/parse.ts';
|
|
2
|
-
import { ComicInfo } from './comicInfo/parse.ts';
|
|
3
|
-
import { KoboMetadata } from './kobo/parse.ts';
|
|
4
|
-
import { OpfMetadata } from './opf/parse.ts';
|
|
1
|
+
import { AppleMetadata } from './metadata/apple/parse.ts';
|
|
2
|
+
import { ComicInfo } from './metadata/comicInfo/parse.ts';
|
|
3
|
+
import { KoboMetadata } from './metadata/kobo/parse.ts';
|
|
4
|
+
import { OpfMetadata } from './metadata/opf/parse.ts';
|
|
5
5
|
import { ResolvedMetadata } from './types/resolvedMetadata.ts';
|
|
6
6
|
export type ResolveMetadataSources = {
|
|
7
7
|
opf?: OpfMetadata;
|
package/dist/toc/nav.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Archive } from '../archives/types.ts';
|
|
2
|
-
import { OpfMetadata } from '../opf/parse.ts';
|
|
2
|
+
import { OpfMetadata } from '../metadata/opf/parse.ts';
|
|
3
3
|
import { ArchiveTocItem } from './types.ts';
|
|
4
4
|
export declare const resolveTocFromNav: (opf: OpfMetadata, archive: Archive) => Promise<ArchiveTocItem[] | undefined>;
|
package/dist/toc/ncx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Archive } from '../archives/types.ts';
|
|
2
|
-
import { OpfMetadata } from '../opf/parse.ts';
|
|
2
|
+
import { OpfMetadata } from '../metadata/opf/parse.ts';
|
|
3
3
|
import { ArchiveTocItem } from './types.ts';
|
|
4
4
|
export declare const resolveTocFromNcx: ({ opf, opfBasePath, archive, }: {
|
|
5
5
|
opf: OpfMetadata;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Archive } from '../archives/types.ts';
|
|
2
|
-
import { ArchiveOpfParsed } from '../opf/readArchiveOpf.ts';
|
|
2
|
+
import { ArchiveOpfParsed } from '../metadata/opf/readArchiveOpf.ts';
|
|
3
3
|
import { ArchiveTocItem } from './types.ts';
|
|
4
4
|
export declare const resolveArchiveToc: (archive: Archive, { opf }?: {
|
|
5
5
|
opf?: ArchiveOpfParsed;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export type KnownMetadataIdentifierScheme = "ISBN" | "GTIN" | "DOI" | "GoogleBooks" | "OpenLibrary" | "ProjectGutenberg" | "URL" | "Unknown";
|
|
2
|
+
export type MetadataIdentifierScheme = KnownMetadataIdentifierScheme | (string & {});
|
|
3
|
+
export type MetadataIdentifier = {
|
|
4
|
+
readonly value: string;
|
|
5
|
+
readonly scheme: MetadataIdentifierScheme;
|
|
6
|
+
};
|
|
7
|
+
export type ResolvedMetadataIdentifier = MetadataIdentifier & {
|
|
8
|
+
readonly unique?: true;
|
|
9
|
+
};
|
|
1
10
|
export type ResolvedContributorRole = "author" | "translator" | "editor" | "artist" | "illustrator" | "letterer" | "penciler" | "colorist" | "inker" | "narrator" | "contributor" | "coverArtist";
|
|
2
11
|
export type ResolvedContributor = {
|
|
3
12
|
readonly name: string;
|
|
@@ -80,13 +89,7 @@ export type ResolvedMetadata = {
|
|
|
80
89
|
readonly renditionFlow?: "scrolled-continuous" | "scrolled-doc" | "paginated" | "auto";
|
|
81
90
|
readonly renditionSpread?: "none" | "landscape" | "portrait" | "both" | "auto";
|
|
82
91
|
readonly numberOfPages?: number;
|
|
83
|
-
readonly
|
|
84
|
-
readonly isbn?: string;
|
|
85
|
-
readonly identifiers?: ReadonlyArray<{
|
|
86
|
-
readonly value: string;
|
|
87
|
-
readonly scheme?: string;
|
|
88
|
-
readonly unique?: true;
|
|
89
|
-
}>;
|
|
92
|
+
readonly identifiers?: ReadonlyArray<ResolvedMetadataIdentifier>;
|
|
90
93
|
readonly belongsTo?: {
|
|
91
94
|
readonly series?: ReadonlyArray<ResolvedCollection>;
|
|
92
95
|
readonly collection?: ReadonlyArray<ResolvedCollection>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prose-reader/archive-reader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.345.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index/index.cjs",
|
|
6
6
|
"module": "./dist/index/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"test:watch": "vitest watch"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@prose-reader/shared": "^1.
|
|
62
|
+
"@prose-reader/shared": "^1.345.0",
|
|
63
63
|
"xmldoc": "^2.0.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"node-unrar-js": "^2.0.2",
|
|
101
101
|
"unzipper": "^0.12.3"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "f2f6e09d604f1f8e539d01ddd70c6a799c9d82cd"
|
|
104
104
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|