Skip to content

Commit 54bbe25

Browse files
committed
package 06.01.25
1 parent da6219a commit 54bbe25

File tree

11 files changed

+17
-319
lines changed

11 files changed

+17
-319
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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.37.2](https://github.com/ajaxorg/ace/compare/v1.37.1...v1.37.2) (2025-01-06)
6+
7+
8+
### Bug Fixes
9+
10+
* fix return type of supportsFile modelist ([#5705](https://github.com/ajaxorg/ace/issues/5705)) ([de21d50](https://github.com/ajaxorg/ace/commit/de21d50656bd874e1626265b8853923cb8da7c8b))
11+
512
### [1.37.1](https://github.com/ajaxorg/ace/compare/v1.37.0...v1.37.1) (2024-12-20)
613

714

ace.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ declare module "ace-builds" {
972972
import { Range } from "ace-builds-internal/range";
973973
import { UndoManager } from "ace-builds-internal/undomanager";
974974
import { VirtualRenderer as Renderer } from "ace-builds-internal/virtual_renderer";
975-
export var version: "1.37.1";
975+
export var version: "1.37.2";
976976
export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer };
977977
}
978978

demo/emmet.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<pre id="editor"></pre>
2424

2525
<!-- load emmet code and snippets compiled for browser -->
26-
<script src="https://cloud9ide.github.io/emmet-core/emmet.js"></script>
26+
<!-- <script src="..."></script> -->
2727

2828
<!-- load ace -->
2929
<script src="../src/ace.js"></script>

demo/kitchen-sink/demo.js

Lines changed: 1 addition & 310 deletions
Original file line numberDiff line numberDiff line change
@@ -6595,308 +6595,6 @@ exports.StatusBar = StatusBar;
65956595

65966596
});
65976597

