@codingame/monaco-editor-wrapper 21.0.0 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index2.js +2 -4
- package/dist/_virtual/index3.js +2 -2
- package/dist/assets/sumneko.lua-3.15.0.vsix/changelog.md +2314 -2314
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.json +3455 -3455
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.nls.es-419.json +247 -247
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.nls.ja-jp.json +248 -248
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.nls.json +248 -248
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.nls.pt-br.json +248 -248
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.nls.zh-cn.json +248 -248
- package/dist/assets/sumneko.lua-3.15.0.vsix/package.nls.zh-tw.json +248 -248
- package/dist/assets/sumneko.lua-3.15.0.vsix/readme.md +101 -101
- package/dist/assets/sumneko.lua-3.15.0.vsix/schema.json +3549 -3549
- package/dist/extensions/sumneko.lua-3.15.0.vsix.js +10 -10
- package/dist/features/typescriptStandalone.d.ts +1 -1
- package/dist/features/typescriptStandalone.js +12 -12
- package/dist/keybindings/vim.js +4 -4
- package/dist/node_modules/monaco-emacs/lib/emacs/index.js +1 -1
- package/dist/node_modules/monaco-emacs/lib/index.js +1 -1
- package/dist/node_modules/monaco-vim/dist/index.js +6405 -0
- package/package.json +84 -84
- package/stats.html +1 -1
- package/dist/_virtual/cm_adapter.js +0 -3
- package/dist/_virtual/index4.js +0 -3
- package/dist/_virtual/index5.js +0 -3
- package/dist/_virtual/keymap_vim.js +0 -3
- package/dist/_virtual/shiftCommand.js +0 -6
- package/dist/_virtual/statusbar.js +0 -3
- package/dist/node_modules/monaco-vim/lib/cm/keymap_vim.js +0 -6933
- package/dist/node_modules/monaco-vim/lib/cm_adapter.js +0 -1232
- package/dist/node_modules/monaco-vim/lib/index.js +0 -71
- package/dist/node_modules/monaco-vim/lib/statusbar.js +0 -207
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { __exports as lib } from '../../../_virtual/index3.js';
|
|
2
|
-
import { __require as requireKeymap_vim } from './cm/keymap_vim.js';
|
|
3
|
-
import { __require as requireStatusbar } from './statusbar.js';
|
|
4
|
-
|
|
5
|
-
var hasRequiredLib;
|
|
6
|
-
|
|
7
|
-
function requireLib () {
|
|
8
|
-
if (hasRequiredLib) return lib;
|
|
9
|
-
hasRequiredLib = 1;
|
|
10
|
-
(function (exports$1) {
|
|
11
|
-
|
|
12
|
-
Object.defineProperty(exports$1, "__esModule", {
|
|
13
|
-
value: true
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports$1, "StatusBar", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function get() {
|
|
18
|
-
return _statusbar["default"];
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(exports$1, "VimMode", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _keymap_vim["default"];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
exports$1.initVimMode = initVimMode;
|
|
28
|
-
var _keymap_vim = _interopRequireDefault(requireKeymap_vim());
|
|
29
|
-
var _statusbar = _interopRequireDefault(requireStatusbar());
|
|
30
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
31
|
-
function initVimMode(editor) {
|
|
32
|
-
var statusbarNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
33
|
-
var StatusBarClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _statusbar["default"];
|
|
34
|
-
var sanitizer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
35
|
-
var vimAdapter = new _keymap_vim["default"](editor);
|
|
36
|
-
if (!statusbarNode) {
|
|
37
|
-
vimAdapter.attach();
|
|
38
|
-
return vimAdapter;
|
|
39
|
-
}
|
|
40
|
-
var statusBar = new StatusBarClass(statusbarNode, editor, sanitizer);
|
|
41
|
-
var keyBuffer = "";
|
|
42
|
-
vimAdapter.on("vim-mode-change", function (mode) {
|
|
43
|
-
statusBar.setMode(mode);
|
|
44
|
-
});
|
|
45
|
-
vimAdapter.on("vim-keypress", function (key) {
|
|
46
|
-
if (key === ":") {
|
|
47
|
-
keyBuffer = "";
|
|
48
|
-
} else {
|
|
49
|
-
keyBuffer += key;
|
|
50
|
-
}
|
|
51
|
-
statusBar.setKeyBuffer(keyBuffer);
|
|
52
|
-
});
|
|
53
|
-
vimAdapter.on("vim-command-done", function () {
|
|
54
|
-
keyBuffer = "";
|
|
55
|
-
statusBar.setKeyBuffer(keyBuffer);
|
|
56
|
-
});
|
|
57
|
-
vimAdapter.on("dispose", function () {
|
|
58
|
-
statusBar.toggleVisibility(false);
|
|
59
|
-
statusBar.closeInput();
|
|
60
|
-
statusBar.clear();
|
|
61
|
-
});
|
|
62
|
-
statusBar.toggleVisibility(true);
|
|
63
|
-
vimAdapter.setStatusBar(statusBar);
|
|
64
|
-
vimAdapter.attach();
|
|
65
|
-
return vimAdapter;
|
|
66
|
-
}
|
|
67
|
-
} (lib));
|
|
68
|
-
return lib;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { requireLib as __require };
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { __exports as statusbar } from '../../../_virtual/statusbar.js';
|
|
2
|
-
|
|
3
|
-
var hasRequiredStatusbar;
|
|
4
|
-
|
|
5
|
-
function requireStatusbar () {
|
|
6
|
-
if (hasRequiredStatusbar) return statusbar;
|
|
7
|
-
hasRequiredStatusbar = 1;
|
|
8
|
-
(function (exports$1) {
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports$1, "__esModule", {
|
|
11
|
-
value: true
|
|
12
|
-
});
|
|
13
|
-
exports$1["default"] = void 0;
|
|
14
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
|
|
20
|
-
exports$1["default"] = /*#__PURE__*/function () {
|
|
21
|
-
function VimStatusBar(node, editor) {
|
|
22
|
-
var _this = this;
|
|
23
|
-
var sanitizer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
24
|
-
_classCallCheck(this, VimStatusBar);
|
|
25
|
-
this.closeInput = function () {
|
|
26
|
-
_this.removeInputListeners();
|
|
27
|
-
_this.input = null;
|
|
28
|
-
_this.setSec("");
|
|
29
|
-
if (_this.editor) {
|
|
30
|
-
_this.editor.focus();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
this.clear = function () {
|
|
34
|
-
_this.setInnerHtml_(_this.node, "");
|
|
35
|
-
};
|
|
36
|
-
this.inputKeyUp = function (e) {
|
|
37
|
-
var options = _this.input.options;
|
|
38
|
-
if (options && options.onKeyUp) {
|
|
39
|
-
options.onKeyUp(e, e.target.value, _this.closeInput);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
this.inputKeyInput = function (e) {
|
|
43
|
-
var options = _this.input.options;
|
|
44
|
-
if (options && options.onKeyInput) {
|
|
45
|
-
options.onKeyUp(e, e.target.value, _this.closeInput);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
this.inputBlur = function () {
|
|
49
|
-
var options = _this.input.options;
|
|
50
|
-
if (options.closeOnBlur) {
|
|
51
|
-
_this.closeInput();
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
this.inputKeyDown = function (e) {
|
|
55
|
-
var _this$input = _this.input,
|
|
56
|
-
options = _this$input.options,
|
|
57
|
-
callback = _this$input.callback;
|
|
58
|
-
if (options && options.onKeyDown && options.onKeyDown(e, e.target.value, _this.closeInput)) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (e.keyCode === 27 || options && options.closeOnEnter !== false && e.keyCode == 13) {
|
|
62
|
-
_this.input.node.blur();
|
|
63
|
-
e.stopPropagation();
|
|
64
|
-
_this.closeInput();
|
|
65
|
-
}
|
|
66
|
-
if (e.keyCode === 13 && callback) {
|
|
67
|
-
e.stopPropagation();
|
|
68
|
-
e.preventDefault();
|
|
69
|
-
callback(e.target.value);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
this.node = node;
|
|
73
|
-
this.modeInfoNode = document.createElement("span");
|
|
74
|
-
this.secInfoNode = document.createElement("span");
|
|
75
|
-
this.notifNode = document.createElement("span");
|
|
76
|
-
this.notifNode.className = "vim-notification";
|
|
77
|
-
this.keyInfoNode = document.createElement("span");
|
|
78
|
-
this.keyInfoNode.setAttribute("style", "float: right");
|
|
79
|
-
this.node.appendChild(this.modeInfoNode);
|
|
80
|
-
this.node.appendChild(this.secInfoNode);
|
|
81
|
-
this.node.appendChild(this.notifNode);
|
|
82
|
-
this.node.appendChild(this.keyInfoNode);
|
|
83
|
-
this.toggleVisibility(false);
|
|
84
|
-
this.editor = editor;
|
|
85
|
-
this.sanitizer = sanitizer;
|
|
86
|
-
}
|
|
87
|
-
return _createClass(VimStatusBar, [{
|
|
88
|
-
key: "setMode",
|
|
89
|
-
value: function setMode(ev) {
|
|
90
|
-
if (ev.mode === "visual") {
|
|
91
|
-
if (ev.subMode === "linewise") {
|
|
92
|
-
this.setText("--VISUAL LINE--");
|
|
93
|
-
} else if (ev.subMode === "blockwise") {
|
|
94
|
-
this.setText("--VISUAL BLOCK--");
|
|
95
|
-
} else {
|
|
96
|
-
this.setText("--VISUAL--");
|
|
97
|
-
}
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
this.setText("--".concat(ev.mode.toUpperCase(), "--"));
|
|
101
|
-
}
|
|
102
|
-
}, {
|
|
103
|
-
key: "setKeyBuffer",
|
|
104
|
-
value: function setKeyBuffer(key) {
|
|
105
|
-
this.keyInfoNode.textContent = key;
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
key: "setSec",
|
|
109
|
-
value: function setSec(text, callback, options) {
|
|
110
|
-
this.notifNode.textContent = "";
|
|
111
|
-
if (text === undefined) {
|
|
112
|
-
return this.closeInput;
|
|
113
|
-
}
|
|
114
|
-
this.setInnerHtml_(this.secInfoNode, text);
|
|
115
|
-
var input = this.secInfoNode.querySelector("input");
|
|
116
|
-
if (input) {
|
|
117
|
-
input.focus();
|
|
118
|
-
this.input = {
|
|
119
|
-
callback: callback,
|
|
120
|
-
options: options,
|
|
121
|
-
node: input
|
|
122
|
-
};
|
|
123
|
-
if (options) {
|
|
124
|
-
if (options.selectValueOnOpen) {
|
|
125
|
-
input.select();
|
|
126
|
-
}
|
|
127
|
-
if (options.value) {
|
|
128
|
-
input.value = options.value;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
this.addInputListeners();
|
|
132
|
-
}
|
|
133
|
-
return this.closeInput;
|
|
134
|
-
}
|
|
135
|
-
}, {
|
|
136
|
-
key: "setText",
|
|
137
|
-
value: function setText(text) {
|
|
138
|
-
this.modeInfoNode.textContent = text;
|
|
139
|
-
}
|
|
140
|
-
}, {
|
|
141
|
-
key: "toggleVisibility",
|
|
142
|
-
value: function toggleVisibility(toggle) {
|
|
143
|
-
if (toggle) {
|
|
144
|
-
this.node.style.display = "block";
|
|
145
|
-
} else {
|
|
146
|
-
this.node.style.display = "none";
|
|
147
|
-
}
|
|
148
|
-
if (this.input) {
|
|
149
|
-
this.removeInputListeners();
|
|
150
|
-
}
|
|
151
|
-
clearInterval(this.notifTimeout);
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "addInputListeners",
|
|
155
|
-
value: function addInputListeners() {
|
|
156
|
-
var node = this.input.node;
|
|
157
|
-
node.addEventListener("keyup", this.inputKeyUp);
|
|
158
|
-
node.addEventListener("keydown", this.inputKeyDown);
|
|
159
|
-
node.addEventListener("input", this.inputKeyInput);
|
|
160
|
-
node.addEventListener("blur", this.inputBlur);
|
|
161
|
-
}
|
|
162
|
-
}, {
|
|
163
|
-
key: "removeInputListeners",
|
|
164
|
-
value: function removeInputListeners() {
|
|
165
|
-
if (!this.input || !this.input.node) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
var node = this.input.node;
|
|
169
|
-
node.removeEventListener("keyup", this.inputKeyUp);
|
|
170
|
-
node.removeEventListener("keydown", this.inputKeyDown);
|
|
171
|
-
node.removeEventListener("input", this.inputKeyInput);
|
|
172
|
-
node.removeEventListener("blur", this.inputBlur);
|
|
173
|
-
}
|
|
174
|
-
}, {
|
|
175
|
-
key: "showNotification",
|
|
176
|
-
value: function showNotification(text) {
|
|
177
|
-
var _this2 = this;
|
|
178
|
-
var sp = document.createElement("span");
|
|
179
|
-
this.setInnerHtml_(sp, text);
|
|
180
|
-
this.notifNode.textContent = sp.textContent;
|
|
181
|
-
this.notifTimeout = setTimeout(function () {
|
|
182
|
-
_this2.notifNode.textContent = "";
|
|
183
|
-
}, 5000);
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
key: "setInnerHtml_",
|
|
187
|
-
value: function setInnerHtml_(element, htmlContents) {
|
|
188
|
-
// Clear out previous contents first.
|
|
189
|
-
while (element.childNodes.length) {
|
|
190
|
-
element.removeChild(element.childNodes[0]);
|
|
191
|
-
}
|
|
192
|
-
if (!htmlContents) {
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
if (this.sanitizer) {
|
|
196
|
-
element.appendChild(this.sanitizer(htmlContents));
|
|
197
|
-
} else {
|
|
198
|
-
element.appendChild(htmlContents);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}]);
|
|
202
|
-
}();
|
|
203
|
-
} (statusbar));
|
|
204
|
-
return statusbar;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export { requireStatusbar as __require };
|