@prose-reader/streamer 1.132.0 → 1.134.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 → epubs}/getArchiveOpfInfo.d.ts +2 -2
- package/dist/epubs/isArchiveEpub.d.ts +2 -0
- package/dist/generators/manifest/hooks/epub/spineItems.d.ts +4 -0
- package/dist/generators/manifest/hooks/kobo.d.ts +6 -0
- package/dist/generators/manifest/hooks/nonEpub.d.ts +10 -0
- package/dist/generators/manifest/index.d.ts +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +427 -416
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +6 -6
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
- /package/dist/{epub → epubs}/getSpineItemFilesFromArchive.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Archive } from '
|
|
1
|
+
import { Archive } from '../archives/types';
|
|
2
2
|
export declare const getArchiveOpfInfo: (archive: Archive) => {
|
|
3
3
|
data: {
|
|
4
4
|
dir: boolean;
|
|
@@ -6,7 +6,7 @@ export declare const getArchiveOpfInfo: (archive: Archive) => {
|
|
|
6
6
|
uri: string;
|
|
7
7
|
blob: () => Promise<Blob>;
|
|
8
8
|
string: () => Promise<string>;
|
|
9
|
-
stream?: () => import('
|
|
9
|
+
stream?: () => import('../archives/types').StreamResult;
|
|
10
10
|
size: number;
|
|
11
11
|
encodingFormat?: string;
|
|
12
12
|
} | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Manifest } from '@prose-reader/shared';
|
|
2
|
+
import { default as xmldoc } from 'xmldoc';
|
|
3
|
+
export type SpineItemProperties = `rendition:layout-reflowable` | `rendition:layout-pre-paginated` | `page-spread-left` | `page-spread-right`;
|
|
4
|
+
export declare const getSpineItemInfo: (itemRefElement: xmldoc.XmlElement) => Partial<Manifest["spineItems"][number]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Manifest } from '@prose-reader/shared';
|
|
2
|
+
import { Archive } from '../../../archives/types';
|
|
3
|
+
/**
|
|
4
|
+
* If we don't have a regular epub, we have an archive that could be many things.
|
|
5
|
+
* We try to refine the manifest based on the type of content as much as possible.
|
|
6
|
+
*/
|
|
7
|
+
export declare const nonEpub: ({ archive }: {
|
|
8
|
+
archive: Archive;
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
}) => (manifest: Manifest) => Promise<Manifest>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Manifest } from '@prose-reader/shared';
|
|
2
1
|
import { Archive } from '../../archives/types';
|
|
3
2
|
export declare const generateManifestFromArchive: (archive: Archive, { baseUrl }?: {
|
|
4
3
|
baseUrl?: string;
|
|
5
|
-
}) => Promise<Manifest>;
|
|
4
|
+
}) => Promise<import('@prose-reader/shared').Manifest>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { generateResourceFromArchive } from './generators/resources';
|
|
2
2
|
export { generateManifestFromArchive } from './generators/manifest';
|
|
3
|
-
export { getArchiveOpfInfo } from './
|
|
3
|
+
export { getArchiveOpfInfo } from './epubs/getArchiveOpfInfo';
|
|
4
4
|
export { createArchiveFromUrls } from './archives/createArchiveFromUrls';
|
|
5
5
|
export { createArchiveFromText } from './archives/createArchiveFromText';
|
|
6
6
|
export { createArchiveFromJszip } from './archives/createArchiveFromJszip';
|