@eclipse-glsp/sprotty 2.3.0-next.322 → 2.3.0-next.363
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/lib/feature-modules.d.ts +3 -3
- package/lib/feature-modules.d.ts.map +1 -1
- package/lib/feature-modules.js +30 -29
- package/lib/feature-modules.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/re-exports.d.ts +19 -17
- package/lib/re-exports.d.ts.map +1 -1
- package/lib/re-exports.js +70 -53
- package/lib/re-exports.js.map +1 -1
- package/lib/svg-views-override.d.ts +47 -0
- package/lib/svg-views-override.d.ts.map +1 -0
- package/lib/svg-views-override.js +75 -0
- package/lib/svg-views-override.js.map +1 -0
- package/lib/types.d.ts +1 -1
- package/lib/types.js +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +11 -6
- package/src/feature-modules.ts +18 -21
- package/src/index.ts +2 -2
- package/src/re-exports.ts +25 -38
- package/src/svg-views-override.tsx +92 -0
- package/src/types.ts +1 -1
- package/lib/routing-override.d.ts +0 -31
- package/lib/routing-override.d.ts.map +0 -1
- package/lib/routing-override.js +0 -72
- package/lib/routing-override.js.map +0 -1
- package/src/routing-override.ts +0 -88
package/lib/routing-override.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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.BezierEdgeRouter = exports.ManhattanEdgeRouter = exports.PolylineEdgeRouter = exports.AbstractEdgeRouter = void 0;
|
|
25
|
-
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
26
|
-
const inversify_1 = require("inversify");
|
|
27
|
-
const sprotty_1 = require("sprotty");
|
|
28
|
-
let AbstractEdgeRouter = class AbstractEdgeRouter extends sprotty_1.AbstractEdgeRouter {
|
|
29
|
-
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
30
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
31
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
32
|
-
return protocol_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.AbstractEdgeRouter = AbstractEdgeRouter;
|
|
36
|
-
exports.AbstractEdgeRouter = AbstractEdgeRouter = __decorate([
|
|
37
|
-
(0, inversify_1.injectable)()
|
|
38
|
-
], AbstractEdgeRouter);
|
|
39
|
-
let PolylineEdgeRouter = class PolylineEdgeRouter extends sprotty_1.PolylineEdgeRouter {
|
|
40
|
-
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
41
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
42
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
43
|
-
return protocol_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.PolylineEdgeRouter = PolylineEdgeRouter;
|
|
47
|
-
exports.PolylineEdgeRouter = PolylineEdgeRouter = __decorate([
|
|
48
|
-
(0, inversify_1.injectable)()
|
|
49
|
-
], PolylineEdgeRouter);
|
|
50
|
-
let ManhattanEdgeRouter = class ManhattanEdgeRouter extends sprotty_1.ManhattanEdgeRouter {
|
|
51
|
-
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
52
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
53
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
54
|
-
return protocol_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
exports.ManhattanEdgeRouter = ManhattanEdgeRouter;
|
|
58
|
-
exports.ManhattanEdgeRouter = ManhattanEdgeRouter = __decorate([
|
|
59
|
-
(0, inversify_1.injectable)()
|
|
60
|
-
], ManhattanEdgeRouter);
|
|
61
|
-
let BezierEdgeRouter = class BezierEdgeRouter extends sprotty_1.BezierEdgeRouter {
|
|
62
|
-
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
63
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
64
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
65
|
-
return protocol_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
exports.BezierEdgeRouter = BezierEdgeRouter;
|
|
69
|
-
exports.BezierEdgeRouter = BezierEdgeRouter = __decorate([
|
|
70
|
-
(0, inversify_1.injectable)()
|
|
71
|
-
], BezierEdgeRouter);
|
|
72
|
-
//# sourceMappingURL=routing-override.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routing-override.js","sourceRoot":"","sources":["../src/routing-override.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,qDAA+C;AAC/C,yCAAuC;AACvC,qCAQiB;AAIV,IAAe,kBAAkB,GAAjC,MAAe,kBAAmB,SAAQ,4BAAyB;IAC7D,mBAAmB,CACxB,WAAoC,EACpC,QAAe,EACf,YAAgC,EAChC,IAA0B,EAC1B,gBAAqC;QAErC,qHAAqH;QACrH,MAAM,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACtG,OAAO,gBAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZqB,gDAAkB;6BAAlB,kBAAkB;IADvC,IAAA,sBAAU,GAAE;GACS,kBAAkB,CAYvC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,4BAAyB;IACpD,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,gBAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAY9B;AAGM,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,6BAA0B;IACtD,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,gBAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;GACA,mBAAmB,CAY/B;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,0BAAuB;IAChD,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,gBAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAY5B"}
|
package/src/routing-override.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
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 { Point } from '@eclipse-glsp/protocol';
|
|
18
|
-
import { injectable } from 'inversify';
|
|
19
|
-
import {
|
|
20
|
-
SConnectableElementImpl,
|
|
21
|
-
SParentElementImpl,
|
|
22
|
-
SRoutableElementImpl,
|
|
23
|
-
AbstractEdgeRouter as SprottyAbstractEdgeRouter,
|
|
24
|
-
BezierEdgeRouter as SprottyBezierEdgeRouter,
|
|
25
|
-
ManhattanEdgeRouter as SprottyManhattanEdgeRouter,
|
|
26
|
-
PolylineEdgeRouter as SprottyPolylineEdgeRouter
|
|
27
|
-
} from 'sprotty';
|
|
28
|
-
import { GConnectableElement, GParentElement, GRoutableElement } from './re-exports';
|
|
29
|
-
|
|
30
|
-
@injectable()
|
|
31
|
-
export abstract class AbstractEdgeRouter extends SprottyAbstractEdgeRouter {
|
|
32
|
-
override getTranslatedAnchor(
|
|
33
|
-
connectable: SConnectableElementImpl,
|
|
34
|
-
refPoint: Point,
|
|
35
|
-
refContainer: SParentElementImpl,
|
|
36
|
-
edge: SRoutableElementImpl,
|
|
37
|
-
anchorCorrection?: number | undefined
|
|
38
|
-
): Point {
|
|
39
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
40
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
41
|
-
return Point.isValid(anchor) ? anchor : refPoint;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@injectable()
|
|
46
|
-
export class PolylineEdgeRouter extends SprottyPolylineEdgeRouter {
|
|
47
|
-
override getTranslatedAnchor(
|
|
48
|
-
connectable: GConnectableElement,
|
|
49
|
-
refPoint: Point,
|
|
50
|
-
refContainer: GParentElement,
|
|
51
|
-
edge: GRoutableElement,
|
|
52
|
-
anchorCorrection?: number | undefined
|
|
53
|
-
): Point {
|
|
54
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
55
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
56
|
-
return Point.isValid(anchor) ? anchor : refPoint;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@injectable()
|
|
61
|
-
export class ManhattanEdgeRouter extends SprottyManhattanEdgeRouter {
|
|
62
|
-
override getTranslatedAnchor(
|
|
63
|
-
connectable: GConnectableElement,
|
|
64
|
-
refPoint: Point,
|
|
65
|
-
refContainer: GParentElement,
|
|
66
|
-
edge: GRoutableElement,
|
|
67
|
-
anchorCorrection?: number | undefined
|
|
68
|
-
): Point {
|
|
69
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
70
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
71
|
-
return Point.isValid(anchor) ? anchor : refPoint;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@injectable()
|
|
76
|
-
export class BezierEdgeRouter extends SprottyBezierEdgeRouter {
|
|
77
|
-
override getTranslatedAnchor(
|
|
78
|
-
connectable: GConnectableElement,
|
|
79
|
-
refPoint: Point,
|
|
80
|
-
refContainer: GParentElement,
|
|
81
|
-
edge: GRoutableElement,
|
|
82
|
-
anchorCorrection?: number | undefined
|
|
83
|
-
): Point {
|
|
84
|
-
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
85
|
-
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
86
|
-
return Point.isValid(anchor) ? anchor : refPoint;
|
|
87
|
-
}
|
|
88
|
-
}
|