@eclipse-glsp/graph 0.9.0-next.397cddd.4
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/LICENSE +642 -0
- package/README.md +8 -0
- package/lib/default-types.d.ts +3 -0
- package/lib/default-types.d.ts.map +1 -0
- package/lib/default-types.js +50 -0
- package/lib/default-types.js.map +1 -0
- package/lib/galignable.d.ts +28 -0
- package/lib/galignable.d.ts.map +1 -0
- package/lib/galignable.js +23 -0
- package/lib/galignable.js.map +1 -0
- package/lib/gbound-aware.d.ts +30 -0
- package/lib/gbound-aware.d.ts.map +1 -0
- package/lib/gbound-aware.js +34 -0
- package/lib/gbound-aware.js.map +1 -0
- package/lib/gbutton.d.ts +11 -0
- package/lib/gbutton.d.ts.map +1 -0
- package/lib/gbutton.js +39 -0
- package/lib/gbutton.js.map +1 -0
- package/lib/gcompartment.d.ts +34 -0
- package/lib/gcompartment.d.ts.map +1 -0
- package/lib/gcompartment.js +49 -0
- package/lib/gcompartment.js.map +1 -0
- package/lib/gedge-layoutable.d.ts +34 -0
- package/lib/gedge-layoutable.d.ts.map +1 -0
- package/lib/gedge-layoutable.js +20 -0
- package/lib/gedge-layoutable.js.map +1 -0
- package/lib/gedge.d.ts +46 -0
- package/lib/gedge.d.ts.map +1 -0
- package/lib/gedge.js +88 -0
- package/lib/gedge.js.map +1 -0
- package/lib/ggraph.d.ts +38 -0
- package/lib/ggraph.d.ts.map +1 -0
- package/lib/ggraph.js +51 -0
- package/lib/ggraph.js.map +1 -0
- package/lib/gissue-marker.d.ts +17 -0
- package/lib/gissue-marker.d.ts.map +1 -0
- package/lib/gissue-marker.js +48 -0
- package/lib/gissue-marker.js.map +1 -0
- package/lib/glabel.d.ts +36 -0
- package/lib/glabel.d.ts.map +1 -0
- package/lib/glabel.js +51 -0
- package/lib/glabel.js.map +1 -0
- package/lib/glayout-container.d.ts +27 -0
- package/lib/glayout-container.d.ts.map +1 -0
- package/lib/glayout-container.js +17 -0
- package/lib/glayout-container.js.map +1 -0
- package/lib/glayoutable.d.ts +29 -0
- package/lib/glayoutable.d.ts.map +1 -0
- package/lib/glayoutable.js +39 -0
- package/lib/glayoutable.js.map +1 -0
- package/lib/gmodel-element.d.ts +97 -0
- package/lib/gmodel-element.d.ts.map +1 -0
- package/lib/gmodel-element.js +161 -0
- package/lib/gmodel-element.js.map +1 -0
- package/lib/gnode.d.ts +12 -0
- package/lib/gnode.d.ts.map +1 -0
- package/lib/gnode.js +41 -0
- package/lib/gnode.js.map +1 -0
- package/lib/gport.d.ts +21 -0
- package/lib/gport.d.ts.map +1 -0
- package/lib/gport.js +31 -0
- package/lib/gport.js.map +1 -0
- package/lib/gpre-rendered-element.d.ts +31 -0
- package/lib/gpre-rendered-element.d.ts.map +1 -0
- package/lib/gpre-rendered-element.js +41 -0
- package/lib/gpre-rendered-element.js.map +1 -0
- package/lib/gshape-element.d.ts +36 -0
- package/lib/gshape-element.d.ts.map +1 -0
- package/lib/gshape-element.js +32 -0
- package/lib/gshape-element.js.map +1 -0
- package/lib/index.d.ts +33 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +45 -0
- package/lib/index.js.map +1 -0
- package/package.json +63 -0
- package/src/default-types.ts +48 -0
- package/src/galignable.ts +42 -0
- package/src/gbound-aware.ts +53 -0
- package/src/gbutton.ts +34 -0
- package/src/gcompartment.ts +47 -0
- package/src/gedge-layoutable.ts +45 -0
- package/src/gedge.ts +100 -0
- package/src/ggraph.ts +49 -0
- package/src/gissue-marker.ts +49 -0
- package/src/glabel.ts +50 -0
- package/src/glayout-container.ts +36 -0
- package/src/glayoutable.ts +57 -0
- package/src/gmodel-element.spec.ts +18 -0
- package/src/gmodel-element.ts +216 -0
- package/src/gnode.ts +34 -0
- package/src/gport.ts +26 -0
- package/src/gpre-rendered-element.ts +40 -0
- package/src/gshape-element.ts +51 -0
- package/src/index.ts +32 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultMapping = void 0;
|
|
4
|
+
/********************************************************************************
|
|
5
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* This Source Code may also be made available under the following Secondary
|
|
12
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
+
* with the GNU Classpath Exception which is available at
|
|
15
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
+
*
|
|
17
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
+
********************************************************************************/
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
|
+
const gbutton_1 = require("./gbutton");
|
|
21
|
+
const gcompartment_1 = require("./gcompartment");
|
|
22
|
+
const gedge_1 = require("./gedge");
|
|
23
|
+
const ggraph_1 = require("./ggraph");
|
|
24
|
+
const gissue_marker_1 = require("./gissue-marker");
|
|
25
|
+
const glabel_1 = require("./glabel");
|
|
26
|
+
const gmodel_element_1 = require("./gmodel-element");
|
|
27
|
+
const gnode_1 = require("./gnode");
|
|
28
|
+
const gport_1 = require("./gport");
|
|
29
|
+
const gpre_rendered_element_1 = require("./gpre-rendered-element");
|
|
30
|
+
function getDefaultMapping() {
|
|
31
|
+
const mapping = new Map();
|
|
32
|
+
mapping.set(protocol_1.DefaultTypes.GRAPH, ggraph_1.GGraph);
|
|
33
|
+
mapping.set(protocol_1.DefaultTypes.NODE, gnode_1.GNode);
|
|
34
|
+
mapping.set(protocol_1.DefaultTypes.EDGE, gedge_1.GEdge);
|
|
35
|
+
mapping.set(protocol_1.DefaultTypes.PORT, gport_1.GPort);
|
|
36
|
+
mapping.set(protocol_1.DefaultTypes.LABEL, glabel_1.GLabel);
|
|
37
|
+
mapping.set(protocol_1.DefaultTypes.COMPARTMENT, gcompartment_1.GCompartment);
|
|
38
|
+
mapping.set(protocol_1.DefaultTypes.COMPARTMENT_HEADER, gcompartment_1.GCompartment);
|
|
39
|
+
// TODO: mapping.set(types.BUTTON, GButton);
|
|
40
|
+
mapping.set(protocol_1.DefaultTypes.BUTTON_EXPAND, gbutton_1.GButton);
|
|
41
|
+
mapping.set(protocol_1.DefaultTypes.ISSUE_MARKER, gissue_marker_1.GIssueMarker);
|
|
42
|
+
mapping.set(protocol_1.DefaultTypes.NODE_CIRCLE, gnode_1.GNode);
|
|
43
|
+
mapping.set(protocol_1.DefaultTypes.NODE_RECTANGLE, gnode_1.GNode);
|
|
44
|
+
mapping.set(protocol_1.DefaultTypes.NODE_DIAMOND, gnode_1.GNode);
|
|
45
|
+
mapping.set(protocol_1.DefaultTypes.HTML, gmodel_element_1.GModelRoot);
|
|
46
|
+
mapping.set(protocol_1.DefaultTypes.PRE_RENDERED, gpre_rendered_element_1.GPreRenderedElement);
|
|
47
|
+
return mapping;
|
|
48
|
+
}
|
|
49
|
+
exports.getDefaultMapping = getDefaultMapping;
|
|
50
|
+
//# sourceMappingURL=default-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-types.js","sourceRoot":"","sources":["../src/default-types.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA+D;AAC/D,uCAAoC;AACpC,iDAA8C;AAC9C,mCAAgC;AAChC,qCAAkC;AAClC,mDAA+C;AAC/C,qCAAkC;AAClC,qDAAwE;AACxE,mCAAgC;AAChC,mCAAgC;AAChC,mEAA8D;AAE9D,SAAgB,iBAAiB;IAC7B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAoC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,KAAK,EAAE,eAAM,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,IAAI,EAAE,aAAK,CAAC,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,IAAI,EAAE,aAAK,CAAC,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,IAAI,EAAE,aAAK,CAAC,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,KAAK,EAAE,eAAM,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,WAAW,EAAE,2BAAY,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,kBAAkB,EAAE,2BAAY,CAAC,CAAC;IACpD,4CAA4C;IAC5C,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,aAAa,EAAE,iBAAO,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,YAAY,EAAE,4BAAY,CAAC,CAAC;IAE9C,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,WAAW,EAAE,aAAK,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,cAAc,EAAE,aAAK,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,YAAY,EAAE,aAAK,CAAC,CAAC;IAEvC,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,IAAI,EAAE,2BAAU,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,uBAAK,CAAC,YAAY,EAAE,2CAAmB,CAAC,CAAC;IACrD,OAAO,OAAO,CAAC;AACnB,CAAC;AApBD,8CAoBC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics 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 { Point } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { GModelElement, GModelElementBuilder } from './gmodel-element';
|
|
18
|
+
export declare const GAlignable: unique symbol;
|
|
19
|
+
export interface GAlignable {
|
|
20
|
+
alignment: Point;
|
|
21
|
+
[GAlignable]: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function isGAlignable<G extends GModelElement>(element: G): element is G & GAlignable;
|
|
24
|
+
export declare type GAlignableBuilder<G extends GModelElement = GModelElement> = GModelElementBuilder<G & GAlignable>;
|
|
25
|
+
export declare namespace GAlignableBuilder {
|
|
26
|
+
function alignment<B extends GAlignableBuilder>(builder: B, pointOrX: Point | number, y?: number): B;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=galignable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"galignable.d.ts","sourceRoot":"","sources":["../src/galignable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,eAAO,MAAM,UAAU,eAAuB,CAAC;AAE/C,MAAM,WAAW,UAAU;IACvB,SAAS,EAAE,KAAK,CAAC;IACjB,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,IAAI,CAAC,GAAG,UAAU,CAE3F;AAED,oBAAY,iBAAiB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,oBAAoB,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;AAE9G,yBAAiB,iBAAiB,CAAC;IAC/B,SAAgB,SAAS,CAAC,CAAC,SAAS,iBAAiB,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAQ1G;CACJ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GAlignableBuilder = exports.isGAlignable = exports.GAlignable = void 0;
|
|
4
|
+
exports.GAlignable = Symbol('GAlignable');
|
|
5
|
+
function isGAlignable(element) {
|
|
6
|
+
return (element[exports.GAlignable] = true);
|
|
7
|
+
}
|
|
8
|
+
exports.isGAlignable = isGAlignable;
|
|
9
|
+
var GAlignableBuilder;
|
|
10
|
+
(function (GAlignableBuilder) {
|
|
11
|
+
function alignment(builder, pointOrX, y) {
|
|
12
|
+
const proxy = builder['proxy'];
|
|
13
|
+
if (typeof pointOrX === 'object') {
|
|
14
|
+
proxy.alignment = pointOrX;
|
|
15
|
+
}
|
|
16
|
+
else if (y) {
|
|
17
|
+
proxy.alignment = { x: pointOrX, y };
|
|
18
|
+
}
|
|
19
|
+
return builder;
|
|
20
|
+
}
|
|
21
|
+
GAlignableBuilder.alignment = alignment;
|
|
22
|
+
})(GAlignableBuilder = exports.GAlignableBuilder || (exports.GAlignableBuilder = {}));
|
|
23
|
+
//# sourceMappingURL=galignable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"galignable.js","sourceRoot":"","sources":["../src/galignable.ts"],"names":[],"mappings":";;;AAkBa,QAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAO/C,SAAgB,YAAY,CAA0B,OAAU;IAC5D,OAAO,CAAE,OAAe,CAAC,kBAAU,CAAC,GAAG,IAAI,CAAC,CAAC;AACjD,CAAC;AAFD,oCAEC;AAID,IAAiB,iBAAiB,CAUjC;AAVD,WAAiB,iBAAiB;IAC9B,SAAgB,SAAS,CAA8B,OAAU,EAAE,QAAwB,EAAE,CAAU;QACnG,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAC9B,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;SAC9B;aAAM,IAAI,CAAC,EAAE;YACV,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;SACxC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IARe,2BAAS,YAQxB,CAAA;AACL,CAAC,EAVgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAUjC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics 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 { Dimension, Point } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { GModelElement, GModelElementBuilder } from './gmodel-element';
|
|
18
|
+
export declare const GBoundsAware: unique symbol;
|
|
19
|
+
export interface GBoundsAware {
|
|
20
|
+
position?: Point;
|
|
21
|
+
size?: Dimension;
|
|
22
|
+
[GBoundsAware]: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function isGBoundsAware<G extends GModelElement>(element: G): element is G & GBoundsAware;
|
|
25
|
+
export declare type GBoundsAwareBuilder<G extends GModelElement = GModelElement> = GModelElementBuilder<G & GBoundsAware>;
|
|
26
|
+
export declare namespace GBoundsAwareBuilder {
|
|
27
|
+
function position<B extends GBoundsAwareBuilder>(builder: B, pointOrX: Point | number, y?: number): B;
|
|
28
|
+
function size<B extends GBoundsAwareBuilder>(builder: B, sizeOrWidth: Dimension | number, height?: number): B;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=gbound-aware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gbound-aware.d.ts","sourceRoot":"","sources":["../src/gbound-aware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,eAAO,MAAM,YAAY,eAAyB,CAAC;AAEnD,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,aAAa,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,IAAI,CAAC,GAAG,YAAY,CAE/F;AAED,oBAAY,mBAAmB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,oBAAoB,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC;AAElH,yBAAiB,mBAAmB,CAAC;IACjC,SAAgB,QAAQ,CAAC,CAAC,SAAS,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAQ3G;IAED,SAAgB,IAAI,CAAC,CAAC,SAAS,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,SAAS,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAQnH;CACJ"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GBoundsAwareBuilder = exports.isGBoundsAware = exports.GBoundsAware = void 0;
|
|
4
|
+
exports.GBoundsAware = Symbol('GBoundsAware');
|
|
5
|
+
function isGBoundsAware(element) {
|
|
6
|
+
return (element[exports.GBoundsAware] = true);
|
|
7
|
+
}
|
|
8
|
+
exports.isGBoundsAware = isGBoundsAware;
|
|
9
|
+
var GBoundsAwareBuilder;
|
|
10
|
+
(function (GBoundsAwareBuilder) {
|
|
11
|
+
function position(builder, pointOrX, y) {
|
|
12
|
+
const proxy = builder['proxy'];
|
|
13
|
+
if (typeof pointOrX === 'object') {
|
|
14
|
+
proxy.position = pointOrX;
|
|
15
|
+
}
|
|
16
|
+
else if (y) {
|
|
17
|
+
proxy.position = { x: pointOrX, y };
|
|
18
|
+
}
|
|
19
|
+
return builder;
|
|
20
|
+
}
|
|
21
|
+
GBoundsAwareBuilder.position = position;
|
|
22
|
+
function size(builder, sizeOrWidth, height) {
|
|
23
|
+
const proxy = builder['proxy'];
|
|
24
|
+
if (typeof sizeOrWidth === 'object') {
|
|
25
|
+
proxy.size = sizeOrWidth;
|
|
26
|
+
}
|
|
27
|
+
else if (height) {
|
|
28
|
+
proxy.size = { width: sizeOrWidth, height };
|
|
29
|
+
}
|
|
30
|
+
return builder;
|
|
31
|
+
}
|
|
32
|
+
GBoundsAwareBuilder.size = size;
|
|
33
|
+
})(GBoundsAwareBuilder = exports.GBoundsAwareBuilder || (exports.GBoundsAwareBuilder = {}));
|
|
34
|
+
//# sourceMappingURL=gbound-aware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gbound-aware.js","sourceRoot":"","sources":["../src/gbound-aware.ts"],"names":[],"mappings":";;;AAkBa,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAQnD,SAAgB,cAAc,CAA0B,OAAU;IAC9D,OAAO,CAAE,OAAe,CAAC,oBAAY,CAAC,GAAG,IAAI,CAAC,CAAC;AACnD,CAAC;AAFD,wCAEC;AAID,IAAiB,mBAAmB,CAoBnC;AApBD,WAAiB,mBAAmB;IAChC,SAAgB,QAAQ,CAAgC,OAAU,EAAE,QAAwB,EAAE,CAAU;QACpG,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAC9B,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAC7B;aAAM,IAAI,CAAC,EAAE;YACV,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;SACvC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IARe,4BAAQ,WAQvB,CAAA;IAED,SAAgB,IAAI,CAAgC,OAAU,EAAE,WAA+B,EAAE,MAAe;QAC5G,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACjC,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC;SAC5B;aAAM,IAAI,MAAM,EAAE;YACf,KAAK,CAAC,IAAI,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;SAC/C;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IARe,wBAAI,OAQnB,CAAA;AACL,CAAC,EApBgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAoBnC"}
|
package/lib/gbutton.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GModelElementConstructor } from './gmodel-element';
|
|
2
|
+
import { GShapeElement, GShapeElementBuilder } from './gshape-element';
|
|
3
|
+
export declare class GButton extends GShapeElement {
|
|
4
|
+
static builder<G extends GButton = GButton>(constructor?: GModelElementConstructor<G>): GButtonBuilder;
|
|
5
|
+
type: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class GButtonBuilder<G extends GButton = GButton> extends GShapeElementBuilder<G> {
|
|
9
|
+
enabled(enabled: boolean): this;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=gbutton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gbutton.d.ts","sourceRoot":"","sources":["../src/gbutton.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,qBAAa,OAAQ,SAAQ,aAAa;IACtC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,WAAW,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,cAAc;IAItG,IAAI,SAA8B;IAClC,OAAO,UAAQ;CAClB;AAED,qBAAa,cAAc,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,oBAAoB,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CAIlC"}
|
package/lib/gbutton.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GButtonBuilder = exports.GButton = void 0;
|
|
4
|
+
/********************************************************************************
|
|
5
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* This Source Code may also be made available under the following Secondary
|
|
12
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
+
* with the GNU Classpath Exception which is available at
|
|
15
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
+
*
|
|
17
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
+
********************************************************************************/
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
|
+
const gshape_element_1 = require("./gshape-element");
|
|
21
|
+
class GButton extends gshape_element_1.GShapeElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.type = protocol_1.DefaultTypes.BUTTON_EXPAND;
|
|
25
|
+
this.enabled = true;
|
|
26
|
+
}
|
|
27
|
+
static builder(constructor) {
|
|
28
|
+
return new GButtonBuilder(constructor !== null && constructor !== void 0 ? constructor : GButton).type(protocol_1.DefaultTypes.BUTTON_EXPAND);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.GButton = GButton;
|
|
32
|
+
class GButtonBuilder extends gshape_element_1.GShapeElementBuilder {
|
|
33
|
+
enabled(enabled) {
|
|
34
|
+
this.proxy.enabled = enabled;
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.GButtonBuilder = GButtonBuilder;
|
|
39
|
+
//# sourceMappingURL=gbutton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gbutton.js","sourceRoot":"","sources":["../src/gbutton.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAsD;AAEtD,qDAAuE;AAEvE,MAAa,OAAQ,SAAQ,8BAAa;IAA1C;;QAKI,SAAI,GAAG,uBAAY,CAAC,aAAa,CAAC;QAClC,YAAO,GAAG,IAAI,CAAC;IACnB,CAAC;IANG,MAAM,CAAC,OAAO,CAA8B,WAAyC;QACjF,OAAO,IAAI,cAAc,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,OAAO,CAAC,CAAC,IAAI,CAAC,uBAAY,CAAC,aAAa,CAAC,CAAC;IACvF,CAAC;CAIJ;AAPD,0BAOC;AAED,MAAa,cAA4C,SAAQ,qCAAuB;IACpF,OAAO,CAAC,OAAgB;QACpB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AALD,wCAKC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics 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 { Args, JsonPrimitive } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { GLayoutContainer } from './glayout-container';
|
|
18
|
+
import { GLayoutable } from './glayoutable';
|
|
19
|
+
import { GShapeElement, GShapeElementBuilder } from './gshape-element';
|
|
20
|
+
export declare class GCompartment extends GShapeElement implements GLayoutContainer, GLayoutable {
|
|
21
|
+
static builder(): GCompartmentBuilder;
|
|
22
|
+
type: string;
|
|
23
|
+
layout?: string;
|
|
24
|
+
layoutOptions?: Args;
|
|
25
|
+
[GLayoutContainer]: boolean;
|
|
26
|
+
[GLayoutable]: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare class GCompartmentBuilder<G extends GCompartment = GCompartment> extends GShapeElementBuilder<G> {
|
|
29
|
+
layout(layout?: string): this;
|
|
30
|
+
addLayoutOption(key: string, value: JsonPrimitive): this;
|
|
31
|
+
addLayoutOptions(layoutOptions: Args): this;
|
|
32
|
+
addLayoutOptions(layoutOptions: Map<string, JsonPrimitive>): this;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=gcompartment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcompartment.d.ts","sourceRoot":"","sources":["../src/gcompartment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,IAAI,EAAgB,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAA2B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAsB,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,qBAAa,YAAa,SAAQ,aAAc,YAAW,gBAAgB,EAAE,WAAW;IACpF,MAAM,CAAC,OAAO,IAAI,mBAAmB;IAIrC,IAAI,SAA4B;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,CAAC,gBAAgB,CAAC,UAAQ;IAC1B,CAAC,WAAW,CAAC,UAAQ;CACxB;AAED,qBAAa,mBAAmB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,CAAE,SAAQ,oBAAoB,CAAC,CAAC,CAAC;IACnG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAI7B,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI;IAIxD,gBAAgB,CAAC,aAAa,EAAE,IAAI,GAAG,IAAI;IAC3C,gBAAgB,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,IAAI;CAIpE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a, _b;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GCompartmentBuilder = exports.GCompartment = void 0;
|
|
5
|
+
/********************************************************************************
|
|
6
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
7
|
+
*
|
|
8
|
+
* This program and the accompanying materials are made available under the
|
|
9
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
10
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
11
|
+
*
|
|
12
|
+
* This Source Code may also be made available under the following Secondary
|
|
13
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
14
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
15
|
+
* with the GNU Classpath Exception which is available at
|
|
16
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
17
|
+
*
|
|
18
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
19
|
+
********************************************************************************/
|
|
20
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
21
|
+
const glayout_container_1 = require("./glayout-container");
|
|
22
|
+
const glayoutable_1 = require("./glayoutable");
|
|
23
|
+
const gshape_element_1 = require("./gshape-element");
|
|
24
|
+
class GCompartment extends gshape_element_1.GShapeElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.type = protocol_1.DefaultTypes.COMPARTMENT;
|
|
28
|
+
this[_a] = true;
|
|
29
|
+
this[_b] = true;
|
|
30
|
+
}
|
|
31
|
+
static builder() {
|
|
32
|
+
return new GCompartmentBuilder(GCompartment).type(protocol_1.DefaultTypes.COMPARTMENT);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.GCompartment = GCompartment;
|
|
36
|
+
_a = glayout_container_1.GLayoutContainer, _b = glayoutable_1.GLayoutable;
|
|
37
|
+
class GCompartmentBuilder extends gshape_element_1.GShapeElementBuilder {
|
|
38
|
+
layout(layout) {
|
|
39
|
+
return glayout_container_1.GLayoutContainerBuilder.layout(this, layout);
|
|
40
|
+
}
|
|
41
|
+
addLayoutOption(key, value) {
|
|
42
|
+
return glayoutable_1.GLayoutableBuilder.addLayoutOption(this, key, value);
|
|
43
|
+
}
|
|
44
|
+
addLayoutOptions(layoutOptions) {
|
|
45
|
+
return glayoutable_1.GLayoutableBuilder.addLayoutOptions(this, layoutOptions);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.GCompartmentBuilder = GCompartmentBuilder;
|
|
49
|
+
//# sourceMappingURL=gcompartment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcompartment.js","sourceRoot":"","sources":["../src/gcompartment.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA2E;AAC3E,2DAAgF;AAChF,+CAAgE;AAChE,qDAAuE;AAEvE,MAAa,YAAa,SAAQ,8BAAa;IAA/C;;QAKI,SAAI,GAAG,uBAAY,CAAC,WAAW,CAAC;QAGhC,QAAkB,GAAG,IAAI,CAAC;QAC1B,QAAa,GAAG,IAAI,CAAC;IACzB,CAAC;IATG,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,uBAAY,CAAC,WAAW,CAAC,CAAC;IAChF,CAAC;CAOJ;AAVD,oCAUC;KAFI,oCAAgB,OAChB,yBAAW;AAGhB,MAAa,mBAA2D,SAAQ,qCAAuB;IACnG,MAAM,CAAC,MAAe;QAClB,OAAO,2CAAuB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,eAAe,CAAC,GAAW,EAAE,KAAoB;QAC7C,OAAO,gCAAkB,CAAC,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IAID,gBAAgB,CAAC,aAAgD;QAC7D,OAAO,gCAAkB,CAAC,gBAAgB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACpE,CAAC;CACJ;AAdD,kDAcC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics 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 { GModelElement, GModelElementBuilder } from './gmodel-element';
|
|
17
|
+
export declare type EdgeSide = 'left' | 'right' | 'top' | 'bottom' | 'on';
|
|
18
|
+
export declare class EdgePlacement extends Object {
|
|
19
|
+
rotate: boolean;
|
|
20
|
+
side: EdgeSide;
|
|
21
|
+
position: number;
|
|
22
|
+
offset: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const GEdgeLayoutable: unique symbol;
|
|
25
|
+
export interface GEdgeLayoutable {
|
|
26
|
+
edgePlacement?: EdgePlacement;
|
|
27
|
+
[GEdgeLayoutable]: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function isGEdgeLayoutable<G extends GModelElement>(element: G): element is G & GEdgeLayoutable;
|
|
30
|
+
export declare type GEdgeLayoutableBuilder<G extends GModelElement = GModelElement> = GModelElementBuilder<G & GEdgeLayoutable>;
|
|
31
|
+
export declare namespace GEdgeLayoutableBuilder {
|
|
32
|
+
function edgePlacement<B extends GEdgeLayoutableBuilder>(builder: B, placement?: EdgePlacement): B;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=gedge-layoutable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gedge-layoutable.d.ts","sourceRoot":"","sources":["../src/gedge-layoutable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,oBAAY,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAC;AAElE,qBAAa,aAAc,SAAQ,MAAM;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,aAAa,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,IAAI,CAAC,GAAG,eAAe,CAErG;AAED,oBAAY,sBAAsB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,oBAAoB,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC;AAExH,yBAAiB,sBAAsB,CAAC;IACpC,SAAgB,aAAa,CAAC,CAAC,SAAS,sBAAsB,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,CAAC,CAGxG;CACJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEdgeLayoutableBuilder = exports.isGEdgeLayoutable = exports.GEdgeLayoutable = exports.EdgePlacement = void 0;
|
|
4
|
+
class EdgePlacement extends Object {
|
|
5
|
+
}
|
|
6
|
+
exports.EdgePlacement = EdgePlacement;
|
|
7
|
+
exports.GEdgeLayoutable = Symbol('GEdgeLayoutable');
|
|
8
|
+
function isGEdgeLayoutable(element) {
|
|
9
|
+
return (element[exports.GEdgeLayoutable] = true);
|
|
10
|
+
}
|
|
11
|
+
exports.isGEdgeLayoutable = isGEdgeLayoutable;
|
|
12
|
+
var GEdgeLayoutableBuilder;
|
|
13
|
+
(function (GEdgeLayoutableBuilder) {
|
|
14
|
+
function edgePlacement(builder, placement) {
|
|
15
|
+
builder['proxy'].edgePlacement = placement;
|
|
16
|
+
return builder;
|
|
17
|
+
}
|
|
18
|
+
GEdgeLayoutableBuilder.edgePlacement = edgePlacement;
|
|
19
|
+
})(GEdgeLayoutableBuilder = exports.GEdgeLayoutableBuilder || (exports.GEdgeLayoutableBuilder = {}));
|
|
20
|
+
//# sourceMappingURL=gedge-layoutable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gedge-layoutable.js","sourceRoot":"","sources":["../src/gedge-layoutable.ts"],"names":[],"mappings":";;;AAmBA,MAAa,aAAc,SAAQ,MAAM;CAKxC;AALD,sCAKC;AAEY,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAOzD,SAAgB,iBAAiB,CAA0B,OAAU;IACjE,OAAO,CAAE,OAAe,CAAC,uBAAe,CAAC,GAAG,IAAI,CAAC,CAAC;AACtD,CAAC;AAFD,8CAEC;AAID,IAAiB,sBAAsB,CAKtC;AALD,WAAiB,sBAAsB;IACnC,SAAgB,aAAa,CAAmC,OAAU,EAAE,SAAyB;QACjG,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,GAAG,SAAS,CAAC;QAC3C,OAAO,OAAO,CAAC;IACnB,CAAC;IAHe,oCAAa,gBAG5B,CAAA;AACL,CAAC,EALgB,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAKtC"}
|
package/lib/gedge.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 STMicroelectronics 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 { Point } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { GModelElement, GModelElementBuilder } from './gmodel-element';
|
|
18
|
+
export declare class GEdge extends GModelElement {
|
|
19
|
+
static builder(): GEdgeBuilder;
|
|
20
|
+
type: string;
|
|
21
|
+
routingPoints: Point[];
|
|
22
|
+
sourceId: string;
|
|
23
|
+
targetId: string;
|
|
24
|
+
routerKind?: string;
|
|
25
|
+
private _source;
|
|
26
|
+
private _target;
|
|
27
|
+
get source(): GModelElement;
|
|
28
|
+
set source(value: GModelElement);
|
|
29
|
+
get target(): GModelElement;
|
|
30
|
+
set target(value: GModelElement);
|
|
31
|
+
}
|
|
32
|
+
export declare namespace GEdge {
|
|
33
|
+
function is(object: unknown): object is GEdge;
|
|
34
|
+
}
|
|
35
|
+
export declare class GEdgeBuilder<G extends GEdge = GEdge> extends GModelElementBuilder<G> {
|
|
36
|
+
source(source: GModelElement): this;
|
|
37
|
+
sourceId(sourceId: string): this;
|
|
38
|
+
target(target: GModelElement): this;
|
|
39
|
+
targetId(targetId: string): this;
|
|
40
|
+
routerKind(routerKind: string): this;
|
|
41
|
+
addRoutingPoint(x: number, y: number): this;
|
|
42
|
+
addRoutingPoint(point: Point): this;
|
|
43
|
+
addRoutingPoints(routingPoints: Point[]): this;
|
|
44
|
+
addRoutingPoints(...routingPoints: Point[]): this;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=gedge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gedge.d.ts","sourceRoot":"","sources":["../src/gedge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAsC,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,qBAAa,KAAM,SAAQ,aAAa;IACpC,MAAM,CAAC,OAAO,IAAI,YAAY;IAI9B,IAAI,SAAqB;IACzB,aAAa,EAAE,KAAK,EAAE,CAAM;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,OAAO,CAAgB;IAE/B,IAAI,MAAM,IAAI,aAAa,CAE1B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,aAAa,EAG9B;IAED,IAAI,MAAM,IAAI,aAAa,CAE1B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,aAAa,EAG9B;CACJ;AAED,yBAAiB,KAAK,CAAC;IACnB,SAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,KAAK,CAEnD;CACJ;AAED,qBAAa,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,CAAE,SAAQ,oBAAoB,CAAC,CAAC,CAAC;IAC9E,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAKnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKhC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAKnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKhC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKpC,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAC3C,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAUnC,gBAAgB,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,IAAI;IAC9C,gBAAgB,CAAC,GAAG,aAAa,EAAE,KAAK,EAAE,GAAG,IAAI;CAKpD"}
|
package/lib/gedge.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEdgeBuilder = exports.GEdge = void 0;
|
|
4
|
+
/********************************************************************************
|
|
5
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* This Source Code may also be made available under the following Secondary
|
|
12
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
+
* with the GNU Classpath Exception which is available at
|
|
15
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
+
*
|
|
17
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
+
********************************************************************************/
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
|
+
const gmodel_element_1 = require("./gmodel-element");
|
|
21
|
+
class GEdge extends gmodel_element_1.GModelElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.type = protocol_1.DefaultTypes.EDGE;
|
|
25
|
+
this.routingPoints = [];
|
|
26
|
+
}
|
|
27
|
+
static builder() {
|
|
28
|
+
return new GEdgeBuilder(GEdge).type(protocol_1.DefaultTypes.EDGE);
|
|
29
|
+
}
|
|
30
|
+
get source() {
|
|
31
|
+
return this._source;
|
|
32
|
+
}
|
|
33
|
+
set source(value) {
|
|
34
|
+
this._source = value;
|
|
35
|
+
this.sourceId = value.id;
|
|
36
|
+
}
|
|
37
|
+
get target() {
|
|
38
|
+
return this._target;
|
|
39
|
+
}
|
|
40
|
+
set target(value) {
|
|
41
|
+
this._target = value;
|
|
42
|
+
this.targetId = value.id;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.GEdge = GEdge;
|
|
46
|
+
(function (GEdge) {
|
|
47
|
+
function is(object) {
|
|
48
|
+
return GEdge.is(object);
|
|
49
|
+
}
|
|
50
|
+
GEdge.is = is;
|
|
51
|
+
})(GEdge = exports.GEdge || (exports.GEdge = {}));
|
|
52
|
+
class GEdgeBuilder extends gmodel_element_1.GModelElementBuilder {
|
|
53
|
+
source(source) {
|
|
54
|
+
this.proxy.source = source;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
sourceId(sourceId) {
|
|
58
|
+
this.proxy.sourceId = sourceId;
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
target(target) {
|
|
62
|
+
this.proxy.target = target;
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
targetId(targetId) {
|
|
66
|
+
this.proxy.targetId = targetId;
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
routerKind(routerKind) {
|
|
70
|
+
this.proxy.routerKind = routerKind;
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
addRoutingPoint(xOrPoint, y) {
|
|
74
|
+
if (typeof xOrPoint === 'object') {
|
|
75
|
+
this.proxy.routingPoints.push(xOrPoint);
|
|
76
|
+
}
|
|
77
|
+
else if (y) {
|
|
78
|
+
this.proxy.routingPoints.push({ x: xOrPoint, y });
|
|
79
|
+
}
|
|
80
|
+
return this;
|
|
81
|
+
}
|
|
82
|
+
addRoutingPoints(...routingPoints) {
|
|
83
|
+
protocol_1.flatPush(this.proxy.routingPoints, routingPoints);
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.GEdgeBuilder = GEdgeBuilder;
|
|
88
|
+
//# sourceMappingURL=gedge.js.map
|
package/lib/gedge.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gedge.js","sourceRoot":"","sources":["../src/gedge.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAmF;AACnF,qDAAuE;AAEvE,MAAa,KAAM,SAAQ,8BAAa;IAAxC;;QAKI,SAAI,GAAG,uBAAY,CAAC,IAAI,CAAC;QACzB,kBAAa,GAAY,EAAE,CAAC;IAwBhC,CAAC;IA7BG,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IAUD,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAoB;QAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,MAAM,CAAC,KAAoB;QAC3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC;IAC7B,CAAC;CACJ;AA9BD,sBA8BC;AAED,WAAiB,KAAK;IAClB,SAAgB,EAAE,CAAC,MAAe;QAC9B,OAAO,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAFe,QAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAIrB;AAED,MAAa,YAAsC,SAAQ,qCAAuB;IAC9E,MAAM,CAAC,MAAqB;QACxB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,QAAgB;QACrB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,MAAqB;QACxB,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ,CAAC,QAAgB;QACrB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,UAAU,CAAC,UAAkB;QACzB,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAID,eAAe,CAAC,QAAwB,EAAE,CAAU;QAChD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAC9B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC3C;aAAM,IAAI,CAAC,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;SACrD;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAID,gBAAgB,CAAC,GAAG,aAAkC;QAClD,mBAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA3CD,oCA2CC"}
|
package/lib/ggraph.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022 StMicroelectronics.
|
|
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
|
+
* TS implementation of the GLSP graph definition
|
|
18
|
+
* (https://github.com/eclipse-glsp/glsp-server/tree/master/plugins/org.eclipse.glsp.graph/src-gen/org/eclipse/glsp/graph)
|
|
19
|
+
* Parts of the implementation is derived from Sprotty's SModel API
|
|
20
|
+
* (https://github.com/eclipse/sprotty/blob/master/packages/sprotty/src/base/model/smodel.ts)
|
|
21
|
+
*/
|
|
22
|
+
import { Dimension, Point } from '@eclipse-glsp/protocol';
|
|
23
|
+
import { GBoundsAware } from './gbound-aware';
|
|
24
|
+
import { GModelRoot, GModelRootBuilder } from './gmodel-element';
|
|
25
|
+
export declare class GGraph extends GModelRoot implements GBoundsAware {
|
|
26
|
+
static builder(): GGraphBuilder;
|
|
27
|
+
type: string;
|
|
28
|
+
position: Point;
|
|
29
|
+
size?: Dimension;
|
|
30
|
+
[GBoundsAware]: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare class GGraphBuilder<G extends GGraph = GGraph> extends GModelRootBuilder<G> {
|
|
33
|
+
position(x: number, y: number): this;
|
|
34
|
+
position(position: Point): this;
|
|
35
|
+
size(width: number, height: number): this;
|
|
36
|
+
size(size: Dimension): this;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=ggraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ggraph.d.ts","sourceRoot":"","sources":["../src/ggraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF;;;;;GAKG;AACH,OAAO,EAAyB,SAAS,EAAgB,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,qBAAa,MAAO,SAAQ,UAAW,YAAW,YAAY;IAC1D,MAAM,CAAC,OAAO,IAAI,aAAa;IAI/B,IAAI,SAAe;IACnB,QAAQ,EAAE,KAAK,CAAgB;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,CAAC,YAAY,CAAC,UAAQ;CACzB;AAED,qBAAa,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,iBAAiB,CAAC,CAAC,CAAC;IAC9E,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IACpC,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,IAAI;IAK/B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IACzC,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;CAI9B"}
|