Skip to content

Commit e6e7e81

Browse files
committed
package 12.02.25
1 parent 9ce7fb7 commit e6e7e81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+676
-665
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.38.0](https://github.com/ajaxorg/ace/compare/v1.37.5...v1.38.0) (2025-02-12)
6+
7+
8+
### Features
9+
10+
* **popup:** add supporting skipFilter flag for popup item ([#5740](https://github.com/ajaxorg/ace/issues/5740)) ([0db7585](https://github.com/ajaxorg/ace/commit/0db7585ae0ccbd353091426f60ac3d9e53e182c4))
11+
12+
13+
### Bug Fixes
14+
15+
* **AcePopup:** fix aria-posinset issue on google chrome ([#5719](https://github.com/ajaxorg/ace/issues/5719)) ([09a0c5a](https://github.com/ajaxorg/ace/commit/09a0c5a11106754916a4fc324a35e8daf84055ba))
16+
* calling setMode just before destroy causes error reading getLength ([#5727](https://github.com/ajaxorg/ace/issues/5727)) ([62b973e](https://github.com/ajaxorg/ace/commit/62b973ef2247debdd51cf6a41a3b24b97277efdb))
17+
* highlight indent guides with wrapped lines ([#5621](https://github.com/ajaxorg/ace/issues/5621)) ([77b9fe1](https://github.com/ajaxorg/ace/commit/77b9fe1bc0b10b4c3fb2780d65f9d256d60634ce))
18+
* improve aria attributes of popup elements ([#5739](https://github.com/ajaxorg/ace/issues/5739)) ([09fba2e](https://github.com/ajaxorg/ace/commit/09fba2e7347cd499c979e53ec7a8d8ee1fd48918))
19+
* types for setTimeout/setInterval calls ([#5726](https://github.com/ajaxorg/ace/issues/5726)) ([9a76656](https://github.com/ajaxorg/ace/commit/9a76656acc9528a4a2e92a3b72c4d6598d3a0a8c))
20+
* **VirtualRenderer:** fix scrollbar overlap on autocompletion ([#5713](https://github.com/ajaxorg/ace/issues/5713)) ([5acea6d](https://github.com/ajaxorg/ace/commit/5acea6d9200f4ca0c8495350cda6e41e8351913f))
21+
* wrong type of paste event and missing types for themelist extension ([#5725](https://github.com/ajaxorg/ace/issues/5725)) ([a4b9d2d](https://github.com/ajaxorg/ace/commit/a4b9d2d91a2be841320030d93afde46ae723c8c3))
22+
523
### [1.37.5](https://github.com/ajaxorg/ace/compare/v1.37.4...v1.37.5) (2025-01-16)
624

725

ace.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,10 @@ declare module "ace-builds" {
422422
/**
423423
* Emitted when text is pasted.
424424
**/
425-
"paste": (text: string, event: any) => void;
425+
"paste": (e: {
426+
text: string;
427+
event?: ClipboardEvent;
428+
}) => void;
426429
/**
427430
* Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
428431
* @param data Contains one property, `data`, which indicates the new selection style
@@ -443,6 +446,7 @@ declare module "ace-builds" {
443446
"gutterclick": (e: MouseEvent) => void;
444447
"showGutterTooltip": (e: GutterTooltip) => void;
445448
"hideGutterTooltip": (e: GutterTooltip) => void;
449+
"compositionStart": () => void;
446450
}
447451
interface AcePopupEvents {
448452
"click": (e: MouseEvent) => void;
@@ -978,7 +982,7 @@ declare module "ace-builds" {
978982
import { Range } from "ace-builds-internal/range";
979983
import { UndoManager } from "ace-builds-internal/undomanager";
980984
import { VirtualRenderer as Renderer } from "ace-builds-internal/virtual_renderer";
981-
export var version: "1.37.5";
985+
export var version: "1.38.0";
982986
export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer };
983987
}
984988

demo/kitchen-sink/demo.js

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ var Mode = /** @class */ (function () {
15681568
}) + "$";
15691569
}
15701570
else {
1571-
re = "^.*\\.(" + extensions + ")$";
1571+
re = "\\.(" + extensions + ")$";
15721572
}
15731573
this.extRe = new RegExp(re, "gi");
15741574
}
@@ -4329,30 +4329,42 @@ var AcePopup = /** @class */ (function () {
43294329
setHoverMarker(row, true);
43304330
}
43314331
});
4332+
popup.renderer.on("afterRender", function () {
4333+
var t = popup.renderer.$textLayer;
4334+
for (var row = t.config.firstRow, l = t.config.lastRow; row <= l; row++) {
4335+
var popupRowElement = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]);
4336+
var rowData = popup.getData(row);
4337+
var ariaLabel = "".concat(rowData.caption || rowData.value).concat(rowData.meta ? ", ".concat(rowData.meta) : '');
4338+
popupRowElement.setAttribute("role", optionAriaRole);
4339+
popupRowElement.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item"));
4340+
popupRowElement.setAttribute("aria-label", ariaLabel);
4341+
popupRowElement.setAttribute("aria-setsize", popup.data.length);
4342+
popupRowElement.setAttribute("aria-describedby", "doc-tooltip");
4343+
popupRowElement.setAttribute("aria-posinset", row + 1);
4344+
var highlightedSpans = popupRowElement.querySelectorAll(".ace_completion-highlight");
4345+
highlightedSpans.forEach(function (span) {
4346+
span.setAttribute("role", "mark");
4347+
});
4348+
}
4349+
});
43324350
popup.renderer.on("afterRender", function () {
43334351
var row = popup.getRow();
43344352
var t = popup.renderer.$textLayer;
43354353
var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]);
43364354
var el = document.activeElement; // Active element is textarea of main editor
43374355
if (selected !== popup.selectedNode && popup.selectedNode) {
43384356
dom.removeCssClass(popup.selectedNode, "ace_selected");
4339-
el.removeAttribute("aria-activedescendant");
43404357
popup.selectedNode.removeAttribute(ariaActiveState);
43414358
popup.selectedNode.removeAttribute("id");
43424359
}
4360+
el.removeAttribute("aria-activedescendant");
43434361
popup.selectedNode = selected;
43444362
if (selected) {
4345-
dom.addCssClass(selected, "ace_selected");
43464363
var ariaId = getAriaId(row);
4364+
dom.addCssClass(selected, "ace_selected");
43474365
selected.id = ariaId;
43484366
t.element.setAttribute("aria-activedescendant", ariaId);
43494367
el.setAttribute("aria-activedescendant", ariaId);
4350-
selected.setAttribute("role", optionAriaRole);
4351-
selected.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item"));
4352-
selected.setAttribute("aria-label", popup.getData(row).caption || popup.getData(row).value);
4353-
selected.setAttribute("aria-setsize", popup.data.length);
4354-
selected.setAttribute("aria-posinset", row + 1);
4355-
selected.setAttribute("aria-describedby", "doc-tooltip");
43564368
selected.setAttribute(ariaActiveState, "true");
43574369
}
43584370
});
@@ -6504,6 +6516,10 @@ var FilteredList = /** @class */ (function () {
65046516
var upper = needle.toUpperCase();
65056517
var lower = needle.toLowerCase();
65066518
loop: for (var i = 0, item; item = items[i]; i++) {
6519+
if (item.skipFilter) {
6520+
results.push(item);
6521+
continue;
6522+
}
65076523
var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet;
65086524
if (!caption)
65096525
continue;

0 commit comments

Comments
 (0)