@harbour-enterprises/superdoc 0.6.79 → 0.6.80
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/chunks/{super-editor.es-B0VUVWBo.js → super-editor.es-8gKNHSEh.js} +17 -9
- package/dist/chunks/{super-editor.es-B0VUVWBo.js.map → super-editor.es-8gKNHSEh.js.map} +1 -1
- package/dist/super-editor/chunks/{converter-C6qhz5ig.js → converter-C7DcyS0S.js} +3 -3
- package/dist/super-editor/chunks/{converter-C6qhz5ig.js.map → converter-C7DcyS0S.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-CAVp3vpl.js → docx-zipper-CZsaunAg.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CAVp3vpl.js.map → docx-zipper-CZsaunAg.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-ClEfFhqx.js → editor-CnQI8Awl.js} +17 -9
- package/dist/super-editor/chunks/{editor-ClEfFhqx.js.map → editor-CnQI8Awl.js.map} +1 -1
- package/dist/super-editor/chunks/{toolbar-PeosMC7P.js → toolbar-3FuYSu9a.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-PeosMC7P.js.map → toolbar-3FuYSu9a.js.map} +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +17 -9
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _events, _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as comments_module_events, w as AddMarkStep, x as RemoveMarkStep, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase, H as SelectionRange, I as Transform } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as comments_module_events, w as AddMarkStep, x as RemoveMarkStep, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase, H as SelectionRange, I as Transform } from "./converter-C7DcyS0S.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-CZsaunAg.js";
|
|
18
18
|
function getMarksFromSelection(state) {
|
|
19
19
|
const { from: from2, to, empty: empty2 } = state.selection;
|
|
20
20
|
const marks = [];
|
|
@@ -11692,7 +11692,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11692
11692
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
11693
11693
|
*/
|
|
11694
11694
|
processCollaborationMigrations() {
|
|
11695
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
11695
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.80");
|
|
11696
11696
|
if (!this.options.ydoc) return;
|
|
11697
11697
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
11698
11698
|
let docVersion = metaMap.get("version");
|
|
@@ -22336,13 +22336,15 @@ function generateInternalPageBreaks(doc2, view, editor, sectionData) {
|
|
|
22336
22336
|
let coords = view?.coordsAtPos(doc2.content.size);
|
|
22337
22337
|
if (!coords) return [];
|
|
22338
22338
|
doc2.descendants((node, pos) => {
|
|
22339
|
-
|
|
22339
|
+
let currentNode = node;
|
|
22340
|
+
let currentPos = pos;
|
|
22341
|
+
coords = view?.coordsAtPos(currentPos);
|
|
22340
22342
|
if (!coords) return;
|
|
22341
22343
|
let shouldAddPageBreak = coords.bottom > pageHeightThreshold;
|
|
22342
|
-
const isHardBreakNode =
|
|
22343
|
-
if (
|
|
22344
|
+
const isHardBreakNode = currentNode.type.name === "hardBreak";
|
|
22345
|
+
if (currentNode.type.name === "paragraph" && currentNode.attrs.styleId) {
|
|
22344
22346
|
const linkedStyles = LinkedStylesPluginKey.getState(editor.state)?.styles;
|
|
22345
|
-
const style = linkedStyles?.find((style2) => style2.id ===
|
|
22347
|
+
const style = linkedStyles?.find((style2) => style2.id === currentNode.attrs.styleId);
|
|
22346
22348
|
if (style) {
|
|
22347
22349
|
const { definition = {} } = style;
|
|
22348
22350
|
const { pageBreakBefore, pageBreakAfter } = definition.attrs || {};
|
|
@@ -22350,11 +22352,17 @@ function generateInternalPageBreaks(doc2, view, editor, sectionData) {
|
|
|
22350
22352
|
}
|
|
22351
22353
|
}
|
|
22352
22354
|
if (isHardBreakNode || shouldAddPageBreak) {
|
|
22355
|
+
const $currentPos = view.state.doc.resolve(currentPos);
|
|
22356
|
+
const tableRow = findParentNodeClosestToPos($currentPos, (node2) => node2.type.name === "tableRow");
|
|
22357
|
+
if (tableRow) {
|
|
22358
|
+
currentNode = tableRow.node;
|
|
22359
|
+
currentPos = tableRow.pos;
|
|
22360
|
+
}
|
|
22353
22361
|
const {
|
|
22354
22362
|
top: actualBreakTop,
|
|
22355
22363
|
bottom: actualBreakBottom,
|
|
22356
22364
|
pos: breakPos
|
|
22357
|
-
} = getActualBreakCoords(view,
|
|
22365
|
+
} = getActualBreakCoords(view, currentPos, pageHeightThreshold);
|
|
22358
22366
|
currentPageNumber++;
|
|
22359
22367
|
const headerId2 = (currentPageNumber % 2 === 0 ? headerIds.even : headerIds.odd) || headerIds.default;
|
|
22360
22368
|
const footerId2 = (currentPageNumber % 2 === 0 ? footerIds.even : footerIds.odd) || footerIds.default;
|
|
@@ -22577,4 +22585,4 @@ export {
|
|
|
22577
22585
|
redoDepth as r,
|
|
22578
22586
|
undoDepth as u
|
|
22579
22587
|
};
|
|
22580
|
-
//# sourceMappingURL=editor-
|
|
22588
|
+
//# sourceMappingURL=editor-CnQI8Awl.js.map
|