@difizen/libro-code-editor 0.1.2 → 0.1.4
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.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ import { Deferred, Emitter, BaseView, ThemeService } from '@difizen/mana-app';
|
|
|
3
3
|
import { CodeEditorInfoManager } from './code-editor-info-manager.js';
|
|
4
4
|
import type { CodeEditorFactory } from './code-editor-manager.js';
|
|
5
5
|
import type { IModel } from './code-editor-model.js';
|
|
6
|
-
import type { CompletionProvider, IEditorConfig, IEditorSelectionStyle, TooltipProvider } from './code-editor-protocol.js';
|
|
7
|
-
import type { IEditor } from './code-editor-protocol.js';
|
|
6
|
+
import type { CompletionProvider, IEditorConfig, IEditor, IEditorSelectionStyle, TooltipProvider } from './code-editor-protocol.js';
|
|
8
7
|
import { CodeEditorSettings } from './code-editor-settings.js';
|
|
9
8
|
export declare const CodeEditorRender: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>>;
|
|
10
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-editor-view.d.ts","sourceRoot":"","sources":["../src/code-editor-view.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"code-editor-view.d.ts","sourceRoot":"","sources":["../src/code-editor-view.tsx"],"names":[],"mappings":";AACA,OAAO,EAGL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,YAAY,EAGb,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,kBAAkB,EAElB,aAAa,EACb,OAAO,EACP,qBAAqB,EACrB,eAAe,EAChB,MAAM,2BAA2B,CA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,IAAI,CAWhD;IAEF;;OAEG;IACH,SAAS,CAAC,YAAY,UAAW,SAAS,KAAG,IAAI,CAa/C;IAEF;;OAEG;IACH,SAAS,CAAC,QAAQ,UAAW,SAAS,KAAG,IAAI,CA+B3C;CACH;AAED;;GAEG;AACH;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,SAAS,aAAa,GAAG,aAAa;IACjF;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
package/es/code-editor-view.js
CHANGED
|
@@ -23,9 +23,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
23
23
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
24
|
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
25
25
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
|
|
26
|
-
// Copyright (c) Jupyter Development Team.
|
|
27
|
-
// Distributed under the terms of the Modified BSD License.
|
|
28
|
-
|
|
29
26
|
import { getOrigin, prop } from '@difizen/mana-app';
|
|
30
27
|
import { inject, transient, Deferred, Emitter, BaseView, ThemeService, view, ViewOption } from '@difizen/mana-app';
|
|
31
28
|
import { forwardRef, memo } from 'react';
|
|
@@ -89,6 +86,7 @@ export var CodeEditorView = (_dec = transient(), _dec2 = view('code-editor-view'
|
|
|
89
86
|
};
|
|
90
87
|
_this.onViewUnmount = function () {
|
|
91
88
|
var _this$editorHostRef;
|
|
89
|
+
_this.editor.dispose();
|
|
92
90
|
if (_this.editor.dispose) {
|
|
93
91
|
_this.editor.dispose();
|
|
94
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@difizen/libro-code-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"libro",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@difizen/mana-app": "latest",
|
|
36
36
|
"@difizen/mana-l10n": "latest",
|
|
37
|
-
"@difizen/libro-common": "^0.1.
|
|
37
|
+
"@difizen/libro-common": "^0.1.4",
|
|
38
38
|
"uuid": "^9.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
package/src/code-editor-view.tsx
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// Copyright (c) Jupyter Development Team.
|
|
2
|
-
// Distributed under the terms of the Modified BSD License.
|
|
3
|
-
|
|
4
1
|
import { getOrigin, prop } from '@difizen/mana-app';
|
|
5
2
|
import {
|
|
6
3
|
inject,
|
|
@@ -21,10 +18,10 @@ import type {
|
|
|
21
18
|
CompletionProvider,
|
|
22
19
|
ICoordinate,
|
|
23
20
|
IEditorConfig,
|
|
21
|
+
IEditor,
|
|
24
22
|
IEditorSelectionStyle,
|
|
25
23
|
TooltipProvider,
|
|
26
24
|
} from './code-editor-protocol.js';
|
|
27
|
-
import type { IEditor } from './code-editor-protocol.js';
|
|
28
25
|
import { CodeEditorSettings } from './code-editor-settings.js';
|
|
29
26
|
|
|
30
27
|
export const CodeEditorRender = memo(
|
|
@@ -151,6 +148,8 @@ export class CodeEditorView extends BaseView {
|
|
|
151
148
|
};
|
|
152
149
|
|
|
153
150
|
override onViewUnmount = () => {
|
|
151
|
+
this.editor.dispose();
|
|
152
|
+
|
|
154
153
|
if (this.editor.dispose) {
|
|
155
154
|
this.editor.dispose();
|
|
156
155
|
}
|