@difizen/libro-code-editor 0.0.2-alpha.0 → 0.1.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/es/code-editor-view.js +4 -4
- package/es/model.js +1 -1
- package/package.json +5 -5
- package/src/index.spec.ts +12 -0
package/es/code-editor-view.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
2
2
|
var _dec, _dec2, _dec3, _class, _class2, _descriptor;
|
|
3
3
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -73,7 +73,7 @@ export var CodeEditorView = (_dec = transient(), _dec2 = view('code-editor-view'
|
|
|
73
73
|
_this.editorReadyDeferred = new Deferred();
|
|
74
74
|
_this.onViewActive = function () {
|
|
75
75
|
var _this$editor;
|
|
76
|
-
(_this$editor = _this.editor) === null || _this$editor === void 0
|
|
76
|
+
(_this$editor = _this.editor) === null || _this$editor === void 0 || _this$editor.focus();
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* Handle the `'lm-dragenter'` event for the widget.
|
|
@@ -251,7 +251,7 @@ export var CodeEditorView = (_dec = transient(), _dec2 = view('code-editor-view'
|
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
_get(_getPrototypeOf(CodeEditorView.prototype), "dispose", this).call(this);
|
|
254
|
-
(_this$editor3 = this.editor) === null || _this$editor3 === void 0
|
|
254
|
+
(_this$editor3 = this.editor) === null || _this$editor3 === void 0 || _this$editor3.dispose();
|
|
255
255
|
}
|
|
256
256
|
}, {
|
|
257
257
|
key: "onResize",
|
|
@@ -262,7 +262,7 @@ export var CodeEditorView = (_dec = transient(), _dec2 = view('code-editor-view'
|
|
|
262
262
|
function onResize() {
|
|
263
263
|
if (this.isVisible) {
|
|
264
264
|
var _this$editor4;
|
|
265
|
-
(_this$editor4 = this.editor) === null || _this$editor4 === void 0
|
|
265
|
+
(_this$editor4 = this.editor) === null || _this$editor4 === void 0 || _this$editor4.resizeToFit();
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
}, {
|
package/es/model.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
2
2
|
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
|
|
3
3
|
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-code-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libro",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@difizen/mana-app": "
|
|
36
|
-
"@difizen/libro-common": "^0.
|
|
37
|
-
"@difizen/libro-shared-model": "^0.
|
|
35
|
+
"@difizen/mana-app": "latest",
|
|
36
|
+
"@difizen/libro-common": "^0.1.1",
|
|
37
|
+
"@difizen/libro-shared-model": "^0.1.1",
|
|
38
38
|
"uuid": "^9.0.0",
|
|
39
39
|
"vscode-languageserver-protocol": "^3.17.0"
|
|
40
40
|
},
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/react": "^18.2.25",
|
|
46
|
-
"@types/uuid": "^
|
|
46
|
+
"@types/uuid": "^9.0.2"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"setup": "father build",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import assert from 'assert';
|
|
3
|
+
|
|
4
|
+
import { CodeEditorView, CodeEditorModule, defaultMimeType } from './index.js';
|
|
5
|
+
|
|
6
|
+
describe('libro-code-editor', () => {
|
|
7
|
+
it('#import', () => {
|
|
8
|
+
assert(CodeEditorView);
|
|
9
|
+
assert(CodeEditorModule);
|
|
10
|
+
assert(defaultMimeType);
|
|
11
|
+
});
|
|
12
|
+
});
|