@fileverse-dev/ddoc 3.2.2-sg-1 → 3.2.2-sg-2
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/index.es.js +8 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -41829,8 +41829,8 @@ function Ege(e, t) {
|
|
|
41829
41829
|
s.mapping
|
|
41830
41830
|
);
|
|
41831
41831
|
if (a === null || l === null || a < 0 || l > n.doc.content.size) return !1;
|
|
41832
|
-
const { suggestionType: u, suggestedContent: c } = t;
|
|
41833
|
-
return u === "add" ? c ? e.
|
|
41832
|
+
const { suggestionType: u, suggestedContent: c } = t, d = (p) => ({ type: "text", text: p });
|
|
41833
|
+
return u === "add" ? c ? e.chain().focus().insertContentAt(a, d(c)).run() : !1 : u === "delete" ? a >= l ? !1 : e.chain().focus().deleteRange({ from: a, to: l }).run() : u === "replace" ? a >= l || !c ? !1 : e.chain().focus().deleteRange({ from: a, to: l }).insertContentAt(a, d(c)).run() : !1;
|
|
41834
41834
|
} catch {
|
|
41835
41835
|
return !1;
|
|
41836
41836
|
}
|
|
@@ -43697,7 +43697,12 @@ const dme = () => Jge((e, t) => ({
|
|
|
43697
43697
|
})), t().activeCommentId === n && s(null);
|
|
43698
43698
|
},
|
|
43699
43699
|
acceptSuggestion: (n) => {
|
|
43700
|
-
const {
|
|
43700
|
+
const {
|
|
43701
|
+
editor: r,
|
|
43702
|
+
onResolveComment: o,
|
|
43703
|
+
setActiveCommentId: i,
|
|
43704
|
+
commentAnchorsRef: s
|
|
43705
|
+
} = un(t);
|
|
43701
43706
|
if (!r) return;
|
|
43702
43707
|
const a = s == null ? void 0 : s.current.find(
|
|
43703
43708
|
(u) => u.id === n && u.isSuggestion
|