@eclipse-glsp/client 2.5.0-next.428 → 2.5.0-next.433

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 (106) hide show
  1. package/lib/base/action-dispatcher.d.ts +0 -1
  2. package/lib/base/action-dispatcher.d.ts.map +1 -1
  3. package/lib/base/args-feature.js +4 -4
  4. package/lib/base/args-feature.js.map +1 -1
  5. package/lib/base/auto-complete/auto-complete-widget.d.ts.map +1 -1
  6. package/lib/base/auto-complete/auto-complete-widget.js +2 -2
  7. package/lib/base/auto-complete/auto-complete-widget.js.map +1 -1
  8. package/lib/base/feedback/css-feedback.js +5 -5
  9. package/lib/base/feedback/css-feedback.js.map +1 -1
  10. package/lib/base/feedback/feedback-command.js +2 -2
  11. package/lib/base/feedback/feedback-command.js.map +1 -1
  12. package/lib/base/messages.d.ts.map +1 -1
  13. package/lib/base/messages.js +2 -2
  14. package/lib/base/messages.js.map +1 -1
  15. package/lib/base/ranked.d.ts.map +1 -1
  16. package/lib/default-modules.d.ts.map +1 -1
  17. package/lib/default-modules.js +6 -5
  18. package/lib/default-modules.js.map +1 -1
  19. package/lib/features/accessibility/element-navigation/element-navigation-module.js +2 -2
  20. package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -1
  21. package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +2 -2
  22. package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -1
  23. package/lib/features/accessibility/focus-tracker/focus-tracker-tool.d.ts.map +1 -1
  24. package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js +2 -2
  25. package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js.map +1 -1
  26. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js +2 -2
  27. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js.map +1 -1
  28. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.d.ts.map +1 -1
  29. package/lib/features/accessibility/search/search-palette-module.js +2 -2
  30. package/lib/features/accessibility/search/search-palette-module.js.map +1 -1
  31. package/lib/features/accessibility/toast/toast-module.js +2 -2
  32. package/lib/features/accessibility/toast/toast-module.js.map +1 -1
  33. package/lib/features/accessibility/view-key-tools/view-key-tools-module.js +2 -2
  34. package/lib/features/accessibility/view-key-tools/view-key-tools-module.js.map +1 -1
  35. package/lib/features/change-bounds/model.js +5 -5
  36. package/lib/features/change-bounds/model.js.map +1 -1
  37. package/lib/features/change-bounds/movement-restrictor.js +4 -4
  38. package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
  39. package/lib/features/change-bounds/position-snapper.d.ts.map +1 -1
  40. package/lib/features/change-bounds/snap.js +2 -3
  41. package/lib/features/change-bounds/snap.js.map +1 -1
  42. package/lib/features/copy-paste/copy-paste-context-menu.js +5 -5
  43. package/lib/features/copy-paste/copy-paste-context-menu.js.map +1 -1
  44. package/lib/features/element-template/add-template-element.js +3 -3
  45. package/lib/features/element-template/add-template-element.js.map +1 -1
  46. package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts.map +1 -1
  47. package/lib/features/helper-lines/helper-line-feedback.d.ts.map +1 -1
  48. package/lib/features/helper-lines/helper-line-feedback.js +4 -4
  49. package/lib/features/helper-lines/helper-line-feedback.js.map +1 -1
  50. package/lib/features/helper-lines/model.js +4 -4
  51. package/lib/features/helper-lines/model.js.map +1 -1
  52. package/lib/features/hints/model.js +3 -3
  53. package/lib/features/hints/model.js.map +1 -1
  54. package/lib/features/reconnect/model.js +8 -8
  55. package/lib/features/reconnect/model.js.map +1 -1
  56. package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
  57. package/lib/features/tool-palette/tool-palette.js +6 -6
  58. package/lib/features/tool-palette/tool-palette.js.map +1 -1
  59. package/lib/features/tools/change-bounds/change-bounds-manager.d.ts.map +1 -1
  60. package/lib/features/tools/edge-creation/dangling-edge-feedback.js +6 -6
  61. package/lib/features/tools/edge-creation/dangling-edge-feedback.js.map +1 -1
  62. package/lib/features/tools/edge-creation/edge-creation-tool.d.ts.map +1 -1
  63. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts.map +1 -1
  64. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js +2 -2
  65. package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js.map +1 -1
  66. package/lib/features/tools/marquee-selection/marquee-behavior.d.ts +1 -1
  67. package/lib/features/tools/marquee-selection/marquee-behavior.d.ts.map +1 -1
  68. package/lib/features/tools/marquee-selection/marquee-tool-feedback.js +4 -4
  69. package/lib/features/tools/marquee-selection/marquee-tool-feedback.js.map +1 -1
  70. package/lib/features/validation/issue-marker.js +5 -5
  71. package/lib/features/validation/issue-marker.js.map +1 -1
  72. package/lib/features/zorder/bring-to-front-command.d.ts +23 -0
  73. package/lib/features/zorder/bring-to-front-command.d.ts.map +1 -0
  74. package/lib/features/zorder/bring-to-front-command.js +54 -0
  75. package/lib/features/zorder/bring-to-front-command.js.map +1 -0
  76. package/lib/features/zorder/zorder-module.d.ts +18 -0
  77. package/lib/features/zorder/zorder-module.d.ts.map +1 -0
  78. package/lib/features/zorder/zorder-module.js +26 -0
  79. package/lib/features/zorder/zorder-module.js.map +1 -0
  80. package/lib/index.d.ts +3 -0
  81. package/lib/index.d.ts.map +1 -1
  82. package/lib/index.js +3 -0
  83. package/lib/index.js.map +1 -1
  84. package/lib/utils/geometry-util.d.ts.map +1 -1
  85. package/lib/utils/gmodel-util.js +32 -32
  86. package/lib/utils/gmodel-util.js.map +1 -1
  87. package/lib/utils/html-utils.js +2 -3
  88. package/lib/utils/html-utils.js.map +1 -1
  89. package/lib/utils/layout-utils.js +8 -9
  90. package/lib/utils/layout-utils.js.map +1 -1
  91. package/lib/utils/marker.d.ts.map +1 -1
  92. package/lib/utils/marker.js +2 -2
  93. package/lib/utils/marker.js.map +1 -1
  94. package/lib/utils/viewpoint-util.js +9 -10
  95. package/lib/utils/viewpoint-util.js.map +1 -1
  96. package/lib/views/base-view-module.js +2 -2
  97. package/lib/views/base-view-module.js.map +1 -1
  98. package/lib/views/rounded-corner-view.js +2 -2
  99. package/lib/views/rounded-corner-view.js.map +1 -1
  100. package/lib/views/rounded-corner.js +2 -2
  101. package/lib/views/rounded-corner.js.map +1 -1
  102. package/package.json +3 -3
  103. package/src/default-modules.ts +2 -2
  104. package/src/features/zorder/bring-to-front-command.ts +46 -0
  105. package/src/features/zorder/zorder-module.ts +26 -0
  106. package/src/index.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/client",
