@genome-spy/app 1.1.1 → 1.3.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/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
- package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
- package/dist/{agentApi-sPuuT0KS.js → agentApi-BclFF9zB.js} +9981 -8914
- package/dist/agentApi.es.js +6783 -5135
- package/dist/agentShared.es.js +433 -460
- package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
- package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
- package/dist/{canvas2d-iDK4BC5j.js → canvas2d-8MSf70d4.js} +141 -134
- package/dist/{canvas2d-MXaFeZnP.js → canvas2d-BwGNI_Rx.js} +147 -141
- package/dist/clipOptions-SrrxeAEU.js +4316 -0
- package/dist/clipOptions-clBEbkjv.js +4326 -0
- package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
- package/dist/color-uTRRsy8i.js +116 -0
- package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
- package/dist/{viewIdentityRegistry-BIYd4TE0.js → containerView-BItRtKqu.js} +28 -31
- package/dist/{viewIdentityRegistry-BDKkEjXl.js → containerView-CWa6ZIJW.js} +28 -31
- package/dist/{debug-DbigmdrK.js → debug-23s-jja_.js} +10 -9
- package/dist/{debug-BlqDxTw3.js → debug-CWRxvAss.js} +9 -10
- package/dist/dialog.es.js +1 -1
- package/dist/dist-CmY6iewb.js +1501 -0
- package/dist/dist-D6xbz5Ks.js +1501 -0
- package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
- package/dist/esm-BUkWqSr2.js +299 -0
- package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
- package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
- package/dist/esm-C6erfjPM.js +252 -0
- package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
- package/dist/esm-CqY5ezGz.js +1249 -0
- package/dist/esm-DfMIJ_N2.js +1522 -0
- package/dist/esm-Dls41IbZ.js +787 -0
- package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
- package/dist/esm-aGLCvYRP.js +238 -0
- package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
- package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
- package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
- package/dist/flowNode-BSjy0Wz3.js +1306 -0
- package/dist/flowOutput-D5qpxWe0.js +183 -0
- package/dist/index.es.js +4766 -5522
- package/dist/index.js +1089 -685
- package/dist/inflate-BdC5KvHn.js +886 -0
- package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
- package/dist/markUtils-RaatLEa-.js +78 -0
- package/dist/{metadataChannels-DV62inJh.js → metadataChannels-DLSmx7kU.js} +6 -3
- package/dist/metadataUtils-DxEPe0vj.js +879 -0
- package/dist/order-BnKzKjt4.js +1151 -0
- package/dist/order-BpJnq_nV.js +1150 -0
- package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
- package/dist/{rasterExport-B62RmAK1.js → rasterExport-B-WrX1pa.js} +5 -5
- package/dist/{rasterExport-DQH3hVg_.js → rasterExport-C_vx4Jwd.js} +4 -4
- package/dist/{rasterization-B05bDo5e.js → rasterization-QktH8Sn2.js} +26 -19
- package/dist/rectangle-BAdoDPXu.js +194 -0
- package/dist/{rectangle-DE98gIxF.js → rectangle-DZTR6NFQ.js} +10 -1
- package/dist/renderCanvas2D-CsRO78Pq.js +291 -0
- package/dist/{renderCanvas2D-Bdv-B4wj.js → renderCanvas2D-Y7pkRzbC.js} +98 -92
- package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
- package/dist/{indexer-DbFTKGlm.js → scaleNull-CVzag4z8.js} +2 -12
- package/dist/{indexer-En7gpvLN.js → scaleNull-Pbz7QGnl.js} +2 -12
- package/dist/{scalePosition-ByvlXaML.js → scalePosition-CRXa0rCC.js} +8 -1
- package/dist/schema.json +33403 -16929
- package/dist/style.css +1 -1
- package/dist/{svg-N3tj05-e.js → svg-BBMtLgtM.js} +445 -362
- package/dist/{svg-DHsq1RpV.js → svg-JjWL6U-T.js} +464 -381
- package/dist/{svgRasterizer-CYVDlt5z.js → svgRasterizer-6OcftuoI.js} +3 -3
- package/dist/{svgRasterizer-CvCBlxLj.js → svgRasterizer-DkNRaCPs.js} +4 -4
- package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
- package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
- package/dist/url-DeOdSRrv.js +183 -0
- package/dist/viewError-B0TMfOpB.js +33 -0
- package/dist/viewError-D9aO90cI.js +33 -0
- package/dist/{viewSelectors-DDLW-byr.js → viewSelectors-DkFvo33d.js} +914 -752
- package/dist/{viewSelectors-j-F9XwsE.js → viewSelectors-lM93fHAq.js} +942 -780
- package/dist/viewUtils-0SJOewM6.js +6195 -0
- package/dist/webgl-CXIO3OQz.js +5782 -0
- package/dist/webgl-Pdvfhio5.js +5783 -0
- package/package.json +7 -5
- package/src/agentApi/index.d.ts +3 -2
- package/src/agentShared/index.d.ts +2 -0
- package/src/appTypes.d.ts +1 -6
- package/src/embedTypes.d.ts +36 -1
- package/src/index.d.ts +6 -0
- package/src/spec/sampleView.d.ts +68 -13
- package/src/spec/view.d.ts +44 -5
- package/src/state/paramProvenanceTypes.d.ts +25 -2
- package/src/state.d.ts +14 -52
- package/dist/clipOptions-B5PibDq3.js +0 -2923
- package/dist/clipOptions-Cba4I0AO.js +0 -2903
- package/dist/esm-Dndm-NaA.js +0 -1193
- package/dist/order-B4uR9Q04.js +0 -1062
- package/dist/order-BSPy5DI8.js +0 -1062
- package/dist/renderCanvas2D-ChdoHGrU.js +0 -285
- package/dist/vega-scale-Byaw1K8O.js +0 -2446
- package/dist/vega-scale-Ctz_wa3z.js +0 -2443
- package/dist/viewError-BiR9VCgL.js +0 -29
- package/dist/viewUtils-JX6CMEYH.js +0 -6664
- package/dist/webgl-DdmOwEH0.js +0 -5544
- package/dist/webgl-Dw8xqZpX.js +0 -5544
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cn as e, a as t, o as n, s as r } from "./clipOptions-SrrxeAEU.js";
|
|
2
|
+
import { r as i } from "./arrayUtils-Bm7QnzhN.js";
|
|
2
3
|
import { t as a } from "./warning-CpIIpk8e.js";
|
|
3
|
-
import {
|
|
4
|
+
import { r as o } from "./color-jETn8xK_.js";
|
|
4
5
|
import { n as s } from "./performanceProfiler-CPLEjApa.js";
|
|
5
|
-
import {
|
|
6
|
+
import { C as c, D as l, F as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, _ as y, a as b, b as x, c as S, d as ee, g as C, h as w, i as T, j as E, k as D, l as O, m as k, p as A, s as j, t as M, u as N, v as P, x as F, y as I } from "./order-BnKzKjt4.js";
|
|
6
7
|
//#region ../core/src/rendering/canvas2d/renderers/arrow.js
|
|
7
|
-
function
|
|
8
|
-
let n = e, r = t.context, i = n.encoders, a =
|
|
8
|
+
function L(e, t) {
|
|
9
|
+
let n = e, r = t.context, i = n.encoders, a = c(n);
|
|
9
10
|
r.lineJoin = "miter";
|
|
10
|
-
let o, s;
|
|
11
|
-
return
|
|
11
|
+
let o = m(i.fill, t), s = m(i.stroke, t), u, d;
|
|
12
|
+
return v(n, a, t, (e) => {
|
|
12
13
|
e.headShapeFallback && t.warn(`Canvas2D rendered unsupported arrow headShape "${a.headShape}" as a triangle.`), r.beginPath();
|
|
13
14
|
for (let t of e.boundaryLoops) {
|
|
14
15
|
let e = t[0];
|
|
@@ -16,78 +17,83 @@ function F(e, t) {
|
|
|
16
17
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
17
18
|
r.closePath();
|
|
18
19
|
}
|
|
19
|
-
let n =
|
|
20
|
-
n != "none" &&
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
});
|
|
20
|
+
let n = o ?? f(i.fill(e.datum)), c = l(i.fillOpacity, e.datum) * t.viewOpacity;
|
|
21
|
+
n != "none" && c > 0 && (u != n && (r.fillStyle = n, u = n), r.globalAlpha = c, r.fill());
|
|
22
|
+
let p = s ?? f(i.stroke(e.datum)), m = l(i.strokeOpacity, e.datum) * t.viewOpacity;
|
|
23
|
+
p != "none" && m > 0 && e.strokeWidth > 0 && (d != p && (r.strokeStyle = p, d = p), r.globalAlpha = m, r.lineWidth = e.strokeWidth, r.stroke());
|
|
24
|
+
}, s);
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region ../core/src/rendering/canvas2d/renderers/link.js
|
|
27
|
-
function
|
|
28
|
-
let r = t, i = n.context, a = 1 / n.devicePixelRatio, o = r.encoders, s =
|
|
29
|
-
i.lineCap = "butt";
|
|
30
|
-
let d;
|
|
31
|
-
return
|
|
32
|
-
let r =
|
|
28
|
+
function R(t, n) {
|
|
29
|
+
let r = t, i = n.context, a = 1 / n.devicePixelRatio, o = r.encoders, s = P(r), c = _(r, s.shape, n.secondOrderPass);
|
|
30
|
+
i.lineCap = "butt", i.lineJoin = "miter", i.miterLimit = 2;
|
|
31
|
+
let u = m(o.color, n), d;
|
|
32
|
+
return I(r, s, n, (t) => {
|
|
33
|
+
let r = u ?? f(o.color(t.datum)), s = l(o.opacity, t.datum) * n.viewOpacity;
|
|
33
34
|
if (r == "none" || s <= 0 || t.strokeWidth <= 0) return;
|
|
34
|
-
let
|
|
35
|
-
if (
|
|
36
|
-
let { normalX: t, normalY: n, offset: a, start: o, end: s } =
|
|
37
|
-
for (let e of
|
|
35
|
+
let p = c && t.geometry.type == "cubic" && F(t.geometry.points[0], t.geometry.points[3], c);
|
|
36
|
+
if (p) {
|
|
37
|
+
let { normalX: t, normalY: n, offset: a, start: o, end: s } = p, c = i.createLinearGradient(t * (a - s), n * (a - s), t * (a + s), n * (a + s)), l = e(r), u = l.opacity;
|
|
38
|
+
for (let e of x(o, s)) l.opacity = u * e.opacity, c.addColorStop(e.offset, l.formatRgb());
|
|
38
39
|
i.strokeStyle = c, d = void 0;
|
|
39
40
|
} else d != r && (i.strokeStyle = r, d = r);
|
|
40
41
|
i.globalAlpha = s * Math.min(t.strokeWidth / a, 1), i.lineWidth = Math.max(t.strokeWidth, a);
|
|
41
|
-
let
|
|
42
|
-
i.beginPath(), i.moveTo(
|
|
42
|
+
let { geometry: m } = t, h = m.points[0];
|
|
43
|
+
if (i.beginPath(), i.moveTo(h[0], h[1]), m.type == "orthogonal") for (let e of m.points.slice(1)) i.lineTo(e[0], e[1]);
|
|
44
|
+
else {
|
|
45
|
+
let [, e, t, n] = m.points;
|
|
46
|
+
i.bezierCurveTo(e[0], e[1], t[0], t[1], n[0], n[1]);
|
|
47
|
+
}
|
|
48
|
+
i.stroke();
|
|
43
49
|
});
|
|
44
50
|
}
|
|
45
51
|
//#endregion
|
|
46
52
|
//#region ../core/src/rendering/canvas2d/renderers/point.js
|
|
47
|
-
function
|
|
53
|
+
function z(e, t) {
|
|
48
54
|
let n = e;
|
|
49
|
-
|
|
50
|
-
let r =
|
|
51
|
-
return
|
|
52
|
-
let n = e.datum, r = e.lineShape,
|
|
53
|
-
r &&
|
|
54
|
-
let
|
|
55
|
-
m && (i.
|
|
56
|
-
let h = m ? 0 : e.x, g = m ? 0 : e.y, _ = !0;
|
|
57
|
-
if (e.shape == "circle") i.arc(h, g, e.geometryRadius, 0, Math.PI * 2);
|
|
58
|
-
else if (e.shape == "square") {
|
|
59
|
-
let t = e.geometryRadius * 2;
|
|
60
|
-
i.rect(h - e.geometryRadius, g - e.geometryRadius, t, t);
|
|
61
|
-
} else _ = E(e.shape, h, g, e.geometryRadius, i);
|
|
62
|
-
m && i.restore(), _ || (t.warn(`Canvas2D rendered unsupported point shape "${e.shape}" as a circle.`), i.arc(e.x, e.y, e.geometryRadius, 0, Math.PI * 2)), !r && u != "none" && d > 0 && (o != u && (i.fillStyle = u, o = u), R(i, d), i.fill()), f != "none" && p > 0 && e.strokeWidth > 0 && (r && i.lineCap != "butt" && (i.lineCap = "butt"), s != f && (i.strokeStyle = f, s = f), R(i, p), z(i, e.strokeWidth), i.stroke());
|
|
55
|
+
E(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
|
|
56
|
+
let r = C(n), i = t.context, a = n.encoders, o = D(a.fill), s = D(a.stroke), c = m(a.fill, t), u = m(a.stroke, t), d, p;
|
|
57
|
+
return y(n, r, t, (e) => {
|
|
58
|
+
let n = e.datum, r = e.lineShape, m = c ?? f(a.fill(n)), h = l(a.fillOpacity, n) * t.viewOpacity, g = u ?? f(a.stroke(n)), _ = l(a.strokeOpacity, n) * t.viewOpacity, v = e.strokeWidth > 0 && _ > 0 ? _ * s(g) : 0;
|
|
59
|
+
r && v <= 0 && (g = m, _ = h, v = h * o(m));
|
|
60
|
+
let y = !r && h * o(m) > 0, b = v < 1 ? e.radius : e.geometryRadius;
|
|
61
|
+
B(i, e, y ? b : e.geometryRadius, t.warn), y && (d != m && (i.fillStyle = m, d = m), V(i, h), i.fill()), v > 0 && e.strokeWidth > 0 && (y && b != e.geometryRadius && B(i, e, e.geometryRadius, t.warn), r && i.lineCap != "butt" && (i.lineCap = "butt"), p != g && (i.strokeStyle = g, p = g), V(i, _), H(i, e.strokeWidth), i.stroke());
|
|
63
62
|
});
|
|
64
63
|
}
|
|
65
|
-
function
|
|
64
|
+
function B(e, t, n, r) {
|
|
65
|
+
e.beginPath();
|
|
66
|
+
let i = t.angle != 0 && t.shape != "circle";
|
|
67
|
+
i && (e.save(), e.translate(t.x, t.y), e.rotate(t.angle * Math.PI / 180));
|
|
68
|
+
let a = i ? 0 : t.x, o = i ? 0 : t.y, s = !0;
|
|
69
|
+
t.shape == "circle" ? e.arc(a, o, n, 0, Math.PI * 2) : t.shape == "square" ? e.rect(a - n, o - n, n * 2, n * 2) : s = w(t.shape, a, o, n, e), i && e.restore(), s || (r(`Canvas2D rendered unsupported point shape "${t.shape}" as a circle.`), e.arc(t.x, t.y, n, 0, Math.PI * 2));
|
|
70
|
+
}
|
|
71
|
+
function V(e, t) {
|
|
66
72
|
e.globalAlpha != t && (e.globalAlpha = t);
|
|
67
73
|
}
|
|
68
|
-
function
|
|
74
|
+
function H(e, t) {
|
|
69
75
|
e.lineWidth != t && (e.lineWidth = t);
|
|
70
76
|
}
|
|
71
77
|
//#endregion
|
|
72
78
|
//#region ../core/src/rendering/canvas2d/renderers/rect.js
|
|
73
|
-
function
|
|
74
|
-
let n = e, r =
|
|
79
|
+
function U(e, t) {
|
|
80
|
+
let n = e, r = A(n);
|
|
75
81
|
r.hatch != "none" && t.warn("Canvas2D ignored unsupported rect hatch.");
|
|
76
82
|
let i = t.start ?? 0;
|
|
77
83
|
if (i === (t.end ?? t.data.length)) return 0;
|
|
78
|
-
let a = t.context, o = n.encoders, s,
|
|
84
|
+
let a = t.context, o = n.encoders, s, c, u = [
|
|
79
85
|
0,
|
|
80
86
|
0,
|
|
81
87
|
0,
|
|
82
88
|
0
|
|
83
|
-
],
|
|
84
|
-
return
|
|
85
|
-
r.shadow.opacity > 0 &&
|
|
86
|
-
let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0,
|
|
87
|
-
|
|
89
|
+
], d = o.strokeOpacity.constant, p = m(o.stroke, t), h = p == "none", g = !h && d ? l(o.strokeOpacity, t.data[i]) : 0;
|
|
90
|
+
return k(n, r, t, (e) => {
|
|
91
|
+
r.shadow.opacity > 0 && W(e, r.shadow, t, u);
|
|
92
|
+
let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, m = p ?? f(o.stroke(e.datum)), _ = (d ? g : l(o.strokeOpacity, e.datum)) * t.viewOpacity * n, v = !h && m != "none" && _ > 0 && e.strokeWidth > 0, y = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
|
|
93
|
+
y && (i || v) && (u[0] = e.radii.topLeft, u[1] = e.radii.topRight, u[2] = e.radii.bottomRight, u[3] = e.radii.bottomLeft, a.beginPath(), a.roundRect(e.x, e.y, e.width, e.height, u)), i && (s != e.fill && (a.fillStyle = e.fill, s = e.fill), G(a, e.fillOpacity * n), y ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), v && (c != m && (a.strokeStyle = m, c = m), G(a, _), K(a, e.strokeWidth), y ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
|
|
88
94
|
});
|
|
89
95
|
}
|
|
90
|
-
function
|
|
96
|
+
function W(e, t, n, r) {
|
|
91
97
|
let { context: i, devicePixelRatio: a, visibleBounds: o } = n, s = e.strokeWidth / 2, c = e.x - s, l = e.y - s, u = e.width + s * 2, d = e.height + s * 2;
|
|
92
98
|
r[0] = e.radii.topLeft + s, r[1] = e.radii.topRight + s, r[2] = e.radii.bottomRight + s, r[3] = e.radii.bottomLeft + s, i.save();
|
|
93
99
|
try {
|
|
@@ -96,64 +102,64 @@ function V(e, t, n, r) {
|
|
|
96
102
|
i.restore();
|
|
97
103
|
}
|
|
98
104
|
}
|
|
99
|
-
function
|
|
105
|
+
function G(e, t) {
|
|
100
106
|
e.globalAlpha != t && (e.globalAlpha = t);
|
|
101
107
|
}
|
|
102
|
-
function
|
|
108
|
+
function K(e, t) {
|
|
103
109
|
e.lineWidth != t && (e.lineWidth = t);
|
|
104
110
|
}
|
|
105
111
|
//#endregion
|
|
106
112
|
//#region ../core/src/rendering/canvas2d/renderers/rule.js
|
|
107
|
-
function
|
|
113
|
+
function q(e, t) {
|
|
108
114
|
let n = e, r = t.context, i = n.encoders;
|
|
109
|
-
r.lineCap =
|
|
110
|
-
let a;
|
|
111
|
-
return
|
|
112
|
-
let n =
|
|
113
|
-
|
|
115
|
+
r.lineCap = E(n, n.properties.strokeCap), r.setLineDash(E(n, n.properties.strokeDash) ?? []), r.lineDashOffset = E(n, n.properties.strokeDashOffset);
|
|
116
|
+
let a = n.getType() === "rule", o = m(i.fill, t), s;
|
|
117
|
+
return ee(n, N(n), t, (e) => {
|
|
118
|
+
let n = o ?? f(i.fill(e.datum)), c = l(i.opacity, e.datum) * t.viewOpacity;
|
|
119
|
+
c <= 0 || (r.beginPath(), r.moveTo(e.x1, e.y1), r.lineTo(e.x2, e.y2), e.strokeWidth > 0 && (r.strokeStyle = e.stroke, s = e.stroke, r.globalAlpha = c * e.strokeOpacity, r.lineWidth = e.size + 2 * e.strokeWidth, r.stroke()), n !== "none" && (s !== n && (r.strokeStyle = n, s = n), r.globalAlpha = c * (a ? l(i.fillOpacity, e.datum) : 1), r.lineWidth = e.size, r.stroke()));
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
122
|
//#endregion
|
|
117
123
|
//#region ../core/src/rendering/canvas2d/renderers/text.js
|
|
118
|
-
function
|
|
119
|
-
let n = e, r = n.properties, i = t.textMetrics ?? n.unitView.context.textMetrics, a = i.requestFont(r), o =
|
|
124
|
+
function J(e, t) {
|
|
125
|
+
let n = e, r = n.properties, i = t.textMetrics ?? n.unitView.context.textMetrics, a = i.requestFont(r), o = T(i, r), s = S(n), c = t.context, u = n.encoders, d = b(r.font), p = `${r.fontStyle ?? "normal"} ${j(r.fontWeight ?? "normal")} `, h = s.baseline == "baseline" ? "alphabetic" : s.baseline;
|
|
120
126
|
[
|
|
121
127
|
r.viewportEdgeFadeWidthTop,
|
|
122
128
|
r.viewportEdgeFadeWidthRight,
|
|
123
129
|
r.viewportEdgeFadeWidthBottom,
|
|
124
130
|
r.viewportEdgeFadeWidthLeft
|
|
125
|
-
].some((e) =>
|
|
126
|
-
let
|
|
127
|
-
return s.logoLetters || (
|
|
131
|
+
].some((e) => E(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
|
|
132
|
+
let g = m(u.color, t), _, v;
|
|
133
|
+
return s.logoLetters || (c.textAlign = s.align, c.textBaseline = h), O(n, s, {
|
|
128
134
|
...t,
|
|
129
135
|
fontMeasurement: a,
|
|
130
136
|
measureLogoInkBounds: o
|
|
131
137
|
}, (e) => {
|
|
132
138
|
e.multiCharacterLogo && t.warn("Canvas2D stretches multi-character logo text as a single glyph cell.");
|
|
133
|
-
let n =
|
|
134
|
-
n == "none" || r <= 0 || (
|
|
139
|
+
let n = g ?? f(u.color(e.datum)), r = l(u.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
|
|
140
|
+
n == "none" || r <= 0 || (_ != n && (c.fillStyle = n, _ = n), c.globalAlpha = r, v != e.size && (c.font = `${p}${e.size}px ${d}`, v = e.size), e.logoTransform ? (c.save(), c.translate(e.x, e.y), c.rotate(e.angle * Math.PI / 180), c.translate(e.dx, e.dy), c.scale(e.logoTransform.scaleX, e.logoTransform.scaleY), c.translate(-e.logoTransform.originX, -e.logoTransform.originY), c.textAlign = "left", c.textBaseline = "alphabetic", c.fillText(e.text, 0, 0), c.restore()) : e.angle || e.scale != 1 ? (c.save(), c.translate(e.x, e.y), c.rotate(e.angle * Math.PI / 180), c.translate(e.dx, e.dy), c.scale(e.scale, e.scale), c.fillText(e.text, 0, 0), c.restore()) : c.fillText(e.text, e.x + e.dx, e.y + e.dy));
|
|
135
141
|
});
|
|
136
142
|
}
|
|
137
143
|
//#endregion
|
|
138
144
|
//#region ../core/src/rendering/canvas2d/renderers/index.js
|
|
139
|
-
function
|
|
140
|
-
return e.getType() == "arrow" ?
|
|
145
|
+
function Y(e, t) {
|
|
146
|
+
return (t.start ?? 0) === (t.end ?? t.data.length) ? 0 : e.getType() == "arrow" ? L(e, t) : e.getType() == "link" ? R(e, t) : e.getType() == "rect" ? U(e, t) : e.getType() == "point" ? z(e, t) : e.getType() == "rule" || e.getType() == "tick" ? q(e, t) : e.getType() == "text" ? J(e, t) : (t.warn(`Canvas2D rendering is not implemented for mark type "${e.getType()}".`), 0);
|
|
141
147
|
}
|
|
142
148
|
//#endregion
|
|
143
149
|
//#region ../core/src/rendering/sampleFacet.js
|
|
144
|
-
function
|
|
150
|
+
function X(e) {
|
|
145
151
|
let t = e.pixelToUnit, n = e.locSize.location * t, r = e.locSize.size * t;
|
|
146
152
|
return !(n > 1 || n + r < 0);
|
|
147
153
|
}
|
|
148
154
|
//#endregion
|
|
149
155
|
//#region ../core/src/rendering/canvas2d/canvas2DViewRenderingContext.js
|
|
150
|
-
var
|
|
156
|
+
var Z = 8, Q = 16777216, te = class extends o {
|
|
151
157
|
#e = [];
|
|
152
158
|
#t = /* @__PURE__ */ new WeakSet();
|
|
153
159
|
#n = /* @__PURE__ */ new WeakMap();
|
|
154
160
|
#r;
|
|
155
161
|
#i;
|
|
156
|
-
#a = new
|
|
162
|
+
#a = new d();
|
|
157
163
|
#o;
|
|
158
164
|
#s = [0, 0];
|
|
159
165
|
#c;
|
|
@@ -177,7 +183,7 @@ var J = 8, Y = 16777216, X = class extends o {
|
|
|
177
183
|
this.paint && !this.#t.has(e) && (e.onBeforeRender(), this.#t.add(e));
|
|
178
184
|
let r = e.getOpacity();
|
|
179
185
|
if (this.paint && r > 0 && r !== 1) {
|
|
180
|
-
let r = t(e), i =
|
|
186
|
+
let r = t(e), i = ne(n, this.devicePixelRatio, this.#c, r), a = re(this.#l, this.#u.length, i.width, i.height);
|
|
181
187
|
a.setTransform(this.devicePixelRatio, 0, 0, this.devicePixelRatio, -i.x, -i.y), this.#u.push({
|
|
182
188
|
context: this.context,
|
|
183
189
|
bounds: this.#c
|
|
@@ -210,43 +216,43 @@ var J = 8, Y = 16777216, X = class extends o {
|
|
|
210
216
|
if (i === void 0 && (i = e.unitView.getEffectiveOpacity(), this.#n.set(e.unitView, i)), i <= 0) return;
|
|
211
217
|
e.initializeRenderingRevisions(Object.keys(e.properties));
|
|
212
218
|
let o = t.sampleFacetRenderingOptions;
|
|
213
|
-
if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !
|
|
219
|
+
if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !X(o))) {
|
|
214
220
|
this.#i?.addCount("canvasCulledSampleFacetOccurrences");
|
|
215
221
|
return;
|
|
216
222
|
}
|
|
217
|
-
let s = this.currentCoords, c = n(t), l = r(c, e.properties.clip, s),
|
|
218
|
-
if (!
|
|
219
|
-
let
|
|
220
|
-
if (
|
|
223
|
+
let s = this.currentCoords, c = n(t), l = r(c, e.properties.clip, s), d = h(this.width, this.height, l);
|
|
224
|
+
if (!u(d)) return;
|
|
225
|
+
let f = p(s, c, e.properties.cullByVisibleRange), m = this.#o?.prepare(e) ?? !1, _ = this.context;
|
|
226
|
+
if (_.save(), l) {
|
|
221
227
|
let e = l.rect.flatten(), t = l.clipX ? e.x : 0, n = l.clipY ? e.y : 0, r = l.clipX ? e.width : this.width, i = l.clipY ? e.height : this.height;
|
|
222
|
-
|
|
228
|
+
_.beginPath(), _.rect(t, n, r, i), _.clip();
|
|
223
229
|
}
|
|
224
230
|
try {
|
|
225
231
|
let n = e.getOrder?.(), r = n && n.isActive();
|
|
226
|
-
|
|
232
|
+
g(e, t, s, this.#a, (t, i) => {
|
|
227
233
|
let o = 0, s = i.length;
|
|
228
|
-
|
|
229
|
-
let c = (n, r, i, o = !1) =>
|
|
230
|
-
context:
|
|
234
|
+
m && this.#o.query(i, this.#s) && (o = this.#s[0], s = this.#s[1]);
|
|
235
|
+
let c = (n, r, i, o = !1) => Y(e, {
|
|
236
|
+
context: _,
|
|
231
237
|
devicePixelRatio: this.devicePixelRatio,
|
|
232
238
|
coords: t,
|
|
233
239
|
data: n,
|
|
234
240
|
secondOrderPass: o,
|
|
235
241
|
start: r,
|
|
236
242
|
end: i,
|
|
237
|
-
visibleBounds:
|
|
238
|
-
anchorCullBounds:
|
|
243
|
+
visibleBounds: d,
|
|
244
|
+
anchorCullBounds: f,
|
|
239
245
|
viewOpacity: 1,
|
|
240
246
|
textMetrics: this.textMetrics,
|
|
241
247
|
warn: (t) => a(`${t} View: ${e.unitView.getPathString()}`)
|
|
242
248
|
});
|
|
243
249
|
if (!r) return c(i, o, s);
|
|
244
|
-
let l = 0,
|
|
245
|
-
for (let [e, t] of
|
|
250
|
+
let l = 0, u = M(i, o, s, n.predicate, n.passes);
|
|
251
|
+
for (let [e, t] of u.entries()) t.length > 0 && (l += c(t, 0, t.length, e === 1));
|
|
246
252
|
return l;
|
|
247
253
|
}, (t) => a(`Canvas2D could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
|
|
248
254
|
} finally {
|
|
249
|
-
|
|
255
|
+
_.restore();
|
|
250
256
|
}
|
|
251
257
|
}
|
|
252
258
|
get currentCoords() {
|
|
@@ -255,7 +261,7 @@ var J = 8, Y = 16777216, X = class extends o {
|
|
|
255
261
|
return e.coords;
|
|
256
262
|
}
|
|
257
263
|
};
|
|
258
|
-
function
|
|
264
|
+
function ne(e, t, n, r) {
|
|
259
265
|
let i = n.x + n.width, a = n.y + n.height, o = r.clipX ? $(Math.floor(e.x * t), n.x, i) : n.x, s = r.clipY ? $(Math.floor(e.y * t), n.y, a) : n.y, c = r.clipX ? $(Math.ceil((e.x + e.width) * t), o, i) : i, l = r.clipY ? $(Math.ceil((e.y + e.height) * t), s, a) : a;
|
|
260
266
|
return {
|
|
261
267
|
x: o,
|
|
@@ -264,8 +270,8 @@ function Z(e, t, n, r) {
|
|
|
264
270
|
height: l - s
|
|
265
271
|
};
|
|
266
272
|
}
|
|
267
|
-
function
|
|
268
|
-
let i = n * r, a = e[t], o = e.reduce((e, n, r) => r === t ? e : e + n.canvas.width * n.canvas.height, 0), s = t <
|
|
273
|
+
function re(e, t, n, r) {
|
|
274
|
+
let i = n * r, a = e[t], o = e.reduce((e, n, r) => r === t ? e : e + n.canvas.width * n.canvas.height, 0), s = t < Z && o + i <= Q;
|
|
269
275
|
if (!a || !s) {
|
|
270
276
|
if (a = document.createElement("canvas").getContext("2d"), !a) throw Error("Unable to create a Canvas2D view group.");
|
|
271
277
|
s && (e[t] = a);
|
|
@@ -277,9 +283,9 @@ function $(e, t, n) {
|
|
|
277
283
|
}
|
|
278
284
|
//#endregion
|
|
279
285
|
//#region ../core/src/rendering/canvas2d/renderCanvas2D.js
|
|
280
|
-
function
|
|
281
|
-
let t = new
|
|
286
|
+
function ie(e) {
|
|
287
|
+
let t = new te({ picking: !1 }, e);
|
|
282
288
|
e.layoutResult.collectRenderCommands(t);
|
|
283
289
|
}
|
|
284
290
|
//#endregion
|
|
285
|
-
export {
|
|
291
|
+
export { X as n, ie as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = (t, n) => {
|
|
2
|
+
var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), n = (t, n) => {
|
|
3
3
|
let r = {};
|
|
4
4
|
for (var i in t) e(r, i, {
|
|
5
5
|
get: t[i],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as e } from "./clipOptions-SrrxeAEU.js";
|
|
2
2
|
//#region ../../node_modules/d3-array/src/identity.js
|
|
3
3
|
function t(e) {
|
|
4
4
|
return e;
|
|
@@ -59,14 +59,4 @@ function v() {
|
|
|
59
59
|
return e.invert = (e) => e, e.copy = v, e.invertRange = () => {}, e.type = "null", e;
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
|
-
|
|
63
|
-
function y() {
|
|
64
|
-
let e = 0, t, n = 0, r = /* @__PURE__ */ new Map(), i = (i) => i === t ? n : (n = r.get(i), n === void 0 && (n = e++, r.set(i, n)), t = i, n);
|
|
65
|
-
return i.addAll = (e) => {
|
|
66
|
-
for (let t of e) i(t);
|
|
67
|
-
}, i.invert = (e) => {
|
|
68
|
-
for (let t of r.entries()) if (t[1] == e) return t[0];
|
|
69
|
-
}, i.domain = () => [...r.keys()], i;
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
export { p as a, l as c, o as d, a as f, d as i, c as l, r as m, v as n, m as o, n as p, u as r, f as s, y as t, s as u };
|
|
62
|
+
export { m as a, c, a as d, n as f, p as i, s as l, u as n, f as o, r as p, d as r, l as s, v as t, o as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fn as e } from "./clipOptions-clBEbkjv.js";
|
|
2
2
|
//#region ../../node_modules/d3-array/src/identity.js
|
|
3
3
|
function t(e) {
|
|
4
4
|
return e;
|
|
@@ -59,14 +59,4 @@ function v() {
|
|
|
59
59
|
return e.invert = (e) => e, e.copy = v, e.invertRange = () => {}, e.type = "null", e;
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
|
-
|
|
63
|
-
function y() {
|
|
64
|
-
let e = 0, t, n = 0, r = /* @__PURE__ */ new Map(), i = (i) => i === t ? n : (n = r.get(i), n === void 0 && (n = e++, r.set(i, n)), t = i, n);
|
|
65
|
-
return i.addAll = (e) => {
|
|
66
|
-
for (let t of e) i(t);
|
|
67
|
-
}, i.invert = (e) => {
|
|
68
|
-
for (let t of r.entries()) if (t[1] == e) return t[0];
|
|
69
|
-
}, i.domain = () => [...r.keys()], i;
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
export { p as a, l as c, o as d, a as f, t as h, d as i, c as l, r as m, v as n, m as o, n as p, u as r, f as s, y as t, s as u };
|
|
62
|
+
export { m as a, c, a as d, n as f, p as i, s as l, t as m, u as n, f as o, r as p, d as r, l as s, v as t, o as u };
|
|
@@ -7,5 +7,12 @@ function e(e, t = .5) {
|
|
|
7
7
|
}
|
|
8
8
|
return 0;
|
|
9
9
|
}
|
|
10
|
+
function t(e, t, n) {
|
|
11
|
+
if (e.type === "index" || e.type === "locus") {
|
|
12
|
+
let r = e;
|
|
13
|
+
return r.gapMapping(n)?.invertPoint(t).value ?? r.invert(t);
|
|
14
|
+
}
|
|
15
|
+
return e.invert(t);
|
|
16
|
+
}
|
|
10
17
|
//#endregion
|
|
11
|
-
export { e as t };
|
|
18
|
+
export { t as n, e as t };
|