@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-CnQI8Awl.js";
|
|
2
|
+
import "./chunks/converter-C7DcyS0S.js";
|
|
3
|
+
import "./chunks/docx-zipper-CZsaunAg.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/extensions/pagination/pagination.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/extensions/pagination/pagination.js"],"names":[],"mappings":"AAYA,6BAgJG"}
|
|
@@ -9,13 +9,13 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _interceptedCommands, _SuperToolbar_instances, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions } from "./chunks/editor-
|
|
13
|
-
import { k, m, j, l } from "./chunks/editor-
|
|
14
|
-
import { L as getDefaultExportFromCjs, v as v4, T as TextSelection, Q as vClickOutside } from "./chunks/converter-
|
|
15
|
-
import { B } from "./chunks/converter-
|
|
12
|
+
import { _ as _export_sfc, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, u as undoDepth, r as redoDepth, E as Editor, e as getStarterExtensions, P as Placeholder, h as getRichTextExtensions } from "./chunks/editor-CnQI8Awl.js";
|
|
13
|
+
import { k, m, j, l } from "./chunks/editor-CnQI8Awl.js";
|
|
14
|
+
import { L as getDefaultExportFromCjs, v as v4, T as TextSelection, Q as vClickOutside } from "./chunks/converter-C7DcyS0S.js";
|
|
15
|
+
import { B } from "./chunks/converter-C7DcyS0S.js";
|
|
16
16
|
import { ref, createElementBlock, openBlock, createElementVNode, unref, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, normalizeClass, withModifiers, vModelText, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle, createVNode, h, createApp, reactive, onUnmounted, shallowRef, onBeforeUnmount, createBlock } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-
|
|
18
|
-
import { D } from "./chunks/docx-zipper-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-3FuYSu9a.js";
|
|
18
|
+
import { D } from "./chunks/docx-zipper-CZsaunAg.js";
|
|
19
19
|
import { createZip } from "./file-zipper.es.js";
|
|
20
20
|
var eventemitter3 = { exports: {} };
|
|
21
21
|
(function(module) {
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, D, E, S, a, b, c, T, d, i, g, e, f, h, j, k, l } from "./chunks/super-editor.es-
|
|
1
|
+
import { _, D, E, S, a, b, c, T, d, i, g, e, f, h, j, k, l } from "./chunks/super-editor.es-8gKNHSEh.js";
|
|
2
2
|
import "./chunks/vue-BjMDYCe1.js";
|
|
3
3
|
export {
|
|
4
4
|
_ as BasicUpload,
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as Editor, h as getRichTextExtensions, b as SuperInput, a as SuperEditor, c as SuperToolbar, d as createZip } from "./chunks/super-editor.es-
|
|
2
|
-
import { S, i, k, l } from "./chunks/super-editor.es-
|
|
1
|
+
import { E as Editor, h as getRichTextExtensions, b as SuperInput, a as SuperEditor, c as SuperToolbar, d as createZip } from "./chunks/super-editor.es-8gKNHSEh.js";
|
|
2
|
+
import { S, i, k, l } from "./chunks/super-editor.es-8gKNHSEh.js";
|
|
3
3
|
import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, C as toRef, i as inject, q as getCurrentInstance, l as watch, x as unref, a1 as hasInjectionContext, L as reactive, R as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, N as shallowRef, M as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, z as createTextVNode, F as Fragment, Q as Comment, m as defineComponent, D as provide, G as withDirectives, B as h, V as Teleport, S as renderSlot, W as isVNode, K as watchEffect, O as Transition, E as mergeProps, P as vShow, J as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, v as createVNode, y as withCtx, f as createBaseVNode, A as normalizeStyle, e as createCommentVNode, u as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, a6 as resolveDynamicComponent } from "./chunks/vue-BjMDYCe1.js";
|
|
4
4
|
import { B as Buffer$2 } from "./chunks/jszip-Df6uKve1.js";
|
|
5
5
|
import { b } from "./chunks/blank-docx-BagxM198.js";
|
|
@@ -45796,7 +45796,7 @@ class SuperDoc extends EventEmitter {
|
|
|
45796
45796
|
this.config.colors = shuffleArray(this.config.colors);
|
|
45797
45797
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45798
45798
|
this.colorIndex = 0;
|
|
45799
|
-
this.version = "0.6.
|
|
45799
|
+
this.version = "0.6.80";
|
|
45800
45800
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45801
45801
|
this.superdocId = config.superdocId || v4();
|
|
45802
45802
|
this.colors = this.config.colors;
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -27938,7 +27938,7 @@
|
|
|
27938
27938
|
return;
|
|
27939
27939
|
}
|
|
27940
27940
|
}
|
|
27941
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.
|
|
27941
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.80") {
|
|
27942
27942
|
const customLocation = "docProps/custom.xml";
|
|
27943
27943
|
if (!docx[customLocation]) {
|
|
27944
27944
|
docx[customLocation] = generateCustomXml();
|
|
@@ -28202,7 +28202,7 @@
|
|
|
28202
28202
|
function generateCustomXml() {
|
|
28203
28203
|
return DEFAULT_CUSTOM_XML;
|
|
28204
28204
|
}
|
|
28205
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.6.
|
|
28205
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.6.80") {
|
|
28206
28206
|
return {
|
|
28207
28207
|
type: "element",
|
|
28208
28208
|
name: "property",
|
|
@@ -42385,7 +42385,7 @@
|
|
|
42385
42385
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
42386
42386
|
*/
|
|
42387
42387
|
processCollaborationMigrations() {
|
|
42388
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
42388
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.80");
|
|
42389
42389
|
if (!this.options.ydoc) return;
|
|
42390
42390
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
42391
42391
|
let docVersion = metaMap.get("version");
|
|
@@ -52981,13 +52981,15 @@
|
|
|
52981
52981
|
let coords = view?.coordsAtPos(doc2.content.size);
|
|
52982
52982
|
if (!coords) return [];
|
|
52983
52983
|
doc2.descendants((node2, pos) => {
|
|
52984
|
-
|
|
52984
|
+
let currentNode = node2;
|
|
52985
|
+
let currentPos = pos;
|
|
52986
|
+
coords = view?.coordsAtPos(currentPos);
|
|
52985
52987
|
if (!coords) return;
|
|
52986
52988
|
let shouldAddPageBreak = coords.bottom > pageHeightThreshold;
|
|
52987
|
-
const isHardBreakNode =
|
|
52988
|
-
if (
|
|
52989
|
+
const isHardBreakNode = currentNode.type.name === "hardBreak";
|
|
52990
|
+
if (currentNode.type.name === "paragraph" && currentNode.attrs.styleId) {
|
|
52989
52991
|
const linkedStyles = LinkedStylesPluginKey.getState(editor.state)?.styles;
|
|
52990
|
-
const style2 = linkedStyles?.find((style22) => style22.id ===
|
|
52992
|
+
const style2 = linkedStyles?.find((style22) => style22.id === currentNode.attrs.styleId);
|
|
52991
52993
|
if (style2) {
|
|
52992
52994
|
const { definition = {} } = style2;
|
|
52993
52995
|
const { pageBreakBefore, pageBreakAfter } = definition.attrs || {};
|
|
@@ -52995,11 +52997,17 @@
|
|
|
52995
52997
|
}
|
|
52996
52998
|
}
|
|
52997
52999
|
if (isHardBreakNode || shouldAddPageBreak) {
|
|
53000
|
+
const $currentPos = view.state.doc.resolve(currentPos);
|
|
53001
|
+
const tableRow = findParentNodeClosestToPos($currentPos, (node22) => node22.type.name === "tableRow");
|
|
53002
|
+
if (tableRow) {
|
|
53003
|
+
currentNode = tableRow.node;
|
|
53004
|
+
currentPos = tableRow.pos;
|
|
53005
|
+
}
|
|
52998
53006
|
const {
|
|
52999
53007
|
top: actualBreakTop,
|
|
53000
53008
|
bottom: actualBreakBottom,
|
|
53001
53009
|
pos: breakPos
|
|
53002
|
-
} = getActualBreakCoords(view,
|
|
53010
|
+
} = getActualBreakCoords(view, currentPos, pageHeightThreshold);
|
|
53003
53011
|
currentPageNumber++;
|
|
53004
53012
|
const headerId2 = (currentPageNumber % 2 === 0 ? headerIds.even : headerIds.odd) || headerIds.default;
|
|
53005
53013
|
const footerId2 = (currentPageNumber % 2 === 0 ? footerIds.even : footerIds.odd) || footerIds.default;
|
|
@@ -110633,7 +110641,7 @@ ${style2}
|
|
|
110633
110641
|
this.config.colors = shuffleArray(this.config.colors);
|
|
110634
110642
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
110635
110643
|
this.colorIndex = 0;
|
|
110636
|
-
this.version = "0.6.
|
|
110644
|
+
this.version = "0.6.80";
|
|
110637
110645
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
110638
110646
|
this.superdocId = config.superdocId || v4();
|
|
110639
110647
|
this.colors = this.config.colors;
|