Skip to content

Commit

Permalink
package 29.03.24
Browse files Browse the repository at this point in the history
  • Loading branch information
Zakhar Kozlov committed Mar 29, 2024
1 parent 8618dae commit a6c99a0
Show file tree
Hide file tree
Showing 27 changed files with 668 additions and 187 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.32.9](https://github.com/ajaxorg/ace/compare/v1.32.8...v1.32.9) (2024-03-29)


### Bug Fixes

* apply class to autocomplete popup for no suggestions state ([#5522](https://github.com/ajaxorg/ace/issues/5522)) ([a66f861](https://github.com/ajaxorg/ace/commit/a66f8619953eecd85833d97715e479d3b211c4cd))

### [1.32.8](https://github.com/ajaxorg/ace/compare/v1.32.7...v1.32.8) (2024-03-22)


Expand Down
2 changes: 2 additions & 0 deletions demo/kitchen-sink/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6129,6 +6129,7 @@ var Autocomplete = /** @class */ (function () {
this.completions = new FilteredList(completionsForEmpty);
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_loading", false);
this.popup.renderer.setStyle("ace_empty-message", true);
return;
}
return this.detach();
Expand All @@ -6143,6 +6144,7 @@ var Autocomplete = /** @class */ (function () {
new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) :
completions;
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_empty-message", false);
this.popup.renderer.setStyle("ace_loading", !finished);
}.bind(this));
if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) {
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.32.8",
"version": "1.32.9",
"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.

2 changes: 1 addition & 1 deletion src-min-noconflict/mode-php.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-min-noconflict/mode-php_laravel_blade.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-min/ace.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-min/mode-php.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-min/mode-php_laravel_blade.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src-noconflict/ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ var reportErrorIfPathIsNotConfigured = function () {
reportErrorIfPathIsNotConfigured = function () { };
}
};
exports.version = "1.32.8";
exports.version = "1.32.9";

});

Expand Down
2 changes: 2 additions & 0 deletions src-noconflict/ext-inline_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,7 @@ var Autocomplete = /** @class */ (function () {
this.completions = new FilteredList(completionsForEmpty);
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_loading", false);
this.popup.renderer.setStyle("ace_empty-message", true);
return;
}
return this.detach();
Expand All @@ -1922,6 +1923,7 @@ var Autocomplete = /** @class */ (function () {
new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) :
completions;
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_empty-message", false);
this.popup.renderer.setStyle("ace_loading", !finished);
}.bind(this));
if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) {
Expand Down
2 changes: 2 additions & 0 deletions src-noconflict/ext-language_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,7 @@ var Autocomplete = /** @class */ (function () {
this.completions = new FilteredList(completionsForEmpty);
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_loading", false);
this.popup.renderer.setStyle("ace_empty-message", true);
return;
}
return this.detach();
Expand All @@ -1922,6 +1923,7 @@ var Autocomplete = /** @class */ (function () {
new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) :
completions;
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_empty-message", false);
this.popup.renderer.setStyle("ace_loading", !finished);
}.bind(this));
if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) {
Expand Down
2 changes: 2 additions & 0 deletions src-noconflict/ext-prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,7 @@ var Autocomplete = /** @class */ (function () {
this.completions = new FilteredList(completionsForEmpty);
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_loading", false);
this.popup.renderer.setStyle("ace_empty-message", true);
return;
}
return this.detach();
Expand All @@ -1922,6 +1923,7 @@ var Autocomplete = /** @class */ (function () {
new FilteredList(Autocomplete.completionsForLoading.concat(filtered), completions.filterText) :
completions;
this.openPopup(this.editor, prefix, keepPopupPosition);
this.popup.renderer.setStyle("ace_empty-message", false);
this.popup.renderer.setStyle("ace_loading", !finished);
}.bind(this));
if (this.showLoadingState && !this.autoShown && !(this.popup && this.popup.isOpen)) {
Expand Down
201 changes: 158 additions & 43 deletions src-noconflict/mode-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -12629,6 +12629,45 @@ exports.PhpCompletions = PhpCompletions;

});

ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
this.defaultMode = defaultMode;
this.subModes = subModes;
};
oop.inherits(FoldMode, BaseFoldMode);
(function () {
this.$getMode = function (state) {
if (typeof state != "string")
state = state[0];
for (var key in this.subModes) {
if (state.indexOf(key) === 0)
return this.subModes[key];
}
return null;
};
this.$tryMode = function (state, session, foldStyle, row) {
var mode = this.$getMode(state);
return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
};
this.getFoldWidget = function (session, foldStyle, row) {
return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
this.$tryMode(session.getState(row), session, foldStyle, row) ||
this.defaultMode.getFoldWidget(session, foldStyle, row));
};
this.getFoldWidgetRange = function (session, foldStyle, row) {
var mode = this.$getMode(session.getState(row - 1));
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
mode = this.$getMode(session.getState(row));
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
mode = this.defaultMode;
return mode.getFoldWidgetRange(session, foldStyle, row);
};
}).call(FoldMode.prototype);

});

ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
Expand Down Expand Up @@ -12745,6 +12784,121 @@ oop.inherits(FoldMode, BaseFoldMode);

});

