@eclipse-glsp/client 1.1.0-next.c40feb3.207 → 1.1.0-next.c54a4b8.246
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/README.md +1 -1
- package/{lib/features/change-bounds/snap.spec.d.ts → css/autocomplete-palette.css} +8 -3
- package/css/decoration.css +1 -1
- package/css/glsp-sprotty.css +34 -19
- package/lib/base/auto-complete/auto-complete-widget.d.ts +10 -4
- package/lib/base/auto-complete/auto-complete-widget.d.ts.map +1 -1
- package/lib/base/auto-complete/auto-complete-widget.js +28 -9
- package/lib/base/auto-complete/auto-complete-widget.js.map +1 -1
- package/lib/base/command-stack.d.ts +1 -2
- package/lib/base/command-stack.d.ts.map +1 -1
- package/lib/base/command-stack.js +5 -14
- package/lib/base/command-stack.js.map +1 -1
- package/lib/base/container-modules.d.ts +32 -2
- package/lib/base/container-modules.d.ts.map +1 -1
- package/lib/base/container-modules.js +74 -40
- package/lib/base/container-modules.js.map +1 -1
- package/lib/base/di.config.d.ts +1 -1
- package/lib/base/di.config.d.ts.map +1 -1
- package/lib/base/di.config.js +7 -7
- package/lib/base/di.config.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +3 -3
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +3 -3
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/selection-clearing-mouse-listener.js +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.d.ts +4 -5
- package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.js +15 -8
- package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -1
- package/lib/features/accessibility/di.config.d.ts +21 -0
- package/lib/features/accessibility/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/di.config.js +32 -0
- package/lib/features/accessibility/di.config.js.map +1 -0
- package/lib/features/accessibility/move-zoom/di.config.d.ts +23 -0
- package/lib/features/accessibility/move-zoom/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/move-zoom/di.config.js +41 -0
- package/lib/features/accessibility/move-zoom/di.config.js.map +1 -0
- package/lib/features/accessibility/move-zoom/move-handler.d.ts +81 -0
- package/lib/features/accessibility/move-zoom/move-handler.d.ts.map +1 -0
- package/lib/features/accessibility/move-zoom/move-handler.js +173 -0
- package/lib/features/accessibility/move-zoom/move-handler.js.map +1 -0
- package/lib/features/accessibility/move-zoom/zoom-handler.d.ts +74 -0
- package/lib/features/accessibility/move-zoom/zoom-handler.d.ts.map +1 -0
- package/lib/features/accessibility/move-zoom/zoom-handler.js +159 -0
- package/lib/features/accessibility/move-zoom/zoom-handler.js.map +1 -0
- package/lib/features/accessibility/search/di.config.d.ts +20 -0
- package/lib/features/accessibility/search/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/search/di.config.js +33 -0
- package/lib/features/accessibility/search/di.config.js.map +1 -0
- package/lib/features/accessibility/search/search-palette.d.ts +47 -0
- package/lib/features/accessibility/search/search-palette.d.ts.map +1 -0
- package/lib/features/accessibility/search/search-palette.js +155 -0
- package/lib/features/accessibility/search/search-palette.js.map +1 -0
- package/lib/features/accessibility/search/search-tool.d.ts +30 -0
- package/lib/features/accessibility/search/search-tool.d.ts.map +1 -0
- package/lib/features/accessibility/search/search-tool.js +73 -0
- package/lib/features/accessibility/search/search-tool.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +35 -0
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js +87 -0
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/di.config.d.ts +20 -0
- package/lib/features/accessibility/view-key-tools/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/di.config.js +35 -0
- package/lib/features/accessibility/view-key-tools/di.config.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +49 -0
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js +131 -0
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts +43 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js +109 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js.map +1 -0
- package/lib/features/autocomplete-palette/autocomplete-suggestion-providers.d.ts +35 -0
- package/lib/features/autocomplete-palette/autocomplete-suggestion-providers.d.ts.map +1 -0
- package/lib/features/{tools/marquee-behavior.spec.d.ts → autocomplete-palette/autocomplete-suggestion-providers.js} +4 -3
- package/lib/features/autocomplete-palette/autocomplete-suggestion-providers.js.map +1 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.d.ts +41 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.d.ts.map +1 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.js +82 -0
- package/lib/features/autocomplete-palette/base-autocomplete-palette.js.map +1 -0
- package/lib/features/bounds/di.config.d.ts +0 -16
- package/lib/features/bounds/di.config.d.ts.map +1 -1
- package/lib/features/bounds/di.config.js +12 -9
- package/lib/features/bounds/di.config.js.map +1 -1
- package/lib/features/{layout → bounds}/freeform-layout.d.ts +2 -2
- package/lib/features/{layout → bounds}/freeform-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/freeform-layout.js +2 -2
- package/lib/features/{layout → bounds}/freeform-layout.js.map +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.js +3 -2
- package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.d.ts +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.js +1 -1
- package/lib/features/{layout → bounds}/hbox-layout.js.map +1 -1
- package/lib/features/{layout → bounds}/layouter.d.ts +1 -1
- package/lib/features/{layout → bounds}/layouter.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/layouter.js +1 -1
- package/lib/features/{layout → bounds}/layouter.js.map +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.d.ts +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.d.ts.map +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.js +1 -1
- package/lib/features/{layout → bounds}/vbox-layout.js.map +1 -1
- package/lib/features/command-palette/command-palette-tool.d.ts +1 -1
- package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-tool.js +3 -3
- package/lib/features/command-palette/command-palette-tool.js.map +1 -1
- package/lib/features/command-palette/di.config.d.ts +0 -15
- package/lib/features/command-palette/di.config.d.ts.map +1 -1
- package/lib/features/command-palette/di.config.js +6 -7
- package/lib/features/command-palette/di.config.js.map +1 -1
- package/lib/features/context-menu/di.config.d.ts +0 -15
- package/lib/features/context-menu/di.config.d.ts.map +1 -1
- package/lib/features/context-menu/di.config.js +4 -3
- package/lib/features/context-menu/di.config.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.d.ts +2 -2
- package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.js +5 -5
- package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
- package/lib/features/decoration/di.config.d.ts +0 -15
- package/lib/features/decoration/di.config.d.ts.map +1 -1
- package/lib/features/decoration/di.config.js +4 -4
- package/lib/features/decoration/di.config.js.map +1 -1
- package/lib/features/edit-label/di.config.d.ts +0 -15
- package/lib/features/edit-label/di.config.d.ts.map +1 -1
- package/lib/features/edit-label/di.config.js +3 -2
- package/lib/features/edit-label/di.config.js.map +1 -1
- package/lib/features/export/di.config.d.ts +4 -0
- package/lib/features/export/di.config.d.ts.map +1 -0
- package/lib/features/export/di.config.js +30 -0
- package/lib/features/export/di.config.js.map +1 -0
- package/lib/features/export/glsp-svg-exporter.d.ts +1 -1
- package/lib/features/export/glsp-svg-exporter.d.ts.map +1 -1
- package/lib/features/export/glsp-svg-exporter.js +1 -2
- package/lib/features/export/glsp-svg-exporter.js.map +1 -1
- package/lib/features/hover/di.config.d.ts +0 -15
- package/lib/features/hover/di.config.d.ts.map +1 -1
- package/lib/features/hover/di.config.js +7 -7
- package/lib/features/hover/di.config.js.map +1 -1
- package/lib/features/hover/hover.d.ts.map +1 -1
- package/lib/features/hover/hover.js +2 -1
- package/lib/features/hover/hover.js.map +1 -1
- package/lib/features/layout/di.config.d.ts +1 -1
- package/lib/features/layout/di.config.d.ts.map +1 -1
- package/lib/features/layout/di.config.js +1 -9
- package/lib/features/layout/di.config.js.map +1 -1
- package/lib/features/layout/layout-elements-action.d.ts.map +1 -1
- package/lib/features/layout/layout-elements-action.js +2 -2
- package/lib/features/layout/layout-elements-action.js.map +1 -1
- package/lib/features/navigation/di.config.d.ts +2 -1
- package/lib/features/navigation/di.config.d.ts.map +1 -1
- package/lib/features/navigation/di.config.js +3 -3
- package/lib/features/navigation/di.config.js.map +1 -1
- package/lib/features/navigation/navigation-action-handler.d.ts +2 -2
- package/lib/features/navigation/navigation-action-handler.js +2 -2
- package/lib/features/save/di.config.d.ts +0 -15
- package/lib/features/save/di.config.d.ts.map +1 -1
- package/lib/features/save/di.config.js +3 -2
- package/lib/features/save/di.config.js.map +1 -1
- package/lib/features/save/model.d.ts +1 -1
- package/lib/features/select/di.config.d.ts +0 -15
- package/lib/features/select/di.config.d.ts.map +1 -1
- package/lib/features/select/di.config.js +8 -7
- package/lib/features/select/di.config.js.map +1 -1
- package/lib/features/select/select-mouse-listener.d.ts +1 -1
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js +2 -1
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/source-model-watcher/di.config.js +1 -1
- package/lib/features/svg-metadata/di.config.d.ts +19 -0
- package/lib/features/svg-metadata/di.config.d.ts.map +1 -0
- package/lib/features/svg-metadata/di.config.js +26 -0
- package/lib/features/svg-metadata/di.config.js.map +1 -0
- package/lib/features/svg-metadata/metadata-placer.d.ts +24 -0
- package/lib/features/svg-metadata/metadata-placer.d.ts.map +1 -0
- package/lib/features/svg-metadata/metadata-placer.js +63 -0
- package/lib/features/svg-metadata/metadata-placer.js.map +1 -0
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +4 -3
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js +5 -4
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts +7 -7
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.js +8 -11
- package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/di.config.d.ts +0 -15
- package/lib/features/tool-feedback/di.config.d.ts.map +1 -1
- package/lib/features/tool-feedback/di.config.js +20 -18
- package/lib/features/tool-feedback/di.config.js.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +2 -3
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +6 -11
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tool-palette/di.config.d.ts +0 -15
- package/lib/features/tool-palette/di.config.d.ts.map +1 -1
- package/lib/features/tool-palette/di.config.js +4 -4
- package/lib/features/tool-palette/di.config.js.map +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +2 -2
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds-tool.js +6 -6
- package/lib/features/tools/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/di.config.d.ts +18 -5
- package/lib/features/tools/di.config.d.ts.map +1 -1
- package/lib/features/tools/di.config.js +15 -19
- package/lib/features/tools/di.config.js.map +1 -1
- package/lib/features/tools/glsp-manhattan-edge-router.d.ts +2 -2
- package/lib/features/tools/glsp-manhattan-edge-router.d.ts.map +1 -1
- package/lib/features/tools/glsp-manhattan-edge-router.js +4 -4
- package/lib/features/tools/glsp-manhattan-edge-router.js.map +1 -1
- package/lib/features/validation/di.config.js +4 -4
- package/lib/features/validation/di.config.js.map +1 -1
- package/lib/features/validation/issue-marker.d.ts +1 -1
- package/lib/features/validation/issue-marker.js +1 -1
- package/lib/features/validation/validate.d.ts +6 -6
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js +18 -17
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/features/viewport/di.config.d.ts +0 -15
- package/lib/features/viewport/di.config.d.ts.map +1 -1
- package/lib/features/viewport/di.config.js +12 -11
- package/lib/features/viewport/di.config.js.map +1 -1
- package/lib/index.d.ts +35 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +86 -43
- package/lib/index.js.map +1 -1
- package/lib/lib/model.d.ts +7 -3
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +48 -1
- package/lib/lib/model.js.map +1 -1
- package/lib/sprotty-reexport.d.ts +7 -7
- package/lib/sprotty-reexport.d.ts.map +1 -1
- package/lib/sprotty-reexport.js +19 -10
- package/lib/sprotty-reexport.js.map +1 -1
- package/lib/utils/html-utils.d.ts +1 -1
- package/lib/utils/html-utils.js +1 -1
- package/lib/utils/smodel-util.d.ts +1 -1
- package/lib/utils/smodel-util.d.ts.map +1 -1
- package/lib/utils/smodel-util.js +1 -1
- package/lib/utils/smodel-util.js.map +1 -1
- package/lib/views/base-view-module.d.ts +18 -6
- 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/lib/views/glsp-edge-view.d.ts +2 -2
- package/lib/views/glsp-edge-view.d.ts.map +1 -1
- package/lib/views/glsp-edge-view.js +2 -2
- package/lib/views/glsp-edge-view.js.map +1 -1
- package/lib/views/glsp-projection-view.d.ts +1 -1
- package/lib/views/glsp-projection-view.js +1 -1
- package/lib/views/index.d.ts +1 -1
- package/lib/views/index.js +1 -1
- package/lib/views/rounded-corner-view.js +2 -2
- package/lib/views/rounded-corner.d.ts +1 -1
- package/lib/views/rounded-corner.js +1 -1
- package/package.json +22 -19
- package/src/base/auto-complete/auto-complete-widget.ts +34 -10
- package/src/base/command-stack.ts +13 -11
- package/src/base/container-modules.ts +42 -9
- package/src/base/di.config.ts +8 -8
- package/src/base/editor-context-service.ts +4 -4
- package/src/base/selection-clearing-mouse-listener.ts +1 -1
- package/src/base/tool-manager/glsp-tool-manager.ts +15 -12
- package/src/features/accessibility/di.config.ts +30 -0
- package/src/features/accessibility/move-zoom/di.config.ts +43 -0
- package/src/features/accessibility/move-zoom/move-handler.ts +198 -0
- package/src/features/accessibility/move-zoom/zoom-handler.ts +178 -0
- package/src/features/accessibility/search/di.config.ts +31 -0
- package/src/features/accessibility/search/search-palette.ts +181 -0
- package/src/features/accessibility/search/search-tool.ts +60 -0
- package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +80 -0
- package/src/features/accessibility/view-key-tools/di.config.ts +33 -0
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +115 -0
- package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +94 -0
- package/src/features/autocomplete-palette/autocomplete-suggestion-providers.ts +37 -0
- package/src/features/autocomplete-palette/base-autocomplete-palette.ts +88 -0
- package/src/features/bounds/di.config.ts +21 -11
- package/src/features/{layout/tests → bounds}/freeform-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/freeform-layout.ts +2 -2
- package/src/features/bounds/glsp-hidden-bounds-updater.ts +4 -7
- package/src/features/{layout/tests → bounds}/hbox-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/hbox-layout.ts +1 -1
- package/src/features/{layout/tests/layouter-test-util.ts → bounds/layouter-test-util.spec.ts} +6 -6
- package/src/features/{layout → bounds}/layouter.ts +1 -1
- package/src/features/{layout/tests → bounds}/vbox-layout.spec.ts +2 -2
- package/src/features/{layout → bounds}/vbox-layout.ts +1 -1
- package/src/features/command-palette/command-palette-tool.ts +3 -3
- package/src/features/command-palette/di.config.ts +6 -7
- package/src/features/context-menu/di.config.ts +4 -3
- package/src/features/copy-paste/copy-paste-handler.ts +5 -5
- package/src/features/decoration/di.config.ts +4 -4
- package/src/features/edit-label/di.config.ts +3 -2
- package/src/features/export/di.config.ts +29 -0
- package/src/features/export/glsp-svg-exporter.ts +8 -7
- package/src/features/hover/di.config.ts +8 -7
- package/src/features/hover/hover.ts +2 -1
- package/src/features/layout/di.config.ts +2 -11
- package/src/features/layout/layout-elements-action.ts +2 -1
- package/src/features/navigation/di.config.ts +4 -2
- package/src/features/navigation/navigation-action-handler.ts +2 -2
- package/src/features/save/di.config.ts +3 -2
- package/src/features/save/model.ts +1 -1
- package/src/features/select/di.config.ts +8 -7
- package/src/features/select/select-mouse-listener.ts +2 -2
- package/src/features/select/selection-service.spec.ts +4 -5
- package/src/features/source-model-watcher/di.config.ts +1 -1
- package/src/features/svg-metadata/di.config.ts +26 -0
- package/src/features/svg-metadata/metadata-placer.ts +51 -0
- package/src/features/tool-feedback/change-bounds-tool-feedback.ts +4 -4
- package/src/features/tool-feedback/creation-tool-feedback.ts +22 -16
- package/src/features/tool-feedback/di.config.ts +20 -18
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +3 -11
- package/src/features/tool-palette/di.config.ts +4 -4
- package/src/features/tool-palette/tool-palette.ts +4 -4
- package/src/features/tools/change-bounds-tool.ts +7 -7
- package/src/features/tools/di.config.ts +19 -24
- package/src/features/tools/glsp-manhattan-edge-router.ts +8 -5
- package/src/features/validation/di.config.ts +5 -5
- package/src/features/validation/issue-marker.ts +1 -1
- package/src/features/validation/validate.ts +16 -19
- package/src/features/viewport/di.config.ts +13 -11
- package/src/index.ts +48 -5
- package/src/lib/model.ts +35 -3
- package/src/sprotty-reexport.ts +24 -8
- package/src/utils/html-utils.ts +1 -1
- package/src/utils/smodel-util.ts +12 -5
- package/src/views/base-view-module.ts +4 -9
- package/src/views/glsp-edge-view.tsx +3 -3
- package/src/views/glsp-projection-view.tsx +1 -1
- package/src/views/index.ts +1 -2
- package/src/views/rounded-corner-view.tsx +2 -2
- package/src/views/rounded-corner.ts +2 -2
- package/lib/features/change-bounds/snap.spec.d.ts.map +0 -1
- package/lib/features/change-bounds/snap.spec.js +0 -82
- package/lib/features/change-bounds/snap.spec.js.map +0 -1
- package/lib/features/layout/layout-elements-action.spec.d.ts +0 -3
- package/lib/features/layout/layout-elements-action.spec.d.ts.map +0 -1
- package/lib/features/layout/layout-elements-action.spec.js +0 -325
- package/lib/features/layout/layout-elements-action.spec.js.map +0 -1
- package/lib/features/layout/tests/freeform-layout.spec.d.ts +0 -3
- package/lib/features/layout/tests/freeform-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/freeform-layout.spec.js +0 -201
- package/lib/features/layout/tests/freeform-layout.spec.js.map +0 -1
- package/lib/features/layout/tests/hbox-layout.spec.d.ts +0 -3
- package/lib/features/layout/tests/hbox-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/hbox-layout.spec.js +0 -161
- package/lib/features/layout/tests/hbox-layout.spec.js.map +0 -1
- package/lib/features/layout/tests/layouter-test-util.d.ts +0 -34
- package/lib/features/layout/tests/layouter-test-util.d.ts.map +0 -1
- package/lib/features/layout/tests/layouter-test-util.js +0 -96
- package/lib/features/layout/tests/layouter-test-util.js.map +0 -1
- package/lib/features/layout/tests/vbox-layout.spec.d.ts +0 -3
- package/lib/features/layout/tests/vbox-layout.spec.d.ts.map +0 -1
- package/lib/features/layout/tests/vbox-layout.spec.js +0 -161
- package/lib/features/layout/tests/vbox-layout.spec.js.map +0 -1
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts +0 -3
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts.map +0 -1
- package/lib/features/navigation/navigation-target-resolver.spec.js +0 -54
- package/lib/features/navigation/navigation-target-resolver.spec.js.map +0 -1
- package/lib/features/select/selection-service.spec.d.ts +0 -2
- package/lib/features/select/selection-service.spec.d.ts.map +0 -1
- package/lib/features/select/selection-service.spec.js +0 -347
- package/lib/features/select/selection-service.spec.js.map +0 -1
- package/lib/features/tools/marquee-behavior.spec.d.ts.map +0 -1
- package/lib/features/tools/marquee-behavior.spec.js +0 -165
- package/lib/features/tools/marquee-behavior.spec.js.map +0 -1
- package/lib/features/validation/marker-navigator.spec.d.ts +0 -3
- package/lib/features/validation/marker-navigator.spec.d.ts.map +0 -1
- package/lib/features/validation/marker-navigator.spec.js +0 -169
- package/lib/features/validation/marker-navigator.spec.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 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,19 +13,18 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { ContainerModule
|
|
16
|
+
import { bindAsService, BindingContext, bindOrRebind, TriggerEdgeCreationAction, TriggerNodeCreationAction } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { ContainerModule } from 'inversify';
|
|
18
18
|
import { configureActionHandler, configureModelElement, ManhattanEdgeRouter } from 'sprotty';
|
|
19
19
|
import { FocusStateChangedAction } from '../../base/actions/focus-change-action';
|
|
20
20
|
import { TYPES } from '../../base/types';
|
|
21
|
-
import { GLSPSvgExporter } from '../export/glsp-svg-exporter';
|
|
22
21
|
import { MARQUEE } from '../tool-feedback/marquee-tool-feedback';
|
|
23
22
|
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
24
23
|
import { DelKeyDeleteTool, MouseDeleteTool } from './delete-tool';
|
|
25
24
|
import { EdgeCreationTool } from './edge-creation-tool';
|
|
26
25
|
import { EdgeEditTool } from './edge-edit-tool';
|
|
27
26
|
import { EnableDefaultToolsOnFocusLossHandler } from './enable-default-tools-on-focus-loss';
|
|
28
|
-
import {
|
|
27
|
+
import { GLSPManhattanEdgeRouter } from './glsp-manhattan-edge-router';
|
|
29
28
|
import { MarqueeMouseTool } from './marquee-mouse-tool';
|
|
30
29
|
import { MarqueeTool } from './marquee-tool';
|
|
31
30
|
import { MarqueeNode } from './model';
|
|
@@ -37,33 +36,29 @@ import { MarqueeView } from './view';
|
|
|
37
36
|
* and adds the marquee selection tool.
|
|
38
37
|
*/
|
|
39
38
|
export const toolsModule = new ContainerModule((bind, _unbind, isBound, rebind) => {
|
|
39
|
+
const context = { bind, isBound, rebind };
|
|
40
40
|
// Register default tools
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
bindAsService(context, TYPES.IDefaultTool, ChangeBoundsTool);
|
|
42
|
+
bindAsService(context, TYPES.IDefaultTool, EdgeEditTool);
|
|
43
|
+
bindAsService(context, TYPES.IDefaultTool, DelKeyDeleteTool);
|
|
44
44
|
|
|
45
45
|
// Register tools
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
bind(TYPES.ITool).toService(EdgeCreationTool);
|
|
50
|
-
bind(TYPES.ITool).toService(NodeCreationTool);
|
|
46
|
+
bindAsService(context, TYPES.ITool, MouseDeleteTool);
|
|
47
|
+
bindAsService(context, TYPES.ITool, NodeCreationTool);
|
|
48
|
+
bindAsService(context, TYPES.ITool, EdgeCreationTool);
|
|
51
49
|
|
|
52
|
-
configureMarqueeTool(
|
|
53
|
-
configureActionHandler(
|
|
54
|
-
configureActionHandler(
|
|
50
|
+
configureMarqueeTool(context);
|
|
51
|
+
configureActionHandler(context, TriggerNodeCreationAction.KIND, NodeCreationTool);
|
|
52
|
+
configureActionHandler(context, TriggerEdgeCreationAction.KIND, EdgeCreationTool);
|
|
55
53
|
|
|
56
|
-
bind(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
bind(GSLPManhattanEdgeRouter).toSelf().inSingletonScope();
|
|
60
|
-
rebind(ManhattanEdgeRouter).toService(GSLPManhattanEdgeRouter);
|
|
54
|
+
bind(GLSPManhattanEdgeRouter).toSelf().inSingletonScope();
|
|
55
|
+
bindOrRebind(context, ManhattanEdgeRouter).toService(GLSPManhattanEdgeRouter);
|
|
61
56
|
});
|
|
62
57
|
|
|
63
|
-
export function configureMarqueeTool(context:
|
|
58
|
+
export function configureMarqueeTool(context: Pick<BindingContext, 'bind' | 'isBound'>): void {
|
|
64
59
|
configureModelElement(context, MARQUEE, MarqueeNode, MarqueeView);
|
|
65
|
-
context
|
|
66
|
-
context
|
|
60
|
+
bindAsService(context, TYPES.IDefaultTool, MarqueeTool);
|
|
61
|
+
bindAsService(context, TYPES.ITool, MarqueeMouseTool);
|
|
67
62
|
}
|
|
68
63
|
|
|
69
64
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-2023 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
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { almostEquals } from '@eclipse-glsp/protocol';
|
|
18
18
|
import { ManhattanEdgeRouter, ResolvedHandleMove, SRoutableElement } from 'sprotty';
|
|
19
19
|
|
|
20
|
-
export class
|
|
20
|
+
export class GLSPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
21
21
|
protected override applyInnerHandleMoves(edge: SRoutableElement, moves: ResolvedHandleMove[]): void {
|
|
22
22
|
const route = this.route(edge);
|
|
23
23
|
const routingPoints = edge.routingPoints;
|
|
@@ -33,9 +33,11 @@ export class GSLPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
|
33
33
|
if (routingPoints.length === 0) {
|
|
34
34
|
routingPoints.push({ x: correctedX, y: correctedY });
|
|
35
35
|
move.handle.pointIndex = 0;
|
|
36
|
+
} else if (almostEquals(route[0].x, route[1].x)) {
|
|
37
|
+
this.alignX(routingPoints, 0, correctedX);
|
|
38
|
+
} else {
|
|
39
|
+
this.alignY(routingPoints, 0, correctedY);
|
|
36
40
|
}
|
|
37
|
-
else if (almostEquals(route[0].x, route[1].x)) { this.alignX(routingPoints, 0, correctedX); }
|
|
38
|
-
else { this.alignY(routingPoints, 0, correctedY); }
|
|
39
41
|
} else if (index < routingPoints.length - 1) {
|
|
40
42
|
if (almostEquals(routingPoints[index].x, routingPoints[index + 1].x)) {
|
|
41
43
|
this.alignX(routingPoints, index, correctedX);
|
|
@@ -47,8 +49,9 @@ export class GSLPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
|
47
49
|
} else {
|
|
48
50
|
if (almostEquals(route[route.length - 2].x, route[route.length - 1].x)) {
|
|
49
51
|
this.alignX(routingPoints, routingPoints.length - 1, correctedX);
|
|
52
|
+
} else {
|
|
53
|
+
this.alignY(routingPoints, routingPoints.length - 1, correctedY);
|
|
50
54
|
}
|
|
51
|
-
else { this.alignY(routingPoints, routingPoints.length - 1, correctedY); }
|
|
52
55
|
}
|
|
53
56
|
break;
|
|
54
57
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 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 { SetMarkersAction } from '@eclipse-glsp/protocol';
|
|
16
|
+
import { bindAsService, SetMarkersAction } from '@eclipse-glsp/protocol';
|
|
17
17
|
import { ContainerModule } from 'inversify';
|
|
18
18
|
import { configureActionHandler, configureCommand } from 'sprotty';
|
|
19
19
|
import { TYPES } from '../../base/types';
|
|
@@ -47,7 +47,7 @@ export const markerNavigatorModule = new ContainerModule((bind, _unbind, isBound
|
|
|
47
47
|
* in a standalone deployment of GLSP. If the GLSP diagram is in Theia use the Theia-native
|
|
48
48
|
* `registerMarkerNavigationCommands()` in `glsp-theia-integration` instead.
|
|
49
49
|
*/
|
|
50
|
-
export const markerNavigatorContextMenuModule = new ContainerModule(
|
|
51
|
-
bind
|
|
52
|
-
bind
|
|
50
|
+
export const markerNavigatorContextMenuModule = new ContainerModule(bind => {
|
|
51
|
+
bindAsService(bind, TYPES.IContextMenuProvider, MarkerNavigatorContextMenuItemProvider);
|
|
52
|
+
bindAsService(bind, TYPES.KeyListener, MarkerNavigatorKeyListener);
|
|
53
53
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2022 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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 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
|
|
@@ -33,28 +33,25 @@ export class ValidationFeedbackEmitter implements IFeedbackEmitter {
|
|
|
33
33
|
|
|
34
34
|
@inject(TYPES.IActionDispatcherProvider) protected actionDispatcher: () => Promise<IActionDispatcher>;
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
39
|
-
private constructor() {}
|
|
36
|
+
protected registeredFeedbackByReason: Map<string, ApplyMarkersAction> = new Map();
|
|
40
37
|
|
|
41
38
|
/**
|
|
42
39
|
* Register the action that should be emitted for visualizing validation feedback.
|
|
43
40
|
* @param action the action that should be emitted when the model is updated and that will visualize the model validation feedback.
|
|
41
|
+
* @param reason the reason for this validation feedback.
|
|
44
42
|
*/
|
|
45
|
-
registerValidationFeedbackAction(action: ApplyMarkersAction): void {
|
|
46
|
-
// De-register
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const deleteMarkersAction = DeleteMarkersAction.create(this.registeredAction.markers);
|
|
43
|
+
registerValidationFeedbackAction(action: ApplyMarkersAction, reason = ''): void {
|
|
44
|
+
// De-register feedback and clear existing markers with the same reason
|
|
45
|
+
const previousFeedbackWithSameReason = this.registeredFeedbackByReason.get(reason);
|
|
46
|
+
if (previousFeedbackWithSameReason) {
|
|
47
|
+
this.feedbackActionDispatcher.deregisterFeedback(this, [previousFeedbackWithSameReason]);
|
|
48
|
+
const deleteMarkersAction = DeleteMarkersAction.create(previousFeedbackWithSameReason.markers);
|
|
52
49
|
this.actionDispatcher().then(dispatcher => dispatcher.dispatch(deleteMarkersAction));
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
// Register new action responsible for applying markers and re-applying them when the model is updated
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
53
|
+
this.registeredFeedbackByReason.set(reason, action);
|
|
54
|
+
this.feedbackActionDispatcher.registerFeedback(this, [...this.registeredFeedbackByReason.values()]);
|
|
58
55
|
}
|
|
59
56
|
}
|
|
60
57
|
|
|
@@ -80,7 +77,7 @@ export abstract class ExternalMarkerManager {
|
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
79
|
|
|
83
|
-
abstract setMarkers(markers: Marker[], sourceUri?: string): void;
|
|
80
|
+
abstract setMarkers(markers: Marker[], reason?: string, sourceUri?: string): void;
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
@injectable()
|
|
@@ -97,14 +94,14 @@ export class SetMarkersActionHandler implements IActionHandler {
|
|
|
97
94
|
|
|
98
95
|
handle(action: SetMarkersAction): void | Action | ICommand {
|
|
99
96
|
const markers: Marker[] = action.markers;
|
|
100
|
-
this.setMarkers(markers);
|
|
97
|
+
this.setMarkers(markers, action.reason);
|
|
101
98
|
}
|
|
102
99
|
|
|
103
|
-
async setMarkers(markers: Marker[]): Promise<void> {
|
|
100
|
+
async setMarkers(markers: Marker[], reason: string | undefined): Promise<void> {
|
|
104
101
|
const uri = await this.editorContextService.getSourceUri();
|
|
105
|
-
this.externalMarkerManager?.setMarkers(markers, uri);
|
|
102
|
+
this.externalMarkerManager?.setMarkers(markers, reason, uri);
|
|
106
103
|
const applyMarkersAction = ApplyMarkersAction.create(markers);
|
|
107
|
-
this.validationFeedbackEmitter.registerValidationFeedbackAction(applyMarkersAction);
|
|
104
|
+
this.validationFeedbackEmitter.registerValidationFeedbackAction(applyMarkersAction, reason);
|
|
108
105
|
}
|
|
109
106
|
}
|
|
110
107
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2023 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,6 +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 { bindAsService } from '@eclipse-glsp/protocol';
|
|
16
17
|
import { ContainerModule } from 'inversify';
|
|
17
18
|
import {
|
|
18
19
|
CenterCommand,
|
|
@@ -30,17 +31,18 @@ import {
|
|
|
30
31
|
import { GLSPScrollMouseListener } from './glsp-scroll-mouse-listener';
|
|
31
32
|
|
|
32
33
|
const glspViewportModule = new ContainerModule((bind, _unbind, isBound) => {
|
|
33
|
-
|
|
34
|
-
configureCommand(
|
|
35
|
-
configureCommand(
|
|
36
|
-
configureCommand(
|
|
37
|
-
|
|
38
|
-
bind(TYPES.MouseListener).to(ZoomMouseListener);
|
|
39
|
-
bind(GLSPScrollMouseListener).toSelf().inSingletonScope();
|
|
40
|
-
bind(TYPES.MouseListener).toService(GLSPScrollMouseListener);
|
|
34
|
+
const context = { bind, isBound };
|
|
35
|
+
configureCommand(context, CenterCommand);
|
|
36
|
+
configureCommand(context, FitToScreenCommand);
|
|
37
|
+
configureCommand(context, GetViewportCommand);
|
|
38
|
+
configureCommand(context, SetViewportCommand);
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
bindAsService(context, TYPES.KeyListener, CenterKeyboardListener);
|
|
41
|
+
bindAsService(context, TYPES.MouseListener, ZoomMouseListener);
|
|
42
|
+
bindAsService(context, TYPES.MouseListener, GLSPScrollMouseListener);
|
|
43
|
+
|
|
44
|
+
configureActionHandler(context, EnableToolsAction.KIND, GLSPScrollMouseListener);
|
|
45
|
+
configureActionHandler(context, EnableDefaultToolsAction.KIND, GLSPScrollMouseListener);
|
|
44
46
|
});
|
|
45
47
|
|
|
46
48
|
export default glspViewportModule;
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 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,6 +14,10 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import defaultGLSPModule from './base/di.config';
|
|
17
|
+
import { glspAccessibilityModule } from './features/accessibility/di.config';
|
|
18
|
+
import { glspMoveZoomModule } from './features/accessibility/move-zoom/di.config';
|
|
19
|
+
import { glspSearchPaletteModule } from './features/accessibility/search/di.config';
|
|
20
|
+
import { glspViewKeyToolsModule } from './features/accessibility/view-key-tools/di.config';
|
|
17
21
|
import glspCommandPaletteModule from './features/command-palette/di.config';
|
|
18
22
|
import glspContextMenuModule from './features/context-menu/di.config';
|
|
19
23
|
import { copyPasteContextMenuModule, glspServerCopyPasteModule } from './features/copy-paste/di.config';
|
|
@@ -23,16 +27,18 @@ import modelHintsModule from './features/hints/di.config';
|
|
|
23
27
|
import glspHoverModule from './features/hover/di.config';
|
|
24
28
|
import layoutModule from './features/layout/di.config';
|
|
25
29
|
import glspMouseToolModule from './features/mouse-tool/di.config';
|
|
26
|
-
import
|
|
30
|
+
import navigationModule from './features/navigation/di.config';
|
|
27
31
|
import saveModule from './features/save/di.config';
|
|
28
32
|
import glspSelectModule from './features/select/di.config';
|
|
29
33
|
import sourceModelWatcherModule from './features/source-model-watcher/di.config';
|
|
34
|
+
import svgMetadataModule from './features/svg-metadata/di.config';
|
|
30
35
|
import toolFeedbackModule from './features/tool-feedback/di.config';
|
|
31
36
|
import paletteModule from './features/tool-palette/di.config';
|
|
32
37
|
import { enableDefaultToolsOnFocusLossModule, toolsModule } from './features/tools/di.config';
|
|
33
|
-
import { markerNavigatorModule, validationModule } from './features/validation/di.config';
|
|
38
|
+
import { markerNavigatorContextMenuModule, markerNavigatorModule, validationModule } from './features/validation/di.config';
|
|
34
39
|
import glspViewportModule from './features/viewport/di.config';
|
|
35
40
|
|
|
41
|
+
// ------------------ Base ------------------
|
|
36
42
|
export * from './base/action-dispatcher';
|
|
37
43
|
export * from './base/actions/focus-change-action';
|
|
38
44
|
export * from './base/argumentable';
|
|
@@ -50,18 +56,34 @@ export * from './base/model/model-registry';
|
|
|
50
56
|
export * from './base/model/update-model-command';
|
|
51
57
|
export * from './base/selection-clearing-mouse-listener';
|
|
52
58
|
export * from './base/source-uri-aware';
|
|
59
|
+
export * from './base/tool-manager/glsp-tool-manager';
|
|
53
60
|
export * from './base/tool-manager/tool-actions';
|
|
54
61
|
export * from './base/types';
|
|
55
62
|
export * from './base/view/view-registry';
|
|
63
|
+
export * from './features/accessibility/view-key-tools/deselect-key-tool';
|
|
64
|
+
export * from './features/accessibility/view-key-tools/movement-key-tool';
|
|
65
|
+
export * from './features/accessibility/view-key-tools/zoom-key-tool';
|
|
66
|
+
//
|
|
67
|
+
// ------------------ Features ------------------
|
|
68
|
+
export * from './features/bounds/freeform-layout';
|
|
69
|
+
export * from './features/bounds/glsp-hidden-bounds-updater';
|
|
70
|
+
export * from './features/bounds/hbox-layout';
|
|
71
|
+
export * from './features/bounds/layouter';
|
|
72
|
+
export * from './features/bounds/vbox-layout';
|
|
56
73
|
export * from './features/change-bounds/model';
|
|
57
74
|
export * from './features/change-bounds/movement-restrictor';
|
|
58
75
|
export * from './features/change-bounds/snap';
|
|
76
|
+
export * from './features/command-palette/command-palette-tool';
|
|
59
77
|
export * from './features/command-palette/server-command-palette-provider';
|
|
60
78
|
export * from './features/context-menu/delete-element-context-menu';
|
|
79
|
+
export * from './features/context-menu/selection-service-aware-context-menu-mouse-listener';
|
|
80
|
+
export * from './features/context-menu/server-context-menu-provider';
|
|
81
|
+
export * from './features/copy-paste/copy-paste-context-menu';
|
|
61
82
|
export * from './features/copy-paste/copy-paste-handler';
|
|
62
83
|
export * from './features/decoration/decoration-placer';
|
|
63
84
|
export * from './features/edit-label/edit-label-tool';
|
|
64
85
|
export * from './features/edit-label/edit-label-validator';
|
|
86
|
+
export * from './features/export/glsp-svg-exporter';
|
|
65
87
|
export * from './features/hints/model';
|
|
66
88
|
export * from './features/hints/type-hints';
|
|
67
89
|
export * from './features/hover/hover';
|
|
@@ -73,33 +95,48 @@ export * from './features/rank/model';
|
|
|
73
95
|
export * from './features/reconnect/model';
|
|
74
96
|
export * from './features/save/model';
|
|
75
97
|
export * from './features/save/save-keylistener';
|
|
98
|
+
export * from './features/select/select-feedback-action';
|
|
99
|
+
export * from './features/select/select-mouse-listener';
|
|
100
|
+
export * from './features/select/selection-service';
|
|
76
101
|
export * from './features/source-model-watcher/source-model-changed-action-handler';
|
|
102
|
+
export * from './features/svg-metadata/metadata-placer';
|
|
77
103
|
export * from './features/tool-feedback/change-bounds-tool-feedback';
|
|
78
104
|
export * from './features/tool-feedback/creation-tool-feedback';
|
|
79
105
|
export * from './features/tool-feedback/css-feedback';
|
|
80
106
|
export * from './features/tool-feedback/edge-edit-tool-feedback';
|
|
81
107
|
export * from './features/tool-feedback/feedback-action-dispatcher';
|
|
108
|
+
export * from './features/tool-feedback/marquee-tool-feedback';
|
|
82
109
|
export * from './features/tool-feedback/model';
|
|
110
|
+
export * from './features/tool-feedback/view';
|
|
83
111
|
export * from './features/tool-palette/tool-palette';
|
|
84
112
|
export * from './features/tools/base-glsp-tool';
|
|
85
113
|
export * from './features/tools/change-bounds-tool';
|
|
86
114
|
export * from './features/tools/delete-tool';
|
|
115
|
+
export { configureMarqueeTool } from './features/tools/di.config';
|
|
87
116
|
export * from './features/tools/edge-creation-tool';
|
|
88
117
|
export * from './features/tools/edge-edit-tool';
|
|
118
|
+
export * from './features/tools/enable-default-tools-on-focus-loss';
|
|
119
|
+
export * from './features/tools/glsp-manhattan-edge-router';
|
|
89
120
|
export * from './features/tools/marquee-behavior';
|
|
121
|
+
export * from './features/tools/model';
|
|
90
122
|
export * from './features/tools/node-creation-tool';
|
|
91
123
|
export * from './features/validation/issue-marker';
|
|
92
124
|
export * from './features/validation/marker-navigator';
|
|
93
125
|
export * from './features/validation/validate';
|
|
94
126
|
export * from './features/viewport/glsp-scroll-mouse-listener';
|
|
127
|
+
//
|
|
128
|
+
// ------------------ Misc ------------------
|
|
95
129
|
export * from './lib/model';
|
|
96
130
|
export * from './model-source/glsp-diagram-server';
|
|
97
131
|
export * from './sprotty-reexport';
|
|
98
132
|
export * from './utils/argument-utils';
|
|
133
|
+
export * from './utils/html-utils';
|
|
134
|
+
export * from './utils/layout-utils';
|
|
99
135
|
export * from './utils/marker';
|
|
100
136
|
export * from './utils/smodel-util';
|
|
101
137
|
export * from './utils/viewpoint-util';
|
|
102
138
|
export * from './views';
|
|
139
|
+
// ------------------ DI Modules ------------------
|
|
103
140
|
export {
|
|
104
141
|
validationModule,
|
|
105
142
|
saveModule,
|
|
@@ -121,6 +158,12 @@ export {
|
|
|
121
158
|
navigationModule,
|
|
122
159
|
markerNavigatorModule,
|
|
123
160
|
glspDecorationModule,
|
|
124
|
-
sourceModelWatcherModule
|
|
125
|
-
|
|
161
|
+
sourceModelWatcherModule,
|
|
162
|
+
markerNavigatorContextMenuModule,
|
|
163
|
+
glspViewportModule,
|
|
164
|
+
svgMetadataModule,
|
|
165
|
+
glspViewKeyToolsModule,
|
|
166
|
+
glspMoveZoomModule,
|
|
167
|
+
glspAccessibilityModule,
|
|
168
|
+
glspSearchPaletteModule
|
|
126
169
|
};
|
package/src/lib/model.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 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,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 { SModelElementSchema } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { exportFeature, SGraph, SModelElement, viewportFeature } from 'sprotty';
|
|
16
|
+
import { Bounds, isBounds, Point, SModelElementSchema } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { exportFeature, getRouteBounds, SEdge, SGraph, SModelElement, viewportFeature } from 'sprotty';
|
|
18
18
|
import { Containable, containerFeature } from '../features/hints/model';
|
|
19
19
|
import { Saveable, saveFeature } from '../features/save/model';
|
|
20
20
|
|
|
@@ -25,3 +25,35 @@ export class GLSPGraph extends SGraph implements Saveable, Containable {
|
|
|
25
25
|
return true;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
export class GEdge extends SEdge {
|
|
30
|
+
override localToParent(point: Point | Bounds): Bounds {
|
|
31
|
+
const bounds = getRouteBounds(this.routingPoints);
|
|
32
|
+
const result = {
|
|
33
|
+
x: point.x + bounds.x,
|
|
34
|
+
y: point.y + bounds.y,
|
|
35
|
+
width: -1,
|
|
36
|
+
height: -1
|
|
37
|
+
};
|
|
38
|
+
if (isBounds(point)) {
|
|
39
|
+
result.width = point.width;
|
|
40
|
+
result.height = point.height;
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override parentToLocal(point: Point | Bounds): Bounds {
|
|
46
|
+
const bounds = getRouteBounds(this.routingPoints);
|
|
47
|
+
const result = {
|
|
48
|
+
x: point.x - bounds.x,
|
|
49
|
+
y: point.y - bounds.y,
|
|
50
|
+
width: -1,
|
|
51
|
+
height: -1
|
|
52
|
+
};
|
|
53
|
+
if (isBounds(point)) {
|
|
54
|
+
result.width = point.width;
|
|
55
|
+
result.height = point.height;
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/sprotty-reexport.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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
|
|
@@ -22,7 +22,15 @@
|
|
|
22
22
|
|
|
23
23
|
export * from '@eclipse-glsp/protocol';
|
|
24
24
|
// sprotty-protocol
|
|
25
|
-
export {
|
|
25
|
+
export {
|
|
26
|
+
BringToFrontAction,
|
|
27
|
+
CollapseExpandAction,
|
|
28
|
+
CollapseExpandAllAction,
|
|
29
|
+
ElementAndAlignment,
|
|
30
|
+
HoverFeedbackAction,
|
|
31
|
+
MoveAction,
|
|
32
|
+
SetBoundsAction
|
|
33
|
+
} from 'sprotty-protocol/lib/actions';
|
|
26
34
|
export { Viewport } from 'sprotty-protocol/lib/model';
|
|
27
35
|
// ------------------ Base ------------------
|
|
28
36
|
export * from 'sprotty/lib/base/actions/action-dispatcher';
|
|
@@ -144,7 +152,6 @@ export * from 'sprotty/lib/features/fade/model';
|
|
|
144
152
|
export {
|
|
145
153
|
AbstractHoverMouseListener,
|
|
146
154
|
ClosePopupActionHandler,
|
|
147
|
-
HoverFeedbackAction,
|
|
148
155
|
HoverFeedbackCommand,
|
|
149
156
|
HoverKeyListener,
|
|
150
157
|
HoverMouseListener,
|
|
@@ -154,7 +161,16 @@ export {
|
|
|
154
161
|
} from 'sprotty/lib/features/hover/hover';
|
|
155
162
|
export * from 'sprotty/lib/features/hover/model';
|
|
156
163
|
export * from 'sprotty/lib/features/move/model';
|
|
157
|
-
export
|
|
164
|
+
export {
|
|
165
|
+
ElementMove,
|
|
166
|
+
LocationPostprocessor,
|
|
167
|
+
MorphEdgesAnimation,
|
|
168
|
+
MoveAnimation,
|
|
169
|
+
MoveCommand,
|
|
170
|
+
MoveMouseListener,
|
|
171
|
+
ResolvedElementMove,
|
|
172
|
+
ResolvedHandleMove
|
|
173
|
+
} from 'sprotty/lib/features/move/move';
|
|
158
174
|
export * from 'sprotty/lib/features/move/snap';
|
|
159
175
|
export * from 'sprotty/lib/features/nameable/model';
|
|
160
176
|
export * from 'sprotty/lib/features/open/model';
|
|
@@ -176,13 +192,13 @@ export * from 'sprotty/lib/features/select/model';
|
|
|
176
192
|
export {
|
|
177
193
|
GetSelectionAction,
|
|
178
194
|
GetSelectionCommand,
|
|
179
|
-
SelectAllCommand,
|
|
180
|
-
SelectCommand,
|
|
195
|
+
SelectAllCommand as SprottySelectAllCommand,
|
|
196
|
+
SelectCommand as SprottySelectCommand,
|
|
181
197
|
SelectionResult,
|
|
182
198
|
SelectKeyboardListener,
|
|
183
199
|
SelectMouseListener
|
|
184
200
|
} from 'sprotty/lib/features/select/select';
|
|
185
|
-
export
|
|
201
|
+
export { UndoRedoKeyListener } from 'sprotty/lib/features/undo-redo/undo-redo';
|
|
186
202
|
export * from 'sprotty/lib/features/update/model-matching';
|
|
187
203
|
export { UpdateAnimationData, UpdateModelCommand } from 'sprotty/lib/features/update/update-model';
|
|
188
204
|
export {
|
|
@@ -202,7 +218,7 @@ export {
|
|
|
202
218
|
} from 'sprotty/lib/features/viewport/viewport';
|
|
203
219
|
export * from 'sprotty/lib/features/viewport/viewport-root';
|
|
204
220
|
export * from 'sprotty/lib/features/viewport/zoom';
|
|
205
|
-
export
|
|
221
|
+
export { BringToFrontCommand, ZOrderElement } from 'sprotty/lib/features/zorder/zorder';
|
|
206
222
|
export { SCompartment, SEdge, SGraph, SGraphIndex, SLabel, SNode, SPort } from 'sprotty/lib/graph/sgraph';
|
|
207
223
|
// ------------------ Graph ------------------
|
|
208
224
|
export * from 'sprotty/lib/graph/sgraph-factory';
|
package/src/utils/html-utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2019-2020 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
|
package/src/utils/smodel-util.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2023 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,7 +14,12 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import {
|
|
17
|
-
distinctAdd,
|
|
17
|
+
distinctAdd,
|
|
18
|
+
ElementAndBounds,
|
|
19
|
+
ElementAndRoutingPoints,
|
|
20
|
+
Point,
|
|
21
|
+
remove,
|
|
22
|
+
SModelElementSchema,
|
|
18
23
|
TypeGuard
|
|
19
24
|
} from '@eclipse-glsp/protocol';
|
|
20
25
|
import {
|
|
@@ -23,7 +28,8 @@ import {
|
|
|
23
28
|
isBoundsAware,
|
|
24
29
|
isMoveable,
|
|
25
30
|
isSelectable,
|
|
26
|
-
isSelected,
|
|
31
|
+
isSelected,
|
|
32
|
+
ModelIndexImpl,
|
|
27
33
|
RoutedPoint,
|
|
28
34
|
Selectable,
|
|
29
35
|
SModelElement,
|
|
@@ -275,7 +281,9 @@ export function calcElementAndRoute(element: SRoutableElement, routerRegistry?:
|
|
|
275
281
|
* @returns The corresponding route for the given element.
|
|
276
282
|
*/
|
|
277
283
|
export function calcRoute(element: SRoutableElement, routerRegistry: EdgeRouterRegistry, pointKinds?: string[]): RoutedPoint[] | undefined {
|
|
278
|
-
return routerRegistry
|
|
284
|
+
return routerRegistry
|
|
285
|
+
?.get(element.routerKind)
|
|
286
|
+
.route(element)
|
|
279
287
|
.filter((point, idx, fullRoute) => idx === fullRoute.findIndex(otherPoint => otherPoint.x === point.x && otherPoint.y === point.y))
|
|
280
288
|
.filter(point => !pointKinds || pointKinds.includes(point.kind));
|
|
281
289
|
}
|
|
@@ -302,4 +310,3 @@ export function getElementTypeId(input: SModelElement | SModelElementSchema | st
|
|
|
302
310
|
return (input as any)['type'] as string;
|
|
303
311
|
}
|
|
304
312
|
}
|
|
305
|
-
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2021 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2021-2023 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,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 { DefaultTypes } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { ContainerModule
|
|
16
|
+
import { BindingContext, DefaultTypes } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { ContainerModule } from 'inversify';
|
|
18
18
|
import {
|
|
19
19
|
CircularNode,
|
|
20
20
|
CircularNodeView,
|
|
@@ -53,17 +53,12 @@ import { GEdgeView } from './glsp-edge-view';
|
|
|
53
53
|
import { GIssueMarkerView } from './issue-marker-view';
|
|
54
54
|
import { RoundedCornerNodeView } from './rounded-corner-view';
|
|
55
55
|
|
|
56
|
-
interface ContainerContext {
|
|
57
|
-
bind: interfaces.Bind;
|
|
58
|
-
isBound: interfaces.IsBound;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
56
|
const baseViewModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
62
57
|
const context = { bind, unbind, isBound, rebind };
|
|
63
58
|
configureDefaultModelElements(context);
|
|
64
59
|
});
|
|
65
60
|
|
|
66
|
-
export function configureDefaultModelElements(context:
|
|
61
|
+
export function configureDefaultModelElements(context: Pick<BindingContext, 'bind' | 'isBound'>): void {
|
|
67
62
|
// HTML elements
|
|
68
63
|
configureModelElement(context, DefaultTypes.HTML, HtmlRoot, HtmlRootView);
|
|
69
64
|
|