@eclipse-glsp/client 2.1.0-next.301 → 2.1.0-next.303

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 (433) hide show
  1. package/css/glsp-sprotty.css +1 -0
  2. package/css/helper-lines.css +33 -0
  3. package/lib/base/auto-complete/index.d.ts +21 -0
  4. package/lib/base/auto-complete/index.d.ts.map +1 -0
  5. package/lib/base/auto-complete/index.js +37 -0
  6. package/lib/base/auto-complete/index.js.map +1 -0
  7. package/lib/base/feedback/index.d.ts +20 -0
  8. package/lib/base/feedback/index.d.ts.map +1 -0
  9. package/lib/base/feedback/index.js +36 -0
  10. package/lib/base/feedback/index.js.map +1 -0
  11. package/lib/base/focus/index.d.ts +18 -0
  12. package/lib/base/focus/index.d.ts.map +1 -0
  13. package/lib/base/focus/index.js +34 -0
  14. package/lib/base/focus/index.js.map +1 -0
  15. package/lib/base/index.d.ts +32 -0
  16. package/lib/base/index.d.ts.map +1 -0
  17. package/lib/base/index.js +48 -0
  18. package/lib/base/index.js.map +1 -0
  19. package/lib/base/model/index.d.ts +20 -0
  20. package/lib/base/model/index.d.ts.map +1 -0
  21. package/lib/base/model/index.js +36 -0
  22. package/lib/base/model/index.js.map +1 -0
  23. package/lib/base/tool-manager/index.d.ts +18 -0
  24. package/lib/base/tool-manager/index.d.ts.map +1 -0
  25. package/lib/base/tool-manager/index.js +34 -0
  26. package/lib/base/tool-manager/index.js.map +1 -0
  27. package/lib/base/view/index.d.ts +19 -0
  28. package/lib/base/view/index.d.ts.map +1 -0
  29. package/lib/base/view/index.js +35 -0
  30. package/lib/base/view/index.js.map +1 -0
  31. package/lib/default-modules.js +4 -4
  32. package/lib/default-modules.js.map +1 -1
  33. package/lib/features/accessibility/edge-autocomplete/index.d.ts +20 -0
  34. package/lib/features/accessibility/edge-autocomplete/index.d.ts.map +1 -0
  35. package/lib/features/accessibility/edge-autocomplete/index.js +36 -0
  36. package/lib/features/accessibility/edge-autocomplete/index.js.map +1 -0
  37. package/lib/features/accessibility/element-navigation/index.d.ts +22 -0
  38. package/lib/features/accessibility/element-navigation/index.d.ts.map +1 -0
  39. package/lib/features/accessibility/element-navigation/index.js +38 -0
  40. package/lib/features/accessibility/element-navigation/index.js.map +1 -0
  41. package/lib/features/accessibility/focus-tracker/index.d.ts +18 -0
  42. package/lib/features/accessibility/focus-tracker/index.d.ts.map +1 -0
  43. package/lib/features/accessibility/focus-tracker/index.js +34 -0
  44. package/lib/features/accessibility/focus-tracker/index.js.map +1 -0
  45. package/lib/features/accessibility/index.d.ts +31 -0
  46. package/lib/features/accessibility/index.d.ts.map +1 -0
  47. package/lib/features/accessibility/index.js +47 -0
  48. package/lib/features/accessibility/index.js.map +1 -0
  49. package/lib/features/accessibility/key-shortcut/index.d.ts +19 -0
  50. package/lib/features/accessibility/key-shortcut/index.d.ts.map +1 -0
  51. package/lib/features/accessibility/key-shortcut/index.js +35 -0
  52. package/lib/features/accessibility/key-shortcut/index.js.map +1 -0
  53. package/lib/features/accessibility/keyboard-grid/index.d.ts +21 -0
  54. package/lib/features/accessibility/keyboard-grid/index.d.ts.map +1 -0
  55. package/lib/features/accessibility/keyboard-grid/index.js +37 -0
  56. package/lib/features/accessibility/keyboard-grid/index.js.map +1 -0
  57. package/lib/features/accessibility/keyboard-pointer/index.d.ts +22 -0
  58. package/lib/features/accessibility/keyboard-pointer/index.d.ts.map +1 -0
  59. package/lib/features/accessibility/keyboard-pointer/index.js +38 -0
  60. package/lib/features/accessibility/keyboard-pointer/index.js.map +1 -0
  61. package/lib/features/accessibility/keyboard-tool-palette/index.d.ts +18 -0
  62. package/lib/features/accessibility/keyboard-tool-palette/index.d.ts.map +1 -0
  63. package/lib/features/accessibility/keyboard-tool-palette/index.js +34 -0
  64. package/lib/features/accessibility/keyboard-tool-palette/index.js.map +1 -0
  65. package/lib/features/accessibility/move-zoom/index.d.ts +19 -0
  66. package/lib/features/accessibility/move-zoom/index.d.ts.map +1 -0
  67. package/lib/features/accessibility/move-zoom/index.js +35 -0
  68. package/lib/features/accessibility/move-zoom/index.js.map +1 -0
  69. package/lib/features/accessibility/resize-key-tool/index.d.ts +19 -0
  70. package/lib/features/accessibility/resize-key-tool/index.d.ts.map +1 -0
  71. package/lib/features/accessibility/resize-key-tool/index.js +35 -0
  72. package/lib/features/accessibility/resize-key-tool/index.js.map +1 -0
  73. package/lib/features/accessibility/search/index.d.ts +19 -0
  74. package/lib/features/accessibility/search/index.d.ts.map +1 -0
  75. package/lib/features/accessibility/search/index.js +35 -0
  76. package/lib/features/accessibility/search/index.js.map +1 -0
  77. package/lib/features/accessibility/toast/index.d.ts +19 -0
  78. package/lib/features/accessibility/toast/index.d.ts.map +1 -0
  79. package/lib/features/accessibility/toast/index.js +35 -0
  80. package/lib/features/accessibility/toast/index.js.map +1 -0
  81. package/lib/features/accessibility/view-key-tools/index.d.ts +20 -0
  82. package/lib/features/accessibility/view-key-tools/index.d.ts.map +1 -0
  83. package/lib/features/accessibility/view-key-tools/index.js +36 -0
  84. package/lib/features/accessibility/view-key-tools/index.js.map +1 -0
  85. package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +6 -3
  86. package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
  87. package/lib/features/accessibility/view-key-tools/movement-key-tool.js +12 -17
  88. package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
  89. package/lib/features/bounds/bounds-module.d.ts.map +1 -1
  90. package/lib/features/bounds/bounds-module.js +3 -1
  91. package/lib/features/bounds/bounds-module.js.map +1 -1
  92. package/lib/features/bounds/index.d.ts +24 -0
  93. package/lib/features/bounds/index.d.ts.map +1 -0
  94. package/lib/features/bounds/index.js +40 -0
  95. package/lib/features/bounds/index.js.map +1 -0
  96. package/lib/features/bounds/local-bounds.d.ts +2 -1
  97. package/lib/features/bounds/local-bounds.d.ts.map +1 -1
  98. package/lib/features/bounds/local-bounds.js +7 -0
  99. package/lib/features/bounds/local-bounds.js.map +1 -1
  100. package/lib/features/bounds/set-bounds-feedback-command.d.ts +1 -1
  101. package/lib/features/bounds/set-bounds-feedback-command.d.ts.map +1 -1
  102. package/lib/features/bounds/set-bounds-feedback-command.js +7 -7
  103. package/lib/features/bounds/set-bounds-feedback-command.js.map +1 -1
  104. package/lib/features/change-bounds/index.d.ts +21 -0
  105. package/lib/features/change-bounds/index.d.ts.map +1 -0
  106. package/lib/features/change-bounds/index.js +37 -0
  107. package/lib/features/change-bounds/index.js.map +1 -0
  108. package/lib/features/change-bounds/model.d.ts +4 -0
  109. package/lib/features/change-bounds/model.d.ts.map +1 -1
  110. package/lib/features/change-bounds/model.js +14 -2
  111. package/lib/features/change-bounds/model.js.map +1 -1
  112. package/lib/features/change-bounds/point-position-updater.d.ts +63 -0
  113. package/lib/features/change-bounds/point-position-updater.d.ts.map +1 -0
  114. package/lib/features/change-bounds/point-position-updater.js +87 -0
  115. package/lib/features/change-bounds/point-position-updater.js.map +1 -0
  116. package/lib/features/change-bounds/position-snapper.d.ts +28 -0
  117. package/lib/features/change-bounds/position-snapper.d.ts.map +1 -0
  118. package/lib/features/change-bounds/position-snapper.js +88 -0
  119. package/lib/features/change-bounds/position-snapper.js.map +1 -0
  120. package/lib/features/change-bounds/snap.d.ts +19 -42
  121. package/lib/features/change-bounds/snap.d.ts.map +1 -1
  122. package/lib/features/change-bounds/snap.js +9 -92
  123. package/lib/features/change-bounds/snap.js.map +1 -1
  124. package/lib/features/change-bounds/snap.spec.js +6 -5
  125. package/lib/features/change-bounds/snap.spec.js.map +1 -1
  126. package/lib/features/command-palette/index.d.ts +19 -0
  127. package/lib/features/command-palette/index.d.ts.map +1 -0
  128. package/lib/features/command-palette/index.js +35 -0
  129. package/lib/features/command-palette/index.js.map +1 -0
  130. package/lib/features/context-menu/index.d.ts +20 -0
  131. package/lib/features/context-menu/index.d.ts.map +1 -0
  132. package/lib/features/context-menu/index.js +36 -0
  133. package/lib/features/context-menu/index.js.map +1 -0
  134. package/lib/features/copy-paste/index.d.ts +20 -0
  135. package/lib/features/copy-paste/index.d.ts.map +1 -0
  136. package/lib/features/copy-paste/index.js +36 -0
  137. package/lib/features/copy-paste/index.js.map +1 -0
  138. package/lib/features/decoration/index.d.ts +18 -0
  139. package/lib/features/decoration/index.d.ts.map +1 -0
  140. package/lib/features/decoration/index.js +34 -0
  141. package/lib/features/decoration/index.js.map +1 -0
  142. package/lib/features/element-template/index.d.ts +20 -0
  143. package/lib/features/element-template/index.d.ts.map +1 -0
  144. package/lib/features/element-template/index.js +36 -0
  145. package/lib/features/element-template/index.js.map +1 -0
  146. package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts +6 -3
  147. package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts.map +1 -1
  148. package/lib/features/element-template/mouse-tracking-element-position-listener.js +23 -18
  149. package/lib/features/element-template/mouse-tracking-element-position-listener.js.map +1 -1
  150. package/lib/features/export/index.d.ts +19 -0
  151. package/lib/features/export/index.d.ts.map +1 -0
  152. package/lib/features/export/index.js +35 -0
  153. package/lib/features/export/index.js.map +1 -0
  154. package/lib/features/helper-lines/helper-line-feedback.d.ts +64 -0
  155. package/lib/features/helper-lines/helper-line-feedback.d.ts.map +1 -0
  156. package/lib/features/helper-lines/helper-line-feedback.js +218 -0
  157. package/lib/features/helper-lines/helper-line-feedback.js.map +1 -0
  158. package/lib/features/helper-lines/helper-line-manager-default.d.ts +46 -0
  159. package/lib/features/helper-lines/helper-line-manager-default.d.ts.map +1 -0
  160. package/lib/features/helper-lines/helper-line-manager-default.js +122 -0
  161. package/lib/features/helper-lines/helper-line-manager-default.js.map +1 -0
  162. package/lib/features/helper-lines/helper-line-manager.d.ts +21 -0
  163. package/lib/features/helper-lines/helper-line-manager.d.ts.map +1 -0
  164. package/lib/features/helper-lines/helper-line-manager.js +3 -0
  165. package/lib/features/helper-lines/helper-line-manager.js.map +1 -0
  166. package/lib/features/helper-lines/helper-line-module.d.ts +18 -0
  167. package/lib/features/helper-lines/helper-line-module.d.ts.map +1 -0
  168. package/lib/features/helper-lines/helper-line-module.js +39 -0
  169. package/lib/features/helper-lines/helper-line-module.js.map +1 -0
  170. package/lib/features/helper-lines/index.d.ts +22 -0
  171. package/lib/features/helper-lines/index.d.ts.map +1 -0
  172. package/lib/features/helper-lines/index.js +38 -0
  173. package/lib/features/helper-lines/index.js.map +1 -0
  174. package/lib/features/helper-lines/model.d.ts +62 -0
  175. package/lib/features/helper-lines/model.d.ts.map +1 -0
  176. package/lib/features/helper-lines/model.js +123 -0
  177. package/lib/features/helper-lines/model.js.map +1 -0
  178. package/lib/features/helper-lines/view.d.ts +25 -0
  179. package/lib/features/helper-lines/view.d.ts.map +1 -0
  180. package/lib/features/helper-lines/view.js +52 -0
  181. package/lib/features/helper-lines/view.js.map +1 -0
  182. package/lib/features/hints/index.d.ts +19 -0
  183. package/lib/features/hints/index.d.ts.map +1 -0
  184. package/lib/features/hints/index.js +35 -0
  185. package/lib/features/hints/index.js.map +1 -0
  186. package/lib/features/hover/index.d.ts +18 -0
  187. package/lib/features/hover/index.d.ts.map +1 -0
  188. package/lib/features/hover/index.js +34 -0
  189. package/lib/features/hover/index.js.map +1 -0
  190. package/lib/features/index.d.ts +43 -0
  191. package/lib/features/index.d.ts.map +1 -0
  192. package/lib/features/index.js +59 -0
  193. package/lib/features/index.js.map +1 -0
  194. package/lib/features/label-edit/index.d.ts +19 -0
  195. package/lib/features/label-edit/index.d.ts.map +1 -0
  196. package/lib/features/label-edit/index.js +35 -0
  197. package/lib/features/label-edit/index.js.map +1 -0
  198. package/lib/features/layout/index.d.ts +18 -0
  199. package/lib/features/layout/index.d.ts.map +1 -0
  200. package/lib/features/layout/index.js +34 -0
  201. package/lib/features/layout/index.js.map +1 -0
  202. package/lib/features/navigation/index.d.ts +19 -0
  203. package/lib/features/navigation/index.d.ts.map +1 -0
  204. package/lib/features/navigation/index.js +35 -0
  205. package/lib/features/navigation/index.js.map +1 -0
  206. package/lib/features/reconnect/index.d.ts +17 -0
  207. package/lib/features/reconnect/index.d.ts.map +1 -0
  208. package/lib/features/reconnect/index.js +33 -0
  209. package/lib/features/reconnect/index.js.map +1 -0
  210. package/lib/features/routing/index.d.ts +18 -0
  211. package/lib/features/routing/index.d.ts.map +1 -0
  212. package/lib/features/routing/index.js +34 -0
  213. package/lib/features/routing/index.js.map +1 -0
  214. package/lib/features/save/index.d.ts +18 -0
  215. package/lib/features/save/index.d.ts.map +1 -0
  216. package/lib/features/save/index.js +34 -0
  217. package/lib/features/save/index.js.map +1 -0
  218. package/lib/features/select/index.d.ts +19 -0
  219. package/lib/features/select/index.d.ts.map +1 -0
  220. package/lib/features/select/index.js +35 -0
  221. package/lib/features/select/index.js.map +1 -0
  222. package/lib/features/source-model-watcher/index.d.ts +18 -0
  223. package/lib/features/source-model-watcher/index.d.ts.map +1 -0
  224. package/lib/features/source-model-watcher/index.js +34 -0
  225. package/lib/features/source-model-watcher/index.js.map +1 -0
  226. package/lib/features/source-model-watcher/{source-model-wacher-module.d.ts → source-model-watcher-module.d.ts} +1 -1
  227. package/lib/features/source-model-watcher/source-model-watcher-module.d.ts.map +1 -0
  228. package/lib/features/source-model-watcher/{source-model-wacher-module.js → source-model-watcher-module.js} +1 -1
  229. package/lib/features/source-model-watcher/source-model-watcher-module.js.map +1 -0
  230. package/lib/features/status/index.d.ts +18 -0
  231. package/lib/features/status/index.d.ts.map +1 -0
  232. package/lib/features/status/index.js +34 -0
  233. package/lib/features/status/index.js.map +1 -0
  234. package/lib/features/svg-metadata/index.d.ts +18 -0
  235. package/lib/features/svg-metadata/index.d.ts.map +1 -0
  236. package/lib/features/svg-metadata/index.js +34 -0
  237. package/lib/features/svg-metadata/index.js.map +1 -0
  238. package/lib/features/tool-palette/index.d.ts +18 -0
  239. package/lib/features/tool-palette/index.d.ts.map +1 -0
  240. package/lib/features/tool-palette/index.js +34 -0
  241. package/lib/features/tool-palette/index.js.map +1 -0
  242. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts +28 -12
  243. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts.map +1 -1
  244. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js +91 -51
  245. package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js.map +1 -1
  246. package/lib/features/tools/change-bounds/{change-boounds-tool-module.d.ts → change-bounds-tool-module.d.ts} +1 -1
  247. package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts.map +1 -0
  248. package/lib/features/tools/change-bounds/{change-boounds-tool-module.js → change-bounds-tool-module.js} +1 -1
  249. package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -0
  250. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +4 -4
  251. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
  252. package/lib/features/tools/change-bounds/change-bounds-tool.js +11 -13
  253. package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
  254. package/lib/features/tools/change-bounds/index.d.ts +20 -0
  255. package/lib/features/tools/change-bounds/index.d.ts.map +1 -0
  256. package/lib/features/tools/change-bounds/index.js +36 -0
  257. package/lib/features/tools/change-bounds/index.js.map +1 -0
  258. package/lib/features/tools/deletion/index.d.ts +18 -0
  259. package/lib/features/tools/deletion/index.d.ts.map +1 -0
  260. package/lib/features/tools/deletion/index.js +34 -0
  261. package/lib/features/tools/deletion/index.js.map +1 -0
  262. package/lib/features/tools/edge-creation/index.d.ts +21 -0
  263. package/lib/features/tools/edge-creation/index.d.ts.map +1 -0
  264. package/lib/features/tools/edge-creation/index.js +37 -0
  265. package/lib/features/tools/edge-creation/index.js.map +1 -0
  266. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts +20 -6
  267. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts.map +1 -1
  268. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js +10 -14
  269. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js.map +1 -1
  270. package/lib/features/tools/edge-edit/edge-edit-tool.d.ts +18 -2
  271. package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -1
  272. package/lib/features/tools/edge-edit/edge-edit-tool.js +6 -6
  273. package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -1
  274. package/lib/features/tools/edge-edit/index.d.ts +19 -0
  275. package/lib/features/tools/edge-edit/index.d.ts.map +1 -0
  276. package/lib/features/tools/edge-edit/index.js +35 -0
  277. package/lib/features/tools/edge-edit/index.js.map +1 -0
  278. package/lib/features/tools/index.d.ts +24 -0
  279. package/lib/features/tools/index.d.ts.map +1 -0
  280. package/lib/features/tools/index.js +40 -0
  281. package/lib/features/tools/index.js.map +1 -0
  282. package/lib/features/tools/marquee-selection/index.d.ts +23 -0
  283. package/lib/features/tools/marquee-selection/index.d.ts.map +1 -0
  284. package/lib/features/tools/marquee-selection/index.js +39 -0
  285. package/lib/features/tools/marquee-selection/index.js.map +1 -0
  286. package/lib/features/tools/marquee-selection/marquee-tool.d.ts +20 -1
  287. package/lib/features/tools/marquee-selection/marquee-tool.d.ts.map +1 -1
  288. package/lib/features/tools/marquee-selection/marquee-tool.js +19 -7
  289. package/lib/features/tools/marquee-selection/marquee-tool.js.map +1 -1
  290. package/lib/features/tools/node-creation/index.d.ts +18 -0
  291. package/lib/features/tools/node-creation/index.d.ts.map +1 -0
  292. package/lib/features/tools/node-creation/index.js +34 -0
  293. package/lib/features/tools/node-creation/index.js.map +1 -0
  294. package/lib/features/tools/node-creation/node-creation-tool.d.ts +3 -2
  295. package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
  296. package/lib/features/tools/node-creation/node-creation-tool.js +11 -15
  297. package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
  298. package/lib/features/undo-redo/index.d.ts +18 -0
  299. package/lib/features/undo-redo/index.d.ts.map +1 -0
  300. package/lib/features/undo-redo/index.js +34 -0
  301. package/lib/features/undo-redo/index.js.map +1 -0
  302. package/lib/features/validation/index.d.ts +20 -0
  303. package/lib/features/validation/index.d.ts.map +1 -0
  304. package/lib/features/validation/index.js +36 -0
  305. package/lib/features/validation/index.js.map +1 -0
  306. package/lib/features/viewport/index.d.ts +20 -0
  307. package/lib/features/viewport/index.d.ts.map +1 -0
  308. package/lib/features/viewport/index.js +36 -0
  309. package/lib/features/viewport/index.js.map +1 -0
  310. package/lib/index.d.ts +5 -139
  311. package/lib/index.d.ts.map +1 -1
  312. package/lib/index.js +19 -157
  313. package/lib/index.js.map +1 -1
  314. package/lib/re-exports.d.ts +17 -0
  315. package/lib/re-exports.d.ts.map +1 -0
  316. package/lib/re-exports.js +33 -0
  317. package/lib/re-exports.js.map +1 -0
  318. package/lib/tsconfig.tsbuildinfo +1 -1
  319. package/lib/utils/geometry-util.d.ts +38 -0
  320. package/lib/utils/geometry-util.d.ts.map +1 -0
  321. package/lib/utils/geometry-util.js +103 -0
  322. package/lib/utils/geometry-util.js.map +1 -0
  323. package/lib/utils/gmodel-util.d.ts +3 -1
  324. package/lib/utils/gmodel-util.d.ts.map +1 -1
  325. package/lib/utils/gmodel-util.js +27 -1
  326. package/lib/utils/gmodel-util.js.map +1 -1
  327. package/lib/utils/html-utils.d.ts +1 -15
  328. package/lib/utils/html-utils.d.ts.map +1 -1
  329. package/lib/utils/html-utils.js +6 -1
  330. package/lib/utils/html-utils.js.map +1 -1
  331. package/lib/utils/index.d.ts +23 -0
  332. package/lib/utils/index.d.ts.map +1 -0
  333. package/lib/utils/index.js +39 -0
  334. package/lib/utils/index.js.map +1 -0
  335. package/lib/utils/viewpoint-util.d.ts +1 -0
  336. package/lib/utils/viewpoint-util.d.ts.map +1 -1
  337. package/lib/utils/viewpoint-util.js +8 -1
  338. package/lib/utils/viewpoint-util.js.map +1 -1
  339. package/lib/views/index.d.ts +2 -2
  340. package/lib/views/index.d.ts.map +1 -1
  341. package/lib/views/index.js +2 -2
  342. package/lib/views/index.js.map +1 -1
  343. package/package.json +3 -3
  344. package/src/base/auto-complete/index.ts +20 -0
  345. package/src/base/feedback/index.ts +19 -0
  346. package/src/base/focus/index.ts +17 -0
  347. package/src/base/index.ts +31 -0
  348. package/src/base/model/index.ts +19 -0
  349. package/src/base/tool-manager/index.ts +17 -0
  350. package/src/base/view/index.ts +18 -0
  351. package/src/default-modules.ts +2 -2
  352. package/src/features/accessibility/edge-autocomplete/index.ts +19 -0
  353. package/src/features/accessibility/element-navigation/index.ts +21 -0
  354. package/src/features/accessibility/focus-tracker/index.ts +17 -0
  355. package/src/features/accessibility/index.ts +30 -0
  356. package/src/features/accessibility/key-shortcut/index.ts +18 -0
  357. package/src/features/accessibility/keyboard-grid/index.ts +20 -0
  358. package/src/features/accessibility/keyboard-pointer/index.ts +21 -0
  359. package/src/features/accessibility/keyboard-tool-palette/index.ts +17 -0
  360. package/src/features/accessibility/move-zoom/index.ts +18 -0
  361. package/src/features/accessibility/resize-key-tool/index.ts +18 -0
  362. package/src/features/accessibility/search/index.ts +18 -0
  363. package/src/features/accessibility/toast/index.ts +18 -0
  364. package/src/features/accessibility/view-key-tools/index.ts +19 -0
  365. package/src/features/accessibility/view-key-tools/movement-key-tool.ts +15 -19
  366. package/src/features/bounds/bounds-module.ts +5 -2
  367. package/src/features/bounds/index.ts +23 -0
  368. package/src/features/bounds/local-bounds.ts +7 -1
  369. package/src/features/bounds/set-bounds-feedback-command.ts +1 -1
  370. package/src/features/change-bounds/index.ts +20 -0
  371. package/src/features/change-bounds/model.ts +18 -2
  372. package/src/features/change-bounds/point-position-updater.ts +120 -0
  373. package/src/features/change-bounds/position-snapper.ts +69 -0
  374. package/src/features/change-bounds/snap.spec.ts +3 -2
  375. package/src/features/change-bounds/snap.ts +8 -82
  376. package/src/features/command-palette/index.ts +18 -0
  377. package/src/features/context-menu/index.ts +19 -0
  378. package/src/features/copy-paste/index.ts +19 -0
  379. package/src/features/decoration/index.ts +17 -0
  380. package/src/features/element-template/index.ts +19 -0
  381. package/src/features/element-template/mouse-tracking-element-position-listener.ts +29 -22
  382. package/src/features/export/index.ts +18 -0
  383. package/src/features/helper-lines/helper-line-feedback.ts +269 -0
  384. package/src/features/helper-lines/helper-line-manager-default.ts +114 -0
  385. package/src/features/helper-lines/helper-line-manager.ts +21 -0
  386. package/src/features/helper-lines/helper-line-module.ts +47 -0
  387. package/src/features/helper-lines/index.ts +21 -0
  388. package/src/features/helper-lines/model.ts +140 -0
  389. package/src/features/helper-lines/view.tsx +60 -0
  390. package/src/features/hints/index.ts +18 -0
  391. package/src/features/hover/index.ts +17 -0
  392. package/src/features/index.ts +42 -0
  393. package/src/features/label-edit/index.ts +18 -0
  394. package/src/features/layout/index.ts +17 -0
  395. package/src/features/navigation/index.ts +18 -0
  396. package/src/features/reconnect/index.ts +16 -0
  397. package/src/features/routing/index.ts +17 -0
  398. package/src/features/save/index.ts +17 -0
  399. package/src/features/select/index.ts +18 -0
  400. package/src/features/source-model-watcher/index.ts +17 -0
  401. package/src/features/status/index.ts +17 -0
  402. package/src/features/svg-metadata/index.ts +17 -0
  403. package/src/features/tool-palette/index.ts +17 -0
  404. package/src/features/tools/change-bounds/change-bounds-tool-feedback.ts +99 -69
  405. package/src/features/tools/change-bounds/change-bounds-tool.ts +12 -11
  406. package/src/features/tools/change-bounds/index.ts +19 -0
  407. package/src/features/tools/deletion/index.ts +17 -0
  408. package/src/features/tools/edge-creation/index.ts +20 -0
  409. package/src/features/tools/edge-edit/edge-edit-tool-feedback.ts +20 -21
  410. package/src/features/tools/edge-edit/edge-edit-tool.ts +5 -6
  411. package/src/features/tools/edge-edit/index.ts +18 -0
  412. package/src/features/tools/index.ts +23 -0
  413. package/src/features/tools/marquee-selection/index.ts +22 -0
  414. package/src/features/tools/marquee-selection/marquee-tool.ts +14 -4
  415. package/src/features/tools/node-creation/index.ts +17 -0
  416. package/src/features/tools/node-creation/node-creation-tool.ts +9 -13
  417. package/src/features/undo-redo/index.ts +17 -0
  418. package/src/features/validation/index.ts +19 -0
  419. package/src/features/viewport/index.ts +19 -0
  420. package/src/index.ts +5 -147
  421. package/src/re-exports.ts +16 -0
  422. package/src/utils/geometry-util.ts +101 -0
  423. package/src/utils/gmodel-util.ts +41 -10
  424. package/src/utils/html-utils.ts +6 -0
  425. package/src/utils/index.ts +22 -0
  426. package/src/utils/viewpoint-util.ts +8 -0
  427. package/src/views/index.ts +2 -2
  428. package/lib/features/source-model-watcher/source-model-wacher-module.d.ts.map +0 -1
  429. package/lib/features/source-model-watcher/source-model-wacher-module.js.map +0 -1
  430. package/lib/features/tools/change-bounds/change-boounds-tool-module.d.ts.map +0 -1
  431. package/lib/features/tools/change-bounds/change-boounds-tool-module.js.map +0 -1
  432. /package/src/features/source-model-watcher/{source-model-wacher-module.ts → source-model-watcher-module.ts} +0 -0
  433. /package/src/features/tools/change-bounds/{change-boounds-tool-module.ts → change-bounds-tool-module.ts} +0 -0
