@harbour-enterprises/superdoc 1.5.0-next.2 → 1.5.0-next.4
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/{PdfViewer-CjfwQAWB.es.js → PdfViewer-CNp14NHv.es.js} +2 -2
- package/dist/chunks/{PdfViewer-BwvdH5n3.cjs → PdfViewer-DQXxuY1J.cjs} +2 -2
- package/dist/chunks/{SuperConverter-UBc5QZsB.es.js → SuperConverter-C1C9dtqW.es.js} +1 -1
- package/dist/chunks/{SuperConverter-CC_Varka.cjs → SuperConverter-C2G21inU.cjs} +1 -1
- package/dist/chunks/{index-D03ZjzRB.es.js → index-Be6dYM8u.es.js} +4 -4
- package/dist/chunks/{index-BHHMmDjt.cjs → index-CEzpmlwg.cjs} +51 -14
- package/dist/chunks/{index-1UViep5u.cjs → index-Cx9Sx4Ap.cjs} +4 -4
- package/dist/chunks/{index-BacPRPG2.es.js → index-QGIv94xy.es.js} +51 -14
- package/dist/super-editor/converter.cjs +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +3 -3
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +52 -15
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, c as computed, r as ref, f as onMounted, X as onUnmounted, E as createElementBlock, G as openBlock, K as createBaseVNode, M as createCommentVNode, I as createVNode, v as unref } from "./vue-BnBKJwCW.es.js";
|
|
2
|
-
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-
|
|
3
|
-
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-
|
|
2
|
+
import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-Be6dYM8u.es.js";
|
|
3
|
+
import { C as derived, r as c, q as cB, aF as fadeInTransition, y as cM, I as warnOnce, J as useConfig, N as useTheme, aG as pxfy, P as createKey, Q as useThemeClass, aH as useCompitable, ai as _export_sfc } from "./index-QGIv94xy.es.js";
|
|
4
4
|
function self(vars) {
|
|
5
5
|
const {
|
|
6
6
|
opacityDisabled,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
5
|
-
const index = require("./index-
|
|
4
|
+
const superdoc = require("./index-Cx9Sx4Ap.cjs");
|
|
5
|
+
const index = require("./index-CEzpmlwg.cjs");
|
|
6
6
|
function self(vars) {
|
|
7
7
|
const {
|
|
8
8
|
opacityDisabled,
|
|
@@ -31564,7 +31564,7 @@ class SuperConverter {
|
|
|
31564
31564
|
static getStoredSuperdocVersion(docx) {
|
|
31565
31565
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
31566
31566
|
}
|
|
31567
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.5.0-next.
|
|
31567
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.5.0-next.4") {
|
|
31568
31568
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
31569
31569
|
}
|
|
31570
31570
|
/**
|
|
@@ -31565,7 +31565,7 @@ class SuperConverter {
|
|
|
31565
31565
|
static getStoredSuperdocVersion(docx) {
|
|
31566
31566
|
return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
31567
31567
|
}
|
|
31568
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.5.0-next.
|
|
31568
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.5.0-next.4") {
|
|
31569
31569
|
return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
31570
31570
|
}
|
|
31571
31571
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-
|
|
2
|
-
import "./SuperConverter-
|
|
1
|
+
import { B as BIT8, M as MAX_SAFE_INTEGER, c as create, a as BITS7, u as utf8TextDecoder, b as create$1, s as setIfUndefined, d as create$2, f as from, e as floor$1, g as equalityDeep, w as writeVarUint, h as writeVarString, t as toUint8Array, i as createEncoder, j as createInjectionKey, k as toString, l as throwError, m as useSsrAdapter, n as configProviderInjectionKey, o as cssrAnchorMetaName, p as globalStyle, q as cB, r as c, v as isMounted, x as commonVariables$2, y as cM, z as cNotM, A as cE, C as derived, D as changeColor, E as insideModal, F as insidePopover, G as resolveWrappedSlot, H as on, I as warnOnce, J as useConfig, K as useMergedState, L as useMemo, N as useTheme, O as useRtl, P as createKey, Q as useThemeClass, R as createId, S as call, T as render, U as messageProviderInjectionKey, V as messageApiInjectionKey, W as fromBase64, X as onChange, Y as varStorage, Z as toBase64, _ as createUint8ArrayFromArrayBuffer, $ as offChange, a0 as writeVarUint8Array, a1 as map, a2 as length, a3 as isNode, a4 as min, a5 as pow, a6 as comments_module_events, a7 as getFileObject, a8 as getTrackChanges, a9 as CommentsPluginKey, aa as TrackChangesBasePluginKey, ab as Editor, ac as getRichTextExtensions, ad as ellipsisVerticalSvg, ae as xmarkIconSvg, af as checkIconSvg, ag as caretDownIconSvg, ah as commentIconSvg, ai as _export_sfc, aj as NDropdown, ak as SuperInput, al as vClickOutside, am as PresentationEditor, an as SuperEditor, ao as AIWriter, ap as NConfigProvider, aq as SuperToolbar } from "./index-QGIv94xy.es.js";
|
|
2
|
+
import "./SuperConverter-C1C9dtqW.es.js";
|
|
3
3
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
4
4
|
import { E as EventEmitter } from "./eventemitter3-CwrdEv8r.es.js";
|
|
5
5
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -7513,7 +7513,7 @@ const _sfc_main = {
|
|
|
7513
7513
|
__name: "SuperDoc",
|
|
7514
7514
|
emits: ["selection-update"],
|
|
7515
7515
|
setup(__props, { emit: __emit }) {
|
|
7516
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
7516
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CNp14NHv.es.js"));
|
|
7517
7517
|
const superdocStore = useSuperdocStore();
|
|
7518
7518
|
const commentsStore = useCommentsStore();
|
|
7519
7519
|
const {
|
|
@@ -8467,7 +8467,7 @@ class SuperDoc extends EventEmitter {
|
|
|
8467
8467
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8468
8468
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8469
8469
|
this.colorIndex = 0;
|
|
8470
|
-
this.version = "1.5.0-next.
|
|
8470
|
+
this.version = "1.5.0-next.4";
|
|
8471
8471
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8472
8472
|
this.superdocId = config.superdocId || v4();
|
|
8473
8473
|
this.colors = this.config.colors;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jszip = require("./jszip-C8_CqJxM.cjs");
|
|
3
3
|
const helpers$1 = require("./helpers-nOdwpmwb.cjs");
|
|
4
|
-
const superEditor_converter = require("./SuperConverter-
|
|
4
|
+
const superEditor_converter = require("./SuperConverter-C2G21inU.cjs");
|
|
5
5
|
const vue = require("./vue-De9wkgLl.cjs");
|
|
6
6
|
require("./jszip.min-BPh2MMAa.cjs");
|
|
7
7
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
@@ -12334,6 +12334,13 @@ const markInsertion = ({ tr, from: from3, to, user, date }) => {
|
|
|
12334
12334
|
return insertionMark;
|
|
12335
12335
|
};
|
|
12336
12336
|
const markDeletion = ({ tr, from: from3, to, user, date, id: providedId }) => {
|
|
12337
|
+
const normalizeEmail2 = (value) => typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
12338
|
+
const userEmail = normalizeEmail2(user?.email);
|
|
12339
|
+
const isOwnInsertion = (mark) => {
|
|
12340
|
+
const authorEmail = normalizeEmail2(mark?.attrs?.authorEmail);
|
|
12341
|
+
if (!authorEmail || !userEmail) return true;
|
|
12342
|
+
return authorEmail === userEmail;
|
|
12343
|
+
};
|
|
12337
12344
|
let trackedMark = findTrackedMarkBetween({
|
|
12338
12345
|
tr,
|
|
12339
12346
|
from: from3,
|
|
@@ -12362,7 +12369,8 @@ const markDeletion = ({ tr, from: from3, to, user, date, id: providedId }) => {
|
|
|
12362
12369
|
if (node.type.name.includes("table")) {
|
|
12363
12370
|
return;
|
|
12364
12371
|
}
|
|
12365
|
-
|
|
12372
|
+
const insertMark = node.marks.find((mark) => mark.type.name === superEditor_converter.TrackInsertMarkName);
|
|
12373
|
+
if (node.isInline && insertMark && isOwnInsertion(insertMark)) {
|
|
12366
12374
|
const removeStep = new superEditor_converter.ReplaceStep(
|
|
12367
12375
|
deletionMap.map(Math.max(from3, pos)),
|
|
12368
12376
|
deletionMap.map(Math.min(to, pos + node.nodeSize)),
|
|
@@ -15516,7 +15524,7 @@ const canUseDOM = () => {
|
|
|
15516
15524
|
return false;
|
|
15517
15525
|
}
|
|
15518
15526
|
};
|
|
15519
|
-
const summaryVersion = "1.5.0-next.
|
|
15527
|
+
const summaryVersion = "1.5.0-next.4";
|
|
15520
15528
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15521
15529
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15522
15530
|
function mapAttributes(attrs) {
|
|
@@ -18173,7 +18181,7 @@ class Editor extends EventEmitter {
|
|
|
18173
18181
|
* Process collaboration migrations
|
|
18174
18182
|
*/
|
|
18175
18183
|
processCollaborationMigrations() {
|
|
18176
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.5.0-next.
|
|
18184
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.5.0-next.4");
|
|
18177
18185
|
if (!this.options.ydoc) return;
|
|
18178
18186
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18179
18187
|
let docVersion = metaMap.get("version");
|
|
@@ -24288,6 +24296,9 @@ function applySdtContainerStyling(doc2, container, sdt, containerSdt, boundaryOp
|
|
|
24288
24296
|
container.dataset.sdtContainerStart = String(isStart);
|
|
24289
24297
|
container.dataset.sdtContainerEnd = String(isEnd);
|
|
24290
24298
|
container.style.overflow = "visible";
|
|
24299
|
+
if (boundaryOptions?.widthOverride != null) {
|
|
24300
|
+
container.style.width = `${boundaryOptions.widthOverride}px`;
|
|
24301
|
+
}
|
|
24291
24302
|
if (isStart) {
|
|
24292
24303
|
const labelEl = doc2.createElement("div");
|
|
24293
24304
|
labelEl.className = config.labelClassName;
|
|
@@ -24850,6 +24861,7 @@ const renderTableFragment = (deps) => {
|
|
|
24850
24861
|
fragment,
|
|
24851
24862
|
blockLookup,
|
|
24852
24863
|
context,
|
|
24864
|
+
sdtBoundary,
|
|
24853
24865
|
renderLine,
|
|
24854
24866
|
renderDrawingContent,
|
|
24855
24867
|
applyFragmentFrame,
|
|
@@ -24890,7 +24902,7 @@ const renderTableFragment = (deps) => {
|
|
|
24890
24902
|
applyFragmentFrame(container, fragment);
|
|
24891
24903
|
container.style.height = `${fragment.height}px`;
|
|
24892
24904
|
applySdtDataset(container, block.attrs?.sdt);
|
|
24893
|
-
applySdtContainerStyling(doc2, container, block.attrs?.sdt);
|
|
24905
|
+
applySdtContainerStyling(doc2, container, block.attrs?.sdt, block.attrs?.containerSdt, sdtBoundary);
|
|
24894
24906
|
container.classList.add("superdoc-table-fragment");
|
|
24895
24907
|
if (fragment.metadata?.columnBoundaries) {
|
|
24896
24908
|
const columnCount = measure.columnWidths.length;
|
|
@@ -26528,6 +26540,9 @@ class DomPainter {
|
|
|
26528
26540
|
this.updatePositionAttributes(current.element, this.currentMapping);
|
|
26529
26541
|
}
|
|
26530
26542
|
this.updateFragmentElement(current.element, fragment, contextBase.section);
|
|
26543
|
+
if (sdtBoundary?.widthOverride != null) {
|
|
26544
|
+
current.element.style.width = `${sdtBoundary.widthOverride}px`;
|
|
26545
|
+
}
|
|
26531
26546
|
current.fragment = fragment;
|
|
26532
26547
|
current.key = key2;
|
|
26533
26548
|
current.context = contextBase;
|
|
@@ -26643,7 +26658,7 @@ class DomPainter {
|
|
|
26643
26658
|
return this.renderDrawingFragment(fragment, context);
|
|
26644
26659
|
}
|
|
26645
26660
|
if (fragment.kind === "table") {
|
|
26646
|
-
return this.renderTableFragment(fragment, context);
|
|
26661
|
+
return this.renderTableFragment(fragment, context, sdtBoundary);
|
|
26647
26662
|
}
|
|
26648
26663
|
throw new Error(`DomPainter: unsupported fragment kind ${fragment.kind}`);
|
|
26649
26664
|
}
|
|
@@ -27770,7 +27785,7 @@ class DomPainter {
|
|
|
27770
27785
|
placeholder.style.border = "1px dashed rgba(15, 23, 42, 0.3)";
|
|
27771
27786
|
return placeholder;
|
|
27772
27787
|
}
|
|
27773
|
-
renderTableFragment(fragment, context) {
|
|
27788
|
+
renderTableFragment(fragment, context, sdtBoundary) {
|
|
27774
27789
|
if (!this.doc) {
|
|
27775
27790
|
throw new Error("DomPainter: document is not available");
|
|
27776
27791
|
}
|
|
@@ -27800,6 +27815,7 @@ class DomPainter {
|
|
|
27800
27815
|
fragment,
|
|
27801
27816
|
context,
|
|
27802
27817
|
blockLookup: this.blockLookup,
|
|
27818
|
+
sdtBoundary,
|
|
27803
27819
|
renderLine: renderLineForTableCell,
|
|
27804
27820
|
renderDrawingContent: renderDrawingContentForTableCell,
|
|
27805
27821
|
applyFragmentFrame: applyFragmentFrameWithSection,
|
|
@@ -29119,19 +29135,40 @@ const getFragmentSdtContainerKey = (fragment, blockLookup) => {
|
|
|
29119
29135
|
const attrs = item?.paragraph.attrs;
|
|
29120
29136
|
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
29121
29137
|
}
|
|
29138
|
+
if (fragment.kind === "table" && block.kind === "table") {
|
|
29139
|
+
const attrs = block.attrs;
|
|
29140
|
+
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
29141
|
+
}
|
|
29122
29142
|
return null;
|
|
29123
29143
|
};
|
|
29124
29144
|
const computeSdtBoundaries = (fragments, blockLookup) => {
|
|
29125
29145
|
const boundaries = /* @__PURE__ */ new Map();
|
|
29126
29146
|
const containerKeys = fragments.map((fragment) => getFragmentSdtContainerKey(fragment, blockLookup));
|
|
29127
|
-
|
|
29147
|
+
let i = 0;
|
|
29148
|
+
while (i < fragments.length) {
|
|
29128
29149
|
const currentKey = containerKeys[i];
|
|
29129
|
-
if (!currentKey)
|
|
29130
|
-
|
|
29131
|
-
|
|
29132
|
-
|
|
29133
|
-
|
|
29134
|
-
|
|
29150
|
+
if (!currentKey) {
|
|
29151
|
+
i += 1;
|
|
29152
|
+
continue;
|
|
29153
|
+
}
|
|
29154
|
+
let groupRight = fragments[i].x + fragments[i].width;
|
|
29155
|
+
let j = i;
|
|
29156
|
+
while (j + 1 < fragments.length && containerKeys[j + 1] === currentKey) {
|
|
29157
|
+
j += 1;
|
|
29158
|
+
const fragmentRight = fragments[j].x + fragments[j].width;
|
|
29159
|
+
if (fragmentRight > groupRight) {
|
|
29160
|
+
groupRight = fragmentRight;
|
|
29161
|
+
}
|
|
29162
|
+
}
|
|
29163
|
+
for (let k2 = i; k2 <= j; k2 += 1) {
|
|
29164
|
+
const fragment = fragments[k2];
|
|
29165
|
+
boundaries.set(k2, {
|
|
29166
|
+
isStart: k2 === i,
|
|
29167
|
+
isEnd: k2 === j,
|
|
29168
|
+
widthOverride: groupRight - fragment.x
|
|
29169
|
+
});
|
|
29170
|
+
}
|
|
29171
|
+
i = j + 1;
|
|
29135
29172
|
}
|
|
29136
29173
|
return boundaries;
|
|
29137
29174
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const index = require("./index-
|
|
3
|
-
require("./SuperConverter-
|
|
2
|
+
const index = require("./index-CEzpmlwg.cjs");
|
|
3
|
+
require("./SuperConverter-C2G21inU.cjs");
|
|
4
4
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
5
5
|
const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
|
|
6
6
|
const provider = require("@hocuspocus/provider");
|
|
@@ -7530,7 +7530,7 @@ const _sfc_main = {
|
|
|
7530
7530
|
__name: "SuperDoc",
|
|
7531
7531
|
emits: ["selection-update"],
|
|
7532
7532
|
setup(__props, { emit: __emit }) {
|
|
7533
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
7533
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DQXxuY1J.cjs")));
|
|
7534
7534
|
const superdocStore = useSuperdocStore();
|
|
7535
7535
|
const commentsStore = useCommentsStore();
|
|
7536
7536
|
const {
|
|
@@ -8484,7 +8484,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
8484
8484
|
this.config.colors = shuffleArray(this.config.colors);
|
|
8485
8485
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
8486
8486
|
this.colorIndex = 0;
|
|
8487
|
-
this.version = "1.5.0-next.
|
|
8487
|
+
this.version = "1.5.0-next.4";
|
|
8488
8488
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
8489
8489
|
this.superdocId = config.superdocId || uuid.v4();
|
|
8490
8490
|
this.colors = this.config.colors;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as Buffer$2 } from "./jszip-B1fkPkPJ.es.js";
|
|
2
2
|
import { t as twipsToInches, i as inchesToTwips, p as ptToTwips, l as linesToTwips, a as twipsToLines, b as pixelsToTwips, h as halfPointToPoints, c as twipsToPixels$2, d as convertSizeToCSS, e as inchesToPixels } from "./helpers-C8e9wR5l.es.js";
|
|
3
|
-
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-
|
|
3
|
+
import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, F as Fragment, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName$1, O as TrackInsertMarkName$1, Q as TrackFormatMarkName$1, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as createOoxmlResolver, a0 as translator, a1 as translator$1, a2 as resolveDocxFontFamily, a3 as combineIndentProperties, a4 as _getReferencedTableStyles, a5 as decodeRPrFromMarks, a6 as calculateResolvedParagraphProperties, a7 as encodeCSSFromPPr, a8 as encodeCSSFromRPr, a9 as generateOrderedListIndex, aa as docxNumberingHelpers, ab as InputRule, ac as insertNewRelationship, ad as kebabCase$1, ae as getUnderlineCssString } from "./SuperConverter-C1C9dtqW.es.js";
|
|
4
4
|
import { p as process$1, r as ref, C as global$1, c as computed, E as createElementBlock, F as Fragment$1, S as renderList, O as withModifiers, G as openBlock, P as normalizeClass, M as createCommentVNode, H as toDisplayString, K as createBaseVNode, U as createApp, f as onMounted, X as onUnmounted, R as withDirectives, v as unref, Y as vModelText, y as nextTick, L as normalizeStyle, u as watch, Z as withKeys, _ as createTextVNode, I as createVNode, h as h$1, $ as readonly, s as getCurrentInstance, o as onBeforeUnmount, j as reactive, b as onBeforeMount, i as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, a as provide, g as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, D as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, m as markRaw, N as createBlock, J as withCtx, a9 as useCssVars, V as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-BnBKJwCW.es.js";
|
|
5
5
|
import "./jszip.min-DCl8qkFO.es.js";
|
|
6
6
|
import { E as EventEmitter$1 } from "./eventemitter3-CwrdEv8r.es.js";
|
|
@@ -12317,6 +12317,13 @@ const markInsertion = ({ tr, from: from3, to, user, date }) => {
|
|
|
12317
12317
|
return insertionMark;
|
|
12318
12318
|
};
|
|
12319
12319
|
const markDeletion = ({ tr, from: from3, to, user, date, id: providedId }) => {
|
|
12320
|
+
const normalizeEmail2 = (value) => typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
12321
|
+
const userEmail = normalizeEmail2(user?.email);
|
|
12322
|
+
const isOwnInsertion = (mark) => {
|
|
12323
|
+
const authorEmail = normalizeEmail2(mark?.attrs?.authorEmail);
|
|
12324
|
+
if (!authorEmail || !userEmail) return true;
|
|
12325
|
+
return authorEmail === userEmail;
|
|
12326
|
+
};
|
|
12320
12327
|
let trackedMark = findTrackedMarkBetween({
|
|
12321
12328
|
tr,
|
|
12322
12329
|
from: from3,
|
|
@@ -12345,7 +12352,8 @@ const markDeletion = ({ tr, from: from3, to, user, date, id: providedId }) => {
|
|
|
12345
12352
|
if (node.type.name.includes("table")) {
|
|
12346
12353
|
return;
|
|
12347
12354
|
}
|
|
12348
|
-
|
|
12355
|
+
const insertMark = node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1);
|
|
12356
|
+
if (node.isInline && insertMark && isOwnInsertion(insertMark)) {
|
|
12349
12357
|
const removeStep = new ReplaceStep(
|
|
12350
12358
|
deletionMap.map(Math.max(from3, pos)),
|
|
12351
12359
|
deletionMap.map(Math.min(to, pos + node.nodeSize)),
|
|
@@ -15499,7 +15507,7 @@ const canUseDOM = () => {
|
|
|
15499
15507
|
return false;
|
|
15500
15508
|
}
|
|
15501
15509
|
};
|
|
15502
|
-
const summaryVersion = "1.5.0-next.
|
|
15510
|
+
const summaryVersion = "1.5.0-next.4";
|
|
15503
15511
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
15504
15512
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
15505
15513
|
function mapAttributes(attrs) {
|
|
@@ -18156,7 +18164,7 @@ class Editor extends EventEmitter {
|
|
|
18156
18164
|
* Process collaboration migrations
|
|
18157
18165
|
*/
|
|
18158
18166
|
processCollaborationMigrations() {
|
|
18159
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.5.0-next.
|
|
18167
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.5.0-next.4");
|
|
18160
18168
|
if (!this.options.ydoc) return;
|
|
18161
18169
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
18162
18170
|
let docVersion = metaMap.get("version");
|
|
@@ -24271,6 +24279,9 @@ function applySdtContainerStyling(doc2, container, sdt, containerSdt, boundaryOp
|
|
|
24271
24279
|
container.dataset.sdtContainerStart = String(isStart);
|
|
24272
24280
|
container.dataset.sdtContainerEnd = String(isEnd);
|
|
24273
24281
|
container.style.overflow = "visible";
|
|
24282
|
+
if (boundaryOptions?.widthOverride != null) {
|
|
24283
|
+
container.style.width = `${boundaryOptions.widthOverride}px`;
|
|
24284
|
+
}
|
|
24274
24285
|
if (isStart) {
|
|
24275
24286
|
const labelEl = doc2.createElement("div");
|
|
24276
24287
|
labelEl.className = config.labelClassName;
|
|
@@ -24833,6 +24844,7 @@ const renderTableFragment = (deps) => {
|
|
|
24833
24844
|
fragment,
|
|
24834
24845
|
blockLookup,
|
|
24835
24846
|
context,
|
|
24847
|
+
sdtBoundary,
|
|
24836
24848
|
renderLine,
|
|
24837
24849
|
renderDrawingContent,
|
|
24838
24850
|
applyFragmentFrame,
|
|
@@ -24873,7 +24885,7 @@ const renderTableFragment = (deps) => {
|
|
|
24873
24885
|
applyFragmentFrame(container, fragment);
|
|
24874
24886
|
container.style.height = `${fragment.height}px`;
|
|
24875
24887
|
applySdtDataset(container, block.attrs?.sdt);
|
|
24876
|
-
applySdtContainerStyling(doc2, container, block.attrs?.sdt);
|
|
24888
|
+
applySdtContainerStyling(doc2, container, block.attrs?.sdt, block.attrs?.containerSdt, sdtBoundary);
|
|
24877
24889
|
container.classList.add("superdoc-table-fragment");
|
|
24878
24890
|
if (fragment.metadata?.columnBoundaries) {
|
|
24879
24891
|
const columnCount = measure.columnWidths.length;
|
|
@@ -26511,6 +26523,9 @@ class DomPainter {
|
|
|
26511
26523
|
this.updatePositionAttributes(current.element, this.currentMapping);
|
|
26512
26524
|
}
|
|
26513
26525
|
this.updateFragmentElement(current.element, fragment, contextBase.section);
|
|
26526
|
+
if (sdtBoundary?.widthOverride != null) {
|
|
26527
|
+
current.element.style.width = `${sdtBoundary.widthOverride}px`;
|
|
26528
|
+
}
|
|
26514
26529
|
current.fragment = fragment;
|
|
26515
26530
|
current.key = key2;
|
|
26516
26531
|
current.context = contextBase;
|
|
@@ -26626,7 +26641,7 @@ class DomPainter {
|
|
|
26626
26641
|
return this.renderDrawingFragment(fragment, context);
|
|
26627
26642
|
}
|
|
26628
26643
|
if (fragment.kind === "table") {
|
|
26629
|
-
return this.renderTableFragment(fragment, context);
|
|
26644
|
+
return this.renderTableFragment(fragment, context, sdtBoundary);
|
|
26630
26645
|
}
|
|
26631
26646
|
throw new Error(`DomPainter: unsupported fragment kind ${fragment.kind}`);
|
|
26632
26647
|
}
|
|
@@ -27753,7 +27768,7 @@ class DomPainter {
|
|
|
27753
27768
|
placeholder.style.border = "1px dashed rgba(15, 23, 42, 0.3)";
|
|
27754
27769
|
return placeholder;
|
|
27755
27770
|
}
|
|
27756
|
-
renderTableFragment(fragment, context) {
|
|
27771
|
+
renderTableFragment(fragment, context, sdtBoundary) {
|
|
27757
27772
|
if (!this.doc) {
|
|
27758
27773
|
throw new Error("DomPainter: document is not available");
|
|
27759
27774
|
}
|
|
@@ -27783,6 +27798,7 @@ class DomPainter {
|
|
|
27783
27798
|
fragment,
|
|
27784
27799
|
context,
|
|
27785
27800
|
blockLookup: this.blockLookup,
|
|
27801
|
+
sdtBoundary,
|
|
27786
27802
|
renderLine: renderLineForTableCell,
|
|
27787
27803
|
renderDrawingContent: renderDrawingContentForTableCell,
|
|
27788
27804
|
applyFragmentFrame: applyFragmentFrameWithSection,
|
|
@@ -29102,19 +29118,40 @@ const getFragmentSdtContainerKey = (fragment, blockLookup) => {
|
|
|
29102
29118
|
const attrs = item?.paragraph.attrs;
|
|
29103
29119
|
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
29104
29120
|
}
|
|
29121
|
+
if (fragment.kind === "table" && block.kind === "table") {
|
|
29122
|
+
const attrs = block.attrs;
|
|
29123
|
+
return getSdtContainerKey(attrs?.sdt, attrs?.containerSdt);
|
|
29124
|
+
}
|
|
29105
29125
|
return null;
|
|
29106
29126
|
};
|
|
29107
29127
|
const computeSdtBoundaries = (fragments, blockLookup) => {
|
|
29108
29128
|
const boundaries = /* @__PURE__ */ new Map();
|
|
29109
29129
|
const containerKeys = fragments.map((fragment) => getFragmentSdtContainerKey(fragment, blockLookup));
|
|
29110
|
-
|
|
29130
|
+
let i = 0;
|
|
29131
|
+
while (i < fragments.length) {
|
|
29111
29132
|
const currentKey = containerKeys[i];
|
|
29112
|
-
if (!currentKey)
|
|
29113
|
-
|
|
29114
|
-
|
|
29115
|
-
|
|
29116
|
-
|
|
29117
|
-
|
|
29133
|
+
if (!currentKey) {
|
|
29134
|
+
i += 1;
|
|
29135
|
+
continue;
|
|
29136
|
+
}
|
|
29137
|
+
let groupRight = fragments[i].x + fragments[i].width;
|
|
29138
|
+
let j = i;
|
|
29139
|
+
while (j + 1 < fragments.length && containerKeys[j + 1] === currentKey) {
|
|
29140
|
+
j += 1;
|
|
29141
|
+
const fragmentRight = fragments[j].x + fragments[j].width;
|
|
29142
|
+
if (fragmentRight > groupRight) {
|
|
29143
|
+
groupRight = fragmentRight;
|
|
29144
|
+
}
|
|
29145
|
+
}
|
|
29146
|
+
for (let k2 = i; k2 <= j; k2 += 1) {
|
|
29147
|
+
const fragment = fragments[k2];
|
|
29148
|
+
boundaries.set(k2, {
|
|
29149
|
+
isStart: k2 === i,
|
|
29150
|
+
isEnd: k2 === j,
|
|
29151
|
+
widthOverride: groupRight - fragment.x
|
|
29152
|
+
});
|
|
29153
|
+
}
|
|
29154
|
+
i = j + 1;
|
|
29118
29155
|
}
|
|
29119
29156
|
return boundaries;
|
|
29120
29157
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../chunks/jszip-C8_CqJxM.cjs");
|
|
4
4
|
require("../chunks/helpers-nOdwpmwb.cjs");
|
|
5
|
-
const superEditor_converter = require("../chunks/SuperConverter-
|
|
5
|
+
const superEditor_converter = require("../chunks/SuperConverter-C2G21inU.cjs");
|
|
6
6
|
require("../chunks/uuid-R7L08bOx.cjs");
|
|
7
7
|
exports.SuperConverter = superEditor_converter.SuperConverter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunks/jszip-B1fkPkPJ.es.js";
|
|
2
2
|
import "../chunks/helpers-C8e9wR5l.es.js";
|
|
3
|
-
import { S } from "../chunks/SuperConverter-
|
|
3
|
+
import { S } from "../chunks/SuperConverter-C1C9dtqW.es.js";
|
|
4
4
|
import "../chunks/uuid-CjlX8hrF.es.js";
|
|
5
5
|
export {
|
|
6
6
|
S as SuperConverter
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./chunks/index-
|
|
3
|
+
const index = require("./chunks/index-CEzpmlwg.cjs");
|
|
4
4
|
const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
|
|
5
5
|
const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
|
|
6
6
|
const vue = require("./chunks/vue-De9wkgLl.cjs");
|
|
7
|
-
const superEditor_converter = require("./chunks/SuperConverter-
|
|
7
|
+
const superEditor_converter = require("./chunks/SuperConverter-C2G21inU.cjs");
|
|
8
8
|
function isNodeType(node, name) {
|
|
9
9
|
return node.type.name === name;
|
|
10
10
|
}
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ax as Node, ay as Mark } from "./chunks/index-
|
|
2
|
-
import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-
|
|
1
|
+
import { ax as Node, ay as Mark } from "./chunks/index-QGIv94xy.es.js";
|
|
2
|
+
import { ao, au, a9, ab, aw, am, av, aA, an, ak, aq, az, aa, as, aC, aE, aB, ac, aD, ar, at } from "./chunks/index-QGIv94xy.es.js";
|
|
3
3
|
import { default as default2 } from "./super-editor/docx-zipper.es.js";
|
|
4
4
|
import { createZip } from "./super-editor/file-zipper.es.js";
|
|
5
5
|
import { d as defineComponent, E as createElementBlock, G as openBlock, K as createBaseVNode } from "./chunks/vue-BnBKJwCW.es.js";
|
|
6
|
-
import { S, r } from "./chunks/SuperConverter-
|
|
6
|
+
import { S, r } from "./chunks/SuperConverter-C1C9dtqW.es.js";
|
|
7
7
|
function isNodeType(node, name) {
|
|
8
8
|
return node.type.name === name;
|
|
9
9
|
}
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./chunks/index-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
5
|
-
const superEditor_converter = require("./chunks/SuperConverter-
|
|
3
|
+
const index = require("./chunks/index-CEzpmlwg.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-Cx9Sx4Ap.cjs");
|
|
5
|
+
const superEditor_converter = require("./chunks/SuperConverter-C2G21inU.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
require("./chunks/jszip-C8_CqJxM.cjs");
|
|
8
8
|
require("./chunks/helpers-nOdwpmwb.cjs");
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-
|
|
2
|
-
import { D, H, P, S, c } from "./chunks/index-
|
|
3
|
-
import { S as S2, r } from "./chunks/SuperConverter-
|
|
1
|
+
import { au, ab, aw, av, as, a7, ac, ar, at } from "./chunks/index-QGIv94xy.es.js";
|
|
2
|
+
import { D, H, P, S, c } from "./chunks/index-Be6dYM8u.es.js";
|
|
3
|
+
import { S as S2, r } from "./chunks/SuperConverter-C1C9dtqW.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
import "./chunks/jszip-B1fkPkPJ.es.js";
|
|
6
6
|
import "./chunks/helpers-C8e9wR5l.es.js";
|