ace.define("ace/mode/folding/php",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/cstyle","ace/range","ace/token_iterator"], function(require, exports, module){"use strict";
var oop = require("../../lib/oop");
var MixedFoldMode = require("./mixed").FoldMode;
var CstyleFoldMode = require("./cstyle").FoldMode;
var Range = require("../../range").Range;
var TokenIterator = require("../../token_iterator").TokenIterator;
var FoldMode = exports.FoldMode = function () {
this.cstyleFoldMode = new CstyleFoldMode();
MixedFoldMode.call(this, this, {
"js-": new CstyleFoldMode(),
"css-": new CstyleFoldMode(),
"php-": this
});
};
oop.inherits(FoldMode, MixedFoldMode);
(function () {
this.indentKeywords = {
"if": 1,
"while": 1,
"for": 1,
"foreach": 1,
"switch": 1,
"else": 0,
"elseif": 0,
"endif": -1,
"endwhile": -1,
"endfor": -1,
"endforeach": -1,
"endswitch": -1
};
this.foldingStartMarker = /(?:\s|^)(if|else|elseif|while|for|foreach|switch).*\:/i;
this.foldingStopMarker = /(?:\s|^)(endif|endwhile|endfor|endforeach|endswitch)\;/i;
this.getFoldWidgetRange = function (session, foldStyle, row) {
var line = session.doc.getLine(row);
var match = this.foldingStartMarker.exec(line);
if (match) {
return this.phpBlock(session, row, match.index + 2);
}
var match = this.foldingStopMarker.exec(line);
if (match) {
return this.phpBlock(session, row, match.index + 2);
}
return this.cstyleFoldMode.getFoldWidgetRange(session, foldStyle, row);
};
this.getFoldWidget = function (session, foldStyle, row) {
var line = session.getLine(row);
var isStart = this.foldingStartMarker.test(line);
var isEnd = this.foldingStopMarker.test(line);
if (isStart && !isEnd) {
var match = this.foldingStartMarker.exec(line);
var keyword = match && match[1].toLowerCase();
if (keyword) {
var type = session.getTokenAt(row, match.index + 2).type;
if (type == "keyword") {
return "start";
}
}
}
if (isEnd && foldStyle === "markbeginend") {
var match = this.foldingStopMarker.exec(line);
var keyword = match && match[1].toLowerCase();
if (keyword) {
var type = session.getTokenAt(row, match.index + 2).type;
if (type == "keyword") {
return "end";
}
}
}
return this.cstyleFoldMode.getFoldWidget(session, foldStyle, row);
};
this.phpBlock = function (session, row, column, tokenRange) {
var stream = new TokenIterator(session, row, column);
var token = stream.getCurrentToken();
if (!token || token.type != "keyword")
return;
var val = token.value;
var stack = [val];
var dir = this.indentKeywords[val];
if (val === "else" || val === "elseif") {
dir = 1;
}
if (!dir)
return;
var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
var startRow = row;
stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
while (token = stream.step()) {
if (token.type !== "keyword")
continue;
var level = dir * this.indentKeywords[token.value];
if (level > 0) {
stack.unshift(token.value);
}
else if (level <= 0) {
stack.shift();
if (!stack.length)
break;
if (level === 0)
stack.unshift(token.value);
}
}
if (!token)
return null;
if (tokenRange)
return stream.getCurrentTokenRange();
var row = stream.getCurrentTokenRow();
if (dir === -1)
return new Range(row, session.getLine(row).length, startRow, startColumn);
else
return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
};
}).call(FoldMode.prototype);

});

ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
Expand Down Expand Up @@ -13265,45 +13419,6 @@ exports.XmlBehaviour = XmlBehaviour;

});

ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
this.defaultMode = defaultMode;
this.subModes = subModes;
};
oop.inherits(FoldMode, BaseFoldMode);
(function () {
this.$getMode = function (state) {
if (typeof state != "string")
state = state[0];
for (var key in this.subModes) {
if (state.indexOf(key) === 0)
return this.subModes[key];
}
return null;
};
this.$tryMode = function (state, session, foldStyle, row) {
var mode = this.$getMode(state);
return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
};
this.getFoldWidget = function (session, foldStyle, row) {
return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
this.$tryMode(session.getState(row), session, foldStyle, row) ||
this.defaultMode.getFoldWidget(session, foldStyle, row));
};
this.getFoldWidgetRange = function (session, foldStyle, row) {
var mode = this.$getMode(session.getState(row - 1));
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
mode = this.$getMode(session.getState(row));
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
mode = this.defaultMode;
return mode.getFoldWidgetRange(session, foldStyle, row);
};
}).call(FoldMode.prototype);

});

ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
var oop = require("../../lib/oop");
var Range = require("../../range").Range;
Expand Down Expand Up @@ -13779,15 +13894,15 @@ exports.Mode = Mode;

});

ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module){"use strict";
ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/php_completions","ace/mode/folding/php","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module){"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules;
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
var WorkerClient = require("../worker/worker_client").WorkerClient;
var PhpCompletions = require("./php_completions").PhpCompletions;
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
var PhpFoldMode = require("./folding/php").FoldMode;
var unicode = require("../unicode");
var HtmlMode = require("./html").Mode;
var JavaScriptMode = require("./javascript").Mode;
Expand All @@ -13797,7 +13912,7 @@ var PhpMode = function (opts) {
this.$outdent = new MatchingBraceOutdent();
this.$behaviour = this.$defaultBehaviour;
this.$completer = new PhpCompletions();
this.foldingRules = new CStyleFoldMode();
this.foldingRules = new PhpFoldMode();
};
oop.inherits(PhpMode, TextMode);
(function () {
Expand Down Expand Up @@ -13858,7 +13973,7 @@ var Mode = function (opts) {
"css-": CssMode,
"php-": PhpMode
});
this.foldingRules.subModes["php-"] = new CStyleFoldMode();
this.foldingRules = new PhpFoldMode();
};
oop.inherits(Mode, HtmlMode);
(function () {
Expand Down
Loading

0 comments on commit a6c99a0

Please sign in to comment.