@prose-reader/streamer 1.12.0 → 1.14.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.
@@ -11,7 +11,7 @@ interface OutputByType {
11
11
  blob: Blob;
12
12
  nodebuffer: Buffer;
13
13
  }
14
- declare type OutputType = keyof OutputByType;
14
+ type OutputType = keyof OutputByType;
15
15
  interface JSZipObject {
16
16
  name: string;
17
17
  dir: boolean;
@@ -4,7 +4,7 @@ export interface StreamResult {
4
4
  on(e: `end`, cb: () => void): void;
5
5
  resume(): void;
6
6
  }
7
- export declare type Archive = {
7
+ export type Archive = {
8
8
  filename: string;
9
9
  files: {
10
10
  dir: boolean;
@@ -3,4 +3,4 @@ import { Archive } from "../../../archives/types";
3
3
  export declare const defaultHook: ({ archive, baseUrl }: {
4
4
  archive: Archive;
5
5
  baseUrl: string;
6
- }) => (manifest: Manifest) => Promise<Manifest>;
6
+ }) => () => Promise<Manifest>;
@@ -0,0 +1,12 @@
1
+ import { Manifest } from "@prose-reader/shared";
2
+ import { Archive } from "../../../archives/types";
3
+ /**
4
+ * In case no navigation was generated prior to this hook, we will try
5
+ * to generate something based on the structure of the archive.
6
+ *
7
+ * We use folders as chapters.
8
+ */
9
+ export declare const navigationFallbackHook: ({ archive, baseUrl }: {
10
+ archive: Archive;
11
+ baseUrl: string;
12
+ }) => (manifest: Manifest) => Promise<Manifest>;
@@ -1,5 +1,5 @@
1
1
  import { Archive } from "..";
2
- declare type KoboInformation = {
2
+ type KoboInformation = {
3
3
  renditionLayout?: `reflowable` | `pre-paginated` | undefined;
4
4
  };
5
5
  export declare const extractKoboInformationFromArchive: (archive: Archive) => Promise<KoboInformation>;