@pretextbook/web-editor 0.5.0 → 0.5.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/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/sectionUtils.d.ts +12 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -95263,9 +95263,9 @@ var n8 = new Set(["part", "chapter"]), r8 = new Set([
|
|
|
95263
95263
|
"article",
|
|
95264
95264
|
"slideshow"
|
|
95265
95265
|
]);
|
|
95266
|
-
function i8(e, t, n) {
|
|
95267
|
-
let
|
|
95268
|
-
return `<pretext>\n${n.trim() ? `${n.trim()}\n` : ""}${
|
|
95266
|
+
function i8(e, t, n, r) {
|
|
95267
|
+
let i = r8.has(e) ? t : n8.has(e) ? `<book label="preview">\n<title>${r}</title>\n${t}\n</book>` : `<article label="preview">\n<title>${r}</title>\n${t}\n</article>`;
|
|
95268
|
+
return `<pretext>\n${n.trim() ? `${n.trim()}\n` : ""}${i}\n</pretext>`;
|
|
95269
95269
|
}
|
|
95270
95270
|
//#endregion
|
|
95271
95271
|
//#region src/components/toc/ArticleToc.tsx
|
|
@@ -95795,7 +95795,7 @@ var u8 = (e, t) => e.find((e) => t ? e.xmlId === t : e.type === "book" || e.type
|
|
|
95795
95795
|
activeDivisionId: e.activeDivisionId
|
|
95796
95796
|
};
|
|
95797
95797
|
});
|
|
95798
|
-
let _e = D ? E : T, ve = ae ? P === "pretext" ? ae.
|
|
95798
|
+
let _e = D ? E : T, ve = ae ? P === "pretext" ? t8(S, ae.xmlId) : I === void 0 ? void 0 : `<${ae.type} xml:id="${ae.xmlId}">\n<title>${ae.title}</title>\n\n${I}\n</${ae.type}>` : void 0, ye = ae && ve !== void 0 ? i8(ae.type, ve, _e, ae.title) : void 0, be = () => N.current?.rebuild(), xe = () => {
|
|
95799
95799
|
e.onSave?.(), N.current?.rebuild();
|
|
95800
95800
|
}, Se = (t) => {
|
|
95801
95801
|
let n = t.ctrlKey || t.metaKey;
|