@prose-reader/shared 0.0.4

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/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@prose-reader/shared",
3
+ "version": "0.0.4",
4
+ "main": "src/index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "build:prod": "echo",
8
+ "lint": "echo",
9
+ "start": "echo",
10
+ "test": "echo"
11
+ },
12
+ "devDependencies": {
13
+ "typescript": "*"
14
+ }
15
+ }
@@ -0,0 +1,43 @@
1
+ export type TocItem = {
2
+ title: string,
3
+ path: string,
4
+ contents: TocItem[],
5
+ href: string,
6
+ }
7
+
8
+ export type Manifest = {
9
+ filename: string,
10
+ nav: {
11
+ toc: TocItem[]
12
+ },
13
+ title: string
14
+ renditionLayout: `reflowable` | `pre-paginated` | undefined,
15
+ renditionFlow?: `scrolled-continuous` | `scrolled-doc` | `paginated` | `auto`,
16
+ renditionSpread: `none` | `landscape` | `portrait` | `both` | `auto` | undefined,
17
+ readingDirection: 'ltr' | 'rtl',
18
+ /**
19
+ * legacy
20
+ * @see https://www.w3.org/publishing/epub3/epub-packages.html#sec-opf2-guide
21
+ */
22
+ guide?: {
23
+ type: `cover` | `title-page` | `copyright-page` | `text`,
24
+ title: string
25
+ href: string
26
+ }[],
27
+ spineItems: {
28
+ id: string,
29
+ href: string,
30
+ path: string,
31
+ renditionLayout: `reflowable` | `pre-paginated`,
32
+ progressionWeight: number,
33
+ pageSpreadLeft: true | undefined,
34
+ pageSpreadRight: true | undefined,
35
+ // encodingFormat?: string,
36
+ mediaType?: string
37
+ }[],
38
+ items: {
39
+ id: string,
40
+ href: string,
41
+ mediaType?: string
42
+ }[]
43
+ }
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export type { Manifest, TocItem } from './Manifest'
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../tsconfig.common.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "noEmit": true
6
+ },
7
+ }