@ones-editor/editor 2.9.8-beta.5 → 2.9.8-beta.7
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.js
CHANGED
|
@@ -32392,11 +32392,17 @@ ${codeText}
|
|
|
32392
32392
|
this.emit("change", Array.from(this.users.values()));
|
|
32393
32393
|
}, 300);
|
|
32394
32394
|
}
|
|
32395
|
-
getSimpleCursors(blockId) {
|
|
32395
|
+
getSimpleCursors(blockId, excludeUserId) {
|
|
32396
32396
|
const ret = /* @__PURE__ */ new Map();
|
|
32397
32397
|
Array.from(this.cursors.values()).filter((message) => {
|
|
32398
32398
|
const ret2 = message.range.anchor.blockId === blockId && isSimpleRange(message.range);
|
|
32399
|
-
|
|
32399
|
+
if (!ret2) {
|
|
32400
|
+
return false;
|
|
32401
|
+
}
|
|
32402
|
+
if (excludeUserId && excludeUserId === message.user.userId) {
|
|
32403
|
+
return false;
|
|
32404
|
+
}
|
|
32405
|
+
return true;
|
|
32400
32406
|
}).forEach((message) => {
|
|
32401
32407
|
const offset = message.range.focus.offset;
|
|
32402
32408
|
let users = ret.get(offset);
|
|
@@ -40168,7 +40174,7 @@ ${codeText}
|
|
|
40168
40174
|
assert(logger$2S, typeof blockIndex === "number", "invalid path blockIndex");
|
|
40169
40175
|
const blockData = editor.doc.getBlockData(containerId, blockIndex);
|
|
40170
40176
|
const length = getTextLength(blockText);
|
|
40171
|
-
const cursorMessages = remoteUsers.getSimpleCursors(blockData.id);
|
|
40177
|
+
const cursorMessages = remoteUsers.getSimpleCursors(blockData.id, editor.doc.getUser().userId);
|
|
40172
40178
|
cursorMessages.forEach((messages, offset) => {
|
|
40173
40179
|
if (offset > length) {
|
|
40174
40180
|
offset = length;
|
|
@@ -41993,7 +41999,7 @@ ${codeText}
|
|
|
41993
41999
|
placement: (_a = options == null ? void 0 : options.placement) != null ? _a : "bottom-start",
|
|
41994
42000
|
maxWidth: (_b = this.options.maxWidth) != null ? _b : 650,
|
|
41995
42001
|
arrow: (_c = options == null ? void 0 : options.arrow) != null ? _c : this.options.tippyArrow,
|
|
41996
|
-
appendTo: document.body,
|
|
42002
|
+
appendTo: target.closest(".command-bar-container") || document.body,
|
|
41997
42003
|
onShow: this.handleShow,
|
|
41998
42004
|
onHidden: this.handleHidden,
|
|
41999
42005
|
onShown: this.handleShown,
|
|
@@ -42559,7 +42565,7 @@ ${codeText}
|
|
|
42559
42565
|
placement: (_a = options == null ? void 0 : options.placement) != null ? _a : "bottom-start",
|
|
42560
42566
|
maxWidth: 500,
|
|
42561
42567
|
arrow: this.options.tippyArrow,
|
|
42562
|
-
appendTo: document.body,
|
|
42568
|
+
appendTo: target.closest(".command-bar-container") || document.body,
|
|
42563
42569
|
onShow: this.handleShow,
|
|
42564
42570
|
onHidden: this.handleHidden,
|
|
42565
42571
|
delay: options == null ? void 0 : options.delay,
|
|
@@ -43169,7 +43175,7 @@ ${codeText}
|
|
|
43169
43175
|
placement: "bottom",
|
|
43170
43176
|
maxWidth: 1e3,
|
|
43171
43177
|
arrow: (_b = options == null ? void 0 : options.arrow) != null ? _b : this.options.tippyArrow,
|
|
43172
|
-
appendTo: document.body,
|
|
43178
|
+
appendTo: target.closest(".command-bar-container") || document.body,
|
|
43173
43179
|
onShow: this.handleShow,
|
|
43174
43180
|
onShown: this.handleShown,
|
|
43175
43181
|
onHidden: this.handleHidden,
|
|
@@ -95013,7 +95019,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95013
95019
|
}
|
|
95014
95020
|
}
|
|
95015
95021
|
});
|
|
95016
|
-
editor.version = "2.9.8-beta.
|
|
95022
|
+
editor.version = "2.9.8-beta.7";
|
|
95017
95023
|
return editor;
|
|
95018
95024
|
}
|
|
95019
95025
|
function isDoc(doc2) {
|
|
@@ -95145,7 +95151,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95145
95151
|
OnesEditorDropTarget.register(editor);
|
|
95146
95152
|
OnesEditorTocProvider.register(editor);
|
|
95147
95153
|
OnesEditorExclusiveBlock.register(editor);
|
|
95148
|
-
editor.version = "2.9.8-beta.
|
|
95154
|
+
editor.version = "2.9.8-beta.7";
|
|
95149
95155
|
return editor;
|
|
95150
95156
|
}
|
|
95151
95157
|
async function showDocVersions(editor, options, serverUrl) {
|