@eclipse-glsp/client 2.1.0-next.294 → 2.1.0-next.296

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 (110) hide show
  1. package/css/ghost-element.css +25 -0
  2. package/css/glsp-sprotty.css +5 -0
  3. package/lib/base/args-feature.d.ts +2 -1
  4. package/lib/base/args-feature.d.ts.map +1 -1
  5. package/lib/base/args-feature.js +12 -2
  6. package/lib/base/args-feature.js.map +1 -1
  7. package/lib/base/feedback/css-feedback.d.ts +17 -0
  8. package/lib/base/feedback/css-feedback.d.ts.map +1 -1
  9. package/lib/base/feedback/css-feedback.js +4 -2
  10. package/lib/base/feedback/css-feedback.js.map +1 -1
  11. package/lib/default-modules.d.ts +1 -1
  12. package/lib/default-modules.d.ts.map +1 -1
  13. package/lib/default-modules.js +2 -0
  14. package/lib/default-modules.js.map +1 -1
  15. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.d.ts.map +1 -1
  16. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js +4 -2
  17. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js.map +1 -1
  18. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.d.ts +16 -1
  19. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.d.ts.map +1 -1
  20. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.js +9 -10
  21. package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.js.map +1 -1
  22. package/lib/features/bounds/bounds-module.d.ts.map +1 -1
  23. package/lib/features/bounds/bounds-module.js +4 -0
  24. package/lib/features/bounds/bounds-module.js.map +1 -1
  25. package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts +2 -2
  26. package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -1
  27. package/lib/features/bounds/glsp-hidden-bounds-updater.js +7 -3
  28. package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -1
  29. package/lib/features/bounds/local-bounds.d.ts +34 -0
  30. package/lib/features/bounds/local-bounds.d.ts.map +1 -0
  31. package/lib/features/bounds/local-bounds.js +99 -0
  32. package/lib/features/bounds/local-bounds.js.map +1 -0
  33. package/lib/features/bounds/set-bounds-feedback-command.d.ts +33 -0
  34. package/lib/features/bounds/set-bounds-feedback-command.d.ts.map +1 -0
  35. package/lib/features/bounds/set-bounds-feedback-command.js +74 -0
  36. package/lib/features/bounds/set-bounds-feedback-command.js.map +1 -0
  37. package/lib/features/change-bounds/model.d.ts +1 -1
  38. package/lib/features/change-bounds/model.d.ts.map +1 -1
  39. package/lib/features/change-bounds/model.js +0 -1
  40. package/lib/features/change-bounds/model.js.map +1 -1
  41. package/lib/features/decoration/decoration-placer.d.ts +16 -1
  42. package/lib/features/decoration/decoration-placer.d.ts.map +1 -1
  43. package/lib/features/decoration/decoration-placer.js +3 -3
  44. package/lib/features/decoration/decoration-placer.js.map +1 -1
  45. package/lib/features/element-template/add-template-element.d.ts +39 -0
  46. package/lib/features/element-template/add-template-element.d.ts.map +1 -0
  47. package/lib/features/element-template/add-template-element.js +107 -0
  48. package/lib/features/element-template/add-template-element.js.map +1 -0
  49. package/lib/features/element-template/element-template-module.d.ts +18 -0
  50. package/lib/features/element-template/element-template-module.d.ts.map +1 -0
  51. package/lib/features/element-template/element-template-module.js +27 -0
  52. package/lib/features/element-template/element-template-module.js.map +1 -0
  53. package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts +38 -0
  54. package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts.map +1 -0
  55. package/lib/features/element-template/mouse-tracking-element-position-listener.js +102 -0
  56. package/lib/features/element-template/mouse-tracking-element-position-listener.js.map +1 -0
  57. package/lib/features/element-template/remove-template-element.d.ts +32 -0
  58. package/lib/features/element-template/remove-template-element.d.ts.map +1 -0
  59. package/lib/features/element-template/remove-template-element.js +66 -0
  60. package/lib/features/element-template/remove-template-element.js.map +1 -0
  61. package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
  62. package/lib/features/tool-palette/tool-palette-module.js +2 -0
  63. package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
  64. package/lib/features/tool-palette/tool-palette.d.ts +22 -4
  65. package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
  66. package/lib/features/tool-palette/tool-palette.js +35 -11
  67. package/lib/features/tool-palette/tool-palette.js.map +1 -1
  68. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +1 -1
  69. package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
  70. package/lib/features/tools/change-bounds/change-bounds-tool.js +6 -5
  71. package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
  72. package/lib/features/tools/change-bounds/view.d.ts +16 -1
  73. package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
  74. package/lib/features/tools/change-bounds/view.js +1 -1
  75. package/lib/features/tools/change-bounds/view.js.map +1 -1
  76. package/lib/features/tools/node-creation/node-creation-module.d.ts.map +1 -1
  77. package/lib/features/tools/node-creation/node-creation-module.js +2 -1
  78. package/lib/features/tools/node-creation/node-creation-module.js.map +1 -1
  79. package/lib/features/tools/node-creation/node-creation-tool.d.ts +24 -3
  80. package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
  81. package/lib/features/tools/node-creation/node-creation-tool.js +41 -11
  82. package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
  83. package/lib/index.d.ts +4 -0
  84. package/lib/index.d.ts.map +1 -1
  85. package/lib/index.js +4 -0
  86. package/lib/index.js.map +1 -1
  87. package/lib/tsconfig.tsbuildinfo +1 -1
  88. package/package.json +3 -3
  89. package/src/base/args-feature.ts +12 -2
  90. package/src/base/feedback/css-feedback.ts +4 -1
  91. package/src/default-modules.ts +2 -0
  92. package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.ts +13 -3
  93. package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.ts +15 -16
  94. package/src/features/bounds/bounds-module.ts +6 -0
  95. package/src/features/bounds/glsp-hidden-bounds-updater.ts +11 -7
  96. package/src/features/bounds/local-bounds.ts +91 -0
  97. package/src/features/bounds/set-bounds-feedback-command.ts +70 -0
  98. package/src/features/change-bounds/model.ts +2 -3
  99. package/src/features/decoration/decoration-placer.ts +3 -3
  100. package/src/features/element-template/add-template-element.ts +109 -0
  101. package/src/features/element-template/element-template-module.ts +24 -0
  102. package/src/features/element-template/mouse-tracking-element-position-listener.ts +110 -0
  103. package/src/features/element-template/remove-template-element.ts +56 -0
  104. package/src/features/tool-palette/tool-palette-module.ts +3 -1
  105. package/src/features/tool-palette/tool-palette.ts +42 -14
  106. package/src/features/tools/change-bounds/change-bounds-tool.ts +12 -10
  107. package/src/features/tools/change-bounds/view.tsx +1 -1
  108. package/src/features/tools/node-creation/node-creation-module.ts +9 -5
  109. package/src/features/tools/node-creation/node-creation-tool.ts +51 -13
  110. package/src/index.ts +4 -0
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.LocalComputedBoundsCommand = exports.LocalComputedBoundsAction = exports.LocalRequestBoundsAction = void 0;
16
+ /********************************************************************************
17
+ * Copyright (c) 2023 EclipseSource and others.
18
+ *
19
+ * This program and the accompanying materials are made available under the
20
+ * terms of the Eclipse Public License v. 2.0 which is available at
21
+ * http://www.eclipse.org/legal/epl-2.0.
22
+ *
23
+ * This Source Code may also be made available under the following Secondary
24
+ * Licenses when the conditions for such availability set forth in the Eclipse
25
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
26
+ * with the GNU Classpath Exception which is available at
27
+ * https://www.gnu.org/software/classpath/license.html.
28
+ *
29
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
30
+ ********************************************************************************/
31
+ const sprotty_1 = require("@eclipse-glsp/sprotty");
32
+ const inversify_1 = require("inversify");
33
+ const glsp_model_source_1 = require("../../base/model/glsp-model-source");
34
+ var LocalRequestBoundsAction;
35
+ (function (LocalRequestBoundsAction) {
36
+ function is(object) {
37
+ return sprotty_1.RequestBoundsAction.is(object) && !glsp_model_source_1.ServerAction.is(object);
38
+ }
39
+ LocalRequestBoundsAction.is = is;
40
+ function fromCommand(context, actionDispatcher, cause) {
41
+ // do not modify the main model (modelChanged = false) but request local bounds calculation on hidden model
42
+ actionDispatcher.dispatch(sprotty_1.RequestBoundsAction.create(context.root));
43
+ return {
44
+ model: context.root,
45
+ modelChanged: false,
46
+ cause
47
+ };
48
+ }
49
+ LocalRequestBoundsAction.fromCommand = fromCommand;
50
+ })(LocalRequestBoundsAction || (exports.LocalRequestBoundsAction = LocalRequestBoundsAction = {}));
51
+ var LocalComputedBoundsAction;
52
+ (function (LocalComputedBoundsAction) {
53
+ function is(object) {
54
+ return sprotty_1.ComputedBoundsAction.is(object) && glsp_model_source_1.ServerAction.is(object);
55
+ }
56
+ LocalComputedBoundsAction.is = is;
57
+ function mark(action) {
58
+ // mimic: we mark the computed bounds action as coming from the server so it is not sent to the server and handled locally
59
+ glsp_model_source_1.ServerAction.mark(action);
60
+ return action;
61
+ }
62
+ LocalComputedBoundsAction.mark = mark;
63
+ })(LocalComputedBoundsAction || (exports.LocalComputedBoundsAction = LocalComputedBoundsAction = {}));
64
+ let LocalComputedBoundsCommand = class LocalComputedBoundsCommand extends sprotty_1.Command {
65
+ constructor(action) {
66
+ super();
67
+ this.action = action;
68
+ }
69
+ execute(context) {
70
+ if (LocalComputedBoundsAction.is(this.action)) {
71
+ // apply computed bounds from the hidden model and return updated model to render new main model
72
+ this.computedBoundsApplicator.apply(context.root, this.action);
73
+ return context.root;
74
+ }
75
+ // computed bounds action from server -> we do not care and do not trigger any update of the main model
76
+ return {
77
+ model: context.root,
78
+ modelChanged: false
79
+ };
80
+ }
81
+ undo(context) {
82
+ return context.root;
83
+ }
84
+ redo(context) {
85
+ return context.root;
86
+ }
87
+ };
88
+ exports.LocalComputedBoundsCommand = LocalComputedBoundsCommand;
89
+ LocalComputedBoundsCommand.KIND = sprotty_1.ComputedBoundsAction.KIND;
90
+ __decorate([
91
+ (0, inversify_1.inject)(sprotty_1.ComputedBoundsApplicator),
92
+ __metadata("design:type", sprotty_1.ComputedBoundsApplicator)
93
+ ], LocalComputedBoundsCommand.prototype, "computedBoundsApplicator", void 0);
94
+ exports.LocalComputedBoundsCommand = LocalComputedBoundsCommand = __decorate([
95
+ (0, inversify_1.injectable)(),
96
+ __param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Action)),
97
+ __metadata("design:paramtypes", [Object])
98
+ ], LocalComputedBoundsCommand);
99
+ //# sourceMappingURL=local-bounds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-bounds.js","sourceRoot":"","sources":["../../../src/features/bounds/local-bounds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAa+B;AAC/B,yCAA+C;AAC/C,0EAAkE;AAElE,IAAiB,wBAAwB,CAcxC;AAdD,WAAiB,wBAAwB;IACrC,SAAgB,EAAE,CAAC,MAAe;QAC9B,OAAO,6BAAmB,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,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YAC9F,OAAO,OAAO,CAAC,IAAI,CAAC;SACvB;QACD,uGAAuG;QACvG,OAAO;YACH,KAAK,EAAE,OAAO,CAAC,IAAI;YACnB,YAAY,EAAE,KAAK;SACtB,CAAC;IACN,CAAC;IAEQ,IAAI,CAAC,OAAgC;QAC1C,OAAO,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;IAEQ,IAAI,CAAC,OAAgC;QAC1C,OAAO,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;;AA5BQ,gEAA0B;AACnB,+BAAI,GAAW,8BAAoB,CAAC,IAAI,AAApC,CAAqC;AAEJ;IAApD,IAAA,kBAAM,EAAC,kCAAwB,CAAC;8BAA8C,kCAAwB;4EAAC;qCAH/F,0BAA0B;IADtC,IAAA,sBAAU,GAAE;IAMI,WAAA,IAAA,kBAAM,EAAC,eAAK,CAAC,MAAM,CAAC,CAAA;;GALxB,0BAA0B,CA6BtC"}
@@ -0,0 +1,33 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { CommandExecutionContext, CommandReturn, ElementAndBounds, SetBoundsAction, SetBoundsCommand } from '@eclipse-glsp/sprotty';
17
+ import { GLSPActionDispatcher } from '../../base/action-dispatcher';
18
+ import { FeedbackCommand } from '../../base/feedback/feedback-command';
19
+ export interface SetBoundsFeedbackAction extends Omit<SetBoundsAction, 'kind'> {
20
+ kind: typeof SetBoundsFeedbackAction.KIND;
21
+ }
22
+ export declare namespace SetBoundsFeedbackAction {
23
+ const KIND = "setBoundsFeedback";
24
+ function is(object: any): object is SetBoundsFeedbackAction;
25
+ function create(bounds: ElementAndBounds[]): SetBoundsFeedbackAction;
26
+ }
27
+ export declare class SetBoundsFeebackCommand extends SetBoundsCommand implements FeedbackCommand {
28
+ static readonly KIND: string;
29
+ readonly priority: number;
30
+ protected actionDispatcher: GLSPActionDispatcher;
31
+ execute(context: CommandExecutionContext): CommandReturn;
32
+ }
33
+ //# sourceMappingURL=set-bounds-feedback-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-bounds-feedback-command.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/set-bounds-feedback-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAEH,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAGnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC;IAC1E,IAAI,EAAE,OAAO,uBAAuB,CAAC,IAAI,CAAC;CAC7C;AAED,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,IAAI,sBAAsB,CAAC;IAExC,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,uBAAuB,CAEjE;IAED,SAAgB,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAE1E;CACJ;AAED,qBACa,uBAAwB,SAAQ,gBAAiB,YAAW,eAAe;IACpF,gBAAyB,IAAI,EAAE,MAAM,CAAgC;IAErE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAK;IAEG,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;IAEzE,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;CAepE"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SetBoundsFeebackCommand = exports.SetBoundsFeedbackAction = void 0;
13
+ /********************************************************************************
14
+ * Copyright (c) 2023 EclipseSource and others.
15
+ *
16
+ * This program and the accompanying materials are made available under the
17
+ * terms of the Eclipse Public License v. 2.0 which is available at
18
+ * http://www.eclipse.org/legal/epl-2.0.
19
+ *
20
+ * This Source Code may also be made available under the following Secondary
21
+ * Licenses when the conditions for such availability set forth in the Eclipse
22
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
23
+ * with the GNU Classpath Exception which is available at
24
+ * https://www.gnu.org/software/classpath/license.html.
25
+ *
26
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
27
+ ********************************************************************************/
28
+ const sprotty_1 = require("@eclipse-glsp/sprotty");
29
+ const inversify_1 = require("inversify");
30
+ const action_dispatcher_1 = require("../../base/action-dispatcher");
31
+ const local_bounds_1 = require("./local-bounds");
32
+ var SetBoundsFeedbackAction;
33
+ (function (SetBoundsFeedbackAction) {
34
+ SetBoundsFeedbackAction.KIND = 'setBoundsFeedback';
35
+ function is(object) {
36
+ return sprotty_1.Action.hasKind(object, SetBoundsFeedbackAction.KIND);
37
+ }
38
+ SetBoundsFeedbackAction.is = is;
39
+ function create(bounds) {
40
+ return { kind: SetBoundsFeedbackAction.KIND, bounds };
41
+ }
42
+ SetBoundsFeedbackAction.create = create;
43
+ })(SetBoundsFeedbackAction || (exports.SetBoundsFeedbackAction = SetBoundsFeedbackAction = {}));
44
+ let SetBoundsFeebackCommand = class SetBoundsFeebackCommand extends sprotty_1.SetBoundsCommand {
45
+ constructor() {
46
+ super(...arguments);
47
+ this.priority = 0;
48
+ }
49
+ execute(context) {
50
+ super.execute(context);
51
+ // apply set bounds as layout options so that when we calculate the bounds they are considered by the layouter
52
+ this.action.bounds.forEach(bounds => {
53
+ var _a;
54
+ const element = context.root.index.getById(bounds.elementId);
55
+ if (element && (0, sprotty_1.isLayoutContainer)(element)) {
56
+ const options = (_a = element.layoutOptions) !== null && _a !== void 0 ? _a : {};
57
+ options.prefHeight = bounds.newSize.height;
58
+ options.prefWidth = bounds.newSize.width;
59
+ element.layoutOptions = options;
60
+ }
61
+ });
62
+ return local_bounds_1.LocalRequestBoundsAction.fromCommand(context, this.actionDispatcher, this.action);
63
+ }
64
+ };
65
+ exports.SetBoundsFeebackCommand = SetBoundsFeebackCommand;
66
+ SetBoundsFeebackCommand.KIND = SetBoundsFeedbackAction.KIND;
67
+ __decorate([
68
+ (0, inversify_1.inject)(sprotty_1.TYPES.IActionDispatcher),
69
+ __metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
70
+ ], SetBoundsFeebackCommand.prototype, "actionDispatcher", void 0);
71
+ exports.SetBoundsFeebackCommand = SetBoundsFeebackCommand = __decorate([
72
+ (0, inversify_1.injectable)()
73
+ ], SetBoundsFeebackCommand);
74
+ //# sourceMappingURL=set-bounds-feedback-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-bounds-feedback-command.js","sourceRoot":"","sources":["../../../src/features/bounds/set-bounds-feedback-command.ts"],"names":[],"mappings":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CAAC,CAAC;QACH,OAAO,uCAAwB,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7F,CAAC;;AArBQ,0DAAuB;AACP,4BAAI,GAAW,uBAAuB,CAAC,IAAI,AAAvC,CAAwC;AAI1B;IAA1C,IAAA,kBAAM,EAAC,eAAK,CAAC,iBAAiB,CAAC;8BAA6B,wCAAoB;iEAAC;kCALzE,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAsBnC"}
@@ -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
- import { BoundsAware, GChildElement, Hoverable, Locateable, GModelElement, GParentElement, Selectable } from '@eclipse-glsp/sprotty';
16
+ import { BoundsAware, GChildElement, GModelElement, GParentElement, Hoverable, Locateable, Selectable } from '@eclipse-glsp/sprotty';
17
17
  export declare const resizeFeature: unique symbol;
