@ones-editor/editor 2.2.13 → 2.2.14-beta.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/index.js CHANGED
@@ -41365,7 +41365,7 @@ ${codeText}
41365
41365
  this.menu.addListener("show", this.handleShow);
41366
41366
  this.menu.addListener("shown", this.handleShown);
41367
41367
  if (this.options.wait) {
41368
- this.handleSearchText = debounce__default.default(async (text2) => {
41368
+ this.handleSearchText = debounce__default.default((text2) => {
41369
41369
  this.handleSearchTextPure(text2);
41370
41370
  }, this.options.wait);
41371
41371
  } else {
@@ -41463,14 +41463,11 @@ ${codeText}
41463
41463
  }
41464
41464
  async handleSearchTextPure(text2) {
41465
41465
  this.currentText = text2;
41466
- const key = "auto-suggest";
41467
41466
  try {
41468
- await lockers.lock(key);
41469
41467
  this.showLoading();
41470
- const searchingText = this.currentText;
41471
41468
  const items = await this.options.queryItems(this, text2);
41472
- if (this.currentText === searchingText) {
41473
- this.currentText = "";
41469
+ if (this.currentText !== text2) {
41470
+ return;
41474
41471
  }
41475
41472
  if (items.length === 0) {
41476
41473
  this.showNoResultMessage(text2);
@@ -41478,10 +41475,9 @@ ${codeText}
41478
41475
  }
41479
41476
  this.setItems(items);
41480
41477
  if (this.options.highlight) {
41481
- this.highlightText(searchingText.replace(/^\s+|\s+$/g, ""), items);
41478
+ this.highlightText(text2.replace(/^\s+|\s+$/g, ""), items);
41482
41479
  }
41483
41480
  } finally {
41484
- lockers.release(key);
41485
41481
  }
41486
41482
  }
41487
41483
  highlightText(search, items) {
@@ -67274,7 +67270,7 @@ ${codeText}
67274
67270
  const { comment } = this;
67275
67271
  const head = createElement("div", ["comment-item-head"], this.root);
67276
67272
  const quote2 = createElement("span", ["item-head-quote"], head);
67277
- quote2.innerText = comment.abstract;
67273
+ quote2.textContent = comment.abstract;
67278
67274
  const switchContainer = createElement("span", ["item-head-switch"], head);
67279
67275
  const switchUp = createTextButton(switchContainer, GroupItemActions.SwitchUp, "up", switchUpIcon);
67280
67276
  const switchDown = createTextButton(switchContainer, GroupItemActions.SwitchDown, "down", switchDownIcon);
@@ -88348,7 +88344,7 @@ ${data2.flowchartText}
88348
88344
  }
88349
88345
  }
88350
88346
  });
88351
- editor.version = "2.2.13";
88347
+ editor.version = "2.2.14-beta.1";
88352
88348
  return editor;
88353
88349
  }
88354
88350
  function isDoc(doc2) {
@@ -88443,7 +88439,7 @@ ${data2.flowchartText}
88443
88439
  });
88444
88440
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
88445
88441
  OnesEditorToolbar.register(editor);
88446
- editor.version = "2.2.13";
88442
+ editor.version = "2.2.14-beta.1";
88447
88443
  return editor;
88448
88444
  }
88449
88445
  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.2.13",
3
+ "version": "2.2.14-beta.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",