3
- "version": "2.5.0-next.428+ab936c7",
3
+ "version": "2.5.0-next.433+281be34",
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.5.0-next.428+ab936c7",
49
+ "@eclipse-glsp/sprotty": "2.5.0-next.433+281be34",
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": "ab936c708ffa231e8aa57386385018c470d54b4f"
66
+ "gitHead": "281be3495934edbb3f87bda6fa51d76947cf57db"
67
67
  }
@@ -27,8 +27,7 @@ import {
27
27
  expandModule,
28
28
  fadeModule,
29
29
  modelSourceModule,
30
- resolveContainerConfiguration,
31
- zorderModule
30
+ resolveContainerConfiguration
32
31
  } from '@eclipse-glsp/sprotty';
33
32
  import { Container } from 'inversify';
34
33
  import { defaultModule } from './base/default.module';
@@ -62,6 +61,7 @@ import { nodeCreationToolModule } from './features/tools/node-creation/node-crea
62
61
  import { toolFocusLossModule } from './features/tools/tool-focus-loss-module';
63
62
  import { markerNavigatorModule, validationModule } from './features/validation/validation-modules';
64
63
  import { viewportModule } from './features/viewport/viewport-modules';
64
+ import { zorderModule } from './features/zorder/zorder-module';
65
65
 
66
66
  export const DEFAULT_MODULES = [
67
67
  defaultModule,
@@ -0,0 +1,46 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2025 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
+
17
+ import {
18
+ LayoutContainer,
19
+ LayoutRegistry,
20
+ SprottyBringToFrontCommand,
21
+ TYPES,
22
+ ZOrderElement,
23
+ isLayoutContainer
24
+ } from '@eclipse-glsp/sprotty';
25
+ import { inject, injectable } from 'inversify';
26
+
27
+ @injectable()
28
+ export class BringToFrontCommand extends SprottyBringToFrontCommand {
29
+ @inject(TYPES.LayoutRegistry) protected layoutRegistry: LayoutRegistry;
30
+
31
+ protected getLayoutContainer(zorder: ZOrderElement): LayoutContainer | undefined {
32
+ return isLayoutContainer(zorder.element.parent) ? zorder.element.parent : undefined;
33
+ }
34
+
35
+ protected shouldBringToFront(zorder: ZOrderElement): boolean {
36
+ // only re-order children if the layout supports it
37
+ const layoutContainer = this.getLayoutContainer(zorder);
38
+ return !layoutContainer || (this.layoutRegistry.get(layoutContainer.layout)?.orderAgnostic ?? true);
39
+ }
40
+
41
+ protected override bringToFront(zorder: ZOrderElement): void {
42
+ if (this.shouldBringToFront(zorder)) {
43
+ super.bringToFront(zorder);
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,26 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2025 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, configureCommand } from '@eclipse-glsp/sprotty';
17
+ import { boundsModule } from '../bounds/bounds-module';
18
+ import { BringToFrontCommand } from './bring-to-front-command';
19
+
20
+ export const zorderModule = new FeatureModule(
21
+ (bind, _unbind, isBound) => {
22
+ const context = { bind, isBound };
23
+ configureCommand(context, BringToFrontCommand);
24
+ },
25
+ { featureId: Symbol('zorder'), requires: [boundsModule] }
26
+ );
package/src/index.ts CHANGED
@@ -36,6 +36,7 @@ export * from './base/focus/focus-tracker';
36
36
  export * from './base/messages';
37
37
  export * from './base/model/diagram-loader';
38
38
  export * from './base/model/glsp-model-source';
39
+ export * from './base/model/model-change-service';
39
40
  export * from './base/model/model-initialization-constraint';
40
41
  export * from './base/model/model-registry';
41
42
  export * from './base/mouse-position-tracker';
@@ -226,6 +227,8 @@ export * from './features/viewport/viewport-key-listener';
226
227
  export * from './features/viewport/viewport-modules';
227
228
  export * from './features/viewport/viewport-tool';
228
229
  export * from './features/viewport/zoom-viewport-action';
230
+ export * from './features/zorder/bring-to-front-command';
231
+ export * from './features/zorder/zorder-module';
229
232
  export * from './model';
230
233
  export * from './re-exports';
231
234
  export * from './standalone-modules';