@ones-editor/editor 2.9.8-beta.5 → 2.9.8-beta.6

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
- return ret2;
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;
@@ -95013,7 +95019,7 @@ ${JSON.stringify(error2, null, 2)}`);
95013
95019
  }
95014
95020
  }
95015
95021
  });
95016
- editor.version = "2.9.8-beta.5";
95022
+ editor.version = "2.9.8-beta.6";
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.5";
95154
+ editor.version = "2.9.8-beta.6";
95149
95155
  return editor;
95150
95156
  }
95151
95157
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.9.8-beta.5",
3
+ "version": "2.9.8-beta.6",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {