@eclipse-glsp/client 1.1.0-next.a07a5f7.197 → 1.1.0-next.b15d96b.196

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.
@@ -1 +1 @@
1
- {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/tools/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAkBxD;;;GAGG;AACH,eAAO,MAAM,WAAW,iBAsBtB,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAA;CAAE,GAAG,IAAI,CAI1G;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,iBAE9C,CAAC"}
1
+ {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/tools/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAiBxD;;;GAGG;AACH,eAAO,MAAM,WAAW,iBAmBtB,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAA;CAAE,GAAG,IAAI,CAI1G;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,iBAE9C,CAAC"}
@@ -28,7 +28,6 @@ const delete_tool_1 = require("./delete-tool");
28
28
  const edge_creation_tool_1 = require("./edge-creation-tool");
29
29
  const edge_edit_tool_1 = require("./edge-edit-tool");
30
30
  const enable_default_tools_on_focus_loss_1 = require("./enable-default-tools-on-focus-loss");
31
- const glsp_manhattan_edge_router_1 = require("./glsp-manhattan-edge-router");
32
31
  const marquee_mouse_tool_1 = require("./marquee-mouse-tool");
33
32
  const marquee_tool_1 = require("./marquee-tool");
34
33
  const model_1 = require("./model");
@@ -54,8 +53,6 @@ exports.toolsModule = new inversify_1.ContainerModule((bind, _unbind, isBound, r
54
53
  (0, sprotty_1.configureActionHandler)({ bind, isBound }, protocol_1.TriggerEdgeCreationAction.KIND, edge_creation_tool_1.EdgeCreationTool);
55
54
  bind(glsp_svg_exporter_1.GLSPSvgExporter).toSelf().inSingletonScope();
56
55
  rebind(types_1.TYPES.SvgExporter).toService(glsp_svg_exporter_1.GLSPSvgExporter);
57
- bind(glsp_manhattan_edge_router_1.GSLPManhattanEdgeRouter).toSelf().inSingletonScope();
58
- rebind(sprotty_1.ManhattanEdgeRouter).toService(glsp_manhattan_edge_router_1.GSLPManhattanEdgeRouter);
59
56
  });
60
57
  function configureMarqueeTool(context) {
61
58
  (0, sprotty_1.configureModelElement)(context, marquee_tool_feedback_1.MARQUEE, model_1.MarqueeNode, view_1.MarqueeView);
@@ -1 +1 @@
1
- {"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/tools/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA8F;AAC9F,yCAAwD;AACxD,qCAA6F;AAC7F,gFAAiF;AACjF,4CAAyC;AACzC,mEAA8D;AAC9D,kFAAiE;AACjE,6DAAwD;AACxD,+CAAkE;AAClE,6DAAwD;AACxD,qDAAgD;AAChD,6FAA4F;AAC5F,6EAAuE;AACvE,6DAAwD;AACxD,iDAA6C;AAC7C,mCAAsC;AACtC,6DAAwD;AACxD,iCAAqC;AAErC;;;GAGG;AACU,QAAA,WAAW,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAC9E,yBAAyB;IACzB,IAAI,CAAC,aAAK,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,qCAAgB,CAAC,CAAC;IAC9C,IAAI,CAAC,aAAK,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,6BAAY,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AE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC9F,IAAA,gCAAsB,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,6CAAuB,CAAC,IAAI,EAAE,yEAAoC,CAAC,CAAC;AAClH,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/client",
3
- "version": "1.1.0-next.a07a5f7.197+a07a5f7",
3
+ "version": "1.1.0-next.b15d96b.196+b15d96b",
4
4
  "description": "A sprotty-based client for GLSP",
5
5
  "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  "css"
35
35
  ],
36
36
  "dependencies": {
37
- "@eclipse-glsp/protocol": "1.1.0-next.a07a5f7.197+a07a5f7",
37
+ "@eclipse-glsp/protocol": "1.1.0-next.b15d96b.196+b15d96b",
38
38
  "autocompleter": "5.1.0",
39
39
  "sprotty": "0.13.0-next.1c4343c.328"
40
40
  },
@@ -58,5 +58,5 @@
58
58
  },
59
59
  "main": "lib/index",
60
60
  "types": "lib/index",
61
- "gitHead": "a07a5f7b4431c017641a824a9f54d1e228ab473a"
61
+ "gitHead": "b15d96ba4be5dc6f7befd20561d6ab5e11fec7df"
62
62
  }
@@ -15,7 +15,7 @@
15
15
  ********************************************************************************/
16
16
  import { TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
17
17
  import { ContainerModule, interfaces } from 'inversify';
18
- import { configureActionHandler, configureModelElement, ManhattanEdgeRouter } from 'sprotty';
18
+ import { configureActionHandler, configureModelElement } from 'sprotty';
19
19
  import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
20
20
  import { TYPES } from '../../base/types';
21
21
  import { GLSPSvgExporter } from '../export/glsp-svg-exporter';
@@ -25,7 +25,6 @@ import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
25
25
  import { EdgeCreationTool } from './edge-creation-tool';
26
26
  import { EdgeEditTool } from './edge-edit-tool';
27
27
  import { EnableDefaultToolsOnFocusLossHandler } from './enable-default-tools-on-focus-loss';
28
- import { GSLPManhattanEdgeRouter } from './glsp-manhattan-edge-router';
29
28
  import { MarqueeMouseTool } from './marquee-mouse-tool';
30
29
  import { MarqueeTool } from './marquee-tool';
31
30
  import { MarqueeNode } from './model';
@@ -55,9 +54,6 @@ export const toolsModule = new ContainerModule((bind, _unbind, isBound, rebind)
55
54
 
56
55
  bind(GLSPSvgExporter).toSelf().inSingletonScope();
57
56
  rebind(TYPES.SvgExporter).toService(GLSPSvgExporter);
58
-
59
- bind(GSLPManhattanEdgeRouter).toSelf().inSingletonScope();
60
- rebind(ManhattanEdgeRouter).toService(GSLPManhattanEdgeRouter);
61
57
  });
62
58
 
63
59
  export function configureMarqueeTool(context: { bind: interfaces.Bind; isBound: interfaces.IsBound }): void {
@@ -1,20 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2022 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 { ManhattanEdgeRouter, ResolvedHandleMove, SRoutableElement } from 'sprotty';
17
- export declare class GSLPManhattanEdgeRouter extends ManhattanEdgeRouter {
18
- protected applyInnerHandleMoves(edge: SRoutableElement, moves: ResolvedHandleMove[]): void;
19
- }
20
- //# sourceMappingURL=glsp-manhattan-edge-router.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-manhattan-edge-router.d.ts","sourceRoot":"","sources":["../../../src/features/tools/glsp-manhattan-edge-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEpF,qBAAa,uBAAwB,SAAQ,mBAAmB;cACzC,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,IAAI;CAoCtG"}
@@ -1,69 +0,0 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (c) 2022 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.GSLPManhattanEdgeRouter = void 0;
19
- const protocol_1 = require("@eclipse-glsp/protocol");
20
- const sprotty_1 = require("sprotty");
21
- class GSLPManhattanEdgeRouter extends sprotty_1.ManhattanEdgeRouter {
22
- applyInnerHandleMoves(edge, moves) {
23
- const route = this.route(edge);
24
- const routingPoints = edge.routingPoints;
25
- const minimalPointDistance = this.getOptions(edge).minimalPointDistance;
26
- moves.forEach(move => {
27
- const handle = move.handle;
28
- const index = handle.pointIndex;
29
- const correctedX = this.correctX(routingPoints, index, move.toPosition.x, minimalPointDistance);
30
- const correctedY = this.correctY(routingPoints, index, move.toPosition.y, minimalPointDistance);
31
- switch (handle.kind) {
32
- case 'manhattan-50%':
33
- if (index < 0) {
34
- if (routingPoints.length === 0) {
35
- routingPoints.push({ x: correctedX, y: correctedY });
36
- move.handle.pointIndex = 0;
37
- }
38
- else if ((0, protocol_1.almostEquals)(route[0].x, route[1].x)) {
39
- this.alignX(routingPoints, 0, correctedX);
40
- }
41
- else {
42
- this.alignY(routingPoints, 0, correctedY);
43
- }
44
- }
45
- else if (index < routingPoints.length - 1) {
46
- if ((0, protocol_1.almostEquals)(routingPoints[index].x, routingPoints[index + 1].x)) {
47
- this.alignX(routingPoints, index, correctedX);
48
- this.alignX(routingPoints, index + 1, correctedX);
49
- }
50
- else {
51
- this.alignY(routingPoints, index, correctedY);
52
- this.alignY(routingPoints, index + 1, correctedY);
53
- }
54
- }
55
- else {
56
- if ((0, protocol_1.almostEquals)(route[route.length - 2].x, route[route.length - 1].x)) {
57
- this.alignX(routingPoints, routingPoints.length - 1, correctedX);
58
- }
59
- else {
60
- this.alignY(routingPoints, routingPoints.length - 1, correctedY);
61
- }
62
- }
63
- break;
64
- }
65
- });
66
- }
67
- }
68
- exports.GSLPManhattanEdgeRouter = GSLPManhattanEdgeRouter;
69
- //# sourceMappingURL=glsp-manhattan-edge-router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-manhattan-edge-router.js","sourceRoot":"","sources":["../../../src/features/tools/glsp-manhattan-edge-router.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,qDAAsD;AACtD,qCAAoF;AAEpF,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,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AC,CAAC;yBACrD;6BAAM;4BACH,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;4BAC9C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;yBACrD;qBACJ;yBAAM;wBACH,IAAI,IAAA,uBAAY,EAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;4BACpE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;yBACpE;6BACI;4BAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;yBAAE;qBAC7E;oBACD,MAAM;aACb;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AArCD,0DAqCC"}
@@ -1,57 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2022 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 { almostEquals } from '@eclipse-glsp/protocol';
18
- import { ManhattanEdgeRouter, ResolvedHandleMove, SRoutableElement } from 'sprotty';
19
-
20
- export class GSLPManhattanEdgeRouter extends ManhattanEdgeRouter {
21
- protected override applyInnerHandleMoves(edge: SRoutableElement, moves: ResolvedHandleMove[]): void {
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 (almostEquals(route[0].x, route[1].x)) { this.alignX(routingPoints, 0, correctedX); }
38
- else { this.alignY(routingPoints, 0, correctedY); }
39
- } else if (index < routingPoints.length - 1) {
40
- if (almostEquals(routingPoints[index].x, routingPoints[index + 1].x)) {
41
- this.alignX(routingPoints, index, correctedX);
42
- this.alignX(routingPoints, index + 1, correctedX);
43
- } else {
44
- this.alignY(routingPoints, index, correctedY);
45
- this.alignY(routingPoints, index + 1, correctedY);
46
- }
47
- } else {
48
- if (almostEquals(route[route.length - 2].x, route[route.length - 1].x)) {
49
- this.alignX(routingPoints, routingPoints.length - 1, correctedX);
50
- }
51
- else { this.alignY(routingPoints, routingPoints.length - 1, correctedY); }
52
- }
53
- break;
54
- }
55
- });
56
- }
57
- }