18
18
  export interface Resizable extends BoundsAware, Selectable {
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/features/change-bounds/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,EACV,aAAa,EACb,cAAc,EACd,UAAU,EAKb,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,aAAa,eAA0B,CAAC;AAErD,MAAM,WAAW,SAAU,SAAQ,WAAW,EAAE,UAAU;CAAG;AAE7D,wBAAgB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,IAAI,cAAc,GAAG,SAAS,CAEzF;AAGD,oBAAY,oBAAoB;IAC5B,OAAO,aAAa;IACpB,QAAQ,cAAc;IACtB,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;CAC/B;AAED,wBAAgB,qBAAqB,CAA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AAS;IAI7D,QAAQ,CAAC,QAAQ,CAAC;aACA,IAAI,EAAE,MAAM;IAC9B,QAAQ,CAAC,aAAa,EAAE,OAAO;IALnC,MAAM,CAAC,QAAQ,CAAC,IAAI,mBAAmB;gBAG1B,QAAQ,CAAC,kCAAsB,EACtB,IAAI,GAAE,MAA2B,EAC1C,aAAa,GAAE,OAAe;IAKlC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI7C,YAAY,IAAI,OAAO;IAIvB,YAAY,IAAI,OAAO;CAG1B;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAK9D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAEjE"}
@@ -54,7 +54,6 @@ class SResizeHandle extends sprotty_1.GChildElement {
54
54
  exports.SResizeHandle = SResizeHandle;
55
55
  SResizeHandle.TYPE = 'resize-handle';
56
56
  function addResizeHandles(element) {
57
- removeResizeHandles(element);
58
57
  element.add(new SResizeHandle(ResizeHandleLocation.TopLeft));
59
58
  element.add(new SResizeHandle(ResizeHandleLocation.TopRight));
60
59
  element.add(new SResizeHandle(ResizeHandleLocation.BottomLeft));
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/features/change-bounds/model.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAY+B;AAElB,QAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAIrD,SAAgB,WAAW,CAAC,OAAsB;IAC9C,OAAO,IAAA,uBAAa,EAAC,OAAO,CAAC,IAAI,IAAA,sBAAY,EAAC,OAAO,CAAC,IAAI,OAAO,YAAY,wBAAc,IAAI,OAAO,CAAC,UAAU,CAAC,qBAAa,CAAC,CAAC;AACrI,CAAC;AAFD,kCAEC;AAED,qCAAqC;AACrC,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC5B,4CAAoB,CAAA;IACpB,8CAA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OAAe;QAC/B,OAAO,OAAO,KAAK,8BAAoB,CAAC;IAC5C,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,WAAW,CAAC;IAChH,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAoB,CAAC,UAAU,CAAC;IAChH,CAAC;;AArBL,sCAsBC;AArBmB,kBAAI,GAAG,eAAe,CAAC;AAuB3C,SAAgB,gBAAgB,CAAC,OAAuB;IACpD,OAAO,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,CAAC;AALD,4CAKC;AAED,SAAgB,mBAAmB,CAAC,OAAuB;IACvD,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,YAAY,aAAa,CAAC,CAAC;AAC/D,CAAC;AAFD,kDAEC"}
@@ -1,4 +1,19 @@
1
- import { Decoration, DecorationPlacer, Point, GModelElement } from '@eclipse-glsp/sprotty';
1
+ /********************************************************************************
2
+ * Copyright (c) 2019-2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { Decoration, DecorationPlacer, GModelElement, Point } from '@eclipse-glsp/sprotty';
2
17
  export declare class GlspDecorationPlacer extends DecorationPlacer {
3
18
  protected static readonly DECORATION_OFFSET: Point;
4
19
  protected getPosition(element: GModelElement & Decoration): Point;
@@ -1 +1 @@
1
- {"version":3,"file":"decoration-placer.d.ts","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAiB,KAAK,EAAE,aAAa,EAAgC,MAAM,uBAAuB,CAAC;AAExI,qBACa,oBAAqB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAoB;cAEnD,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,GAAG,KAAK;CAY7E"}
1
+ {"version":3,"file":"decoration-placer.d.ts","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAiB,aAAa,EAAoB,KAAK,EAAc,MAAM,uBAAuB,CAAC;AAGxI,qBACa,oBAAqB,SAAQ,gBAAgB;IACtD,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAoB;cAEnD,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,GAAG,KAAK;CAY7E"}
@@ -23,8 +23,8 @@ exports.GlspDecorationPlacer = void 0;
23
23
  *
24
24
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
25
25
  ********************************************************************************/
26
- const inversify_1 = require("inversify");
27
26
  const sprotty_1 = require("@eclipse-glsp/sprotty");
27
+ const inversify_1 = require("inversify");
28
28
  let GlspDecorationPlacer = GlspDecorationPlacer_1 = class GlspDecorationPlacer extends sprotty_1.DecorationPlacer {
29
29
  getPosition(element) {
30
30
  if (element instanceof sprotty_1.GChildElement && element.parent instanceof sprotty_1.GRoutableElement) {
@@ -32,8 +32,8 @@ let GlspDecorationPlacer = GlspDecorationPlacer_1 = class GlspDecorationPlacer e
32
32
  }
33
33
  if ((0, sprotty_1.isSizeable)(element)) {
34
34
  return {
35
- x: GlspDecorationPlacer_1.DECORATION_OFFSET.x * element.bounds.width,
36
- y: GlspDecorationPlacer_1.DECORATION_OFFSET.y * element.bounds.height
35
+ x: -GlspDecorationPlacer_1.DECORATION_OFFSET.x,
36
+ y: -GlspDecorationPlacer_1.DECORATION_OFFSET.y
37
37
  };
38
38
  }
39
39
  return sprotty_1.Point.ORIGIN;
@@ -1 +1 @@
1
- {"version":3,"file":"decoration-placer.js","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuC;AACvC,mDAAwI;AAGjI,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,0BAAgB;IAGnC,WAAW,CAAC,OAAmC;QAC9D,IAAI,OAAO,YAAY,uBAAa,IAAI,OAAO,CAAC,MAAM,YAAY,0BAAgB,EAAE;YAChF,OAAO,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SACrC;QACD,IAAI,IAAA,oBAAU,EAAC,OAAO,CAAC,EAAE;YACrB,OAAO;gBACH,CAAC,EAAE,sBAAoB,CAAC,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK;gBAClE,CAAC,EAAE,sBAAoB,CAAC,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM;aACtE,CAAC;SACL;QACD,OAAO,eAAK,CAAC,MAAM,CAAC;IACxB,CAAC;;AAdQ,oDAAoB;AACH,sCAAiB,GAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,AAA1B,CAA2B;+BAD7D,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAehC"}
1
+ {"version":3,"file":"decoration-placer.js","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAwI;AACxI,yCAAuC;AAGhC,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,0BAAgB;IAGnC,WAAW,CAAC,OAAmC;QAC9D,IAAI,OAAO,YAAY,uBAAa,IAAI,OAAO,CAAC,MAAM,YAAY,0BAAgB,EAAE;YAChF,OAAO,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;SACrC;QACD,IAAI,IAAA,oBAAU,EAAC,OAAO,CAAC,EAAE;YACrB,OAAO;gBACH,CAAC,EAAE,CAAC,sBAAoB,CAAC,iBAAiB,CAAC,CAAC;gBAC5C,CAAC,EAAE,CAAC,sBAAoB,CAAC,iBAAiB,CAAC,CAAC;aAC/C,CAAC;SACL;QACD,OAAO,eAAK,CAAC,MAAM,CAAC;IACxB,CAAC;;AAdQ,oDAAoB;AACH,sCAAiB,GAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,AAA1B,CAA2B;+BAD7D,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAehC"}
@@ -0,0 +1,39 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { Action, CommandExecutionContext, CommandResult, ElementTemplate, GChildElement, GModelElementSchema } from '@eclipse-glsp/sprotty';
17
+ import { GLSPActionDispatcher } from '../../base/action-dispatcher';
18
+ import { FeedbackCommand } from '../../base/feedback/feedback-command';
19
+ export interface AddTemplateElementsAction extends Action {
20
+ kind: typeof AddTemplateElementsAction.KIND;
21
+ templates: ElementTemplate[];
22
+ addClasses?: string[];
23
+ removeClasses?: string[];
24
+ }
25
+ export declare namespace AddTemplateElementsAction {
26
+ const KIND = "addTemplateElements";
27
+ function create(options: Omit<AddTemplateElementsAction, 'kind'>): AddTemplateElementsAction;
28
+ }
29
+ export declare function getTemplateElementId(template: ElementTemplate): string;
30
+ export declare class AddTemplateElementsFeedbackCommand extends FeedbackCommand {
31
+ readonly action: AddTemplateElementsAction;
32
+ static readonly KIND = "addTemplateElements";
33
+ protected actionDispatcher: GLSPActionDispatcher;
34
+ constructor(action: AddTemplateElementsAction);
35
+ execute(context: CommandExecutionContext): CommandResult;
36
+ protected applyRootCssClasses(element: GChildElement, addClasses?: string[], removeClasses?: string[]): GChildElement;
37
+ }
38
+ export declare function templateToSchema(template: ElementTemplate, context: CommandExecutionContext): GModelElementSchema | undefined;
39
+ //# sourceMappingURL=add-template-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-template-element.d.ts","sourceRoot":"","sources":["../../../src/features/element-template/add-template-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,MAAM,EACN,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,aAAa,EACb,mBAAmB,EAItB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAIvE,MAAM,WAAW,yBAA0B,SAAQ,MAAM;IACrD,IAAI,EAAE,OAAO,yBAAyB,CAAC,IAAI,CAAC;IAC5C,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,IAAI,wBAAwB,CAAC;IAE1C,SAAgB,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC,GAAG,yBAAyB,CAKlG;CACJ;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAEtE;AAED,qBACa,kCAAmC,SAAQ,eAAe;IAKjC,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAJ5E,MAAM,CAAC,QAAQ,CAAC,IAAI,yBAAkC;IAErB,SAAS,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;gBAEvC,MAAM,EAAE,yBAAyB;IAInE,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa;IAUjE,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,aAAa;CAIxH;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,uBAAuB,GAAG,mBAAmB,GAAG,SAAS,CAU7H"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2023 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the Eclipse Public License v. 2.0 which is available at
7
+ * http://www.eclipse.org/legal/epl-2.0.
8
+ *
9
+ * This Source Code may also be made available under the following Secondary
10
+ * Licenses when the conditions for such availability set forth in the Eclipse
11
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ * with the GNU Classpath Exception which is available at
13
+ * https://www.gnu.org/software/classpath/license.html.
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ ********************************************************************************/
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
27
+ return function (target, key) { decorator(target, key, paramIndex); }
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.templateToSchema = exports.AddTemplateElementsFeedbackCommand = exports.getTemplateElementId = exports.AddTemplateElementsAction = void 0;
31
+ const sprotty_1 = require("@eclipse-glsp/sprotty");
32
+ const inversify_1 = require("inversify");
33
+ const action_dispatcher_1 = require("../../base/action-dispatcher");
34
+ const feedback_command_1 = require("../../base/feedback/feedback-command");
35
+ const gmodel_util_1 = require("../../utils/gmodel-util");
36
+ const local_bounds_1 = require("../bounds/local-bounds");
37
+ var AddTemplateElementsAction;
38
+ (function (AddTemplateElementsAction) {
39
+ AddTemplateElementsAction.KIND = 'addTemplateElements';
40
+ function create(options) {
41
+ return Object.assign({ kind: AddTemplateElementsAction.KIND }, options);
42
+ }
43
+ AddTemplateElementsAction.create = create;
44
+ })(AddTemplateElementsAction || (exports.AddTemplateElementsAction = AddTemplateElementsAction = {}));
45
+ function getTemplateElementId(template) {
46
+ return typeof template === 'string' ? `${template}_feedback` : template.id;
47
+ }
48
+ exports.getTemplateElementId = getTemplateElementId;
49
+ let AddTemplateElementsFeedbackCommand = class AddTemplateElementsFeedbackCommand extends feedback_command_1.FeedbackCommand {
50
+ constructor(action) {
51
+ super();
52
+ this.action = action;
53
+ }
54
+ execute(context) {
55
+ this.action.templates
56
+ .map(template => templateToSchema(template, context))
57
+ .filter(gmodel_util_1.isNotUndefined)
58
+ .map(schema => context.modelFactory.createElement(schema))
59
+ .map(element => this.applyRootCssClasses(element, this.action.addClasses, this.action.removeClasses))
60
+ .forEach(templateElement => context.root.add(templateElement));
61
+ return local_bounds_1.LocalRequestBoundsAction.fromCommand(context, this.actionDispatcher, this.action);
62
+ }
63
+ applyRootCssClasses(element, addClasses, removeClasses) {
64
+ element.cssClasses = modifyCssClasses(element.cssClasses, addClasses, removeClasses);
65
+ return element;
66
+ }
67
+ };
68
+ exports.AddTemplateElementsFeedbackCommand = AddTemplateElementsFeedbackCommand;
69
+ AddTemplateElementsFeedbackCommand.KIND = AddTemplateElementsAction.KIND;
70
+ __decorate([
71
+ (0, inversify_1.inject)(sprotty_1.TYPES.IActionDispatcher),
72
+ __metadata("design:type", action_dispatcher_1.GLSPActionDispatcher)
73
+ ], AddTemplateElementsFeedbackCommand.prototype, "actionDispatcher", void 0);
74
+ exports.AddTemplateElementsFeedbackCommand = AddTemplateElementsFeedbackCommand = __decorate([
75
+ (0, inversify_1.injectable)(),
76
+ __param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Action)),
77
+ __metadata("design:paramtypes", [Object])
78
+ ], AddTemplateElementsFeedbackCommand);
79
+ function templateToSchema(template, context) {
80
+ if (typeof template === 'string') {
81
+ const element = context.root.index.getById(template);
82
+ const schema = element ? context.modelFactory.createSchema(element) : undefined;
83
+ if (schema) {
84
+ adaptSchemaIds(schema);
85
+ }
86
+ return schema;
87
+ }
88
+ return template;
89
+ }
90
+ exports.templateToSchema = templateToSchema;
91
+ function adaptSchemaIds(schema) {
92
+ var _a;
93
+ schema.id = getTemplateElementId(schema.id);
94
+ (_a = schema.children) === null || _a === void 0 ? void 0 : _a.forEach(child => adaptSchemaIds(child));
95
+ return schema;
96
+ }
97
+ function modifyCssClasses(source, toAdd, toRemove) {
98
+ const classes = source !== null && source !== void 0 ? source : [];
99
+ if (toAdd) {
100
+ (0, sprotty_1.distinctAdd)(classes, ...toAdd);
101
+ }
102
+ if (toRemove) {
103
+ (0, sprotty_1.remove)(classes, ...toRemove);
104
+ }
105
+ return classes;
106
+ }
107
+ //# sourceMappingURL=add-template-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-template-element.js","sourceRoot":"","sources":["../../../src/features/element-template/add-template-element.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;AAElF,mDAU+B;AAC/B,yCAA+C;AAC/C,oEAAoE;AACpE,2EAAuE;AACvE,yDAAyD;AACzD,yDAAkE;AASlE,IAAiB,yBAAyB,CASzC;AATD,WAAiB,yBAAyB;IACzB,8BAAI,GAAG,qBAAqB,CAAC;IAE1C,SAAgB,MAAM,CAAC,OAAgD;QACnE,uBACI,IAAI,EAAE,0BAAA,IAAI,IACP,OAAO,EACZ;IACN,CAAC;IALe,gCAAM,SAKrB,CAAA;AACL,CAAC,EATgB,yBAAyB,yCAAzB,yBAAyB,QASzC;AAED,SAAgB,oBAAoB,CAAC,QAAyB;IAC1D,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC/E,CAAC;AAFD,oDAEC;AAGM,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,kCAAe;IAKnE,YAA2C,MAAiC;QACxE,KAAK,EAAE,CAAC;QAD+B,WAAM,G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AAQ,KAAK,QAAQ,EAAE;QAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAChF,IAAI,MAAM,EAAE;YACR,cAAc,CAAC,MAAM,CAAC,CAAC;SAC1B;QACD,OAAO,MAAM,CAAC;KACjB;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAVD,4CAUC;AAED,SAAS,cAAc,CAAC,MAA2B;;IAC/C,MAAM,CAAC,EAAE,GAAG,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5C,MAAA,MAAM,CAAC,QAAQ,0CAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAiB,EAAE,KAAgB,EAAE,QAAmB;IAC9E,MAAM,OAAO,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;IAC7B,IAAI,KAAK,EAAE;QACP,IAAA,qBAAW,EAAC,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC;KAClC;IACD,IAAI,QAAQ,EAAE;QACV,IAAA,gBAAM,EAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC;KAChC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -0,0 +1,18 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2019-2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { FeatureModule } from '@eclipse-glsp/sprotty';
17
+ export declare const elementTemplateModule: FeatureModule;
18
+ //# sourceMappingURL=element-template-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-template-module.d.ts","sourceRoot":"","sources":["../../../src/features/element-template/element-template-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAoB,MAAM,uBAAuB,CAAC;AAIxE,eAAO,MAAM,qBAAqB,eAIhC,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.elementTemplateModule = void 0;
4
+ /********************************************************************************
5
+ * Copyright (c) 2019-2023 EclipseSource and others.
6
+ *
7
+ * This program and the accompanying materials are made available under the
8
+ * terms of the Eclipse Public License v. 2.0 which is available at
9
+ * http://www.eclipse.org/legal/epl-2.0.
10
+ *
11
+ * This Source Code may also be made available under the following Secondary
12
+ * Licenses when the conditions for such availability set forth in the Eclipse
13
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
+ * with the GNU Classpath Exception which is available at
15
+ * https://www.gnu.org/software/classpath/license.html.
16
+ *
17
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
18
+ ********************************************************************************/
19
+ const sprotty_1 = require("@eclipse-glsp/sprotty");
20
+ const add_template_element_1 = require("./add-template-element");
21
+ const remove_template_element_1 = require("./remove-template-element");
22
+ exports.elementTemplateModule = new sprotty_1.FeatureModule((bind, unbind, isBound, rebind) => {
23
+ const context = { bind, unbind, isBound, rebind };
24
+ (0, sprotty_1.configureCommand)(context, add_template_element_1.AddTemplateElementsFeedbackCommand);
25
+ (0, sprotty_1.configureCommand)(context, remove_template_element_1.RemoveTemplateElementsFeedbackCommand);
26
+ });
27
+ //# sourceMappingURL=element-template-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-template-module.js","sourceRoot":"","sources":["../../../src/features/element-template/element-template-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAwE;AACxE,iEAA4E;AAC5E,uEAAkF;AAErE,QAAA,qBAAqB,GAAG,IAAI,uBAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACrF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,IAAA,0BAAgB,EAAC,OAAO,EAAE,yDAAkC,CAAC,CAAC;IAC9D,IAAA,0BAAgB,EAAC,OAAO,EAAE,+DAAqC,CAAC,CAAC;AACrE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2023 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import { Action, Disposable, GModelElement, ISnapper, Point } from '@eclipse-glsp/sprotty';
17
+ import { DragAwareMouseListener } from '../../base/drag-aware-mouse-listener';
18
+ import { IFeedbackEmitter } from '../../base/feedback/feedback-action-dispatcher';
19
+ import { Tool } from '../../base/tool-manager/tool';
20
+ import { IMovementRestrictor } from '../change-bounds/movement-restrictor';
21
+ export interface PositioningTool extends Tool {
22
+ readonly snapper?: ISnapper;
23
+ readonly movementRestrictor?: IMovementRestrictor;
24
+ registerFeedback(feedbackActions: Action[], feedbackEmitter?: IFeedbackEmitter, cleanupActions?: Action[]): Disposable;
25
+ deregisterFeedback(feedbackEmitter?: IFeedbackEmitter, cleanupActions?: Action[]): void;
26
+ }
27
+ export declare class MouseTrackingElementPositionListener extends DragAwareMouseListener {
28
+ protected elementId: string;
29
+ protected tool: PositioningTool;
30
+ protected cursorPosition: 'top-left' | 'middle';
31
+ element?: GModelElement;
32
+ currentPosition?: Point;
33
+ constructor(elementId: string, tool: PositioningTool, cursorPosition?: 'top-left' | 'middle');
34
+ mouseMove(target: GModelElement, event: MouseEvent): Action[];
35
+ protected snap(position: Point, element: GModelElement, isSnap?: boolean): Point;
36
+ protected validateMove(startPosition: Point, toPosition: Point, element: GModelElement, isFinished: boolean): Point;
37
+ }
38
+ //# sourceMappingURL=mouse-tracking-element-position-listener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mouse-tracking-element-position-listener.d.ts","sourceRoot":"","sources":["../../../src/features/element-template/mouse-tracking-element-position-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAc,KAAK,EAA6B,MAAM,uBAAuB,CAAC;AAElI,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEpD,OAAO,EACH,mBAAmB,EAGtB,MAAM,sCAAsC,CAAC;AAE9C,MAAM,WAAW,eAAgB,SAAQ,IAAI;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,kBAAkB,CA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