dsh-ris-ide 1.7.1 → 1.7.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.
@@ -29763,6 +29763,7 @@ globalThis.__dshRisIdeChunks__.codemirror = (require) => {
29763
29763
  searchInput.select();
29764
29764
  };
29765
29765
  const searchInput = makeInput("search", "查找");
29766
+ searchInput.setAttribute("main-field", "true");
29766
29767
  makeButton("previous", "↑", "上一个匹配(Shift+Enter)");
29767
29768
  makeButton("next", "↓", "下一个匹配(Enter)");
29768
29769
  const caseButton = makeButton("case", "Aa", "区分大小写");
@@ -29859,6 +29860,12 @@ globalThis.__dshRisIdeChunks__.codemirror = (require) => {
29859
29860
  close();
29860
29861
  }
29861
29862
  });
29863
+ dom.addEventListener("keydown", (event) => {
29864
+ if ((event.ctrlKey === true || event.metaKey === true) && event.altKey !== true && (event.key === "f" || event.key === "F")) {
29865
+ event.preventDefault();
29866
+ focusInput();
29867
+ }
29868
+ });
29862
29869
  dom.addEventListener("click", (event) => {
29863
29870
  const target = event.target;
29864
29871
  const button = target !== null && target !== void 0 && typeof target.closest === "function" ? target.closest("[data-find-action]") : null;
@@ -30048,6 +30055,17 @@ globalThis.__dshRisIdeChunks__.codemirror = (require) => {
30048
30055
  view.focus();
30049
30056
  },
30050
30057
  /**
30058
+ * Opens the IDE's find panel (or, when it is already open, puts the caret in
30059
+ * its search field): the Ctrl+F entry point for keys pressed OUTSIDE the
30060
+ * document — tabs bar, tree, workspace search box. CodeMirror's own keymap
30061
+ * only sees keys pressed inside the editor, so without this the browser's
30062
+ * find bar opened instead. `openSearchPanel` focuses our input through the
30063
+ * `main-field` attribute.
30064
+ */
30065
+ find() {
30066
+ openSearchPanel(view);
30067
+ },
30068
+ /**
30051
30069
  * Workspace content-search hand-off: open the find panel on `text` and jump
30052
30070
  * to the hit on `line` (1-based, optional).
30053
30071
  * @param {string} text - the searched text.