@eclipse-glsp/client 1.1.0-next.698b9de.254 → 1.1.0-next.69a77b0.259

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 (519) hide show
  1. package/lib/base/action-dispatcher.d.ts.map +1 -1
  2. package/lib/base/action-dispatcher.js +5 -3
  3. package/lib/base/action-dispatcher.js.map +1 -1
  4. package/lib/base/actions/focus-change-action.js +1 -1
  5. package/lib/base/actions/focus-change-action.js.map +1 -1
  6. package/lib/base/auto-complete/auto-complete-actions.js +1 -1
  7. package/lib/base/auto-complete/auto-complete-actions.js.map +1 -1
  8. package/lib/base/auto-complete/validation-decorator.js +1 -1
  9. package/lib/base/auto-complete/validation-decorator.js.map +1 -1
  10. package/lib/base/command-stack.d.ts +17 -2
  11. package/lib/base/command-stack.d.ts.map +1 -1
  12. package/lib/base/command-stack.js +43 -3
  13. package/lib/base/command-stack.js.map +1 -1
  14. package/lib/base/di.config.d.ts.map +1 -1
  15. package/lib/base/di.config.js +21 -3
  16. package/lib/base/di.config.js.map +1 -1
  17. package/lib/base/drag-aware-mouse-listener.d.ts +2 -2
  18. package/lib/base/drag-aware-mouse-listener.d.ts.map +1 -1
  19. package/lib/base/drag-aware-mouse-listener.js.map +1 -1
  20. package/lib/base/editor-context-service.d.ts +10 -7
  21. package/lib/base/editor-context-service.d.ts.map +1 -1
  22. package/lib/base/editor-context-service.js +27 -10
  23. package/lib/base/editor-context-service.js.map +1 -1
  24. package/lib/{features/tool-feedback → base/feedback}/css-feedback.d.ts +1 -1
  25. package/lib/base/feedback/css-feedback.d.ts.map +1 -0
  26. package/lib/{features/tool-feedback → base/feedback}/css-feedback.js +5 -6
  27. package/lib/base/feedback/css-feedback.js.map +1 -0
  28. package/lib/{features/tool-feedback → base/feedback}/feedback-action-dispatcher.d.ts +11 -9
  29. package/lib/base/feedback/feedback-action-dispatcher.d.ts.map +1 -0
  30. package/lib/{features/tool-feedback → base/feedback}/feedback-action-dispatcher.js +26 -20
  31. package/lib/base/feedback/feedback-action-dispatcher.js.map +1 -0
  32. package/lib/{features/tool-feedback/model.d.ts → base/feedback/feedback-command.d.ts} +1 -1
  33. package/lib/base/feedback/feedback-command.d.ts.map +1 -0
  34. package/lib/{features/tool-feedback/model.js → base/feedback/feedback-command.js} +1 -1
  35. package/lib/base/feedback/feedback-command.js.map +1 -0
  36. package/lib/base/{model → feedback}/update-model-command.d.ts +3 -15
  37. package/lib/base/feedback/update-model-command.d.ts.map +1 -0
  38. package/lib/base/{model → feedback}/update-model-command.js +3 -27
  39. package/lib/base/feedback/update-model-command.js.map +1 -0
  40. package/lib/base/focus-tracker.js +2 -3
  41. package/lib/base/focus-tracker.js.map +1 -1
  42. package/lib/base/model/model-registry.js +2 -3
  43. package/lib/base/model/model-registry.js.map +1 -1
  44. package/lib/base/model-initialization-constraint.js +4 -6
  45. package/lib/base/model-initialization-constraint.js.map +1 -1
  46. package/lib/base/ranked.d.ts +34 -0
  47. package/lib/base/ranked.d.ts.map +1 -0
  48. package/lib/base/ranked.js +38 -0
  49. package/lib/base/ranked.js.map +1 -0
  50. package/lib/base/selection-clearing-mouse-listener.js +2 -3
  51. package/lib/base/selection-clearing-mouse-listener.js.map +1 -1
  52. package/lib/{features/select → base}/selection-service.d.ts +34 -13
  53. package/lib/base/selection-service.d.ts.map +1 -0
  54. package/lib/{features/select → base}/selection-service.js +73 -29
  55. package/lib/base/selection-service.js.map +1 -0
  56. package/lib/base/selection-service.spec.d.ts +2 -0
  57. package/lib/base/selection-service.spec.d.ts.map +1 -0
  58. package/lib/base/selection-service.spec.js +281 -0
  59. package/lib/base/selection-service.spec.js.map +1 -0
  60. package/lib/base/tool-manager/glsp-tool-manager.d.ts +3 -3
  61. package/lib/base/tool-manager/glsp-tool-manager.d.ts.map +1 -1
  62. package/lib/base/tool-manager/glsp-tool-manager.js +5 -6
  63. package/lib/base/tool-manager/glsp-tool-manager.js.map +1 -1
  64. package/lib/base/view/key-tool.d.ts +5 -0
  65. package/lib/base/view/key-tool.d.ts.map +1 -0
  66. package/lib/base/view/key-tool.js +36 -0
  67. package/lib/base/view/key-tool.js.map +1 -0
  68. package/lib/base/view/mouse-tool.d.ts +19 -0
  69. package/lib/base/view/mouse-tool.d.ts.map +1 -0
  70. package/lib/{features/mouse-tool → base/view}/mouse-tool.js +14 -11
  71. package/lib/base/view/mouse-tool.js.map +1 -0
  72. package/lib/base/view/view-registry.js +2 -3
  73. package/lib/base/view/view-registry.js.map +1 -1
  74. package/lib/{base/container-modules.d.ts → container-modules.d.ts} +2 -2
  75. package/lib/container-modules.d.ts.map +1 -0
  76. package/lib/{base/container-modules.js → container-modules.js} +49 -41
  77. package/lib/container-modules.js.map +1 -0
  78. package/lib/features/accessibility/move-zoom/move-handler.js +6 -8
  79. package/lib/features/accessibility/move-zoom/move-handler.js.map +1 -1
  80. package/lib/features/accessibility/move-zoom/zoom-handler.js +6 -8
  81. package/lib/features/accessibility/move-zoom/zoom-handler.js.map +1 -1
  82. package/lib/features/accessibility/resize-key-tool/resize-key-handler.js +4 -5
  83. package/lib/features/accessibility/resize-key-tool/resize-key-handler.js.map +1 -1
  84. package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts +1 -1
  85. package/lib/features/accessibility/resize-key-tool/resize-key-tool.d.ts.map +1 -1
  86. package/lib/features/accessibility/resize-key-tool/resize-key-tool.js +6 -8
  87. package/lib/features/accessibility/resize-key-tool/resize-key-tool.js.map +1 -1
  88. package/lib/features/accessibility/search/search-palette.js +3 -4
  89. package/lib/features/accessibility/search/search-palette.js.map +1 -1
  90. package/lib/features/accessibility/search/search-tool.js +2 -3
  91. package/lib/features/accessibility/search/search-tool.js.map +1 -1
  92. package/lib/features/accessibility/view-key-tools/deselect-key-tool.js +2 -3
  93. package/lib/features/accessibility/view-key-tools/deselect-key-tool.js.map +1 -1
  94. package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +1 -1
  95. package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
  96. package/lib/features/accessibility/view-key-tools/movement-key-tool.js +5 -6
  97. package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
  98. package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts +1 -1
  99. package/lib/features/accessibility/view-key-tools/zoom-key-tool.d.ts.map +1 -1
  100. package/lib/features/accessibility/view-key-tools/zoom-key-tool.js +5 -6
  101. package/lib/features/accessibility/view-key-tools/zoom-key-tool.js.map +1 -1
  102. package/lib/features/autocomplete-palette/base-autocomplete-palette.js +1 -1
  103. package/lib/features/autocomplete-palette/base-autocomplete-palette.js.map +1 -1
  104. package/lib/features/bounds/freeform-layout.js +2 -3
  105. package/lib/features/bounds/freeform-layout.js.map +1 -1
  106. package/lib/features/bounds/freeform-layout.spec.d.ts +3 -0
  107. package/lib/features/bounds/freeform-layout.spec.d.ts.map +1 -0
  108. package/lib/features/bounds/freeform-layout.spec.js +201 -0
  109. package/lib/features/bounds/freeform-layout.spec.js.map +1 -0
  110. package/lib/features/bounds/glsp-hidden-bounds-updater.js +2 -3
  111. package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -1
  112. package/lib/features/bounds/hbox-layout.js +2 -3
  113. package/lib/features/bounds/hbox-layout.js.map +1 -1
  114. package/lib/features/bounds/hbox-layout.spec.d.ts +3 -0
  115. package/lib/features/bounds/hbox-layout.spec.d.ts.map +1 -0
  116. package/lib/features/bounds/hbox-layout.spec.js +160 -0
  117. package/lib/features/bounds/hbox-layout.spec.js.map +1 -0
  118. package/lib/features/bounds/layouter-test-util.spec.d.ts +32 -0
  119. package/lib/features/bounds/layouter-test-util.spec.d.ts.map +1 -0
  120. package/lib/features/bounds/layouter-test-util.spec.js +96 -0
  121. package/lib/features/bounds/layouter-test-util.spec.js.map +1 -0
  122. package/lib/features/bounds/layouter.js +2 -3
  123. package/lib/features/bounds/layouter.js.map +1 -1
  124. package/lib/features/bounds/vbox-layout.js +2 -3
  125. package/lib/features/bounds/vbox-layout.js.map +1 -1
  126. package/lib/features/bounds/vbox-layout.spec.d.ts +3 -0
  127. package/lib/features/bounds/vbox-layout.spec.d.ts.map +1 -0
  128. package/lib/features/bounds/vbox-layout.spec.js +160 -0
  129. package/lib/features/bounds/vbox-layout.spec.js.map +1 -0
  130. package/lib/features/change-bounds/model.js +2 -2
  131. package/lib/features/change-bounds/model.js.map +1 -1
  132. package/lib/features/change-bounds/movement-restrictor.d.ts +1 -1
  133. package/lib/features/change-bounds/movement-restrictor.d.ts.map +1 -1
  134. package/lib/features/change-bounds/movement-restrictor.js +3 -4
  135. package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
  136. package/lib/features/change-bounds/snap.js +2 -3
  137. package/lib/features/change-bounds/snap.js.map +1 -1
  138. package/lib/features/{rank/model.d.ts → change-bounds/snap.spec.d.ts} +3 -8
  139. package/lib/features/change-bounds/snap.spec.d.ts.map +1 -0
  140. package/lib/features/change-bounds/snap.spec.js +82 -0
  141. package/lib/features/change-bounds/snap.spec.js.map +1 -0
  142. package/lib/features/command-palette/command-palette-tool.js +2 -3
  143. package/lib/features/command-palette/command-palette-tool.js.map +1 -1
  144. package/lib/features/command-palette/server-command-palette-provider.js +3 -4
  145. package/lib/features/command-palette/server-command-palette-provider.js.map +1 -1
  146. package/lib/features/context-menu/delete-element-context-menu.js +2 -3
  147. package/lib/features/context-menu/delete-element-context-menu.js.map +1 -1
  148. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts +1 -1
  149. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.d.ts.map +1 -1
  150. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js +4 -5
  151. package/lib/features/context-menu/selection-service-aware-context-menu-mouse-listener.js.map +1 -1
  152. package/lib/features/context-menu/server-context-menu-provider.js +3 -4
  153. package/lib/features/context-menu/server-context-menu-provider.js.map +1 -1
  154. package/lib/features/copy-paste/copy-paste-context-menu.js +6 -8
  155. package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
  156. package/lib/features/copy-paste/copy-paste-handler.js +4 -6
  157. package/lib/features/copy-paste/copy-paste-handler.js.map +1 -1
  158. package/lib/features/decoration/decoration-placer.js +2 -3
  159. package/lib/features/decoration/decoration-placer.js.map +1 -1
  160. package/lib/features/edit-label/edit-label-tool.d.ts +0 -3
  161. package/lib/features/edit-label/edit-label-tool.d.ts.map +1 -1
  162. package/lib/features/edit-label/edit-label-tool.js +3 -11
  163. package/lib/features/edit-label/edit-label-tool.js.map +1 -1
  164. package/lib/features/edit-label/edit-label-validator.js +5 -7
  165. package/lib/features/edit-label/edit-label-validator.js.map +1 -1
  166. package/lib/features/export/glsp-svg-exporter.js +2 -3
  167. package/lib/features/export/glsp-svg-exporter.js.map +1 -1
  168. package/lib/features/hints/type-hints.d.ts +2 -2
  169. package/lib/features/hints/type-hints.d.ts.map +1 -1
  170. package/lib/features/hints/type-hints.js +9 -11
  171. package/lib/features/hints/type-hints.js.map +1 -1
  172. package/lib/features/hover/hover.d.ts.map +1 -1
  173. package/lib/features/hover/hover.js +3 -4
  174. package/lib/features/hover/hover.js.map +1 -1
  175. package/lib/features/layout/di.config.js +1 -1
  176. package/lib/features/layout/di.config.js.map +1 -1
  177. package/lib/features/layout/layout-elements-action.d.ts +1 -1
  178. package/lib/features/layout/layout-elements-action.d.ts.map +1 -1
  179. package/lib/features/layout/layout-elements-action.js +14 -17
  180. package/lib/features/layout/layout-elements-action.js.map +1 -1
  181. package/lib/features/layout/layout-elements-action.spec.d.ts +3 -0
  182. package/lib/features/layout/layout-elements-action.spec.d.ts.map +1 -0
  183. package/lib/features/layout/layout-elements-action.spec.js +321 -0
  184. package/lib/features/layout/layout-elements-action.spec.js.map +1 -0
  185. package/lib/features/navigation/navigation-action-handler.js +5 -6
  186. package/lib/features/navigation/navigation-action-handler.js.map +1 -1
  187. package/lib/features/navigation/navigation-target-resolver.js +2 -3
  188. package/lib/features/navigation/navigation-target-resolver.js.map +1 -1
  189. package/lib/features/navigation/navigation-target-resolver.spec.d.ts +3 -0
  190. package/lib/features/navigation/navigation-target-resolver.spec.d.ts.map +1 -0
  191. package/lib/features/navigation/navigation-target-resolver.spec.js +53 -0
  192. package/lib/features/navigation/navigation-target-resolver.spec.js.map +1 -0
  193. package/lib/features/routing/di.config.d.ts +22 -0
  194. package/lib/features/routing/di.config.d.ts.map +1 -0
  195. package/lib/features/routing/di.config.js +57 -0
  196. package/lib/features/routing/di.config.js.map +1 -0
  197. package/lib/features/routing/glsp-manhattan-edge-router.d.ts.map +1 -0
  198. package/lib/features/routing/glsp-manhattan-edge-router.js.map +1 -0
  199. package/lib/features/select/di.config.d.ts.map +1 -1
  200. package/lib/features/select/di.config.js +3 -5
  201. package/lib/features/select/di.config.js.map +1 -1
  202. package/lib/features/select/select-feedback-command.d.ts +12 -0
  203. package/lib/features/select/select-feedback-command.d.ts.map +1 -0
  204. package/lib/features/select/{select-feedback-action.js → select-feedback-command.js} +6 -30
  205. package/lib/features/select/select-feedback-command.js.map +1 -0
  206. package/lib/features/select/select-mouse-listener.d.ts +1 -1
  207. package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
  208. package/lib/features/select/select-mouse-listener.js +2 -2
  209. package/lib/features/select/select-mouse-listener.js.map +1 -1
  210. package/lib/features/source-model-watcher/source-model-changed-action-handler.js +5 -7
  211. package/lib/features/source-model-watcher/source-model-changed-action-handler.js.map +1 -1
  212. package/lib/features/svg-metadata/metadata-placer.js +2 -3
  213. package/lib/features/svg-metadata/metadata-placer.js.map +1 -1
  214. package/lib/features/tool-palette/tool-palette.d.ts +4 -4
  215. package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
  216. package/lib/features/tool-palette/tool-palette.js +12 -13
  217. package/lib/features/tool-palette/tool-palette.js.map +1 -1
  218. package/lib/features/tools/base-glsp-creation-tool.d.ts +10 -0
  219. package/lib/features/tools/base-glsp-creation-tool.d.ts.map +1 -0
  220. package/lib/features/tools/base-glsp-creation-tool.js +45 -0
  221. package/lib/features/tools/base-glsp-creation-tool.js.map +1 -0
  222. package/lib/features/tools/base-glsp-tool.d.ts +26 -8
  223. package/lib/features/tools/base-glsp-tool.d.ts.map +1 -1
  224. package/lib/features/tools/base-glsp-tool.js +34 -11
  225. package/lib/features/tools/base-glsp-tool.js.map +1 -1
  226. package/lib/features/{tool-feedback → tools/change-bounds}/change-bounds-tool-feedback.d.ts +12 -5
  227. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts.map +1 -0
  228. package/lib/features/{tool-feedback → tools/change-bounds}/change-bounds-tool-feedback.js +45 -27
  229. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js.map +1 -0
  230. package/lib/features/tools/{change-bounds-tool.d.ts → change-bounds/change-bounds-tool.d.ts} +13 -14
  231. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -0
  232. package/lib/features/tools/{change-bounds-tool.js → change-bounds/change-bounds-tool.js} +50 -35
  233. package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -0
  234. package/lib/features/tools/change-bounds/di.config.d.ts +19 -0
  235. package/lib/features/tools/change-bounds/di.config.d.ts.map +1 -0
  236. package/lib/features/tools/change-bounds/di.config.js +32 -0
  237. package/lib/features/tools/change-bounds/di.config.js.map +1 -0
  238. package/lib/features/tools/change-bounds/view.d.ts +9 -0
  239. package/lib/features/tools/change-bounds/view.d.ts.map +1 -0
  240. package/lib/features/{tool-feedback → tools/change-bounds}/view.js +5 -21
  241. package/lib/features/tools/change-bounds/view.js.map +1 -0
  242. package/lib/features/tools/{delete-tool.d.ts → deletion/delete-tool.d.ts} +4 -9
  243. package/lib/features/tools/deletion/delete-tool.d.ts.map +1 -0
  244. package/lib/features/tools/{delete-tool.js → deletion/delete-tool.js} +13 -29
  245. package/lib/features/tools/deletion/delete-tool.js.map +1 -0
  246. package/lib/features/{tool-feedback → tools/deletion}/di.config.d.ts +2 -2
  247. package/lib/features/tools/deletion/di.config.d.ts.map +1 -0
  248. package/lib/features/{mouse-tool → tools/deletion}/di.config.js +7 -7
  249. package/lib/features/tools/deletion/di.config.js.map +1 -0
  250. package/lib/features/{tool-feedback/creation-tool-feedback.d.ts → tools/edge-creation/dangling-edge-feedback.d.ts} +5 -10
  251. package/lib/features/tools/edge-creation/dangling-edge-feedback.d.ts.map +1 -0
  252. package/lib/features/{tool-feedback/creation-tool-feedback.js → tools/edge-creation/dangling-edge-feedback.js} +25 -87
  253. package/lib/features/tools/edge-creation/dangling-edge-feedback.js.map +1 -0
  254. package/lib/features/tools/edge-creation/di.config.d.ts +19 -0
  255. package/lib/features/tools/edge-creation/di.config.d.ts.map +1 -0
  256. package/lib/features/tools/edge-creation/di.config.js +29 -0
  257. package/lib/features/tools/edge-creation/di.config.js.map +1 -0
  258. package/lib/features/tools/edge-creation/edge-creation-tool-feedback.d.ts +26 -0
  259. package/lib/features/tools/edge-creation/edge-creation-tool-feedback.d.ts.map +1 -0
  260. package/lib/features/tools/edge-creation/edge-creation-tool-feedback.js +74 -0
  261. package/lib/features/tools/edge-creation/edge-creation-tool-feedback.js.map +1 -0
  262. package/lib/features/tools/{edge-creation-tool.d.ts → edge-creation/edge-creation-tool.d.ts} +6 -11
  263. package/lib/features/tools/edge-creation/edge-creation-tool.d.ts.map +1 -0
  264. package/lib/features/tools/{edge-creation-tool.js → edge-creation/edge-creation-tool.js} +29 -40
  265. package/lib/features/tools/edge-creation/edge-creation-tool.js.map +1 -0
  266. package/lib/features/tools/edge-creation/view.d.ts +10 -0
  267. package/lib/features/tools/edge-creation/view.d.ts.map +1 -0
  268. package/lib/features/tools/edge-creation/view.js +43 -0
  269. package/lib/features/tools/edge-creation/view.js.map +1 -0
  270. package/lib/features/{mouse-tool → tools/edge-edit}/di.config.d.ts +2 -2
  271. package/lib/features/tools/edge-edit/di.config.d.ts.map +1 -0
  272. package/lib/features/tools/edge-edit/di.config.js +35 -0
  273. package/lib/features/tools/edge-edit/di.config.js.map +1 -0
  274. package/lib/features/{tool-feedback → tools/edge-edit}/edge-edit-tool-feedback.d.ts +14 -8
  275. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts.map +1 -0
  276. package/lib/features/{tool-feedback → tools/edge-edit}/edge-edit-tool-feedback.js +42 -37
  277. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js.map +1 -0
  278. package/lib/features/tools/{edge-edit-tool.d.ts → edge-edit/edge-edit-tool.d.ts} +7 -9
  279. package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -0
  280. package/lib/features/tools/{edge-edit-tool.js → edge-edit/edge-edit-tool.js} +28 -33
  281. package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -0
  282. package/lib/features/tools/enable-default-tools-on-focus-loss.d.ts +21 -0
  283. package/lib/features/tools/enable-default-tools-on-focus-loss.d.ts.map +1 -1
  284. package/lib/features/tools/enable-default-tools-on-focus-loss.js +9 -3
  285. package/lib/features/tools/enable-default-tools-on-focus-loss.js.map +1 -1
  286. package/lib/features/tools/marquee-selection/di.config.d.ts +19 -0
  287. package/lib/features/tools/marquee-selection/di.config.d.ts.map +1 -0
  288. package/lib/features/tools/marquee-selection/di.config.js +34 -0
  289. package/lib/features/tools/marquee-selection/di.config.js.map +1 -0
  290. package/lib/features/tools/{marquee-behavior.d.ts → marquee-selection/marquee-behavior.d.ts} +10 -10
  291. package/lib/features/tools/marquee-selection/marquee-behavior.d.ts.map +1 -0
  292. package/lib/features/tools/{marquee-behavior.js → marquee-selection/marquee-behavior.js} +2 -2
  293. package/lib/features/tools/marquee-selection/marquee-behavior.js.map +1 -0
  294. package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts +17 -0
  295. package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts.map +1 -0
  296. package/lib/features/tools/marquee-selection/marquee-behavior.spec.js +165 -0
  297. package/lib/features/tools/marquee-selection/marquee-behavior.spec.js.map +1 -0
  298. package/lib/features/tools/{marquee-mouse-tool.d.ts → marquee-selection/marquee-mouse-tool.d.ts} +4 -6
  299. package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts.map +1 -0
  300. package/lib/features/tools/{marquee-mouse-tool.js → marquee-selection/marquee-mouse-tool.js} +12 -22
  301. package/lib/features/tools/marquee-selection/marquee-mouse-tool.js.map +1 -0
  302. package/lib/features/{tool-feedback → tools/marquee-selection}/marquee-tool-feedback.d.ts +2 -2
  303. package/lib/features/tools/marquee-selection/marquee-tool-feedback.d.ts.map +1 -0
  304. package/lib/features/{tool-feedback → tools/marquee-selection}/marquee-tool-feedback.js +8 -10
  305. package/lib/features/tools/marquee-selection/marquee-tool-feedback.js.map +1 -0
  306. package/lib/features/tools/marquee-selection/marquee-tool.d.ts +12 -0
  307. package/lib/features/tools/marquee-selection/marquee-tool.d.ts.map +1 -0
  308. package/lib/features/tools/{marquee-tool.js → marquee-selection/marquee-tool.js} +8 -20
  309. package/lib/features/tools/marquee-selection/marquee-tool.js.map +1 -0
  310. package/lib/features/tools/{model.d.ts → marquee-selection/model.d.ts} +1 -1
  311. package/lib/features/tools/marquee-selection/model.d.ts.map +1 -0
  312. package/lib/features/tools/{model.js → marquee-selection/model.js} +2 -2
  313. package/lib/features/tools/marquee-selection/model.js.map +1 -0
  314. package/lib/features/tools/{view.d.ts → marquee-selection/view.d.ts} +1 -1
  315. package/lib/features/tools/marquee-selection/view.d.ts.map +1 -0
  316. package/lib/features/tools/{view.js → marquee-selection/view.js} +3 -4
  317. package/lib/features/tools/marquee-selection/view.js.map +1 -0
  318. package/lib/features/tools/node-creation/di.config.d.ts +19 -0
  319. package/lib/features/tools/node-creation/di.config.d.ts.map +1 -0
  320. package/lib/features/{rank/model.js → tools/node-creation/di.config.js} +12 -13
  321. package/lib/features/tools/node-creation/di.config.js.map +1 -0
  322. package/lib/features/tools/{node-creation-tool.d.ts → node-creation/node-creation-tool.d.ts} +7 -10
  323. package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -0
  324. package/lib/features/tools/{node-creation-tool.js → node-creation/node-creation-tool.js} +17 -30
  325. package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -0
  326. package/lib/features/validation/marker-navigator.d.ts +4 -3
  327. package/lib/features/validation/marker-navigator.d.ts.map +1 -1
  328. package/lib/features/validation/marker-navigator.js +16 -20
  329. package/lib/features/validation/marker-navigator.js.map +1 -1
  330. package/lib/features/validation/marker-navigator.spec.d.ts +3 -0
  331. package/lib/features/validation/marker-navigator.spec.d.ts.map +1 -0
  332. package/lib/features/validation/marker-navigator.spec.js +182 -0
  333. package/lib/features/validation/marker-navigator.spec.js.map +1 -0
  334. package/lib/features/validation/validate.d.ts +2 -2
  335. package/lib/features/validation/validate.d.ts.map +1 -1
  336. package/lib/features/validation/validate.js +12 -17
  337. package/lib/features/validation/validate.js.map +1 -1
  338. package/lib/features/viewport/glsp-scroll-mouse-listener.js +3 -4
  339. package/lib/features/viewport/glsp-scroll-mouse-listener.js.map +1 -1
  340. package/lib/glsp-sprotty/index.d.ts +1 -1
  341. package/lib/glsp-sprotty/index.d.ts.map +1 -1
  342. package/lib/glsp-sprotty/index.js +26 -25
  343. package/lib/glsp-sprotty/index.js.map +1 -1
  344. package/lib/glsp-sprotty/types.d.ts +4 -8
  345. package/lib/glsp-sprotty/types.d.ts.map +1 -1
  346. package/lib/glsp-sprotty/types.js +1 -1
  347. package/lib/glsp-sprotty/types.js.map +1 -1
  348. package/lib/index.d.ts +36 -27
  349. package/lib/index.d.ts.map +1 -1
  350. package/lib/index.js +58 -46
  351. package/lib/index.js.map +1 -1
  352. package/lib/lib/model.js +1 -1
  353. package/lib/lib/model.js.map +1 -1
  354. package/lib/model-source/glsp-diagram-server.d.ts.map +1 -1
  355. package/lib/model-source/glsp-diagram-server.js +5 -3
  356. package/lib/model-source/glsp-diagram-server.js.map +1 -1
  357. package/lib/utils/argument-utils.js +3 -3
  358. package/lib/utils/argument-utils.js.map +1 -1
  359. package/lib/utils/marker.js +1 -1
  360. package/lib/utils/marker.js.map +1 -1
  361. package/lib/utils/smodel-util.spec.d.ts +2 -0
  362. package/lib/utils/smodel-util.spec.d.ts.map +1 -0
  363. package/lib/utils/smodel-util.spec.js +184 -0
  364. package/lib/utils/smodel-util.spec.js.map +1 -0
  365. package/lib/utils/viewpoint-util.d.ts +20 -1
  366. package/lib/utils/viewpoint-util.d.ts.map +1 -1
  367. package/lib/utils/viewpoint-util.js +30 -1
  368. package/lib/utils/viewpoint-util.js.map +1 -1
  369. package/lib/views/compartments.js +2 -3
  370. package/lib/views/compartments.js.map +1 -1
  371. package/lib/views/glsp-edge-view.js +2 -3
  372. package/lib/views/glsp-edge-view.js.map +1 -1
  373. package/lib/views/glsp-projection-view.js +2 -3
  374. package/lib/views/glsp-projection-view.js.map +1 -1
  375. package/lib/views/issue-marker-view.js +2 -3
  376. package/lib/views/issue-marker-view.js.map +1 -1
  377. package/lib/views/rounded-corner-view.js +2 -3
  378. package/lib/views/rounded-corner-view.js.map +1 -1
  379. package/package.json +3 -3
  380. package/src/base/action-dispatcher.ts +3 -1
  381. package/src/base/command-stack.ts +55 -3
  382. package/src/base/di.config.ts +34 -9
  383. package/src/base/drag-aware-mouse-listener.ts +2 -2
  384. package/src/base/editor-context-service.ts +28 -13
  385. package/src/{features/tool-feedback → base/feedback}/css-feedback.ts +1 -1
  386. package/src/{features/tool-feedback → base/feedback}/feedback-action-dispatcher.ts +31 -23
  387. package/src/base/{model → feedback}/update-model-command.ts +3 -29
  388. package/src/base/ranked.ts +42 -0
  389. package/src/{features/select → base}/selection-service.spec.ts +51 -121
  390. package/src/{features/select → base}/selection-service.ts +82 -31
  391. package/src/base/tool-manager/glsp-tool-manager.ts +4 -4
  392. package/src/{features/rank/model.ts → base/view/key-tool.ts} +9 -13
  393. package/src/{features/mouse-tool → base/view}/mouse-tool.ts +14 -15
  394. package/src/{base/container-modules.ts → container-modules.ts} +33 -26
  395. package/src/features/accessibility/resize-key-tool/resize-key-tool.ts +2 -2
  396. package/src/features/accessibility/search/search-palette.ts +1 -1
  397. package/src/features/accessibility/view-key-tools/movement-key-tool.ts +2 -2
  398. package/src/features/accessibility/view-key-tools/zoom-key-tool.ts +3 -3
  399. package/src/features/bounds/layouter-test-util.spec.ts +1 -1
  400. package/src/features/change-bounds/movement-restrictor.ts +1 -1
  401. package/src/features/context-menu/selection-service-aware-context-menu-mouse-listener.ts +2 -2
  402. package/src/features/copy-paste/copy-paste-context-menu.ts +1 -1
  403. package/src/features/edit-label/edit-label-tool.ts +4 -12
  404. package/src/features/hints/type-hints.ts +2 -2
  405. package/src/features/hover/hover.ts +2 -1
  406. package/src/features/layout/di.config.ts +1 -1
  407. package/src/features/layout/layout-elements-action.spec.ts +1 -3
  408. package/src/features/layout/layout-elements-action.ts +2 -2
  409. package/src/features/navigation/navigation-action-handler.ts +1 -1
  410. package/src/features/routing/di.config.ts +82 -0
  411. package/src/features/select/di.config.ts +2 -4
  412. package/src/features/select/{select-feedback-action.ts → select-feedback-command.ts} +2 -38
  413. package/src/features/select/select-mouse-listener.ts +2 -2
  414. package/src/features/source-model-watcher/source-model-changed-action-handler.ts +1 -1
  415. package/src/features/tool-palette/tool-palette.ts +12 -12
  416. package/src/features/tools/base-glsp-creation-tool.ts +40 -0
  417. package/src/features/tools/base-glsp-tool.ts +32 -10
  418. package/src/features/{tool-feedback → tools/change-bounds}/change-bounds-tool-feedback.ts +52 -21
  419. package/src/features/tools/{change-bounds-tool.ts → change-bounds/change-bounds-tool.ts} +64 -35
  420. package/src/features/tools/change-bounds/di.config.ts +31 -0
  421. package/src/features/{tool-feedback → tools/change-bounds}/view.tsx +2 -14
  422. package/src/features/tools/{delete-tool.ts → deletion/delete-tool.ts} +8 -18
  423. package/src/features/{mouse-tool → tools/deletion}/di.config.ts +7 -7
  424. package/src/features/{tool-feedback/creation-tool-feedback.ts → tools/edge-creation/dangling-edge-feedback.ts} +18 -88
  425. package/src/features/tools/edge-creation/di.config.ts +28 -0
  426. package/src/features/tools/edge-creation/edge-creation-tool-feedback.ts +89 -0
  427. package/src/features/tools/{edge-creation-tool.ts → edge-creation/edge-creation-tool.ts} +26 -43
  428. package/src/features/tools/edge-creation/view.tsx +33 -0
  429. package/src/features/tools/edge-edit/di.config.ts +41 -0
  430. package/src/features/{tool-feedback → tools/edge-edit}/edge-edit-tool-feedback.ts +27 -15
  431. package/src/features/tools/{edge-edit-tool.ts → edge-edit/edge-edit-tool.ts} +29 -27
  432. package/src/features/tools/enable-default-tools-on-focus-loss.ts +11 -2
  433. package/src/features/tools/marquee-selection/di.config.ts +35 -0
  434. package/src/features/tools/{marquee-behavior.ts → marquee-selection/marquee-behavior.ts} +9 -9
  435. package/src/features/tools/{marquee-mouse-tool.ts → marquee-selection/marquee-mouse-tool.ts} +11 -17
  436. package/src/features/{tool-feedback → tools/marquee-selection}/marquee-tool-feedback.ts +1 -1
  437. package/src/features/tools/{marquee-tool.ts → marquee-selection/marquee-tool.ts} +5 -11
  438. package/{lib/features/tools/di.config.d.ts → src/features/tools/node-creation/di.config.ts} +10 -12
  439. package/src/features/tools/{node-creation-tool.ts → node-creation/node-creation-tool.ts} +14 -31
  440. package/src/features/validation/marker-navigator.ts +5 -5
  441. package/src/features/validation/validate.ts +2 -2
  442. package/src/features/viewport/glsp-scroll-mouse-listener.ts +1 -1
  443. package/src/glsp-sprotty/index.ts +1 -1
  444. package/src/glsp-sprotty/types.ts +2 -4
  445. package/src/index.ts +63 -49
  446. package/src/model-source/glsp-diagram-server.ts +7 -1
  447. package/src/utils/smodel-util.spec.ts +3 -3
  448. package/src/utils/viewpoint-util.ts +32 -0
  449. package/lib/base/container-modules.d.ts.map +0 -1
  450. package/lib/base/container-modules.js.map +0 -1
  451. package/lib/base/model/update-model-command.d.ts.map +0 -1
  452. package/lib/base/model/update-model-command.js.map +0 -1
  453. package/lib/features/mouse-tool/di.config.d.ts.map +0 -1
  454. package/lib/features/mouse-tool/di.config.js.map +0 -1
  455. package/lib/features/mouse-tool/mouse-tool.d.ts +0 -22
  456. package/lib/features/mouse-tool/mouse-tool.d.ts.map +0 -1
  457. package/lib/features/mouse-tool/mouse-tool.js.map +0 -1
  458. package/lib/features/rank/model.d.ts.map +0 -1
  459. package/lib/features/rank/model.js.map +0 -1
  460. package/lib/features/select/select-feedback-action.d.ts +0 -25
  461. package/lib/features/select/select-feedback-action.d.ts.map +0 -1
  462. package/lib/features/select/select-feedback-action.js.map +0 -1
  463. package/lib/features/select/selection-service.d.ts.map +0 -1
  464. package/lib/features/select/selection-service.js.map +0 -1
  465. package/lib/features/tool-feedback/change-bounds-tool-feedback.d.ts.map +0 -1
  466. package/lib/features/tool-feedback/change-bounds-tool-feedback.js.map +0 -1
  467. package/lib/features/tool-feedback/creation-tool-feedback.d.ts.map +0 -1
  468. package/lib/features/tool-feedback/creation-tool-feedback.js.map +0 -1
  469. package/lib/features/tool-feedback/css-feedback.d.ts.map +0 -1
  470. package/lib/features/tool-feedback/css-feedback.js.map +0 -1
  471. package/lib/features/tool-feedback/di.config.d.ts.map +0 -1
  472. package/lib/features/tool-feedback/di.config.js +0 -53
  473. package/lib/features/tool-feedback/di.config.js.map +0 -1
  474. package/lib/features/tool-feedback/edge-edit-tool-feedback.d.ts.map +0 -1
  475. package/lib/features/tool-feedback/edge-edit-tool-feedback.js.map +0 -1
  476. package/lib/features/tool-feedback/feedback-action-dispatcher.d.ts.map +0 -1
  477. package/lib/features/tool-feedback/feedback-action-dispatcher.js.map +0 -1
  478. package/lib/features/tool-feedback/marquee-tool-feedback.d.ts.map +0 -1
  479. package/lib/features/tool-feedback/marquee-tool-feedback.js.map +0 -1
  480. package/lib/features/tool-feedback/model.d.ts.map +0 -1
  481. package/lib/features/tool-feedback/model.js.map +0 -1
  482. package/lib/features/tool-feedback/view.d.ts +0 -16
  483. package/lib/features/tool-feedback/view.d.ts.map +0 -1
  484. package/lib/features/tool-feedback/view.js.map +0 -1
  485. package/lib/features/tools/change-bounds-tool.d.ts.map +0 -1
  486. package/lib/features/tools/change-bounds-tool.js.map +0 -1
  487. package/lib/features/tools/delete-tool.d.ts.map +0 -1
  488. package/lib/features/tools/delete-tool.js.map +0 -1
  489. package/lib/features/tools/di.config.d.ts.map +0 -1
  490. package/lib/features/tools/di.config.js +0 -66
  491. package/lib/features/tools/di.config.js.map +0 -1
  492. package/lib/features/tools/edge-creation-tool.d.ts.map +0 -1
  493. package/lib/features/tools/edge-creation-tool.js.map +0 -1
  494. package/lib/features/tools/edge-edit-tool.d.ts.map +0 -1
  495. package/lib/features/tools/edge-edit-tool.js.map +0 -1
  496. package/lib/features/tools/glsp-manhattan-edge-router.d.ts.map +0 -1
  497. package/lib/features/tools/glsp-manhattan-edge-router.js.map +0 -1
  498. package/lib/features/tools/marquee-behavior.d.ts.map +0 -1
  499. package/lib/features/tools/marquee-behavior.js.map +0 -1
  500. package/lib/features/tools/marquee-mouse-tool.d.ts.map +0 -1
  501. package/lib/features/tools/marquee-mouse-tool.js.map +0 -1
  502. package/lib/features/tools/marquee-tool.d.ts +0 -14
  503. package/lib/features/tools/marquee-tool.d.ts.map +0 -1
  504. package/lib/features/tools/marquee-tool.js.map +0 -1
  505. package/lib/features/tools/model.d.ts.map +0 -1
  506. package/lib/features/tools/model.js.map +0 -1
  507. package/lib/features/tools/node-creation-tool.d.ts.map +0 -1
  508. package/lib/features/tools/node-creation-tool.js.map +0 -1
  509. package/lib/features/tools/view.d.ts.map +0 -1
  510. package/lib/features/tools/view.js.map +0 -1
  511. package/src/features/tool-feedback/di.config.ts +0 -65
  512. package/src/features/tools/di.config.ts +0 -77
  513. /package/lib/features/{tools → routing}/glsp-manhattan-edge-router.d.ts +0 -0
  514. /package/lib/features/{tools → routing}/glsp-manhattan-edge-router.js +0 -0
  515. /package/src/{features/tool-feedback/model.ts → base/feedback/feedback-command.ts} +0 -0
  516. /package/src/features/{tools → routing}/glsp-manhattan-edge-router.ts +0 -0
  517. /package/src/features/tools/{marquee-behavior.spec.ts → marquee-selection/marquee-behavior.spec.ts} +0 -0
  518. /package/src/features/tools/{model.ts → marquee-selection/model.ts} +0 -0
  519. /package/src/features/tools/{view.tsx → marquee-selection/view.tsx} +0 -0
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.removeFeedbackEdge = exports.drawFeedbackEdge = exports.defaultFeedbackEdgeSchema = exports.feedbackEdgeEndId = exports.feedbackEdgeId = exports.FeedbackEdgeEndMovingMouseListener = exports.FeedbackEdgeEnd = exports.RemoveFeedbackEdgeCommand = exports.RemoveFeedbackEdgeAction = exports.DrawFeedbackEdgeCommand = exports.DrawFeedbackEdgeAction = void 0;
15
+ exports.configureDanglingFeedbackEdge = exports.removeDanglingFeedbackEdge = exports.drawFeedbackEdge = exports.defaultFeedbackEdgeSchema = exports.feedbackEdgeEndId = exports.feedbackEdgeId = exports.FeedbackEdgeEnd = exports.RemoveFeedbackEdgeCommand = exports.RemoveFeedbackEdgeAction = exports.DrawFeedbackEdgeCommand = exports.DrawFeedbackEdgeAction = void 0;
16
16
  /********************************************************************************
17
17
  * Copyright (c) 2019-2023 EclipseSource and others.
18
18
  *
@@ -29,10 +29,11 @@ exports.removeFeedbackEdge = exports.drawFeedbackEdge = exports.defaultFeedbackE
29
29
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
30
30
  ********************************************************************************/
