@dxos/react-ui-editor 0.4.1-main.2495eb8 → 0.4.1-main.31058a6
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/lib/browser/index.mjs +7 -2
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/extensions/comments.d.ts +7 -2
- package/dist/types/src/extensions/comments.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/extensions/comments.ts +4 -4
|
@@ -1265,7 +1265,10 @@ var trackPastedComments = (onUpdate) => {
|
|
|
1265
1265
|
const exists = comments2.some((c) => c.comment.id === comment.id && c.range.from < c.range.to);
|
|
1266
1266
|
if (!exists) {
|
|
1267
1267
|
const cursor = Cursor.getCursorFromRange(update2.state, comment);
|
|
1268
|
-
onUpdate(
|
|
1268
|
+
onUpdate({
|
|
1269
|
+
id: comment.id,
|
|
1270
|
+
cursor
|
|
1271
|
+
});
|
|
1269
1272
|
}
|
|
1270
1273
|
}
|
|
1271
1274
|
})
|
|
@@ -1378,7 +1381,9 @@ var comments = (options = {}) => {
|
|
|
1378
1381
|
if (from2 === to2) {
|
|
1379
1382
|
const newRange = Cursor.getRangeFromCursor(view.state, comment.cursor);
|
|
1380
1383
|
if (!newRange || newRange.to - newRange.from === 0) {
|
|
1381
|
-
options.onDelete?.(
|
|
1384
|
+
options.onDelete?.({
|
|
1385
|
+
id: comment.id
|
|
1386
|
+
});
|
|
1382
1387
|
}
|
|
1383
1388
|
}
|
|
1384
1389
|
if (from <= range.to) {
|