@difizen/libro-cofine-editor 0.3.1 → 0.3.2
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/es/libro-e2-editor.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libro-e2-editor.d.ts","sourceRoot":"","sources":["../src/libro-e2-editor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,OAAO,EACP,aAAa,EACb,cAAc,EACd,MAAM,EACN,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,WAAW,EACX,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAiB,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAIlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,eAAe,EACf,QAAQ,EAGR,YAAY,EAGb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAc,oBAAoB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAGtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,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aAEF;IAEF,IAAI,aAEF;IACF,KAAK,aAIH;IACF,QAAQ,gBAEN;IACF,IAAI,aAEF;IACF,WAAW,aAET;IAEF,wBAAwB,eAAgB,WAAW,UAEjD;IAEF,SAAS,CAAC,kBAAkB,mBAA0B;IACtD,IAAI,aAAa,+CAEhB;IAED,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM;;;;;;IAWrC,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM;IAarD,iBAAiB,WAAY,MAAM,GAAG,SAAS,wBAK7C;IAEF,aAAa,WAAY,MAAM,KAAG,SAAS,GAAG,SAAS,CAGrD;IAEF,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW;IAexD,gBAAgB,SAAU,MAAM,SAAS,MAAM,UAQ7C;IAEF,iBAAiB,UAAW;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,UAM3D;IAEF,iBAAiB,kBAOf;IACF,iBAAiB,aAAc,SAAS,UAKtC;IACF,YAAY;;;MAYV;IACF,YAAY,cAAe,MAAM,UAE/B;IACF,aAAa,iBAeX;IACF,aAAa,eAAgB,MAAM,EAAE,UAYnC;IAEF,eAAe,cAAe,MAAM,UAElC;IACF,gBAAgB,YAAa,WAAW,EAAE,gBAAgB,MAAM,GAAG,SAAS,UAiC1E;IAEF,MAAM,aAEJ;IAEF,SAAS,CAAC,WAAW,UAAS;IAC9B;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,OAAO,aAUL;IAEF,qBAAqB,aAInB;CACH"}
|
package/es/libro-e2-editor.js
CHANGED
|
@@ -121,6 +121,18 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
121
121
|
theme: _this.theme
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Handles a mime type change.
|
|
126
|
+
* 切换语言
|
|
127
|
+
* cell 切换没走这里
|
|
128
|
+
*/
|
|
129
|
+
this.onMimeTypeChanged = function () {
|
|
130
|
+
var _this$monacoEditor2;
|
|
131
|
+
var model = (_this$monacoEditor2 = _this.monacoEditor) === null || _this$monacoEditor2 === void 0 ? void 0 : _this$monacoEditor2.getModel();
|
|
132
|
+
if (_this.languageSpec && model) {
|
|
133
|
+
editor.setModelLanguage(model, _this.languageSpec.language);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
124
136
|
/**
|
|
125
137
|
*
|
|
126
138
|
* @param option
|
|
@@ -131,9 +143,9 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
131
143
|
return;
|
|
132
144
|
}
|
|
133
145
|
if (option === 'theme') {
|
|
134
|
-
var _this$
|
|
146
|
+
var _this$monacoEditor3;
|
|
135
147
|
_this._config.theme = value;
|
|
136
|
-
(_this$
|
|
148
|
+
(_this$monacoEditor3 = _this.monacoEditor) === null || _this$monacoEditor3 === void 0 || _this$monacoEditor3.updateOptions({
|
|
137
149
|
theme: _this.theme
|
|
138
150
|
});
|
|
139
151
|
}
|
|
@@ -147,49 +159,49 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
147
159
|
var sizeKeys = ['fontFamily', 'fontSize', 'lineHeight', 'wordWrapColumn', 'lineWrap'];
|
|
148
160
|
var monacoOptionkeys = sizeKeys.concat(['readOnly', 'insertSpaces', 'tabSize']);
|
|
149
161
|
if (monacoOptionkeys.includes(option)) {
|
|
150
|
-
var _this$
|
|
162
|
+
var _this$monacoEditor4;
|
|
151
163
|
_this._config = _objectSpread(_objectSpread({}, _this._config), {}, _defineProperty({}, option, value));
|
|
152
|
-
(_this$
|
|
164
|
+
(_this$monacoEditor4 = _this.monacoEditor) === null || _this$monacoEditor4 === void 0 || _this$monacoEditor4.updateOptions(_this.toMonacoOptions(_this._config));
|
|
153
165
|
}
|
|
154
166
|
if (sizeKeys.includes(option)) {
|
|
155
167
|
_this.updateEditorSize();
|
|
156
168
|
}
|
|
157
169
|
};
|
|
158
170
|
this.getLine = function (line) {
|
|
159
|
-
var _this$
|
|
160
|
-
return (_this$
|
|
171
|
+
var _this$monacoEditor5;
|
|
172
|
+
return (_this$monacoEditor5 = _this.monacoEditor) === null || _this$monacoEditor5 === void 0 || (_this$monacoEditor5 = _this$monacoEditor5.getModel()) === null || _this$monacoEditor5 === void 0 ? void 0 : _this$monacoEditor5.getLineContent(line);
|
|
161
173
|
};
|
|
162
174
|
this.getOffsetAt = function (position) {
|
|
163
|
-
var _this$
|
|
164
|
-
return ((_this$
|
|
175
|
+
var _this$monacoEditor6;
|
|
176
|
+
return ((_this$monacoEditor6 = _this.monacoEditor) === null || _this$monacoEditor6 === void 0 || (_this$monacoEditor6 = _this$monacoEditor6.getModel()) === null || _this$monacoEditor6 === void 0 ? void 0 : _this$monacoEditor6.getOffsetAt({
|
|
165
177
|
lineNumber: position.line,
|
|
166
178
|
column: position.column
|
|
167
179
|
})) || 0;
|
|
168
180
|
};
|
|
169
181
|
this.undo = function () {
|
|
170
|
-
var _this$
|
|
171
|
-
(_this$
|
|
182
|
+
var _this$monacoEditor7;
|
|
183
|
+
(_this$monacoEditor7 = _this.monacoEditor) === null || _this$monacoEditor7 === void 0 || _this$monacoEditor7.trigger('source', 'undo', {});
|
|
172
184
|
};
|
|
173
185
|
this.redo = function () {
|
|
174
|
-
var _this$
|
|
175
|
-
(_this$
|
|
186
|
+
var _this$monacoEditor8;
|
|
187
|
+
(_this$monacoEditor8 = _this.monacoEditor) === null || _this$monacoEditor8 === void 0 || _this$monacoEditor8.trigger('source', 'redo', {});
|
|
176
188
|
};
|
|
177
189
|
this.focus = function () {
|
|
178
190
|
window.requestAnimationFrame(function () {
|
|
179
|
-
var _this$
|
|
180
|
-
(_this$
|
|
191
|
+
var _this$monacoEditor9;
|
|
192
|
+
(_this$monacoEditor9 = _this.monacoEditor) === null || _this$monacoEditor9 === void 0 || _this$monacoEditor9.focus();
|
|
181
193
|
});
|
|
182
194
|
};
|
|
183
195
|
this.hasFocus = function () {
|
|
184
|
-
var _this$monacoEditor$ha, _this$
|
|
185
|
-
return (_this$monacoEditor$ha = (_this$
|
|
196
|
+
var _this$monacoEditor$ha, _this$monacoEditor10;
|
|
197
|
+
return (_this$monacoEditor$ha = (_this$monacoEditor10 = _this.monacoEditor) === null || _this$monacoEditor10 === void 0 ? void 0 : _this$monacoEditor10.hasWidgetFocus()) !== null && _this$monacoEditor$ha !== void 0 ? _this$monacoEditor$ha : false;
|
|
186
198
|
};
|
|
187
199
|
this.blur = function () {
|
|
188
200
|
document.documentElement.focus();
|
|
189
201
|
};
|
|
190
202
|
this.resizeToFit = function () {
|
|
191
|
-
var _this$
|
|
192
|
-
(_this$
|
|
203
|
+
var _this$monacoEditor11;
|
|
204
|
+
(_this$monacoEditor11 = _this.monacoEditor) === null || _this$monacoEditor11 === void 0 || _this$monacoEditor11.layout();
|
|
193
205
|
};
|
|
194
206
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
195
207
|
this.getPositionForCoordinate = function (coordinate) {
|
|
@@ -197,73 +209,73 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
197
209
|
};
|
|
198
210
|
this.modalChangeEmitter = new Emitter();
|
|
199
211
|
this.getSelectionValue = function (range) {
|
|
200
|
-
var _this$
|
|
212
|
+
var _this$monacoEditor12;
|
|
201
213
|
var selection = range !== null && range !== void 0 ? range : _this.getSelection();
|
|
202
|
-
return (_this$
|
|
214
|
+
return (_this$monacoEditor12 = _this.monacoEditor) === null || _this$monacoEditor12 === void 0 || (_this$monacoEditor12 = _this$monacoEditor12.getModel()) === null || _this$monacoEditor12 === void 0 ? void 0 : _this$monacoEditor12.getValueInRange(_this.toMonacoRange(selection));
|
|
203
215
|
};
|
|
204
216
|
this.getPositionAt = function (offset) {
|
|
205
|
-
var _this$
|
|
206
|
-
var position = (_this$
|
|
217
|
+
var _this$monacoEditor13;
|
|
218
|
+
var position = (_this$monacoEditor13 = _this.monacoEditor) === null || _this$monacoEditor13 === void 0 || (_this$monacoEditor13 = _this$monacoEditor13.getModel()) === null || _this$monacoEditor13 === void 0 ? void 0 : _this$monacoEditor13.getPositionAt(offset);
|
|
207
219
|
return position ? {
|
|
208
220
|
line: position.lineNumber,
|
|
209
221
|
column: position.column
|
|
210
222
|
} : position;
|
|
211
223
|
};
|
|
212
224
|
this.replaceSelection = function (text, range) {
|
|
213
|
-
var _this$
|
|
214
|
-
(_this$
|
|
225
|
+
var _this$monacoEditor14, _this$monacoEditor15;
|
|
226
|
+
(_this$monacoEditor14 = _this.monacoEditor) === null || _this$monacoEditor14 === void 0 || _this$monacoEditor14.executeEdits(undefined, [{
|
|
215
227
|
range: _this.toMonacoRange(range),
|
|
216
228
|
text: text
|
|
217
229
|
}]);
|
|
218
|
-
(_this$
|
|
230
|
+
(_this$monacoEditor15 = _this.monacoEditor) === null || _this$monacoEditor15 === void 0 || _this$monacoEditor15.pushUndoStop();
|
|
219
231
|
};
|
|
220
232
|
this.replaceSelections = function (edits) {
|
|
221
|
-
var _this$
|
|
222
|
-
(_this$
|
|
233
|
+
var _this$monacoEditor16, _this$monacoEditor17;
|
|
234
|
+
(_this$monacoEditor16 = _this.monacoEditor) === null || _this$monacoEditor16 === void 0 || _this$monacoEditor16.executeEdits(undefined, edits.map(function (item) {
|
|
223
235
|
return {
|
|
224
236
|
range: _this.toMonacoRange(item.range),
|
|
225
237
|
text: item.text
|
|
226
238
|
};
|
|
227
239
|
}));
|
|
228
|
-
(_this$
|
|
240
|
+
(_this$monacoEditor17 = _this.monacoEditor) === null || _this$monacoEditor17 === void 0 || _this$monacoEditor17.pushUndoStop();
|
|
229
241
|
};
|
|
230
242
|
this.getCursorPosition = function () {
|
|
231
|
-
var _this$
|
|
243
|
+
var _this$monacoEditor18, _this$monacoEditor19;
|
|
232
244
|
var position = {
|
|
233
|
-
line: ((_this$
|
|
234
|
-
column: ((_this$
|
|
245
|
+
line: ((_this$monacoEditor18 = _this.monacoEditor) === null || _this$monacoEditor18 === void 0 || (_this$monacoEditor18 = _this$monacoEditor18.getPosition()) === null || _this$monacoEditor18 === void 0 ? void 0 : _this$monacoEditor18.lineNumber) || 1,
|
|
246
|
+
column: ((_this$monacoEditor19 = _this.monacoEditor) === null || _this$monacoEditor19 === void 0 || (_this$monacoEditor19 = _this$monacoEditor19.getPosition()) === null || _this$monacoEditor19 === void 0 ? void 0 : _this$monacoEditor19.column) || 1
|
|
235
247
|
};
|
|
236
248
|
return position;
|
|
237
249
|
};
|
|
238
250
|
this.setCursorPosition = function (position) {
|
|
239
|
-
var _this$
|
|
240
|
-
(_this$
|
|
251
|
+
var _this$monacoEditor20;
|
|
252
|
+
(_this$monacoEditor20 = _this.monacoEditor) === null || _this$monacoEditor20 === void 0 || _this$monacoEditor20.setPosition({
|
|
241
253
|
column: position.column + 1,
|
|
242
254
|
lineNumber: position.line + 1
|
|
243
255
|
});
|
|
244
256
|
};
|
|
245
257
|
this.getSelection = function () {
|
|
246
|
-
var _this$
|
|
258
|
+
var _this$monacoEditor21, _this$monacoEditor22, _this$monacoEditor23, _this$monacoEditor24;
|
|
247
259
|
var selection = {
|
|
248
260
|
start: {
|
|
249
|
-
line: ((_this$
|
|
250
|
-
column: ((_this$
|
|
261
|
+
line: ((_this$monacoEditor21 = _this.monacoEditor) === null || _this$monacoEditor21 === void 0 || (_this$monacoEditor21 = _this$monacoEditor21.getSelection()) === null || _this$monacoEditor21 === void 0 ? void 0 : _this$monacoEditor21.startLineNumber) || 1,
|
|
262
|
+
column: ((_this$monacoEditor22 = _this.monacoEditor) === null || _this$monacoEditor22 === void 0 || (_this$monacoEditor22 = _this$monacoEditor22.getSelection()) === null || _this$monacoEditor22 === void 0 ? void 0 : _this$monacoEditor22.startColumn) || 1
|
|
251
263
|
},
|
|
252
264
|
end: {
|
|
253
|
-
line: ((_this$
|
|
254
|
-
column: ((_this$
|
|
265
|
+
line: ((_this$monacoEditor23 = _this.monacoEditor) === null || _this$monacoEditor23 === void 0 || (_this$monacoEditor23 = _this$monacoEditor23.getSelection()) === null || _this$monacoEditor23 === void 0 ? void 0 : _this$monacoEditor23.endLineNumber) || 1,
|
|
266
|
+
column: ((_this$monacoEditor24 = _this.monacoEditor) === null || _this$monacoEditor24 === void 0 || (_this$monacoEditor24 = _this$monacoEditor24.getSelection()) === null || _this$monacoEditor24 === void 0 ? void 0 : _this$monacoEditor24.endColumn) || 1
|
|
255
267
|
}
|
|
256
268
|
};
|
|
257
269
|
return selection;
|
|
258
270
|
};
|
|
259
271
|
this.setSelection = function (selection) {
|
|
260
|
-
var _this$
|
|
261
|
-
(_this$
|
|
272
|
+
var _this$monacoEditor25;
|
|
273
|
+
(_this$monacoEditor25 = _this.monacoEditor) === null || _this$monacoEditor25 === void 0 || _this$monacoEditor25.setSelection(_this.toMonacoRange(selection));
|
|
262
274
|
};
|
|
263
275
|
this.getSelections = function () {
|
|
264
|
-
var _this$
|
|
276
|
+
var _this$monacoEditor26;
|
|
265
277
|
var selections = [];
|
|
266
|
-
(_this$
|
|
278
|
+
(_this$monacoEditor26 = _this.monacoEditor) === null || _this$monacoEditor26 === void 0 || (_this$monacoEditor26 = _this$monacoEditor26.getSelections()) === null || _this$monacoEditor26 === void 0 || _this$monacoEditor26.map(function (selection) {
|
|
267
279
|
return selections.push({
|
|
268
280
|
start: {
|
|
269
281
|
line: selection.startLineNumber || 1,
|
|
@@ -278,17 +290,17 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
278
290
|
return selections;
|
|
279
291
|
};
|
|
280
292
|
this.setSelections = function (selections) {
|
|
281
|
-
var _this$
|
|
282
|
-
(_this$
|
|
293
|
+
var _this$monacoEditor27;
|
|
294
|
+
(_this$monacoEditor27 = _this.monacoEditor) === null || _this$monacoEditor27 === void 0 || _this$monacoEditor27.setSelections(selections.map(function (item) {
|
|
283
295
|
return new Selection(item.start.line, item.start.column, item.end.line, item.end.column);
|
|
284
296
|
}));
|
|
285
297
|
};
|
|
286
298
|
this.revealSelection = function (selection) {
|
|
287
|
-
var _this$
|
|
288
|
-
(_this$
|
|
299
|
+
var _this$monacoEditor28;
|
|
300
|
+
(_this$monacoEditor28 = _this.monacoEditor) === null || _this$monacoEditor28 === void 0 || _this$monacoEditor28.revealRange(_this.toMonacoRange(selection));
|
|
289
301
|
};
|
|
290
302
|
this.highlightMatches = function (matches, currentIndex) {
|
|
291
|
-
var _this$
|
|
303
|
+
var _this$monacoEditor29;
|
|
292
304
|
var currentMatch;
|
|
293
305
|
var _matches = matches.map(function (item, index) {
|
|
294
306
|
if (index === currentIndex) {
|
|
@@ -311,7 +323,7 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
311
323
|
range: _this.toMonacoMatch(item.range).range
|
|
312
324
|
});
|
|
313
325
|
});
|
|
314
|
-
_this.oldDeltaDecorations = ((_this$
|
|
326
|
+
_this.oldDeltaDecorations = ((_this$monacoEditor29 = _this.monacoEditor) === null || _this$monacoEditor29 === void 0 ? void 0 : _this$monacoEditor29.deltaDecorations(_this.oldDeltaDecorations, _matches)) || [];
|
|
315
327
|
if (currentMatch) {
|
|
316
328
|
var start = _this.getPositionAt(currentMatch.position);
|
|
317
329
|
var end = _this.getPositionAt(currentMatch.position + currentMatch.text.length);
|
|
@@ -324,8 +336,8 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
324
336
|
}
|
|
325
337
|
};
|
|
326
338
|
this.format = function () {
|
|
327
|
-
var _this$
|
|
328
|
-
(_this$
|
|
339
|
+
var _this$monacoEditor30;
|
|
340
|
+
(_this$monacoEditor30 = _this.monacoEditor) === null || _this$monacoEditor30 === void 0 || _this$monacoEditor30.trigger('libro-format', 'editor.action.formatDocument', '');
|
|
329
341
|
};
|
|
330
342
|
this._isDisposed = false;
|
|
331
343
|
this.dispose = function () {
|
|
@@ -408,8 +420,8 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
408
420
|
}, {
|
|
409
421
|
key: "lineCount",
|
|
410
422
|
get: function get() {
|
|
411
|
-
var _this$
|
|
412
|
-
return ((_this$
|
|
423
|
+
var _this$monacoEditor31;
|
|
424
|
+
return ((_this$monacoEditor31 = this.monacoEditor) === null || _this$monacoEditor31 === void 0 || (_this$monacoEditor31 = _this$monacoEditor31.getModel()) === null || _this$monacoEditor31 === void 0 ? void 0 : _this$monacoEditor31.getLineCount()) || 0;
|
|
413
425
|
}
|
|
414
426
|
}, {
|
|
415
427
|
key: "languageSpec",
|
|
@@ -498,12 +510,12 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
498
510
|
value: function () {
|
|
499
511
|
var _createEditor = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(host, config) {
|
|
500
512
|
var _this$monacoEditor$on,
|
|
501
|
-
_this$
|
|
513
|
+
_this$monacoEditor32,
|
|
502
514
|
_this3 = this,
|
|
503
515
|
_this$monacoEditor$on2,
|
|
504
|
-
_this$
|
|
516
|
+
_this$monacoEditor33,
|
|
505
517
|
_this$monacoEditor$on3,
|
|
506
|
-
_this$
|
|
518
|
+
_this$monacoEditor34;
|
|
507
519
|
var editorConfig, editorPorvider, model, options;
|
|
508
520
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
509
521
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -530,7 +542,7 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
530
542
|
model: getOrigin(model)
|
|
531
543
|
});
|
|
532
544
|
this._editor = editorPorvider.create(host, options);
|
|
533
|
-
this.toDispose.push((_this$monacoEditor$on = (_this$
|
|
545
|
+
this.toDispose.push((_this$monacoEditor$on = (_this$monacoEditor32 = this.monacoEditor) === null || _this$monacoEditor32 === void 0 ? void 0 : _this$monacoEditor32.onDidChangeModelContent(function (e) {
|
|
534
546
|
var _this3$monacoEditor;
|
|
535
547
|
var value = (_this3$monacoEditor = _this3.monacoEditor) === null || _this3$monacoEditor === void 0 ? void 0 : _this3$monacoEditor.getValue();
|
|
536
548
|
_this3.model.value = value !== null && value !== void 0 ? value : '';
|
|
@@ -543,10 +555,10 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
543
555
|
};
|
|
544
556
|
}));
|
|
545
557
|
})) !== null && _this$monacoEditor$on !== void 0 ? _this$monacoEditor$on : Disposable.NONE);
|
|
546
|
-
this.toDispose.push((_this$monacoEditor$on2 = (_this$
|
|
558
|
+
this.toDispose.push((_this$monacoEditor$on2 = (_this$monacoEditor33 = this.monacoEditor) === null || _this$monacoEditor33 === void 0 ? void 0 : _this$monacoEditor33.onDidContentSizeChange(function () {
|
|
547
559
|
_this3.updateEditorSize();
|
|
548
560
|
})) !== null && _this$monacoEditor$on2 !== void 0 ? _this$monacoEditor$on2 : Disposable.NONE);
|
|
549
|
-
this.toDispose.push((_this$monacoEditor$on3 = (_this$
|
|
561
|
+
this.toDispose.push((_this$monacoEditor$on3 = (_this$monacoEditor34 = this.monacoEditor) === null || _this$monacoEditor34 === void 0 ? void 0 : _this$monacoEditor34.onDidBlurEditorText(function () {
|
|
550
562
|
_this3.blur();
|
|
551
563
|
})) !== null && _this$monacoEditor$on3 !== void 0 ? _this$monacoEditor$on3 : Disposable.NONE);
|
|
552
564
|
this.updateEditorSize();
|
|
@@ -585,9 +597,9 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
585
597
|
key: "updateEditorSize",
|
|
586
598
|
value: function updateEditorSize() {
|
|
587
599
|
try {
|
|
588
|
-
var _this$monacoEditor$ge, _this$
|
|
600
|
+
var _this$monacoEditor$ge, _this$monacoEditor35, _this$getOption, _this$monacoEditor37;
|
|
589
601
|
this.isLayouting = true;
|
|
590
|
-
var contentHeight = (_this$monacoEditor$ge = (_this$
|
|
602
|
+
var contentHeight = (_this$monacoEditor$ge = (_this$monacoEditor35 = this.monacoEditor) === null || _this$monacoEditor35 === void 0 ? void 0 : _this$monacoEditor35.getContentHeight()) !== null && _this$monacoEditor$ge !== void 0 ? _this$monacoEditor$ge : this.defaultLineHeight;
|
|
591
603
|
var lineHeight = (_this$getOption = this.getOption('lineHeight')) !== null && _this$getOption !== void 0 ? _this$getOption : this.defaultLineHeight;
|
|
592
604
|
if (contentHeight > this.lineCount * lineHeight) {
|
|
593
605
|
this.hasHorizontalScrollbar = true;
|
|
@@ -596,8 +608,8 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
596
608
|
}
|
|
597
609
|
if (this.editorContentHeight === contentHeight) {
|
|
598
610
|
if (this.hasHorizontalScrollbar) {
|
|
599
|
-
var _this$
|
|
600
|
-
(_this$
|
|
611
|
+
var _this$monacoEditor36;
|
|
612
|
+
(_this$monacoEditor36 = this.monacoEditor) === null || _this$monacoEditor36 === void 0 || _this$monacoEditor36.layout({
|
|
601
613
|
height: contentHeight,
|
|
602
614
|
width: this.host.offsetWidth
|
|
603
615
|
});
|
|
@@ -607,7 +619,7 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
607
619
|
this.editorContentHeight = contentHeight;
|
|
608
620
|
}
|
|
609
621
|
this.host.style.height = "".concat(contentHeight + this.getOption('paddingTop') + this.getOption('paddingBottom'), "px");
|
|
610
|
-
(_this$
|
|
622
|
+
(_this$monacoEditor37 = this.monacoEditor) === null || _this$monacoEditor37 === void 0 || _this$monacoEditor37.layout({
|
|
611
623
|
width: this.host.offsetWidth,
|
|
612
624
|
height: contentHeight
|
|
613
625
|
});
|
|
@@ -623,7 +635,7 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
623
635
|
}, {
|
|
624
636
|
key: "handleCommand",
|
|
625
637
|
value: function handleCommand(commandRegistry) {
|
|
626
|
-
var _this$
|
|
638
|
+
var _this$monacoEditor38, _this$monacoEditor39, _this$monacoEditor40, _this$monacoEditor41, _this$monacoEditor42, _this$monacoEditor43;
|
|
627
639
|
// need monaco 0.34
|
|
628
640
|
editor.addKeybindingRules([{
|
|
629
641
|
// disable show command center
|
|
@@ -638,24 +650,24 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
638
650
|
keybinding: KeyCode.F9,
|
|
639
651
|
command: null
|
|
640
652
|
}]);
|
|
641
|
-
(_this$
|
|
653
|
+
(_this$monacoEditor38 = this.monacoEditor) === null || _this$monacoEditor38 === void 0 || _this$monacoEditor38.addCommand(9, function () {
|
|
642
654
|
commandRegistry.executeCommand(NotebookCommands['EnterCommandMode'].id);
|
|
643
655
|
}, '!editorHasSelection && !editorHasSelection && !editorHasMultipleSelections');
|
|
644
|
-
(_this$
|
|
656
|
+
(_this$monacoEditor39 = this.monacoEditor) === null || _this$monacoEditor39 === void 0 || _this$monacoEditor39.addCommand(2048 | 3, function () {
|
|
645
657
|
commandRegistry.executeCommand(NotebookCommands['RunCell'].id);
|
|
646
658
|
}, '!findWidgetVisible && !referenceSearchVisible');
|
|
647
|
-
(_this$
|
|
659
|
+
(_this$monacoEditor40 = this.monacoEditor) === null || _this$monacoEditor40 === void 0 || _this$monacoEditor40.addCommand(1024 | 3, function () {
|
|
648
660
|
commandRegistry.executeCommand(NotebookCommands['RunCellAndSelectNext'].id);
|
|
649
661
|
}, '!findInputFocussed');
|
|
650
|
-
(_this$
|
|
662
|
+
(_this$monacoEditor41 = this.monacoEditor) === null || _this$monacoEditor41 === void 0 || _this$monacoEditor41.addCommand(512 | 3, function () {
|
|
651
663
|
commandRegistry.executeCommand(NotebookCommands['RunCellAndInsertBelow'].id);
|
|
652
664
|
}, '!findWidgetVisible');
|
|
653
|
-
(_this$
|
|
665
|
+
(_this$monacoEditor42 = this.monacoEditor) === null || _this$monacoEditor42 === void 0 || _this$monacoEditor42.addCommand(2048 | 1024 | 83, function () {
|
|
654
666
|
commandRegistry.executeCommand(NotebookCommands['SplitCellAntCursor'].id);
|
|
655
667
|
}
|
|
656
668
|
// '!findWidgetVisible',
|
|
657
669
|
);
|
|
658
|
-
(_this$
|
|
670
|
+
(_this$monacoEditor43 = this.monacoEditor) === null || _this$monacoEditor43 === void 0 || _this$monacoEditor43.addCommand(2048 | 36, function () {
|
|
659
671
|
commandRegistry.executeCommand('libro-search:toggle');
|
|
660
672
|
}
|
|
661
673
|
// '!findWidgetVisible',
|
|
@@ -672,27 +684,12 @@ export var LibroE2Editor = (_dec = transient(), _dec2 = inject(CommandRegistry),
|
|
|
672
684
|
this.setSelections(this.model.selections);
|
|
673
685
|
}
|
|
674
686
|
}, {
|
|
675
|
-
key: "
|
|
687
|
+
key: "onCursorActivity",
|
|
676
688
|
value:
|
|
677
|
-
/**
|
|
678
|
-
* Handles a mime type change.
|
|
679
|
-
* 切换语言
|
|
680
|
-
* cell 切换没走这里
|
|
681
|
-
*/
|
|
682
|
-
function onMimeTypeChanged() {
|
|
683
|
-
var _this$monacoEditor43;
|
|
684
|
-
var model = (_this$monacoEditor43 = this.monacoEditor) === null || _this$monacoEditor43 === void 0 ? void 0 : _this$monacoEditor43.getModel();
|
|
685
|
-
if (this.languageSpec && model) {
|
|
686
|
-
editor.setModelLanguage(model, this.languageSpec.language);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
|
|
690
689
|
/**
|
|
691
690
|
* Handles a cursor activity event.
|
|
692
691
|
*/
|
|
693
|
-
|
|
694
|
-
key: "onCursorActivity",
|
|
695
|
-
value: function onCursorActivity() {
|
|
692
|
+
function onCursorActivity() {
|
|
696
693
|
// Only add selections if the editor has focus. This avoids unwanted
|
|
697
694
|
// triggering of cursor activity due to collaborator actions.
|
|
698
695
|
if (this.hasFocus()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-cofine-editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libro",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@difizen/monaco-editor-core": "0.39.4",
|
|
36
|
-
"@difizen/libro-cofine-editor-core": "^0.3.
|
|
37
|
-
"@difizen/libro-cofine-textmate": "^0.3.
|
|
38
|
-
"@difizen/libro-lsp": "^0.3.
|
|
39
|
-
"@difizen/libro-code-editor": "^0.3.
|
|
40
|
-
"@difizen/libro-common": "^0.3.
|
|
41
|
-
"@difizen/libro-core": "^0.3.
|
|
36
|
+
"@difizen/libro-cofine-editor-core": "^0.3.2",
|
|
37
|
+
"@difizen/libro-cofine-textmate": "^0.3.2",
|
|
38
|
+
"@difizen/libro-lsp": "^0.3.2",
|
|
39
|
+
"@difizen/libro-code-editor": "^0.3.2",
|
|
40
|
+
"@difizen/libro-common": "^0.3.2",
|
|
41
|
+
"@difizen/libro-core": "^0.3.2",
|
|
42
42
|
"@difizen/mana-app": "latest",
|
|
43
43
|
"resize-observer-polyfill": "^1.5.1",
|
|
44
44
|
"vscode-languageserver-protocol": "^3.17.4",
|
package/src/libro-e2-editor.ts
CHANGED
|
@@ -702,12 +702,12 @@ export class LibroE2Editor implements IEditor {
|
|
|
702
702
|
* 切换语言
|
|
703
703
|
* cell 切换没走这里
|
|
704
704
|
*/
|
|
705
|
-
protected onMimeTypeChanged()
|
|
705
|
+
protected onMimeTypeChanged = () => {
|
|
706
706
|
const model = this.monacoEditor?.getModel();
|
|
707
707
|
if (this.languageSpec && model) {
|
|
708
708
|
editor.setModelLanguage(model, this.languageSpec.language);
|
|
709
709
|
}
|
|
710
|
-
}
|
|
710
|
+
};
|
|
711
711
|
|
|
712
712
|
/**
|
|
713
713
|
* Handles a cursor activity event.
|