31
31
  const inversify_1 = require("inversify");
32
- const _glsp_sprotty_1 = require("../../glsp-sprotty/index");
33
- const smodel_util_1 = require("../../utils/smodel-util");
34
- const viewpoint_util_1 = require("../../utils/viewpoint-util");
35
- const model_1 = require("./model");
32
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
33
+ const feedback_command_1 = require("../../../base/feedback/feedback-command");
34
+ const smodel_util_1 = require("../../../utils/smodel-util");
35
+ const viewpoint_util_1 = require("../../../utils/viewpoint-util");
36
+ const view_1 = require("./view");
36
37
  var DrawFeedbackEdgeAction;
37
38
  (function (DrawFeedbackEdgeAction) {
38
39
  DrawFeedbackEdgeAction.KIND = 'drawFeedbackEdge';
@@ -44,8 +45,8 @@ var DrawFeedbackEdgeAction;
44
45
  return Object.assign({ kind: DrawFeedbackEdgeAction.KIND }, options);
45
46
  }
46
47
  DrawFeedbackEdgeAction.create = create;
47
- })(DrawFeedbackEdgeAction = exports.DrawFeedbackEdgeAction || (exports.DrawFeedbackEdgeAction = {}));
48
- let DrawFeedbackEdgeCommand = class DrawFeedbackEdgeCommand extends model_1.FeedbackCommand {
48
+ })(DrawFeedbackEdgeAction || (exports.DrawFeedbackEdgeAction = DrawFeedbackEdgeAction = {}));
49
+ let DrawFeedbackEdgeCommand = exports.DrawFeedbackEdgeCommand = class DrawFeedbackEdgeCommand extends feedback_command_1.FeedbackCommand {
49
50
  constructor(action) {
50
51
  super();
51
52
  this.action = action;
@@ -56,12 +57,11 @@ let DrawFeedbackEdgeCommand = class DrawFeedbackEdgeCommand extends model_1.Feed
56
57
  }
57
58
  };
