@prose-reader/archive-reader 1.345.0 → 1.346.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/index/index.cjs +1 -1
- package/dist/index/index.cjs.map +1 -1
- package/dist/index/index.js +238 -201
- package/dist/index/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/metadata/comicInfo/resolve.d.ts +1 -1
- package/dist/metadata/opf/parse.d.ts +5 -1
- package/dist/metadata/opf/resolve.d.ts +1 -1
- package/dist/types/resolvedMetadata.d.ts +11 -2
- package/dist/utils/mainTitle.d.ts +2 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,8 @@ 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 { KnownMetadataIdentifierScheme, MetadataIdentifier, MetadataIdentifierScheme, ResolvedAppleMetadata, ResolvedCollection, ResolvedComicMetadata, ResolvedConfidence, ResolvedContributor, ResolvedContributorRole, ResolvedCover, ResolvedDate, ResolvedKoboMetadata, ResolvedMetadata, ResolvedMetadataHome, ResolvedMetadataIdentifier, ResolvedProperty, ResolvedPublication, ResolvedPublicationInfo, } from './types/resolvedMetadata.ts';
|
|
46
|
+
export type { KnownMetadataIdentifierScheme, MetadataIdentifier, MetadataIdentifierScheme, ResolvedAppleMetadata, ResolvedCollection, ResolvedComicMetadata, ResolvedConfidence, ResolvedContributor, ResolvedContributorRole, ResolvedCover, ResolvedDate, ResolvedKoboMetadata, ResolvedMetadata, ResolvedMetadataHome, ResolvedMetadataHomes, ResolvedMetadataIdentifier, ResolvedProperty, ResolvedPublication, ResolvedPublicationInfo, ResolvedTitle, ResolvedTitleType, } from './types/resolvedMetadata.ts';
|
|
47
|
+
export { mainTitle } from './utils/mainTitle.ts';
|
|
47
48
|
export { normalizeGtin } from './utils/normalizeGtin.ts';
|
|
48
49
|
export { normalizeIsbn } from './utils/normalizeIsbn.ts';
|
|
49
50
|
export { parseW3cDtfDate } from './utils/parseW3cDtfDate.ts';
|
|
@@ -38,7 +38,7 @@ export declare const comicInfoMetadataHomes: {
|
|
|
38
38
|
readonly Summary: "description";
|
|
39
39
|
readonly Tags: "subjects";
|
|
40
40
|
readonly Teams: "comic.teams";
|
|
41
|
-
readonly Title: "
|
|
41
|
+
readonly Title: "titles";
|
|
42
42
|
readonly Translator: "contributors";
|
|
43
43
|
readonly Volume: "comic.volume";
|
|
44
44
|
readonly Web: "comic.web";
|
|
@@ -10,6 +10,10 @@ export type OpfIdentifier = {
|
|
|
10
10
|
readonly id?: string;
|
|
11
11
|
readonly unique?: true;
|
|
12
12
|
};
|
|
13
|
+
export type OpfTitle = {
|
|
14
|
+
readonly value: string;
|
|
15
|
+
readonly id?: string;
|
|
16
|
+
};
|
|
13
17
|
export type OpfSpineRow = {
|
|
14
18
|
readonly idref: string;
|
|
15
19
|
readonly id: string;
|
|
@@ -48,7 +52,7 @@ export type OpfMetadata = {
|
|
|
48
52
|
readonly spineRows: ReadonlyArray<OpfSpineRow>;
|
|
49
53
|
readonly spineTocIdref: string | undefined;
|
|
50
54
|
readonly identifiers: ReadonlyArray<OpfIdentifier>;
|
|
51
|
-
readonly
|
|
55
|
+
readonly titles: ReadonlyArray<OpfTitle>;
|
|
52
56
|
readonly creators: ReadonlyArray<string>;
|
|
53
57
|
readonly contributors: ReadonlyArray<OpfContributor>;
|
|
54
58
|
readonly publisher: string | undefined;
|
|
@@ -5,7 +5,7 @@ export declare const opfMetadataHomes: {
|
|
|
5
5
|
readonly spineRows: "readingOrder";
|
|
6
6
|
readonly spineTocIdref: "toc";
|
|
7
7
|
readonly identifiers: "identifiers";
|
|
8
|
-
readonly
|
|
8
|
+
readonly titles: "titles";
|
|
9
9
|
readonly creators: "contributors";
|
|
10
10
|
readonly contributors: "contributors";
|
|
11
11
|
readonly publisher: "publication.edition.publisher";
|
|
@@ -7,6 +7,13 @@ export type MetadataIdentifier = {
|
|
|
7
7
|
export type ResolvedMetadataIdentifier = MetadataIdentifier & {
|
|
8
8
|
readonly unique?: true;
|
|
9
9
|
};
|
|
10
|
+
export type ResolvedTitleType = "main" | "subtitle" | "short" | "collection" | "edition" | "expanded";
|
|
11
|
+
export type ResolvedTitle = {
|
|
12
|
+
readonly value: string;
|
|
13
|
+
readonly type?: ResolvedTitleType | (string & {});
|
|
14
|
+
readonly displaySeq?: number;
|
|
15
|
+
readonly sortAs?: string;
|
|
16
|
+
};
|
|
10
17
|
export type ResolvedContributorRole = "author" | "translator" | "editor" | "artist" | "illustrator" | "letterer" | "penciler" | "colorist" | "inker" | "narrator" | "contributor" | "coverArtist";
|
|
11
18
|
export type ResolvedContributor = {
|
|
12
19
|
readonly name: string;
|
|
@@ -14,7 +21,8 @@ export type ResolvedContributor = {
|
|
|
14
21
|
readonly sortAs?: string;
|
|
15
22
|
};
|
|
16
23
|
export type ResolvedCollection = {
|
|
17
|
-
readonly name
|
|
24
|
+
readonly name?: string;
|
|
25
|
+
readonly identifiers?: ReadonlyArray<MetadataIdentifier>;
|
|
18
26
|
readonly position?: number;
|
|
19
27
|
readonly total?: number;
|
|
20
28
|
};
|
|
@@ -76,7 +84,7 @@ export type ResolvedCover = {
|
|
|
76
84
|
readonly confidence: ResolvedConfidence;
|
|
77
85
|
};
|
|
78
86
|
export type ResolvedMetadata = {
|
|
79
|
-
readonly
|
|
87
|
+
readonly titles?: ReadonlyArray<ResolvedTitle>;
|
|
80
88
|
readonly cover?: ResolvedCover;
|
|
81
89
|
readonly description?: string;
|
|
82
90
|
readonly publication?: ResolvedPublicationInfo;
|
|
@@ -100,3 +108,4 @@ export type ResolvedMetadata = {
|
|
|
100
108
|
readonly kobo?: ResolvedKoboMetadata;
|
|
101
109
|
};
|
|
102
110
|
export type ResolvedMetadataHome = Exclude<keyof ResolvedMetadata, "comic" | "apple" | "kobo" | "belongsTo" | "publication"> | `comic.${keyof ResolvedComicMetadata}` | `apple.${keyof ResolvedAppleMetadata}` | `kobo.${keyof ResolvedKoboMetadata}` | `belongsTo.${"series" | "collection"}` | `publication.${keyof ResolvedPublicationInfo}` | `publication.${keyof ResolvedPublicationInfo}.${keyof ResolvedPublication}` | "readingOrder" | "toc" | "guide";
|
|
111
|
+
export type ResolvedMetadataHomes = ResolvedMetadataHome | ReadonlyArray<ResolvedMetadataHome>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prose-reader/archive-reader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.346.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.346.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": "4c52e5b82de55cf26d658f039909829b4476fd2b"
|
|
104
104
|
}
|