@prose-reader/shared 0.0.5 → 0.0.7
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/Manifest.d.ts +37 -0
- package/dist/contentType.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/url.d.ts +1 -0
- package/package.json +9 -5
- package/src/Manifest.ts +0 -43
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -7
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare type TocItem = {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
contents: TocItem[];
|
|
5
|
+
href: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type Manifest = {
|
|
8
|
+
filename: string;
|
|
9
|
+
nav: {
|
|
10
|
+
toc: TocItem[];
|
|
11
|
+
};
|
|
12
|
+
title: string;
|
|
13
|
+
renditionLayout: `reflowable` | `pre-paginated` | undefined;
|
|
14
|
+
renditionFlow?: `scrolled-continuous` | `scrolled-doc` | `paginated` | `auto`;
|
|
15
|
+
renditionSpread: `none` | `landscape` | `portrait` | `both` | `auto` | undefined;
|
|
16
|
+
readingDirection: 'ltr' | 'rtl';
|
|
17
|
+
guide?: {
|
|
18
|
+
type: `cover` | `title-page` | `copyright-page` | `text`;
|
|
19
|
+
title: string;
|
|
20
|
+
href: string;
|
|
21
|
+
}[];
|
|
22
|
+
spineItems: {
|
|
23
|
+
id: string;
|
|
24
|
+
href: string;
|
|
25
|
+
path: string;
|
|
26
|
+
renditionLayout: `reflowable` | `pre-paginated`;
|
|
27
|
+
progressionWeight: number;
|
|
28
|
+
pageSpreadLeft: true | undefined;
|
|
29
|
+
pageSpreadRight: true | undefined;
|
|
30
|
+
mediaType?: string;
|
|
31
|
+
}[];
|
|
32
|
+
items: {
|
|
33
|
+
id: string;
|
|
34
|
+
href: string;
|
|
35
|
+
mediaType?: string;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{detectContentType:()=>n,getUrlExtension:()=>r,parseContentType:()=>o});const r=e=>{var t,r;return(null===(r=null===(t=e.split(/[#?]/)[0])||void 0===t?void 0:t.split(".").pop())||void 0===r?void 0:r.trim())||""},n=e=>{switch(r(e)){case"png":return"image/png";case"jpg":return"image/jpg";case"jpeg":return"image/jpeg";case"txt":return"text/plain";case"webp":return"image/webp"}},o=e=>{if(e.length)return e.indexOf(";")?e.substring(0,e.indexOf(";")):e};var i=exports;for(var p in t)i[p]=t[p];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
package/dist/url.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getUrlExtension: (url: string) => string;
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prose-reader/shared",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"/dist"
|
|
8
|
+
],
|
|
6
9
|
"scripts": {
|
|
7
|
-
"build:prod": "echo",
|
|
8
10
|
"lint": "echo",
|
|
9
|
-
"start": "
|
|
11
|
+
"start": "NODE_ENV=development webpack build --config ./webpack.config.js --watch",
|
|
12
|
+
"build": "NODE_ENV=development webpack build --config ./webpack.config.js",
|
|
13
|
+
"build:prod": "NODE_ENV=production webpack build --config ./webpack.config.js",
|
|
10
14
|
"test": "echo"
|
|
11
15
|
},
|
|
12
16
|
"devDependencies": {
|
|
13
17
|
"typescript": "*"
|
|
14
18
|
},
|
|
15
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "1f28c007ad5b72e6a131e77aa3438b652d0203c2"
|
|
16
20
|
}
|
package/src/Manifest.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Manifest, TocItem } from './Manifest'
|