@eclipse-glsp/client 1.1.0-next.a6b28e7.258 → 1.1.0-next.a6d39b4.266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/decoration.css +0 -7
- package/css/glsp-sprotty.css +7 -0
- package/css/key-shortcut.css +107 -0
- package/css/status-overlay.css +75 -0
- 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 +3 -0
- package/lib/base/action-dispatcher.js.map +1 -1
- package/lib/base/{di.config.d.ts → default.module.d.ts} +8 -5
- package/lib/base/default.module.d.ts.map +1 -0
- package/lib/base/{di.config.js → default.module.js} +16 -9
- package/lib/base/default.module.js.map +1 -0
- package/lib/base/editor-context-service.d.ts +8 -2
- package/lib/base/editor-context-service.d.ts.map +1 -1
- package/lib/base/editor-context-service.js +24 -8
- package/lib/base/editor-context-service.js.map +1 -1
- package/lib/base/{actions/focus-change-action.d.ts → focus/focus-state-change-action.d.ts} +1 -1
- package/lib/base/focus/focus-state-change-action.d.ts.map +1 -0
- package/lib/base/{actions/focus-change-action.js → focus/focus-state-change-action.js} +1 -1
- package/lib/base/focus/focus-state-change-action.js.map +1 -0
- package/lib/base/{focus-tracker.d.ts → focus/focus-tracker.d.ts} +1 -1
- package/lib/base/focus/focus-tracker.d.ts.map +1 -0
- package/lib/base/{focus-tracker.js → focus/focus-tracker.js} +3 -3
- package/lib/base/focus/focus-tracker.js.map +1 -0
- package/lib/base/model/glsp-model-source.d.ts +58 -0
- package/lib/base/model/glsp-model-source.d.ts.map +1 -0
- package/lib/base/model/glsp-model-source.js +137 -0
- package/lib/base/model/glsp-model-source.js.map +1 -0
- package/lib/base/selection-service.spec.js +3 -3
- package/lib/base/selection-service.spec.js.map +1 -1
- package/lib/{container-modules.d.ts → default-modules.d.ts} +7 -6
- package/lib/default-modules.d.ts.map +1 -0
- package/lib/default-modules.js +152 -0
- package/lib/default-modules.js.map +1 -0
- package/lib/features/accessibility/{di.config.d.ts → accessibility-module.d.ts} +3 -3
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -0
- package/lib/features/accessibility/{di.config.js → accessibility-module.js} +14 -12
- package/lib/features/accessibility/accessibility-module.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts +31 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js +72 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts +53 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js +149 -0
- package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/di.config.d.ts +24 -0
- package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/di.config.js +37 -0
- package/lib/features/accessibility/key-shortcut/di.config.js.map +1 -0
- package/lib/features/accessibility/move-zoom/{di.config.d.ts → move-zoom-module.d.ts} +3 -4
- package/lib/features/accessibility/move-zoom/move-zoom-module.d.ts.map +1 -0
- package/lib/features/accessibility/move-zoom/{di.config.js → move-zoom-module.js} +3 -4
- package/lib/features/accessibility/move-zoom/move-zoom-module.js.map +1 -0
- package/lib/features/accessibility/resize-key-tool/{di.config.d.ts → resize-key-module.d.ts} +3 -4
- package/lib/features/accessibility/resize-key-tool/resize-key-module.d.ts.map +1 -0
- package/lib/features/accessibility/resize-key-tool/{di.config.js → resize-key-module.js} +3 -4
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js.map +1 -0
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts +6 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.js +26 -3
- package/lib/features/accessibility/resize-key-tool/resize-key-tool.js.map +1 -1
- package/lib/features/accessibility/search/{di.config.d.ts → search-palette-module.d.ts} +3 -4
- package/lib/features/accessibility/search/search-palette-module.d.ts.map +1 -0
- package/lib/features/accessibility/search/{di.config.js → search-palette-module.js} +3 -4
- package/lib/features/accessibility/search/search-palette-module.js.map +1 -0
- package/lib/features/accessibility/search/search-tool.d.ts +8 -1
- package/lib/features/accessibility/search/search-tool.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-tool.js +23 -1
- package/lib/features/accessibility/search/search-tool.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +7 -2
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js +19 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/{di.config.d.ts → view-key-tools-module.d.ts} +3 -4
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/{di.config.js → view-key-tools-module.js} +4 -5
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts +4 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js +23 -0
- package/lib/features/accessibility/view-key-tools/zoom-key-tool.js.map +1 -1
- package/lib/features/bounds/{di.config.d.ts → bounds-module.d.ts} +3 -4
- package/lib/features/bounds/bounds-module.d.ts.map +1 -0
- package/lib/features/bounds/{di.config.js → bounds-module.js} +3 -4
- package/lib/features/bounds/bounds-module.js.map +1 -0
- package/lib/features/bounds/layouter-test-util.spec.js +2 -2
- package/lib/features/bounds/layouter-test-util.spec.js.map +1 -1
- package/lib/features/command-palette/{di.config.d.ts → command-palette-module.d.ts} +3 -4
- package/lib/features/command-palette/command-palette-module.d.ts.map +1 -0
- package/lib/features/command-palette/{di.config.js → command-palette-module.js} +3 -4
- package/lib/features/command-palette/command-palette-module.js.map +1 -0
- package/lib/features/{select/di.config.d.ts → context-menu/context-menu-module.d.ts} +3 -4
- package/lib/features/context-menu/context-menu-module.d.ts.map +1 -0
- package/lib/features/context-menu/{di.config.js → context-menu-module.js} +4 -5
- package/lib/features/context-menu/context-menu-module.js.map +1 -0
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts +1 -3
- 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 +8 -13
- package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.js +1 -1
- package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
- package/lib/features/copy-paste/{di.config.d.ts → copy-paste-modules.d.ts} +7 -7
- package/lib/features/copy-paste/copy-paste-modules.d.ts.map +1 -0
- package/lib/features/copy-paste/{di.config.js → copy-paste-modules.js} +8 -9
- package/lib/features/copy-paste/copy-paste-modules.js.map +1 -0
- package/lib/features/decoration/{di.config.d.ts → decoration-module.d.ts} +3 -4
- package/lib/features/decoration/decoration-module.d.ts.map +1 -0
- package/lib/features/decoration/{di.config.js → decoration-module.js} +3 -4
- package/lib/features/decoration/decoration-module.js.map +1 -0
- package/lib/features/export/export-modules.d.ts +24 -0
- package/lib/features/export/export-modules.d.ts.map +1 -0
- package/lib/features/export/{di.config.js → export-modules.js} +15 -5
- package/lib/features/export/export-modules.js.map +1 -0
- package/lib/features/export/export-svg-action-handler.d.ts +11 -0
- package/lib/features/export/export-svg-action-handler.d.ts.map +1 -0
- package/lib/features/export/export-svg-action-handler.js +42 -0
- package/lib/features/export/export-svg-action-handler.js.map +1 -0
- package/lib/features/{layout/di.config.d.ts → hints/type-hints-module.d.ts} +3 -4
- package/lib/features/hints/type-hints-module.d.ts.map +1 -0
- package/lib/features/hints/{di.config.js → type-hints-module.js} +3 -4
- package/lib/features/hints/type-hints-module.js.map +1 -0
- package/lib/features/hover/{di.config.d.ts → hover-module.d.ts} +3 -4
- package/lib/features/hover/hover-module.d.ts.map +1 -0
- package/lib/features/hover/{di.config.js → hover-module.js} +6 -7
- package/lib/features/hover/hover-module.js.map +1 -0
- package/lib/features/hover/hover.js +2 -2
- package/lib/features/hover/hover.js.map +1 -1
- package/lib/features/{edit-label → label-edit}/edit-label-tool.d.ts.map +1 -1
- package/lib/features/{edit-label → label-edit}/edit-label-tool.js.map +1 -1
- package/lib/features/{edit-label → label-edit}/edit-label-validator.d.ts.map +1 -1
- package/lib/features/{edit-label → label-edit}/edit-label-validator.js.map +1 -1
- package/lib/features/{hints/di.config.d.ts → label-edit/label-edit-module.d.ts} +3 -4
- package/lib/features/label-edit/label-edit-module.d.ts.map +1 -0
- package/lib/features/{edit-label/di.config.js → label-edit/label-edit-module.js} +3 -4
- package/lib/features/label-edit/label-edit-module.js.map +1 -0
- package/lib/features/layout/layout-elements-action.spec.js +2 -1
- package/lib/features/layout/layout-elements-action.spec.js.map +1 -1
- package/lib/features/{tools/deletion/di.config.d.ts → layout/layout-module.d.ts} +3 -4
- package/lib/features/layout/layout-module.d.ts.map +1 -0
- package/lib/features/layout/{di.config.js → layout-module.js} +3 -4
- package/lib/features/layout/layout-module.js.map +1 -0
- package/lib/features/navigation/navigation-action-handler.js +1 -1
- package/lib/features/navigation/navigation-action-handler.js.map +1 -1
- package/lib/features/navigation/{di.config.d.ts → navigation-module.d.ts} +3 -4
- package/lib/features/navigation/navigation-module.d.ts.map +1 -0
- package/lib/features/navigation/{di.config.js → navigation-module.js} +3 -4
- package/lib/features/navigation/navigation-module.js.map +1 -0
- package/lib/features/routing/routing-module.d.ts +18 -0
- package/lib/features/routing/routing-module.d.ts.map +1 -0
- package/lib/features/routing/routing-module.js +39 -0
- package/lib/features/routing/routing-module.js.map +1 -0
- package/lib/features/{routing/di.config.d.ts → save/save-module.d.ts} +6 -5
- package/lib/features/save/save-module.d.ts.map +1 -0
- package/lib/features/save/{di.config.js → save-module.js} +6 -6
- package/lib/features/save/save-module.js.map +1 -0
- package/lib/features/{save/di.config.d.ts → select/select-module.d.ts} +7 -6
- package/lib/features/select/select-module.d.ts.map +1 -0
- package/lib/features/select/{di.config.js → select-module.js} +11 -4
- package/lib/features/select/select-module.js.map +1 -0
- package/lib/features/source-model-watcher/source-model-changed-action-handler.js +1 -1
- package/lib/features/source-model-watcher/source-model-changed-action-handler.js.map +1 -1
- package/lib/features/{context-menu/di.config.d.ts → source-model-watcher/source-model-wacher-module.d.ts} +3 -4
- package/lib/features/source-model-watcher/source-model-wacher-module.d.ts.map +1 -0
- package/lib/features/source-model-watcher/{di.config.js → source-model-wacher-module.js} +3 -4
- package/lib/features/source-model-watcher/source-model-wacher-module.js.map +1 -0
- package/lib/features/status/status-module.d.ts +19 -0
- package/lib/features/status/status-module.d.ts.map +1 -0
- package/lib/features/status/status-module.js +27 -0
- package/lib/features/status/status-module.js.map +1 -0
- package/lib/features/status/status-overlay.d.ts +19 -0
- package/lib/features/status/status-overlay.d.ts.map +1 -0
- package/lib/features/status/status-overlay.js +108 -0
- package/lib/features/status/status-overlay.js.map +1 -0
- package/lib/features/svg-metadata/{di.config.d.ts → svg-metadata-module.d.ts} +3 -4
- package/lib/features/svg-metadata/svg-metadata-module.d.ts.map +1 -0
- package/lib/features/svg-metadata/{di.config.js → svg-metadata-module.js} +3 -4
- package/lib/features/svg-metadata/svg-metadata-module.js.map +1 -0
- package/lib/features/tool-palette/{di.config.d.ts → tool-palette-module.d.ts} +3 -4
- package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -0
- package/lib/features/tool-palette/{di.config.js → tool-palette-module.js} +3 -4
- package/lib/features/tool-palette/tool-palette-module.js.map +1 -0
- 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 +1 -1
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/{export/di.config.d.ts → tools/change-bounds/change-boounds-tool-module.d.ts} +3 -4
- package/lib/features/tools/change-bounds/change-boounds-tool-module.d.ts.map +1 -0
- package/lib/features/tools/change-bounds/{di.config.js → change-boounds-tool-module.js} +4 -5
- package/lib/features/tools/change-bounds/change-boounds-tool-module.js.map +1 -0
- package/lib/features/tools/deletion/deletion-tool-module.d.ts +18 -0
- package/lib/features/tools/deletion/deletion-tool-module.d.ts.map +1 -0
- package/lib/features/tools/deletion/{di.config.js → deletion-tool-module.js} +3 -4
- package/lib/features/tools/deletion/deletion-tool-module.js.map +1 -0
- package/lib/features/{edit-label/di.config.d.ts → tools/edge-creation/edege-creation-module.d.ts} +3 -4
- package/lib/features/tools/edge-creation/edege-creation-module.d.ts.map +1 -0
- package/lib/features/tools/edge-creation/{di.config.js → edege-creation-module.js} +3 -4
- package/lib/features/tools/edge-creation/edege-creation-module.js.map +1 -0
- package/lib/features/tools/edge-edit/edge-edit-module.d.ts +18 -0
- package/lib/features/tools/edge-edit/edge-edit-module.d.ts.map +1 -0
- package/lib/features/tools/edge-edit/{di.config.js → edge-edit-module.js} +4 -5
- package/lib/features/tools/edge-edit/edge-edit-module.js.map +1 -0
- package/lib/features/tools/marquee-selection/marquee-selection-module.d.ts +18 -0
- package/lib/features/tools/marquee-selection/marquee-selection-module.d.ts.map +1 -0
- package/lib/features/tools/marquee-selection/{di.config.js → marquee-selection-module.js} +3 -4
- package/lib/features/tools/marquee-selection/marquee-selection-module.js.map +1 -0
- package/lib/features/tools/node-creation/node-creation-module.d.ts +18 -0
- package/lib/features/tools/node-creation/node-creation-module.d.ts.map +1 -0
- package/lib/features/tools/node-creation/{di.config.js → node-creation-module.js} +3 -4
- package/lib/features/tools/node-creation/node-creation-module.js.map +1 -0
- package/lib/features/tools/tool-focus-loss-module.d.ts +13 -0
- package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -0
- package/lib/features/tools/{enable-default-tools-on-focus-loss.js → tool-focus-loss-module.js} +6 -8
- package/lib/features/tools/tool-focus-loss-module.js.map +1 -0
- package/lib/features/undo-redo/undo-redo-key-listener.d.ts +23 -0
- package/lib/features/undo-redo/undo-redo-key-listener.d.ts.map +1 -0
- package/lib/features/undo-redo/undo-redo-key-listener.js +35 -0
- package/lib/features/undo-redo/undo-redo-key-listener.js.map +1 -0
- package/lib/features/undo-redo/undo-redo-module.d.ts +23 -0
- package/lib/features/undo-redo/undo-redo-module.d.ts.map +1 -0
- package/lib/features/undo-redo/undo-redo-module.js +30 -0
- package/lib/features/undo-redo/undo-redo-module.js.map +1 -0
- package/lib/features/validation/marker-navigator.spec.js +4 -2
- package/lib/features/validation/marker-navigator.spec.js.map +1 -1
- package/lib/features/validation/validation-modules.d.ts +25 -0
- package/lib/features/validation/validation-modules.d.ts.map +1 -0
- package/lib/features/validation/{di.config.js → validation-modules.js} +9 -10
- package/lib/features/validation/validation-modules.js.map +1 -0
- package/lib/features/viewport/{di.config.d.ts → viewport-modules.d.ts} +9 -4
- package/lib/features/viewport/viewport-modules.d.ts.map +1 -0
- package/lib/features/viewport/{di.config.js → viewport-modules.js} +12 -5
- package/lib/features/viewport/viewport-modules.js.map +1 -0
- package/lib/glsp-sprotty/index.d.ts +2 -3
- package/lib/glsp-sprotty/index.d.ts.map +1 -1
- package/lib/glsp-sprotty/index.js +41 -36
- package/lib/glsp-sprotty/index.js.map +1 -1
- package/lib/index.d.ts +43 -41
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +59 -90
- package/lib/index.js.map +1 -1
- package/lib/lib/model.d.ts +1 -2
- package/lib/lib/model.d.ts.map +1 -1
- package/lib/lib/model.js +1 -2
- package/lib/lib/model.js.map +1 -1
- package/lib/standalone-modules.d.ts +38 -0
- package/lib/standalone-modules.d.ts.map +1 -0
- package/lib/standalone-modules.js +84 -0
- package/lib/standalone-modules.js.map +1 -0
- package/lib/utils/smodel-util.spec.js +2 -1
- package/lib/utils/smodel-util.spec.js.map +1 -1
- package/lib/views/base-view-module.d.ts +2 -4
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +2 -4
- package/lib/views/base-view-module.js.map +1 -1
- package/package.json +4 -3
- package/src/base/action-dispatcher.ts +4 -0
- package/src/base/{di.config.ts → default.module.ts} +19 -8
- package/src/base/editor-context-service.ts +29 -9
- package/src/base/{focus-tracker.ts → focus/focus-tracker.ts} +1 -1
- package/src/base/model/glsp-model-source.ts +149 -0
- package/src/base/selection-service.spec.ts +3 -12
- package/src/{container-modules.ts → default-modules.ts} +59 -49
- package/src/features/accessibility/README.md +7 -7
- package/src/features/accessibility/{di.config.ts → accessibility-module.ts} +8 -6
- package/src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts +55 -0
- package/src/features/accessibility/key-shortcut/accessible-key-shortcut.ts +182 -0
- package/src/features/accessibility/key-shortcut/di.config.ts +35 -0
- package/src/features/accessibility/move-zoom/{di.config.ts → move-zoom-module.ts} +2 -3
- package/src/features/accessibility/resize-key-tool/{di.config.ts → resize-key-module.ts} +2 -3
- package/src/features/accessibility/resize-key-tool/resize-key-tool.ts +22 -1
- package/src/features/accessibility/search/{di.config.ts → search-palette-module.ts} +2 -3
- package/src/features/accessibility/search/search-tool.ts +24 -5
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +19 -3
- package/src/features/accessibility/view-key-tools/{di.config.ts → view-key-tools-module.ts} +3 -4
- package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +22 -1
- package/src/features/bounds/{di.config.ts → bounds-module.ts} +2 -4
- package/src/features/bounds/layouter-test-util.spec.ts +1 -1
- package/src/features/command-palette/{di.config.ts → command-palette-module.ts} +2 -5
- package/src/features/context-menu/{di.config.ts → context-menu-module.ts} +4 -7
- package/src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts +2 -6
- package/src/features/copy-paste/copy-paste-context-menu.ts +1 -1
- package/src/features/copy-paste/{di.config.ts → copy-paste-modules.ts} +13 -11
- package/src/features/decoration/{di.config.ts → decoration-module.ts} +2 -5
- package/src/features/export/{di.config.ts → export-modules.ts} +27 -5
- package/src/features/export/export-svg-action-handler.ts +32 -0
- package/src/features/hints/{di.config.ts → type-hints-module.ts} +2 -5
- package/src/features/hover/{di.config.ts → hover-module.ts} +3 -5
- package/src/features/hover/hover.ts +1 -1
- package/src/features/{edit-label/di.config.ts → label-edit/label-edit-module.ts} +2 -5
- package/src/features/layout/layout-elements-action.spec.ts +2 -2
- package/src/features/layout/{di.config.ts → layout-module.ts} +2 -5
- package/src/features/navigation/navigation-action-handler.ts +1 -1
- package/src/features/navigation/{di.config.ts → navigation-module.ts} +2 -5
- package/src/features/routing/routing-module.ts +59 -0
- package/src/features/save/{di.config.ts → save-module.ts} +5 -7
- package/src/features/select/{di.config.ts → select-module.ts} +13 -4
- package/src/features/source-model-watcher/source-model-changed-action-handler.ts +1 -1
- package/src/features/source-model-watcher/{di.config.ts → source-model-wacher-module.ts} +2 -5
- package/src/features/status/status-module.ts +25 -0
- package/src/features/status/status-overlay.ts +108 -0
- package/src/features/svg-metadata/{di.config.ts → svg-metadata-module.ts} +2 -5
- package/src/features/tool-palette/{di.config.ts → tool-palette-module.ts} +2 -5
- package/src/features/tool-palette/tool-palette.ts +1 -1
- package/src/features/tools/change-bounds/{di.config.ts → change-boounds-tool-module.ts} +3 -6
- package/src/features/tools/deletion/{di.config.ts → deletion-tool-module.ts} +2 -5
- package/src/features/tools/edge-creation/{di.config.ts → edege-creation-module.ts} +2 -5
- package/src/features/tools/edge-edit/{di.config.ts → edge-edit-module.ts} +3 -6
- package/src/features/tools/marquee-selection/{di.config.ts → marquee-selection-module.ts} +2 -5
- package/src/features/tools/node-creation/{di.config.ts → node-creation-module.ts} +2 -5
- package/src/features/tools/{enable-default-tools-on-focus-loss.ts → tool-focus-loss-module.ts} +4 -7
- package/{lib/features/tools/enable-default-tools-on-focus-loss.d.ts → src/features/undo-redo/undo-redo-key-listener.ts} +15 -14
- package/src/features/undo-redo/undo-redo-module.ts +28 -0
- package/src/features/validation/marker-navigator.spec.ts +4 -4
- package/src/features/validation/{di.config.ts → validation-modules.ts} +13 -11
- package/src/features/viewport/{di.config.ts → viewport-modules.ts} +14 -4
- package/src/glsp-sprotty/index.ts +29 -26
- package/src/index.ts +43 -75
- package/src/lib/model.ts +2 -3
- package/src/standalone-modules.ts +87 -0
- package/src/utils/smodel-util.spec.ts +2 -2
- package/src/views/base-view-module.ts +2 -4
- package/lib/base/actions/focus-change-action.d.ts.map +0 -1
- package/lib/base/actions/focus-change-action.js.map +0 -1
- package/lib/base/di.config.d.ts.map +0 -1
- package/lib/base/di.config.js.map +0 -1
- package/lib/base/focus-tracker.d.ts.map +0 -1
- package/lib/base/focus-tracker.js.map +0 -1
- package/lib/base/source-uri-aware.d.ts +0 -5
- package/lib/base/source-uri-aware.d.ts.map +0 -1
- package/lib/base/source-uri-aware.js +0 -24
- package/lib/base/source-uri-aware.js.map +0 -1
- package/lib/container-modules.d.ts.map +0 -1
- package/lib/container-modules.js +0 -143
- package/lib/container-modules.js.map +0 -1
- package/lib/features/accessibility/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/di.config.js.map +0 -1
- package/lib/features/accessibility/move-zoom/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/move-zoom/di.config.js.map +0 -1
- package/lib/features/accessibility/resize-key-tool/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/resize-key-tool/di.config.js.map +0 -1
- package/lib/features/accessibility/search/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/search/di.config.js.map +0 -1
- package/lib/features/accessibility/view-key-tools/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/view-key-tools/di.config.js.map +0 -1
- package/lib/features/bounds/di.config.d.ts.map +0 -1
- package/lib/features/bounds/di.config.js.map +0 -1
- package/lib/features/command-palette/di.config.d.ts.map +0 -1
- package/lib/features/command-palette/di.config.js.map +0 -1
- package/lib/features/context-menu/di.config.d.ts.map +0 -1
- package/lib/features/context-menu/di.config.js.map +0 -1
- package/lib/features/copy-paste/di.config.d.ts.map +0 -1
- package/lib/features/copy-paste/di.config.js.map +0 -1
- package/lib/features/decoration/di.config.d.ts.map +0 -1
- package/lib/features/decoration/di.config.js.map +0 -1
- package/lib/features/edit-label/di.config.d.ts.map +0 -1
- package/lib/features/edit-label/di.config.js.map +0 -1
- package/lib/features/export/di.config.d.ts.map +0 -1
- package/lib/features/export/di.config.js.map +0 -1
- package/lib/features/hints/di.config.d.ts.map +0 -1
- package/lib/features/hints/di.config.js.map +0 -1
- package/lib/features/hover/di.config.d.ts.map +0 -1
- package/lib/features/hover/di.config.js.map +0 -1
- package/lib/features/layout/di.config.d.ts.map +0 -1
- package/lib/features/layout/di.config.js.map +0 -1
- package/lib/features/navigation/di.config.d.ts.map +0 -1
- package/lib/features/navigation/di.config.js.map +0 -1
- package/lib/features/routing/di.config.d.ts.map +0 -1
- package/lib/features/routing/di.config.js +0 -57
- package/lib/features/routing/di.config.js.map +0 -1
- package/lib/features/save/di.config.d.ts.map +0 -1
- package/lib/features/save/di.config.js.map +0 -1
- package/lib/features/save/model.d.ts +0 -22
- package/lib/features/save/model.d.ts.map +0 -1
- package/lib/features/save/model.js +0 -9
- package/lib/features/save/model.js.map +0 -1
- package/lib/features/select/di.config.d.ts.map +0 -1
- package/lib/features/select/di.config.js.map +0 -1
- package/lib/features/source-model-watcher/di.config.d.ts +0 -19
- package/lib/features/source-model-watcher/di.config.d.ts.map +0 -1
- package/lib/features/source-model-watcher/di.config.js.map +0 -1
- package/lib/features/svg-metadata/di.config.d.ts.map +0 -1
- package/lib/features/svg-metadata/di.config.js.map +0 -1
- package/lib/features/tool-palette/di.config.d.ts.map +0 -1
- package/lib/features/tool-palette/di.config.js.map +0 -1
- package/lib/features/tools/change-bounds/di.config.d.ts +0 -19
- package/lib/features/tools/change-bounds/di.config.d.ts.map +0 -1
- package/lib/features/tools/change-bounds/di.config.js.map +0 -1
- package/lib/features/tools/deletion/di.config.d.ts.map +0 -1
- package/lib/features/tools/deletion/di.config.js.map +0 -1
- package/lib/features/tools/edge-creation/di.config.d.ts +0 -19
- package/lib/features/tools/edge-creation/di.config.d.ts.map +0 -1
- package/lib/features/tools/edge-creation/di.config.js.map +0 -1
- package/lib/features/tools/edge-edit/di.config.d.ts +0 -19
- package/lib/features/tools/edge-edit/di.config.d.ts.map +0 -1
- package/lib/features/tools/edge-edit/di.config.js.map +0 -1
- package/lib/features/tools/enable-default-tools-on-focus-loss.d.ts.map +0 -1
- package/lib/features/tools/enable-default-tools-on-focus-loss.js.map +0 -1
- package/lib/features/tools/marquee-selection/di.config.d.ts +0 -19
- package/lib/features/tools/marquee-selection/di.config.d.ts.map +0 -1
- package/lib/features/tools/marquee-selection/di.config.js.map +0 -1
- package/lib/features/tools/node-creation/di.config.d.ts +0 -19
- package/lib/features/tools/node-creation/di.config.d.ts.map +0 -1
- package/lib/features/tools/node-creation/di.config.js.map +0 -1
- package/lib/features/validation/di.config.d.ts +0 -25
- package/lib/features/validation/di.config.d.ts.map +0 -1
- package/lib/features/validation/di.config.js.map +0 -1
- package/lib/features/viewport/di.config.d.ts.map +0 -1
- package/lib/features/viewport/di.config.js.map +0 -1
- package/lib/model-source/glsp-diagram-server.d.ts +0 -20
- package/lib/model-source/glsp-diagram-server.d.ts.map +0 -1
- package/lib/model-source/glsp-diagram-server.js +0 -101
- package/lib/model-source/glsp-diagram-server.js.map +0 -1
- package/src/base/source-uri-aware.ts +0 -23
- package/src/features/routing/di.config.ts +0 -82
- package/src/features/save/model.ts +0 -26
- package/src/model-source/glsp-diagram-server.ts +0 -115
- /package/lib/features/{edit-label → label-edit}/edit-label-tool.d.ts +0 -0
- /package/lib/features/{edit-label → label-edit}/edit-label-tool.js +0 -0
- /package/lib/features/{edit-label → label-edit}/edit-label-validator.d.ts +0 -0
- /package/lib/features/{edit-label → label-edit}/edit-label-validator.js +0 -0
- /package/src/base/{actions/focus-change-action.ts → focus/focus-state-change-action.ts} +0 -0
- /package/src/features/{edit-label → label-edit}/edit-label-tool.ts +0 -0
- /package/src/features/{edit-label → label-edit}/edit-label-validator.ts +0 -0
package/css/decoration.css
CHANGED
|
@@ -14,13 +14,6 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
-
:root {
|
|
18
|
-
--glsp-error-foreground: red;
|
|
19
|
-
--glsp-warning-foreground: yellow;
|
|
20
|
-
--glsp-info-foreground: lightblue;
|
|
21
|
-
--glsp-issue-background: rgb(255 255 255 / 85%);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
17
|
.sprotty-issue-background {
|
|
25
18
|
fill: var(--glsp-issue-background);
|
|
26
19
|
background-color: var(--glsp-issue-background);
|
package/css/glsp-sprotty.css
CHANGED
|
@@ -14,6 +14,13 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
|
|
17
|
+
:root {
|
|
18
|
+
--glsp-error-foreground: red;
|
|
19
|
+
--glsp-warning-foreground: yellow;
|
|
20
|
+
--glsp-info-foreground: lightblue;
|
|
21
|
+
--glsp-issue-background: rgb(255 255 255 / 85%);
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
.sprotty {
|
|
18
25
|
padding: 0px;
|
|
19
26
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
|
|
17
|
+
.keyboard-shortcuts-menu {
|
|
18
|
+
border: 1px solid #ccc;
|
|
19
|
+
border-radius: 5px;
|
|
20
|
+
background-color: #ededee;
|
|
21
|
+
margin-bottom: 20px;
|
|
22
|
+
position: absolute;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
right: 10px;
|
|
27
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
28
|
+
line-height: 1.5;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
z-index: 9999;
|
|
31
|
+
width: 400px;
|
|
32
|
+
max-height: 512px;
|
|
33
|
+
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.keyboard-shortcuts-menu h3 {
|
|
37
|
+
font-size: 18px;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
margin: 0;
|
|
40
|
+
margin-bottom: 10px;
|
|
41
|
+
padding: 10px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.keyboard-shortcuts-menu kbd {
|
|
45
|
+
background-color: #e4e1e1;
|
|
46
|
+
border: 1px solid #ccc;
|
|
47
|
+
border-radius: 3px;
|
|
48
|
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
|
49
|
+
color: #333;
|
|
50
|
+
display: inline-block;
|
|
51
|
+
font-size: 0.85em;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
line-height: 1;
|
|
54
|
+
padding: 2px 4px;
|
|
55
|
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.keyboard-shortcuts-menu kbd:active {
|
|
60
|
+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.keyboard-shortcuts-container {
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
max-height: 100%;
|
|
67
|
+
padding: 10px;
|
|
68
|
+
padding-top: 3px;
|
|
69
|
+
overflow: auto;
|
|
70
|
+
right: 40px;
|
|
71
|
+
top: 25px;
|
|
72
|
+
text-align: left;
|
|
73
|
+
display: block;
|
|
74
|
+
z-index: 1000;
|
|
75
|
+
color: black;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.shortcut-entry-container {
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
margin-right: 10px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#key-shortcut-close-btn {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 14px;
|
|
87
|
+
right: 5px;
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
font-weight: bold;
|
|
90
|
+
background: #cccccc;
|
|
91
|
+
border: none;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.columnTitle {
|
|
96
|
+
text-align: left;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.menu-header {
|
|
100
|
+
padding: 0.4em;
|
|
101
|
+
text-align: left;
|
|
102
|
+
background: #cccccc;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
flex-wrap: wrap;
|
|
107
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
|
|
17
|
+
.sprotty-status {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 5px;
|
|
20
|
+
left: 10px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sprotty-status .fatal {
|
|
26
|
+
color: var(--glsp-error-foreground);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.sprotty-status .error {
|
|
30
|
+
color: var(--glsp-error-foreground);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.sprotty-status .warning {
|
|
34
|
+
color: var(--glsp-warning-foreground);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.sprotty-status .info {
|
|
38
|
+
color: var(--glsp-info-foreground);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sprotty-error {
|
|
42
|
+
fill: var(--glsp-issue-background);
|
|
43
|
+
color: var(--glsp-error-foreground);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sprotty-warning {
|
|
47
|
+
fill: var(--glsp-issue-background);
|
|
48
|
+
color: var(--glsp-warning-foreground);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sprotty-info {
|
|
52
|
+
fill: var(--glsp-issue-background);
|
|
53
|
+
color: var();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.sprotty-infoRow .codicon {
|
|
57
|
+
margin-right: 8px;
|
|
58
|
+
}
|
|
59
|
+
.sprotty-status .ok {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sprotty-status-message {
|
|
64
|
+
visibility: hidden;
|
|
65
|
+
padding-left: 10px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sprotty-status-message.fatal {
|
|
69
|
+
visibility: visible;
|
|
70
|
+
padding-left: 10px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.sprotty-status:hover .sprotty-status-message {
|
|
74
|
+
visibility: visible;
|
|
75
|
+
}
|
|
@@ -8,6 +8,7 @@ export declare class GLSPActionDispatcher extends ActionDispatcher {
|
|
|
8
8
|
initialize(): Promise<void>;
|
|
9
9
|
startModelInitialization(): void;
|
|
10
10
|
onceModelInitialized(): Promise<void>;
|
|
11
|
+
hasHandler(action: Action): boolean;
|
|
11
12
|
dispatch(action: Action): Promise<void>;
|
|
12
13
|
protected handleAction(action: Action): Promise<void>;
|
|
13
14
|
request<Res extends ResponseAction>(action: RequestAction<Res>): Promise<Res>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-dispatcher.d.ts","sourceRoot":"","sources":["../../src/base/action-dispatcher.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF,qBACa,oBAAqB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,CAAa;IACrE,SAA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6 +47,9 @@ let GLSPActionDispatcher = exports.GLSPActionDispatcher = class GLSPActionDispat
|
|
|
47
47
|
onceModelInitialized() {
|
|
48
48
|
return this.initializationConstraint.onInitialized();
|
|
49
49
|
}
|
|
50
|
+
hasHandler(action) {
|
|
51
|
+
return this.actionHandlerRegistry.get(action.kind).length > 0;
|
|
52
|
+
}
|
|
50
53
|
dispatch(action) {
|
|
51
54
|
const result = super.dispatch(action);
|
|
52
55
|
this.initializationConstraint.notifyDispatched(action);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-dispatcher.js","sourceRoot":"","sources":["../../src/base/action-dispatcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,iDAAwF;AACxF,uFAAkF;AAG3E,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,gCAAgB;IAAnD;;QACgB,aAAQ,GAAgC,IAAI,GAAG,EAAE,CAAC;QAC3D,0BAAqB,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"action-dispatcher.js","sourceRoot":"","sources":["../../src/base/action-dispatcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,iDAAwF;AACxF,uFAAkF;AAG3E,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,gCAAgB;IAAnD;;QACgB,aAAQ,GAAgC,IAAI,GAAG,EAAE,CAAC;QAC3D,0BAAqB,GAAG,KAAK,CAAC;IA8F5C,CAAC;IA1FY,UAAU;QACf,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,wBAAwB;QACpB,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE;YAC7B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,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AC,CAAC;oBACrC,QAAQ,CAAC,OAAO,EAAE,CAAC;iBACtB;aACJ;QACL,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAEtC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACJ,CAAA;AA5FoD;IAAhD,IAAA,kBAAM,EAAC,+DAA6B,CAAC;8BAAqC,+DAA6B;sEAAC;+BAJhG,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAgGhC"}
|
|
@@ -14,11 +14,14 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import '@vscode/codicons/dist/codicon.css';
|
|
17
|
-
import { Container
|
|
18
|
-
import { InitializeResult } from '../glsp-sprotty/index';
|
|
17
|
+
import { Container } from 'inversify';
|
|
18
|
+
import { FeatureModule, InitializeResult } from '../glsp-sprotty/index';
|
|
19
19
|
import '../../css/glsp-sprotty.css';
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The default module provides all of GLSP's base functionality and services.
|
|
22
|
+
* It builds on top of sprotty's default module {@link `sprottyDefaultModule`}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const defaultModule: FeatureModule;
|
|
22
25
|
/**
|
|
23
26
|
* Utility function to configure the {@link ModelSource}, i.e. the `DiagramServer`, as action handler for all server actions for the given
|
|
24
27
|
* diagramType.
|
|
@@ -27,4 +30,4 @@ export default defaultGLSPModule;
|
|
|
27
30
|
* @param container The di container.
|
|
28
31
|
*/
|
|
29
32
|
export declare function configureServerActions(result: InitializeResult, diagramType: string, container: Container): Promise<void>;
|
|
30
|
-
//# sourceMappingURL=
|
|
33
|
+
//# sourceMappingURL=default.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.module.d.ts","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAEH,aAAa,EACb,gBAAgB,EAcnB,MAAM,eAAe,CAAC;AACvB,OAAO,4BAA4B,CAAC;AAmBpC;;;GAGG;AACH,eAAO,MAAM,aAAa,eA0DxB,CAAC;AAEH;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ/H"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configureServerActions = void 0;
|
|
3
|
+
exports.configureServerActions = exports.defaultModule = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
5
|
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
6
6
|
*
|
|
@@ -17,18 +17,18 @@ exports.configureServerActions = void 0;
|
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
19
|
require("@vscode/codicons/dist/codicon.css");
|
|
20
|
-
const inversify_1 = require("inversify");
|
|
21
20
|
const _glsp_sprotty_1 = require("../glsp-sprotty/index");
|
|
22
21
|
require("../../css/glsp-sprotty.css");
|
|
23
22
|
const action_dispatcher_1 = require("./action-dispatcher");
|
|
24
|
-
const focus_change_action_1 = require("./actions/focus-change-action");
|
|
25
23
|
const command_stack_1 = require("./command-stack");
|
|
26
24
|
const editor_context_service_1 = require("./editor-context-service");
|
|
27
25
|
const css_feedback_1 = require("./feedback/css-feedback");
|
|
28
26
|
const feedback_action_dispatcher_1 = require("./feedback/feedback-action-dispatcher");
|
|
29
27
|
const update_model_command_1 = require("./feedback/update-model-command");
|
|
30
|
-
const
|
|
28
|
+
const focus_state_change_action_1 = require("./focus/focus-state-change-action");
|
|
29
|
+
const focus_tracker_1 = require("./focus/focus-tracker");
|
|
31
30
|
const model_initialization_constraint_1 = require("./model-initialization-constraint");
|
|
31
|
+
const glsp_model_source_1 = require("./model/glsp-model-source");
|
|
32
32
|
const model_registry_1 = require("./model/model-registry");
|
|
33
33
|
const selection_clearing_mouse_listener_1 = require("./selection-clearing-mouse-listener");
|
|
34
34
|
const selection_service_1 = require("./selection-service");
|
|
@@ -36,8 +36,14 @@ const glsp_tool_manager_1 = require("./tool-manager/glsp-tool-manager");
|
|
|
36
36
|
const key_tool_1 = require("./view/key-tool");
|
|
37
37
|
const mouse_tool_1 = require("./view/mouse-tool");
|
|
38
38
|
const view_registry_1 = require("./view/view-registry");
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The default module provides all of GLSP's base functionality and services.
|
|
41
|
+
* It builds on top of sprotty's default module {@link `sprottyDefaultModule`}.
|
|
42
|
+
*/
|
|
43
|
+
exports.defaultModule = new _glsp_sprotty_1.FeatureModule((bind, unbind, isBound, rebind, ...rest) => {
|
|
44
|
+
// load bindings from sprotty's default module to avoid code duplication
|
|
45
|
+
_glsp_sprotty_1.sprottyDefaultModule.registry(bind, unbind, isBound, rebind, ...rest);
|
|
46
|
+
const context = { bind, unbind, isBound, rebind };
|
|
41
47
|
bind(editor_context_service_1.EditorContextService).toSelf().inSingletonScope();
|
|
42
48
|
bind(_glsp_sprotty_1.TYPES.IEditorContextServiceProvider).toProvider(ctx => () => new Promise((resolve, reject) => {
|
|
43
49
|
if (ctx.container.isBound(editor_context_service_1.EditorContextService)) {
|
|
@@ -48,8 +54,9 @@ const defaultGLSPModule = new inversify_1.ContainerModule((bind, _unbind, isBoun
|
|
|
48
54
|
}
|
|
49
55
|
}));
|
|
50
56
|
(0, _glsp_sprotty_1.configureActionHandler)(context, _glsp_sprotty_1.SetEditModeAction.KIND, editor_context_service_1.EditorContextService);
|
|
57
|
+
(0, _glsp_sprotty_1.configureActionHandler)(context, _glsp_sprotty_1.SetDirtyStateAction.KIND, editor_context_service_1.EditorContextService);
|
|
51
58
|
bind(focus_tracker_1.FocusTracker).toSelf().inSingletonScope();
|
|
52
|
-
(0, _glsp_sprotty_1.configureActionHandler)(context,
|
|
59
|
+
(0, _glsp_sprotty_1.configureActionHandler)(context, focus_state_change_action_1.FocusStateChangedAction.KIND, focus_tracker_1.FocusTracker);
|
|
53
60
|
// Model update initialization ------------------------------------
|
|
54
61
|
bind(_glsp_sprotty_1.TYPES.IFeedbackActionDispatcher).to(feedback_action_dispatcher_1.FeedbackActionDispatcher).inSingletonScope();
|
|
55
62
|
(0, _glsp_sprotty_1.configureCommand)(context, update_model_command_1.FeedbackAwareUpdateModelCommand);
|
|
@@ -63,6 +70,7 @@ const defaultGLSPModule = new inversify_1.ContainerModule((bind, _unbind, isBoun
|
|
|
63
70
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.IToolManager).toService(glsp_tool_manager_1.GLSPToolManager);
|
|
64
71
|
bind(action_dispatcher_1.GLSPActionDispatcher).toSelf().inSingletonScope();
|
|
65
72
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.IActionDispatcher).toService(action_dispatcher_1.GLSPActionDispatcher);
|
|
73
|
+
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.ModelSource, glsp_model_source_1.GLSPModelSource);
|
|
66
74
|
bind(model_initialization_constraint_1.ModelInitializationConstraint).to(model_initialization_constraint_1.DefaultModelInitializationConstraint).inSingletonScope();
|
|
67
75
|
// support re-registration of model elements and views
|
|
68
76
|
(0, _glsp_sprotty_1.bindOrRebind)(context, _glsp_sprotty_1.TYPES.SModelRegistry).to(model_registry_1.GLSPModelRegistry).inSingletonScope();
|
|
@@ -77,7 +85,6 @@ const defaultGLSPModule = new inversify_1.ContainerModule((bind, _unbind, isBoun
|
|
|
77
85
|
(0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.IVNodePostprocessor, _glsp_sprotty_1.LocationPostprocessor);
|
|
78
86
|
bind(_glsp_sprotty_1.TYPES.HiddenVNodePostprocessor).toService(_glsp_sprotty_1.LocationPostprocessor);
|
|
79
87
|
});
|
|
80
|
-
exports.default = defaultGLSPModule;
|
|
81
88
|
/**
|
|
82
89
|
* Utility function to configure the {@link ModelSource}, i.e. the `DiagramServer`, as action handler for all server actions for the given
|
|
83
90
|
* diagramType.
|
|
@@ -95,4 +102,4 @@ async function configureServerActions(result, diagramType, container) {
|
|
|
95
102
|
serverActions.forEach(actionKind => actionHandlerRegistry.register(actionKind, modelSource));
|
|
96
103
|
}
|
|
97
104
|
exports.configureServerActions = configureServerActions;
|
|
98
|
-
//# sourceMappingURL=
|
|
105
|
+
//# sourceMappingURL=default.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.module.js","sourceRoot":"","sources":["../../src/base/default.module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,6CAA2C;AAE3C,iDAiBuB;AACvB,sCAAoC;AACpC,2DAA2D;AAC3D,mDAAmD;AACnD,qEAAgE;AAChE,0DAAmE;AACnE,sFAAiF;AACjF,0EAAkF;AAClF,iFAA4E;AAC5E,yDAAqD;AACrD,uFAAwH;AACxH,iEAA4D;AAC5D,2DAA2D;AAC3D,2FAAqF;AACrF,2DAAuD;AACvD,wEAAmE;AACnE,8CAA8C;AAC9C,kDAAkD;AAClD,wDAAwD;AAExD;;;GAGG;AACU,QAAA,aAAa,GAAG,IAAI,6BAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE;IACtF,wEAAwE;IACxE,oCAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,E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CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACnD,IAAI,CAAC,qBAAK,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,oCAAgB,CAAC,CAAC;IAE5D,wDAAwD;IACxD,mDAAmD;IACnD,IAAA,gCAAgB,EAAC,OAAO,EAAE,uCAAwB,CAAC,CAAC;IACpD,wEAAwE;IACxE,IAAA,gCAAgB,EAAC,OAAO,EAAE,2BAAW,CAAC,CAAC;IAEvC,IAAA,6BAAa,EAAC,OAAO,EAAE,qBAAK,CAAC,mBAAmB,EAAE,qCAAqB,CAAC,CAAC;IACzE,IAAI,CAAC,qBAAK,CAAC,wBAAwB,CAAC,CAAC,SAAS,CAAC,qCAAqB,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC;AAEH;;;;;;GAMG;AACI,KAAK,UAAU,sBAAsB,CAAC,MAAwB,EAAE,WAAmB,EAAE,SAAoB;IAC5G,MAAM,WAAW,GAAG,SAAS,CAAC,GAAG,CAAc,qBAAK,CAAC,WAAW,CAAC,CAAC;IAClE,MAAM,qBAAqB,GAAG,SAAS,CAAC,GAAG,CAAwB,qCAAqB,CAAC,CAAC;IAC1F,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACxD,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,0FAA0F,WAAW,GAAG,CAAC,CAAC;KAC7H;IACD,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AACjG,CAAC;AARD,wDAQC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Action, Args, Disposable, DisposableCollection, EditorContext, Emitter, Event, IActionHandler, ModelSource, MousePositionTracker, SModelElement, SModelRoot, ValueChange } from '../glsp-sprotty/index';
|
|
1
|
+
import { Action, Args, Disposable, DisposableCollection, EditorContext, Emitter, Event, IActionHandler, ModelSource, MousePositionTracker, SModelElement, SModelRoot, SetDirtyStateAction, SetEditModeAction, ValueChange } from '../glsp-sprotty/index';
|
|
2
2
|
import { SelectionService } from './selection-service';
|
|
3
3
|
export interface IEditModeListener {
|
|
4
4
|
editModeChanged(newValue: string, oldValue: string): void;
|
|
5
5
|
}
|
|
6
|
+
export type DirtyStateChange = Pick<SetDirtyStateAction, 'isDirty' | 'reason'>;
|
|
6
7
|
/**
|
|
7
8
|
* The `EditorContextService` is a central injectable component that gives read-only access to
|
|
8
9
|
* certain aspects of the diagram, such as the currently selected elements, the model root,
|
|
@@ -23,18 +24,23 @@ export declare class EditorContextService implements IActionHandler, Disposable
|
|
|
23
24
|
protected _editMode: string;
|
|
24
25
|
protected onEditModeChangedEmitter: Emitter<ValueChange<string>>;
|
|
25
26
|
get onEditModeChanged(): Event<ValueChange<string>>;
|
|
27
|
+
protected _isDirty: boolean;
|
|
28
|
+
protected onDirtyStateChangedEmitter: Emitter<DirtyStateChange>;
|
|
29
|
+
get onDirtyStateChanged(): Event<DirtyStateChange>;
|
|
26
30
|
protected toDispose: DisposableCollection;
|
|
27
31
|
protected initialize(): void;
|
|
28
32
|
dispose(): void;
|
|
29
33
|
get(args?: Args): EditorContext;
|
|
30
34
|
getWithSelection(selectedElementIds: string[], args?: Args): EditorContext;
|
|
31
35
|
handle(action: Action): void;
|
|
32
|
-
protected
|
|
36
|
+
protected handleSetEditModeAction(action: SetEditModeAction): void;
|
|
37
|
+
protected handleSetDirtyStateAction(action: SetDirtyStateAction): void;
|
|
33
38
|
getSourceUri(): Promise<string | undefined>;
|
|
34
39
|
get editMode(): string;
|
|
35
40
|
get modelRoot(): Readonly<SModelRoot>;
|
|
36
41
|
get selectedElements(): Readonly<SModelElement>[];
|
|
37
42
|
get isReadonly(): boolean;
|
|
43
|
+
get isDirty(): boolean;
|
|
38
44
|
}
|
|
39
45
|
export type EditorContextServiceProvider = () => Promise<EditorContextService>;
|
|
40
46
|
//# sourceMappingURL=editor-context-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.d.ts","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,IAAI,EACJ,UAAU,EACV,oBAAoB,EAEpB,aAAa,EACb,OAAO,EACP,KAAK,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,UAAU,
|
|
1
|
+
{"version":3,"file":"editor-context-service.d.ts","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,IAAI,EACJ,UAAU,EACV,oBAAoB,EAEpB,aAAa,EACb,OAAO,EACP,KAAK,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EAEjB,WAAW,EACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAC9B,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7D;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC;AAC/E;;;;;;;;;;;GAWG;AACH,qBACa,oBAAqB,YAAW,cAAc,EAAE,UAAU;IAEnE,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAG7C,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAIrD,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,CAAM;IAGtD,SAAS,CAAC,mBAAmB,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1D,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,wBAAwB,+BAAsC;IACxE,IAAI,iBAAiB,IAAI,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAElD;IAED,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,0BAA0B,4BAAmC;IACvE,IAAI,mBAAmB,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAEjD;IAED,SAAS,CAAC,SAAS,uBAA8B;IAGjD,SAAS,CAAC,UAAU,IAAI,IAAI;IAQ5B,OAAO,IAAI,IAAI;IAIf,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ/B,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,aAAa;IAQ1E,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ5B,SAAS,CAAC,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAMlE,SAAS,CAAC,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAOhE,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQjD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,SAAS,IAAI,QAAQ,CAAC,UAAU,CAAC,CAEpC;IAED,IAAI,gBAAgB,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE,CAEhD;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;CACJ;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -27,8 +27,8 @@ exports.EditorContextService = void 0;
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const inversify_1 = require("inversify");
|
|
29
29
|
const _glsp_sprotty_1 = require("../glsp-sprotty/index");
|
|
30
|
+
const glsp_model_source_1 = require("./model/glsp-model-source");
|
|
30
31
|
const selection_service_1 = require("./selection-service");
|
|
31
|
-
const source_uri_aware_1 = require("./source-uri-aware");
|
|
32
32
|
/**
|
|
33
33
|
* The `EditorContextService` is a central injectable component that gives read-only access to
|
|
34
34
|
* certain aspects of the diagram, such as the currently selected elements, the model root,
|
|
@@ -45,13 +45,17 @@ let EditorContextService = exports.EditorContextService = class EditorContextSer
|
|
|
45
45
|
constructor() {
|
|
46
46
|
this.editModeListeners = [];
|
|
47
47
|
this.onEditModeChangedEmitter = new _glsp_sprotty_1.Emitter();
|
|
48
|
+
this.onDirtyStateChangedEmitter = new _glsp_sprotty_1.Emitter();
|
|
48
49
|
this.toDispose = new _glsp_sprotty_1.DisposableCollection();
|
|
49
50
|
}
|
|
50
51
|
get onEditModeChanged() {
|
|
51
52
|
return this.onEditModeChangedEmitter.event;
|
|
52
53
|
}
|
|
54
|
+
get onDirtyStateChanged() {
|
|
55
|
+
return this.onDirtyStateChangedEmitter.event;
|
|
56
|
+
}
|
|
53
57
|
initialize() {
|
|
54
|
-
this.toDispose.push(this.onEditModeChangedEmitter);
|
|
58
|
+
this.toDispose.push(this.onEditModeChangedEmitter, this.onDirtyStateChangedEmitter);
|
|
55
59
|
this.editModeListeners.forEach(listener => this.onEditModeChanged(change => listener.editModeChanged(change.newValue, change.oldValue)));
|
|
56
60
|
}
|
|
57
61
|
dispose() {
|
|
@@ -73,18 +77,27 @@ let EditorContextService = exports.EditorContextService = class EditorContextSer
|
|
|
73
77
|
}
|
|
74
78
|
handle(action) {
|
|
75
79
|
if (_glsp_sprotty_1.SetEditModeAction.is(action)) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
this.handleSetEditModeAction(action);
|
|
81
|
+
}
|
|
82
|
+
else if (_glsp_sprotty_1.SetDirtyStateAction.is(action)) {
|
|
83
|
+
this.handleSetDirtyStateAction(action);
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
|
-
|
|
86
|
+
handleSetEditModeAction(action) {
|
|
87
|
+
const oldValue = this._editMode;
|
|
88
|
+
this._editMode = action.editMode;
|
|
82
89
|
this.onEditModeChangedEmitter.fire({ newValue: this.editMode, oldValue });
|
|
83
90
|
}
|
|
91
|
+
handleSetDirtyStateAction(action) {
|
|
92
|
+
if (action.isDirty !== this._isDirty) {
|
|
93
|
+
this._isDirty = action.isDirty;
|
|
94
|
+
this.onDirtyStateChangedEmitter.fire(action);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
84
97
|
async getSourceUri() {
|
|
85
98
|
const modelSource = await this.modelSourceProvider();
|
|
86
|
-
if (
|
|
87
|
-
return modelSource.
|
|
99
|
+
if (modelSource instanceof glsp_model_source_1.GLSPModelSource) {
|
|
100
|
+
return modelSource.sourceUri;
|
|
88
101
|
}
|
|
89
102
|
return undefined;
|
|
90
103
|
}
|
|
@@ -100,6 +113,9 @@ let EditorContextService = exports.EditorContextService = class EditorContextSer
|
|
|
100
113
|
get isReadonly() {
|
|
101
114
|
return this.editMode === _glsp_sprotty_1.EditMode.READONLY;
|
|
102
115
|
}
|
|
116
|
+
get isDirty() {
|
|
117
|
+
return this._isDirty;
|
|
118
|
+
}
|
|
103
119
|
};
|
|
104
120
|
__decorate([
|
|
105
121
|
(0, inversify_1.inject)(selection_service_1.SelectionService),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAiG;AACjG,
|
|
1
|
+
{"version":3,"file":"editor-context-service.js","sourceRoot":"","sources":["../../src/base/editor-context-service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAiG;AACjG,iDAkBuB;AACvB,iEAA4D;AAC5D,2DAAuD;AAOvD;;;;;;;;;;;GAWG;AAEI,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAA1B;QASO,sBAAiB,GAAwB,EAAE,CAAC;QAM5C,6BAAwB,GAAG,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AAC,oCAAgB,CAAC;8BACG,oCAAgB;8DAAC;AAGnC;IADT,IAAA,kBAAM,EAAC,oCAAoB,CAAC;8BACG,oCAAoB;kEAAC;AAI3C;IAFT,IAAA,uBAAW,EAAC,qBAAK,CAAC,iBAAiB,CAAC;IACpC,IAAA,oBAAQ,GAAE;;+DAC2C;AAG5C;IADT,IAAA,kBAAM,EAAC,qBAAK,CAAC,mBAAmB,CAAC;;iEACwB;AAiBhD;IADT,IAAA,yBAAa,GAAE;;;;sDAMf;AAGD;IADC,IAAA,sBAAU,GAAE;;;;mDAGZ;+BAvCQ,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAyGhC"}
|
|
@@ -30,4 +30,4 @@ export declare namespace FocusStateChangedAction {
|
|
|
30
30
|
function is(object: any): object is FocusStateChangedAction;
|
|
31
31
|
function create(hasFocus?: boolean): FocusStateChangedAction;
|
|
32
32
|
}
|
|
33
|
-
//# sourceMappingURL=focus-change-action.d.ts.map
|
|
33
|
+
//# sourceMappingURL=focus-state-change-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-state-change-action.d.ts","sourceRoot":"","sources":["../../../src/base/focus/focus-state-change-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,MAAM;IACnD,IAAI,EAAE,OAAO,uBAAuB,CAAC,IAAI,CAAC;IAC1C;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,IAAI,sBAAsB,CAAC;IAExC,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,uBAAuB,CAEjE;IAED,SAAgB,MAAM,CAAC,QAAQ,UAAO,GAAG,uBAAuB,CAK/D;CACJ"}
|
|
@@ -32,4 +32,4 @@ var FocusStateChangedAction;
|
|
|
32
32
|
}
|
|
33
33
|
FocusStateChangedAction.create = create;
|
|
34
34
|
})(FocusStateChangedAction || (exports.FocusStateChangedAction = FocusStateChangedAction = {}));
|
|
35
|
-
//# sourceMappingURL=focus-change-action.js.map
|
|
35
|
+
//# sourceMappingURL=focus-state-change-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-state-change-action.js","sourceRoot":"","sources":["../../../src/base/focus/focus-state-change-action.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAuD;AAcvD,IAAiB,uBAAuB,CAavC;AAbD,WAAiB,uBAAuB;IACvB,4BAAI,GAAG,mBAAmB,CAAC;IAExC,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,sBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,wBAAA,IAAI,CAAC,IAAI,IAAA,8BAAc,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9E,CAAC;IAFe,0BAAE,KAEjB,CAAA;IAED,SAAgB,MAAM,CAAC,QAAQ,GAAG,IAAI;QAClC,OAAO;YACH,IAAI,EAAE,wBAAA,IAAI;YACV,QAAQ;SACX,CAAC;IACN,CAAC;IALe,8BAAM,SAKrB,CAAA;AACL,CAAC,EAbgB,uBAAuB,uCAAvB,uBAAuB,QAavC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Action, IActionHandler, ICommand, ViewerOptions } from '
|
|
1
|
+
import { Action, IActionHandler, ICommand, ViewerOptions } from '../../glsp-sprotty/index';
|
|
2
2
|
export declare class FocusTracker implements IActionHandler {
|
|
3
3
|
protected inActiveCssClass: string;
|
|
4
4
|
protected _hasFocus: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-tracker.d.ts","sourceRoot":"","sources":["../../../src/base/focus/focus-tracker.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAS,aAAa,EAAE,MAAM,eAAe,CAAC;AAGvF,qBACa,YAAa,YAAW,cAAc;IAC/C,SAAS,CAAC,gBAAgB,SAAc;IACxC,SAAS,CAAC,SAAS,UAAQ;IAEE,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;IAE9D,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ;CAgBnD"}
|
|
@@ -26,8 +26,8 @@ exports.FocusTracker = void 0;
|
|
|
26
26
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const inversify_1 = require("inversify");
|
|
29
|
-
const _glsp_sprotty_1 = require("
|
|
30
|
-
const
|
|
29
|
+
const _glsp_sprotty_1 = require("../../glsp-sprotty/index");
|
|
30
|
+
const focus_state_change_action_1 = require("./focus-state-change-action");
|
|
31
31
|
let FocusTracker = exports.FocusTracker = class FocusTracker {
|
|
32
32
|
constructor() {
|
|
33
33
|
this.inActiveCssClass = 'inactive';
|
|
@@ -37,7 +37,7 @@ let FocusTracker = exports.FocusTracker = class FocusTracker {
|
|
|
37
37
|
return this._hasFocus;
|
|
38
38
|
}
|
|
39
39
|
handle(action) {
|
|
40
|
-
if (
|
|
40
|
+
if (focus_state_change_action_1.FocusStateChangedAction.is(action)) {
|
|
41
41
|
this._hasFocus = action.hasFocus;
|
|
42
42
|
const placeholder = document.getElementById(this.options.baseDiv);
|
|
43
43
|
if (!placeholder) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-tracker.js","sourceRoot":"","sources":["../../../src/base/focus/focus-tracker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,iDAAuF;AACvF,2EAAsE;AAG/D,IAAM,YAAY,0BAAlB,MAAM,YAAY;IAAlB;QACO,qBAAgB,GAAG,UAAU,CAAC;QAC9B,cAAS,GAAG,IAAI,CAAC;IAwB/B,CAAC;IApBG,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,MAAc;QACjB,IAAI,mDAAuB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACpC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;YACjC,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAClE,IAAI,CAAC,WAAW,EAAE;gBACd,OAAO;aACV;YACD,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACf,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;oBACvD,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;iBACvD;aACJ;iBAAM;gBACH,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACpD;SACJ;IACL,CAAC;CACJ,CAAA;AAtB0C;IAAtC,IAAA,kBAAM,EAAC,qBAAK,CAAC,aAAa,CAAC;;6CAAkC;uBAJrD,YAAY;IADxB,IAAA,sBAAU,GAAE;GACA,YAAY,CA0BxB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { Action, ActionHandlerRegistry, ActionMessage, Disposable, DisposableCollection, GLSPClient, ILogger, ModelSource, SModelRootSchema } from '../../glsp-sprotty/index';
|
|
17
|
+
/**
|
|
18
|
+
* A helper interface that allows the client to mark actions that have been received from the server.
|
|
19
|
+
*/
|
|
20
|
+
export interface ServerAction extends Action {
|
|
21
|
+
_receivedFromServer: true;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace ServerAction {
|
|
24
|
+
function is(object: unknown): object is ServerAction;
|
|
25
|
+
/**
|
|
26
|
+
* Mark the given action as {@link ServerAction} by attaching the "_receivedFromServer" property
|
|
27
|
+
* @param action The action that should be marked as server action
|
|
28
|
+
*/
|
|
29
|
+
function mark(action: Action): void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Central component for enabling the client-server action flow with the help of an underlying {@link GLSPClient}.
|
|
33
|
+
* Handles & forwards actions that are intended for the GLSP server. In addition, it handles {@link ActionMessage}s received
|
|
34
|
+
* from the server and dispatches the corresponding actions locally.
|
|
35
|
+
*
|
|
36
|
+
* Note that in sprotty a {@link ModelSource} is serving the model to the event cycle and
|
|
37
|
+
* is used to commit the local (i.e. client-side) model back to the source.
|
|
38
|
+
* However, in GLSP the update flow is reversed meaning that changes to the source model are applied
|
|
39
|
+
* on the server side and then an update is sent to the client.
|
|
40
|
+
*/
|
|
41
|
+
export declare class GLSPModelSource extends ModelSource implements Disposable {
|
|
42
|
+
protected logger: ILogger;
|
|
43
|
+
protected _sourceUri?: string;
|
|
44
|
+
protected _glspClient?: GLSPClient;
|
|
45
|
+
protected toDispose: DisposableCollection;
|
|
46
|
+
clientId: string;
|
|
47
|
+
get glspClient(): GLSPClient | undefined;
|
|
48
|
+
get sourceUri(): string | undefined;
|
|
49
|
+
connect(client: GLSPClient, clientId?: string): Promise<GLSPClient>;
|
|
50
|
+
protected messageReceived(message: ActionMessage): void;
|
|
51
|
+
initialize(registry: ActionHandlerRegistry): void;
|
|
52
|
+
handle(action: Action): void;
|
|
53
|
+
protected forwardToServer(action: Action): void;
|
|
54
|
+
protected shouldForwardToServer(action: Action): boolean;
|
|
55
|
+
commitModel(newRoot: SModelRootSchema): SModelRootSchema;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=glsp-model-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glsp-model-source.d.ts","sourceRoot":"","sources":["../../../src/base/model/glsp-model-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EACH,MAAM,EACN,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,WAAW,EAEX,gBAAgB,EAEnB,MAAM,eAAe,CAAC;AACvB;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,MAAM;IACxC,mBAAmB,EAAE,IAAI,CAAC;CAC7B;AAED,yBAAiB,YAAY,CAAC;IAC1B,SAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,YAAY,CAE1D;IAED;;;OAGG;IACH,SAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEzC;CACJ;AAED;;;;;;;;;GASG;AACH,qBACa,eAAgB,SAAQ,WAAY,YAAW,UAAU;IAElE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1B,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACnC,SAAS,CAAC,SAAS,uBAA8B;IAEjD,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,UAA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