6598-
define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"], function(require, exports, module){"use strict";
6599-
var HashHandler = require("../keyboard/hash_handler").HashHandler;
6600-
var Editor = require("../editor").Editor;
6601-
var snippetManager = require("../snippets").snippetManager;
6602-
var Range = require("../range").Range;
6603-
var config = require("../config");
6604-
var emmet, emmetPath;
6605-
var AceEmmetEditor = /** @class */ (function () {
6606-
function AceEmmetEditor() {
6607-
}
6608-
AceEmmetEditor.prototype.setupContext = function (editor) {
6609-
this.ace = editor;
6610-
this.indentation = editor.session.getTabString();
6611-
if (!emmet)
6612-
emmet = window["emmet"];
6613-
var resources = emmet.resources || emmet.require("resources");
6614-
resources.setVariable("indentation", this.indentation);
6615-
this.$syntax = null;
6616-
this.$syntax = this.getSyntax();
6617-
};
6618-
AceEmmetEditor.prototype.getSelectionRange = function () {
6619-
var range = this.ace.getSelectionRange();
6620-
var doc = this.ace.session.doc;
6621-
return {
6622-
start: doc.positionToIndex(range.start),
6623-
end: doc.positionToIndex(range.end)
6624-
};
6625-
};
6626-
AceEmmetEditor.prototype.createSelection = function (start, end) {
6627-
var doc = this.ace.session.doc;
6628-
this.ace.selection.setRange({
6629-
start: doc.indexToPosition(start),
6630-
end: doc.indexToPosition(end)
6631-
});
6632-
};
6633-
AceEmmetEditor.prototype.getCurrentLineRange = function () {
6634-
var ace = this.ace;
6635-
var row = ace.getCursorPosition().row;
6636-
var lineLength = ace.session.getLine(row).length;
6637-
var index = ace.session.doc.positionToIndex({ row: row, column: 0 });
6638-
return {
6639-
start: index,
6640-
end: index + lineLength
6641-
};
6642-
};
6643-
AceEmmetEditor.prototype.getCaretPos = function () {
6644-
var pos = this.ace.getCursorPosition();
6645-
return this.ace.session.doc.positionToIndex(pos);
6646-
};
6647-
AceEmmetEditor.prototype.setCaretPos = function (index) {
6648-
var pos = this.ace.session.doc.indexToPosition(index);
6649-
this.ace.selection.moveToPosition(pos);
6650-
};
6651-
AceEmmetEditor.prototype.getCurrentLine = function () {
6652-
var row = this.ace.getCursorPosition().row;
6653-
return this.ace.session.getLine(row);
6654-
};
6655-
AceEmmetEditor.prototype.replaceContent = function (value, start, end, noIndent) {
6656-
if (end == null)
6657-
end = start == null ? this.getContent().length : start;
6658-
if (start == null)
6659-
start = 0;
6660-
var editor = this.ace;
6661-
var doc = editor.session.doc;
6662-
var range = Range.fromPoints(doc.indexToPosition(start), doc.indexToPosition(end));
6663-
editor.session.remove(range);
6664-
range.end = range.start;
6665-
value = this.$updateTabstops(value);
6666-
snippetManager.insertSnippet(editor, value);
6667-
};
6668-
AceEmmetEditor.prototype.getContent = function () {
6669-
return this.ace.getValue();
6670-
};
6671-
AceEmmetEditor.prototype.getSyntax = function () {
6672-
if (this.$syntax)
6673-
return this.$syntax;
6674-
var syntax = this.ace.session.$modeId.split("/").pop();
6675-
if (syntax == "html" || syntax == "php") {
6676-
var cursor = this.ace.getCursorPosition();
6677-
var state = this.ace.session.getState(cursor.row);
6678-
if (typeof state != "string")
6679-
state = state[0];
6680-
if (state) {
6681-
state = state.split("-");
6682-
if (state.length > 1)
6683-
syntax = state[0];
6684-
else if (syntax == "php")
6685-
syntax = "html";
6686-
}
6687-
}
6688-
return syntax;
6689-
};
6690-
AceEmmetEditor.prototype.getProfileName = function () {
6691-
var resources = emmet.resources || emmet.require("resources");
6692-
switch (this.getSyntax()) {
6693-
case "css": return "css";
6694-
case "xml":
6695-
case "xsl":
6696-
return "xml";
6697-
case "html":
6698-
var profile = resources.getVariable("profile");
6699-
if (!profile)
6700-
profile = this.ace.session.getLines(0, 2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml" : "html";
6701-
return profile;
6702-
default:
6703-
var mode = this.ace.session.$mode;
6704-
return mode.emmetConfig && mode.emmetConfig.profile || "xhtml";
6705-
}
6706-
};
6707-
AceEmmetEditor.prototype.prompt = function (title) {
6708-
return prompt(title); // eslint-disable-line no-alert
6709-
};
6710-
AceEmmetEditor.prototype.getSelection = function () {
6711-
return this.ace.session.getTextRange();
6712-
};
6713-
AceEmmetEditor.prototype.getFilePath = function () {
6714-
return "";
6715-
};
6716-
AceEmmetEditor.prototype.$updateTabstops = function (value) {
6717-
var base = 1000;
6718-
var zeroBase = 0;
6719-
var lastZero = null;
6720-
var ts = emmet.tabStops || emmet.require('tabStops');
6721-
var resources = emmet.resources || emmet.require("resources");
6722-
var settings = resources.getVocabulary("user");
6723-
var tabstopOptions = {
6724-
tabstop: function (data) {
6725-
var group = parseInt(data.group, 10);
6726-
var isZero = group === 0;
6727-
if (isZero)
6728-
group = ++zeroBase;
6729-
else
6730-
group += base;
6731-
var placeholder = data.placeholder;
6732-
if (placeholder) {
6733-
placeholder = ts.processText(placeholder, tabstopOptions);
6734-
}
6735-
var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}';
6736-
if (isZero) {
6737-
lastZero = [data.start, result];
6738-
}
6739-
return result;
6740-
},
6741-
escape: function (ch) {
6742-
if (ch == '$')
6743-
return '\\$';
6744-
if (ch == '\\')
6745-
return '\\\\';
6746-
return ch;
6747-
}
6748-
};
6749-
value = ts.processText(value, tabstopOptions);
6750-
if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
6751-
value += '${0}';
6752-
}
6753-
else if (lastZero) {
6754-
var common = emmet.utils ? emmet.utils.common : emmet.require('utils');
6755-
value = common.replaceSubstring(value, '${0}', lastZero[0], lastZero[1]);
6756-
}
6757-
return value;
6758-
};
6759-
return AceEmmetEditor;
6760-
}());
6761-
var keymap = {
6762-
expand_abbreviation: { "mac": "ctrl+alt+e", "win": "alt+e" },
6763-
match_pair_outward: { "mac": "ctrl+d", "win": "ctrl+," },
6764-
match_pair_inward: { "mac": "ctrl+j", "win": "ctrl+shift+0" },
6765-
matching_pair: { "mac": "ctrl+alt+j", "win": "alt+j" },
6766-
next_edit_point: "alt+right",
6767-
prev_edit_point: "alt+left",
6768-
toggle_comment: { "mac": "command+/", "win": "ctrl+/" },
6769-
split_join_tag: { "mac": "shift+command+'", "win": "shift+ctrl+`" },
6770-
remove_tag: { "mac": "command+'", "win": "shift+ctrl+;" },
6771-
evaluate_math_expression: { "mac": "shift+command+y", "win": "shift+ctrl+y" },
6772-
increment_number_by_1: "ctrl+up",
6773-
decrement_number_by_1: "ctrl+down",
6774-
increment_number_by_01: "alt+up",
6775-
decrement_number_by_01: "alt+down",
6776-
increment_number_by_10: { "mac": "alt+command+up", "win": "shift+alt+up" },
6777-
decrement_number_by_10: { "mac": "alt+command+down", "win": "shift+alt+down" },
6778-
select_next_item: { "mac": "shift+command+.", "win": "shift+ctrl+." },
6779-
select_previous_item: { "mac": "shift+command+,", "win": "shift+ctrl+," },
6780-
reflect_css_value: { "mac": "shift+command+r", "win": "shift+ctrl+r" },
6781-
encode_decode_data_url: { "mac": "shift+ctrl+d", "win": "ctrl+'" },
6782-
expand_abbreviation_with_tab: "Tab",
6783-
wrap_with_abbreviation: { "mac": "shift+ctrl+a", "win": "shift+ctrl+a" }
6784-
};
6785-
var editorProxy = new AceEmmetEditor();
6786-
exports.commands = new HashHandler();
6787-
exports.runEmmetCommand = function runEmmetCommand(editor) {
6788-
if (this.action == "expand_abbreviation_with_tab") {
6789-
if (!editor.selection.isEmpty())
6790-
return false;
6791-
var pos = editor.selection.lead;
6792-
var token = editor.session.getTokenAt(pos.row, pos.column);
6793-
if (token && /\btag\b/.test(token.type))
6794-
return false;
6795-
}
6796-
try {
6797-
editorProxy.setupContext(editor);
6798-
var actions = emmet.actions || emmet.require("actions");
6799-
if (this.action == "wrap_with_abbreviation") {
6800-
return setTimeout(function () {
6801-
actions.run("wrap_with_abbreviation", editorProxy);
6802-
}, 0);
6803-
}
6804-
var result = actions.run(this.action, editorProxy);
6805-
}
6806-
catch (e) {
6807-
if (!emmet) {
6808-
var loading = exports.load(runEmmetCommand.bind(this, editor));
6809-
if (this.action == "expand_abbreviation_with_tab")
6810-
return false;
6811-
return loading;
6812-
}
6813-
editor._signal("changeStatus", typeof e == "string" ? e : e.message);
6814-
config.warn(e);
6815-
result = false;
6816-
}
6817-
return result;
6818-
};
6819-
for (var command in keymap) {
6820-
exports.commands.addCommand({
6821-
name: "emmet:" + command,
6822-
action: command,
6823-
bindKey: keymap[command],
6824-
exec: exports.runEmmetCommand,
6825-
multiSelectAction: "forEach"
6826-
});
6827-
}
6828-
exports.updateCommands = function (editor, enabled) {
6829-
if (enabled) {
6830-
editor.keyBinding.addKeyboardHandler(exports.commands);
6831-
}
6832-
else {
6833-
editor.keyBinding.removeKeyboardHandler(exports.commands);
6834-
}
6835-
};
6836-
exports.isSupportedMode = function (mode) {
6837-
if (!mode)
6838-
return false;
6839-
if (mode.emmetConfig)
6840-
return true;
6841-
var id = mode.$id || mode;
6842-
return /css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(id);
6843-
};
6844-
exports.isAvailable = function (editor, command) {
6845-
if (/(evaluate_math_expression|expand_abbreviation)$/.test(command))
6846-
return true;
6847-
var mode = editor.session.$mode;
6848-
var isSupported = exports.isSupportedMode(mode);
6849-
if (isSupported && mode.$modes) {
6850-
try {
6851-
editorProxy.setupContext(editor);
6852-
if (/js|php/.test(editorProxy.getSyntax()))
6853-
isSupported = false;
6854-
}
6855-
catch (e) { }
6856-
}
6857-
return isSupported;
6858-
};
6859-
var onChangeMode = function (e, target) {
6860-
var editor = target;
6861-
if (!editor)
6862-
return;
6863-
var enabled = exports.isSupportedMode(editor.session.$mode);
6864-
if (e.enableEmmet === false)
6865-
enabled = false;
6866-
if (enabled)
6867-
exports.load();
6868-
exports.updateCommands(editor, enabled);
6869-
};
6870-
exports.load = function (cb) {
6871-
if (typeof emmetPath !== "string") {
6872-
config.warn("script for emmet-core is not loaded");
6873-
return false;
6874-
}
6875-
config.loadModule(emmetPath, function () {
6876-
emmetPath = null;
6877-
cb && cb();
6878-
});
6879-
return true;
6880-
};
6881-
exports.AceEmmetEditor = AceEmmetEditor;
6882-
config.defineOptions(Editor.prototype, "editor", {
6883-
enableEmmet: {
6884-
set: function (val) {
6885-
this[val ? "on" : "removeListener"]("changeMode", onChangeMode);
6886-
onChangeMode({ enableEmmet: !!val }, this);
6887-
},
6888-
value: true
6889-
}
6890-
});
6891-
exports.setCore = function (e) {
6892-
if (typeof e == "string")
6893-
emmetPath = e;
6894-
else
6895-
emmet = e;
6896-
};
6897-
6898-
});
6899-
69006598
define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module){var Range = require("../range").Range;
69016599
var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
69026600
function getWordIndex(doc, pos) {
@@ -8271,7 +7969,7 @@ exports.commands = [{
82717969

82727970
});
82737971

8274-
define("kitchen-sink/demo",["require","exports","module","ace/ext/rtl","ace/multi_select","kitchen-sink/inline_editor","kitchen-sink/dev_util","kitchen-sink/file_drop","ace/config","ace/lib/dom","ace/lib/net","ace/lib/lang","ace/lib/event","ace/theme/textmate","ace/edit_session","ace/undomanager","ace/keyboard/hash_handler","ace/virtual_renderer","ace/editor","ace/range","ace/ext/whitespace","kitchen-sink/doclist","kitchen-sink/layout","kitchen-sink/util","ace/ext/elastic_tabstops_lite","ace/incremental_search","kitchen-sink/token_tooltip","ace/config","ace/config","ace/tooltip","ace/marker_group","ace/worker/worker_client","ace/split","ace/ext/options","ace/autocomplete","ace/ext/statusbar","ace/ext/emmet","ace/placeholder","ace/snippets","ace/ext/language_tools","ace/ext/inline_autocomplete","ace/ext/beautify","ace/keyboard/keybinding","ace/commands/command_manager"], function(require, exports, module) {"use strict";
7972+
define("kitchen-sink/demo",["require","exports","module","ace/ext/rtl","ace/multi_select","kitchen-sink/inline_editor","kitchen-sink/dev_util","kitchen-sink/file_drop","ace/config","ace/lib/dom","ace/lib/net","ace/lib/lang","ace/lib/event","ace/theme/textmate","ace/edit_session","ace/undomanager","ace/keyboard/hash_handler","ace/virtual_renderer","ace/editor","ace/range","ace/ext/whitespace","kitchen-sink/doclist","kitchen-sink/layout","kitchen-sink/util","ace/ext/elastic_tabstops_lite","ace/incremental_search","kitchen-sink/token_tooltip","ace/config","ace/config","ace/tooltip","ace/marker_group","ace/worker/worker_client","ace/split","ace/ext/options","ace/autocomplete","ace/ext/statusbar","ace/placeholder","ace/snippets","ace/ext/language_tools","ace/ext/inline_autocomplete","ace/ext/beautify","ace/keyboard/keybinding","ace/commands/command_manager"], function(require, exports, module) {"use strict";
82757973

82767974
require("ace/ext/rtl");
82777975

@@ -8749,13 +8447,6 @@ function synchroniseScrolling() {
87498447
var StatusBar = require("ace/ext/statusbar").StatusBar;
87508448
new StatusBar(env.editor, cmdLine.container);
87518449

8752-
8753-
var Emmet = require("ace/ext/emmet");
8754-
net.loadScript("https://cloud9ide.github.io/emmet-core/emmet.js", function() {
8755-
Emmet.setCore(window.emmet);
8756-
env.editor.setOption("enableEmmet", true);
8757-
});
8758-
87598450
require("ace/placeholder").PlaceHolder;
87608451

87618452
var snippetManager = require("ace/snippets").snippetManager;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ace-builds",
33
"main": "./src-noconflict/ace.js",
44
"typings": "ace.d.ts",
5-
"version": "1.37.1",
5+
"version": "1.37.2",
66
"description": "Ace (Ajax.org Cloud9 Editor)",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1"

src-min-noconflict/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-min/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-noconflict/ace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ var reportErrorIfPathIsNotConfigured = function () {
13221322
reportErrorIfPathIsNotConfigured = function () { };
13231323
}
13241324
};
1325-
exports.version = "1.37.1";
1325+
exports.version = "1.37.2";
13261326

13271327
});
13281328

src/ace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ var reportErrorIfPathIsNotConfigured = function () {
13221322
reportErrorIfPathIsNotConfigured = function () { };
13231323
}
13241324
};
1325-
exports.version = "1.37.1";
1325+
exports.version = "1.37.2";
13261326

13271327
});
13281328

types/ace-ext.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ declare module "ace-builds/src-noconflict/ext-modelist" {
400400
mode: string;
401401
extensions: string;
402402
extRe: RegExp;
403-
supportsFile(filename: string): RegExpMatchArray;
403+
supportsFile(filename: string): RegExpMatchArray | null;
404404
}
405405
}
406406
declare module "ace-builds/src-noconflict/ext-themelist" {

0 commit comments

Comments
 (0)