@eclipse-glsp/client 1.1.0-next.335bc3d.213 → 1.1.0-next.35bf56e.230
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/README.md +1 -1
- 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 -7
- package/lib/base/container-modules.d.ts.map +1 -1
- package/lib/base/container-modules.js +15 -5
- package/lib/base/container-modules.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/selection-clearing-mouse-listener.js +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 +1 -2
- package/lib/features/bounds/di.config.d.ts.map +1 -1
- package/lib/features/bounds/di.config.js +7 -5
- 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} +4 -5
- 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/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/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/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/model.d.ts +1 -1
- package/lib/features/select/selection-service.spec.js +1 -1
- package/lib/features/select/selection-service.spec.js.map +1 -1
- package/lib/features/source-model-watcher/di.config.js +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 +1 -1
- package/lib/features/tool-feedback/di.config.js +2 -2
- 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/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.js +2 -2
- 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/issue-marker.d.ts +1 -1
- package/lib/features/validation/issue-marker.js +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/lib/model.d.ts +7 -3
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +48 -1
- package/lib/lib/model.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/html-utils.d.ts +1 -1
- package/lib/utils/html-utils.js +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.js +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/glsp-projection-view.d.ts +1 -1
- package/lib/views/glsp-projection-view.js +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 +17 -17
- 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 +22 -10
- package/src/base/editor-context-service.ts +4 -4
- package/src/base/selection-clearing-mouse-listener.ts +1 -1
- package/src/base/tool-manager/glsp-tool-manager.ts +15 -12
- package/src/features/bounds/di.config.ts +16 -7
- 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} +3 -4
- 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/copy-paste/copy-paste-handler.ts +5 -5
- package/src/features/export/glsp-svg-exporter.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/model.ts +1 -1
- package/src/features/select/selection-service.spec.ts +2 -2
- package/src/features/source-model-watcher/di.config.ts +1 -1
- 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 +2 -2
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +1 -9
- package/src/features/tools/change-bounds-tool.ts +7 -7
- package/src/features/tools/di.config.ts +3 -3
- package/src/features/tools/glsp-manhattan-edge-router.ts +8 -5
- package/src/features/validation/issue-marker.ts +1 -1
- package/src/index.ts +33 -4
- package/src/lib/model.ts +35 -3
- package/src/sprotty-reexport.ts +18 -8
- package/src/utils/html-utils.ts +1 -1
- package/src/utils/smodel-util.ts +12 -5
- package/src/views/base-view-module.ts +1 -1
- package/src/views/glsp-edge-view.tsx +3 -3
- package/src/views/glsp-projection-view.tsx +1 -1
- 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/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Eclipse GLSP - Client
|
|
1
|
+
# Eclipse GLSP - Client
|
|
2
2
|
|
|
3
3
|
A web-based diagram client framework for the [Graphical Language Server Platform (GLSP)](https://github.com/eclipse-glsp/glsp) based on [Eclipse Sprotty](https://github.com/eclipse/sprotty).
|
|
4
4
|
|
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 { MaybeArray } 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
|
* Creates a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
@@ -37,12 +43,14 @@ export declare const DEFAULT_MODULES: readonly [ContainerModule, ContainerModule
|
|
|
37
43
|
* @param options Options to customize the module loading
|
|
38
44
|
* @returns The created container.
|
|
39
45
|
*/
|
|
40
|
-
export declare function createDiagramContainer(...customModules: Array<ContainerModule |
|
|
46
|
+
export declare function createDiagramContainer(...customModules: Array<ContainerModule | ModuleConfiguration>): Container;
|
|
41
47
|
/**
|
|
42
|
-
* Can be passed to the {@link createDiagramContainer} utility function to
|
|
48
|
+
* Can be passed to the {@link createDiagramContainer} utility function to configure additional modules or
|
|
49
|
+
* remove (i.e. not load) default modules.
|
|
43
50
|
*/
|
|
44
|
-
export interface
|
|
45
|
-
|
|
51
|
+
export interface ModuleConfiguration {
|
|
52
|
+
add?: MaybeArray<ContainerModule>;
|
|
53
|
+
remove?: MaybeArray<ContainerModule>;
|
|
46
54
|
}
|
|
47
55
|
/**
|
|
48
56
|
* Creates a GLSP Client container with the GLSP default modules and the specified custom `modules`.
|
|
@@ -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,EAAwB,UAAU,EAAU,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAmCvD,eAAO,MAAM,eAAe,4jBAkClB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,aAAa,EAAE,KAAK,CAAC,eAAe,GAAG,mBAAmB,CAAC,GAAG,SAAS,CAkBhH;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,GAAG,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS,CAE9E"}
|
|
@@ -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,
|
|
@@ -76,14 +76,19 @@ exports.DEFAULT_MODULES = [
|
|
|
76
76
|
];
|
|
77
77
|
/**
|
|
78
78
|
* Creates a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
79
|
-
*
|
|
80
|
-
*
|
|
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.
|
|
@@ -104,7 +109,12 @@ function createDiagramContainer(...customModules) {
|
|
|
104
109
|
modules.push(customModule);
|
|
105
110
|
}
|
|
106
111
|
else {
|
|
107
|
-
(
|
|
112
|
+
if (customModule.remove) {
|
|
113
|
+
(0, protocol_1.remove)(modules, ...(0, protocol_1.asArray)(customModule.remove));
|
|
114
|
+
}
|
|
115
|
+
if (customModule.add) {
|
|
116
|
+
(0, protocol_1.distinctAdd)(modules, ...(0, protocol_1.asArray)(customModule.add));
|
|
117
|
+
}
|
|
108
118
|
}
|
|
109
119
|
});
|
|
110
120
|
container.load(...modules);
|
|
@@ -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,qDAAkF;AAClF,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;IACt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AA0B;IAC/D,OAAO,sBAAsB,CAAC,GAAG,OAAO,CAAC,CAAC;AAC9C,CAAC;AAFD,sDAEC"}
|
|
@@ -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;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAyB,aAAa,EAA6B,MAAM,wBAAwB,CAAC;AAEvH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,UAAU,EA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AAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7D;AAED;;;;;;;;;;;GAWG;AACH,qBACa,oBAAqB,YAAW,cAAc;IAEvD,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAG7C,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAIrD,SAAS,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,CAAM;IAGrD,SAAS,CAAC,mBAAmB,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1D,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAE5B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAIlD,UAAU,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAIpD,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ/B,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ1E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ5B,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAInD,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQjD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,SAAS,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEpC;IAED,IAAI,gBAAgB,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE,CAEhD;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;CACJ;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,oBAAoB,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,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,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C,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"}
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.SelectionClearingMouseListener = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2020 EclipseSource and others.
|
|
11
|
+
* Copyright (c) 2020-2022 EclipseSource and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -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,CA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ACL,CAAC,EAVgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-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
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { ContainerModule } from 'inversify';
|
|
17
|
-
import '../../../css/command-palette.css';
|
|
18
17
|
declare const glspBoundsModule: ContainerModule;
|
|
19
18
|
export default glspBoundsModule;
|
|
20
19
|
//# 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":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,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
|
|
@@ -17,9 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
********************************************************************************/
|
|
18
18
|
const inversify_1 = require("inversify");
|
|
19
19
|
const sprotty_1 = require("sprotty");
|
|
20
|
-
require("../../../css/command-palette.css");
|
|
21
20
|
const types_1 = require("../../base/types");
|
|
21
|
+
const freeform_layout_1 = require("./freeform-layout");
|
|
22
22
|
const glsp_hidden_bounds_updater_1 = require("./glsp-hidden-bounds-updater");
|
|
23
|
+
const hbox_layout_1 = require("./hbox-layout");
|
|
24
|
+
const vbox_layout_1 = require("./vbox-layout");
|
|
23
25
|
const glspBoundsModule = new inversify_1.ContainerModule((bind, _unbind, isBound, _rebind) => {
|
|
24
26
|
(0, sprotty_1.configureCommand)({ bind, isBound }, sprotty_1.SetBoundsCommand);
|
|
25
27
|
(0, sprotty_1.configureCommand)({ bind, isBound }, sprotty_1.RequestBoundsCommand);
|
|
@@ -28,9 +30,9 @@ const glspBoundsModule = new inversify_1.ContainerModule((bind, _unbind, isBound
|
|
|
28
30
|
bind(types_1.TYPES.HiddenVNodePostprocessor).toService(glsp_hidden_bounds_updater_1.GLSPHiddenBoundsUpdater);
|
|
29
31
|
bind(types_1.TYPES.Layouter).to(sprotty_1.Layouter).inSingletonScope();
|
|
30
32
|
bind(types_1.TYPES.LayoutRegistry).to(sprotty_1.LayoutRegistry).inSingletonScope();
|
|
31
|
-
(0, sprotty_1.configureLayout)({ bind, isBound }, sprotty_1.VBoxLayouter.KIND,
|
|
32
|
-
(0, sprotty_1.configureLayout)({ bind, isBound }, sprotty_1.HBoxLayouter.KIND,
|
|
33
|
-
(0, sprotty_1.configureLayout)({ bind, isBound },
|
|
33
|
+
(0, sprotty_1.configureLayout)({ bind, isBound }, sprotty_1.VBoxLayouter.KIND, vbox_layout_1.VBoxLayouterExt);
|
|
34
|
+
(0, sprotty_1.configureLayout)({ bind, isBound }, sprotty_1.HBoxLayouter.KIND, hbox_layout_1.HBoxLayouterExt);
|
|
35
|
+
(0, sprotty_1.configureLayout)({ bind, isBound }, freeform_layout_1.FreeFormLayouter.KIND, freeform_layout_1.FreeFormLayouter);
|
|
34
36
|
});
|
|
35
37
|
exports.default = glspBoundsModule;
|
|
36
38
|
//# 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,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,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,0BAAgB,CAAC,CAAC;IACtD,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,8BAAoB,CAAC,CAAC;IAC1D,IAAI,CAAC,6BAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAI,CAAC,oDAAuB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC1D,IAAI,CAAC,aAAK,CAAC,wBAAwB,CAAC,CAAC,SAAS,CAAC,oDAAuB,CAAC,CAAC;IACxE,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,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,sBAAY,CAAC,IAAI,EAAE,6BAAe,CAAC,CAAC;IACvE,IAAA,yBAAe,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,sBAAY,CAAC,IAAI,EAAE,6BAAe,CAAC,CAAC;IACvE,IAAA,yBAAe,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,kCAAgB,CAAC,IAAI,EAAE,kCAAgB,CAAC,CAAC;AAChF,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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"freeform-layout.d.ts","sourceRoot":"","sources":["../../../src/features/
|
|
1
|
+
{"version":3,"file":"freeform-layout.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/freeform-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAEnF;;GAEG;AACH,qBACa,gBAAiB,SAAQ,cAAc,CAAC,qBAAqB,CAAC;IACvE,MAAM,CAAC,IAAI,SAAc;IAEhB,MAAM,CAAC,SAAS,EAAE,cAAc,GAAG,eAAe,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAoB9F,SAAS,CAAC,eAAe,CACrB,SAAS,EAAE,cAAc,GAAG,eAAe,EAC3C,gBAAgB,EAAE,qBAAqB,EACvC,QAAQ,EAAE,gBAAgB,GAC3B,SAAS;IAkBZ,SAAS,CAAC,WAAW,CACjB,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,qBAAqB,EACnC,gBAAgB,EAAE,qBAAqB,EACvC,aAAa,EAAE,KAAK,EACpB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAClB,KAAK;cAWW,uBAAuB,CACtC,SAAS,EAAE,cAAc,GAAG,eAAe,EAC3C,UAAU,EAAE,KAAK,EACjB,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAClB,MAAM;IAWT,SAAS,CAAC,uBAAuB,IAAI,qBAAqB;IAa1D,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE,qBAAqB,GAAG,qBAAqB;CAG9F"}
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.FreeFormLayouter = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2021-
|
|
11
|
+
* Copyright (c) 2021-2023 EclipseSource and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -26,7 +26,7 @@ const protocol_1 = require("@eclipse-glsp/protocol");
|
|
|
26
26
|
const inversify_1 = require("inversify");
|
|
27
27
|
const abstract_layout_1 = require("sprotty/lib/features/bounds/abstract-layout");
|
|
28
28
|
/**
|
|
29
|
-
* Layouts children of a container with
|
|
29
|
+
* Layouts children of a container with explicit X/Y positions
|
|
30
30
|
*/
|
|
31
31
|
let FreeFormLayouter = class FreeFormLayouter extends abstract_layout_1.AbstractLayout {
|
|
32
32
|
layout(container, layouter) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"freeform-layout.js","sourceRoot":"","sources":["../../../src/features/
|
|
1
|
+
{"version":3,"file":"freeform-layout.js","sourceRoot":"","sources":["../../../src/features/bounds/freeform-layout.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAkE;AAClE,yCAAuC;AAEvC,iFAA6E;AAG7E;;GAEG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,gCAAqC;IAG9D,MAAM,CAAC,SAA2C,EAAE,QAA0B;QACnF,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACrD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAExE,iFAAiF;QACjF,sEAAsE;QAEtE,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,GA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AC9F,CAAC;QAEF,OAAO,MAAM,CAAC;IAClB,CAAC;IAES,uBAAuB;QAC7B,OAAO;YACH,eAAe,EAAE,IAAI;YACrB,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,CAAC;YAChB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;YACf,aAAa,EAAE,CAAC;YAChB,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;SACf,CAAC;IACN,CAAC;IAES,MAAM,CAAC,CAAwB,EAAE,CAAwB;QAC/D,uCAAY,CAAC,GAAK,CAAC,EAAG;IAC1B,CAAC;;AAhGM,qBAAI,GAAG,UAAU,CAAC;AADhB,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAkG5B;AAlGY,4CAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeform-layout.spec.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/freeform-layout.spec.ts"],"names":[],"mappings":"AAgBA,OAAO,OAAO,CAAC;AACf,OAAO,kBAAkB,CAAC"}
|