@eclipse-glsp/client 2.2.0-next.343 → 2.2.0-next.345
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/default.module.d.ts.map +1 -1
- package/lib/base/default.module.js +2 -0
- package/lib/base/default.module.js.map +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
- package/lib/features/accessibility/accessibility-module.js +10 -8
- package/lib/features/accessibility/accessibility-module.js.map +1 -1
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts +6 -4
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts.map +1 -1
- package/lib/features/accessibility/element-navigation/element-navigation-module.js +8 -8
- package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -1
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts +6 -4
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts.map +1 -1
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +6 -6
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -1
- package/lib/features/accessibility/key-shortcut/{di.config.d.ts → shortcut-help-module.d.ts} +7 -5
- package/lib/features/accessibility/key-shortcut/shortcut-help-module.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/{di.config.js → shortcut-help-module.js} +6 -6
- package/lib/features/accessibility/key-shortcut/shortcut-help-module.js.map +1 -0
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js +7 -7
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js.map +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.d.ts.map +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.js +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js.map +1 -1
- package/lib/features/accessibility/search/search-palette-module.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-palette-module.js +1 -1
- package/lib/features/accessibility/search/search-palette-module.js.map +1 -1
- package/lib/features/accessibility/toast/toast-module.d.ts +6 -4
- package/lib/features/accessibility/toast/toast-module.d.ts.map +1 -1
- package/lib/features/accessibility/toast/toast-module.js +5 -5
- package/lib/features/accessibility/toast/toast-module.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +2 -2
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js +3 -3
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js +3 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js.map +1 -1
- package/lib/features/bounds/bounds-module.d.ts.map +1 -1
- package/lib/features/bounds/bounds-module.js +1 -1
- package/lib/features/bounds/bounds-module.js.map +1 -1
- package/lib/features/change-bounds/model.d.ts +7 -4
- package/lib/features/change-bounds/model.d.ts.map +1 -1
- package/lib/features/change-bounds/model.js +12 -11
- package/lib/features/change-bounds/model.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js +2 -2
- package/lib/features/command-palette/command-palette-module.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-module.js +1 -1
- package/lib/features/command-palette/command-palette-module.js.map +1 -1
- package/lib/features/context-menu/context-menu-module.d.ts.map +1 -1
- package/lib/features/context-menu/context-menu-module.js +1 -1
- package/lib/features/context-menu/context-menu-module.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-modules.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-modules.js +5 -2
- package/lib/features/copy-paste/copy-paste-modules.js.map +1 -1
- package/lib/features/debug/debug-module.d.ts.map +1 -1
- package/lib/features/debug/debug-module.js +1 -1
- package/lib/features/debug/debug-module.js.map +1 -1
- package/lib/features/decoration/decoration-module.d.ts.map +1 -1
- package/lib/features/decoration/decoration-module.js +1 -1
- package/lib/features/decoration/decoration-module.js.map +1 -1
- package/lib/features/element-template/element-template-module.d.ts.map +1 -1
- package/lib/features/element-template/element-template-module.js +1 -1
- package/lib/features/element-template/element-template-module.js.map +1 -1
- package/lib/features/export/export-modules.d.ts.map +1 -1
- package/lib/features/export/export-modules.js +2 -2
- package/lib/features/export/export-modules.js.map +1 -1
- package/lib/features/grid/grid-module.d.ts.map +1 -1
- package/lib/features/grid/grid-module.js +1 -1
- package/lib/features/grid/grid-module.js.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.js +1 -1
- package/lib/features/helper-lines/helper-line-module.d.ts.map +1 -1
- package/lib/features/helper-lines/helper-line-module.js +1 -1
- package/lib/features/helper-lines/helper-line-module.js.map +1 -1
- package/lib/features/hints/type-hints-module.d.ts.map +1 -1
- package/lib/features/hints/type-hints-module.js +1 -1
- package/lib/features/hints/type-hints-module.js.map +1 -1
- package/lib/features/hover/hover-module.d.ts.map +1 -1
- package/lib/features/hover/hover-module.js +1 -1
- package/lib/features/hover/hover-module.js.map +1 -1
- package/lib/features/label-edit/label-edit-module.d.ts.map +1 -1
- package/lib/features/label-edit/label-edit-module.js +1 -1
- package/lib/features/label-edit/label-edit-module.js.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.d.ts.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.js +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.js.map +1 -1
- package/lib/features/layout/layout-module.d.ts.map +1 -1
- package/lib/features/layout/layout-module.js +1 -1
- package/lib/features/layout/layout-module.js.map +1 -1
- package/lib/features/navigation/navigation-module.d.ts.map +1 -1
- package/lib/features/navigation/navigation-module.js +1 -1
- package/lib/features/navigation/navigation-module.js.map +1 -1
- package/lib/features/routing/routing-module.d.ts.map +1 -1
- package/lib/features/routing/routing-module.js +1 -1
- package/lib/features/routing/routing-module.js.map +1 -1
- package/lib/features/save/save-module.d.ts.map +1 -1
- package/lib/features/save/save-module.js +1 -1
- package/lib/features/save/save-module.js.map +1 -1
- package/lib/features/select/select-module.d.ts.map +1 -1
- package/lib/features/select/select-module.js +2 -2
- package/lib/features/select/select-module.js.map +1 -1
- package/lib/features/select/select-mouse-listener.js +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.d.ts.map +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js.map +1 -1
- package/lib/features/status/status-module.d.ts.map +1 -1
- package/lib/features/status/status-module.js +1 -1
- package/lib/features/status/status-module.js.map +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.d.ts.map +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.js +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.js.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.js +1 -1
- package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.js +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +3 -3
- package/lib/features/tools/change-bounds/change-bounds-tool.js +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts +6 -6
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.js +2 -2
- package/lib/features/tools/change-bounds/view.d.ts +8 -5
- package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/view.js +8 -7
- package/lib/features/tools/change-bounds/view.js.map +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.d.ts.map +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.js +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.js.map +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.js +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.js +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.js +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.js.map +1 -1
- package/lib/features/tools/node-creation/node-creation-module.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-module.js +4 -1
- package/lib/features/tools/node-creation/node-creation-module.js.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.d.ts +15 -0
- package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.js +2 -2
- package/lib/features/tools/tool-focus-loss-module.js.map +1 -1
- package/lib/features/undo-redo/undo-redo-module.d.ts +3 -3
- package/lib/features/undo-redo/undo-redo-module.d.ts.map +1 -1
- package/lib/features/undo-redo/undo-redo-module.js +3 -4
- package/lib/features/undo-redo/undo-redo-module.js.map +1 -1
- package/lib/features/validation/validation-modules.d.ts.map +1 -1
- package/lib/features/validation/validation-modules.js +3 -3
- package/lib/features/validation/validation-modules.js.map +1 -1
- package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
- package/lib/features/viewport/viewport-modules.js +2 -2
- package/lib/features/viewport/viewport-modules.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/standalone-modules.d.ts +1 -1
- package/lib/standalone-modules.d.ts.map +1 -1
- package/lib/standalone-modules.js +1 -1
- package/lib/standalone-modules.js.map +1 -1
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +1 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/package.json +3 -3
- package/src/base/default.module.ts +80 -73
- package/src/features/accessibility/accessibility-module.ts +25 -20
- package/src/features/accessibility/element-navigation/element-navigation-module.ts +17 -10
- package/src/features/accessibility/focus-tracker/focus-tracker-module.ts +14 -7
- package/src/features/accessibility/key-shortcut/{di.config.ts → shortcut-help-module.ts} +14 -7
- package/src/features/accessibility/keyboard-pointer/keyboard-pointer-module.ts +18 -15
- package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.ts +7 -4
- package/src/features/accessibility/move-zoom/move-zoom-module.ts +7 -4
- package/src/features/accessibility/resize-key-tool/resize-key-module.ts +7 -4
- package/src/features/accessibility/search/search-palette-module.ts +7 -4
- package/src/features/accessibility/toast/toast-module.ts +14 -7
- package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +8 -8
- package/src/features/accessibility/view-key-tools/view-key-tools-module.ts +10 -5
- package/src/features/bounds/bounds-module.ts +20 -17
- package/src/features/change-bounds/model.ts +17 -12
- package/src/features/change-bounds/movement-restrictor.ts +3 -3
- package/src/features/command-palette/command-palette-module.ts +9 -6
- package/src/features/context-menu/context-menu-module.ts +16 -13
- package/src/features/copy-paste/copy-paste-modules.ts +11 -5
- package/src/features/debug/debug-module.ts +10 -7
- package/src/features/decoration/decoration-module.ts +6 -3
- package/src/features/element-template/element-template-module.ts +8 -5
- package/src/features/export/export-modules.ts +10 -7
- package/src/features/grid/grid-module.ts +11 -8
- package/src/features/helper-lines/helper-line-manager-default.ts +2 -2
- package/src/features/helper-lines/helper-line-module.ts +16 -13
- package/src/features/hints/type-hints-module.ts +10 -7
- package/src/features/hover/hover-module.ts +28 -25
- package/src/features/label-edit/label-edit-module.ts +9 -6
- package/src/features/label-edit-ui/label-edit-ui-module.ts +9 -6
- package/src/features/layout/layout-module.ts +8 -5
- package/src/features/navigation/navigation-module.ts +11 -8
- package/src/features/routing/routing-module.ts +21 -18
- package/src/features/save/save-module.ts +6 -3
- package/src/features/select/select-module.ts +11 -8
- package/src/features/select/select-mouse-listener.ts +2 -2
- package/src/features/source-model-watcher/source-model-watcher-module.ts +6 -3
- package/src/features/status/status-module.ts +9 -6
- package/src/features/svg-metadata/svg-metadata-module.ts +7 -4
- package/src/features/tool-palette/tool-palette-module.ts +10 -7
- package/src/features/tools/change-bounds/change-bounds-manager.ts +2 -2
- package/src/features/tools/change-bounds/change-bounds-tool-module.ts +13 -10
- package/src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts +3 -3
- package/src/features/tools/change-bounds/change-bounds-tool.ts +4 -4
- package/src/features/tools/change-bounds/change-bounds-tracker.ts +6 -6
- package/src/features/tools/change-bounds/view.tsx +11 -6
- package/src/features/tools/deletion/deletion-tool-module.ts +8 -5
- package/src/features/tools/edge-creation/edege-creation-module.ts +9 -6
- package/src/features/tools/edge-edit/edge-edit-module.ts +14 -11
- package/src/features/tools/marquee-selection/marquee-selection-module.ts +11 -8
- package/src/features/tools/node-creation/node-creation-module.ts +4 -1
- package/src/features/tools/tool-focus-loss-module.ts +7 -4
- package/src/features/undo-redo/undo-redo-module.ts +8 -6
- package/src/features/validation/validation-modules.ts +19 -13
- package/src/features/viewport/viewport-modules.ts +20 -17
- package/src/index.ts +1 -1
- package/src/standalone-modules.ts +12 -9
- package/src/views/base-view-module.ts +7 -4
- package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/key-shortcut/di.config.js.map +0 -1
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
isMoveable
|
|
33
33
|
} from '@eclipse-glsp/sprotty';
|
|
34
34
|
import { BoundsAwareModelElement, MoveableElement, ResizableModelElement, getElements } from '../../../utils/gmodel-util';
|
|
35
|
-
import {
|
|
35
|
+
import { GResizeHandle, ResizeHandleLocation } from '../../change-bounds/model';
|
|
36
36
|
import { DiagramMovementCalculator } from '../../change-bounds/tracker';
|
|
37
37
|
import { ChangeBoundsManager } from './change-bounds-manager';
|
|
38
38
|
|
|
@@ -277,7 +277,7 @@ export class ChangeBoundsTracker {
|
|
|
277
277
|
// RESIZE
|
|
278
278
|
//
|
|
279
279
|
|
|
280
|
-
resizeElements(handle:
|
|
280
|
+
resizeElements(handle: GResizeHandle, opts?: Partial<ResizeOptions>): TrackedResize {
|
|
281
281
|
const options = this.resolveResizeOptions(opts);
|
|
282
282
|
const update = this.calculateDiagramMovement();
|
|
283
283
|
const handleMove = this.calculateHandleMove(new MoveableResizeHandle(handle), update.vector, options);
|
|
@@ -315,7 +315,7 @@ export class ChangeBoundsTracker {
|
|
|
315
315
|
return this.calculateElementMove(handle, diagramMovement, moveOptions);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
protected getResizableElements(handle:
|
|
318
|
+
protected getResizableElements(handle: GResizeHandle, options: ResizeOptions): ResizableModelElement[] {
|
|
319
319
|
return [handle.parent];
|
|
320
320
|
}
|
|
321
321
|
|
|
@@ -447,11 +447,11 @@ export class ChangeBoundsTracker {
|
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
export class MoveableResizeHandle extends
|
|
450
|
+
export class MoveableResizeHandle extends GResizeHandle implements Locateable {
|
|
451
451
|
constructor(
|
|
452
|
-
protected handle:
|
|
452
|
+
protected handle: GResizeHandle,
|
|
453
453
|
override location: ResizeHandleLocation = handle.location,
|
|
454
|
-
readonly position =
|
|
454
|
+
readonly position = GResizeHandle.getHandlePosition(handle.parent, location)
|
|
455
455
|
) {
|
|
456
456
|
super(location, handle.type, handle.hoverFeedback);
|
|
457
457
|
this.id = handle.id;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2024 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
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
import { IView, Point, RenderingContext, setAttr, svg } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { injectable } from 'inversify';
|
|
18
18
|
import { VNode } from 'snabbdom';
|
|
19
|
-
import {
|
|
19
|
+
import { GResizeHandle } from '../../change-bounds/model';
|
|
20
20
|
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
22
|
const JSX = { createElement: svg };
|
|
23
23
|
|
|
24
24
|
@injectable()
|
|
25
|
-
export class
|
|
26
|
-
render(handle:
|
|
25
|
+
export class GResizeHandleView implements IView {
|
|
26
|
+
render(handle: GResizeHandle, context: RenderingContext): VNode | undefined {
|
|
27
27
|
if (context.targetKind === 'hidden') {
|
|
28
28
|
return undefined;
|
|
29
29
|
}
|
|
@@ -45,11 +45,16 @@ export class SResizeHandleView implements IView {
|
|
|
45
45
|
return <g />;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
protected getPosition(handle:
|
|
49
|
-
return Point.subtract(
|
|
48
|
+
protected getPosition(handle: GResizeHandle): Point | undefined {
|
|
49
|
+
return Point.subtract(GResizeHandle.getHandlePosition(handle), handle.parent.bounds);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
getRadius(): number {
|
|
53
53
|
return 7;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
/** @deprecated Use {@link GResizeHandleView} instead */
|
|
59
|
+
GResizeHandleView as SResizeHandleView
|
|
60
|
+
};
|
|
@@ -16,8 +16,11 @@
|
|
|
16
16
|
import { FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
|
|
18
18
|
|
|
19
|
-
export const deletionToolModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
export const deletionToolModule = new FeatureModule(
|
|
20
|
+
(bind, unbind, isBound, rebind) => {
|
|
21
|
+
const context = { bind, unbind, isBound, rebind };
|
|
22
|
+
bindAsService(context, TYPES.IDefaultTool, DelKeyDeleteTool);
|
|
23
|
+
bindAsService(context, TYPES.ITool, MouseDeleteTool);
|
|
24
|
+
},
|
|
25
|
+
{ featureId: Symbol('deletionTool') }
|
|
26
|
+
);
|
|
@@ -17,9 +17,12 @@ import { FeatureModule, TYPES, TriggerEdgeCreationAction, bindAsService, configu
|
|
|
17
17
|
import { configureDanglingFeedbackEdge } from './dangling-edge-feedback';
|
|
18
18
|
import { EdgeCreationTool } from './edge-creation-tool';
|
|
19
19
|
|
|
20
|
-
export const edgeCreationToolModule = new FeatureModule(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
export const edgeCreationToolModule = new FeatureModule(
|
|
21
|
+
(bind, unbind, isBound, rebind) => {
|
|
22
|
+
const context = { bind, unbind, isBound, rebind };
|
|
23
|
+
bindAsService(context, TYPES.ITool, EdgeCreationTool);
|
|
24
|
+
configureActionHandler(context, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
|
|
25
|
+
configureDanglingFeedbackEdge(context);
|
|
26
|
+
},
|
|
27
|
+
{ featureId: Symbol('edgeCreationTool') }
|
|
28
|
+
);
|
|
@@ -23,16 +23,19 @@ import {
|
|
|
23
23
|
SwitchRoutingModeCommand
|
|
24
24
|
} from './edge-edit-tool-feedback';
|
|
25
25
|
|
|
26
|
-
export const edgeEditToolModule = new FeatureModule(
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
export const edgeEditToolModule = new FeatureModule(
|
|
27
|
+
(bind, unbind, isBound, rebind) => {
|
|
28
|
+
const context = { bind, unbind, isBound, rebind };
|
|
29
|
+
bindAsService(context, TYPES.IDefaultTool, EdgeEditTool);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
// reconnect edge tool feedback
|
|
32
|
+
configureCommand(context, ShowEdgeReconnectHandlesFeedbackCommand);
|
|
33
|
+
configureCommand(context, HideEdgeReconnectHandlesFeedbackCommand);
|
|
34
|
+
configureCommand(context, DrawFeedbackEdgeSourceCommand);
|
|
35
|
+
configureCommand(context, SwitchRoutingModeCommand);
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
37
|
+
// dangling edge feedback
|
|
38
|
+
configureDanglingFeedbackEdge(context);
|
|
39
|
+
},
|
|
40
|
+
{ featureId: Symbol('edgeEditTool') }
|
|
41
|
+
);
|
|
@@ -20,13 +20,16 @@ import { DrawMarqueeCommand, MARQUEE, RemoveMarqueeCommand } from './marquee-too
|
|
|
20
20
|
import { MarqueeNode } from './model';
|
|
21
21
|
import { MarqueeView } from './view';
|
|
22
22
|
|
|
23
|
-
export const marqueeSelectionToolModule = new FeatureModule(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
export const marqueeSelectionToolModule = new FeatureModule(
|
|
24
|
+
(bind, unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, unbind, isBound, rebind };
|
|
26
|
+
bindAsService(context, TYPES.IDefaultTool, MarqueeTool);
|
|
27
|
+
bindAsService(context, TYPES.ITool, MarqueeMouseTool);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
configureCommand(context, DrawMarqueeCommand);
|
|
30
|
+
configureCommand(context, RemoveMarqueeCommand);
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
}
|
|
32
|
+
configureModelElement(context, MARQUEE, MarqueeNode, MarqueeView);
|
|
33
|
+
},
|
|
34
|
+
{ featureId: Symbol('marqueeSelectionTool') }
|
|
35
|
+
);
|
|
@@ -35,5 +35,8 @@ export const nodeCreationToolModule = new FeatureModule(
|
|
|
35
35
|
configureActionHandler(context, TriggerNodeCreationAction.KIND, NodeCreationTool);
|
|
36
36
|
configureModelElement(context, InsertIndicator.TYPE, InsertIndicator, InsertIndicatorView);
|
|
37
37
|
},
|
|
38
|
-
{
|
|
38
|
+
{
|
|
39
|
+
featureId: Symbol('nodeCreationTool'),
|
|
40
|
+
requires: elementTemplateModule
|
|
41
|
+
}
|
|
39
42
|
);
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { injectable } from 'inversify';
|
|
17
16
|
import { Action, FeatureModule, IActionHandler, ICommand, configureActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { injectable } from 'inversify';
|
|
18
18
|
import { FocusStateChangedAction } from '../../base/focus/focus-state-change-action';
|
|
19
19
|
import { EnableDefaultToolsAction } from '../../base/tool-manager/tool';
|
|
20
20
|
|
|
@@ -34,6 +34,9 @@ export class EnableDefaultToolsOnFocusLossHandler implements IActionHandler {
|
|
|
34
34
|
/**
|
|
35
35
|
* Enables the default tools in the tool manager if the diagram looses focus.
|
|
36
36
|
*/
|
|
37
|
-
export const toolFocusLossModule = new FeatureModule(
|
|
38
|
-
|
|
39
|
-
});
|
|
37
|
+
export const toolFocusLossModule = new FeatureModule(
|
|
38
|
+
(bind, _unbind, isBound) => {
|
|
39
|
+
configureActionHandler({ bind, isBound }, FocusStateChangedAction.KIND, EnableDefaultToolsOnFocusLossHandler);
|
|
40
|
+
},
|
|
41
|
+
{ featureId: Symbol('toolFocusLoss ') }
|
|
42
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2023-2024 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
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import { bindAsService, TYPES } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { bindAsService, FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
19
18
|
import { GLSPUndoRedoKeyListener } from './undo-redo-key-listener';
|
|
20
19
|
|
|
21
20
|
/**
|
|
@@ -23,6 +22,9 @@ import { GLSPUndoRedoKeyListener } from './undo-redo-key-listener';
|
|
|
23
22
|
* When integrated into an application frame (e.g Theia/VS Code) this module is typically omitted and/or replaced
|
|
24
23
|
* with an application native module.
|
|
25
24
|
*/
|
|
26
|
-
export const undoRedoModule = new
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
export const undoRedoModule = new FeatureModule(
|
|
26
|
+
(bind, unbind, isBound, rebind) => {
|
|
27
|
+
bindAsService(bind, TYPES.KeyListener, GLSPUndoRedoKeyListener);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('undoRedo') }
|
|
30
|
+
);
|
|
@@ -25,19 +25,25 @@ import {
|
|
|
25
25
|
} from './marker-navigator';
|
|
26
26
|
import { ApplyMarkersCommand, DeleteMarkersCommand, SetMarkersActionHandler, ValidationFeedbackEmitter } from './validate';
|
|
27
27
|
|
|
28
|
-
export const validationModule = new FeatureModule(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
export const validationModule = new FeatureModule(
|
|
29
|
+
(bind, _unbind, isBound) => {
|
|
30
|
+
const context = { bind, isBound };
|
|
31
|
+
configureActionHandler(context, SetMarkersAction.KIND, SetMarkersActionHandler);
|
|
32
|
+
configureCommand(context, ApplyMarkersCommand);
|
|
33
|
+
configureCommand(context, DeleteMarkersCommand);
|
|
34
|
+
bind(ValidationFeedbackEmitter).toSelf().inSingletonScope();
|
|
35
|
+
},
|
|
36
|
+
{ featureId: Symbol('validation') }
|
|
37
|
+
);
|
|
35
38
|
|
|
36
|
-
export const markerNavigatorModule = new FeatureModule(
|
|
37
|
-
bind
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
39
|
+
export const markerNavigatorModule = new FeatureModule(
|
|
40
|
+
(bind, _unbind, isBound) => {
|
|
41
|
+
bind(GModelElementComparator).to(LeftToRightTopToBottomComparator).inSingletonScope();
|
|
42
|
+
bind(MarkerNavigator).toSelf().inSingletonScope();
|
|
43
|
+
configureActionHandler({ bind, isBound }, NavigateToMarkerAction.KIND, NavigateToMarkerActionHandler);
|
|
44
|
+
},
|
|
45
|
+
{ featureId: Symbol('markerNavigator') }
|
|
46
|
+
);
|
|
41
47
|
|
|
42
48
|
/**
|
|
43
49
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -49,5 +55,5 @@ export const standaloneMarkerNavigatorModule = new FeatureModule(
|
|
|
49
55
|
bindAsService(bind, TYPES.IContextMenuProvider, MarkerNavigatorContextMenuItemProvider);
|
|
50
56
|
bindAsService(bind, TYPES.KeyListener, MarkerNavigatorKeyListener);
|
|
51
57
|
},
|
|
52
|
-
{ requires: markerNavigatorModule }
|
|
58
|
+
{ featureId: Symbol('standaloneMarkerNavigator'), requires: markerNavigatorModule }
|
|
53
59
|
);
|
|
@@ -33,25 +33,28 @@ import { OriginViewportCommand } from './origin-viewport';
|
|
|
33
33
|
import { RepositionCommand } from './reposition';
|
|
34
34
|
import { RestoreViewportHandler } from './viewport-handler';
|
|
35
35
|
|
|
36
|
-
export const viewportModule = new FeatureModule(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
export const viewportModule = new FeatureModule(
|
|
37
|
+
(bind, _unbind, isBound) => {
|
|
38
|
+
const context = { bind, isBound };
|
|
39
|
+
configureCommand(context, CenterCommand);
|
|
40
|
+
configureCommand(context, FitToScreenCommand);
|
|
41
|
+
configureCommand(context, GetViewportCommand);
|
|
42
|
+
configureCommand(context, SetViewportCommand);
|
|
43
|
+
configureCommand(context, RepositionCommand);
|
|
44
|
+
configureCommand(context, OriginViewportCommand);
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
bindAsService(context, TYPES.MouseListener, ZoomMouseListener);
|
|
47
|
+
bindAsService(context, TYPES.MouseListener, GLSPScrollMouseListener);
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
configureActionHandler(context, EnableToolsAction.KIND, GLSPScrollMouseListener);
|
|
50
|
+
configureActionHandler(context, EnableDefaultToolsAction.KIND, GLSPScrollMouseListener);
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
52
|
+
bindAsService(context, TYPES.IDiagramStartup, RestoreViewportHandler);
|
|
53
|
+
configureActionHandler(context, EnableDefaultToolsAction.KIND, RestoreViewportHandler);
|
|
54
|
+
configureActionHandler(context, FocusDomAction.KIND, RestoreViewportHandler);
|
|
55
|
+
},
|
|
56
|
+
{ featureId: Symbol('viewport') }
|
|
57
|
+
);
|
|
55
58
|
|
|
56
59
|
/**
|
|
57
60
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -63,5 +66,5 @@ export const standaloneViewportModule = new FeatureModule(
|
|
|
63
66
|
const context = { bind, isBound };
|
|
64
67
|
bindAsService(context, TYPES.KeyListener, CenterKeyboardListener);
|
|
65
68
|
},
|
|
66
|
-
{ requires: viewportModule }
|
|
69
|
+
{ featureId: Symbol('standaloneViewport'), requires: viewportModule }
|
|
67
70
|
);
|
package/src/index.ts
CHANGED
|
@@ -67,7 +67,7 @@ export * from './features/accessibility/focus-tracker/focus-tracker-tool';
|
|
|
67
67
|
export * from './features/accessibility/global-keylistener-tool';
|
|
68
68
|
export * from './features/accessibility/key-shortcut/accessible-key-shortcut';
|
|
69
69
|
export * from './features/accessibility/key-shortcut/accessible-key-shortcut-tool';
|
|
70
|
-
export * from './features/accessibility/key-shortcut/
|
|
70
|
+
export * from './features/accessibility/key-shortcut/shortcut-help-module';
|
|
71
71
|
export * from './features/accessibility/keyboard-grid/action';
|
|
72
72
|
export * from './features/accessibility/keyboard-grid/constants';
|
|
73
73
|
export * from './features/accessibility/keyboard-grid/keyboard-grid';
|
|
@@ -42,15 +42,18 @@ import { undoRedoModule } from './features/undo-redo/undo-redo-module';
|
|
|
42
42
|
import { standaloneMarkerNavigatorModule } from './features/validation/validation-modules';
|
|
43
43
|
import { standaloneViewportModule } from './features/viewport/viewport-modules';
|
|
44
44
|
|
|
45
|
-
export const standaloneDefaultModule = new FeatureModule(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
export const standaloneDefaultModule = new FeatureModule(
|
|
46
|
+
(bind, unbind, isBound, rebind) => {
|
|
47
|
+
const context = { bind, unbind, isBound, rebind };
|
|
48
|
+
bind(FallbackActionHandler).toSelf().inSingletonScope();
|
|
49
|
+
configureActionHandler(context, MessageAction.KIND, FallbackActionHandler);
|
|
50
|
+
configureActionHandler(context, StartProgressAction.KIND, FallbackActionHandler);
|
|
51
|
+
configureActionHandler(context, UpdateProgressAction.KIND, FallbackActionHandler);
|
|
52
|
+
configureActionHandler(context, EndProgressAction.KIND, FallbackActionHandler);
|
|
53
|
+
bindAsService(context, TYPES.KeyListener, LayoutKeyListener);
|
|
54
|
+
},
|
|
55
|
+
{ featureId: Symbol('standaloneDefault') }
|
|
56
|
+
);
|
|
54
57
|
|
|
55
58
|
/**
|
|
56
59
|
* A fallback action handler for actions sent by features that are currently not supported by
|
|
@@ -53,10 +53,13 @@ import { GGraphView } from './ggraph-view';
|
|
|
53
53
|
import { GIssueMarkerView } from './issue-marker-view';
|
|
54
54
|
import { RoundedCornerNodeView } from './rounded-corner-view';
|
|
55
55
|
|
|
56
|
-
export const baseViewModule = new FeatureModule(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
export const baseViewModule = new FeatureModule(
|
|
57
|
+
(bind, unbind, isBound, rebind) => {
|
|
58
|
+
const context = { bind, unbind, isBound, rebind };
|
|
59
|
+
configureDefaultModelElements(context);
|
|
60
|
+
},
|
|
61
|
+
{ featureId: Symbol('baseView') }
|
|
62
|
+
);
|
|
60
63
|
|
|
61
64
|
export function configureDefaultModelElements(context: Pick<BindingContext, 'bind' | 'isBound'>): void {
|
|
62
65
|
// HTML elements
|
|
@@ -1 +0,0 @@
|
|
|
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,uBAAuB,CAAC;AACrG,OAAO,kCAAkC,CAAC;AAI1C;;GAEG;AACH,eAAO,MAAM,sBAAsB,iBAGjC,CAAC;AAEH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAIvE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/di.config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAA4C;AAC5C,mDAAqG;AACrG,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,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,YAAY,EAAE,wDAAyB,CAAC,CAAC;IACtE,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,YAAY,EAAE,gDAAsB,CAAC,CAAC;IACnE,IAAA,gCAAsB,EAAC,OAAO,EAAE,wDAA8B,CAAC,IAAI,EAAE,gDAAsB,CAAC,CAAC;AACjG,CAAC;AAJD,8DAIC"}
|