Skip to content

Commit

Permalink
package 12.02.25
Browse files Browse the repository at this point in the history
  • Loading branch information
nlujjawal committed Feb 12, 2025
1 parent 9ce7fb7 commit e6e7e81
Show file tree
Hide file tree
Showing 52 changed files with 676 additions and 665 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

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.

## [1.38.0](https://github.com/ajaxorg/ace/compare/v1.37.5...v1.38.0) (2025-02-12)


### Features

* **popup:** add supporting skipFilter flag for popup item ([#5740](https://github.com/ajaxorg/ace/issues/5740)) ([0db7585](https://github.com/ajaxorg/ace/commit/0db7585ae0ccbd353091426f60ac3d9e53e182c4))


### Bug Fixes

* **AcePopup:** fix aria-posinset issue on google chrome ([#5719](https://github.com/ajaxorg/ace/issues/5719)) ([09a0c5a](https://github.com/ajaxorg/ace/commit/09a0c5a11106754916a4fc324a35e8daf84055ba))
* 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))
* highlight indent guides with wrapped lines ([#5621](https://github.com/ajaxorg/ace/issues/5621)) ([77b9fe1](https://github.com/ajaxorg/ace/commit/77b9fe1bc0b10b4c3fb2780d65f9d256d60634ce))
* improve aria attributes of popup elements ([#5739](https://github.com/ajaxorg/ace/issues/5739)) ([09fba2e](https://github.com/ajaxorg/ace/commit/09fba2e7347cd499c979e53ec7a8d8ee1fd48918))
* types for setTimeout/setInterval calls ([#5726](https://github.com/ajaxorg/ace/issues/5726)) ([9a76656](https://github.com/ajaxorg/ace/commit/9a76656acc9528a4a2e92a3b72c4d6598d3a0a8c))
* **VirtualRenderer:** fix scrollbar overlap on autocompletion ([#5713](https://github.com/ajaxorg/ace/issues/5713)) ([5acea6d](https://github.com/ajaxorg/ace/commit/5acea6d9200f4ca0c8495350cda6e41e8351913f))
* 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))

### [1.37.5](https://github.com/ajaxorg/ace/compare/v1.37.4...v1.37.5) (2025-01-16)


Expand Down
8 changes: 6 additions & 2 deletions ace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ declare module "ace-builds" {
/**
* Emitted when text is pasted.
**/
"paste": (text: string, event: any) => void;
"paste": (e: {
text: string;
event?: ClipboardEvent;
}) => void;
/**
* Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
* @param data Contains one property, `data`, which indicates the new selection style
Expand All @@ -443,6 +446,7 @@ declare module "ace-builds" {
"gutterclick": (e: MouseEvent) => void;
"showGutterTooltip": (e: GutterTooltip) => void;
"hideGutterTooltip": (e: GutterTooltip) => void;
"compositionStart": () => void;
}
interface AcePopupEvents {
"click": (e: MouseEvent) => void;
Expand Down Expand Up @@ -978,7 +982,7 @@ declare module "ace-builds" {
import { Range } from "ace-builds-internal/range";
import { UndoManager } from "ace-builds-internal/undomanager";
import { VirtualRenderer as Renderer } from "ace-builds-internal/virtual_renderer";
export var version: "1.37.5";
export var version: "1.38.0";
export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer };
}

Expand Down
34 changes: 25 additions & 9 deletions demo/kitchen-sink/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ var Mode = /** @class */ (function () {
}) + "$";
}
else {
re = "^.*\\.(" + extensions + ")$";
re = "\\.(" + extensions + ")$";
}
this.extRe = new RegExp(re, "gi");
}
Expand Down Expand Up @@ -4329,30 +4329,42 @@ var AcePopup = /** @class */ (function () {
setHoverMarker(row, true);
}
});
popup.renderer.on("afterRender", function () {
var t = popup.renderer.$textLayer;
for (var row = t.config.firstRow, l = t.config.lastRow; row <= l; row++) {
var popupRowElement = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]);
var rowData = popup.getData(row);
var ariaLabel = "".concat(rowData.caption || rowData.value).concat(rowData.meta ? ", ".concat(rowData.meta) : '');
popupRowElement.setAttribute("role", optionAriaRole);
popupRowElement.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item"));
popupRowElement.setAttribute("aria-label", ariaLabel);
popupRowElement.setAttribute("aria-setsize", popup.data.length);
popupRowElement.setAttribute("aria-describedby", "doc-tooltip");
popupRowElement.setAttribute("aria-posinset", row + 1);
var highlightedSpans = popupRowElement.querySelectorAll(".ace_completion-highlight");
highlightedSpans.forEach(function (span) {
span.setAttribute("role", "mark");
});
}
});
popup.renderer.on("afterRender", function () {
var row = popup.getRow();
var t = popup.renderer.$textLayer;
var selected = /** @type {HTMLElement|null} */ (t.element.childNodes[row - t.config.firstRow]);
var el = document.activeElement; // Active element is textarea of main editor
if (selected !== popup.selectedNode && popup.selectedNode) {
dom.removeCssClass(popup.selectedNode, "ace_selected");
el.removeAttribute("aria-activedescendant");
popup.selectedNode.removeAttribute(ariaActiveState);
popup.selectedNode.removeAttribute("id");
}
el.removeAttribute("aria-activedescendant");
popup.selectedNode = selected;
if (selected) {
dom.addCssClass(selected, "ace_selected");
var ariaId = getAriaId(row);
dom.addCssClass(selected, "ace_selected");
selected.id = ariaId;
t.element.setAttribute("aria-activedescendant", ariaId);
el.setAttribute("aria-activedescendant", ariaId);
selected.setAttribute("role", optionAriaRole);
selected.setAttribute("aria-roledescription", nls("autocomplete.popup.item.aria-roledescription", "item"));
selected.setAttribute("aria-label", popup.getData(row).caption || popup.getData(row).value);
selected.setAttribute("aria-setsize", popup.data.length);
selected.setAttribute("aria-posinset", row + 1);
selected.setAttribute("aria-describedby", "doc-tooltip");
selected.setAttribute(ariaActiveState, "true");
}
});
Expand Down Expand Up @@ -6504,6 +6516,10 @@ var FilteredList = /** @class */ (function () {
var upper = needle.toUpperCase();
var lower = needle.toLowerCase();
loop: for (var i = 0, item; item = items[i]; i++) {
if (item.skipFilter) {
results.push(item);
continue;
}
var caption = (!this.ignoreCaption && item.caption) || item.value || item.snippet;
if (!caption)
continue;
Expand Down
Loading

0 comments on commit e6e7e81

Please sign in to comment.