@harbour-enterprises/superdoc 2.0.0-next.15 → 2.0.0-next.17
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-BmTqUXHe.es.js → PdfViewer-CQRzCu-2.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DK5jEu1K.cjs → PdfViewer-DzwDI5pf.cjs} +1 -1
- package/dist/chunks/{index-DgGQUbNh-xpdP4M-B.cjs → index-BIDjlQex-7L6nX-aN.cjs} +1 -1
- package/dist/chunks/{index-DgGQUbNh-_ef55vRc.es.js → index-BIDjlQex-Bf32sv6E.es.js} +1 -1
- package/dist/chunks/{index-B14ZiJ2S.cjs → index-DvMw-ZFq.cjs} +3 -3
- package/dist/chunks/{index-nxK0aRdv.es.js → index-uhbxSA5H.es.js} +3 -3
- package/dist/chunks/{super-editor.es-DL9CVTke.cjs → super-editor.es-CIwVIlJ4.cjs} +57 -43
- package/dist/chunks/{super-editor.es-Ds9GHHHL.es.js → super-editor.es-CLsxHJfr.es.js} +57 -43
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BvxISp2B.js → converter-l4nIp7kP.js} +5 -5
- package/dist/super-editor/chunks/{docx-zipper-BuXfTs6z.js → docx-zipper-irtnwkO1.js} +1 -1
- package/dist/super-editor/chunks/{editor-Bgi8FGSM.js → editor-B9mTHCNJ.js} +58 -44
- package/dist/super-editor/chunks/{index-DgGQUbNh.js → index-BIDjlQex.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-C5SxMMRv.js → toolbar-Dxai0J4e.js} +2 -2
- 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/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.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +59 -45
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { y as defineComponent, A as h, P as Transition, a0 as process$1, K as watchEffect, a as computed, r as ref, j as onMounted, X as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, s as createVNode, x as unref } from "./vue-CLFbn_1r.es.js";
|
|
2
|
-
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-
|
|
2
|
+
import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-uhbxSA5H.es.js";
|
|
3
3
|
function self(vars) {
|
|
4
4
|
const {
|
|
5
5
|
opacityDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("./vue-gvuFr0vx.cjs");
|
|
4
|
-
const superdoc = require("./index-
|
|
4
|
+
const superdoc = require("./index-DvMw-ZFq.cjs");
|
|
5
5
|
function self(vars) {
|
|
6
6
|
const {
|
|
7
7
|
opacityDisabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./super-editor.es-
|
|
3
|
+
const superEditor_es = require("./super-editor.es-CIwVIlJ4.cjs");
|
|
4
4
|
const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
|
|
5
5
|
function bail(error) {
|
|
6
6
|
if (error) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-CIwVIlJ4.cjs");
|
|
3
3
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
4
4
|
const eventemitter3 = require("./eventemitter3-DIclNhoR.cjs");
|
|
5
5
|
const provider = require("@hocuspocus/provider");
|
|
@@ -17485,7 +17485,7 @@ const _sfc_main = {
|
|
|
17485
17485
|
__name: "SuperDoc",
|
|
17486
17486
|
emits: ["selection-update"],
|
|
17487
17487
|
setup(__props, { emit: __emit }) {
|
|
17488
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17488
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DzwDI5pf.cjs")));
|
|
17489
17489
|
const superdocStore = useSuperdocStore();
|
|
17490
17490
|
const commentsStore = useCommentsStore();
|
|
17491
17491
|
const {
|
|
@@ -18389,7 +18389,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18389
18389
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18390
18390
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18391
18391
|
this.colorIndex = 0;
|
|
18392
|
-
this.version = "2.0.0-next.
|
|
18392
|
+
this.version = "2.0.0-next.17";
|
|
18393
18393
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18394
18394
|
this.superdocId = config.superdocId || uuid.v4();
|
|
18395
18395
|
this.colors = this.config.colors;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-
|
|
1
|
+
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CLsxHJfr.es.js";
|
|
2
2
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
3
3
|
import { E as EventEmitter } from "./eventemitter3-D_2kqkfV.es.js";
|
|
4
4
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
@@ -17468,7 +17468,7 @@ const _sfc_main = {
|
|
|
17468
17468
|
__name: "SuperDoc",
|
|
17469
17469
|
emits: ["selection-update"],
|
|
17470
17470
|
setup(__props, { emit: __emit }) {
|
|
17471
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17471
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CQRzCu-2.es.js"));
|
|
17472
17472
|
const superdocStore = useSuperdocStore();
|
|
17473
17473
|
const commentsStore = useCommentsStore();
|
|
17474
17474
|
const {
|
|
@@ -18372,7 +18372,7 @@ class SuperDoc extends EventEmitter {
|
|
|
18372
18372
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18373
18373
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18374
18374
|
this.colorIndex = 0;
|
|
18375
|
-
this.version = "2.0.0-next.
|
|
18375
|
+
this.version = "2.0.0-next.17";
|
|
18376
18376
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18377
18377
|
this.superdocId = config.superdocId || v4();
|
|
18378
18378
|
this.colors = this.config.colors;
|
|
@@ -42467,7 +42467,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
42467
42467
|
static getStoredSuperdocVersion(docx) {
|
|
42468
42468
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42469
42469
|
}
|
|
42470
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.
|
|
42470
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.17") {
|
|
42471
42471
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42472
42472
|
}
|
|
42473
42473
|
/**
|
|
@@ -57615,6 +57615,9 @@ const findMarkPosition = (doc2, pos, markName) => {
|
|
|
57615
57615
|
return null;
|
|
57616
57616
|
}
|
|
57617
57617
|
const actualMark = start2.node.marks.find((mark) => mark.type.name === markName);
|
|
57618
|
+
if (!actualMark) {
|
|
57619
|
+
return null;
|
|
57620
|
+
}
|
|
57618
57621
|
let startIndex = $pos.index();
|
|
57619
57622
|
let startPos = $pos.start() + start2.offset;
|
|
57620
57623
|
while (startIndex > 0 && actualMark.isInSet(parent.child(startIndex - 1).marks)) {
|
|
@@ -58767,47 +58770,58 @@ function findRangeById(doc2, id) {
|
|
|
58767
58770
|
return from2 !== null && to !== null ? { from: from2, to } : null;
|
|
58768
58771
|
}
|
|
58769
58772
|
const replaceStep = ({ state: state2, tr, step, newTr, map: map22, user, date, originalStep, originalStepIndex }) => {
|
|
58770
|
-
const
|
|
58771
|
-
|
|
58772
|
-
const
|
|
58773
|
-
const
|
|
58774
|
-
|
|
58775
|
-
|
|
58776
|
-
|
|
58777
|
-
|
|
58778
|
-
|
|
58779
|
-
|
|
58780
|
-
|
|
58781
|
-
|
|
58782
|
-
|
|
58783
|
-
|
|
58784
|
-
|
|
58785
|
-
|
|
58786
|
-
|
|
58787
|
-
|
|
58788
|
-
|
|
58789
|
-
const insertedMark = markInsertion({
|
|
58790
|
-
tr: trTemp,
|
|
58791
|
-
from: newStep.from,
|
|
58792
|
-
to: mappedNewStepTo,
|
|
58793
|
-
user,
|
|
58794
|
-
date
|
|
58795
|
-
});
|
|
58796
|
-
const condensedStep = new ReplaceStep(newStep.from, newStep.to, trTemp.doc.slice(newStep.from, mappedNewStepTo));
|
|
58797
|
-
newTr.step(condensedStep);
|
|
58798
|
-
const mirrorIndex = map22.maps.length - 1;
|
|
58799
|
-
map22.appendMap(condensedStep.getMap(), mirrorIndex);
|
|
58800
|
-
if (newStep.from !== mappedNewStepTo) {
|
|
58801
|
-
meta.insertedMark = insertedMark;
|
|
58802
|
-
meta.step = condensedStep;
|
|
58773
|
+
const trTemp = state2.apply(newTr).tr;
|
|
58774
|
+
let positionTo = step.to;
|
|
58775
|
+
const probePos = Math.max(step.from, step.to - 1);
|
|
58776
|
+
const deletionSpan = findMarkPosition(trTemp.doc, probePos, TrackDeleteMarkName$1);
|
|
58777
|
+
if (deletionSpan && deletionSpan.to > positionTo) {
|
|
58778
|
+
positionTo = deletionSpan.to;
|
|
58779
|
+
}
|
|
58780
|
+
const tryInsert = (slice2) => {
|
|
58781
|
+
const insertionStep = new ReplaceStep(positionTo, positionTo, slice2, false);
|
|
58782
|
+
if (trTemp.maybeStep(insertionStep).failed) return null;
|
|
58783
|
+
return {
|
|
58784
|
+
insertedFrom: insertionStep.from,
|
|
58785
|
+
insertedTo: insertionStep.getMap().map(insertionStep.to, 1)
|
|
58786
|
+
};
|
|
58787
|
+
};
|
|
58788
|
+
const insertion = tryInsert(step.slice) || tryInsert(Slice.maxOpen(step.slice.content, true));
|
|
58789
|
+
if (!insertion) {
|
|
58790
|
+
if (!newTr.maybeStep(step).failed) {
|
|
58791
|
+
map22.appendMap(step.getMap());
|
|
58803
58792
|
}
|
|
58804
|
-
|
|
58805
|
-
|
|
58793
|
+
return;
|
|
58794
|
+
}
|
|
58795
|
+
const meta = {};
|
|
58796
|
+
const insertedMark = markInsertion({
|
|
58797
|
+
tr: trTemp,
|
|
58798
|
+
from: insertion.insertedFrom,
|
|
58799
|
+
to: insertion.insertedTo,
|
|
58800
|
+
user,
|
|
58801
|
+
date
|
|
58802
|
+
});
|
|
58803
|
+
const trackedInsertedSlice = trTemp.doc.slice(insertion.insertedFrom, insertion.insertedTo);
|
|
58804
|
+
const condensedStep = new ReplaceStep(positionTo, positionTo, trackedInsertedSlice, false);
|
|
58805
|
+
if (newTr.maybeStep(condensedStep).failed) {
|
|
58806
|
+
if (!newTr.maybeStep(step).failed) {
|
|
58807
|
+
map22.appendMap(step.getMap());
|
|
58806
58808
|
}
|
|
58809
|
+
return;
|
|
58810
|
+
}
|
|
58811
|
+
const invertStep = originalStep.invert(tr.docs[originalStepIndex]).map(map22);
|
|
58812
|
+
map22.appendMap(invertStep.getMap());
|
|
58813
|
+
const mirrorIndex = map22.maps.length - 1;
|
|
58814
|
+
map22.appendMap(condensedStep.getMap(), mirrorIndex);
|
|
58815
|
+
if (insertion.insertedFrom !== insertion.insertedTo) {
|
|
58816
|
+
meta.insertedMark = insertedMark;
|
|
58817
|
+
meta.step = condensedStep;
|
|
58818
|
+
}
|
|
58819
|
+
if (!newTr.selection.eq(trTemp.selection)) {
|
|
58820
|
+
newTr.setSelection(trTemp.selection);
|
|
58807
58821
|
}
|
|
58808
58822
|
if (step.from !== step.to) {
|
|
58809
58823
|
const {
|
|
58810
|
-
deletionMark
|
|
58824
|
+
deletionMark,
|
|
58811
58825
|
deletionMap,
|
|
58812
58826
|
nodes: deletionNodes
|
|
58813
58827
|
} = markDeletion({
|
|
@@ -58819,7 +58833,7 @@ const replaceStep = ({ state: state2, tr, step, newTr, map: map22, user, date, o
|
|
|
58819
58833
|
id: meta.insertedMark?.attrs?.id
|
|
58820
58834
|
});
|
|
58821
58835
|
meta.deletionNodes = deletionNodes;
|
|
58822
|
-
meta.deletionMark =
|
|
58836
|
+
meta.deletionMark = deletionMark;
|
|
58823
58837
|
map22.appendMapping(deletionMap);
|
|
58824
58838
|
}
|
|
58825
58839
|
newTr.setMeta(TrackChangesBasePluginKey, meta);
|
|
@@ -60640,7 +60654,7 @@ const isHeadless = (editor) => {
|
|
|
60640
60654
|
const shouldSkipNodeView = (editor) => {
|
|
60641
60655
|
return isHeadless(editor);
|
|
60642
60656
|
};
|
|
60643
|
-
const summaryVersion = "2.0.0-next.
|
|
60657
|
+
const summaryVersion = "2.0.0-next.17";
|
|
60644
60658
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
60645
60659
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
60646
60660
|
function mapAttributes(attrs) {
|
|
@@ -61429,7 +61443,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
61429
61443
|
{ default: remarkStringify },
|
|
61430
61444
|
{ default: remarkGfm }
|
|
61431
61445
|
] = await Promise.all([
|
|
61432
|
-
Promise.resolve().then(() => require("./index-
|
|
61446
|
+
Promise.resolve().then(() => require("./index-BIDjlQex-7L6nX-aN.cjs")),
|
|
61433
61447
|
Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
|
|
61434
61448
|
Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
|
|
61435
61449
|
Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
|
|
@@ -61634,7 +61648,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
61634
61648
|
* Process collaboration migrations
|
|
61635
61649
|
*/
|
|
61636
61650
|
processCollaborationMigrations() {
|
|
61637
|
-
console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.
|
|
61651
|
+
console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.17");
|
|
61638
61652
|
if (!this.options.ydoc) return;
|
|
61639
61653
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
61640
61654
|
let docVersion = metaMap.get("version");
|
|
@@ -114851,7 +114865,7 @@ const nodeResizer = (nodeNames = ["image"], editor) => {
|
|
|
114851
114865
|
document.addEventListener("mousedown", globalMousedownHandler);
|
|
114852
114866
|
scrollHandler = () => {
|
|
114853
114867
|
if (currentWrapper && resizeContainer) {
|
|
114854
|
-
updateHandlePositions(currentWrapper
|
|
114868
|
+
updateHandlePositions(currentWrapper);
|
|
114855
114869
|
}
|
|
114856
114870
|
};
|
|
114857
114871
|
window.addEventListener("scroll", scrollHandler, true);
|
|
@@ -114913,7 +114927,7 @@ const nodeResizer = (nodeNames = ["image"], editor) => {
|
|
|
114913
114927
|
}
|
|
114914
114928
|
applyStyleIsolationClass(resizeContainer);
|
|
114915
114929
|
document.body.appendChild(resizeContainer);
|
|
114916
|
-
updateHandlePositions(wrapper
|
|
114930
|
+
updateHandlePositions(wrapper);
|
|
114917
114931
|
}
|
|
114918
114932
|
function hideResizeHandles() {
|
|
114919
114933
|
if (resizeContainer?.parentNode) {
|
|
@@ -42450,7 +42450,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
42450
42450
|
static getStoredSuperdocVersion(docx) {
|
|
42451
42451
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42452
42452
|
}
|
|
42453
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.
|
|
42453
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "2.0.0-next.17") {
|
|
42454
42454
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42455
42455
|
}
|
|
42456
42456
|
/**
|
|
@@ -57598,6 +57598,9 @@ const findMarkPosition = (doc2, pos, markName) => {
|
|
|
57598
57598
|
return null;
|
|
57599
57599
|
}
|
|
57600
57600
|
const actualMark = start2.node.marks.find((mark) => mark.type.name === markName);
|
|
57601
|
+
if (!actualMark) {
|
|
57602
|
+
return null;
|
|
57603
|
+
}
|
|
57601
57604
|
let startIndex = $pos.index();
|
|
57602
57605
|
let startPos = $pos.start() + start2.offset;
|
|
57603
57606
|
while (startIndex > 0 && actualMark.isInSet(parent.child(startIndex - 1).marks)) {
|
|
@@ -58750,47 +58753,58 @@ function findRangeById(doc2, id) {
|
|
|
58750
58753
|
return from2 !== null && to !== null ? { from: from2, to } : null;
|
|
58751
58754
|
}
|
|
58752
58755
|
const replaceStep = ({ state: state2, tr, step, newTr, map: map22, user, date, originalStep, originalStepIndex }) => {
|
|
58753
|
-
const
|
|
58754
|
-
|
|
58755
|
-
const
|
|
58756
|
-
const
|
|
58757
|
-
|
|
58758
|
-
|
|
58759
|
-
|
|
58760
|
-
|
|
58761
|
-
|
|
58762
|
-
|
|
58763
|
-
|
|
58764
|
-
|
|
58765
|
-
|
|
58766
|
-
|
|
58767
|
-
|
|
58768
|
-
|
|
58769
|
-
|
|
58770
|
-
|
|
58771
|
-
|
|
58772
|
-
const insertedMark = markInsertion({
|
|
58773
|
-
tr: trTemp,
|
|
58774
|
-
from: newStep.from,
|
|
58775
|
-
to: mappedNewStepTo,
|
|
58776
|
-
user,
|
|
58777
|
-
date
|
|
58778
|
-
});
|
|
58779
|
-
const condensedStep = new ReplaceStep(newStep.from, newStep.to, trTemp.doc.slice(newStep.from, mappedNewStepTo));
|
|
58780
|
-
newTr.step(condensedStep);
|
|
58781
|
-
const mirrorIndex = map22.maps.length - 1;
|
|
58782
|
-
map22.appendMap(condensedStep.getMap(), mirrorIndex);
|
|
58783
|
-
if (newStep.from !== mappedNewStepTo) {
|
|
58784
|
-
meta.insertedMark = insertedMark;
|
|
58785
|
-
meta.step = condensedStep;
|
|
58756
|
+
const trTemp = state2.apply(newTr).tr;
|
|
58757
|
+
let positionTo = step.to;
|
|
58758
|
+
const probePos = Math.max(step.from, step.to - 1);
|
|
58759
|
+
const deletionSpan = findMarkPosition(trTemp.doc, probePos, TrackDeleteMarkName$1);
|
|
58760
|
+
if (deletionSpan && deletionSpan.to > positionTo) {
|
|
58761
|
+
positionTo = deletionSpan.to;
|
|
58762
|
+
}
|
|
58763
|
+
const tryInsert = (slice2) => {
|
|
58764
|
+
const insertionStep = new ReplaceStep(positionTo, positionTo, slice2, false);
|
|
58765
|
+
if (trTemp.maybeStep(insertionStep).failed) return null;
|
|
58766
|
+
return {
|
|
58767
|
+
insertedFrom: insertionStep.from,
|
|
58768
|
+
insertedTo: insertionStep.getMap().map(insertionStep.to, 1)
|
|
58769
|
+
};
|
|
58770
|
+
};
|
|
58771
|
+
const insertion = tryInsert(step.slice) || tryInsert(Slice.maxOpen(step.slice.content, true));
|
|
58772
|
+
if (!insertion) {
|
|
58773
|
+
if (!newTr.maybeStep(step).failed) {
|
|
58774
|
+
map22.appendMap(step.getMap());
|
|
58786
58775
|
}
|
|
58787
|
-
|
|
58788
|
-
|
|
58776
|
+
return;
|
|
58777
|
+
}
|
|
58778
|
+
const meta = {};
|
|
58779
|
+
const insertedMark = markInsertion({
|
|
58780
|
+
tr: trTemp,
|
|
58781
|
+
from: insertion.insertedFrom,
|
|
58782
|
+
to: insertion.insertedTo,
|
|
58783
|
+
user,
|
|
58784
|
+
date
|
|
58785
|
+
});
|
|
58786
|
+
const trackedInsertedSlice = trTemp.doc.slice(insertion.insertedFrom, insertion.insertedTo);
|
|
58787
|
+
const condensedStep = new ReplaceStep(positionTo, positionTo, trackedInsertedSlice, false);
|
|
58788
|
+
if (newTr.maybeStep(condensedStep).failed) {
|
|
58789
|
+
if (!newTr.maybeStep(step).failed) {
|
|
58790
|
+
map22.appendMap(step.getMap());
|
|
58789
58791
|
}
|
|
58792
|
+
return;
|
|
58793
|
+
}
|
|
58794
|
+
const invertStep = originalStep.invert(tr.docs[originalStepIndex]).map(map22);
|
|
58795
|
+
map22.appendMap(invertStep.getMap());
|
|
58796
|
+
const mirrorIndex = map22.maps.length - 1;
|
|
58797
|
+
map22.appendMap(condensedStep.getMap(), mirrorIndex);
|
|
58798
|
+
if (insertion.insertedFrom !== insertion.insertedTo) {
|
|
58799
|
+
meta.insertedMark = insertedMark;
|
|
58800
|
+
meta.step = condensedStep;
|
|
58801
|
+
}
|
|
58802
|
+
if (!newTr.selection.eq(trTemp.selection)) {
|
|
58803
|
+
newTr.setSelection(trTemp.selection);
|
|
58790
58804
|
}
|
|
58791
58805
|
if (step.from !== step.to) {
|
|
58792
58806
|
const {
|
|
58793
|
-
deletionMark
|
|
58807
|
+
deletionMark,
|
|
58794
58808
|
deletionMap,
|
|
58795
58809
|
nodes: deletionNodes
|
|
58796
58810
|
} = markDeletion({
|
|
@@ -58802,7 +58816,7 @@ const replaceStep = ({ state: state2, tr, step, newTr, map: map22, user, date, o
|
|
|
58802
58816
|
id: meta.insertedMark?.attrs?.id
|
|
58803
58817
|
});
|
|
58804
58818
|
meta.deletionNodes = deletionNodes;
|
|
58805
|
-
meta.deletionMark =
|
|
58819
|
+
meta.deletionMark = deletionMark;
|
|
58806
58820
|
map22.appendMapping(deletionMap);
|
|
58807
58821
|
}
|
|
58808
58822
|
newTr.setMeta(TrackChangesBasePluginKey, meta);
|
|
@@ -60623,7 +60637,7 @@ const isHeadless = (editor) => {
|
|
|
60623
60637
|
const shouldSkipNodeView = (editor) => {
|
|
60624
60638
|
return isHeadless(editor);
|
|
60625
60639
|
};
|
|
60626
|
-
const summaryVersion = "2.0.0-next.
|
|
60640
|
+
const summaryVersion = "2.0.0-next.17";
|
|
60627
60641
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
60628
60642
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
60629
60643
|
function mapAttributes(attrs) {
|
|
@@ -61412,7 +61426,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
61412
61426
|
{ default: remarkStringify },
|
|
61413
61427
|
{ default: remarkGfm }
|
|
61414
61428
|
] = await Promise.all([
|
|
61415
|
-
import("./index-
|
|
61429
|
+
import("./index-BIDjlQex-Bf32sv6E.es.js"),
|
|
61416
61430
|
import("./index-DRCvimau-Cw339678.es.js"),
|
|
61417
61431
|
import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
|
|
61418
61432
|
import("./index-D_sWOSiG-DE96TaT5.es.js"),
|
|
@@ -61617,7 +61631,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
61617
61631
|
* Process collaboration migrations
|
|
61618
61632
|
*/
|
|
61619
61633
|
processCollaborationMigrations() {
|
|
61620
|
-
console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.
|
|
61634
|
+
console.debug("[checkVersionMigrations] Current editor version", "2.0.0-next.17");
|
|
61621
61635
|
if (!this.options.ydoc) return;
|
|
61622
61636
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
61623
61637
|
let docVersion = metaMap.get("version");
|
|
@@ -114834,7 +114848,7 @@ const nodeResizer = (nodeNames = ["image"], editor) => {
|
|
|
114834
114848
|
document.addEventListener("mousedown", globalMousedownHandler);
|
|
114835
114849
|
scrollHandler = () => {
|
|
114836
114850
|
if (currentWrapper && resizeContainer) {
|
|
114837
|
-
updateHandlePositions(currentWrapper
|
|
114851
|
+
updateHandlePositions(currentWrapper);
|
|
114838
114852
|
}
|
|
114839
114853
|
};
|
|
114840
114854
|
window.addEventListener("scroll", scrollHandler, true);
|
|
@@ -114896,7 +114910,7 @@ const nodeResizer = (nodeNames = ["image"], editor) => {
|
|
|
114896
114910
|
}
|
|
114897
114911
|
applyStyleIsolationClass(resizeContainer);
|
|
114898
114912
|
document.body.appendChild(resizeContainer);
|
|
114899
|
-
updateHandlePositions(wrapper
|
|
114913
|
+
updateHandlePositions(wrapper);
|
|
114900
114914
|
}
|
|
114901
114915
|
function hideResizeHandles() {
|
|
114902
114916
|
if (resizeContainer?.parentNode) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-l4nIp7kP.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-B9mTHCNJ.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -42767,7 +42767,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
42767
42767
|
static getStoredSuperdocVersion(docx) {
|
|
42768
42768
|
return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42769
42769
|
}
|
|
42770
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version = "2.0.0-next.
|
|
42770
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version = "2.0.0-next.17") {
|
|
42771
42771
|
return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
|
|
42772
42772
|
}
|
|
42773
42773
|
/**
|
|
@@ -43492,10 +43492,10 @@ export {
|
|
|
43492
43492
|
v4 as a0,
|
|
43493
43493
|
TrackFormatMarkName as a1,
|
|
43494
43494
|
comments_module_events as a2,
|
|
43495
|
-
|
|
43496
|
-
|
|
43497
|
-
|
|
43498
|
-
|
|
43495
|
+
objectIncludes as a3,
|
|
43496
|
+
AddMarkStep as a4,
|
|
43497
|
+
RemoveMarkStep as a5,
|
|
43498
|
+
findMark as a6,
|
|
43499
43499
|
twipsToLines as a7,
|
|
43500
43500
|
pixelsToTwips as a8,
|
|
43501
43501
|
helpers as a9,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-l4nIp7kP.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|