@eclipse-glsp/client 1.1.0-next.ee71b2a.218 → 1.1.0-next.f382a8e.231
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/css/decoration.css +1 -1
- package/lib/base/auto-complete/auto-complete-widget.d.ts +2 -2
- package/lib/base/auto-complete/auto-complete-widget.js +3 -3
- package/lib/base/command-stack.d.ts +1 -2
- package/lib/base/command-stack.d.ts.map +1 -1
- package/lib/base/command-stack.js +5 -14
- package/lib/base/command-stack.js.map +1 -1
- package/lib/base/container-modules.d.ts +15 -15
- package/lib/base/container-modules.d.ts.map +1 -1
- package/lib/base/container-modules.js +19 -25
- package/lib/base/container-modules.js.map +1 -1
- package/lib/base/di.config.d.ts +1 -1
- package/lib/base/di.config.d.ts.map +1 -1
- package/lib/base/di.config.js +7 -7
- package/lib/base/di.config.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +3 -3
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +3 -3
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.d.ts +4 -5
- package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.js +15 -8
- package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -1
- package/lib/features/bounds/di.config.d.ts +0 -16
- package/lib/features/bounds/di.config.d.ts.map +1 -1
- package/lib/features/bounds/di.config.js +12 -9
- package/lib/features/bounds/di.config.js.map +1 -1
- package/lib/features/{layout → bounds}/freeform-layout.d.ts +2 -2
- package/lib/features/{layout → bounds}/freeform-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/freeform-layout.js +2 -2
- package/lib/features/{layout → bounds}/freeform-layout.js.map +1 -1
- package/lib/features/bounds/freeform-layout.spec.d.ts.map +1 -0
- package/lib/features/{layout/tests → bounds}/freeform-layout.spec.js +37 -37
- package/lib/features/bounds/freeform-layout.spec.js.map +1 -0
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.js +3 -2
- package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.d.ts +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.js +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.js.map +1 -1
- package/lib/features/bounds/hbox-layout.spec.d.ts.map +1 -0
- package/lib/features/{layout/tests → bounds}/hbox-layout.spec.js +18 -18
- package/lib/features/bounds/hbox-layout.spec.js.map +1 -0
- package/lib/features/{layout/tests/layouter-test-util.d.ts → bounds/layouter-test-util.spec.d.ts} +2 -3
- package/lib/features/bounds/layouter-test-util.spec.d.ts.map +1 -0
- package/lib/features/{layout/tests/layouter-test-util.js → bounds/layouter-test-util.spec.js} +6 -6
- package/lib/features/bounds/layouter-test-util.spec.js.map +1 -0
- package/lib/features/{layout → bounds}/layouter.d.ts +1 -1
- package/lib/features/{layout → bounds}/layouter.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/layouter.js +1 -1
- package/lib/features/{layout → bounds}/layouter.js.map +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.d.ts +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.js +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.js.map +1 -1
- package/lib/features/bounds/vbox-layout.spec.d.ts.map +1 -0
- package/lib/features/{layout/tests → bounds}/vbox-layout.spec.js +18 -18
- package/lib/features/bounds/vbox-layout.spec.js.map +1 -0
- package/lib/features/command-palette/command-palette-tool.d.ts +1 -1
- package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-tool.js +3 -3
- package/lib/features/command-palette/command-palette-tool.js.map +1 -1
- package/lib/features/command-palette/di.config.d.ts +0 -15
- package/lib/features/command-palette/di.config.d.ts.map +1 -1
- package/lib/features/command-palette/di.config.js +6 -7
- package/lib/features/command-palette/di.config.js.map +1 -1
- package/lib/features/context-menu/di.config.d.ts +0 -15
- package/lib/features/context-menu/di.config.d.ts.map +1 -1
- package/lib/features/context-menu/di.config.js +4 -3
- package/lib/features/context-menu/di.config.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.d.ts +2 -2
- package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.js +5 -5
- package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
- package/lib/features/decoration/di.config.d.ts +0 -15
- package/lib/features/decoration/di.config.d.ts.map +1 -1
- package/lib/features/decoration/di.config.js +4 -4
- package/lib/features/decoration/di.config.js.map +1 -1
- package/lib/features/edit-label/di.config.d.ts +0 -15
- package/lib/features/edit-label/di.config.d.ts.map +1 -1
- package/lib/features/edit-label/di.config.js +3 -2
- package/lib/features/edit-label/di.config.js.map +1 -1
- package/lib/features/export/di.config.d.ts +0 -15
- package/lib/features/export/di.config.d.ts.map +1 -1
- package/lib/features/export/di.config.js +6 -5
- package/lib/features/export/di.config.js.map +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts.map +1 -1
- package/lib/features/export/glsp-svg-exporter.js +1 -2
- package/lib/features/export/glsp-svg-exporter.js.map +1 -1
- package/lib/features/hover/di.config.d.ts +0 -15
- package/lib/features/hover/di.config.d.ts.map +1 -1
- package/lib/features/hover/di.config.js +7 -7
- package/lib/features/hover/di.config.js.map +1 -1
- package/lib/features/layout/di.config.d.ts +1 -1
- package/lib/features/layout/di.config.d.ts.map +1 -1
- package/lib/features/layout/di.config.js +1 -9
- package/lib/features/layout/di.config.js.map +1 -1
- package/lib/features/navigation/di.config.d.ts +2 -1
- package/lib/features/navigation/di.config.d.ts.map +1 -1
- package/lib/features/navigation/di.config.js +3 -3
- package/lib/features/navigation/di.config.js.map +1 -1
- package/lib/features/navigation/navigation-action-handler.d.ts +2 -2
- package/lib/features/navigation/navigation-action-handler.js +2 -2
- package/lib/features/save/di.config.d.ts +0 -15
- package/lib/features/save/di.config.d.ts.map +1 -1
- package/lib/features/save/di.config.js +3 -2
- package/lib/features/save/di.config.js.map +1 -1
- package/lib/features/select/di.config.d.ts +0 -15
- package/lib/features/select/di.config.d.ts.map +1 -1
- package/lib/features/select/di.config.js +8 -7
- package/lib/features/select/di.config.js.map +1 -1
- package/lib/features/select/selection-service.spec.js +19 -3
- package/lib/features/select/selection-service.spec.js.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +2 -2
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js +3 -3
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts +6 -6
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.js +4 -8
- package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/di.config.d.ts +0 -15
- package/lib/features/tool-feedback/di.config.d.ts.map +1 -1
- package/lib/features/tool-feedback/di.config.js +20 -18
- package/lib/features/tool-feedback/di.config.js.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +1 -2
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +1 -7
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tool-palette/di.config.d.ts +0 -15
- package/lib/features/tool-palette/di.config.d.ts.map +1 -1
- package/lib/features/tool-palette/di.config.js +4 -4
- package/lib/features/tool-palette/di.config.js.map +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds-tool.js +6 -6
- package/lib/features/tools/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/di.config.d.ts +18 -5
- package/lib/features/tools/di.config.d.ts.map +1 -1
- package/lib/features/tools/di.config.js +14 -15
- package/lib/features/tools/di.config.js.map +1 -1
- package/lib/features/tools/glsp-manhattan-edge-router.d.ts +2 -2
- package/lib/features/tools/glsp-manhattan-edge-router.d.ts.map +1 -1
- package/lib/features/tools/glsp-manhattan-edge-router.js +4 -4
- package/lib/features/tools/glsp-manhattan-edge-router.js.map +1 -1
- package/lib/features/validation/di.config.js +4 -4
- package/lib/features/validation/di.config.js.map +1 -1
- package/lib/features/viewport/di.config.d.ts +0 -15
- package/lib/features/viewport/di.config.d.ts.map +1 -1
- package/lib/features/viewport/di.config.js +12 -11
- package/lib/features/viewport/di.config.js.map +1 -1
- package/lib/index.d.ts +26 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +33 -4
- package/lib/index.js.map +1 -1
- package/lib/sprotty-reexport.d.ts +2 -2
- package/lib/sprotty-reexport.d.ts.map +1 -1
- package/lib/sprotty-reexport.js +4 -4
- package/lib/sprotty-reexport.js.map +1 -1
- package/lib/utils/smodel-util.d.ts +1 -1
- package/lib/utils/smodel-util.d.ts.map +1 -1
- package/lib/utils/smodel-util.js +1 -1
- package/lib/utils/smodel-util.js.map +1 -1
- package/lib/views/base-view-module.d.ts +18 -6
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +1 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/lib/views/glsp-edge-view.d.ts +2 -2
- package/lib/views/glsp-edge-view.d.ts.map +1 -1
- package/lib/views/glsp-edge-view.js +2 -2
- package/lib/views/glsp-edge-view.js.map +1 -1
- package/lib/views/index.d.ts +1 -1
- package/lib/views/index.js +1 -1
- package/lib/views/rounded-corner-view.js +2 -2
- package/lib/views/rounded-corner.d.ts +1 -1
- package/lib/views/rounded-corner.js +1 -1
- package/package.json +3 -3
- package/src/base/auto-complete/auto-complete-widget.ts +3 -3
- package/src/base/command-stack.ts +13 -11
- package/src/base/container-modules.ts +18 -31
- package/src/base/di.config.ts +8 -8
- package/src/base/editor-context-service.ts +4 -4
- package/src/base/tool-manager/glsp-tool-manager.ts +15 -12
- package/src/features/bounds/di.config.ts +21 -11
- package/src/features/{layout/tests → bounds}/freeform-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/freeform-layout.ts +2 -2
- package/src/features/bounds/glsp-hidden-bounds-updater.ts +4 -7
- package/src/features/{layout/tests → bounds}/hbox-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/hbox-layout.ts +1 -1
- package/src/features/{layout/tests/layouter-test-util.ts → bounds/layouter-test-util.spec.ts} +5 -5
- package/src/features/{layout → bounds}/layouter.ts +1 -1
- package/src/features/{layout/tests → bounds}/vbox-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/vbox-layout.ts +1 -1
- package/src/features/command-palette/command-palette-tool.ts +3 -3
- package/src/features/command-palette/di.config.ts +6 -7
- package/src/features/context-menu/di.config.ts +4 -3
- package/src/features/copy-paste/copy-paste-handler.ts +5 -5
- package/src/features/decoration/di.config.ts +4 -4
- package/src/features/edit-label/di.config.ts +3 -2
- package/src/features/export/di.config.ts +6 -5
- package/src/features/export/glsp-svg-exporter.ts +8 -7
- package/src/features/hover/di.config.ts +8 -7
- package/src/features/layout/di.config.ts +2 -11
- package/src/features/navigation/di.config.ts +4 -2
- package/src/features/navigation/navigation-action-handler.ts +2 -2
- package/src/features/save/di.config.ts +3 -2
- package/src/features/select/di.config.ts +8 -7
- package/src/features/select/selection-service.spec.ts +4 -5
- package/src/features/tool-feedback/change-bounds-tool-feedback.ts +3 -3
- package/src/features/tool-feedback/creation-tool-feedback.ts +20 -14
- package/src/features/tool-feedback/di.config.ts +20 -18
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +1 -9
- package/src/features/tool-palette/di.config.ts +4 -4
- package/src/features/tools/change-bounds-tool.ts +7 -7
- package/src/features/tools/di.config.ts +18 -19
- package/src/features/tools/glsp-manhattan-edge-router.ts +8 -5
- package/src/features/validation/di.config.ts +5 -5
- package/src/features/viewport/di.config.ts +13 -11
- package/src/index.ts +33 -4
- package/src/sprotty-reexport.ts +18 -8
- package/src/utils/smodel-util.ts +12 -5
- package/src/views/base-view-module.ts +4 -9
- package/src/views/glsp-edge-view.tsx +3 -3
- package/src/views/index.ts +1 -2
- package/src/views/rounded-corner-view.tsx +2 -2
- package/src/views/rounded-corner.ts +2 -2
- package/lib/features/layout/tests/freeform-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/freeform-layout.spec.js.map +0 -1
- package/lib/features/layout/tests/hbox-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/hbox-layout.spec.js.map +0 -1
- package/lib/features/layout/tests/layouter-test-util.d.ts.map +0 -1
- package/lib/features/layout/tests/layouter-test-util.js.map +0 -1
- package/lib/features/layout/tests/vbox-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/vbox-layout.spec.js.map +0 -1
- /package/lib/features/{layout/tests → bounds}/freeform-layout.spec.d.ts +0 -0
- /package/lib/features/{layout/tests → bounds}/hbox-layout.spec.d.ts +0 -0
- /package/lib/features/{layout/tests → bounds}/vbox-layout.spec.d.ts +0 -0
package/css/decoration.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -77,7 +77,7 @@ export declare class AutoCompleteWidget {
|
|
|
77
77
|
protected doUpdateSuggestions(text: string, root: Readonly<SModelRoot>, ...contextElementIds: string[]): Promise<LabeledAction[]>;
|
|
78
78
|
protected onLoaded(_success: 'success' | 'error'): void;
|
|
79
79
|
protected renderSuggestions(item: LabeledAction, value: string): HTMLDivElement;
|
|
80
|
-
protected
|
|
80
|
+
protected escapeForRegExp(value: string): string;
|
|
81
81
|
protected renderIcon(itemElement: HTMLDivElement, icon: string): void;
|
|
82
82
|
protected filterActions(filterText: string, actions: LabeledAction[]): LabeledAction[];
|
|
83
83
|
protected onSelect(item: LabeledAction): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toActionArray = exports.AutoCompleteWidget = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2020-
|
|
5
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -162,7 +162,7 @@ class AutoCompleteWidget {
|
|
|
162
162
|
}
|
|
163
163
|
renderSuggestions(item, value) {
|
|
164
164
|
const itemElement = document.createElement('div');
|
|
165
|
-
const wordMatcher = this.
|
|
165
|
+
const wordMatcher = this.escapeForRegExp(value).split(' ').join('|');
|
|
166
166
|
const regex = new RegExp(wordMatcher, 'gi');
|
|
167
167
|
if (item.icon) {
|
|
168
168
|
this.renderIcon(itemElement, item.icon);
|
|
@@ -170,7 +170,7 @@ class AutoCompleteWidget {
|
|
|
170
170
|
itemElement.innerHTML += item.label.replace(regex, match => '<em>' + match + '</em>');
|
|
171
171
|
return itemElement;
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
escapeForRegExp(value) {
|
|
174
174
|
return value.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
|
|
175
175
|
}
|
|
176
176
|
renderIcon(itemElement, icon) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CommandStack,
|
|
1
|
+
import { CommandStack, SModelRoot } from 'sprotty';
|
|
2
2
|
export declare class GLSPCommandStack extends CommandStack {
|
|
3
|
-
protected actionDispatcher: () => Promise<IActionDispatcher>;
|
|
4
3
|
undo(): Promise<SModelRoot>;
|
|
5
4
|
redo(): Promise<SModelRoot>;
|
|
6
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-stack.d.ts","sourceRoot":"","sources":["../../src/base/command-stack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-stack.d.ts","sourceRoot":"","sources":["../../src/base/command-stack.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnD,qBACa,gBAAiB,SAAQ,YAAY;IACrC,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;IAQ3B,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC;CAOvC"}
|
|
@@ -5,13 +5,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
9
|
exports.GLSPCommandStack = void 0;
|
|
13
10
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2019-
|
|
11
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
15
12
|
*
|
|
16
13
|
* This program and the accompanying materials are made available under the
|
|
17
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -25,24 +22,18 @@ exports.GLSPCommandStack = void 0;
|
|
|
25
22
|
*
|
|
26
23
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
24
|
********************************************************************************/
|
|
28
|
-
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
29
25
|
const inversify_1 = require("inversify");
|
|
30
26
|
const sprotty_1 = require("sprotty");
|
|
31
|
-
const types_1 = require("./types");
|
|
32
27
|
let GLSPCommandStack = class GLSPCommandStack extends sprotty_1.CommandStack {
|
|
33
28
|
undo() {
|
|
34
|
-
this.
|
|
35
|
-
return this.
|
|
29
|
+
this.logger.warn(this, 'GLSPCommandStack.undo() was called. This should never happen as the GLSP server is responsible for handling undo requests');
|
|
30
|
+
return this.currentModel;
|
|
36
31
|
}
|
|
37
32
|
redo() {
|
|
38
|
-
this.
|
|
39
|
-
return this.
|
|
33
|
+
this.logger.warn(this, 'GLSPCommandStack.redo() was called. This should never happen as the GLSP server is responsible for handling redo requests');
|
|
34
|
+
return this.currentModel;
|
|
40
35
|
}
|
|
41
36
|
};
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, inversify_1.inject)(types_1.TYPES.IActionDispatcherProvider),
|
|
44
|
-
__metadata("design:type", Function)
|
|
45
|
-
], GLSPCommandStack.prototype, "actionDispatcher", void 0);
|
|
46
37
|
GLSPCommandStack = __decorate([
|
|
47
38
|
(0, inversify_1.injectable)()
|
|
48
39
|
], GLSPCommandStack);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-stack.js","sourceRoot":"","sources":["../../src/base/command-stack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-stack.js","sourceRoot":"","sources":["../../src/base/command-stack.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AACvC,qCAAmD;AAG5C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,sBAAY;IACrC,IAAI;QACT,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,IAAI,EACJ,2HAA2H,CAC9H,CAAC;QACF,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAEQ,IAAI;QACT,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,IAAI,EACJ,2HAA2H,CAC9H,CAAC;QACF,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;CACJ,CAAA;AAhBY,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAgB5B;AAhBY,4CAAgB"}
|
|
@@ -13,18 +13,24 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import { ContainerConfiguration } from '@eclipse-glsp/protocol';
|
|
16
17
|
import { Container, ContainerModule } from 'inversify';
|
|
17
18
|
export declare const DEFAULT_MODULES: readonly [ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule];
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
21
|
+
* Additional modules can be passed as direct arguments or as part of a {@link ModuleConfiguration}.
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const container= createDiagramContainer(myModule1, myModule2)
|
|
24
|
+
* // or
|
|
25
|
+
* const container= createDiagramContainer({ add: [myModule1, myModule2]})
|
|
26
|
+
* ```
|
|
27
|
+
* Default modules can be excluded using {@link ModuleConfiguration}s.
|
|
22
28
|
* This means, you can still customize the default modules in two ways.
|
|
23
29
|
*
|
|
24
30
|
* First, you can exclude default modules and add a module with your custom code.
|
|
25
31
|
*
|
|
26
32
|
* ```typescript
|
|
27
|
-
* const container = createDiagramContainer(
|
|
33
|
+
* const container = createDiagramContainer({ add:myModelSourceWatcherModule, remove: modelSourceWatcherModule} );
|
|
28
34
|
* ```
|
|
29
35
|
*
|
|
30
36
|
* Second, you can unbind or rebind implementations that are originally bound in one of the default modules.
|
|
@@ -33,17 +39,11 @@ export declare const DEFAULT_MODULES: readonly [ContainerModule, ContainerModule
|
|
|
33
39
|
* rebind(NavigationTargetResolver).to(MyNavigationTargetResolver);
|
|
34
40
|
* ```
|
|
35
41
|
*
|
|
36
|
-
* @param
|
|
37
|
-
*
|
|
38
|
-
* @returns The
|
|
39
|
-
*/
|
|
40
|
-
export declare function createDiagramContainer(...customModules: Array<ContainerModule | ExcludeDescription>): Container;
|
|
41
|
-
/**
|
|
42
|
-
* Can be passed to the {@link createDiagramContainer} utility function to exclude (i.e. not load) a specific default module.
|
|
42
|
+
* @param containerConfiguration
|
|
43
|
+
* Custom modules to be loaded in addition to the default modules and/or default modules that should be excluded.
|
|
44
|
+
* @returns The initialized container.
|
|
43
45
|
*/
|
|
44
|
-
export
|
|
45
|
-
exclude: ContainerModule;
|
|
46
|
-
}
|
|
46
|
+
export declare function initializeDiagramContainer(container: Container, ...containerConfiguration: ContainerConfiguration): Container;
|
|
47
47
|
/**
|
|
48
48
|
* Creates a GLSP Client container with the GLSP default modules and the specified custom `modules`.
|
|
49
49
|
*
|
|
@@ -64,7 +64,7 @@ export interface ExcludeDescription {
|
|
|
64
64
|
* ```
|
|
65
65
|
* @param modules Custom modules to be loaded in addition to the default modules.
|
|
66
66
|
* @returns The created container.
|
|
67
|
-
* @deprecated Please use `
|
|
67
|
+
* @deprecated Please use `initializeDiagramContainer` from `@eclipse-glsp/client` instead
|
|
68
68
|
*/
|
|
69
69
|
export declare function createClientContainer(...modules: ContainerModule[]): Container;
|
|
70
70
|
//# sourceMappingURL=container-modules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-modules.d.ts","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;
|
|
1
|
+
{"version":3,"file":"container-modules.d.ts","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,sBAAsB,EAAuB,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmCvD,eAAO,MAAM,eAAe,4jBAkClB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAE7H;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS,CAE9E"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.createClientContainer = exports.
|
|
18
|
+
exports.createClientContainer = exports.initializeDiagramContainer = exports.DEFAULT_MODULES = void 0;
|
|
19
19
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
20
|
const inversify_1 = require("inversify");
|
|
21
21
|
const sprotty_1 = require("sprotty");
|
|
@@ -64,7 +64,7 @@ exports.DEFAULT_MODULES = [
|
|
|
64
64
|
di_config_8.default,
|
|
65
65
|
sprotty_1.modelSourceModule,
|
|
66
66
|
di_config_14.default,
|
|
67
|
-
di_config_12.
|
|
67
|
+
di_config_12.default,
|
|
68
68
|
sprotty_1.openModule,
|
|
69
69
|
di_config_16.default,
|
|
70
70
|
sprotty_1.routingModule,
|
|
@@ -75,15 +75,20 @@ exports.DEFAULT_MODULES = [
|
|
|
75
75
|
sprotty_1.zorderModule
|
|
76
76
|
];
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
78
|
+
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
79
|
+
* Additional modules can be passed as direct arguments or as part of a {@link ModuleConfiguration}.
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const container= createDiagramContainer(myModule1, myModule2)
|
|
82
|
+
* // or
|
|
83
|
+
* const container= createDiagramContainer({ add: [myModule1, myModule2]})
|
|
84
|
+
* ```
|
|
85
|
+
* Default modules can be excluded using {@link ModuleConfiguration}s.
|
|
81
86
|
* This means, you can still customize the default modules in two ways.
|
|
82
87
|
*
|
|
83
88
|
* First, you can exclude default modules and add a module with your custom code.
|
|
84
89
|
*
|
|
85
90
|
* ```typescript
|
|
86
|
-
* const container = createDiagramContainer(
|
|
91
|
+
* const container = createDiagramContainer({ add:myModelSourceWatcherModule, remove: modelSourceWatcherModule} );
|
|
87
92
|
* ```
|
|
88
93
|
*
|
|
89
94
|
* Second, you can unbind or rebind implementations that are originally bound in one of the default modules.
|
|
@@ -92,25 +97,14 @@ exports.DEFAULT_MODULES = [
|
|
|
92
97
|
* rebind(NavigationTargetResolver).to(MyNavigationTargetResolver);
|
|
93
98
|
* ```
|
|
94
99
|
*
|
|
95
|
-
* @param
|
|
96
|
-
*
|
|
97
|
-
* @returns The
|
|
100
|
+
* @param containerConfiguration
|
|
101
|
+
* Custom modules to be loaded in addition to the default modules and/or default modules that should be excluded.
|
|
102
|
+
* @returns The initialized container.
|
|
98
103
|
*/
|
|
99
|
-
function
|
|
100
|
-
|
|
101
|
-
const modules = [...exports.DEFAULT_MODULES];
|
|
102
|
-
customModules.forEach(customModule => {
|
|
103
|
-
if (customModule instanceof inversify_1.ContainerModule) {
|
|
104
|
-
modules.push(customModule);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
(0, protocol_1.remove)(modules, customModule.exclude);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
container.load(...modules);
|
|
111
|
-
return container;
|
|
104
|
+
function initializeDiagramContainer(container, ...containerConfiguration) {
|
|
105
|
+
return (0, protocol_1.initializeContainer)(container, ...exports.DEFAULT_MODULES, ...containerConfiguration);
|
|
112
106
|
}
|
|
113
|
-
exports.
|
|
107
|
+
exports.initializeDiagramContainer = initializeDiagramContainer;
|
|
114
108
|
/**
|
|
115
109
|
* Creates a GLSP Client container with the GLSP default modules and the specified custom `modules`.
|
|
116
110
|
*
|
|
@@ -131,10 +125,10 @@ exports.createDiagramContainer = createDiagramContainer;
|
|
|
131
125
|
* ```
|
|
132
126
|
* @param modules Custom modules to be loaded in addition to the default modules.
|
|
133
127
|
* @returns The created container.
|
|
134
|
-
* @deprecated Please use `
|
|
128
|
+
* @deprecated Please use `initializeDiagramContainer` from `@eclipse-glsp/client` instead
|
|
135
129
|
*/
|
|
136
130
|
function createClientContainer(...modules) {
|
|
137
|
-
return
|
|
131
|
+
return initializeDiagramContainer(new inversify_1.Container(), ...modules);
|
|
138
132
|
}
|
|
139
133
|
exports.createClientContainer = createClientContainer;
|
|
140
134
|
//# sourceMappingURL=container-modules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-modules.js","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,
|
|
1
|
+
{"version":3,"file":"container-modules.js","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,qDAAqF;AACrF,yCAAuD;AACvD,qCAYiB;AACjB,4DAA4D;AAC5D,qEAA6E;AAC7E,kEAAuE;AACvE,gEAA6E;AAC7E,gEAAoE;AACpE,gEAAmE;AACnE,4DAA4D;AAC5D,2DAA2D;AAC3D,2DAA0D;AAC1D,6DAAwD;AACxD,iEAAmE;AACnE,iEAAgE;AAChE,6DAA4D;AAC5D,2EAAkF;AAClF,oEAAqE;AACrE,mEAAmE;AACnE,4DAA+F;AAC/F,iEAA2F;AAC3F,+DAAgE;AAChE,4CAA4C;AAE/B,QAAA,eAAe,GAAG;IAC3B,uBAAa;IACb,oBAAiB;IACjB,sBAAY;IACZ,gCAAsB;IACtB,0BAAgB;IAChB,sBAAY;IACZ,mBAAgB;IAChB,oBAAU;IACV,mBAAgB;IAChB,mBAAwB;IACxB,mBAAqB;IACrB,mBAAoB;IACpB,mBAAmB;IACnB,mBAAe;IACf,oBAAmB;IACnB,oBAAgB;IAChB,qCAAyB;IACzB,oBAAkB;IAClB,2BAAiB;IACjB,oBAAY;IACZ,kCAAqB;IACrB,mBAAgB;IAChB,2BAAiB;IACjB,oBAAwB;IACxB,oBAAgB;IAChB,oBAAU;IACV,oBAAiB;IACjB,uBAAa;IACb,oBAAkB;IAClB,wBAAW;IACX,gDAAmC;IACnC,6BAAgB;IAChB,sBAAY;CACN,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,0BAA0B,CAAC,SAAoB,EAAE,GAAG,sBAA8C;IAC9G,OAAO,IAAA,8BAAmB,EAAC,SAAS,EAAE,GAAG,uBAAe,EAAE,GAAG,sBAAsB,CAAC,CAAC;AACzF,CAAC;AAFD,gEAEC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,qBAAqB,CAAC,GAAG,OAA0B;IAC/D,OAAO,0BAA0B,CAAC,IAAI,qBAAS,EAAE,EAAE,GAAG,OAAO,CAAC,CAAC;AACnE,CAAC;AAFD,sDAEC"}
|
package/lib/base/di.config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/base/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../src/base/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAA+B,gBAAgB,EAAqB,MAAM,wBAAwB,CAAC;AAC1G,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,4BAA4B,CAAC;AAcpC,QAAA,MAAM,iBAAiB,iBAoCrB,CAAC;AAEH,eAAe,iBAAiB,CAAC;AAEjC;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ/H"}
|
package/lib/base/di.config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.configureServerActions = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2019-
|
|
5
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -50,16 +50,16 @@ const defaultGLSPModule = new inversify_1.ContainerModule((bind, _unbind, isBoun
|
|
|
50
50
|
// Model update initialization ------------------------------------
|
|
51
51
|
(0, sprotty_1.configureCommand)(context, update_model_command_1.FeedbackAwareUpdateModelCommand);
|
|
52
52
|
(0, sprotty_1.configureActionHandler)(context, sprotty_1.SetModelCommand.KIND, update_model_command_1.SetModelActionHandler);
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
(0, protocol_1.bindAsService)(context, types_1.TYPES.MouseListener, selection_clearing_mouse_listener_1.SelectionClearingMouseListener);
|
|
54
|
+
(0, protocol_1.bindOrRebind)(context, types_1.TYPES.ICommandStack).to(command_stack_1.GLSPCommandStack);
|
|
55
55
|
bind(glsp_tool_manager_1.GLSPToolManager).toSelf().inSingletonScope();
|
|
56
|
-
|
|
56
|
+
(0, protocol_1.bindOrRebind)(context, types_1.TYPES.IToolManager).toService(glsp_tool_manager_1.GLSPToolManager);
|
|
57
57
|
bind(action_dispatcher_1.GLSPActionDispatcher).toSelf().inSingletonScope();
|
|
58
|
-
|
|
58
|
+
(0, protocol_1.bindOrRebind)(context, types_1.TYPES.IActionDispatcher).toService(action_dispatcher_1.GLSPActionDispatcher);
|
|
59
59
|
bind(model_initialization_constraint_1.ModelInitializationConstraint).to(model_initialization_constraint_1.DefaultModelInitializationConstraint).inSingletonScope();
|
|
60
60
|
// support re-registration of model elements and views
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
(0, protocol_1.bindOrRebind)(context, types_1.TYPES.SModelRegistry).to(model_registry_1.GLSPModelRegistry).inSingletonScope();
|
|
62
|
+
(0, protocol_1.bindOrRebind)(context, types_1.TYPES.ViewRegistry).to(view_registry_1.GLSPViewRegistry).inSingletonScope();
|
|
63
63
|
});
|
|
64
64
|
exports.default = defaultGLSPModule;
|
|
65
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../src/base/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../src/base/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA0G;AAC1G,6CAA2C;AAC3C,yCAAuD;AACvD,qCAAwH;AACxH,sCAAoC;AACpC,2DAA2D;AAC3D,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,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,0FAA0F,WAAW,GAAG,CAAC,CAAC;KAC7H;IACD,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AACjG,CAAC;AARD,wDAQC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -17,7 +17,7 @@ import { Action, Args, EditorContext } from '@eclipse-glsp/protocol';
|
|
|
17
17
|
import { IActionHandler, ModelSource, MousePositionTracker, SModelElement, SModelRoot } from 'sprotty';
|
|
18
18
|
import { SelectionService } from '../features/select/selection-service';
|
|
19
19
|
export interface EditModeListener {
|
|
20
|
-
editModeChanged(newValue: string,
|
|
20
|
+
editModeChanged(newValue: string, oldValue: string): void;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* The `EditorContextService` is a central injectable component that gives read-only access to
|
|
@@ -42,7 +42,7 @@ export declare class EditorContextService implements IActionHandler {
|
|
|
42
42
|
get(args?: Args): EditorContext;
|
|
43
43
|
getWithSelection(selectedElementIds: string[], args?: Args): EditorContext;
|
|
44
44
|
handle(action: Action): void;
|
|
45
|
-
protected
|
|
45
|
+
protected notifyEditModeListeners(oldValue: string): void;
|
|
46
46
|
getSourceUri(): Promise<string | undefined>;
|
|
47
47
|
get editMode(): string;
|
|
48
48
|
get modelRoot(): Readonly<SModelRoot>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.d.ts","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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B,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.EditorContextService = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2020-
|
|
14
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
15
15
|
*
|
|
16
16
|
* This program and the accompanying materials are made available under the
|
|
17
17
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -71,10 +71,10 @@ let EditorContextService = class EditorContextService {
|
|
|
71
71
|
if (protocol_1.SetEditModeAction.is(action)) {
|
|
72
72
|
const oldValue = this._editMode;
|
|
73
73
|
this._editMode = action.editMode;
|
|
74
|
-
this.
|
|
74
|
+
this.notifyEditModeListeners(oldValue);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
notifyEditModeListeners(oldValue) {
|
|
78
78
|
this.editModeListeners.forEach(listener => listener.editModeChanged(oldValue, this.editMode));
|
|
79
79
|
}
|
|
80
80
|
async getSourceUri() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuH;AACvH,yCAAsE;AACtE,qCAAuG;AACvG,4EAAwE;AACxE,yDAAsD;AACtD,mCAAgC;AAMhC;;;;;;;;;;;GAWG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QASO,sBAAiB,GAAuB,EAAE,CAAC;IAkEzD,CAAC;IA3DG,QAAQ,CAAC,gBAAkC;QACvC,IAAA,sBAAW,EAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU,CAAC,gBAAkC;QACzC,IAAA,iBAAM,EAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IACrD,CAAC;IAED,GAAG,CAAC,IAAW;QACX,OAAO;YACH,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,CAAC;YAC7E,iBAAiB,EAAE,IAAI,CAAC,oBAAoB,CAAC,qBAAqB;YAClE,IAAI;SACP,CAAC;IACN,CAAC;IAED,gBAAgB,CAAC,kBAA4B,EAAE,IAAW;QACtD,OAAO;YACH,kBAAkB;YAClB,iBAAiB,EAAE,IAAI,CAAC,oBAAoB,CAAC,qBAAqB;YAClE,IAAI;SACP,CAAC;IACN,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,IAAI,4BAAiB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YAC9B,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;YACjC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuH;AACvH,yCAAsE;AACtE,qCAAuG;AACvG,4EAAwE;AACxE,yDAAsD;AACtD,mCAAgC;AAMhC;;;;;;;;;;;GAWG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QASO,sBAAiB,GAAuB,EAAE,CAAC;IAkEzD,CAAC;IA3DG,QAAQ,CAAC,gBAAkC;QACvC,IAAA,sBAAW,EAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU,CAAC,gBAAkC;QACzC,IAAA,iBAAM,EAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;IACrD,CAAC;IAED,GAAG,CAAC,IAAW;QACX,OAAO;YACH,kBAAkB,EAAE,KAAK,CAA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,CAAC,QAAQ,KAAK,mBAAQ,CAAC,QAAQ,CAAC;IAC/C,CAAC;CACJ,CAAA;AA1EG;IAAC,IAAA,kBAAM,EAAC,aAAK,CAAC,gBAAgB,CAAC;8BACH,oCAAgB;8DAAC;AAE7C;IAAC,IAAA,kBAAM,EAAC,8BAAoB,CAAC;8BACG,8BAAoB;kEAAC;AAErD;IAAC,IAAA,uBAAW,EAAC,aAAK,CAAC,iBAAiB,CAAC;IACpC,IAAA,oBAAQ,GAAE;;+DAC0C;AAErD;IAAC,IAAA,kBAAM,EAAC,aAAK,CAAC,mBAAmB,CAAC;;iEACwB;AAZjD,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CA2EhC;AA3EY,oDAAoB"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Tool, ToolManager } from 'sprotty';
|
|
2
2
|
import { EditModeListener, EditorContextService, EditorContextServiceProvider } from '../editor-context-service';
|
|
3
|
-
export
|
|
4
|
-
disableEditTools(): void;
|
|
5
|
-
}
|
|
6
|
-
export declare class GLSPToolManager extends ToolManager implements IGLSPToolManager, EditModeListener {
|
|
3
|
+
export declare class GLSPToolManager extends ToolManager implements EditModeListener {
|
|
7
4
|
protected editorContext?: EditorContextService;
|
|
8
5
|
tools: Tool[];
|
|
9
6
|
defaultTools: Tool[];
|
|
@@ -18,5 +15,7 @@ export declare class GLSPToolManager extends ToolManager implements IGLSPToolMan
|
|
|
18
15
|
export interface GLSPTool extends Tool {
|
|
19
16
|
isEditTool: boolean;
|
|
20
17
|
}
|
|
21
|
-
export declare
|
|
18
|
+
export declare namespace GLSPTool {
|
|
19
|
+
function is(object: unknown): object is GLSPTool;
|
|
20
|
+
}
|
|
22
21
|
//# sourceMappingURL=glsp-tool-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-tool-manager.d.ts","sourceRoot":"","sources":["../../../src/base/tool-manager/glsp-tool-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAGjH,
|
|
1
|
+
{"version":3,"file":"glsp-tool-manager.d.ts","sourceRoot":"","sources":["../../../src/base/tool-manager/glsp-tool-manager.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAGjH,qBACa,eAAgB,SAAQ,WAAY,YAAW,gBAAgB;IACxE,SAAS,CAAC,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAEA,KAAK,EAAE,IAAI,EAAE,CAAC;IACP,YAAY,EAAE,IAAI,EAAE,CAAC;IAC9B,sBAAsB,EAAE,4BAA4B,CAAC;IAGlG,SAAS,CAAC,UAAU,IAAI,IAAI;IAUnB,oBAAoB,CAAC,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAM5C,aAAa,CAAC,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAMrC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAcxC,gBAAgB,IAAI,IAAI;IAKxB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAU5D;AAED,MAAM,WAAW,QAAS,SAAQ,IAAI;IAClC,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,yBAAiB,QAAQ,CAAC;IACtB,SAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,QAAQ,CAQtD;CACJ"}
|
|
@@ -9,9 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GLSPTool = exports.GLSPToolManager = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
|
-
* Copyright (c) 2020-
|
|
14
|
+
* Copyright (c) 2020-2023 EclipseSource and others.
|
|
15
15
|
*
|
|
16
16
|
* This program and the accompanying materials are made available under the
|
|
17
17
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -53,7 +53,7 @@ let GLSPToolManager = class GLSPToolManager extends sprotty_1.ToolManager {
|
|
|
53
53
|
this.disableActiveTools();
|
|
54
54
|
let tools = toolIds.map(id => this.tool(id));
|
|
55
55
|
if (this.editorContext && this.editorContext.isReadonly) {
|
|
56
|
-
tools = tools.filter(tool => tool && (!
|
|
56
|
+
tools = tools.filter(tool => tool && (!GLSPTool.is(tool) || tool.isEditTool === false));
|
|
57
57
|
}
|
|
58
58
|
tools.forEach(tool => {
|
|
59
59
|
if (tool !== undefined) {
|
|
@@ -64,7 +64,7 @@ let GLSPToolManager = class GLSPToolManager extends sprotty_1.ToolManager {
|
|
|
64
64
|
}
|
|
65
65
|
disableEditTools() {
|
|
66
66
|
this.disableActiveTools();
|
|
67
|
-
this.enable(this.defaultTools.filter(tool => !
|
|
67
|
+
this.enable(this.defaultTools.filter(tool => !GLSPTool.is(tool) || tool.isEditTool === false).map(tool => tool.id));
|
|
68
68
|
}
|
|
69
69
|
editModeChanged(oldValue, newValue) {
|
|
70
70
|
if (oldValue === newValue) {
|
|
@@ -102,8 +102,15 @@ GLSPToolManager = __decorate([
|
|
|
102
102
|
(0, inversify_1.injectable)()
|
|
103
103
|
], GLSPToolManager);
|
|
104
104
|
exports.GLSPToolManager = GLSPToolManager;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
var GLSPTool;
|
|
106
|
+
(function (GLSPTool) {
|
|
107
|
+
function is(object) {
|
|
108
|
+
return (protocol_1.AnyObject.is(object) &&
|
|
109
|
+
(0, protocol_1.hasStringProp)(object, 'id') &&
|
|
110
|
+
(0, protocol_1.hasFunctionProp)(object, 'enable') &&
|
|
111
|
+
(0, protocol_1.hasFunctionProp)(object, 'disable') &&
|
|
112
|
+
(0, protocol_1.hasBooleanProp)(object, 'isEditTool'));
|
|
113
|
+
}
|
|
114
|
+
GLSPTool.is = is;
|
|
115
|
+
})(GLSPTool = exports.GLSPTool || (exports.GLSPTool = {}));
|
|
109
116
|
//# sourceMappingURL=glsp-tool-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-tool-manager.js","sourceRoot":"","sources":["../../../src/base/tool-manager/glsp-tool-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"glsp-tool-manager.js","sourceRoot":"","sources":["../../../src/base/tool-manager/glsp-tool-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA0H;AAC1H,yCAAqF;AACrF,qCAA4C;AAE5C,oCAAiC;AAG1B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qBAAW;IAQlC,UAAU;QAChB,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;QAChD,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,sBAAsB,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;YAC/C,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACvC,CAAC,CAAC,CAAC;IACP,CAAC;IAEQ,oBAAoB,CAAC,GAAG,KAAa;QAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;Y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
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
1
|
import { ContainerModule } from 'inversify';
|
|
17
|
-
import '../../../css/command-palette.css';
|
|
18
2
|
declare const glspBoundsModule: ContainerModule;
|
|
19
3
|
export default glspBoundsModule;
|
|
20
4
|
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/di.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAkB5C,QAAA,MAAM,gBAAgB,iBAYpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2022 EclipseSource and others.
|
|
4
|
+
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
5
5
|
*
|
|
6
6
|
* This program and the accompanying materials are made available under the
|
|
7
7
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -15,22 +15,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
*
|
|
16
16
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
17
|
********************************************************************************/
|
|
18
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
18
19
|
const inversify_1 = require("inversify");
|
|
19
20
|
const sprotty_1 = require("sprotty");
|
|
20
|
-
require("../../../css/command-palette.css");
|
|
21
21
|
const types_1 = require("../../base/types");
|
|
22
|
+
const freeform_layout_1 = require("./freeform-layout");
|
|
22
23
|
const glsp_hidden_bounds_updater_1 = require("./glsp-hidden-bounds-updater");
|
|
24
|
+
const hbox_layout_1 = require("./hbox-layout");
|
|
25
|
+
const vbox_layout_1 = require("./vbox-layout");
|
|
23
26
|
const glspBoundsModule = new inversify_1.ContainerModule((bind, _unbind, isBound, _rebind) => {
|
|
24
|
-
|
|
25
|
-
(0, sprotty_1.configureCommand)(
|
|
27
|
+
const context = { bind, isBound };
|
|
28
|
+
(0, sprotty_1.configureCommand)(context, sprotty_1.SetBoundsCommand);
|
|
29
|
+
(0, sprotty_1.configureCommand)(context, sprotty_1.RequestBoundsCommand);
|
|
26
30
|
bind(sprotty_1.HiddenBoundsUpdater).toSelf().inSingletonScope();
|
|
27
|
-
|
|
28
|
-
bind(types_1.TYPES.HiddenVNodePostprocessor).toService(glsp_hidden_bounds_updater_1.GLSPHiddenBoundsUpdater);
|
|
31
|
+
(0, protocol_1.bindAsService)(context, types_1.TYPES.HiddenVNodePostprocessor, glsp_hidden_bounds_updater_1.GLSPHiddenBoundsUpdater);
|
|
29
32
|
bind(types_1.TYPES.Layouter).to(sprotty_1.Layouter).inSingletonScope();
|
|
30
33
|
bind(types_1.TYPES.LayoutRegistry).to(sprotty_1.LayoutRegistry).inSingletonScope();
|
|
31
|
-
(0, sprotty_1.configureLayout)(
|
|
32
|
-
(0, sprotty_1.configureLayout)(
|
|
33
|
-
(0, sprotty_1.configureLayout)(
|
|
34
|
+
(0, sprotty_1.configureLayout)(context, sprotty_1.VBoxLayouter.KIND, vbox_layout_1.VBoxLayouterExt);
|
|
35
|
+
(0, sprotty_1.configureLayout)(context, sprotty_1.HBoxLayouter.KIND, hbox_layout_1.HBoxLayouterExt);
|
|
36
|
+
(0, sprotty_1.configureLayout)(context, freeform_layout_1.FreeFormLayouter.KIND, freeform_layout_1.FreeFormLayouter);
|
|
34
37
|
});
|
|
35
38
|
exports.default = glspBoundsModule;
|
|
36
39
|
//# sourceMappingURL=di.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/bounds/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/bounds/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAuD;AACvD,yCAA4C;AAC5C,qCAUiB;AACjB,4CAAyC;AACzC,uDAAqD;AACrD,6EAAuE;AACvE,+CAAgD;AAChD,+CAAgD;AAEhD,MAAM,gBAAgB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC7E,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAClC,IAAA,0BAAgB,EAAC,OAAO,EAAE,0BAAgB,CAAC,CAAC;IAC5C,IAAA,0BAAgB,EAAC,OAAO,EAAE,8BAAoB,CAAC,CAAC;IAChD,IAAI,CAAC,6BAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAA,wBAAa,EAAC,OAAO,EAAE,aAAK,CAAC,wBAAwB,EAAE,oDAAuB,CAAC,CAAC;IAChF,IAAI,CAAC,aAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,kBAAQ,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACrD,IAAI,CAAC,aAAK,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,wBAAc,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAEjE,IAAA,yBAAe,EAAC,OAAO,EAAE,sBAAY,CAAC,IAAI,EAAE,6BAAe,CAAC,CAAC;IAC7D,IAAA,yBAAe,EAAC,OAAO,EAAE,sBAAY,CAAC,IAAI,EAAE,6BAAe,CAAC,CAAC;IAC7D,IAAA,yBAAe,EAAC,OAAO,EAAE,kCAAgB,CAAC,IAAI,EAAE,kCAAgB,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2023 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -18,7 +18,7 @@ import { BoundsData, LayoutContainer, SChildElement, SParentElement, StatefulLay
|
|
|
18
18
|
import { AbstractLayout } from 'sprotty/lib/features/bounds/abstract-layout';
|
|
19
19
|
import { AbstractLayoutOptions } from 'sprotty/lib/features/bounds/layout-options';
|
|
20
20
|
/**
|
|
21
|
-
* Layouts children of a container with
|
|
21
|
+
* Layouts children of a container with explicit X/Y positions
|
|
22
22
|
*/
|
|
23
23
|
export declare class FreeFormLayouter extends AbstractLayout<AbstractLayoutOptions> {
|
|
24
24
|
static KIND: string;
|