@eclipse-glsp/client 2.7.0-next.1 → 2.7.0-next.12

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 (164) hide show
  1. package/lib/base/action-dispatcher.d.ts.map +1 -1
  2. package/lib/base/action-dispatcher.js +9 -3
  3. package/lib/base/action-dispatcher.js.map +1 -1
  4. package/lib/base/auto-complete/auto-complete-widget.d.ts +1 -1
  5. package/lib/base/auto-complete/auto-complete-widget.js +3 -5
  6. package/lib/base/auto-complete/auto-complete-widget.js.map +1 -1
  7. package/lib/base/auto-complete/validation-decorator.d.ts +1 -1
  8. package/lib/base/auto-complete/validation-decorator.d.ts.map +1 -1
  9. package/lib/base/auto-complete/validation-decorator.js +1 -4
  10. package/lib/base/auto-complete/validation-decorator.js.map +1 -1
  11. package/lib/base/default.module.d.ts +1 -1
  12. package/lib/base/default.module.d.ts.map +1 -1
  13. package/lib/base/default.module.js +4 -2
  14. package/lib/base/default.module.js.map +1 -1
  15. package/lib/base/editor-context-service.d.ts +4 -3
  16. package/lib/base/editor-context-service.d.ts.map +1 -1
  17. package/lib/base/editor-context-service.js +11 -1
  18. package/lib/base/editor-context-service.js.map +1 -1
  19. package/lib/base/feedback/feedback-action-dispatcher.d.ts +1 -1
  20. package/lib/base/feedback/feedback-action-dispatcher.js +2 -4
  21. package/lib/base/feedback/feedback-action-dispatcher.js.map +1 -1
  22. package/lib/base/feedback/feedback-command.d.ts +1 -1
  23. package/lib/base/feedback/feedback-command.js +2 -2
  24. package/lib/base/feedback/feedback-command.js.map +1 -1
  25. package/lib/base/focus/focus-tracker.d.ts +1 -1
  26. package/lib/base/focus/focus-tracker.js +1 -1
  27. package/lib/base/model/glsp-model-source.d.ts +5 -2
  28. package/lib/base/model/glsp-model-source.d.ts.map +1 -1
  29. package/lib/base/model/glsp-model-source.js +28 -1
  30. package/lib/base/model/glsp-model-source.js.map +1 -1
  31. package/lib/base/model/model-change-service.d.ts +1 -1
  32. package/lib/base/model/model-change-service.js +1 -1
  33. package/lib/base/selection-service.d.ts +4 -3
  34. package/lib/base/selection-service.d.ts.map +1 -1
  35. package/lib/base/selection-service.js +6 -1
  36. package/lib/base/selection-service.js.map +1 -1
  37. package/lib/base/ui-extension/ui-extension.d.ts +1 -1
  38. package/lib/base/ui-extension/ui-extension.js +1 -1
  39. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.d.ts +1 -1
  40. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.js +1 -1
  41. package/lib/features/bounds/bounds-module.d.ts +1 -1
  42. package/lib/features/bounds/bounds-module.js +2 -2
  43. package/lib/features/bounds/bounds-module.js.map +1 -1
  44. package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +1 -1
  45. package/lib/features/bounds/glsp-hidden-bounds-updater.js +1 -1
  46. package/lib/features/bounds/hbox-layout.d.ts +1 -1
  47. package/lib/features/bounds/hbox-layout.js +1 -2
  48. package/lib/features/bounds/hbox-layout.js.map +1 -1
  49. package/lib/features/bounds/vbox-layout.d.ts +1 -1
  50. package/lib/features/bounds/vbox-layout.js +1 -2
  51. package/lib/features/bounds/vbox-layout.js.map +1 -1
  52. package/lib/features/change-bounds/model.d.ts +1 -1
  53. package/lib/features/change-bounds/model.d.ts.map +1 -1
  54. package/lib/features/change-bounds/model.js +1 -2
  55. package/lib/features/change-bounds/model.js.map +1 -1
  56. package/lib/features/change-bounds/point-position-updater.d.ts +1 -1
  57. package/lib/features/change-bounds/point-position-updater.js +3 -4
  58. package/lib/features/change-bounds/point-position-updater.js.map +1 -1
  59. package/lib/features/change-bounds/snap.d.ts +1 -1
  60. package/lib/features/change-bounds/snap.js +15 -0
  61. package/lib/features/change-bounds/snap.js.map +1 -1
  62. package/lib/features/command-palette/command-palette.d.ts +1 -1
  63. package/lib/features/command-palette/command-palette.js +1 -1
  64. package/lib/features/context-menu/context-menu-module.d.ts +1 -1
  65. package/lib/features/context-menu/context-menu-module.js +1 -2
  66. package/lib/features/context-menu/context-menu-module.js.map +1 -1
  67. package/lib/features/context-menu/delete-element-context-menu.d.ts +1 -1
  68. package/lib/features/context-menu/delete-element-context-menu.js +1 -1
  69. package/lib/features/copy-paste/copy-paste-context-menu.d.ts +1 -1
  70. package/lib/features/copy-paste/copy-paste-context-menu.js +2 -2
  71. package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
  72. package/lib/features/debug/debug-bounds-decorator.d.ts +1 -1
  73. package/lib/features/debug/debug-bounds-decorator.js +12 -13
  74. package/lib/features/debug/debug-bounds-decorator.js.map +1 -1
  75. package/lib/features/label-edit-ui/label-edit-ui.d.ts +4 -1
  76. package/lib/features/label-edit-ui/label-edit-ui.d.ts.map +1 -1
  77. package/lib/features/label-edit-ui/label-edit-ui.js +38 -1
  78. package/lib/features/label-edit-ui/label-edit-ui.js.map +1 -1
  79. package/lib/features/navigation/navigation-action-handler.d.ts +1 -1
  80. package/lib/features/navigation/navigation-action-handler.js +1 -1
  81. package/lib/features/routing/edge-router.d.ts +2 -1
  82. package/lib/features/routing/edge-router.d.ts.map +1 -1
  83. package/lib/features/routing/edge-router.js +2 -1
  84. package/lib/features/routing/edge-router.js.map +1 -1
  85. package/lib/features/routing/routing-module.d.ts +1 -1
  86. package/lib/features/routing/routing-module.d.ts.map +1 -1
  87. package/lib/features/routing/routing-module.js +7 -1
  88. package/lib/features/routing/routing-module.js.map +1 -1
  89. package/lib/features/routing/sticky-manhattan-anchors.d.ts +29 -0
  90. package/lib/features/routing/sticky-manhattan-anchors.d.ts.map +1 -0
  91. package/lib/features/routing/sticky-manhattan-anchors.js +62 -0
  92. package/lib/features/routing/sticky-manhattan-anchors.js.map +1 -0
  93. package/lib/features/routing/sticky-manhattan-edge-router.d.ts +107 -0
  94. package/lib/features/routing/sticky-manhattan-edge-router.d.ts.map +1 -0
  95. package/lib/features/routing/sticky-manhattan-edge-router.js +626 -0
  96. package/lib/features/routing/sticky-manhattan-edge-router.js.map +1 -0
  97. package/lib/features/select/select-module.d.ts +1 -1
  98. package/lib/features/select/select-module.js +1 -1
  99. package/lib/features/tool-palette/tool-palette.d.ts +1 -1
  100. package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
  101. package/lib/features/tool-palette/tool-palette.js +1 -3
  102. package/lib/features/tool-palette/tool-palette.js.map +1 -1
  103. package/lib/index.d.ts +5 -1
  104. package/lib/index.d.ts.map +1 -1
  105. package/lib/index.js +5 -1
  106. package/lib/index.js.map +1 -1
  107. package/lib/views/gedge-view-with-gaps-on-intersections.d.ts +39 -0
  108. package/lib/views/gedge-view-with-gaps-on-intersections.d.ts.map +1 -0
  109. package/lib/views/gedge-view-with-gaps-on-intersections.js +85 -0
  110. package/lib/views/gedge-view-with-gaps-on-intersections.js.map +1 -0
  111. package/lib/views/issue-marker-view.d.ts +1 -1
  112. package/lib/views/issue-marker-view.js +9 -10
  113. package/lib/views/issue-marker-view.js.map +1 -1
  114. package/lib/views/rounded-corner-manhattan-edge-view.d.ts +58 -0
  115. package/lib/views/rounded-corner-manhattan-edge-view.d.ts.map +1 -0
  116. package/lib/views/rounded-corner-manhattan-edge-view.js +170 -0
  117. package/lib/views/rounded-corner-manhattan-edge-view.js.map +1 -0
  118. package/package.json +4 -4
  119. package/src/base/action-dispatcher.spec.ts +2 -2
  120. package/src/base/action-dispatcher.ts +7 -4
  121. package/src/base/auto-complete/auto-complete-widget.ts +3 -3
  122. package/src/base/auto-complete/validation-decorator.ts +3 -4
  123. package/src/base/default.module.ts +6 -2
  124. package/src/base/editor-context-service.ts +17 -5
  125. package/src/base/feedback/feedback-action-dispatcher.ts +2 -2
  126. package/src/base/feedback/feedback-command.ts +2 -2
  127. package/src/base/focus/focus-tracker.ts +1 -1
  128. package/src/base/model/glsp-model-source.ts +35 -1
  129. package/src/base/model/model-change-service.ts +1 -1
  130. package/src/base/model/model-initialization-constraint.spec.ts +2 -2
  131. package/src/base/selection-service.spec.ts +3 -4
  132. package/src/base/selection-service.ts +11 -2
  133. package/src/base/ui-extension/ui-extension.ts +1 -1
  134. package/src/default-modules.spec.ts +2 -2
  135. package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.ts +1 -1
  136. package/src/features/bounds/bounds-module.ts +2 -2
  137. package/src/features/bounds/glsp-hidden-bounds-updater.ts +1 -1
  138. package/src/features/bounds/hbox-layout.spec.ts +2 -2
  139. package/src/features/bounds/hbox-layout.ts +2 -2
  140. package/src/features/bounds/vbox-layout.spec.ts +2 -2
  141. package/src/features/bounds/vbox-layout.ts +2 -2
  142. package/src/features/change-bounds/model.ts +1 -2
  143. package/src/features/change-bounds/point-position-updater.spec.ts +3 -3
  144. package/src/features/change-bounds/point-position-updater.ts +4 -4
  145. package/src/features/change-bounds/snap.ts +2 -2
  146. package/src/features/command-palette/command-palette.ts +1 -1
  147. package/src/features/context-menu/context-menu-module.ts +2 -2
  148. package/src/features/context-menu/delete-element-context-menu.ts +2 -2
  149. package/src/features/copy-paste/copy-paste-context-menu.ts +2 -2
  150. package/src/features/debug/debug-bounds-decorator.tsx +2 -2
  151. package/src/features/label-edit-ui/label-edit-ui.ts +36 -3
  152. package/src/features/layout/layout-elements-action.spec.ts +2 -2
  153. package/src/features/navigation/navigation-action-handler.ts +3 -3
  154. package/src/features/routing/edge-router.ts +2 -2
  155. package/src/features/routing/routing-module.ts +8 -1
  156. package/src/features/routing/sticky-manhattan-anchors.ts +53 -0
  157. package/src/features/routing/sticky-manhattan-edge-router.spec.ts +212 -0
  158. package/src/features/routing/sticky-manhattan-edge-router.ts +713 -0
  159. package/src/features/select/select-module.ts +1 -1
  160. package/src/features/tool-palette/tool-palette.ts +1 -3
  161. package/src/index.ts +5 -1
  162. package/src/views/gedge-view-with-gaps-on-intersections.tsx +99 -0
  163. package/src/views/issue-marker-view.tsx +2 -2
  164. package/src/views/rounded-corner-manhattan-edge-view.ts +171 -0
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2024 EclipseSource and others.
2
+ * Copyright (c) 2024-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -46,7 +46,7 @@ describe('default-modules', () => {
46
46
  it('should throw an error if the base (default) module is removed via configuration', () => {
47
47
  expect(() => initializeDiagramContainer(container, { remove: defaultModule })).to.throw(/Invalid module configuration/);
48
48
  });
49
- // eslint-disable-next-line max-len
49
+
50
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
51
  expect(() => initializeDiagramContainer(container, { remove: defaultModule, add: defaultModule })).to.throw(
52
52
  /Invalid module configuration/
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2023-2025 Business Informatics Group (TU Wien) and others.
2
+ * Copyright (c) 2023-2026 Business Informatics Group (TU Wien) and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2025 EclipseSource and others.
2
+ * Copyright (c) 2022-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -60,7 +60,7 @@ export const boundsModule = new FeatureModule(
60
60
  configureActionHandler(context, MoveElementRelativeAction.KIND, MoveElementHandler);
61
61
 
62
62
  // backwards compatibility
63
- // eslint-disable-next-line deprecation/deprecation
63
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
64
64
  bind(PositionSnapper).toSelf();
65
65
  },
66
66
  { featureId: Symbol('bounds') }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2025 EclipseSource and others.
2
+ * Copyright (c) 2022-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2023 TypeFox, STMicroelectronics and others.
2
+ * Copyright (c) 2022-2026 TypeFox, STMicroelectronics and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -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
- /* eslint-disable deprecation/deprecation */
16
+
17
17
  import { expect } from 'chai';
18
18
  import 'mocha';
19
19
  import 'reflect-metadata';
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2021-2025 EclipseSource and others.
2
+ * Copyright (c) 2021-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -204,7 +204,7 @@ export class HBoxLayouterExt extends HBoxLayouter {
204
204
  layouter: StatefulLayouter
205
205
  ): Bounds {
206
206
  const currentContainer = container;
207
- // eslint-disable-next-line no-constant-condition
207
+
208
208
  if (isBoundsAware(currentContainer)) {
209
209
  const bounds = currentContainer.bounds;
210
210
  const elementOptions = this.getElementLayoutOptions(currentContainer);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2023 TypeFox, STMicroelectronics and others.
2
+ * Copyright (c) 2022-2026 TypeFox, STMicroelectronics and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -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
- /* eslint-disable deprecation/deprecation */
16
+
17
17
  import { expect } from 'chai';
18
18
  import 'mocha';
19
19
  import 'reflect-metadata';
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2021-2025 EclipseSource and others.
2
+ * Copyright (c) 2021-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -204,7 +204,7 @@ export class VBoxLayouterExt extends VBoxLayouter {
204
204
  layouter: StatefulLayouter
205
205
  ): Bounds {
206
206
  const currentContainer = container;
207
- // eslint-disable-next-line no-constant-condition
207
+
208
208
  if (isBoundsAware(currentContainer)) {
209
209
  const bounds = currentContainer.bounds;
210
210
  const elementOptions = this.getElementLayoutOptions(currentContainer);
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2024 EclipseSource and others.
2
+ * Copyright (c) 2019-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -35,7 +35,6 @@ export function isResizable(element: GModelElement): element is ResizableModelEl
35
35
  return isBoundsAware(element) && isSelectable(element) && element instanceof GParentElement && element.hasFeature(resizeFeature);
36
36
  }
37
37
 
38
- // eslint-disable-next-line no-shadow
39
38
  export enum ResizeHandleLocation {
40
39
  TopLeft = 'top-left',
41
40
  Top = 'top',
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2022-2024 EclipseSource and others.
2
+ * Copyright (c) 2022-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,8 +13,8 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- /* eslint-disable import/no-deprecated */
17
- /* eslint-disable deprecation/deprecation */
16
+ /* eslint-disable import-x/no-deprecated */
17
+ /* eslint-disable @typescript-eslint/no-deprecated */
18
18
 
19
19
  import { GModelElement } from '@eclipse-glsp/sprotty';
20
20
  import { expect } from 'chai';
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2024 EclipseSource and others.
2
+ * Copyright (c) 2020-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,9 +13,9 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- /* eslint-disable @typescript-eslint/no-shadow */
17
- /* eslint-disable import/no-deprecated */
18
- /* eslint-disable deprecation/deprecation */
16
+
17
+ /* eslint-disable import-x/no-deprecated */
18
+ /* eslint-disable @typescript-eslint/no-deprecated */
19
19
 
20
20
  import { GModelElement, ISnapper, Point, Writable } from '@eclipse-glsp/sprotty';
21
21
  import { calculateDeltaBetweenPoints } from '../../utils/gmodel-util';
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2024 EclipseSource and others.
2
+ * Copyright (c) 2020-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -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
- /* eslint-disable @typescript-eslint/no-shadow */
16
+
17
17
  import { KeyboardModifier } from '@eclipse-glsp/sprotty';
18
18
 
19
19
  /**
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2024 EclipseSource and others.
2
+ * Copyright (c) 2024-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2024 EclipseSource and others.
2
+ * Copyright (c) 2019-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -24,7 +24,7 @@ export const contextMenuModule = new FeatureModule(
24
24
  return ctx.container.get<IContextMenuService>(TYPES.IContextMenuService);
25
25
  }
26
26
  console.warn("'TYPES.IContextMenuService' is not bound. Use no-op implementation instead");
27
- // eslint-disable-next-line @typescript-eslint/no-empty-function
27
+
28
28
  return { show: () => {} };
29
29
  });
30
30
 
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2025 EclipseSource and others.
2
+ * Copyright (c) 2019-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -21,7 +21,7 @@ import { messages } from '../../base/messages';
21
21
  @injectable()
22
22
  export class DeleteElementContextMenuItemProvider implements IContextMenuItemProvider {
23
23
  /** @deprecated No longer used. The {@link EditorContextService} is now directly injected.*/
24
- // eslint-disable-next-line deprecation/deprecation
24
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
25
25
  @inject(TYPES.IEditorContextServiceProvider) editorContextServiceProvider: EditorContextServiceProvider;
26
26
 
27
27
  @inject(EditorContextService)
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2025 EclipseSource and others.
2
+ * Copyright (c) 2020-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -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
- /* eslint-disable deprecation/deprecation */
16
+ /* eslint-disable @typescript-eslint/no-deprecated */
17
17
  import {
18
18
  Action,
19
19
  ClientMenuItem,
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2024 Axon Ivy AG and others.
2
+ * Copyright (c) 2024-2026 Axon Ivy AG and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -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
- /* eslint-disable max-len */
16
+
17
17
  /** @jsx svg */
18
18
  import { Bounds, GModelElement, IVNodePostprocessor, Point, TYPES, isDecoration, isSizeable, setClass, svg } from '@eclipse-glsp/sprotty';
19
19
  import { inject, injectable, optional } from 'inversify';
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2024 EclipseSource and others.
2
+ * Copyright (c) 2024-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -13,15 +13,32 @@
13
13
  *
14
14
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
15
  ********************************************************************************/
16
- import { EditLabelUI } from '@eclipse-glsp/sprotty';
17
- import { injectable } from 'inversify';
16
+ import { Bounds, EditLabelUI } from '@eclipse-glsp/sprotty';
17
+ import { inject, injectable } from 'inversify';
18
+ import { EditorContextService } from '../../base/editor-context-service';
18
19
  import { CSS_HIDDEN_EXTENSION_CLASS, CSS_UI_EXTENSION_CLASS } from '../../base/ui-extension/ui-extension';
19
20
 
20
21
  @injectable()
21
22
  export class GlspEditLabelUI extends EditLabelUI {
23
+ @inject(EditorContextService)
24
+ protected editorContextService: EditorContextService;
25
+
22
26
  protected override initializeContents(containerElement: HTMLElement): void {
23
27
  super.initializeContents(containerElement);
24
28
  containerElement.classList.add(CSS_UI_EXTENSION_CLASS);
29
+ this.editorContextService.onViewportChanged(() => {
30
+ window.requestAnimationFrame(() => {
31
+ if (this.isActive && this.containerElement) {
32
+ if (this.isLabelInVisibleViewport()) {
33
+ this.setPosition(this.containerElement);
34
+ this.applyFontStyling();
35
+ } else {
36
+ // Cancel editing if the label moved out of the visible viewport
37
+ this.hide();
38
+ }
39
+ }
40
+ });
41
+ });
25
42
  }
26
43
 
27
44
  protected override setContainerVisible(visible: boolean): void {
@@ -32,4 +49,20 @@ export class GlspEditLabelUI extends EditLabelUI {
32
49
  this.containerElement?.classList.add(CSS_HIDDEN_EXTENSION_CLASS);
33
50
  }
34
51
  }
52
+
53
+ protected isLabelInVisibleViewport(): boolean {
54
+ if (!this.labelElement) {
55
+ return false;
56
+ }
57
+ const canvasBounds = this.editorContextService.canvasBounds;
58
+ const scroll = { x: window.scrollX, y: window.scrollY };
59
+ const canvasScreenBounds: Bounds = {
60
+ x: canvasBounds.x - scroll.x,
61
+ y: canvasBounds.y - scroll.y,
62
+ width: canvasBounds.width,
63
+ height: canvasBounds.height
64
+ };
65
+ const labelBounds = this.labelElement.getBoundingClientRect();
66
+ return Bounds.overlap(labelBounds, canvasScreenBounds);
67
+ }
35
68
  }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2024 EclipseSource and others.
2
+ * Copyright (c) 2019-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -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
- /* eslint-disable deprecation/deprecation */
16
+
17
17
  import {
18
18
  Action,
19
19
  AnimationFrameSyncer,
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2020-2024 EclipseSource and others.
2
+ * Copyright (c) 2020-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -141,10 +141,10 @@ export class NavigationActionHandler implements IActionHandler {
141
141
  @inject(TYPES.ILogger) protected logger: ILogger;
142
142
  @inject(TYPES.IActionDispatcher) protected dispatcher: IActionDispatcher;
143
143
  /** @deprecated No longer in used. The {@link ActionHandlerRegistry} is now directly injected */
144
- // eslint-disable-next-line deprecation/deprecation
144
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
145
145
  @inject(TYPES.ActionHandlerRegistryProvider) protected actionHandlerRegistryProvider: () => Promise<ActionHandlerRegistry>;
146
146
  /** @deprecated No longer in used. The {@link EditorContextService} is now directly injected */
147
- // eslint-disable-next-line deprecation/deprecation
147
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
148
148
  @inject(TYPES.IEditorContextServiceProvider) protected editorContextService: EditorContextServiceProvider;
149
149
  @inject(ActionHandlerRegistry) protected actionHandlerRegistry: ActionHandlerRegistry;
150
150
  @inject(NavigationTargetResolver) protected resolver: NavigationTargetResolver;
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2024 EclipseSource and others.
2
+ * Copyright (c) 2024-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -114,7 +114,7 @@ export class GLSPBezierEdgeRouter extends BezierEdgeRouter {
114
114
  }
115
115
  }
116
116
 
117
- function ensureBounds(element?: GConnectableElement): boolean {
117
+ export function ensureBounds(element?: GConnectableElement): boolean {
118
118
  if (!element) {
119
119
  return false;
120
120
  }
@@ -1,5 +1,5 @@
1
1
  /********************************************************************************
2
- * Copyright (c) 2019-2024 EclipseSource and others.
2
+ * Copyright (c) 2019-2026 EclipseSource and others.
3
3
  *
4
4
  * This program and the accompanying materials are made available under the
5
5
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -32,6 +32,8 @@ import {
32
32
  configureCommand
33
33
  } from '@eclipse-glsp/sprotty';
34
34
  import { GLSPBezierEdgeRouter, GLSPManhattanEdgeRouter, GLSPPolylineEdgeRouter } from './edge-router';
35
+ import { StickyManhattanDiamondAnchor, StickyManhattanEllipticAnchor, StickyManhattanRectangularAnchor } from './sticky-manhattan-anchors';
36
+ import { GLSPStickyManhattanEdgeRouter } from './sticky-manhattan-edge-router';
35
37
 
36
38
  export const routingModule = new FeatureModule(
37
39
  (bind, unbind, isBound, rebind) => {
@@ -54,6 +56,11 @@ export const routingModule = new FeatureModule(
54
56
  bindAsService(context, TYPES.IAnchorComputer, BezierRectangleAnchor);
55
57
  bindAsService(context, TYPES.IAnchorComputer, BezierDiamondAnchor);
56
58
 
59
+ bindAsService(context, TYPES.IEdgeRouter, GLSPStickyManhattanEdgeRouter);
60
+ bindAsService(context, TYPES.IAnchorComputer, StickyManhattanEllipticAnchor);
61
+ bindAsService(context, TYPES.IAnchorComputer, StickyManhattanRectangularAnchor);
62
+ bindAsService(context, TYPES.IAnchorComputer, StickyManhattanDiamondAnchor);
63
+
57
64
  configureCommand({ bind, isBound }, AddRemoveBezierSegmentCommand);
58
65
  },
59
66
  { featureId: Symbol('routing') }
@@ -0,0 +1,53 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 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 {
17
+ DIAMOND_ANCHOR_KIND,
18
+ ELLIPTIC_ANCHOR_KIND,
19
+ ManhattanDiamondAnchor,
20
+ ManhattanEllipticAnchor,
21
+ ManhattanRectangularAnchor,
22
+ RECTANGULAR_ANCHOR_KIND
23
+ } from '@eclipse-glsp/sprotty';
24
+ import { injectable } from 'inversify';
25
+ import { GLSPStickyManhattanEdgeRouter } from './sticky-manhattan-edge-router';
26
+
27
+ // Anchor computers are keyed by `<routerKind>:<anchorKind>` in the AnchorComputerRegistry.
28
+ // The sticky router has its own routerKind, so dedicated subclasses must be registered even
29
+ // though their geometry behavior is identical to the standard Manhattan anchors.
30
+
31
+ @injectable()
32
+ export class StickyManhattanRectangularAnchor extends ManhattanRectangularAnchor {
33
+ static override readonly KIND = GLSPStickyManhattanEdgeRouter.KIND + ':' + RECTANGULAR_ANCHOR_KIND;
34
+ override get kind(): string {
35
+ return StickyManhattanRectangularAnchor.KIND;
36
+ }
37
+ }
38
+
39
+ @injectable()
40
+ export class StickyManhattanDiamondAnchor extends ManhattanDiamondAnchor {
41
+ static override readonly KIND = GLSPStickyManhattanEdgeRouter.KIND + ':' + DIAMOND_ANCHOR_KIND;
42
+ override get kind(): string {
43
+ return StickyManhattanDiamondAnchor.KIND;
44
+ }
45
+ }
46
+
47
+ @injectable()
48
+ export class StickyManhattanEllipticAnchor extends ManhattanEllipticAnchor {
49
+ static override readonly KIND = GLSPStickyManhattanEdgeRouter.KIND + ':' + ELLIPTIC_ANCHOR_KIND;
50
+ override get kind(): string {
51
+ return StickyManhattanEllipticAnchor.KIND;
52
+ }
53
+ }