58
59
  DrawFeedbackEdgeCommand.KIND = DrawFeedbackEdgeAction.KIND;
59
- DrawFeedbackEdgeCommand = __decorate([
60
+ exports.DrawFeedbackEdgeCommand = DrawFeedbackEdgeCommand = __decorate([
60
61
  (0, inversify_1.injectable)(),
61
62
  __param(0, (0, inversify_1.inject)(_glsp_sprotty_1.TYPES.Action)),
62
63
  __metadata("design:paramtypes", [Object])
63
64
  ], DrawFeedbackEdgeCommand);
64
- exports.DrawFeedbackEdgeCommand = DrawFeedbackEdgeCommand;
65
65
  var RemoveFeedbackEdgeAction;
66
66
  (function (RemoveFeedbackEdgeAction) {
67
67
  RemoveFeedbackEdgeAction.KIND = 'removeFeedbackEdgeCommand';
@@ -73,18 +73,17 @@ var RemoveFeedbackEdgeAction;
73
73
  return { kind: RemoveFeedbackEdgeAction.KIND };
74
74
  }
75
75
  RemoveFeedbackEdgeAction.create = create;
76
- })(RemoveFeedbackEdgeAction = exports.RemoveFeedbackEdgeAction || (exports.RemoveFeedbackEdgeAction = {}));
77
- let RemoveFeedbackEdgeCommand = class RemoveFeedbackEdgeCommand extends model_1.FeedbackCommand {
76
+ })(RemoveFeedbackEdgeAction || (exports.RemoveFeedbackEdgeAction = RemoveFeedbackEdgeAction = {}));
77
+ let RemoveFeedbackEdgeCommand = exports.RemoveFeedbackEdgeCommand = class RemoveFeedbackEdgeCommand extends feedback_command_1.FeedbackCommand {
78
78
  execute(context) {
79
- removeFeedbackEdge(context.root);
79
+ removeDanglingFeedbackEdge(context.root);
80
80
  return context.root;
81
81
  }
82
82
  };
