@eclipse-glsp/client 2.7.0-next.21 → 2.7.0-next.25
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/model/diagram-loader.d.ts +8 -6
- package/lib/base/model/diagram-loader.d.ts.map +1 -1
- package/lib/base/model/diagram-loader.js +1 -1
- package/lib/base/model/diagram-loader.js.map +1 -1
- package/lib/features/export/default-png-diagram-exporter.d.ts +52 -0
- package/lib/features/export/default-png-diagram-exporter.d.ts.map +1 -0
- package/lib/features/export/default-png-diagram-exporter.js +157 -0
- package/lib/features/export/default-png-diagram-exporter.js.map +1 -0
- package/lib/features/export/default-svg-diagram-exporter.d.ts +32 -0
- package/lib/features/export/default-svg-diagram-exporter.d.ts.map +1 -0
- package/lib/features/export/default-svg-diagram-exporter.js +54 -0
- package/lib/features/export/default-svg-diagram-exporter.js.map +1 -0
- package/lib/features/export/diagram-export-postprocessor.d.ts +33 -0
- package/lib/features/export/diagram-export-postprocessor.d.ts.map +1 -0
- package/lib/features/export/diagram-export-postprocessor.js +84 -0
- package/lib/features/export/diagram-export-postprocessor.js.map +1 -0
- package/lib/features/export/diagram-exporter.d.ts +44 -0
- package/lib/features/export/diagram-exporter.d.ts.map +1 -0
- package/lib/features/export/diagram-exporter.js +18 -0
- package/lib/features/export/diagram-exporter.js.map +1 -0
- package/lib/features/export/export-modules.d.ts +1 -1
- package/lib/features/export/export-modules.d.ts.map +1 -1
- package/lib/features/export/export-modules.js +19 -3
- package/lib/features/export/export-modules.js.map +1 -1
- package/lib/features/export/export-result-action-handler.d.ts +28 -0
- package/lib/features/export/export-result-action-handler.d.ts.map +1 -0
- package/lib/features/export/export-result-action-handler.js +72 -0
- package/lib/features/export/export-result-action-handler.js.map +1 -0
- package/lib/features/export/export-svg-action-handler.d.ts +4 -0
- package/lib/features/export/export-svg-action-handler.d.ts.map +1 -1
- package/lib/features/export/export-svg-action-handler.js +5 -1
- package/lib/features/export/export-svg-action-handler.js.map +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts +18 -1
- package/lib/features/export/glsp-svg-exporter.d.ts.map +1 -1
- package/lib/features/export/glsp-svg-exporter.js +43 -11
- package/lib/features/export/glsp-svg-exporter.js.map +1 -1
- package/lib/features/export/request-export-command.d.ts +29 -0
- package/lib/features/export/request-export-command.d.ts.map +1 -0
- package/lib/features/export/request-export-command.js +73 -0
- package/lib/features/export/request-export-command.js.map +1 -0
- package/lib/features/export/request-export-key-listener.d.ts +21 -0
- package/lib/features/export/request-export-key-listener.d.ts.map +1 -0
- package/lib/features/export/request-export-key-listener.js +40 -0
- package/lib/features/export/request-export-key-listener.js.map +1 -0
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +1 -2
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/viewport/origin-viewport.d.ts +2 -13
- package/lib/features/viewport/origin-viewport.d.ts.map +1 -1
- package/lib/features/viewport/origin-viewport.js +3 -19
- package/lib/features/viewport/origin-viewport.js.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/base/model/diagram-loader.ts +8 -6
- package/src/features/export/default-png-diagram-exporter.ts +145 -0
- package/src/features/export/default-svg-diagram-exporter.ts +39 -0
- package/src/features/export/diagram-export-postprocessor.ts +82 -0
- package/src/features/export/diagram-exporter.ts +45 -0
- package/src/features/export/export-modules.ts +23 -4
- package/src/features/export/export-result-action-handler.ts +66 -0
- package/src/features/export/export-svg-action-handler.ts +5 -1
- package/src/features/export/glsp-svg-exporter.ts +47 -12
- package/src/features/export/request-export-command.ts +65 -0
- package/src/features/export/request-export-key-listener.ts +29 -0
- package/src/features/tool-palette/tool-palette.ts +1 -1
- package/src/features/viewport/origin-viewport.ts +10 -23
- package/src/index.ts +6 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.standaloneExportModule = exports.exportModule = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2019-
|
|
5
|
+
* Copyright (c) 2019-2026 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -17,13 +17,26 @@ exports.standaloneExportModule = exports.exportModule = void 0;
|
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
19
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
20
|
+
const default_png_diagram_exporter_1 = require("./default-png-diagram-exporter");
|
|
21
|
+
const default_svg_diagram_exporter_1 = require("./default-svg-diagram-exporter");
|
|
22
|
+
const diagram_export_postprocessor_1 = require("./diagram-export-postprocessor");
|
|
23
|
+
const export_result_action_handler_1 = require("./export-result-action-handler");
|
|
20
24
|
const export_svg_action_handler_1 = require("./export-svg-action-handler");
|
|
21
25
|
const glsp_svg_exporter_1 = require("./glsp-svg-exporter");
|
|
26
|
+
const request_export_command_1 = require("./request-export-command");
|
|
27
|
+
const request_export_key_listener_1 = require("./request-export-key-listener");
|
|
22
28
|
exports.exportModule = new sprotty_1.FeatureModule((bind, _unbind, isBound) => {
|
|
23
29
|
const context = { bind, isBound };
|
|
30
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.SvgExporter, glsp_svg_exporter_1.GLSPSvgExporter);
|
|
31
|
+
// Unified export pipeline.
|
|
32
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.HiddenVNodePostprocessor, diagram_export_postprocessor_1.DiagramExportPostprocessor);
|
|
33
|
+
(0, sprotty_1.configureCommand)(context, request_export_command_1.RequestExportCommand);
|
|
34
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IDiagramExporter, default_svg_diagram_exporter_1.DefaultSvgDiagramExporter);
|
|
35
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IDiagramExporter, default_png_diagram_exporter_1.DefaultPngDiagramExporter);
|
|
36
|
+
// Legacy SVG-only pipeline kept functional for adopters still dispatching the
|
|
37
|
+
// deprecated `RequestExportSvgAction` / `ExportSvgAction`.
|
|
24
38
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.HiddenVNodePostprocessor, sprotty_1.ExportSvgPostprocessor);
|
|
25
39
|
(0, sprotty_1.configureCommand)(context, sprotty_1.ExportSvgCommand);
|
|
26
|
-
bind(sprotty_1.TYPES.SvgExporter).to(glsp_svg_exporter_1.GLSPSvgExporter).inSingletonScope();
|
|
27
40
|
}, { featureId: Symbol('export') });
|
|
28
41
|
/**
|
|
29
42
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -32,7 +45,10 @@ exports.exportModule = new sprotty_1.FeatureModule((bind, _unbind, isBound) => {
|
|
|
32
45
|
*/
|
|
33
46
|
exports.standaloneExportModule = new sprotty_1.FeatureModule((bind, _unbind, isBound) => {
|
|
34
47
|
const context = { bind, isBound };
|
|
35
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.KeyListener,
|
|
48
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.KeyListener, request_export_key_listener_1.RequestExportKeyListener);
|
|
49
|
+
bind(export_result_action_handler_1.ExportResultActionHandler).toSelf().inSingletonScope();
|
|
50
|
+
(0, sprotty_1.configureActionHandler)(context, sprotty_1.ExportResultAction.KIND, export_result_action_handler_1.ExportResultActionHandler);
|
|
51
|
+
// Legacy download path: bound so adopters dispatching `ExportSvgAction` still get a download.
|
|
36
52
|
bind(export_svg_action_handler_1.ExportSvgActionHandler).toSelf().inSingletonScope();
|
|
37
53
|
(0, sprotty_1.configureActionHandler)(context, sprotty_1.ExportSvgAction.KIND, export_svg_action_handler_1.ExportSvgActionHandler);
|
|
38
54
|
}, { featureId: Symbol('standaloneExport'), requires: exports.exportModule });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-modules.js","sourceRoot":"","sources":["../../../src/features/export/export-modules.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAU+B;AAC/B,2EAAqE;AACrE,2DAAsD;
|
|
1
|
+
{"version":3,"file":"export-modules.js","sourceRoot":"","sources":["../../../src/features/export/export-modules.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAU+B;AAC/B,iFAA2E;AAC3E,iFAA2E;AAC3E,iFAA4E;AAC5E,iFAA2E;AAC3E,2EAAqE;AACrE,2DAAsD;AACtD,qEAAgE;AAChE,+EAAyE;AAE5D,QAAA,YAAY,GAAG,IAAI,uBAAa,CACzC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IACvB,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAClC,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,WAAW,EAAE,mCAAe,CAAC,CAAC;IAE3D,2BAA2B;IAC3B,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,wBAAwB,EAAE,yDAA0B,CAAC,CAAC;IACnF,IAAA,0BAAgB,EAAC,OAAO,EAAE,6CAAoB,CAAC,CAAC;IAChD,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,gBAAgB,EAAE,wDAAyB,CAAC,CAAC;IAC1E,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,gBAAgB,EAAE,wDAAyB,CAAC,CAAC;IAE1E,8EAA8E;IAC9E,2DAA2D;IAC3D,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,wBAAwB,EAAE,gCAAsB,CAAC,CAAC;IAC/E,IAAA,0BAAgB,EAAC,OAAO,EAAE,0BAAgB,CAAC,CAAC;AAChD,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,CAClC,CAAC;AAEF;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,IAAI,uBAAa,CACnD,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IACvB,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAClC,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,WAAW,EAAE,sDAAwB,CAAC,CAAC;IACpE,IAAI,CAAC,wDAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAA,gCAAsB,EAAC,OAAO,EAAE,4BAAkB,CAAC,IAAI,EAAE,wDAAyB,CAAC,CAAC;IAEpF,8FAA8F;IAC9F,IAAI,CAAC,kDAAsB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACzD,IAAA,gCAAsB,EAAC,OAAO,EAAE,yBAAe,CAAC,IAAI,EAAE,kDAAsB,CAAC,CAAC;AAClF,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,oBAAY,EAAE,CACpE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 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 { ExportResultAction, IActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
|
+
/**
|
|
18
|
+
* Default handler for the unified {@link ExportResultAction} — triggers a browser file
|
|
19
|
+
* download for UI-driven flows. Bound by `standaloneExportModule`; integrations that
|
|
20
|
+
* provide their own download UX omit it.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ExportResultActionHandler implements IActionHandler {
|
|
23
|
+
handle(action: ExportResultAction): void;
|
|
24
|
+
protected toBlob(action: ExportResultAction): Blob;
|
|
25
|
+
protected extensionFor(format: string): string;
|
|
26
|
+
protected decodeBase64(data: string): ArrayBuffer;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=export-result-action-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-result-action-handler.d.ts","sourceRoot":"","sources":["../../../src/features/export/export-result-action-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI3E;;;;GAIG;AACH,qBACa,yBAA0B,YAAW,cAAc;IAC5D,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAQxC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAiBlD,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI9C,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;CASpD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.ExportResultActionHandler = void 0;
|
|
25
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
|
+
const file_saver_1 = require("file-saver");
|
|
27
|
+
const inversify_1 = require("inversify");
|
|
28
|
+
/**
|
|
29
|
+
* Default handler for the unified {@link ExportResultAction} — triggers a browser file
|
|
30
|
+
* download for UI-driven flows. Bound by `standaloneExportModule`; integrations that
|
|
31
|
+
* provide their own download UX omit it.
|
|
32
|
+
*/
|
|
33
|
+
let ExportResultActionHandler = class ExportResultActionHandler {
|
|
34
|
+
handle(action) {
|
|
35
|
+
if (!sprotty_1.ExportResultAction.is(action)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const blob = this.toBlob(action);
|
|
39
|
+
(0, file_saver_1.saveAs)(blob, `diagram.${this.extensionFor(action.format)}`);
|
|
40
|
+
}
|
|
41
|
+
toBlob(action) {
|
|
42
|
+
// `encoding` is `ProposalString<'text' | 'base64'>` — an open union. Reject unknown
|
|
43
|
+
// tags explicitly: silently treating an arbitrary value as text would mojibake binary
|
|
44
|
+
// payloads, while treating it as base64 would corrupt text payloads.
|
|
45
|
+
switch (action.encoding) {
|
|
46
|
+
case 'text':
|
|
47
|
+
return new Blob([action.data], { type: `${action.mimeType};charset=utf-8` });
|
|
48
|
+
case 'base64':
|
|
49
|
+
return new Blob([this.decodeBase64(action.data)], { type: action.mimeType });
|
|
50
|
+
default:
|
|
51
|
+
throw new Error(`ExportResultActionHandler: unsupported encoding '${action.encoding}' for format '${action.format}'. ` +
|
|
52
|
+
'Adopters that ship a custom encoding must also subclass this handler to decode it.');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
extensionFor(format) {
|
|
56
|
+
return format.toLowerCase();
|
|
57
|
+
}
|
|
58
|
+
decodeBase64(data) {
|
|
59
|
+
const binary = atob(data);
|
|
60
|
+
const buffer = new ArrayBuffer(binary.length);
|
|
61
|
+
const view = new Uint8Array(buffer);
|
|
62
|
+
for (let i = 0; i < binary.length; ++i) {
|
|
63
|
+
view[i] = binary.charCodeAt(i);
|
|
64
|
+
}
|
|
65
|
+
return buffer;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.ExportResultActionHandler = ExportResultActionHandler;
|
|
69
|
+
exports.ExportResultActionHandler = ExportResultActionHandler = __decorate([
|
|
70
|
+
(0, inversify_1.injectable)()
|
|
71
|
+
], ExportResultActionHandler);
|
|
72
|
+
//# sourceMappingURL=export-result-action-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-result-action-handler.js","sourceRoot":"","sources":["../../../src/features/export/export-result-action-handler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAA2E;AAC3E,2CAAoC;AACp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M,CAAC,CAAC;QACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACnC,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAvCY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAuCrC"}
|
|
@@ -4,6 +4,10 @@ import { ExportSvgAction, IActionHandler } from '@eclipse-glsp/sprotty';
|
|
|
4
4
|
* any GLSP project independent of the target platform. However, platform integration modules typically
|
|
5
5
|
* * this handler is rebound to an application specific handler in platform integration modules
|
|
6
6
|
* (e.g. the Theia integration)
|
|
7
|
+
*
|
|
8
|
+
* @deprecated Use the unified export pipeline ({@link RequestExportAction} +
|
|
9
|
+
* {@link DiagramExporter}) and bind your own {@link IActionHandler} for
|
|
10
|
+
* {@link ExportResultAction} instead.
|
|
7
11
|
*/
|
|
8
12
|
export declare class ExportSvgActionHandler implements IActionHandler {
|
|
9
13
|
handle(action: ExportSvgAction): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-svg-action-handler.d.ts","sourceRoot":"","sources":["../../../src/features/export/export-svg-action-handler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"export-svg-action-handler.d.ts","sourceRoot":"","sources":["../../../src/features/export/export-svg-action-handler.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAExE;;;;;;;;;GASG;AACH,qBACa,sBAAuB,YAAW,cAAc;IACzD,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;CAIxC"}
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ExportSvgActionHandler = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
11
|
+
* Copyright (c) 2023-2026 EclipseSource and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -29,6 +29,10 @@ const inversify_1 = require("inversify");
|
|
|
29
29
|
* any GLSP project independent of the target platform. However, platform integration modules typically
|
|
30
30
|
* * this handler is rebound to an application specific handler in platform integration modules
|
|
31
31
|
* (e.g. the Theia integration)
|
|
32
|
+
*
|
|
33
|
+
* @deprecated Use the unified export pipeline ({@link RequestExportAction} +
|
|
34
|
+
* {@link DiagramExporter}) and bind your own {@link IActionHandler} for
|
|
35
|
+
* {@link ExportResultAction} instead.
|
|
32
36
|
*/
|
|
33
37
|
let ExportSvgActionHandler = class ExportSvgActionHandler {
|
|
34
38
|
handle(action) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-svg-action-handler.js","sourceRoot":"","sources":["../../../src/features/export/export-svg-action-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2CAAoC;AACpC,yCAAuC;AAGvC
|
|
1
|
+
{"version":3,"file":"export-svg-action-handler.js","sourceRoot":"","sources":["../../../src/features/export/export-svg-action-handler.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2CAAoC;AACpC,yCAAuC;AAGvC;;;;;;;;;GASG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC/B,MAAM,CAAC,MAAuB;QAC1B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC,CAAC;QAC1E,IAAA,mBAAM,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAChC,CAAC;CACJ,CAAA;AALY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,sBAAU,GAAE;GACA,sBAAsB,CAKlC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2026 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -15,7 +15,24 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, ExportSvgAction, ExportSvgOptions, GModelRoot, RequestAction, RequestExportSvgAction, SvgExporter } from '@eclipse-glsp/sprotty';
|
|
17
17
|
export declare class GLSPSvgExporter extends SvgExporter {
|
|
18
|
+
/**
|
|
19
|
+
* Legacy entry point for the SVG-only export flow. New code should use the unified
|
|
20
|
+
* `RequestExportAction` flow (registered via the `DiagramExporter` registry);
|
|
21
|
+
* adopters that previously bound {@link RequestExportSvgAction} should migrate to
|
|
22
|
+
* `RequestExportAction` with `format: 'svg'`.
|
|
23
|
+
*
|
|
24
|
+
* @deprecated Use the unified export pipeline. Retained for backward compatibility
|
|
25
|
+
* with the legacy {@link RequestExportSvgAction} / {@link ExportSvgAction} flow.
|
|
26
|
+
*/
|
|
18
27
|
export(root: GModelRoot, request?: RequestExportSvgAction): void;
|
|
28
|
+
/**
|
|
29
|
+
* Produce the serialised SVG string without dispatching any action. Throws on
|
|
30
|
+
* failure (no document, no SVG element). Used by the legacy `export()` path and
|
|
31
|
+
* by unified-export strategies (`DefaultSvgDiagramExporter`, `DefaultPngDiagramExporter`)
|
|
32
|
+
* that need the SVG bytes without the action-dispatch side effect.
|
|
33
|
+
*/
|
|
34
|
+
exportToString(root: GModelRoot, options?: ExportSvgOptions, cause?: Action): string;
|
|
35
|
+
protected dispatchRejectionIfRequested(request: RequestExportSvgAction | undefined, message: string): void;
|
|
19
36
|
protected createSvg(svgElement: SVGSVGElement, root: GModelRoot, options?: ExportSvgOptions, cause?: Action): string;
|
|
20
37
|
protected findSvgElement(): SVGSVGElement | null;
|
|
21
38
|
protected prepareSvgElement(svgElement: SVGSVGElement, root: GModelRoot, request?: RequestAction<ExportSvgAction>): SVGSVGElement;
|
|
@@ -1 +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,EACH,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,UAAU,
|
|
1
|
+
{"version":3,"file":"glsp-svg-exporter.d.ts","sourceRoot":"","sources":["../../../src/features/export/glsp-svg-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,UAAU,EAEV,aAAa,EACb,sBAAsB,EACtB,WAAW,EACd,MAAM,uBAAuB,CAAC;AAI/B,qBACa,eAAgB,SAAQ,WAAW;IAC5C;;;;;;;;OAQG;IACM,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,IAAI;IAWzE;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM;IAiBpF,SAAS,CAAC,4BAA4B,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;cAMvF,SAAS,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM;IAW7H,SAAS,CAAC,cAAc,IAAI,aAAa,GAAG,IAAI;IAMhD,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,aAAa;cAI9G,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI;IAalG,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI;IA0BxF,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,qBAAqB;IAK3E,SAAS,CAAC,YAAY,CAClB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,UAAU,EAChB,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,GACzC,MAAM;IAKT,SAAS,CAAC,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,MAAM,GAAG,SAAS;CAUtI"}
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.GLSPSvgExporter = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2022-
|
|
11
|
+
* Copyright (c) 2022-2026 EclipseSource and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -26,17 +26,49 @@ const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
|
26
26
|
const inversify_1 = require("inversify");
|
|
27
27
|
const uuid_1 = require("uuid");
|
|
28
28
|
let GLSPSvgExporter = class GLSPSvgExporter extends sprotty_1.SvgExporter {
|
|
29
|
+
/**
|
|
30
|
+
* Legacy entry point for the SVG-only export flow. New code should use the unified
|
|
31
|
+
* `RequestExportAction` flow (registered via the `DiagramExporter` registry);
|
|
32
|
+
* adopters that previously bound {@link RequestExportSvgAction} should migrate to
|
|
33
|
+
* `RequestExportAction` with `format: 'svg'`.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated Use the unified export pipeline. Retained for backward compatibility
|
|
36
|
+
* with the legacy {@link RequestExportSvgAction} / {@link ExportSvgAction} flow.
|
|
37
|
+
*/
|
|
29
38
|
export(root, request) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
try {
|
|
40
|
+
const svgExport = this.exportToString(root, request === null || request === void 0 ? void 0 : request.options, request);
|
|
41
|
+
this.actionDispatcher.dispatch(sprotty_1.ExportSvgAction.create(svgExport, { responseId: request === null || request === void 0 ? void 0 : request.requestId, options: request === null || request === void 0 ? void 0 : request.options }));
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
this.dispatchRejectionIfRequested(request, err instanceof Error ? err.message : String(err));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Produce the serialised SVG string without dispatching any action. Throws on
|
|
49
|
+
* failure (no document, no SVG element). Used by the legacy `export()` path and
|
|
50
|
+
* by unified-export strategies (`DefaultSvgDiagramExporter`, `DefaultPngDiagramExporter`)
|
|
51
|
+
* that need the SVG bytes without the action-dispatch side effect.
|
|
52
|
+
*/
|
|
53
|
+
exportToString(root, options, cause) {
|
|
54
|
+
if (typeof document === 'undefined') {
|
|
55
|
+
throw new Error('SVG export failed: document is not available');
|
|
56
|
+
}
|
|
57
|
+
let svgElement = this.findSvgElement();
|
|
58
|
+
if (!svgElement) {
|
|
59
|
+
throw new Error('SVG export failed: SVG element not found');
|
|
60
|
+
}
|
|
61
|
+
// Only the legacy SVG-only flow carries a `RequestExportSvgAction`; under the unified
|
|
62
|
+
// export flow `cause` is a `RequestExportAction` and the legacy override hooks are
|
|
63
|
+
// intentionally invoked with `undefined`.
|
|
64
|
+
const request = sprotty_1.RequestExportSvgAction.is(cause) ? cause : undefined;
|
|
65
|
+
svgElement = this.prepareSvgElement(svgElement, root, request);
|
|
66
|
+
const serializedSvg = this.createSvg(svgElement, root, options !== null && options !== void 0 ? options : {}, cause);
|
|
67
|
+
return this.getSvgExport(serializedSvg, svgElement, root, request);
|
|
68
|
+
}
|
|
69
|
+
dispatchRejectionIfRequested(request, message) {
|
|
70
|
+
if (request === null || request === void 0 ? void 0 : request.requestId) {
|
|
71
|
+
this.actionDispatcher.dispatch(sprotty_1.RejectAction.create(message, { responseId: request.requestId }));
|
|
40
72
|
}
|
|
41
73
|
}
|
|
42
74
|
createSvg(svgElement, root, options, cause) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-svg-exporter.js","sourceRoot":"","sources":["../../../src/features/export/glsp-svg-exporter.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"glsp-svg-exporter.js","sourceRoot":"","sources":["../../../src/features/export/glsp-svg-exporter.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAS+B;AAC/B,yCAAuC;AACvC,+BAAkC;AAG3B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qBAAW;IAC5C;;;;;;;;OAQG;IACM,MAAM,CAAC,IAAgB,EAAE,OAAgC;QAC9D,IAAI,CAAC;YACD,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACvE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AAC,CAAC,CAAC,EAAE,IAAI,CAAC;oBACrG,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QACD,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACf,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC;IAES,iBAAiB,CAAC,OAAY;QACpC,4GAA4G;QAC5G,OAAO,SAAS,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC;IACtD,CAAC;IAES,YAAY,CAClB,oBAA4B,EAC5B,UAAsB,EACtB,IAAgB,EAChB,OAAwC;QAExC,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACzE,OAAO,cAAc,CAAC,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC;IACvH,CAAC;IAES,iBAAiB,CAAC,UAAsB,EAAE,IAAgB,EAAE,OAAwC;QAC1G,8GAA8G;QAC9G,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,CACH,UAAU,MAAM,CAAC,KAAK,gBAAgB;YACtC,WAAW,MAAM,CAAC,MAAM,gBAAgB;YACxC,0BAA0B;YAC1B,6BAA6B,CAChC,CAAC;IACN,CAAC;CACJ,CAAA;AAvIY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CAuI3B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 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 { CommandExecutionContext, CommandResult, HiddenCommand, RequestExportAction } from '@eclipse-glsp/sprotty';
|
|
17
|
+
/**
|
|
18
|
+
* {@link HiddenCommand} for the unified {@link RequestExportAction} kind. Performs the same
|
|
19
|
+
* pre-render preparation as sprotty's `ExportSvgCommand` (clone the root, reset
|
|
20
|
+
* viewport, drop selection/hover) so the rendered SVG used by every
|
|
21
|
+
* `DiagramExporter` strategy is independent of UI state.
|
|
22
|
+
*/
|
|
23
|
+
export declare class RequestExportCommand extends HiddenCommand {
|
|
24
|
+
protected action: RequestExportAction;
|
|
25
|
+
static readonly KIND = "requestExport";
|
|
26
|
+
constructor(action: RequestExportAction);
|
|
27
|
+
execute(context: CommandExecutionContext): CommandResult;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=request-export-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-export-command.d.ts","sourceRoot":"","sources":["../../../src/features/export/request-export-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,uBAAuB,EACvB,aAAa,EACb,aAAa,EAKb,mBAAmB,EAEtB,MAAM,uBAAuB,CAAC;AAG/B;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IAGjB,SAAS,CAAC,MAAM,EAAE,mBAAmB;IAFvE,MAAM,CAAC,QAAQ,CAAC,IAAI,mBAA4B;gBAEJ,MAAM,EAAE,mBAAmB;IAIvE,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;CAsB3D"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
27
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.RequestExportCommand = void 0;
|
|
31
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
32
|
+
const inversify_1 = require("inversify");
|
|
33
|
+
/**
|
|
34
|
+
* {@link HiddenCommand} for the unified {@link RequestExportAction} kind. Performs the same
|
|
35
|
+
* pre-render preparation as sprotty's `ExportSvgCommand` (clone the root, reset
|
|
36
|
+
* viewport, drop selection/hover) so the rendered SVG used by every
|
|
37
|
+
* `DiagramExporter` strategy is independent of UI state.
|
|
38
|
+
*/
|
|
39
|
+
let RequestExportCommand = class RequestExportCommand extends sprotty_1.HiddenCommand {
|
|
40
|
+
constructor(action) {
|
|
41
|
+
super();
|
|
42
|
+
this.action = action;
|
|
43
|
+
}
|
|
44
|
+
execute(context) {
|
|
45
|
+
if (!(0, sprotty_1.isExportable)(context.root)) {
|
|
46
|
+
return { model: context.root, modelChanged: false };
|
|
47
|
+
}
|
|
48
|
+
const root = context.modelFactory.createRoot(context.root);
|
|
49
|
+
if (!(0, sprotty_1.isExportable)(root)) {
|
|
50
|
+
return { model: context.root, modelChanged: false };
|
|
51
|
+
}
|
|
52
|
+
if ((0, sprotty_1.isViewport)(root)) {
|
|
53
|
+
root.zoom = 1;
|
|
54
|
+
root.scroll = { x: 0, y: 0 };
|
|
55
|
+
}
|
|
56
|
+
root.index.all().forEach(element => {
|
|
57
|
+
if ((0, sprotty_1.isSelectable)(element) && element.selected) {
|
|
58
|
+
element.selected = false;
|
|
59
|
+
}
|
|
60
|
+
if ((0, sprotty_1.isHoverable)(element) && element.hoverFeedback) {
|
|
61
|
+
element.hoverFeedback = false;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return { model: root, modelChanged: true, cause: this.action };
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.RequestExportCommand = RequestExportCommand;
|
|
68
|
+
RequestExportCommand.KIND = sprotty_1.RequestExportAction.KIND;
|
|
69
|
+
exports.RequestExportCommand = RequestExportCommand = __decorate([
|
|
70
|
+
__param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Action)),
|
|
71
|
+
__metadata("design:paramtypes", [Object])
|
|
72
|
+
], RequestExportCommand);
|
|
73
|
+
//# sourceMappingURL=request-export-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-export-command.js","sourceRoot":"","sources":["../../../src/features/export/request-export-command.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;AAElF,mDAU+B;AAC/B,yCAAmC;AAEnC;;;;;GAKG;AACH,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,uBAAa;IAGnD,YAA4C,MAA2B;QACnE,KAAK,EAAE,CAAC;QADgC,WAAM,GAAN,MAAM,CAAqB;IAEvE,CAAC;IAED,OAAO,CAAC,OAAgC;QACpC,IAAI,CAAC,IAAA,sBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QACxD,CAAC;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAA,sBAAY,EAAC,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QACxD,CAAC;QACD,IAAI,IAAA,oBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACd,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YAC/B,IAAI,IAAA,sBAAY,EAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;gBAC5C,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;YAC7B,CAAC;YACD,IAAI,IAAA,qBAAW,EAAC,OAAO,CAAC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;gBAChD,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC;YAClC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACnE,CAAC;;AA5BQ,oDAAoB;AACb,yBAAI,GAAG,6BAAmB,CAAC,IAAI,AAA3B,CAA4B;+BADvC,oBAAoB;IAGhB,WAAA,IAAA,kBAAM,EAAC,eAAK,CAAC,MAAM,CAAC,CAAA;;GAHxB,oBAAoB,CA6BhC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 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 { Action, GModelElement, KeyListener } from '@eclipse-glsp/sprotty';
|
|
17
|
+
/** Dispatches a {@link RequestExportAction} (format `'svg'`) on `Ctrl+Shift+E`. */
|
|
18
|
+
export declare class RequestExportKeyListener extends KeyListener {
|
|
19
|
+
keyDown(_element: GModelElement, event: KeyboardEvent): Action[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=request-export-key-listener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-export-key-listener.d.ts","sourceRoot":"","sources":["../../../src/features/export/request-export-key-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAyC,MAAM,uBAAuB,CAAC;AAGlH,mFAAmF;AACnF,qBACa,wBAAyB,SAAQ,WAAW;IAC5C,OAAO,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE;CAM5E"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.RequestExportKeyListener = void 0;
|
|
25
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
/** Dispatches a {@link RequestExportAction} (format `'svg'`) on `Ctrl+Shift+E`. */
|
|
28
|
+
let RequestExportKeyListener = class RequestExportKeyListener extends sprotty_1.KeyListener {
|
|
29
|
+
keyDown(_element, event) {
|
|
30
|
+
if ((0, sprotty_1.matchesKeystroke)(event, 'KeyE', 'ctrlCmd', 'shift')) {
|
|
31
|
+
return [sprotty_1.RequestExportAction.create('svg')];
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.RequestExportKeyListener = RequestExportKeyListener;
|
|
37
|
+
exports.RequestExportKeyListener = RequestExportKeyListener = __decorate([
|
|
38
|
+
(0, inversify_1.injectable)()
|
|
39
|
+
], RequestExportKeyListener);
|
|
40
|
+
//# sourceMappingURL=request-export-key-listener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-export-key-listener.js","sourceRoot":"","sources":["../../../src/features/export/request-export-key-listener.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAAkH;AAClH,yCAAuC;AAEvC,mFAAmF;AAE5E,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,qBAAW;IAC5C,OAAO,CAAC,QAAuB,EAAE,KAAoB;QAC1D,IAAI,IAAA,0BAAgB,EAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC;YACtD,OAAO,CAAC,6BAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ,CAAA;AAPY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAU,GAAE;GACA,wBAAwB,CAOpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-palette.d.ts","sourceRoot":"","sources":["../../../src/features/tool-palette/tool-palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,QAAQ,
|
|
1
|
+
{"version":3,"file":"tool-palette.d.ts","sourceRoot":"","sources":["../../../src/features/tool-palette/tool-palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,QAAQ,EAGR,WAAW,EAWd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUpD,MAAM,WAAW,uBAAwB,SAAQ,MAAM;IACnD,IAAI,EAAE,OAAO,uBAAuB,CAAC,IAAI,CAAC;CAC7C;AAED,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,IAAI,sBAAsB,CAAC;IAExC,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,I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G,IAAI;IA6BnD;;;;;OAKG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAEhC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;cAOvB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAYhD,SAAS,CAAC,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;cAQtC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAOrD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAM9D;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAIzD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAmB9D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAElE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAI5E"}
|
|
@@ -40,7 +40,6 @@ const tool_1 = require("../../base/tool-manager/tool");
|
|
|
40
40
|
const ui_extension_1 = require("../../base/ui-extension/ui-extension");
|
|
41
41
|
const delete_tool_1 = require("../tools/deletion/delete-tool");
|
|
42
42
|
const marquee_mouse_tool_1 = require("../tools/marquee-selection/marquee-mouse-tool");
|
|
43
|
-
const origin_viewport_1 = require("../viewport/origin-viewport");
|
|
44
43
|
const CLICKED_CSS_CLASS = 'clicked';
|
|
45
44
|
const SEARCH_ICON_ID = 'search';
|
|
46
45
|
const PALETTE_ICON_ID = 'tools';
|
|
@@ -247,7 +246,7 @@ let ToolPalette = ToolPalette_1 = class ToolPalette extends ui_extension_1.GLSPA
|
|
|
247
246
|
const resetViewportButton = createIcon('screen-normal');
|
|
248
247
|
resetViewportButton.title = messages_1.messages.tool_palette.reset_viewport_button;
|
|
249
248
|
resetViewportButton.onclick = _event => {
|
|
250
|
-
this.actionDispatcher.dispatch(
|
|
249
|
+
this.actionDispatcher.dispatch(sprotty_1.OriginViewportAction.create());
|
|
251
250
|
resetViewportButton.focus();
|
|
252
251
|
};
|
|
253
252
|
resetViewportButton.ariaLabel = resetViewportButton.title;
|