@eclipse-glsp/client 0.10.0-next.6bee8eb.163 → 0.10.0-next.88e4725.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base/action-dispatcher.d.ts +1 -0
- package/lib/base/action-dispatcher.d.ts.map +1 -1
- package/lib/base/action-dispatcher.js +11 -3
- package/lib/base/action-dispatcher.js.map +1 -1
- package/lib/base/actions/focus-change-action.d.ts +16 -7
- package/lib/base/actions/focus-change-action.d.ts.map +1 -1
- package/lib/base/actions/focus-change-action.js +31 -12
- package/lib/base/actions/focus-change-action.js.map +1 -1
- package/lib/base/actions/sprotty-actions.d.ts +7 -0
- package/lib/base/actions/sprotty-actions.d.ts.map +1 -0
- package/lib/{features/tool-palette/palette-item.js → base/actions/sprotty-actions.js} +4 -20
- package/lib/base/actions/sprotty-actions.js.map +1 -0
- package/lib/base/auto-complete/auto-complete-actions.d.ts +5 -3
- package/lib/base/auto-complete/auto-complete-actions.d.ts.map +1 -1
- package/lib/base/auto-complete/auto-complete-actions.js +24 -5
- package/lib/base/auto-complete/auto-complete-actions.js.map +1 -1
- package/lib/base/auto-complete/auto-complete-widget.d.ts +2 -2
- package/lib/base/auto-complete/auto-complete-widget.d.ts.map +1 -1
- package/lib/base/auto-complete/auto-complete-widget.js +4 -4
- package/lib/base/auto-complete/auto-complete-widget.js.map +1 -1
- package/lib/base/command-stack.d.ts.map +1 -1
- package/lib/base/command-stack.js +4 -3
- package/lib/base/command-stack.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 +9 -10
- package/lib/base/di.config.js.map +1 -1
- package/lib/base/editor-context-service.d.ts +1 -1
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +5 -5
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/focus-tracker.d.ts +1 -1
- package/lib/base/focus-tracker.d.ts.map +1 -1
- package/lib/base/focus-tracker.js +3 -3
- package/lib/base/focus-tracker.js.map +1 -1
- package/lib/base/model/update-model-command.d.ts.map +1 -1
- package/lib/base/model/update-model-command.js +9 -9
- package/lib/base/model/update-model-command.js.map +1 -1
- package/lib/base/model-initialization-constraint.d.ts +2 -3
- package/lib/base/model-initialization-constraint.d.ts.map +1 -1
- package/lib/base/model-initialization-constraint.js +3 -4
- package/lib/base/model-initialization-constraint.js.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -1
- package/lib/base/tool-manager/glsp-tool-manager.js +3 -3
- package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -1
- package/lib/base/tool-manager/tool-actions.d.ts +14 -0
- package/lib/base/tool-manager/tool-actions.d.ts.map +1 -0
- package/lib/base/tool-manager/tool-actions.js +25 -0
- package/lib/base/tool-manager/tool-actions.js.map +1 -0
- package/lib/base/types.d.ts +144 -20
- package/lib/base/types.d.ts.map +1 -1
- package/lib/base/types.js +14 -26
- package/lib/base/types.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.d.ts +1 -1
- package/lib/features/change-bounds/movement-restrictor.js +2 -2
- package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
- package/lib/features/change-bounds/snap.d.ts +42 -1
- package/lib/features/change-bounds/snap.d.ts.map +1 -1
- package/lib/features/change-bounds/snap.js +77 -1
- package/lib/features/change-bounds/snap.js.map +1 -1
- package/lib/features/change-bounds/snap.spec.d.ts +17 -0
- package/lib/features/change-bounds/snap.spec.d.ts.map +1 -0
- package/lib/features/change-bounds/snap.spec.js +82 -0
- package/lib/features/change-bounds/snap.spec.js.map +1 -0
- package/lib/features/command-palette/di.config.d.ts +2 -2
- package/lib/features/command-palette/di.config.d.ts.map +1 -1
- package/lib/features/command-palette/di.config.js +6 -6
- package/lib/features/command-palette/di.config.js.map +1 -1
- package/lib/features/command-palette/server-command-palette-provider.d.ts +1 -1
- package/lib/features/command-palette/server-command-palette-provider.d.ts.map +1 -1
- package/lib/features/command-palette/server-command-palette-provider.js +11 -8
- package/lib/features/command-palette/server-command-palette-provider.js.map +1 -1
- package/lib/features/context-menu/delete-element-context-menu.d.ts +17 -1
- package/lib/features/context-menu/delete-element-context-menu.d.ts.map +1 -1
- package/lib/features/context-menu/delete-element-context-menu.js +3 -3
- package/lib/features/context-menu/delete-element-context-menu.js.map +1 -1
- package/lib/features/context-menu/di.config.d.ts +1 -1
- package/lib/features/context-menu/di.config.d.ts.map +1 -1
- package/lib/features/context-menu/di.config.js +8 -7
- package/lib/features/context-menu/di.config.js.map +1 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts +17 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map +1 -1
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js +4 -19
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -1
- package/lib/features/context-menu/server-context-menu-provider.d.ts +1 -1
- package/lib/features/context-menu/server-context-menu-provider.d.ts.map +1 -1
- package/lib/features/context-menu/server-context-menu-provider.js +6 -5
- package/lib/features/context-menu/server-context-menu-provider.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.d.ts +12 -15
- package/lib/features/copy-paste/copy-paste-context-menu.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.js +24 -31
- package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.d.ts +1 -1
- package/lib/features/copy-paste/copy-paste-handler.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-handler.js +6 -7
- package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
- package/lib/features/copy-paste/di.config.d.ts +1 -1
- package/lib/features/copy-paste/di.config.d.ts.map +1 -1
- package/lib/features/copy-paste/di.config.js +5 -7
- package/lib/features/copy-paste/di.config.js.map +1 -1
- package/lib/features/decoration/decoration-placer.d.ts.map +1 -1
- package/lib/features/decoration/decoration-placer.js +17 -1
- package/lib/features/decoration/decoration-placer.js.map +1 -1
- package/lib/features/decoration/di.config.d.ts +2 -2
- 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 +1 -1
- package/lib/features/edit-label/di.config.d.ts.map +1 -1
- package/lib/features/edit-label/di.config.js +4 -4
- package/lib/features/edit-label/di.config.js.map +1 -1
- package/lib/features/edit-label/edit-label-tool.d.ts.map +1 -1
- package/lib/features/edit-label/edit-label-tool.js +1 -1
- package/lib/features/edit-label/edit-label-tool.js.map +1 -1
- package/lib/features/edit-label/edit-label-validator.d.ts +4 -6
- package/lib/features/edit-label/edit-label-validator.d.ts.map +1 -1
- package/lib/features/edit-label/edit-label-validator.js +8 -10
- package/lib/features/edit-label/edit-label-validator.js.map +1 -1
- package/lib/features/hints/di.config.js +2 -2
- package/lib/features/hints/di.config.js.map +1 -1
- package/lib/features/hints/type-hints.d.ts +14 -4
- package/lib/features/hints/type-hints.d.ts.map +1 -1
- package/lib/features/hints/type-hints.js +21 -18
- package/lib/features/hints/type-hints.js.map +1 -1
- package/lib/features/hover/di.config.d.ts.map +1 -1
- package/lib/features/hover/di.config.js +2 -0
- package/lib/features/hover/di.config.js.map +1 -1
- package/lib/features/hover/hover.d.ts +4 -2
- package/lib/features/hover/hover.d.ts.map +1 -1
- package/lib/features/hover/hover.js +22 -4
- 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.js +1 -1
- package/lib/features/layout/freeform-layout.d.ts +17 -1
- package/lib/features/layout/freeform-layout.d.ts.map +1 -1
- package/lib/features/layout/freeform-layout.js +2 -2
- package/lib/features/layout/freeform-layout.js.map +1 -1
- package/lib/features/layout/layout-commands.d.ts +64 -37
- package/lib/features/layout/layout-commands.d.ts.map +1 -1
- package/lib/features/layout/layout-commands.js +79 -59
- package/lib/features/layout/layout-commands.js.map +1 -1
- package/lib/features/layout/layout-commands.spec.d.ts.map +1 -1
- package/lib/features/layout/layout-commands.spec.js +29 -17
- package/lib/features/layout/layout-commands.spec.js.map +1 -1
- package/lib/features/layout/vbox-layout.d.ts +17 -1
- package/lib/features/layout/vbox-layout.d.ts.map +1 -1
- package/lib/features/layout/vbox-layout.js +4 -3
- package/lib/features/layout/vbox-layout.js.map +1 -1
- package/lib/features/model-source-watcher/model-source-changed-action-handler.d.ts +1 -1
- package/lib/features/model-source-watcher/model-source-changed-action-handler.d.ts.map +1 -1
- package/lib/features/model-source-watcher/model-source-changed-action-handler.js +7 -7
- package/lib/features/model-source-watcher/model-source-changed-action-handler.js.map +1 -1
- package/lib/features/mouse-tool/di.config.d.ts +1 -1
- package/lib/features/mouse-tool/di.config.d.ts.map +1 -1
- package/lib/features/mouse-tool/di.config.js +2 -2
- package/lib/features/mouse-tool/di.config.js.map +1 -1
- package/lib/features/mouse-tool/mouse-tool.d.ts.map +1 -1
- package/lib/features/mouse-tool/mouse-tool.js +4 -10
- package/lib/features/mouse-tool/mouse-tool.js.map +1 -1
- package/lib/features/navigation/navigation-action-handler.d.ts +31 -16
- package/lib/features/navigation/navigation-action-handler.d.ts.map +1 -1
- package/lib/features/navigation/navigation-action-handler.js +50 -66
- package/lib/features/navigation/navigation-action-handler.js.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.d.ts +3 -3
- package/lib/features/navigation/navigation-target-resolver.d.ts.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.js +7 -8
- package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
- package/lib/features/navigation/navigation-target-resolver.spec.js +3 -3
- package/lib/features/navigation/navigation-target-resolver.spec.js.map +1 -1
- package/lib/features/save/di.config.d.ts +1 -1
- package/lib/features/save/di.config.d.ts.map +1 -1
- package/lib/features/save/di.config.js +3 -3
- package/lib/features/save/di.config.js.map +1 -1
- package/lib/features/save/save-keylistener.js +1 -1
- package/lib/features/save/save-keylistener.js.map +1 -1
- package/lib/features/select/di.config.d.ts +1 -1
- package/lib/features/select/di.config.d.ts.map +1 -1
- package/lib/features/select/di.config.js +4 -5
- package/lib/features/select/di.config.js.map +1 -1
- package/lib/features/select/select-feedback-action.d.ts +26 -22
- package/lib/features/select/select-feedback-action.d.ts.map +1 -1
- package/lib/features/select/select-feedback-action.js +18 -45
- package/lib/features/select/select-feedback-action.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 +1 -1
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/select/selection-service.d.ts.map +1 -1
- package/lib/features/select/selection-service.js +16 -13
- package/lib/features/select/selection-service.js.map +1 -1
- package/lib/features/select/selection-service.spec.js +9 -6
- package/lib/features/select/selection-service.spec.js.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts +16 -8
- package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js +50 -20
- package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts +22 -10
- package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/creation-tool-feedback.js +46 -21
- package/lib/features/tool-feedback/creation-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/css-feedback.d.ts +17 -10
- package/lib/features/tool-feedback/css-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/css-feedback.js +41 -37
- package/lib/features/tool-feedback/css-feedback.js.map +1 -1
- package/lib/features/tool-feedback/di.config.d.ts +1 -1
- package/lib/features/tool-feedback/di.config.d.ts.map +1 -1
- package/lib/features/tool-feedback/di.config.js +4 -4
- package/lib/features/tool-feedback/di.config.js.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts +43 -21
- package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js +117 -91
- package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/feedback-action-dispatcher.d.ts.map +1 -1
- package/lib/features/tool-feedback/feedback-action-dispatcher.js +3 -3
- package/lib/features/tool-feedback/feedback-action-dispatcher.js.map +1 -1
- package/lib/features/tool-feedback/marquee-tool-feedback.d.ts +20 -9
- package/lib/features/tool-feedback/marquee-tool-feedback.d.ts.map +1 -1
- package/lib/features/tool-feedback/marquee-tool-feedback.js +41 -15
- package/lib/features/tool-feedback/marquee-tool-feedback.js.map +1 -1
- package/lib/features/tool-feedback/view.d.ts +1 -1
- package/lib/features/tool-feedback/view.d.ts.map +1 -1
- package/lib/features/tool-feedback/view.js +18 -1
- package/lib/features/tool-feedback/view.js.map +1 -1
- package/lib/features/tool-palette/di.config.d.ts +1 -1
- package/lib/features/tool-palette/di.config.d.ts.map +1 -1
- package/lib/features/tool-palette/di.config.js +3 -2
- package/lib/features/tool-palette/di.config.js.map +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts +9 -6
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +25 -20
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/tools/base-glsp-tool.d.ts.map +1 -1
- package/lib/features/tools/base-glsp-tool.js +3 -3
- package/lib/features/tools/base-glsp-tool.js.map +1 -1
- package/lib/features/tools/change-bounds-tool.d.ts +6 -8
- package/lib/features/tools/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds-tool.js +22 -45
- package/lib/features/tools/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/delete-tool.d.ts.map +1 -1
- package/lib/features/tools/delete-tool.js +5 -5
- package/lib/features/tools/delete-tool.js.map +1 -1
- package/lib/features/tools/di.config.js +9 -9
- package/lib/features/tools/di.config.js.map +1 -1
- package/lib/features/tools/edge-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-creation-tool.js +16 -9
- package/lib/features/tools/edge-creation-tool.js.map +1 -1
- package/lib/features/tools/edge-edit-tool.d.ts +2 -1
- package/lib/features/tools/edge-edit-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-edit-tool.js +20 -15
- package/lib/features/tools/edge-edit-tool.js.map +1 -1
- package/lib/features/tools/marquee-behavior.d.ts +1 -1
- package/lib/features/tools/marquee-behavior.js +2 -2
- package/lib/features/tools/marquee-behavior.js.map +1 -1
- package/lib/features/tools/marquee-mouse-tool.d.ts.map +1 -1
- package/lib/features/tools/marquee-mouse-tool.js +7 -7
- package/lib/features/tools/marquee-mouse-tool.js.map +1 -1
- package/lib/features/tools/marquee-tool.js +1 -1
- package/lib/features/tools/marquee-tool.js.map +1 -1
- package/lib/features/tools/model.d.ts +2 -1
- package/lib/features/tools/model.d.ts.map +1 -1
- package/lib/features/tools/model.js +0 -15
- package/lib/features/tools/model.js.map +1 -1
- package/lib/features/tools/node-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/node-creation-tool.js +5 -5
- package/lib/features/tools/node-creation-tool.js.map +1 -1
- package/lib/features/validation/di.config.d.ts +1 -1
- package/lib/features/validation/di.config.d.ts.map +1 -1
- package/lib/features/validation/di.config.js +3 -3
- package/lib/features/validation/di.config.js.map +1 -1
- package/lib/features/validation/marker-navigator.d.ts +15 -7
- package/lib/features/validation/marker-navigator.d.ts.map +1 -1
- package/lib/features/validation/marker-navigator.js +21 -19
- package/lib/features/validation/marker-navigator.js.map +1 -1
- package/lib/features/validation/marker-navigator.spec.d.ts.map +1 -1
- package/lib/features/validation/marker-navigator.spec.js +2 -16
- package/lib/features/validation/marker-navigator.spec.js.map +1 -1
- package/lib/features/validation/validate.d.ts +9 -11
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js +27 -26
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/features/viewport/di.config.d.ts +1 -1
- package/lib/features/viewport/di.config.d.ts.map +1 -1
- package/lib/features/viewport/di.config.js +1 -1
- package/lib/features/viewport/di.config.js.map +1 -1
- package/lib/features/viewport/glsp-scroll-mouse-listener.js +2 -2
- package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -1
- package/lib/index.d.ts +4 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -5
- package/lib/index.js.map +1 -1
- package/lib/lib/model.d.ts +2 -1
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +0 -15
- package/lib/lib/model.js.map +1 -1
- package/lib/model-source/glsp-diagram-server.d.ts +4 -4
- package/lib/model-source/glsp-diagram-server.d.ts.map +1 -1
- package/lib/model-source/glsp-diagram-server.js +5 -5
- package/lib/model-source/glsp-diagram-server.js.map +1 -1
- package/lib/sprotty-reexport.d.ts +174 -0
- package/lib/sprotty-reexport.d.ts.map +1 -0
- package/lib/sprotty-reexport.js +299 -0
- package/lib/sprotty-reexport.js.map +1 -0
- package/lib/utils/layout-utils.d.ts +3 -3
- package/lib/utils/layout-utils.d.ts.map +1 -1
- package/lib/utils/smodel-util.d.ts +27 -18
- package/lib/utils/smodel-util.d.ts.map +1 -1
- package/lib/utils/smodel-util.js +30 -11
- package/lib/utils/smodel-util.js.map +1 -1
- package/lib/utils/viewpoint-util.d.ts +3 -3
- package/lib/utils/viewpoint-util.d.ts.map +1 -1
- package/lib/utils/viewpoint-util.js +17 -1
- package/lib/utils/viewpoint-util.js.map +1 -1
- package/package.json +5 -4
- package/src/base/action-dispatcher.ts +13 -4
- package/src/base/actions/focus-change-action.ts +25 -8
- package/{lib/features/tool-palette/palette-item.d.ts → src/base/actions/sprotty-actions.ts} +11 -11
- package/src/base/auto-complete/auto-complete-actions.ts +7 -5
- package/src/base/auto-complete/auto-complete-widget.ts +8 -13
- package/src/base/command-stack.ts +4 -3
- package/src/base/di.config.ts +4 -5
- package/src/base/editor-context-service.ts +7 -7
- package/src/base/focus-tracker.ts +5 -4
- package/src/base/model/update-model-command.ts +7 -8
- package/src/base/model-initialization-constraint.ts +3 -4
- package/src/base/tool-manager/glsp-tool-manager.ts +4 -4
- package/src/base/tool-manager/tool-actions.ts +37 -0
- package/src/base/types.ts +31 -24
- package/src/features/change-bounds/movement-restrictor.ts +3 -3
- package/src/features/change-bounds/snap.spec.ts +89 -0
- package/src/features/change-bounds/snap.ts +86 -2
- package/src/features/command-palette/di.config.ts +5 -7
- package/src/features/command-palette/server-command-palette-provider.ts +9 -8
- package/src/features/context-menu/delete-element-context-menu.ts +6 -6
- package/src/features/context-menu/di.config.ts +3 -2
- package/src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts +5 -6
- package/src/features/context-menu/server-context-menu-provider.ts +7 -6
- package/src/features/copy-paste/copy-paste-context-menu.ts +30 -23
- package/src/features/copy-paste/copy-paste-handler.ts +6 -6
- package/src/features/copy-paste/di.config.ts +7 -15
- package/src/features/decoration/decoration-placer.ts +2 -2
- package/src/features/decoration/di.config.ts +3 -5
- package/src/features/edit-label/di.config.ts +4 -5
- package/src/features/edit-label/edit-label-tool.ts +1 -2
- package/src/features/edit-label/edit-label-validator.ts +6 -10
- package/src/features/hints/di.config.ts +3 -3
- package/src/features/hints/type-hints.ts +31 -16
- package/src/features/hover/di.config.ts +4 -0
- package/src/features/hover/hover.ts +29 -11
- package/src/features/layout/di.config.ts +1 -1
- package/src/features/layout/freeform-layout.ts +3 -12
- package/src/features/layout/layout-commands.spec.ts +38 -22
- package/src/features/layout/layout-commands.ts +129 -55
- package/src/features/layout/vbox-layout.ts +4 -8
- package/src/features/model-source-watcher/model-source-changed-action-handler.ts +7 -12
- package/src/features/mouse-tool/di.config.ts +3 -4
- package/src/features/mouse-tool/mouse-tool.ts +4 -9
- package/src/features/navigation/navigation-action-handler.ts +76 -42
- package/src/features/navigation/navigation-target-resolver.spec.ts +3 -3
- package/src/features/navigation/navigation-target-resolver.ts +8 -13
- package/src/features/save/di.config.ts +2 -3
- package/src/features/save/save-keylistener.ts +1 -1
- package/src/features/select/di.config.ts +6 -8
- package/src/features/select/select-feedback-action.ts +18 -46
- package/src/features/select/select-mouse-listener.ts +1 -2
- package/src/features/select/selection-service.spec.ts +11 -8
- package/src/features/select/selection-service.ts +14 -10
- package/src/features/tool-feedback/change-bounds-tool-feedback.ts +42 -13
- package/src/features/tool-feedback/creation-tool-feedback.ts +42 -21
- package/src/features/tool-feedback/css-feedback.ts +40 -37
- package/src/features/tool-feedback/di.config.ts +4 -5
- package/src/features/tool-feedback/edge-edit-tool-feedback.ts +122 -78
- package/src/features/tool-feedback/feedback-action-dispatcher.ts +2 -1
- package/src/features/tool-feedback/marquee-tool-feedback.ts +36 -11
- package/src/features/tool-feedback/view.tsx +3 -3
- package/src/features/tool-palette/di.config.ts +3 -2
- package/src/features/tool-palette/tool-palette.ts +30 -16
- package/src/features/tools/base-glsp-tool.ts +4 -4
- package/src/features/tools/change-bounds-tool.ts +31 -61
- package/src/features/tools/delete-tool.ts +6 -6
- package/src/features/tools/di.config.ts +10 -10
- package/src/features/tools/edge-creation-tool.ts +18 -9
- package/src/features/tools/edge-edit-tool.ts +20 -16
- package/src/features/tools/marquee-behavior.ts +2 -2
- package/src/features/tools/marquee-mouse-tool.ts +8 -9
- package/src/features/tools/marquee-tool.ts +1 -1
- package/src/features/tools/model.ts +2 -1
- package/src/features/tools/node-creation-tool.ts +5 -5
- package/src/features/validation/di.config.ts +4 -5
- package/src/features/validation/marker-navigator.spec.ts +4 -2
- package/src/features/validation/marker-navigator.ts +41 -21
- package/src/features/validation/validate.ts +27 -20
- package/src/features/viewport/di.config.ts +1 -2
- package/src/features/viewport/glsp-scroll-mouse-listener.ts +3 -3
- package/src/index.ts +4 -5
- package/src/lib/model.ts +2 -1
- package/src/model-source/glsp-diagram-server.ts +8 -10
- package/src/sprotty-reexport.ts +283 -0
- package/src/utils/layout-utils.ts +3 -3
- package/src/utils/smodel-util.ts +36 -20
- package/src/utils/viewpoint-util.ts +5 -14
- package/lib/features/tool-palette/palette-item.d.ts.map +0 -1
- package/lib/features/tool-palette/palette-item.js.map +0 -1
- package/lib/protocol-reexport.d.ts +0 -45
- package/lib/protocol-reexport.d.ts.map +0 -1
- package/lib/protocol-reexport.js +0 -80
- package/lib/protocol-reexport.js.map +0 -1
- package/src/features/tool-palette/palette-item.ts +0 -38
- package/src/protocol-reexport.ts +0 -64
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2022 STMicroelectronics and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
/**
|
|
18
|
+
* Sprotty still keeps the old class based action definitions as deprecated API.
|
|
19
|
+
* This causes name clashes with the GLSP protocol actions when reexport sprotty.
|
|
20
|
+
* The deprecated definitions are planned to be removed with Sprotty 1.0.0.
|
|
21
|
+
* Until then we have to manually reexport the sprotty main index and exclude the clashing types.
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
35
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.SelectionResult = exports.SelectCommand = exports.SelectAllCommand = exports.GetSelectionCommand = exports.GetSelectionAction = exports.SetPopupModelCommand = exports.PopupHoverMouseListener = exports.HoverMouseListener = exports.HoverKeyListener = exports.HoverFeedbackCommand = exports.HoverFeedbackAction = exports.ClosePopupActionHandler = exports.AbstractHoverMouseListener = exports.SvgExporter = exports.RequestExportSvgAction = exports.ExportSvgPostprocessor = exports.ExportSvgKeyListener = exports.ExportSvgCommand = exports.SShapeElement = exports.layoutContainerFeature = exports.layoutableChildFeature = exports.isSizeable = exports.isLayoutContainer = exports.isLayoutableChild = exports.isBoundsAware = exports.isAlignable = exports.getAbsoluteClientBounds = exports.getAbsoluteBounds = exports.findChildrenAtPosition = exports.boundsFeature = exports.alignFeature = exports.SetBoundsCommand = exports.RequestBoundsCommand = exports.translatePoint = exports.translateBounds = exports.registerModelElement = exports.findParentByFeature = exports.findParent = exports.containsSome = exports.SParentElement = exports.SModelRoot = exports.SModelElement = exports.SChildElement = exports.ModelIndexImpl = exports.isParent = exports.createRandomId = exports.SetModelCommand = exports.SetBoundsAction = exports.CollapseExpandAllAction = exports.CollapseExpandAction = void 0;
|
|
39
|
+
exports.undoRedoModule = exports.selectModule = exports.routingModule = exports.openModule = exports.moveModule = exports.hoverModule = exports.fadeModule = exports.exportModule = exports.expandModule = exports.edgeLayoutModule = exports.edgeIntersectionModule = exports.decorationModule = exports.contextMenuModule = exports.commandPaletteModule = exports.buttonModule = exports.boundsModule = exports.graphModule = exports.defaultModule = exports.PointToPointLine = exports.intersection = exports.Diamond = exports.DiagramServerProxy = exports.ShapedPreRenderedElement = exports.RectangularPort = exports.RectangularNode = exports.PreRenderedElement = exports.HtmlRoot = exports.ForeignObjectElement = exports.DiamondNode = exports.CircularPort = exports.CircularNode = exports.SPort = exports.SNode = exports.SLabel = exports.SGraphIndex = exports.SGraph = exports.SEdge = exports.SCompartment = exports.ViewportResult = exports.ViewportAnimation = exports.SetViewportCommand = exports.GetViewportCommand = exports.GetViewportAction = exports.FitToScreenCommand = exports.CenterKeyboardListener = exports.CenterCommand = exports.BoundsAwareViewportCommand = exports.UpdateModelCommand = exports.SelectMouseListener = exports.SelectKeyboardListener = void 0;
|
|
40
|
+
exports.modelSourceModule = exports.zorderModule = exports.viewportModule = exports.updateModule = void 0;
|
|
41
|
+
__exportStar(require("@eclipse-glsp/protocol"), exports);
|
|
42
|
+
// sprotty-protocol
|
|
43
|
+
var actions_1 = require("sprotty-protocol/lib/actions");
|
|
44
|
+
Object.defineProperty(exports, "CollapseExpandAction", { enumerable: true, get: function () { return actions_1.CollapseExpandAction; } });
|
|
45
|
+
Object.defineProperty(exports, "CollapseExpandAllAction", { enumerable: true, get: function () { return actions_1.CollapseExpandAllAction; } });
|
|
46
|
+
Object.defineProperty(exports, "SetBoundsAction", { enumerable: true, get: function () { return actions_1.SetBoundsAction; } });
|
|
47
|
+
// ------------------ Base ------------------
|
|
48
|
+
__exportStar(require("sprotty/lib/base/actions/action-dispatcher"), exports);
|
|
49
|
+
__exportStar(require("sprotty/lib/base/actions/action-handler"), exports);
|
|
50
|
+
__exportStar(require("sprotty/lib/base/actions/diagram-locker"), exports);
|
|
51
|
+
__exportStar(require("sprotty/lib/base/animations/animation"), exports);
|
|
52
|
+
__exportStar(require("sprotty/lib/base/animations/animation-frame-syncer"), exports);
|
|
53
|
+
__exportStar(require("sprotty/lib/base/animations/easing"), exports);
|
|
54
|
+
__exportStar(require("sprotty/lib/base/commands/command"), exports);
|
|
55
|
+
__exportStar(require("sprotty/lib/base/commands/command-registration"), exports);
|
|
56
|
+
__exportStar(require("sprotty/lib/base/commands/command-stack"), exports);
|
|
57
|
+
__exportStar(require("sprotty/lib/base/commands/command-stack-options"), exports);
|
|
58
|
+
__exportStar(require("sprotty/lib/base/features/initialize-canvas"), exports);
|
|
59
|
+
var set_model_1 = require("sprotty/lib/base/features/set-model");
|
|
60
|
+
Object.defineProperty(exports, "SetModelCommand", { enumerable: true, get: function () { return set_model_1.SetModelCommand; } });
|
|
61
|
+
var smodel_1 = require("sprotty/lib/base/model/smodel");
|
|
62
|
+
Object.defineProperty(exports, "createRandomId", { enumerable: true, get: function () { return smodel_1.createRandomId; } });
|
|
63
|
+
Object.defineProperty(exports, "isParent", { enumerable: true, get: function () { return smodel_1.isParent; } });
|
|
64
|
+
Object.defineProperty(exports, "ModelIndexImpl", { enumerable: true, get: function () { return smodel_1.ModelIndexImpl; } });
|
|
65
|
+
Object.defineProperty(exports, "SChildElement", { enumerable: true, get: function () { return smodel_1.SChildElement; } });
|
|
66
|
+
Object.defineProperty(exports, "SModelElement", { enumerable: true, get: function () { return smodel_1.SModelElement; } });
|
|
67
|
+
Object.defineProperty(exports, "SModelRoot", { enumerable: true, get: function () { return smodel_1.SModelRoot; } });
|
|
68
|
+
Object.defineProperty(exports, "SParentElement", { enumerable: true, get: function () { return smodel_1.SParentElement; } });
|
|
69
|
+
__exportStar(require("sprotty/lib/base/model/smodel-extension"), exports);
|
|
70
|
+
__exportStar(require("sprotty/lib/base/model/smodel-factory"), exports);
|
|
71
|
+
var smodel_utils_1 = require("sprotty/lib/base/model/smodel-utils");
|
|
72
|
+
Object.defineProperty(exports, "containsSome", { enumerable: true, get: function () { return smodel_utils_1.containsSome; } });
|
|
73
|
+
Object.defineProperty(exports, "findParent", { enumerable: true, get: function () { return smodel_utils_1.findParent; } });
|
|
74
|
+
Object.defineProperty(exports, "findParentByFeature", { enumerable: true, get: function () { return smodel_utils_1.findParentByFeature; } });
|
|
75
|
+
Object.defineProperty(exports, "registerModelElement", { enumerable: true, get: function () { return smodel_utils_1.registerModelElement; } });
|
|
76
|
+
Object.defineProperty(exports, "translateBounds", { enumerable: true, get: function () { return smodel_utils_1.translateBounds; } });
|
|
77
|
+
Object.defineProperty(exports, "translatePoint", { enumerable: true, get: function () { return smodel_utils_1.translatePoint; } });
|
|
78
|
+
__exportStar(require("sprotty/lib/base/tool-manager/tool"), exports);
|
|
79
|
+
__exportStar(require("sprotty/lib/base/tool-manager/tool-manager"), exports);
|
|
80
|
+
__exportStar(require("sprotty/lib/base/ui-extensions/ui-extension"), exports);
|
|
81
|
+
__exportStar(require("sprotty/lib/base/ui-extensions/ui-extension-registry"), exports);
|
|
82
|
+
__exportStar(require("sprotty/lib/base/views/key-tool"), exports);
|
|
83
|
+
__exportStar(require("sprotty/lib/base/views/mouse-tool"), exports);
|
|
84
|
+
__exportStar(require("sprotty/lib/base/views/thunk-view"), exports);
|
|
85
|
+
__exportStar(require("sprotty/lib/base/views/view"), exports);
|
|
86
|
+
__exportStar(require("sprotty/lib/base/views/viewer"), exports);
|
|
87
|
+
__exportStar(require("sprotty/lib/base/views/viewer-cache"), exports);
|
|
88
|
+
__exportStar(require("sprotty/lib/base/views/viewer-options"), exports);
|
|
89
|
+
__exportStar(require("sprotty/lib/base/views/vnode-postprocessor"), exports);
|
|
90
|
+
__exportStar(require("sprotty/lib/base/views/vnode-utils"), exports);
|
|
91
|
+
// ------------------ Features ------------------
|
|
92
|
+
var bounds_manipulation_1 = require("sprotty/lib/features/bounds/bounds-manipulation");
|
|
93
|
+
Object.defineProperty(exports, "RequestBoundsCommand", { enumerable: true, get: function () { return bounds_manipulation_1.RequestBoundsCommand; } });
|
|
94
|
+
Object.defineProperty(exports, "SetBoundsCommand", { enumerable: true, get: function () { return bounds_manipulation_1.SetBoundsCommand; } });
|
|
95
|
+
__exportStar(require("sprotty/lib/features/bounds/hbox-layout"), exports);
|
|
96
|
+
__exportStar(require("sprotty/lib/features/bounds/hidden-bounds-updater"), exports);
|
|
97
|
+
__exportStar(require("sprotty/lib/features/bounds/layout"), exports);
|
|
98
|
+
var model_1 = require("sprotty/lib/features/bounds/model");
|
|
99
|
+
Object.defineProperty(exports, "alignFeature", { enumerable: true, get: function () { return model_1.alignFeature; } });
|
|
100
|
+
Object.defineProperty(exports, "boundsFeature", { enumerable: true, get: function () { return model_1.boundsFeature; } });
|
|
101
|
+
Object.defineProperty(exports, "findChildrenAtPosition", { enumerable: true, get: function () { return model_1.findChildrenAtPosition; } });
|
|
102
|
+
Object.defineProperty(exports, "getAbsoluteBounds", { enumerable: true, get: function () { return model_1.getAbsoluteBounds; } });
|
|
103
|
+
Object.defineProperty(exports, "getAbsoluteClientBounds", { enumerable: true, get: function () { return model_1.getAbsoluteClientBounds; } });
|
|
104
|
+
Object.defineProperty(exports, "isAlignable", { enumerable: true, get: function () { return model_1.isAlignable; } });
|
|
105
|
+
Object.defineProperty(exports, "isBoundsAware", { enumerable: true, get: function () { return model_1.isBoundsAware; } });
|
|
106
|
+
Object.defineProperty(exports, "isLayoutableChild", { enumerable: true, get: function () { return model_1.isLayoutableChild; } });
|
|
107
|
+
Object.defineProperty(exports, "isLayoutContainer", { enumerable: true, get: function () { return model_1.isLayoutContainer; } });
|
|
108
|
+
Object.defineProperty(exports, "isSizeable", { enumerable: true, get: function () { return model_1.isSizeable; } });
|
|
109
|
+
Object.defineProperty(exports, "layoutableChildFeature", { enumerable: true, get: function () { return model_1.layoutableChildFeature; } });
|
|
110
|
+
Object.defineProperty(exports, "layoutContainerFeature", { enumerable: true, get: function () { return model_1.layoutContainerFeature; } });
|
|
111
|
+
Object.defineProperty(exports, "SShapeElement", { enumerable: true, get: function () { return model_1.SShapeElement; } });
|
|
112
|
+
__exportStar(require("sprotty/lib/features/bounds/stack-layout"), exports);
|
|
113
|
+
__exportStar(require("sprotty/lib/features/bounds/vbox-layout"), exports);
|
|
114
|
+
__exportStar(require("sprotty/lib/features/bounds/views"), exports);
|
|
115
|
+
__exportStar(require("sprotty/lib/features/button/button-handler"), exports);
|
|
116
|
+
__exportStar(require("sprotty/lib/features/button/model"), exports);
|
|
117
|
+
__exportStar(require("sprotty/lib/features/command-palette/action-providers"), exports);
|
|
118
|
+
__exportStar(require("sprotty/lib/features/command-palette/command-palette"), exports);
|
|
119
|
+
__exportStar(require("sprotty/lib/features/context-menu/menu-providers"), exports);
|
|
120
|
+
__exportStar(require("sprotty/lib/features/context-menu/mouse-listener"), exports);
|
|
121
|
+
__exportStar(require("sprotty/lib/features/decoration/decoration-placer"), exports);
|
|
122
|
+
__exportStar(require("sprotty/lib/features/decoration/model"), exports);
|
|
123
|
+
__exportStar(require("sprotty/lib/features/decoration/views"), exports);
|
|
124
|
+
__exportStar(require("sprotty/lib/features/edge-intersection/intersection-finder"), exports);
|
|
125
|
+
__exportStar(require("sprotty/lib/features/edge-intersection/sweepline"), exports);
|
|
126
|
+
__exportStar(require("sprotty/lib/features/edge-layout/di.config"), exports);
|
|
127
|
+
__exportStar(require("sprotty/lib/features/edge-layout/edge-layout"), exports);
|
|
128
|
+
__exportStar(require("sprotty/lib/features/edge-layout/model"), exports);
|
|
129
|
+
__exportStar(require("sprotty/lib/features/edit/create"), exports);
|
|
130
|
+
__exportStar(require("sprotty/lib/features/edit/create-on-drag"), exports);
|
|
131
|
+
__exportStar(require("sprotty/lib/features/edit/delete"), exports);
|
|
132
|
+
__exportStar(require("sprotty/lib/features/edit/di.config"), exports);
|
|
133
|
+
__exportStar(require("sprotty/lib/features/edit/edit-label"), exports);
|
|
134
|
+
__exportStar(require("sprotty/lib/features/edit/edit-label-ui"), exports);
|
|
135
|
+
__exportStar(require("sprotty/lib/features/edit/edit-routing"), exports);
|
|
136
|
+
__exportStar(require("sprotty/lib/features/edit/model"), exports);
|
|
137
|
+
__exportStar(require("sprotty/lib/features/edit/reconnect"), exports);
|
|
138
|
+
__exportStar(require("sprotty/lib/features/expand/expand"), exports);
|
|
139
|
+
__exportStar(require("sprotty/lib/features/expand/model"), exports);
|
|
140
|
+
__exportStar(require("sprotty/lib/features/expand/views"), exports);
|
|
141
|
+
var export_1 = require("sprotty/lib/features/export/export");
|
|
142
|
+
Object.defineProperty(exports, "ExportSvgCommand", { enumerable: true, get: function () { return export_1.ExportSvgCommand; } });
|
|
143
|
+
Object.defineProperty(exports, "ExportSvgKeyListener", { enumerable: true, get: function () { return export_1.ExportSvgKeyListener; } });
|
|
144
|
+
Object.defineProperty(exports, "ExportSvgPostprocessor", { enumerable: true, get: function () { return export_1.ExportSvgPostprocessor; } });
|
|
145
|
+
Object.defineProperty(exports, "RequestExportSvgAction", { enumerable: true, get: function () { return export_1.RequestExportSvgAction; } });
|
|
146
|
+
__exportStar(require("sprotty/lib/features/export/model"), exports);
|
|
147
|
+
var svg_exporter_1 = require("sprotty/lib/features/export/svg-exporter");
|
|
148
|
+
Object.defineProperty(exports, "SvgExporter", { enumerable: true, get: function () { return svg_exporter_1.SvgExporter; } });
|
|
149
|
+
__exportStar(require("sprotty/lib/features/fade/fade"), exports);
|
|
150
|
+
__exportStar(require("sprotty/lib/features/fade/model"), exports);
|
|
151
|
+
var hover_1 = require("sprotty/lib/features/hover/hover");
|
|
152
|
+
Object.defineProperty(exports, "AbstractHoverMouseListener", { enumerable: true, get: function () { return hover_1.AbstractHoverMouseListener; } });
|
|
153
|
+
Object.defineProperty(exports, "ClosePopupActionHandler", { enumerable: true, get: function () { return hover_1.ClosePopupActionHandler; } });
|
|
154
|
+
Object.defineProperty(exports, "HoverFeedbackAction", { enumerable: true, get: function () { return hover_1.HoverFeedbackAction; } });
|
|
155
|
+
Object.defineProperty(exports, "HoverFeedbackCommand", { enumerable: true, get: function () { return hover_1.HoverFeedbackCommand; } });
|
|
156
|
+
Object.defineProperty(exports, "HoverKeyListener", { enumerable: true, get: function () { return hover_1.HoverKeyListener; } });
|
|
157
|
+
Object.defineProperty(exports, "HoverMouseListener", { enumerable: true, get: function () { return hover_1.HoverMouseListener; } });
|
|
158
|
+
Object.defineProperty(exports, "PopupHoverMouseListener", { enumerable: true, get: function () { return hover_1.PopupHoverMouseListener; } });
|
|
159
|
+
Object.defineProperty(exports, "SetPopupModelCommand", { enumerable: true, get: function () { return hover_1.SetPopupModelCommand; } });
|
|
160
|
+
__exportStar(require("sprotty/lib/features/hover/model"), exports);
|
|
161
|
+
__exportStar(require("sprotty/lib/features/move/model"), exports);
|
|
162
|
+
__exportStar(require("sprotty/lib/features/move/move"), exports);
|
|
163
|
+
__exportStar(require("sprotty/lib/features/move/snap"), exports);
|
|
164
|
+
__exportStar(require("sprotty/lib/features/nameable/model"), exports);
|
|
165
|
+
__exportStar(require("sprotty/lib/features/open/model"), exports);
|
|
166
|
+
__exportStar(require("sprotty/lib/features/open/open"), exports);
|
|
167
|
+
__exportStar(require("sprotty/lib/features/projection/model"), exports);
|
|
168
|
+
__exportStar(require("sprotty/lib/features/projection/views"), exports);
|
|
169
|
+
__exportStar(require("sprotty/lib/features/routing/abstract-edge-router"), exports);
|
|
170
|
+
__exportStar(require("sprotty/lib/features/routing/anchor"), exports);
|
|
171
|
+
__exportStar(require("sprotty/lib/features/routing/bezier-anchors"), exports);
|
|
172
|
+
__exportStar(require("sprotty/lib/features/routing/bezier-edge-router"), exports);
|
|
173
|
+
__exportStar(require("sprotty/lib/features/routing/manhattan-anchors"), exports);
|
|
174
|
+
__exportStar(require("sprotty/lib/features/routing/manhattan-edge-router"), exports);
|
|
175
|
+
__exportStar(require("sprotty/lib/features/routing/model"), exports);
|
|
176
|
+
__exportStar(require("sprotty/lib/features/routing/polyline-anchors"), exports);
|
|
177
|
+
__exportStar(require("sprotty/lib/features/routing/polyline-edge-router"), exports);
|
|
178
|
+
__exportStar(require("sprotty/lib/features/routing/routing"), exports);
|
|
179
|
+
__exportStar(require("sprotty/lib/features/routing/views"), exports);
|
|
180
|
+
__exportStar(require("sprotty/lib/features/select/model"), exports);
|
|
181
|
+
var select_1 = require("sprotty/lib/features/select/select");
|
|
182
|
+
Object.defineProperty(exports, "GetSelectionAction", { enumerable: true, get: function () { return select_1.GetSelectionAction; } });
|
|
183
|
+
Object.defineProperty(exports, "GetSelectionCommand", { enumerable: true, get: function () { return select_1.GetSelectionCommand; } });
|
|
184
|
+
Object.defineProperty(exports, "SelectAllCommand", { enumerable: true, get: function () { return select_1.SelectAllCommand; } });
|
|
185
|
+
Object.defineProperty(exports, "SelectCommand", { enumerable: true, get: function () { return select_1.SelectCommand; } });
|
|
186
|
+
Object.defineProperty(exports, "SelectionResult", { enumerable: true, get: function () { return select_1.SelectionResult; } });
|
|
187
|
+
Object.defineProperty(exports, "SelectKeyboardListener", { enumerable: true, get: function () { return select_1.SelectKeyboardListener; } });
|
|
188
|
+
Object.defineProperty(exports, "SelectMouseListener", { enumerable: true, get: function () { return select_1.SelectMouseListener; } });
|
|
189
|
+
__exportStar(require("sprotty/lib/features/undo-redo/undo-redo"), exports);
|
|
190
|
+
__exportStar(require("sprotty/lib/features/update/model-matching"), exports);
|
|
191
|
+
var update_model_1 = require("sprotty/lib/features/update/update-model");
|
|
192
|
+
Object.defineProperty(exports, "UpdateModelCommand", { enumerable: true, get: function () { return update_model_1.UpdateModelCommand; } });
|
|
193
|
+
var center_fit_1 = require("sprotty/lib/features/viewport/center-fit");
|
|
194
|
+
Object.defineProperty(exports, "BoundsAwareViewportCommand", { enumerable: true, get: function () { return center_fit_1.BoundsAwareViewportCommand; } });
|
|
195
|
+
Object.defineProperty(exports, "CenterCommand", { enumerable: true, get: function () { return center_fit_1.CenterCommand; } });
|
|
196
|
+
Object.defineProperty(exports, "CenterKeyboardListener", { enumerable: true, get: function () { return center_fit_1.CenterKeyboardListener; } });
|
|
197
|
+
Object.defineProperty(exports, "FitToScreenCommand", { enumerable: true, get: function () { return center_fit_1.FitToScreenCommand; } });
|
|
198
|
+
__exportStar(require("sprotty/lib/features/viewport/model"), exports);
|
|
199
|
+
__exportStar(require("sprotty/lib/features/viewport/scroll"), exports);
|
|
200
|
+
var viewport_1 = require("sprotty/lib/features/viewport/viewport");
|
|
201
|
+
Object.defineProperty(exports, "GetViewportAction", { enumerable: true, get: function () { return viewport_1.GetViewportAction; } });
|
|
202
|
+
Object.defineProperty(exports, "GetViewportCommand", { enumerable: true, get: function () { return viewport_1.GetViewportCommand; } });
|
|
203
|
+
Object.defineProperty(exports, "SetViewportCommand", { enumerable: true, get: function () { return viewport_1.SetViewportCommand; } });
|
|
204
|
+
Object.defineProperty(exports, "ViewportAnimation", { enumerable: true, get: function () { return viewport_1.ViewportAnimation; } });
|
|
205
|
+
Object.defineProperty(exports, "ViewportResult", { enumerable: true, get: function () { return viewport_1.ViewportResult; } });
|
|
206
|
+
__exportStar(require("sprotty/lib/features/viewport/viewport-root"), exports);
|
|
207
|
+
__exportStar(require("sprotty/lib/features/viewport/zoom"), exports);
|
|
208
|
+
__exportStar(require("sprotty/lib/features/zorder/zorder"), exports);
|
|
209
|
+
var sgraph_1 = require("sprotty/lib/graph/sgraph");
|
|
210
|
+
Object.defineProperty(exports, "SCompartment", { enumerable: true, get: function () { return sgraph_1.SCompartment; } });
|
|
211
|
+
Object.defineProperty(exports, "SEdge", { enumerable: true, get: function () { return sgraph_1.SEdge; } });
|
|
212
|
+
Object.defineProperty(exports, "SGraph", { enumerable: true, get: function () { return sgraph_1.SGraph; } });
|
|
213
|
+
Object.defineProperty(exports, "SGraphIndex", { enumerable: true, get: function () { return sgraph_1.SGraphIndex; } });
|
|
214
|
+
Object.defineProperty(exports, "SLabel", { enumerable: true, get: function () { return sgraph_1.SLabel; } });
|
|
215
|
+
Object.defineProperty(exports, "SNode", { enumerable: true, get: function () { return sgraph_1.SNode; } });
|
|
216
|
+
Object.defineProperty(exports, "SPort", { enumerable: true, get: function () { return sgraph_1.SPort; } });
|
|
217
|
+
// ------------------ Graph ------------------
|
|
218
|
+
__exportStar(require("sprotty/lib/graph/sgraph-factory"), exports);
|
|
219
|
+
__exportStar(require("sprotty/lib/graph/views"), exports);
|
|
220
|
+
__exportStar(require("sprotty/lib/lib/generic-views"), exports);
|
|
221
|
+
__exportStar(require("sprotty/lib/lib/html-views"), exports);
|
|
222
|
+
__exportStar(require("sprotty/lib/lib/jsx"), exports);
|
|
223
|
+
var model_2 = require("sprotty/lib/lib/model");
|
|
224
|
+
Object.defineProperty(exports, "CircularNode", { enumerable: true, get: function () { return model_2.CircularNode; } });
|
|
225
|
+
Object.defineProperty(exports, "CircularPort", { enumerable: true, get: function () { return model_2.CircularPort; } });
|
|
226
|
+
Object.defineProperty(exports, "DiamondNode", { enumerable: true, get: function () { return model_2.DiamondNode; } });
|
|
227
|
+
Object.defineProperty(exports, "ForeignObjectElement", { enumerable: true, get: function () { return model_2.ForeignObjectElement; } });
|
|
228
|
+
Object.defineProperty(exports, "HtmlRoot", { enumerable: true, get: function () { return model_2.HtmlRoot; } });
|
|
229
|
+
Object.defineProperty(exports, "PreRenderedElement", { enumerable: true, get: function () { return model_2.PreRenderedElement; } });
|
|
230
|
+
Object.defineProperty(exports, "RectangularNode", { enumerable: true, get: function () { return model_2.RectangularNode; } });
|
|
231
|
+
Object.defineProperty(exports, "RectangularPort", { enumerable: true, get: function () { return model_2.RectangularPort; } });
|
|
232
|
+
Object.defineProperty(exports, "ShapedPreRenderedElement", { enumerable: true, get: function () { return model_2.ShapedPreRenderedElement; } });
|
|
233
|
+
// ------------------ Library ------------------
|
|
234
|
+
__exportStar(require("sprotty/lib/lib/modules"), exports);
|
|
235
|
+
__exportStar(require("sprotty/lib/lib/svg-views"), exports);
|
|
236
|
+
// ------------------ Model Source ------------------
|
|
237
|
+
__exportStar(require("sprotty/lib/model-source/commit-model"), exports);
|
|
238
|
+
var diagram_server_1 = require("sprotty/lib/model-source/diagram-server");
|
|
239
|
+
Object.defineProperty(exports, "DiagramServerProxy", { enumerable: true, get: function () { return diagram_server_1.DiagramServerProxy; } });
|
|
240
|
+
__exportStar(require("sprotty/lib/model-source/local-model-source"), exports);
|
|
241
|
+
__exportStar(require("sprotty/lib/model-source/logging"), exports);
|
|
242
|
+
__exportStar(require("sprotty/lib/model-source/model-source"), exports);
|
|
243
|
+
__exportStar(require("sprotty/lib/model-source/websocket"), exports);
|
|
244
|
+
// ------------------ Utilities ------------------
|
|
245
|
+
__exportStar(require("sprotty/lib/utils/browser"), exports);
|
|
246
|
+
__exportStar(require("sprotty/lib/utils/codicon"), exports);
|
|
247
|
+
__exportStar(require("sprotty/lib/utils/color"), exports);
|
|
248
|
+
var geometry_1 = require("sprotty/lib/utils/geometry");
|
|
249
|
+
Object.defineProperty(exports, "Diamond", { enumerable: true, get: function () { return geometry_1.Diamond; } });
|
|
250
|
+
Object.defineProperty(exports, "intersection", { enumerable: true, get: function () { return geometry_1.intersection; } });
|
|
251
|
+
Object.defineProperty(exports, "PointToPointLine", { enumerable: true, get: function () { return geometry_1.PointToPointLine; } });
|
|
252
|
+
__exportStar(require("sprotty/lib/utils/inversify"), exports);
|
|
253
|
+
__exportStar(require("sprotty/lib/utils/logging"), exports);
|
|
254
|
+
__exportStar(require("sprotty/lib/utils/registry"), exports);
|
|
255
|
+
const di_config_1 = require("sprotty/lib/base/di.config");
|
|
256
|
+
exports.defaultModule = di_config_1.default;
|
|
257
|
+
const di_config_2 = require("sprotty/lib/features/bounds/di.config");
|
|
258
|
+
exports.boundsModule = di_config_2.default;
|
|
259
|
+
const di_config_3 = require("sprotty/lib/features/button/di.config");
|
|
260
|
+
exports.buttonModule = di_config_3.default;
|
|
261
|
+
const di_config_4 = require("sprotty/lib/features/command-palette/di.config");
|
|
262
|
+
exports.commandPaletteModule = di_config_4.default;
|
|
263
|
+
const di_config_5 = require("sprotty/lib/features/context-menu/di.config");
|
|
264
|
+
exports.contextMenuModule = di_config_5.default;
|
|
265
|
+
const di_config_6 = require("sprotty/lib/features/decoration/di.config");
|
|
266
|
+
exports.decorationModule = di_config_6.default;
|
|
267
|
+
const di_config_7 = require("sprotty/lib/features/edge-intersection/di.config");
|
|
268
|
+
exports.edgeIntersectionModule = di_config_7.default;
|
|
269
|
+
const di_config_8 = require("sprotty/lib/features/edge-layout/di.config");
|
|
270
|
+
exports.edgeLayoutModule = di_config_8.default;
|
|
271
|
+
const di_config_9 = require("sprotty/lib/features/expand/di.config");
|
|
272
|
+
exports.expandModule = di_config_9.default;
|
|
273
|
+
const di_config_10 = require("sprotty/lib/features/export/di.config");
|
|
274
|
+
exports.exportModule = di_config_10.default;
|
|
275
|
+
const di_config_11 = require("sprotty/lib/features/fade/di.config");
|
|
276
|
+
exports.fadeModule = di_config_11.default;
|
|
277
|
+
const di_config_12 = require("sprotty/lib/features/hover/di.config");
|
|
278
|
+
exports.hoverModule = di_config_12.default;
|
|
279
|
+
const di_config_13 = require("sprotty/lib/features/move/di.config");
|
|
280
|
+
exports.moveModule = di_config_13.default;
|
|
281
|
+
const di_config_14 = require("sprotty/lib/features/open/di.config");
|
|
282
|
+
exports.openModule = di_config_14.default;
|
|
283
|
+
const di_config_15 = require("sprotty/lib/features/routing/di.config");
|
|
284
|
+
exports.routingModule = di_config_15.default;
|
|
285
|
+
const di_config_16 = require("sprotty/lib/features/select/di.config");
|
|
286
|
+
exports.selectModule = di_config_16.default;
|
|
287
|
+
const di_config_17 = require("sprotty/lib/features/undo-redo/di.config");
|
|
288
|
+
exports.undoRedoModule = di_config_17.default;
|
|
289
|
+
const di_config_18 = require("sprotty/lib/features/update/di.config");
|
|
290
|
+
exports.updateModule = di_config_18.default;
|
|
291
|
+
const di_config_19 = require("sprotty/lib/features/viewport/di.config");
|
|
292
|
+
exports.viewportModule = di_config_19.default;
|
|
293
|
+
const di_config_20 = require("sprotty/lib/features/zorder/di.config");
|
|
294
|
+
exports.zorderModule = di_config_20.default;
|
|
295
|
+
const di_config_21 = require("sprotty/lib/graph/di.config");
|
|
296
|
+
exports.graphModule = di_config_21.default;
|
|
297
|
+
const di_config_22 = require("sprotty/lib/model-source/di.config");
|
|
298
|
+
exports.modelSourceModule = di_config_22.default;
|
|
299
|
+
//# sourceMappingURL=sprotty-reexport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s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,oBAAU,CAvBH;AAwBd,uEAAmE;AAvB/D,wBAuBG,oBAAa,CAvBH;AAwBjB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,yEAAsE;AAvBlE,yBAuBG,oBAAc,CAvBH;AAwBlB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,wEAAqE;AAvBjE,yBAuBG,oBAAc,CAvBH;AAwBlB,sEAAiE;AAvB7D,uBAuBG,oBAAY,CAvBH;AAwBhB,4DAAsD;AA3ClD,sBA2CG,oBAAW,CA3CH;AA4Cf,mEAAmE;AAvB1D,4BAuBF,oBAAiB,CAvBE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-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
|
|
@@ -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 { Point } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { BoundsAware,
|
|
16
|
+
import { Dimension, ElementAndBounds, Point } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { BoundsAware, ElementMove, ModelLayoutOptions, SModelElement } from 'sprotty';
|
|
18
18
|
import { IMovementRestrictor } from '../features/change-bounds/movement-restrictor';
|
|
19
19
|
export declare function minWidth(element: SModelElement & BoundsAware): number;
|
|
20
20
|
export declare function minHeight(element: SModelElement & BoundsAware): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-utils.d.ts","sourceRoot":"","sources":["../../src/utils/layout-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAA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,WAAW,oBAAqB,SAAQ,WAAW;IACrD,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,UAAU,EAAE,cAAc,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IAC/D,WAAW,EAAE,cAAc,CAAC;IAC5B,OAAO,EAAE,kBAAkB,CAAC;CAC/B"}
|
|
@@ -13,51 +13,60 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { ElementAndRoutingPoints } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { BoundsAware,
|
|
16
|
+
import { ElementAndBounds, ElementAndRoutingPoints, SModelElementSchema, TypeGuard } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { BoundsAware, ModelIndexImpl, Selectable, SModelElement, SRoutableElement, SRoutingHandle } from 'sprotty';
|
|
18
18
|
import { FluentIterable } from 'sprotty/lib/utils/iterable';
|
|
19
19
|
/**
|
|
20
20
|
* Helper type to represent a filter predicate for {@link SModelElement}s. This is used to retrieve
|
|
21
|
-
* elements from the {@link
|
|
21
|
+
* elements from the {@link ModelIndexImpl} that also conform to a second type `T`. Its mainly used for
|
|
22
22
|
* retrieving elements that also implement a certain model features (e.g. selectable)
|
|
23
23
|
*/
|
|
24
24
|
export declare type ModelFilterPredicate<T> = (modelElement: SModelElement) => modelElement is SModelElement & T;
|
|
25
25
|
/**
|
|
26
|
-
* Retrieves all elements from the given {@link
|
|
27
|
-
* @param index The {@link
|
|
26
|
+
* Retrieves all elements from the given {@link ModelIndexImpl} that match the given {@link ModelFilterPredicate}
|
|
27
|
+
* @param index The {@link ModelIndexImpl}.
|
|
28
28
|
* @param predicate The {@link ModelFilterPredicate} that should be used.
|
|
29
29
|
* @returns A {@link FluentIterable} of all indexed element that match the predicate
|
|
30
30
|
* (correctly casted to also include the additional type of the predicate).
|
|
31
31
|
*/
|
|
32
|
-
export declare function filter<T>(index:
|
|
32
|
+
export declare function filter<T>(index: ModelIndexImpl, predicate: ModelFilterPredicate<T>): FluentIterable<SModelElement & T>;
|
|
33
33
|
/**
|
|
34
|
-
* Retrieves all elements from the given {@link
|
|
34
|
+
* Retrieves all elements from the given {@link ModelIndexImpl} that match the given {@link ModelFilterPredicate} and executes
|
|
35
35
|
* the given runnable for each element of the result set.
|
|
36
|
-
* @param index The {@link
|
|
36
|
+
* @param index The {@link ModelIndexImpl}.
|
|
37
37
|
* @param predicate The {@link ModelFilterPredicate} that should be used.
|
|
38
38
|
* @param runnable The runnable that should be executed for each matching element.
|
|
39
39
|
*/
|
|
40
|
-
export declare function forEachElement<T>(index:
|
|
40
|
+
export declare function forEachElement<T>(index: ModelIndexImpl, predicate: ModelFilterPredicate<T>, runnable: (modelElement: SModelElement & T) => void): void;
|
|
41
41
|
/**
|
|
42
|
-
* Retrieves an array of all elements that match the given {@link ModelFilterPredicate} from the given {@link
|
|
43
|
-
* @param index The {@link
|
|
42
|
+
* Retrieves an array of all elements that match the given {@link ModelFilterPredicate} from the given {@link ModelIndexImpl}.
|
|
43
|
+
* @param index The {@link ModelIndexImpl}.
|
|
44
44
|
* @param predicate The {@link ModelFilterPredicate} that should be used.
|
|
45
45
|
* @returns An array of all indexed element that match the predicate
|
|
46
46
|
* (correctly casted to also include the additional type of the predicate).
|
|
47
47
|
*/
|
|
48
|
-
export declare function getMatchingElements<T>(index:
|
|
48
|
+
export declare function getMatchingElements<T>(index: ModelIndexImpl, predicate: ModelFilterPredicate<T>): (SModelElement & T)[];
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
50
|
+
* Invokes the given model index to retrieve the corresponding model elements for the given set of ids. Ids that
|
|
51
|
+
* have no corresponding element in the index will be ignored.
|
|
52
|
+
* @param index THe model index.
|
|
53
|
+
* @param elementsIDs The element ids.
|
|
54
|
+
* @param guard Optional typeguard. If defined only elements that match the guard will be returned.
|
|
55
|
+
* @returns An array of the model elements that correspond to the given ids and filter predicate.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getElements<S extends SModelElement>(index: ModelIndexImpl, elementsIDs: string[], guard?: TypeGuard<S>): S[];
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves the amount of currently selected elements in the given {@link ModelIndexImpl}.
|
|
60
|
+
* @param index The {@link ModelIndexImpl}.
|
|
52
61
|
* @returns The amount of selected elements.
|
|
53
62
|
*/
|
|
54
|
-
export declare function getSelectedElementCount(index:
|
|
63
|
+
export declare function getSelectedElementCount(index: ModelIndexImpl): number;
|
|
55
64
|
/**
|
|
56
|
-
* Helper function to check wether an any element is selected in the given {@link
|
|
57
|
-
* @param index The {@link
|
|
65
|
+
* Helper function to check wether an any element is selected in the given {@link ModelIndexImpl}.
|
|
66
|
+
* @param index The {@link ModelIndexImpl}.
|
|
58
67
|
* @returns `true` if at least one element is selected, `false` otherwise.
|
|
59
68
|
*/
|
|
60
|
-
export declare function hasSelectedElements(index:
|
|
69
|
+
export declare function hasSelectedElements(index: ModelIndexImpl): boolean;
|
|
61
70
|
/**
|
|
62
71
|
* Helper function to check wether an element is defined. Can be used as {@link ModelFilterPredicate}.
|
|
63
72
|
* @param element The element that should be checked.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smodel-util.d.ts","sourceRoot":"","sources":["../../src/utils/smodel-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAe,uBAAuB,EAAU,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"smodel-util.d.ts","sourceRoot":"","sources":["../../src/utils/smodel-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAe,gBAAgB,EAAE,uBAAuB,EAAU,mBAAmB,EAAE,SAAS,EAAE,MA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AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,mBAAmB,GAAG,MAAM,GAAG,MAAM,CAM5F"}
|
package/lib/utils/smodel-util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getElementTypeId = exports.hasCompatibleType = exports.toElementAndRoutingPoints = exports.toElementAndBounds = exports.isSelectableAndBoundsAware = exports.isRoutingHandle = exports.isRoutable = exports.isNonRoutableSelectedBoundsAware = exports.isNonRoutableSelectedMovableBoundsAware = exports.removeCssClasses = exports.addCssClasses = exports.isNotUndefined = exports.hasSelectedElements = exports.getSelectedElementCount = exports.getMatchingElements = exports.forEachElement = exports.filter = void 0;
|
|
3
|
+
exports.getElementTypeId = exports.hasCompatibleType = exports.toElementAndRoutingPoints = exports.toElementAndBounds = exports.isSelectableAndBoundsAware = exports.isRoutingHandle = exports.isRoutable = exports.isNonRoutableSelectedBoundsAware = exports.isNonRoutableSelectedMovableBoundsAware = exports.removeCssClasses = exports.addCssClasses = exports.isNotUndefined = exports.hasSelectedElements = exports.getSelectedElementCount = exports.getElements = exports.getMatchingElements = exports.forEachElement = exports.filter = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
5
|
* Copyright (c) 2019-2022 EclipseSource and others.
|
|
6
6
|
*
|
|
@@ -19,8 +19,8 @@ exports.getElementTypeId = exports.hasCompatibleType = exports.toElementAndRouti
|
|
|
19
19
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
20
20
|
const sprotty_1 = require("sprotty");
|
|
21
21
|
/**
|
|
22
|
-
* Retrieves all elements from the given {@link
|
|
23
|
-
* @param index The {@link
|
|
22
|
+
* Retrieves all elements from the given {@link ModelIndexImpl} that match the given {@link ModelFilterPredicate}
|
|
23
|
+
* @param index The {@link ModelIndexImpl}.
|
|
24
24
|
* @param predicate The {@link ModelFilterPredicate} that should be used.
|
|
25
25
|
* @returns A {@link FluentIterable} of all indexed element that match the predicate
|
|
26
26
|
* (correctly casted to also include the additional type of the predicate).
|
|
@@ -30,9 +30,9 @@ function filter(index, predicate) {
|
|
|
30
30
|
}
|
|
31
31
|
exports.filter = filter;
|
|
32
32
|
/**
|
|
33
|
-
* Retrieves all elements from the given {@link
|
|
33
|
+
* Retrieves all elements from the given {@link ModelIndexImpl} that match the given {@link ModelFilterPredicate} and executes
|
|
34
34
|
* the given runnable for each element of the result set.
|
|
35
|
-
* @param index The {@link
|
|
35
|
+
* @param index The {@link ModelIndexImpl}.
|
|
36
36
|
* @param predicate The {@link ModelFilterPredicate} that should be used.
|
|
37
37
|
* @param runnable The runnable that should be executed for each matching element.
|
|
38
38
|
*/
|
|
@@ -41,8 +41,8 @@ function forEachElement(index, predicate, runnable) {
|
|
|
41
41
|
}
|
|
42
42
|
exports.forEachElement = forEachElement;
|
|
43
43
|
/**
|
|
44
|
-
* Retrieves an array of all elements that match the given {@link ModelFilterPredicate} from the given {@link
|
|
45
|
-
* @param index The {@link
|
|
44
|
+
* Retrieves an array of all elements that match the given {@link ModelFilterPredicate} from the given {@link ModelIndexImpl}.
|
|
45
|
+
* @param index The {@link ModelIndexImpl}.
|
|
46
46
|
* @param predicate The {@link ModelFilterPredicate} that should be used.
|
|
47
47
|
* @returns An array of all indexed element that match the predicate
|
|
48
48
|
* (correctly casted to also include the additional type of the predicate).
|
|
@@ -52,8 +52,27 @@ function getMatchingElements(index, predicate) {
|
|
|
52
52
|
}
|
|
53
53
|
exports.getMatchingElements = getMatchingElements;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
55
|
+
* Invokes the given model index to retrieve the corresponding model elements for the given set of ids. Ids that
|
|
56
|
+
* have no corresponding element in the index will be ignored.
|
|
57
|
+
* @param index THe model index.
|
|
58
|
+
* @param elementsIDs The element ids.
|
|
59
|
+
* @param guard Optional typeguard. If defined only elements that match the guard will be returned.
|
|
60
|
+
* @returns An array of the model elements that correspond to the given ids and filter predicate.
|
|
61
|
+
*/
|
|
62
|
+
function getElements(index, elementsIDs, guard) {
|
|
63
|
+
// Internal filter function that filters out undefined model elements and runs an optional typeguard check.
|
|
64
|
+
const filterFn = (element) => {
|
|
65
|
+
if (element !== undefined) {
|
|
66
|
+
return guard ? guard(element) : true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
return elementsIDs.map(id => index.getById(id)).filter(filterFn);
|
|
71
|
+
}
|
|
72
|
+
exports.getElements = getElements;
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves the amount of currently selected elements in the given {@link ModelIndexImpl}.
|
|
75
|
+
* @param index The {@link ModelIndexImpl}.
|
|
57
76
|
* @returns The amount of selected elements.
|
|
58
77
|
*/
|
|
59
78
|
function getSelectedElementCount(index) {
|
|
@@ -63,8 +82,8 @@ function getSelectedElementCount(index) {
|
|
|
63
82
|
}
|
|
64
83
|
exports.getSelectedElementCount = getSelectedElementCount;
|
|
65
84
|
/**
|
|
66
|
-
* Helper function to check wether an any element is selected in the given {@link
|
|
67
|
-
* @param index The {@link
|
|
85
|
+
* Helper function to check wether an any element is selected in the given {@link ModelIndexImpl}.
|
|
86
|
+
* @param index The {@link ModelIndexImpl}.
|
|
68
87
|
* @returns `true` if at least one element is selected, `false` otherwise.
|
|
69
88
|
*/
|
|
70
89
|
function hasSelectedElements(index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smodel-util.js","sourceRoot":"","sources":["../../src/utils/smodel-util.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"smodel-util.js","sourceRoot":"","sources":["../../src/utils/smodel-util.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAwI;AACxI,qCAWiB;AAUjB;;;;;;GAMG;AACH,SAAgB,MAAM,CAAI,KAAqB,EAAE,SAAkC;IAC/E,OAAO,KAAK,CAAC,GAAG,EAA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3C;AACL,CAAC;AAND,4CAMC"}
|
|
@@ -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
|
|
@@ -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 { Bounds, Point } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { BoundsAware,
|
|
16
|
+
import { Bounds, Dimension, Point } from '@eclipse-glsp/protocol';
|
|
17
|
+
import { BoundsAware, SModelElement } from 'sprotty';
|
|
18
18
|
/**
|
|
19
19
|
* Return the position corresponding to this mouse event (Browser coordinates)
|
|
20
20
|
* in the diagram coordinates system (i.e. relative to the Diagram's 0;0 point)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewpoint-util.d.ts","sourceRoot":"","sources":["../../src/utils/viewpoint-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;
|
|
1
|
+
{"version":3,"file":"viewpoint-util.d.ts","sourceRoot":"","sources":["../../src/utils/viewpoint-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAY,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAgD,aAAa,EAAmB,MAAM,SAAS,CAAC;AAEpH;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,GAAG,KAAK,CAsBxF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,WAAW,GAAG,MAAM,CAO7E;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,KAAK,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,SAAS,CAE7E"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2019-2022 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.toAbsoluteSize = exports.toAbsolutePosition = exports.toAbsoluteBounds = exports.getAbsolutePosition = void 0;
|
|
19
|
+
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
4
20
|
const sprotty_1 = require("sprotty");
|
|
5
21
|
/**
|
|
6
22
|
* Return the position corresponding to this mouse event (Browser coordinates)
|
|
@@ -43,7 +59,7 @@ exports.getAbsolutePosition = getAbsolutePosition;
|
|
|
43
59
|
* @param target A bounds-aware element from the diagram
|
|
44
60
|
*/
|
|
45
61
|
function toAbsoluteBounds(element) {
|
|
46
|
-
const location = (0, sprotty_1.isAlignable)(element) ? element.alignment :
|
|
62
|
+
const location = (0, sprotty_1.isAlignable)(element) ? element.alignment : protocol_1.Point.ORIGIN;
|
|
47
63
|
const x = location.x;
|
|
48
64
|
const y = location.y;
|
|
49
65
|
const width = element.bounds.width;
|