Skip to content

Commit

Permalink
package 13.10.23
Browse files Browse the repository at this point in the history
  • Loading branch information
Zakhar Kozlov committed Oct 13, 2023
1 parent d72c4a1 commit fdda569
Show file tree
Hide file tree
Showing 49 changed files with 19,944 additions and 14,404 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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.30.0](https://github.com/ajaxorg/ace/compare/v1.29.0...v1.30.0) (2023-10-13)


### Features

* Add support for time units in PRQL ([#5324](https://github.com/ajaxorg/ace/issues/5324)) ([8b9175b](https://github.com/ajaxorg/ace/commit/8b9175bc780fade64bed1570fa1cd34d022b337b))

## [1.29.0](https://github.com/ajaxorg/ace/compare/v1.28.0...v1.29.0) (2023-10-09)


Expand Down
2 changes: 2 additions & 0 deletions ace-modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ declare module 'ace-builds/src-noconflict/mode-aql';
declare module 'ace-builds/src-noconflict/mode-asciidoc';
declare module 'ace-builds/src-noconflict/mode-asl';
declare module 'ace-builds/src-noconflict/mode-assembly_x86';
declare module 'ace-builds/src-noconflict/mode-astro';
declare module 'ace-builds/src-noconflict/mode-autohotkey';
declare module 'ace-builds/src-noconflict/mode-batchfile';
declare module 'ace-builds/src-noconflict/mode-bibtex';
Expand Down Expand Up @@ -272,6 +273,7 @@ declare module 'ace-builds/src-noconflict/snippets/aql';
declare module 'ace-builds/src-noconflict/snippets/asciidoc';
declare module 'ace-builds/src-noconflict/snippets/asl';
declare module 'ace-builds/src-noconflict/snippets/assembly_x86';
declare module 'ace-builds/src-noconflict/snippets/astro';
declare module 'ace-builds/src-noconflict/snippets/autohotkey';
declare module 'ace-builds/src-noconflict/snippets/batchfile';
declare module 'ace-builds/src-noconflict/snippets/bibtex';
Expand Down
3 changes: 3 additions & 0 deletions ace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ export namespace Ace {
hasRedo(): boolean;
isClean(): boolean;
markClean(rev?: number): void;
toJSON(): object;
fromJSON(json: object): void;
}

export interface Position {
Expand Down Expand Up @@ -621,6 +623,7 @@ export namespace Ace {
documentToScreenColumn(row: number, docColumn: number): number;
documentToScreenRow(docRow: number, docColumn: number): number;
getScreenLength(): number;
toJSON(): Object;
destroy(): void;
}

Expand Down
8 changes: 8 additions & 0 deletions css/ace.css
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,14 @@ opacity: 0.5;
font-style: italic;
white-space: pre;
}
.ace_screenreader-only {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}
/*ace-tm*/
.ace-tm .ace_gutter {
background: #f0f0f0;
Expand Down
93 changes: 86 additions & 7 deletions demo/kitchen-sink/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,7 @@ var supportedModes = {
AsciiDoc: ["asciidoc|adoc"],
ASL: ["dsl|asl|asl.json"],
Assembly_x86: ["asm|a"],
Astro: ["astro"],
AutoHotKey: ["ahk"],
BatchFile: ["bat|cmd"],
BibTeX: ["bib"],
Expand All @@ -1610,6 +1611,7 @@ var supportedModes = {
D: ["d|di"],
Dart: ["dart"],
Diff: ["diff|patch"],
Django: ["html"],
Dockerfile: ["^Dockerfile"],
Dot: ["dot"],
Drools: ["drl"],
Expand Down Expand Up @@ -1758,8 +1760,7 @@ var supportedModes = {
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
XQuery: ["xq"],
YAML: ["yaml|yml"],
Zeek: ["zeek|bro"],
Django: ["html"]
Zeek: ["zeek|bro"]
};
var nameOverrides = {
ObjectiveC: "Objective-C",
Expand Down Expand Up @@ -4288,6 +4289,7 @@ var AcePopup = /** @class */ (function () {
}
lastMouseEvent = e;
lastMouseEvent.scrollTop = popup.renderer.scrollTop;
popup.isMouseOver = true;
var row = lastMouseEvent.getDocumentPosition().row;
if (hoverMarker.start.row != row) {
if (!hoverMarker.id)
Expand Down Expand Up @@ -4340,7 +4342,10 @@ var AcePopup = /** @class */ (function () {
popup.getHoveredRow = function () {
return hoverMarker.start.row;
};
event.addListener(popup.container, "mouseout", hideHoverMarker);
event.addListener(popup.container, "mouseout", function () {
popup.isMouseOver = false;
hideHoverMarker();
});
popup.on("hide", hideHoverMarker);
popup.on("changeSelection", hideHoverMarker);
popup.session.doc.getLength = function () {
Expand Down Expand Up @@ -4400,6 +4405,7 @@ var AcePopup = /** @class */ (function () {
popup.isTopdown = false;
popup.autoSelect = true;
popup.filterText = "";
popup.isMouseOver = false;
popup.data = [];
popup.setData = function (list, filterText) {
popup.filterText = filterText || "";
Expand Down Expand Up @@ -5513,8 +5519,61 @@ var Editor = require("./editor").Editor;

});

define("ace/autocomplete/inline",["require","exports","module","ace/snippets"], function(require, exports, module){"use strict";
define("ace/autocomplete/inline_screenreader",["require","exports","module"], function(require, exports, module){"use strict";
var AceInlineScreenReader = /** @class */ (function () {
function AceInlineScreenReader(editor) {
this.editor = editor;
this.screenReaderDiv = document.createElement("div");
this.screenReaderDiv.classList.add("ace_screenreader-only");
this.editor.container.appendChild(this.screenReaderDiv);
}
AceInlineScreenReader.prototype.setScreenReaderContent = function (content) {
if (!this.popup && this.editor.completer && this.editor.completer.popup) {
this.popup = this.editor.completer.popup;
this.popup.renderer.on("afterRender", function () {
var row = this.popup.getRow();
var t = this.popup.renderer.$textLayer;
var selected = t.element.childNodes[row - t.config.firstRow];
if (selected) {
var idString = "doc-tooltip ";
for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) {
idString += "ace-inline-screenreader-line-".concat(lineIndex, " ");
}
selected.setAttribute("aria-describedby", idString);
}
}.bind(this));
}
while (this.screenReaderDiv.firstChild) {
this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);
}
this._lines = content.split(/\r\n|\r|\n/);
var codeElement = this.createCodeBlock();
this.screenReaderDiv.appendChild(codeElement);
};
AceInlineScreenReader.prototype.destroy = function () {
this.screenReaderDiv.remove();
};
AceInlineScreenReader.prototype.createCodeBlock = function () {
var container = document.createElement("pre");
container.setAttribute("id", "ace-inline-screenreader");
for (var lineIndex = 0; lineIndex < this._lines.length; lineIndex++) {
var codeElement = document.createElement("code");
codeElement.setAttribute("id", "ace-inline-screenreader-line-".concat(lineIndex));
var line = document.createTextNode(this._lines[lineIndex]);
codeElement.appendChild(line);
container.appendChild(codeElement);
}
return container;
};
return AceInlineScreenReader;
}());
exports.AceInlineScreenReader = AceInlineScreenReader;

});

define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"], function(require, exports, module){"use strict";
var snippetManager = require("../snippets").snippetManager;
var AceInlineScreenReader = require("./inline_screenreader").AceInlineScreenReader;
var AceInline = /** @class */ (function () {
function AceInline() {
this.editor = null;
Expand All @@ -5524,15 +5583,20 @@ var AceInline = /** @class */ (function () {
if (editor && this.editor && this.editor !== editor) {
this.hide();
this.editor = null;
this.inlineScreenReader = null;
}
if (!editor || !completion) {
return false;
}
if (!this.inlineScreenReader) {
this.inlineScreenReader = new AceInlineScreenReader(editor);
}
var displayText = completion.snippet ? snippetManager.getDisplayTextForSnippet(editor, completion.snippet) : completion.value;
if (completion.hideInlinePreview || !displayText || !displayText.startsWith(prefix)) {
return false;
}
this.editor = editor;
this.inlineScreenReader.setScreenReaderContent(displayText);
displayText = displayText.slice(prefix.length);
if (displayText === "") {
editor.removeGhostText();
Expand All @@ -5558,6 +5622,10 @@ var AceInline = /** @class */ (function () {
AceInline.prototype.destroy = function () {
this.hide();
this.editor = null;
if (this.inlineScreenReader) {
this.inlineScreenReader.destroy();
this.inlineScreenReader = null;
}
};
return AceInline;
}());
Expand Down Expand Up @@ -5630,7 +5698,7 @@ exports.triggerAutocomplete = function (editor) {

});

define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"], function(require, exports, module){"use strict";
define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event"], function(require, exports, module){"use strict";
var HashHandler = require("./keyboard/hash_handler").HashHandler;
var AcePopup = require("./autocomplete/popup").AcePopup;
var AceInline = require("./autocomplete/inline").AceInline;
Expand All @@ -5640,6 +5708,7 @@ var lang = require("./lib/lang");
var dom = require("./lib/dom");
var snippetManager = require("./snippets").snippetManager;
var config = require("./config");
var event = require("./lib/event");
var destroyCompleter = function (e, editor) {
editor.completer && editor.completer.destroy();
};
Expand Down Expand Up @@ -5678,6 +5747,7 @@ var Autocomplete = /** @class */ (function () {
this.popup.on("show", this.$onPopupShow.bind(this));
this.popup.on("hide", this.$onHidePopup.bind(this));
this.popup.on("select", this.$onPopupChange.bind(this));
event.addListener(this.popup.container, "mouseout", this.mouseOutListener.bind(this));
this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
return this.popup;
};
Expand Down Expand Up @@ -5705,8 +5775,12 @@ var Autocomplete = /** @class */ (function () {
if (!this.inlineRenderer.show(this.editor, completion, prefix)) {
this.inlineRenderer.hide();
}
this.$updatePopupPosition();
if (this.popup.isMouseOver && this.setSelectOnHover) {
this.tooltipTimer.call(null, null);
return;
}
}
this.$updatePopupPosition();
this.tooltipTimer.call(null, null);
};
Autocomplete.prototype.$onPopupShow = function (hide) {
Expand Down Expand Up @@ -5851,7 +5925,12 @@ var Autocomplete = /** @class */ (function () {
this.detach();
};
Autocomplete.prototype.mousewheelListener = function (e) {
this.detach();
if (!this.popup.isMouseOver)
this.detach();
};
Autocomplete.prototype.mouseOutListener = function (e) {
if (this.popup.isOpen)
this.$updatePopupPosition();
};
Autocomplete.prototype.goTo = function (where) {
this.popup.goTo(where);
Expand Down
9 changes: 9 additions & 0 deletions demo/kitchen-sink/docs/astro.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
const visible = true;
const name = "Legend Sabbir"
---
{visible && <p>Show me!</p>}

{visible ? <p>Show me!</p> : <p>Else show me!</p>}

<h1>{name}</h1>
2 changes: 2 additions & 0 deletions esm-resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ace.config.setModuleLoader('ace/mode/aql', () => import('./src-noconflict/mode-a
ace.config.setModuleLoader('ace/mode/asciidoc', () => import('./src-noconflict/mode-asciidoc.js'));
ace.config.setModuleLoader('ace/mode/asl', () => import('./src-noconflict/mode-asl.js'));
ace.config.setModuleLoader('ace/mode/assembly_x86', () => import('./src-noconflict/mode-assembly_x86.js'));
ace.config.setModuleLoader('ace/mode/astro', () => import('./src-noconflict/mode-astro.js'));
ace.config.setModuleLoader('ace/mode/autohotkey', () => import('./src-noconflict/mode-autohotkey.js'));
ace.config.setModuleLoader('ace/mode/batchfile', () => import('./src-noconflict/mode-batchfile.js'));
ace.config.setModuleLoader('ace/mode/bibtex', () => import('./src-noconflict/mode-bibtex.js'));
Expand Down Expand Up @@ -280,6 +281,7 @@ ace.config.setModuleLoader('ace/snippets/aql', () => import('./src-noconflict/sn
ace.config.setModuleLoader('ace/snippets/asciidoc', () => import('./src-noconflict/snippets/asciidoc.js'));
ace.config.setModuleLoader('ace/snippets/asl', () => import('./src-noconflict/snippets/asl.js'));
ace.config.setModuleLoader('ace/snippets/assembly_x86', () => import('./src-noconflict/snippets/assembly_x86.js'));
ace.config.setModuleLoader('ace/snippets/astro', () => import('./src-noconflict/snippets/astro.js'));
ace.config.setModuleLoader('ace/snippets/autohotkey', () => import('./src-noconflict/snippets/autohotkey.js'));
ace.config.setModuleLoader('ace/snippets/batchfile', () => import('./src-noconflict/snippets/batchfile.js'));
ace.config.setModuleLoader('ace/snippets/bibtex', () => import('./src-noconflict/snippets/bibtex.js'));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ace-builds",
"main": "./src-noconflict/ace.js",
"typings": "ace.d.ts",
"version": "1.29.0",
"version": "1.30.0",
"description": "Ace (Ajax.org Cloud9 Editor)",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion src-min-noconflict/ace.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-min-noconflict/ext-inline_autocomplete.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-min-noconflict/ext-language_tools.js

Large diffs are not rendered by default.

Loading

0 comments on commit fdda569

Please sign in to comment.