@prose-reader/streamer 1.3.0 → 1.4.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/archives/createArchiveFromText.d.ts +3 -2
- package/dist/archives/getArchiveOpfInfo.d.ts +1 -1
- package/dist/archives/types.d.ts +1 -1
- package/dist/configure.d.ts +3 -0
- package/dist/epub/getSpineItemFilesFromArchive.d.ts +1 -1
- package/dist/generators/manifest/{comicInfo.d.ts → hooks/comicInfo.d.ts} +2 -2
- package/dist/generators/manifest/{default.d.ts → hooks/default.d.ts} +2 -2
- package/dist/generators/manifest/{epub.d.ts → hooks/epub.d.ts} +2 -2
- package/dist/generators/manifest/hooks/epubOptimizer.d.ts +6 -0
- package/dist/generators/manifest/index.d.ts +3 -2
- package/dist/generators/resources.d.ts +8 -1
- package/dist/index.d.ts +5 -7
- package/dist/prose-streamer.js +207 -182
- package/dist/prose-streamer.js.map +1 -1
- package/dist/prose-streamer.umd.cjs +8 -8
- package/dist/prose-streamer.umd.cjs.map +1 -1
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ import { Archive } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Useful to create archive from txt content
|
|
4
4
|
*/
|
|
5
|
-
export declare const createArchiveFromText: (content: string | Blob,
|
|
6
|
-
direction
|
|
5
|
+
export declare const createArchiveFromText: (content: string | Blob, { mimeType, direction }?: {
|
|
6
|
+
direction?: "ltr" | "rtl" | undefined;
|
|
7
|
+
mimeType?: string | undefined;
|
|
7
8
|
}) => Promise<Archive>;
|
|
@@ -9,7 +9,7 @@ export declare const getArchiveOpfInfo: (archive: Archive) => {
|
|
|
9
9
|
base64: () => Promise<string>;
|
|
10
10
|
stream?: (() => import("./types").StreamResult) | undefined;
|
|
11
11
|
size: number;
|
|
12
|
-
encodingFormat?:
|
|
12
|
+
encodingFormat?: string | undefined;
|
|
13
13
|
} | undefined;
|
|
14
14
|
basePath: string;
|
|
15
15
|
};
|
package/dist/archives/types.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export declare const getSpineItemFilesFromArchive: ({ archive }: {
|
|
|
10
10
|
base64: () => Promise<string>;
|
|
11
11
|
stream?: (() => import("../archives/types").StreamResult) | undefined;
|
|
12
12
|
size: number;
|
|
13
|
-
encodingFormat?:
|
|
13
|
+
encodingFormat?: string | undefined;
|
|
14
14
|
}[]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Manifest } from "@prose-reader/shared";
|
|
2
|
-
import { Archive } from "
|
|
2
|
+
import { Archive } from "../../../archives/types";
|
|
3
3
|
/**
|
|
4
4
|
* Handle archive which contains ComicInfo.xml. This is a meta file
|
|
5
5
|
* used to define cbz, etc. I believe it comes from some sites or apps.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const comicInfoHook: ({ archive, baseUrl }: {
|
|
8
8
|
archive: Archive;
|
|
9
9
|
baseUrl: string;
|
|
10
10
|
}) => (manifest: Manifest) => Promise<Manifest>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Manifest } from "@prose-reader/shared";
|
|
2
|
-
import { Archive } from "
|
|
3
|
-
export declare const
|
|
2
|
+
import { Archive } from "../../../archives/types";
|
|
3
|
+
export declare const defaultHook: ({ archive, baseUrl }: {
|
|
4
4
|
archive: Archive;
|
|
5
5
|
baseUrl: string;
|
|
6
6
|
}) => (manifest: Manifest) => Promise<Manifest>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import xmldoc from "xmldoc";
|
|
2
2
|
import type { Manifest } from "@prose-reader/shared";
|
|
3
|
-
import { Archive } from "
|
|
3
|
+
import { Archive } from "../../../archives/types";
|
|
4
4
|
export declare const getItemsFromDoc: (doc: xmldoc.XmlDocument) => {
|
|
5
5
|
href: string;
|
|
6
6
|
id: string;
|
|
7
7
|
mediaType: string | undefined;
|
|
8
8
|
}[];
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const epubHook: ({ archive, baseUrl }: {
|
|
10
10
|
archive: Archive;
|
|
11
11
|
baseUrl: string;
|
|
12
12
|
}) => (manifest: Manifest) => Promise<Manifest>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { Manifest } from "@prose-reader/shared";
|
|
1
2
|
import { Archive } from "../../archives/types";
|
|
2
|
-
export declare const
|
|
3
|
+
export declare const generateManifestFromArchive: (archive: Archive, { baseUrl }?: {
|
|
3
4
|
baseUrl?: string | undefined;
|
|
4
|
-
}) => Promise<
|
|
5
|
+
}) => Promise<Manifest>;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import { Archive } from "..";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const generateResourceFromArchive: (archive: Archive, resourcePath: string) => Promise<{
|
|
3
|
+
body: Blob;
|
|
4
|
+
params: {
|
|
5
|
+
headers: {
|
|
6
|
+
"Content-Type"?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export { getManifestFromArchive } from "./generators/manifest";
|
|
4
|
-
export { Report } from "./report";
|
|
5
|
-
export type { Manifest } from "@prose-reader/shared";
|
|
6
|
-
export type { Archive } from "./archives/types";
|
|
1
|
+
export { generateResourceFromArchive } from "./generators/resources";
|
|
2
|
+
export { generateManifestFromArchive } from "./generators/manifest";
|
|
7
3
|
export { getArchiveOpfInfo } from "./archives/getArchiveOpfInfo";
|
|
8
4
|
export { createArchiveFromUrls } from "./archives/createArchiveFromUrls";
|
|
9
5
|
export { createArchiveFromText } from "./archives/createArchiveFromText";
|
|
10
6
|
export { createArchiveFromJszip } from "./archives/createArchiveFromJszip";
|
|
11
7
|
export { createArchiveFromArrayBufferList } from "./archives/createArchiveFromArrayBufferList";
|
|
12
|
-
export {
|
|
8
|
+
export type { Manifest } from "@prose-reader/shared";
|
|
9
|
+
export type { Archive } from "./archives/types";
|
|
10
|
+
export { configure } from "./configure";
|