@@ -0,0 +1,64 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { Action, Bounds, CommandExecutionContext, CommandReturn, GModelElement, GModelRoot, Viewport } from '@eclipse-glsp/sprotty';
17
+ import '../../../css/helper-lines.css';
18
+ import { FeedbackCommand } from '../../base/feedback/feedback-command';
19
+ import { BoundsAwareModelElement } from '../../utils/gmodel-util';
20
+ import { HelperLine, HelperLineType } from './model';
21
+ export type ViewportLineType = typeof HelperLineType.Center | typeof HelperLineType.Middle | string;
22
+ export declare const ALL_ELEMENT_LINE_TYPES: ("left" | "right" | "center" | "top" | "bottom" | "middle" | "left-right" | "right-left" | "bottom-top" | "top-bottom")[];
23
+ export declare const ALL_VIEWPORT_LINE_TYPES: ("center" | "middle")[];
24
+ export interface DrawHelperLinesFeedbackAction extends Action {
25
+ kind: typeof DrawHelperLinesFeedbackAction.KIND;
26
+ elementIds: string[];
27
+ elementLines?: HelperLineType[];
28
+ viewportLines?: ViewportLineType[];
29
+ alignmentEpsilon?: number;
30
+ }
31
+ export declare namespace DrawHelperLinesFeedbackAction {
32
+ const KIND = "drawHelperLines";
33
+ function create(options: Omit<DrawHelperLinesFeedbackAction, 'kind'>): DrawHelperLinesFeedbackAction;
34
+ }
35
+ export declare class DrawHelperLinesFeedbackCommand extends FeedbackCommand {
36
+ action: DrawHelperLinesFeedbackAction;
37
+ static readonly KIND = "drawHelperLines";
38
+ constructor(action: DrawHelperLinesFeedbackAction);
39
+ execute(context: CommandExecutionContext): CommandReturn;
40
+ protected isCompareElement(element: GModelElement): element is BoundsAwareModelElement;
41
+ protected calcReferenceBounds(referenceElements: BoundsAwareModelElement[]): Bounds;
42
+ protected calcHelperLines(elements: BoundsAwareModelElement[], bounds: Bounds, context: CommandExecutionContext): HelperLine[];
43
+ protected calcHelperLinesForViewport(root: Viewport & GModelRoot, bounds: Bounds, lineTypes?: HelperLineType[]): HelperLine[];
44
+ protected calcHelperLinesForElement(element: BoundsAwareModelElement, bounds: Bounds, lineTypes?: HelperLineType[]): HelperLine[];
45
+ protected calcHelperLinesForBounds(elementBounds: Bounds, bounds: Bounds, lineTypes?: HelperLineType[]): HelperLine[];
46
+ protected isAligned(coordinate: (elem: Bounds) => number, leftBounds: Bounds, rightBounds: Bounds, epsilon?: number): boolean;
47
+ protected isMatch(leftCoordinate: number, rightCoordinate: number, epsilon?: number): boolean;
48
+ }
49
+ export interface RemoveHelperLinesFeedbackAction extends Action {
50
+ kind: typeof RemoveHelperLinesFeedbackAction.KIND;
51
+ }
52
+ export declare namespace RemoveHelperLinesFeedbackAction {
53
+ const KIND = "removeHelperLines";
54
+ function create(options?: Omit<RemoveHelperLinesFeedbackAction, 'kind'>): RemoveHelperLinesFeedbackAction;
55
+ }
56
+ export declare class RemoveHelperLinesFeedbackCommand extends FeedbackCommand {
57
+ action: RemoveHelperLinesFeedbackAction;
58
+ static readonly KIND = "removeHelperLines";
59
+ constructor(action: RemoveHelperLinesFeedbackAction);
60
+ execute(context: CommandExecutionContext): CommandReturn;
61
+ }
62
+ export declare function removeHelperLines(root: GModelRoot): void;
63
+ export declare function removeSelectionBounds(root: GModelRoot): void;
64
+ //# sourceMappingURL=helper-line-feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-feedback.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,MAAM,EACN,MAAM,EACN,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,UAAU,EAEV,QAAQ,EAIX,MAAM,uBAAuB,CAAC;AAG/B,OAAO,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAoBvE,OAAO,EAAE,uBAAuB,EAAqE,MAAM,yBAAyB,CAAC;AAErI,OAAO,EAAE,UAAU,EAAE,cAAc,EAAoD,MAAM,SAAS,CAAC;AAEvG,MAAM,MAAM,gBAAgB,GAAG,OAAO,cAAc,CAAC,MAAM,GAAG,OAAO,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;AAEpG,eAAO,MAAM,sBAAsB,2HAAgC,CAAC;AACpE,eAAO,MAAM,uBAAuB,yBAAiD,CAAC;AAEtF,MAAM,WAAW,6BAA8B,SAAQ,MAAM;IACzD,IAAI,EAAE,OAAO,6BAA6B,CAAC,IAAI,CAAC;IAChD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,yBAAiB,6B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AM,EAAE,OAAO,SAAoC,GAAG,OAAO;CAG3H;AAED,MAAM,WAAW,+BAAgC,SAAQ,MAAM;IAC3D,IAAI,EAAE,OAAO,+BAA+B,CAAC,IAAI,CAAC;CACrD;AAED,yBAAiB,+BAA+B,CAAC;IACtC,MAAM,IAAI,sBAAsB,CAAC;IAExC,SAAgB,MAAM,CAAC,OAAO,GAAE,IAAI,CAAC,+BAA+B,EAAE,MAAM,CAAM,GAAG,+BAA+B,CAKnH;CACJ;AAED,qBACa,gCAAiC,SAAQ,eAAe;IAGxB,MAAM,EAAE,+BAA+B;IAFhF,MAAM,CAAC,QAAQ,CAAC,IAAI,uBAAwC;gBAEnB,MAAM,EAAE,+BAA+B;IAGvE,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;CAKpE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAExD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAE5D"}
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
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 __param = (this && this.__param) || function (paramIndex, decorator) {
27
+ return function (target, key) { decorator(target, key, paramIndex); }
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.removeSelectionBounds = exports.removeHelperLines = exports.RemoveHelperLinesFeedbackCommand = exports.RemoveHelperLinesFeedbackAction = exports.DrawHelperLinesFeedbackCommand = exports.DrawHelperLinesFeedbackAction = exports.ALL_VIEWPORT_LINE_TYPES = exports.ALL_ELEMENT_LINE_TYPES = void 0;
31
+ const sprotty_1 = require("@eclipse-glsp/sprotty");
32
+ const inversify_1 = require("inversify");
33
+ const lodash_1 = require("lodash");
34
+ require("../../../css/helper-lines.css");
35
+ const feedback_command_1 = require("../../base/feedback/feedback-command");
36
+ const geometry_util_1 = require("../../utils/geometry-util");
37
+ const gmodel_util_1 = require("../../utils/gmodel-util");
38
+ const viewpoint_util_1 = require("../../utils/viewpoint-util");
39
+ const model_1 = require("./model");
40
+ exports.ALL_ELEMENT_LINE_TYPES = Object.values(model_1.HelperLineType);
41
+ exports.ALL_VIEWPORT_LINE_TYPES = [model_1.HelperLineType.Center, model_1.HelperLineType.Middle];
42
+ var DrawHelperLinesFeedbackAction;
43
+ (function (DrawHelperLinesFeedbackAction) {
44
+ DrawHelperLinesFeedbackAction.KIND = 'drawHelperLines';
45
+ function create(options) {
46
+ return Object.assign({ kind: DrawHelperLinesFeedbackAction.KIND }, options);
47
+ }
48
+ DrawHelperLinesFeedbackAction.create = create;
49
+ })(DrawHelperLinesFeedbackAction || (exports.DrawHelperLinesFeedbackAction = DrawHelperLinesFeedbackAction = {}));
50
+ let DrawHelperLinesFeedbackCommand = class DrawHelperLinesFeedbackCommand extends feedback_command_1.FeedbackCommand {
51
+ constructor(action) {
52
+ super();
53
+ this.action = action;
54
+ }
55
+ execute(context) {
56
+ removeHelperLines(context.root);
57
+ removeSelectionBounds(context.root);
58
+ const boundsAwareElements = (0, gmodel_util_1.getMatchingElements)(context.root.index, this.isCompareElement);
59
+ const [referenceElements, elements] = (0, lodash_1.partition)(boundsAwareElements, element => this.action.elementIds.includes(element.id));
60
+ if (referenceElements.length === 0) {
61
+ return context.root;
62
+ }
63
+ const referenceBounds = this.calcReferenceBounds(referenceElements);
64
+ const helperLines = this.calcHelperLines(elements, referenceBounds, context);
65
+ if (referenceElements.length > 1) {
66
+ context.root.add(new model_1.SelectionBounds(referenceBounds));
67
+ }
68
+ helperLines.forEach(helperLine => context.root.add(helperLine));
69
+ return context.root;
70
+ }
71
+ isCompareElement(element) {
72
+ return (0, sprotty_1.isBoundsAware)(element) && (0, gmodel_util_1.findTopLevelElementByFeature)(element, sprotty_1.isBoundsAware, sprotty_1.isViewport) === element;
73
+ }
74
+ calcReferenceBounds(referenceElements) {
75
+ return referenceElements.map(element => element.bounds).reduce((combined, next) => sprotty_1.Bounds.combine(combined, next), sprotty_1.Bounds.EMPTY);
76
+ }
77
+ calcHelperLines(elements, bounds, context) {
78
+ const helperLines = [];
79
+ const viewport = (0, sprotty_1.findParentByFeature)(context.root, sprotty_1.isViewport);
80
+ if (viewport) {
81
+ helperLines.push(...this.calcHelperLinesForViewport(viewport, bounds));
82
+ }
83
+ elements.flatMap(element => this.calcHelperLinesForElement(element, bounds)).forEach(line => helperLines.push(line));
84
+ return helperLines;
85
+ }
86
+ calcHelperLinesForViewport(root, bounds, lineTypes) {
87
+ var _a;
88
+ if (lineTypes === void 0) { lineTypes = (_a = this.action.viewportLines) !== null && _a !== void 0 ? _a : exports.ALL_VIEWPORT_LINE_TYPES; }
89
+ const helperLines = [];
90
+ const viewportBounds = (0, viewpoint_util_1.getViewportBounds)(root, root.canvasBounds);
91
+ if (lineTypes.includes(model_1.HelperLineType.Center) && this.isAligned(geometry_util_1.center, viewportBounds, bounds, 2)) {
92
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topCenter)(viewportBounds), (0, geometry_util_1.bottomCenter)(viewportBounds), model_1.HelperLineType.Center));
93
+ }
94
+ if (lineTypes.includes(model_1.HelperLineType.Middle) && this.isAligned(geometry_util_1.middle, viewportBounds, bounds, 2)) {
95
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.middleLeft)(viewportBounds), (0, geometry_util_1.middleRight)(viewportBounds), model_1.HelperLineType.Middle));
96
+ }
97
+ return helperLines;
98
+ }
99
+ calcHelperLinesForElement(element, bounds, lineTypes) {
100
+ var _a;
101
+ if (lineTypes === void 0) { lineTypes = (_a = this.action.elementLines) !== null && _a !== void 0 ? _a : exports.ALL_ELEMENT_LINE_TYPES; }
102
+ return this.calcHelperLinesForBounds(element.bounds, bounds, lineTypes);
103
+ }
104
+ calcHelperLinesForBounds(elementBounds, bounds, lineTypes) {
105
+ var _a;
106
+ if (lineTypes === void 0) { lineTypes = (_a = this.action.elementLines) !== null && _a !== void 0 ? _a : exports.ALL_ELEMENT_LINE_TYPES; }
107
+ const helperLines = [];
108
+ if (lineTypes.includes(model_1.HelperLineType.Left) && this.isAligned(geometry_util_1.left, elementBounds, bounds)) {
109
+ const [above, below] = (0, geometry_util_1.sortBy)(geometry_util_1.top, elementBounds, bounds); // higher top-value ==> lower
110
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomLeft)(below), (0, geometry_util_1.topLeft)(above), model_1.HelperLineType.Left));
111
+ }
112
+ if (lineTypes.includes(model_1.HelperLineType.Center) && this.isAligned(geometry_util_1.center, elementBounds, bounds)) {
113
+ const [above, below] = (0, geometry_util_1.sortBy)(geometry_util_1.top, elementBounds, bounds); // higher top-value ==> lower
114
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topCenter)(above), (0, geometry_util_1.bottomCenter)(below), model_1.HelperLineType.Center));
115
+ }
116
+ if (lineTypes.includes(model_1.HelperLineType.Right) && this.isAligned(geometry_util_1.right, elementBounds, bounds)) {
117
+ const [above, below] = (0, geometry_util_1.sortBy)(geometry_util_1.top, elementBounds, bounds); // higher top-value ==> lower
118
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomRight)(below), (0, geometry_util_1.topRight)(above), model_1.HelperLineType.Right));
119
+ }
120
+ if (lineTypes.includes(model_1.HelperLineType.Bottom) && this.isAligned(geometry_util_1.bottom, elementBounds, bounds)) {
121
+ const [before, after] = (0, geometry_util_1.sortBy)(geometry_util_1.left, elementBounds, bounds); // higher left-value ==> more to the right
122
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomLeft)(before), (0, geometry_util_1.bottomRight)(after), model_1.HelperLineType.Bottom));
123
+ }
124
+ if (lineTypes.includes(model_1.HelperLineType.Middle) && this.isAligned(geometry_util_1.middle, elementBounds, bounds)) {
125
+ const [before, after] = (0, geometry_util_1.sortBy)(geometry_util_1.left, elementBounds, bounds); // higher left-value ==> more to the right
126
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.middleLeft)(before), (0, geometry_util_1.middleRight)(after), model_1.HelperLineType.Middle));
127
+ }
128
+ if (lineTypes.includes(model_1.HelperLineType.Top) && this.isAligned(geometry_util_1.top, elementBounds, bounds)) {
129
+ const [before, after] = (0, geometry_util_1.sortBy)(geometry_util_1.left, elementBounds, bounds); // higher left-value ==> more to the right
130
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topLeft)(before), (0, geometry_util_1.topRight)(after), model_1.HelperLineType.Top));
131
+ }
132
+ if (lineTypes.includes(model_1.HelperLineType.LeftRight) && this.isMatch((0, geometry_util_1.left)(elementBounds), (0, geometry_util_1.right)(bounds), 2)) {
133
+ if ((0, geometry_util_1.isAbove)(bounds, elementBounds)) {
134
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomLeft)(elementBounds), (0, geometry_util_1.topRight)(bounds), model_1.HelperLineType.RightLeft));
135
+ }
136
+ else {
137
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topLeft)(elementBounds), (0, geometry_util_1.bottomRight)(bounds), model_1.HelperLineType.RightLeft));
138
+ }
139
+ }
140
+ if (lineTypes.includes(model_1.HelperLineType.LeftRight) && this.isMatch((0, geometry_util_1.right)(elementBounds), (0, geometry_util_1.left)(bounds), 2)) {
141
+ if ((0, geometry_util_1.isAbove)(bounds, elementBounds)) {
142
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomRight)(elementBounds), (0, geometry_util_1.topLeft)(bounds), model_1.HelperLineType.LeftRight));
143
+ }
144
+ else {
145
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topRight)(elementBounds), (0, geometry_util_1.bottomLeft)(bounds), model_1.HelperLineType.LeftRight));
146
+ }
147
+ }
148
+ if (lineTypes.includes(model_1.HelperLineType.TopBottom) && this.isMatch((0, geometry_util_1.top)(elementBounds), (0, geometry_util_1.bottom)(bounds), 2)) {
149
+ if ((0, geometry_util_1.isBefore)(bounds, elementBounds)) {
150
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topRight)(elementBounds), (0, geometry_util_1.bottomLeft)(bounds), model_1.HelperLineType.BottomTop));
151
+ }
152
+ else {
153
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.topLeft)(elementBounds), (0, geometry_util_1.bottomRight)(bounds), model_1.HelperLineType.BottomTop));
154
+ }
155
+ }
156
+ if (lineTypes.includes(model_1.HelperLineType.TopBottom) && this.isMatch((0, geometry_util_1.bottom)(elementBounds), (0, geometry_util_1.top)(bounds), 2)) {
157
+ if ((0, geometry_util_1.isBefore)(bounds, elementBounds)) {
158
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomRight)(elementBounds), (0, geometry_util_1.topLeft)(bounds), model_1.HelperLineType.TopBottom));
159
+ }
160
+ else {
161
+ helperLines.push(new model_1.HelperLine((0, geometry_util_1.bottomLeft)(elementBounds), (0, geometry_util_1.topRight)(bounds), model_1.HelperLineType.TopBottom));
162
+ }
163
+ }
164
+ return helperLines;
165
+ }
166
+ isAligned(coordinate, leftBounds, rightBounds, epsilon) {
167
+ var _a;
168
+ if (epsilon === void 0) { epsilon = (_a = this.action.alignmentEpsilon) !== null && _a !== void 0 ? _a : 1; }
169
+ return this.isMatch(coordinate(leftBounds), coordinate(rightBounds), epsilon);
170
+ }
171
+ isMatch(leftCoordinate, rightCoordinate, epsilon) {
172
+ var _a;
173
+ if (epsilon === void 0) { epsilon = (_a = this.action.alignmentEpsilon) !== null && _a !== void 0 ? _a : 1; }
174
+ return Math.abs(leftCoordinate - rightCoordinate) < epsilon;
175
+ }
176
+ };
177
+ exports.DrawHelperLinesFeedbackCommand = DrawHelperLinesFeedbackCommand;
178
+ DrawHelperLinesFeedbackCommand.KIND = DrawHelperLinesFeedbackAction.KIND;
179
+ exports.DrawHelperLinesFeedbackCommand = DrawHelperLinesFeedbackCommand = __decorate([
180
+ (0, inversify_1.injectable)(),
181
+ __param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Action)),
182
+ __metadata("design:paramtypes", [Object])
183
+ ], DrawHelperLinesFeedbackCommand);
184
+ var RemoveHelperLinesFeedbackAction;
185
+ (function (RemoveHelperLinesFeedbackAction) {
186
+ RemoveHelperLinesFeedbackAction.KIND = 'removeHelperLines';
187
+ function create(options = {}) {
188
+ return Object.assign({ kind: RemoveHelperLinesFeedbackAction.KIND }, options);
189
+ }
190
+ RemoveHelperLinesFeedbackAction.create = create;
191
+ })(RemoveHelperLinesFeedbackAction || (exports.RemoveHelperLinesFeedbackAction = RemoveHelperLinesFeedbackAction = {}));
192
+ let RemoveHelperLinesFeedbackCommand = class RemoveHelperLinesFeedbackCommand extends feedback_command_1.FeedbackCommand {
193
+ constructor(action) {
194
+ super();
195
+ this.action = action;
196
+ }
197
+ execute(context) {
198
+ removeHelperLines(context.root);
199
+ removeSelectionBounds(context.root);
200
+ return context.root;
201
+ }
202
+ };
203
+ exports.RemoveHelperLinesFeedbackCommand = RemoveHelperLinesFeedbackCommand;
204
+ RemoveHelperLinesFeedbackCommand.KIND = RemoveHelperLinesFeedbackAction.KIND;
205
+ exports.RemoveHelperLinesFeedbackCommand = RemoveHelperLinesFeedbackCommand = __decorate([
206
+ (0, inversify_1.injectable)(),
207
+ __param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Action)),
208
+ __metadata("design:paramtypes", [Object])
209
+ ], RemoveHelperLinesFeedbackCommand);
210
+ function removeHelperLines(root) {
211
+ (0, gmodel_util_1.forEachElement)(root.index, model_1.isHelperLine, line => root.remove(line));
212
+ }
213
+ exports.removeHelperLines = removeHelperLines;
214
+ function removeSelectionBounds(root) {
215
+ (0, gmodel_util_1.forEachElement)(root.index, model_1.isSelectionBounds, line => root.remove(line));
216
+ }
217
+ exports.removeSelectionBounds = removeSelectionBounds;
218
+ //# sourceMappingURL=helper-line-feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-feedback.js","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-feedback.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;AAElF,mDAY+B;AAC/B,yCAA+C;AAC/C,mCAAmC;AACnC,yCAAuC;AACvC,2EAAuE;AACvE,6DAkBmC;AACnC,yDAAqI;AACrI,+DAA+D;AAC/D,mCAAuG;AAI1F,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,CAAC;AACvD,QAAA,uBAAuB,GAAG,CAAC,sBAAc,CAAC,MAAM,EAAE,sBAAc,CAAC,MAAM,CAAC,CAAC;AAUtF,IAAiB,6BAA6B,CAS7C;AATD,WAAiB,6BAA6B;IAC7B,kCAAI,GAAG,iBAAiB,CAAC;IAEtC,SAAgB,MAAM,CAAC,OAAoD;QACvE,uBACI,IAAI,EAAE,8BAAA,IAAI,IACP,OAAO,EACZ;IACN,CAAC;IALe,oCAAM,SAKrB,CAAA;A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II,WAAA,IAAA,kBAAM,EAAC,eAAK,CAAC,MAAM,CAAC,CAAA;;GAHxB,gCAAgC,CAW5C;AAED,SAAgB,iBAAiB,CAAC,IAAgB;IAC9C,IAAA,4BAAc,EAAC,IAAI,CAAC,KAAK,EAAE,oBAAY,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AAFD,8CAEC;AAED,SAAgB,qBAAqB,CAAC,IAAgB;IAClD,IAAA,4BAAc,EAAC,IAAI,CAAC,KAAK,EAAE,yBAAiB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,sDAEC"}
@@ -0,0 +1,46 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { Action, DisposableCollection, GModelElement, GModelRoot, IActionHandler, ISnapper, MoveAction, SetBoundsAction } from '@eclipse-glsp/sprotty';
17
+ import { IFeedbackActionDispatcher } from '../../base/feedback/feedback-action-dispatcher';
18
+ import { ISelectionListener, SelectionService } from '../../base/selection-service';
19
+ import { SetBoundsFeedbackAction } from '../bounds/set-bounds-feedback-command';
20
+ import { MoveFinishedEventAction, MoveInitializedEventAction } from '../tools/change-bounds/change-bounds-tool-feedback';
21
+ import { DrawHelperLinesFeedbackAction, ViewportLineType } from './helper-line-feedback';
22
+ import { IHelperLineManager } from './helper-line-manager';
23
+ import { Direction, HelperLineType } from './model';
24
+ export declare class HelperLineManager implements IActionHandler, ISelectionListener, IHelperLineManager {
25
+ protected feedbackDispatcher: IFeedbackActionDispatcher;
26
+ protected selectionService: SelectionService;
27
+ protected snapper?: ISnapper;
28
+ protected snapSize: {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ protected feedback: DisposableCollection;
33
+ protected elementLines?: HelperLineType[];
34
+ protected viewportLines?: ViewportLineType[];
35
+ protected alignmentEpsilon?: number;
36
+ protected init(): void;
37
+ handle(action: Action): void;
38
+ protected handleMoveInitializedAction(_action: MoveInitializedEventAction): void;
39
+ protected handleMoveFinishedAction(_action: MoveFinishedEventAction): void;
40
+ protected handleMoveAction(action: MoveAction): void;
41
+ protected createHelperLineFeedback(elementIds: string[]): DrawHelperLinesFeedbackAction;
42
+ protected handleSetBoundsAction(action: SetBoundsAction | SetBoundsFeedbackAction): void;
43
+ selectionChanged(root: Readonly<GModelRoot>, selectedElements: string[], deselectedElements?: string[] | undefined): void;
44
+ getHelperLineSnapping(target: GModelElement, isSnap: boolean, direction: Direction): number;
45
+ }
46
+ //# sourceMappingURL=helper-line-manager-default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-manager-default.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager-default.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,oBAAoB,EACpB,aAAa,EACb,UAAU,EACV,cAAc,EACd,QAAQ,EACR,UAAU,EACV,eAAe,EAElB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,uBAA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AAM,EAAE,GAAG,SAAS,GAAG,IAAI;IAIzH,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM;CAG9F"}
@@ -0,0 +1,122 @@
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.HelperLineManager = void 0;
13
+ /********************************************************************************
14
+ * Copyright (c) 2023 EclipseSource 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 sprotty_1 = require("@eclipse-glsp/sprotty");
29
+ const inversify_1 = require("inversify");
30
+ const selection_service_1 = require("../../base/selection-service");
31
+ const set_bounds_feedback_command_1 = require("../bounds/set-bounds-feedback-command");
32
+ const snap_1 = require("../change-bounds/snap");
33
+ const change_bounds_tool_feedback_1 = require("../tools/change-bounds/change-bounds-tool-feedback");
34
+ const helper_line_feedback_1 = require("./helper-line-feedback");
35
+ const model_1 = require("./model");
36
+ let HelperLineManager = class HelperLineManager {
37
+ constructor() {
38
+ this.snapSize = { x: 20, y: 20 };
39
+ this.feedback = new sprotty_1.DisposableCollection();
40
+ }
41
+ init() {
42
+ this.selectionService.onSelectionChanged(change => this.selectionChanged(change.root, change.selectedElements, change.deselectedElements));
43
+ if (this.snapper instanceof snap_1.GridSnapper) {
44
+ this.snapSize = { x: this.snapper.grid.x * 2, y: this.snapper.grid.y * 2 };
45
+ }
46
+ }
47
+ handle(action) {
48
+ if (change_bounds_tool_feedback_1.MoveInitializedEventAction.is(action)) {
49
+ this.handleMoveInitializedAction(action);
50
+ }
51
+ else if (sprotty_1.MoveAction.is(action)) {
52
+ this.handleMoveAction(action);
53
+ }
54
+ else if (change_bounds_tool_feedback_1.MoveFinishedEventAction.is(action)) {
55
+ this.handleMoveFinishedAction(action);
56
+ }
57
+ else if (sprotty_1.SetBoundsAction.is(action) || set_bounds_feedback_command_1.SetBoundsFeedbackAction.is(action)) {
58
+ this.handleSetBoundsAction(action);
59
+ }
60
+ }
61
+ handleMoveInitializedAction(_action) {
62
+ this.feedback.dispose();
63
+ const feedback = this.createHelperLineFeedback(this.selectionService.getSelectedElementIDs());
64
+ this.feedback.push(this.feedbackDispatcher.registerFeedback(this, [feedback], [helper_line_feedback_1.RemoveHelperLinesFeedbackAction.create()]));
65
+ }
66
+ handleMoveFinishedAction(_action) {
67
+ this.feedback.dispose();
68
+ }
69
+ handleMoveAction(action) {
70
+ if (!action.finished) {
71
+ const elementIds = action.moves.map(move => move.elementId);
72
+ const feedback = this.createHelperLineFeedback(elementIds);
73
+ this.feedback.push(this.feedbackDispatcher.registerFeedback(this, [feedback], [helper_line_feedback_1.RemoveHelperLinesFeedbackAction.create()]));
74
+ }
75
+ else {
76
+ this.feedback.dispose();
77
+ }
78
+ }
79
+ createHelperLineFeedback(elementIds) {
80
+ return helper_line_feedback_1.DrawHelperLinesFeedbackAction.create({
81
+ elementIds,
82
+ elementLines: this.elementLines,
83
+ viewportLines: this.viewportLines,
84
+ alignmentEpsilon: this.alignmentEpsilon
85
+ });
86
+ }
87
+ handleSetBoundsAction(action) {
88
+ const elementIds = action.bounds.map(bound => bound.elementId);
89
+ const feedback = this.createHelperLineFeedback(elementIds);
90
+ this.feedback.push(this.feedbackDispatcher.registerFeedback(this, [feedback], [helper_line_feedback_1.RemoveHelperLinesFeedbackAction.create()]));
91
+ }
92
+ selectionChanged(root, selectedElements, deselectedElements) {
93
+ this.feedback.dispose();
94
+ }
95
+ getHelperLineSnapping(target, isSnap, direction) {
96
+ return direction === model_1.Direction.Left || direction === model_1.Direction.Right ? this.snapSize.x : this.snapSize.y;
97
+ }
98
+ };
99
+ exports.HelperLineManager = HelperLineManager;
100
+ __decorate([
101
+ (0, inversify_1.inject)(sprotty_1.TYPES.IFeedbackActionDispatcher),
102
+ __metadata("design:type", Object)
103
+ ], HelperLineManager.prototype, "feedbackDispatcher", void 0);
104
+ __decorate([
105
+ (0, inversify_1.inject)(selection_service_1.SelectionService),
106
+ __metadata("design:type", selection_service_1.SelectionService)
107
+ ], HelperLineManager.prototype, "selectionService", void 0);
108
+ __decorate([
109
+ (0, inversify_1.optional)(),
110
+ (0, inversify_1.inject)(sprotty_1.TYPES.ISnapper),
111
+ __metadata("design:type", Object)
112
+ ], HelperLineManager.prototype, "snapper", void 0);
113
+ __decorate([
114
+ (0, inversify_1.postConstruct)(),
115
+ __metadata("design:type", Function),
116
+ __metadata("design:paramtypes", []),
117
+ __metadata("design:returntype", void 0)
118
+ ], HelperLineManager.prototype, "init", null);
119
+ exports.HelperLineManager = HelperLineManager = __decorate([
120
+ (0, inversify_1.injectable)()
121
+ ], HelperLineManager);
122
+ //# sourceMappingURL=helper-line-manager-default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-manager-default.js","sourceRoot":"","sources":["../../../src/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E;GACA,iBAAiB,CA4E7B"}
@@ -0,0 +1,21 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { GModelElement } from '@eclipse-glsp/sprotty';
17
+ import { Direction } from './model';
18
+ export interface IHelperLineManager {
19
+ getHelperLineSnapping(target: GModelElement, isSnap: boolean, direction: Direction): number;
20
+ }
21
+ //# sourceMappingURL=helper-line-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-manager.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,WAAW,kBAAkB;IAC/B,qBAAqB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC;CAC/F"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=helper-line-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-manager.js","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { FeatureModule } from '@eclipse-glsp/sprotty';
17
+ export declare const helperLineModule: FeatureModule;
18
+ //# sourceMappingURL=helper-line-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-module.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,aAAa,EAQhB,MAAM,uBAAuB,CAAC;AAQ/B,eAAO,MAAM,gBAAgB,eAa3B,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.helperLineModule = void 0;
19
+ const sprotty_1 = require("@eclipse-glsp/sprotty");
20
+ const set_bounds_feedback_command_1 = require("../bounds/set-bounds-feedback-command");
21
+ const change_bounds_tool_feedback_1 = require("../tools/change-bounds/change-bounds-tool-feedback");
22
+ const helper_line_feedback_1 = require("./helper-line-feedback");
23
+ const helper_line_manager_default_1 = require("./helper-line-manager-default");
24
+ const model_1 = require("./model");
25
+ const view_1 = require("./view");
26
+ exports.helperLineModule = new sprotty_1.FeatureModule((bind, unbind, isBound, rebind) => {
27
+ const context = { bind, unbind, isBound, rebind };
28
+ (0, sprotty_1.configureModelElement)(context, model_1.HELPER_LINE, model_1.HelperLine, view_1.HelperLineView);
29
+ (0, sprotty_1.configureModelElement)(context, model_1.SELECTION_BOUNDS, model_1.SelectionBounds, view_1.SelectionBoundsView);
30
+ (0, sprotty_1.configureCommand)(context, helper_line_feedback_1.DrawHelperLinesFeedbackCommand);
31
+ (0, sprotty_1.configureCommand)(context, helper_line_feedback_1.RemoveHelperLinesFeedbackCommand);
32
+ (0, sprotty_1.bindAsService)(bind, sprotty_1.TYPES.IHelperLineManager, helper_line_manager_default_1.HelperLineManager);
33
+ (0, sprotty_1.configureActionHandler)(context, sprotty_1.SetBoundsAction.KIND, sprotty_1.TYPES.IHelperLineManager);
34
+ (0, sprotty_1.configureActionHandler)(context, set_bounds_feedback_command_1.SetBoundsFeedbackAction.KIND, sprotty_1.TYPES.IHelperLineManager);
35
+ (0, sprotty_1.configureActionHandler)(context, sprotty_1.MoveAction.KIND, sprotty_1.TYPES.IHelperLineManager);
36
+ (0, sprotty_1.configureActionHandler)(context, change_bounds_tool_feedback_1.MoveInitializedEventAction.KIND, sprotty_1.TYPES.IHelperLineManager);
37
+ (0, sprotty_1.configureActionHandler)(context, change_bounds_tool_feedback_1.MoveFinishedEventAction.KIND, sprotty_1.TYPES.IHelperLineManager);
38
+ });
39
+ //# sourceMappingURL=helper-line-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper-line-module.js","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-module.ts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@@ -0,0 +1,22 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ export * from './helper-line-feedback';
17
+ export * from './helper-line-manager-default';
18
+ export * from './helper-line-manager';
19
+ export * from './helper-line-module';
20
+ export * from './model';
21
+ export * from './view';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}