Skip to content

Commit

Permalink
package 30.10.23
Browse files Browse the repository at this point in the history
  • Loading branch information
akoreman committed Oct 30, 2023
1 parent 2eb6b07 commit 1ac1817
Show file tree
Hide file tree
Showing 111 changed files with 891 additions and 310 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.31.1](https://github.com/ajaxorg/ace/compare/v1.31.0...v1.31.1) (2023-10-30)


### Bug Fixes

* improve yaml folding ([5c80e3c](https://github.com/ajaxorg/ace/commit/5c80e3cdd716b4ad26ee6958c9137278530b7816))

## [1.31.0](https://github.com/ajaxorg/ace/compare/v1.30.0...v1.31.0) (2023-10-23)


Expand Down
24 changes: 24 additions & 0 deletions css/ace.css
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ opacity: 0.5;
margin-left: 0.9em;
}
.ace_completion-message {
margin-left: 0.9em;
color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
Expand Down Expand Up @@ -950,6 +951,29 @@ text-overflow: ellipsis;
.ace_autocomplete .ace_completion-spacer {
flex: 1;
}
.ace_autocomplete.ace_loading:after {
content: "";
position: absolute;
top: 0px;
height: 2px;
width: 8%;
background: blue;
z-index: 100;
animation: ace_progress 3s infinite linear;
animation-delay: 300ms;
transform: translateX(-100%) scaleX(1);
}
@keyframes ace_progress {
0% { transform: translateX(-100%) scaleX(1) }
50% { transform: translateX(625%) scaleX(2) }
100% { transform: translateX(1500%) scaleX(3) }
}
@media (prefers-reduced-motion) {
.ace_autocomplete.ace_loading:after {
transform: translateX(625%) scaleX(2);
animation: none;
}
}
/*inlineautocomplete.css*/
.ace_icon_svg.ace_arrow,
.ace_icon_svg.ace_arrow_rotated {
Expand Down
2 changes: 2 additions & 0 deletions demo/i18n.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
<script src="../src/ace.js"></script>
<!-- load ace searchbox extension -->
<script src="../src/ext-searchbox.js"></script>
<!-- load ace language_tools extension -->
<script src="../src/ext-language_tools.js"></script>
<script>
var messagesRussian = {
"$id": "ru",
Expand Down
51 changes: 42 additions & 9 deletions demo/kitchen-sink/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4547,7 +4547,7 @@ var AcePopup = /** @class */ (function () {
}
return AcePopup;
}());
dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n", "autocompletion.css", false);
dom.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: \"\";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n", "autocompletion.css", false);
exports.AcePopup = AcePopup;
exports.$singleLineEditor = $singleLineEditor;
exports.getAriaId = getAriaId;
Expand Down Expand Up @@ -5738,6 +5738,18 @@ var Autocomplete = /** @class */ (function () {
this.stickySelectionTimer = lang.delayedCall(function () {
this.stickySelection = true;
}.bind(this), this.stickySelectionDelay);
this.$firstOpenTimer = lang.delayedCall(function () {
var initialPosition = this.completionProvider && this.completionProvider.initialPosition;
if (this.autoShown || (this.popup && this.popup.isOpen) || !initialPosition)
return;
var completionsForEmpty = [{
caption: config.nls("Loading..."),
value: ""
}];
this.completions = new FilteredList(completionsForEmpty);
this.openPopup(this.editor, initialPosition.prefix, false);
this.popup.renderer.setStyle("ace_loading", true);
}.bind(this), this.stickySelectionDelay);
}
Autocomplete.prototype.$init = function () {
this.popup = new AcePopup(this.parentNode || document.body || document.documentElement);
Expand Down Expand Up @@ -5848,6 +5860,7 @@ var Autocomplete = /** @class */ (function () {
this.popup.show(pos, lineHeight);
};
Autocomplete.prototype.openPopup = function (editor, prefix, keepPopupPosition) {
this.$firstOpenTimer.cancel();
if (!this.popup)
this.$init();
if (this.inlineEnabled && !this.inlineRenderer)
Expand Down Expand Up @@ -5890,6 +5903,7 @@ var Autocomplete = /** @class */ (function () {
this.editor.off("mousedown", this.mousedownListener);
this.editor.off("mousewheel", this.mousewheelListener);
}
this.$firstOpenTimer.cancel();
this.changeTimer.cancel();
this.hideDocTooltip();
if (this.completionProvider) {
Expand Down Expand Up @@ -6012,14 +6026,15 @@ var Autocomplete = /** @class */ (function () {
}).provideCompletions(this.editor, completionOptions, function (err, completions, finished) {
var filtered = completions.filtered;
var prefix = util.getCompletionPrefix(this.editor);
this.$firstOpenTimer.cancel();
if (finished) {
if (!filtered.length) {
var emptyMessage = !this.autoShown && this.emptyMessage;
if (typeof emptyMessage == "function")
emptyMessage = this.emptyMessage(prefix);
if (emptyMessage) {
var completionsForEmpty = [{
caption: this.emptyMessage(prefix),
caption: emptyMessage,
value: ""
}];
this.completions = new FilteredList(completionsForEmpty);
Expand All @@ -6035,7 +6050,11 @@ var Autocomplete = /** @class */ (function () {
}
this.completions = completions;
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_loading", !finished);
}.bind(this));
if (!this.autoShown && !(this.popup && this.popup.isOpen)) {
this.$firstOpenTimer.delay(this.stickySelectionDelay / 2);
}
};
Autocomplete.prototype.cancelContextMenu = function () {
this.editor.$mouseHandler.cancelContextMenu();
Expand Down Expand Up @@ -8207,10 +8226,23 @@ var {HoverTooltip} = require("ace/tooltip");
var MarkerGroup = require("ace/marker_group").MarkerGroup;
var docTooltip = new HoverTooltip();
function loadLanguageProvider(editor) {
require([
"https://mkslanc.github.io/ace-linters/build/ace-linters.js"
], function(m) {
var languageProvider = m.LanguageProvider.fromCdn("https://mkslanc.github.io/ace-linters/build", {
function loadScript(cb) {
if (define.amd) {
require([
"https://mkslanc.github.io/ace-linters/build/ace-linters.js"
], function(m) {
cb(m.LanguageProvider);
});
} else {
net.loadScript([
"https://mkslanc.github.io/ace-linters/build/ace-linters.js"
], function() {
cb(window.LanguageProvider);
});
}
}
loadScript(function(LanguageProvider) {
var languageProvider = LanguageProvider.fromCdn("https://mkslanc.github.io/ace-linters/build", {
functionality: {
hover: true,
completion: {
Expand All @@ -8224,8 +8256,8 @@ function loadLanguageProvider(editor) {
});
window.languageProvider = languageProvider;
languageProvider.registerEditor(editor);
if (languageProvider.$descriptionTooltip)
editor.off("mousemove", languageProvider.$descriptionTooltip.onMouseMove);
if (languageProvider.$hoverTooltip)
editor.off("mousemove", languageProvider.$hoverTooltip.onMouseMove);
languageProvider.$messageController.$worker.addEventListener("message", function(e) {
var id = e.data.sessionId.split(".")[0];
var session = languageProvider.$getSessionLanguageProvider({id: id})?.session;
Expand Down Expand Up @@ -8619,7 +8651,8 @@ optionsPanel.add({
} else if (!value) {
var autocomplete = Autocomplete.for(editor);
autocomplete.destroy();
Autocomplete.startCommand.exec = originalAutocompleteCommand;
if (originalAutocompleteCommand)
Autocomplete.startCommand.exec = originalAutocompleteCommand;
originalAutocompleteCommand = null;
}
},
Expand Down
6 changes: 3 additions & 3 deletions demo/scrollable-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@
<script>

var $ = document.getElementById.bind(document);
var dom = require("ace/lib/dom");
var dom = ace.require("ace/lib/dom");

ace.config.set("enableBasicAutocompletion", true);

//add command to all new editor instances
require("ace/commands/default_commands").commands.push({
ace.require("ace/commands/default_commands").commands.push({
name: "Toggle Fullscreen",
bindKey: "F11",
exec: function(editor) {
Expand Down Expand Up @@ -154,7 +154,7 @@
}
}

var themes = require("ace/ext/themelist").themes.map(function(t){return t.theme});
var themes = ace.require("ace/ext/themelist").themes.map(function(t){return t.theme});

window.add = add;
window.scroll = scroll;
Expand Down
6 changes: 4 additions & 2 deletions demo/shadow-dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<script src="../src/ace.js"></script>
<script>

var dom = require("ace/lib/dom");
var dom = ace.require("ace/lib/dom");


class AcePlayground extends HTMLElement {
Expand All @@ -48,7 +48,7 @@

var shadow = this.attachShadow({mode: "open"});

var dom = require("ace/lib/dom");
var dom = ace.require("ace/lib/dom");
dom.buildDom(["div", {id: "host"},
["div", {id: "html"}],
["div", {id: "css"}],
Expand Down Expand Up @@ -117,5 +117,7 @@
};
</script>

<script src="./show_own_source.js"></script>

</body>
</html>
2 changes: 1 addition & 1 deletion demo/show_own_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (typeof ace == "undefined" && typeof require == "undefined") {
function setValue() {
require("ace/lib/net").get(document.baseURI, function(text) {
var el = document.getElementById("editor");
el.env.editor.session.setValue(text);
if (el) el.env.editor.session.setValue(text);
});
loadAceLinters();
}
Expand Down
1 change: 1 addition & 0 deletions demo/static-highlighter.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@ <h2>Client Side Syntax Highlighting</h2>
});
</script>

<script src="./show_own_source.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion demo/toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- load ace language_tools extension -->
<script src="../src/ext-language_tools.js"></script>
<script>
var buildDom = require("ace/lib/dom").buildDom;
var buildDom = ace.require("ace/lib/dom").buildDom;
var editor = ace.edit();
editor.setOptions({
theme: "ace/theme/tomorrow_night_eighties",
Expand Down
2 changes: 1 addition & 1 deletion demo/xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- load ace language_tools extension -->
<script src="../src/ext-language_tools.js"></script>
<script>
var langagueTools = require("ace/ext/language_tools");
var langagueTools = ace.require("ace/ext/language_tools");
var editor = ace.edit("editor");
editor.session.setMode("ace/mode/xml");
editor.setTheme("ace/theme/tomorrow");
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.31.0",
"version": "1.31.1",
"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.

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

Large diffs are not rendered by default.

Loading

0 comments on commit 1ac1817

Please sign in to comment.