@genome-spy/app 0.87.0 → 0.88.0
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/dist/{agentApi-BZ1JCo1N.js → agentApi-BYFBKiRQ.js} +5365 -5080
- package/dist/agentApi.es.js +3160 -2909
- package/dist/agentShared.es.js +3 -3
- package/dist/{canvas2d-Cafq5v-N.js → canvas2d-BVQ7-2eJ.js} +68 -68
- package/dist/{canvas2d-B_PnIof-.js → canvas2d-D7SZK3xv.js} +39 -39
- package/dist/{clipOptions-H68pJyEZ.js → clipOptions-BWHr3aTa.js} +822 -768
- package/dist/{clipOptions-D6eh9T-_.js → clipOptions-DTMcB_9z.js} +547 -493
- package/dist/{debug-BGzgZmyk.js → debug-CVpoEOWx.js} +2 -2
- package/dist/{debug-UYKZLNh4.js → debug-DYAMZZKl.js} +2 -2
- package/dist/index.es.js +3390 -3410
- package/dist/index.js +397 -374
- package/dist/{indexer-Di57GyxX.js → indexer-CXjZDo2Q.js} +1 -1
- package/dist/{indexer-o6Hpg4nN.js → indexer-DAH_ruVn.js} +1 -1
- package/dist/{nativeText-DAjvkrzc.js → order-C5CzA37O.js} +271 -287
- package/dist/{nativeText-D9SoxpaD.js → order-DvY7KNcu.js} +271 -287
- package/dist/{rasterExport-DzldLv6E.js → rasterExport-BgZ98e6U.js} +1 -1
- package/dist/{rasterExport-IAbJwi8F.js → rasterExport-DEr8fOLm.js} +1 -1
- package/dist/{renderCanvas2D-yJ1IrDcX.js → renderCanvas2D-DtcJjqpB.js} +57 -50
- package/dist/{renderCanvas2D-BJ93Ptqj.js → renderCanvas2D-DxturTEW.js} +62 -55
- package/dist/schema.json +756 -96
- package/dist/{svg-DJuqHIyc.js → svg-CyrLfa9e.js} +364 -357
- package/dist/{svg-BRpl2Xub.js → svg-SDJMzL--.js} +338 -331
- package/dist/{svgRasterizer-PAoqLn1j.js → svgRasterizer-f7DJ3UO0.js} +1 -1
- package/dist/{svgRasterizer-CGZQ5njV.js → svgRasterizer-mWK7HTkx.js} +1 -1
- package/dist/{vega-scale-BGC53c22.js → vega-scale-CypF85iS.js} +801 -801
- package/dist/{vega-scale-DdW2NzQ3.js → vega-scale-DLKCwWRs.js} +65 -65
- package/dist/{viewIdentityRegistry-Dc2hXYsO.js → viewIdentityRegistry-DIDo44XQ.js} +1 -1
- package/dist/{viewIdentityRegistry-D4p067HU.js → viewIdentityRegistry-Dl-vMN9I.js} +1 -1
- package/dist/{viewSelectors-DNXnGwEW.js → viewSelectors-CymbZyE6.js} +375 -340
- package/dist/{viewSelectors-DYYlOt91.js → viewSelectors-DNiDip5e.js} +370 -335
- package/dist/{viewUtils-EdhZTPrJ.js → viewUtils-BrJLIj2o.js} +1750 -1716
- package/dist/{webgl-CdgNFlJk.js → webgl-CqTDifWM.js} +1196 -1164
- package/dist/{webgl-C53DwzVT.js → webgl-jaC2m0Zr.js} +1015 -983
- package/package.json +5 -5
- package/src/embedTypes.d.ts +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as r } from "./vega-scale-
|
|
3
|
-
import { x as i } from "./viewSelectors-
|
|
1
|
+
import { o as e, s as t, un as n } from "./clipOptions-BWHr3aTa.js";
|
|
2
|
+
import { v as r } from "./vega-scale-CypF85iS.js";
|
|
3
|
+
import { x as i } from "./viewSelectors-DNiDip5e.js";
|
|
4
4
|
import { t as a } from "./rasterization-CFogVB3B.js";
|
|
5
5
|
import { t as o } from "./rectangle-DKnrAmKs.js";
|
|
6
6
|
import { n as s, t as c } from "./layoutResult-D50MSHXR.js";
|
|
7
|
-
import { A as l, C as u, D as d, E as f, M as p,
|
|
8
|
-
import { n as
|
|
7
|
+
import { A as l, C as u, D as d, E as f, M as p, N as m, O as h, T as g, _, a as v, c as y, d as b, f as x, g as S, h as C, i as w, j as ee, k as T, l as E, m as D, n as te, o as ne, p as re, r as O, s as ie, t as ae, u as oe, v as se, w as ce, x as le, y as ue } from "./order-C5CzA37O.js";
|
|
8
|
+
import { n as k, t as A } from "./svgNumber-DNxESJQB.js";
|
|
9
9
|
//#region ../core/src/rendering/svg/svgElement.js
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let n = document.createElementNS(
|
|
10
|
+
var j = "http://www.w3.org/2000/svg";
|
|
11
|
+
function M(e, t) {
|
|
12
|
+
let n = document.createElementNS(j, e);
|
|
13
13
|
if (t) for (let [e, r] of Object.entries(t)) n.setAttribute(e, "" + r);
|
|
14
14
|
return n;
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region ../core/src/rendering/svg/svgAttributes.js
|
|
18
|
-
function
|
|
19
|
-
let n = Object.entries(t).filter(([t, n]) => n.encoder.constant ? (e.setAttribute(t, "" +
|
|
20
|
-
return (e) => Object.fromEntries(n.map(([t, n]) => [t,
|
|
18
|
+
function N(e, t) {
|
|
19
|
+
let n = Object.entries(t).filter(([t, n]) => n.encoder.constant ? (e.setAttribute(t, "" + P(n, {})), !1) : !0);
|
|
20
|
+
return (e) => Object.fromEntries(n.map(([t, n]) => [t, P(n, e)]));
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function P(e, t) {
|
|
23
23
|
let n = e.encoder(t);
|
|
24
24
|
return e.transform ? e.transform(n) : "" + n;
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region ../core/src/rendering/svg/renderers/arrow.js
|
|
28
|
-
function
|
|
29
|
-
let n = e, { coords: r, data: i, group: a, viewOpacity: o, visibleBounds: s } = t, c = n.encoders, l =
|
|
28
|
+
function de(e, t) {
|
|
29
|
+
let n = e, { coords: r, data: i, group: a, viewOpacity: o, visibleBounds: s } = t, c = n.encoders, l = N(a, {
|
|
30
30
|
fill: {
|
|
31
31
|
encoder: c.fill,
|
|
32
|
-
transform:
|
|
32
|
+
transform: d
|
|
33
33
|
},
|
|
34
34
|
"fill-opacity": {
|
|
35
35
|
encoder: c.fillOpacity,
|
|
@@ -37,7 +37,7 @@ function ce(e, t) {
|
|
|
37
37
|
},
|
|
38
38
|
stroke: {
|
|
39
39
|
encoder: c.stroke,
|
|
40
|
-
transform:
|
|
40
|
+
transform: d
|
|
41
41
|
},
|
|
42
42
|
"stroke-opacity": {
|
|
43
43
|
encoder: c.strokeOpacity,
|
|
@@ -45,37 +45,37 @@ function ce(e, t) {
|
|
|
45
45
|
},
|
|
46
46
|
"stroke-width": {
|
|
47
47
|
encoder: c.strokeWidth,
|
|
48
|
-
transform: (e) =>
|
|
48
|
+
transform: (e) => A(+e)
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
a.setAttribute("stroke-linejoin", "miter");
|
|
52
|
-
let u =
|
|
53
|
-
return
|
|
52
|
+
let u = ue(n);
|
|
53
|
+
return le(n, u, {
|
|
54
54
|
coords: r,
|
|
55
55
|
data: i,
|
|
56
56
|
visibleBounds: s,
|
|
57
57
|
viewOpacity: o,
|
|
58
58
|
countOnly: t.countOnly
|
|
59
59
|
}, (e) => {
|
|
60
|
-
t.countOnly || (e.headShapeFallback && t.warn(`SVG export rendered unsupported arrow headShape "${u.headShape}" as a triangle.`), a.appendChild(
|
|
61
|
-
d: e.boundaryLoops.map(
|
|
60
|
+
t.countOnly || (e.headShapeFallback && t.warn(`SVG export rendered unsupported arrow headShape "${u.headShape}" as a triangle.`), a.appendChild(M("path", {
|
|
61
|
+
d: e.boundaryLoops.map(fe).join(" "),
|
|
62
62
|
...l(e.datum)
|
|
63
63
|
})));
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return `M ${e.map(
|
|
66
|
+
function fe(e) {
|
|
67
|
+
return `M ${e.map(pe).join(" L ")} Z`;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return `${
|
|
69
|
+
function pe(e) {
|
|
70
|
+
return `${A(e.x)} ${A(e.y)}`;
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region ../core/src/rendering/svg/renderers/link.js
|
|
74
|
-
function
|
|
75
|
-
let n = e, r =
|
|
74
|
+
function me(e, t) {
|
|
75
|
+
let n = e, r = D(n), { coords: i, data: a, group: o, viewOpacity: s, visibleBounds: c } = t, l = n.encoders, u = se(n, r.shape, t.secondOrderPass), f = N(o, {
|
|
76
76
|
stroke: {
|
|
77
77
|
encoder: l.color,
|
|
78
|
-
transform:
|
|
78
|
+
transform: d
|
|
79
79
|
},
|
|
80
80
|
"stroke-opacity": {
|
|
81
81
|
encoder: l.opacity,
|
|
@@ -83,43 +83,41 @@ function de(e, t) {
|
|
|
83
83
|
},
|
|
84
84
|
"stroke-width": {
|
|
85
85
|
encoder: l.size,
|
|
86
|
-
transform: (e) =>
|
|
86
|
+
transform: (e) => A(+e)
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
|
|
89
|
+
o.setAttribute("fill", "none"), o.setAttribute("stroke-linecap", "butt");
|
|
90
|
+
let p = o, m;
|
|
91
|
+
return C(n, r, {
|
|
90
92
|
coords: i,
|
|
91
93
|
data: a,
|
|
92
94
|
visibleBounds: c
|
|
93
95
|
}, ({ datum: e, points: n }) => {
|
|
94
96
|
let [r, i, a, s] = n;
|
|
95
97
|
if (t.countOnly) return;
|
|
96
|
-
let c =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
e && (c.mask = e);
|
|
104
|
-
}
|
|
105
|
-
o.appendChild(P("path", {
|
|
106
|
-
d: `M ${L(r)} C ${L(i)} ${L(a)} ${L(s)}`,
|
|
98
|
+
let c = f(e), l = u ? t.getLinkArcFadeMaskUrl({
|
|
99
|
+
p1: r,
|
|
100
|
+
p4: s,
|
|
101
|
+
distances: u
|
|
102
|
+
}) : void 0;
|
|
103
|
+
l !== m && (m = l, p = l ? M("g", { mask: l }) : o, l && o.appendChild(p)), p.appendChild(M("path", {
|
|
104
|
+
d: `M ${F(r)} C ${F(i)} ${F(a)} ${F(s)}`,
|
|
107
105
|
...c
|
|
108
106
|
}));
|
|
109
107
|
});
|
|
110
108
|
}
|
|
111
|
-
function
|
|
112
|
-
return e.map(
|
|
109
|
+
function F(e) {
|
|
110
|
+
return e.map(A).join(" ");
|
|
113
111
|
}
|
|
114
112
|
//#endregion
|
|
115
113
|
//#region ../core/src/rendering/svg/renderers/point.js
|
|
116
|
-
function
|
|
114
|
+
function I(e, t) {
|
|
117
115
|
let n = e;
|
|
118
|
-
|
|
119
|
-
let r = x(n), { inwardStroke: i } = r, { group: a, viewOpacity: o } = t, s = n.encoders, c =
|
|
116
|
+
f(n, n.properties.fillGradientStrength) && t.warn("SVG export ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("SVG export ignored unsupported point property geometricZoomBound.");
|
|
117
|
+
let r = x(n), { inwardStroke: i } = r, { group: a, viewOpacity: o } = t, s = n.encoders, c = N(a, {
|
|
120
118
|
fill: {
|
|
121
119
|
encoder: s.fill,
|
|
122
|
-
transform:
|
|
120
|
+
transform: d
|
|
123
121
|
},
|
|
124
122
|
"fill-opacity": {
|
|
125
123
|
encoder: s.fillOpacity,
|
|
@@ -127,7 +125,7 @@ function fe(e, t) {
|
|
|
127
125
|
},
|
|
128
126
|
stroke: {
|
|
129
127
|
encoder: s.stroke,
|
|
130
|
-
transform:
|
|
128
|
+
transform: d
|
|
131
129
|
},
|
|
132
130
|
"stroke-opacity": {
|
|
133
131
|
encoder: s.strokeOpacity,
|
|
@@ -135,47 +133,47 @@ function fe(e, t) {
|
|
|
135
133
|
},
|
|
136
134
|
"stroke-width": {
|
|
137
135
|
encoder: s.strokeWidth,
|
|
138
|
-
transform: (e) =>
|
|
136
|
+
transform: (e) => A(+e)
|
|
139
137
|
}
|
|
140
138
|
}), l = R();
|
|
141
|
-
return
|
|
139
|
+
return re(n, r, t, (e) => {
|
|
142
140
|
if (t.countOnly) return;
|
|
143
141
|
let { datum: n, shape: r, x: u, y: d, geometryRadius: f, angle: p, strokeWidth: m, lineShape: h } = e, g = {
|
|
144
142
|
...c(n),
|
|
145
|
-
...i && !h ? { "stroke-width":
|
|
143
|
+
...i && !h ? { "stroke-width": A(m) } : {},
|
|
146
144
|
...h ? z(s, n, o) : {}
|
|
147
|
-
}, _ =
|
|
148
|
-
_ ? (p && _.setAttribute("transform", `rotate(${
|
|
149
|
-
cx:
|
|
150
|
-
cy:
|
|
151
|
-
r:
|
|
145
|
+
}, _ = L(r, u, d, f, g, l);
|
|
146
|
+
_ ? (p && _.setAttribute("transform", `rotate(${A(p)} ${A(u)} ${A(d)})`), a.appendChild(_)) : (t.warn(`SVG export rendered unsupported point shape "${r}" as a circle.`), a.appendChild(M("circle", {
|
|
147
|
+
cx: A(u),
|
|
148
|
+
cy: A(d),
|
|
149
|
+
r: A(f),
|
|
152
150
|
...g
|
|
153
151
|
})));
|
|
154
152
|
});
|
|
155
153
|
}
|
|
156
|
-
function
|
|
157
|
-
let o =
|
|
158
|
-
if (e == "circle") return
|
|
154
|
+
function L(e, t, n, r, i, a) {
|
|
155
|
+
let o = A(t), s = A(n), c = A(r);
|
|
156
|
+
if (e == "circle") return M("circle", {
|
|
159
157
|
cx: o,
|
|
160
158
|
cy: s,
|
|
161
159
|
r: c,
|
|
162
160
|
...i
|
|
163
161
|
});
|
|
164
|
-
if (e == "square") return
|
|
165
|
-
x:
|
|
166
|
-
y:
|
|
167
|
-
width:
|
|
168
|
-
height:
|
|
162
|
+
if (e == "square") return M("rect", {
|
|
163
|
+
x: A(t - r),
|
|
164
|
+
y: A(n - r),
|
|
165
|
+
width: A(r * 2),
|
|
166
|
+
height: A(r * 2),
|
|
169
167
|
...i
|
|
170
168
|
});
|
|
171
169
|
let l = a.build(e, t, n, r);
|
|
172
|
-
return l ?
|
|
170
|
+
return l ? M("path", {
|
|
173
171
|
d: l,
|
|
174
172
|
...i
|
|
175
173
|
}) : void 0;
|
|
176
174
|
}
|
|
177
175
|
function R() {
|
|
178
|
-
let e = "", t = (e, t) => `${
|
|
176
|
+
let e = "", t = (e, t) => `${A(e)} ${A(t)}`, n = {
|
|
179
177
|
moveTo(n, r) {
|
|
180
178
|
e += `${e ? " M" : "M"} ${t(n, r)}`;
|
|
181
179
|
},
|
|
@@ -187,26 +185,26 @@ function R() {
|
|
|
187
185
|
}
|
|
188
186
|
};
|
|
189
187
|
return { build(t, r, i, a) {
|
|
190
|
-
return e = "",
|
|
188
|
+
return e = "", b(t, r, i, a, n) ? e : void 0;
|
|
191
189
|
} };
|
|
192
190
|
}
|
|
193
191
|
function z(e, t, n) {
|
|
194
|
-
let r = e.stroke(t), i =
|
|
192
|
+
let r = e.stroke(t), i = u(e.strokeOpacity, t), a = r == null || i <= 0;
|
|
195
193
|
return {
|
|
196
194
|
fill: "none",
|
|
197
|
-
stroke:
|
|
198
|
-
"stroke-opacity": (a ?
|
|
199
|
-
"stroke-width":
|
|
195
|
+
stroke: d(a ? e.fill(t) : r),
|
|
196
|
+
"stroke-opacity": (a ? u(e.fillOpacity, t) : i) * n,
|
|
197
|
+
"stroke-width": A(u(e.strokeWidth, t)),
|
|
200
198
|
"stroke-linecap": "butt"
|
|
201
199
|
};
|
|
202
200
|
}
|
|
203
201
|
//#endregion
|
|
204
202
|
//#region ../core/src/rendering/svg/renderers/rect.js
|
|
205
|
-
function
|
|
206
|
-
let n = e, r =
|
|
203
|
+
function he(e, t) {
|
|
204
|
+
let n = e, r = E(n), { shadow: i, hatch: a } = r, { group: o, viewOpacity: s } = t, c = n.encoders, l = N(o, {
|
|
207
205
|
fill: {
|
|
208
206
|
encoder: c.fill,
|
|
209
|
-
transform:
|
|
207
|
+
transform: d
|
|
210
208
|
},
|
|
211
209
|
"fill-opacity": {
|
|
212
210
|
encoder: c.fillOpacity,
|
|
@@ -214,7 +212,7 @@ function B(e, t) {
|
|
|
214
212
|
},
|
|
215
213
|
stroke: {
|
|
216
214
|
encoder: c.stroke,
|
|
217
|
-
transform:
|
|
215
|
+
transform: d
|
|
218
216
|
},
|
|
219
217
|
"stroke-opacity": {
|
|
220
218
|
encoder: c.strokeOpacity,
|
|
@@ -222,93 +220,93 @@ function B(e, t) {
|
|
|
222
220
|
},
|
|
223
221
|
"stroke-width": {
|
|
224
222
|
encoder: c.strokeWidth,
|
|
225
|
-
transform: (e) =>
|
|
223
|
+
transform: (e) => A(+e)
|
|
226
224
|
}
|
|
227
|
-
}),
|
|
225
|
+
}), f = i.opacity > 0 ? {
|
|
228
226
|
fill: i.color,
|
|
229
227
|
"fill-opacity": 1,
|
|
230
228
|
stroke: i.color,
|
|
231
229
|
"stroke-opacity": 1,
|
|
232
|
-
opacity:
|
|
230
|
+
opacity: k(i.opacity * s),
|
|
233
231
|
filter: t.getShadowFilterUrl(i)
|
|
234
232
|
} : null;
|
|
235
|
-
return
|
|
233
|
+
return oe(n, r, t, (e) => {
|
|
236
234
|
if (t.countOnly) return;
|
|
237
|
-
let { datum: n, x: r, y: i, width:
|
|
235
|
+
let { datum: n, x: r, y: i, width: p, height: m, radii: h, opacityFactor: g, strokeWidth: _, fill: v, fillOpacity: y } = e, b = {
|
|
238
236
|
...l(n),
|
|
239
|
-
...g == 1 ? {} : { opacity:
|
|
237
|
+
...g == 1 ? {} : { opacity: k(g) }
|
|
240
238
|
};
|
|
241
239
|
if (a != "none" && _ > 0 && (b.fill = t.getRectHatchPatternUrl({
|
|
242
240
|
type: a,
|
|
243
|
-
fill:
|
|
244
|
-
fillOpacity:
|
|
245
|
-
stroke:
|
|
246
|
-
strokeOpacity:
|
|
241
|
+
fill: d(c.fill(n)),
|
|
242
|
+
fillOpacity: u(c.fillOpacity, n) * s,
|
|
243
|
+
stroke: d(c.stroke(n)),
|
|
244
|
+
strokeOpacity: u(c.strokeOpacity, n) * s,
|
|
247
245
|
strokeWidth: _
|
|
248
|
-
}), b["fill-opacity"] = 1),
|
|
249
|
-
let e =
|
|
250
|
-
...
|
|
251
|
-
"stroke-width":
|
|
246
|
+
}), b["fill-opacity"] = 1), f) {
|
|
247
|
+
let e = B(r, i, p, m, h, {
|
|
248
|
+
...f,
|
|
249
|
+
"stroke-width": A(_)
|
|
252
250
|
});
|
|
253
251
|
if (a == "none" && v != "none" && y == 1 && g == 1) o.appendChild(e);
|
|
254
252
|
else {
|
|
255
|
-
let n = _ / 2, a = Object.fromEntries(Object.entries(
|
|
253
|
+
let n = _ / 2, a = Object.fromEntries(Object.entries(h).map(([e, t]) => [e, t + n])), s = V(r - n, i - n, p + n * 2, m + n * 2, a), c = M("g", { "clip-path": t.getShadowClipPathUrl(s) });
|
|
256
254
|
c.appendChild(e), o.appendChild(c);
|
|
257
255
|
}
|
|
258
256
|
}
|
|
259
|
-
o.appendChild(
|
|
257
|
+
o.appendChild(B(r, i, p, m, h, b));
|
|
260
258
|
});
|
|
261
259
|
}
|
|
262
|
-
function
|
|
263
|
-
if (
|
|
264
|
-
let o = i.topLeft, s =
|
|
265
|
-
return
|
|
260
|
+
function B(e, t, n, r, i, a) {
|
|
261
|
+
if (ge(i)) {
|
|
262
|
+
let o = i.topLeft, s = A(e), c = A(t), l = A(e + n), u = A(t + r);
|
|
263
|
+
return M("rect", {
|
|
266
264
|
x: s,
|
|
267
265
|
y: c,
|
|
268
|
-
width:
|
|
269
|
-
height:
|
|
266
|
+
width: A(l - s),
|
|
267
|
+
height: A(u - c),
|
|
270
268
|
...o ? {
|
|
271
|
-
rx:
|
|
272
|
-
ry:
|
|
269
|
+
rx: A(o),
|
|
270
|
+
ry: A(o)
|
|
273
271
|
} : {},
|
|
274
272
|
...a
|
|
275
273
|
});
|
|
276
|
-
} else return
|
|
277
|
-
d:
|
|
274
|
+
} else return M("path", {
|
|
275
|
+
d: V(e, t, n, r, i),
|
|
278
276
|
...a
|
|
279
277
|
});
|
|
280
278
|
}
|
|
281
|
-
function
|
|
279
|
+
function ge(e) {
|
|
282
280
|
return Object.values(e).every((t) => t == e.topLeft);
|
|
283
281
|
}
|
|
284
|
-
function
|
|
282
|
+
function V(e, t, n, r, i) {
|
|
285
283
|
let a = e + n, o = t + r, { topLeft: s, topRight: c, bottomRight: l, bottomLeft: u } = i;
|
|
286
284
|
return [
|
|
287
|
-
`M ${
|
|
288
|
-
`H ${
|
|
289
|
-
|
|
290
|
-
`V ${
|
|
291
|
-
|
|
292
|
-
`H ${
|
|
293
|
-
|
|
294
|
-
`V ${
|
|
295
|
-
|
|
285
|
+
`M ${U(e + s, t)}`,
|
|
286
|
+
`H ${A(a - c)}`,
|
|
287
|
+
H(c, a, t + c, a, t),
|
|
288
|
+
`V ${A(o - l)}`,
|
|
289
|
+
H(l, a - l, o, a, o),
|
|
290
|
+
`H ${A(e + u)}`,
|
|
291
|
+
H(u, e, o - u, e, o),
|
|
292
|
+
`V ${A(t + s)}`,
|
|
293
|
+
H(s, e + s, t, e, t),
|
|
296
294
|
"Z"
|
|
297
295
|
].join(" ");
|
|
298
296
|
}
|
|
299
|
-
function
|
|
300
|
-
return e ? `A ${
|
|
297
|
+
function H(e, t, n, r, i) {
|
|
298
|
+
return e ? `A ${A(e)} ${A(e)} 0 0 1 ${U(t, n)}` : `L ${U(r, i)}`;
|
|
301
299
|
}
|
|
302
|
-
function
|
|
303
|
-
return `${
|
|
300
|
+
function U(e, t) {
|
|
301
|
+
return `${A(e)} ${A(t)}`;
|
|
304
302
|
}
|
|
305
303
|
//#endregion
|
|
306
304
|
//#region ../core/src/rendering/svg/renderers/rule.js
|
|
307
|
-
function
|
|
308
|
-
let n = e, r =
|
|
305
|
+
function W(e, t) {
|
|
306
|
+
let n = e, r = ie(n), { coords: i, data: a, group: o, viewOpacity: s, visibleBounds: c } = t, l = n.encoders, u = n.properties.strokeDash, f = N(o, {
|
|
309
307
|
stroke: {
|
|
310
308
|
encoder: l.color,
|
|
311
|
-
transform:
|
|
309
|
+
transform: d
|
|
312
310
|
},
|
|
313
311
|
"stroke-opacity": {
|
|
314
312
|
encoder: l.opacity,
|
|
@@ -316,59 +314,59 @@ function G(e, t) {
|
|
|
316
314
|
},
|
|
317
315
|
"stroke-width": {
|
|
318
316
|
encoder: l.size,
|
|
319
|
-
transform: (e) =>
|
|
317
|
+
transform: (e) => A(+e)
|
|
320
318
|
}
|
|
321
319
|
});
|
|
322
|
-
return o.setAttribute("stroke-linecap", "" + n.properties.strokeCap), u && (o.setAttribute("stroke-dasharray", u.map(
|
|
320
|
+
return o.setAttribute("stroke-linecap", "" + n.properties.strokeCap), u && (o.setAttribute("stroke-dasharray", u.map(A).join(" ")), o.setAttribute("stroke-dashoffset", "" + A(n.properties.strokeDashOffset))), y(n, r, {
|
|
323
321
|
coords: i,
|
|
324
322
|
data: a,
|
|
325
323
|
visibleBounds: c
|
|
326
324
|
}, (e) => {
|
|
327
|
-
t.countOnly || o.appendChild(
|
|
328
|
-
x1:
|
|
329
|
-
y1:
|
|
330
|
-
x2:
|
|
331
|
-
y2:
|
|
332
|
-
...
|
|
325
|
+
t.countOnly || o.appendChild(M("line", {
|
|
326
|
+
x1: A(e.x1),
|
|
327
|
+
y1: A(e.y1),
|
|
328
|
+
x2: A(e.x2),
|
|
329
|
+
y2: A(e.y2),
|
|
330
|
+
...f(e.datum)
|
|
333
331
|
}));
|
|
334
332
|
});
|
|
335
333
|
}
|
|
336
334
|
//#endregion
|
|
337
335
|
//#region ../core/src/rendering/svg/renderers/text.js
|
|
338
|
-
function
|
|
339
|
-
let n = e, r = n.properties, i =
|
|
336
|
+
function _e(e, t) {
|
|
337
|
+
let n = e, r = n.properties, i = v(n), { coords: a, data: o, group: s, viewOpacity: c, visibleBounds: l, anchorCullBounds: u } = t, p = n.encoders, m = N(s, {
|
|
340
338
|
fill: {
|
|
341
|
-
encoder:
|
|
342
|
-
transform:
|
|
339
|
+
encoder: p.color,
|
|
340
|
+
transform: d
|
|
343
341
|
},
|
|
344
342
|
"fill-opacity": {
|
|
345
|
-
encoder:
|
|
343
|
+
encoder: p.opacity,
|
|
346
344
|
transform: (e) => +e * c
|
|
347
345
|
},
|
|
348
346
|
"font-size": {
|
|
349
|
-
encoder:
|
|
350
|
-
transform: (e) =>
|
|
347
|
+
encoder: p.size,
|
|
348
|
+
transform: (e) => A(+e)
|
|
351
349
|
}
|
|
352
350
|
});
|
|
353
|
-
s.setAttribute("font-family",
|
|
354
|
-
let
|
|
351
|
+
s.setAttribute("font-family", te(r.font)), s.setAttribute("font-style", r.fontStyle ?? "normal"), s.setAttribute("font-weight", "" + w(r.fontWeight ?? "normal")), s.setAttribute("text-anchor", ve[i.align]);
|
|
352
|
+
let h = {
|
|
355
353
|
top: {
|
|
356
|
-
width:
|
|
357
|
-
distance:
|
|
354
|
+
width: f(n, r.viewportEdgeFadeWidthTop),
|
|
355
|
+
distance: f(n, r.viewportEdgeFadeDistanceTop)
|
|
358
356
|
},
|
|
359
357
|
right: {
|
|
360
|
-
width:
|
|
361
|
-
distance:
|
|
358
|
+
width: f(n, r.viewportEdgeFadeWidthRight),
|
|
359
|
+
distance: f(n, r.viewportEdgeFadeDistanceRight)
|
|
362
360
|
},
|
|
363
361
|
bottom: {
|
|
364
|
-
width:
|
|
365
|
-
distance:
|
|
362
|
+
width: f(n, r.viewportEdgeFadeWidthBottom),
|
|
363
|
+
distance: f(n, r.viewportEdgeFadeDistanceBottom)
|
|
366
364
|
},
|
|
367
365
|
left: {
|
|
368
|
-
width:
|
|
369
|
-
distance:
|
|
366
|
+
width: f(n, r.viewportEdgeFadeWidthLeft),
|
|
367
|
+
distance: f(n, r.viewportEdgeFadeDistanceLeft)
|
|
370
368
|
}
|
|
371
|
-
},
|
|
369
|
+
}, g = ne(n, i, {
|
|
372
370
|
coords: a,
|
|
373
371
|
data: o,
|
|
374
372
|
visibleBounds: l,
|
|
@@ -377,93 +375,93 @@ function he(e, t) {
|
|
|
377
375
|
if (t.countOnly) return;
|
|
378
376
|
if (e.logoScale) {
|
|
379
377
|
e.multiCharacterLogo && t.warn("SVG export stretches multi-character logo text as a single glyph cell.");
|
|
380
|
-
let n = [`translate(${
|
|
381
|
-
e.angle && n.push(`rotate(${
|
|
382
|
-
let r =
|
|
378
|
+
let n = [`translate(${A(e.x)} ${A(e.y)})`];
|
|
379
|
+
e.angle && n.push(`rotate(${A(e.angle)})`), (e.dx || e.dy) && n.push(`translate(${A(e.dx)} ${A(e.dy)})`), n.push(`scale(${A(e.logoScale.width)} ${A(e.logoScale.heightScale)})`);
|
|
380
|
+
let r = M("text", {
|
|
383
381
|
x: 0,
|
|
384
382
|
y: 0,
|
|
385
|
-
dy:
|
|
383
|
+
dy: O("middle", 1),
|
|
386
384
|
"text-anchor": "middle",
|
|
387
385
|
lengthAdjust: "spacingAndGlyphs",
|
|
388
386
|
textLength: 1,
|
|
389
387
|
transform: n.join(" "),
|
|
390
|
-
...
|
|
388
|
+
...m(e.datum),
|
|
391
389
|
"font-size": 1
|
|
392
390
|
});
|
|
393
391
|
r.textContent = e.text, s.appendChild(r);
|
|
394
392
|
return;
|
|
395
393
|
}
|
|
396
|
-
let n =
|
|
394
|
+
let n = A(e.x), r = A(e.y), a = M("text", {
|
|
397
395
|
x: n,
|
|
398
396
|
y: r,
|
|
399
|
-
dx:
|
|
400
|
-
dy:
|
|
397
|
+
dx: A(e.dx),
|
|
398
|
+
dy: A(e.dy + O(i.baseline, e.size)),
|
|
401
399
|
lengthAdjust: "spacingAndGlyphs",
|
|
402
|
-
textLength:
|
|
403
|
-
...
|
|
404
|
-
...e.scale == 1 ? {} : { "font-size":
|
|
405
|
-
...e.fadeOpacity == 1 ? {} : { opacity:
|
|
400
|
+
textLength: A(e.width),
|
|
401
|
+
...m(e.datum),
|
|
402
|
+
...e.scale == 1 ? {} : { "font-size": A(e.size) },
|
|
403
|
+
...e.fadeOpacity == 1 ? {} : { opacity: k(e.fadeOpacity) }
|
|
406
404
|
});
|
|
407
|
-
a.textContent = e.text, e.angle && a.setAttribute("transform", `rotate(${
|
|
405
|
+
a.textContent = e.text, e.angle && a.setAttribute("transform", `rotate(${A(e.angle)} ${n} ${r})`), s.appendChild(a);
|
|
408
406
|
});
|
|
409
407
|
if (!t.countOnly && s.childElementCount > 0) {
|
|
410
|
-
let e = t.getViewportEdgeFadeMaskUrl(
|
|
408
|
+
let e = t.getViewportEdgeFadeMaskUrl(h);
|
|
411
409
|
e && s.setAttribute("mask", e);
|
|
412
410
|
}
|
|
413
|
-
return
|
|
411
|
+
return g;
|
|
414
412
|
}
|
|
415
|
-
var
|
|
413
|
+
var ve = {
|
|
416
414
|
left: "start",
|
|
417
415
|
center: "middle",
|
|
418
416
|
right: "end"
|
|
419
|
-
},
|
|
420
|
-
function
|
|
421
|
-
let n =
|
|
417
|
+
}, G = 64;
|
|
418
|
+
function ye(e, t) {
|
|
419
|
+
let n = xe(e.unitView);
|
|
422
420
|
if (!n) return;
|
|
423
421
|
let i = e.unitView.getScaleResolution(n.channel)?.getScale();
|
|
424
422
|
if (!i || !r(i.type)) return;
|
|
425
|
-
let { coords: a, data: o, group: s, viewOpacity: c, visibleBounds:
|
|
423
|
+
let { coords: a, data: o, group: s, viewOpacity: c, visibleBounds: l } = t;
|
|
426
424
|
if (!o.length) return 0;
|
|
427
|
-
let
|
|
428
|
-
let [t, n] =
|
|
429
|
-
return
|
|
425
|
+
let u = e.encoders, f = n.channel == "stroke" ? u.stroke : u.fill, p = Se(e.unitView.spec.encoding.x), m = Infinity, h = Infinity, _ = -Infinity, v = -Infinity, y = o.map((e) => {
|
|
426
|
+
let [t, n] = ce(a, u, e), [r, i] = g(a, u, e);
|
|
427
|
+
return m = Math.min(m, t, n), h = Math.min(h, r, i), _ = Math.max(_, t, n), v = Math.max(v, r, i), {
|
|
430
428
|
offset: Number(e.position),
|
|
431
|
-
color: f(
|
|
429
|
+
color: d(f(e))
|
|
432
430
|
};
|
|
433
431
|
}).sort((e, t) => e.offset - t.offset);
|
|
434
|
-
if (!l
|
|
432
|
+
if (!ee(l, m, h, _, v)) return 0;
|
|
435
433
|
if (t.countOnly) return o.length;
|
|
436
|
-
let
|
|
434
|
+
let b = be(y), x = [
|
|
437
435
|
{
|
|
438
436
|
offset: 0,
|
|
439
|
-
color:
|
|
437
|
+
color: b[0].color
|
|
440
438
|
},
|
|
441
|
-
...
|
|
439
|
+
...b,
|
|
442
440
|
{
|
|
443
441
|
offset: 1,
|
|
444
|
-
color:
|
|
442
|
+
color: b.at(-1).color
|
|
445
443
|
}
|
|
446
|
-
],
|
|
447
|
-
x1:
|
|
448
|
-
y1:
|
|
449
|
-
x2:
|
|
450
|
-
y2:
|
|
451
|
-
stops:
|
|
452
|
-
}),
|
|
453
|
-
return s.appendChild(
|
|
454
|
-
x:
|
|
455
|
-
y:
|
|
456
|
-
width:
|
|
457
|
-
height:
|
|
458
|
-
fill:
|
|
459
|
-
"fill-opacity":
|
|
444
|
+
], S = t.getLegendGradientUrl({
|
|
445
|
+
x1: m,
|
|
446
|
+
y1: p ? h : v,
|
|
447
|
+
x2: p ? _ : m,
|
|
448
|
+
y2: h,
|
|
449
|
+
stops: x
|
|
450
|
+
}), C = A(m), w = A(h), T = A(_), E = A(v), D = Number(u.fillOpacity(o[0])) * c;
|
|
451
|
+
return s.appendChild(M("rect", {
|
|
452
|
+
x: C,
|
|
453
|
+
y: w,
|
|
454
|
+
width: A(T - C),
|
|
455
|
+
height: A(E - w),
|
|
456
|
+
fill: S,
|
|
457
|
+
"fill-opacity": k(D),
|
|
460
458
|
stroke: "none"
|
|
461
459
|
})), o.length;
|
|
462
460
|
}
|
|
463
|
-
function
|
|
464
|
-
return e.length <=
|
|
461
|
+
function be(e) {
|
|
462
|
+
return e.length <= G ? e : Array.from({ length: G }, (t, n) => e[Math.round(n * (e.length - 1) / (G - 1))]);
|
|
465
463
|
}
|
|
466
|
-
function
|
|
464
|
+
function xe(e) {
|
|
467
465
|
let t = e;
|
|
468
466
|
for (; t;) {
|
|
469
467
|
let e = t.spec.data;
|
|
@@ -471,32 +469,32 @@ function ye(e) {
|
|
|
471
469
|
t = t.dataParent;
|
|
472
470
|
}
|
|
473
471
|
}
|
|
474
|
-
function
|
|
472
|
+
function Se(e) {
|
|
475
473
|
return e != null && "field" in e && (e.field == "position0" || e.field == "position1");
|
|
476
474
|
}
|
|
477
475
|
//#endregion
|
|
478
476
|
//#region ../core/src/rendering/svg/renderers/index.js
|
|
479
|
-
var
|
|
480
|
-
["arrow",
|
|
481
|
-
["link",
|
|
482
|
-
["point",
|
|
483
|
-
["rect",
|
|
484
|
-
["rule",
|
|
485
|
-
["text",
|
|
486
|
-
["tick",
|
|
477
|
+
var Ce = /* @__PURE__ */ new Map([
|
|
478
|
+
["arrow", de],
|
|
479
|
+
["link", me],
|
|
480
|
+
["point", I],
|
|
481
|
+
["rect", he],
|
|
482
|
+
["rule", W],
|
|
483
|
+
["text", _e],
|
|
484
|
+
["tick", W]
|
|
487
485
|
]);
|
|
488
|
-
function
|
|
486
|
+
function we(e, t) {
|
|
489
487
|
if (e.getType() == "rect") {
|
|
490
|
-
let n =
|
|
488
|
+
let n = ye(e, t);
|
|
491
489
|
if (n !== void 0) return n;
|
|
492
490
|
}
|
|
493
|
-
let n =
|
|
491
|
+
let n = Ce.get(e.getType());
|
|
494
492
|
if (!n) throw Error(`SVG rendering is not implemented for mark type "${e.getType()}". View: ${e.unitView.getPathString()}`);
|
|
495
493
|
return n(e, t);
|
|
496
494
|
}
|
|
497
495
|
//#endregion
|
|
498
496
|
//#region ../core/src/rendering/svg/rectHatchPattern.js
|
|
499
|
-
function
|
|
497
|
+
function Te(e, t) {
|
|
500
498
|
let n = t.strokeWidth, r = [
|
|
501
499
|
"dots",
|
|
502
500
|
"rings",
|
|
@@ -509,31 +507,31 @@ function Ce(e, t) {
|
|
|
509
507
|
"vertical",
|
|
510
508
|
"horizontal",
|
|
511
509
|
"grid"
|
|
512
|
-
].includes(t.type), o = r ? n * 7 : n * (i ? 6 : 4), s = a ? n * 2 : n, c = o, l = r ? o * 2 : o, u =
|
|
510
|
+
].includes(t.type), o = r ? n * 7 : n * (i ? 6 : 4), s = a ? n * 2 : n, c = o, l = r ? o * 2 : o, u = M("pattern", {
|
|
513
511
|
id: e,
|
|
514
512
|
x: 0,
|
|
515
513
|
y: 0,
|
|
516
|
-
width:
|
|
517
|
-
height:
|
|
514
|
+
width: A(c),
|
|
515
|
+
height: A(l),
|
|
518
516
|
patternUnits: "userSpaceOnUse"
|
|
519
517
|
});
|
|
520
|
-
u.appendChild(
|
|
521
|
-
width:
|
|
522
|
-
height:
|
|
518
|
+
u.appendChild(M("rect", {
|
|
519
|
+
width: A(c),
|
|
520
|
+
height: A(l),
|
|
523
521
|
fill: t.fill,
|
|
524
|
-
"fill-opacity":
|
|
522
|
+
"fill-opacity": k(t.fillOpacity)
|
|
525
523
|
}));
|
|
526
|
-
let d =
|
|
524
|
+
let d = M("g", {
|
|
527
525
|
fill: "none",
|
|
528
526
|
stroke: t.stroke,
|
|
529
|
-
"stroke-opacity":
|
|
530
|
-
"stroke-width":
|
|
527
|
+
"stroke-opacity": k(t.strokeOpacity),
|
|
528
|
+
"stroke-width": A(s),
|
|
531
529
|
"stroke-linecap": "square"
|
|
532
530
|
});
|
|
533
|
-
return
|
|
531
|
+
return Ee(d, t.type, o, s), u.appendChild(d), u;
|
|
534
532
|
}
|
|
535
|
-
function
|
|
536
|
-
let i = (t) => e.appendChild(
|
|
533
|
+
function Ee(e, t, n, r) {
|
|
534
|
+
let i = (t) => e.appendChild(M("path", { d: t })), a = (e) => A(e), o = (e) => {
|
|
537
535
|
for (let t of [
|
|
538
536
|
-n,
|
|
539
537
|
0,
|
|
@@ -562,10 +560,10 @@ function we(e, t, n, r) {
|
|
|
562
560
|
case "dots":
|
|
563
561
|
case "rings":
|
|
564
562
|
case "ringsLarge": {
|
|
565
|
-
let r = n * (t == "dots" ? .07 : t == "rings" ? .2 : .35), i = (t, n) => e.appendChild(
|
|
566
|
-
cx:
|
|
567
|
-
cy:
|
|
568
|
-
r:
|
|
563
|
+
let r = n * (t == "dots" ? .07 : t == "rings" ? .2 : .35), i = (t, n) => e.appendChild(M("circle", {
|
|
564
|
+
cx: A(t),
|
|
565
|
+
cy: A(n),
|
|
566
|
+
r: A(r)
|
|
569
567
|
}));
|
|
570
568
|
i(n / 2, 0), i(n / 2, n * 2), i(0, n), i(n, n);
|
|
571
569
|
break;
|
|
@@ -575,47 +573,47 @@ function we(e, t, n, r) {
|
|
|
575
573
|
}
|
|
576
574
|
//#endregion
|
|
577
575
|
//#region ../core/src/rendering/svg/linkArcFadeMask.js
|
|
578
|
-
function
|
|
579
|
-
let { normalX: i, normalY: a, offset: o, start: s, end: c } = r, l = i * o, u = a * o, d = e + "-gradient", f =
|
|
576
|
+
function De(e, t, n, r) {
|
|
577
|
+
let { normalX: i, normalY: a, offset: o, start: s, end: c } = r, l = i * o, u = a * o, d = e + "-gradient", f = M("linearGradient", {
|
|
580
578
|
id: d,
|
|
581
579
|
gradientUnits: "userSpaceOnUse",
|
|
582
|
-
x1:
|
|
583
|
-
y1:
|
|
584
|
-
x2:
|
|
585
|
-
y2:
|
|
580
|
+
x1: A(l - i * c),
|
|
581
|
+
y1: A(u - a * c),
|
|
582
|
+
x2: A(l + i * c),
|
|
583
|
+
y2: A(u + a * c),
|
|
586
584
|
spreadMethod: "pad"
|
|
587
585
|
});
|
|
588
|
-
for (let { offset: e, opacity: t } of
|
|
589
|
-
offset:
|
|
586
|
+
for (let { offset: e, opacity: t } of S(s, c)) f.appendChild(M("stop", {
|
|
587
|
+
offset: K(e, 3),
|
|
590
588
|
"stop-color": "white",
|
|
591
|
-
"stop-opacity":
|
|
589
|
+
"stop-opacity": K(t, 3)
|
|
592
590
|
}));
|
|
593
|
-
let p =
|
|
591
|
+
let p = M("mask", {
|
|
594
592
|
id: e,
|
|
595
593
|
x: 0,
|
|
596
594
|
y: 0,
|
|
597
|
-
width:
|
|
598
|
-
height:
|
|
595
|
+
width: A(t),
|
|
596
|
+
height: A(n),
|
|
599
597
|
maskUnits: "userSpaceOnUse",
|
|
600
598
|
maskContentUnits: "userSpaceOnUse",
|
|
601
599
|
"mask-type": "luminance"
|
|
602
600
|
});
|
|
603
|
-
return p.appendChild(
|
|
604
|
-
width:
|
|
605
|
-
height:
|
|
601
|
+
return p.appendChild(M("rect", {
|
|
602
|
+
width: A(t),
|
|
603
|
+
height: A(n),
|
|
606
604
|
fill: `url(#${d})`
|
|
607
605
|
})), {
|
|
608
606
|
gradient: f,
|
|
609
607
|
mask: p
|
|
610
608
|
};
|
|
611
609
|
}
|
|
612
|
-
function
|
|
610
|
+
function K(e, t) {
|
|
613
611
|
let n = 10 ** t;
|
|
614
612
|
return Math.round(e * n) / n;
|
|
615
613
|
}
|
|
616
614
|
//#endregion
|
|
617
615
|
//#region ../core/src/rendering/svg/svgViewRenderingContext.js
|
|
618
|
-
var
|
|
616
|
+
var q = class extends s {
|
|
619
617
|
#e;
|
|
620
618
|
#t;
|
|
621
619
|
#n = [];
|
|
@@ -628,8 +626,8 @@ var J = class extends s {
|
|
|
628
626
|
#l = /* @__PURE__ */ new Set();
|
|
629
627
|
#u = !1;
|
|
630
628
|
#d = /* @__PURE__ */ new Map();
|
|
631
|
-
#f = new
|
|
632
|
-
#p =
|
|
629
|
+
#f = new p();
|
|
630
|
+
#p = M("g");
|
|
633
631
|
#m;
|
|
634
632
|
#h;
|
|
635
633
|
#g = [];
|
|
@@ -643,13 +641,13 @@ var J = class extends s {
|
|
|
643
641
|
#w = 0;
|
|
644
642
|
constructor(e, t) {
|
|
645
643
|
super(e), this.width = t.width, this.height = t.height, this.#h = t.maxVectorInstances;
|
|
646
|
-
let n =
|
|
647
|
-
this.#e =
|
|
648
|
-
xmlns:
|
|
644
|
+
let n = A(t.width), r = A(t.height);
|
|
645
|
+
this.#e = M("svg", {
|
|
646
|
+
xmlns: j,
|
|
649
647
|
width: n,
|
|
650
648
|
height: r,
|
|
651
649
|
viewBox: `0 0 ${n} ${r}`
|
|
652
|
-
}), this.#t =
|
|
650
|
+
}), this.#t = M("defs"), this.#e.appendChild(this.#t), t.background != null && this.#e.appendChild(M("rect", {
|
|
653
651
|
width: n,
|
|
654
652
|
height: r,
|
|
655
653
|
fill: t.background,
|
|
@@ -690,42 +688,42 @@ var J = class extends s {
|
|
|
690
688
|
for (let t of e.markGroupElements) t.childElementCount || t.remove();
|
|
691
689
|
this.#m = void 0;
|
|
692
690
|
}
|
|
693
|
-
pushView(
|
|
694
|
-
let r =
|
|
695
|
-
if (
|
|
691
|
+
pushView(e, t) {
|
|
692
|
+
let r = e.getPathString();
|
|
693
|
+
if (n(this.#n)?.exportExcluded || i(e) && e.name.startsWith("scrollbar-")) {
|
|
696
694
|
this.#n.push({
|
|
697
|
-
view:
|
|
695
|
+
view: e,
|
|
698
696
|
node: this.currentNode,
|
|
699
|
-
coords:
|
|
697
|
+
coords: t,
|
|
700
698
|
exportExcluded: !0
|
|
701
699
|
});
|
|
702
700
|
return;
|
|
703
701
|
}
|
|
704
702
|
if (this.#u) {
|
|
705
703
|
this.#n.push({
|
|
706
|
-
view:
|
|
704
|
+
view: e,
|
|
707
705
|
node: this.currentNode,
|
|
708
|
-
coords:
|
|
706
|
+
coords: t,
|
|
709
707
|
exportExcluded: !1
|
|
710
708
|
});
|
|
711
709
|
return;
|
|
712
710
|
}
|
|
713
|
-
let a = this.#m, o = a?.viewGroups.get(
|
|
711
|
+
let a = this.#m, o = a?.viewGroups.get(e);
|
|
714
712
|
if (o) {
|
|
715
713
|
if (o.parentNode !== this.currentNode) throw Error(`Sample-faceted view was rendered under multiple parents: ${r}`);
|
|
716
714
|
} else {
|
|
717
|
-
o =
|
|
718
|
-
id:
|
|
719
|
-
"data-name":
|
|
715
|
+
o = M("g", {
|
|
716
|
+
id: Oe(e.name, this.#v++),
|
|
717
|
+
"data-name": e.name,
|
|
720
718
|
"data-view-path": r
|
|
721
719
|
});
|
|
722
|
-
let
|
|
723
|
-
|
|
720
|
+
let t = M("title");
|
|
721
|
+
t.textContent = r, o.appendChild(t), this.currentNode.appendChild(o), a?.viewGroups.set(e, o);
|
|
724
722
|
}
|
|
725
723
|
this.#n.push({
|
|
726
|
-
view:
|
|
724
|
+
view: e,
|
|
727
725
|
node: o,
|
|
728
|
-
coords:
|
|
726
|
+
coords: t,
|
|
729
727
|
exportExcluded: !1
|
|
730
728
|
});
|
|
731
729
|
}
|
|
@@ -733,51 +731,60 @@ var J = class extends s {
|
|
|
733
731
|
if (this.#n.pop()?.view !== e) throw Error("Unbalanced SVG view rendering context stack.");
|
|
734
732
|
}
|
|
735
733
|
renderMark(r, i) {
|
|
736
|
-
if (
|
|
737
|
-
let a =
|
|
738
|
-
if (!
|
|
734
|
+
if (n(this.#n)?.exportExcluded || r.unitView.getEffectiveOpacity() <= 0) return;
|
|
735
|
+
let a = e(i), o = t(a, r.properties.clip, this.currentCoords), s = T(this.width, this.height, o);
|
|
736
|
+
if (!l(s)) return;
|
|
739
737
|
let c = this.getVisibleInstanceCount(r);
|
|
740
738
|
if (!this.#u && this.#h != null && c == 0) return;
|
|
741
739
|
if (!this.#u && this.#h != null && c > this.#h) {
|
|
742
740
|
this.#T(r, s);
|
|
743
741
|
return;
|
|
744
742
|
}
|
|
745
|
-
let
|
|
743
|
+
let u = !this.#u && this.#m != null, d = u ? this.getClipPathUrl(o) : void 0, f = u ? this.#m.markGroups.get(r)?.get(d ?? "") : void 0;
|
|
746
744
|
!this.#u && !f && this.#E();
|
|
747
|
-
let
|
|
748
|
-
if (
|
|
749
|
-
let n =
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
this.#u
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
745
|
+
let p = this.#u ? this.#p : this.#O(r, d), g = h(this.currentCoords, a, r.properties.cullByVisibleRange), _ = r.getOrder?.(), v = !this.#u && _ && _.isActive();
|
|
746
|
+
if (m(r, i, this.currentCoords, this.#f, (e, t) => {
|
|
747
|
+
let n = (t, n = !1) => {
|
|
748
|
+
let i = we(r, {
|
|
749
|
+
coords: e,
|
|
750
|
+
data: t,
|
|
751
|
+
group: p,
|
|
752
|
+
visibleBounds: s,
|
|
753
|
+
anchorCullBounds: g,
|
|
754
|
+
viewOpacity: r.unitView.getEffectiveOpacity(),
|
|
755
|
+
secondOrderPass: n,
|
|
756
|
+
countOnly: this.#u,
|
|
757
|
+
getViewportEdgeFadeMaskUrl: (e) => this.#u ? void 0 : this.getViewportEdgeFadeMaskUrl(e),
|
|
758
|
+
getShadowFilterUrl: (e) => this.#u ? "" : this.getShadowFilterUrl(e),
|
|
759
|
+
getShadowClipPathUrl: (e) => this.#u ? "" : this.getShadowClipPathUrl(e),
|
|
760
|
+
getRectHatchPatternUrl: (e) => this.#u ? "" : this.getRectHatchPatternUrl(e),
|
|
761
|
+
getLinkArcFadeMaskUrl: (e) => this.#u ? void 0 : this.getLinkArcFadeMaskUrl(e),
|
|
762
|
+
getLegendGradientUrl: (e) => this.#u ? "" : this.getLegendGradientUrl(e),
|
|
763
|
+
warn: (e) => {
|
|
764
|
+
this.#u || this.#l.add(`${e} View: ${r.unitView.getPathString()}`);
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
this.#u && this.#d.set(r, this.getVisibleInstanceCount(r) + i);
|
|
768
|
+
};
|
|
769
|
+
if (!v) {
|
|
770
|
+
n(t);
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
let i = ae(t, 0, t.length, _.predicate, _.passes);
|
|
774
|
+
for (let [e, t] of i.entries()) t.length !== 0 && n(t, e === 1);
|
|
775
|
+
}, (e) => this.#l.add(`SVG export could not resolve sample facet index ${e}. View: ${r.unitView.getPathString()}`)), !this.#u && !u && p.childElementCount > 0) {
|
|
769
776
|
let e = this.getClipPathUrl(o);
|
|
770
|
-
e &&
|
|
777
|
+
e && p.setAttribute("clip-path", e), this.currentNode.appendChild(p);
|
|
771
778
|
}
|
|
772
779
|
}
|
|
773
780
|
#T(e, t) {
|
|
774
781
|
let n = this.#m?.rasterRuns.get(e);
|
|
775
782
|
if (n) {
|
|
776
|
-
|
|
783
|
+
J(n.bounds, t), n.viewNodes.add(this.currentNode);
|
|
777
784
|
return;
|
|
778
785
|
}
|
|
779
786
|
let r = this.#_;
|
|
780
|
-
if (r)
|
|
787
|
+
if (r) J(r.bounds, t);
|
|
781
788
|
else {
|
|
782
789
|
let e = document.createComment("raster-run");
|
|
783
790
|
this.currentNode.appendChild(e), r = {
|
|
@@ -799,26 +806,26 @@ var J = class extends s {
|
|
|
799
806
|
e && (this.#g.push(e), this.#_ = void 0);
|
|
800
807
|
}
|
|
801
808
|
#D(e) {
|
|
802
|
-
let t =
|
|
809
|
+
let t = ke(e.viewNodes), n = e.targets.map((e) => e.mark.getType()), r = M("g", {
|
|
803
810
|
id: `rasterized-${n.join("-")}-${this.#w++}`,
|
|
804
811
|
"data-name": `Rasterized ${n.join(", ")}`,
|
|
805
812
|
"data-rasterized": ""
|
|
806
|
-
}), i =
|
|
813
|
+
}), i = M("image", { preserveAspectRatio: "none" });
|
|
807
814
|
r.appendChild(i);
|
|
808
815
|
let a = e.anchor.parentNode;
|
|
809
|
-
t == a ? t.insertBefore(r, e.anchor) : t.insertBefore(r,
|
|
810
|
-
for (let n of e.viewNodes)
|
|
816
|
+
t == a ? t.insertBefore(r, e.anchor) : t.insertBefore(r, Ae(a, t)), e.anchor.remove();
|
|
817
|
+
for (let n of e.viewNodes) je(n, t);
|
|
811
818
|
e.image = i;
|
|
812
819
|
}
|
|
813
820
|
#O(e, t) {
|
|
814
821
|
let n = this.#m;
|
|
815
|
-
if (!n) return
|
|
822
|
+
if (!n) return M("g", { "data-mark-type": e.getType() });
|
|
816
823
|
let r = n.markGroups.get(e);
|
|
817
824
|
r || (r = /* @__PURE__ */ new Map(), n.markGroups.set(e, r));
|
|
818
825
|
let i = t ?? "", a = r.get(i);
|
|
819
826
|
if (a) {
|
|
820
827
|
if (a.parentNode !== this.currentNode) throw Error(`Sample-faceted mark was rendered under multiple parents: ${e.unitView.getPathString()}`);
|
|
821
|
-
} else a =
|
|
828
|
+
} else a = M("g", { "data-mark-type": e.getType() }), t && a.setAttribute("clip-path", t), this.currentNode.appendChild(a), r.set(i, a), n.markGroupElements.add(a);
|
|
822
829
|
return a;
|
|
823
830
|
}
|
|
824
831
|
getClipPathUrl(e) {
|
|
@@ -828,14 +835,14 @@ var J = class extends s {
|
|
|
828
835
|
e.clipY ? t.y : 0,
|
|
829
836
|
e.clipX ? t.width : this.width,
|
|
830
837
|
e.clipY ? t.height : this.height
|
|
831
|
-
].map(
|
|
838
|
+
].map(A), r = n.join(","), i = this.#r.get(r);
|
|
832
839
|
if (!i) {
|
|
833
840
|
i = "clip-" + this.#y++;
|
|
834
|
-
let e =
|
|
841
|
+
let e = M("clipPath", {
|
|
835
842
|
id: i,
|
|
836
843
|
clipPathUnits: "userSpaceOnUse"
|
|
837
844
|
});
|
|
838
|
-
e.appendChild(
|
|
845
|
+
e.appendChild(M("rect", {
|
|
839
846
|
x: n[0],
|
|
840
847
|
y: n[1],
|
|
841
848
|
width: n[2],
|
|
@@ -845,28 +852,28 @@ var J = class extends s {
|
|
|
845
852
|
return `url(#${i})`;
|
|
846
853
|
}
|
|
847
854
|
getShadowFilterUrl(e) {
|
|
848
|
-
let t =
|
|
855
|
+
let t = A(Math.max(e.blur / 2.5, .25)), n = A(e.offsetX), r = A(e.offsetY), i = [
|
|
849
856
|
t,
|
|
850
857
|
n,
|
|
851
858
|
r
|
|
852
859
|
].join(","), a = this.#a.get(i);
|
|
853
860
|
if (!a) {
|
|
854
861
|
a = "shadow-" + this.#x++;
|
|
855
|
-
let e =
|
|
862
|
+
let e = M("filter", {
|
|
856
863
|
id: a,
|
|
857
864
|
x: 0,
|
|
858
865
|
y: 0,
|
|
859
|
-
width:
|
|
860
|
-
height:
|
|
866
|
+
width: A(this.width),
|
|
867
|
+
height: A(this.height),
|
|
861
868
|
filterUnits: "userSpaceOnUse",
|
|
862
869
|
primitiveUnits: "userSpaceOnUse",
|
|
863
870
|
"color-interpolation-filters": "sRGB"
|
|
864
871
|
});
|
|
865
|
-
e.appendChild(
|
|
872
|
+
e.appendChild(M("feGaussianBlur", {
|
|
866
873
|
in: "SourceGraphic",
|
|
867
874
|
stdDeviation: t,
|
|
868
875
|
result: "blur"
|
|
869
|
-
})), e.appendChild(
|
|
876
|
+
})), e.appendChild(M("feOffset", {
|
|
870
877
|
in: "blur",
|
|
871
878
|
dx: n,
|
|
872
879
|
dy: r,
|
|
@@ -879,12 +886,12 @@ var J = class extends s {
|
|
|
879
886
|
let t = this.#o.get(e);
|
|
880
887
|
if (!t) {
|
|
881
888
|
t = "shadow-clip-" + this.#y++;
|
|
882
|
-
let n =
|
|
889
|
+
let n = M("clipPath", {
|
|
883
890
|
id: t,
|
|
884
891
|
clipPathUnits: "userSpaceOnUse"
|
|
885
892
|
});
|
|
886
|
-
n.appendChild(
|
|
887
|
-
d: `M 0 0 V ${
|
|
893
|
+
n.appendChild(M("path", {
|
|
894
|
+
d: `M 0 0 V ${A(this.height)} H ${A(this.width)} V 0 Z ${e}`,
|
|
888
895
|
"clip-rule": "evenodd",
|
|
889
896
|
"fill-rule": "evenodd"
|
|
890
897
|
})), this.#t.appendChild(n), this.#o.set(e, t);
|
|
@@ -895,24 +902,24 @@ var J = class extends s {
|
|
|
895
902
|
let t = JSON.stringify([
|
|
896
903
|
e.type,
|
|
897
904
|
e.fill,
|
|
898
|
-
|
|
905
|
+
k(e.fillOpacity),
|
|
899
906
|
e.stroke,
|
|
900
|
-
|
|
901
|
-
|
|
907
|
+
k(e.strokeOpacity),
|
|
908
|
+
k(e.strokeWidth)
|
|
902
909
|
]), n = this.#s.get(t);
|
|
903
|
-
return n || (n = "rect-hatch-" + this.#S++, this.#t.appendChild(
|
|
910
|
+
return n || (n = "rect-hatch-" + this.#S++, this.#t.appendChild(Te(n, e)), this.#s.set(t, n)), `url(#${n})`;
|
|
904
911
|
}
|
|
905
912
|
getLegendGradientUrl(e) {
|
|
906
|
-
let t = "legend-gradient-" + this.#C++, n =
|
|
913
|
+
let t = "legend-gradient-" + this.#C++, n = M("linearGradient", {
|
|
907
914
|
id: t,
|
|
908
915
|
gradientUnits: "userSpaceOnUse",
|
|
909
|
-
x1:
|
|
910
|
-
y1:
|
|
911
|
-
x2:
|
|
912
|
-
y2:
|
|
916
|
+
x1: A(e.x1),
|
|
917
|
+
y1: A(e.y1),
|
|
918
|
+
x2: A(e.x2),
|
|
919
|
+
y2: A(e.y2)
|
|
913
920
|
});
|
|
914
|
-
for (let t of e.stops) n.appendChild(
|
|
915
|
-
offset:
|
|
921
|
+
for (let t of e.stops) n.appendChild(M("stop", {
|
|
922
|
+
offset: k(t.offset),
|
|
916
923
|
"stop-color": t.color
|
|
917
924
|
}));
|
|
918
925
|
return this.#t.appendChild(n), `url(#${t})`;
|
|
@@ -923,40 +930,40 @@ var J = class extends s {
|
|
|
923
930
|
let n = this.#c.get(t.key);
|
|
924
931
|
if (!n) {
|
|
925
932
|
n = "link-arc-fade-" + this.#b++;
|
|
926
|
-
let { gradient: e, mask: r } =
|
|
933
|
+
let { gradient: e, mask: r } = De(n, this.width, this.height, t);
|
|
927
934
|
this.#t.appendChild(e), this.#t.appendChild(r), this.#c.set(t.key, n);
|
|
928
935
|
}
|
|
929
936
|
return `url(#${n})`;
|
|
930
937
|
}
|
|
931
|
-
getViewportEdgeFadeMaskUrl(
|
|
932
|
-
let
|
|
933
|
-
if (!
|
|
934
|
-
let r =
|
|
938
|
+
getViewportEdgeFadeMaskUrl(e) {
|
|
939
|
+
let t = Object.entries(e).filter(([, e]) => e.width > 0 && Number.isFinite(e.distance));
|
|
940
|
+
if (!t.length) return;
|
|
941
|
+
let r = n(this.#n);
|
|
935
942
|
if (!r) throw Error("No current view in SVG rendering context.");
|
|
936
943
|
let i = this.#i.get(r.view);
|
|
937
944
|
if (!i) {
|
|
938
945
|
i = "edge-fade-" + this.#b++;
|
|
939
|
-
let e =
|
|
946
|
+
let e = A(this.width), n = A(this.height), a = M("mask", {
|
|
940
947
|
id: i,
|
|
941
948
|
x: 0,
|
|
942
949
|
y: 0,
|
|
943
950
|
width: e,
|
|
944
|
-
height:
|
|
951
|
+
height: n,
|
|
945
952
|
maskUnits: "userSpaceOnUse",
|
|
946
953
|
maskContentUnits: "userSpaceOnUse",
|
|
947
954
|
"mask-type": "luminance"
|
|
948
955
|
});
|
|
949
|
-
a.appendChild(
|
|
956
|
+
a.appendChild(M("rect", {
|
|
950
957
|
width: e,
|
|
951
|
-
height:
|
|
958
|
+
height: n,
|
|
952
959
|
fill: "white"
|
|
953
960
|
}));
|
|
954
|
-
for (let [o, s] of
|
|
955
|
-
let
|
|
956
|
-
this.#t.appendChild(c), a.appendChild(
|
|
961
|
+
for (let [o, s] of t) {
|
|
962
|
+
let t = i + "-" + o, c = Me(t, o, s, r.coords);
|
|
963
|
+
this.#t.appendChild(c), a.appendChild(M("rect", {
|
|
957
964
|
width: e,
|
|
958
|
-
height:
|
|
959
|
-
fill: `url(#${
|
|
965
|
+
height: n,
|
|
966
|
+
fill: `url(#${t})`
|
|
960
967
|
}));
|
|
961
968
|
}
|
|
962
969
|
this.#t.appendChild(a), this.#i.set(r.view, i);
|
|
@@ -970,52 +977,52 @@ var J = class extends s {
|
|
|
970
977
|
return Array.from(this.#l);
|
|
971
978
|
}
|
|
972
979
|
get currentNode() {
|
|
973
|
-
return
|
|
980
|
+
return n(this.#n)?.node ?? this.#e;
|
|
974
981
|
}
|
|
975
982
|
get currentCoords() {
|
|
976
|
-
let
|
|
977
|
-
if (!
|
|
978
|
-
return
|
|
983
|
+
let e = n(this.#n);
|
|
984
|
+
if (!e) throw Error("No current view in SVG rendering context.");
|
|
985
|
+
return e.coords;
|
|
979
986
|
}
|
|
980
987
|
};
|
|
981
|
-
function
|
|
988
|
+
function Oe(e, t) {
|
|
982
989
|
let n = e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
983
990
|
return `${/^[A-Za-z_]/.test(n) ? n : n ? "view-" + n : "view"}-${t}`;
|
|
984
991
|
}
|
|
985
|
-
function
|
|
992
|
+
function J(e, t) {
|
|
986
993
|
e.x1 = Math.min(e.x1, t.x1), e.y1 = Math.min(e.y1, t.y1), e.x2 = Math.max(e.x2, t.x2), e.y2 = Math.max(e.y2, t.y2);
|
|
987
994
|
}
|
|
988
|
-
function
|
|
995
|
+
function ke(e) {
|
|
989
996
|
let [t, ...n] = Array.from(e), r = t;
|
|
990
997
|
for (; n.some((e) => !r.contains(e));) r = r.parentNode;
|
|
991
998
|
return r;
|
|
992
999
|
}
|
|
993
|
-
function
|
|
1000
|
+
function Ae(e, t) {
|
|
994
1001
|
let n = e;
|
|
995
1002
|
for (; n.parentNode != t;) n = n.parentNode;
|
|
996
1003
|
return n;
|
|
997
1004
|
}
|
|
998
|
-
function
|
|
1005
|
+
function je(e, t) {
|
|
999
1006
|
let n = e;
|
|
1000
1007
|
for (; n != t && n.matches("g[data-view-path]") && Array.from(n.children).every((e) => e.tagName == "title");) {
|
|
1001
1008
|
let e = n.parentNode;
|
|
1002
1009
|
n.remove(), n = e;
|
|
1003
1010
|
}
|
|
1004
1011
|
}
|
|
1005
|
-
function
|
|
1006
|
-
let i = t == "top" ? r.y + n.distance : t == "right" ? r.x2 - n.distance : t == "bottom" ? r.y2 - n.distance : r.x + n.distance, a = t == "left" || t == "right", o = i + (t == "top" || t == "left" ? 1 : -1) * n.width, s =
|
|
1012
|
+
function Me(e, t, n, r) {
|
|
1013
|
+
let i = t == "top" ? r.y + n.distance : t == "right" ? r.x2 - n.distance : t == "bottom" ? r.y2 - n.distance : r.x + n.distance, a = t == "left" || t == "right", o = i + (t == "top" || t == "left" ? 1 : -1) * n.width, s = M("linearGradient", {
|
|
1007
1014
|
id: e,
|
|
1008
1015
|
gradientUnits: "userSpaceOnUse",
|
|
1009
|
-
x1:
|
|
1010
|
-
y1:
|
|
1011
|
-
x2:
|
|
1012
|
-
y2:
|
|
1016
|
+
x1: A(a ? i : 0),
|
|
1017
|
+
y1: A(a ? 0 : i),
|
|
1018
|
+
x2: A(a ? o : 0),
|
|
1019
|
+
y2: A(a ? 0 : o)
|
|
1013
1020
|
});
|
|
1014
|
-
return s.appendChild(
|
|
1021
|
+
return s.appendChild(M("stop", {
|
|
1015
1022
|
offset: 0,
|
|
1016
1023
|
"stop-color": "black",
|
|
1017
1024
|
"stop-opacity": 1
|
|
1018
|
-
})), s.appendChild(
|
|
1025
|
+
})), s.appendChild(M("stop", {
|
|
1019
1026
|
offset: 1,
|
|
1020
1027
|
"stop-color": "black",
|
|
1021
1028
|
"stop-opacity": 0
|
|
@@ -1023,8 +1030,8 @@ function Ae(e, t, n, r) {
|
|
|
1023
1030
|
}
|
|
1024
1031
|
//#endregion
|
|
1025
1032
|
//#region ../core/src/rendering/svg/index.js
|
|
1026
|
-
function
|
|
1027
|
-
let i = new
|
|
1033
|
+
function Y({ viewRoot: e, logicalWidth: t, logicalHeight: n, background: r = "white" }) {
|
|
1034
|
+
let i = new q({ picking: !1 }, {
|
|
1028
1035
|
width: t,
|
|
1029
1036
|
height: n,
|
|
1030
1037
|
background: r
|
|
@@ -1034,8 +1041,8 @@ function X({ viewRoot: e, logicalWidth: t, logicalHeight: n, background: r = "wh
|
|
|
1034
1041
|
warnings: i.getWarnings()
|
|
1035
1042
|
};
|
|
1036
1043
|
}
|
|
1037
|
-
function
|
|
1038
|
-
let r = new
|
|
1044
|
+
function Ne({ viewRoot: e, logicalWidth: t, logicalHeight: n }) {
|
|
1045
|
+
let r = new q({ picking: !1 }, {
|
|
1039
1046
|
width: t,
|
|
1040
1047
|
height: n,
|
|
1041
1048
|
background: null
|
|
@@ -1048,7 +1055,7 @@ function je({ viewRoot: e, logicalWidth: t, logicalHeight: n }) {
|
|
|
1048
1055
|
instanceCount: t
|
|
1049
1056
|
})).filter((e) => e.instanceCount > 0) };
|
|
1050
1057
|
}
|
|
1051
|
-
async function
|
|
1058
|
+
async function X(e) {
|
|
1052
1059
|
let t = e.rasterization;
|
|
1053
1060
|
return t ? ($(t), e.rasterizeSvgRuns ? Z({
|
|
1054
1061
|
...e,
|
|
@@ -1056,7 +1063,7 @@ async function Me(e) {
|
|
|
1056
1063
|
maxVectorInstances: t.maxVectorInstances,
|
|
1057
1064
|
pixelRatio: t.pixelRatio
|
|
1058
1065
|
}) : Q(e)) : {
|
|
1059
|
-
...
|
|
1066
|
+
...Y(e),
|
|
1060
1067
|
rasterized: []
|
|
1061
1068
|
};
|
|
1062
1069
|
}
|
|
@@ -1065,7 +1072,7 @@ async function Z({ viewRoot: e, rasterizeSvgRuns: t, logicalWidth: n, logicalHei
|
|
|
1065
1072
|
maxVectorInstances: s,
|
|
1066
1073
|
pixelRatio: l
|
|
1067
1074
|
});
|
|
1068
|
-
let u = new
|
|
1075
|
+
let u = new q({ picking: !1 }, {
|
|
1069
1076
|
width: n,
|
|
1070
1077
|
height: r,
|
|
1071
1078
|
background: i,
|
|
@@ -1106,7 +1113,7 @@ async function Z({ viewRoot: e, rasterizeSvgRuns: t, logicalWidth: n, logicalHei
|
|
|
1106
1113
|
};
|
|
1107
1114
|
}
|
|
1108
1115
|
function Q(e) {
|
|
1109
|
-
let t =
|
|
1116
|
+
let t = Y(e);
|
|
1110
1117
|
return {
|
|
1111
1118
|
...t,
|
|
1112
1119
|
warnings: [...t.warnings, "SVG rasterization was requested but no raster rendering backend is available; exported all marks as vectors."],
|
|
@@ -1118,4 +1125,4 @@ function $(e) {
|
|
|
1118
1125
|
if (e.pixelRatio != null && (!Number.isFinite(e.pixelRatio) || e.pixelRatio <= 0)) throw RangeError("SVG raster pixelRatio must be positive.");
|
|
1119
1126
|
}
|
|
1120
1127
|
//#endregion
|
|
1121
|
-
export {
|
|
1128
|
+
export { Ne as analyzeSvgExport, Z as createRasterizedSvg, Y as createSvg, X as createSvgExport };
|