@harbour-enterprises/superdoc 0.27.3-next.2 → 0.28.0-next.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/chunks/{PdfViewer-BjZ5mGJm.es.js → PdfViewer-9z5hlRyt.es.js} +1 -1
- package/dist/chunks/{PdfViewer-B4iIjHV0.cjs → PdfViewer-Jb55JUCS.cjs} +1 -1
- package/dist/chunks/{index-D6aLyyxJ.cjs → index-D0UvyM8m.cjs} +10 -4
- package/dist/chunks/{index-DkzQzDKS.es.js → index-DqP-8_tO.es.js} +10 -4
- package/dist/chunks/{super-editor.es-DAZHU_K5.es.js → super-editor.es-BBJIKdhr.es.js} +129 -34
- package/dist/chunks/{super-editor.es-BbpZtQLg.cjs → super-editor.es-Ca5D3ZTW.cjs} +129 -34
- package/dist/chunks/uuid-CjlX8hrF.es.js +35 -0
- package/dist/chunks/uuid-R7L08bOx.cjs +34 -0
- package/dist/components/CommentsLayer/use-comment.d.ts.map +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/stores/comments-store.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-qTrGAY0a.js → converter-AR-76siZ.js} +37 -30
- package/dist/super-editor/chunks/{docx-zipper-BRttLmZq.js → docx-zipper-DVb-VGgt.js} +1 -1
- package/dist/super-editor/chunks/{editor-DqOCeU9J.js → editor-mK_uimq6.js} +93 -5
- package/dist/super-editor/chunks/{toolbar-cZin2t1V.js → toolbar-ByoNwr7x.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/src/components/toolbar/use-toolbar-item.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/commands/getSelectionMarks.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/commands/index.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/commands/setTextSelection.d.ts +4 -0
- package/dist/super-editor/super-editor/src/extensions/comment/comments-plugin.d.ts +2 -1
- package/dist/super-editor/super-editor/src/tests/helpers/helpers.d.ts +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 +161 -62
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +5 -8
- package/dist/chunks/uuid-CQzaMNgL.cjs +0 -36
- package/dist/chunks/uuid-DIIKH5Zc.es.js +0 -37
- package/dist/images/altText_add.svg +0 -3
- package/dist/images/altText_done.svg +0 -3
- package/dist/images/annotation-check.svg +0 -11
- package/dist/images/annotation-comment.svg +0 -16
- package/dist/images/annotation-help.svg +0 -26
- package/dist/images/annotation-insert.svg +0 -10
- package/dist/images/annotation-key.svg +0 -11
- package/dist/images/annotation-newparagraph.svg +0 -11
- package/dist/images/annotation-noicon.svg +0 -7
- package/dist/images/annotation-note.svg +0 -42
- package/dist/images/annotation-paperclip.svg +0 -6
- package/dist/images/annotation-paragraph.svg +0 -16
- package/dist/images/annotation-pushpin.svg +0 -7
- package/dist/images/cursor-editorFreeHighlight.svg +0 -6
- package/dist/images/cursor-editorFreeText.svg +0 -3
- package/dist/images/cursor-editorInk.svg +0 -4
- package/dist/images/cursor-editorTextHighlight.svg +0 -8
- package/dist/images/editor-toolbar-delete.svg +0 -5
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/toolbarButton-editorHighlight.svg +0 -6
- package/dist/images/toolbarButton-menuArrow.svg +0 -3
|
@@ -11347,39 +11347,37 @@ function requireLib() {
|
|
|
11347
11347
|
}
|
|
11348
11348
|
var libExports = requireLib();
|
|
11349
11349
|
const xmljs = /* @__PURE__ */ getDefaultExportFromCjs$2(libExports);
|
|
11350
|
-
|
|
11351
|
-
|
|
11350
|
+
let getRandomValues;
|
|
11351
|
+
const rnds8 = new Uint8Array(16);
|
|
11352
11352
|
function rng() {
|
|
11353
11353
|
if (!getRandomValues) {
|
|
11354
|
-
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)
|
|
11354
|
+
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
11355
11355
|
if (!getRandomValues) {
|
|
11356
11356
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
11357
11357
|
}
|
|
11358
11358
|
}
|
|
11359
11359
|
return getRandomValues(rnds8);
|
|
11360
11360
|
}
|
|
11361
|
-
const
|
|
11362
|
-
|
|
11363
|
-
|
|
11361
|
+
const byteToHex = [];
|
|
11362
|
+
for (let i = 0; i < 256; ++i) {
|
|
11363
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
11364
11364
|
}
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
byteToHex.push((i$2 + 256).toString(16).substr(1));
|
|
11368
|
-
}
|
|
11369
|
-
function stringify(arr) {
|
|
11370
|
-
var offset2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
11371
|
-
var uuid = (byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + "-" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + "-" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + "-" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + "-" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]]).toLowerCase();
|
|
11372
|
-
if (!validate(uuid)) {
|
|
11373
|
-
throw TypeError("Stringified UUID is invalid");
|
|
11374
|
-
}
|
|
11375
|
-
return uuid;
|
|
11365
|
+
function unsafeStringify(arr, offset2 = 0) {
|
|
11366
|
+
return byteToHex[arr[offset2 + 0]] + byteToHex[arr[offset2 + 1]] + byteToHex[arr[offset2 + 2]] + byteToHex[arr[offset2 + 3]] + "-" + byteToHex[arr[offset2 + 4]] + byteToHex[arr[offset2 + 5]] + "-" + byteToHex[arr[offset2 + 6]] + byteToHex[arr[offset2 + 7]] + "-" + byteToHex[arr[offset2 + 8]] + byteToHex[arr[offset2 + 9]] + "-" + byteToHex[arr[offset2 + 10]] + byteToHex[arr[offset2 + 11]] + byteToHex[arr[offset2 + 12]] + byteToHex[arr[offset2 + 13]] + byteToHex[arr[offset2 + 14]] + byteToHex[arr[offset2 + 15]];
|
|
11376
11367
|
}
|
|
11368
|
+
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
11369
|
+
const native = {
|
|
11370
|
+
randomUUID
|
|
11371
|
+
};
|
|
11377
11372
|
function v4(options, buf, offset2) {
|
|
11373
|
+
if (native.randomUUID && true && !options) {
|
|
11374
|
+
return native.randomUUID();
|
|
11375
|
+
}
|
|
11378
11376
|
options = options || {};
|
|
11379
|
-
|
|
11377
|
+
const rnds = options.random || (options.rng || rng)();
|
|
11380
11378
|
rnds[6] = rnds[6] & 15 | 64;
|
|
11381
11379
|
rnds[8] = rnds[8] & 63 | 128;
|
|
11382
|
-
return
|
|
11380
|
+
return unsafeStringify(rnds);
|
|
11383
11381
|
}
|
|
11384
11382
|
function getDefaultExportFromCjs(x) {
|
|
11385
11383
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -14432,6 +14430,7 @@ class ParseContext {
|
|
|
14432
14430
|
addTextNode(dom, marks) {
|
|
14433
14431
|
let value = dom.nodeValue;
|
|
14434
14432
|
let top2 = this.top, preserveWS = top2.options & OPT_PRESERVE_WS_FULL ? "full" : this.localPreserveWS || (top2.options & OPT_PRESERVE_WS) > 0;
|
|
14433
|
+
let { schema } = this.parser;
|
|
14435
14434
|
if (preserveWS === "full" || top2.inlineContext(dom) || /[^ \t\r\n\u000c]/.test(value)) {
|
|
14436
14435
|
if (!preserveWS) {
|
|
14437
14436
|
value = value.replace(/[ \t\r\n\u000c]+/g, " ");
|
|
@@ -14441,13 +14440,22 @@ class ParseContext {
|
|
|
14441
14440
|
if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == "BR" || nodeBefore.isText && /[ \t\r\n\u000c]$/.test(nodeBefore.text))
|
|
14442
14441
|
value = value.slice(1);
|
|
14443
14442
|
}
|
|
14444
|
-
} else if (preserveWS
|
|
14445
|
-
value = value.replace(/\r?\n|\r/g, " ");
|
|
14446
|
-
} else {
|
|
14443
|
+
} else if (preserveWS === "full") {
|
|
14447
14444
|
value = value.replace(/\r\n?/g, "\n");
|
|
14445
|
+
} else if (schema.linebreakReplacement && /[\r\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) {
|
|
14446
|
+
let lines = value.split(/\r?\n|\r/);
|
|
14447
|
+
for (let i = 0; i < lines.length; i++) {
|
|
14448
|
+
if (i)
|
|
14449
|
+
this.insertNode(schema.linebreakReplacement.create(), marks, true);
|
|
14450
|
+
if (lines[i])
|
|
14451
|
+
this.insertNode(schema.text(lines[i]), marks, !/\S/.test(lines[i]));
|
|
14452
|
+
}
|
|
14453
|
+
value = "";
|
|
14454
|
+
} else {
|
|
14455
|
+
value = value.replace(/\r?\n|\r/g, " ");
|
|
14448
14456
|
}
|
|
14449
14457
|
if (value)
|
|
14450
|
-
this.insertNode(
|
|
14458
|
+
this.insertNode(schema.text(value), marks, !/\S/.test(value));
|
|
14451
14459
|
this.findInText(dom);
|
|
14452
14460
|
} else {
|
|
14453
14461
|
this.findInside(dom);
|
|
@@ -19007,7 +19015,6 @@ class Transaction extends Transform {
|
|
|
19007
19015
|
} else {
|
|
19008
19016
|
if (to == null)
|
|
19009
19017
|
to = from2;
|
|
19010
|
-
to = to == null ? from2 : to;
|
|
19011
19018
|
if (!text)
|
|
19012
19019
|
return this.deleteRange(from2, to);
|
|
19013
19020
|
let marks = this.storedMarks;
|
|
@@ -19016,7 +19023,7 @@ class Transaction extends Transform {
|
|
|
19016
19023
|
marks = to == from2 ? $from.marks() : $from.marksAcross(this.doc.resolve(to));
|
|
19017
19024
|
}
|
|
19018
19025
|
this.replaceRangeWith(from2, to, schema.text(text, marks));
|
|
19019
|
-
if (!this.selection.empty)
|
|
19026
|
+
if (!this.selection.empty && this.selection.to == from2 + text.length)
|
|
19020
19027
|
this.setSelection(Selection.near(this.selection.$to));
|
|
19021
19028
|
return this;
|
|
19022
19029
|
}
|
|
@@ -19208,7 +19215,7 @@ class EditorState {
|
|
|
19208
19215
|
return newInstance;
|
|
19209
19216
|
}
|
|
19210
19217
|
/**
|
|
19211
|
-
|
|
19218
|
+
Accessor that constructs and returns a new [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
|
|
19212
19219
|
*/
|
|
19213
19220
|
get tr() {
|
|
19214
19221
|
return new Transaction(this);
|
|
@@ -28261,11 +28268,11 @@ function applyColorModifier(hexColor, modifier, value) {
|
|
|
28261
28268
|
} else {
|
|
28262
28269
|
return hexColor;
|
|
28263
28270
|
}
|
|
28264
|
-
const
|
|
28271
|
+
const clamp2 = (n) => Math.max(0, Math.min(255, Math.round(n)));
|
|
28265
28272
|
const toHex2 = (n) => n.toString(16).padStart(2, "0");
|
|
28266
|
-
newR =
|
|
28267
|
-
newG =
|
|
28268
|
-
newB =
|
|
28273
|
+
newR = clamp2(newR);
|
|
28274
|
+
newG = clamp2(newG);
|
|
28275
|
+
newB = clamp2(newB);
|
|
28269
28276
|
const result = `#${toHex2(newR)}${toHex2(newG)}${toHex2(newB)}`;
|
|
28270
28277
|
return result;
|
|
28271
28278
|
}
|
|
@@ -35943,7 +35950,7 @@ exportProcessNewRelationships_fn = function(rels = []) {
|
|
|
35943
35950
|
});
|
|
35944
35951
|
relationships.elements = [...relationships.elements, ...newRels];
|
|
35945
35952
|
};
|
|
35946
|
-
exportProcessMediaFiles_fn = async function(media = {}
|
|
35953
|
+
exportProcessMediaFiles_fn = async function(media = {}) {
|
|
35947
35954
|
const processedData = {
|
|
35948
35955
|
...this.convertedXml.media || {}
|
|
35949
35956
|
};
|
|
@@ -43710,6 +43717,8 @@ function readDOMChange(view, from2, to, typeOver, addedNodes) {
|
|
|
43710
43717
|
let deflt = () => mkTr(view.state.tr.insertText(text, chFrom, chTo));
|
|
43711
43718
|
if (!view.someProp("handleTextInput", (f2) => f2(view, chFrom, chTo, text, deflt)))
|
|
43712
43719
|
view.dispatch(deflt());
|
|
43720
|
+
} else {
|
|
43721
|
+
view.dispatch(mkTr());
|
|
43713
43722
|
}
|
|
43714
43723
|
} else {
|
|
43715
43724
|
view.dispatch(mkTr());
|
|
@@ -48907,6 +48916,49 @@ const restoreSelection = () => ({ editor, state: state2, tr }) => {
|
|
|
48907
48916
|
editor.view.dispatch(selectionTr);
|
|
48908
48917
|
}
|
|
48909
48918
|
};
|
|
48919
|
+
const clamp = (value, min2, max2) => Math.max(min2, Math.min(value, max2));
|
|
48920
|
+
const setTextSelection = ({ from: from2, to }) => ({ state: state2, dispatch, editor }) => {
|
|
48921
|
+
if (typeof from2 !== "number" && typeof to !== "number") {
|
|
48922
|
+
return false;
|
|
48923
|
+
}
|
|
48924
|
+
const doc2 = state2.doc;
|
|
48925
|
+
const docSize = doc2.content.size;
|
|
48926
|
+
const nextFrom = clamp(typeof from2 === "number" ? from2 : state2.selection.from, 0, docSize);
|
|
48927
|
+
const nextToBase = typeof to === "number" ? to : nextFrom;
|
|
48928
|
+
const nextTo = clamp(nextToBase, 0, docSize);
|
|
48929
|
+
const [head, anchor] = nextFrom <= nextTo ? [nextFrom, nextTo] : [nextTo, nextFrom];
|
|
48930
|
+
const selection = TextSelection$1.create(doc2, head, anchor);
|
|
48931
|
+
if (dispatch) {
|
|
48932
|
+
const transaction = state2.tr.setSelection(selection);
|
|
48933
|
+
dispatch(transaction);
|
|
48934
|
+
}
|
|
48935
|
+
if (editor?.view?.focus) {
|
|
48936
|
+
editor.view.focus();
|
|
48937
|
+
}
|
|
48938
|
+
return true;
|
|
48939
|
+
};
|
|
48940
|
+
const getSelectionMarks = () => ({ state: state2, tr }) => {
|
|
48941
|
+
tr.setMeta("preventDispatch", true);
|
|
48942
|
+
const marks = getMarksFromSelection(state2) ?? [];
|
|
48943
|
+
const uniqueByType = /* @__PURE__ */ new Map();
|
|
48944
|
+
for (const mark of marks) {
|
|
48945
|
+
const typeName = typeof mark?.type === "string" ? mark.type : mark?.type?.name;
|
|
48946
|
+
if (!typeName) continue;
|
|
48947
|
+
const existing = uniqueByType.get(typeName);
|
|
48948
|
+
if (!existing) {
|
|
48949
|
+
uniqueByType.set(typeName, mark);
|
|
48950
|
+
continue;
|
|
48951
|
+
}
|
|
48952
|
+
const existingAttrs = existing?.attrs ?? {};
|
|
48953
|
+
const nextAttrs = mark?.attrs ?? {};
|
|
48954
|
+
const existingHasValues = Object.values(existingAttrs).some((value) => value != null);
|
|
48955
|
+
const nextHasValues = Object.values(nextAttrs).some((value) => value != null);
|
|
48956
|
+
if (!existingHasValues && nextHasValues) {
|
|
48957
|
+
uniqueByType.set(typeName, mark);
|
|
48958
|
+
}
|
|
48959
|
+
}
|
|
48960
|
+
return Array.from(uniqueByType.values());
|
|
48961
|
+
};
|
|
48910
48962
|
const commands$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
48911
48963
|
__proto__: null,
|
|
48912
48964
|
atVisualParaEnd,
|
|
@@ -48922,6 +48974,7 @@ const commands$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
48922
48974
|
first,
|
|
48923
48975
|
getEffectiveStyleId,
|
|
48924
48976
|
getParaCtx,
|
|
48977
|
+
getSelectionMarks,
|
|
48925
48978
|
getStyleIdFromMarks,
|
|
48926
48979
|
handleBackspaceNextToList,
|
|
48927
48980
|
handleDeleteNextToList,
|
|
@@ -48953,6 +49006,7 @@ const commands$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
48953
49006
|
setMark,
|
|
48954
49007
|
setMeta,
|
|
48955
49008
|
setNode,
|
|
49009
|
+
setTextSelection,
|
|
48956
49010
|
sinkListItem,
|
|
48957
49011
|
splitBlock: splitBlock$1,
|
|
48958
49012
|
splitListItem,
|
|
@@ -49617,6 +49671,7 @@ const markInsertion = ({ tr, from: from2, to, user, date }) => {
|
|
|
49617
49671
|
id,
|
|
49618
49672
|
author: user.name,
|
|
49619
49673
|
authorEmail: user.email,
|
|
49674
|
+
authorImage: user.image,
|
|
49620
49675
|
date
|
|
49621
49676
|
});
|
|
49622
49677
|
tr.addMark(from2, to, insertionMark);
|
|
@@ -49653,6 +49708,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
|
|
|
49653
49708
|
id,
|
|
49654
49709
|
author: user.name,
|
|
49655
49710
|
authorEmail: user.email,
|
|
49711
|
+
authorImage: user.image,
|
|
49656
49712
|
date
|
|
49657
49713
|
});
|
|
49658
49714
|
const deletionMap = new Mapping();
|
|
@@ -50349,6 +50405,9 @@ const normalizeCommentEventPayload = ({ conversation, editorOptions, fallbackCom
|
|
|
50349
50405
|
if (!normalized.creatorEmail && user?.email) {
|
|
50350
50406
|
normalized.creatorEmail = user.email;
|
|
50351
50407
|
}
|
|
50408
|
+
if (!normalized.creatorImage && user?.image) {
|
|
50409
|
+
normalized.creatorImage = user.image;
|
|
50410
|
+
}
|
|
50352
50411
|
if (!normalized.createdTime) {
|
|
50353
50412
|
normalized.createdTime = Date.now();
|
|
50354
50413
|
}
|
|
@@ -50807,7 +50866,7 @@ const createOrUpdateTrackedChangeComment = ({ event, marks, deletionNodes, nodes
|
|
|
50807
50866
|
const trackedMark = marks.insertedMark || marks.deletionMark || marks.formatMark;
|
|
50808
50867
|
const { type: type2, attrs } = trackedMark;
|
|
50809
50868
|
const { name: trackedChangeType } = type2;
|
|
50810
|
-
const { author, authorEmail, date, importedAuthor } = attrs;
|
|
50869
|
+
const { author, authorEmail, authorImage, date, importedAuthor } = attrs;
|
|
50811
50870
|
const id = attrs.id;
|
|
50812
50871
|
const node = nodes[0];
|
|
50813
50872
|
const isDeletionInsertion = !!(marks.insertedMark && marks.deletionMark);
|
|
@@ -50838,6 +50897,7 @@ const createOrUpdateTrackedChangeComment = ({ event, marks, deletionNodes, nodes
|
|
|
50838
50897
|
deletedText: marks.deletionMark ? deletionText : null,
|
|
50839
50898
|
author,
|
|
50840
50899
|
authorEmail,
|
|
50900
|
+
...authorImage && { authorImage },
|
|
50841
50901
|
date,
|
|
50842
50902
|
...importedAuthor && {
|
|
50843
50903
|
importedAuthor: {
|
|
@@ -50982,6 +51042,7 @@ const addMarkStep = ({ state: state2, step, newTr, doc: doc2, user, date }) => {
|
|
|
50982
51042
|
id: wid,
|
|
50983
51043
|
author: user.name,
|
|
50984
51044
|
authorEmail: user.email,
|
|
51045
|
+
authorImage: user.image,
|
|
50985
51046
|
date,
|
|
50986
51047
|
before,
|
|
50987
51048
|
after
|
|
@@ -51047,6 +51108,7 @@ const removeMarkStep = ({ state: state2, step, newTr, doc: doc2, user, date }) =
|
|
|
51047
51108
|
id: v4(),
|
|
51048
51109
|
author: user.name,
|
|
51049
51110
|
authorEmail: user.email,
|
|
51111
|
+
authorImage: user.image,
|
|
51050
51112
|
date,
|
|
51051
51113
|
before,
|
|
51052
51114
|
after
|
|
@@ -55046,6 +55108,9 @@ class GapBookmark {
|
|
|
55046
55108
|
return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);
|
|
55047
55109
|
}
|
|
55048
55110
|
}
|
|
55111
|
+
function needsGap(type2) {
|
|
55112
|
+
return type2.isAtom || type2.spec.isolating || type2.spec.createGapCursor;
|
|
55113
|
+
}
|
|
55049
55114
|
function closedBefore($pos) {
|
|
55050
55115
|
for (let d2 = $pos.depth; d2 >= 0; d2--) {
|
|
55051
55116
|
let index2 = $pos.index(d2), parent = $pos.node(d2);
|
|
@@ -55055,7 +55120,7 @@ function closedBefore($pos) {
|
|
|
55055
55120
|
continue;
|
|
55056
55121
|
}
|
|
55057
55122
|
for (let before = parent.child(index2 - 1); ; before = before.lastChild) {
|
|
55058
|
-
if (before.childCount == 0 && !before.inlineContent || before.
|
|
55123
|
+
if (before.childCount == 0 && !before.inlineContent || needsGap(before.type))
|
|
55059
55124
|
return true;
|
|
55060
55125
|
if (before.inlineContent)
|
|
55061
55126
|
return false;
|
|
@@ -55072,7 +55137,7 @@ function closedAfter($pos) {
|
|
|
55072
55137
|
continue;
|
|
55073
55138
|
}
|
|
55074
55139
|
for (let after = parent.child(index2); ; after = after.firstChild) {
|
|
55075
|
-
if (after.childCount == 0 && !after.inlineContent || after.
|
|
55140
|
+
if (after.childCount == 0 && !after.inlineContent || needsGap(after.type))
|
|
55076
55141
|
return true;
|
|
55077
55142
|
if (after.inlineContent)
|
|
55078
55143
|
return false;
|
|
@@ -69957,6 +70022,16 @@ const TrackInsert = Mark2.create({
|
|
|
69957
70022
|
};
|
|
69958
70023
|
}
|
|
69959
70024
|
},
|
|
70025
|
+
authorImage: {
|
|
70026
|
+
default: "",
|
|
70027
|
+
parseDOM: (elem) => elem.getAttribute("data-authorimage"),
|
|
70028
|
+
renderDOM: (attrs) => {
|
|
70029
|
+
if (!attrs.authorImage) return {};
|
|
70030
|
+
return {
|
|
70031
|
+
"data-authorimage": attrs.authorImage
|
|
70032
|
+
};
|
|
70033
|
+
}
|
|
70034
|
+
},
|
|
69960
70035
|
date: {
|
|
69961
70036
|
default: "",
|
|
69962
70037
|
parseDOM: (elem) => elem.getAttribute("data-date"),
|
|
@@ -70024,6 +70099,16 @@ const TrackDelete = Mark2.create({
|
|
|
70024
70099
|
};
|
|
70025
70100
|
}
|
|
70026
70101
|
},
|
|
70102
|
+
authorImage: {
|
|
70103
|
+
default: "",
|
|
70104
|
+
parseDOM: (elem) => elem.getAttribute("data-authorimage"),
|
|
70105
|
+
renderDOM: (attrs) => {
|
|
70106
|
+
if (!attrs.authorImage) return {};
|
|
70107
|
+
return {
|
|
70108
|
+
"data-authorimage": attrs.authorImage
|
|
70109
|
+
};
|
|
70110
|
+
}
|
|
70111
|
+
},
|
|
70027
70112
|
date: {
|
|
70028
70113
|
default: "",
|
|
70029
70114
|
parseDOM: (elem) => elem.getAttribute("data-date"),
|
|
@@ -70123,6 +70208,16 @@ const TrackFormat = Mark2.create({
|
|
|
70123
70208
|
};
|
|
70124
70209
|
}
|
|
70125
70210
|
},
|
|
70211
|
+
authorImage: {
|
|
70212
|
+
default: "",
|
|
70213
|
+
parseDOM: (elem) => elem.getAttribute("data-authorimage"),
|
|
70214
|
+
renderDOM: (attrs) => {
|
|
70215
|
+
if (!attrs.authorImage) return {};
|
|
70216
|
+
return {
|
|
70217
|
+
"data-authorimage": attrs.authorImage
|
|
70218
|
+
};
|
|
70219
|
+
}
|
|
70220
|
+
},
|
|
70126
70221
|
date: {
|
|
70127
70222
|
default: "",
|
|
70128
70223
|
parseDOM: (elem) => elem.getAttribute("data-date"),
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
let getRandomValues;
|
|
2
|
+
const rnds8 = new Uint8Array(16);
|
|
3
|
+
function rng() {
|
|
4
|
+
if (!getRandomValues) {
|
|
5
|
+
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
6
|
+
if (!getRandomValues) {
|
|
7
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return getRandomValues(rnds8);
|
|
11
|
+
}
|
|
12
|
+
const byteToHex = [];
|
|
13
|
+
for (let i = 0; i < 256; ++i) {
|
|
14
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
15
|
+
}
|
|
16
|
+
function unsafeStringify(arr, offset = 0) {
|
|
17
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
18
|
+
}
|
|
19
|
+
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
20
|
+
const native = {
|
|
21
|
+
randomUUID
|
|
22
|
+
};
|
|
23
|
+
function v4(options, buf, offset) {
|
|
24
|
+
if (native.randomUUID && true && !options) {
|
|
25
|
+
return native.randomUUID();
|
|
26
|
+
}
|
|
27
|
+
options = options || {};
|
|
28
|
+
const rnds = options.random || (options.rng || rng)();
|
|
29
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
30
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
31
|
+
return unsafeStringify(rnds);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
v4 as v
|
|
35
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
let getRandomValues;
|
|
3
|
+
const rnds8 = new Uint8Array(16);
|
|
4
|
+
function rng() {
|
|
5
|
+
if (!getRandomValues) {
|
|
6
|
+
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
7
|
+
if (!getRandomValues) {
|
|
8
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return getRandomValues(rnds8);
|
|
12
|
+
}
|
|
13
|
+
const byteToHex = [];
|
|
14
|
+
for (let i = 0; i < 256; ++i) {
|
|
15
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
16
|
+
}
|
|
17
|
+
function unsafeStringify(arr, offset = 0) {
|
|
18
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
19
|
+
}
|
|
20
|
+
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
21
|
+
const native = {
|
|
22
|
+
randomUUID
|
|
23
|
+
};
|
|
24
|
+
function v4(options, buf, offset) {
|
|
25
|
+
if (native.randomUUID && true && !options) {
|
|
26
|
+
return native.randomUUID();
|
|
27
|
+
}
|
|
28
|
+
options = options || {};
|
|
29
|
+
const rnds = options.random || (options.rng || rng)();
|
|
30
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
31
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
32
|
+
return unsafeStringify(rnds);
|
|
33
|
+
}
|
|
34
|
+
exports.v4 = v4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-comment.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/use-comment.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"use-comment.d.ts","sourceRoot":"","sources":["../../../src/components/CommentsLayer/use-comment.js"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,qDAkRC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;YACN,MAAM,GAAG,IAAI;;;;;;;;;cAKb,OAAO;;;;iBACP,MAAM;;;;eACN,MAAM;;;;sBACN,MAAM;;;;;;SAKN,MAAM;;;;UACN,MAAM;;;;WACN,IAAI,GAAG,IAAI,GAAG,IAAI;;;;WAClB,MAAM;;;;UACN,MAAM;;;;gBACN,OAAO;;;;WACP,OAAO,KAAK,EAAE,GAAG;;;;eACjB,OAAO,sBAAsB,EAAE,kBAAkB;;;;;;eAM5D;QAQqC,kBAAkB,GAR5C,CAAC,MAAM,EAAE;YAClB,UAAU,EAAE,MAAM,CAAC;YACnB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,UAAU,CAAC,EAAE,OAAO,CAAC;YACrB,OAAO,CAAC,EAAE,MAAS,IAAI,CAAC;YACxB,aAAa,CAAC,EAAE,MAAS,IAAI,CAAC;YAC9B,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;YAC1B,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;SAC5B,KAAK,OAAO,GAAG,SAAS;KACzB;;;;SACA;QAAuB,MAAM,GAAlB,MAAM;QACM,QAAQ,GAApB,MAAM;KACjB;;;;;;;;;;;;gBAGA;QAA6B,WAAW;QACR,YAAY;QACb,mBAAmB,GAAvC,OAAO;KACpB;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.js"],"names":[],"mappings":";;;;;;;UAEc,MAAM;;;;WACN,MAAM;;;;YACN,MAAM,GAAG,IAAI;;;;;;;;;cAKb,OAAO;;;;iBACP,MAAM;;;;eACN,MAAM;;;;sBACN,MAAM;;;;;;SAKN,MAAM;;;;UACN,MAAM;;;;WACN,IAAI,GAAG,IAAI,GAAG,IAAI;;;;WAClB,MAAM;;;;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AM,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,MAAM,QAAO;KAAE,KAAK,IAAI;;;;eACtD,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE,KAAK,IAAI;;;;yBACvD,MAAM,IAAI;;;;sBACV,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;;;;2BAC3B,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;qBACpC,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;;;;kBACpC,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,KAAK,IAAI;;;;2BAClC,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;;;;8BACzC,CAAC,MAAM,EAAE,EAAE,KAAC,GAAA;;;;aACZ,MAAM;;;;uBACN,KAAQ;;;;iBACR,OAAO;;;;YACP,MAAM;;;;oBACN,KAAQ;;;;eACR,OAAO;;;;wBACP,CAAS,IAAI,EAAJ,IAAI,KAAG,OAAO,CAAC,MAAM,CAAC;;;;eAC/B,IAAI;;;;aACJ,OAAO;;;;gCACP,OAAO;;;;;;;;yBAEP,OAAO;;;;WACP,MAAM;;;;eACN,MAAM;;;;cACN,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA4Ce,IAAI;qBAiBN,MAAM;0CAWN,MAAM,GAAG,SAAS,GAAG,IAAI,KACvB,IAAI;;;;;;
|
|
1
|
+
{"version":3,"file":"comments-store.d.ts","sourceRoot":"","sources":["../../src/stores/comments-store.js"],"names":[],"mappings":"AAeA;;;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
|
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-AR-76siZ.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-mK_uimq6.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 = {}) {
|
|
@@ -18,9 +18,9 @@ var lookup = [];
|
|
|
18
18
|
var revLookup = [];
|
|
19
19
|
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
20
20
|
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
21
|
-
for (var i
|
|
22
|
-
lookup[i
|
|
23
|
-
revLookup[code.charCodeAt(i
|
|
21
|
+
for (var i = 0, len = code.length; i < len; ++i) {
|
|
22
|
+
lookup[i] = code[i];
|
|
23
|
+
revLookup[code.charCodeAt(i)] = i;
|
|
24
24
|
}
|
|
25
25
|
revLookup["-".charCodeAt(0)] = 62;
|
|
26
26
|
revLookup["_".charCodeAt(0)] = 63;
|
|
@@ -11328,39 +11328,37 @@ function requireLib() {
|
|
|
11328
11328
|
}
|
|
11329
11329
|
var libExports = requireLib();
|
|
11330
11330
|
const xmljs = /* @__PURE__ */ getDefaultExportFromCjs$2(libExports);
|
|
11331
|
-
|
|
11332
|
-
|
|
11331
|
+
let getRandomValues;
|
|
11332
|
+
const rnds8 = new Uint8Array(16);
|
|
11333
11333
|
function rng() {
|
|
11334
11334
|
if (!getRandomValues) {
|
|
11335
|
-
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)
|
|
11335
|
+
getRandomValues = typeof crypto !== "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
11336
11336
|
if (!getRandomValues) {
|
|
11337
11337
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
11338
11338
|
}
|
|
11339
11339
|
}
|
|
11340
11340
|
return getRandomValues(rnds8);
|
|
11341
11341
|
}
|
|
11342
|
-
const
|
|
11343
|
-
|
|
11344
|
-
|
|
11342
|
+
const byteToHex = [];
|
|
11343
|
+
for (let i = 0; i < 256; ++i) {
|
|
11344
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
11345
11345
|
}
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
byteToHex.push((i + 256).toString(16).substr(1));
|
|
11349
|
-
}
|
|
11350
|
-
function stringify(arr) {
|
|
11351
|
-
var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
11352
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
11353
|
-
if (!validate(uuid)) {
|
|
11354
|
-
throw TypeError("Stringified UUID is invalid");
|
|
11355
|
-
}
|
|
11356
|
-
return uuid;
|
|
11346
|
+
function unsafeStringify(arr, offset = 0) {
|
|
11347
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
11357
11348
|
}
|
|
11349
|
+
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
11350
|
+
const native = {
|
|
11351
|
+
randomUUID
|
|
11352
|
+
};
|
|
11358
11353
|
function v4(options, buf, offset) {
|
|
11354
|
+
if (native.randomUUID && true && !options) {
|
|
11355
|
+
return native.randomUUID();
|
|
11356
|
+
}
|
|
11359
11357
|
options = options || {};
|
|
11360
|
-
|
|
11358
|
+
const rnds = options.random || (options.rng || rng)();
|
|
11361
11359
|
rnds[6] = rnds[6] & 15 | 64;
|
|
11362
11360
|
rnds[8] = rnds[8] & 63 | 128;
|
|
11363
|
-
return
|
|
11361
|
+
return unsafeStringify(rnds);
|
|
11364
11362
|
}
|
|
11365
11363
|
function getDefaultExportFromCjs(x) {
|
|
11366
11364
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -14413,6 +14411,7 @@ class ParseContext {
|
|
|
14413
14411
|
addTextNode(dom, marks) {
|
|
14414
14412
|
let value = dom.nodeValue;
|
|
14415
14413
|
let top = this.top, preserveWS = top.options & OPT_PRESERVE_WS_FULL ? "full" : this.localPreserveWS || (top.options & OPT_PRESERVE_WS) > 0;
|
|
14414
|
+
let { schema } = this.parser;
|
|
14416
14415
|
if (preserveWS === "full" || top.inlineContext(dom) || /[^ \t\r\n\u000c]/.test(value)) {
|
|
14417
14416
|
if (!preserveWS) {
|
|
14418
14417
|
value = value.replace(/[ \t\r\n\u000c]+/g, " ");
|
|
@@ -14422,13 +14421,22 @@ class ParseContext {
|
|
|
14422
14421
|
if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == "BR" || nodeBefore.isText && /[ \t\r\n\u000c]$/.test(nodeBefore.text))
|
|
14423
14422
|
value = value.slice(1);
|
|
14424
14423
|
}
|
|
14425
|
-
} else if (preserveWS
|
|
14426
|
-
value = value.replace(/\r?\n|\r/g, " ");
|
|
14427
|
-
} else {
|
|
14424
|
+
} else if (preserveWS === "full") {
|
|
14428
14425
|
value = value.replace(/\r\n?/g, "\n");
|
|
14426
|
+
} else if (schema.linebreakReplacement && /[\r\n]/.test(value) && this.top.findWrapping(schema.linebreakReplacement.create())) {
|
|
14427
|
+
let lines = value.split(/\r?\n|\r/);
|
|
14428
|
+
for (let i = 0; i < lines.length; i++) {
|
|
14429
|
+
if (i)
|
|
14430
|
+
this.insertNode(schema.linebreakReplacement.create(), marks, true);
|
|
14431
|
+
if (lines[i])
|
|
14432
|
+
this.insertNode(schema.text(lines[i]), marks, !/\S/.test(lines[i]));
|
|
14433
|
+
}
|
|
14434
|
+
value = "";
|
|
14435
|
+
} else {
|
|
14436
|
+
value = value.replace(/\r?\n|\r/g, " ");
|
|
14429
14437
|
}
|
|
14430
14438
|
if (value)
|
|
14431
|
-
this.insertNode(
|
|
14439
|
+
this.insertNode(schema.text(value), marks, !/\S/.test(value));
|
|
14432
14440
|
this.findInText(dom);
|
|
14433
14441
|
} else {
|
|
14434
14442
|
this.findInside(dom);
|
|
@@ -18988,7 +18996,6 @@ class Transaction extends Transform {
|
|
|
18988
18996
|
} else {
|
|
18989
18997
|
if (to == null)
|
|
18990
18998
|
to = from;
|
|
18991
|
-
to = to == null ? from : to;
|
|
18992
18999
|
if (!text)
|
|
18993
19000
|
return this.deleteRange(from, to);
|
|
18994
19001
|
let marks = this.storedMarks;
|
|
@@ -18997,7 +19004,7 @@ class Transaction extends Transform {
|
|
|
18997
19004
|
marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));
|
|
18998
19005
|
}
|
|
18999
19006
|
this.replaceRangeWith(from, to, schema.text(text, marks));
|
|
19000
|
-
if (!this.selection.empty)
|
|
19007
|
+
if (!this.selection.empty && this.selection.to == from + text.length)
|
|
19001
19008
|
this.setSelection(Selection.near(this.selection.$to));
|
|
19002
19009
|
return this;
|
|
19003
19010
|
}
|
|
@@ -19189,7 +19196,7 @@ class EditorState {
|
|
|
19189
19196
|
return newInstance;
|
|
19190
19197
|
}
|
|
19191
19198
|
/**
|
|
19192
|
-
|
|
19199
|
+
Accessor that constructs and returns a new [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
|
|
19193
19200
|
*/
|
|
19194
19201
|
get tr() {
|
|
19195
19202
|
return new Transaction(this);
|
|
@@ -35936,7 +35943,7 @@ exportProcessNewRelationships_fn = function(rels = []) {
|
|
|
35936
35943
|
});
|
|
35937
35944
|
relationships.elements = [...relationships.elements, ...newRels];
|
|
35938
35945
|
};
|
|
35939
|
-
exportProcessMediaFiles_fn = async function(media = {}
|
|
35946
|
+
exportProcessMediaFiles_fn = async function(media = {}) {
|
|
35940
35947
|
const processedData = {
|
|
35941
35948
|
...this.convertedXml.media || {}
|
|
35942
35949
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-
|
|
1
|
+
import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-AR-76siZ.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
|
}
|