@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
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LocalElementNavigator = void 0;
13
+ /********************************************************************************
14
+ * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
15
+ *
16
+ * This program and the accompanying materials are made available under the
17
+ * terms of the Eclipse Public License v. 2.0 which is available at
18
+ * http://www.eclipse.org/legal/epl-2.0.
19
+ *
20
+ * This Source Code may also be made available under the following Secondary
21
+ * Licenses when the conditions for such availability set forth in the Eclipse
22
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
23
+ * with the GNU Classpath Exception which is available at
24
+ * https://www.gnu.org/software/classpath/license.html.
25
+ *
26
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
27
+ ********************************************************************************/
28
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
29
+ const inversify_1 = require("inversify");
30
+ const action_dispatcher_1 = require("../../../base/action-dispatcher");
31
+ const css_feedback_1 = require("../../../base/feedback/css-feedback");
32
+ let LocalElementNavigator = exports.LocalElementNavigator = class LocalElementNavigator {
33
+ constructor() {
34
+ this.navigableElementCSS = 'navigable-element';
35
+ }
36
+ previous(root, current, previousCurrent, predicate) {
37
+ return this.getPreviousElement(current, predicate);
38
+ }
39
+ next(root, current, previousCurrent, predicate) {
40
+ return this.getNextElement(current, predicate);
41
+ }
42
+ up(root, current, previousCurrent, predicate) {
43
+ return this.getIterable(current, previousCurrent, predicate);
44
+ }
45
+ down(root, current, previousCurrent, predicate) {
46
+ return this.getIterable(current, previousCurrent, predicate);
47
+ }
48
+ process(root, current, target, previousCurrent, predicate) {
49
+ let elements = [];
50
+ // Mark only edges
51
+ if (target instanceof _glsp_sprotty_1.SEdge) {
52
+ // If current is a edge, we have to check the source and target
53
+ if (current instanceof _glsp_sprotty_1.SEdge) {
54
+ elements = this.getIterables(target, current.source === target.source ? current.source : current.target, predicate);
55
+ }
56
+ else {
57
+ // Otherwise take the current as it is
58
+ elements = this.getIterables(target, current, predicate);
59
+ }
60
+ }
61
+ elements.filter(e => e.id !== target.id).forEach(e => this.actionDispatcher.dispatch((0, css_feedback_1.applyCssClasses)(e, this.navigableElementCSS)));
62
+ }
63
+ clean(root, current, previousCurrent) {
64
+ root.index.all().forEach(e => this.actionDispatcher.dispatch((0, css_feedback_1.deleteCssClasses)(e, this.navigableElementCSS)));
65
+ }
66
+ getIterables(current, previousCurrent, predicate = () => true) {
67
+ var _a, _b;
68
+ const elements = [];
69
+ if (current instanceof _glsp_sprotty_1.SEdge) {
70
+ if (current.target === previousCurrent) {
71
+ (_a = current.target) === null || _a === void 0 ? void 0 : _a.incomingEdges.forEach(e => elements.push(e));
72
+ }
73
+ else {
74
+ (_b = current.source) === null || _b === void 0 ? void 0 : _b.outgoingEdges.forEach(e => elements.push(e));
75
+ }
76
+ }
77
+ return elements.filter(predicate);
78
+ }
79
+ getIterable(current, previousCurrent, predicate = () => true) {
80
+ return this.getIterables(current, previousCurrent, predicate).filter(e => e.id !== current.id)[0];
81
+ }
82
+ getNextElement(current, predicate = () => true) {
83
+ const elements = [];
84
+ if (current instanceof _glsp_sprotty_1.SConnectableElement) {
85
+ current.outgoingEdges.forEach(e => elements.push(e));
86
+ }
87
+ else if (current instanceof _glsp_sprotty_1.SEdge) {
88
+ const target = current.target;
89
+ elements.push(target);
90
+ }
91
+ return elements.filter(predicate)[0];
92
+ }
93
+ getPreviousElement(current, predicate = () => true) {
94
+ const elements = [];
95
+ if (current instanceof _glsp_sprotty_1.SConnectableElement) {
96
+ current.incomingEdges.forEach(e => elements.push(e));
97
+ }
98
+ else if (current instanceof _glsp_sprotty_1.SEdge) {
99
+ const source = current.source;
100
+ elements.push(source);
101
+ }
102
+ return elements.filter(predicate)[0];
103
+ }
104
+ };
105
+ __decorate([
106
+ (0, inversify_1.inject)(_glsp_sprotty_1.EdgeRouterRegistry),
107
+ (0, inversify_1.optional)(),
108
+ __metadata("design:type", _glsp_sprotty_1.EdgeRouterRegistry)
109
+ ], LocalElementNavigator.prototype, "edgeRouterRegistry", void 0);
110
+ __decorate([
111
+ (0, inversify_1.inject)(_glsp_sprotty_1.TYPES.IActionDispatcher),
112
+ __metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
113
+ ], LocalElementNavigator.prototype, "actionDispatcher", void 0);
114
+ exports.LocalElementNavigator = LocalElementNavigator = __decorate([
115
+ (0, inversify_1.injectable)()
116
+ ], LocalElementNavigator);
117
+ //# sourceMappingURL=local-element-navigator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-element-navigator.js","sourceRoot":"","sources":["../../../../src/features/accessibility/element-navigation/local-element-navigator.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAA8H;AAE9H,yCAAyD;AACzD,uEAAuE;AACvE,sEAAwF;AAIjF,IAAM,qBAAqB,mCAA3B,MAAM,qBAAqB;IAA3B;QACH,wBAAmB,GAAG,mBAAmB,CAAC;IA0H9C,CAAC;IAtHG,QAAQ,CACJ,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,CACA,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC;IAED,EAAE,CACE,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,CACA,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CACH,IAA0B,EAC1B,OAA8B,EAC9B,MAA6B,EAC7B,eAAuC,EACvC,SAA+C;QAE/C,IAAI,QAAQ,GAAoB,EAAE,CAAC;QAEnC,kBAAkB;QAClB,IAAI,MAAM,YAAY,qBAAK,EAAE;YACzB,+DAA+D;YAC/D,IAAI,OAAO,Y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AC;SACxD;aAAM,IAAI,OAAO,YAAY,qBAAK,EAAE;YACjC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAuB,CAAC;YAC/C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACzB;QAED,OAAO,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;CACJ,CAAA;AAzHoD;IAAhD,IAAA,kBAAM,EAAC,kCAAkB,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAA+B,kCAAkB;iEAAC;AACrC;IAAnD,IAAA,kBAAM,EAAC,qBAAK,CAAC,iBAAiB,CAAC;8BAAsC,wCAAoB;+DAAC;gCAHlF,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA2HjC"}
@@ -0,0 +1,32 @@
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
+ import { SModelElement, SModelRoot, Bounds } from '../../../glsp-sprotty/index';
17
+ import { ElementNavigator } from './element-navigator';
18
+ import { GLSPActionDispatcher } from '../../../base/action-dispatcher';
19
+ import { SelectableBoundsAware } from '../../../utils/smodel-util';
20
+ export declare class PositionNavigator implements ElementNavigator {
21
+ protected readonly actionDispatcher: GLSPActionDispatcher;
22
+ previous(root: Readonly<SModelRoot>, current: SelectableBoundsAware, previousCurrent?: SelectableBoundsAware, predicate?: (element: SModelElement) => boolean): SModelElement | undefined;
23
+ next(root: Readonly<SModelRoot>, current: SelectableBoundsAware, previousCurrent?: SelectableBoundsAware, predicate?: (element: SModelElement) => boolean): SModelElement | undefined;
24
+ up(root: Readonly<SModelRoot>, current: SelectableBoundsAware, previousCurrent?: SelectableBoundsAware, predicate?: (element: SModelElement) => boolean): SModelElement | undefined;
25
+ down(root: Readonly<SModelRoot>, current: SelectableBoundsAware, previousCurrent?: SelectableBoundsAware, predicate?: (element: SModelElement) => boolean): SModelElement | undefined;
26
+ protected getNearestElement(root: Readonly<SModelRoot>, current: SelectableBoundsAware, filter: (e: SelectableBoundsAware) => boolean): SModelElement | undefined;
27
+ protected sortByDistance(root: SModelRoot, current: SelectableBoundsAware, elements: SelectableBoundsAware[]): SelectableBoundsAware[];
28
+ protected boundElements(root: Readonly<SModelRoot>): SelectableBoundsAware[];
29
+ protected bounds(root: Readonly<SModelRoot>, element: SelectableBoundsAware): Bounds;
30
+ protected boundsInViewport(element: SModelElement, bounds: Bounds, viewport: SModelRoot): Bounds;
31
+ }
32
+ //# sourceMappingURL=position-navigator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-navigator.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/element-navigation/position-navigator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAA8C,aAAa,EAAE,UAAU,EAAgB,MAAM,EAAS,MAAM,eAAe,CAAC;AACnI,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,qBACa,iBAAkB,YAAW,gBAAgB;IACrB,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IAE3F,QAAQ,CACJ,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1B,OAAO,EAAE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AM;IAIpF,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,MAAM;CAOnG"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.PositionNavigator = void 0;
28
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
29
+ const inversify_1 = require("inversify");
30
+ const action_dispatcher_1 = require("../../../base/action-dispatcher");
31
+ const iterable_1 = require("sprotty/lib/utils/iterable");
32
+ let PositionNavigator = exports.PositionNavigator = class PositionNavigator {
33
+ previous(root, current, previousCurrent, predicate) {
34
+ return this.getNearestElement(root, current, e => this.bounds(root, e).x < this.bounds(root, current).x);
35
+ }
36
+ next(root, current, previousCurrent, predicate) {
37
+ return this.getNearestElement(root, current, e => this.bounds(root, e).x > this.bounds(root, current).x);
38
+ }
39
+ up(root, current, previousCurrent, predicate) {
40
+ return this.getNearestElement(root, current, e => this.bounds(root, e).y < this.bounds(root, current).y);
41
+ }
42
+ down(root, current, previousCurrent, predicate) {
43
+ return this.getNearestElement(root, current, e => this.bounds(root, e).y > this.bounds(root, current).y);
44
+ }
45
+ getNearestElement(root, current, filter) {
46
+ const elements = this.boundElements(root).filter(filter);
47
+ return this.sortByDistance(root, current, elements)[0];
48
+ }
49
+ sortByDistance(root, current, elements) {
50
+ // https://www.tutorialspoint.com/sort-array-of-points-by-ascending-distance-from-a-given-point-javascript
51
+ const distance = (coor1, coor2) => {
52
+ const x = coor2.x - coor1.x;
53
+ const y = coor2.y - coor1.y;
54
+ return Math.sqrt(x * x + y * y);
55
+ };
56
+ return elements.sort((a, b) => distance(this.bounds(root, a), this.bounds(root, current)) - distance(this.bounds(root, b), this.bounds(root, current)));
57
+ }
58
+ boundElements(root) {
59
+ return (0, iterable_1.toArray)(root.index.all().filter(e => e instanceof _glsp_sprotty_1.SNode && (0, _glsp_sprotty_1.isSelectable)(e) && (0, _glsp_sprotty_1.isBoundsAware)(e)));
60
+ }
61
+ bounds(root, element) {
62
+ return this.boundsInViewport(element, element.bounds, root);
63
+ }
64
+ boundsInViewport(element, bounds, viewport) {
65
+ if (element instanceof _glsp_sprotty_1.SChildElement && element.parent !== viewport) {
66
+ return this.boundsInViewport(element.parent, element.parent.localToParent(bounds), viewport);
67
+ }
68
+ else {
69
+ return bounds;
70
+ }
71
+ }
72
+ };
73
+ __decorate([
74
+ (0, inversify_1.inject)(_glsp_sprotty_1.TYPES.IActionDispatcher),
75
+ __metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
76
+ ], PositionNavigator.prototype, "actionDispatcher", void 0);
77
+ exports.PositionNavigator = PositionNavigator = __decorate([
78
+ (0, inversify_1.injectable)()
79
+ ], PositionNavigator);
80
+ //# sourceMappingURL=position-navigator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-navigator.js","sourceRoot":"","sources":["../../../../src/features/accessibility/element-navigation/position-navigator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,iDAAmI;AAEnI,yCAA+C;AAC/C,uEAAuE;AACvE,yDAAqD;AAI9C,IAAM,iBAAiB,+BAAvB,MAAM,iBAAiB;IAG1B,QAAQ,CACJ,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7G,CAAC;IAED,IAAI,CACA,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7G,CAAC;IAED,EAAE,CACE,IAA0B,EAC1B,OAA8B,EAC9B,eAAuC,EACvC,SAA+C;QAE/C,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,I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AAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAC9H,CAAC;IACN,CAAC;IAES,aAAa,CAAC,IAA0B;QAC9C,OAAO,IAAA,kBAAO,EAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,qBAAK,IAAI,IAAA,4BAAY,EAAC,CAAC,CAAC,IAAI,IAAA,6BAAa,EAAC,CAAC,CAAC,CAAC,CAA4B,CAAC;IACvI,CAAC;IAES,MAAM,CAAC,IAA0B,EAAE,OAA8B;QACvE,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IAES,gBAAgB,CAAC,OAAsB,EAAE,MAAc,EAAE,QAAoB;QACnF,IAAI,OAAO,YAAY,6BAAa,IAAI,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE;YACjE,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAW,EAAE,QAAQ,CAAC,CAAC;SAC1G;aAAM;YACH,OAAO,MAAM,CAAC;SACjB;IACL,CAAC;CACJ,CAAA;AA5EuD;IAAnD,IAAA,kBAAM,EAAC,qBAAK,CAAC,iBAAiB,CAAC;8BAAsC,wCAAoB;2DAAC;4BADlF,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CA6E7B"}
@@ -0,0 +1,23 @@
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
+ import { ContainerModule } from 'inversify';
17
+ import { BindingContext } from '../../../glsp-sprotty/index';
18
+ /**
19
+ * Handles actions for tracking the focus of the cursor.
20
+ */
21
+ export declare const glspFocusTrackerModule: ContainerModule;
22
+ export declare function configureFocusTrackerTool(context: BindingContext): void;
23
+ //# sourceMappingURL=focus-tracker-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-tracker-module.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/focus-tracker/focus-tracker-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAwB,MAAM,eAAe,CAAC;AAErE;;GAEG;AAEH,eAAO,MAAM,sBAAsB,iBAGjC,CAAC;AAEH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAEvE"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.configureFocusTrackerTool = exports.glspFocusTrackerModule = void 0;
19
+ const inversify_1 = require("inversify");
20
+ const focus_tracker_tool_1 = require("./focus-tracker-tool");
21
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
22
+ /**
23
+ * Handles actions for tracking the focus of the cursor.
24
+ */
25
+ exports.glspFocusTrackerModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
26
+ const context = { bind, unbind, isBound, rebind };
27
+ configureFocusTrackerTool(context);
28
+ });
29
+ function configureFocusTrackerTool(context) {
30
+ (0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.IDefaultTool, focus_tracker_tool_1.FocusTrackerTool);
31
+ }
32
+ exports.configureFocusTrackerTool = configureFocusTrackerTool;
33
+ //# sourceMappingURL=focus-tracker-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-tracker-module.js","sourceRoot":"","sources":["../../../../src/features/accessibility/focus-tracker/focus-tracker-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,yCAA4C;AAC5C,6DAAwD;AACxD,iDAAqE;AAErE;;GAEG;AAEU,QAAA,sBAAsB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACxF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH,SAAgB,yBAAyB,CAAC,OAAuB;IAC7D,IAAA,6BAAa,EAAC,OAAO,EAAE,qBAAK,CAAC,YAAY,EAAE,qCAAgB,CAAC,CAAC;AACjE,CAAC;AAFD,8DAEC"}
@@ -0,0 +1,37 @@
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
+ import { ViewerOptions } from '../../../glsp-sprotty/index';
17
+ import { GLSPActionDispatcher } from '../../../base/action-dispatcher';
18
+ import { Tool } from '../../../base/tool-manager/tool';
19
+ export declare class FocusTrackerTool implements Tool {
20
+ static ID: string;
21
+ isEditTool: boolean;
22
+ protected actionDispatcher: GLSPActionDispatcher;
23
+ protected readonly viewerOptions: ViewerOptions;
24
+ protected readonly focusInFunction: (event: FocusEvent) => Promise<void>;
25
+ protected readonly focusOutFunction: (event: FocusEvent) => Promise<void>;
26
+ protected registered: boolean;
27
+ get id(): string;
28
+ enable(): void;
29
+ disable(): void;
30
+ protected focusOut(event: FocusEvent): Promise<void>;
31
+ protected focusIn(event: FocusEvent): Promise<void>;
32
+ protected handleTextNode(target: HTMLElement): string | undefined;
33
+ protected handleAriaLabel(target: HTMLElement): string | undefined;
34
+ protected showToast(message?: string): Promise<void>;
35
+ protected parentWithAriaLabel(target: HTMLElement): HTMLElement | undefined;
36
+ }
37
+ //# sourceMappingURL=focus-tracker-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-tracker-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/focus-tracker/focus-tracker-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAS,aAAa,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAIvD,qBACa,gBAAiB,YAAW,IAAI;IACzC,MAAM,CAAC,EAAE,SAAwB;IAEjC,UAAU,UAAS;IAEnB,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IAEjD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,SAAS,CAAC,QAAQ,CAAC,eAAe,UAAW,UAAU,KAAG,QAAQ,IAAI,CAAC,CAAwB;IAC/F,SAAS,CAAC,QAAQ,CAAC,gBAAgB,UAAW,UAAU,KAAG,QAAQ,IAAI,CAAC,CAAyB;IACjG,SAAS,CAAC,UAAU,UAAS;IAE7B,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,MAAM,IAAI,IAAI;IAQd,OAAO,IAAI,IAAI;cAIC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;cAI1C,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBzD,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;IAajE,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;IAKlE,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASpD,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS;CAoB9E"}
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 Business Informatics Group (TU Wien) and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ var FocusTrackerTool_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.FocusTrackerTool = void 0;
29
+ const inversify_1 = require("inversify");
30
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
31
+ const action_dispatcher_1 = require("../../../base/action-dispatcher");
32
+ const messages = require("../toast/messages.json");
33
+ const toast_handler_1 = require("../toast/toast-handler");
34
+ let FocusTrackerTool = exports.FocusTrackerTool = FocusTrackerTool_1 = class FocusTrackerTool {
35
+ constructor() {
36
+ this.isEditTool = false;
37
+ this.focusInFunction = (event) => this.focusIn(event);
38
+ this.focusOutFunction = (event) => this.focusOut(event);
39
+ this.registered = false;
40
+ }
41
+ get id() {
42
+ return FocusTrackerTool_1.ID;
43
+ }
44
+ enable() {
45
+ if (!this.registered) {
46
+ document.addEventListener('focusin', this.focusInFunction);
47
+ document.addEventListener('focusout', this.focusOutFunction);
48
+ }
49
+ this.registered = true;
50
+ }
51
+ disable() {
52
+ // the focus tracker cannot be disabled after enabling it
53
+ }
54
+ async focusOut(event) {
55
+ await this.showToast('Focus not set');
56
+ }
57
+ async focusIn(event) {
58
+ let message;
59
+ const target = event.target;
60
+ if (target instanceof HTMLElement) {
61
+ const parent = this.parentWithAriaLabel(target);
62
+ const textMessage = this.handleTextNode(target);
63
+ // eslint-disable-next-line no-null/no-null
64
+ if (target.ariaLabel !== null) {
65
+ message = this.handleAriaLabel(target);
66
+ }
67
+ else {
68
+ if (parent === undefined && textMessage !== undefined) {
69
+ message = textMessage;
70
+ }
71
+ else if (parent !== undefined && textMessage === undefined) {
72
+ message = `Focus is in ${parent.ariaLabel}`;
73
+ }
74
+ else if (parent !== undefined && textMessage !== undefined) {
75
+ message = `${parent.ariaLabel} -> ${textMessage}`;
76
+ }
77
+ }
78
+ }
79
+ await this.showToast(message);
80
+ }
81
+ handleTextNode(target) {
82
+ const textNode = Array.prototype.filter
83
+ .call(target.childNodes, element => element.nodeType === Node.TEXT_NODE)
84
+ .map(element => element.textContent)
85
+ .join('');
86
+ if (textNode.trim().length !== 0) {
87
+ return textNode;
88
+ }
89
+ return undefined;
90
+ }
91
+ handleAriaLabel(target) {
92
+ // eslint-disable-next-line no-null/no-null
93
+ return target.ariaLabel === null ? undefined : target.ariaLabel;
94
+ }
95
+ showToast(message) {
96
+ return this.actionDispatcher.dispatchAll([
97
+ toast_handler_1.ShowToastMessageAction.create({
98
+ id: Symbol.for(FocusTrackerTool_1.ID),
99
+ message: `${messages.focus.focus_on} ${message !== null && message !== void 0 ? message : 'unknown'}`,
100
+ position: 'left'
101
+ })
102
+ ]);
103
+ }
104
+ parentWithAriaLabel(target) {
105
+ let current = target.parentElement;
106
+ while (
107
+ // eslint-disable-next-line no-null/no-null
108
+ current !== null &&
109
+ current !== document.body &&
110
+ current !== document.getElementById(this.viewerOptions.baseDiv) &&
111
+ // eslint-disable-next-line no-null/no-null
112
+ current.ariaLabel === null) {
113
+ current = current.parentElement;
114
+ }
115
+ if (current === document.getElementById(this.viewerOptions.baseDiv) || current === document.body) {
116
+ return undefined;
117
+ }
118
+ return current !== null && current !== void 0 ? current : undefined;
119
+ }
120
+ };
121
+ FocusTrackerTool.ID = 'glsp.focus-tracker';
122
+ __decorate([
123
+ (0, inversify_1.inject)(_glsp_sprotty_1.TYPES.IActionDispatcher),
124
+ __metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
125
+ ], FocusTrackerTool.prototype, "actionDispatcher", void 0);
126
+ __decorate([
127
+ (0, inversify_1.inject)(_glsp_sprotty_1.TYPES.ViewerOptions),
128
+ __metadata("design:type", Object)
129
+ ], FocusTrackerTool.prototype, "viewerOptions", void 0);
130
+ exports.FocusTrackerTool = FocusTrackerTool = FocusTrackerTool_1 = __decorate([
131
+ (0, inversify_1.injectable)()
132
+ ], FocusTrackerTool);
133
+ //# sourceMappingURL=focus-tracker-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-tracker-tool.js","sourceRoot":"","sources":["../../../../src/features/accessibility/focus-tracker/focus-tracker-tool.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,yCAA+C;AAC/C,iDAAqD;AACrD,uEAAuE;AAEvE,mDAAmD;AACnD,0DAAgE;AAGzD,IAAM,gBAAgB,mDAAtB,MAAM,gBAAgB;IAAtB;QAGH,eAAU,GAAG,KAAK,CAAC;QAMA,oBAAe,GAAG,CAAC,KAAiB,EAAiB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5E,qBAAgB,GAAG,CAAC,KAAiB,EAAiB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvF,eAAU,GAAG,KAAK,CAAC;IA6FjC,CAAC;IA3FG,IAAI,EAAE;QACF,OAAO,kBAAgB,CAAC,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM;QACF,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,QAAQ,CAAC,gBAAgB,CAAC,SAAS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CAAC;SACnC;QAED,IAAI,OAAO,KAAK,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,QAAQ,CAAC,IAAI,EAAE;YAC9F,OAAO,SAAS,CAAC;SACpB;QAED,OAAO,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,SAAS,CAAC;IAChC,CAAC;;AAtGM,mBAAE,GAAG,oBAAoB,AAAvB,CAAwB;AAIvB;IADT,IAAA,kBAAM,EAAC,qBAAK,CAAC,iBAAiB,CAAC;8BACJ,wCAAoB;0DAAC;AAE9B;IADlB,IAAA,kBAAM,EAAC,qBAAK,CAAC,aAAa,CAAC;;uDACoB;2BAPvC,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAwG5B"}
@@ -14,8 +14,8 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { Action, KeyListener, KeyTool, SModelElement } from '../../../glsp-sprotty/index';
17
- import { BaseGLSPTool } from '../../tools/base-glsp-tool';
18
- export declare class AccessibleKeyShortcutTool extends BaseGLSPTool {
17
+ import { BaseEditTool } from '../../tools/base-tools';
18
+ export declare class AccessibleKeyShortcutTool extends BaseEditTool {
19
19
  static ID: string;
20
20
  protected readonly keytool: KeyTool;
21
21
  protected shortcutKeyListener: AccessibleShortcutKeyListener;
@@ -1 +1 @@
1
- {"version":3,"file":"accessible-key-shortcut-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAoD,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9H,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,qBACa,yBAA0B,SAAQ,YAAY;IACvD,MAAM,CAAC,EAAE,SAAkC;IAE1B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAErD,SAAS,CAAC,mBAAmB,gCAAuC;IAEpE,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,MAAM,IAAI,IAAI;IAIL,OAAO,IAAI,IAAI;CAG3B;AAED,qBAAa,6BAA8B,SAAQ,WAAW;IAC1D,SAAS,CAAC,QAAQ,CAAC,KAAK,SAA8C;IAC7D,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE;IAOxE,SAAS,CAAC,oCAAoC,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;CAGhF"}
1
+ {"version":3,"file":"accessible-key-shortcut-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAGlF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAoD,MAAM,eAAe,CAAC;AAC9H,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,qBACa,yBAA0B,SAAQ,YAAY;IACvD,MAAM,CAAC,EAAE,SAAkC;IAE1B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAErD,SAAS,CAAC,mBAAmB,gCAAuC;IAEpE,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,MAAM,IAAI,IAAI;IAIL,OAAO,IAAI,IAAI;CAG3B;AAED,qBAAa,6BAA8B,SAAQ,WAAW;IAC1D,SAAS,CAAC,QAAQ,CAAC,KAAK,SAA8C;IAC7D,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE;IAOxE,SAAS,CAAC,oCAAoC,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;CAGhF"}
@@ -28,9 +28,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.AccessibleShortcutKeyListener = exports.AccessibleKeyShortcutTool = void 0;
29
29
  const inversify_1 = require("inversify");
30
30
  const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
31
- const base_glsp_tool_1 = require("../../tools/base-glsp-tool");
31
+ const base_tools_1 = require("../../tools/base-tools");
32
32
  const accessible_key_shortcut_1 = require("./accessible-key-shortcut");
33
- let AccessibleKeyShortcutTool = exports.AccessibleKeyShortcutTool = AccessibleKeyShortcutTool_1 = class AccessibleKeyShortcutTool extends base_glsp_tool_1.BaseGLSPTool {
33
+ let AccessibleKeyShortcutTool = exports.AccessibleKeyShortcutTool = AccessibleKeyShortcutTool_1 = class AccessibleKeyShortcutTool extends base_tools_1.BaseEditTool {
34
34
  constructor() {
35
35
  super(...arguments);
36
36
  this.shortcutKeyListener = new AccessibleShortcutKeyListener();
@@ -1 +1 @@
1
- {"version":3,"file":"accessible-key-shortcut-tool.js","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,yCAA+C;AAC/C,iDAA8H;AAC9H,+DAA0D;AAC1D,uEAAmE;AAG5D,IAAM,yBAAyB,qEAA/B,MAAM,yBAA0B,SAAQ,6BAAY;IAApD;;QAKO,wBAAmB,GAAG,IAAI,6BAA6B,EAAE,CAAC;IAaxE,CAAC;IAXG,IAAI,EAAE;QACF,OAAO,2BAAyB,CAAC,EAAE,CAAC;IACxC,CAAC;IAED,MAAM;QACF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAEQ,OAAO;QACZ,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;;AAhBM,4BAAE,GAAG,8BAA8B,AAAjC,CAAkC;AAEP;IAAnC,IAAA,kBAAM,EAAC,uBAAO,CAAC;8BAA6B,uBAAO;0DAAC;oCAH5C,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAkBrC;AAED,MAAa,6BAA8B,SAAQ,2BAAW;IAA9D;;QACuB,UAAK,GAAG,MAAM,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAW1E,CAAC;IAVY,OAAO,CAAC,OAAsB,EAAE,KAAoB;QACzD,IAAI,IAAI,CAAC,oCAAoC,CAAC,KAAK,CAAC,EAAE;YAClD,OAAO,CAAC,8CAA8B,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gDAAsB,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;SAC7G;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAES,oCAAoC,CAAC,KAAoB;QAC/D,OAAO,IAAA,gCAAgB,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;CACJ;AAZD,sEAYC"}
1
+ {"version":3,"file":"accessible-key-shortcut-tool.js","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut-tool.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,yCAA+C;AAC/C,iDAA8H;AAC9H,uDAAsD;AACtD,uEAAmE;AAG5D,IAAM,yBAAyB,qEAA/B,MAAM,yBAA0B,SAAQ,yBAAY;IAApD;;QAKO,wBAAmB,GAAG,IAAI,6BAA6B,EAAE,CAAC;IAaxE,CAAC;IAXG,IAAI,EAAE;QACF,OAAO,2BAAyB,CAAC,EAAE,CAAC;IACxC,CAAC;IAED,MAAM;QACF,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;IAEQ,OAAO;QACZ,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;;AAhBM,4BAAE,GAAG,8BAA8B,AAAjC,CAAkC;AAEP;IAAnC,IAAA,kBAAM,EAAC,uBAAO,CAAC;8BAA6B,uBAAO;0DAAC;oCAH5C,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAkBrC;AAED,MAAa,6BAA8B,SAAQ,2BAAW;IAA9D;;QACuB,UAAK,GAAG,MAAM,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAW1E,CAAC;IAVY,OAAO,CAAC,OAAsB,EAAE,KAAoB;QACzD,IAAI,IAAI,CAAC,oCAAoC,CAAC,KAAK,CAAC,EAAE;YAClD,OAAO,CAAC,8CAA8B,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gDAAsB,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;SAC7G;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAES,oCAAoC,CAAC,KAAoB;QAC/D,OAAO,IAAA,gCAAgB,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;CACJ;AAZD,sEAYC"}
@@ -46,6 +46,7 @@ export declare class KeyShortcutUIExtension extends AbstractUIExtension implemen
46
46
  containerClass(): string;
47
47
  show(root: Readonly<SModelRoot>, ...contextElementIds: string[]): void;
48
48
  protected refreshUI(): void;
49
+ protected createGroupHeader(group: string): HTMLElement;
49
50
  protected getShortcutHTML(shortcuts: string[]): HTMLElement;
50
51
  protected createEntry(registration: AccessibleKeyShortcut): HTMLDivElement;
51
52
  protected initializeContents(containerElement: HTMLElement): void;
@@ -1 +1 @@
1
- {"version":3,"file":"accessible-key-shortcut.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAoB,UAAU,EAAE,MAAM,eAAe,CAAC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S,EAAE,MAAM,EAAE,GAAG,WAAW;IAO3D,SAAS,CAAC,WAAW,CAAC,YAAY,EAAE,qBAAqB,GAAG,cAAc;IAe1E,SAAS,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;CAmCpE"}
1
+ {"version":3,"file":"accessible-key-shortcut.d.ts","sourceRoot":"","sources":["../../../../src/features/accessibility/key-shortcut/accessible-key-shortcut.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAoB,UAAU,EAAE,MAAM,eAAe,CAAC;AAEpH,MAAM,WAAW,6BAA6B;IAC1C,mBAAmB,IAAI,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,8BAA+B,SAAQ,MAAM;IAC1D,IAAI,EAAE,OAAO,8BAA8B,CAAC,IAAI,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,IAAI,6BAA6B,CAAC;IAE/C,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,8BAA8B,CAExE;IAED,SAAgB,MAAM,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,qBAAqB,EAAE,CAAA;KAAE,GAAG,8BAA8B,CAEhH;CACJ;AAED,qBACa,sBAAuB,SAAQ,mBAAoB,YAAW,cAAc;IACrF,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB;IACpC,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC;IACpC,SAAS,CAAC,kBAAkB,EAAE,cAAc,CAAC;IAC7C,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,EAAE,CAAC,CAAM;IAEtE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,IAAI;IAQhD,EAAE,IAAI,MAAM;IAIZ,cAAc,IAAI,MAAM;IAIf,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI;IAK/E,SAAS,CAAC,SAAS,IAAI,IAAI;IAgD3B,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAcvD,SAAS,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW;IAO3D,SAAS,CAAC,WAAW,CAAC,YAAY,EAAE,qBAAqB,GAAG,cAAc;IAe1E,SAAS,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;CAmCpE"}
@@ -75,19 +75,20 @@ let KeyShortcutUIExtension = exports.KeyShortcutUIExtension = KeyShortcutUIExten
75
75
  });
76
76
  const grouped = (0, lodash_1.groupBy)(registrations, k => k.group);
77
77
  const groupTable = document.createElement('table');
78
+ groupTable.classList.add('shortcut-table');
78
79
  const tableHead = document.createElement('thead');
79
80
  const tableBody = document.createElement('tbody');
80
81
  const headerRow = document.createElement('tr');
81
82
  const commandCell = document.createElement('th');
82
83
  const keybindingCell = document.createElement('th');
83
- commandCell.classList.add('columnTitle');
84
- commandCell.classList.add('columnTitle');
84
+ commandCell.classList.add('column-title');
85
85
  commandCell.innerText = 'Command';
86
86
  keybindingCell.innerText = 'Keybinding';
87
87
  headerRow.appendChild(commandCell);
88
88
  headerRow.appendChild(keybindingCell);
89
89
  tableHead.appendChild(headerRow);
90
- for (const [, shortcuts] of Object.entries(grouped)) {
90
+ for (const [group, shortcuts] of Object.entries(grouped)) {
91
+ tableBody.appendChild(this.createGroupHeader(group));
91
92
  shortcuts.forEach(s => {
92
93
  tableBody.appendChild(this.createEntry(s));
93
94
  });
@@ -96,6 +97,17 @@ let KeyShortcutUIExtension = exports.KeyShortcutUIExtension = KeyShortcutUIExten
96
97
  groupTable.appendChild(tableBody);
97
98
  this.shortcutsContainer.append(groupTable);
98
99
  }
100
+ createGroupHeader(group) {
101
+ const entryRow = document.createElement('tr');
102
+ const groupElement = document.createElement('td');
103
+ const text = document.createElement('strong');
104
+ const emptyElement = document.createElement('td');
105
+ text.innerText = group;
106
+ groupElement.appendChild(text);
107
+ entryRow.appendChild(groupElement);
108
+ entryRow.appendChild(emptyElement);
109
+ return entryRow;
110
+ }
99
111
  getShortcutHTML(shortcuts) {
100
112
  const shortcutKeys = document.createElement('span');
101
113
  shortcutKeys.innerHTML = shortcuts.map(key => `<kbd>${key}</kbd>`).join(' + ');