@eclipse-glsp/sprotty 1.1.0-next.97ea035.286

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/types.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TYPES = 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("sprotty");
20
+ /**
21
+ * Reexport of the TYPES namespace of sprotty augments with additional GLSP specific service
22
+ * identifiers.
23
+ *
24
+ */
25
+ exports.TYPES = Object.assign(Object.assign({}, sprotty_1.TYPES), { IAsyncClipboardService: Symbol('IAsyncClipboardService'), IEditorContextServiceProvider: Symbol('IEditorContextProvider'), IFeedbackActionDispatcher: Symbol('IFeedbackActionDispatcher'), IToolFactory: Symbol('Factory<Tool>'), ITypeHintProvider: Symbol('ITypeHintProvider'), IMovementRestrictor: Symbol('IMovementRestrictor'), ISelectionListener: Symbol('ISelectionListener'), ISModelRootListener: Symbol('ISModelRootListener'), IContextMenuProvider: Symbol('IContextMenuProvider'), ICopyPasteHandler: Symbol('ICopyPasteHandler'), ITool: Symbol('ITool'), IDefaultTool: Symbol('IDefaultTool'), IEditModeListener: Symbol('IEditModeListener'), IMarqueeBehavior: Symbol('IMarqueeBehavior'), IElementNavigator: Symbol('IElementNavigator'), ILocalElementNavigator: Symbol('ILocalElementNavigator'), IDiagramOptions: Symbol('IDiagramOptions'), IDiagramStartup: Symbol('IDiagramStartup'), IToolManager: Symbol('IToolManager') });
26
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qCAAgD;AAChD;;;;GAIG;AACU,QAAA,KAAK,mCACX,eAAY,KACf,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC,EACxD,6BAA6B,EAAE,MAAM,CAAC,wBAAwB,CAAC,EAC/D,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC,EAC9D,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC,EACrC,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAC9C,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC,EAClD,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAChD,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC,EAClD,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC,EACpD,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAC9C,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EACtB,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,EACpC,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAC9C,gBAAgB,EAAE,MAAM,CAAC,kBAAkB,CAAC,EAC5C,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC,EAC9C,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC,EACxD,eAAe,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAC1C,eAAe,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAC1C,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,IACtC"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@eclipse-glsp/sprotty",
3
+ "version": "1.1.0-next.97ea035.286+97ea035",
4
+ "description": "Augmented reexport of the sprotty API for GLSP",
5
+ "homepage": "https://www.eclipse.org/glsp/",
6
+ "bugs": "https://github.com/eclipse-glsp/glsp/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/eclipse-glsp/glsp-client.git"
10
+ },
11
+ "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
12
+ "author": {
13
+ "name": "Eclipse GLSP"
14
+ },
15
+ "contributors": [
16
+ {
17
+ "name": "Eclipse GLSP Project",
18
+ "email": "glsp-dev@eclipse.org",
19
+ "url": "https://projects.eclipse.org/projects/ecd.glsp"
20
+ }
21
+ ],
22
+ "main": "lib/index",
23
+ "types": "lib/index",
24
+ "files": [
25
+ "lib",
26
+ "src"
27
+ ],
28
+ "scripts": {
29
+ "build": "tsc -b",
30
+ "clean": "rimraf lib tsconfig.tsbuildinfo",
31
+ "lint": "eslint --ext .ts,.tsx ./src",
32
+ "lint:ci": "yarn lint -o eslint.xml -f checkstyle",
33
+ "prepare": "yarn clean && yarn build",
34
+ "watch": "tsc -w"
35
+ },
36
+ "dependencies": {
37
+ "@eclipse-glsp/protocol": "1.1.0-next.97ea035.286+97ea035",
38
+ "autocompleter": "^9.1.0",
39
+ "snabbdom": "^3.5.1",
40
+ "sprotty": "0.15.0-next.044bba2.13"
41
+ },
42
+ "devDependencies": {
43
+ "@types/jsdom": "^21.1.3",
44
+ "@vscode/codicons": "^0.0.25",
45
+ "snabbdom-to-html": "^7.1.0"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "gitHead": "97ea035fae88063e09b95dbc0ca914013ce75cef"
51
+ }
@@ -0,0 +1,124 @@
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, LabeledAction, Point } from '@eclipse-glsp/protocol';
17
+ import { injectable } from 'inversify';
18
+ import { VNode } from 'snabbdom';
19
+ import {
20
+ SButtonImpl as GButton,
21
+ SModelElementImpl as GModelElement,
22
+ SModelRootImpl as GModelRoot,
23
+ ICommand,
24
+ IActionHandler as SIActionHandler,
25
+ IButtonHandler as SIButtonHandler,
26
+ ICommandPaletteActionProvider as SICommandPaletteActionProvider,
27
+ IContextMenuItemProvider as SIContextMenuItemProvider,
28
+ KeyListener as SKeyListener,
29
+ MouseListener as SMouseListener
30
+ } from 'sprotty';
31
+
32
+ /*
33
+ * The GLSP-protocol comes with its own type definition for `Action`. However, sprotty
34
+ * also has a separate `Action` definition that is heavily integrated into core API concepts.
35
+ * While these two definitions are fully compatible it messes up IDE support for auto import
36
+ * when implementing/overriding these API Concepts. To bypass this issue we create sub types
37
+ * of the sprotty API concepts that use the Action definition from GLSP and export them instead.
38
+ */
39
+
40
+ /**
41
+ * An action handler accepts an action and reacts to it by returning either a command to be
42
+ * executed, or another action to be dispatched.
43
+ */
44
+ export interface IActionHandler extends SIActionHandler {
45
+ handle(action: Action): ICommand | Action | void;
46
+ }
47
+
48
+ export interface IButtonHandler extends SIButtonHandler {
49
+ buttonPressed(button: GButton): (Action | Promise<Action>)[];
50
+ }
51
+
52
+ export interface ICommandPaletteActionProvider extends SICommandPaletteActionProvider {
53
+ getActions(root: Readonly<GModelRoot>, text: string, lastMousePosition?: Point, index?: number): Promise<LabeledAction[]>;
54
+ }
55
+
56
+ export interface IContextMenuItemProvider extends SIContextMenuItemProvider {
57
+ getItems(root: Readonly<GModelRoot>, lastMousePosition?: Point): Promise<LabeledAction[]>;
58
+ }
59
+
60
+ @injectable()
61
+ export class KeyListener extends SKeyListener {
62
+ override keyDown(element: GModelElement, event: KeyboardEvent): Action[] {
63
+ return [];
64
+ }
65
+
66
+ override keyUp(element: GModelElement, event: KeyboardEvent): Action[] {
67
+ return [];
68
+ }
69
+ }
70
+
71
+ @injectable()
72
+ export class MouseListener extends SMouseListener {
73
+ override mouseOver(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
74
+ return [];
75
+ }
76
+
77
+ override mouseOut(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
78
+ return [];
79
+ }
80
+
81
+ override mouseEnter(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
82
+ return [];
83
+ }
84
+
85
+ override mouseLeave(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
86
+ return [];
87
+ }
88
+
89
+ override mouseDown(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
90
+ return [];
91
+ }
92
+
93
+ override mouseMove(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
94
+ return [];
95
+ }
96
+
97
+ override mouseUp(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
98
+ return [];
99
+ }
100
+
101
+ override wheel(target: GModelElement, event: WheelEvent): (Action | Promise<Action>)[] {
102
+ return [];
103
+ }
104
+
105
+ override doubleClick(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
106
+ return [];
107
+ }
108
+
109
+ override contextMenu(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
110
+ return [];
111
+ }
112
+
113
+ override dragOver(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
114
+ return [];
115
+ }
116
+
117
+ override drop(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] {
118
+ return [];
119
+ }
120
+
121
+ override decorate(vnode: VNode, element: GModelElement): VNode {
122
+ return vnode;
123
+ }
124
+ }
@@ -0,0 +1,48 @@
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
+ /* eslint-disable no-restricted-imports */
17
+
18
+ import { FeatureModule } from '@eclipse-glsp/protocol';
19
+ import sprottyButtonModule from 'sprotty/lib/features/button/di.config';
20
+ import sprottyEdgeIntersectionModule from 'sprotty/lib/features/edge-intersection/di.config';
21
+ import sprottyEdgeLayoutModule from 'sprotty/lib/features/edge-layout/di.config';
22
+ import {
23
+ edgeEditModule as sprottyEdgeEditModule,
24
+ labelEditUiModule as sprottyLabelEditUiModule
25
+ } from 'sprotty/lib/features/edit/di.config';
26
+ import sprottyExpandModule from 'sprotty/lib/features/expand/di.config';
27
+ import sprottyFadeModule from 'sprotty/lib/features/fade/di.config';
28
+ import sprottyMoveModule from 'sprotty/lib/features/move/di.config';
29
+ import sprottyUpdateModule from 'sprotty/lib/features/update/di.config';
30
+ import sprottyZorderModule from 'sprotty/lib/features/zorder/di.config';
31
+ import sprottyModelSourceModule from 'sprotty/lib/model-source/di.config';
32
+ import sprottyDefaultModule from 'sprotty/lib/base/di.config';
33
+ import sprottyOpenModule from 'sprotty/lib/features/open/di.config';
34
+
35
+ export const buttonModule = new FeatureModule(sprottyButtonModule.registry);
36
+ export const edgeEditModule = new FeatureModule(sprottyEdgeEditModule.registry);
37
+ export const edgeIntersectionModule = new FeatureModule(sprottyEdgeIntersectionModule.registry);
38
+ export const edgeLayoutModule = new FeatureModule(sprottyEdgeLayoutModule.registry);
39
+ export const expandModule = new FeatureModule(sprottyExpandModule.registry);
40
+ export const fadeModule = new FeatureModule(sprottyFadeModule.registry);
41
+ export const labelEditUiModule = new FeatureModule(sprottyLabelEditUiModule.registry);
42
+ export const modelSourceModule = new FeatureModule(sprottyModelSourceModule.registry);
43
+ export const moveModule = new FeatureModule(sprottyMoveModule.registry);
44
+ export const openModule = new FeatureModule(sprottyOpenModule.registry);
45
+ export const updateModule = new FeatureModule(sprottyUpdateModule.registry);
46
+ export const zorderModule = new FeatureModule(sprottyZorderModule.registry);
47
+
48
+ export { sprottyDefaultModule };
package/src/index.ts ADDED
@@ -0,0 +1,321 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2022-2023 STMicroelectronics and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+
17
+ /**
18
+ * Selective custom reexport of the sprotty API. Also provides augmentations/adaptions
19
+ * of certain type definitions for GLSP. Using this custom reexport allows us to gracefully
20
+ * update to newer sprotty versions without hard API breaks.
21
+ */
22
+
23
+ /**
24
+ * @eclipse-glsp/protocol
25
+ */
26
+ export * from '@eclipse-glsp/protocol';
27
+
28
+ export * from './action-override';
29
+
30
+ /*
31
+ * sprotty
32
+ */
33
+ // ------------------ Base ------------------
34
+
35
+ // Exclude definition for labeled actions
36
+ // export * from 'sprotty/lib/base/actions/action';
37
+ export * from 'sprotty/lib/base/actions/action-dispatcher';
38
+ export {
39
+ ActionHandlerRegistration,
40
+ ActionHandlerRegistry,
41
+ configureActionHandler,
42
+ onAction
43
+ } from 'sprotty/lib/base/actions/action-handler';
44
+ export * from 'sprotty/lib/base/actions/diagram-locker';
45
+
46
+ export * from 'sprotty/lib/base/animations/animation';
47
+ export * from 'sprotty/lib/base/animations/animation-frame-syncer';
48
+ export * from 'sprotty/lib/base/animations/easing';
49
+
50
+ export * from 'sprotty/lib/base/commands/command';
51
+ export * from 'sprotty/lib/base/commands/command-registration';
52
+ export * from 'sprotty/lib/base/commands/command-stack';
53
+ export * from 'sprotty/lib/base/commands/command-stack-options';
54
+
55
+ export * from 'sprotty/lib/base/features/initialize-canvas';
56
+ export * from 'sprotty/lib/base/features/set-model';
57
+ // Exclude SModelElementImpl as it as exported with augmentation module
58
+ export {
59
+ FeatureSet,
60
+ SChildElementImpl as GChildElement,
61
+ SModelElementImpl as GModelElement,
62
+ SModelRootImpl as GModelRoot,
63
+ SParentElementImpl as GParentElement,
64
+ IModelIndex,
65
+ ModelIndexImpl,
66
+ createRandomId,
67
+ isParent
68
+ } from 'sprotty/lib/base/model/smodel';
69
+
70
+ export {
71
+ CustomFeatures,
72
+ EMPTY_ROOT,
73
+ SModelElementConstructor as GModelElementConstructor,
74
+ SModelElementRegistration as GModelElementRegistration,
75
+ SModelFactory as GModelFactory,
76
+ IModelFactory,
77
+ // exported without alias we extend it in glsp-client to `GModelRegistry`
78
+ SModelRegistry,
79
+ createFeatureSet
80
+ } from 'sprotty/lib/base/model/smodel-factory';
81
+ export * from 'sprotty/lib/base/model/smodel-utils';
82
+
83
+ export * from 'sprotty/lib/base/ui-extensions/ui-extension';
84
+ export * from 'sprotty/lib/base/ui-extensions/ui-extension-registry';
85
+
86
+ export * from 'sprotty/lib/base/views/dom-helper';
87
+ export { KeyTool } from 'sprotty/lib/base/views/key-tool';
88
+ export { MouseEventKind, MousePositionTracker, MouseTool, PopupMouseTool } from 'sprotty/lib/base/views/mouse-tool';
89
+ export * from 'sprotty/lib/base/views/thunk-view';
90
+ export * from 'sprotty/lib/base/views/view';
91
+ export * from 'sprotty/lib/base/views/viewer';
92
+ export * from 'sprotty/lib/base/views/viewer-cache';
93
+ export * from 'sprotty/lib/base/views/viewer-options';
94
+ export * from 'sprotty/lib/base/views/vnode-postprocessor';
95
+ export * from 'sprotty/lib/base/views/vnode-utils';
96
+
97
+ // Exclude sprotty types and export augmented GLSP types instead
98
+ // export * from 'sprotty/lib/base/types';
99
+ export * from './types';
100
+
101
+ // ------------------ Features ------------------
102
+ export * from 'sprotty/lib/features/bounds/abstract-layout';
103
+ export * from 'sprotty/lib/features/bounds/bounds-manipulation';
104
+ export * from 'sprotty/lib/features/bounds/hbox-layout';
105
+ export * from 'sprotty/lib/features/bounds/hidden-bounds-updater';
106
+ export * from 'sprotty/lib/features/bounds/layout';
107
+ export * from 'sprotty/lib/features/bounds/layout-options';
108
+ export {
109
+ Alignable,
110
+ BoundsAware,
111
+ SShapeElementImpl as GShapeElement,
112
+ LayoutContainer,
113
+ LayoutableChild,
114
+ ModelLayoutOptions,
115
+ boundsFeature,
116
+ findChildrenAtPosition,
117
+ getAbsoluteBounds,
118
+ getAbsoluteClientBounds,
119
+ isAlignable,
120
+ isBoundsAware,
121
+ isLayoutContainer,
122
+ isLayoutableChild,
123
+ isSizeable,
124
+ layoutContainerFeature,
125
+ layoutableChildFeature
126
+ } from 'sprotty/lib/features/bounds/model';
127
+ // exclude stack layout as its not supported in GLSP
128
+ // export * from 'sprotty/lib/features/bounds/stack-layout';
129
+ export * from 'sprotty/lib/features/bounds/vbox-layout';
130
+ export * from 'sprotty/lib/features/bounds/views';
131
+
132
+ export { ButtonHandlerRegistry, IButtonHandlerRegistration, configureButtonHandler } from 'sprotty/lib/features/button/button-handler';
133
+ export { SButtonImpl as GButton, SButtonSchema as GButtonSchema } from 'sprotty/lib/features/button/model';
134
+
135
+ export {
136
+ CommandPaletteActionProviderRegistry,
137
+ RevealNamedElementActionProvider
138
+ } from 'sprotty/lib/features/command-palette/action-providers';
139
+ export * from 'sprotty/lib/features/command-palette/command-palette';
140
+
141
+ // Exclude menu item. Aready provided by glsp-protocol
142
+ export { Anchor, IContextMenuService, IContextMenuServiceProvider } from 'sprotty/lib/features/context-menu/context-menu-service';
143
+ export { ContextMenuProviderRegistry, DeleteContextMenuItemProvider } from 'sprotty/lib/features/context-menu/menu-providers';
144
+ export * from 'sprotty/lib/features/context-menu/mouse-listener';
145
+
146
+ export * from 'sprotty/lib/features/edge-layout/di.config';
147
+ export * from 'sprotty/lib/features/edge-layout/edge-layout';
148
+ export * from 'sprotty/lib/features/edge-layout/model';
149
+ // Exclude client-side creation features (not supported in GLSP)
150
+ // export * from 'sprotty/lib/features/edit/create';
151
+ // export * from 'sprotty/lib/features/edit/create-on-drag';
152
+ export * from 'sprotty/lib/features/edit/delete';
153
+ export * from 'sprotty/lib/features/edit/edit-label';
154
+ export * from 'sprotty/lib/features/edit/edit-label-ui';
155
+ export * from 'sprotty/lib/features/edit/edit-routing';
156
+ export * from 'sprotty/lib/features/edit/model';
157
+ // export * from 'sprotty/lib/features/edit/reconnect';
158
+
159
+ export * from 'sprotty/lib/features/expand/expand';
160
+ export * from 'sprotty/lib/features/expand/model';
161
+ export * from 'sprotty/lib/features/expand/views';
162
+ // Exclude RequestExportSvgAction. Already provided by glsp-protocol
163
+ export { ExportSvgCommand, ExportSvgKeyListener, ExportSvgPostprocessor } from 'sprotty/lib/features/export/export';
164
+ export * from 'sprotty/lib/features/export/model';
165
+ // Exclude ExportSvgAction. Already provided by glsp-protocol
166
+ export { SvgExporter } from 'sprotty/lib/features/export/svg-exporter';
167
+
168
+ export * from 'sprotty/lib/features/fade/fade';
169
+ export * from 'sprotty/lib/features/fade/model';
170
+
171
+ export * from 'sprotty/lib/features/hover/hover';
172
+ export * from 'sprotty/lib/features/hover/model';
173
+ export * from 'sprotty/lib/features/hover/popup-position-updater';
174
+
175
+ // Alias SModel types
176
+ export * from 'sprotty/lib/features/decoration/decoration-placer';
177
+ export {
178
+ Decoration,
179
+ SDecoration as GDecoration,
180
+ SIssue as GIssue,
181
+ SIssueSeverity as GIssueSeverity,
182
+ // Export as is, we extend it glsp-client to `GIssueMarker`
183
+ SIssueMarker
184
+ } from 'sprotty/lib/features/decoration/model';
185
+ export * from 'sprotty/lib/features/decoration/views';
186
+
187
+ export * from 'sprotty/lib/features/edge-intersection/intersection-finder';
188
+ export * from 'sprotty/lib/features/edge-intersection/sweepline';
189
+
190
+ export * from 'sprotty/lib/features/move/model';
191
+ export * from 'sprotty/lib/features/move/move';
192
+ export * from 'sprotty/lib/features/move/snap';
193
+
194
+ export * from 'sprotty/lib/features/nameable/model';
195
+
196
+ export * from 'sprotty/lib/features/open/model';
197
+ export * from 'sprotty/lib/features/open/open';
198
+
199
+ export * from 'sprotty/lib/features/projection/model';
200
+ export * from 'sprotty/lib/features/projection/views';
201
+
202
+ export * from 'sprotty/lib/features/routing/abstract-edge-router';
203
+ export * from 'sprotty/lib/features/routing/anchor';
204
+ export * from 'sprotty/lib/features/routing/bezier-anchors';
205
+ export * from 'sprotty/lib/features/routing/bezier-edge-router';
206
+ export * from 'sprotty/lib/features/routing/manhattan-anchors';
207
+ export * from 'sprotty/lib/features/routing/manhattan-edge-router';
208
+ // Alias SModel types
209
+ export {
210
+ Connectable,
211
+ SConnectableElementImpl as GConnectableElement,
212
+ SDanglingAnchorImpl as GDanglingAnchor,
213
+ SRoutableElementImpl as GRoutableElement,
214
+ SRoutingHandleImpl as GRoutingHandle,
215
+ RoutingHandleKind,
216
+ connectableFeature,
217
+ edgeInProgressID,
218
+ edgeInProgressTargetHandleID,
219
+ getAbsoluteRouteBounds,
220
+ getRouteBounds,
221
+ isConnectable
222
+ } from 'sprotty/lib/features/routing/model';
223
+ export * from 'sprotty/lib/features/routing/polyline-anchors';
224
+ export * from 'sprotty/lib/features/routing/polyline-edge-router';
225
+ export * from 'sprotty/lib/features/routing/routing';
226
+ export * from 'sprotty/lib/features/routing/views';
227
+
228
+ export * from 'sprotty/lib/features/select/model';
229
+ // Alias Select commands with sprotty prefix to avoid clash with glsp-client
230
+ export {
231
+ GetSelectionCommand,
232
+ SelectKeyboardListener,
233
+ SelectMouseListener,
234
+ SelectAllCommand as SprottySelectAllCommand,
235
+ SelectCommand as SprottySelectCommand
236
+ } from 'sprotty/lib/features/select/select';
237
+
238
+ // Exclude undo-redo as the client provides its own implementation
239
+ // export * from 'sprotty/lib/features/undo-redo/undo-redo';
240
+
241
+ export * from 'sprotty/lib/features/update/model-matching';
242
+ export * from 'sprotty/lib/features/update/update-model';
243
+
244
+ export * from 'sprotty/lib/features/viewport/center-fit';
245
+ export * from 'sprotty/lib/features/viewport/model';
246
+ export * from 'sprotty/lib/features/viewport/scroll';
247
+ // Alias SModel types
248
+ export * from 'sprotty/lib/features/viewport/viewport';
249
+ export { ViewportRootElementImpl as GViewportRootElement } from 'sprotty/lib/features/viewport/viewport-root';
250
+ export * from 'sprotty/lib/features/viewport/zoom';
251
+
252
+ export * from 'sprotty/lib/features/zorder/zorder';
253
+
254
+ // ------------------ Graph ------------------
255
+ // Alias SModel types
256
+ export {
257
+ SCompartmentImpl as GCompartment,
258
+ SGraphIndex as GGraphIndex,
259
+ SLabelImpl as GLabel,
260
+ SNodeImpl as GNode,
261
+ SPortImpl as GPort,
262
+ // Exported as is, we extend it in glsp-client to GEdge
263
+ SEdgeImpl,
264
+ // Exported as is, we extend it in glsp-client to GGraph
265
+ SGraphImpl
266
+ } from 'sprotty/lib/graph/sgraph';
267
+ // Alias SModel types
268
+ export {
269
+ BezierCurveEdgeView,
270
+ SBezierControlHandleView as GBezierControlHandleView,
271
+ SBezierCreateHandleView as GBezierCreateHandleView,
272
+ SCompartmentView as GCompartmentView,
273
+ SGraphView as GGraphView,
274
+ SLabelView as GLabelView,
275
+ SRoutingHandleView as GRoutingHandleView,
276
+ JumpingPolylineEdgeView,
277
+ PolylineEdgeView,
278
+ PolylineEdgeViewWithGapsOnIntersections
279
+ } from 'sprotty/lib/graph/views';
280
+
281
+ export * from './feature-modules';
282
+
283
+ // ------------------ Library ------------------
284
+
285
+ export * from 'sprotty/lib/lib/generic-views';
286
+ export * from 'sprotty/lib/lib/html-views';
287
+ export * from 'sprotty/lib/lib/jsx';
288
+ // Alias SModel types
289
+ export {
290
+ CircularNode,
291
+ CircularPort,
292
+ DiamondNode,
293
+ ForeignObjectElementImpl as GForeignObjectElement,
294
+ HtmlRootImpl as GHtmlRoot,
295
+ PreRenderedElementImpl as GPreRenderedElement,
296
+ ShapedPreRenderedElementImpl as GShapedPreRenderedElement,
297
+ RectangularNode,
298
+ RectangularPort
299
+ } from 'sprotty/lib/lib/model';
300
+ export * from 'sprotty/lib/lib/modules';
301
+ export * from 'sprotty/lib/lib/svg-views';
302
+
303
+ // ------------------ Model Source ------------------
304
+ export * from 'sprotty/lib/model-source/commit-model';
305
+ // Exclude as not supported in GLSP
306
+ // export * from 'sprotty/lib/model-source/diagram-server';
307
+ // export * from 'sprotty/lib/model-source/local-model-source';
308
+ export * from 'sprotty/lib/model-source/logging';
309
+ export * from 'sprotty/lib/model-source/model-source';
310
+ // export * from 'sprotty/lib/model-source/websocket';
311
+
312
+ // ------------------ Utilities ------------------
313
+ export * from 'sprotty/lib/utils/browser';
314
+ export * from 'sprotty/lib/utils/codicon';
315
+ export * from 'sprotty/lib/utils/color';
316
+ export * from 'sprotty/lib/utils/geometry';
317
+ export * from 'sprotty/lib/utils/inversify';
318
+ export * from 'sprotty/lib/utils/iterable';
319
+ export * from 'sprotty/lib/utils/keyboard';
320
+ export * from 'sprotty/lib/utils/logging';
321
+ export * from 'sprotty/lib/utils/registry';
package/src/types.ts ADDED
@@ -0,0 +1,43 @@
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 { TYPES as SprottyTYPES } from 'sprotty';
17
+ /**
18
+ * Reexport of the TYPES namespace of sprotty augments with additional GLSP specific service
19
+ * identifiers.
20
+ *
21
+ */
22
+ export const TYPES = {
23
+ ...SprottyTYPES,
24
+ IAsyncClipboardService: Symbol('IAsyncClipboardService'),
25
+ IEditorContextServiceProvider: Symbol('IEditorContextProvider'),
26
+ IFeedbackActionDispatcher: Symbol('IFeedbackActionDispatcher'),
27
+ IToolFactory: Symbol('Factory<Tool>'),
28
+ ITypeHintProvider: Symbol('ITypeHintProvider'),
29
+ IMovementRestrictor: Symbol('IMovementRestrictor'),
30
+ ISelectionListener: Symbol('ISelectionListener'),
31
+ ISModelRootListener: Symbol('ISModelRootListener'),
32
+ IContextMenuProvider: Symbol('IContextMenuProvider'),
33
+ ICopyPasteHandler: Symbol('ICopyPasteHandler'),
34
+ ITool: Symbol('ITool'),
35
+ IDefaultTool: Symbol('IDefaultTool'),
36
+ IEditModeListener: Symbol('IEditModeListener'),
37
+ IMarqueeBehavior: Symbol('IMarqueeBehavior'),
38
+ IElementNavigator: Symbol('IElementNavigator'),
39
+ ILocalElementNavigator: Symbol('ILocalElementNavigator'),
40
+ IDiagramOptions: Symbol('IDiagramOptions'),
41
+ IDiagramStartup: Symbol('IDiagramStartup'),
42
+ IToolManager: Symbol('IToolManager')
43
+ };