@eclipse-glsp/client 2.2.0-next.330 → 2.2.0-next.332
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.
- package/{lib/features/routing/glsp-manhattan-edge-router.d.ts → css/debug.css} +10 -5
- package/css/glsp-sprotty.css +5 -0
- package/css/grid.css +20 -0
- package/css/keyboard-tool-palette.css +0 -6
- package/css/tool-palette.css +30 -26
- package/lib/base/default.module.js +1 -1
- package/lib/base/default.module.js.map +1 -1
- package/lib/base/index.d.ts +1 -1
- package/lib/base/index.d.ts.map +1 -1
- package/lib/base/index.js +1 -1
- package/lib/base/index.js.map +1 -1
- package/lib/base/ui-extension/index.d.ts +18 -0
- package/lib/base/ui-extension/index.d.ts.map +1 -0
- package/lib/base/ui-extension/index.js +34 -0
- package/lib/base/ui-extension/index.js.map +1 -0
- package/lib/base/{ui-extension-registry.d.ts → ui-extension/ui-extension-registry.d.ts} +1 -1
- package/lib/base/ui-extension/ui-extension-registry.d.ts.map +1 -0
- package/lib/base/ui-extension/ui-extension-registry.js.map +1 -0
- package/lib/base/ui-extension/ui-extension.d.ts +39 -0
- package/lib/base/ui-extension/ui-extension.d.ts.map +1 -0
- package/lib/base/ui-extension/ui-extension.js +120 -0
- package/lib/base/ui-extension/ui-extension.js.map +1 -0
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.js +21 -7
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.d.ts +2 -4
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.js +11 -7
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +5 -6
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js +12 -8
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
- package/lib/features/change-bounds/snap.d.ts +1 -22
- package/lib/features/change-bounds/snap.d.ts.map +1 -1
- package/lib/features/change-bounds/snap.js +1 -37
- package/lib/features/change-bounds/snap.js.map +1 -1
- package/lib/features/command-palette/command-palette.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette.js +4 -3
- package/lib/features/command-palette/command-palette.js.map +1 -1
- package/lib/features/debug/debug-bounds-decorator.d.ts +35 -0
- package/lib/features/debug/debug-bounds-decorator.d.ts.map +1 -0
- package/lib/features/debug/debug-bounds-decorator.js +149 -0
- package/lib/features/debug/debug-bounds-decorator.js.map +1 -0
- package/lib/features/debug/debug-manager.d.ts +29 -0
- package/lib/features/debug/debug-manager.d.ts.map +1 -0
- package/lib/features/debug/debug-manager.js +72 -0
- package/lib/features/debug/debug-manager.js.map +1 -0
- package/lib/features/debug/debug-model.d.ts +37 -0
- package/lib/features/debug/debug-model.d.ts.map +1 -0
- package/lib/features/debug/debug-model.js +73 -0
- package/lib/features/debug/debug-model.js.map +1 -0
- package/lib/features/debug/debug-module.d.ts +19 -0
- package/lib/features/debug/debug-module.d.ts.map +1 -0
- package/lib/features/debug/debug-module.js +31 -0
- package/lib/features/debug/debug-module.js.map +1 -0
- package/lib/features/debug/index.d.ts +20 -0
- package/lib/features/debug/index.d.ts.map +1 -0
- package/lib/features/debug/index.js +36 -0
- package/lib/features/debug/index.js.map +1 -0
- package/lib/features/grid/grid-manager.d.ts +32 -0
- package/lib/features/grid/grid-manager.d.ts.map +1 -0
- package/lib/features/grid/grid-manager.js +74 -0
- package/lib/features/grid/grid-manager.js.map +1 -0
- package/lib/features/grid/grid-model.d.ts +37 -0
- package/lib/features/grid/grid-model.d.ts.map +1 -0
- package/lib/features/grid/grid-model.js +73 -0
- package/lib/features/grid/grid-model.js.map +1 -0
- package/lib/features/grid/grid-module.d.ts +19 -0
- package/lib/features/grid/grid-module.d.ts.map +1 -0
- package/lib/features/grid/grid-module.js +32 -0
- package/lib/features/grid/grid-module.js.map +1 -0
- package/lib/features/grid/grid-snapper.d.ts +45 -0
- package/lib/features/grid/grid-snapper.d.ts.map +1 -0
- package/lib/features/grid/grid-snapper.js +83 -0
- package/lib/features/grid/grid-snapper.js.map +1 -0
- package/lib/features/grid/grid.d.ts +18 -0
- package/lib/features/grid/grid.d.ts.map +1 -0
- package/lib/features/grid/grid.js +3 -0
- package/lib/features/grid/grid.js.map +1 -0
- package/lib/features/grid/index.d.ts +21 -0
- package/lib/features/grid/index.d.ts.map +1 -0
- package/lib/features/grid/index.js +37 -0
- package/lib/features/grid/index.js.map +1 -0
- package/lib/features/helper-lines/helper-line-manager-default.d.ts +4 -1
- package/lib/features/helper-lines/helper-line-manager-default.d.ts.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.js +11 -1
- package/lib/features/helper-lines/helper-line-manager-default.js.map +1 -1
- package/lib/features/index.d.ts +2 -0
- package/lib/features/index.d.ts.map +1 -1
- package/lib/features/index.js +2 -0
- package/lib/features/index.js.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui.d.ts.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui.js +4 -3
- package/lib/features/label-edit-ui/label-edit-ui.js.map +1 -1
- package/lib/features/routing/edge-router.d.ts +30 -0
- package/lib/features/routing/edge-router.d.ts.map +1 -0
- package/lib/features/routing/edge-router.js +116 -0
- package/lib/features/routing/edge-router.js.map +1 -0
- package/lib/features/routing/index.d.ts +1 -1
- package/lib/features/routing/index.d.ts.map +1 -1
- package/lib/features/routing/index.js +1 -1
- package/lib/features/routing/index.js.map +1 -1
- package/lib/features/routing/routing-module.d.ts.map +1 -1
- package/lib/features/routing/routing-module.js +4 -4
- package/lib/features/routing/routing-module.js.map +1 -1
- package/lib/features/tool-palette/tool-palette.d.ts +7 -0
- package/lib/features/tool-palette/tool-palette.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette.js +80 -2
- package/lib/features/tool-palette/tool-palette.js.map +1 -1
- package/lib/features/viewport/index.d.ts +1 -0
- package/lib/features/viewport/index.d.ts.map +1 -1
- package/lib/features/viewport/index.js +1 -0
- package/lib/features/viewport/index.js.map +1 -1
- package/lib/features/viewport/origin-viewport.d.ts +36 -0
- package/lib/features/viewport/origin-viewport.d.ts.map +1 -0
- package/lib/features/viewport/origin-viewport.js +75 -0
- package/lib/features/viewport/origin-viewport.js.map +1 -0
- package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
- package/lib/features/viewport/viewport-modules.js +4 -2
- package/lib/features/viewport/viewport-modules.js.map +1 -1
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +3 -2
- package/lib/views/base-view-module.js.map +1 -1
- package/lib/views/ggraph-view.d.ts +26 -0
- package/lib/views/ggraph-view.d.ts.map +1 -0
- package/lib/views/ggraph-view.js +71 -0
- package/lib/views/ggraph-view.js.map +1 -0
- package/lib/views/glsp-projection-view.d.ts +6 -1
- package/lib/views/glsp-projection-view.d.ts.map +1 -1
- package/lib/views/glsp-projection-view.js +30 -6
- package/lib/views/glsp-projection-view.js.map +1 -1
- package/lib/views/index.d.ts +1 -0
- package/lib/views/index.d.ts.map +1 -1
- package/lib/views/index.js +1 -0
- package/lib/views/index.js.map +1 -1
- package/package.json +3 -3
- package/src/base/default.module.ts +1 -1
- package/src/base/index.ts +1 -1
- package/src/base/ui-extension/index.ts +17 -0
- package/src/base/{ui-extension-registry.ts → ui-extension/ui-extension-registry.ts} +1 -1
- package/src/base/ui-extension/ui-extension.ts +119 -0
- package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette.ts +24 -7
- package/src/features/accessibility/resize-key-tool/resize-key-handler.ts +9 -9
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +13 -11
- package/src/features/change-bounds/{snap.spec.ts → point-position-updater.spec.ts} +1 -12
- package/src/features/change-bounds/snap.ts +1 -24
- package/src/features/command-palette/command-palette.ts +2 -1
- package/src/features/debug/debug-bounds-decorator.tsx +171 -0
- package/src/features/debug/debug-manager.ts +56 -0
- package/src/features/debug/debug-model.ts +63 -0
- package/src/features/debug/debug-module.ts +32 -0
- package/src/features/debug/index.ts +19 -0
- package/src/features/grid/grid-manager.ts +60 -0
- package/src/features/grid/grid-model.ts +62 -0
- package/src/features/grid/grid-module.ts +34 -0
- package/src/features/grid/grid-snapper.spec.ts +30 -0
- package/src/features/grid/grid-snapper.ts +59 -0
- package/src/features/grid/grid.ts +18 -0
- package/src/features/grid/index.ts +20 -0
- package/src/features/helper-lines/helper-line-manager-default.ts +10 -2
- package/src/features/index.ts +2 -0
- package/src/features/label-edit-ui/label-edit-ui.ts +2 -1
- package/src/features/routing/{glsp-manhattan-edge-router.ts → edge-router.ts} +72 -2
- package/src/features/routing/index.ts +1 -1
- package/src/features/routing/routing-module.ts +3 -5
- package/src/features/tool-palette/tool-palette.ts +80 -3
- package/src/features/viewport/index.ts +1 -0
- package/src/features/viewport/origin-viewport.ts +68 -0
- package/src/features/viewport/viewport-modules.ts +4 -2
- package/src/views/base-view-module.ts +3 -3
- package/src/views/ggraph-view.tsx +56 -0
- package/src/views/glsp-projection-view.tsx +34 -7
- package/src/views/index.ts +1 -0
- package/lib/base/ui-extension-registry.d.ts.map +0 -1
- package/lib/base/ui-extension-registry.js.map +0 -1
- package/lib/features/routing/glsp-manhattan-edge-router.d.ts.map +0 -1
- package/lib/features/routing/glsp-manhattan-edge-router.js +0 -68
- package/lib/features/routing/glsp-manhattan-edge-router.js.map +0 -1
- /package/lib/base/{ui-extension-registry.js → ui-extension/ui-extension-registry.js} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2023 Axon Ivy AG and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.gridModule = void 0;
|
|
19
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
20
|
+
require("../../../css/grid.css");
|
|
21
|
+
const grid_manager_1 = require("./grid-manager");
|
|
22
|
+
const grid_model_1 = require("./grid-model");
|
|
23
|
+
const grid_snapper_1 = require("./grid-snapper");
|
|
24
|
+
exports.gridModule = new sprotty_1.FeatureModule((bind, unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, unbind, isBound, rebind };
|
|
26
|
+
bind(sprotty_1.TYPES.Grid).toConstantValue({ x: 10, y: 10 });
|
|
27
|
+
(0, sprotty_1.configureCommand)(context, grid_model_1.ShowGridCommand);
|
|
28
|
+
(0, sprotty_1.bindAsService)(bind, sprotty_1.TYPES.IGridManager, grid_manager_1.GridManager);
|
|
29
|
+
(0, sprotty_1.configureActionHandler)(context, grid_model_1.ShowGridAction.KIND, grid_manager_1.GridManager);
|
|
30
|
+
bind(sprotty_1.TYPES.ISnapper).to(grid_snapper_1.GridSnapper);
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=grid-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-module.js","sourceRoot":"","sources":["../../../src/features/grid/grid-module.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,mDAAsH;AACtH,iCAA+B;AAC/B,iDAA6C;AAC7C,6CAA+D;AAC/D,iDAA6C;AAEhC,QAAA,UAAU,GAAG,IAAI,uBAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAC1E,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAElD,IAAI,CAAC,eAAK,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAEnD,IAAA,0BAAgB,EAAC,OAAO,EAAE,4BAAe,CAAC,CAAC;IAE3C,IAAA,uBAAa,EAAC,IAAI,EAAE,eAAK,CAAC,YAAY,EAAE,0BAAW,CAAC,CAAC;IACrD,IAAA,gCAAsB,EAAC,OAAO,EAAE,2BAAc,CAAC,IAAI,EAAE,0BAAW,CAAC,CAAC;IAElE,IAAI,CAAC,eAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,0BAAW,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { CenterGridSnapper, GModelElement, ISnapper, Point } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { Grid } from './grid';
|
|
18
|
+
/**
|
|
19
|
+
* A {@link ISnapper} implementation that snaps all elements onto a fixed gride size.
|
|
20
|
+
* The default grid size is 10x10 pixel.
|
|
21
|
+
* To configure a custom grid size bind the `TYPES.ISnapper` service identifier
|
|
22
|
+
* to constant value, e.g:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* bind(TYPES.ISnapper).toConstantValue(new GridSnapper({ x: 25, y: 25 }));
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* or use the `Grid` to define the grid size more generically:
|
|
29
|
+
* ```ts
|
|
30
|
+
* bind(TYPES.Grid).toConstantValue({ x: 25, y: 25 });
|
|
31
|
+
* bind(TYPES.ISnapper).to(GridSnapper);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare class GridSnapper implements ISnapper {
|
|
35
|
+
readonly grid: Grid;
|
|
36
|
+
constructor(grid?: Grid);
|
|
37
|
+
snap(position: Point, element: GModelElement): Point;
|
|
38
|
+
}
|
|
39
|
+
export declare class GLSPCenterGridSnapper extends CenterGridSnapper {
|
|
40
|
+
readonly grid: Grid;
|
|
41
|
+
constructor(grid?: Grid);
|
|
42
|
+
get gridX(): number;
|
|
43
|
+
get gridY(): number;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=grid-snapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-snapper.d.ts","sourceRoot":"","sources":["../../../src/features/grid/grid-snapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,uBAAuB,CAAC;AAEjG,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;;;;;;;;;;;;;GAeG;AACH,qBACa,WAAY,YAAW,QAAQ;aACoB,IAAI,EAAE,IAAI;gBAAV,IAAI,GAAE,IAAuB;IAEzF,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;CAGvD;AAED,qBACa,qBAAsB,SAAQ,iBAAiB;aACI,IAAI,EAAE,IAAI;gBAAV,IAAI,GAAE,IAAuB;IAIzF,IAAa,KAAK,IAAI,MAAM,CAE3B;IAED,IAAa,KAAK,IAAI,MAAM,CAE3B;CACJ"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2024 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.GLSPCenterGridSnapper = exports.GridSnapper = void 0;
|
|
31
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
32
|
+
const inversify_1 = require("inversify");
|
|
33
|
+
/**
|
|
34
|
+
* A {@link ISnapper} implementation that snaps all elements onto a fixed gride size.
|
|
35
|
+
* The default grid size is 10x10 pixel.
|
|
36
|
+
* To configure a custom grid size bind the `TYPES.ISnapper` service identifier
|
|
37
|
+
* to constant value, e.g:
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* bind(TYPES.ISnapper).toConstantValue(new GridSnapper({ x: 25, y: 25 }));
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* or use the `Grid` to define the grid size more generically:
|
|
44
|
+
* ```ts
|
|
45
|
+
* bind(TYPES.Grid).toConstantValue({ x: 25, y: 25 });
|
|
46
|
+
* bind(TYPES.ISnapper).to(GridSnapper);
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
let GridSnapper = class GridSnapper {
|
|
50
|
+
constructor(grid = { x: 10, y: 10 }) {
|
|
51
|
+
this.grid = grid;
|
|
52
|
+
}
|
|
53
|
+
snap(position, element) {
|
|
54
|
+
return sprotty_1.Point.snapToGrid(position, this.grid);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.GridSnapper = GridSnapper;
|
|
58
|
+
exports.GridSnapper = GridSnapper = __decorate([
|
|
59
|
+
(0, inversify_1.injectable)(),
|
|
60
|
+
__param(0, (0, inversify_1.optional)()),
|
|
61
|
+
__param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Grid)),
|
|
62
|
+
__metadata("design:paramtypes", [Object])
|
|
63
|
+
], GridSnapper);
|
|
64
|
+
let GLSPCenterGridSnapper = class GLSPCenterGridSnapper extends sprotty_1.CenterGridSnapper {
|
|
65
|
+
constructor(grid = { x: 10, y: 10 }) {
|
|
66
|
+
super();
|
|
67
|
+
this.grid = grid;
|
|
68
|
+
}
|
|
69
|
+
get gridX() {
|
|
70
|
+
return this.grid.x;
|
|
71
|
+
}
|
|
72
|
+
get gridY() {
|
|
73
|
+
return this.grid.y;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
exports.GLSPCenterGridSnapper = GLSPCenterGridSnapper;
|
|
77
|
+
exports.GLSPCenterGridSnapper = GLSPCenterGridSnapper = __decorate([
|
|
78
|
+
(0, inversify_1.injectable)(),
|
|
79
|
+
__param(0, (0, inversify_1.optional)()),
|
|
80
|
+
__param(0, (0, inversify_1.inject)(sprotty_1.TYPES.Grid)),
|
|
81
|
+
__metadata("design:paramtypes", [Object])
|
|
82
|
+
], GLSPCenterGridSnapper);
|
|
83
|
+
//# sourceMappingURL=grid-snapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-snapper.js","sourceRoot":"","sources":["../../../src/features/grid/grid-snapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;AAElF,mDAAiG;AACjG,yCAAyD;AAGzD;;;;;;;;;;;;;;;GAeG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACpB,YAA4D,OAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;QAA7B,SAAI,GAAJ,IAAI,CAAyB;IAAG,CAAC;IAE7F,IAAI,CAAC,QAAe,EAAE,OAAsB;QACxC,OAAO,eAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;CACJ,CAAA;AANY,kCAAW;sBAAX,WAAW;IADvB,IAAA,sBAAU,GAAE;IAEI,WAAA,IAAA,oBAAQ,GAAE,CAAA;IAAE,WAAA,IAAA,kBAAM,EAAC,eAAK,CAAC,IAAI,CAAC,CAAA;;GADlC,WAAW,CAMvB;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,2BAAiB;IACxD,YAA4D,OAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE;QACrF,KAAK,EAAE,CAAC;QADgD,SAAI,GAAJ,IAAI,CAAyB;IAEzF,CAAC;IAED,IAAa,KAAK;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACvB,CAAC;IAED,IAAa,KAAK;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACvB,CAAC;CACJ,CAAA;AAZY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,sBAAU,GAAE;IAEI,WAAA,IAAA,oBAAQ,GAAE,CAAA;IAAE,WAAA,IAAA,kBAAM,EAAC,eAAK,CAAC,IAAI,CAAC,CAAA;;GADlC,qBAAqB,CAYjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 Axon Ivy AG 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 { Point } from '@eclipse-glsp/sprotty';
|
|
17
|
+
export type Grid = Point;
|
|
18
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/features/grid/grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../src/features/grid/grid.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 Axon Ivy AG and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './grid';
|
|
17
|
+
export * from './grid-manager';
|
|
18
|
+
export * from './grid-model';
|
|
19
|
+
export * from './grid-module';
|
|
20
|
+
export * from './grid-snapper';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/grid/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/********************************************************************************
|
|
18
|
+
* Copyright (c) 2024 Axon Ivy AG and others.
|
|
19
|
+
*
|
|
20
|
+
* This program and the accompanying materials are made available under the
|
|
21
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
22
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
23
|
+
*
|
|
24
|
+
* This Source Code may also be made available under the following Secondary
|
|
25
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
26
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
27
|
+
* with the GNU Classpath Exception which is available at
|
|
28
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
29
|
+
*
|
|
30
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
31
|
+
********************************************************************************/
|
|
32
|
+
__exportStar(require("./grid"), exports);
|
|
33
|
+
__exportStar(require("./grid-manager"), exports);
|
|
34
|
+
__exportStar(require("./grid-model"), exports);
|
|
35
|
+
__exportStar(require("./grid-module"), exports);
|
|
36
|
+
__exportStar(require("./grid-snapper"), exports);
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/grid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAuB;AACvB,iDAA+B;AAC/B,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B"}
|
|
@@ -18,6 +18,7 @@ import { FeedbackEmitter } from '../../base';
|
|
|
18
18
|
import { IFeedbackActionDispatcher } from '../../base/feedback/feedback-action-dispatcher';
|
|
19
19
|
import { ISelectionListener, SelectionService } from '../../base/selection-service';
|
|
20
20
|
import { SetBoundsFeedbackAction } from '../bounds/set-bounds-feedback-command';
|
|
21
|
+
import { Grid } from '../grid';
|
|
21
22
|
import { MoveFinishedEventAction, MoveInitializedEventAction } from '../tools/change-bounds/change-bounds-tool-feedback';
|
|
22
23
|
import { AlignmentElementFilter, DrawHelperLinesFeedbackAction, ViewportLineType } from './helper-line-feedback';
|
|
23
24
|
import { IHelperLineManager } from './helper-line-manager';
|
|
@@ -35,7 +36,7 @@ export interface IHelperLineOptions {
|
|
|
35
36
|
viewportLines?: ViewportLineType[];
|
|
36
37
|
/**
|
|
37
38
|
* The minimum difference between two coordinates
|
|
38
|
-
* Defaults to 1.
|
|
39
|
+
* Defaults to 1 or zero (perfect match) if the optional grid module is loaded.
|
|
39
40
|
*/
|
|
40
41
|
alignmentEpsilon?: number;
|
|
41
42
|
/**
|
|
@@ -46,6 +47,7 @@ export interface IHelperLineOptions {
|
|
|
46
47
|
/**
|
|
47
48
|
* The minimum move delta that is necessary for an element to break through a helper line.
|
|
48
49
|
* Defaults to { x: 1, y: 1 } whereas the x represents the horizontal distance and y represents the vertical distance.
|
|
50
|
+
* If the optional grid module is loaded, defaults to twice the grid size, i.e., two grid moves to break through a helper line.
|
|
49
51
|
*/
|
|
50
52
|
minimumMoveDelta?: Point;
|
|
51
53
|
/**
|
|
@@ -63,6 +65,7 @@ export declare class HelperLineManager implements IActionHandler, ISelectionList
|
|
|
63
65
|
protected feedbackDispatcher: IFeedbackActionDispatcher;
|
|
64
66
|
protected selectionService: SelectionService;
|
|
65
67
|
protected userOptions?: IHelperLineOptions;
|
|
68
|
+
protected grid?: Grid;
|
|
66
69
|
protected options: Required<IHelperLineOptions>;
|
|
67
70
|
protected feedback: FeedbackEmitter;
|
|
68
71
|
protected init(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper-line-manager-default.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager-default.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAS,MAAM,uBAAuB,CAAC;AAErI,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AACzH,OAAO,EACH,sBAAsB,EAMtB,6BAA6B,EAE7B,gBAAgB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC;;;OAGG;IACH,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD
|
|
1
|
+
{"version":3,"file":"helper-line-manager-default.d.ts","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager-default.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAS,MAAM,uBAAuB,CAAC;AAErI,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AACzH,OAAO,EACH,sBAAsB,EAMtB,6BAA6B,EAE7B,gBAAgB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IA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B,GAAG,IAAI;IAIxF,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI;IAIzH,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM;CAQ7F"}
|
|
@@ -44,7 +44,12 @@ exports.DEFAULT_HELPER_LINE_OPTIONS = {
|
|
|
44
44
|
let HelperLineManager = class HelperLineManager {
|
|
45
45
|
init() {
|
|
46
46
|
this.feedback = this.feedbackDispatcher.createEmitter();
|
|
47
|
-
|
|
47
|
+
const dynamicOptions = {};
|
|
48
|
+
if (this.grid) {
|
|
49
|
+
dynamicOptions.alignmentEpsilon = 0;
|
|
50
|
+
dynamicOptions.minimumMoveDelta = sprotty_1.Point.multiplyScalar(this.grid, 2);
|
|
51
|
+
}
|
|
52
|
+
this.options = Object.assign(Object.assign(Object.assign({}, exports.DEFAULT_HELPER_LINE_OPTIONS), dynamicOptions), this.userOptions);
|
|
48
53
|
this.selectionService.onSelectionChanged(change => this.selectionChanged(change.root, change.selectedElements, change.deselectedElements));
|
|
49
54
|
}
|
|
50
55
|
handle(action) {
|
|
@@ -111,6 +116,11 @@ __decorate([
|
|
|
111
116
|
(0, inversify_1.inject)(sprotty_1.TYPES.IHelperLineOptions),
|
|
112
117
|
__metadata("design:type", Object)
|
|
113
118
|
], HelperLineManager.prototype, "userOptions", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, inversify_1.optional)(),
|
|
121
|
+
(0, inversify_1.inject)(sprotty_1.TYPES.Grid),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], HelperLineManager.prototype, "grid", void 0);
|
|
114
124
|
__decorate([
|
|
115
125
|
(0, inversify_1.postConstruct)(),
|
|
116
126
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper-line-manager-default.js","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager-default.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAqI;AACrI,yCAAwE;AAGxE,oEAAoF;AACpF,uFAAgF;
|
|
1
|
+
{"version":3,"file":"helper-line-manager-default.js","sourceRoot":"","sources":["../../../src/features/helper-lines/helper-line-manager-default.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAqI;AACrI,yCAAwE;AAGxE,oEAAoF;AACpF,uFAAgF;AAEhF,oGAAyH;AACzH,iEAUgC;AAEhC,mCAAoD;AAqCvC,QAAA,kBAAkB,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAEpC,QAAA,2BAA2B,GAAiC;IACrE,YAAY,EAAE,4CAAqB;IACnC,aAAa,EAAE,6CAAsB;IACrC,gBAAgB,EAAE,sCAAe;IACjC,sBAAsB,EAAE,uDAAgC;IACxD,gBAAgB,EAAE,0BAAkB;IACpC,KAAK,EAAE,oCAAa;CACvB,CAAC;AAGK,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAUhB,IAAI;QACV,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC;QACxD,MAAM,cAAc,GAAuB,EAAE,CAAC;QAC9C,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,cAAc,CAAC,gBAAgB,GAAG,CAAC,CAAC;YACpC,cAAc,CAAC,gBAAgB,GAAG,eAAK,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACzE,CAAC;QACD,IAAI,CAAC,OAAO,iDAAQ,mCAA2B,GAAK,cAAc,GAAK,IAAI,CAAC,WAAW,CAAE,CAAC;QAC1F,IAAI,CAAC,gBAAgB,CAAC,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BAAM,EAAC,eAAK,CAAC,kBAAkB,CAAC;;sDAA4C;AAC/C;IAAzC,IAAA,oBAAQ,GAAE;IAAE,IAAA,kBAAM,EAAC,eAAK,CAAC,IAAI,CAAC;;+CAAuB;AAM5C;IADT,IAAA,yBAAa,GAAE;;;;6CAYf;4BArBQ,iBAAiB;IAD7B,IAAA,sBAAU,GAAE;GACA,iBAAiB,CA4E7B"}
|
package/lib/features/index.d.ts
CHANGED
|
@@ -19,9 +19,11 @@ export * from './change-bounds';
|
|
|
19
19
|
export * from './command-palette';
|
|
20
20
|
export * from './context-menu';
|
|
21
21
|
export * from './copy-paste';
|
|
22
|
+
export * from './debug';
|
|
22
23
|
export * from './decoration';
|
|
23
24
|
export * from './element-template';
|
|
24
25
|
export * from './export';
|
|
26
|
+
export * from './grid';
|
|
25
27
|
export * from './helper-lines';
|
|
26
28
|
export * from './hints';
|
|
27
29
|
export * from './hover';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
package/lib/features/index.js
CHANGED
|
@@ -35,9 +35,11 @@ __exportStar(require("./change-bounds"), exports);
|
|
|
35
35
|
__exportStar(require("./command-palette"), exports);
|
|
36
36
|
__exportStar(require("./context-menu"), exports);
|
|
37
37
|
__exportStar(require("./copy-paste"), exports);
|
|
38
|
+
__exportStar(require("./debug"), exports);
|
|
38
39
|
__exportStar(require("./decoration"), exports);
|
|
39
40
|
__exportStar(require("./element-template"), exports);
|
|
40
41
|
__exportStar(require("./export"), exports);
|
|
42
|
+
__exportStar(require("./grid"), exports);
|
|
41
43
|
__exportStar(require("./helper-lines"), exports);
|
|
42
44
|
__exportStar(require("./hints"), exports);
|
|
43
45
|
__exportStar(require("./hover"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,2CAAyB;AACzB,kDAAgC;AAChC,oDAAkC;AAClC,iDAA+B;AAC/B,+CAA6B;AAC7B,+CAA6B;AAC7B,qDAAmC;AACnC,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,0CAAwB;AACxB,+CAA6B;AAC7B,kDAAgC;AAChC,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,yDAAuC;AACvC,2CAAyB;AACzB,iDAA+B;AAC/B,iDAA+B;AAC/B,0CAAwB;AACxB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,2CAAyB;AACzB,kDAAgC;AAChC,oDAAkC;AAClC,iDAA+B;AAC/B,+CAA6B;AAC7B,0CAAwB;AACxB,+CAA6B;AAC7B,qDAAmC;AACnC,2CAAyB;AACzB,yCAAuB;AACvB,iDAA+B;AAC/B,0CAAwB;AACxB,0CAAwB;AACxB,+CAA6B;AAC7B,kDAAgC;AAChC,2CAAyB;AACzB,+CAA6B;AAC7B,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,yDAAuC;AACvC,2CAAyB;AACzB,iDAA+B;AAC/B,iDAA+B;AAC/B,0CAAwB;AACxB,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-edit-ui.d.ts","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"label-edit-ui.d.ts","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,qBACa,eAAgB,SAAQ,WAAW;cACzB,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,GAAG,IAAI;cAKvD,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CAOjE"}
|
|
@@ -24,18 +24,19 @@ exports.GlspEditLabelUI = void 0;
|
|
|
24
24
|
********************************************************************************/
|
|
25
25
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
26
|
const inversify_1 = require("inversify");
|
|
27
|
+
const ui_extension_1 = require("../../base/ui-extension/ui-extension");
|
|
27
28
|
let GlspEditLabelUI = class GlspEditLabelUI extends sprotty_1.EditLabelUI {
|
|
28
29
|
initializeContents(containerElement) {
|
|
29
30
|
super.initializeContents(containerElement);
|
|
30
|
-
containerElement.classList.add(
|
|
31
|
+
containerElement.classList.add(ui_extension_1.CSS_UI_EXTENSION_CLASS);
|
|
31
32
|
}
|
|
32
33
|
setContainerVisible(visible) {
|
|
33
34
|
var _a, _b;
|
|
34
35
|
if (visible) {
|
|
35
|
-
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(
|
|
36
|
+
(_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.classList.remove(ui_extension_1.CSS_HIDDEN_EXTENSION_CLASS);
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
|
-
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(
|
|
39
|
+
(_b = this.containerElement) === null || _b === void 0 ? void 0 : _b.classList.add(ui_extension_1.CSS_HIDDEN_EXTENSION_CLASS);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-edit-ui.js","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"label-edit-ui.js","sourceRoot":"","sources":["../../../src/features/label-edit-ui/label-edit-ui.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAoD;AACpD,yCAAuC;AACvC,uEAA0G;AAGnG,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,qBAAW;IACzB,kBAAkB,CAAC,gBAA6B;QAC/D,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;QAC3C,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,qCAAsB,CAAC,CAAC;IAC3D,CAAC;IAEkB,mBAAmB,CAAC,OAAgB;;QACnD,IAAI,OAAO,EAAE,CAAC;YACV,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,MAAM,CAAC,yCAA0B,CAAC,CAAC;QACxE,CAAC;aAAM,CAAC;YACJ,MAAA,IAAI,CAAC,gBAAgB,0CAAE,SAAS,CAAC,GAAG,CAAC,yCAA0B,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;CACJ,CAAA;AAbY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CAa3B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { AbstractEdgeRouter, BezierEdgeRouter, GConnectableElement, GParentElement, GRoutableElement, ManhattanEdgeRouter, Point, PolylineEdgeRouter, ResolvedHandleMove } from '@eclipse-glsp/sprotty';
|
|
17
|
+
export declare abstract class GLSPAbstractEdgeRouter extends AbstractEdgeRouter {
|
|
18
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
19
|
+
}
|
|
20
|
+
export declare class GLSPPolylineEdgeRouter extends PolylineEdgeRouter {
|
|
21
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
22
|
+
}
|
|
23
|
+
export declare class GLSPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
24
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
25
|
+
protected applyInnerHandleMoves(edge: GRoutableElement, moves: ResolvedHandleMove[]): void;
|
|
26
|
+
}
|
|
27
|
+
export declare class GLSPBezierEdgeRouter extends BezierEdgeRouter {
|
|
28
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=edge-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-router.d.ts","sourceRoot":"","sources":["../../../src/features/routing/edge-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,EACL,kBAAkB,EAClB,kBAAkB,EAErB,MAAM,uBAAuB,CAAC;AAG/B,8BACsB,sBAAuB,SAAQ,kBAAkB;IAC1D,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;CAKX;AAED,qBACa,sBAAuB,SAAQ,kBAAkB;IACjD,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;CAKX;AAED,qBACa,uBAAwB,SAAQ,mBAAmB;IACnD,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;cAMW,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,IAAI;CAuCtG;AAED,qBACa,oBAAqB,SAAQ,gBAAgB;IAC7C,mBAAmB,CACxB,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,cAAc,EAC5B,IAAI,EAAE,gBAAgB,EACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,GACtC,KAAK;CAKX"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2024 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.GLSPBezierEdgeRouter = exports.GLSPManhattanEdgeRouter = exports.GLSPPolylineEdgeRouter = exports.GLSPAbstractEdgeRouter = void 0;
|
|
25
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
let GLSPAbstractEdgeRouter = class GLSPAbstractEdgeRouter extends sprotty_1.AbstractEdgeRouter {
|
|
28
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
29
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
30
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
31
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.GLSPAbstractEdgeRouter = GLSPAbstractEdgeRouter;
|
|
35
|
+
exports.GLSPAbstractEdgeRouter = GLSPAbstractEdgeRouter = __decorate([
|
|
36
|
+
(0, inversify_1.injectable)()
|
|
37
|
+
], GLSPAbstractEdgeRouter);
|
|
38
|
+
let GLSPPolylineEdgeRouter = class GLSPPolylineEdgeRouter extends sprotty_1.PolylineEdgeRouter {
|
|
39
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
40
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
41
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
42
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.GLSPPolylineEdgeRouter = GLSPPolylineEdgeRouter;
|
|
46
|
+
exports.GLSPPolylineEdgeRouter = GLSPPolylineEdgeRouter = __decorate([
|
|
47
|
+
(0, inversify_1.injectable)()
|
|
48
|
+
], GLSPPolylineEdgeRouter);
|
|
49
|
+
let GLSPManhattanEdgeRouter = class GLSPManhattanEdgeRouter extends sprotty_1.ManhattanEdgeRouter {
|
|
50
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
51
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
52
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
53
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
54
|
+
}
|
|
55
|
+
applyInnerHandleMoves(edge, moves) {
|
|
56
|
+
const route = this.route(edge);
|
|
57
|
+
const routingPoints = edge.routingPoints;
|
|
58
|
+
const minimalPointDistance = this.getOptions(edge).minimalPointDistance;
|
|
59
|
+
moves.forEach(move => {
|
|
60
|
+
const handle = move.handle;
|
|
61
|
+
const index = handle.pointIndex;
|
|
62
|
+
const correctedX = this.correctX(routingPoints, index, move.toPosition.x, minimalPointDistance);
|
|
63
|
+
const correctedY = this.correctY(routingPoints, index, move.toPosition.y, minimalPointDistance);
|
|
64
|
+
switch (handle.kind) {
|
|
65
|
+
case 'manhattan-50%':
|
|
66
|
+
if (index < 0) {
|
|
67
|
+
if (routingPoints.length === 0) {
|
|
68
|
+
routingPoints.push({ x: correctedX, y: correctedY });
|
|
69
|
+
move.handle.pointIndex = 0;
|
|
70
|
+
}
|
|
71
|
+
else if ((0, sprotty_1.almostEquals)(route[0].x, route[1].x)) {
|
|
72
|
+
this.alignX(routingPoints, 0, correctedX);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.alignY(routingPoints, 0, correctedY);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (index < routingPoints.length - 1) {
|
|
79
|
+
if ((0, sprotty_1.almostEquals)(routingPoints[index].x, routingPoints[index + 1].x)) {
|
|
80
|
+
this.alignX(routingPoints, index, correctedX);
|
|
81
|
+
this.alignX(routingPoints, index + 1, correctedX);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.alignY(routingPoints, index, correctedY);
|
|
85
|
+
this.alignY(routingPoints, index + 1, correctedY);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
if ((0, sprotty_1.almostEquals)(route[route.length - 2].x, route[route.length - 1].x)) {
|
|
90
|
+
this.alignX(routingPoints, routingPoints.length - 1, correctedX);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.alignY(routingPoints, routingPoints.length - 1, correctedY);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter;
|
|
102
|
+
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter = __decorate([
|
|
103
|
+
(0, inversify_1.injectable)()
|
|
104
|
+
], GLSPManhattanEdgeRouter);
|
|
105
|
+
let GLSPBezierEdgeRouter = class GLSPBezierEdgeRouter extends sprotty_1.BezierEdgeRouter {
|
|
106
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
107
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
108
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
109
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.GLSPBezierEdgeRouter = GLSPBezierEdgeRouter;
|
|
113
|
+
exports.GLSPBezierEdgeRouter = GLSPBezierEdgeRouter = __decorate([
|
|
114
|
+
(0, inversify_1.injectable)()
|
|
115
|
+
], GLSPBezierEdgeRouter);
|
|
116
|
+
//# sourceMappingURL=edge-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-router.js","sourceRoot":"","sources":["../../../src/features/routing/edge-router.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAW+B;AAC/B,yCAAuC;AAGhC,IAAe,sBAA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AC;IACP,CAAC;CACJ,CAAA;AApDY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAoDnC;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,0BAAgB;IAC7C,mBAAmB,CACxB,WAAgC,EAChC,QAAe,EACf,YAA4B,EAC5B,IAAsB,EACtB,gBAAqC;QAErC,qHAAqH;QACrH,MAAM,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACtG,OAAO,eAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAYhC"}
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export * from './
|
|
16
|
+
export * from './edge-router';
|
|
17
17
|
export * from './routing-module';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|