@eclipse-glsp/client 1.1.0-next.f1c3ed9.191 → 1.1.0-next.fdfeeeb.193

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.
@@ -0,0 +1,22 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { RequestAction } from '@eclipse-glsp/protocol';
17
+ import { ExportSvgAction, SModelRoot, SvgExporter } from 'sprotty';
18
+ export declare class GLSPSvgExporter extends SvgExporter {
19
+ export(root: SModelRoot, _request?: RequestAction<ExportSvgAction>): void;
20
+ protected findSvgElement(): SVGSVGElement | null;
21
+ }
22
+ //# sourceMappingURL=glsp-svg-exporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glsp-svg-exporter.d.ts","sourceRoot":"","sources":["../../../src/features/export/glsp-svg-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGlE,qBACa,eAAgB,SAAQ,WAAW;IACpC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,IAAI;IAsBlF,SAAS,CAAC,cAAc,IAAI,aAAa,GAAG,IAAI;CAKlD"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.GLSPSvgExporter = void 0;
10
+ const inversify_1 = require("inversify");
11
+ const sprotty_1 = require("sprotty");
12
+ const uuid_1 = require("uuid");
13
+ let GLSPSvgExporter = class GLSPSvgExporter extends sprotty_1.SvgExporter {
14
+ export(root, _request) {
15
+ if (typeof document !== 'undefined') {
16
+ const svgElement = this.findSvgElement();
17
+ if (svgElement) {
18
+ // createSvg requires the svg to have a non-empty id, so we generate one if necessary
19
+ const originalId = svgElement.id;
20
+ try {
21
+ svgElement.id = originalId || (0, uuid_1.v4)();
22
+ // provide generated svg code with respective sizing for proper viewing in browser and remove undesired border
23
+ const bounds = this.getBounds(root);
24
+ const svg = this.createSvg(svgElement, root)
25
+ .replace('style="', `style="width: ${bounds.width}px !important;height: ${bounds.height}px !important;border: none !important;`);
26
+ // do not give request/response id here as otherwise the action is treated as an unrequested response
27
+ this.actionDispatcher.dispatch(sprotty_1.ExportSvgAction.create(svg, ''));
28
+ }
29
+ finally {
30
+ svgElement.id = originalId;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ findSvgElement() {
36
+ const div = document.getElementById(this.options.hiddenDiv);
37
+ // search for first svg element as hierarchy within Sprotty might change
38
+ return div && div.querySelector('svg');
39
+ }
40
+ };
41
+ GLSPSvgExporter = __decorate([
42
+ (0, inversify_1.injectable)()
43
+ ], GLSPSvgExporter);
44
+ exports.GLSPSvgExporter = GLSPSvgExporter;
45
+ //# sourceMappingURL=glsp-svg-exporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glsp-svg-exporter.js","sourceRoot":"","sources":["../../../src/features/export/glsp-svg-exporter.ts"],"names":[],"mappings":";;;;;;;;;AAgBA,yCAAuC;AACvC,qCAAmE;AACnE,+BAAkC;AAGjC,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,qBAAW;IACpC,MAAM,CAAC,IAAgB,EAAE,QAAyC;QACvE,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACjC,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACzC,IAAI,UAAU,EAAE;gBACZ,qFAAqF;gBACrF,MAAM,UAAU,GAAG,UAAU,CAAC,EAAE,CAAC;gBACjC,IAAI;oBACA,UAAU,CAAC,EAAE,GAAG,UAAU,IAAI,IAAA,SAAI,GAAE,CAAC;oBACrC,8GAA8G;oBAC9G,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;oBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC;yBACvC,OAAO,CAAC,SAAS,EACd,iBAAiB,MAAM,CAAC,KAAK,yBAAyB,MAAM,CAAC,MAAM,wCAAwC,CAAC,CAAC;oBACrH,qGAAqG;oBACrG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,yBAAe,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;iBACnE;wBAAS;oBACN,UAAU,CAAC,EAAE,GAAG,UAAU,CAAC;iBAC9B;aACJ;SACJ;IACL,CAAC;IAES,cAAc;QACpB,MAAM,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC5D,wEAAwE;QACxE,OAAO,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;CACH,CAAA;AA5BY,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CA4B3B;AA5BY,0CAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/tools/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAgBxD;;;GAGG;AACH,eAAO,MAAM,WAAW,iBAgBtB,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAA;CAAE,GAAG,IAAI,CAI1G;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,iBAE9C,CAAC"}
1
+ {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../src/features/tools/di.config.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAiBxD;;;GAGG;AACH,eAAO,MAAM,WAAW,iBAmBtB,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAA;CAAE,GAAG,IAAI,CAI1G;AAED;;GAEG;AACH,eAAO,MAAM,mCAAmC,iBAE9C,CAAC"}
@@ -21,6 +21,7 @@ const inversify_1 = require("inversify");
21
21
  const sprotty_1 = require("sprotty");
22
22
  const focus_change_action_1 = require("../../base/actions/focus-change-action");
23
23
  const types_1 = require("../../base/types");
24
+ const glsp_svg_exporter_1 = require("../export/glsp-svg-exporter");
24
25
  const marquee_tool_feedback_1 = require("../tool-feedback/marquee-tool-feedback");
25
26
  const change_bounds_tool_1 = require("./change-bounds-tool");
26
27
  const delete_tool_1 = require("./delete-tool");
@@ -36,7 +37,7 @@ const view_1 = require("./view");
36
37
  * Registers the default tools of GLSP (node and edge creation, changing bounds, edge editing, deletion)
37
38
  * and adds the marquee selection tool.
38
39
  */
39
- exports.toolsModule = new inversify_1.ContainerModule((bind, _unbind, isBound) => {
40
+ exports.toolsModule = new inversify_1.ContainerModule((bind, _unbind, isBound, rebind) => {
40
41
  // Register default tools
41
42
  bind(types_1.TYPES.IDefaultTool).to(change_bounds_tool_1.ChangeBoundsTool);
42
43
  bind(types_1.TYPES.IDefaultTool).to(edge_edit_tool_1.EdgeEditTool);
@@ -50,6 +51,8 @@ exports.toolsModule = new inversify_1.ContainerModule((bind, _unbind, isBound) =
50
51
  configureMarqueeTool({ bind, isBound });
51
52
  (0, sprotty_1.configureActionHandler)({ bind, isBound }, protocol_1.TriggerNodeCreationAction.KIND, node_creation_tool_1.NodeCreationTool);
52
53
  (0, sprotty_1.configureActionHandler)({ bind, isBound }, protocol_1.TriggerEdgeCreationAction.KIND, edge_creation_tool_1.EdgeCreationTool);
54
+ bind(glsp_svg_exporter_1.GLSPSvgExporter).toSelf().inSingletonScope();
55
+ rebind(types_1.TYPES.SvgExporter).toService(glsp_svg_exporter_1.GLSPSvgExporter);
53
56
  });
54
57
  function configureMarqueeTool(context) {
55
58
  (0, sprotty_1.configureModelElement)(context, marquee_tool_feedback_1.MARQUEE, model_1.MarqueeNode, view_1.MarqueeView);
@@ -1 +1 @@
1
- {"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../src/features/tools/di.config.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAA8F;AAC9F,yCAAwD;AACxD,qCAAwE;AACxE,gFAAiF;AACjF,4CAAyC;AACzC,kFAAiE;AACjE,6DAAwD;AACxD,+CAAkE;AAClE,6DAAwD;AACxD,qDAAgD;AAChD,6FAA4F;AAC5F,6DAAwD;AACxD,iDAA6C;AAC7C,mCAAsC;AACtC,6DAAwD;AACxD,iCAAqC;AAErC;;;GAGG;AACU,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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,6CAAuB,CAAC,IAAI,EAAE,yEAAoC,CAAC,CAAC;AAClH,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/client",
3
- "version": "1.1.0-next.f1c3ed9.191+f1c3ed9",
3
+ "version": "1.1.0-next.fdfeeeb.193+fdfeeeb",
4
4
  "description": "A sprotty-based client for GLSP",
5
5
  "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  "css"
35
35
  ],
36
36
  "dependencies": {
37
- "@eclipse-glsp/protocol": "1.1.0-next.f1c3ed9.191+f1c3ed9",
37
+ "@eclipse-glsp/protocol": "1.1.0-next.fdfeeeb.193+fdfeeeb",
38
38
  "autocompleter": "5.1.0",
39
39
  "sprotty": "0.13.0-next.1c4343c.328"
40
40
  },
@@ -58,5 +58,5 @@
58
58
  },
59
59
  "main": "lib/index",
60
60
  "types": "lib/index",
61
- "gitHead": "f1c3ed92a04edacc43157b61edffdb3645472183"
61
+ "gitHead": "fdfeeebb8cecc04e2e0020995b235874bcd2349c"
62
62
  }
@@ -0,0 +1,50 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { RequestAction } from '@eclipse-glsp/protocol';
17
+ import { injectable } from 'inversify';
18
+ import { ExportSvgAction, SModelRoot, SvgExporter } from 'sprotty';
19
+ import { v4 as uuid } from 'uuid';
20
+
21
+ @injectable()
22
+ export class GLSPSvgExporter extends SvgExporter {
23
+ override export(root: SModelRoot, _request?: RequestAction<ExportSvgAction>): void {
24
+ if (typeof document !== 'undefined') {
25
+ const svgElement = this.findSvgElement();
26
+ if (svgElement) {
27
+ // createSvg requires the svg to have a non-empty id, so we generate one if necessary
28
+ const originalId = svgElement.id;
29
+ try {
30
+ svgElement.id = originalId || uuid();
31
+ // provide generated svg code with respective sizing for proper viewing in browser and remove undesired border
32
+ const bounds = this.getBounds(root);
33
+ const svg = this.createSvg(svgElement, root)
34
+ .replace('style="',
35
+ `style="width: ${bounds.width}px !important;height: ${bounds.height}px !important;border: none !important;`);
36
+ // do not give request/response id here as otherwise the action is treated as an unrequested response
37
+ this.actionDispatcher.dispatch(ExportSvgAction.create(svg, ''));
38
+ } finally {
39
+ svgElement.id = originalId;
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ protected findSvgElement(): SVGSVGElement | null {
46
+ const div = document.getElementById(this.options.hiddenDiv);
47
+ // search for first svg element as hierarchy within Sprotty might change
48
+ return div && div.querySelector('svg');
49
+ }
50
+ }
@@ -18,6 +18,7 @@ import { ContainerModule, interfaces } from 'inversify';
18
18
  import { configureActionHandler, configureModelElement } from 'sprotty';
19
19
  import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
20
20
  import { TYPES } from '../../base/types';
21
+ import { GLSPSvgExporter } from '../export/glsp-svg-exporter';
21
22
  import { MARQUEE } from '../tool-feedback/marquee-tool-feedback';
22
23
  import { ChangeBoundsTool } from './change-bounds-tool';
23
24
  import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
@@ -34,7 +35,7 @@ import { MarqueeView } from './view';
34
35
  * Registers the default tools of GLSP (node and edge creation, changing bounds, edge editing, deletion)
35
36
  * and adds the marquee selection tool.
36
37
  */
37
- export const toolsModule = new ContainerModule((bind, _unbind, isBound) => {
38
+ export const toolsModule = new ContainerModule((bind, _unbind, isBound, rebind) => {
38
39
  // Register default tools
39
40
  bind(TYPES.IDefaultTool).to(ChangeBoundsTool);
40
41
  bind(TYPES.IDefaultTool).to(EdgeEditTool);
@@ -50,6 +51,9 @@ export const toolsModule = new ContainerModule((bind, _unbind, isBound) => {
50
51
  configureMarqueeTool({ bind, isBound });
51
52
  configureActionHandler({ bind, isBound }, TriggerNodeCreationAction.KIND, NodeCreationTool);
52
53
  configureActionHandler({ bind, isBound }, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
54
+
55
+ bind(GLSPSvgExporter).toSelf().inSingletonScope();
56
+ rebind(TYPES.SvgExporter).toService(GLSPSvgExporter);
53
57
  });
54
58
 
55
59
  export function configureMarqueeTool(context: { bind: interfaces.Bind; isBound: interfaces.IsBound }): void {