@eclipse-glsp/client 2.2.0-next.351 → 2.2.0-next.353

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 (349) hide show
  1. package/css/grid.css +8 -6
  2. package/lib/base/action-dispatcher.spec.d.ts +2 -0
  3. package/lib/base/action-dispatcher.spec.d.ts.map +1 -0
  4. package/lib/base/action-dispatcher.spec.js +78 -0
  5. package/lib/base/action-dispatcher.spec.js.map +1 -0
  6. package/lib/base/auto-complete/index.d.ts +21 -0
  7. package/lib/base/auto-complete/index.d.ts.map +1 -0
  8. package/lib/base/auto-complete/index.js +37 -0
  9. package/lib/base/auto-complete/index.js.map +1 -0
  10. package/lib/base/feedback/index.d.ts +20 -0
  11. package/lib/base/feedback/index.d.ts.map +1 -0
  12. package/lib/base/feedback/index.js +36 -0
  13. package/lib/base/feedback/index.js.map +1 -0
  14. package/lib/base/focus/index.d.ts +18 -0
  15. package/lib/base/focus/index.d.ts.map +1 -0
  16. package/lib/base/focus/index.js +34 -0
  17. package/lib/base/focus/index.js.map +1 -0
  18. package/lib/base/index.d.ts +32 -0
  19. package/lib/base/index.d.ts.map +1 -0
  20. package/lib/base/index.js +48 -0
  21. package/lib/base/index.js.map +1 -0
  22. package/lib/base/model/index.d.ts +20 -0
  23. package/lib/base/model/index.d.ts.map +1 -0
  24. package/lib/base/model/index.js +36 -0
  25. package/lib/base/model/index.js.map +1 -0
  26. package/lib/base/model/model-initialization-constraint.spec.d.ts +2 -0
  27. package/lib/base/model/model-initialization-constraint.spec.d.ts.map +1 -0
  28. package/lib/base/model/model-initialization-constraint.spec.js +97 -0
  29. package/lib/base/model/model-initialization-constraint.spec.js.map +1 -0
  30. package/lib/base/selection-service.spec.d.ts +2 -0
  31. package/lib/base/selection-service.spec.d.ts.map +1 -0
  32. package/lib/base/selection-service.spec.js +283 -0
  33. package/lib/base/selection-service.spec.js.map +1 -0
  34. package/lib/base/tool-manager/index.d.ts +18 -0
  35. package/lib/base/tool-manager/index.d.ts.map +1 -0
  36. package/lib/base/tool-manager/index.js +34 -0
  37. package/lib/base/tool-manager/index.js.map +1 -0
  38. package/lib/base/view/index.d.ts +19 -0
  39. package/lib/base/view/index.d.ts.map +1 -0
  40. package/lib/base/view/index.js +35 -0
  41. package/lib/base/view/index.js.map +1 -0
  42. package/lib/features/accessibility/edge-autocomplete/index.d.ts +20 -0
  43. package/lib/features/accessibility/edge-autocomplete/index.d.ts.map +1 -0
  44. package/lib/features/accessibility/edge-autocomplete/index.js +36 -0
  45. package/lib/features/accessibility/edge-autocomplete/index.js.map +1 -0
  46. package/lib/features/accessibility/element-navigation/index.d.ts +22 -0
  47. package/lib/features/accessibility/element-navigation/index.d.ts.map +1 -0
  48. package/lib/features/accessibility/element-navigation/index.js +38 -0
  49. package/lib/features/accessibility/element-navigation/index.js.map +1 -0
  50. package/lib/features/accessibility/focus-tracker/index.d.ts +18 -0
  51. package/lib/features/accessibility/focus-tracker/index.d.ts.map +1 -0
  52. package/lib/features/accessibility/focus-tracker/index.js +34 -0
  53. package/lib/features/accessibility/focus-tracker/index.js.map +1 -0
  54. package/lib/features/accessibility/index.d.ts +31 -0
  55. package/lib/features/accessibility/index.d.ts.map +1 -0
  56. package/lib/features/accessibility/index.js +47 -0
  57. package/lib/features/accessibility/index.js.map +1 -0
  58. package/lib/features/accessibility/key-shortcut/di.config.d.ts +24 -0
  59. package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +1 -0
  60. package/lib/features/accessibility/key-shortcut/di.config.js +37 -0
  61. package/lib/features/accessibility/key-shortcut/di.config.js.map +1 -0
  62. package/lib/features/accessibility/key-shortcut/index.d.ts +19 -0
  63. package/lib/features/accessibility/key-shortcut/index.d.ts.map +1 -0
  64. package/lib/features/accessibility/key-shortcut/index.js +35 -0
  65. package/lib/features/accessibility/key-shortcut/index.js.map +1 -0
  66. package/lib/features/accessibility/keyboard-grid/index.d.ts +21 -0
  67. package/lib/features/accessibility/keyboard-grid/index.d.ts.map +1 -0
  68. package/lib/features/accessibility/keyboard-grid/index.js +37 -0
  69. package/lib/features/accessibility/keyboard-grid/index.js.map +1 -0
  70. package/lib/features/accessibility/keyboard-pointer/index.d.ts +22 -0
  71. package/lib/features/accessibility/keyboard-pointer/index.d.ts.map +1 -0
  72. package/lib/features/accessibility/keyboard-pointer/index.js +38 -0
  73. package/lib/features/accessibility/keyboard-pointer/index.js.map +1 -0
  74. package/lib/features/accessibility/keyboard-tool-palette/index.d.ts +18 -0
  75. package/lib/features/accessibility/keyboard-tool-palette/index.d.ts.map +1 -0
  76. package/lib/features/accessibility/keyboard-tool-palette/index.js +34 -0
  77. package/lib/features/accessibility/keyboard-tool-palette/index.js.map +1 -0
  78. package/lib/features/accessibility/move-zoom/index.d.ts +19 -0
  79. package/lib/features/accessibility/move-zoom/index.d.ts.map +1 -0
  80. package/lib/features/accessibility/move-zoom/index.js +35 -0
  81. package/lib/features/accessibility/move-zoom/index.js.map +1 -0
  82. package/lib/features/accessibility/resize-key-tool/index.d.ts +19 -0
  83. package/lib/features/accessibility/resize-key-tool/index.d.ts.map +1 -0
  84. package/lib/features/accessibility/resize-key-tool/index.js +35 -0
  85. package/lib/features/accessibility/resize-key-tool/index.js.map +1 -0
  86. package/lib/features/accessibility/search/index.d.ts +19 -0
  87. package/lib/features/accessibility/search/index.d.ts.map +1 -0
  88. package/lib/features/accessibility/search/index.js +35 -0
  89. package/lib/features/accessibility/search/index.js.map +1 -0
  90. package/lib/features/accessibility/toast/index.d.ts +19 -0
  91. package/lib/features/accessibility/toast/index.d.ts.map +1 -0
  92. package/lib/features/accessibility/toast/index.js +35 -0
  93. package/lib/features/accessibility/toast/index.js.map +1 -0
  94. package/lib/features/accessibility/view-key-tools/index.d.ts +20 -0
  95. package/lib/features/accessibility/view-key-tools/index.d.ts.map +1 -0
  96. package/lib/features/accessibility/view-key-tools/index.js +36 -0
  97. package/lib/features/accessibility/view-key-tools/index.js.map +1 -0
  98. package/lib/features/bounds/freeform-layout.spec.d.ts +3 -0
  99. package/lib/features/bounds/freeform-layout.spec.d.ts.map +1 -0
  100. package/lib/features/bounds/freeform-layout.spec.js +201 -0
  101. package/lib/features/bounds/freeform-layout.spec.js.map +1 -0
  102. package/lib/features/bounds/hbox-layout.spec.d.ts +3 -0
  103. package/lib/features/bounds/hbox-layout.spec.d.ts.map +1 -0
  104. package/lib/features/bounds/hbox-layout.spec.js +160 -0
  105. package/lib/features/bounds/hbox-layout.spec.js.map +1 -0
  106. package/lib/features/bounds/index.d.ts +24 -0
  107. package/lib/features/bounds/index.d.ts.map +1 -0
  108. package/lib/features/bounds/index.js +40 -0
  109. package/lib/features/bounds/index.js.map +1 -0
  110. package/lib/features/bounds/layouter-test-util.spec.d.ts +32 -0
  111. package/lib/features/bounds/layouter-test-util.spec.d.ts.map +1 -0
  112. package/lib/features/bounds/layouter-test-util.spec.js +96 -0
  113. package/lib/features/bounds/layouter-test-util.spec.js.map +1 -0
  114. package/lib/features/bounds/vbox-layout.spec.d.ts +3 -0
  115. package/lib/features/bounds/vbox-layout.spec.d.ts.map +1 -0
  116. package/lib/features/bounds/vbox-layout.spec.js +160 -0
  117. package/lib/features/bounds/vbox-layout.spec.js.map +1 -0
  118. package/lib/features/change-bounds/index.d.ts +21 -0
  119. package/lib/features/change-bounds/index.d.ts.map +1 -0
  120. package/lib/features/change-bounds/index.js +37 -0
  121. package/lib/features/change-bounds/index.js.map +1 -0
  122. package/lib/features/change-bounds/snap.spec.d.ts +17 -0
  123. package/lib/features/change-bounds/snap.spec.d.ts.map +1 -0
  124. package/lib/features/change-bounds/snap.spec.js +83 -0
  125. package/lib/features/change-bounds/snap.spec.js.map +1 -0
  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/debug/debug-bounds-decorator.d.ts +1 -0
  139. package/lib/features/debug/debug-bounds-decorator.d.ts.map +1 -1
  140. package/lib/features/debug/debug-bounds-decorator.js +26 -27
  141. package/lib/features/debug/debug-bounds-decorator.js.map +1 -1
  142. package/lib/features/decoration/index.d.ts +18 -0
  143. package/lib/features/decoration/index.d.ts.map +1 -0
  144. package/lib/features/decoration/index.js +34 -0
  145. package/lib/features/decoration/index.js.map +1 -0
  146. package/lib/features/element-template/index.d.ts +20 -0
  147. package/lib/features/element-template/index.d.ts.map +1 -0
  148. package/lib/features/element-template/index.js +36 -0
  149. package/lib/features/element-template/index.js.map +1 -0
  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 +2 -2
  155. package/lib/features/helper-lines/index.d.ts +22 -0
  156. package/lib/features/helper-lines/index.d.ts.map +1 -0
  157. package/lib/features/helper-lines/index.js +38 -0
  158. package/lib/features/helper-lines/index.js.map +1 -0
  159. package/lib/features/helper-lines/view.d.ts +1 -0
  160. package/lib/features/helper-lines/view.d.ts.map +1 -1
  161. package/lib/features/helper-lines/view.js +5 -6
  162. package/lib/features/helper-lines/view.js.map +1 -1
  163. package/lib/features/hints/index.d.ts +19 -0
  164. package/lib/features/hints/index.d.ts.map +1 -0
  165. package/lib/features/hints/index.js +35 -0
  166. package/lib/features/hints/index.js.map +1 -0
  167. package/lib/features/hints/type-hint-provider.spec.d.ts +2 -0
  168. package/lib/features/hints/type-hint-provider.spec.d.ts.map +1 -0
  169. package/lib/features/hints/type-hint-provider.spec.js +333 -0
  170. package/lib/features/hints/type-hint-provider.spec.js.map +1 -0
  171. package/lib/features/hover/index.d.ts +18 -0
  172. package/lib/features/hover/index.d.ts.map +1 -0
  173. package/lib/features/hover/index.js +34 -0
  174. package/lib/features/hover/index.js.map +1 -0
  175. package/lib/features/index.d.ts +43 -0
  176. package/lib/features/index.d.ts.map +1 -0
  177. package/lib/features/index.js +59 -0
  178. package/lib/features/index.js.map +1 -0
  179. package/lib/features/label-edit/index.d.ts +19 -0
  180. package/lib/features/label-edit/index.d.ts.map +1 -0
  181. package/lib/features/label-edit/index.js +35 -0
  182. package/lib/features/label-edit/index.js.map +1 -0
  183. package/lib/features/layout/index.d.ts +18 -0
  184. package/lib/features/layout/index.d.ts.map +1 -0
  185. package/lib/features/layout/index.js +34 -0
  186. package/lib/features/layout/index.js.map +1 -0
  187. package/lib/features/layout/layout-elements-action.spec.d.ts +3 -0
  188. package/lib/features/layout/layout-elements-action.spec.d.ts.map +1 -0
  189. package/lib/features/layout/layout-elements-action.spec.js +329 -0
  190. package/lib/features/layout/layout-elements-action.spec.js.map +1 -0
  191. package/lib/features/navigation/index.d.ts +19 -0
  192. package/lib/features/navigation/index.d.ts.map +1 -0
  193. package/lib/features/navigation/index.js +35 -0
  194. package/lib/features/navigation/index.js.map +1 -0
  195. package/lib/features/navigation/navigation-target-resolver.spec.d.ts +3 -0
  196. package/lib/features/navigation/navigation-target-resolver.spec.d.ts.map +1 -0
  197. package/lib/features/navigation/navigation-target-resolver.spec.js +53 -0
  198. package/lib/features/navigation/navigation-target-resolver.spec.js.map +1 -0
  199. package/lib/features/reconnect/index.d.ts +17 -0
  200. package/lib/features/reconnect/index.d.ts.map +1 -0
  201. package/lib/features/reconnect/index.js +33 -0
  202. package/lib/features/reconnect/index.js.map +1 -0
  203. package/lib/features/routing/glsp-manhattan-edge-router.d.ts +20 -0
  204. package/lib/features/routing/glsp-manhattan-edge-router.d.ts.map +1 -0
  205. package/lib/features/routing/glsp-manhattan-edge-router.js +68 -0
  206. package/lib/features/routing/glsp-manhattan-edge-router.js.map +1 -0
  207. package/lib/features/routing/index.d.ts +18 -0
  208. package/lib/features/routing/index.d.ts.map +1 -0
  209. package/lib/features/routing/index.js +34 -0
  210. package/lib/features/routing/index.js.map +1 -0
  211. package/lib/features/save/index.d.ts +18 -0
  212. package/lib/features/save/index.d.ts.map +1 -0
  213. package/lib/features/save/index.js +34 -0
  214. package/lib/features/save/index.js.map +1 -0
  215. package/lib/features/select/index.d.ts +19 -0
  216. package/lib/features/select/index.d.ts.map +1 -0
  217. package/lib/features/select/index.js +35 -0
  218. package/lib/features/select/index.js.map +1 -0
  219. package/lib/features/source-model-watcher/index.d.ts +18 -0
  220. package/lib/features/source-model-watcher/index.d.ts.map +1 -0
  221. package/lib/features/source-model-watcher/index.js +34 -0
  222. package/lib/features/source-model-watcher/index.js.map +1 -0
  223. package/lib/features/status/index.d.ts +18 -0
  224. package/lib/features/status/index.d.ts.map +1 -0
  225. package/lib/features/status/index.js +34 -0
  226. package/lib/features/status/index.js.map +1 -0
  227. package/lib/features/svg-metadata/index.d.ts +18 -0
  228. package/lib/features/svg-metadata/index.d.ts.map +1 -0
  229. package/lib/features/svg-metadata/index.js +34 -0
  230. package/lib/features/svg-metadata/index.js.map +1 -0
  231. package/lib/features/tool-palette/index.d.ts +18 -0
  232. package/lib/features/tool-palette/index.d.ts.map +1 -0
  233. package/lib/features/tool-palette/index.js +34 -0
  234. package/lib/features/tool-palette/index.js.map +1 -0
  235. package/lib/features/tools/change-bounds/index.d.ts +20 -0
  236. package/lib/features/tools/change-bounds/index.d.ts.map +1 -0
  237. package/lib/features/tools/change-bounds/index.js +36 -0
  238. package/lib/features/tools/change-bounds/index.js.map +1 -0
  239. package/lib/features/tools/change-bounds/view.d.ts +1 -0
  240. package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
  241. package/lib/features/tools/change-bounds/view.js +3 -4
  242. package/lib/features/tools/change-bounds/view.js.map +1 -1
  243. package/lib/features/tools/deletion/index.d.ts +18 -0
  244. package/lib/features/tools/deletion/index.d.ts.map +1 -0
  245. package/lib/features/tools/deletion/index.js +34 -0
  246. package/lib/features/tools/deletion/index.js.map +1 -0
  247. package/lib/features/tools/edge-creation/index.d.ts +21 -0
  248. package/lib/features/tools/edge-creation/index.d.ts.map +1 -0
  249. package/lib/features/tools/edge-creation/index.js +37 -0
  250. package/lib/features/tools/edge-creation/index.js.map +1 -0
  251. package/lib/features/tools/edge-creation/view.d.ts +17 -1
  252. package/lib/features/tools/edge-creation/view.d.ts.map +1 -1
  253. package/lib/features/tools/edge-creation/view.js +3 -4
  254. package/lib/features/tools/edge-creation/view.js.map +1 -1
  255. package/lib/features/tools/edge-edit/index.d.ts +19 -0
  256. package/lib/features/tools/edge-edit/index.d.ts.map +1 -0
  257. package/lib/features/tools/edge-edit/index.js +35 -0
  258. package/lib/features/tools/edge-edit/index.js.map +1 -0
  259. package/lib/features/tools/index.d.ts +24 -0
  260. package/lib/features/tools/index.d.ts.map +1 -0
  261. package/lib/features/tools/index.js +40 -0
  262. package/lib/features/tools/index.js.map +1 -0
  263. package/lib/features/tools/marquee-selection/index.d.ts +23 -0
  264. package/lib/features/tools/marquee-selection/index.d.ts.map +1 -0
  265. package/lib/features/tools/marquee-selection/index.js +39 -0
  266. package/lib/features/tools/marquee-selection/index.js.map +1 -0
  267. package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts +17 -0
  268. package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts.map +1 -0
  269. package/lib/features/tools/marquee-selection/marquee-behavior.spec.js +165 -0
  270. package/lib/features/tools/marquee-selection/marquee-behavior.spec.js.map +1 -0
  271. package/lib/features/tools/marquee-selection/view.d.ts +17 -1
  272. package/lib/features/tools/marquee-selection/view.d.ts.map +1 -1
  273. package/lib/features/tools/marquee-selection/view.js +4 -5
  274. package/lib/features/tools/marquee-selection/view.js.map +1 -1
  275. package/lib/features/tools/node-creation/index.d.ts +18 -0
  276. package/lib/features/tools/node-creation/index.d.ts.map +1 -0
  277. package/lib/features/tools/node-creation/index.js +34 -0
  278. package/lib/features/tools/node-creation/index.js.map +1 -0
  279. package/lib/features/tools/node-creation/node-creation-views.d.ts +1 -0
  280. package/lib/features/tools/node-creation/node-creation-views.d.ts.map +1 -1
  281. package/lib/features/tools/node-creation/node-creation-views.js +15 -16
  282. package/lib/features/tools/node-creation/node-creation-views.js.map +1 -1
  283. package/lib/features/undo-redo/index.d.ts +18 -0
  284. package/lib/features/undo-redo/index.d.ts.map +1 -0
  285. package/lib/features/undo-redo/index.js +34 -0
  286. package/lib/features/undo-redo/index.js.map +1 -0
  287. package/lib/features/validation/index.d.ts +20 -0
  288. package/lib/features/validation/index.d.ts.map +1 -0
  289. package/lib/features/validation/index.js +36 -0
  290. package/lib/features/validation/index.js.map +1 -0
  291. package/lib/features/validation/marker-navigator.spec.d.ts +3 -0
  292. package/lib/features/validation/marker-navigator.spec.d.ts.map +1 -0
  293. package/lib/features/validation/marker-navigator.spec.js +166 -0
  294. package/lib/features/validation/marker-navigator.spec.js.map +1 -0
  295. package/lib/features/viewport/index.d.ts +20 -0
  296. package/lib/features/viewport/index.d.ts.map +1 -0
  297. package/lib/features/viewport/index.js +36 -0
  298. package/lib/features/viewport/index.js.map +1 -0
  299. package/lib/tsconfig.tsbuildinfo +1 -0
  300. package/lib/utils/gmodel-util.spec.d.ts +2 -0
  301. package/lib/utils/gmodel-util.spec.d.ts.map +1 -0
  302. package/lib/utils/gmodel-util.spec.js +186 -0
  303. package/lib/utils/gmodel-util.spec.js.map +1 -0
  304. package/lib/utils/index.d.ts +23 -0
  305. package/lib/utils/index.d.ts.map +1 -0
  306. package/lib/utils/index.js +39 -0
  307. package/lib/utils/index.js.map +1 -0
  308. package/lib/views/compartments.d.ts +17 -1
  309. package/lib/views/compartments.d.ts.map +1 -1
  310. package/lib/views/compartments.js +4 -5
  311. package/lib/views/compartments.js.map +1 -1
  312. package/lib/views/gedge-view.d.ts +1 -0
  313. package/lib/views/gedge-view.d.ts.map +1 -1
  314. package/lib/views/gedge-view.js +4 -5
  315. package/lib/views/gedge-view.js.map +1 -1
  316. package/lib/views/ggraph-view.d.ts +0 -1
  317. package/lib/views/ggraph-view.d.ts.map +1 -1
  318. package/lib/views/ggraph-view.js +2 -12
  319. package/lib/views/ggraph-view.js.map +1 -1
  320. package/lib/views/glsp-projection-view.d.ts +1 -1
  321. package/lib/views/glsp-projection-view.d.ts.map +1 -1
  322. package/lib/views/glsp-projection-view.js +26 -73
  323. package/lib/views/glsp-projection-view.js.map +1 -1
  324. package/lib/views/index.d.ts +23 -0
  325. package/lib/views/index.d.ts.map +1 -0
  326. package/lib/views/index.js +39 -0
  327. package/lib/views/index.js.map +1 -0
  328. package/lib/views/issue-marker-view.d.ts +1 -0
  329. package/lib/views/issue-marker-view.d.ts.map +1 -1
  330. package/lib/views/issue-marker-view.js +6 -7
  331. package/lib/views/issue-marker-view.js.map +1 -1
  332. package/lib/views/rounded-corner-view.d.ts +17 -1
  333. package/lib/views/rounded-corner-view.d.ts.map +1 -1
  334. package/lib/views/rounded-corner-view.js +7 -8
  335. package/lib/views/rounded-corner-view.js.map +1 -1
  336. package/package.json +3 -3
  337. package/src/default-modules.spec.ts +56 -0
  338. package/src/features/debug/debug-bounds-decorator.tsx +1 -4
  339. package/src/features/helper-lines/view.tsx +1 -3
  340. package/src/features/tools/change-bounds/view.tsx +1 -3
  341. package/src/features/tools/edge-creation/view.tsx +2 -4
  342. package/src/features/tools/marquee-selection/view.tsx +2 -4
  343. package/src/features/tools/node-creation/node-creation-views.tsx +1 -4
  344. package/src/views/compartments.tsx +2 -4
  345. package/src/views/gedge-view.tsx +2 -4
  346. package/src/views/ggraph-view.tsx +2 -12
  347. package/src/views/glsp-projection-view.tsx +13 -76
  348. package/src/views/issue-marker-view.tsx +1 -3
  349. package/src/views/rounded-corner-view.tsx +2 -4
