@leopiccionia/epub-builder 0.0.1 → 0.0.2
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +3 -5
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -306,4 +306,5 @@ declare function getMimeType(path: string): string | undefined;
|
|
|
306
306
|
*/
|
|
307
307
|
declare function isCoreMediaType(mimeType: string | undefined): boolean;
|
|
308
308
|
|
|
309
|
-
export {
|
|
309
|
+
export { EpubBuilder, getMimeType, isCoreMediaType, populateConfig };
|
|
310
|
+
export type { EbookMeta, EpubBuilderConfig, EpubBuilderPartialConfig, Landmarks, Locale, Resource, ResourceProperty, TocEntry };
|
package/dist/index.d.ts
CHANGED
|
@@ -306,4 +306,5 @@ declare function getMimeType(path: string): string | undefined;
|
|
|
306
306
|
*/
|
|
307
307
|
declare function isCoreMediaType(mimeType: string | undefined): boolean;
|
|
308
308
|
|
|
309
|
-
export {
|
|
309
|
+
export { EpubBuilder, getMimeType, isCoreMediaType, populateConfig };
|
|
310
|
+
export type { EbookMeta, EpubBuilderConfig, EpubBuilderPartialConfig, Landmarks, Locale, Resource, ResourceProperty, TocEntry };
|
package/dist/index.mjs
CHANGED
|
@@ -93,7 +93,7 @@ function generateManifest(resources) {
|
|
|
93
93
|
href,
|
|
94
94
|
id: generateItemId(href),
|
|
95
95
|
"media-type": mime,
|
|
96
|
-
properties: properties.length > 0 ? properties.join(" ") :
|
|
96
|
+
properties: properties.length > 0 ? properties.join(" ") : void 0
|
|
97
97
|
})));
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -293,10 +293,8 @@ const ALLOWED_MEDIA_TYPES = [
|
|
|
293
293
|
"application/smil+xml"
|
|
294
294
|
];
|
|
295
295
|
function getMimeType(path) {
|
|
296
|
-
const mimeType = mime.getType(path) ??
|
|
297
|
-
if (mimeType === "
|
|
298
|
-
return "audio/mp4";
|
|
299
|
-
} else if (mimeType === "text/javascript") {
|
|
296
|
+
const mimeType = mime.getType(path) ?? void 0;
|
|
297
|
+
if (mimeType === "text/javascript") {
|
|
300
298
|
return "application/javascript";
|
|
301
299
|
}
|
|
302
300
|
return mimeType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leopiccionia/epub-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "A non-opinionated EPUB builder for reflowable content",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -37,16 +37,17 @@
|
|
|
37
37
|
"test": "vitest"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/node": "^
|
|
40
|
+
"@types/node": "^25.0.3",
|
|
41
41
|
"@types/xast": "^2.0.4",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"unbuild": "^3.6.1",
|
|
44
|
+
"vitest": "^4.0.16"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"@lukeed/uuid": "^2.0.1",
|
|
47
|
-
"@zip.js/zip.js": "^2.
|
|
48
|
+
"@zip.js/zip.js": "^2.8.11",
|
|
48
49
|
"defu": "^6.1.4",
|
|
49
|
-
"mime": "^4.0
|
|
50
|
+
"mime": "^4.1.0",
|
|
50
51
|
"unist-builder": "^4.0.0",
|
|
51
52
|
"xast-util-to-xml": "^4.0.0",
|
|
52
53
|
"xastscript": "^4.0.0"
|