@eclipse-glsp/client 1.1.0-next.383e4e9.264 → 1.1.0-next.3d1b3e6.280

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.
Files changed (387) hide show
  1. package/css/decoration.css +0 -7
  2. package/css/glsp-sprotty.css +7 -0
  3. package/css/key-shortcut.css +5 -1
  4. package/{lib/base/source-uri-aware.js → css/navigation.css} +11 -9
  5. package/css/status-overlay.css +75 -0
  6. package/css/toast.css +45 -0
  7. package/lib/base/action-dispatcher.d.ts +8 -2
  8. package/lib/base/action-dispatcher.d.ts.map +1 -1
  9. package/lib/base/action-dispatcher.js +15 -7
  10. package/lib/base/action-dispatcher.js.map +1 -1
  11. package/lib/base/action-dispatcher.spec.d.ts +2 -0
  12. package/lib/base/action-dispatcher.spec.d.ts.map +1 -0
  13. package/lib/base/action-dispatcher.spec.js +78 -0
  14. package/lib/base/action-dispatcher.spec.js.map +1 -0
  15. package/lib/base/action-handler-registry.d.ts +25 -0
  16. package/lib/base/action-handler-registry.d.ts.map +1 -0
  17. package/lib/{features/tools/base-glsp-creation-tool.js → base/action-handler-registry.js} +20 -25
  18. package/lib/base/action-handler-registry.js.map +1 -0
  19. package/lib/base/default.module.d.ts +1 -10
  20. package/lib/base/default.module.d.ts.map +1 -1
  21. package/lib/base/default.module.js +20 -30
  22. package/lib/base/default.module.js.map +1 -1
  23. package/lib/base/editor-context-service.d.ts +17 -5
  24. package/lib/base/editor-context-service.d.ts.map +1 -1
  25. package/lib/base/editor-context-service.js +41 -14
  26. package/lib/base/editor-context-service.js.map +1 -1
  27. package/lib/base/feedback/feedback-action-dispatcher.d.ts.map +1 -1
  28. package/lib/base/feedback/feedback-action-dispatcher.js +5 -3
  29. package/lib/base/feedback/feedback-action-dispatcher.js.map +1 -1
  30. package/lib/base/focus/focus-tracker.d.ts +4 -0
  31. package/lib/base/focus/focus-tracker.d.ts.map +1 -1
  32. package/lib/base/focus/focus-tracker.js +12 -5
  33. package/lib/base/focus/focus-tracker.js.map +1 -1
  34. package/lib/base/model/diagram-loader.d.ts +116 -0
  35. package/lib/base/model/diagram-loader.d.ts.map +1 -0
  36. package/lib/base/model/diagram-loader.js +130 -0
  37. package/lib/base/model/diagram-loader.js.map +1 -0
  38. package/lib/base/model/glsp-model-source.d.ts +74 -0
  39. package/lib/base/model/glsp-model-source.d.ts.map +1 -0
  40. package/lib/base/model/glsp-model-source.js +178 -0
  41. package/lib/base/model/glsp-model-source.js.map +1 -0
  42. package/lib/base/{model-initialization-constraint.d.ts → model/model-initialization-constraint.d.ts} +24 -3
  43. package/lib/base/model/model-initialization-constraint.d.ts.map +1 -0
  44. package/lib/base/{model-initialization-constraint.js → model/model-initialization-constraint.js} +20 -10
  45. package/lib/base/model/model-initialization-constraint.js.map +1 -0
  46. package/lib/base/model/model-initialization-constraint.spec.d.ts +2 -0
  47. package/lib/base/model/model-initialization-constraint.spec.d.ts.map +1 -0
  48. package/lib/base/model/model-initialization-constraint.spec.js +97 -0
  49. package/lib/base/model/model-initialization-constraint.spec.js.map +1 -0
  50. package/lib/base/selection-service.spec.js +9 -8
  51. package/lib/base/selection-service.spec.js.map +1 -1
  52. package/lib/base/tool-manager/tool-manager.d.ts +82 -0
  53. package/lib/base/tool-manager/tool-manager.d.ts.map +1 -0
  54. package/lib/base/tool-manager/tool-manager.js +140 -0
  55. package/lib/base/tool-manager/tool-manager.js.map +1 -0
  56. package/lib/base/tool-manager/tool.d.ts +54 -0
  57. package/lib/base/tool-manager/tool.d.ts.map +1 -0
  58. package/lib/base/tool-manager/tool.js +60 -0
  59. package/lib/base/tool-manager/tool.js.map +1 -0
  60. package/lib/default-modules.d.ts +20 -26
  61. package/lib/default-modules.d.ts.map +1 -1
  62. package/lib/default-modules.js +31 -29
  63. package/lib/default-modules.js.map +1 -1
  64. package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
  65. package/lib/features/accessibility/accessibility-module.js +6 -0
  66. package/lib/features/accessibility/accessibility-module.js.map +1 -1
  67. package/lib/features/accessibility/element-navigation/diagram-navigation-tool.d.ts +65 -0
  68. package/lib/features/accessibility/element-navigation/diagram-navigation-tool.d.ts.map +1 -0
  69. package/lib/features/accessibility/element-navigation/diagram-navigation-tool.js +290 -0
  70. package/lib/features/accessibility/element-navigation/diagram-navigation-tool.js.map +1 -0
  71. package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts +24 -0
  72. package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts.map +1 -0
  73. package/lib/features/accessibility/element-navigation/element-navigation-module.js +38 -0
  74. package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -0
  75. package/lib/features/accessibility/element-navigation/element-navigator.d.ts +26 -0
  76. package/lib/features/accessibility/element-navigation/element-navigator.d.ts.map +1 -0
  77. package/{src/base/source-uri-aware.ts → lib/features/accessibility/element-navigation/element-navigator.js} +4 -9
  78. package/lib/features/accessibility/element-navigation/element-navigator.js.map +1 -0
  79. package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.d.ts +28 -0
  80. package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.d.ts.map +1 -0
  81. package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.js +104 -0
  82. package/lib/features/accessibility/element-navigation/left-right-top-bottom-navigator.js.map +1 -0
  83. package/lib/features/accessibility/element-navigation/local-element-navigator.d.ts +35 -0
  84. package/lib/features/accessibility/element-navigation/local-element-navigator.d.ts.map +1 -0
  85. package/lib/features/accessibility/element-navigation/local-element-navigator.js +117 -0
  86. package/lib/features/accessibility/element-navigation/local-element-navigator.js.map +1 -0
  87. package/lib/features/accessibility/element-navigation/position-navigator.d.ts +32 -0
  88. package/lib/features/accessibility/element-navigation/position-navigator.d.ts.map +1 -0
  89. package/lib/features/accessibility/element-navigation/position-navigator.js +80 -0
  90. package/lib/features/accessibility/element-navigation/position-navigator.js.map +1 -0
  91. package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts +23 -0
  92. package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts.map +1 -0
  93. package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +33 -0
  94. package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -0
  95. package/lib/features/accessibility/focus-tracker/focus-tracker-tool.d.ts +37 -0
  96. package/lib/features/accessibility/focus-tracker/focus-tracker-tool.d.ts.map +1 -0
  97. package/lib/features/accessibility/focus-tracker/focus-tracker-tool.js +133 -0
  98. package/lib/features/accessibility/focus-tracker/focus-tracker-tool.js.map +1 -0
  99. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts +2 -2
  100. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.d.ts.map +1 -1
  101. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js +2 -2
  102. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut-tool.js.map +1 -1
  103. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts +1 -0
  104. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.d.ts.map +1 -1
  105. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js +15 -3
  106. package/lib/features/accessibility/key-shortcut/accessible-key-shortcut.js.map +1 -1
  107. package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts +2 -2
  108. package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts.map +1 -1
  109. package/lib/features/accessibility/resize-key-tool/resize-key-tool.js +22 -15
  110. package/lib/features/accessibility/resize-key-tool/resize-key-tool.js.map +1 -1
  111. package/lib/features/accessibility/search/search-palette.d.ts.map +1 -1
  112. package/lib/features/accessibility/search/search-palette.js +3 -1
  113. package/lib/features/accessibility/search/search-palette.js.map +1 -1
  114. package/lib/features/accessibility/search/search-tool.d.ts +2 -1
  115. package/lib/features/accessibility/search/search-tool.d.ts.map +1 -1
  116. package/lib/features/accessibility/search/search-tool.js +4 -8
  117. package/lib/features/accessibility/search/search-tool.js.map +1 -1
  118. package/lib/features/accessibility/toast/messages.json +16 -0
  119. package/lib/features/accessibility/toast/toast-handler.d.ts +45 -0
  120. package/lib/features/accessibility/toast/toast-handler.d.ts.map +1 -0
  121. package/lib/features/accessibility/toast/toast-handler.js +54 -0
  122. package/lib/features/accessibility/toast/toast-handler.js.map +1 -0
  123. package/lib/features/accessibility/toast/toast-module.d.ts +24 -0
  124. package/lib/features/accessibility/toast/toast-module.d.ts.map +1 -0
  125. package/lib/features/accessibility/toast/toast-module.js +38 -0
  126. package/lib/features/accessibility/toast/toast-module.js.map +1 -0
  127. package/lib/features/accessibility/toast/toast-tool.d.ts +43 -0
  128. package/lib/features/accessibility/toast/toast-tool.d.ts.map +1 -0
  129. package/lib/features/accessibility/toast/toast-tool.js +115 -0
  130. package/lib/features/accessibility/toast/toast-tool.js.map +1 -0
  131. package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +2 -2
  132. package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -1
  133. package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +2 -2
  134. package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
  135. package/lib/features/accessibility/view-key-tools/movement-key-tool.js +4 -8
  136. package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
  137. package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts +2 -2
  138. package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts.map +1 -1
  139. package/lib/features/accessibility/view-key-tools/zoom-key-tool.js +9 -13
  140. package/lib/features/accessibility/view-key-tools/zoom-key-tool.js.map +1 -1
  141. package/lib/features/bounds/bounds-module.d.ts.map +1 -1
  142. package/lib/features/bounds/bounds-module.js +2 -1
  143. package/lib/features/bounds/bounds-module.js.map +1 -1
  144. package/lib/features/command-palette/command-palette-tool.d.ts +2 -1
  145. package/lib/features/command-palette/command-palette-tool.d.ts.map +1 -1
  146. package/lib/features/command-palette/command-palette-tool.js.map +1 -1
  147. package/lib/features/command-palette/server-command-palette-provider.d.ts.map +1 -1
  148. package/lib/features/command-palette/server-command-palette-provider.js +3 -2
  149. package/lib/features/command-palette/server-command-palette-provider.js.map +1 -1
  150. package/lib/features/context-menu/context-menu-module.d.ts.map +1 -1
  151. package/lib/features/context-menu/context-menu-module.js +8 -8
  152. package/lib/features/context-menu/context-menu-module.js.map +1 -1
  153. package/lib/features/context-menu/{selection-service-aware-context-menu-mouse-listener.d.ts → glsp-context-menu-mouse-listener.d.ts} +2 -4
  154. package/lib/features/context-menu/glsp-context-menu-mouse-listener.d.ts.map +1 -0
  155. package/lib/features/context-menu/{selection-service-aware-context-menu-mouse-listener.js → glsp-context-menu-mouse-listener.js} +7 -12
  156. package/lib/features/context-menu/glsp-context-menu-mouse-listener.js.map +1 -0
  157. package/lib/features/context-menu/server-context-menu-provider.d.ts +1 -1
  158. package/lib/features/context-menu/server-context-menu-provider.d.ts.map +1 -1
  159. package/lib/features/context-menu/server-context-menu-provider.js +3 -2
  160. package/lib/features/context-menu/server-context-menu-provider.js.map +1 -1
  161. package/lib/features/copy-paste/copy-paste-context-menu.d.ts.map +1 -1
  162. package/lib/features/copy-paste/copy-paste-context-menu.js +1 -4
  163. package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
  164. package/lib/features/hints/type-hints-module.d.ts.map +1 -1
  165. package/lib/features/hints/type-hints-module.js +6 -5
  166. package/lib/features/hints/type-hints-module.js.map +1 -1
  167. package/lib/features/hints/type-hints.d.ts +6 -2
  168. package/lib/features/hints/type-hints.d.ts.map +1 -1
  169. package/lib/features/hints/type-hints.js +8 -0
  170. package/lib/features/hints/type-hints.js.map +1 -1
  171. package/lib/features/hover/hover-module.d.ts.map +1 -1
  172. package/lib/features/hover/hover-module.js +3 -2
  173. package/lib/features/hover/hover-module.js.map +1 -1
  174. package/lib/features/hover/hover.d.ts.map +1 -1
  175. package/lib/features/hover/hover.js +3 -2
  176. package/lib/features/hover/hover.js.map +1 -1
  177. package/lib/features/label-edit/edit-label-tool.d.ts +2 -2
  178. package/lib/features/label-edit/edit-label-tool.d.ts.map +1 -1
  179. package/lib/features/label-edit/edit-label-tool.js +2 -2
  180. package/lib/features/label-edit/edit-label-tool.js.map +1 -1
  181. package/lib/features/label-edit/edit-label-validator.d.ts.map +1 -1
  182. package/lib/features/label-edit/edit-label-validator.js +3 -2
  183. package/lib/features/label-edit/edit-label-validator.js.map +1 -1
  184. package/lib/features/navigation/navigation-action-handler.d.ts.map +1 -1
  185. package/lib/features/navigation/navigation-action-handler.js +1 -4
  186. package/lib/features/navigation/navigation-action-handler.js.map +1 -1
  187. package/lib/features/navigation/navigation-target-resolver.d.ts +3 -3
  188. package/lib/features/navigation/navigation-target-resolver.d.ts.map +1 -1
  189. package/lib/features/navigation/navigation-target-resolver.js +5 -7
  190. package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
  191. package/lib/features/select/select-mouse-listener.d.ts +4 -2
  192. package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
  193. package/lib/features/select/select-mouse-listener.js +17 -58
  194. package/lib/features/select/select-mouse-listener.js.map +1 -1
  195. package/lib/features/source-model-watcher/source-model-changed-action-handler.d.ts.map +1 -1
  196. package/lib/features/source-model-watcher/source-model-changed-action-handler.js +1 -4
  197. package/lib/features/source-model-watcher/source-model-changed-action-handler.js.map +1 -1
  198. package/lib/features/status/status-module.d.ts +19 -0
  199. package/lib/features/status/status-module.d.ts.map +1 -0
  200. package/lib/features/status/status-module.js +28 -0
  201. package/lib/features/status/status-module.js.map +1 -0
  202. package/lib/features/status/status-overlay.d.ts +25 -0
  203. package/lib/features/status/status-overlay.d.ts.map +1 -0
  204. package/lib/features/status/status-overlay.js +124 -0
  205. package/lib/features/status/status-overlay.js.map +1 -0
  206. package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
  207. package/lib/features/tool-palette/tool-palette-module.js +3 -2
  208. package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
  209. package/lib/features/tool-palette/tool-palette.d.ts +10 -8
  210. package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
  211. package/lib/features/tool-palette/tool-palette.js +36 -29
  212. package/lib/features/tool-palette/tool-palette.js.map +1 -1
  213. package/lib/features/tools/{base-glsp-tool.d.ts → base-tools.d.ts} +14 -4
  214. package/lib/features/tools/base-tools.d.ts.map +1 -0
  215. package/lib/features/tools/{base-glsp-tool.js → base-tools.js} +31 -10
  216. package/lib/features/tools/base-tools.js.map +1 -0
  217. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +2 -2
  218. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
  219. package/lib/features/tools/change-bounds/change-bounds-tool.js +2 -2
  220. package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
  221. package/lib/features/tools/deletion/delete-tool.d.ts +4 -4
  222. package/lib/features/tools/deletion/delete-tool.d.ts.map +1 -1
  223. package/lib/features/tools/deletion/delete-tool.js +4 -3
  224. package/lib/features/tools/deletion/delete-tool.js.map +1 -1
  225. package/lib/features/tools/edge-creation/edge-creation-tool.d.ts +2 -2
  226. package/lib/features/tools/edge-creation/edge-creation-tool.d.ts.map +1 -1
  227. package/lib/features/tools/edge-creation/edge-creation-tool.js +5 -4
  228. package/lib/features/tools/edge-creation/edge-creation-tool.js.map +1 -1
  229. package/lib/features/tools/edge-edit/edge-edit-tool.d.ts +2 -2
  230. package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -1
  231. package/lib/features/tools/edge-edit/edge-edit-tool.js +2 -2
  232. package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -1
  233. package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts +2 -2
  234. package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts.map +1 -1
  235. package/lib/features/tools/marquee-selection/marquee-mouse-tool.js +5 -4
  236. package/lib/features/tools/marquee-selection/marquee-mouse-tool.js.map +1 -1
  237. package/lib/features/tools/marquee-selection/marquee-tool.d.ts +2 -2
  238. package/lib/features/tools/marquee-selection/marquee-tool.d.ts.map +1 -1
  239. package/lib/features/tools/marquee-selection/marquee-tool.js +4 -3
  240. package/lib/features/tools/marquee-selection/marquee-tool.js.map +1 -1
  241. package/lib/features/tools/node-creation/node-creation-tool.d.ts +2 -2
  242. package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
  243. package/lib/features/tools/node-creation/node-creation-tool.js +4 -3
  244. package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
  245. package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -1
  246. package/lib/features/tools/tool-focus-loss-module.js +2 -1
  247. package/lib/features/tools/tool-focus-loss-module.js.map +1 -1
  248. package/lib/features/validation/validate.js +1 -1
  249. package/lib/features/validation/validate.js.map +1 -1
  250. package/lib/features/viewport/glsp-scroll-mouse-listener.d.ts.map +1 -1
  251. package/lib/features/viewport/glsp-scroll-mouse-listener.js +3 -2
  252. package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -1
  253. package/lib/features/viewport/reposition.d.ts +38 -0
  254. package/lib/features/viewport/reposition.d.ts.map +1 -0
  255. package/lib/features/viewport/reposition.js +109 -0
  256. package/lib/features/viewport/reposition.js.map +1 -0
  257. package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
  258. package/lib/features/viewport/viewport-modules.js +5 -2
  259. package/lib/features/viewport/viewport-modules.js.map +1 -1
  260. package/lib/glsp-sprotty/augmented-actions.d.ts +2 -10
  261. package/lib/glsp-sprotty/augmented-actions.d.ts.map +1 -1
  262. package/lib/glsp-sprotty/augmented-actions.js +2 -6
  263. package/lib/glsp-sprotty/augmented-actions.js.map +1 -1
  264. package/lib/glsp-sprotty/index.d.ts +3 -6
  265. package/lib/glsp-sprotty/index.d.ts.map +1 -1
  266. package/lib/glsp-sprotty/index.js +4 -7
  267. package/lib/glsp-sprotty/index.js.map +1 -1
  268. package/lib/glsp-sprotty/types.d.ts +5 -82
  269. package/lib/glsp-sprotty/types.d.ts.map +1 -1
  270. package/lib/glsp-sprotty/types.js +2 -8
  271. package/lib/glsp-sprotty/types.js.map +1 -1
  272. package/lib/index.d.ts +17 -7
  273. package/lib/index.d.ts.map +1 -1
  274. package/lib/index.js +17 -7
  275. package/lib/index.js.map +1 -1
  276. package/lib/standalone-modules.d.ts +11 -2
  277. package/lib/standalone-modules.d.ts.map +1 -1
  278. package/lib/standalone-modules.js +37 -1
  279. package/lib/standalone-modules.js.map +1 -1
  280. package/lib/views/base-view-module.d.ts.map +1 -1
  281. package/lib/views/base-view-module.js +2 -1
  282. package/lib/views/base-view-module.js.map +1 -1
  283. package/lib/views/glsp-projection-view.d.ts +2 -1
  284. package/lib/views/glsp-projection-view.d.ts.map +1 -1
  285. package/lib/views/glsp-projection-view.js +11 -2
  286. package/lib/views/glsp-projection-view.js.map +1 -1
  287. package/package.json +4 -4
  288. package/src/base/action-dispatcher.spec.ts +87 -0
  289. package/src/base/action-dispatcher.ts +24 -10
  290. package/src/{features/tools/base-glsp-creation-tool.ts → base/action-handler-registry.ts} +10 -20
  291. package/src/base/default.module.ts +21 -34
  292. package/src/base/editor-context-service.ts +49 -16
  293. package/src/base/feedback/feedback-action-dispatcher.ts +5 -3
  294. package/src/base/focus/focus-tracker.ts +16 -5
  295. package/src/base/model/diagram-loader.ts +215 -0
  296. package/src/base/model/glsp-model-source.ts +199 -0
  297. package/src/base/model/model-initialization-constraint.spec.ts +95 -0
  298. package/src/base/{model-initialization-constraint.ts → model/model-initialization-constraint.ts} +43 -10
  299. package/src/base/selection-service.spec.ts +10 -9
  300. package/src/base/tool-manager/tool-manager.ts +183 -0
  301. package/src/base/tool-manager/tool.ts +85 -0
  302. package/src/default-modules.ts +37 -28
  303. package/src/features/accessibility/README.md +18 -0
  304. package/src/features/accessibility/accessibility-module.ts +6 -1
  305. package/src/features/accessibility/element-navigation/diagram-navigation-tool.ts +307 -0
  306. package/src/features/accessibility/element-navigation/element-navigation-module.ts +36 -0
  307. package/src/features/accessibility/element-navigation/element-navigator.ts +57 -0
  308. package/src/features/accessibility/element-navigation/left-right-top-bottom-navigator.ts +113 -0
  309. package/src/features/accessibility/element-navigation/local-element-navigator.ts +147 -0
  310. package/src/features/accessibility/element-navigation/position-navigator.ts +102 -0
  311. package/src/features/accessibility/focus-tracker/focus-tracker-module.ts +32 -0
  312. package/src/features/accessibility/focus-tracker/focus-tracker-tool.ts +129 -0
  313. package/src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts +3 -3
  314. package/src/features/accessibility/key-shortcut/accessible-key-shortcut.ts +18 -3
  315. package/src/features/accessibility/resize-key-tool/resize-key-tool.ts +30 -16
  316. package/src/features/accessibility/search/search-palette.ts +4 -2
  317. package/src/features/accessibility/search/search-tool.ts +8 -9
  318. package/src/features/accessibility/toast/messages.json +16 -0
  319. package/src/features/accessibility/toast/toast-handler.ts +69 -0
  320. package/src/features/accessibility/toast/toast-module.ts +36 -0
  321. package/src/features/accessibility/toast/toast-tool.ts +108 -0
  322. package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +2 -2
  323. package/src/features/accessibility/view-key-tools/movement-key-tool.ts +8 -10
  324. package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +13 -15
  325. package/src/features/bounds/bounds-module.ts +2 -2
  326. package/src/features/command-palette/command-palette-tool.ts +2 -1
  327. package/src/features/command-palette/server-command-palette-provider.ts +3 -2
  328. package/src/features/context-menu/context-menu-module.ts +11 -12
  329. package/src/features/context-menu/{selection-service-aware-context-menu-mouse-listener.ts → glsp-context-menu-mouse-listener.ts} +1 -5
  330. package/src/features/context-menu/server-context-menu-provider.ts +3 -2
  331. package/src/features/copy-paste/copy-paste-context-menu.ts +3 -6
  332. package/src/features/hints/type-hints-module.ts +7 -6
  333. package/src/features/hints/type-hints.ts +12 -1
  334. package/src/features/hover/hover-module.ts +1 -2
  335. package/src/features/hover/hover.ts +2 -3
  336. package/src/features/label-edit/edit-label-tool.ts +2 -2
  337. package/src/features/label-edit/edit-label-validator.ts +7 -6
  338. package/src/features/navigation/navigation-action-handler.ts +5 -8
  339. package/src/features/navigation/navigation-target-resolver.ts +10 -7
  340. package/src/features/select/select-mouse-listener.ts +27 -79
  341. package/src/features/source-model-watcher/source-model-changed-action-handler.ts +3 -6
  342. package/src/features/status/status-module.ts +26 -0
  343. package/src/features/status/status-overlay.ts +121 -0
  344. package/src/features/tool-palette/tool-palette-module.ts +4 -3
  345. package/src/features/tool-palette/tool-palette.ts +44 -33
  346. package/src/features/tools/{base-glsp-tool.ts → base-tools.ts} +28 -3
  347. package/src/features/tools/change-bounds/change-bounds-tool.ts +2 -2
  348. package/src/features/tools/deletion/delete-tool.ts +4 -5
  349. package/src/features/tools/edge-creation/edge-creation-tool.ts +3 -3
  350. package/src/features/tools/edge-edit/edge-edit-tool.ts +2 -2
  351. package/src/features/tools/marquee-selection/marquee-mouse-tool.ts +3 -3
  352. package/src/features/tools/marquee-selection/marquee-tool.ts +4 -3
  353. package/src/features/tools/node-creation/node-creation-tool.ts +3 -3
  354. package/src/features/tools/tool-focus-loss-module.ts +2 -1
  355. package/src/features/validation/validate.ts +1 -1
  356. package/src/features/viewport/glsp-scroll-mouse-listener.ts +2 -9
  357. package/src/features/viewport/reposition.ts +119 -0
  358. package/src/features/viewport/viewport-modules.ts +3 -2
  359. package/src/glsp-sprotty/augmented-actions.ts +1 -16
  360. package/src/glsp-sprotty/index.ts +4 -7
  361. package/src/glsp-sprotty/types.ts +6 -8
  362. package/src/index.ts +17 -7
  363. package/src/standalone-modules.ts +40 -1
  364. package/src/views/base-view-module.ts +2 -2
  365. package/src/views/glsp-projection-view.tsx +18 -8
  366. package/lib/base/model-initialization-constraint.d.ts.map +0 -1
  367. package/lib/base/model-initialization-constraint.js.map +0 -1
  368. package/lib/base/source-uri-aware.d.ts +0 -5
  369. package/lib/base/source-uri-aware.d.ts.map +0 -1
  370. package/lib/base/source-uri-aware.js.map +0 -1
  371. package/lib/base/tool-manager/glsp-tool-manager.d.ts +0 -21
  372. package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +0 -1
  373. package/lib/base/tool-manager/glsp-tool-manager.js +0 -113
  374. package/lib/base/tool-manager/glsp-tool-manager.js.map +0 -1
  375. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map +0 -1
  376. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +0 -1
  377. package/lib/features/tools/base-glsp-creation-tool.d.ts +0 -10
  378. package/lib/features/tools/base-glsp-creation-tool.d.ts.map +0 -1
  379. package/lib/features/tools/base-glsp-creation-tool.js.map +0 -1
  380. package/lib/features/tools/base-glsp-tool.d.ts.map +0 -1
  381. package/lib/features/tools/base-glsp-tool.js.map +0 -1
  382. package/lib/model-source/glsp-diagram-server.d.ts +0 -21
  383. package/lib/model-source/glsp-diagram-server.d.ts.map +0 -1
  384. package/lib/model-source/glsp-diagram-server.js +0 -107
  385. package/lib/model-source/glsp-diagram-server.js.map +0 -1
  386. package/src/base/tool-manager/glsp-tool-manager.ts +0 -96
  387. package/src/model-source/glsp-diagram-server.ts +0 -125