83
83
  RemoveFeedbackEdgeCommand.KIND = RemoveFeedbackEdgeAction.KIND;
84
- RemoveFeedbackEdgeCommand = __decorate([
84
+ exports.RemoveFeedbackEdgeCommand = RemoveFeedbackEdgeCommand = __decorate([
85
85
  (0, inversify_1.injectable)()
86
86
  ], RemoveFeedbackEdgeCommand);
87
- exports.RemoveFeedbackEdgeCommand = RemoveFeedbackEdgeCommand;
88
87
  class FeedbackEdgeEnd extends _glsp_sprotty_1.SDanglingAnchor {
89
88
  constructor(sourceId, elementTypeId, feedbackEdge = undefined, type = FeedbackEdgeEnd.TYPE) {
90
89
  super();
@@ -94,77 +93,8 @@ class FeedbackEdgeEnd extends _glsp_sprotty_1.SDanglingAnchor {
94
93
  this.type = type;
95
94
  }
96
95
  }
97
- FeedbackEdgeEnd.TYPE = 'feedback-edge-end';
98
96
  exports.FeedbackEdgeEnd = FeedbackEdgeEnd;
99
- class FeedbackEdgeEndMovingMouseListener extends _glsp_sprotty_1.MouseListener {
100
- constructor(anchorRegistry) {
101
- super();
102
- this.anchorRegistry = anchorRegistry;
103
- }
104
- mouseMove(target, event) {
105
- const root = target.root;
106
- const edgeEnd = root.index.getById(feedbackEdgeEndId(root));
107
- if (!(edgeEnd instanceof FeedbackEdgeEnd) || !edgeEnd.feedbackEdge) {
108
- return [];
109
- }
110
- const edge = edgeEnd.feedbackEdge;
111
- const position = (0, viewpoint_util_1.getAbsolutePosition)(edgeEnd, event);
112
- const endAtMousePosition = (0, _glsp_sprotty_1.findChildrenAtPosition)(target.root, position)
113
- .reverse()
114
- .find(element => (0, _glsp_sprotty_1.isConnectable)(element) && element.canConnect(edge, 'target'));
115
- if (endAtMousePosition instanceof _glsp_sprotty_1.SConnectableElement && edge.source && (0, _glsp_sprotty_1.isBoundsAware)(edge.source)) {
116
- const anchor = this.computeAbsoluteAnchor(endAtMousePosition, _glsp_sprotty_1.Bounds.center((0, viewpoint_util_1.toAbsoluteBounds)(edge.source)));
117
- if (_glsp_sprotty_1.Point.euclideanDistance(anchor, edgeEnd.position) > 1) {
118
- return [_glsp_sprotty_1.MoveAction.create([{ elementId: edgeEnd.id, toPosition: anchor }], { animate: false })];
119
- }
120
- }
121
- else {
122
- return [_glsp_sprotty_1.MoveAction.create([{ elementId: edgeEnd.id, toPosition: position }], { animate: false })];
123
- }
124
- return [];
125
- }
126
- computeAbsoluteAnchor(element, absoluteReferencePoint, offset) {
127
- const referencePointInParent = absoluteToParent(element, absoluteReferencePoint);
128
- const anchorComputer = this.anchorRegistry.get(_glsp_sprotty_1.PolylineEdgeRouter.KIND, element.anchorKind);
129
- let anchor = anchorComputer.getAnchor(element, referencePointInParent, offset);
130
- // The anchor is computed in the local coordinate system of the element.
131
- // If the element is a nested child element we have to add the absolute position of its parent to the anchor.
132
- if (element.parent !== element.root) {
133
- const parent = (0, _glsp_sprotty_1.findParentByFeature)(element.parent, _glsp_sprotty_1.isBoundsAware);
134
- if (parent) {
135
- const absoluteParentPosition = (0, viewpoint_util_1.toAbsoluteBounds)(parent);
136
- anchor = _glsp_sprotty_1.Point.add(absoluteParentPosition, anchor);
137
- }
138
- }
139
- return anchor;
140
- }
141
- }
142
- exports.FeedbackEdgeEndMovingMouseListener = FeedbackEdgeEndMovingMouseListener;
143
- /**
144
- * Convert a point, specified in absolute coordinates, to a point relative
145
- * to the parent of the specified child element.
146
- * @param element the child element
147
- * @param absolutePoint a point in absolute coordinates
148
- * @returns the equivalent point, relative to the element's parent coordinates
149
- */
150
- function absoluteToParent(element, absolutePoint) {
151
- if ((0, _glsp_sprotty_1.isBoundsAware)(element.parent)) {
152
- return absoluteToLocal(element.parent, absolutePoint);
153
- }
154
- // If the parent is not bounds-aware, assume it's at 0; 0 and proceed
155
- return absoluteToLocal(element, absolutePoint);
156
- }
157
- /**
158
- * Convert a point, specified in absolute coordinates, to a point relative
159
- * to the specified element.
160
- * @param element the element
161
- * @param absolutePoint a point in absolute coordinates
162
- * @returns the equivalent point, relative to the element's coordinates
163
- */
164
- function absoluteToLocal(element, absolutePoint) {
165
- const absoluteElementBounds = (0, viewpoint_util_1.toAbsoluteBounds)(element);
166
- return { x: absolutePoint.x - absoluteElementBounds.x, y: absolutePoint.y - absoluteElementBounds.y };
167
- }
97
+ FeedbackEdgeEnd.TYPE = 'feedback-edge-end';
168
98
  function feedbackEdgeId(root) {
169
99
  return root.id + '_feedback_edge';
170
100
  }
@@ -199,7 +129,7 @@ function drawFeedbackEdge(context, sourceId, elementTypeId, edgeTemplate) {
199
129
  }
200
130
  }
201
131
  exports.drawFeedbackEdge = drawFeedbackEdge;
202
- function removeFeedbackEdge(root) {
132
+ function removeDanglingFeedbackEdge(root) {
203
133
  const feedbackEdge = root.index.getById(feedbackEdgeId(root));
204
134
  const feedbackEdgeEnd = root.index.getById(feedbackEdgeEndId(root));
205
135
  if (feedbackEdge instanceof _glsp_sprotty_1.SChildElement) {
@@ -209,5 +139,13 @@ function removeFeedbackEdge(root) {
209
139
  root.remove(feedbackEdgeEnd);
210
140
  }
211
141
  }
212
- exports.removeFeedbackEdge = removeFeedbackEdge;
213
- //# sourceMappingURL=creation-tool-feedback.js.map
142
+ exports.removeDanglingFeedbackEdge = removeDanglingFeedbackEdge;
143
+ function configureDanglingFeedbackEdge(context) {
144
+ if (!context.isBound(DrawFeedbackEdgeCommand) && !context.isBound(RemoveFeedbackEdgeCommand) && !context.isBound(view_1.FeedbackEdgeEndView)) {
145
+ (0, _glsp_sprotty_1.configureCommand)(context, DrawFeedbackEdgeCommand);
146
+ (0, _glsp_sprotty_1.configureCommand)(context, RemoveFeedbackEdgeCommand);
147
+ (0, _glsp_sprotty_1.configureView)(context, FeedbackEdgeEnd.TYPE, view_1.FeedbackEdgeEndView);
148
+ }
149
+ }
150
+ exports.configureDanglingFeedbackEdge = configureDanglingFeedbackEdge;
151
+ //# sourceMappingURL=dangling-edge-feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dangling-edge-feedback.js","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/dangling-edge-feedback.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,iDAgBuB;AACvB,8EAA0E;AAC1E,4DAAwD;AACxD,kEAAmE;AACnE,iCAA6C;AAS7C,IAAiB,sBAAsB,CAiBtC;AAjBD,WAAiB,sBAAsB;IACtB,2BAAI,GAAG,kBAAkB,CAAC;IAEvC,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,sBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,uBAAA,IAAI,CAAC,CAAC;IACxC,CAAC;IAFe,yBAAE,KAEjB,CAAA;IAED,SAAgB,MAAM,CAAC,OAItB;QACG,uBACI,IAAI,EAAE,uBAAA,IAAI,IACP,OAAO,EACZ;IACN,CAAC;IATe,6BAAM,SASrB,CAAA;AACL,CAAC,EAjBgB,sBAAsB,sCAAtB,sBAAsB,QAiBtC;AAGM,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,kCAAe;IAGxD,YAA4C,MAA8B;QACtE,KAAK,EAAE,CAAC;QADgC,WAAM,GAAN,MAAM,CAAwB;IAE1E,CAAC;IAED,OAAO,CAAC,OAAgC;QACpC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACnG,OAAO,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;;AATe,4BAAI,GAAG,sBAAsB,CAAC,IAAI,AAA9B,CAA+B;k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G,YAAY,CAAC;QACpC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClB,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;KAC1B;AACL,CAAC;AApCD,4CAoCC;AAED,SAAgB,0BAA0B,CAAC,IAAgB;IACvD,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IACpE,IAAI,YAAY,YAAY,6BAAa,EAAE;QACvC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;KAC7B;IACD,IAAI,eAAe,YAAY,6BAAa,EAAE;QAC1C,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;KAChC;AACL,CAAC;AATD,gEASC;AAED,SAAgB,6BAA6B,CAAC,OAAuB;IACjE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,yBAAyB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,0BAAmB,CAAC,EAAE;QACnI,IAAA,gCAAgB,EAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;QACnD,IAAA,gCAAgB,EAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;QACrD,IAAA,6BAAa,EAAC,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,0BAAmB,CAAC,CAAC;KACrE;AACL,CAAC;AAND,sEAMC"}
@@ -0,0 +1,19 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2019-2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { ContainerModule } from 'inversify';
17
+ declare const edgeCreationToolModule: ContainerModule;
18
+ export default edgeCreationToolModule;
19
+ //# sourceMappingURL=di.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAK5C,QAAA,MAAM,sBAAsB,iBAK1B,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /********************************************************************************
4
+ * Copyright (c) 2019-2023 EclipseSource and others.
5
+ *
6
+ * This program and the accompanying materials are made available under the
7
+ * terms of the Eclipse Public License v. 2.0 which is available at
8
+ * http://www.eclipse.org/legal/epl-2.0.
9
+ *
10
+ * This Source Code may also be made available under the following Secondary
11
+ * Licenses when the conditions for such availability set forth in the Eclipse
12
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
13
+ * with the GNU Classpath Exception which is available at
14
+ * https://www.gnu.org/software/classpath/license.html.
15
+ *
16
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
+ ********************************************************************************/
18
+ const inversify_1 = require("inversify");
19
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
20
+ const dangling_edge_feedback_1 = require("./dangling-edge-feedback");
21
+ const edge_creation_tool_1 = require("./edge-creation-tool");
22
+ const edgeCreationToolModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
23
+ const context = { bind, unbind, isBound, rebind };
24
+ (0, _glsp_sprotty_1.bindAsService)(context, _glsp_sprotty_1.TYPES.ITool, edge_creation_tool_1.EdgeCreationTool);
25
+ (0, _glsp_sprotty_1.configureActionHandler)(context, _glsp_sprotty_1.TriggerEdgeCreationAction.KIND, edge_creation_tool_1.EdgeCreationTool);
26
+ (0, dangling_edge_feedback_1.configureDanglingFeedbackEdge)(context);
27
+ });
28
+ exports.default = edgeCreationToolModule;
29
+ //# sourceMappingURL=di.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di.config.js","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/di.config.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA4C;AAC5C,iDAAwG;AACxG,qEAAyE;AACzE,6DAAwD;AAExD,MAAM,sBAAsB,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACjF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,IAAA,6BAAa,EAAC,OAAO,EAAE,qBAAK,CAAC,KAAK,EAAE,qCAAgB,CAAC,CAAC;IACtD,IAAA,sCAAsB,EAAC,OAAO,EAAE,yCAAyB,CAAC,IAAI,EAAE,qCAAgB,CAAC,CAAC;IAClF,IAAA,sDAA6B,EAAC,OAAO,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC;AAEH,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2019-2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { Action, AnchorComputerRegistry, Disposable, MouseListener, Point, SConnectableElement, SModelElement } from '../../../glsp-sprotty/index';
17
+ import { IFeedbackActionDispatcher } from '../../../base/feedback/feedback-action-dispatcher';
18
+ export declare class FeedbackEdgeEndMovingMouseListener extends MouseListener implements Disposable {
19
+ protected anchorRegistry: AnchorComputerRegistry;
20
+ protected feedbackDispatcher: IFeedbackActionDispatcher;
21
+ constructor(anchorRegistry: AnchorComputerRegistry, feedbackDispatcher: IFeedbackActionDispatcher);
22
+ mouseMove(target: SModelElement, event: MouseEvent): Action[];
23
+ protected computeAbsoluteAnchor(element: SConnectableElement, absoluteReferencePoint: Point, offset?: number): Point;
24
+ dispose(): void;
25
+ }
26
+ //# sourceMappingURL=edge-creation-tool-feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-creation-tool-feedback.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/edge-creation-tool-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,sBAAsB,EAEtB,UAAU,EACV,aAAa,EAEb,KAAK,EAEL,mBAAmB,EACnB,aAAa,EAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAI9F,qBAAa,kCAAmC,SAAQ,aAAc,YAAW,UAAU;IAC3E,SAAS,CAAC,cAAc,EAAE,sBAAsB;IAAE,SAAS,CAAC,kBAAkB,EAAE,yBAAyB;gBAA/F,cAAc,EAAE,sBAAsB,EAAY,kBAAkB,EAAE,yBAAyB;IAI5G,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE;IA6BtE,SAAS,CAAC,qBAAqB,CAAC,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK;IAgBpH,OAAO,IAAI,IAAI;CAGlB"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeedbackEdgeEndMovingMouseListener = void 0;
4
+ /********************************************************************************
5
+ * Copyright (c) 2019-2023 EclipseSource and others.
6
+ *
7
+ * This program and the accompanying materials are made available under the
8
+ * terms of the Eclipse Public License v. 2.0 which is available at
9
+ * http://www.eclipse.org/legal/epl-2.0.
10
+ *
11
+ * This Source Code may also be made available under the following Secondary
12
+ * Licenses when the conditions for such availability set forth in the Eclipse
13
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ * with the GNU Classpath Exception which is available at
15
+ * https://www.gnu.org/software/classpath/license.html.
16
+ *
17
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
+ ********************************************************************************/
19
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
20
+ const viewpoint_util_1 = require("../../../utils/viewpoint-util");
21
+ const dangling_edge_feedback_1 = require("./dangling-edge-feedback");
22
+ class FeedbackEdgeEndMovingMouseListener extends _glsp_sprotty_1.MouseListener {
23
+ constructor(anchorRegistry, feedbackDispatcher) {
24
+ super();
25
+ this.anchorRegistry = anchorRegistry;
26
+ this.feedbackDispatcher = feedbackDispatcher;
27
+ }
28
+ mouseMove(target, event) {
29
+ const root = target.root;
30
+ const edgeEnd = root.index.getById((0, dangling_edge_feedback_1.feedbackEdgeEndId)(root));
31
+ if (!(edgeEnd instanceof dangling_edge_feedback_1.FeedbackEdgeEnd) || !edgeEnd.feedbackEdge) {
32
+ return [];
33
+ }
34
+ const edge = edgeEnd.feedbackEdge;
35
+ const position = (0, viewpoint_util_1.getAbsolutePosition)(edgeEnd, event);
36
+ const endAtMousePosition = (0, _glsp_sprotty_1.findChildrenAtPosition)(target.root, position)
37
+ .reverse()
38
+ .find(element => (0, _glsp_sprotty_1.isConnectable)(element) && element.canConnect(edge, 'target'));
39
+ if (endAtMousePosition instanceof _glsp_sprotty_1.SConnectableElement && edge.source && (0, _glsp_sprotty_1.isBoundsAware)(edge.source)) {
40
+ const anchor = this.computeAbsoluteAnchor(endAtMousePosition, _glsp_sprotty_1.Bounds.center((0, viewpoint_util_1.toAbsoluteBounds)(edge.source)));
41
+ if (_glsp_sprotty_1.Point.euclideanDistance(anchor, edgeEnd.position) > 1) {
42
+ this.feedbackDispatcher.registerFeedback(this, [
43
+ _glsp_sprotty_1.MoveAction.create([{ elementId: edgeEnd.id, toPosition: anchor }], { animate: false })
44
+ ]);
45
+ }
46
+ }
47
+ else {
48
+ this.feedbackDispatcher.registerFeedback(this, [
49
+ _glsp_sprotty_1.MoveAction.create([{ elementId: edgeEnd.id, toPosition: position }], { animate: false })
50
+ ]);
51
+ }
52
+ return [];
53
+ }
54
+ computeAbsoluteAnchor(element, absoluteReferencePoint, offset) {
55
+ const referencePointInParent = (0, viewpoint_util_1.absoluteToParent)(element, absoluteReferencePoint);
56
+ const anchorComputer = this.anchorRegistry.get(_glsp_sprotty_1.PolylineEdgeRouter.KIND, element.anchorKind);
57
+ let anchor = anchorComputer.getAnchor(element, referencePointInParent, offset);
58
+ // The anchor is computed in the local coordinate system of the element.
59
+ // If the element is a nested child element we have to add the absolute position of its parent to the anchor.
60
+ if (element.parent !== element.root) {
61
+ const parent = (0, _glsp_sprotty_1.findParentByFeature)(element.parent, _glsp_sprotty_1.isBoundsAware);
62
+ if (parent) {
63
+ const absoluteParentPosition = (0, viewpoint_util_1.toAbsoluteBounds)(parent);
64
+ anchor = _glsp_sprotty_1.Point.add(absoluteParentPosition, anchor);
65
+ }
66
+ }
67
+ return anchor;
68
+ }
69
+ dispose() {
70
+ this.feedbackDispatcher.deregisterFeedback(this);
71
+ }
72
+ }
73
+ exports.FeedbackEdgeEndMovingMouseListener = FeedbackEdgeEndMovingMouseListener;
74
+ //# sourceMappingURL=edge-creation-tool-feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-creation-tool-feedback.js","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/edge-creation-tool-feedback.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAeuB;AAEvB,kEAAwG;AACxG,qEAA8E;AAE9E,MAAa,kCAAmC,SAAQ,6BAAa;IACjE,YAAsB,cAAsC,EAAY,kBAA6C;QACjH,KAAK,EAAE,CAAC;QADU,mBAAc,GAAd,cAAc,CAAwB;QAAY,uBAAkB,GAAlB,kBAAkB,CAA2B;IAErH,CAAC;IAEQ,SAAS,CAAC,MAAqB,EAAE,KAAiB;QACvD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAA,0CAAiB,EAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,CAAC,OAAO,YAAY,wCAAe,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YAChE,OAAO,EAAE,CAAC;SACb;QAED,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;QAClC,MAAM,QAAQ,GAAG,IAAA,oCAAmB,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACrD,MAAM,kBAAkB,GAAG,IAAA,sCAAsB,EAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC;aACnE,OAAO,EAAE;aACT,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,IAAA,6BAAa,EAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;QAEnF,IAAI,kBAAkB,YAAY,mCAAmB,IAAI,IAAI,CAAC,MAAM,IAAI,IAAA,6BAAa,EAAC,IAAI,CAAC,MAAM,CAAC,EAA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AAA,mCAAmB,EAAC,OAAO,CAAC,MAAM,EAAE,6BAAa,CAAC,CAAC;YAClE,IAAI,MAAM,EAAE;gBACR,MAAM,sBAAsB,GAAG,IAAA,iCAAgB,EAAC,MAAM,CAAC,CAAC;gBACxD,MAAM,GAAG,qBAAK,CAAC,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;aACtD;SACJ;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;CACJ;AArDD,gFAqDC"}
@@ -1,20 +1,15 @@
1
- import { Action, AnchorComputerRegistry, IActionHandler, SEdge, SModelElement, TriggerEdgeCreationAction } from '../../glsp-sprotty/index';
2
- import { DragAwareMouseListener } from '../../base/drag-aware-mouse-listener';
3
- import { FeedbackEdgeEndMovingMouseListener } from '../tool-feedback/creation-tool-feedback';
4
- import { BaseGLSPTool } from './base-glsp-tool';
1
+ import { Action, AnchorComputerRegistry, SEdge, SModelElement, TriggerEdgeCreationAction } from '../../../glsp-sprotty/index';
2
+ import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
3
+ import { BaseGLSPCreationTool } from '../base-glsp-creation-tool';
5
4
  /**
6
5
  * Tool to create connections in a Diagram, by selecting a source and target node.
7
6
  */
8
- export declare class EdgeCreationTool extends BaseGLSPTool implements IActionHandler {
7
+ export declare class EdgeCreationTool extends BaseGLSPCreationTool<TriggerEdgeCreationAction> {
9
8
  static ID: string;
10
9
  protected anchorRegistry: AnchorComputerRegistry;
11
- protected triggerAction: TriggerEdgeCreationAction;
12
- protected creationToolMouseListener: EdgeCreationToolMouseListener;
13
- protected feedbackEndMovingMouseListener: FeedbackEdgeEndMovingMouseListener;
10
+ protected isTriggerAction: typeof TriggerEdgeCreationAction.is;
14
11
  get id(): string;
15
- enable(): void;
16
- disable(): void;
17
- handle(action: Action): Action | void;
12
+ doEnable(): void;
18
13
  }
19
14
  export declare class EdgeCreationToolMouseListener extends DragAwareMouseListener {
20
15
  protected triggerAction: TriggerEdgeCreationAction;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-creation-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/edge-creation-tool.ts"],"names":[],"mappings":"AAgBA,OAAO,EACH,MAAM,EACN,sBAAsB,EAGtB,KAAK,EACL,aAAa,EACb,yBAAyB,EAI5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE;;GAEG;AACH,qBACa,gBAAiB,SAAQ,oBAAoB,CAAC,yBAAyB,CAAC;IACjF,MAAM,CAAC,EAAE,SAAsB;IAEC,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAEjF,SAAS,CAAC,eAAe,sCAAgC;IAEzD,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,QAAQ,IAAI,IAAI;CAYnB;AAED,qBACa,6BAA8B,SAAQ,sBAAsB;IAOzD,SAAS,CAAC,aAAa,EAAE,yBAAyB;IAAE,SAAS,CAAC,IAAI,EAAE,gBAAgB;IANhG,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;IACxC,SAAS,CAAC,aAAa,UAAS;IAChC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC;gBAEL,aAAa,EAAE,yBAAyB,EAAY,IAAI,EAAE,gBAAgB;IAMhG,SAAS,CAAC,YAAY,IAAI,IAAI;IAQrB,kBAAkB,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE;IAoCjF,SAAS,CAAC,gBAAgB,IAAI,OAAO;IAIrC,SAAS,CAAC,gBAAgB,IAAI,OAAO;IAI5B,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE;IAsBtE,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO;IAItE,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO;CAGzE"}
@@ -27,38 +27,29 @@ exports.EdgeCreationToolMouseListener = exports.EdgeCreationTool = void 0;
27
27
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
28
28
  ********************************************************************************/
29
29
  const inversify_1 = require("inversify");
30
- const _glsp_sprotty_1 = require("../../glsp-sprotty/index");
31
- const drag_aware_mouse_listener_1 = require("../../base/drag-aware-mouse-listener");
32
- const creation_tool_feedback_1 = require("../tool-feedback/creation-tool-feedback");
33
- const css_feedback_1 = require("../tool-feedback/css-feedback");
34
- const base_glsp_tool_1 = require("./base-glsp-tool");
30
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
31
+ const drag_aware_mouse_listener_1 = require("../../../base/drag-aware-mouse-listener");
32
+ const css_feedback_1 = require("../../../base/feedback/css-feedback");
33
+ const base_glsp_creation_tool_1 = require("../base-glsp-creation-tool");
34
+ const dangling_edge_feedback_1 = require("./dangling-edge-feedback");
35
+ const edge_creation_tool_feedback_1 = require("./edge-creation-tool-feedback");
35
36
  /**
36
37
  * Tool to create connections in a Diagram, by selecting a source and target node.
37
38
  */
38
- let EdgeCreationTool = EdgeCreationTool_1 = class EdgeCreationTool extends base_glsp_tool_1.BaseGLSPTool {
39
+ let EdgeCreationTool = exports.EdgeCreationTool = EdgeCreationTool_1 = class EdgeCreationTool extends base_glsp_creation_tool_1.BaseGLSPCreationTool {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.isTriggerAction = _glsp_sprotty_1.TriggerEdgeCreationAction.is;
43
+ }
39
44
  get id() {
40
45
  return EdgeCreationTool_1.ID;
41
46
  }
42
- enable() {
43
- if (this.triggerAction === undefined) {
44
- throw new TypeError(`Could not enable tool ${this.id}.The triggerAction cannot be undefined.`);
45
- }
46
- this.creationToolMouseListener = new EdgeCreationToolMouseListener(this.triggerAction, this);
47
- this.mouseTool.register(this.creationToolMouseListener);
48
- this.feedbackEndMovingMouseListener = new creation_tool_feedback_1.FeedbackEdgeEndMovingMouseListener(this.anchorRegistry);
49
- this.mouseTool.register(this.feedbackEndMovingMouseListener);
50
- this.dispatchFeedback([(0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.OPERATION_NOT_ALLOWED)]);
51
- }
52
- disable() {
53
- this.mouseTool.deregister(this.creationToolMouseListener);
54
- this.mouseTool.deregister(this.feedbackEndMovingMouseListener);
55
- this.deregisterFeedback([creation_tool_feedback_1.RemoveFeedbackEdgeAction.create(), (0, css_feedback_1.cursorFeedbackAction)()]);
56
- }
57
- handle(action) {
58
- if (_glsp_sprotty_1.TriggerEdgeCreationAction.is(action)) {
59
- this.triggerAction = action;
60
- return _glsp_sprotty_1.EnableToolsAction.create([this.id]);
61
- }
47
+ doEnable() {
48
+ const mouseMovingFeedback = new edge_creation_tool_feedback_1.FeedbackEdgeEndMovingMouseListener(this.anchorRegistry, this.feedbackDispatcher);
49
+ this.toDisposeOnDisable.push(mouseMovingFeedback, this.mouseTool.registerListener(new EdgeCreationToolMouseListener(this.triggerAction, this)), this.mouseTool.registerListener(mouseMovingFeedback), this.registerFeedback([(0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.OPERATION_NOT_ALLOWED)], this, [
50
+ dangling_edge_feedback_1.RemoveFeedbackEdgeAction.create(),
51
+ (0, css_feedback_1.cursorFeedbackAction)()
52
+ ]));
62
53
  }
63
54
  };
64
55
  EdgeCreationTool.ID = 'tool_create_edge';
@@ -66,11 +57,10 @@ __decorate([
66
57
  (0, inversify_1.inject)(_glsp_sprotty_1.AnchorComputerRegistry),
67
58
  __metadata("design:type", _glsp_sprotty_1.AnchorComputerRegistry)
68
59
  ], EdgeCreationTool.prototype, "anchorRegistry", void 0);
69
- EdgeCreationTool = EdgeCreationTool_1 = __decorate([
60
+ exports.EdgeCreationTool = EdgeCreationTool = EdgeCreationTool_1 = __decorate([
70
61
  (0, inversify_1.injectable)()
71
62
  ], EdgeCreationTool);
72
- exports.EdgeCreationTool = EdgeCreationTool;
73
- let EdgeCreationToolMouseListener = class EdgeCreationToolMouseListener extends drag_aware_mouse_listener_1.DragAwareMouseListener {
63
+ let EdgeCreationToolMouseListener = exports.EdgeCreationToolMouseListener = class EdgeCreationToolMouseListener extends drag_aware_mouse_listener_1.DragAwareMouseListener {
74
64
  constructor(triggerAction, tool) {
75
65
  super();
76
66
  this.triggerAction = triggerAction;
@@ -84,7 +74,7 @@ let EdgeCreationToolMouseListener = class EdgeCreationToolMouseListener extends
84
74
  this.target = undefined;
85
75
  this.currentTarget = undefined;
86
76
  this.allowedTarget = false;
87
- this.tool.dispatchFeedback([creation_tool_feedback_1.RemoveFeedbackEdgeAction.create()]);
77
+ this.tool.registerFeedback([dangling_edge_feedback_1.RemoveFeedbackEdgeAction.create()]);
88
78
  }
89
79
  nonDraggingMouseUp(_element, event) {
90
80
  const result = [];
@@ -92,8 +82,8 @@ let EdgeCreationToolMouseListener = class EdgeCreationToolMouseListener extends
92
82
  if (!this.isSourceSelected()) {
93
83
  if (this.currentTarget && this.allowedTarget) {
94
84
  this.source = this.currentTarget.id;
95
- this.tool.dispatchFeedback([
96
- creation_tool_feedback_1.DrawFeedbackEdgeAction.create({ elementTypeId: this.triggerAction.elementTypeId, sourceId: this.source })
85
+ this.tool.registerFeedback([
86
+ dangling_edge_feedback_1.DrawFeedbackEdgeAction.create({ elementTypeId: this.triggerAction.elementTypeId, sourceId: this.source })
97
87
  ]);
98
88
  }
99
89
  }
@@ -103,18 +93,18 @@ let EdgeCreationToolMouseListener = class EdgeCreationToolMouseListener extends
103
93
  }
104
94
  }
105
95
  if (this.source && this.target) {
106
- result.push(_glsp_sprotty_1.CreateEdgeOperation.create({
107
- elementTypeId: this.triggerAction.elementTypeId,
108
- sourceElementId: this.source,
109
- targetElementId: this.target,
110
- args: this.triggerAction.args
111
- }));
112
96
  if (!(0, _glsp_sprotty_1.isCtrlOrCmd)(event)) {
113
97
  result.push(_glsp_sprotty_1.EnableDefaultToolsAction.create());
114
98
  }
115
99
  else {
116
100
  this.reinitialize();
117
101
  }
102
+ result.push(_glsp_sprotty_1.CreateEdgeOperation.create({
103
+ elementTypeId: this.triggerAction.elementTypeId,
104
+ sourceElementId: this.source,
105
+ targetElementId: this.target,
106
+ args: this.triggerAction.args
107
+ }));
118
108
  }
119
109
  }
120
110
  else if (event.button === 2) {
@@ -157,9 +147,8 @@ let EdgeCreationToolMouseListener = class EdgeCreationToolMouseListener extends
157
147
  return element !== undefined && (0, _glsp_sprotty_1.isConnectable)(element) && element.canConnect(this.proxyEdge, 'target');
158
148
  }
159
149
  };
160
- EdgeCreationToolMouseListener = __decorate([
150
+ exports.EdgeCreationToolMouseListener = EdgeCreationToolMouseListener = __decorate([
161
151
  (0, inversify_1.injectable)(),
162
152
  __metadata("design:paramtypes", [Object, EdgeCreationTool])
163
153
  ], EdgeCreationToolMouseListener);
164
- exports.EdgeCreationToolMouseListener = EdgeCreationToolMouseListener;
165
154
  //# sourceMappingURL=edge-creation-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-creation-tool.js","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/edge-creation-tool.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,iDAWuB;AACvB,uFAAiF;AAEjF,sEAAsF;AACtF,wEAAkE;AAClE,qEAA4F;AAC5F,+EAAmF;AAEnF;;GAEG;AAEI,IAAM,gBAAgB,mDAAtB,MAAM,gBAAiB,SAAQ,8CAA+C;IAA9E;;QAKO,oBAAe,GAAG,yCAAyB,CAAC,EAAE,CAAC;IAkB7D,CAAC;IAhBG,IAAI,EA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B;aACJ;YACD,OAAO,CAAC,IAAA,mCAAoB,EAAC,wBAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;SAClE;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAES,eAAe,CAAC,OAAkC;QACxD,OAAO,OAAO,KAAK,SAAS,IAAI,IAAA,6BAAa,EAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3G,CAAC;IAES,eAAe,CAAC,OAAkC;QACxD,OAAO,OAAO,KAAK,SAAS,IAAI,IAAA,6BAAa,EAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3G,CAAC;CACJ,CAAA;wCA9FY,6BAA6B;IADzC,IAAA,sBAAU,GAAE;6CAQuE,gBAAgB;GAPvF,6BAA6B,CA8FzC"}
@@ -0,0 +1,10 @@
1
+ import { VNode } from 'snabbdom';
2
+ import { IView, RenderingContext, SModelElement } from '../../../glsp-sprotty/index';
3
+ /**
4
+ * This view is used for the invisible end of the feedback edge.
5
+ * A feedback edge is shown as a visual feedback when creating edges.
6
+ */
7
+ export declare class FeedbackEdgeEndView implements IView {
8
+ render(model: Readonly<SModelElement>, context: RenderingContext): VNode;
9
+ }
10
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/view.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,KAAK,EAAS,gBAAgB,EAAE,aAAa,EAAO,MAAM,eAAe,CAAC;AAKnF;;;GAGG;AACH,qBACa,mBAAoB,YAAW,KAAK;IAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK;CAI3E"}
@@ -0,0 +1,43 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.FeedbackEdgeEndView = void 0;
10
+ /********************************************************************************
11
+ * Copyright (c) 2019-2023 EclipseSource and others.
12
+ *
13
+ * This program and the accompanying materials are made available under the
14
+ * terms of the Eclipse Public License v. 2.0 which is available at
15
+ * http://www.eclipse.org/legal/epl-2.0.
16
+ *
17
+ * This Source Code may also be made available under the following Secondary
18
+ * Licenses when the conditions for such availability set forth in the Eclipse
19
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
20
+ * with the GNU Classpath Exception which is available at
21
+ * https://www.gnu.org/software/classpath/license.html.
22
+ *
23
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
+ ********************************************************************************/
25
+ const inversify_1 = require("inversify");
26
+ const _glsp_sprotty_1 = require("../../../glsp-sprotty/index");
27
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
28
+ const JSX = { createElement: _glsp_sprotty_1.svg };
29
+ /**
30
+ * This view is used for the invisible end of the feedback edge.
31
+ * A feedback edge is shown as a visual feedback when creating edges.
32
+ */
33
+ let FeedbackEdgeEndView = exports.FeedbackEdgeEndView = class FeedbackEdgeEndView {
34
+ render(model, context) {
35
+ var _a;
36
+ const position = (_a = model.position) !== null && _a !== void 0 ? _a : _glsp_sprotty_1.Point.ORIGIN;
37
+ return JSX.createElement("g", { x: position.x, y: position.y });
38
+ }
39
+ };
40
+ exports.FeedbackEdgeEndView = FeedbackEdgeEndView = __decorate([
41
+ (0, inversify_1.injectable)()
42
+ ], FeedbackEdgeEndView);
43
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/features/tools/edge-creation/view.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAEvC,iDAAmF;AAEnF,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,mBAAG,EAAE,CAAC;AAEnC;;;GAGG;AAEI,IAAM,mBAAmB,iCAAzB,MAAM,mBAAmB;IAC5B,MAAM,CAAC,KAA8B,EAAE,OAAyB;;QAC5D,MAAM,QAAQ,GAAU,MAAC,KAAa,CAAC,QAAQ,mCAAI,qBAAK,CAAC,MAAM,CAAC;QAChE,OAAO,yBAAG,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAI,CAAC;IAC/C,CAAC;CACJ,CAAA;8BALY,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;GACA,mBAAmB,CAK/B"}
@@ -14,6 +14,6 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  import { ContainerModule } from 'inversify';
17
- declare const glspMouseToolModule: ContainerModule;
18
- export default glspMouseToolModule;
17
+ declare const edgeEditToolModule: ContainerModule;
18
+ export default edgeEditToolModule;
19
19
  //# sourceMappingURL=di.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di.config.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/edge-edit/di.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAW5C,QAAA,MAAM,kBAAkB,iBAYtB,CAAC;AAEH,eAAe,kBAAkB,CAAC"}