@eclipse-glsp/sprotty 2.2.0-next.351 → 2.2.0-next.354
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.
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
16
17
|
import { Hoverable, Selectable } from '@eclipse-glsp/protocol';
|
|
17
18
|
import { VNode } from 'snabbdom';
|
|
18
19
|
import { InternalBoundsAware as BoundsAware, IViewArgs, RenderingContext, SShapeElementImpl, CircularNodeView as SprottyCircularNodeView, DiamondNodeView as SprottyDiamondNodeView } from 'sprotty';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-views-override.d.ts","sourceRoot":"","sources":["../src/svg-views-override.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;
|
|
1
|
+
{"version":3,"file":"svg-views-override.d.ts","sourceRoot":"","sources":["../src/svg-views-override.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,eAAe;AACf,OAAO,EAAU,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAEH,mBAAmB,IAAI,WAAW,EAClC,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,IAAI,uBAAuB,EAC3C,eAAe,IAAI,sBAAsB,EAE5C,MAAM,SAAS,CAAC;AAEjB,qBACa,eAAgB,SAAQ,sBAAsB;IAC9C,MAAM,CACX,IAAI,EAAE,QAAQ,CAAC,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAC,EAC1D,OAAO,EAAE,gBAAgB,EACzB,IAAI,CAAC,EAAE,SAAS,GACjB,KAAK,GAAG,SAAS;CAKvB;AAED,qBACa,gBAAiB,SAAQ,uBAAuB;IAChD,MAAM,CACX,IAAI,EAAE,QAAQ,CAAC,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAC,EAC1D,OAAO,EAAE,gBAAgB,EACzB,IAAI,CAAC,EAAE,SAAS,GACjB,KAAK,GAAG,SAAS;CAKvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,WAAW,GAAG,KAAK,CAAC;AACnE,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS,CAAC;AAS1G;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,KAAK,GAAG,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAOnI"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.applyHiddenBoundingRect = exports.hiddenBoundingRect = exports.CircularNodeView = exports.DiamondNodeView = void 0;
|
|
2
10
|
/********************************************************************************
|
|
3
11
|
* Copyright (c) 2024 EclipseSource and others.
|
|
4
12
|
*
|
|
@@ -14,19 +22,10 @@
|
|
|
14
22
|
*
|
|
15
23
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
24
|
********************************************************************************/
|
|
17
|
-
|
|
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.applyHiddenBoundingRect = exports.hiddenBoundingRect = exports.CircularNodeView = exports.DiamondNodeView = void 0;
|
|
25
|
+
/** @jsx svg */
|
|
25
26
|
const protocol_1 = require("@eclipse-glsp/protocol");
|
|
26
27
|
const inversify_1 = require("inversify");
|
|
27
28
|
const sprotty_1 = require("sprotty");
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
|
-
const JSX = { createElement: sprotty_1.svg };
|
|
30
29
|
let DiamondNodeView = class DiamondNodeView extends sprotty_1.DiamondNodeView {
|
|
31
30
|
render(node, context, args) {
|
|
32
31
|
// The super class may change the bounds of the given node as browsers may calculate larger bounds for the rendered node (BBox).
|
|
@@ -52,7 +51,7 @@ exports.CircularNodeView = CircularNodeView = __decorate([
|
|
|
52
51
|
function hiddenBoundingRect(withBounds, context) {
|
|
53
52
|
// an element with attribute ATTR_BBOX_ELEMENT is used by the hidden bounds updater to determine the bounds if it is within a g-element
|
|
54
53
|
// we set the fill to transparent since the SVG export uses the hidden rendering to generate the image and we do not want to be seen
|
|
55
|
-
return !context || context.targetKind === 'hidden' ? (
|
|
54
|
+
return !context || context.targetKind === 'hidden' ? ((0, sprotty_1.svg)("rect", Object.assign({ attrs: { [sprotty_1.ATTR_BBOX_ELEMENT]: true } }, protocol_1.Bounds.dimension(withBounds.bounds), { style: { fill: 'transparent' } }))) : undefined;
|
|
56
55
|
}
|
|
57
56
|
exports.hiddenBoundingRect = hiddenBoundingRect;
|
|
58
57
|
/**
|
|
@@ -66,7 +65,7 @@ exports.hiddenBoundingRect = hiddenBoundingRect;
|
|
|
66
65
|
function applyHiddenBoundingRect(withBounds, context, view) {
|
|
67
66
|
var _a;
|
|
68
67
|
if (view && context.targetKind === 'hidden') {
|
|
69
|
-
const parent = view.sel === 'g' ? view :
|
|
68
|
+
const parent = view.sel === 'g' ? view : (0, sprotty_1.svg)("g", null, view);
|
|
70
69
|
(_a = parent.children) === null || _a === void 0 ? void 0 : _a.unshift(hiddenBoundingRect(withBounds));
|
|
71
70
|
return parent;
|
|
72
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svg-views-override.js","sourceRoot":"","sources":["../src/svg-views-override.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"svg-views-override.js","sourceRoot":"","sources":["../src/svg-views-override.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,eAAe;AACf,qDAAuE;AACvE,yCAAuC;AAEvC,qCASiB;AAGV,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,yBAAsB;IAC9C,MAAM,CACX,IAA0D,EAC1D,OAAyB,EACzB,IAAgB;QAEhB,gIAAgI;QAChI,6HAA6H;QAC7H,OAAO,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACrF,CAAC;CACJ,CAAA;AAVY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,sBAAU,GAAE;GACA,eAAe,CAU3B;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,0BAAuB;IAChD,MAAM,CACX,IAA0D,EAC1D,OAAyB,EACzB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3
|
+
"version": "2.2.0-next.354+cb93d58",
|
|
4
4
|
"description": "Augmented reexport of the sprotty API for GLSP",
|
|
5
5
|
"homepage": "https://www.eclipse.org/glsp/",
|
|
6
6
|
"bugs": "https://github.com/eclipse-glsp/glsp/issues",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"watch": "tsc -w"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@eclipse-glsp/protocol": "2.2.0-next.
|
|
36
|
+
"@eclipse-glsp/protocol": "2.2.0-next.354+cb93d58",
|
|
37
37
|
"autocompleter": "^9.1.0",
|
|
38
38
|
"snabbdom": "~3.5.1",
|
|
39
39
|
"sprotty": "1.2.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "cb93d584a5e1822702c6320b36be7e608bcdbd5b"
|
|
55
55
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
16
|
+
/** @jsx svg */
|
|
17
17
|
import { Bounds, Hoverable, Selectable } from '@eclipse-glsp/protocol';
|
|
18
18
|
import { injectable } from 'inversify';
|
|
19
19
|
import { VNode } from 'snabbdom';
|
|
@@ -28,9 +28,6 @@ import {
|
|
|
28
28
|
svg
|
|
29
29
|
} from 'sprotty';
|
|
30
30
|
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
-
const JSX = { createElement: svg };
|
|
33
|
-
|
|
34
31
|
@injectable()
|
|
35
32
|
export class DiamondNodeView extends SprottyDiamondNodeView {
|
|
36
33
|
override render(
|