@eclipse-glsp/client 2.2.0-next.336 → 2.2.0-next.338
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/ghost-element.css +7 -0
- package/lib/base/default.module.js +4 -4
- package/lib/base/default.module.js.map +1 -1
- package/lib/base/drag-aware-mouse-listener.d.ts +5 -2
- package/lib/base/drag-aware-mouse-listener.d.ts.map +1 -1
- package/lib/base/drag-aware-mouse-listener.js +13 -3
- package/lib/base/drag-aware-mouse-listener.js.map +1 -1
- package/lib/base/feedback/feedback-action-dispatcher-default.d.ts +34 -0
- package/lib/base/feedback/feedback-action-dispatcher-default.d.ts.map +1 -0
- package/lib/base/feedback/feedback-action-dispatcher-default.js +120 -0
- package/lib/base/feedback/feedback-action-dispatcher-default.js.map +1 -0
- package/lib/base/feedback/feedback-action-dispatcher.d.ts +2 -17
- package/lib/base/feedback/feedback-action-dispatcher.d.ts.map +1 -1
- package/lib/base/feedback/feedback-action-dispatcher.js +1 -100
- package/lib/base/feedback/feedback-action-dispatcher.js.map +1 -1
- package/lib/base/feedback/{feeback-emitter.d.ts → feedback-emitter.d.ts} +8 -1
- package/lib/base/feedback/feedback-emitter.d.ts.map +1 -0
- package/lib/base/feedback/{feeback-emitter.js → feedback-emitter.js} +21 -6
- package/lib/base/feedback/feedback-emitter.js.map +1 -0
- package/lib/base/selection-service.d.ts +1 -1
- package/lib/base/selection-service.d.ts.map +1 -1
- package/lib/base/tool-manager/tool-manager.d.ts +1 -1
- package/lib/base/tool-manager/tool-manager.d.ts.map +1 -1
- package/lib/base/ui-extension/ui-extension-registry.d.ts +1 -1
- package/lib/base/ui-extension/ui-extension-registry.d.ts.map +1 -1
- package/lib/base/view/key-tool.d.ts +1 -1
- package/lib/base/view/key-tool.d.ts.map +1 -1
- package/lib/base/view/mouse-tool.d.ts +1 -1
- package/lib/base/view/mouse-tool.d.ts.map +1 -1
- package/lib/features/accessibility/move-zoom/move-handler.d.ts +2 -2
- package/lib/features/accessibility/move-zoom/move-handler.d.ts.map +1 -1
- package/lib/features/accessibility/move-zoom/move-handler.js +1 -1
- package/lib/features/accessibility/move-zoom/move-handler.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.d.ts +3 -3
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.js +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +3 -3
- 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 +4 -4
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
- package/lib/features/bounds/set-bounds-feedback-command.d.ts.map +1 -1
- package/lib/features/bounds/set-bounds-feedback-command.js +2 -2
- package/lib/features/bounds/set-bounds-feedback-command.js.map +1 -1
- package/lib/features/change-bounds/model.d.ts +7 -3
- package/lib/features/change-bounds/model.d.ts.map +1 -1
- package/lib/features/change-bounds/model.js +46 -20
- package/lib/features/change-bounds/model.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.d.ts +3 -2
- package/lib/features/change-bounds/movement-restrictor.d.ts.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js +9 -10
- package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
- package/lib/features/debug/debug-bounds-decorator.d.ts +1 -1
- package/lib/features/debug/debug-bounds-decorator.d.ts.map +1 -1
- package/lib/features/debug/debug-bounds-decorator.js +6 -6
- package/lib/features/debug/debug-bounds-decorator.js.map +1 -1
- package/lib/features/debug/debug-manager.d.ts +2 -1
- package/lib/features/debug/debug-manager.d.ts.map +1 -1
- package/lib/features/debug/debug-manager.js.map +1 -1
- package/lib/features/debug/debug-model.d.ts +1 -1
- package/lib/features/debug/debug-model.d.ts.map +1 -1
- package/lib/features/debug/debug-model.js +5 -5
- package/lib/features/debug/debug-model.js.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/element-template/mouse-tracking-element-position-listener.d.ts +8 -6
- package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts.map +1 -1
- package/lib/features/element-template/mouse-tracking-element-position-listener.js +14 -15
- package/lib/features/element-template/mouse-tracking-element-position-listener.js.map +1 -1
- package/lib/features/grid/grid-manager.d.ts +2 -1
- package/lib/features/grid/grid-manager.d.ts.map +1 -1
- package/lib/features/grid/grid-manager.js.map +1 -1
- package/lib/features/grid/grid-model.d.ts +1 -1
- package/lib/features/grid/grid-model.d.ts.map +1 -1
- package/lib/features/grid/grid-model.js +5 -5
- package/lib/features/grid/grid-model.js.map +1 -1
- package/lib/features/grid/grid-module.d.ts +1 -1
- package/lib/features/grid/grid-module.d.ts.map +1 -1
- package/lib/features/grid/grid-module.js +2 -2
- package/lib/features/grid/grid-module.js.map +1 -1
- package/lib/features/helper-lines/helper-line-feedback.d.ts +2 -2
- package/lib/features/helper-lines/helper-line-feedback.js +3 -3
- package/lib/features/helper-lines/helper-line-feedback.js.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.d.ts +16 -4
- package/lib/features/helper-lines/helper-line-manager-default.d.ts.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.js +56 -15
- package/lib/features/helper-lines/helper-line-manager-default.js.map +1 -1
- package/lib/features/hints/model.d.ts +6 -2
- package/lib/features/hints/model.d.ts.map +1 -1
- package/lib/features/hints/model.js.map +1 -1
- package/lib/features/hints/type-hint-provider.d.ts +1 -1
- package/lib/features/hints/type-hint-provider.d.ts.map +1 -1
- package/lib/features/hints/type-hint-provider.js.map +1 -1
- package/lib/features/select/select-mouse-listener.d.ts +3 -3
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js +6 -6
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts +3 -3
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +9 -9
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/tools/base-tools.d.ts +2 -2
- package/lib/features/tools/base-tools.d.ts.map +1 -1
- package/lib/features/tools/base-tools.js +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.d.ts +15 -7
- package/lib/features/tools/change-bounds/change-bounds-manager.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.js +51 -17
- package/lib/features/tools/change-bounds/change-bounds-manager.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js +3 -3
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts +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.d.ts +5 -5
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js +9 -12
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +4 -3
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool.js +13 -32
- package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts +11 -4
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.js +46 -28
- package/lib/features/tools/change-bounds/change-bounds-tracker.js.map +1 -1
- package/lib/features/tools/edge-creation/dangling-edge-feedback.d.ts +1 -1
- package/lib/features/tools/edge-creation/dangling-edge-feedback.js +3 -3
- package/lib/features/tools/edge-creation/dangling-edge-feedback.js.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool-feedback.d.ts +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool.d.ts +6 -3
- package/lib/features/tools/edge-creation/edge-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool.js +13 -11
- package/lib/features/tools/edge-creation/edge-creation-tool.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts +4 -3
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js +4 -4
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts +3 -3
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.js +4 -4
- package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts +2 -2
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.js +3 -3
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.js.map +1 -1
- package/lib/features/tools/node-creation/container-manager.d.ts +41 -0
- package/lib/features/tools/node-creation/container-manager.d.ts.map +1 -0
- package/lib/features/tools/node-creation/container-manager.js +73 -0
- package/lib/features/tools/node-creation/container-manager.js.map +1 -0
- package/lib/{base/ui-extension/index.d.ts → features/tools/node-creation/insert-indicator.d.ts} +15 -3
- package/lib/features/tools/node-creation/insert-indicator.d.ts.map +1 -0
- package/lib/features/tools/node-creation/insert-indicator.js +40 -0
- package/lib/features/tools/node-creation/insert-indicator.js.map +1 -0
- package/lib/features/tools/node-creation/node-creation-module.d.ts +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 +6 -1
- package/lib/features/tools/node-creation/node-creation-module.js.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.d.ts +26 -16
- package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.js +82 -78
- package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
- package/lib/features/{debug/index.d.ts → tools/node-creation/node-creation-views.d.ts} +10 -5
- package/lib/features/tools/node-creation/node-creation-views.d.ts.map +1 -0
- package/lib/features/tools/node-creation/node-creation-views.js +60 -0
- package/lib/features/tools/node-creation/node-creation-views.js.map +1 -0
- package/lib/features/validation/validate.d.ts +1 -1
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/features/viewport/viewport-handler.d.ts +1 -1
- package/lib/features/viewport/viewport-handler.d.ts.map +1 -1
- package/lib/features/viewport/viewport-handler.js +3 -3
- package/lib/features/viewport/viewport-handler.js.map +1 -1
- package/lib/index.d.ts +223 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +223 -5
- package/lib/index.js.map +1 -1
- package/lib/utils/gmodel-util.d.ts +2 -0
- package/lib/utils/gmodel-util.d.ts.map +1 -1
- package/lib/utils/gmodel-util.js.map +1 -1
- package/lib/views/ggraph-view.d.ts +1 -1
- package/lib/views/ggraph-view.d.ts.map +1 -1
- package/lib/views/ggraph-view.js +4 -4
- package/lib/views/ggraph-view.js.map +1 -1
- package/lib/views/glsp-projection-view.d.ts +2 -2
- package/lib/views/glsp-projection-view.d.ts.map +1 -1
- package/lib/views/glsp-projection-view.js +5 -5
- package/lib/views/glsp-projection-view.js.map +1 -1
- package/package.json +4 -4
- package/src/base/action-dispatcher.spec.ts +1 -1
- package/src/base/default.module.ts +2 -2
- package/src/base/drag-aware-mouse-listener.ts +18 -2
- package/src/base/feedback/feedback-action-dispatcher-default.ts +119 -0
- package/src/base/feedback/feedback-action-dispatcher.ts +2 -106
- package/src/base/feedback/feedback-emitter.spec.ts +176 -0
- package/src/base/feedback/{feeback-emitter.ts → feedback-emitter.ts} +24 -5
- package/src/base/selection-service.spec.ts +1 -1
- package/src/base/selection-service.ts +1 -1
- package/src/base/tool-manager/tool-manager.ts +1 -1
- package/src/base/ui-extension/ui-extension-registry.ts +1 -1
- package/src/base/view/key-tool.ts +1 -1
- package/src/base/view/mouse-tool.ts +1 -1
- package/src/features/accessibility/move-zoom/move-handler.ts +2 -2
- package/src/features/accessibility/resize-key-tool/resize-key-handler.ts +3 -3
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +4 -4
- package/src/features/bounds/set-bounds-feedback-command.ts +1 -1
- package/src/features/change-bounds/model.ts +41 -16
- package/src/features/change-bounds/movement-restrictor.ts +13 -13
- package/src/features/change-bounds/point-position-updater.spec.ts +1 -1
- package/src/features/debug/debug-bounds-decorator.tsx +8 -8
- package/src/features/debug/debug-manager.ts +2 -1
- package/src/features/debug/debug-model.ts +2 -2
- package/src/features/debug/debug-module.ts +1 -1
- package/src/features/element-template/mouse-tracking-element-position-listener.ts +17 -24
- package/src/features/grid/grid-manager.ts +2 -1
- package/src/features/grid/grid-model.ts +2 -2
- package/src/features/grid/grid-module.ts +3 -3
- package/src/features/helper-lines/helper-line-feedback.ts +1 -1
- package/src/features/helper-lines/helper-line-manager-default.ts +68 -12
- package/src/features/hints/model.ts +7 -2
- package/src/features/hints/type-hint-provider.spec.ts +3 -3
- package/src/features/hints/type-hint-provider.ts +1 -1
- package/src/features/select/select-mouse-listener.ts +6 -6
- package/src/features/tool-palette/tool-palette.ts +6 -7
- package/src/features/tools/base-tools.ts +2 -2
- package/src/features/tools/change-bounds/change-bounds-manager.ts +75 -17
- package/src/features/tools/change-bounds/change-bounds-tool-feedback.ts +5 -2
- package/src/features/tools/change-bounds/change-bounds-tool-module.ts +2 -2
- package/src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts +13 -11
- package/src/features/tools/change-bounds/change-bounds-tool.ts +12 -57
- package/src/features/tools/change-bounds/change-bounds-tracker.ts +29 -7
- package/src/features/tools/edge-creation/dangling-edge-feedback.ts +2 -2
- package/src/features/tools/edge-creation/edge-creation-tool-feedback.ts +1 -1
- package/src/features/tools/edge-creation/edge-creation-tool.ts +15 -8
- package/src/features/tools/edge-edit/edge-edit-tool-feedback.ts +4 -3
- package/src/features/tools/edge-edit/edge-edit-tool.ts +4 -5
- package/src/features/tools/marquee-selection/marquee-mouse-tool.ts +2 -2
- package/src/features/tools/node-creation/container-manager.ts +76 -0
- package/src/features/tools/node-creation/insert-indicator.ts +41 -0
- package/src/features/tools/node-creation/node-creation-module.ts +14 -2
- package/src/features/tools/node-creation/node-creation-tool.ts +101 -92
- package/src/features/tools/node-creation/node-creation-views.tsx +49 -0
- package/src/features/validation/validate.ts +1 -1
- package/src/features/viewport/viewport-handler.ts +1 -1
- package/src/index.ts +223 -5
- package/src/utils/gmodel-util.ts +4 -1
- package/src/views/ggraph-view.tsx +4 -4
- package/src/views/glsp-projection-view.tsx +4 -5
- package/lib/base/auto-complete/index.d.ts +0 -21
- package/lib/base/auto-complete/index.d.ts.map +0 -1
- package/lib/base/auto-complete/index.js +0 -37
- package/lib/base/auto-complete/index.js.map +0 -1
- package/lib/base/feedback/feeback-emitter.d.ts.map +0 -1
- package/lib/base/feedback/feeback-emitter.js.map +0 -1
- package/lib/base/feedback/index.d.ts +0 -22
- package/lib/base/feedback/index.d.ts.map +0 -1
- package/lib/base/feedback/index.js +0 -38
- package/lib/base/feedback/index.js.map +0 -1
- package/lib/base/focus/index.d.ts +0 -18
- package/lib/base/focus/index.d.ts.map +0 -1
- package/lib/base/focus/index.js +0 -34
- package/lib/base/focus/index.js.map +0 -1
- package/lib/base/index.d.ts +0 -34
- package/lib/base/index.d.ts.map +0 -1
- package/lib/base/index.js +0 -50
- package/lib/base/index.js.map +0 -1
- package/lib/base/model/index.d.ts +0 -20
- package/lib/base/model/index.d.ts.map +0 -1
- package/lib/base/model/index.js +0 -36
- package/lib/base/model/index.js.map +0 -1
- package/lib/base/tool-manager/index.d.ts +0 -18
- package/lib/base/tool-manager/index.d.ts.map +0 -1
- package/lib/base/tool-manager/index.js +0 -34
- package/lib/base/tool-manager/index.js.map +0 -1
- package/lib/base/ui-extension/index.d.ts.map +0 -1
- package/lib/base/ui-extension/index.js +0 -34
- package/lib/base/ui-extension/index.js.map +0 -1
- package/lib/base/view/index.d.ts +0 -19
- package/lib/base/view/index.d.ts.map +0 -1
- package/lib/base/view/index.js +0 -35
- package/lib/base/view/index.js.map +0 -1
- package/lib/features/accessibility/edge-autocomplete/index.d.ts +0 -20
- package/lib/features/accessibility/edge-autocomplete/index.d.ts.map +0 -1
- package/lib/features/accessibility/edge-autocomplete/index.js +0 -36
- package/lib/features/accessibility/edge-autocomplete/index.js.map +0 -1
- package/lib/features/accessibility/element-navigation/index.d.ts +0 -22
- package/lib/features/accessibility/element-navigation/index.d.ts.map +0 -1
- package/lib/features/accessibility/element-navigation/index.js +0 -38
- package/lib/features/accessibility/element-navigation/index.js.map +0 -1
- package/lib/features/accessibility/focus-tracker/index.d.ts +0 -18
- package/lib/features/accessibility/focus-tracker/index.d.ts.map +0 -1
- package/lib/features/accessibility/focus-tracker/index.js +0 -34
- package/lib/features/accessibility/focus-tracker/index.js.map +0 -1
- package/lib/features/accessibility/index.d.ts +0 -31
- package/lib/features/accessibility/index.d.ts.map +0 -1
- package/lib/features/accessibility/index.js +0 -47
- package/lib/features/accessibility/index.js.map +0 -1
- package/lib/features/accessibility/key-shortcut/index.d.ts +0 -19
- package/lib/features/accessibility/key-shortcut/index.d.ts.map +0 -1
- package/lib/features/accessibility/key-shortcut/index.js +0 -35
- package/lib/features/accessibility/key-shortcut/index.js.map +0 -1
- package/lib/features/accessibility/keyboard-grid/index.d.ts +0 -21
- package/lib/features/accessibility/keyboard-grid/index.d.ts.map +0 -1
- package/lib/features/accessibility/keyboard-grid/index.js +0 -37
- package/lib/features/accessibility/keyboard-grid/index.js.map +0 -1
- package/lib/features/accessibility/keyboard-pointer/index.d.ts +0 -22
- package/lib/features/accessibility/keyboard-pointer/index.d.ts.map +0 -1
- package/lib/features/accessibility/keyboard-pointer/index.js +0 -38
- package/lib/features/accessibility/keyboard-pointer/index.js.map +0 -1
- package/lib/features/accessibility/keyboard-tool-palette/index.d.ts +0 -18
- package/lib/features/accessibility/keyboard-tool-palette/index.d.ts.map +0 -1
- package/lib/features/accessibility/keyboard-tool-palette/index.js +0 -34
- package/lib/features/accessibility/keyboard-tool-palette/index.js.map +0 -1
- package/lib/features/accessibility/move-zoom/index.d.ts +0 -19
- package/lib/features/accessibility/move-zoom/index.d.ts.map +0 -1
- package/lib/features/accessibility/move-zoom/index.js +0 -35
- package/lib/features/accessibility/move-zoom/index.js.map +0 -1
- package/lib/features/accessibility/resize-key-tool/index.d.ts +0 -19
- package/lib/features/accessibility/resize-key-tool/index.d.ts.map +0 -1
- package/lib/features/accessibility/resize-key-tool/index.js +0 -35
- package/lib/features/accessibility/resize-key-tool/index.js.map +0 -1
- package/lib/features/accessibility/search/index.d.ts +0 -19
- package/lib/features/accessibility/search/index.d.ts.map +0 -1
- package/lib/features/accessibility/search/index.js +0 -35
- package/lib/features/accessibility/search/index.js.map +0 -1
- package/lib/features/accessibility/toast/index.d.ts +0 -19
- package/lib/features/accessibility/toast/index.d.ts.map +0 -1
- package/lib/features/accessibility/toast/index.js +0 -35
- package/lib/features/accessibility/toast/index.js.map +0 -1
- package/lib/features/accessibility/view-key-tools/index.d.ts +0 -20
- package/lib/features/accessibility/view-key-tools/index.d.ts.map +0 -1
- package/lib/features/accessibility/view-key-tools/index.js +0 -36
- package/lib/features/accessibility/view-key-tools/index.js.map +0 -1
- package/lib/features/bounds/index.d.ts +0 -25
- package/lib/features/bounds/index.d.ts.map +0 -1
- package/lib/features/bounds/index.js +0 -41
- package/lib/features/bounds/index.js.map +0 -1
- package/lib/features/change-bounds/index.d.ts +0 -22
- package/lib/features/change-bounds/index.d.ts.map +0 -1
- package/lib/features/change-bounds/index.js +0 -38
- package/lib/features/change-bounds/index.js.map +0 -1
- package/lib/features/command-palette/index.d.ts +0 -20
- package/lib/features/command-palette/index.d.ts.map +0 -1
- package/lib/features/command-palette/index.js +0 -36
- package/lib/features/command-palette/index.js.map +0 -1
- package/lib/features/context-menu/index.d.ts +0 -20
- package/lib/features/context-menu/index.d.ts.map +0 -1
- package/lib/features/context-menu/index.js +0 -36
- package/lib/features/context-menu/index.js.map +0 -1
- package/lib/features/copy-paste/index.d.ts +0 -20
- package/lib/features/copy-paste/index.d.ts.map +0 -1
- package/lib/features/copy-paste/index.js +0 -36
- package/lib/features/copy-paste/index.js.map +0 -1
- package/lib/features/debug/index.d.ts.map +0 -1
- package/lib/features/debug/index.js +0 -36
- package/lib/features/debug/index.js.map +0 -1
- package/lib/features/decoration/index.d.ts +0 -18
- package/lib/features/decoration/index.d.ts.map +0 -1
- package/lib/features/decoration/index.js +0 -34
- package/lib/features/decoration/index.js.map +0 -1
- package/lib/features/element-template/index.d.ts +0 -20
- package/lib/features/element-template/index.d.ts.map +0 -1
- package/lib/features/element-template/index.js +0 -36
- package/lib/features/element-template/index.js.map +0 -1
- package/lib/features/export/index.d.ts +0 -19
- package/lib/features/export/index.d.ts.map +0 -1
- package/lib/features/export/index.js +0 -35
- package/lib/features/export/index.js.map +0 -1
- package/lib/features/grid/index.d.ts +0 -21
- package/lib/features/grid/index.d.ts.map +0 -1
- package/lib/features/grid/index.js +0 -37
- package/lib/features/grid/index.js.map +0 -1
- package/lib/features/helper-lines/index.d.ts +0 -22
- package/lib/features/helper-lines/index.d.ts.map +0 -1
- package/lib/features/helper-lines/index.js +0 -38
- package/lib/features/helper-lines/index.js.map +0 -1
- package/lib/features/hints/index.d.ts +0 -19
- package/lib/features/hints/index.d.ts.map +0 -1
- package/lib/features/hints/index.js +0 -35
- package/lib/features/hints/index.js.map +0 -1
- package/lib/features/hover/index.d.ts +0 -18
- package/lib/features/hover/index.d.ts.map +0 -1
- package/lib/features/hover/index.js +0 -34
- package/lib/features/hover/index.js.map +0 -1
- package/lib/features/index.d.ts +0 -46
- package/lib/features/index.d.ts.map +0 -1
- package/lib/features/index.js +0 -62
- package/lib/features/index.js.map +0 -1
- package/lib/features/label-edit/index.d.ts +0 -19
- package/lib/features/label-edit/index.d.ts.map +0 -1
- package/lib/features/label-edit/index.js +0 -35
- package/lib/features/label-edit/index.js.map +0 -1
- package/lib/features/label-edit-ui/index.d.ts +0 -18
- package/lib/features/label-edit-ui/index.d.ts.map +0 -1
- package/lib/features/label-edit-ui/index.js +0 -34
- package/lib/features/label-edit-ui/index.js.map +0 -1
- package/lib/features/layout/index.d.ts +0 -18
- package/lib/features/layout/index.d.ts.map +0 -1
- package/lib/features/layout/index.js +0 -34
- package/lib/features/layout/index.js.map +0 -1
- package/lib/features/navigation/index.d.ts +0 -19
- package/lib/features/navigation/index.d.ts.map +0 -1
- package/lib/features/navigation/index.js +0 -35
- package/lib/features/navigation/index.js.map +0 -1
- package/lib/features/reconnect/index.d.ts +0 -17
- package/lib/features/reconnect/index.d.ts.map +0 -1
- package/lib/features/reconnect/index.js +0 -33
- package/lib/features/reconnect/index.js.map +0 -1
- package/lib/features/routing/index.d.ts +0 -18
- package/lib/features/routing/index.d.ts.map +0 -1
- package/lib/features/routing/index.js +0 -34
- package/lib/features/routing/index.js.map +0 -1
- package/lib/features/save/index.d.ts +0 -18
- package/lib/features/save/index.d.ts.map +0 -1
- package/lib/features/save/index.js +0 -34
- package/lib/features/save/index.js.map +0 -1
- package/lib/features/select/index.d.ts +0 -19
- package/lib/features/select/index.d.ts.map +0 -1
- package/lib/features/select/index.js +0 -35
- package/lib/features/select/index.js.map +0 -1
- package/lib/features/source-model-watcher/index.d.ts +0 -18
- package/lib/features/source-model-watcher/index.d.ts.map +0 -1
- package/lib/features/source-model-watcher/index.js +0 -34
- package/lib/features/source-model-watcher/index.js.map +0 -1
- package/lib/features/status/index.d.ts +0 -18
- package/lib/features/status/index.d.ts.map +0 -1
- package/lib/features/status/index.js +0 -34
- package/lib/features/status/index.js.map +0 -1
- package/lib/features/svg-metadata/index.d.ts +0 -18
- package/lib/features/svg-metadata/index.d.ts.map +0 -1
- package/lib/features/svg-metadata/index.js +0 -34
- package/lib/features/svg-metadata/index.js.map +0 -1
- package/lib/features/tool-palette/index.d.ts +0 -18
- package/lib/features/tool-palette/index.d.ts.map +0 -1
- package/lib/features/tool-palette/index.js +0 -34
- package/lib/features/tool-palette/index.js.map +0 -1
- package/lib/features/tools/change-bounds/index.d.ts +0 -23
- package/lib/features/tools/change-bounds/index.d.ts.map +0 -1
- package/lib/features/tools/change-bounds/index.js +0 -39
- package/lib/features/tools/change-bounds/index.js.map +0 -1
- package/lib/features/tools/deletion/index.d.ts +0 -18
- package/lib/features/tools/deletion/index.d.ts.map +0 -1
- package/lib/features/tools/deletion/index.js +0 -34
- package/lib/features/tools/deletion/index.js.map +0 -1
- package/lib/features/tools/edge-creation/index.d.ts +0 -21
- package/lib/features/tools/edge-creation/index.d.ts.map +0 -1
- package/lib/features/tools/edge-creation/index.js +0 -37
- package/lib/features/tools/edge-creation/index.js.map +0 -1
- package/lib/features/tools/edge-edit/index.d.ts +0 -19
- package/lib/features/tools/edge-edit/index.d.ts.map +0 -1
- package/lib/features/tools/edge-edit/index.js +0 -35
- package/lib/features/tools/edge-edit/index.js.map +0 -1
- package/lib/features/tools/index.d.ts +0 -24
- package/lib/features/tools/index.d.ts.map +0 -1
- package/lib/features/tools/index.js +0 -40
- package/lib/features/tools/index.js.map +0 -1
- package/lib/features/tools/marquee-selection/index.d.ts +0 -23
- package/lib/features/tools/marquee-selection/index.d.ts.map +0 -1
- package/lib/features/tools/marquee-selection/index.js +0 -39
- package/lib/features/tools/marquee-selection/index.js.map +0 -1
- package/lib/features/tools/node-creation/index.d.ts +0 -18
- package/lib/features/tools/node-creation/index.d.ts.map +0 -1
- package/lib/features/tools/node-creation/index.js +0 -34
- package/lib/features/tools/node-creation/index.js.map +0 -1
- package/lib/features/undo-redo/index.d.ts +0 -18
- package/lib/features/undo-redo/index.d.ts.map +0 -1
- package/lib/features/undo-redo/index.js +0 -34
- package/lib/features/undo-redo/index.js.map +0 -1
- package/lib/features/validation/index.d.ts +0 -20
- package/lib/features/validation/index.d.ts.map +0 -1
- package/lib/features/validation/index.js +0 -36
- package/lib/features/validation/index.js.map +0 -1
- package/lib/features/viewport/index.d.ts +0 -21
- package/lib/features/viewport/index.d.ts.map +0 -1
- package/lib/features/viewport/index.js +0 -37
- package/lib/features/viewport/index.js.map +0 -1
- package/lib/utils/index.d.ts +0 -23
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -39
- package/lib/utils/index.js.map +0 -1
- package/lib/views/index.d.ts +0 -24
- package/lib/views/index.d.ts.map +0 -1
- package/lib/views/index.js +0 -40
- package/lib/views/index.js.map +0 -1
- package/src/base/auto-complete/index.ts +0 -20
- package/src/base/feedback/index.ts +0 -21
- package/src/base/focus/index.ts +0 -17
- package/src/base/index.ts +0 -33
- package/src/base/model/index.ts +0 -19
- package/src/base/tool-manager/index.ts +0 -17
- package/src/base/ui-extension/index.ts +0 -17
- package/src/base/view/index.ts +0 -18
- package/src/features/accessibility/edge-autocomplete/index.ts +0 -19
- package/src/features/accessibility/element-navigation/index.ts +0 -21
- package/src/features/accessibility/focus-tracker/index.ts +0 -17
- package/src/features/accessibility/index.ts +0 -30
- package/src/features/accessibility/key-shortcut/index.ts +0 -18
- package/src/features/accessibility/keyboard-grid/index.ts +0 -20
- package/src/features/accessibility/keyboard-pointer/index.ts +0 -21
- package/src/features/accessibility/keyboard-tool-palette/index.ts +0 -17
- package/src/features/accessibility/move-zoom/index.ts +0 -18
- package/src/features/accessibility/resize-key-tool/index.ts +0 -18
- package/src/features/accessibility/search/index.ts +0 -18
- package/src/features/accessibility/toast/index.ts +0 -18
- package/src/features/accessibility/view-key-tools/index.ts +0 -19
- package/src/features/bounds/index.ts +0 -24
- package/src/features/change-bounds/index.ts +0 -21
- package/src/features/command-palette/index.ts +0 -19
- package/src/features/context-menu/index.ts +0 -19
- package/src/features/copy-paste/index.ts +0 -19
- package/src/features/debug/index.ts +0 -19
- package/src/features/decoration/index.ts +0 -17
- package/src/features/element-template/index.ts +0 -19
- package/src/features/export/index.ts +0 -18
- package/src/features/grid/index.ts +0 -20
- package/src/features/helper-lines/index.ts +0 -21
- package/src/features/hints/index.ts +0 -18
- package/src/features/hover/index.ts +0 -17
- package/src/features/index.ts +0 -45
- package/src/features/label-edit/index.ts +0 -18
- package/src/features/label-edit-ui/index.ts +0 -17
- package/src/features/layout/index.ts +0 -17
- package/src/features/navigation/index.ts +0 -18
- package/src/features/reconnect/index.ts +0 -16
- package/src/features/routing/index.ts +0 -17
- package/src/features/save/index.ts +0 -17
- package/src/features/select/index.ts +0 -18
- package/src/features/source-model-watcher/index.ts +0 -17
- package/src/features/status/index.ts +0 -17
- package/src/features/svg-metadata/index.ts +0 -17
- package/src/features/tool-palette/index.ts +0 -17
- package/src/features/tools/change-bounds/index.ts +0 -22
- package/src/features/tools/deletion/index.ts +0 -17
- package/src/features/tools/edge-creation/index.ts +0 -20
- package/src/features/tools/edge-edit/index.ts +0 -18
- package/src/features/tools/index.ts +0 -23
- package/src/features/tools/marquee-selection/index.ts +0 -22
- package/src/features/tools/node-creation/index.ts +0 -17
- package/src/features/undo-redo/index.ts +0 -17
- package/src/features/validation/index.ts +0 -19
- package/src/features/viewport/index.ts +0 -20
- package/src/utils/index.ts +0 -22
- package/src/views/index.ts +0 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ggraph-view.d.ts","sourceRoot":"","sources":["../../src/views/ggraph-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAoB,gBAAgB,EAAE,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ggraph-view.d.ts","sourceRoot":"","sources":["../../src/views/ggraph-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAoB,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAErH,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEvE,qBACa,UAAW,SAAQ,UAAU;IACL,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAE5D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK;IAQ9E,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS;IAazF,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC;IAMpI,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM;CAIzH"}
|
package/lib/views/ggraph-view.js
CHANGED
|
@@ -27,7 +27,7 @@ exports.GGraphView = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
-
const
|
|
30
|
+
const grid_manager_1 = require("../features/grid/grid-manager");
|
|
31
31
|
let GGraphView = class GGraphView extends sprotty_1.SGraphView {
|
|
32
32
|
render(model, context) {
|
|
33
33
|
const graph = super.render(model, context);
|
|
@@ -38,7 +38,7 @@ let GGraphView = class GGraphView extends sprotty_1.SGraphView {
|
|
|
38
38
|
}
|
|
39
39
|
getGridStyle(model, context) {
|
|
40
40
|
var _a;
|
|
41
|
-
if (!((_a = this.gridManager) === null || _a === void 0 ? void 0 : _a.isGridVisible)) {
|
|
41
|
+
if (context.targetKind === 'hidden' || !((_a = this.gridManager) === null || _a === void 0 ? void 0 : _a.isGridVisible)) {
|
|
42
42
|
return {};
|
|
43
43
|
}
|
|
44
44
|
const bounds = this.getBackgroundBounds(model, context, this.gridManager);
|
|
@@ -61,9 +61,9 @@ let GGraphView = class GGraphView extends sprotty_1.SGraphView {
|
|
|
61
61
|
};
|
|
62
62
|
exports.GGraphView = GGraphView;
|
|
63
63
|
__decorate([
|
|
64
|
-
(0, inversify_1.inject)(
|
|
64
|
+
(0, inversify_1.inject)(grid_manager_1.GridManager),
|
|
65
65
|
(0, inversify_1.optional)(),
|
|
66
|
-
__metadata("design:type",
|
|
66
|
+
__metadata("design:type", grid_manager_1.GridManager)
|
|
67
67
|
], GGraphView.prototype, "gridManager", void 0);
|
|
68
68
|
exports.GGraphView = GGraphView = __decorate([
|
|
69
69
|
(0, inversify_1.injectable)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ggraph-view.js","sourceRoot":"","sources":["../../src/views/ggraph-view.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"ggraph-view.js","sourceRoot":"","sources":["../../src/views/ggraph-view.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAqH;AACrH,yCAAyD;AAEzD,gEAAuE;AAGhE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,oBAAU;IAG7B,MAAM,CAAC,KAA2B,EAAE,OAAyB;QAClE,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,KAAK,CAA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EAAE,WAAwB;QACzG,mCAAmC;QACnC,OAAO,sFAAsF,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,kBAAkB,WAAW,CAAC,IAAI,CAAC,CAAC,aAAa,WAAW,CAAC,IAAI,CAAC,CAAC,4FAA4F,CAAC;IACzS,CAAC;CACJ,CAAA;AAlCY,gCAAU;AACwB;IAA1C,IAAA,kBAAM,EAAC,0BAAW,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAAyB,0BAAW;+CAAC;qBAD5D,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CAkCtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2017-
|
|
2
|
+
* Copyright (c) 2017-2024 TypeFox 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,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Bounds, EdgeRouterRegistry, GViewportRootElement, IViewArgs, ProjectedViewportView, ProjectionParams, RenderingContext, SGraphImpl, ViewProjection, Writable } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { VNode } from 'snabbdom';
|
|
18
|
-
import { GridManager, GridStyle } from '../features';
|
|
18
|
+
import { GridManager, GridStyle } from '../features/grid/grid-manager';
|
|
19
19
|
/**
|
|
20
20
|
* Special viewport root view that renders horizontal and vertical projection bars for quick navigation.
|
|
21
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-projection-view.d.ts","sourceRoot":"","sources":["../../src/views/glsp-projection-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,MAAM,EAEN,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EAET,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,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AAE,EAC7B,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EACrC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,YAAY,GAAG,UAAU,GACvC,KAAK;cAoBW,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,EAAE,gBAAgB,GAAG,KAAK;cAsCtF,gBAAgB,CAC/B,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EACrC,MAAM,EAAE,gBAAgB,GACzB,KAAK;CA+CX"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2017-
|
|
3
|
+
* Copyright (c) 2017-2024 TypeFox and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -28,7 +28,7 @@ exports.GLSPProjectionView = void 0;
|
|
|
28
28
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
30
|
const snabbdom_1 = require("snabbdom");
|
|
31
|
-
const
|
|
31
|
+
const grid_manager_1 = require("../features/grid/grid-manager");
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
33
|
const JSX = { createElement: sprotty_1.html };
|
|
34
34
|
/**
|
|
@@ -52,7 +52,7 @@ let GLSPProjectionView = class GLSPProjectionView extends sprotty_1.ProjectedVie
|
|
|
52
52
|
}
|
|
53
53
|
getGridStyle(model, context) {
|
|
54
54
|
var _a;
|
|
55
|
-
if (!((_a = this.gridManager) === null || _a === void 0 ? void 0 : _a.isGridVisible)) {
|
|
55
|
+
if (context.targetKind === 'hidden' || !((_a = this.gridManager) === null || _a === void 0 ? void 0 : _a.isGridVisible)) {
|
|
56
56
|
return {};
|
|
57
57
|
}
|
|
58
58
|
const bounds = this.getBackgroundBounds(model, context, this.gridManager);
|
|
@@ -171,9 +171,9 @@ __decorate([
|
|
|
171
171
|
__metadata("design:type", sprotty_1.EdgeRouterRegistry)
|
|
172
172
|
], GLSPProjectionView.prototype, "edgeRouterRegistry", void 0);
|
|
173
173
|
__decorate([
|
|
174
|
-
(0, inversify_1.inject)(
|
|
174
|
+
(0, inversify_1.inject)(grid_manager_1.GridManager),
|
|
175
175
|
(0, inversify_1.optional)(),
|
|
176
|
-
__metadata("design:type",
|
|
176
|
+
__metadata("design:type", grid_manager_1.GridManager)
|
|
177
177
|
], GLSPProjectionView.prototype, "gridManager", void 0);
|
|
178
178
|
exports.GLSPProjectionView = GLSPProjectionView = __decorate([
|
|
179
179
|
(0, inversify_1.injectable)()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-projection-view.js","sourceRoot":"","sources":["../../src/views/glsp-projection-view.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,
|
|
1
|
+
{"version":3,"file":"glsp-projection-view.js","sourceRoot":"","sources":["../../src/views/glsp-projection-view.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,mDAgB+B;AAC/B,yCAAyD;AACzD,uCAAgD;AAChD,gEAAuE;AAEvE,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,cAAI,EAAE,CAAC;AAEpC;;GAEG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,+BAAqB;IAIhD,MAAM,CAAC,KAAqC,EAAE,OAAyB,EAAE,IAAgB;QAC9F,MAAM,QAAQ,GAAU,CACpB,kDAA0B,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;YACpE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC;YACpC,IAAI,CAAC,iBAAiB,CAAC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AC,CAAC;QAChE,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAvKY,gDAAkB;AACC;IAA3B,IAAA,kBAAM,EAAC,4BAAkB,CAAC;8BAAqB,4BAAkB;8DAAC;AACxB;IAA1C,IAAA,kBAAM,EAAC,0BAAW,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAAyB,0BAAW;uDAAC;6BAF5D,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAuK9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/client",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.338+379f507",
|
|
4
4
|
"description": "A sprotty-based client for GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsc -b",
|
|
40
40
|
"clean": "rimraf lib *.tsbuildinfo coverage .nyc_output",
|
|
41
|
-
"generate:index": "glsp generateIndex src -f",
|
|
41
|
+
"generate:index": "glsp generateIndex src -f -s",
|
|
42
42
|
"lint": "eslint --ext .ts,.tsx ./src",
|
|
43
43
|
"test": "mocha --config ../../.mocharc \"./src/**/*.spec.?(ts|tsx)\"",
|
|
44
44
|
"test:ci": "export JUNIT_REPORT_PATH=./report.xml && yarn test --reporter mocha-jenkins-reporter",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"watch": "tsc -w"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@eclipse-glsp/sprotty": "2.2.0-next.
|
|
49
|
+
"@eclipse-glsp/sprotty": "2.2.0-next.338+379f507",
|
|
50
50
|
"autocompleter": "^9.1.0",
|
|
51
51
|
"file-saver": "^2.0.5",
|
|
52
52
|
"lodash": "4.17.21"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "379f50764c02e73d255e8692f52f9be09e7bab67"
|
|
65
65
|
}
|
|
@@ -19,7 +19,7 @@ import { Container } from 'inversify';
|
|
|
19
19
|
|
|
20
20
|
import { GLSPActionDispatcher } from './action-dispatcher';
|
|
21
21
|
import { defaultModule } from './default.module';
|
|
22
|
-
import { IDiagramOptions } from './model';
|
|
22
|
+
import { IDiagramOptions } from './model/diagram-loader';
|
|
23
23
|
|
|
24
24
|
const container = new Container();
|
|
25
25
|
container.load(defaultModule);
|
|
@@ -38,9 +38,9 @@ import { GLSPActionDispatcher } from './action-dispatcher';
|
|
|
38
38
|
import { GLSPActionHandlerRegistry } from './action-handler-registry';
|
|
39
39
|
import { GLSPCommandStack } from './command-stack';
|
|
40
40
|
import { EditorContextService } from './editor-context-service';
|
|
41
|
-
import { FeedbackAwareSetModelCommand } from './feedback';
|
|
42
41
|
import { ModifyCssFeedbackCommand } from './feedback/css-feedback';
|
|
43
|
-
import { FeedbackActionDispatcher } from './feedback/feedback-action-dispatcher';
|
|
42
|
+
import { FeedbackActionDispatcher } from './feedback/feedback-action-dispatcher-default';
|
|
43
|
+
import { FeedbackAwareSetModelCommand } from './feedback/set-model-command';
|
|
44
44
|
import { FeedbackAwareUpdateModelCommand } from './feedback/update-model-command';
|
|
45
45
|
import { FocusStateChangedAction } from './focus/focus-state-change-action';
|
|
46
46
|
import { FocusTracker } from './focus/focus-tracker';
|
|
@@ -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
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Action, Disposable, GModelElement, MouseListener } from '@eclipse-glsp/sprotty';
|
|
16
|
+
import { Action, Disposable, GModelElement, MouseListener, Point } from '@eclipse-glsp/sprotty';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* A mouse listener that is aware of prior mouse dragging.
|
|
@@ -27,13 +27,28 @@ export class DragAwareMouseListener extends MouseListener implements Disposable
|
|
|
27
27
|
protected _isMouseDown = false;
|
|
28
28
|
protected _isMouseDrag = false;
|
|
29
29
|
|
|
30
|
+
protected _dragStart?: Point;
|
|
31
|
+
protected _dragSensitivity = 0;
|
|
32
|
+
|
|
33
|
+
constructor(dragSensitivity = 0) {
|
|
34
|
+
super();
|
|
35
|
+
this._dragSensitivity = dragSensitivity;
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
override mouseDown(target: GModelElement, event: MouseEvent): Action[] {
|
|
31
39
|
this._isMouseDown = true;
|
|
40
|
+
this._dragStart = this._dragSensitivity > 0 ? { x: event.clientX, y: event.clientY } : undefined;
|
|
32
41
|
return [];
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
override mouseMove(target: GModelElement, event: MouseEvent): Action[] {
|
|
36
45
|
if (this._isMouseDown) {
|
|
46
|
+
if (this._dragStart) {
|
|
47
|
+
const dragDistance = Point.maxDistance(this._dragStart, { x: event.clientX, y: event.clientY });
|
|
48
|
+
if (dragDistance < this._dragSensitivity) {
|
|
49
|
+
return this.nonDraggingMouseMove(target, event);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
37
52
|
this._isMouseDrag = true;
|
|
38
53
|
return this.draggingMouseMove(target, event);
|
|
39
54
|
}
|
|
@@ -50,6 +65,7 @@ export class DragAwareMouseListener extends MouseListener implements Disposable
|
|
|
50
65
|
|
|
51
66
|
override mouseUp(element: GModelElement, event: MouseEvent): Action[] {
|
|
52
67
|
this._isMouseDown = false;
|
|
68
|
+
this._dragStart = undefined;
|
|
53
69
|
if (this._isMouseDrag) {
|
|
54
70
|
this._isMouseDrag = false;
|
|
55
71
|
return this.draggingMouseUp(element, event);
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2019-2024 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 {
|
|
17
|
+
Action,
|
|
18
|
+
ActionHandlerRegistry,
|
|
19
|
+
Command,
|
|
20
|
+
CommandActionHandler,
|
|
21
|
+
CommandExecutionContext,
|
|
22
|
+
Disposable,
|
|
23
|
+
GModelElement,
|
|
24
|
+
IActionDispatcher,
|
|
25
|
+
ICommand,
|
|
26
|
+
ILogger,
|
|
27
|
+
TYPES,
|
|
28
|
+
toTypeGuard
|
|
29
|
+
} from '@eclipse-glsp/sprotty';
|
|
30
|
+
import { inject, injectable } from 'inversify';
|
|
31
|
+
import { getFeedbackRank } from './feedback-command';
|
|
32
|
+
import { FeedbackEmitter } from './feedback-emitter';
|
|
33
|
+
import { IFeedbackActionDispatcher, IFeedbackEmitter, MaybeActions } from './feedback-action-dispatcher';
|
|
34
|
+
|
|
35
|
+
@injectable()
|
|
36
|
+
export class FeedbackActionDispatcher implements IFeedbackActionDispatcher {
|
|
37
|
+
protected registeredFeedback: Map<IFeedbackEmitter, Action[]> = new Map();
|
|
38
|
+
|
|
39
|
+
@inject(TYPES.IActionDispatcherProvider) protected actionDispatcher: () => Promise<IActionDispatcher>;
|
|
40
|
+
@inject(TYPES.ILogger) protected logger: ILogger;
|
|
41
|
+
|
|
42
|
+
@inject(ActionHandlerRegistry) protected actionHandlerRegistry: ActionHandlerRegistry;
|
|
43
|
+
|
|
44
|
+
registerFeedback(feedbackEmitter: IFeedbackEmitter, feedbackActions: Action[], cleanupActions?: MaybeActions): Disposable {
|
|
45
|
+
if (feedbackEmitter instanceof GModelElement) {
|
|
46
|
+
this.logger.log(
|
|
47
|
+
this,
|
|
48
|
+
// eslint-disable-next-line max-len
|
|
49
|
+
'GModelElements as feedback emitters are discouraged, as they usually change between model updates and are considered unstable.'
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
if (feedbackActions.length > 0) {
|
|
53
|
+
this.registeredFeedback.set(feedbackEmitter, feedbackActions);
|
|
54
|
+
this.dispatchFeedback(feedbackActions, feedbackEmitter);
|
|
55
|
+
}
|
|
56
|
+
return Disposable.create(() => this.deregisterFeedback(feedbackEmitter, cleanupActions));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
deregisterFeedback(feedbackEmitter: IFeedbackEmitter, cleanupActions?: MaybeActions): void {
|
|
60
|
+
this.registeredFeedback.delete(feedbackEmitter);
|
|
61
|
+
const actions = MaybeActions.asArray(cleanupActions);
|
|
62
|
+
if (actions.length > 0) {
|
|
63
|
+
this.dispatchFeedback(actions, feedbackEmitter);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
getRegisteredFeedback(): Action[] {
|
|
68
|
+
const result: Action[] = [];
|
|
69
|
+
this.registeredFeedback.forEach(actions => result.push(...actions));
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
getRegisteredFeedbackEmitters(action: Action): IFeedbackEmitter[] {
|
|
74
|
+
const result: IFeedbackEmitter[] = [];
|
|
75
|
+
this.registeredFeedback.forEach((actions, emitter) => {
|
|
76
|
+
if (actions.includes(action)) {
|
|
77
|
+
result.push(emitter);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
getFeedbackCommands(): Command[] {
|
|
84
|
+
return this.getRegisteredFeedback()
|
|
85
|
+
.flatMap(action => this.actionToCommands(action))
|
|
86
|
+
.sort((left, right) => getFeedbackRank(left) - getFeedbackRank(right));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async applyFeedbackCommands(context: CommandExecutionContext): Promise<void> {
|
|
90
|
+
const feedbackCommands = this.getFeedbackCommands() ?? [];
|
|
91
|
+
if (feedbackCommands?.length > 0) {
|
|
92
|
+
const results = feedbackCommands.map(command => command.execute(context));
|
|
93
|
+
await Promise.all(results);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
protected actionToCommands(action: Action): ICommand[] {
|
|
98
|
+
return (
|
|
99
|
+
this.actionHandlerRegistry
|
|
100
|
+
.get(action.kind)
|
|
101
|
+
.filter(toTypeGuard(CommandActionHandler))
|
|
102
|
+
.map(handler => handler.handle(action)) ?? []
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
createEmitter(): FeedbackEmitter {
|
|
107
|
+
return new FeedbackEmitter(this);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
protected async dispatchFeedback(actions: Action[], feedbackEmitter: IFeedbackEmitter): Promise<void> {
|
|
111
|
+
try {
|
|
112
|
+
const actionDispatcher = await this.actionDispatcher();
|
|
113
|
+
await actionDispatcher.dispatchAll(actions);
|
|
114
|
+
this.logger.info(this, `Dispatched feedback actions for ${feedbackEmitter}`);
|
|
115
|
+
} catch (reason) {
|
|
116
|
+
this.logger.error(this, 'Failed to dispatch feedback actions', reason);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -13,26 +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 {
|
|
17
|
-
|
|
18
|
-
ActionHandlerRegistry,
|
|
19
|
-
Command,
|
|
20
|
-
CommandActionHandler,
|
|
21
|
-
CommandExecutionContext,
|
|
22
|
-
Disposable,
|
|
23
|
-
GModelElement,
|
|
24
|
-
IActionDispatcher,
|
|
25
|
-
ICommand,
|
|
26
|
-
ILogger,
|
|
27
|
-
MaybeFunction,
|
|
28
|
-
TYPES,
|
|
29
|
-
call,
|
|
30
|
-
asArray as toArray,
|
|
31
|
-
toTypeGuard
|
|
32
|
-
} from '@eclipse-glsp/sprotty';
|
|
33
|
-
import { inject, injectable } from 'inversify';
|
|
34
|
-
import { getFeedbackRank } from './feedback-command';
|
|
35
|
-
import { FeedbackEmitter } from './feeback-emitter';
|
|
16
|
+
import { Action, Command, CommandExecutionContext, Disposable, MaybeFunction, call, asArray as toArray } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { FeedbackEmitter } from './feedback-emitter';
|
|
36
18
|
|
|
37
19
|
export interface IFeedbackEmitter {}
|
|
38
20
|
|
|
@@ -104,89 +86,3 @@ export interface IFeedbackActionDispatcher {
|
|
|
104
86
|
*/
|
|
105
87
|
createEmitter(): FeedbackEmitter;
|
|
106
88
|
}
|
|
107
|
-
|
|
108
|
-
@injectable()
|
|
109
|
-
export class FeedbackActionDispatcher implements IFeedbackActionDispatcher {
|
|
110
|
-
protected registeredFeedback: Map<IFeedbackEmitter, Action[]> = new Map();
|
|
111
|
-
|
|
112
|
-
@inject(TYPES.IActionDispatcherProvider) protected actionDispatcher: () => Promise<IActionDispatcher>;
|
|
113
|
-
@inject(TYPES.ILogger) protected logger: ILogger;
|
|
114
|
-
|
|
115
|
-
@inject(ActionHandlerRegistry) protected actionHandlerRegistry: ActionHandlerRegistry;
|
|
116
|
-
|
|
117
|
-
registerFeedback(feedbackEmitter: IFeedbackEmitter, feedbackActions: Action[], cleanupActions?: MaybeActions): Disposable {
|
|
118
|
-
if (feedbackEmitter instanceof GModelElement) {
|
|
119
|
-
this.logger.log(
|
|
120
|
-
this,
|
|
121
|
-
// eslint-disable-next-line max-len
|
|
122
|
-
'GModelElements as feedback emitters are discouraged, as they usually change between model updates and are considered unstable.'
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
if (feedbackActions.length > 0) {
|
|
126
|
-
this.registeredFeedback.set(feedbackEmitter, feedbackActions);
|
|
127
|
-
this.dispatchFeedback(feedbackActions, feedbackEmitter);
|
|
128
|
-
}
|
|
129
|
-
return Disposable.create(() => this.deregisterFeedback(feedbackEmitter, cleanupActions));
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
deregisterFeedback(feedbackEmitter: IFeedbackEmitter, cleanupActions?: MaybeActions): void {
|
|
133
|
-
this.registeredFeedback.delete(feedbackEmitter);
|
|
134
|
-
const actions = MaybeActions.asArray(cleanupActions);
|
|
135
|
-
if (actions.length > 0) {
|
|
136
|
-
this.dispatchFeedback(actions, feedbackEmitter);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
getRegisteredFeedback(): Action[] {
|
|
141
|
-
const result: Action[] = [];
|
|
142
|
-
this.registeredFeedback.forEach(actions => result.push(...actions));
|
|
143
|
-
return result;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
getRegisteredFeedbackEmitters(action: Action): IFeedbackEmitter[] {
|
|
147
|
-
const result: IFeedbackEmitter[] = [];
|
|
148
|
-
this.registeredFeedback.forEach((actions, emitter) => {
|
|
149
|
-
if (actions.includes(action)) {
|
|
150
|
-
result.push(emitter);
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
return result;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
getFeedbackCommands(): Command[] {
|
|
157
|
-
return this.getRegisteredFeedback()
|
|
158
|
-
.flatMap(action => this.actionToCommands(action))
|
|
159
|
-
.sort((left, right) => getFeedbackRank(left) - getFeedbackRank(right));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
async applyFeedbackCommands(context: CommandExecutionContext): Promise<void> {
|
|
163
|
-
const feedbackCommands = this.getFeedbackCommands() ?? [];
|
|
164
|
-
if (feedbackCommands?.length > 0) {
|
|
165
|
-
const results = feedbackCommands.map(command => command.execute(context));
|
|
166
|
-
await Promise.all(results);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
protected actionToCommands(action: Action): ICommand[] {
|
|
171
|
-
return (
|
|
172
|
-
this.actionHandlerRegistry
|
|
173
|
-
.get(action.kind)
|
|
174
|
-
.filter(toTypeGuard(CommandActionHandler))
|
|
175
|
-
.map(handler => handler.handle(action)) ?? []
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
createEmitter(): FeedbackEmitter {
|
|
180
|
-
return new FeedbackEmitter(this);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
protected async dispatchFeedback(actions: Action[], feedbackEmitter: IFeedbackEmitter): Promise<void> {
|
|
184
|
-
try {
|
|
185
|
-
const actionDispatcher = await this.actionDispatcher();
|
|
186
|
-
await actionDispatcher.dispatchAll(actions);
|
|
187
|
-
this.logger.info(this, `Dispatched feedback actions for ${feedbackEmitter}`);
|
|
188
|
-
} catch (reason) {
|
|
189
|
-
this.logger.error(this, 'Failed to dispatch feedback actions', reason);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|