@eclipse-glsp/client 2.9.0-next.20 → 2.9.0-next.21
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/default-modules.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { BindingContext, ContainerConfiguration, FeatureModule, ViewerOptions } from '@eclipse-glsp/sprotty';
|
|
17
|
-
import {
|
|
17
|
+
import { interfaces } from 'inversify';
|
|
18
18
|
import { IDiagramOptions } from './base/model/diagram-loader';
|
|
19
19
|
export declare const DEFAULT_MODULES: readonly [FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule, FeatureModule];
|
|
20
20
|
/**
|
|
@@ -38,6 +38,8 @@ export declare function configureDiagramOptions(context: BindingContext, diagram
|
|
|
38
38
|
/**
|
|
39
39
|
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
40
40
|
* Additional modules can be passed as direct arguments or as part of a {@link ModuleConfiguration}.
|
|
41
|
+
* Accepts any structural `interfaces.Container`, so containers typed by a different inversify entry point
|
|
42
|
+
* (e.g. the ES module typings re-exported by Theia >= 1.77) can be initialized as well.
|
|
41
43
|
* ```typescript
|
|
42
44
|
* const container= createDiagramContainer(myModule1, myModule2)
|
|
43
45
|
* // or
|
|
@@ -63,5 +65,5 @@ export declare function configureDiagramOptions(context: BindingContext, diagram
|
|
|
63
65
|
* @throws An error if the first module to load is not the `defaultModule` (or an equivalent custom replacement module)
|
|
64
66
|
* @returns The initialized container.
|
|
65
67
|
*/
|
|
66
|
-
export declare function initializeDiagramContainer(container:
|
|
68
|
+
export declare function initializeDiagramContainer<C extends interfaces.Container>(container: C, ...containerConfigurations: ContainerConfiguration): C;
|
|
67
69
|
//# sourceMappingURL=default-modules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-modules.d.ts","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,cAAc,EACd,sBAAsB,EACtB,aAAa,EAEb,aAAa,EAShB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"default-modules.d.ts","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,cAAc,EACd,sBAAsB,EACtB,aAAa,EAEb,aAAa,EAShB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAiC9D,eAAO,MAAM,eAAe,mmBAyClB,CAAC;AAEX;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,eAAe,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAIjI;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,cAAc,EACvB,cAAc,EAAE,eAAe,EAC/B,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACvC,IAAI,CAQN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,EACrE,SAAS,EAAE,CAAC,EACZ,GAAG,uBAAuB,EAAE,sBAAsB,GACnD,CAAC,CAYH"}
|
package/lib/default-modules.js
CHANGED
|
@@ -125,6 +125,8 @@ function configureDiagramOptions(context, diagramOptions, viewerOptions) {
|
|
|
125
125
|
/**
|
|
126
126
|
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
127
127
|
* Additional modules can be passed as direct arguments or as part of a {@link ModuleConfiguration}.
|
|
128
|
+
* Accepts any structural `interfaces.Container`, so containers typed by a different inversify entry point
|
|
129
|
+
* (e.g. the ES module typings re-exported by Theia >= 1.77) can be initialized as well.
|
|
128
130
|
* ```typescript
|
|
129
131
|
* const container= createDiagramContainer(myModule1, myModule2)
|
|
130
132
|
* // or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-modules.js","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;AAElF,mDAc+B;AAE/B,0DAAsD;AAEtD,mEAA+D;AAC/D,iFAA6E;AAC7E,8FAAyF;AACzF,qFAAgF;AAChF,iFAA2E;AAC3E,+EAA2E;AAC3E,iGAA4F;AAC5F,qEAAgE;AAChE,0EAAqE;AACrE,gEAA4D;AAC5D,wFAAkF;AAClF,+EAA0E;AAC1E,mEAA+D;AAC/D,+EAA2E;AAC3E,sEAAkE;AAClE,2FAA6H;AAC7H,mEAA+D;AAC/D,6GAAuG;AACvG,mEAA+D;AAC/D,qFAAgF;AAChF,qFAAgF;AAChF,wGAAkG;AAClG,yFAAoF;AACpF,gGAA8F;AAC9F,kFAAiF;AACjF,0GAAyG;AACzG,8FAA6F;AAC7F,oFAA8E;AAC9E,iFAAmG;AACnG,2EAAsE;AACtE,mEAA+D;AAElD,QAAA,eAAe,GAAG;IAC3B,8BAAa;IACb,sBAAY;IACZ,gCAAsB;IACtB,0BAAgB;IAChB,sBAAY;IACZ,6BAAY;IACZ,oBAAU;IACV,4BAAY;IACZ,6CAAoB;IACpB,uCAAiB;IACjB,oCAAgB;IAChB,mCAAe;IACf,0BAAW;IACX,4BAAY;IACZ,oCAAe;IACf,iCAAc;IACd,wCAAiB;IACjB,4BAAY;IACZ,0CAAqB;IACrB,mCAAe;IACf,2BAAiB;IACjB,sDAAwB;IACxB,oCAAgB;IAChB,8BAAa;IACb,uCAAiB;IACjB,8CAAsB;IACtB,qCAAkB;IAClB,yCAAkB;IAClB,+CAAqB;IACrB,6CAAsB;IACtB,kDAAsB;IACtB,qDAA0B;IAC1B,4CAAmB;IACnB,qCAAgB;IAChB,4BAAY;IACZ,uCAAiB;IACjB,4BAAY;IACZ,4BAAY;IACZ,2CAAmB;IACnB,6DAAqC;CAC/B,CAAC;AAEX;;;;;;;GAOG;AACH,oCAA2C,cAA+B,EAAE,aAAsC;IAC9G,OAAO,IAAI,uBAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CACvD,uBAAuB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,aAAa,CAAC,CAC5F,CAAC;AACN,CAAC;AAED;;;;;;;GAOG;AACH,iCACI,OAAuB,EACvB,cAA+B,EAC/B,aAAsC;IAEtC,IAAA,gCAAsB,EAAC,OAAO,EAAE;QAC5B,OAAO,EAAE,cAAc,CAAC,QAAQ;QAChC,SAAS,EAAE,cAAc,CAAC,QAAQ,GAAG,SAAS;QAC9C,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE;QACjC,GAAG,aAAa;KACnB,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,eAAe,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;AACxE,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"default-modules.js","sourceRoot":"","sources":["../src/default-modules.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFA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|
|
4
4
|
"description": "A sprotty-based client for GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"diagram",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@eclipse-glsp/sprotty": "2.9.0-next.
|
|
45
|
+
"@eclipse-glsp/sprotty": "2.9.0-next.21",
|
|
46
46
|
"@vscode/codicons": "^0.0.44",
|
|
47
47
|
"autocompleter": "^9.1.2",
|
|
48
48
|
"file-saver": "^2.0.5",
|
package/src/default-modules.ts
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
modelSourceModule,
|
|
30
30
|
resolveContainerConfiguration
|
|
31
31
|
} from '@eclipse-glsp/sprotty';
|
|
32
|
-
import {
|
|
32
|
+
import { interfaces } from 'inversify';
|
|
33
33
|
import { defaultModule } from './base/default.module';
|
|
34
34
|
import { IDiagramOptions } from './base/model/diagram-loader';
|
|
35
35
|
import { boundsModule } from './features/bounds/bounds-module';
|
|
@@ -146,6 +146,8 @@ export function configureDiagramOptions(
|
|
|
146
146
|
/**
|
|
147
147
|
* Initializes a GLSP Diagram container with the GLSP default modules and the specified custom `modules`.
|
|
148
148
|
* Additional modules can be passed as direct arguments or as part of a {@link ModuleConfiguration}.
|
|
149
|
+
* Accepts any structural `interfaces.Container`, so containers typed by a different inversify entry point
|
|
150
|
+
* (e.g. the ES module typings re-exported by Theia >= 1.77) can be initialized as well.
|
|
149
151
|
* ```typescript
|
|
150
152
|
* const container= createDiagramContainer(myModule1, myModule2)
|
|
151
153
|
* // or
|
|
@@ -171,7 +173,10 @@ export function configureDiagramOptions(
|
|
|
171
173
|
* @throws An error if the first module to load is not the `defaultModule` (or an equivalent custom replacement module)
|
|
172
174
|
* @returns The initialized container.
|
|
173
175
|
*/
|
|
174
|
-
export function initializeDiagramContainer
|
|
176
|
+
export function initializeDiagramContainer<C extends interfaces.Container>(
|
|
177
|
+
container: C,
|
|
178
|
+
...containerConfigurations: ContainerConfiguration
|
|
179
|
+
): C {
|
|
175
180
|
const modules = resolveContainerConfiguration(...DEFAULT_MODULES, ...containerConfigurations);
|
|
176
181
|
// The `defaultModule` (or a custom replacement module with the same `featureId`) should be the first module that is
|
|
177
182
|
// loaded into the container
|