@prose-reader/streamer 1.217.0 → 1.219.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/Streamer.d.ts +1 -1
- package/dist/archives/types.d.ts +19 -10
- package/dist/epubs/getArchiveOpfInfo.d.ts +1 -1
- package/dist/epubs/getSpineItemFilesFromArchive.d.ts +9 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +362 -356
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +10 -10
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
package/dist/Streamer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Manifest } from '@prose-reader/shared';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
3
|
import { createArchiveLoader } from './archives/archiveLoader';
|
|
3
|
-
import { Manifest } from '@prose-reader/shared';
|
|
4
4
|
import { Archive } from './archives/types';
|
|
5
5
|
type OnError = (error: unknown) => Response;
|
|
6
6
|
type OnManifestSuccess = (params: {
|
package/dist/archives/types.d.ts
CHANGED
|
@@ -4,17 +4,26 @@ export interface StreamResult {
|
|
|
4
4
|
on(e: `end`, cb: () => void): void;
|
|
5
5
|
resume(): void;
|
|
6
6
|
}
|
|
7
|
+
type FileRecord = {
|
|
8
|
+
dir: false;
|
|
9
|
+
basename: string;
|
|
10
|
+
uri: string;
|
|
11
|
+
blob: () => Promise<Blob>;
|
|
12
|
+
string: () => Promise<string>;
|
|
13
|
+
stream?: () => StreamResult;
|
|
14
|
+
size: number;
|
|
15
|
+
encodingFormat?: string;
|
|
16
|
+
};
|
|
17
|
+
type DirectoryRecord = {
|
|
18
|
+
dir: true;
|
|
19
|
+
basename: string;
|
|
20
|
+
uri: string;
|
|
21
|
+
size: number;
|
|
22
|
+
encodingFormat?: undefined;
|
|
23
|
+
};
|
|
7
24
|
export type Archive = {
|
|
8
25
|
filename: string;
|
|
9
|
-
|
|
10
|
-
dir: boolean;
|
|
11
|
-
basename: string;
|
|
12
|
-
uri: string;
|
|
13
|
-
blob: () => Promise<Blob>;
|
|
14
|
-
string: () => Promise<string>;
|
|
15
|
-
stream?: () => StreamResult;
|
|
16
|
-
size: number;
|
|
17
|
-
encodingFormat?: string;
|
|
18
|
-
}[];
|
|
26
|
+
records: (FileRecord | DirectoryRecord)[];
|
|
19
27
|
close: () => Promise<void>;
|
|
20
28
|
};
|
|
29
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Archive } from '../archives/types';
|
|
2
2
|
export declare const getSpineItemFilesFromArchive: ({ archive, }: {
|
|
3
3
|
archive: Archive;
|
|
4
|
-
}) => Promise<{
|
|
5
|
-
dir:
|
|
4
|
+
}) => Promise<({
|
|
5
|
+
dir: false;
|
|
6
6
|
basename: string;
|
|
7
7
|
uri: string;
|
|
8
8
|
blob: () => Promise<Blob>;
|
|
@@ -10,4 +10,10 @@ export declare const getSpineItemFilesFromArchive: ({ archive, }: {
|
|
|
10
10
|
stream?: () => import('../archives/types').StreamResult;
|
|
11
11
|
size: number;
|
|
12
12
|
encodingFormat?: string;
|
|
13
|
-
}
|
|
13
|
+
} | {
|
|
14
|
+
dir: true;
|
|
15
|
+
basename: string;
|
|
16
|
+
uri: string;
|
|
17
|
+
size: number;
|
|
18
|
+
encodingFormat?: undefined;
|
|
19
|
+
})[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,5 @@ export type { Archive } from './archives/types';
|
|
|
11
11
|
export { configure } from './configure';
|
|
12
12
|
export { Streamer } from './Streamer';
|
|
13
13
|
export { ServiceWorkerStreamer } from './ServiceWorkerStreamer';
|
|
14
|
+
export * from './utils/sortByTitleComparator';
|
|
15
|
+
export * from './utils/uri';
|