@fiduswriter/books 0.0.0-stage → 0.2.1
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/LICENSE +661 -0
- package/README.md +87 -2
- package/css/book.css +219 -0
- package/dist/exporter/bits/index.d.ts +42 -0
- package/dist/exporter/bits/index.d.ts.map +1 -0
- package/dist/exporter/bits/index.js +113 -0
- package/dist/exporter/bits/index.js.map +1 -0
- package/dist/exporter/bits/templates.d.ts +7 -0
- package/dist/exporter/bits/templates.d.ts.map +1 -0
- package/dist/exporter/bits/templates.js +78 -0
- package/dist/exporter/bits/templates.js.map +1 -0
- package/dist/exporter/docx/index.d.ts +33 -0
- package/dist/exporter/docx/index.d.ts.map +1 -0
- package/dist/exporter/docx/index.js +139 -0
- package/dist/exporter/docx/index.js.map +1 -0
- package/dist/exporter/docx/render.d.ts +19 -0
- package/dist/exporter/docx/render.d.ts.map +1 -0
- package/dist/exporter/docx/render.js +123 -0
- package/dist/exporter/docx/render.js.map +1 -0
- package/dist/exporter/epub/index.d.ts +70 -0
- package/dist/exporter/epub/index.d.ts.map +1 -0
- package/dist/exporter/epub/index.js +310 -0
- package/dist/exporter/epub/index.js.map +1 -0
- package/dist/exporter/epub/templates.d.ts +65 -0
- package/dist/exporter/epub/templates.d.ts.map +1 -0
- package/dist/exporter/epub/templates.js +224 -0
- package/dist/exporter/epub/templates.js.map +1 -0
- package/dist/exporter/epub/tools.d.ts +5 -0
- package/dist/exporter/epub/tools.d.ts.map +1 -0
- package/dist/exporter/epub/tools.js +59 -0
- package/dist/exporter/epub/tools.js.map +1 -0
- package/dist/exporter/html/index.d.ts +70 -0
- package/dist/exporter/html/index.d.ts.map +1 -0
- package/dist/exporter/html/index.js +320 -0
- package/dist/exporter/html/index.js.map +1 -0
- package/dist/exporter/html/templates.d.ts +40 -0
- package/dist/exporter/html/templates.d.ts.map +1 -0
- package/dist/exporter/html/templates.js +225 -0
- package/dist/exporter/html/templates.js.map +1 -0
- package/dist/exporter/html/tools.d.ts +2 -0
- package/dist/exporter/html/tools.d.ts.map +1 -0
- package/dist/exporter/html/tools.js +23 -0
- package/dist/exporter/html/tools.js.map +1 -0
- package/dist/exporter/latex/index.d.ts +36 -0
- package/dist/exporter/latex/index.d.ts.map +1 -0
- package/dist/exporter/latex/index.js +116 -0
- package/dist/exporter/latex/index.js.map +1 -0
- package/dist/exporter/latex/templates.d.ts +4 -0
- package/dist/exporter/latex/templates.d.ts.map +1 -0
- package/dist/exporter/latex/templates.js +26 -0
- package/dist/exporter/latex/templates.js.map +1 -0
- package/dist/exporter/native/index.d.ts +22 -0
- package/dist/exporter/native/index.d.ts.map +1 -0
- package/dist/exporter/native/index.js +141 -0
- package/dist/exporter/native/index.js.map +1 -0
- package/dist/exporter/odt/index.d.ts +33 -0
- package/dist/exporter/odt/index.d.ts.map +1 -0
- package/dist/exporter/odt/index.js +133 -0
- package/dist/exporter/odt/index.js.map +1 -0
- package/dist/exporter/odt/render.d.ts +21 -0
- package/dist/exporter/odt/render.d.ts.map +1 -0
- package/dist/exporter/odt/render.js +126 -0
- package/dist/exporter/odt/render.js.map +1 -0
- package/dist/exporter/pretty.d.ts +17 -0
- package/dist/exporter/pretty.d.ts.map +1 -0
- package/dist/exporter/pretty.js +55 -0
- package/dist/exporter/pretty.js.map +1 -0
- package/dist/exporter/print/index.d.ts +25 -0
- package/dist/exporter/print/index.d.ts.map +1 -0
- package/dist/exporter/print/index.js +46 -0
- package/dist/exporter/print/index.js.map +1 -0
- package/dist/exporter/print/templates.d.ts +2 -0
- package/dist/exporter/print/templates.d.ts.map +1 -0
- package/dist/exporter/print/templates.js +5 -0
- package/dist/exporter/print/templates.js.map +1 -0
- package/dist/exporter/tools.d.ts +31 -0
- package/dist/exporter/tools.d.ts.map +1 -0
- package/dist/exporter/tools.js +177 -0
- package/dist/exporter/tools.js.map +1 -0
- package/dist/i18n.d.ts +7 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +918 -0
- package/dist/i18n.js.map +1 -0
- package/dist/ids.d.ts +19 -0
- package/dist/ids.d.ts.map +1 -0
- package/dist/ids.js +27 -0
- package/dist/ids.js.map +1 -0
- package/dist/importer/native/index.d.ts +45 -0
- package/dist/importer/native/index.d.ts.map +1 -0
- package/dist/importer/native/index.js +166 -0
- package/dist/importer/native/index.js.map +1 -0
- package/dist/importer/native/reader.d.ts +32 -0
- package/dist/importer/native/reader.d.ts.map +1 -0
- package/dist/importer/native/reader.js +170 -0
- package/dist/importer/native/reader.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +8 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/types.d.ts +171 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/book_dialog/dialog.d.ts +161 -0
- package/dist/ui/book_dialog/dialog.d.ts.map +1 -0
- package/dist/ui/book_dialog/dialog.js +750 -0
- package/dist/ui/book_dialog/dialog.js.map +1 -0
- package/dist/ui/book_dialog/export.d.ts +95 -0
- package/dist/ui/book_dialog/export.d.ts.map +1 -0
- package/dist/ui/book_dialog/export.js +217 -0
- package/dist/ui/book_dialog/export.js.map +1 -0
- package/dist/ui/book_dialog/index.d.ts +38 -0
- package/dist/ui/book_dialog/index.d.ts.map +1 -0
- package/dist/ui/book_dialog/index.js +36 -0
- package/dist/ui/book_dialog/index.js.map +1 -0
- package/dist/ui/book_dialog/sanity_check.d.ts +22 -0
- package/dist/ui/book_dialog/sanity_check.d.ts.map +1 -0
- package/dist/ui/book_dialog/sanity_check.js +109 -0
- package/dist/ui/book_dialog/sanity_check.js.map +1 -0
- package/dist/ui/book_dialog/templates.d.ts +76 -0
- package/dist/ui/book_dialog/templates.d.ts.map +1 -0
- package/dist/ui/book_dialog/templates.js +542 -0
- package/dist/ui/book_dialog/templates.js.map +1 -0
- package/dist/ui/book_dialog/types.d.ts +258 -0
- package/dist/ui/book_dialog/types.d.ts.map +1 -0
- package/dist/ui/book_dialog/types.js +15 -0
- package/dist/ui/book_dialog/types.js.map +1 -0
- package/locale/ar/messages.json +49 -0
- package/locale/bg/messages.json +49 -0
- package/locale/cs/messages.json +49 -0
- package/locale/da/messages.json +49 -0
- package/locale/de/messages.json +49 -0
- package/locale/en/messages.json +49 -0
- package/locale/en_US/messages.json +49 -0
- package/locale/es/messages.json +49 -0
- package/locale/fr/messages.json +49 -0
- package/locale/it/messages.json +49 -0
- package/locale/ja/messages.json +49 -0
- package/locale/ko/messages.json +49 -0
- package/locale/nb/messages.json +49 -0
- package/locale/nl/messages.json +49 -0
- package/locale/pl/messages.json +49 -0
- package/locale/pt_BR/messages.json +49 -0
- package/locale/pt_PT/messages.json +49 -0
- package/locale/ru/messages.json +49 -0
- package/locale/sv/messages.json +49 -0
- package/locale/tr/messages.json +49 -0
- package/locale/zh_Hans/messages.json +49 -0
- package/logo.svg +10 -0
- package/package.json +150 -5
- package/src/exporter/bits/index.ts +184 -0
- package/src/exporter/bits/templates.ts +107 -0
- package/src/exporter/docx/index.ts +258 -0
- package/src/exporter/docx/render.ts +177 -0
- package/src/exporter/epub/index.ts +496 -0
- package/src/exporter/epub/templates.ts +403 -0
- package/src/exporter/epub/tools.ts +68 -0
- package/src/exporter/html/index.ts +479 -0
- package/src/exporter/html/templates.ts +362 -0
- package/src/exporter/html/tools.ts +26 -0
- package/src/exporter/latex/index.ts +190 -0
- package/src/exporter/latex/templates.ts +35 -0
- package/src/exporter/native/index.ts +238 -0
- package/src/exporter/odt/index.ts +230 -0
- package/src/exporter/odt/render.ts +181 -0
- package/src/exporter/pretty.ts +75 -0
- package/src/exporter/print/index.ts +76 -0
- package/src/exporter/print/templates.ts +8 -0
- package/src/exporter/tools.ts +270 -0
- package/src/global.d.ts +2 -0
- package/src/i18n.ts +936 -0
- package/src/ids.ts +27 -0
- package/src/importer/native/index.ts +269 -0
- package/src/importer/native/reader.ts +247 -0
- package/src/index.ts +20 -0
- package/src/modules.d.ts +7 -0
- package/src/schema/index.ts +8 -0
- package/src/types.ts +208 -0
- package/src/ui/book_dialog/dialog.ts +940 -0
- package/src/ui/book_dialog/export.ts +449 -0
- package/src/ui/book_dialog/index.ts +84 -0
- package/src/ui/book_dialog/sanity_check.ts +208 -0
- package/src/ui/book_dialog/templates.ts +736 -0
- package/src/ui/book_dialog/types.ts +283 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared tools for book exporters.
|
|
3
|
+
*
|
|
4
|
+
* `getMissingChapterData` is fully dependency-injected: it no longer imports
|
|
5
|
+
* browser/server-specific helpers from the Fidus Writer core. Callers supply
|
|
6
|
+
* a `ChapterLoader` to fetch missing chapter data and an `E2EEStrategy` to
|
|
7
|
+
* decrypt end-to-end encrypted chapters.
|
|
8
|
+
*/
|
|
9
|
+
import { getSettings } from "@fiduswriter/document/schema/convert";
|
|
10
|
+
import { acceptAllNoInsertions } from "@fiduswriter/document/transform";
|
|
11
|
+
import { gettext } from "fwtoolkit";
|
|
12
|
+
/** Default no-op chapter loader. */
|
|
13
|
+
export const noopChapterLoader = {
|
|
14
|
+
loadChapters: async () => {
|
|
15
|
+
// noop
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
/** Default no-op E2EE strategy. */
|
|
19
|
+
export const noopE2EEStrategy = {
|
|
20
|
+
ensurePassphraseUnlocked: async () => false,
|
|
21
|
+
getDocumentPassword: async () => null,
|
|
22
|
+
resolvePasswordToKey: async () => {
|
|
23
|
+
throw new Error("No E2EE strategy provided");
|
|
24
|
+
},
|
|
25
|
+
decryptObject: async () => {
|
|
26
|
+
throw new Error("No E2EE strategy provided");
|
|
27
|
+
},
|
|
28
|
+
decryptImageToUrl: async () => {
|
|
29
|
+
throw new Error("No E2EE strategy provided");
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Ensure all chapter data required for export is present.
|
|
34
|
+
*
|
|
35
|
+
* @param book - The book being exported.
|
|
36
|
+
* @param documentList - Document entries for the book's chapters.
|
|
37
|
+
* @param schema - ProseMirror schema used when parsing decrypted content.
|
|
38
|
+
* @param options - Optional loader and E2EE strategy.
|
|
39
|
+
* @returns Promise that resolves when data is ready.
|
|
40
|
+
*/
|
|
41
|
+
export async function getMissingChapterData(book, documentList, schema, options = {}) {
|
|
42
|
+
const { rawContent = false, loader = noopChapterLoader, e2ee = noopE2EEStrategy, progressCallback } = options;
|
|
43
|
+
progressCallback?.(gettext("Loading chapter data..."), 0);
|
|
44
|
+
const bookDocuments = book.chapters.map(chapter => documentList.find(doc => doc.id === chapter.text));
|
|
45
|
+
if (bookDocuments.some(doc => doc === undefined)) {
|
|
46
|
+
throw new Error(gettext("Cannot produce book as you lack access rights to its chapters."));
|
|
47
|
+
}
|
|
48
|
+
const docIds = book.chapters.map(chapter => chapter.text);
|
|
49
|
+
await loader.loadChapters(docIds, documentList, schema, rawContent);
|
|
50
|
+
await decryptE2EEChapters(book, documentList, schema, rawContent, e2ee);
|
|
51
|
+
// Chapter files read straight from disk (WebDAV/desktop hosts) or
|
|
52
|
+
// produced by importers may carry nodes without every schema attr filled
|
|
53
|
+
// in. Round-trip every chapter through the schema so exporters see
|
|
54
|
+
// exactly what the editor would have saved. Best-effort: a chapter whose
|
|
55
|
+
// content does not parse is left untouched, matching what exporters did
|
|
56
|
+
// with it before.
|
|
57
|
+
book.chapters.forEach(chapter => {
|
|
58
|
+
const doc = documentList.find(doc => Number(doc.id) === Number(chapter.text));
|
|
59
|
+
if (!doc ||
|
|
60
|
+
doc.missing ||
|
|
61
|
+
typeof doc.content !== "object" ||
|
|
62
|
+
!doc.content) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
doc.content = schema.nodeFromJSON(doc.content).toJSON();
|
|
67
|
+
if (doc.rawContent && typeof doc.rawContent === "object") {
|
|
68
|
+
doc.rawContent = schema.nodeFromJSON(doc.rawContent).toJSON();
|
|
69
|
+
}
|
|
70
|
+
doc.settings = {
|
|
71
|
+
...doc.settings,
|
|
72
|
+
...getSettings(doc.content)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// Leave the chapter as stored and let the exporter handle it.
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
progressCallback?.(gettext("Chapter data loaded."), 50);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Decrypt all E2EE chapters in the book whose content is still an encrypted
|
|
83
|
+
* string.
|
|
84
|
+
*/
|
|
85
|
+
async function decryptE2EEChapters(book, documentList, schema, rawContent, e2ee) {
|
|
86
|
+
const e2eeChapters = book.chapters.filter(chapter => {
|
|
87
|
+
const doc = documentList.find(doc => doc.id === chapter.text);
|
|
88
|
+
return doc && doc.e2ee && typeof doc.content === "string";
|
|
89
|
+
});
|
|
90
|
+
if (!e2eeChapters.length) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const unlocked = await e2ee.ensurePassphraseUnlocked();
|
|
94
|
+
if (!unlocked) {
|
|
95
|
+
throw new Error(gettext("A personal passphrase is required to work with books that contain encrypted chapters. Please set up or unlock your personal passphrase in your profile settings."));
|
|
96
|
+
}
|
|
97
|
+
await Promise.all(e2eeChapters.map(async (chapter) => {
|
|
98
|
+
const doc = documentList.find(d => d.id === chapter.text);
|
|
99
|
+
if (!doc) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const chapterLabel = doc.title
|
|
103
|
+
? `"${doc.title}"`
|
|
104
|
+
: gettext("Untitled");
|
|
105
|
+
const password = await e2ee.getDocumentPassword(Number(doc.id));
|
|
106
|
+
if (!password) {
|
|
107
|
+
throw new Error(`${gettext("No encryption key found for chapter:")} ${chapterLabel}. ${gettext("The key may not have been shared with you.")}`);
|
|
108
|
+
}
|
|
109
|
+
if (!doc.e2ee_salt) {
|
|
110
|
+
// No salt means the document has no encrypted snapshot yet.
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const salt = base64ToUint8Array(doc.e2ee_salt);
|
|
114
|
+
const iterations = doc.e2ee_iterations || 600000;
|
|
115
|
+
const key = await e2ee.resolvePasswordToKey(password, salt, iterations);
|
|
116
|
+
try {
|
|
117
|
+
const decryptedContent = (await e2ee.decryptObject(doc.content, key));
|
|
118
|
+
// Update the plaintext title.
|
|
119
|
+
const titleNode = decryptedContent.content?.[0];
|
|
120
|
+
const titleContent = titleNode?.content || [];
|
|
121
|
+
let title = "";
|
|
122
|
+
titleContent.forEach(child => {
|
|
123
|
+
const marks = child.marks || [];
|
|
124
|
+
if (!marks.some(m => m.type === "deletion")) {
|
|
125
|
+
title += child.text || "";
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
if (title) {
|
|
129
|
+
doc.title = title.substring(0, 255);
|
|
130
|
+
if (typeof sessionStorage !== "undefined") {
|
|
131
|
+
sessionStorage.setItem(`e2ee_title_${String(doc.id)}`, doc.title);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Parse ProseMirror content.
|
|
135
|
+
if (rawContent) {
|
|
136
|
+
doc.rawContent = JSON.parse(JSON.stringify(schema.nodeFromJSON(decryptedContent).toJSON()));
|
|
137
|
+
}
|
|
138
|
+
doc.content = acceptAllNoInsertions(schema.nodeFromJSON(decryptedContent)).toJSON();
|
|
139
|
+
doc.settings = getSettings(doc.content);
|
|
140
|
+
// Decrypt encrypted images.
|
|
141
|
+
const encryptedImageEntries = Object.entries(doc.images || {}).filter(([, entry]) => entry.file_type === "application/octet-stream" &&
|
|
142
|
+
typeof entry.image === "string");
|
|
143
|
+
if (!encryptedImageEntries.length) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
await Promise.all(encryptedImageEntries.map(async ([id, entry]) => {
|
|
147
|
+
try {
|
|
148
|
+
const blobUrl = await e2ee.decryptImageToUrl(entry.image, key);
|
|
149
|
+
doc.images[id] = {
|
|
150
|
+
...entry,
|
|
151
|
+
image: blobUrl,
|
|
152
|
+
file_type: "image/png"
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
delete doc.images[id];
|
|
157
|
+
}
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
catch (err) {
|
|
161
|
+
if (err instanceof Error &&
|
|
162
|
+
err.message.startsWith("No encryption key")) {
|
|
163
|
+
throw err;
|
|
164
|
+
}
|
|
165
|
+
throw new Error(`${gettext("Could not decrypt chapter:")} ${chapterLabel}. ${gettext("The document may have been re-encrypted with a different password.")}`);
|
|
166
|
+
}
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
169
|
+
function base64ToUint8Array(base64) {
|
|
170
|
+
const binary = atob(base64);
|
|
171
|
+
const bytes = new Uint8Array(binary.length);
|
|
172
|
+
for (let i = 0; i < binary.length; i++) {
|
|
173
|
+
bytes[i] = binary.charCodeAt(i);
|
|
174
|
+
}
|
|
175
|
+
return bytes;
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/exporter/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAC,WAAW,EAAC,MAAM,sCAAsC,CAAA;AAChE,OAAO,EAAC,qBAAqB,EAAC,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAWjC,oCAAoC;AACpC,MAAM,CAAC,MAAM,iBAAiB,GAAkB;IAC5C,YAAY,EAAE,KAAK,IAAI,EAAE;QACrB,OAAO;IACX,CAAC;CACJ,CAAA;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC1C,wBAAwB,EAAE,KAAK,IAAI,EAAE,CAAC,KAAK;IAC3C,mBAAmB,EAAE,KAAK,IAAI,E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