@prose-reader/archive-parser 1.303.0 → 1.304.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/manga.d.ts +0 -5
- package/dist/comicInfo/parse.d.ts +0 -16
- package/dist/index.d.ts +0 -5
- package/dist/index.js +313 -351
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -2
- package/dist/index.umd.cjs.map +1 -1
- package/dist/kobo/parse.d.ts +0 -8
- package/dist/opf/parse.d.ts +0 -29
- package/dist/opf/spineItemrefProperties.d.ts +0 -5
- package/dist/types/archiveResolve.d.ts +0 -49
- package/dist/utils/normalizeGtin.d.ts +0 -4
- package/dist/utils/normalizeIsbn.d.ts +0 -10
- package/dist/utils/parseW3cDtfDate.d.ts +0 -15
- package/dist/utils/tokenizeXmlSpaceSeparatedList.d.ts +0 -4
- package/package.json +2 -2
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Allowed `Manga` element values (ComicInfo 2.0 `Manga` simpleType).
|
|
3
|
-
*
|
|
4
|
-
* @see https://anansi-project.github.io/docs/comicinfo/documentation#manga
|
|
5
|
-
*/
|
|
6
1
|
export declare const COMIC_INFO_MANGA_VALUES: readonly ["Unknown", "No", "Yes", "YesAndRightToLeft"];
|
|
7
2
|
export type ComicInfoManga = (typeof COMIC_INFO_MANGA_VALUES)[number];
|
|
8
3
|
export declare const isComicInfoManga: (value: string) => value is ComicInfoManga;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { ComicInfoManga } from './manga';
|
|
2
|
-
/** Canonical top-level filename; real archives may use any casing. */
|
|
3
2
|
export declare const COMIC_INFO_FILENAME = "ComicInfo.xml";
|
|
4
|
-
/**
|
|
5
|
-
* Parsed `ComicInfo.xml` root: one optional string property per child element,
|
|
6
|
-
* using the same names as in the file (e.g. `Title`, `GTIN`, `LanguageISO`).
|
|
7
|
-
* Nested blocks such as `Pages` are skipped. Other simple child elements are
|
|
8
|
-
* still copied onto this object under their tag name.
|
|
9
|
-
*
|
|
10
|
-
* @see https://anansi-project.github.io/docs/comicinfo/intro
|
|
11
|
-
* @see https://github.com/anansi-project/comicinfo/blob/main/drafts/v2.1/ComicInfo.xsd for schema
|
|
12
|
-
*/
|
|
13
3
|
export interface ComicInfo {
|
|
14
4
|
readonly kind: "comicInfo";
|
|
15
5
|
AgeRating?: string;
|
|
@@ -33,7 +23,6 @@ export interface ComicInfo {
|
|
|
33
23
|
Letterer?: string;
|
|
34
24
|
Locations?: string;
|
|
35
25
|
MainCharacterOrTeam?: string;
|
|
36
|
-
/** Schema literals per {@link ComicInfoManga}; files may still use other strings. */
|
|
37
26
|
Manga?: ComicInfoManga | (string & {});
|
|
38
27
|
Month?: string;
|
|
39
28
|
Notes?: string;
|
|
@@ -58,9 +47,4 @@ export interface ComicInfo {
|
|
|
58
47
|
Year?: string;
|
|
59
48
|
[tag: string]: string | undefined;
|
|
60
49
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Parse a raw `ComicInfo.xml` body. Each direct child element with plain text
|
|
63
|
-
* becomes a property named after that tag. Malformed XML throws; the parser
|
|
64
|
-
* error is attached as `cause`.
|
|
65
|
-
*/
|
|
66
50
|
export declare const parseComicInfo: (xml: string) => ComicInfo;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parsers and resolvers for archive-embedded metadata (ComicInfo, Kobo XML, …).
|
|
3
|
-
* Parsed values carry a `kind` discriminator (`comicInfo` / `kobo` / `apple` / `opf`);
|
|
4
|
-
* {@link resolveArchiveMetadata} accepts that union directly.
|
|
5
|
-
*/
|
|
6
1
|
export type { AppleDisplayOption, AppleMetadata } from './apple/parse';
|
|
7
2
|
export { APPLE_IBOOKS_DISPLAY_OPTIONS_FILENAME, parseAppleDisplayOptionsXml, } from './apple/parse';
|
|
8
3
|
export type { ComicInfoManga } from './comicInfo/manga';
|