@eclipse-glsp/client 1.1.0-next.0e4a7fc.263 → 1.1.0-next.14c7209.265
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/css/key-shortcut.css +107 -0
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
- package/lib/features/accessibility/accessibility-module.js +2 -0
- package/lib/features/accessibility/accessibility-module.js.map +1 -1
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts +31 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js +72 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts +53 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js +149 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/di.config.d.ts +24 -0
- package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/di.config.js +37 -0
- package/lib/features/accessibility/key-shortcut/di.config.js.map +1 -0
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts +6 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.js +26 -3
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.js.map +1 -1
- package/lib/features/accessibility/search/search-tool.d.ts +8 -1
- package/lib/features/accessibility/search/search-tool.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-tool.js +23 -1
- package/lib/features/accessibility/search/search-tool.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +7 -2
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js +19 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts +4 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js +23 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/features/accessibility/accessibility-module.ts +2 -0
- package/src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts +55 -0
- package/src/features/accessibility/key-shortcut/accessible-key-shortcut.ts +182 -0
- package/src/features/accessibility/key-shortcut/di.config.ts +35 -0
- package/src/features/accessibility/resize-key-tool/resize-key-tool.ts +22 -1
- package/src/features/accessibility/search/search-tool.ts +24 -5
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +19 -3
- package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +22 -1
- package/src/index.ts +1 -0
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
.keyboard-shortcuts-menu {
|
|
18
|
+
border: 1px solid #ccc;
|
|
19
|
+
border-radius: 5px;
|
|
20
|
+
background-color: #ededee;
|
|
21
|
+
margin-bottom: 20px;
|
|
22
|
+
position: absolute;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
right: 10px;
|
|
27
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
28
|
+
line-height: 1.5;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
z-index: 9999;
|
|
31
|
+
width: 400px;
|
|
32
|
+
max-height: 512px;
|
|
33
|
+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.keyboard-shortcuts-menu h3 {
|
|
37
|
+
font-size: 18px;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
margin: 0;
|
|
40
|
+
margin-bottom: 10px;
|
|
41
|
+
padding: 10px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.keyboard-shortcuts-menu kbd {
|
|
45
|
+
background-color: #e4e1e1;
|
|
46
|
+
border: 1px solid #ccc;
|
|
47
|
+
border-radius: 3px;
|
|
48
|
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
|
49
|
+
color: #333;
|
|
50
|
+
display: inline-block;
|
|
51
|
+
font-size: 0.85em;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
line-height: 1;
|
|
54
|
+
padding: 2px 4px;
|
|
55
|
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.keyboard-shortcuts-menu kbd:active {
|
|
60
|
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.keyboard-shortcuts-container {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
max-height: 100%;
|
|
67
|
+
padding: 10px;
|
|
68
|
+
padding-top: 3px;
|
|
69
|
+
overflow: auto;
|
|
70
|
+
right: 40px;
|
|
71
|
+
top: 25px;
|
|
72
|
+
text-align: left;
|
|
73
|
+
display: block;
|
|
74
|
+
z-index: 1000;
|
|
75
|
+
color: black;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.shortcut-entry-container {
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
margin-right: 10px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#key-shortcut-close-btn {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 14px;
|
|
87
|
+
right: 5px;
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
font-weight: bold;
|
|
90
|
+
background: #cccccc;
|
|
91
|
+
border: none;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.columnTitle {
|
|
96
|
+
text-align: left;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.menu-header {
|
|
100
|
+
padding: 0.4em;
|
|
101
|
+
text-align: left;
|
|
102
|
+
background: #cccccc;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
flex-wrap: wrap;
|
|
107
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility-module.d.ts","sourceRoot":"","sources":["../../../src/features/accessibility/accessibility-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"accessibility-module.d.ts","sourceRoot":"","sources":["../../../src/features/accessibility/accessibility-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAO9C;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAO9B,CAAC"}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.accessibilityModule = void 0;
|
|
19
19
|
const _glsp_sprotty_1 = require("../../glsp-sprotty/index");
|
|
20
|
+
const di_config_1 = require("./key-shortcut/di.config");
|
|
20
21
|
const move_zoom_module_1 = require("./move-zoom/move-zoom-module");
|
|
21
22
|
const resize_key_module_1 = require("./resize-key-tool/resize-key-module");
|
|
22
23
|
const search_palette_module_1 = require("./search/search-palette-module");
|
|
@@ -30,5 +31,6 @@ exports.accessibilityModule = new _glsp_sprotty_1.FeatureModule((bind, unbind, i
|
|
|
30
31
|
(0, view_key_tools_module_1.configureViewKeyTools)(context);
|
|
31
32
|
(0, move_zoom_module_1.configureMoveZoom)(context);
|
|
32
33
|
(0, search_palette_module_1.configureSearchPaletteModule)(context);
|
|
34
|
+
(0, di_config_1.configureShortcutHelpTool)(context);
|
|
33
35
|
});
|
|
34
36
|
//# sourceMappingURL=accessibility-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility-module.js","sourceRoot":"","sources":["../../../src/features/accessibility/accessibility-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,iDAA8C;AAC9C,mEAAiE;AACjE,2EAA2E;AAC3E,0EAA8E;AAC9E,kFAA+E;AAE/E;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAI,6BAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACnF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC;IAC9B,IAAA,6CAAqB,EAAC,OAAO,CAAC,CAAC;IAC/B,IAAA,oCAAiB,EAAC,OAAO,CAAC,CAAC;IAC3B,IAAA,oDAA4B,EAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"accessibility-module.js","sourceRoot":"","sources":["../../../src/features/accessibility/accessibility-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,iDAA8C;AAC9C,wDAAqE;AACrE,mEAAiE;AACjE,2EAA2E;AAC3E,0EAA8E;AAC9E,kFAA+E;AAE/E;;GAEG;AACU,QAAA,mBAAmB,GAAG,IAAI,6BAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACnF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC;IAC9B,IAAA,6CAAqB,EAAC,OAAO,CAAC,CAAC;IAC/B,IAAA,oCAAiB,EAAC,OAAO,CAAC,CAAC;IAC3B,IAAA,oDAA4B,EAAC,OAAO,CAAC,CAAC;IACtC,IAAA,qCAAyB,EAAC,OAAO,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { Action, KeyListener, KeyTool, SModelElement } from '../../../glsp-sprotty/index';
|
|
17
|
+
import { BaseGLSPTool } from '../../tools/base-glsp-tool';
|
|
18
|
+
export declare class AccessibleKeyShortcutTool extends BaseGLSPTool {
|
|
19
|
+
static ID: string;
|
|
20
|
+
protected readonly keytool: KeyTool;
|
|
21
|
+
protected shortcutKeyListener: AccessibleShortcutKeyListener;
|
|
22
|
+
get id(): string;
|
|
23
|
+
enable(): void;
|
|
24
|
+
disable(): void;
|
|
25
|
+
}
|
|
26
|
+
export declare class AccessibleShortcutKeyListener extends KeyListener {
|
|
27
|
+
protected readonly token: symbol;
|
|
28
|
+
keyDown(element: SModelElement, event: KeyboardEvent): Action[];
|
|
29
|
+
protected matchesActivateShortcutHelpKeystroke(event: KeyboardEvent): boolean;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=accessible-key-shortcut-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessible-key-shortcut-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAoD,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9H,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,qBACa,yBAA0B,SAAQ,YAAY;IACvD,MAAM,CAAC,EAAE,SAAkC;IAE1B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAErD,SAAS,CAAC,mBAAmB,gCAAuC;IAEpE,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,MAAM,IAAI,IAAI;IAIL,OAAO,IAAI,IAAI;CAG3B;AAED,qBAAa,6BAA8B,SAAQ,WAAW;IAC1D,SAAS,CAAC,QAAQ,CAAC,KAAK,SAA8C;IAC7D,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE;IAOxE,SAAS,CAAC,oCAAoC,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;CAGhF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
var AccessibleKeyShortcutTool_1;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.AccessibleShortcutKeyListener = exports.AccessibleKeyShortcutTool = void 0;
|
|
29
|
+
const inversify_1 = require("inversify");
|
|
30
|
+
const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
|
|
31
|
+
const base_glsp_tool_1 = require("../../tools/base-glsp-tool");
|
|
32
|
+
const accessible_key_shortcut_1 = require("./accessible-key-shortcut");
|
|
33
|
+
let AccessibleKeyShortcutTool = exports.AccessibleKeyShortcutTool = AccessibleKeyShortcutTool_1 = class AccessibleKeyShortcutTool extends base_glsp_tool_1.BaseGLSPTool {
|
|
34
|
+
constructor() {
|
|
35
|
+
super(...arguments);
|
|
36
|
+
this.shortcutKeyListener = new AccessibleShortcutKeyListener();
|
|
37
|
+
}
|
|
38
|
+
get id() {
|
|
39
|
+
return AccessibleKeyShortcutTool_1.ID;
|
|
40
|
+
}
|
|
41
|
+
enable() {
|
|
42
|
+
this.keytool.register(this.shortcutKeyListener);
|
|
43
|
+
}
|
|
44
|
+
disable() {
|
|
45
|
+
this.keytool.deregister(this.shortcutKeyListener);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
AccessibleKeyShortcutTool.ID = 'accessible-key-shortcut-tool';
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, inversify_1.inject)(_glsp_sprotty_1.KeyTool),
|
|
51
|
+
__metadata("design:type", _glsp_sprotty_1.KeyTool)
|
|
52
|
+
], AccessibleKeyShortcutTool.prototype, "keytool", void 0);
|
|
53
|
+
exports.AccessibleKeyShortcutTool = AccessibleKeyShortcutTool = AccessibleKeyShortcutTool_1 = __decorate([
|
|
54
|
+
(0, inversify_1.injectable)()
|
|
55
|
+
], AccessibleKeyShortcutTool);
|
|
56
|
+
class AccessibleShortcutKeyListener extends _glsp_sprotty_1.KeyListener {
|
|
57
|
+
constructor() {
|
|
58
|
+
super(...arguments);
|
|
59
|
+
this.token = Symbol(AccessibleShortcutKeyListener.name);
|
|
60
|
+
}
|
|
61
|
+
keyDown(element, event) {
|
|
62
|
+
if (this.matchesActivateShortcutHelpKeystroke(event)) {
|
|
63
|
+
return [_glsp_sprotty_1.SetUIExtensionVisibilityAction.create({ extensionId: accessible_key_shortcut_1.KeyShortcutUIExtension.ID, visible: true })];
|
|
64
|
+
}
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
matchesActivateShortcutHelpKeystroke(event) {
|
|
68
|
+
return (0, _glsp_sprotty_1.matchesKeystroke)(event, 'KeyH', 'alt');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.AccessibleShortcutKeyListener = AccessibleShortcutKeyListener;
|
|
72
|
+
//# sourceMappingURL=accessible-key-shortcut-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessible-key-shortcut-tool.js","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,yCAA+C;AAC/C,iDAA8H;AAC9H,+DAA0D;AAC1D,uEAAmE;AAG5D,IAAM,yBAAyB,qEAA/B,MAAM,yBAA0B,SAAQ,6BAAY;IAApD;;QAKO,wBAAmB,GAAG,IAAI,6BAA6B,EAAE,CAAC;IAaxE,CAAC;IAXG,IAAI,EAAE;QACF,OAAO,2BAAyB,CAAC,EAAE,CAAC;IACxC,CAAC;IAED,MAAM;QACF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAEQ,OAAO;QACZ,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;;AAhBM,4BAAE,GAAG,8BAA8B,AAAjC,CAAkC;AAEP;IAAnC,IAAA,kBAAM,EAAC,uBAAO,CAAC;8BAA6B,uBAAO;0DAAC;oCAH5C,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAkBrC;AAED,MAAa,6BAA8B,SAAQ,2BAAW;IAA9D;;QACuB,UAAK,GAAG,MAAM,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAW1E,CAAC;IAVY,OAAO,CAAC,OAAsB,EAAE,KAAoB;QACzD,IAAI,IAAI,CAAC,oCAAoC,CAAC,KAAK,CAAC,EAAE;YAClD,OAAO,CAAC,8CAA8B,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gDAAsB,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;SAC7G;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAES,oCAAoC,CAAC,KAAoB;QAC/D,OAAO,IAAA,gCAAgB,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;CACJ;AAZD,sEAYC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { AbstractUIExtension, Action, IActionHandler, ICommand, SModelRoot } from '../../../glsp-sprotty/index';
|
|
17
|
+
export interface AccessibleKeyShortcutProvider {
|
|
18
|
+
registerShortcutKey(): void;
|
|
19
|
+
}
|
|
20
|
+
export interface AccessibleKeyShortcut {
|
|
21
|
+
shortcuts: string[];
|
|
22
|
+
description: string;
|
|
23
|
+
group: string;
|
|
24
|
+
position: number;
|
|
25
|
+
}
|
|
26
|
+
export interface SetAccessibleKeyShortcutAction extends Action {
|
|
27
|
+
kind: typeof SetAccessibleKeyShortcutAction.KIND;
|
|
28
|
+
token: string;
|
|
29
|
+
keys: AccessibleKeyShortcut[];
|
|
30
|
+
}
|
|
31
|
+
export declare namespace SetAccessibleKeyShortcutAction {
|
|
32
|
+
const KIND = "setAccessibleKeyShortcut";
|
|
33
|
+
function is(object: any): object is SetAccessibleKeyShortcutAction;
|
|
34
|
+
function create(options: {
|
|
35
|
+
token: string;
|
|
36
|
+
keys: AccessibleKeyShortcut[];
|
|
37
|
+
}): SetAccessibleKeyShortcutAction;
|
|
38
|
+
}
|
|
39
|
+
export declare class KeyShortcutUIExtension extends AbstractUIExtension implements IActionHandler {
|
|
40
|
+
static readonly ID = "key-shortcut";
|
|
41
|
+
protected container: HTMLDivElement;
|
|
42
|
+
protected shortcutsContainer: HTMLDivElement;
|
|
43
|
+
protected registrations: Record<string, AccessibleKeyShortcut[]>;
|
|
44
|
+
handle(action: Action): ICommand | Action | void;
|
|
45
|
+
id(): string;
|
|
46
|
+
containerClass(): string;
|
|
47
|
+
show(root: Readonly<SModelRoot>, ...contextElementIds: string[]): void;
|
|
48
|
+
protected refreshUI(): void;
|
|
49
|
+
protected getShortcutHTML(shortcuts: string[]): HTMLElement;
|
|
50
|
+
protected createEntry(registration: AccessibleKeyShortcut): HTMLDivElement;
|
|
51
|
+
protected initializeContents(containerElement: HTMLElement): void;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=accessible-key-shortcut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessible-key-shortcut.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAoB,UAAU,EAAE,MAAM,eAAe,CAAC;AAEpH,MAAM,WAAW,6BAA6B;IAC1C,mBAAmB,IAAI,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,8BAA+B,SAAQ,MAAM;IAC1D,IAAI,EAAE,OAAO,8BAA8B,CAAC,IAAI,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,IAAI,6BAA6B,CAAC;IAE/C,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,8BAA8B,CAExE;IAED,SAAgB,MAAM,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,qBAAqB,EAAE,CAAA;KAAE,GAAG,8BAA8B,CAEhH;CACJ;AAED,qBACa,sBAAuB,SAAQ,mBAAoB,YAAW,cAAc;IACrF,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB;IACpC,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC;IACpC,SAAS,CAAC,kBAAkB,EAAE,cAAc,CAAC;IAC7C,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAM;IAEtE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI;IAQhD,EAAE,IAAI,MAAM;IAIZ,cAAc,IAAI,MAAM;IAIf,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI;IAK/E,SAAS,CAAC,SAAS,IAAI,IAAI;IA+C3B,SAAS,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW;IAO3D,SAAS,CAAC,WAAW,CAAC,YAAY,EAAE,qBAAqB,GAAG,cAAc;IAe1E,SAAS,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;CAmCpE"}
|
|
@@ -0,0 +1,149 @@
|
|
|
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 KeyShortcutUIExtension_1;
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.KeyShortcutUIExtension = exports.SetAccessibleKeyShortcutAction = void 0;
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
const lodash_1 = require("lodash");
|
|
28
|
+
const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
|
|
29
|
+
var SetAccessibleKeyShortcutAction;
|
|
30
|
+
(function (SetAccessibleKeyShortcutAction) {
|
|
31
|
+
SetAccessibleKeyShortcutAction.KIND = 'setAccessibleKeyShortcut';
|
|
32
|
+
function is(object) {
|
|
33
|
+
return _glsp_sprotty_1.Action.hasKind(object, SetAccessibleKeyShortcutAction.KIND);
|
|
34
|
+
}
|
|
35
|
+
SetAccessibleKeyShortcutAction.is = is;
|
|
36
|
+
function create(options) {
|
|
37
|
+
return { kind: SetAccessibleKeyShortcutAction.KIND, token: options.token, keys: options.keys };
|
|
38
|
+
}
|
|
39
|
+
SetAccessibleKeyShortcutAction.create = create;
|
|
40
|
+
})(SetAccessibleKeyShortcutAction || (exports.SetAccessibleKeyShortcutAction = SetAccessibleKeyShortcutAction = {}));
|
|
41
|
+
let KeyShortcutUIExtension = exports.KeyShortcutUIExtension = KeyShortcutUIExtension_1 = class KeyShortcutUIExtension extends _glsp_sprotty_1.AbstractUIExtension {
|
|
42
|
+
constructor() {
|
|
43
|
+
super(...arguments);
|
|
44
|
+
this.registrations = {};
|
|
45
|
+
}
|
|
46
|
+
handle(action) {
|
|
47
|
+
if (SetAccessibleKeyShortcutAction.is(action)) {
|
|
48
|
+
this.registrations[action.token] = action.keys;
|
|
49
|
+
if (this.containerElement) {
|
|
50
|
+
this.refreshUI();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
id() {
|
|
55
|
+
return KeyShortcutUIExtension_1.ID;
|
|
56
|
+
}
|
|
57
|
+
containerClass() {
|
|
58
|
+
return KeyShortcutUIExtension_1.ID;
|
|
59
|
+
}
|
|
60
|
+
show(root, ...contextElementIds) {
|
|
61
|
+
super.show(root, ...contextElementIds);
|
|
62
|
+
this.shortcutsContainer.focus();
|
|
63
|
+
}
|
|
64
|
+
refreshUI() {
|
|
65
|
+
this.shortcutsContainer.innerHTML = '';
|
|
66
|
+
const registrations = Object.values(this.registrations).flatMap(r => r);
|
|
67
|
+
registrations.sort((a, b) => {
|
|
68
|
+
if (a.group < b.group) {
|
|
69
|
+
return -1;
|
|
70
|
+
}
|
|
71
|
+
if (a.group > b.group) {
|
|
72
|
+
return 1;
|
|
73
|
+
}
|
|
74
|
+
return a.position - b.position;
|
|
75
|
+
});
|
|
76
|
+
const grouped = (0, lodash_1.groupBy)(registrations, k => k.group);
|
|
77
|
+
const groupTable = document.createElement('table');
|
|
78
|
+
const tableHead = document.createElement('thead');
|
|
79
|
+
const tableBody = document.createElement('tbody');
|
|
80
|
+
const headerRow = document.createElement('tr');
|
|
81
|
+
const commandCell = document.createElement('th');
|
|
82
|
+
const keybindingCell = document.createElement('th');
|
|
83
|
+
commandCell.classList.add('columnTitle');
|
|
84
|
+
commandCell.classList.add('columnTitle');
|
|
85
|
+
commandCell.innerText = 'Command';
|
|
86
|
+
keybindingCell.innerText = 'Keybinding';
|
|
87
|
+
headerRow.appendChild(commandCell);
|
|
88
|
+
headerRow.appendChild(keybindingCell);
|
|
89
|
+
tableHead.appendChild(headerRow);
|
|
90
|
+
for (const [, shortcuts] of Object.entries(grouped)) {
|
|
91
|
+
shortcuts.forEach(s => {
|
|
92
|
+
tableBody.appendChild(this.createEntry(s));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
groupTable.appendChild(tableHead);
|
|
96
|
+
groupTable.appendChild(tableBody);
|
|
97
|
+
this.shortcutsContainer.append(groupTable);
|
|
98
|
+
}
|
|
99
|
+
getShortcutHTML(shortcuts) {
|
|
100
|
+
const shortcutKeys = document.createElement('span');
|
|
101
|
+
shortcutKeys.innerHTML = shortcuts.map(key => `<kbd>${key}</kbd>`).join(' + ');
|
|
102
|
+
return shortcutKeys;
|
|
103
|
+
}
|
|
104
|
+
createEntry(registration) {
|
|
105
|
+
const entryRow = document.createElement('tr');
|
|
106
|
+
const shortcutElement = document.createElement('td');
|
|
107
|
+
const descElement = document.createElement('td');
|
|
108
|
+
const shortcut = this.getShortcutHTML(registration.shortcuts);
|
|
109
|
+
descElement.innerText = registration.description;
|
|
110
|
+
shortcutElement.appendChild(shortcut);
|
|
111
|
+
entryRow.appendChild(descElement);
|
|
112
|
+
entryRow.appendChild(shortcutElement);
|
|
113
|
+
return entryRow;
|
|
114
|
+
}
|
|
115
|
+
initializeContents(containerElement) {
|
|
116
|
+
this.container = document.createElement('div');
|
|
117
|
+
this.container.classList.add('keyboard-shortcuts-menu');
|
|
118
|
+
// create title
|
|
119
|
+
const menuTitle = document.createElement('h3');
|
|
120
|
+
menuTitle.classList.add('menu-header');
|
|
121
|
+
menuTitle.innerText = 'Keyboard Shortcuts';
|
|
122
|
+
this.container.appendChild(menuTitle);
|
|
123
|
+
const closeBtn = document.createElement('button');
|
|
124
|
+
closeBtn.id = 'key-shortcut-close-btn';
|
|
125
|
+
closeBtn.textContent = 'x';
|
|
126
|
+
closeBtn.addEventListener('click', () => {
|
|
127
|
+
this.hide();
|
|
128
|
+
});
|
|
129
|
+
this.container.appendChild(closeBtn);
|
|
130
|
+
// create shortcuts container
|
|
131
|
+
this.shortcutsContainer = document.createElement('div');
|
|
132
|
+
this.shortcutsContainer.classList.add('keyboard-shortcuts-container');
|
|
133
|
+
this.shortcutsContainer.tabIndex = 30;
|
|
134
|
+
this.shortcutsContainer.addEventListener('keydown', (event) => {
|
|
135
|
+
if (event.key === 'Escape' || (0, _glsp_sprotty_1.matchesKeystroke)(event, 'KeyH', 'alt')) {
|
|
136
|
+
this.hide();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
this.container.appendChild(this.shortcutsContainer);
|
|
140
|
+
containerElement.appendChild(this.container);
|
|
141
|
+
containerElement.ariaLabel = 'Shortcut-Menu';
|
|
142
|
+
this.refreshUI();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
KeyShortcutUIExtension.ID = 'key-shortcut';
|
|
146
|
+
exports.KeyShortcutUIExtension = KeyShortcutUIExtension = KeyShortcutUIExtension_1 = __decorate([
|
|
147
|
+
(0, inversify_1.injectable)()
|
|
148
|
+
], KeyShortcutUIExtension);
|
|
149
|
+
//# sourceMappingURL=accessible-key-shortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessible-key-shortcut.js","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;AAElF,yCAAuC;AACvC,mCAAiC;AACjC,iDAAoH;AAmBpH,IAAiB,8BAA8B,CAU9C;AAVD,WAAiB,8BAA8B;IAC9B,mCAAI,GAAG,0BAA0B,CAAC;IAE/C,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,sBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,+BAAA,IAAI,CAAC,CAAC;IACxC,CAAC;IAFe,iCAAE,KAEjB,CAAA;IAED,SAAgB,MAAM,CAAC,OAAyD;QAC5E,OAAO,EAAE,IAAI,EAAE,+BAAA,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;IACpE,CAAC;IAFe,qCAAM,SAErB,CAAA;AACL,CAAC,EAVgB,8BAA8B,8CAA9B,8BAA8B,QAU9C;AAGM,IAAM,sBAAsB,+DAA5B,MAAM,sBAAuB,SAAQ,mCAAmB;IAAxD;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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
|
+
import { BindingContext } from '../../../glsp-sprotty/index';
|
|
18
|
+
import '../../../../css/key-shortcut.css';
|
|
19
|
+
/**
|
|
20
|
+
* Handles actions for displaying help/information about keyboard shortcuts.
|
|
21
|
+
*/
|
|
22
|
+
export declare const glspShortcutHelpModule: ContainerModule;
|
|
23
|
+
export declare function configureShortcutHelpTool(context: BindingContext): void;
|
|
24
|
+
//# sourceMappingURL=di.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAiB,cAAc,EAAiC,MAAM,eAAe,CAAC;AAC7F,OAAO,kCAAkC,CAAC;AAI1C;;GAEG;AACH,eAAO,MAAM,sBAAsB,iBAGjC,CAAC;AAEH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAIvE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
exports.configureShortcutHelpTool = exports.glspShortcutHelpModule = void 0;
|
|
19
|
+
const inversify_1 = require("inversify");
|
|
20
|
+
const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
|
|
21
|
+
require("../../../../css/key-shortcut.css");
|
|
22
|
+
const accessible_key_shortcut_1 = require("./accessible-key-shortcut");
|
|
23
|
+
const accessible_key_shortcut_tool_1 = require("./accessible-key-shortcut-tool");
|
|
24
|
+
/**
|
|
25
|
+
* Handles actions for displaying help/information about keyboard shortcuts.
|
|
26
|
+
*/
|
|
27
|
+
exports.glspShortcutHelpModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
28
|
+
const context = { bind, unbind, isBound, rebind };
|
|
29
|
+
configureShortcutHelpTool(context);
|
|
30
|
+
});
|
|
31
|
+
function configureShortcutHelpTool(context) {
|
|
32
|
+
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.IDefaultTool, accessible_key_shortcut_tool_1.AccessibleKeyShortcutTool);
|
|
33
|
+
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.IUIExtension, accessible_key_shortcut_1.KeyShortcutUIExtension);
|
|
34
|
+
(0, _glsp_sprotty_1.configureActionHandler)(context, accessible_key_shortcut_1.SetAccessibleKeyShortcutAction.KIND, accessible_key_shortcut_1.KeyShortcutUIExtension);
|
|
35
|
+
}
|
|
36
|
+
exports.configureShortcutHelpTool = configureShortcutHelpTool;
|
|
37
|
+
//# sourceMappingURL=di.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/di.config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAA4C;AAC5C,iDAA6F;AAC7F,4CAA0C;AAC1C,uEAAmG;AACnG,iFAA2E;AAE3E;;GAEG;AACU,QAAA,sBAAsB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACxF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH,SAAgB,yBAAyB,CAAC,OAAuB;IAC7D,IAAA,6BAAa,EAAC,OAAO,EAAE,qBAAK,CAAC,YAAY,EAAE,wDAAyB,CAAC,CAAC;IACtE,IAAA,6BAAa,EAAC,OAAO,EAAE,qBAAK,CAAC,YAAY,EAAE,gDAAsB,CAAC,CAAC;IACnE,IAAA,sCAAsB,EAAC,OAAO,EAAE,wDAA8B,CAAC,IAAI,EAAE,gDAAsB,CAAC,CAAC;AACjG,CAAC;AAJD,8DAIC"}
|
|
@@ -14,25 +14,30 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, ISnapper, KeyListener, KeyTool, SModelElement } from '../../../glsp-sprotty/index';
|
|
17
|
+
import { GLSPActionDispatcher } from '../../../base/action-dispatcher';
|
|
17
18
|
import { SelectionService } from '../../../base/selection-service';
|
|
18
19
|
import { GLSPTool } from '../../../base/tool-manager/glsp-tool-manager';
|
|
19
20
|
import { IMovementRestrictor } from '../../change-bounds/movement-restrictor';
|
|
21
|
+
import { AccessibleKeyShortcutProvider } from '../key-shortcut/accessible-key-shortcut';
|
|
20
22
|
export declare class ResizeKeyTool implements GLSPTool {
|
|
21
23
|
static ID: string;
|
|
22
24
|
isEditTool: boolean;
|
|
23
25
|
protected readonly keytool: KeyTool;
|
|
24
26
|
readonly movementRestrictor?: IMovementRestrictor;
|
|
25
27
|
readonly snapper?: ISnapper;
|
|
28
|
+
readonly actionDispatcher: GLSPActionDispatcher;
|
|
26
29
|
readonly selectionService: SelectionService;
|
|
27
30
|
protected resizeKeyListener: ResizeKeyListener;
|
|
28
31
|
get id(): string;
|
|
29
32
|
enable(): void;
|
|
30
33
|
disable(): void;
|
|
31
34
|
}
|
|
32
|
-
export declare class ResizeKeyListener extends KeyListener {
|
|
35
|
+
export declare class ResizeKeyListener extends KeyListener implements AccessibleKeyShortcutProvider {
|
|
33
36
|
protected readonly tool: ResizeKeyTool;
|
|
34
37
|
protected isEditMode: boolean;
|
|
38
|
+
protected readonly token: string;
|
|
35
39
|
constructor(tool: ResizeKeyTool);
|
|
40
|
+
registerShortcutKey(): void;
|
|
36
41
|
keyDown(element: SModelElement, event: KeyboardEvent): Action[];
|
|
37
42
|
protected matchesIncreaseSizeKeystroke(event: KeyboardEvent): boolean;
|
|
38
43
|
protected matchesActivateResizeModeKeystroke(event: KeyboardEvent): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-key-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/resize-key-tool/resize-key-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAAE,MAAM,EAA+C,QAAQ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