@@ -1,5 +1,21 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2021-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
+ /** @jsx svg */
17
+ import { GNode, GShapeElement, Hoverable, RectangularNodeView, RenderingContext, Selectable } from '@eclipse-glsp/sprotty';
1
18
  import { Classes, VNode } from 'snabbdom';
2
- import { Hoverable, RectangularNodeView, RenderingContext, GNode, GShapeElement, Selectable } from '@eclipse-glsp/sprotty';
3
19
  import { RoundedCornerWrapper } from './rounded-corner';
4
20
  export declare class RoundedCornerNodeView extends RectangularNodeView {
5
21
  render(node: Readonly<GNode & Hoverable & Selectable>, context: RenderingContext): VNode | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"rounded-corner-view.d.ts","sourceRoot":"","sources":["../../src/views/rounded-corner-view.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAS,aAAa,EAAE,UAAU,EAAO,MAAM,uBAAuB,CAAC;AAEvI,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAKxD,qBACa,qBAAsB,SAAQ,mBAAmB;IACjD,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS;IAoB7G,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,aAA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AG,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS;IAInI,SAAS,CAAC,iBAAiB,IAAI,MAAM,GAAG,SAAS;IAIjD,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK;IAanG,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO;IAIzH,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;CA0BnH;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,GAAG,MAAM,CAE3F"}
@@ -22,12 +22,11 @@ exports.toClipPathId = exports.RoundedCornerNodeView = void 0;
22
22
  *
23
23
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
24
24
  ********************************************************************************/
25
- const inversify_1 = require("inversify");
25
+ /** @jsx svg */
26
26
  const sprotty_1 = require("@eclipse-glsp/sprotty");
27
+ const inversify_1 = require("inversify");
27
28
  const argument_utils_1 = require("../utils/argument-utils");
28
29
  const rounded_corner_1 = require("./rounded-corner");
29
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
30
- const JSX = { createElement: sprotty_1.svg };
31
30
  let RoundedCornerNodeView = class RoundedCornerNodeView extends sprotty_1.RectangularNodeView {
32
31
  render(node, context) {
33
32
  const cornerRadius = argument_utils_1.CornerRadius.from(node);
@@ -35,10 +34,10 @@ let RoundedCornerNodeView = class RoundedCornerNodeView extends sprotty_1.Rectan
35
34
  return this.renderWithoutRadius(node, context);
36
35
  }
37
36
  const wrapper = new rounded_corner_1.RoundedCornerWrapper(node, cornerRadius);
38
- return (JSX.createElement("g", { "class-node": true },
39
- JSX.createElement("defs", null,
40
- JSX.createElement("clipPath", { id: toClipPathId(node) },
41
- JSX.createElement("path", { d: this.renderPath(wrapper, context, this.getClipPathInsets() || 0) }))),
37
+ return ((0, sprotty_1.svg)("g", { "class-node": true },
38
+ (0, sprotty_1.svg)("defs", null,
39
+ (0, sprotty_1.svg)("clipPath", { id: toClipPathId(node) },
40
+ (0, sprotty_1.svg)("path", { d: this.renderPath(wrapper, context, this.getClipPathInsets() || 0) }))),
42
41
  this.renderPathNode(wrapper, context),
43
42
  context.renderChildren(node)));
44
43
  }
@@ -49,7 +48,7 @@ let RoundedCornerNodeView = class RoundedCornerNodeView extends sprotty_1.Rectan
49
48
  return 2;
50
49
  }
51
50
  renderPathNode(wrapper, context) {
52
- return (JSX.createElement("path", Object.assign({ d: this.renderPath(wrapper, context, 0), "class-sprotty-node": wrapper.element instanceof sprotty_1.GNode, "class-sprotty-port": wrapper.element instanceof sprotty_1.GPort, "class-mouseover": wrapper.element.hoverFeedback, "class-selected": wrapper.element.selected }, this.additionalClasses(wrapper.element, context))));
51
+ return ((0, sprotty_1.svg)("path", Object.assign({ d: this.renderPath(wrapper, context, 0), "class-sprotty-node": wrapper.element instanceof sprotty_1.GNode, "class-sprotty-port": wrapper.element instanceof sprotty_1.GPort, "class-mouseover": wrapper.element.hoverFeedback, "class-selected": wrapper.element.selected }, this.additionalClasses(wrapper.element, context))));
53
52
  }
54
53
  additionalClasses(_node, _context) {
55
54
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"rounded-corner-view.js","sourceRoot":"","sources":["../../src/views/rounded-corner-view.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AAEvC,mDAAuI;AACvI,4DAAuD;AACvD,qDAAwD;AAExD,6DAA6D;AAC7D,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,aAAG,EAAE,CAAC;AAG5B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AAE;YACH,IAAI,CAAC;QACT,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAA;AAxEY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAwEjC;AAED,SAAgB,YAAY,CAAC,IAAsD;IAC/E,OAAO,GAAG,IAAI,CAAC,EAAE,YAAY,CAAC;AAClC,CAAC;AAFD,oCAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/client",
3
- "version": "2.2.0-next.351+53d421e",
3
+ "version": "2.2.0-next.353+1e0d319",
4
4
  "description": "A sprotty-based client for GLSP",
5
5
  "keywords": [
6
6
  "eclipse",
@@ -46,7 +46,7 @@
46
46
  "watch": "tsc -w"
47
47
  },
48
48
  "dependencies": {
49
- "@eclipse-glsp/sprotty": "2.2.0-next.351+53d421e",
49
+ "@eclipse-glsp/sprotty": "2.2.0-next.353+1e0d319",
50
50
  "autocompleter": "^9.1.2",
51
51
  "file-saver": "^2.0.5",
52
52
  "lodash": "4.17.21",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "53d421e065b6824cac7d284c5f2ea4a32bbccf3a"
66
+ "gitHead": "1e0d319b59d35f8b66a3a487a677d6e94b8a48b0"
67
67
  }
@@ -0,0 +1,56 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2024 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
+ import { expect } from 'chai';
18
+ import { Container } from 'inversify';
19
+ import * as sinon from 'sinon';
20
+ import { defaultModule } from './base/default.module';
21
+ import { DEFAULT_MODULES, initializeDiagramContainer } from './default-modules';
22
+
23
+ describe('default-modules', () => {
24
+ // InitializeDiagramContainer internally uses `resolveContainerConfiguration` so we only test functionality
25
+ // that is not covered by the tests of `resolveContainerConfiguration`.
26
+ describe('initializeDiagramContainer', () => {
27
+ const sandbox = sinon.createSandbox();
28
+ const container = new Container();
29
+ const loadSpy = sandbox.spy(container, 'load');
30
+ container.snapshot();
31
+
32
+ beforeEach(() => {
33
+ sandbox.reset();
34
+ container.restore();
35
+ container.snapshot();
36
+ });
37
+ it('should initialize the diagram container with the default modules in addition to the given config and load them first', () => {
38
+ const extraModule = new FeatureModule(() => {});
39
+ initializeDiagramContainer(container, { add: extraModule });
40
+ expect(loadSpy.calledOnce).to.be.true;
41
+ const callArgs = loadSpy.firstCall.args;
42
+ const lastModule = callArgs.pop();
43
+ expect(callArgs).to.be.deep.equal(DEFAULT_MODULES).ordered;
44
+ expect(lastModule).to.be.equal(extraModule);
45
+ });
46
+ it('should throw an error if the base (default) module is removed via configuration', () => {
47
+ expect(() => initializeDiagramContainer(container, { remove: defaultModule })).to.throw(/Invalid module configuration/);
48
+ });
49
+ // eslint-disable-next-line max-len
50
+ it('should throw an error if the base (default) module is not the first module of the resolved configured (removed and added again)', () => {
51
+ expect(() => initializeDiagramContainer(container, { remove: defaultModule, add: defaultModule })).to.throw(
52
+ /Invalid module configuration/
53
+ );
54
+ });
55
+ });
56
+ });
@@ -14,7 +14,7 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  /* eslint-disable max-len */
17
-
17
+ /** @jsx svg */
18
18
  import { Bounds, GModelElement, IVNodePostprocessor, Point, isDecoration, isSizeable, setClass, svg } from '@eclipse-glsp/sprotty';
19
19
  import { inject, injectable, optional } from 'inversify';
20
20
  import { VNode } from 'snabbdom';
@@ -22,9 +22,6 @@ import { GGraph } from '../../model';
22
22
  import { BoundsAwareModelElement } from '../../utils/gmodel-util';
23
23
  import { DebugManager } from './debug-manager';
24
24
 
25
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
- const JSX = { createElement: svg };
27
-
28
25
  export const CSS_DEBUG_BOUNDS = 'debug-bounds';
29
26
 
30
27
  @injectable()
@@ -13,14 +13,12 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
16
17
  import { IViewArgs, RenderingContext, ShapeView, svg } from '@eclipse-glsp/sprotty';
17
18
  import { injectable } from 'inversify';
18
19
  import { VNode } from 'snabbdom';
19
20
  import { HelperLine, SelectionBounds } from './model';
20
21
 
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
- const JSX = { createElement: svg };
23
-
24
22
  @injectable()
25
23
  export class HelperLineView extends ShapeView {
26
24
  override render(model: HelperLine, _context: RenderingContext): VNode | undefined {
@@ -13,14 +13,12 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
16
17
  import { IView, Point, RenderingContext, setAttr, svg } from '@eclipse-glsp/sprotty';
17
18
  import { injectable } from 'inversify';
18
19
  import { VNode } from 'snabbdom';
19
20
  import { GResizeHandle } from '../../change-bounds/model';
20
21
 
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
- const JSX = { createElement: svg };
23
-
24
22
  @injectable()
25
23
  export class GResizeHandleView implements IView {
26
24
  render(handle: GResizeHandle, context: RenderingContext): VNode | undefined {
@@ -13,12 +13,10 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
17
+ import { GModelElement, IView, Point, RenderingContext, svg } from '@eclipse-glsp/sprotty';
16
18
  import { injectable } from 'inversify';
17
19
  import { VNode } from 'snabbdom';
18
- import { IView, Point, RenderingContext, GModelElement, svg } from '@eclipse-glsp/sprotty';
19
-
20
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
21
- const JSX = { createElement: svg };
22
20
 
23
21
  /**
24
22
  * This view is used for the invisible end of the feedback edge.
@@ -13,14 +13,12 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
17
+ import { RectangularNodeView, RenderingContext, svg } from '@eclipse-glsp/sprotty';
16
18
  import { injectable } from 'inversify';
17
19
  import { VNode } from 'snabbdom';
18
- import { RectangularNodeView, RenderingContext, svg } from '@eclipse-glsp/sprotty';
19
20
  import { MarqueeNode } from './model';
20
21
 
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
- const JSX = { createElement: svg };
23
-
24
22
  @injectable()
25
23
  export class MarqueeView extends RectangularNodeView {
26
24
  override render(node: MarqueeNode, context: RenderingContext): VNode {
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
-
16
+ /** @jsx svg */
17
17
  import { IView, RenderingContext, TYPES, setClass, svg } from '@eclipse-glsp/sprotty';
18
18
  import { inject, injectable, optional } from 'inversify';
19
19
  import { VNode } from 'snabbdom';
@@ -21,9 +21,6 @@ import { GArgument } from '../../../utils/argument-utils';
21
21
  import { Grid } from '../../grid/grid';
22
22
  import { ARG_LENGTH, InsertIndicator } from './insert-indicator';
23
23
 
24
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
25
- const JSX = { createElement: svg };
26
-
27
24
  @injectable()
28
25
  export class InsertIndicatorView implements IView {
29
26
  @optional() @inject(TYPES.Grid) protected grid?: Grid;
@@ -13,12 +13,10 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
17
+ import { GCompartment, RenderingContext, ShapeView, svg } from '@eclipse-glsp/sprotty';
16
18
  import { injectable } from 'inversify';
17
19
  import { VNode } from 'snabbdom';
18
- import { GCompartment, RenderingContext, ShapeView, svg } from '@eclipse-glsp/sprotty';
19
-
20
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
21
- const JSX = { createElement: svg };
22
20
 
23
21
  @injectable()
24
22
  export class StructureCompartmentView extends ShapeView {
@@ -13,14 +13,12 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
16
17
  import { Point, PolylineEdgeView, RenderingContext, svg } from '@eclipse-glsp/sprotty';
17
18
  import { injectable } from 'inversify';
18
19
  import { Classes, VNode } from 'snabbdom';
19
- import { EdgePadding } from '../utils/argument-utils';
20
20
  import { GEdge } from '../model';
21
-
22
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
- const JSX = { createElement: svg };
21
+ import { EdgePadding } from '../utils/argument-utils';
24
22
 
25
23
  @injectable()
26
24
  export class GEdgeView extends PolylineEdgeView {
@@ -32,7 +32,7 @@ export class GGraphView extends SGraphView {
32
32
  }
33
33
 
34
34
  protected getGridStyle(viewport: Readonly<SGraphImpl>, context: RenderingContext): GridStyle {
35
- if (context.targetKind === 'hidden' || !this.gridManager?.isGridVisible) {
35
+ if (context.targetKind === 'hidden' || !this.gridManager) {
36
36
  return {};
37
37
  }
38
38
  const bounds = this.getBackgroundBounds(viewport, context, this.gridManager);
@@ -41,11 +41,7 @@ export class GGraphView extends SGraphView {
41
41
  [GridProperty.GRID_BACKGROUND_Y]: bounds.y + 'px',
42
42
  [GridProperty.GRID_BACKGROUND_WIDTH]: bounds.width + 'px',
43
43
  [GridProperty.GRID_BACKGROUND_HEIGHT]: bounds.height + 'px',
44
- [GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + '',
45
- [GridProperty.GRID_BACKGROUND_IMAGE]: this.getBackgroundImage(viewport, context, this.gridManager),
46
- backgroundPosition: `${bounds.x}px ${bounds.y}px`,
47
- backgroundSize: `${bounds.width}px ${bounds.height}px`
48
- // we do not set the background-image directly in the style object, because we want to toggle it on and off via CSS
44
+ [GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + ''
49
45
  };
50
46
  }
51
47
 
@@ -54,10 +50,4 @@ export class GGraphView extends SGraphView {
54
50
  const size = Dimension.fromPoint(Point.multiplyScalar(gridManager.grid, viewport.zoom));
55
51
  return { ...position, ...size };
56
52
  }
57
-
58
- protected getBackgroundImage(viewport: Readonly<SGraphImpl>, context: RenderingContext, gridManager: GridManager): string {
59
- const color = getComputedStyle(document.documentElement).getPropertyValue(GridProperty.GRID_COLOR).trim().replace(/#/g, '%23');
60
- // eslint-disable-next-line max-len
61
- return `url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${gridManager.grid.x} ${gridManager.grid.y}"><rect width="${gridManager.grid.x}" height="${gridManager.grid.y}" x="0" y="0" fill="none" stroke="${color}" stroke-width="1" /></svg>')`;
62
- }
63
53
  }
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
-
16
+ /** @jsx html */
17
17
  import {
18
18
  Bounds,
19
19
  Dimension,
@@ -36,9 +36,6 @@ import { VNode, VNodeStyle, h } from 'snabbdom';
36
36
  import { GridManager, GridStyle } from '../features/grid/grid-manager';
37
37
  import { GridProperty } from '../features/grid/grid-style';
38
38
 
39
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
40
- const JSX = { createElement: html };
41
-
42
39
  /**
43
40
  * Special viewport root view that renders horizontal and vertical projection bars for quick navigation.
44
41
  */
@@ -73,7 +70,7 @@ export class GLSPProjectionView extends ProjectedViewportView {
73
70
  }
74
71
 
75
72
  protected getGridStyle(viewport: Readonly<SGraphImpl>, context: RenderingContext): GridStyle {
76
- if (context.targetKind === 'hidden' || !this.gridManager?.isGridVisible) {
73
+ if (context.targetKind === 'hidden' || !this.gridManager) {
77
74
  return {};
78
75
  }
79
76
  const bounds = this.getBackgroundBounds(viewport, context, this.gridManager);
@@ -82,11 +79,7 @@ export class GLSPProjectionView extends ProjectedViewportView {
82
79
  [GridProperty.GRID_BACKGROUND_Y]: bounds.y + 'px',
83
80
  [GridProperty.GRID_BACKGROUND_WIDTH]: bounds.width + 'px',
84
81
  [GridProperty.GRID_BACKGROUND_HEIGHT]: bounds.height + 'px',
85
- [GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + '',
86
- [GridProperty.GRID_BACKGROUND_IMAGE]: this.getBackgroundImage(viewport, context, this.gridManager),
87
- backgroundPosition: `${bounds.x}px ${bounds.y}px`,
88
- backgroundSize: `${bounds.width}px ${bounds.height}px`
89
- // we do not set the background-image directly in the style object, because we want to toggle it on and off via CSS
82
+ [GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + ''
90
83
  };
91
84
  }
92
85
 
@@ -96,35 +89,15 @@ export class GLSPProjectionView extends ProjectedViewportView {
96
89
  return { ...position, ...size };
97
90
  }
98
91
 
99
- protected getBackgroundImage(viewport: Readonly<SGraphImpl>, context: RenderingContext, gridManager: GridManager): string {
100
- const color = getComputedStyle(document.documentElement).getPropertyValue(GridProperty.GRID_COLOR).trim().replace(/#/g, '%23');
101
- // eslint-disable-next-line max-len
102
- return `url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${gridManager.grid.x} ${gridManager.grid.y}"><rect width="${gridManager.grid.x}" height="${gridManager.grid.y}" x="0" y="0" fill="none" stroke="${color}" stroke-width="1" /></svg>')`;
103
- }
104
-
105
92
  protected override renderProjectionBar(
106
93
  projections: ViewProjection[],
107
94
  model: Readonly<GViewportRootElement>,
108
95
  modelBounds: Bounds,
109
96
  orientation: 'horizontal' | 'vertical'
110
97
  ): VNode {
111
- const params: ProjectionParams = { modelBounds, orientation } as ProjectionParams;
112
- // NOTE: Here we assume that the projection bars have the same size as the diagram canvas,
113
- // i.e. they are drawn as overlay above the canvas.
114
- params.factor =
115
- orientation === 'horizontal' ? model.canvasBounds.width / modelBounds.width : model.canvasBounds.height / modelBounds.height;
116
- params.zoomedFactor = params.factor / model.zoom;
117
- return (
118
- <div
119
- class-sprotty-projection-bar={true}
120
- class-horizontal={orientation === 'horizontal'}
121
- class-vertical={orientation === 'vertical'}
122
- class-bordered-projection-bar={true}
123
- >
124
- {this.renderViewport(model, params)}
125
- {projections.map(p => this.renderProjection(p, model, params))}
126
- </div>
127
- );
98
+ const vnode = super.renderProjectionBar(projections, model, modelBounds, orientation);
99
+ setClass(vnode, 'bordered-projection-bar', true);
100
+ return vnode;
128
101
  }
129
102
 
130
103
  protected override renderViewport(model: Readonly<GViewportRootElement>, params: ProjectionParams): VNode {
@@ -170,50 +143,14 @@ export class GLSPProjectionView extends ProjectedViewportView {
170
143
  model: Readonly<GViewportRootElement>,
171
144
  params: ProjectionParams
172
145
  ): VNode {
173
- let canvasSize;
174
- let projPos;
175
- let projSize: number;
176
- if (params.orientation === 'horizontal') {
177
- canvasSize = model.canvasBounds.width;
178
- projPos = (projection.projectedBounds.x - params.modelBounds.x) * params.factor;
179
- projSize = projection.projectedBounds.width * params.factor;
146
+ const vnode = super.renderProjection(projection, model, params);
147
+ setClass(vnode, 'glsp-projection', true);
148
+ const style = vnode.data!.style!;
149
+ if (style.left) {
150
+ style.height = '60%';
180
151
  } else {
181
- canvasSize = model.canvasBounds.height;
182
- projPos = (projection.projectedBounds.y - params.modelBounds.y) * params.factor;
183
- projSize = projection.projectedBounds.height * params.factor;
152
+ style.width = '60%';
184
153
  }
185
- if (projPos < 0) {
186
- projSize += projPos;
187
- projPos = 0;
188
- } else if (projPos > canvasSize) {
189
- projPos = canvasSize;
190
- }
191
- if (projSize < 0) {
192
- projSize = 0;
193
- } else if (projPos + projSize > canvasSize) {
194
- projSize = canvasSize - projPos;
195
- }
196
- const style: VNodeStyle =
197
- params.orientation === 'horizontal'
198
- ? {
199
- left: `${projPos}px`,
200
- width: `${projSize}px`,
201
- height: '60%'
202
- }
203
- : {
204
- top: `${projPos}px`,
205
- height: `${projSize}px`,
206
- width: '60%'
207
- };
208
- const result = (
209
- <div
210
- id={`${params.orientation}-projection:${projection.elementId}`}
211
- class-sprotty-projection={true}
212
- class-glsp-projection={true}
213
- style={style}
214
- />
215
- );
216
- projection.cssClasses.forEach(cl => setClass(result, cl, true));
217
- return result;
154
+ return vnode;
218
155
  }
219
156
  }
@@ -14,14 +14,12 @@
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
16
  /* eslint-disable max-len */
17
+ /** @jsx svg */
17
18
  import { GIssueSeverity, IssueMarkerView, RenderingContext, setClass, svg } from '@eclipse-glsp/sprotty';
18
19
  import { injectable } from 'inversify';
19
20
  import { VNode } from 'snabbdom';
20
21
  import { GIssueMarker } from '../features/validation/issue-marker';
21
22
 
22
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
- const JSX = { createElement: svg };
24
-
25
23
  @injectable()
26
24
  export class GIssueMarkerView extends IssueMarkerView {
27
25
  override render(marker: GIssueMarker, _context: RenderingContext): VNode {
@@ -13,15 +13,13 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
+ /** @jsx svg */
17
+ import { GNode, GPort, GShapeElement, Hoverable, RectangularNodeView, RenderingContext, Selectable, svg } from '@eclipse-glsp/sprotty';
16
18
  import { injectable } from 'inversify';
17
19
  import { Classes, VNode } from 'snabbdom';
18
- import { Hoverable, RectangularNodeView, RenderingContext, GNode, GPort, GShapeElement, Selectable, svg } from '@eclipse-glsp/sprotty';
19
20
  import { CornerRadius } from '../utils/argument-utils';
20
21
  import { RoundedCornerWrapper } from './rounded-corner';
21
22
 
22
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
- const JSX = { createElement: svg };
24
-
25
23
  @injectable()
26
24
  export class RoundedCornerNodeView extends RectangularNodeView {
27
25
  override render(node: Readonly<GNode & Hoverable & Selectable>, context: RenderingContext): VNode | undefined {