@eclipse-glsp/client 2.2.0-next.330 → 2.2.0-next.331
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/glsp-sprotty.css +5 -0
- package/lib/base/default.module.js +1 -1
- package/lib/base/default.module.js.map +1 -1
- package/lib/base/index.d.ts +1 -1
- package/lib/base/index.d.ts.map +1 -1
- package/lib/base/index.js +1 -1
- package/lib/base/index.js.map +1 -1
- package/lib/{features/routing/glsp-manhattan-edge-router.d.ts → base/ui-extension/index.d.ts} +4 -6
- package/lib/base/ui-extension/index.d.ts.map +1 -0
- package/lib/base/ui-extension/index.js +34 -0
- package/lib/base/ui-extension/index.js.map +1 -0
- package/lib/base/{ui-extension-registry.d.ts → ui-extension/ui-extension-registry.d.ts} +1 -1
- package/lib/base/ui-extension/ui-extension-registry.d.ts.map +1 -0
- package/lib/base/ui-extension/ui-extension-registry.js.map +1 -0
- package/lib/base/ui-extension/ui-extension.d.ts +39 -0
- package/lib/base/ui-extension/ui-extension.d.ts.map +1 -0
- package/lib/base/ui-extension/ui-extension.js +120 -0
- package/lib/base/ui-extension/ui-extension.js.map +1 -0
- package/lib/features/command-palette/command-palette.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette.js +4 -3
- package/lib/features/command-palette/command-palette.js.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui.d.ts.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui.js +4 -3
- package/lib/features/label-edit-ui/label-edit-ui.js.map +1 -1
- package/lib/features/routing/edge-router.d.ts +30 -0
- package/lib/features/routing/edge-router.d.ts.map +1 -0
- package/lib/features/routing/edge-router.js +116 -0
- package/lib/features/routing/edge-router.js.map +1 -0
- package/lib/features/routing/index.d.ts +1 -1
- package/lib/features/routing/index.d.ts.map +1 -1
- package/lib/features/routing/index.js +1 -1
- package/lib/features/routing/index.js.map +1 -1
- package/lib/features/routing/routing-module.d.ts.map +1 -1
- package/lib/features/routing/routing-module.js +4 -4
- package/lib/features/routing/routing-module.js.map +1 -1
- package/package.json +3 -3
- package/src/base/default.module.ts +1 -1
- package/src/base/index.ts +1 -1
- package/src/base/ui-extension/index.ts +17 -0
- package/src/base/{ui-extension-registry.ts → ui-extension/ui-extension-registry.ts} +1 -1
- package/src/base/ui-extension/ui-extension.ts +119 -0
- package/src/features/command-palette/command-palette.ts +2 -1
- package/src/features/label-edit-ui/label-edit-ui.ts +2 -1
- package/src/features/routing/{glsp-manhattan-edge-router.ts → edge-router.ts} +72 -2
- package/src/features/routing/index.ts +1 -1
- package/src/features/routing/routing-module.ts +3 -5
- package/lib/base/ui-extension-registry.d.ts.map +0 -1
- package/lib/base/ui-extension-registry.js.map +0 -1
- package/lib/features/routing/glsp-manhattan-edge-router.d.ts.map +0 -1
- package/lib/features/routing/glsp-manhattan-edge-router.js +0 -68
- package/lib/features/routing/glsp-manhattan-edge-router.js.map +0 -1
- /package/lib/base/{ui-extension-registry.js → ui-extension/ui-extension-registry.js} +0 -0
package/css/glsp-sprotty.css
CHANGED
|
@@ -37,7 +37,7 @@ const selection_clearing_mouse_listener_1 = require("./selection-clearing-mouse-
|
|
|
37
37
|
const selection_service_1 = require("./selection-service");
|
|
38
38
|
const tool_1 = require("./tool-manager/tool");
|
|
39
39
|
const tool_manager_1 = require("./tool-manager/tool-manager");
|
|
40
|
-
const ui_extension_registry_1 = require("./ui-extension-registry");
|
|
40
|
+
const ui_extension_registry_1 = require("./ui-extension/ui-extension-registry");
|
|
41
41
|
const key_tool_1 = require("./view/key-tool");
|
|
42
42
|
const mouse_tool_1 = require("./view/mouse-tool");
|
|
43
43
|
const view_registry_1 = require("./view/view-registry");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.module.js","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAiB+B;AAC/B,6CAA2C;AAC3C,sCAAoC;AACpC,2DAA2D;AAC3D,uEAAsE;AACtE,mDAAmD;AACnD,qEAAgE;AAChE,yCAA0D;AAC1D,0DAAmE;AACnE,sFAAiF;AACjF,0EAAkF;AAClF,iFAA4E;AAC5E,yDAAqD;AACrD,2DAAuD;AACvD,iEAA4D;AAC5D,6FAA8H;AAC9H,2DAAwD;AACxD,2FAAqF;AACrF,2DAAuD;AACvD,8CAAkF;AAClF,8DAAqH;AACrH,
|
|
1
|
+
{"version":3,"file":"default.module.js","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAiB+B;AAC/B,6CAA2C;AAC3C,sCAAoC;AACpC,2DAA2D;AAC3D,uEAAsE;AACtE,mDAAmD;AACnD,qEAAgE;AAChE,yCAA0D;AAC1D,0DAAmE;AACnE,sFAAiF;AACjF,0EAAkF;AAClF,iFAA4E;AAC5E,yDAAqD;AACrD,2DAAuD;AACvD,iEAA4D;AAC5D,6FAA8H;AAC9H,2DAAwD;AACxD,2FAAqF;AACrF,2DAAuD;AACvD,8CAAkF;AAClF,8DAAqH;AACrH,gFAA+E;AAC/E,8CAA8C;AAC9C,kDAAkD;AAClD,wDAAqD;AAErD;;;GAGG;AACU,QAAA,aAAa,GAAG,IAAI,uBAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE;IACtF,wEAAwE;IACxE,8BAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElD,IAAA,0BAAgB,EAAC,OAAO,CAAC,CAAC;IAE1B,IAAI,CAAC,6CAAoB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACvD,IAAI,CAAC,eAAK,CAAC,eAAe,CAAC,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mBAAmB,CAAC,CAAC,SAAS,CAAC,+CAAuB,CAAC,CAAC;IACpF,IAAI,CAAC,eAAK,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,+CAAuB,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC"}
|
package/lib/base/index.d.ts
CHANGED
|
@@ -28,6 +28,6 @@ export * from './ranked';
|
|
|
28
28
|
export * from './selection-clearing-mouse-listener';
|
|
29
29
|
export * from './selection-service';
|
|
30
30
|
export * from './tool-manager';
|
|
31
|
-
export * from './ui-extension
|
|
31
|
+
export * from './ui-extension';
|
|
32
32
|
export * from './view';
|
|
33
33
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/base/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC"}
|
package/lib/base/index.js
CHANGED
|
@@ -44,6 +44,6 @@ __exportStar(require("./ranked"), exports);
|
|
|
44
44
|
__exportStar(require("./selection-clearing-mouse-listener"), exports);
|
|
45
45
|
__exportStar(require("./selection-service"), exports);
|
|
46
46
|
__exportStar(require("./tool-manager"), exports);
|
|
47
|
-
__exportStar(require("./ui-extension
|
|
47
|
+
__exportStar(require("./ui-extension"), exports);
|
|
48
48
|
__exportStar(require("./view"), exports);
|
|
49
49
|
//# sourceMappingURL=index.js.map
|
package/lib/base/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,sDAAoC;AACpC,4DAA0C;AAC1C,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,8DAA4C;AAC5C,2DAAyC;AACzC,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,sEAAoD;AACpD,sDAAoC;AACpC,iDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,sDAAoC;AACpC,4DAA0C;AAC1C,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,8DAA4C;AAC5C,2DAAyC;AACzC,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,sEAAoD;AACpD,sDAAoC;AACpC,iDAA+B;AAC/B,iDAA+B;AAC/B,yCAAuB"}
|
package/lib/{features/routing/glsp-manhattan-edge-router.d.ts → base/ui-extension/index.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2024 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
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=glsp-manhattan-edge-router.d.ts.map
|
|
16
|
+
export * from './ui-extension';
|
|
17
|
+
export * from './ui-extension-registry';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/ui-extension/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/********************************************************************************
|
|
18
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
19
|
+
*
|
|
20
|
+
* This program and the accompanying materials are made available under the
|
|
21
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
22
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
23
|
+
*
|
|
24
|
+
* This Source Code may also be made available under the following Secondary
|
|
25
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
26
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
27
|
+
* with the GNU Classpath Exception which is available at
|
|
28
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
29
|
+
*
|
|
30
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
31
|
+
********************************************************************************/
|
|
32
|
+
__exportStar(require("./ui-extension"), exports);
|
|
33
|
+
__exportStar(require("./ui-extension-registry"), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/ui-extension/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA+B;AAC/B,0DAAwC"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { IUIExtension, LazyInjector, MaybePromise, UIExtensionRegistry } from '@eclipse-glsp/sprotty';
|
|
17
|
-
import { IDiagramStartup } from '
|
|
17
|
+
import { IDiagramStartup } from '../model';
|
|
18
18
|
export declare class GLSPUIExtensionRegistry extends UIExtensionRegistry implements IDiagramStartup {
|
|
19
19
|
protected lazyInjector: LazyInjector;
|
|
20
20
|
constructor(extensions?: IUIExtension[]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-extension-registry.d.ts","sourceRoot":"","sources":["../../../src/base/ui-extension/ui-extension-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAS,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE7G,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,qBACa,uBAAwB,SAAQ,mBAAoB,YAAW,eAAe;IAEvF,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;gBAEb,UAAU,GAAE,YAAY,EAAO;IAIvD,cAAc,IAAI,YAAY,CAAC,IAAI,CAAC;CAGvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-extension-registry.js","sourceRoot":"","sources":["../../../src/base/ui-extension/ui-extension-registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;AAElF,mDAA6G;AAC7G,yCAAyD;AAIlD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,6BAAmB;IAI5D,YAAwB,aAA6B,EAAE;QACnD,KAAK,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;IAED,cAAc;QACV,IAAI,CAAC,YAAY,CAAC,MAAM,CAAe,eAAK,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9H,CAAC;CACJ,CAAA;AAXY,0DAAuB;AAEtB;IADT,IAAA,kBAAM,EAAC,sBAAY,CAAC;;6DACgB;kCAF5B,uBAAuB;IADnC,IAAA,sBAAU,GAAE;IAKI,WAAA,IAAA,oBAAQ,GAAE,CAAA;;GAJd,uBAAuB,CAWnC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
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
|
+
import { AbstractUIExtension } from '@eclipse-glsp/sprotty';
|
|
17
|
+
export declare const CSS_UI_EXTENSION_CLASS = "ui-extension";
|
|
18
|
+
export declare const CSS_HIDDEN_EXTENSION_CLASS = "hidden";
|
|
19
|
+
/**
|
|
20
|
+
* Reusable abstract base implementation for UI extensions.
|
|
21
|
+
* Intended for UI extensions that directly interact with the DOM API to create and manage UI elements.
|
|
22
|
+
*/
|
|
23
|
+
export declare abstract class GLSPAbstractUIExtension extends AbstractUIExtension {
|
|
24
|
+
protected get diagramContainerId(): string;
|
|
25
|
+
protected get parentContainerSelector(): string;
|
|
26
|
+
protected get containerSelector(): string;
|
|
27
|
+
protected get initialized(): boolean;
|
|
28
|
+
protected initialize(): boolean;
|
|
29
|
+
protected getOrCreateContainer(): HTMLElement;
|
|
30
|
+
protected getContainer(): HTMLElement | null;
|
|
31
|
+
protected createContainer(parent: HTMLElement): HTMLElement;
|
|
32
|
+
protected initializeContainer(container: HTMLElement): void;
|
|
33
|
+
protected getParentContainer(): HTMLElement | null;
|
|
34
|
+
protected insertContainerIntoParent(container: HTMLElement, parent: HTMLElement): void;
|
|
35
|
+
protected setContainerVisible(visible: boolean): void;
|
|
36
|
+
protected isContainerVisible(): boolean;
|
|
37
|
+
protected toggleContainerVisible(): void;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ui-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-extension.d.ts","sourceRoot":"","sources":["../../../src/base/ui-extension/ui-extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AACrD,eAAO,MAAM,0BAA0B,WAAW,CAAC;AAEnD;;;GAGG;AACH,8BACsB,uBAAwB,SAAQ,mBAAmB;IACrE,SAAS,KAAK,kBAAkB,IAAI,MAAM,CAEzC;IAED,SAAS,KAAK,uBAAuB,IAAI,MAAM,CAE9C;IAED,SAAS,KAAK,iBAAiB,IAAI,MAAM,CAExC;IAED,SAAS,KAAK,WAAW,IAAI,OAAO,CAEnC;cAEkB,UAAU,IAAI,OAAO;cAgBrB,oBAAoB,IAAI,WAAW;IAoBtD,SAAS,CAAC,YAAY,IAAI,WAAW,GAAG,IAAI;IAI5C,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAM3D,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;IAI3D,SAAS,CAAC,kBAAkB,IAAI,WAAW,GAAG,IAAI;IAIlD,SAAS,CAAC,yBAAyB,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;cAInE,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAS9D,SAAS,CAAC,kBAAkB,IAAI,OAAO;IAIvC,SAAS,CAAC,sBAAsB,IAAI,IAAI;CAG3C"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.GLSPAbstractUIExtension = exports.CSS_HIDDEN_EXTENSION_CLASS = exports.CSS_UI_EXTENSION_CLASS = void 0;
|
|
25
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
exports.CSS_UI_EXTENSION_CLASS = 'ui-extension';
|
|
28
|
+
exports.CSS_HIDDEN_EXTENSION_CLASS = 'hidden';
|
|
29
|
+
/**
|
|
30
|
+
* Reusable abstract base implementation for UI extensions.
|
|
31
|
+
* Intended for UI extensions that directly interact with the DOM API to create and manage UI elements.
|
|
32
|
+
*/
|
|
33
|
+
let GLSPAbstractUIExtension = class GLSPAbstractUIExtension extends sprotty_1.AbstractUIExtension {
|
|
34
|
+
get diagramContainerId() {
|
|
35
|
+
return this.options.baseDiv;
|
|
36
|
+
}
|
|
37
|
+
get parentContainerSelector() {
|
|
38
|
+
return '#' + this.diagramContainerId;
|
|
39
|
+
}
|
|
40
|
+
get containerSelector() {
|
|
41
|
+
return '#' + this.id();
|
|
42
|
+
}
|
|
43
|
+
get initialized() {
|
|
44
|
+
return !!this.containerElement;
|
|
45
|
+
}
|
|
46
|
+
initialize() {
|
|
47
|
+
if (this.initialized) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
try {
|
|
51
|
+
this.containerElement = this.getOrCreateContainer();
|
|
52
|
+
this.initializeContainer(this.containerElement);
|
|
53
|
+
this.initializeContents(this.containerElement);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
const msg = error instanceof Error ? error.message : `Could not retrieve container element for UI extension ${this.id}`;
|
|
57
|
+
this.logger.error(this, msg);
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
getOrCreateContainer() {
|
|
63
|
+
if (this.containerElement) {
|
|
64
|
+
return this.containerElement;
|
|
65
|
+
}
|
|
66
|
+
// check if the container already exists, independent from any potential parent container
|
|
67
|
+
// this allows us to use existing elements defined anywhere in the document
|
|
68
|
+
const existingContainer = this.getContainer();
|
|
69
|
+
if (existingContainer) {
|
|
70
|
+
return existingContainer;
|
|
71
|
+
}
|
|
72
|
+
// to create a container the parent container
|
|
73
|
+
const parent = this.getParentContainer();
|
|
74
|
+
if (!(parent === null || parent === void 0 ? void 0 : parent.isConnected)) {
|
|
75
|
+
throw new Error(`Could not obtain attached parent for initializing UI extension ${this.id}`);
|
|
76
|
+
}
|
|
77
|
+
const container = this.createContainer(parent);
|
|
78
|
+
this.insertContainerIntoParent(container, parent);
|
|
79
|
+
return container;
|
|
80
|
+
}
|
|
81
|
+
getContainer() {
|
|
82
|
+
return document.querySelector(this.containerSelector);
|
|
83
|
+
}
|
|
84
|
+
createContainer(parent) {
|
|
85
|
+
const container = document.createElement('div');
|
|
86
|
+
container.id = parent.id + '_' + this.id();
|
|
87
|
+
return container;
|
|
88
|
+
}
|
|
89
|
+
initializeContainer(container) {
|
|
90
|
+
container.classList.add(exports.CSS_UI_EXTENSION_CLASS, this.containerClass());
|
|
91
|
+
}
|
|
92
|
+
getParentContainer() {
|
|
93
|
+
return document.querySelector(this.parentContainerSelector);
|
|
94
|
+
}
|
|
95
|
+
insertContainerIntoParent(container, parent) {
|
|
96
|
+
parent.insertBefore(container, parent.firstChild);
|
|
97
|
+
}
|
|
98
|
+
setContainerVisible(visible) {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
// the parent class simply sets the style directly, however classes provide more fine-grained control
|
|
101
|
+
if (visible) {
|
|
102
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(exports.CSS_HIDDEN_EXTENSION_CLASS);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(exports.CSS_HIDDEN_EXTENSION_CLASS);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
isContainerVisible() {
|
|
109
|
+
var _a;
|
|
110
|
+
return !((_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.contains(exports.CSS_HIDDEN_EXTENSION_CLASS));
|
|
111
|
+
}
|
|
112
|
+
toggleContainerVisible() {
|
|
113
|
+
this.setContainerVisible(!this.isContainerVisible());
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
exports.GLSPAbstractUIExtension = GLSPAbstractUIExtension;
|
|
117
|
+
exports.GLSPAbstractUIExtension = GLSPAbstractUIExtension = __decorate([
|
|
118
|
+
(0, inversify_1.injectable)()
|
|
119
|
+
], GLSPAbstractUIExtension);
|
|
120
|
+
//# sourceMappingURL=ui-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-extension.js","sourceRoot":"","sources":["../../../src/base/ui-extension/ui-extension.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAA4D;AAC5D,yCAAuC;AAE1B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,0BAA0B,GAAG,QAAQ,CAAC;AAEnD;;;GAGG;AAEI,IAAe,uBAAuB,GAAtC,MAAe,uBAAwB,SAAQ,6BAAmB;IACrE,IAAc,kBAAkB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,IAAc,uBAAuB;QACjC,OAAO,GAAG,GAAG,IAAI,CAAC,kBAAkB,CAAC;IACzC,CAAC;IAED,IAAc,iBAAiB;QAC3B,OAAO,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC3B,CAAC;IAED,IAAc,WAAW;QACrB,OAAO,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACnC,CAAC;IAEkB,UAAU;QACzB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,CAAC;YACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;YACpD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAChD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,gBAA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,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3C,OAAO,SAAS,CAAC;IACrB,CAAC;IAES,mBAAmB,CAAC,SAAsB;QAChD,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,8BAAsB,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3E,CAAC;IAES,kBAAkB;QACxB,OAAO,QAAQ,CAAC,aAAa,CAAc,IAAI,CAAC,uBAAuB,CAAE,CAAC;IAC9E,CAAC;IAES,yBAAyB,CAAC,SAAsB,EAAE,MAAmB;QAC3E,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAEkB,mBAAmB,CAAC,OAAgB;;QACnD,qGAAqG;QACrG,IAAI,OAAO,EAAE,CAAC;YACV,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,MAAM,CAAC,kCAA0B,CAAC,CAAC;QACxE,CAAC;aAAM,CAAC;YACJ,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,GAAG,CAAC,kCAA0B,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IAES,kBAAkB;;QACxB,OAAO,CAAC,CAAA,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,QAAQ,CAAC,kCAA0B,CAAC,CAAA,CAAC;IAClF,CAAC;IAES,sBAAsB;QAC5B,IAAI,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AA3FqB,0DAAuB;kCAAvB,uBAAuB;IAD5C,IAAA,sBAAU,GAAE;GACS,uBAAuB,CA2F5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/features/command-palette/command-palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,
|
|
1
|
+
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/features/command-palette/command-palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAIvD,qBACa,kBAAmB,SAAQ,cAAc;cAC/B,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;cAKvD,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CAOjE"}
|
|
@@ -24,18 +24,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
24
24
|
exports.GlspCommandPalette = void 0;
|
|
25
25
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
26
|
const inversify_1 = require("inversify");
|
|
27
|
+
const ui_extension_1 = require("../../base/ui-extension/ui-extension");
|
|
27
28
|
let GlspCommandPalette = class GlspCommandPalette extends sprotty_1.CommandPalette {
|
|
28
29
|
initializeContents(containerElement) {
|
|
29
30
|
super.initializeContents(containerElement);
|
|
30
|
-
containerElement.classList.add(
|
|
31
|
+
containerElement.classList.add(ui_extension_1.CSS_UI_EXTENSION_CLASS);
|
|
31
32
|
}
|
|
32
33
|
setContainerVisible(visible) {
|
|
33
34
|
var _a, _b;
|
|
34
35
|
if (visible) {
|
|
35
|
-
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(
|
|
36
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(ui_extension_1.CSS_HIDDEN_EXTENSION_CLASS);
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
|
-
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(
|
|
39
|
+
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(ui_extension_1.CSS_HIDDEN_EXTENSION_CLASS);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../../../src/features/command-palette/command-palette.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,
|
|
1
|
+
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../../../src/features/command-palette/command-palette.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAAuD;AACvD,yCAAuC;AACvC,uEAA0G;AAGnG,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,wBAAc;IAC/B,kBAAkB,CAAC,gBAA6B;QAC/D,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;QAC3C,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,qCAAsB,CAAC,CAAC;IAC3D,CAAC;IAEkB,mBAAmB,CAAC,OAAgB;;QACnD,IAAI,OAAO,EAAE,CAAC;YACV,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,MAAM,CAAC,yCAA0B,CAAC,CAAC;QACxE,CAAC;aAAM,CAAC;YACJ,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,GAAG,CAAC,yCAA0B,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;CACJ,CAAA;AAbY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAa9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-edit-ui.d.ts","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"label-edit-ui.d.ts","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,qBACa,eAAgB,SAAQ,WAAW;cACzB,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;cAKvD,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CAOjE"}
|
|
@@ -24,18 +24,19 @@ exports.GlspEditLabelUI = void 0;
|
|
|
24
24
|
********************************************************************************/
|
|
25
25
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
26
|
const inversify_1 = require("inversify");
|
|
27
|
+
const ui_extension_1 = require("../../base/ui-extension/ui-extension");
|
|
27
28
|
let GlspEditLabelUI = class GlspEditLabelUI extends sprotty_1.EditLabelUI {
|
|
28
29
|
initializeContents(containerElement) {
|
|
29
30
|
super.initializeContents(containerElement);
|
|
30
|
-
containerElement.classList.add(
|
|
31
|
+
containerElement.classList.add(ui_extension_1.CSS_UI_EXTENSION_CLASS);
|
|
31
32
|
}
|
|
32
33
|
setContainerVisible(visible) {
|
|
33
34
|
var _a, _b;
|
|
34
35
|
if (visible) {
|
|
35
|
-
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(
|
|
36
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(ui_extension_1.CSS_HIDDEN_EXTENSION_CLASS);
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
|
-
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(
|
|
39
|
+
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(ui_extension_1.CSS_HIDDEN_EXTENSION_CLASS);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-edit-ui.js","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"label-edit-ui.js","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAoD;AACpD,yCAAuC;AACvC,uEAA0G;AAGnG,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qBAAW;IACzB,kBAAkB,CAAC,gBAA6B;QAC/D,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;QAC3C,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,qCAAsB,CAAC,CAAC;IAC3D,CAAC;IAEkB,mBAAmB,CAAC,OAAgB;;QACnD,IAAI,OAAO,EAAE,CAAC;YACV,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,MAAM,CAAC,yCAA0B,CAAC,CAAC;QACxE,CAAC;aAAM,CAAC;YACJ,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,GAAG,CAAC,yCAA0B,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;CACJ,CAAA;AAbY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CAa3B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
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
|
+
import { AbstractEdgeRouter, BezierEdgeRouter, GConnectableElement, GParentElement, GRoutableElement, ManhattanEdgeRouter, Point, PolylineEdgeRouter, ResolvedHandleMove } from '@eclipse-glsp/sprotty';
|
|
17
|
+
export declare abstract class GLSPAbstractEdgeRouter extends AbstractEdgeRouter {
|
|
18
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
19
|
+
}
|
|
20
|
+
export declare class GLSPPolylineEdgeRouter extends PolylineEdgeRouter {
|
|
21
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
22
|
+
}
|
|
23
|
+
export declare class GLSPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
24
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
25
|
+
protected applyInnerHandleMoves(edge: GRoutableElement, moves: ResolvedHandleMove[]): void;
|
|
26
|
+
}
|
|
27
|
+
export declare class GLSPBezierEdgeRouter extends BezierEdgeRouter {
|
|
28
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=edge-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-router.d.ts","sourceRoot":"","sources":["../../../src/features/routing/edge-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAErB,MAAM,uBAAuB,CAAC;AAG/B,8BACsB,sBAAuB,SAAQ,kBAAkB;IAC1D,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;CAKX;AAED,qBACa,sBAAuB,SAAQ,kBAAkB;IACjD,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;CAKX;AAED,qBACa,uBAAwB,SAAQ,mBAAmB;IACnD,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;cAMW,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,IAAI;CAuCtG;AAED,qBACa,oBAAqB,SAAQ,gBAAgB;IAC7C,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;CAKX"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.GLSPBezierEdgeRouter = exports.GLSPManhattanEdgeRouter = exports.GLSPPolylineEdgeRouter = exports.GLSPAbstractEdgeRouter = void 0;
|
|
25
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
let GLSPAbstractEdgeRouter = class GLSPAbstractEdgeRouter extends sprotty_1.AbstractEdgeRouter {
|
|
28
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
29
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
30
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
31
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.GLSPAbstractEdgeRouter = GLSPAbstractEdgeRouter;
|
|
35
|
+
exports.GLSPAbstractEdgeRouter = GLSPAbstractEdgeRouter = __decorate([
|
|
36
|
+
(0, inversify_1.injectable)()
|
|
37
|
+
], GLSPAbstractEdgeRouter);
|
|
38
|
+
let GLSPPolylineEdgeRouter = class GLSPPolylineEdgeRouter extends sprotty_1.PolylineEdgeRouter {
|
|
39
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
40
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
41
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
42
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.GLSPPolylineEdgeRouter = GLSPPolylineEdgeRouter;
|
|
46
|
+
exports.GLSPPolylineEdgeRouter = GLSPPolylineEdgeRouter = __decorate([
|
|
47
|
+
(0, inversify_1.injectable)()
|
|
48
|
+
], GLSPPolylineEdgeRouter);
|
|
49
|
+
let GLSPManhattanEdgeRouter = class GLSPManhattanEdgeRouter extends sprotty_1.ManhattanEdgeRouter {
|
|
50
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
51
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
52
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
53
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
54
|
+
}
|
|
55
|
+
applyInnerHandleMoves(edge, moves) {
|
|
56
|
+
const route = this.route(edge);
|
|
57
|
+
const routingPoints = edge.routingPoints;
|
|
58
|
+
const minimalPointDistance = this.getOptions(edge).minimalPointDistance;
|
|
59
|
+
moves.forEach(move => {
|
|
60
|
+
const handle = move.handle;
|
|
61
|
+
const index = handle.pointIndex;
|
|
62
|
+
const correctedX = this.correctX(routingPoints, index, move.toPosition.x, minimalPointDistance);
|
|
63
|
+
const correctedY = this.correctY(routingPoints, index, move.toPosition.y, minimalPointDistance);
|
|
64
|
+
switch (handle.kind) {
|
|
65
|
+
case 'manhattan-50%':
|
|
66
|
+
if (index < 0) {
|
|
67
|
+
if (routingPoints.length === 0) {
|
|
68
|
+
routingPoints.push({ x: correctedX, y: correctedY });
|
|
69
|
+
move.handle.pointIndex = 0;
|
|
70
|
+
}
|
|
71
|
+
else if ((0, sprotty_1.almostEquals)(route[0].x, route[1].x)) {
|
|
72
|
+
this.alignX(routingPoints, 0, correctedX);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.alignY(routingPoints, 0, correctedY);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (index < routingPoints.length - 1) {
|
|
79
|
+
if ((0, sprotty_1.almostEquals)(routingPoints[index].x, routingPoints[index + 1].x)) {
|
|
80
|
+
this.alignX(routingPoints, index, correctedX);
|
|
81
|
+
this.alignX(routingPoints, index + 1, correctedX);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.alignY(routingPoints, index, correctedY);
|
|
85
|
+
this.alignY(routingPoints, index + 1, correctedY);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
if ((0, sprotty_1.almostEquals)(route[route.length - 2].x, route[route.length - 1].x)) {
|
|
90
|
+
this.alignX(routingPoints, routingPoints.length - 1, correctedX);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.alignY(routingPoints, routingPoints.length - 1, correctedY);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter;
|
|
102
|
+
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter = __decorate([
|
|
103
|
+
(0, inversify_1.injectable)()
|
|
104
|
+
], GLSPManhattanEdgeRouter);
|
|
105
|
+
let GLSPBezierEdgeRouter = class GLSPBezierEdgeRouter extends sprotty_1.BezierEdgeRouter {
|
|
106
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
107
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
108
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
109
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.GLSPBezierEdgeRouter = GLSPBezierEdgeRouter;
|
|
113
|
+
exports.GLSPBezierEdgeRouter = GLSPBezierEdgeRouter = __decorate([
|
|
114
|
+
(0, inversify_1.injectable)()
|
|
115
|
+
], GLSPBezierEdgeRouter);
|
|
116
|
+
//# sourceMappingURL=edge-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-router.js","sourceRoot":"","sources":["../../../src/features/routing/edge-router.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAW+B;AAC/B,yCAAuC;AAGhC,IAAe,sBAAsB,GAArC,MAAe,sBAAuB,SAAQ,4BAAkB;IAC1D,mBAAmB,CACxB,WAAgC,EAChC,QAAe,EACf,YAA4B,EAC5B,IAAsB,EACtB,gBAAqC;QAErC,qHAAqH;QACrH,MAAM,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACtG,OAAO,eAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZqB,wDAAsB;iCAAtB,sBAAsB;IAD3C,IAAA,sBAAU,GAAE;GACS,sBAAsB,CAY3C;AAGM,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,4BAAkB;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+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAYhC"}
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export * from './
|
|
16
|
+
export * from './edge-router';
|
|
17
17
|
export * from './routing-module';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
@@ -29,6 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
*
|
|
30
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
31
31
|
********************************************************************************/
|
|
32
|
-
__exportStar(require("./
|
|
32
|
+
__exportStar(require("./edge-router"), exports);
|
|
33
33
|
__exportStar(require("./routing-module"), exports);
|
|
34
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,gDAA8B;AAC9B,mDAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-module.d.ts","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"routing-module.d.ts","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EASH,aAAa,EAQhB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,aAAa,eAqBxB,CAAC"}
|
|
@@ -17,20 +17,20 @@ exports.routingModule = void 0;
|
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
19
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
20
|
-
const
|
|
20
|
+
const edge_router_1 = require("./edge-router");
|
|
21
21
|
exports.routingModule = new sprotty_1.FeatureModule((bind, unbind, isBound, rebind) => {
|
|
22
22
|
const context = { bind, unbind, isBound, rebind };
|
|
23
23
|
bind(sprotty_1.EdgeRouterRegistry).toSelf().inSingletonScope();
|
|
24
24
|
bind(sprotty_1.AnchorComputerRegistry).toSelf().inSingletonScope();
|
|
25
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter,
|
|
25
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter, edge_router_1.GLSPManhattanEdgeRouter);
|
|
26
26
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.ManhattanEllipticAnchor);
|
|
27
27
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.ManhattanRectangularAnchor);
|
|
28
28
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.ManhattanDiamondAnchor);
|
|
29
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter,
|
|
29
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter, edge_router_1.GLSPPolylineEdgeRouter);
|
|
30
30
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.EllipseAnchor);
|
|
31
31
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.RectangleAnchor);
|
|
32
32
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.DiamondAnchor);
|
|
33
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter,
|
|
33
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter, edge_router_1.GLSPBezierEdgeRouter);
|
|
34
34
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.BezierEllipseAnchor);
|
|
35
35
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.BezierRectangleAnchor);
|
|
36
36
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.BezierDiamondAnchor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-module.js","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"routing-module.js","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAiB+B;AAC/B,+CAAsG;AAEzF,QAAA,aAAa,GAAG,IAAI,uBAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAC7E,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,IAAI,CAAC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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/client",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.331+38f93e2",
|
|
4
4
|
"description": "A sprotty-based client for GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"watch": "tsc -w"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@eclipse-glsp/sprotty": "2.2.0-next.
|
|
49
|
+
"@eclipse-glsp/sprotty": "2.2.0-next.331+38f93e2",
|
|
50
50
|
"autocompleter": "^9.1.0",
|
|
51
51
|
"file-saver": "^2.0.5",
|
|
52
52
|
"lodash": "4.17.21"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "38f93e230513f08105858216ea7a365522f6b154"
|
|
65
65
|
}
|
|
@@ -51,7 +51,7 @@ import { SelectionClearingMouseListener } from './selection-clearing-mouse-liste
|
|
|
51
51
|
import { SelectionService } from './selection-service';
|
|
52
52
|
import { EnableDefaultToolsAction, EnableToolsAction } from './tool-manager/tool';
|
|
53
53
|
import { DefaultToolsEnablingKeyListener, ToolManager, ToolManagerActionHandler } from './tool-manager/tool-manager';
|
|
54
|
-
import { GLSPUIExtensionRegistry } from './ui-extension-registry';
|
|
54
|
+
import { GLSPUIExtensionRegistry } from './ui-extension/ui-extension-registry';
|
|
55
55
|
import { GLSPKeyTool } from './view/key-tool';
|
|
56
56
|
import { GLSPMouseTool } from './view/mouse-tool';
|
|
57
57
|
import { GViewRegistry } from './view/view-registry';
|
package/src/base/index.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
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
|
+
export * from './ui-extension';
|
|
17
|
+
export * from './ui-extension-registry';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { IUIExtension, LazyInjector, MaybePromise, TYPES, UIExtensionRegistry } from '@eclipse-glsp/sprotty';
|
|
18
18
|
import { inject, injectable, optional } from 'inversify';
|
|
19
|
-
import { IDiagramStartup } from '
|
|
19
|
+
import { IDiagramStartup } from '../model';
|
|
20
20
|
|
|
21
21
|
@injectable()
|
|
22
22
|
export class GLSPUIExtensionRegistry extends UIExtensionRegistry implements IDiagramStartup {
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
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
|
+
|
|
17
|
+
import { AbstractUIExtension } from '@eclipse-glsp/sprotty';
|
|
18
|
+
import { injectable } from 'inversify';
|
|
19
|
+
|
|
20
|
+
export const CSS_UI_EXTENSION_CLASS = 'ui-extension';
|
|
21
|
+
export const CSS_HIDDEN_EXTENSION_CLASS = 'hidden';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Reusable abstract base implementation for UI extensions.
|
|
25
|
+
* Intended for UI extensions that directly interact with the DOM API to create and manage UI elements.
|
|
26
|
+
*/
|
|
27
|
+
@injectable()
|
|
28
|
+
export abstract class GLSPAbstractUIExtension extends AbstractUIExtension {
|
|
29
|
+
protected get diagramContainerId(): string {
|
|
30
|
+
return this.options.baseDiv;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
protected get parentContainerSelector(): string {
|
|
34
|
+
return '#' + this.diagramContainerId;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
protected get containerSelector(): string {
|
|
38
|
+
return '#' + this.id();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
protected get initialized(): boolean {
|
|
42
|
+
return !!this.containerElement;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
protected override initialize(): boolean {
|
|
46
|
+
if (this.initialized) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
this.containerElement = this.getOrCreateContainer();
|
|
51
|
+
this.initializeContainer(this.containerElement);
|
|
52
|
+
this.initializeContents(this.containerElement);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
const msg = error instanceof Error ? error.message : `Could not retrieve container element for UI extension ${this.id}`;
|
|
55
|
+
this.logger.error(this, msg);
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
protected override getOrCreateContainer(): HTMLElement {
|
|
62
|
+
if (this.containerElement) {
|
|
63
|
+
return this.containerElement;
|
|
64
|
+
}
|
|
65
|
+
// check if the container already exists, independent from any potential parent container
|
|
66
|
+
// this allows us to use existing elements defined anywhere in the document
|
|
67
|
+
const existingContainer = this.getContainer();
|
|
68
|
+
if (existingContainer) {
|
|
69
|
+
return existingContainer;
|
|
70
|
+
}
|
|
71
|
+
// to create a container the parent container
|
|
72
|
+
const parent = this.getParentContainer();
|
|
73
|
+
if (!parent?.isConnected) {
|
|
74
|
+
throw new Error(`Could not obtain attached parent for initializing UI extension ${this.id}`);
|
|
75
|
+
}
|
|
76
|
+
const container = this.createContainer(parent);
|
|
77
|
+
this.insertContainerIntoParent(container, parent);
|
|
78
|
+
return container;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
protected getContainer(): HTMLElement | null {
|
|
82
|
+
return document.querySelector<HTMLElement>(this.containerSelector);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
protected createContainer(parent: HTMLElement): HTMLElement {
|
|
86
|
+
const container = document.createElement('div');
|
|
87
|
+
container.id = parent.id + '_' + this.id();
|
|
88
|
+
return container;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
protected initializeContainer(container: HTMLElement): void {
|
|
92
|
+
container.classList.add(CSS_UI_EXTENSION_CLASS, this.containerClass());
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
protected getParentContainer(): HTMLElement | null {
|
|
96
|
+
return document.querySelector<HTMLElement>(this.parentContainerSelector)!;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
protected insertContainerIntoParent(container: HTMLElement, parent: HTMLElement): void {
|
|
100
|
+
parent.insertBefore(container, parent.firstChild);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
protected override setContainerVisible(visible: boolean): void {
|
|
104
|
+
// the parent class simply sets the style directly, however classes provide more fine-grained control
|
|
105
|
+
if (visible) {
|
|
106
|
+
this.containerElement?.classList.remove(CSS_HIDDEN_EXTENSION_CLASS);
|
|
107
|
+
} else {
|
|
108
|
+
this.containerElement?.classList.add(CSS_HIDDEN_EXTENSION_CLASS);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
protected isContainerVisible(): boolean {
|
|
113
|
+
return !this.containerElement?.classList.contains(CSS_HIDDEN_EXTENSION_CLASS);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
protected toggleContainerVisible(): void {
|
|
117
|
+
this.setContainerVisible(!this.isContainerVisible());
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { CommandPalette } from '@eclipse-glsp/sprotty';
|
|
18
18
|
import { injectable } from 'inversify';
|
|
19
|
+
import { CSS_HIDDEN_EXTENSION_CLASS, CSS_UI_EXTENSION_CLASS } from '../../base/ui-extension/ui-extension';
|
|
19
20
|
|
|
20
21
|
@injectable()
|
|
21
22
|
export class GlspCommandPalette extends CommandPalette {
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
16
|
+
import { EditLabelUI } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { injectable } from 'inversify';
|
|
18
|
+
import { CSS_HIDDEN_EXTENSION_CLASS, CSS_UI_EXTENSION_CLASS } from '../../base/ui-extension/ui-extension';
|
|
18
19
|
|
|
19
20
|
@injectable()
|
|
20
21
|
export class GlspEditLabelUI extends EditLabelUI {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2024 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,9 +14,64 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
AbstractEdgeRouter,
|
|
19
|
+
BezierEdgeRouter,
|
|
20
|
+
GConnectableElement,
|
|
21
|
+
GParentElement,
|
|
22
|
+
GRoutableElement,
|
|
23
|
+
ManhattanEdgeRouter,
|
|
24
|
+
Point,
|
|
25
|
+
PolylineEdgeRouter,
|
|
26
|
+
ResolvedHandleMove,
|
|
27
|
+
almostEquals
|
|
28
|
+
} from '@eclipse-glsp/sprotty';
|
|
29
|
+
import { injectable } from 'inversify';
|
|
18
30
|
|
|
31
|
+
@injectable()
|
|
32
|
+
export abstract class GLSPAbstractEdgeRouter extends AbstractEdgeRouter {
|
|
33
|
+
override getTranslatedAnchor(
|
|
34
|
+
connectable: GConnectableElement,
|
|
35
|
+
refPoint: Point,
|
|
36
|
+
refContainer: GParentElement,
|
|
37
|
+
edge: GRoutableElement,
|
|
38
|
+
anchorCorrection?: number | undefined
|
|
39
|
+
): Point {
|
|
40
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
41
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
42
|
+
return Point.isValid(anchor) ? anchor : refPoint;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@injectable()
|
|
47
|
+
export class GLSPPolylineEdgeRouter extends PolylineEdgeRouter {
|
|
48
|
+
override getTranslatedAnchor(
|
|
49
|
+
connectable: GConnectableElement,
|
|
50
|
+
refPoint: Point,
|
|
51
|
+
refContainer: GParentElement,
|
|
52
|
+
edge: GRoutableElement,
|
|
53
|
+
anchorCorrection?: number | undefined
|
|
54
|
+
): Point {
|
|
55
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
56
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
57
|
+
return Point.isValid(anchor) ? anchor : refPoint;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@injectable()
|
|
19
62
|
export class GLSPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
63
|
+
override getTranslatedAnchor(
|
|
64
|
+
connectable: GConnectableElement,
|
|
65
|
+
refPoint: Point,
|
|
66
|
+
refContainer: GParentElement,
|
|
67
|
+
edge: GRoutableElement,
|
|
68
|
+
anchorCorrection?: number | undefined
|
|
69
|
+
): Point {
|
|
70
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
71
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
72
|
+
return Point.isValid(anchor) ? anchor : refPoint;
|
|
73
|
+
}
|
|
74
|
+
|
|
20
75
|
protected override applyInnerHandleMoves(edge: GRoutableElement, moves: ResolvedHandleMove[]): void {
|
|
21
76
|
const route = this.route(edge);
|
|
22
77
|
const routingPoints = edge.routingPoints;
|
|
@@ -57,3 +112,18 @@ export class GLSPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
|
57
112
|
});
|
|
58
113
|
}
|
|
59
114
|
}
|
|
115
|
+
|
|
116
|
+
@injectable()
|
|
117
|
+
export class GLSPBezierEdgeRouter extends BezierEdgeRouter {
|
|
118
|
+
override getTranslatedAnchor(
|
|
119
|
+
connectable: GConnectableElement,
|
|
120
|
+
refPoint: Point,
|
|
121
|
+
refContainer: GParentElement,
|
|
122
|
+
edge: GRoutableElement,
|
|
123
|
+
anchorCorrection?: number | undefined
|
|
124
|
+
): Point {
|
|
125
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
126
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
127
|
+
return Point.isValid(anchor) ? anchor : refPoint;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export * from './
|
|
16
|
+
export * from './edge-router';
|
|
17
17
|
export * from './routing-module';
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
AddRemoveBezierSegmentCommand,
|
|
18
18
|
AnchorComputerRegistry,
|
|
19
19
|
BezierDiamondAnchor,
|
|
20
|
-
BezierEdgeRouter,
|
|
21
20
|
BezierEllipseAnchor,
|
|
22
21
|
BezierRectangleAnchor,
|
|
23
22
|
DiamondAnchor,
|
|
@@ -27,13 +26,12 @@ import {
|
|
|
27
26
|
ManhattanDiamondAnchor,
|
|
28
27
|
ManhattanEllipticAnchor,
|
|
29
28
|
ManhattanRectangularAnchor,
|
|
30
|
-
PolylineEdgeRouter,
|
|
31
29
|
RectangleAnchor,
|
|
32
30
|
TYPES,
|
|
33
31
|
bindAsService,
|
|
34
32
|
configureCommand
|
|
35
33
|
} from '@eclipse-glsp/sprotty';
|
|
36
|
-
import { GLSPManhattanEdgeRouter } from './
|
|
34
|
+
import { GLSPBezierEdgeRouter, GLSPManhattanEdgeRouter, GLSPPolylineEdgeRouter } from './edge-router';
|
|
37
35
|
|
|
38
36
|
export const routingModule = new FeatureModule((bind, unbind, isBound, rebind) => {
|
|
39
37
|
const context = { bind, unbind, isBound, rebind };
|
|
@@ -45,12 +43,12 @@ export const routingModule = new FeatureModule((bind, unbind, isBound, rebind) =
|
|
|
45
43
|
bindAsService(context, TYPES.IAnchorComputer, ManhattanRectangularAnchor);
|
|
46
44
|
bindAsService(context, TYPES.IAnchorComputer, ManhattanDiamondAnchor);
|
|
47
45
|
|
|
48
|
-
bindAsService(context, TYPES.IEdgeRouter,
|
|
46
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPPolylineEdgeRouter);
|
|
49
47
|
bindAsService(context, TYPES.IAnchorComputer, EllipseAnchor);
|
|
50
48
|
bindAsService(context, TYPES.IAnchorComputer, RectangleAnchor);
|
|
51
49
|
bindAsService(context, TYPES.IAnchorComputer, DiamondAnchor);
|
|
52
50
|
|
|
53
|
-
bindAsService(context, TYPES.IEdgeRouter,
|
|
51
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPBezierEdgeRouter);
|
|
54
52
|
bindAsService(context, TYPES.IAnchorComputer, BezierEllipseAnchor);
|
|
55
53
|
bindAsService(context, TYPES.IAnchorComputer, BezierRectangleAnchor);
|
|
56
54
|
bindAsService(context, TYPES.IAnchorComputer, BezierDiamondAnchor);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-extension-registry.d.ts","sourceRoot":"","sources":["../../src/base/ui-extension-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAS,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE7G,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,qBACa,uBAAwB,SAAQ,mBAAoB,YAAW,eAAe;IAEvF,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;gBAEb,UAAU,GAAE,YAAY,EAAO;IAIvD,cAAc,IAAI,YAAY,CAAC,IAAI,CAAC;CAGvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui-extension-registry.js","sourceRoot":"","sources":["../../src/base/ui-extension-registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;AAElF,mDAA6G;AAC7G,yCAAyD;AAIlD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,6BAAmB;IAI5D,YAAwB,aAA6B,EAAE;QACnD,KAAK,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;IAED,cAAc;QACV,IAAI,CAAC,YAAY,CAAC,MAAM,CAAe,eAAK,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9H,CAAC;CACJ,CAAA;AAXY,0DAAuB;AAEtB;IADT,IAAA,kBAAM,EAAC,sBAAY,CAAC;;6DACgB;kCAF5B,uBAAuB;IADnC,IAAA,sBAAU,GAAE;IAKI,WAAA,IAAA,oBAAQ,GAAE,CAAA;;GAJd,uBAAuB,CAWnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-manhattan-edge-router.d.ts","sourceRoot":"","sources":["../../../src/features/routing/glsp-manhattan-edge-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,EAAgB,MAAM,uBAAuB,CAAC;AAEhH,qBAAa,uBAAwB,SAAQ,mBAAmB;cACzC,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,IAAI;CAuCtG"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
4
|
-
*
|
|
5
|
-
* This program and the accompanying materials are made available under the
|
|
6
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
*
|
|
9
|
-
* This Source Code may also be made available under the following Secondary
|
|
10
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
* with the GNU Classpath Exception which is available at
|
|
13
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
*
|
|
15
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
-
********************************************************************************/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.GLSPManhattanEdgeRouter = void 0;
|
|
19
|
-
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
20
|
-
class GLSPManhattanEdgeRouter extends sprotty_1.ManhattanEdgeRouter {
|
|
21
|
-
applyInnerHandleMoves(edge, moves) {
|
|
22
|
-
const route = this.route(edge);
|
|
23
|
-
const routingPoints = edge.routingPoints;
|
|
24
|
-
const minimalPointDistance = this.getOptions(edge).minimalPointDistance;
|
|
25
|
-
moves.forEach(move => {
|
|
26
|
-
const handle = move.handle;
|
|
27
|
-
const index = handle.pointIndex;
|
|
28
|
-
const correctedX = this.correctX(routingPoints, index, move.toPosition.x, minimalPointDistance);
|
|
29
|
-
const correctedY = this.correctY(routingPoints, index, move.toPosition.y, minimalPointDistance);
|
|
30
|
-
switch (handle.kind) {
|
|
31
|
-
case 'manhattan-50%':
|
|
32
|
-
if (index < 0) {
|
|
33
|
-
if (routingPoints.length === 0) {
|
|
34
|
-
routingPoints.push({ x: correctedX, y: correctedY });
|
|
35
|
-
move.handle.pointIndex = 0;
|
|
36
|
-
}
|
|
37
|
-
else if ((0, sprotty_1.almostEquals)(route[0].x, route[1].x)) {
|
|
38
|
-
this.alignX(routingPoints, 0, correctedX);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.alignY(routingPoints, 0, correctedY);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else if (index < routingPoints.length - 1) {
|
|
45
|
-
if ((0, sprotty_1.almostEquals)(routingPoints[index].x, routingPoints[index + 1].x)) {
|
|
46
|
-
this.alignX(routingPoints, index, correctedX);
|
|
47
|
-
this.alignX(routingPoints, index + 1, correctedX);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this.alignY(routingPoints, index, correctedY);
|
|
51
|
-
this.alignY(routingPoints, index + 1, correctedY);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
if ((0, sprotty_1.almostEquals)(route[route.length - 2].x, route[route.length - 1].x)) {
|
|
56
|
-
this.alignX(routingPoints, routingPoints.length - 1, correctedX);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
this.alignY(routingPoints, routingPoints.length - 1, correctedY);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter;
|
|
68
|
-
//# sourceMappingURL=glsp-manhattan-edge-router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-manhattan-edge-router.js","sourceRoot":"","sources":["../../../src/features/routing/glsp-manhattan-edge-router.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,mDAAgH;AAEhH,MAAa,uBAAwB,SAAQ,6BAAmB;IACzC,qBAAqB,CAAC,IAAsB,EAAE,KAA2B;QACxF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACzC,MAAM,oBAAoB,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC;QACxE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACjB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;YAChC,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE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