@eclipse-glsp/client 1.1.0-next.d4c9817.234 → 1.1.0-next.d9a27cd.236
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/base/container-modules.d.ts +1 -1
- package/lib/base/container-modules.d.ts.map +1 -1
- package/lib/base/container-modules.js +42 -40
- package/lib/base/container-modules.js.map +1 -1
- package/lib/features/svg-metadata/di.config.d.ts +19 -0
- package/lib/features/svg-metadata/di.config.d.ts.map +1 -0
- package/lib/features/svg-metadata/di.config.js +26 -0
- package/lib/features/svg-metadata/di.config.js.map +1 -0
- package/lib/features/svg-metadata/metadata-placer.d.ts +24 -0
- package/lib/features/svg-metadata/metadata-placer.d.ts.map +1 -0
- package/lib/features/svg-metadata/metadata-placer.js +63 -0
- package/lib/features/svg-metadata/metadata-placer.js.map +1 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +39 -36
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/base/container-modules.ts +3 -1
- package/src/features/svg-metadata/di.config.ts +26 -0
- package/src/features/svg-metadata/metadata-placer.ts +51 -0
- package/src/index.ts +4 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { ContainerConfiguration } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { Container, ContainerModule } from 'inversify';
|
|
18
|
-
export declare const DEFAULT_MODULES: readonly [ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule];
|
|
18
|
+
export declare const DEFAULT_MODULES: readonly [ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule, ContainerModule];
|
|
19
19
|
/**
|
|
20
20
|
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
21
21
|
* Additional modules can be passed as direct arguments or as part of a {@link ModuleConfiguration}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-modules.d.ts","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,sBAAsB,EAAuB,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"container-modules.d.ts","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,sBAAsB,EAAuB,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAoCvD,eAAO,MAAM,eAAe,6kBAmClB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAE7H;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS,CAE9E"}
|
|
@@ -19,60 +19,62 @@ exports.createClientContainer = exports.initializeDiagramContainer = exports.DEF
|
|
|
19
19
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
20
|
const inversify_1 = require("inversify");
|
|
21
21
|
const sprotty_1 = require("sprotty");
|
|
22
|
-
const di_config_1 = require("../features/
|
|
23
|
-
const di_config_2 = require("../features/
|
|
24
|
-
const di_config_3 = require("../features/
|
|
25
|
-
const di_config_4 = require("../features/
|
|
26
|
-
const di_config_5 = require("../features/
|
|
27
|
-
const di_config_6 = require("../features/
|
|
28
|
-
const di_config_7 = require("../features/
|
|
29
|
-
const di_config_8 = require("../features/
|
|
30
|
-
const di_config_9 = require("../features/
|
|
31
|
-
const di_config_10 = require("../features/
|
|
32
|
-
const di_config_11 = require("../features/
|
|
33
|
-
const di_config_12 = require("../features/
|
|
34
|
-
const di_config_13 = require("../features/
|
|
35
|
-
const di_config_14 = require("../features/
|
|
36
|
-
const di_config_15 = require("../features/
|
|
37
|
-
const di_config_16 = require("../features/tool-
|
|
38
|
-
const di_config_17 = require("../features/
|
|
39
|
-
const di_config_18 = require("../features/
|
|
40
|
-
const di_config_19 = require("../features/
|
|
41
|
-
const di_config_20 = require("
|
|
22
|
+
const di_config_1 = require("../features/svg-metadata/di.config");
|
|
23
|
+
const di_config_2 = require("../features/bounds/di.config");
|
|
24
|
+
const di_config_3 = require("../features/command-palette/di.config");
|
|
25
|
+
const di_config_4 = require("../features/context-menu/di.config");
|
|
26
|
+
const di_config_5 = require("../features/copy-paste/di.config");
|
|
27
|
+
const di_config_6 = require("../features/decoration/di.config");
|
|
28
|
+
const di_config_7 = require("../features/edit-label/di.config");
|
|
29
|
+
const di_config_8 = require("../features/export/di.config");
|
|
30
|
+
const di_config_9 = require("../features/hints/di.config");
|
|
31
|
+
const di_config_10 = require("../features/hover/di.config");
|
|
32
|
+
const di_config_11 = require("../features/layout/di.config");
|
|
33
|
+
const di_config_12 = require("../features/mouse-tool/di.config");
|
|
34
|
+
const di_config_13 = require("../features/navigation/di.config");
|
|
35
|
+
const di_config_14 = require("../features/select/di.config");
|
|
36
|
+
const di_config_15 = require("../features/source-model-watcher/di.config");
|
|
37
|
+
const di_config_16 = require("../features/tool-feedback/di.config");
|
|
38
|
+
const di_config_17 = require("../features/tool-palette/di.config");
|
|
39
|
+
const di_config_18 = require("../features/tools/di.config");
|
|
40
|
+
const di_config_19 = require("../features/validation/di.config");
|
|
41
|
+
const di_config_20 = require("../features/viewport/di.config");
|
|
42
|
+
const di_config_21 = require("./di.config");
|
|
42
43
|
exports.DEFAULT_MODULES = [
|
|
43
44
|
sprotty_1.defaultModule,
|
|
44
|
-
|
|
45
|
+
di_config_21.default,
|
|
45
46
|
sprotty_1.buttonModule,
|
|
46
47
|
sprotty_1.edgeIntersectionModule,
|
|
47
48
|
sprotty_1.edgeLayoutModule,
|
|
48
49
|
sprotty_1.expandModule,
|
|
49
|
-
|
|
50
|
+
di_config_8.default,
|
|
50
51
|
sprotty_1.fadeModule,
|
|
51
|
-
di_config_1.default,
|
|
52
52
|
di_config_2.default,
|
|
53
53
|
di_config_3.default,
|
|
54
|
-
|
|
54
|
+
di_config_4.default,
|
|
55
55
|
di_config_6.default,
|
|
56
|
-
|
|
57
|
-
di_config_11.default,
|
|
58
|
-
di_config_13.default,
|
|
59
|
-
di_config_4.glspServerCopyPasteModule,
|
|
60
|
-
di_config_19.default,
|
|
61
|
-
sprotty_1.labelEditUiModule,
|
|
56
|
+
di_config_7.default,
|
|
62
57
|
di_config_10.default,
|
|
63
|
-
di_config_18.markerNavigatorModule,
|
|
64
|
-
di_config_8.default,
|
|
65
|
-
sprotty_1.modelSourceModule,
|
|
66
|
-
di_config_14.default,
|
|
67
58
|
di_config_12.default,
|
|
59
|
+
di_config_14.default,
|
|
60
|
+
di_config_5.glspServerCopyPasteModule,
|
|
61
|
+
di_config_20.default,
|
|
62
|
+
sprotty_1.labelEditUiModule,
|
|
63
|
+
di_config_11.default,
|
|
64
|
+
di_config_19.markerNavigatorModule,
|
|
65
|
+
di_config_9.default,
|
|
66
|
+
sprotty_1.modelSourceModule,
|
|
67
|
+
di_config_15.default,
|
|
68
|
+
di_config_13.default,
|
|
68
69
|
sprotty_1.openModule,
|
|
69
|
-
|
|
70
|
+
di_config_17.default,
|
|
70
71
|
sprotty_1.routingModule,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
sprotty_1.zorderModule
|
|
72
|
+
di_config_16.default,
|
|
73
|
+
di_config_18.toolsModule,
|
|
74
|
+
di_config_18.enableDefaultToolsOnFocusLossModule,
|
|
75
|
+
di_config_19.validationModule,
|
|
76
|
+
sprotty_1.zorderModule,
|
|
77
|
+
di_config_1.default
|
|
76
78
|
];
|
|
77
79
|
/**
|
|
78
80
|
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-modules.js","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,qDAAqF;AACrF,yCAAuD;AACvD,qCAYiB;AACjB,4DAA4D;AAC5D,qEAA6E;AAC7E,kEAAuE;AACvE,gEAA6E;AAC7E,gEAAoE;AACpE,gEAAmE;AACnE,4DAA4D;AAC5D,2DAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"container-modules.js","sourceRoot":"","sources":["../../src/base/container-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,qDAAqF;AACrF,yCAAuD;AACvD,qCAYiB;AACjB,kEAAmE;AACnE,4DAA4D;AAC5D,qEAA6E;AAC7E,kEAAuE;AACvE,gEAA6E;AAC7E,gEAAoE;AACpE,gEAAmE;AACnE,4DAA4D;AAC5D,2DAA2D;AAC3D,4DAA0D;AAC1D,6DAAwD;AACxD,iEAAmE;AACnE,iEAAgE;AAChE,6DAA4D;AAC5D,2EAAkF;AAClF,oEAAqE;AACrE,mEAAmE;AACnE,4DAA+F;AAC/F,iEAA2F;AAC3F,+DAAgE;AAChE,4CAA4C;AAE/B,QAAA,eAAe,GAAG;IAC3B,uBAAa;IACb,oBAAiB;IACjB,sBAAY;IACZ,gCAAsB;IACtB,0BAAgB;IAChB,sBAAY;IACZ,mBAAgB;IAChB,oBAAU;IACV,mBAAgB;IAChB,mBAAwB;IACxB,mBAAqB;IACrB,mBAAoB;IACpB,mBAAmB;IACnB,oBAAe;IACf,oBAAmB;IACnB,oBAAgB;IAChB,qCAAyB;IACzB,oBAAkB;IAClB,2BAAiB;IACjB,oBAAY;IACZ,kCAAqB;IACrB,mBAAgB;IAChB,2BAAiB;IACjB,oBAAwB;IACxB,oBAAgB;IAChB,oBAAU;IACV,oBAAiB;IACjB,uBAAa;IACb,oBAAkB;IAClB,wBAAW;IACX,gDAAmC;IACnC,6BAAgB;IAChB,sBAAY;IACZ,mBAAiB;CACX,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,0BAA0B,CAAC,SAAoB,EAAE,GAAG,sBAA8C;IAC9G,OAAO,IAAA,8BAAmB,EAAC,SAAS,EAAE,GAAG,uBAAe,EAAE,GAAG,sBAAsB,CAAC,CAAC;AACzF,CAAC;AAFD,gEAEC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAgB,qBAAqB,CAAC,GAAG,OAA0B;IAC/D,OAAO,0BAA0B,CAAC,IAAI,qBAAS,EAAE,EAAE,GAAG,OAAO,CAAC,CAAC;AACnE,CAAC;AAFD,sDAEC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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 { ContainerModule } from 'inversify';
|
|
17
|
+
declare const svgMetadataModule: ContainerModule;
|
|
18
|
+
export default svgMetadataModule;
|
|
19
|
+
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/svg-metadata/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI5C,QAAA,MAAM,iBAAiB,iBAGrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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
|
+
const inversify_1 = require("inversify");
|
|
19
|
+
const types_1 = require("../../base/types");
|
|
20
|
+
const metadata_placer_1 = require("./metadata-placer");
|
|
21
|
+
const svgMetadataModule = new inversify_1.ContainerModule(bind => {
|
|
22
|
+
bind(metadata_placer_1.MetadataPlacer).toSelf().inSingletonScope();
|
|
23
|
+
bind(types_1.TYPES.IVNodePostprocessor).toService(metadata_placer_1.MetadataPlacer);
|
|
24
|
+
});
|
|
25
|
+
exports.default = svgMetadataModule;
|
|
26
|
+
//# sourceMappingURL=di.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/svg-metadata/di.config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,yCAA4C;AAC5C,4CAAyC;AACzC,uDAAmD;AAEnD,MAAM,iBAAiB,GAAG,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACjD,IAAI,CAAC,gCAAc,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACjD,IAAI,CAAC,aAAK,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,gCAAc,CAAC,CAAC;AAC9D,CAAC,CAAC,CAAC;AAEH,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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 { VNode } from 'snabbdom';
|
|
17
|
+
import { IVNodePostprocessor, SModelElement } from 'sprotty';
|
|
18
|
+
import { DOMHelper } from 'sprotty/lib/base/views/dom-helper';
|
|
19
|
+
export declare class MetadataPlacer implements IVNodePostprocessor {
|
|
20
|
+
protected domHelper: DOMHelper;
|
|
21
|
+
decorate(vnode: VNode, element: SModelElement): VNode;
|
|
22
|
+
postUpdate(): void;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=metadata-placer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-placer.d.ts","sourceRoot":"","sources":["../../../src/features/svg-metadata/metadata-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAiC,aAAa,EAAc,MAAM,SAAS,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAG9D,qBACa,cAAe,YAAW,mBAAmB;IAC7B,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAExD,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;IAqBrD,UAAU,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.MetadataPlacer = void 0;
|
|
28
|
+
const inversify_1 = require("inversify");
|
|
29
|
+
const sprotty_1 = require("sprotty");
|
|
30
|
+
const dom_helper_1 = require("sprotty/lib/base/views/dom-helper");
|
|
31
|
+
const types_1 = require("../../base/types");
|
|
32
|
+
let MetadataPlacer = class MetadataPlacer {
|
|
33
|
+
decorate(vnode, element) {
|
|
34
|
+
if (element instanceof sprotty_1.SModelRoot) {
|
|
35
|
+
(0, sprotty_1.setAttr)(vnode, 'data-svg-metadata-api', true);
|
|
36
|
+
}
|
|
37
|
+
(0, sprotty_1.setAttr)(vnode, 'data-svg-metadata-type', element.type);
|
|
38
|
+
if (element instanceof sprotty_1.SChildElement) {
|
|
39
|
+
(0, sprotty_1.setAttr)(vnode, 'data-svg-metadata-parent-id', this.domHelper.createUniqueDOMElementId(element.parent));
|
|
40
|
+
}
|
|
41
|
+
if (element instanceof sprotty_1.SEdge) {
|
|
42
|
+
if (element.source !== undefined) {
|
|
43
|
+
(0, sprotty_1.setAttr)(vnode, 'data-svg-metadata-edge-source-id', this.domHelper.createUniqueDOMElementId(element.source));
|
|
44
|
+
}
|
|
45
|
+
if (element.target !== undefined) {
|
|
46
|
+
(0, sprotty_1.setAttr)(vnode, 'data-svg-metadata-edge-target-id', this.domHelper.createUniqueDOMElementId(element.target));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return vnode;
|
|
50
|
+
}
|
|
51
|
+
postUpdate() {
|
|
52
|
+
// empty
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, inversify_1.inject)(types_1.TYPES.DOMHelper),
|
|
57
|
+
__metadata("design:type", dom_helper_1.DOMHelper)
|
|
58
|
+
], MetadataPlacer.prototype, "domHelper", void 0);
|
|
59
|
+
MetadataPlacer = __decorate([
|
|
60
|
+
(0, inversify_1.injectable)()
|
|
61
|
+
], MetadataPlacer);
|
|
62
|
+
exports.MetadataPlacer = MetadataPlacer;
|
|
63
|
+
//# sourceMappingURL=metadata-placer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-placer.js","sourceRoot":"","sources":["../../../src/features/svg-metadata/metadata-placer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,yCAA+C;AAE/C,qCAAwG;AACxG,kEAA8D;AAC9D,4CAAyC;AAGlC,IAAM,cAAc,GAApB,MAAM,cAAc;IAGvB,QAAQ,CAAC,KAAY,EAAE,OAAsB;QACzC,IAAI,OAAO,YAAY,oBAAU,EAAE;YAC/B,IAAA,iBAAO,EAAC,KAAK,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC;SACjD;QAED,IAAA,iBAAO,EAAC,KAAK,EAAE,wBAAwB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvD,IAAI,OAAO,YAAY,uBAAa,EAAE;YAClC,IAAA,iBAAO,EAAC,KAAK,EAAE,6BAA6B,EAAE,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC1G;QACD,IAAI,OAAO,YAAY,eAAK,EAAE;YAC1B,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;gBAC9B,IAAA,iBAAO,EAAC,KAAK,EAAE,kCAAkC,EAAE,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;aAC/G;YACD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;gBAC9B,IAAA,iBAAO,EAAC,KAAK,EAAE,kCAAkC,EAAE,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;aAC/G;SACJ;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,UAAU;QACN,QAAQ;IACZ,CAAC;CACJ,CAAA;AA1BG;IAAC,IAAA,kBAAM,EAAC,aAAK,CAAC,SAAS,CAAC;8BAAsB,sBAAS;iDAAC;AAD/C,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CA2B1B;AA3BY,wCAAc"}
|
package/lib/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import glspCommandPaletteModule from './features/command-palette/di.config';
|
|
|
18
18
|
import glspContextMenuModule from './features/context-menu/di.config';
|
|
19
19
|
import { copyPasteContextMenuModule, glspServerCopyPasteModule } from './features/copy-paste/di.config';
|
|
20
20
|
import glspDecorationModule from './features/decoration/di.config';
|
|
21
|
+
import svgMetadataModule from './features/svg-metadata/di.config';
|
|
21
22
|
import glspEditLabelModule from './features/edit-label/di.config';
|
|
22
23
|
import modelHintsModule from './features/hints/di.config';
|
|
23
24
|
import glspHoverModule from './features/hover/di.config';
|
|
@@ -69,6 +70,7 @@ export * from './features/context-menu/server-context-menu-provider';
|
|
|
69
70
|
export * from './features/copy-paste/copy-paste-context-menu';
|
|
70
71
|
export * from './features/copy-paste/copy-paste-handler';
|
|
71
72
|
export * from './features/decoration/decoration-placer';
|
|
73
|
+
export * from './features/svg-metadata/metadata-placer';
|
|
72
74
|
export * from './features/edit-label/edit-label-tool';
|
|
73
75
|
export * from './features/edit-label/edit-label-validator';
|
|
74
76
|
export * from './features/export/glsp-svg-exporter';
|
|
@@ -121,5 +123,5 @@ export * from './utils/marker';
|
|
|
121
123
|
export * from './utils/smodel-util';
|
|
122
124
|
export * from './utils/viewpoint-util';
|
|
123
125
|
export * from './views';
|
|
124
|
-
export { validationModule, saveModule, paletteModule, toolFeedbackModule, defaultGLSPModule, modelHintsModule, glspCommandPaletteModule, glspContextMenuModule, glspServerCopyPasteModule, copyPasteContextMenuModule, glspSelectModule, glspMouseToolModule, layoutModule, glspEditLabelModule, glspHoverModule, toolsModule, enableDefaultToolsOnFocusLossModule, navigationModule, markerNavigatorModule, glspDecorationModule, sourceModelWatcherModule, markerNavigatorContextMenuModule, glspViewportModule };
|
|
126
|
+
export { validationModule, saveModule, paletteModule, toolFeedbackModule, defaultGLSPModule, modelHintsModule, glspCommandPaletteModule, glspContextMenuModule, glspServerCopyPasteModule, copyPasteContextMenuModule, glspSelectModule, glspMouseToolModule, layoutModule, glspEditLabelModule, glspHoverModule, toolsModule, enableDefaultToolsOnFocusLossModule, navigationModule, markerNavigatorModule, glspDecorationModule, sourceModelWatcherModule, markerNavigatorContextMenuModule, glspViewportModule, svgMetadataModule };
|
|
125
127
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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EACrB,oBAAoB,EACpB,wBAAwB,EACxB,gCAAgC,EAChC,kBAAkB,EAClB,iBAAiB,EACpB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.glspViewportModule = exports.markerNavigatorContextMenuModule = exports.sourceModelWatcherModule = exports.glspDecorationModule = exports.markerNavigatorModule = exports.navigationModule = exports.enableDefaultToolsOnFocusLossModule = exports.toolsModule = exports.glspHoverModule = exports.glspEditLabelModule = exports.layoutModule = exports.glspMouseToolModule = exports.glspSelectModule = exports.copyPasteContextMenuModule = exports.glspServerCopyPasteModule = exports.glspContextMenuModule = exports.glspCommandPaletteModule = exports.modelHintsModule = exports.defaultGLSPModule = exports.toolFeedbackModule = exports.paletteModule = exports.saveModule = exports.validationModule = exports.configureMarqueeTool = exports.configureServerActions = void 0;
|
|
17
|
+
exports.svgMetadataModule = exports.glspViewportModule = exports.markerNavigatorContextMenuModule = exports.sourceModelWatcherModule = exports.glspDecorationModule = exports.markerNavigatorModule = exports.navigationModule = exports.enableDefaultToolsOnFocusLossModule = exports.toolsModule = exports.glspHoverModule = exports.glspEditLabelModule = exports.layoutModule = exports.glspMouseToolModule = exports.glspSelectModule = exports.copyPasteContextMenuModule = exports.glspServerCopyPasteModule = exports.glspContextMenuModule = exports.glspCommandPaletteModule = exports.modelHintsModule = exports.defaultGLSPModule = exports.toolFeedbackModule = exports.paletteModule = exports.saveModule = exports.validationModule = exports.configureMarqueeTool = exports.configureServerActions = void 0;
|
|
18
18
|
/********************************************************************************
|
|
19
19
|
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
20
20
|
*
|
|
@@ -41,37 +41,39 @@ Object.defineProperty(exports, "copyPasteContextMenuModule", { enumerable: true,
|
|
|
41
41
|
Object.defineProperty(exports, "glspServerCopyPasteModule", { enumerable: true, get: function () { return di_config_4.glspServerCopyPasteModule; } });
|
|
42
42
|
const di_config_5 = require("./features/decoration/di.config");
|
|
43
43
|
exports.glspDecorationModule = di_config_5.default;
|
|
44
|
-
const di_config_6 = require("./features/
|
|
45
|
-
exports.
|
|
46
|
-
const di_config_7 = require("./features/
|
|
47
|
-
exports.
|
|
48
|
-
const di_config_8 = require("./features/
|
|
49
|
-
exports.
|
|
50
|
-
const di_config_9 = require("./features/
|
|
51
|
-
exports.
|
|
52
|
-
const di_config_10 = require("./features/
|
|
53
|
-
exports.
|
|
54
|
-
const di_config_11 = require("./features/
|
|
55
|
-
exports.
|
|
56
|
-
const di_config_12 = require("./features/
|
|
57
|
-
exports.
|
|
58
|
-
const di_config_13 = require("./features/
|
|
59
|
-
exports.
|
|
60
|
-
const di_config_14 = require("./features/
|
|
61
|
-
exports.
|
|
62
|
-
const di_config_15 = require("./features/
|
|
63
|
-
exports.
|
|
64
|
-
const di_config_16 = require("./features/tool-
|
|
65
|
-
exports.
|
|
66
|
-
const di_config_17 = require("./features/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Object.defineProperty(exports, "
|
|
71
|
-
|
|
72
|
-
Object.defineProperty(exports, "
|
|
73
|
-
|
|
74
|
-
exports
|
|
44
|
+
const di_config_6 = require("./features/svg-metadata/di.config");
|
|
45
|
+
exports.svgMetadataModule = di_config_6.default;
|
|
46
|
+
const di_config_7 = require("./features/edit-label/di.config");
|
|
47
|
+
exports.glspEditLabelModule = di_config_7.default;
|
|
48
|
+
const di_config_8 = require("./features/hints/di.config");
|
|
49
|
+
exports.modelHintsModule = di_config_8.default;
|
|
50
|
+
const di_config_9 = require("./features/hover/di.config");
|
|
51
|
+
exports.glspHoverModule = di_config_9.default;
|
|
52
|
+
const di_config_10 = require("./features/layout/di.config");
|
|
53
|
+
exports.layoutModule = di_config_10.default;
|
|
54
|
+
const di_config_11 = require("./features/mouse-tool/di.config");
|
|
55
|
+
exports.glspMouseToolModule = di_config_11.default;
|
|
56
|
+
const di_config_12 = require("./features/navigation/di.config");
|
|
57
|
+
exports.navigationModule = di_config_12.default;
|
|
58
|
+
const di_config_13 = require("./features/save/di.config");
|
|
59
|
+
exports.saveModule = di_config_13.default;
|
|
60
|
+
const di_config_14 = require("./features/select/di.config");
|
|
61
|
+
exports.glspSelectModule = di_config_14.default;
|
|
62
|
+
const di_config_15 = require("./features/source-model-watcher/di.config");
|
|
63
|
+
exports.sourceModelWatcherModule = di_config_15.default;
|
|
64
|
+
const di_config_16 = require("./features/tool-feedback/di.config");
|
|
65
|
+
exports.toolFeedbackModule = di_config_16.default;
|
|
66
|
+
const di_config_17 = require("./features/tool-palette/di.config");
|
|
67
|
+
exports.paletteModule = di_config_17.default;
|
|
68
|
+
const di_config_18 = require("./features/tools/di.config");
|
|
69
|
+
Object.defineProperty(exports, "enableDefaultToolsOnFocusLossModule", { enumerable: true, get: function () { return di_config_18.enableDefaultToolsOnFocusLossModule; } });
|
|
70
|
+
Object.defineProperty(exports, "toolsModule", { enumerable: true, get: function () { return di_config_18.toolsModule; } });
|
|
71
|
+
const di_config_19 = require("./features/validation/di.config");
|
|
72
|
+
Object.defineProperty(exports, "markerNavigatorContextMenuModule", { enumerable: true, get: function () { return di_config_19.markerNavigatorContextMenuModule; } });
|
|
73
|
+
Object.defineProperty(exports, "markerNavigatorModule", { enumerable: true, get: function () { return di_config_19.markerNavigatorModule; } });
|
|
74
|
+
Object.defineProperty(exports, "validationModule", { enumerable: true, get: function () { return di_config_19.validationModule; } });
|
|
75
|
+
const di_config_20 = require("./features/viewport/di.config");
|
|
76
|
+
exports.glspViewportModule = di_config_20.default;
|
|
75
77
|
// ------------------ Base ------------------
|
|
76
78
|
__exportStar(require("./base/action-dispatcher"), exports);
|
|
77
79
|
__exportStar(require("./base/actions/focus-change-action"), exports);
|
|
@@ -81,8 +83,8 @@ __exportStar(require("./base/auto-complete/auto-complete-widget"), exports);
|
|
|
81
83
|
__exportStar(require("./base/auto-complete/validation-decorator"), exports);
|
|
82
84
|
__exportStar(require("./base/command-stack"), exports);
|
|
83
85
|
__exportStar(require("./base/container-modules"), exports);
|
|
84
|
-
var
|
|
85
|
-
Object.defineProperty(exports, "configureServerActions", { enumerable: true, get: function () { return
|
|
86
|
+
var di_config_21 = require("./base/di.config");
|
|
87
|
+
Object.defineProperty(exports, "configureServerActions", { enumerable: true, get: function () { return di_config_21.configureServerActions; } });
|
|
86
88
|
__exportStar(require("./base/drag-aware-mouse-listener"), exports);
|
|
87
89
|
__exportStar(require("./base/editor-context-service"), exports);
|
|
88
90
|
__exportStar(require("./base/focus-tracker"), exports);
|
|
@@ -113,6 +115,7 @@ __exportStar(require("./features/context-menu/server-context-menu-provider"), ex
|
|
|
113
115
|
__exportStar(require("./features/copy-paste/copy-paste-context-menu"), exports);
|
|
114
116
|
__exportStar(require("./features/copy-paste/copy-paste-handler"), exports);
|
|
115
117
|
__exportStar(require("./features/decoration/decoration-placer"), exports);
|
|
118
|
+
__exportStar(require("./features/svg-metadata/metadata-placer"), exports);
|
|
116
119
|
__exportStar(require("./features/edit-label/edit-label-tool"), exports);
|
|
117
120
|
__exportStar(require("./features/edit-label/edit-label-validator"), exports);
|
|
118
121
|
__exportStar(require("./features/export/glsp-svg-exporter"), exports);
|
|
@@ -143,8 +146,8 @@ __exportStar(require("./features/tool-palette/tool-palette"), exports);
|
|
|
143
146
|
__exportStar(require("./features/tools/base-glsp-tool"), exports);
|
|
144
147
|
__exportStar(require("./features/tools/change-bounds-tool"), exports);
|
|
145
148
|
__exportStar(require("./features/tools/delete-tool"), exports);
|
|
146
|
-
var
|
|
147
|
-
Object.defineProperty(exports, "configureMarqueeTool", { enumerable: true, get: function () { return
|
|
149
|
+
var di_config_22 = require("./features/tools/di.config");
|
|
150
|
+
Object.defineProperty(exports, "configureMarqueeTool", { enumerable: true, get: function () { return di_config_22.configureMarqueeTool; } });
|
|
148
151
|
__exportStar(require("./features/tools/edge-creation-tool"), exports);
|
|
149
152
|
__exportStar(require("./features/tools/edge-edit-tool"), exports);
|
|
150
153
|
__exportStar(require("./features/tools/enable-default-tools-on-focus-loss"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,gDAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,gDAAiD;AA0H7C,4BA1HG,mBAAiB,CA0HH;AAzHrB,oEAA4E;AA2HxE,mCA3HG,mBAAwB,CA2HH;AA1H5B,iEAAsE;AA2HlE,gCA3HG,mBAAqB,CA2HH;AA1HzB,+DAAwG;AA4HpG,2GA5HK,sCAA0B,OA4HL;AAD1B,0GA3HiC,qCAAyB,OA2HjC;AA1H7B,+DAAmE;AAqI/D,+BArIG,mBAAoB,CAqIH;AApIxB,iEAAkE;AAwI9D,4BAxIG,mBAAiB,CAwIH;AAvIrB,+DAAkE;AA6H9D,8BA7HG,mBAAmB,CA6HH;AA5HvB,0DAA0D;AAoHtD,2BApHG,mBAAgB,CAoHH;AAnHpB,0DAAyD;AA4HrD,0BA5HG,mBAAe,CA4HH;AA3HnB,4DAAuD;AAyHnD,uBAzHG,oBAAY,CAyHH;AAxHhB,gEAAkE;AAuH9D,8BAvHG,oBAAmB,CAuHH;AAtHvB,gEAA+D;AA4H3D,2BA5HG,oBAAgB,CA4HH;AA3HpB,0DAAmD;AA2G/C,qBA3GG,oBAAU,CA2GH;AA1Gd,4DAA2D;AAmHvD,2BAnHG,oBAAgB,CAmHH;AAlHpB,0EAAiF;AA4H7E,mCA5HG,oBAAwB,CA4HH;AA3H5B,mEAAoE;AA0GhE,6BA1GG,oBAA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AgE;AAChE,wEAAsD;AACtD,mFAAiE;AACjE,sFAAoE;AACpE,iFAA+D;AAC/D,iEAA+C;AAC/C,gEAA8C;AAC9C,uEAAqD;AACrD,kEAAgD;AAChD,sEAAoD;AACpD,+DAA6C;AAC7C,yDAAkE;AAAzD,kHAAA,oBAAoB,OAAA;AAC7B,sEAAoD;AACpD,kEAAgD;AAChD,sFAAoE;AACpE,8EAA4D;AAC5D,oEAAkD;AAClD,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yEAAuD;AACvD,iEAA+C;AAC/C,iFAA+D;AAC/D,EAAE;AACF,6CAA6C;AAC7C,8CAA4B;AAC5B,qEAAmD;AACnD,qDAAmC;AACnC,yDAAuC;AACvC,qDAAmC;AACnC,uDAAqC;AACrC,iDAA+B;AAC/B,sDAAoC;AACpC,yDAAuC;AACvC,0CAAwB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/client",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.d9a27cd.236+d9a27cd",
|
|
4
4
|
"description": "A sprotty-based client for GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"watch": "tsc -w"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@eclipse-glsp/protocol": "1.1.0-next.
|
|
50
|
+
"@eclipse-glsp/protocol": "1.1.0-next.d9a27cd.236+d9a27cd",
|
|
51
51
|
"autocompleter": "5.1.0",
|
|
52
52
|
"sprotty": "0.13.0-next.f4445dd.342"
|
|
53
53
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "d9a27cd89ac2060005a69741e965e8a5bbb64955"
|
|
61
61
|
}
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
routingModule,
|
|
30
30
|
zorderModule
|
|
31
31
|
} from 'sprotty';
|
|
32
|
+
import svgMetadataModule from '../features/svg-metadata/di.config';
|
|
32
33
|
import glspBoundsModule from '../features/bounds/di.config';
|
|
33
34
|
import glspCommandPaletteModule from '../features/command-palette/di.config';
|
|
34
35
|
import glspContextMenuModule from '../features/context-menu/di.config';
|
|
@@ -83,7 +84,8 @@ export const DEFAULT_MODULES = [
|
|
|
83
84
|
toolsModule,
|
|
84
85
|
enableDefaultToolsOnFocusLossModule,
|
|
85
86
|
validationModule,
|
|
86
|
-
zorderModule
|
|
87
|
+
zorderModule,
|
|
88
|
+
svgMetadataModule
|
|
87
89
|
] as const;
|
|
88
90
|
|
|
89
91
|
/**
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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 { ContainerModule } from 'inversify';
|
|
18
|
+
import { TYPES } from '../../base/types';
|
|
19
|
+
import { MetadataPlacer } from './metadata-placer';
|
|
20
|
+
|
|
21
|
+
const svgMetadataModule = new ContainerModule(bind => {
|
|
22
|
+
bind(MetadataPlacer).toSelf().inSingletonScope();
|
|
23
|
+
bind(TYPES.IVNodePostprocessor).toService(MetadataPlacer);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export default svgMetadataModule;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) 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 { injectable, inject } from 'inversify';
|
|
18
|
+
import { VNode } from 'snabbdom';
|
|
19
|
+
import { IVNodePostprocessor, SChildElement, SEdge, setAttr, SModelElement, SModelRoot } from 'sprotty';
|
|
20
|
+
import { DOMHelper } from 'sprotty/lib/base/views/dom-helper';
|
|
21
|
+
import { TYPES } from '../../base/types';
|
|
22
|
+
|
|
23
|
+
@injectable()
|
|
24
|
+
export class MetadataPlacer implements IVNodePostprocessor {
|
|
25
|
+
@inject(TYPES.DOMHelper) protected domHelper: DOMHelper;
|
|
26
|
+
|
|
27
|
+
decorate(vnode: VNode, element: SModelElement): VNode {
|
|
28
|
+
if (element instanceof SModelRoot) {
|
|
29
|
+
setAttr(vnode, 'data-svg-metadata-api', true);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
setAttr(vnode, 'data-svg-metadata-type', element.type);
|
|
33
|
+
|
|
34
|
+
if (element instanceof SChildElement) {
|
|
35
|
+
setAttr(vnode, 'data-svg-metadata-parent-id', this.domHelper.createUniqueDOMElementId(element.parent));
|
|
36
|
+
}
|
|
37
|
+
if (element instanceof SEdge) {
|
|
38
|
+
if (element.source !== undefined) {
|
|
39
|
+
setAttr(vnode, 'data-svg-metadata-edge-source-id', this.domHelper.createUniqueDOMElementId(element.source));
|
|
40
|
+
}
|
|
41
|
+
if (element.target !== undefined) {
|
|
42
|
+
setAttr(vnode, 'data-svg-metadata-edge-target-id', this.domHelper.createUniqueDOMElementId(element.target));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return vnode;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
postUpdate(): void {
|
|
49
|
+
// empty
|
|
50
|
+
}
|
|
51
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ import glspCommandPaletteModule from './features/command-palette/di.config';
|
|
|
18
18
|
import glspContextMenuModule from './features/context-menu/di.config';
|
|
19
19
|
import { copyPasteContextMenuModule, glspServerCopyPasteModule } from './features/copy-paste/di.config';
|
|
20
20
|
import glspDecorationModule from './features/decoration/di.config';
|
|
21
|
+
import svgMetadataModule from './features/svg-metadata/di.config';
|
|
21
22
|
import glspEditLabelModule from './features/edit-label/di.config';
|
|
22
23
|
import modelHintsModule from './features/hints/di.config';
|
|
23
24
|
import glspHoverModule from './features/hover/di.config';
|
|
@@ -73,6 +74,7 @@ export * from './features/context-menu/server-context-menu-provider';
|
|
|
73
74
|
export * from './features/copy-paste/copy-paste-context-menu';
|
|
74
75
|
export * from './features/copy-paste/copy-paste-handler';
|
|
75
76
|
export * from './features/decoration/decoration-placer';
|
|
77
|
+
export * from './features/svg-metadata/metadata-placer';
|
|
76
78
|
export * from './features/edit-label/edit-label-tool';
|
|
77
79
|
export * from './features/edit-label/edit-label-validator';
|
|
78
80
|
export * from './features/export/glsp-svg-exporter';
|
|
@@ -151,5 +153,6 @@ export {
|
|
|
151
153
|
glspDecorationModule,
|
|
152
154
|
sourceModelWatcherModule,
|
|
153
155
|
markerNavigatorContextMenuModule,
|
|
154
|
-
glspViewportModule
|
|
156
|
+
glspViewportModule,
|
|
157
|
+
svgMetadataModule
|
|
155
158
|
};
|