@hydranium/glsp-client 1.0.0-next.380 → 1.0.0-next.382
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/README.md +22 -7
- package/lib/diagram-message-details.d.ts +18 -0
- package/lib/diagram-message-details.d.ts.map +1 -0
- package/lib/diagram-message-details.js +22 -0
- package/lib/diagram-message-details.js.map +1 -0
- package/lib/diagram-message-dismiss.d.ts +18 -0
- package/lib/diagram-message-dismiss.d.ts.map +1 -0
- package/lib/diagram-message-dismiss.js +22 -0
- package/lib/diagram-message-dismiss.js.map +1 -0
- package/lib/diagram-mount.d.ts +4 -0
- package/lib/diagram-mount.d.ts.map +1 -1
- package/lib/diagram-mount.js +17 -0
- package/lib/diagram-mount.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/message-overlay.d.ts +59 -0
- package/lib/message-overlay.d.ts.map +1 -0
- package/lib/message-overlay.js +230 -0
- package/lib/message-overlay.js.map +1 -0
- package/lib/messages/index.d.ts +2 -0
- package/lib/messages/index.d.ts.map +1 -1
- package/lib/messages/index.js +5 -1
- package/lib/messages/index.js.map +1 -1
- package/lib/reattach.d.ts +15 -0
- package/lib/reattach.d.ts.map +1 -0
- package/lib/reattach.js +26 -0
- package/lib/reattach.js.map +1 -0
- package/lib/status-overlay.d.ts.map +1 -1
- package/lib/status-overlay.js +2 -8
- package/lib/status-overlay.js.map +1 -1
- package/package.json +12 -6
- package/src/diagram-message-details.ts +20 -0
- package/src/diagram-message-dismiss.ts +20 -0
- package/src/diagram-mount.ts +19 -0
- package/src/index.ts +3 -0
- package/src/message-overlay.ts +254 -0
- package/src/messages/index.ts +2 -0
- package/src/reattach.ts +27 -0
- package/src/status-overlay.ts +6 -8
- package/style/message-overlay.css +74 -0
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ VS Code webview, or a plain browser page. It builds on `@eclipse-glsp/client`.
|
|
|
22
22
|
- One binder that mounts all of it in a diagram container.
|
|
23
23
|
- For a plain page, one call that builds the container, loads the model and
|
|
24
24
|
supplies what a shell would: framing, canvas bounds that follow the
|
|
25
|
-
element's size and position,
|
|
26
|
-
warning about.
|
|
25
|
+
element's size and position, the server's messages and progress shown on
|
|
26
|
+
the diagram, touch input, and a context menu GLSP stops warning about.
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
@@ -121,16 +121,31 @@ A host that calls `createGlspClientModule` itself counts them only when it
|
|
|
121
121
|
passes `trackEditsInFlight: true`, and reads them from
|
|
122
122
|
`HydraniumGlspActionDispatcher`.
|
|
123
123
|
|
|
124
|
+
The mount shows the server's messages, such as a refused undo, and its
|
|
125
|
+
progress reports in the diagram's bottom-right corner. A message shows its
|
|
126
|
+
severity's icon and is edged in its `--glsp-*-foreground` colour, and a
|
|
127
|
+
progress report in the info one, with a spinner until it reports a
|
|
128
|
+
percentage. The text keeps your page's colour over
|
|
129
|
+
`--glsp-issue-background`, whose default is light, so a dark page sets that
|
|
130
|
+
variable to one of its own surfaces. To show them in your page's own
|
|
131
|
+
notifications instead, or to translate the dismiss and details labels,
|
|
132
|
+
subclass `HydraniumMessageOverlay`, override `showMessage` and the progress
|
|
133
|
+
methods or `dismissLabel` and `detailsLabel`, and rebind
|
|
134
|
+
`HydraniumMessageOverlay` to your subclass in a module only your page
|
|
135
|
+
loads, passed to your initializer after the mount's modules. A diagram
|
|
136
|
+
module that Theia or VS Code also loads has no overlay bound to rebind.
|
|
137
|
+
|
|
124
138
|
For a browser page, see *Host in a browser* in
|
|
125
139
|
[Adopting Hydranium](https://github.com/eclipse-emfcloud/hydranium/blob/main/docs/ADOPTING.md).
|
|
126
140
|
|
|
127
141
|
## Entry points
|
|
128
142
|
|
|
129
|
-
| Subpath
|
|
130
|
-
|
|
|
131
|
-
| `.`
|
|
132
|
-
| `./messages`
|
|
133
|
-
| `./testing`
|
|
143
|
+
| Subpath | Use it for | Runs in |
|
|
144
|
+
| ----------------------------- | --------------------------------------------------------- | --------------- |
|
|
145
|
+
| `.` | The classes, the binder, the DI tokens and the page mount | browser |
|
|
146
|
+
| `./messages` | The codes of the messages this package raises | browser-neutral |
|
|
147
|
+
| `./testing` | A binding recorder for testing your modules | browser-neutral |
|
|
148
|
+
| `./style/message-overlay.css` | The message overlay's stylesheet, imported for you | browser |
|
|
134
149
|
|
|
135
150
|
The root loads `@eclipse-glsp/client`, whose graph imports stylesheets, so
|
|
136
151
|
your bundler needs a CSS loader. The subpaths need a TypeScript
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/**
|
|
10
|
+
* The label of the disclosure that holds a server message's details on the
|
|
11
|
+
* diagram. Formatted in English by `HydraniumMessageOverlay`. A host that knows
|
|
12
|
+
* the reading user's locale overrides its `detailsLabel`.
|
|
13
|
+
*
|
|
14
|
+
* In a module of its own, apart from the overlay, so the `./messages` barrel
|
|
15
|
+
* loads no `@eclipse-glsp/client`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DIAGRAM_MESSAGE_DETAILS: import("@hydranium/protocol").MessageDefinition<"Details">;
|
|
18
|
+
//# sourceMappingURL=diagram-message-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram-message-details.d.ts","sourceRoot":"","sources":["../src/diagram-message-details.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,4DAA4E,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the MIT License which is available in the project root.
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: MIT
|
|
9
|
+
********************************************************************************/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.DIAGRAM_MESSAGE_DETAILS = void 0;
|
|
12
|
+
const protocol_1 = require("@hydranium/protocol");
|
|
13
|
+
/**
|
|
14
|
+
* The label of the disclosure that holds a server message's details on the
|
|
15
|
+
* diagram. Formatted in English by `HydraniumMessageOverlay`. A host that knows
|
|
16
|
+
* the reading user's locale overrides its `detailsLabel`.
|
|
17
|
+
*
|
|
18
|
+
* In a module of its own, apart from the overlay, so the `./messages` barrel
|
|
19
|
+
* loads no `@eclipse-glsp/client`.
|
|
20
|
+
*/
|
|
21
|
+
exports.DIAGRAM_MESSAGE_DETAILS = (0, protocol_1.defineMessage)('hydranium/glsp-client/diagram-message-details', 'Details');
|
|
22
|
+
//# sourceMappingURL=diagram-message-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram-message-details.js","sourceRoot":"","sources":["../src/diagram-message-details.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,kDAAoD;AAEpD;;;;;;;GAOG;AACU,QAAA,uBAAuB,GAAG,IAAA,wBAAa,EAAC,+CAA+C,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/**
|
|
10
|
+
* The label of the button that closes a server message on the diagram.
|
|
11
|
+
* Formatted in English by `HydraniumMessageOverlay`. A host that knows the
|
|
12
|
+
* reading user's locale overrides its `dismissLabel`.
|
|
13
|
+
*
|
|
14
|
+
* In a module of its own, apart from the overlay, so the `./messages` barrel
|
|
15
|
+
* loads no `@eclipse-glsp/client`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DIAGRAM_MESSAGE_DISMISS: import("@hydranium/protocol").MessageDefinition<"Dismiss">;
|
|
18
|
+
//# sourceMappingURL=diagram-message-dismiss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram-message-dismiss.d.ts","sourceRoot":"","sources":["../src/diagram-message-dismiss.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,4DAA4E,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the MIT License which is available in the project root.
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: MIT
|
|
9
|
+
********************************************************************************/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.DIAGRAM_MESSAGE_DISMISS = void 0;
|
|
12
|
+
const protocol_1 = require("@hydranium/protocol");
|
|
13
|
+
/**
|
|
14
|
+
* The label of the button that closes a server message on the diagram.
|
|
15
|
+
* Formatted in English by `HydraniumMessageOverlay`. A host that knows the
|
|
16
|
+
* reading user's locale overrides its `dismissLabel`.
|
|
17
|
+
*
|
|
18
|
+
* In a module of its own, apart from the overlay, so the `./messages` barrel
|
|
19
|
+
* loads no `@eclipse-glsp/client`.
|
|
20
|
+
*/
|
|
21
|
+
exports.DIAGRAM_MESSAGE_DISMISS = (0, protocol_1.defineMessage)('hydranium/glsp-client/diagram-message-dismiss', 'Dismiss');
|
|
22
|
+
//# sourceMappingURL=diagram-message-dismiss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagram-message-dismiss.js","sourceRoot":"","sources":["../src/diagram-message-dismiss.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,kDAAoD;AAEpD;;;;;;;GAOG;AACU,QAAA,uBAAuB,GAAG,IAAA,wBAAa,EAAC,+CAA+C,EAAE,SAAS,CAAC,CAAC"}
|
package/lib/diagram-mount.d.ts
CHANGED
|
@@ -96,6 +96,10 @@ export declare const DIAGRAM_FIT_PADDING = 24;
|
|
|
96
96
|
* that scrolls, send the element's box in page coordinates whenever it
|
|
97
97
|
* differs from the model's. A zero-sized box, which a pane dragged shut
|
|
98
98
|
* reports, is skipped: a zero canvas culls the whole model.
|
|
99
|
+
* - **Server messages.** GLSP's standalone modules only log the server's
|
|
100
|
+
* messages and progress reports, so a refused undo changes nothing the user
|
|
101
|
+
* sees. {@link HydraniumMessageOverlay} shows them on the diagram instead.
|
|
102
|
+
* Rebind it to a subclass to show them elsewhere.
|
|
99
103
|
* - **Touch input.** sprotty binds mouse events only; see
|
|
100
104
|
* {@link enableTouchDragging}. Give the element `touch-action: none`.
|
|
101
105
|
* - **The context menu.** GLSP warns on every container built without a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram-mount.d.ts","sourceRoot":"","sources":["../src/diagram-mount.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"diagram-mount.d.ts","sourceRoot":"","sources":["../src/diagram-mount.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,KAAK,sBAAsB,EAY7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,UAAU,EAAwB,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAmB,MA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inversify_1 = require("inversify");
|
|
|
16
16
|
const action_dispatcher_1 = require("./action-dispatcher");
|
|
17
17
|
const diagram_loader_1 = require("./diagram-loader");
|
|
18
18
|
const glsp_client_module_1 = require("./glsp-client-module");
|
|
19
|
+
const message_overlay_1 = require("./message-overlay");
|
|
19
20
|
const touch_input_1 = require("./touch-input");
|
|
20
21
|
const types_1 = require("./types");
|
|
21
22
|
/**
|
|
@@ -52,6 +53,10 @@ exports.DIAGRAM_FIT_PADDING = 24;
|
|
|
52
53
|
* that scrolls, send the element's box in page coordinates whenever it
|
|
53
54
|
* differs from the model's. A zero-sized box, which a pane dragged shut
|
|
54
55
|
* reports, is skipped: a zero canvas culls the whole model.
|
|
56
|
+
* - **Server messages.** GLSP's standalone modules only log the server's
|
|
57
|
+
* messages and progress reports, so a refused undo changes nothing the user
|
|
58
|
+
* sees. {@link HydraniumMessageOverlay} shows them on the diagram instead.
|
|
59
|
+
* Rebind it to a subclass to show them elsewhere.
|
|
55
60
|
* - **Touch input.** sprotty binds mouse events only; see
|
|
56
61
|
* {@link enableTouchDragging}. Give the element `touch-action: none`.
|
|
57
62
|
* - **The context menu.** GLSP warns on every container built without a
|
|
@@ -84,6 +89,18 @@ async function mountGlspDiagram(options) {
|
|
|
84
89
|
// a token those modules bind.
|
|
85
90
|
const hydraniumModule = new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
86
91
|
(0, glsp_client_module_1.createGlspClientModule)({ bind, unbind, isBound, rebind }, { logger: options.logger, trackEditsInFlight: true });
|
|
92
|
+
// The fallback is what the standalone modules register for the server's
|
|
93
|
+
// messages and progress, and it only logs them. A singleton, since GLSP
|
|
94
|
+
// resolves it once per action kind and a host may rebind the overlay
|
|
95
|
+
// without a scope.
|
|
96
|
+
bind(message_overlay_1.HydraniumMessageOverlay).toSelf().inSingletonScope();
|
|
97
|
+
if (isBound(client_1.FallbackActionHandler)) {
|
|
98
|
+
rebind(client_1.FallbackActionHandler)
|
|
99
|
+
.toDynamicValue(context => context.container.get(message_overlay_1.HydraniumMessageOverlay))
|
|
100
|
+
.inSingletonScope();
|
|
101
|
+
// Through the fallback, so the instance started is the one showing the messages.
|
|
102
|
+
bind(client_1.TYPES.IDiagramStartup).toService(client_1.FallbackActionHandler);
|
|
103
|
+
}
|
|
87
104
|
});
|
|
88
105
|
const container = options.initializeDiagramContainer(new inversify_1.Container(), (0, client_1.createDiagramOptionsModule)(diagramOptions), client_1.STANDALONE_MODULE_CONFIG, hydraniumModule);
|
|
89
106
|
// After the container is built rather than in a module, so the host's own
|
package/lib/diagram-mount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram-mount.js","sourceRoot":"","sources":["../src/diagram-mount.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;AAElF,
|
|
1
|
+
{"version":3,"file":"diagram-mount.js","sourceRoot":"","sources":["../src/diagram-mount.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;AAElF,iDAc8B;AAC9B,kDAAyF;AACzF,yCAAuD;AACvD,2DAAoE;AACpE,qDAAmF;AAEnF,6DAA8D;AAC9D,uDAA4D;AAC5D,+CAAoD;AACpD,mCAA+C;AAuD/C;;;;GAIG;AACU,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACI,KAAK,2BAA2B,OAAgC;IACpE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAC1B,IAAI,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;IAC5G,CAAC;IACD,MAAM,cAAc,GAAoB;QACrC,QAAQ,EAAE,KAAK,CAAC,EAAE;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,kBAAkB,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU;QAClD,SAAS,E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
export * from './diagram-loader';
|
|
12
|
+
export * from './diagram-message-details';
|
|
13
|
+
export * from './diagram-message-dismiss';
|
|
12
14
|
export * from './diagram-mount';
|
|
13
15
|
export * from './edge';
|
|
14
16
|
export * from './glsp-client';
|
|
15
17
|
export * from './glsp-connection';
|
|
16
18
|
export * from './glsp-client-module';
|
|
17
19
|
export * from './hidden-bounds-updater';
|
|
20
|
+
export * from './message-overlay';
|
|
18
21
|
export * from './select-mouse-listener';
|
|
19
22
|
export * from './sprotty-logger-adapter';
|
|
20
23
|
export * from './status-overlay';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAOlF,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAOlF,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -30,12 +30,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
30
30
|
__exportStar(require("./action-dispatcher"), exports);
|
|
31
31
|
__exportStar(require("./diagram-load-failed"), exports);
|
|
32
32
|
__exportStar(require("./diagram-loader"), exports);
|
|
33
|
+
__exportStar(require("./diagram-message-details"), exports);
|
|
34
|
+
__exportStar(require("./diagram-message-dismiss"), exports);
|
|
33
35
|
__exportStar(require("./diagram-mount"), exports);
|
|
34
36
|
__exportStar(require("./edge"), exports);
|
|
35
37
|
__exportStar(require("./glsp-client"), exports);
|
|
36
38
|
__exportStar(require("./glsp-connection"), exports);
|
|
37
39
|
__exportStar(require("./glsp-client-module"), exports);
|
|
38
40
|
__exportStar(require("./hidden-bounds-updater"), exports);
|
|
41
|
+
__exportStar(require("./message-overlay"), exports);
|
|
39
42
|
__exportStar(require("./select-mouse-listener"), exports);
|
|
40
43
|
__exportStar(require("./sprotty-logger-adapter"), exports);
|
|
41
44
|
__exportStar(require("./status-overlay"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,SAAS;AACT,sDAAoC;AACpC,wDAAsC;AACtC,mDAAiC;AACjC,kDAAgC;AAChC,yCAAuB;AACvB,gDAA8B;AAC9B,oDAAkC;AAClC,uDAAqC;AACrC,0DAAwC;AACxC,0DAAwC;AACxC,2DAAyC;AACzC,mDAAiC;AACjC,gDAA8B;AAC9B,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,SAAS;AACT,sDAAoC;AACpC,wDAAsC;AACtC,mDAAiC;AACjC,4DAA0C;AAC1C,4DAA0C;AAC1C,kDAAgC;AAChC,yCAAuB;AACvB,gDAA8B;AAC9B,oDAAkC;AAClC,uDAAqC;AACrC,0DAAwC;AACxC,oDAAkC;AAClC,0DAAwC;AACxC,2DAAyC;AACzC,mDAAiC;AACjC,gDAA8B;AAC9B,0CAAwB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { type Action, EndProgressAction, GLSPAbstractUIExtension, type IActionHandler, type IDiagramStartup, MessageAction, StartProgressAction, UpdateProgressAction } from '@eclipse-glsp/client';
|
|
10
|
+
import '../style/message-overlay.css';
|
|
11
|
+
/**
|
|
12
|
+
* Shows the server's messages and progress reports on the diagram, for a host
|
|
13
|
+
* with no notifications of its own. GLSP's standalone modules only log them,
|
|
14
|
+
* so a refused undo would otherwise change nothing the user can see.
|
|
15
|
+
*
|
|
16
|
+
* A message stays until it is dismissed, and only the newest
|
|
17
|
+
* {@link HydraniumMessageOverlay.maxMessages} are kept. A repeated one moves
|
|
18
|
+
* to the newest instead of stacking. A progress report shows from its start
|
|
19
|
+
* to its end, with a spinner until it reports a percentage. Severity `NONE`
|
|
20
|
+
* says nothing and is dropped.
|
|
21
|
+
*
|
|
22
|
+
* A message row shows its severity's icon and carries the severity as a
|
|
23
|
+
* class, and the stylesheet edges it in GLSP's `--glsp-*-foreground` colour.
|
|
24
|
+
* A progress row has the info edge. A host with notifications of its own
|
|
25
|
+
* subclasses this class to forward them, and rebinds it to the subclass in a
|
|
26
|
+
* module only that host loads.
|
|
27
|
+
*/
|
|
28
|
+
export declare class HydraniumMessageOverlay extends GLSPAbstractUIExtension implements IActionHandler, IDiagramStartup {
|
|
29
|
+
static readonly ID = "hydranium-message-overlay";
|
|
30
|
+
/** How many distinct messages are kept, so they cannot cover the canvas. A repeat replaces its row. */
|
|
31
|
+
protected maxMessages: number;
|
|
32
|
+
protected readonly messageRows: HTMLElement[];
|
|
33
|
+
protected readonly progressRows: Map<string, HTMLElement>;
|
|
34
|
+
id(): string;
|
|
35
|
+
containerClass(): string;
|
|
36
|
+
protected initializeContents(_container: HTMLElement): void;
|
|
37
|
+
handle(action: Action): void;
|
|
38
|
+
protected showMessage(action: MessageAction): void;
|
|
39
|
+
protected removeMessage(row: HTMLElement): void;
|
|
40
|
+
protected startProgress(action: StartProgressAction): void;
|
|
41
|
+
protected updateProgress(action: Pick<UpdateProgressAction, 'progressId' | 'message' | 'percentage'>): void;
|
|
42
|
+
protected endProgress(action: EndProgressAction): void;
|
|
43
|
+
/** English, as this tier knows no locale. A host that knows one renders {@link DIAGRAM_MESSAGE_DISMISS} here. */
|
|
44
|
+
protected dismissLabel(): string;
|
|
45
|
+
/** English, as this tier knows no locale. A host that knows one renders {@link DIAGRAM_MESSAGE_DETAILS} here. */
|
|
46
|
+
protected detailsLabel(): string;
|
|
47
|
+
protected createRow(kind: string, alert: boolean): HTMLElement;
|
|
48
|
+
/** The severity as a glyph too, as GLSP's default colours can be too faint on a light page. */
|
|
49
|
+
protected createIcon(severity: MessageAction['severity']): HTMLElement;
|
|
50
|
+
protected focusDiagram(): void;
|
|
51
|
+
protected createText(className: string, text: string): HTMLElement;
|
|
52
|
+
/** Adds a row to the overlay, or logs its text when the diagram has no element to show it in. */
|
|
53
|
+
protected addRow(row: HTMLElement, text: string): boolean;
|
|
54
|
+
/** A row a startup hook showed before the first render would otherwise wait for the next row. */
|
|
55
|
+
postModelInitialization(): void;
|
|
56
|
+
/** Puts the element back into the base div, which sprotty's first render replaces. */
|
|
57
|
+
protected reattach(): void;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=message-overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-overlay.d.ts","sourceRoot":"","sources":["../src/message-overlay.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,MAAM,EACX,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,8BAA8B,CAAC;AAKtC;;;;;;;;;;;;;;;;GAgBG;AACH,qBACa,uBAAwB,SAAQ,uBAAwB,YAAW,cAAc,EAAE,eAAe;IAC5G,MAAM,CAAC,QAAQ,CAAC,EAAE,+BAA+B;IAEjD,uGAAuG;IACvG,SAAS,CAAC,WAAW,SAAK;IAC1B,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,EAAE,CAAM;IACnD,SAAS,CAAC,QAAQ,CAAC,YAAY,2BAAkC;IAEjE,EAAE,IAAI,MAAM,CAEX;IAED,cAAc,IAAI,MAAM,CAEvB;IAED,SAAS,CAAC,kBAAkB,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI,CAE1D;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAY3B;IAED,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAyCjD;IAED,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAW9C;IAED,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAmBzD;IAED,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,CAAC,GAAG,IAAI,CAsB1G;IAED,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAGrD;IAED,iHAAiH;IACjH,SAAS,CAAC,YAAY,IAAI,MAAM,CAE/B;IAED,iHAAiH;IACjH,SAAS,CAAC,YAAY,IAAI,MAAM,CAE/B;IAED,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,CAM7D;IAED,+FAA+F;IAC/F,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,WAAW,CAOrE;IAED,SAAS,CAAC,YAAY,IAAI,IAAI,CAE7B;IAED,SAAS,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAKjE;IAED,iGAAiG;IACjG,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAexD;IAED,iGAAiG;IACjG,uBAAuB,IAAI,IAAI,CAE9B;IAED,sFAAsF;IACtF,SAAS,CAAC,QAAQ,IAAI,IAAI,CAMzB;CACH"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the MIT License which is available in the project root.
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: MIT
|
|
9
|
+
********************************************************************************/
|
|
10
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
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;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
var HydraniumMessageOverlay_1;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.HydraniumMessageOverlay = void 0;
|
|
19
|
+
const client_1 = require("@eclipse-glsp/client");
|
|
20
|
+
const inversify_1 = require("inversify");
|
|
21
|
+
require("../style/message-overlay.css");
|
|
22
|
+
const diagram_message_details_1 = require("./diagram-message-details");
|
|
23
|
+
const diagram_message_dismiss_1 = require("./diagram-message-dismiss");
|
|
24
|
+
const reattach_1 = require("./reattach");
|
|
25
|
+
/**
|
|
26
|
+
* Shows the server's messages and progress reports on the diagram, for a host
|
|
27
|
+
* with no notifications of its own. GLSP's standalone modules only log them,
|
|
28
|
+
* so a refused undo would otherwise change nothing the user can see.
|
|
29
|
+
*
|
|
30
|
+
* A message stays until it is dismissed, and only the newest
|
|
31
|
+
* {@link HydraniumMessageOverlay.maxMessages} are kept. A repeated one moves
|
|
32
|
+
* to the newest instead of stacking. A progress report shows from its start
|
|
33
|
+
* to its end, with a spinner until it reports a percentage. Severity `NONE`
|
|
34
|
+
* says nothing and is dropped.
|
|
35
|
+
*
|
|
36
|
+
* A message row shows its severity's icon and carries the severity as a
|
|
37
|
+
* class, and the stylesheet edges it in GLSP's `--glsp-*-foreground` colour.
|
|
38
|
+
* A progress row has the info edge. A host with notifications of its own
|
|
39
|
+
* subclasses this class to forward them, and rebinds it to the subclass in a
|
|
40
|
+
* module only that host loads.
|
|
41
|
+
*/
|
|
42
|
+
let HydraniumMessageOverlay = class HydraniumMessageOverlay extends client_1.GLSPAbstractUIExtension {
|
|
43
|
+
static { HydraniumMessageOverlay_1 = this; }
|
|
44
|
+
static ID = 'hydranium-message-overlay';
|
|
45
|
+
/** How many distinct messages are kept, so they cannot cover the canvas. A repeat replaces its row. */
|
|
46
|
+
maxMessages = 3;
|
|
47
|
+
messageRows = [];
|
|
48
|
+
progressRows = new Map();
|
|
49
|
+
id() {
|
|
50
|
+
return HydraniumMessageOverlay_1.ID;
|
|
51
|
+
}
|
|
52
|
+
containerClass() {
|
|
53
|
+
return 'hydranium-messages';
|
|
54
|
+
}
|
|
55
|
+
initializeContents(_container) {
|
|
56
|
+
// Rows are added as messages arrive.
|
|
57
|
+
}
|
|
58
|
+
handle(action) {
|
|
59
|
+
if (client_1.MessageAction.is(action)) {
|
|
60
|
+
this.showMessage(action);
|
|
61
|
+
}
|
|
62
|
+
else if (client_1.StartProgressAction.is(action)) {
|
|
63
|
+
this.startProgress(action);
|
|
64
|
+
}
|
|
65
|
+
else if (client_1.UpdateProgressAction.is(action)) {
|
|
66
|
+
this.updateProgress(action);
|
|
67
|
+
}
|
|
68
|
+
else if (client_1.EndProgressAction.is(action)) {
|
|
69
|
+
this.endProgress(action);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.logger.log(this, 'Unhandled action received:', action);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
showMessage(action) {
|
|
76
|
+
if (action.severity === 'NONE') {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// An alert is announced when it is inserted, which a status in a region
|
|
80
|
+
// created with it is not. A refused undo is a warning and must be heard.
|
|
81
|
+
const kind = action.severity.toLowerCase();
|
|
82
|
+
const row = this.createRow(kind, action.severity !== 'INFO' && action.severity !== 'OK');
|
|
83
|
+
row.append(this.createIcon(action.severity), this.createText('hydranium-message-text', action.message));
|
|
84
|
+
if (action.details) {
|
|
85
|
+
const details = document.createElement('details');
|
|
86
|
+
const summary = document.createElement('summary');
|
|
87
|
+
summary.textContent = this.detailsLabel();
|
|
88
|
+
const text = document.createElement('pre');
|
|
89
|
+
text.textContent = action.details;
|
|
90
|
+
details.append(summary, text);
|
|
91
|
+
row.append(details);
|
|
92
|
+
}
|
|
93
|
+
const dismiss = document.createElement('button');
|
|
94
|
+
dismiss.setAttribute('type', 'button');
|
|
95
|
+
dismiss.classList.add('codicon', 'codicon-close');
|
|
96
|
+
dismiss.setAttribute('aria-label', this.dismissLabel());
|
|
97
|
+
dismiss.addEventListener('click', () => this.removeMessage(row));
|
|
98
|
+
row.append(dismiss);
|
|
99
|
+
if (!this.addRow(row, action.message)) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// A held Ctrl+Z repeats its refusal, which the newest row then says once.
|
|
103
|
+
// Its details replace those of the row it repeats.
|
|
104
|
+
const repeated = this.messageRows.find(shown => shown.classList.contains(`hydranium-message-${kind}`) &&
|
|
105
|
+
shown.querySelector('.hydranium-message-text')?.textContent === action.message);
|
|
106
|
+
if (repeated) {
|
|
107
|
+
this.removeMessage(repeated);
|
|
108
|
+
}
|
|
109
|
+
this.messageRows.push(row);
|
|
110
|
+
while (this.messageRows.length > this.maxMessages) {
|
|
111
|
+
this.removeMessage(this.messageRows[0]);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
removeMessage(row) {
|
|
115
|
+
const index = this.messageRows.indexOf(row);
|
|
116
|
+
if (index >= 0) {
|
|
117
|
+
this.messageRows.splice(index, 1);
|
|
118
|
+
}
|
|
119
|
+
// Back to the diagram, as a row leaving the page would drop the focus on the body.
|
|
120
|
+
const hadFocus = row.contains(document.activeElement);
|
|
121
|
+
row.remove();
|
|
122
|
+
if (hadFocus) {
|
|
123
|
+
this.focusDiagram();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
startProgress(action) {
|
|
127
|
+
// A start repeated under its id would otherwise leave the first row with no end.
|
|
128
|
+
if (this.progressRows.has(action.progressId)) {
|
|
129
|
+
this.endProgress(client_1.EndProgressAction.create(action.progressId));
|
|
130
|
+
}
|
|
131
|
+
const row = this.createRow('progress', false);
|
|
132
|
+
const spinner = document.createElement('i');
|
|
133
|
+
spinner.classList.add('hydranium-progress-spinner', 'codicon', 'codicon-loading', 'codicon-modifier-spin');
|
|
134
|
+
spinner.setAttribute('aria-hidden', 'true');
|
|
135
|
+
row.append(spinner, this.createText('hydranium-message-text', action.title), this.createText('hydranium-progress-message', ''), this.createText('hydranium-progress-percentage', ''));
|
|
136
|
+
if (this.addRow(row, action.title)) {
|
|
137
|
+
this.progressRows.set(action.progressId, row);
|
|
138
|
+
this.updateProgress(action);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
updateProgress(action) {
|
|
142
|
+
const row = this.progressRows.get(action.progressId);
|
|
143
|
+
if (row === undefined) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const message = row.querySelector('.hydranium-progress-message');
|
|
147
|
+
const percentage = row.querySelector('.hydranium-progress-percentage');
|
|
148
|
+
const spinner = row.querySelector('.hydranium-progress-spinner');
|
|
149
|
+
if (message && action.message !== undefined) {
|
|
150
|
+
message.textContent = action.message;
|
|
151
|
+
}
|
|
152
|
+
// A negative percentage reports work of unknown size, as GLSP has it.
|
|
153
|
+
// The spinner stands in for a percentage, so it shows only while there is none.
|
|
154
|
+
if (action.percentage !== undefined) {
|
|
155
|
+
const known = action.percentage >= 0;
|
|
156
|
+
if (percentage) {
|
|
157
|
+
percentage.textContent = known ? `${Math.round(action.percentage)}%` : '';
|
|
158
|
+
}
|
|
159
|
+
if (spinner) {
|
|
160
|
+
spinner.hidden = known;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
endProgress(action) {
|
|
165
|
+
this.progressRows.get(action.progressId)?.remove();
|
|
166
|
+
this.progressRows.delete(action.progressId);
|
|
167
|
+
}
|
|
168
|
+
/** English, as this tier knows no locale. A host that knows one renders {@link DIAGRAM_MESSAGE_DISMISS} here. */
|
|
169
|
+
dismissLabel() {
|
|
170
|
+
return diagram_message_dismiss_1.DIAGRAM_MESSAGE_DISMISS.format();
|
|
171
|
+
}
|
|
172
|
+
/** English, as this tier knows no locale. A host that knows one renders {@link DIAGRAM_MESSAGE_DETAILS} here. */
|
|
173
|
+
detailsLabel() {
|
|
174
|
+
return diagram_message_details_1.DIAGRAM_MESSAGE_DETAILS.format();
|
|
175
|
+
}
|
|
176
|
+
createRow(kind, alert) {
|
|
177
|
+
const row = document.createElement('div');
|
|
178
|
+
// Prefixed, as a bare `progress` or `warning` would take the page's own styles for it.
|
|
179
|
+
row.classList.add('hydranium-message', `hydranium-message-${kind}`);
|
|
180
|
+
row.setAttribute('role', alert ? 'alert' : 'status');
|
|
181
|
+
return row;
|
|
182
|
+
}
|
|
183
|
+
/** The severity as a glyph too, as GLSP's default colours can be too faint on a light page. */
|
|
184
|
+
createIcon(severity) {
|
|
185
|
+
const glyph = severity === 'FATAL' || severity === 'ERROR' ? 'error' : severity === 'WARNING' ? 'warning' : severity === 'OK' ? 'pass' : 'info';
|
|
186
|
+
const icon = document.createElement('i');
|
|
187
|
+
icon.classList.add('hydranium-message-icon', 'codicon', `codicon-${glyph}`);
|
|
188
|
+
icon.setAttribute('aria-hidden', 'true');
|
|
189
|
+
return icon;
|
|
190
|
+
}
|
|
191
|
+
focusDiagram() {
|
|
192
|
+
this.getParentContainer()?.querySelector('svg.sprotty-graph')?.focus();
|
|
193
|
+
}
|
|
194
|
+
createText(className, text) {
|
|
195
|
+
const span = document.createElement('span');
|
|
196
|
+
span.classList.add(className);
|
|
197
|
+
span.textContent = text;
|
|
198
|
+
return span;
|
|
199
|
+
}
|
|
200
|
+
/** Adds a row to the overlay, or logs its text when the diagram has no element to show it in. */
|
|
201
|
+
addRow(row, text) {
|
|
202
|
+
// Checked before `initialize`, which logs the same problem without the text.
|
|
203
|
+
const noElement = !this.containerElement && !this.getContainer() && !this.getParentContainer()?.isConnected;
|
|
204
|
+
if (!noElement && this.initialize()) {
|
|
205
|
+
this.reattach();
|
|
206
|
+
// Still detached when the base div itself left the page.
|
|
207
|
+
if (this.containerElement.isConnected) {
|
|
208
|
+
this.containerElement.append(row);
|
|
209
|
+
// The overlay scrolls once it fills the diagram, and the newest row is at its bottom.
|
|
210
|
+
this.containerElement.scrollTop = this.containerElement.scrollHeight;
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
this.logger.warn(this, 'No diagram element to show a server message in:', text);
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
/** A row a startup hook showed before the first render would otherwise wait for the next row. */
|
|
218
|
+
postModelInitialization() {
|
|
219
|
+
this.reattach();
|
|
220
|
+
}
|
|
221
|
+
/** Puts the element back into the base div, which sprotty's first render replaces. */
|
|
222
|
+
reattach() {
|
|
223
|
+
(0, reattach_1.reattachUIExtension)(this.containerElement, () => this.getParentContainer(), (container, parent) => this.insertContainerIntoParent(container, parent));
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
exports.HydraniumMessageOverlay = HydraniumMessageOverlay;
|
|
227
|
+
exports.HydraniumMessageOverlay = HydraniumMessageOverlay = HydraniumMessageOverlay_1 = __decorate([
|
|
228
|
+
(0, inversify_1.injectable)()
|
|
229
|
+
], HydraniumMessageOverlay);
|
|
230
|
+
//# sourceMappingURL=message-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-overlay.js","sourceRoot":"","sources":["../src/message-overlay.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;AAElF,iDAS8B;AAC9B,yCAAuC;AACvC,wCAAsC;AACtC,uEAAoE;AACpE,uEAAoE;AACpE,yCAAiD;AAEjD;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,gCAAuB;;IACjE,MAAM,CAAU,EAAE,GAAG,2BAA2B,CAAC;IAEjD,uGAAuG;IAC7F,WAAW,GAAG,CAAC,CAAC;IACP,WAAW,GAAkB,EAAE,CAAC;IAChC,YAAY,GAAG,IAAI,GAAG,EAAuB,CAAC;IAEjE,EA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AAC,GAAG,CAAC,CAAC;gBAClC,sFAAsF;gBACtF,IAAI,CAAC,gBAAgB,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;gBACrE,OAAO,IAAI,CAAC;YACf,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,iDAAiD,EAAE,IAAI,CAAC,CAAC;QAChF,OAAO,KAAK,CAAC;IAChB,CAAC;IAED,iGAAiG;IACjG,uBAAuB;QACpB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,sFAAsF;IAC5E,QAAQ;QACf,IAAA,8BAAmB,EAChB,IAAI,CAAC,gBAA2C,EAChD,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAC/B,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,SAAS,EAAE,MAAM,CAAC,CAC1E,CAAC;IACL,CAAC;CACH,CAAA;;kCAlNY,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAkNnC"}
|
package/lib/messages/index.d.ts
CHANGED
|
@@ -7,4 +7,6 @@
|
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
export { DIAGRAM_LOAD_FAILED } from '../diagram-load-failed';
|
|
10
|
+
export { DIAGRAM_MESSAGE_DETAILS } from '../diagram-message-details';
|
|
11
|
+
export { DIAGRAM_MESSAGE_DISMISS } from '../diagram-message-dismiss';
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AASlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AASlF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/lib/messages/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* SPDX-License-Identifier: MIT
|
|
9
9
|
********************************************************************************/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.DIAGRAM_LOAD_FAILED = void 0;
|
|
11
|
+
exports.DIAGRAM_MESSAGE_DISMISS = exports.DIAGRAM_MESSAGE_DETAILS = exports.DIAGRAM_LOAD_FAILED = void 0;
|
|
12
12
|
// Every user-facing message `@hydranium/glsp-client` raises. The client tier
|
|
13
13
|
// renders only its own messages, which fire when no server could have worded
|
|
14
14
|
// them: the loader formats the English, and a host that knows the reading
|
|
@@ -17,4 +17,8 @@ exports.DIAGRAM_LOAD_FAILED = void 0;
|
|
|
17
17
|
// own diagram chrome discovers the codes exist.
|
|
18
18
|
var diagram_load_failed_1 = require("../diagram-load-failed");
|
|
19
19
|
Object.defineProperty(exports, "DIAGRAM_LOAD_FAILED", { enumerable: true, get: function () { return diagram_load_failed_1.DIAGRAM_LOAD_FAILED; } });
|
|
20
|
+
var diagram_message_details_1 = require("../diagram-message-details");
|
|
21
|
+
Object.defineProperty(exports, "DIAGRAM_MESSAGE_DETAILS", { enumerable: true, get: function () { return diagram_message_details_1.DIAGRAM_MESSAGE_DETAILS; } });
|
|
22
|
+
var diagram_message_dismiss_1 = require("../diagram-message-dismiss");
|
|
23
|
+
Object.defineProperty(exports, "DIAGRAM_MESSAGE_DISMISS", { enumerable: true, get: function () { return diagram_message_dismiss_1.DIAGRAM_MESSAGE_DISMISS; } });
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,6EAA6E;AAC7E,6EAA6E;AAC7E,0EAA0E;AAC1E,2EAA2E;AAC3E,gFAAgF;AAChF,gDAAgD;AAEhD,8DAA6D;AAApD,0HAAA,mBAAmB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,6EAA6E;AAC7E,6EAA6E;AAC7E,0EAA0E;AAC1E,2EAA2E;AAC3E,gFAAgF;AAChF,gDAAgD;AAEhD,8DAA6D;AAApD,0HAAA,mBAAmB,OAAA;AAC5B,sEAAqE;AAA5D,kIAAA,uBAAuB,OAAA;AAChC,sEAAqE;AAA5D,kIAAA,uBAAuB,OAAA"}
|