@@ -14,15 +14,18 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { inject, injectable } from 'inversify';
17
- import { Action, Disposable, DisposableCollection, IActionDispatcher, TYPES } from '~glsp-sprotty';
17
+ import { Action, Disposable, DisposableCollection, IActionDispatcher, IActionHandler, TYPES } from '~glsp-sprotty';
18
18
  import { EditorContextService } from '../../base/editor-context-service';
19
19
  import { IFeedbackActionDispatcher, IFeedbackEmitter } from '../../base/feedback/feedback-action-dispatcher';
20
- import { GLSPTool } from '../../base/tool-manager/glsp-tool-manager';
20
+ import { EnableToolsAction, Tool } from '../../base/tool-manager/tool';
21
21
  import { GLSPKeyTool } from '../../base/view/key-tool';
22
22
  import { GLSPMouseTool } from '../../base/view/mouse-tool';
23
23
 
24
+ /**
25
+ * A reusable base implementation for edit {@link Tool}s.
26
+ */
24
27
  @injectable()
25
- export abstract class BaseGLSPTool implements GLSPTool {
28
+ export abstract class BaseEditTool implements Tool {
26
29
  @inject(TYPES.IFeedbackActionDispatcher) protected feedbackDispatcher: IFeedbackActionDispatcher;
27
30
  @inject(TYPES.IActionDispatcher) protected actionDispatcher: IActionDispatcher;
28
31
  @inject(GLSPMouseTool) protected mouseTool: GLSPMouseTool;
@@ -71,3 +74,25 @@ export abstract class BaseGLSPTool implements GLSPTool {
71
74
  this.feedbackDispatcher.deregisterFeedback(feedbackEmitter ?? this, cleanupActions);
72
75
  }
73
76
  }
77
+
78
+ @injectable()
79
+ export abstract class BaseCreationTool<T extends Action> extends BaseEditTool implements IActionHandler {
80
+ protected abstract isTriggerAction: (obj: any) => obj is T;
81
+ protected triggerAction: T;
82
+
83
+ handle(action: Action): Action | void {
84
+ if (this.isTriggerAction(action)) {
85
+ this.triggerAction = action;
86
+ return EnableToolsAction.create([this.id]);
87
+ }
88
+ }
89
+
90
+ override enable(): void {
91
+ if (this.triggerAction === undefined) {
92
+ throw new TypeError(`Could not enable tool ${this.id}. The triggerAction cannot be undefined.`);
93
+ }
94
+ this.doEnable();
95
+ }
96
+
97
+ protected abstract doEnable(): void;
98
+ }
@@ -58,7 +58,7 @@ import {
58
58
  createMovementRestrictionFeedback,
59
59
  removeMovementRestrictionFeedback
60
60
  } from '../../change-bounds/movement-restrictor';
61
- import { BaseGLSPTool } from '../base-glsp-tool';
61
+ import { BaseEditTool } from '../base-tools';
62
62
  import {
63
63
  FeedbackMoveMouseListener,
64
64
  HideChangeBoundsToolResizeFeedbackAction,
@@ -79,7 +79,7 @@ import {
79
79
  * resize and send the server updates we install the `ChangeBoundsListener`.
80
80
  */
81
81
  @injectable()
82
- export class ChangeBoundsTool extends BaseGLSPTool {
82
+ export class ChangeBoundsTool extends BaseEditTool {
83
83
  static ID = 'glsp.change-bounds-tool';
84
84
 
85
85
  @inject(SelectionService) protected selectionService: SelectionService;
@@ -17,7 +17,6 @@ import { inject, injectable } from 'inversify';
17
17
  import {
18
18
  Action,
19
19
  DeleteElementOperation,
20
- EnableDefaultToolsAction,
21
20
  KeyListener,
22
21
  KeyTool,
23
22
  MouseListener,
@@ -29,14 +28,14 @@ import {
29
28
  matchesKeystroke
30
29
  } from '~glsp-sprotty';
31
30
  import { CursorCSS, cursorFeedbackAction } from '../../../base/feedback/css-feedback';
32
- import { GLSPTool } from '../../../base/tool-manager/glsp-tool-manager';
33
- import { BaseGLSPTool } from '../base-glsp-tool';
31
+ import { EnableDefaultToolsAction, Tool } from '../../../base/tool-manager/tool';
32
+ import { BaseEditTool } from '../base-tools';
34
33
 
35
34
  /**
36
35
  * Deletes selected elements when hitting the `Del` key.
37
36
  */
38
37
  @injectable()
39
- export class DelKeyDeleteTool implements GLSPTool {
38
+ export class DelKeyDeleteTool implements Tool {
40
39
  static ID = 'glsp.delete-keyboard';
41
40
 
42
41
  isEditTool = true;
@@ -80,7 +79,7 @@ export class DeleteKeyListener extends KeyListener {
80
79
  * Deletes selected elements when clicking on them.
81
80
  */
82
81
  @injectable()
83
- export class MouseDeleteTool extends BaseGLSPTool {
82
+ export class MouseDeleteTool extends BaseEditTool {
84
83
  static ID = 'glsp.delete-mouse';
85
84
 
86
85
  protected deleteToolMouseListener: DeleteToolMouseListener = new DeleteToolMouseListener();
@@ -18,7 +18,6 @@ import {
18
18
  Action,
19
19
  AnchorComputerRegistry,
20
20
  CreateEdgeOperation,
21
- EnableDefaultToolsAction,
22
21
  SEdge,
23
22
  SModelElement,
24
23
  TriggerEdgeCreationAction,
@@ -29,7 +28,8 @@ import {
29
28
  import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
30
29
 
31
30
  import { CursorCSS, cursorFeedbackAction } from '../../../base/feedback/css-feedback';
32
- import { BaseGLSPCreationTool } from '../base-glsp-creation-tool';
31
+ import { EnableDefaultToolsAction } from '../../../base/tool-manager/tool';
32
+ import { BaseCreationTool } from '../base-tools';
33
33
  import { DrawFeedbackEdgeAction, RemoveFeedbackEdgeAction } from './dangling-edge-feedback';
34
34
  import { FeedbackEdgeEndMovingMouseListener } from './edge-creation-tool-feedback';
35
35
 
@@ -37,7 +37,7 @@ import { FeedbackEdgeEndMovingMouseListener } from './edge-creation-tool-feedbac
37
37
  * Tool to create connections in a Diagram, by selecting a source and target node.
38
38
  */
39
39
  @injectable()
40
- export class EdgeCreationTool extends BaseGLSPCreationTool<TriggerEdgeCreationAction> {
40
+ export class EdgeCreationTool extends BaseCreationTool<TriggerEdgeCreationAction> {
41
41
  static ID = 'tool_create_edge';
42
42
 
43
43
  @inject(AnchorComputerRegistry) protected anchorRegistry: AnchorComputerRegistry;
@@ -38,7 +38,7 @@ import { CursorCSS, cursorFeedbackAction } from '../../../base/feedback/css-feed
38
38
  import { ISelectionListener, SelectionService } from '../../../base/selection-service';
39
39
  import { calcElementAndRoutingPoints, isRoutable, isRoutingHandle } from '../../../utils/smodel-util';
40
40
  import { SReconnectHandle, isReconnectHandle, isReconnectable, isSourceRoutingHandle, isTargetRoutingHandle } from '../../reconnect/model';
41
- import { BaseGLSPTool } from '../base-glsp-tool';
41
+ import { BaseEditTool } from '../base-tools';
42
42
  import { DrawFeedbackEdgeAction, RemoveFeedbackEdgeAction, feedbackEdgeId } from '../edge-creation/dangling-edge-feedback';
43
43
  import {
44
44
  DrawFeedbackEdgeSourceAction,
@@ -51,7 +51,7 @@ import {
51
51
  } from './edge-edit-tool-feedback';
52
52
 
53
53
  @injectable()
54
- export class EdgeEditTool extends BaseGLSPTool {
54
+ export class EdgeEditTool extends BaseEditTool {
55
55
  static ID = 'glsp.edge-edit-tool';
56
56
 
57
57
  @inject(SelectionService) protected selectionService: SelectionService;
@@ -18,7 +18,6 @@ import {
18
18
  Action,
19
19
  BoundsAware,
20
20
  DOMHelper,
21
- EnableDefaultToolsAction,
22
21
  KeyListener,
23
22
  SEdge,
24
23
  SModelElement,
@@ -31,13 +30,14 @@ import {
31
30
  } from '~glsp-sprotty';
32
31
  import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
33
32
  import { CursorCSS, cursorFeedbackAction } from '../../../base/feedback/css-feedback';
33
+ import { EnableDefaultToolsAction } from '../../../base/tool-manager/tool';
34
34
  import { getAbsolutePosition, toAbsoluteBounds } from '../../../utils/viewpoint-util';
35
- import { BaseGLSPTool } from '../base-glsp-tool';
35
+ import { BaseEditTool } from '../base-tools';
36
36
  import { IMarqueeBehavior, MarqueeUtil } from './marquee-behavior';
37
37
  import { RemoveMarqueeAction } from './marquee-tool-feedback';
38
38
 
39
39
  @injectable()
40
- export class MarqueeMouseTool extends BaseGLSPTool {
40
+ export class MarqueeMouseTool extends BaseEditTool {
41
41
  static ID = 'glsp.marquee-mouse-tool';
42
42
 
43
43
  @inject(TYPES.DOMHelper) protected domHelper: DOMHelper;
@@ -14,12 +14,13 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { injectable } from 'inversify';
17
- import { Action, EnableToolsAction, KeyListener, SModelElement } from '~glsp-sprotty';
18
- import { BaseGLSPTool } from '../base-glsp-tool';
17
+ import { Action, KeyListener, SModelElement } from '~glsp-sprotty';
18
+ import { EnableToolsAction } from '../../../base/tool-manager/tool';
19
+ import { BaseEditTool } from '../base-tools';
19
20
  import { MarqueeMouseTool } from './marquee-mouse-tool';
20
21
 
21
22
  @injectable()
22
- export class MarqueeTool extends BaseGLSPTool {
23
+ export class MarqueeTool extends BaseEditTool {
23
24
  static ID = 'glsp.marquee-tool';
24
25
 
25
26
  protected marqueeKeyListener: MarqueeKeyListener = new MarqueeKeyListener();
@@ -17,7 +17,6 @@ import { inject, injectable, optional } from 'inversify';
17
17
  import {
18
18
  Action,
19
19
  CreateNodeOperation,
20
- EnableDefaultToolsAction,
21
20
  ISnapper,
22
21
  SModelElement,
23
22
  SNode,
@@ -28,12 +27,13 @@ import {
28
27
  } from '~glsp-sprotty';
29
28
  import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
30
29
  import { CursorCSS, cursorFeedbackAction } from '../../../base/feedback/css-feedback';
30
+ import { EnableDefaultToolsAction } from '../../../base/tool-manager/tool';
31
31
  import { getAbsolutePosition } from '../../../utils/viewpoint-util';
32
32
  import { Containable, isContainable } from '../../hints/model';
33
- import { BaseGLSPCreationTool } from '../base-glsp-creation-tool';
33
+ import { BaseCreationTool } from '../base-tools';
34
34
 
35
35
  @injectable()
36
- export class NodeCreationTool extends BaseGLSPCreationTool<TriggerNodeCreationAction> {
36
+ export class NodeCreationTool extends BaseCreationTool<TriggerNodeCreationAction> {
37
37
  static ID = 'tool_create_node';
38
38
 
39
39
  protected isTriggerAction = TriggerNodeCreationAction.is;
@@ -14,8 +14,9 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { injectable } from 'inversify';
17
- import { Action, EnableDefaultToolsAction, FeatureModule, IActionHandler, ICommand, configureActionHandler } from '~glsp-sprotty';
17
+ import { Action, FeatureModule, IActionHandler, ICommand, configureActionHandler } from '~glsp-sprotty';
18
18
  import { FocusStateChangedAction } from '../../base/focus/focus-state-change-action';
19
+ import { EnableDefaultToolsAction } from '../../base/tool-manager/tool';
19
20
 
20
21
  /**
21
22
  * Action handler that enables the default tools when the diagram lost focus.
@@ -110,7 +110,7 @@ export class SetMarkersActionHandler implements IActionHandler {
110
110
  }
111
111
 
112
112
  async setMarkers(markers: Marker[], reason: string | undefined): Promise<void> {
113
- const uri = await this.editorContextService.getSourceUri();
113
+ const uri = this.editorContextService.sourceUri;
114
114
  this.externalMarkerManager?.setMarkers(markers, reason, uri);
115
115
  const applyMarkersAction = ApplyMarkersAction.create(markers);
116
116
  this.validationFeedbackEmitter.registerValidationFeedbackAction(applyMarkersAction, reason);
@@ -14,15 +14,8 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { injectable } from 'inversify';
17
- import {
18
- Action,
19
- EnableDefaultToolsAction,
20
- EnableToolsAction,
21
- IActionHandler,
22
- ICommand,
23
- ScrollMouseListener,
24
- SModelElement
25
- } from '~glsp-sprotty';
17
+ import { Action, IActionHandler, ICommand, ScrollMouseListener, SModelElement } from '~glsp-sprotty';
18
+ import { EnableDefaultToolsAction, EnableToolsAction } from '../../base/tool-manager/tool';
26
19
  import { MarqueeMouseTool } from '../tools/marquee-selection/marquee-mouse-tool';
27
20
 
28
21
  @injectable()
@@ -0,0 +1,119 @@
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
+ import {
18
+ Action,
19
+ Bounds,
20
+ Dimension,
21
+ hasArrayProp,
22
+ Viewport,
23
+ BoundsAwareViewportCommand,
24
+ getRouteBounds,
25
+ isViewport,
26
+ SChildElement,
27
+ SEdge,
28
+ SModelElement,
29
+ SModelRoot,
30
+ TYPES
31
+ } from '~glsp-sprotty';
32
+ import { inject, injectable } from 'inversify';
33
+ import { calcElementAndRoute } from '../../utils/smodel-util';
34
+
35
+ export interface RepositionAction extends Action {
36
+ kind: typeof RepositionAction.KIND;
37
+ elementIDs: string[];
38
+ }
39
+
40
+ export namespace RepositionAction {
41
+ export const KIND = 'repositionAction';
42
+
43
+ export function is(object: any): object is RepositionAction {
44
+ return Action.hasKind(object, KIND) && hasArrayProp(object, 'elementIDs');
45
+ }
46
+
47
+ export function create(elementIDs: string[]): RepositionAction {
48
+ return {
49
+ kind: KIND,
50
+ elementIDs
51
+ };
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Moves the viewport to an unvisible element, while maintaining the current zoom level.
57
+ */
58
+ @injectable()
59
+ export class RepositionCommand extends BoundsAwareViewportCommand {
60
+ static readonly KIND = RepositionAction.KIND;
61
+
62
+ constructor(@inject(TYPES.Action) protected action: RepositionAction) {
63
+ super(true);
64
+ }
65
+
66
+ protected override boundsInViewport(element: SModelElement, bounds: Bounds, viewport: SModelRoot & Viewport): Bounds {
67
+ if (element instanceof SChildElement && element.parent !== viewport) {
68
+ return this.boundsInViewport(element.parent, element.parent.localToParent(bounds) as Bounds, viewport);
69
+ } else if (element instanceof SEdge) {
70
+ const edgeBounds = getRouteBounds(calcElementAndRoute(element).newRoutingPoints ?? []);
71
+
72
+ if (element instanceof SChildElement && element.parent !== viewport) {
73
+ return this.boundsInViewport(element.parent, element.parent.localToParent(edgeBounds), viewport);
74
+ }
75
+
76
+ return edgeBounds;
77
+ }
78
+
79
+ return bounds;
80
+ }
81
+
82
+ getElementIds(): string[] {
83
+ return this.action.elementIDs;
84
+ }
85
+
86
+ getNewViewport(bounds: Bounds, model: SModelRoot): Viewport | undefined {
87
+ if (!Dimension.isValid(model.canvasBounds)) {
88
+ return undefined;
89
+ }
90
+
91
+ if (isViewport(model)) {
92
+ const zoom = model.zoom;
93
+ const c = Bounds.center(bounds);
94
+
95
+ if (this.isFullyVisible(bounds, model)) {
96
+ return undefined;
97
+ } else {
98
+ return {
99
+ scroll: {
100
+ x: c.x - (0.5 * model.canvasBounds.width) / zoom,
101
+ y: c.y - (0.5 * model.canvasBounds.height) / zoom
102
+ },
103
+ zoom: zoom
104
+ };
105
+ }
106
+ }
107
+
108
+ return undefined;
109
+ }
110
+
111
+ protected isFullyVisible(bounds: Bounds, viewport: SModelRoot & Viewport): boolean {
112
+ return (
113
+ bounds.x >= viewport.scroll.x &&
114
+ bounds.x + bounds.width <= viewport.scroll.x + viewport.canvasBounds.width / viewport.zoom &&
115
+ bounds.y >= viewport.scroll.y &&
116
+ bounds.y + bounds.height <= viewport.scroll.y + viewport.canvasBounds.height / viewport.zoom
117
+ );
118
+ }
119
+ }
@@ -19,8 +19,6 @@ import {
19
19
  CenterKeyboardListener,
20
20
  configureActionHandler,
21
21
  configureCommand,
22
- EnableDefaultToolsAction,
23
- EnableToolsAction,
24
22
  FeatureModule,
25
23
  FitToScreenCommand,
26
24
  GetViewportCommand,
@@ -28,7 +26,9 @@ import {
28
26
  TYPES,
29
27
  ZoomMouseListener
30
28
  } from '~glsp-sprotty';
29
+ import { EnableDefaultToolsAction, EnableToolsAction } from '../../base/tool-manager/tool';
31
30
  import { GLSPScrollMouseListener } from './glsp-scroll-mouse-listener';
31
+ import { RepositionCommand } from './reposition';
32
32
 
33
33
  export const viewportModule = new FeatureModule((bind, _unbind, isBound) => {
34
34
  const context = { bind, isBound };
@@ -36,6 +36,7 @@ export const viewportModule = new FeatureModule((bind, _unbind, isBound) => {
36
36
  configureCommand(context, FitToScreenCommand);
37
37
  configureCommand(context, GetViewportCommand);
38
38
  configureCommand(context, SetViewportCommand);
39
+ configureCommand(context, RepositionCommand);
39
40
 
40
41
  bindAsService(context, TYPES.MouseListener, ZoomMouseListener);
41
42
  bindAsService(context, TYPES.MouseListener, GLSPScrollMouseListener);
@@ -17,7 +17,6 @@
17
17
  /* eslint-disable-next-line no-restricted-imports*/
18
18
  import { Action, hasArrayProp } from '@eclipse-glsp/protocol';
19
19
  import { SetBoundsAction } from 'sprotty-protocol/lib/actions';
20
- import { EnableDefaultToolsAction, EnableToolsAction } from 'sprotty/lib/base/tool-manager/tool';
21
20
 
22
21
  /**
23
22
  * Use module augmentation to add namespaces and the `is` utility function to sprotty actions that directly reused by GLSP
@@ -31,18 +30,4 @@ declare module 'sprotty-protocol/lib/actions' {
31
30
  SetBoundsAction.is = (object: any): object is SetBoundsAction =>
32
31
  Action.hasKind(object, SetBoundsAction.KIND) && hasArrayProp(object, 'bounds');
33
32
 
34
- declare module 'sprotty/lib/base/tool-manager/tool' {
35
- export namespace EnableDefaultToolsAction {
36
- export function is(object: any): object is EnableDefaultToolsAction;
37
- }
38
- export namespace EnableToolsAction {
39
- export function is(object: any): object is EnableToolsAction;
40
- }
41
- }
42
-
43
- EnableDefaultToolsAction.is = (object: any): object is EnableDefaultToolsAction => Action.hasKind(object, EnableDefaultToolsAction.KIND);
44
-
45
- EnableToolsAction.is = (object: any): object is EnableToolsAction =>
46
- Action.hasKind(object, EnableToolsAction.KIND) && hasArrayProp(object, 'toolIds');
47
-
48
- export { EnableDefaultToolsAction, EnableToolsAction };
33
+ export { SetBoundsAction };
@@ -13,13 +13,12 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /* eslint-disable no-restricted-imports */
16
17
  /**
17
- * Sprotty still keeps the old class based action definitions as deprecated API.
18
- * This causes name clashes with the GLSP protocol actions when reexport sprotty.
19
- * The deprecated definitions are planned to be removed with Sprotty 1.0.0.
20
- * Until then we have to manually reexport the sprotty main index and exclude the clashing types.
18
+ * Selective custom reexport of the sprotty API. Also provides augmentations/adaptions
19
+ * of certain type definitions for GLSP. Using this custom reexport allows us to gracefully
20
+ * update to newer sprotty versions without hard API breaks.
21
21
  */
22
- /* eslint-disable no-restricted-imports */
23
22
 
24
23
  /**
25
24
  * @eclipse-glsp/protocol
@@ -79,8 +78,6 @@ export {
79
78
  translateBounds,
80
79
  translatePoint
81
80
  } from 'sprotty/lib/base/model/smodel-utils';
82
- export * from 'sprotty/lib/base/tool-manager/tool';
83
- export * from 'sprotty/lib/base/tool-manager/tool-manager';
84
81
  export * from 'sprotty/lib/base/ui-extensions/ui-extension';
85
82
  export * from 'sprotty/lib/base/ui-extensions/ui-extension-registry';
86
83
  export * from 'sprotty/lib/base/views/dom-helper';
@@ -34,12 +34,10 @@ export const TYPES = {
34
34
  ITool: Symbol('ITool'),
35
35
  IDefaultTool: Symbol('IDefaultTool'),
36
36
  IEditModeListener: Symbol('IEditModeListener'),
37
- IMarqueeBehavior: Symbol('IMarqueeBehavior')
37
+ IMarqueeBehavior: Symbol('IMarqueeBehavior'),
38
+ IElementNavigator: Symbol('IElementNavigator'),
39
+ ILocalElementNavigator: Symbol('ILocalElementNavigator'),
40
+ IDiagramOptions: Symbol('IDiagramOptions'),
41
+ IDiagramStartup: Symbol('IDiagramStartup'),
42
+ IToolManager: Symbol('IToolManager')
38
43
  };
39
-
40
- /**
41
- * Keep a reexport under the old deprecated namespace to avoid hard API breaks.
42
- * This gives adopters a grace period but all deprecated API will be removed before the 1.0.0 release.
43
- * @deprecated Please use `TYPES` from `@eclipse-glsp/client` instead
44
- */
45
- export const GLSP_TYPES = TYPES;
package/src/index.ts CHANGED
@@ -16,6 +16,7 @@
16
16
 
17
17
  // ------------------ Base ------------------
18
18
  export * from './base/action-dispatcher';
19
+ export * from './base/action-handler-registry';
19
20
  export * from './base/argumentable';
20
21
  export * from './base/auto-complete/auto-complete-actions';
21
22
  export * from './base/auto-complete/auto-complete-widget';
@@ -28,13 +29,15 @@ export * from './base/feedback/feedback-command';
28
29
  export * from './base/feedback/update-model-command';
29
30
  export * from './base/focus/focus-state-change-action';
30
31
  export * from './base/focus/focus-tracker';
31
- export * from './base/model-initialization-constraint';
32
+ export * from './base/model/diagram-loader';
33
+ export * from './base/model/glsp-model-source';
34
+ export * from './base/model/model-initialization-constraint';
32
35
  export * from './base/model/model-registry';
33
36
  export * from './base/ranked';
34
37
  export * from './base/selection-clearing-mouse-listener';
35
38
  export * from './base/selection-service';
36
- export * from './base/source-uri-aware';
37
- export * from './base/tool-manager/glsp-tool-manager';
39
+ export * from './base/tool-manager/tool';
40
+ export * from './base/tool-manager/tool-manager';
38
41
  export * from './base/view/mouse-tool';
39
42
  export * from './base/view/view-registry';
40
43
 
@@ -42,11 +45,14 @@ export * from './base/view/view-registry';
42
45
  // ------------------ Features ------------------
43
46
  export * from './base/feedback/css-feedback';
44
47
  export * from './base/view/mouse-tool';
48
+ export * from './features/accessibility/element-navigation/diagram-navigation-tool';
49
+ export * from './features/accessibility/focus-tracker/focus-tracker-tool';
50
+ export * from './features/accessibility/key-shortcut/accessible-key-shortcut-tool';
45
51
  export * from './features/accessibility/resize-key-tool/resize-key-tool';
52
+ export * from './features/accessibility/toast/toast-tool';
46
53
  export * from './features/accessibility/view-key-tools/deselect-key-tool';
47
54
  export * from './features/accessibility/view-key-tools/movement-key-tool';
48
55
  export * from './features/accessibility/view-key-tools/zoom-key-tool';
49
- export * from './features/accessibility/key-shortcut/accessible-key-shortcut-tool';
50
56
  export * from './features/bounds/freeform-layout';
51
57
  export * from './features/bounds/glsp-hidden-bounds-updater';
52
58
  export * from './features/bounds/hbox-layout';
@@ -58,7 +64,7 @@ export * from './features/change-bounds/snap';
58
64
  export * from './features/command-palette/command-palette-tool';
59
65
  export * from './features/command-palette/server-command-palette-provider';
60
66
  export * from './features/context-menu/delete-element-context-menu';
61
- export * from './features/context-menu/selection-service-aware-context-menu-mouse-listener';
67
+ export * from './features/context-menu/glsp-context-menu-mouse-listener';
62
68
  export * from './features/context-menu/server-context-menu-provider';
63
69
  export * from './features/copy-paste/copy-paste-context-menu';
64
70
  export * from './features/copy-paste/copy-paste-handler';
@@ -78,9 +84,10 @@ export * from './features/save/save-keylistener';
78
84
  export * from './features/select/select-feedback-command';
79
85
  export * from './features/select/select-mouse-listener';
80
86
  export * from './features/source-model-watcher/source-model-changed-action-handler';
87
+ export * from './features/status/status-overlay';
81
88
  export * from './features/svg-metadata/metadata-placer';
82
89
  export * from './features/tool-palette/tool-palette';
83
- export * from './features/tools/base-glsp-tool';
90
+ export * from './features/tools/base-tools';
84
91
  export * from './features/tools/change-bounds/change-bounds-tool';
85
92
  export * from './features/tools/change-bounds/change-bounds-tool-feedback';
86
93
  export * from './features/tools/change-bounds/view';
@@ -108,7 +115,6 @@ export * from './glsp-sprotty/types';
108
115
  // ------------------ Misc ------------------
109
116
  export * from './default-modules';
110
117
  export * from './lib/model';
111
- export * from './model-source/glsp-diagram-server';
112
118
  export * from './standalone-modules';
113
119
  export * from './utils/argument-utils';
114
120
  export * from './utils/html-utils';
@@ -120,9 +126,12 @@ export * from './views';
120
126
  // ------------------ DI Modules ------------------
121
127
  export * from './base/default.module';
122
128
  export * from './features/accessibility/accessibility-module';
129
+ export * from './features/accessibility/element-navigation/element-navigation-module';
130
+ export * from './features/accessibility/focus-tracker/focus-tracker-module';
123
131
  export * from './features/accessibility/move-zoom/move-zoom-module';
124
132
  export * from './features/accessibility/resize-key-tool/resize-key-module';
125
133
  export * from './features/accessibility/search/search-palette-module';
134
+ export * from './features/accessibility/toast/toast-module';
126
135
  export * from './features/accessibility/view-key-tools/view-key-tools-module';
127
136
  export * from './features/command-palette/command-palette-module';
128
137
  export * from './features/context-menu/context-menu-module';
@@ -138,6 +147,7 @@ export * from './features/routing/routing-module';
138
147
  export * from './features/save/save-module';
139
148
  export * from './features/select/select-module';
140
149
  export * from './features/source-model-watcher/source-model-wacher-module';
150
+ export * from './features/status/status-module';
141
151
  export * from './features/svg-metadata/svg-metadata-module';
142
152
  export * from './features/tool-palette/tool-palette-module';
143
153
  export * from './features/tools/change-bounds/change-boounds-tool-module';
@@ -14,7 +14,21 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
 
17
- import { ModuleConfiguration } from '~glsp-sprotty';
17
+ import { inject, injectable } from 'inversify';
18
+ import {
19
+ Action,
20
+ EndProgressAction,
21
+ FeatureModule,
22
+ IActionHandler,
23
+ ICommand,
24
+ ILogger,
25
+ ModuleConfiguration,
26
+ MessageAction,
27
+ StartProgressAction,
28
+ TYPES,
29
+ UpdateProgressAction,
30
+ configureActionHandler
31
+ } from '~glsp-sprotty';
18
32
  import { standaloneCopyPasteModule } from './features/copy-paste/copy-paste-modules';
19
33
  import { standaloneExportModule } from './features/export/export-modules';
20
34
  import { saveModule } from './features/save/save-module';
@@ -22,6 +36,30 @@ import { standaloneSelectModule } from './features/select/select-module';
22
36
  import { undoRedoModule } from './features/undo-redo/undo-redo-module';
23
37
  import { standaloneMarkerNavigatorModule } from './features/validation/validation-modules';
24
38
  import { standaloneViewportModule } from './features/viewport/viewport-modules';
39
+
40
+ export const standaloneFallbackModule = new FeatureModule((bind, unbind, isBound, rebind) => {
41
+ const context = { bind, unbind, isBound, rebind };
42
+ bind(FallbackActionHandler).toSelf().inSingletonScope();
43
+ configureActionHandler(context, MessageAction.KIND, FallbackActionHandler);
44
+ configureActionHandler(context, StartProgressAction.KIND, FallbackActionHandler);
45
+ configureActionHandler(context, UpdateProgressAction.KIND, FallbackActionHandler);
46
+ configureActionHandler(context, EndProgressAction.KIND, FallbackActionHandler);
47
+ });
48
+
49
+ /**
50
+ * A fallback action handler for actions sent by features that are currently not supported by
51
+ * default in the standalone context. Unhandled actions will be simply forwarded to the {@link ILogger}.
52
+ */
53
+ @injectable()
54
+ export class FallbackActionHandler implements IActionHandler {
55
+ @inject(TYPES.ILogger)
56
+ protected logger: ILogger;
57
+
58
+ handle(action: Action): void | Action | ICommand {
59
+ this.logger.log(this, 'Unhandled action received:', action);
60
+ }
61
+ }
62
+
25
63
  /**
26
64
  * Configuration of all `standalone` modules.
27
65
  *
@@ -39,6 +77,7 @@ export const STANDALONE_MODULES = [
39
77
  standaloneMarkerNavigatorModule,
40
78
  standaloneSelectModule,
41
79
  standaloneExportModule,
80
+ standaloneFallbackModule,
42
81
  saveModule,
43
82
  undoRedoModule
44
83
  ] as const;