@genome-spy/app 0.87.0 → 0.88.1

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.
Files changed (35) hide show
  1. package/dist/{agentApi-BZ1JCo1N.js → agentApi-BIpg3JKh.js} +5365 -5080
  2. package/dist/agentApi.es.js +3160 -2909
  3. package/dist/agentShared.es.js +3 -3
  4. package/dist/{canvas2d-Cafq5v-N.js → canvas2d-BVQ7-2eJ.js} +68 -68
  5. package/dist/{canvas2d-B_PnIof-.js → canvas2d-D7SZK3xv.js} +39 -39
  6. package/dist/{clipOptions-H68pJyEZ.js → clipOptions-BWHr3aTa.js} +822 -768
  7. package/dist/{clipOptions-D6eh9T-_.js → clipOptions-DTMcB_9z.js} +547 -493
  8. package/dist/{debug-BGzgZmyk.js → debug-CVpoEOWx.js} +2 -2
  9. package/dist/{debug-UYKZLNh4.js → debug-DYAMZZKl.js} +2 -2
  10. package/dist/index.es.js +3390 -3410
  11. package/dist/index.js +395 -374
  12. package/dist/{indexer-Di57GyxX.js → indexer-CXjZDo2Q.js} +1 -1
  13. package/dist/{indexer-o6Hpg4nN.js → indexer-DAH_ruVn.js} +1 -1
  14. package/dist/{nativeText-DAjvkrzc.js → order-C5CzA37O.js} +271 -287
  15. package/dist/{nativeText-D9SoxpaD.js → order-DvY7KNcu.js} +271 -287
  16. package/dist/{rasterExport-DzldLv6E.js → rasterExport-BgZ98e6U.js} +1 -1
  17. package/dist/{rasterExport-IAbJwi8F.js → rasterExport-DEr8fOLm.js} +1 -1
  18. package/dist/{renderCanvas2D-yJ1IrDcX.js → renderCanvas2D-DtcJjqpB.js} +57 -50
  19. package/dist/{renderCanvas2D-BJ93Ptqj.js → renderCanvas2D-DxturTEW.js} +62 -55
  20. package/dist/schema.json +756 -96
  21. package/dist/{svg-DJuqHIyc.js → svg-CyrLfa9e.js} +364 -357
  22. package/dist/{svg-BRpl2Xub.js → svg-SDJMzL--.js} +338 -331
  23. package/dist/{svgRasterizer-PAoqLn1j.js → svgRasterizer-f7DJ3UO0.js} +1 -1
  24. package/dist/{svgRasterizer-CGZQ5njV.js → svgRasterizer-mWK7HTkx.js} +1 -1
  25. package/dist/{vega-scale-BGC53c22.js → vega-scale-CypF85iS.js} +801 -801
  26. package/dist/{vega-scale-DdW2NzQ3.js → vega-scale-DLKCwWRs.js} +65 -65
  27. package/dist/{viewIdentityRegistry-Dc2hXYsO.js → viewIdentityRegistry-DIDo44XQ.js} +1 -1
  28. package/dist/{viewIdentityRegistry-D4p067HU.js → viewIdentityRegistry-Dl-vMN9I.js} +1 -1
  29. package/dist/{viewSelectors-DNXnGwEW.js → viewSelectors-CymbZyE6.js} +375 -340
  30. package/dist/{viewSelectors-DYYlOt91.js → viewSelectors-DNiDip5e.js} +370 -335
  31. package/dist/{viewUtils-EdhZTPrJ.js → viewUtils-BrJLIj2o.js} +1750 -1716
  32. package/dist/{webgl-C53DwzVT.js → webgl-CTJt7jQd.js} +1019 -983
  33. package/dist/{webgl-CdgNFlJk.js → webgl-tZfZ8y3q.js} +1200 -1164
  34. package/package.json +5 -5
  35. package/src/embedTypes.d.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./rasterization-CFogVB3B.js";
2
2
  import { t } from "./rectangle-DKnrAmKs.js";
3
3
  import { t as n } from "./layoutResult-D50MSHXR.js";
4
- import { t as r } from "./renderCanvas2D-yJ1IrDcX.js";
4
+ import { t as r } from "./renderCanvas2D-DtcJjqpB.js";
5
5
  //#region ../core/src/rendering/canvas2d/rasterExport.js
6
6
  async function i(e) {
7
7
  let t = e.mimeType ?? "image/png";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./rasterization-CFogVB3B.js";
2
2
  import { t } from "./rectangle-DKnrAmKs.js";
3
3
  import { t as n } from "./layoutResult-D50MSHXR.js";
4
- import { t as r } from "./renderCanvas2D-BJ93Ptqj.js";
4
+ import { t as r } from "./renderCanvas2D-DxturTEW.js";
5
5
  //#region ../core/src/rendering/canvas2d/rasterExport.js
6
6
  async function i(e) {
7
7
  let t = e.mimeType ?? "image/png";
@@ -1,14 +1,14 @@
1
- import { Kt as e, a as t, o as n, s as r, u as i } from "./clipOptions-D6eh9T-_.js";
1
+ import { Zt as e, a as t, o as n, s as r, u as i } from "./clipOptions-DTMcB_9z.js";
2
2
  import { t as a } from "./warning-CpIIpk8e.js";
3
3
  import { n as o } from "./layoutResult-D50MSHXR.js";
4
4
  import { n as s } from "./performanceProfiler-CPLEjApa.js";
5
- import { D as c, E as l, M as u, O as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P } from "./nativeText-D9SoxpaD.js";
5
+ import { A as c, C as l, D as u, E as d, M as f, N as p, O as m, _ as h, a as g, c as _, d as v, f as y, g as b, h as x, i as S, k as C, l as w, m as ee, n as T, o as E, p as D, r as O, s as k, t as A, u as j, v as M, x as N, y as P } from "./order-DvY7KNcu.js";
6
6
  //#region ../core/src/rendering/canvas2d/renderers/arrow.js
7
7
  function F(e, t) {
8
8
  let n = e, r = t.context, i = n.encoders, a = P(n);
9
9
  r.lineJoin = "miter";
10
10
  let o, s;
11
- return g(n, a, t, (e) => {
11
+ return N(n, a, t, (e) => {
12
12
  e.headShapeFallback && t.warn(`Canvas2D rendered unsupported arrow headShape "${a.headShape}" as a triangle.`), r.beginPath();
13
13
  for (let t of e.boundaryLoops) {
14
14
  let e = t[0];
@@ -16,41 +16,41 @@ function F(e, t) {
16
16
  for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
17
17
  r.closePath();
18
18
  }
19
- let n = l(i.fill(e.datum)), c = f(i.fillOpacity, e.datum) * t.viewOpacity;
19
+ let n = u(i.fill(e.datum)), c = l(i.fillOpacity, e.datum) * t.viewOpacity;
20
20
  n != "none" && c > 0 && (o != n && (r.fillStyle = n, o = n), r.globalAlpha = c, r.fill());
21
- let u = l(i.stroke(e.datum)), d = f(i.strokeOpacity, e.datum) * t.viewOpacity;
22
- u != "none" && d > 0 && e.strokeWidth > 0 && (s != u && (r.strokeStyle = u, s = u), r.globalAlpha = d, r.lineWidth = e.strokeWidth, r.stroke());
21
+ let d = u(i.stroke(e.datum)), f = l(i.strokeOpacity, e.datum) * t.viewOpacity;
22
+ d != "none" && f > 0 && e.strokeWidth > 0 && (s != d && (r.strokeStyle = d, s = d), r.globalAlpha = f, r.lineWidth = e.strokeWidth, r.stroke());
23
23
  });
24
24
  }
25
25
  //#endregion
26
26
  //#region ../core/src/rendering/canvas2d/renderers/link.js
27
27
  function I(t, n) {
28
- let r = t, i = n.context, a = r.encoders, o = k(r), s = b(r, o.shape);
28
+ let r = t, i = n.context, a = r.encoders, o = ee(r), s = M(r, o.shape, n.secondOrderPass);
29
29
  i.lineCap = "butt";
30
30
  let c;
31
- return E(r, o, n, (t) => {
32
- let r = l(a.color(t.datum)), o = f(a.opacity, t.datum) * n.viewOpacity;
31
+ return x(r, o, n, (t) => {
32
+ let r = u(a.color(t.datum)), o = l(a.opacity, t.datum) * n.viewOpacity;
33
33
  if (r == "none" || o <= 0 || t.strokeWidth <= 0) return;
34
- let u = s(t.datum), d = u && m(t.points[0], t.points[3], u);
34
+ let d = s && h(t.points[0], t.points[3], s);
35
35
  if (d) {
36
36
  let { normalX: t, normalY: n, offset: a, start: o, end: s } = d, l = i.createLinearGradient(t * (a - s), n * (a - s), t * (a + s), n * (a + s)), u = e(r), f = u.opacity;
37
- for (let e of x(o, s)) u.opacity = f * e.opacity, l.addColorStop(e.offset, u.formatRgb());
37
+ for (let e of b(o, s)) u.opacity = f * e.opacity, l.addColorStop(e.offset, u.formatRgb());
38
38
  i.strokeStyle = l, c = void 0;
39
39
  } else c != r && (i.strokeStyle = r, c = r);
40
40
  i.globalAlpha = o, i.lineWidth = t.strokeWidth;
41
- let [p, h, g, _] = t.points;
42
- i.beginPath(), i.moveTo(p[0], p[1]), i.bezierCurveTo(h[0], h[1], g[0], g[1], _[0], _[1]), i.stroke();
41
+ let [f, p, m, g] = t.points;
42
+ i.beginPath(), i.moveTo(f[0], f[1]), i.bezierCurveTo(p[0], p[1], m[0], m[1], g[0], g[1]), i.stroke();
43
43
  });
44
44
  }
45
45
  //#endregion
46
46
  //#region ../core/src/rendering/canvas2d/renderers/point.js
47
47
  function L(e, t) {
48
48
  let n = e;
49
- p(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
50
- let r = v(n), i = t.context, a = n.encoders, o, s;
51
- return y(n, r, t, (e) => {
52
- let n = e.datum, r = e.lineShape, c = l(a.fill(n)), u = f(a.fillOpacity, n) * t.viewOpacity, d = l(a.stroke(n)), p = f(a.strokeOpacity, n) * t.viewOpacity;
53
- r && (d == "none" || p <= 0) && (d = c, p = u), i.beginPath();
49
+ d(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
50
+ let r = y(n), i = t.context, a = n.encoders, o, s;
51
+ return D(n, r, t, (e) => {
52
+ let n = e.datum, r = e.lineShape, c = u(a.fill(n)), d = l(a.fillOpacity, n) * t.viewOpacity, f = u(a.stroke(n)), p = l(a.strokeOpacity, n) * t.viewOpacity;
53
+ r && (f == "none" || p <= 0) && (f = c, p = d), i.beginPath();
54
54
  let m = e.angle != 0 && e.shape != "circle";
55
55
  m && (i.save(), i.translate(e.x, e.y), i.rotate(e.angle * Math.PI / 180));
56
56
  let h = m ? 0 : e.x, g = m ? 0 : e.y, _ = !0;
@@ -58,8 +58,8 @@ function L(e, t) {
58
58
  else if (e.shape == "square") {
59
59
  let t = e.geometryRadius * 2;
60
60
  i.rect(h - e.geometryRadius, g - e.geometryRadius, t, t);
61
- } else _ = N(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 && c != "none" && u > 0 && (o != c && (i.fillStyle = c, o = c), R(i, u), i.fill()), d != "none" && p > 0 && e.strokeWidth > 0 && (r && i.lineCap != "butt" && (i.lineCap = "butt"), s != d && (i.strokeStyle = d, s = d), R(i, p), z(i, e.strokeWidth), i.stroke());
61
+ } else _ = v(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 && c != "none" && d > 0 && (o != c && (i.fillStyle = c, o = c), 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());
63
63
  });
64
64
  }
65
65
  function R(e, t) {
@@ -71,20 +71,20 @@ function z(e, t) {
71
71
  //#endregion
72
72
  //#region ../core/src/rendering/canvas2d/renderers/rect.js
73
73
  function B(e, t) {
74
- let n = e, r = _(n);
74
+ let n = e, r = w(n);
75
75
  r.hatch != "none" && t.warn("Canvas2D ignored unsupported rect hatch.");
76
76
  let i = t.start ?? 0;
77
77
  if (i === (t.end ?? t.data.length)) return 0;
78
- let a = t.context, o = n.encoders, s, c, u = [
78
+ let a = t.context, o = n.encoders, s, c, d = [
79
79
  0,
80
80
  0,
81
81
  0,
82
82
  0
83
- ], d = o.stroke.constant, p = o.strokeOpacity.constant, m = d ? l(o.stroke(t.data[i])) : "none", h = d && m == "none", g = !h && p ? f(o.strokeOpacity, t.data[i]) : 0;
84
- return T(n, r, t, (e) => {
85
- r.shadow.opacity > 0 && V(e, r.shadow, t, u);
86
- let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, _ = d ? m : l(o.stroke(e.datum)), v = (p ? g : f(o.strokeOpacity, e.datum)) * t.viewOpacity * n, y = !h && _ != "none" && v > 0 && e.strokeWidth > 0, b = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
87
- b && (i || y) && (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), H(a, e.fillOpacity * n), b ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), y && (c != _ && (a.strokeStyle = _, c = _), H(a, v), U(a, e.strokeWidth), b ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
83
+ ], f = o.stroke.constant, p = o.strokeOpacity.constant, m = f ? u(o.stroke(t.data[i])) : "none", h = f && m == "none", g = !h && p ? l(o.strokeOpacity, t.data[i]) : 0;
84
+ return j(n, r, t, (e) => {
85
+ r.shadow.opacity > 0 && V(e, r.shadow, t, d);
86
+ let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, _ = f ? m : u(o.stroke(e.datum)), v = (p ? g : l(o.strokeOpacity, e.datum)) * t.viewOpacity * n, y = !h && _ != "none" && v > 0 && e.strokeWidth > 0, b = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
87
+ b && (i || y) && (d[0] = e.radii.topLeft, d[1] = e.radii.topRight, d[2] = e.radii.bottomRight, d[3] = e.radii.bottomLeft, a.beginPath(), a.roundRect(e.x, e.y, e.width, e.height, d)), i && (s != e.fill && (a.fillStyle = e.fill, s = e.fill), H(a, e.fillOpacity * n), b ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), y && (c != _ && (a.strokeStyle = _, c = _), H(a, v), U(a, e.strokeWidth), b ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
88
88
  });
89
89
  }
90
90
  function V(e, t, n, r) {
@@ -106,31 +106,31 @@ function U(e, t) {
106
106
  //#region ../core/src/rendering/canvas2d/renderers/rule.js
107
107
  function W(e, t) {
108
108
  let n = e, r = t.context, i = n.encoders;
109
- r.lineCap = p(n, n.properties.strokeCap), r.setLineDash(p(n, n.properties.strokeDash) ?? []), r.lineDashOffset = p(n, n.properties.strokeDashOffset);
109
+ r.lineCap = d(n, n.properties.strokeCap), r.setLineDash(d(n, n.properties.strokeDash) ?? []), r.lineDashOffset = d(n, n.properties.strokeDashOffset);
110
110
  let a;
111
- return j(n, O(n), t, (e) => {
112
- let n = l(i.color(e.datum)), o = f(i.opacity, e.datum) * t.viewOpacity;
111
+ return _(n, k(n), t, (e) => {
112
+ let n = u(i.color(e.datum)), o = l(i.opacity, e.datum) * t.viewOpacity;
113
113
  n == "none" || o <= 0 || e.strokeWidth <= 0 || (a != n && (r.strokeStyle = n, a = n), r.globalAlpha = o, r.lineWidth = e.strokeWidth, r.beginPath(), r.moveTo(e.x1, e.y1), r.lineTo(e.x2, e.y2), r.stroke());
114
114
  });
115
115
  }
116
116
  //#endregion
117
117
  //#region ../core/src/rendering/canvas2d/renderers/text.js
118
118
  function G(e, t) {
119
- let n = e, r = n.properties, i = S(n), a = t.context, o = n.encoders, s = M(r.font), c = `${r.fontStyle ?? "normal"} ${A(r.fontWeight ?? "normal")} `, u = i.baseline == "baseline" ? "alphabetic" : i.baseline;
119
+ let n = e, r = n.properties, i = g(n), a = t.context, o = n.encoders, s = T(r.font), c = `${r.fontStyle ?? "normal"} ${S(r.fontWeight ?? "normal")} `, f = i.baseline == "baseline" ? "alphabetic" : i.baseline;
120
120
  [
121
121
  r.viewportEdgeFadeWidthTop,
122
122
  r.viewportEdgeFadeWidthRight,
123
123
  r.viewportEdgeFadeWidthBottom,
124
124
  r.viewportEdgeFadeWidthLeft
125
- ].some((e) => p(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
126
- let d, m;
127
- return i.logoLetters || (a.textAlign = i.align, a.textBaseline = u), h(n, i, t, (e) => {
125
+ ].some((e) => d(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
126
+ let p, m;
127
+ return i.logoLetters || (a.textAlign = i.align, a.textBaseline = f), E(n, i, t, (e) => {
128
128
  e.multiCharacterLogo && t.warn("Canvas2D stretches multi-character logo text as a single glyph cell.");
129
- let n = l(o.color(e.datum)), r = f(o.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
130
- if (!(n == "none" || r <= 0)) if (d != n && (a.fillStyle = n, d = n), a.globalAlpha = r, m != e.size && (a.font = `${c}${e.size}px ${s}`, m = e.size), e.logoScale) {
129
+ let n = u(o.color(e.datum)), r = l(o.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
130
+ if (!(n == "none" || r <= 0)) if (p != n && (a.fillStyle = n, p = n), a.globalAlpha = r, m != e.size && (a.font = `${c}${e.size}px ${s}`, m = e.size), e.logoScale) {
131
131
  a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.translate(e.dx, e.dy);
132
132
  let t = a.measureText(e.text).width;
133
- a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0, D("middle", 1)), a.restore();
133
+ a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0, O("middle", 1)), a.restore();
134
134
  } else e.angle ? (a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.fillText(e.text, e.dx, e.dy, e.width), a.restore()) : a.fillText(e.text, e.x + e.dx, e.y + e.dy, e.width);
135
135
  });
136
136
  }
@@ -153,7 +153,7 @@ var J = 8, Y = 16777216, X = class extends o {
153
153
  #n = /* @__PURE__ */ new WeakMap();
154
154
  #r;
155
155
  #i;
156
- #a = new C();
156
+ #a = new f();
157
157
  #o;
158
158
  #s = [0, 0];
159
159
  #c;
@@ -214,28 +214,35 @@ var J = 8, Y = 16777216, X = class extends o {
214
214
  this.#i?.addCount("canvasCulledSampleFacetOccurrences");
215
215
  return;
216
216
  }
217
- let s = this.currentCoords, l = n(t), f = r(l, e.properties.clip, s), p = d(this.width, this.height, f);
218
- if (!w(p)) return;
219
- let m = c(s, l, e.properties.cullByVisibleRange), h = this.#o?.prepare(e) ?? !1, g = this.context;
220
- if (g.save(), f) {
221
- let e = f.rect.flatten(), t = f.clipX ? e.x : 0, n = f.clipY ? e.y : 0, r = f.clipX ? e.width : this.width, i = f.clipY ? e.height : this.height;
217
+ let s = this.currentCoords, l = n(t), u = r(l, e.properties.clip, s), d = C(this.width, this.height, u);
218
+ if (!c(d)) return;
219
+ let f = m(s, l, e.properties.cullByVisibleRange), h = this.#o?.prepare(e) ?? !1, g = this.context;
220
+ if (g.save(), u) {
221
+ let e = u.rect.flatten(), t = u.clipX ? e.x : 0, n = u.clipY ? e.y : 0, r = u.clipX ? e.width : this.width, i = u.clipY ? e.height : this.height;
222
222
  g.beginPath(), g.rect(t, n, r, i), g.clip();
223
223
  }
224
224
  try {
225
- u(e, t, s, this.#a, (t, n) => {
226
- let r = 0, i = n.length;
227
- return h && this.#o.query(n, this.#s) && (r = this.#s[0], i = this.#s[1]), K(e, {
225
+ let n = e.getOrder?.(), r = n && n.isActive();
226
+ p(e, t, s, this.#a, (t, i) => {
227
+ let o = 0, s = i.length;
228
+ h && this.#o.query(i, this.#s) && (o = this.#s[0], s = this.#s[1]);
229
+ let c = (n, r, i, o = !1) => K(e, {
228
230
  context: g,
229
231
  devicePixelRatio: this.devicePixelRatio,
230
232
  coords: t,
231
233
  data: n,
234
+ secondOrderPass: o,
232
235
  start: r,
233
236
  end: i,
234
- visibleBounds: p,
235
- anchorCullBounds: m,
237
+ visibleBounds: d,
238
+ anchorCullBounds: f,
236
239
  viewOpacity: 1,
237
240
  warn: (t) => a(`${t} View: ${e.unitView.getPathString()}`)
238
241
  });
242
+ if (!r) return c(i, o, s);
243
+ let l = 0, u = A(i, o, s, n.predicate, n.passes);
244
+ for (let [e, t] of u.entries()) t.length > 0 && (l += c(t, 0, t.length, e === 1));
245
+ return l;
239
246
  }, (t) => a(`Canvas2D could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
240
247
  } finally {
241
248
  g.restore();
@@ -269,9 +276,9 @@ function $(e, t, n) {
269
276
  }
270
277
  //#endregion
271
278
  //#region ../core/src/rendering/canvas2d/renderCanvas2D.js
272
- function ee(e) {
279
+ function te(e) {
273
280
  let t = new X({ picking: !1 }, e);
274
281
  e.layoutResult.collectRenderCommands(t);
275
282
  }
276
283
  //#endregion
277
- export { q as n, ee as t };
284
+ export { q as n, te as t };
@@ -1,14 +1,14 @@
1
- import { a as e, an as t, m as n, o as r, s as i } from "./clipOptions-H68pJyEZ.js";
1
+ import { a as e, m as t, o as n, s as r, un as i } from "./clipOptions-BWHr3aTa.js";
2
2
  import { t as a } from "./warning-CpIIpk8e.js";
3
3
  import { n as o } from "./performanceProfiler-CPLEjApa.js";
4
4
  import { n as s } from "./layoutResult-D50MSHXR.js";
5
- import { D as c, E as l, M as u, O as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P } from "./nativeText-DAjvkrzc.js";
5
+ import { A as c, C as l, D as u, E as d, M as f, N as p, O as m, _ as h, a as g, c as _, d as v, f as y, g as b, h as x, i as S, k as C, l as w, m as ee, n as T, o as E, p as D, r as O, s as k, t as A, u as j, v as M, x as N, y as P } from "./order-C5CzA37O.js";
6
6
  //#region ../core/src/rendering/canvas2d/renderers/arrow.js
7
7
  function F(e, t) {
8
8
  let n = e, r = t.context, i = n.encoders, a = P(n);
9
9
  r.lineJoin = "miter";
10
10
  let o, s;
11
- return g(n, a, t, (e) => {
11
+ return N(n, a, t, (e) => {
12
12
  e.headShapeFallback && t.warn(`Canvas2D rendered unsupported arrow headShape "${a.headShape}" as a triangle.`), r.beginPath();
13
13
  for (let t of e.boundaryLoops) {
14
14
  let e = t[0];
@@ -16,41 +16,41 @@ function F(e, t) {
16
16
  for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
17
17
  r.closePath();
18
18
  }
19
- let n = l(i.fill(e.datum)), c = f(i.fillOpacity, e.datum) * t.viewOpacity;
19
+ let n = u(i.fill(e.datum)), c = l(i.fillOpacity, e.datum) * t.viewOpacity;
20
20
  n != "none" && c > 0 && (o != n && (r.fillStyle = n, o = n), r.globalAlpha = c, r.fill());
21
- let u = l(i.stroke(e.datum)), d = f(i.strokeOpacity, e.datum) * t.viewOpacity;
22
- u != "none" && d > 0 && e.strokeWidth > 0 && (s != u && (r.strokeStyle = u, s = u), r.globalAlpha = d, r.lineWidth = e.strokeWidth, r.stroke());
21
+ let d = u(i.stroke(e.datum)), f = l(i.strokeOpacity, e.datum) * t.viewOpacity;
22
+ d != "none" && f > 0 && e.strokeWidth > 0 && (s != d && (r.strokeStyle = d, s = d), r.globalAlpha = f, r.lineWidth = e.strokeWidth, r.stroke());
23
23
  });
24
24
  }
25
25
  //#endregion
26
26
  //#region ../core/src/rendering/canvas2d/renderers/link.js
27
- function I(e, t) {
28
- let r = e, i = t.context, a = r.encoders, o = k(r), s = b(r, o.shape);
27
+ function I(e, n) {
28
+ let r = e, i = n.context, a = r.encoders, o = ee(r), s = M(r, o.shape, n.secondOrderPass);
29
29
  i.lineCap = "butt";
30
30
  let c;
31
- return E(r, o, t, (e) => {
32
- let r = l(a.color(e.datum)), o = f(a.opacity, e.datum) * t.viewOpacity;
31
+ return x(r, o, n, (e) => {
32
+ let r = u(a.color(e.datum)), o = l(a.opacity, e.datum) * n.viewOpacity;
33
33
  if (r == "none" || o <= 0 || e.strokeWidth <= 0) return;
34
- let u = s(e.datum), d = u && m(e.points[0], e.points[3], u);
34
+ let d = s && h(e.points[0], e.points[3], s);
35
35
  if (d) {
36
- let { normalX: e, normalY: t, offset: a, start: o, end: s } = d, l = i.createLinearGradient(e * (a - s), t * (a - s), e * (a + s), t * (a + s)), u = n(r), f = u.opacity;
37
- for (let e of x(o, s)) u.opacity = f * e.opacity, l.addColorStop(e.offset, u.formatRgb());
36
+ let { normalX: e, normalY: n, offset: a, start: o, end: s } = d, l = i.createLinearGradient(e * (a - s), n * (a - s), e * (a + s), n * (a + s)), u = t(r), f = u.opacity;
37
+ for (let e of b(o, s)) u.opacity = f * e.opacity, l.addColorStop(e.offset, u.formatRgb());
38
38
  i.strokeStyle = l, c = void 0;
39
39
  } else c != r && (i.strokeStyle = r, c = r);
40
40
  i.globalAlpha = o, i.lineWidth = e.strokeWidth;
41
- let [p, h, g, _] = e.points;
42
- i.beginPath(), i.moveTo(p[0], p[1]), i.bezierCurveTo(h[0], h[1], g[0], g[1], _[0], _[1]), i.stroke();
41
+ let [f, p, m, g] = e.points;
42
+ i.beginPath(), i.moveTo(f[0], f[1]), i.bezierCurveTo(p[0], p[1], m[0], m[1], g[0], g[1]), i.stroke();
43
43
  });
44
44
  }
45
45
  //#endregion
46
46
  //#region ../core/src/rendering/canvas2d/renderers/point.js
47
47
  function L(e, t) {
48
48
  let n = e;
49
- p(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
50
- let r = v(n), i = t.context, a = n.encoders, o, s;
51
- return y(n, r, t, (e) => {
52
- let n = e.datum, r = e.lineShape, c = l(a.fill(n)), u = f(a.fillOpacity, n) * t.viewOpacity, d = l(a.stroke(n)), p = f(a.strokeOpacity, n) * t.viewOpacity;
53
- r && (d == "none" || p <= 0) && (d = c, p = u), i.beginPath();
49
+ d(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
50
+ let r = y(n), i = t.context, a = n.encoders, o, s;
51
+ return D(n, r, t, (e) => {
52
+ let n = e.datum, r = e.lineShape, c = u(a.fill(n)), d = l(a.fillOpacity, n) * t.viewOpacity, f = u(a.stroke(n)), p = l(a.strokeOpacity, n) * t.viewOpacity;
53
+ r && (f == "none" || p <= 0) && (f = c, p = d), i.beginPath();
54
54
  let m = e.angle != 0 && e.shape != "circle";
55
55
  m && (i.save(), i.translate(e.x, e.y), i.rotate(e.angle * Math.PI / 180));
56
56
  let h = m ? 0 : e.x, g = m ? 0 : e.y, _ = !0;
@@ -58,8 +58,8 @@ function L(e, t) {
58
58
  else if (e.shape == "square") {
59
59
  let t = e.geometryRadius * 2;
60
60
  i.rect(h - e.geometryRadius, g - e.geometryRadius, t, t);
61
- } else _ = N(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 && c != "none" && u > 0 && (o != c && (i.fillStyle = c, o = c), R(i, u), i.fill()), d != "none" && p > 0 && e.strokeWidth > 0 && (r && i.lineCap != "butt" && (i.lineCap = "butt"), s != d && (i.strokeStyle = d, s = d), R(i, p), z(i, e.strokeWidth), i.stroke());
61
+ } else _ = v(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 && c != "none" && d > 0 && (o != c && (i.fillStyle = c, o = c), 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());
63
63
  });
64
64
  }
65
65
  function R(e, t) {
@@ -71,20 +71,20 @@ function z(e, t) {
71
71
  //#endregion
72
72
  //#region ../core/src/rendering/canvas2d/renderers/rect.js
73
73
  function B(e, t) {
74
- let n = e, r = _(n);
74
+ let n = e, r = w(n);
75
75
  r.hatch != "none" && t.warn("Canvas2D ignored unsupported rect hatch.");
76
76
  let i = t.start ?? 0;
77
77
  if (i === (t.end ?? t.data.length)) return 0;
78
- let a = t.context, o = n.encoders, s, c, u = [
78
+ let a = t.context, o = n.encoders, s, c, d = [
79
79
  0,
80
80
  0,
81
81
  0,
82
82
  0
83
- ], d = o.stroke.constant, p = o.strokeOpacity.constant, m = d ? l(o.stroke(t.data[i])) : "none", h = d && m == "none", g = !h && p ? f(o.strokeOpacity, t.data[i]) : 0;
84
- return T(n, r, t, (e) => {
85
- r.shadow.opacity > 0 && V(e, r.shadow, t, u);
86
- let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, _ = d ? m : l(o.stroke(e.datum)), v = (p ? g : f(o.strokeOpacity, e.datum)) * t.viewOpacity * n, y = !h && _ != "none" && v > 0 && e.strokeWidth > 0, b = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
87
- b && (i || y) && (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), H(a, e.fillOpacity * n), b ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), y && (c != _ && (a.strokeStyle = _, c = _), H(a, v), U(a, e.strokeWidth), b ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
83
+ ], f = o.stroke.constant, p = o.strokeOpacity.constant, m = f ? u(o.stroke(t.data[i])) : "none", h = f && m == "none", g = !h && p ? l(o.strokeOpacity, t.data[i]) : 0;
84
+ return j(n, r, t, (e) => {
85
+ r.shadow.opacity > 0 && V(e, r.shadow, t, d);
86
+ let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, _ = f ? m : u(o.stroke(e.datum)), v = (p ? g : l(o.strokeOpacity, e.datum)) * t.viewOpacity * n, y = !h && _ != "none" && v > 0 && e.strokeWidth > 0, b = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
87
+ b && (i || y) && (d[0] = e.radii.topLeft, d[1] = e.radii.topRight, d[2] = e.radii.bottomRight, d[3] = e.radii.bottomLeft, a.beginPath(), a.roundRect(e.x, e.y, e.width, e.height, d)), i && (s != e.fill && (a.fillStyle = e.fill, s = e.fill), H(a, e.fillOpacity * n), b ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), y && (c != _ && (a.strokeStyle = _, c = _), H(a, v), U(a, e.strokeWidth), b ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
88
88
  });
89
89
  }
90
90
  function V(e, t, n, r) {
@@ -106,31 +106,31 @@ function U(e, t) {
106
106
  //#region ../core/src/rendering/canvas2d/renderers/rule.js
107
107
  function W(e, t) {
108
108
  let n = e, r = t.context, i = n.encoders;
109
- r.lineCap = p(n, n.properties.strokeCap), r.setLineDash(p(n, n.properties.strokeDash) ?? []), r.lineDashOffset = p(n, n.properties.strokeDashOffset);
109
+ r.lineCap = d(n, n.properties.strokeCap), r.setLineDash(d(n, n.properties.strokeDash) ?? []), r.lineDashOffset = d(n, n.properties.strokeDashOffset);
110
110
  let a;
111
- return j(n, O(n), t, (e) => {
112
- let n = l(i.color(e.datum)), o = f(i.opacity, e.datum) * t.viewOpacity;
111
+ return _(n, k(n), t, (e) => {
112
+ let n = u(i.color(e.datum)), o = l(i.opacity, e.datum) * t.viewOpacity;
113
113
  n == "none" || o <= 0 || e.strokeWidth <= 0 || (a != n && (r.strokeStyle = n, a = n), r.globalAlpha = o, r.lineWidth = e.strokeWidth, r.beginPath(), r.moveTo(e.x1, e.y1), r.lineTo(e.x2, e.y2), r.stroke());
114
114
  });
115
115
  }
116
116
  //#endregion
117
117
  //#region ../core/src/rendering/canvas2d/renderers/text.js
118
118
  function G(e, t) {
119
- let n = e, r = n.properties, i = S(n), a = t.context, o = n.encoders, s = M(r.font), c = `${r.fontStyle ?? "normal"} ${A(r.fontWeight ?? "normal")} `, u = i.baseline == "baseline" ? "alphabetic" : i.baseline;
119
+ let n = e, r = n.properties, i = g(n), a = t.context, o = n.encoders, s = T(r.font), c = `${r.fontStyle ?? "normal"} ${S(r.fontWeight ?? "normal")} `, f = i.baseline == "baseline" ? "alphabetic" : i.baseline;
120
120
  [
121
121
  r.viewportEdgeFadeWidthTop,
122
122
  r.viewportEdgeFadeWidthRight,
123
123
  r.viewportEdgeFadeWidthBottom,
124
124
  r.viewportEdgeFadeWidthLeft
125
- ].some((e) => p(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
126
- let d, m;
127
- return i.logoLetters || (a.textAlign = i.align, a.textBaseline = u), h(n, i, t, (e) => {
125
+ ].some((e) => d(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
126
+ let p, m;
127
+ return i.logoLetters || (a.textAlign = i.align, a.textBaseline = f), E(n, i, t, (e) => {
128
128
  e.multiCharacterLogo && t.warn("Canvas2D stretches multi-character logo text as a single glyph cell.");
129
- let n = l(o.color(e.datum)), r = f(o.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
130
- if (!(n == "none" || r <= 0)) if (d != n && (a.fillStyle = n, d = n), a.globalAlpha = r, m != e.size && (a.font = `${c}${e.size}px ${s}`, m = e.size), e.logoScale) {
129
+ let n = u(o.color(e.datum)), r = l(o.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
130
+ if (!(n == "none" || r <= 0)) if (p != n && (a.fillStyle = n, p = n), a.globalAlpha = r, m != e.size && (a.font = `${c}${e.size}px ${s}`, m = e.size), e.logoScale) {
131
131
  a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.translate(e.dx, e.dy);
132
132
  let t = a.measureText(e.text).width;
133
- a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0, D("middle", 1)), a.restore();
133
+ a.scale(e.logoScale.width / t, e.logoScale.heightScale), a.textAlign = "center", a.textBaseline = "alphabetic", a.fillText(e.text, 0, O("middle", 1)), a.restore();
134
134
  } else e.angle ? (a.save(), a.translate(e.x, e.y), a.rotate(e.angle * Math.PI / 180), a.fillText(e.text, e.dx, e.dy, e.width), a.restore()) : a.fillText(e.text, e.x + e.dx, e.y + e.dy, e.width);
135
135
  });
136
136
  }
@@ -153,7 +153,7 @@ var J = 8, Y = 16777216, X = class extends s {
153
153
  #n = /* @__PURE__ */ new WeakMap();
154
154
  #r;
155
155
  #i;
156
- #a = new C();
156
+ #a = new f();
157
157
  #o;
158
158
  #s = [0, 0];
159
159
  #c;
@@ -206,43 +206,50 @@ var J = 8, Y = 16777216, X = class extends s {
206
206
  }
207
207
  renderMark(e, t) {
208
208
  if (!this.paint || !this.#r(e)) return;
209
- let n = this.#n.get(e.unitView);
210
- if (n === void 0 && (n = e.unitView.getEffectiveOpacity(), this.#n.set(e.unitView, n)), n <= 0) return;
209
+ let i = this.#n.get(e.unitView);
210
+ if (i === void 0 && (i = e.unitView.getEffectiveOpacity(), this.#n.set(e.unitView, i)), i <= 0) return;
211
211
  e.initializeRenderingRevisions(Object.keys(e.properties));
212
212
  let o = t.sampleFacetRenderingOptions;
213
213
  if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !q(o))) {
214
214
  this.#i?.addCount("canvasCulledSampleFacetOccurrences");
215
215
  return;
216
216
  }
217
- let s = this.currentCoords, l = r(t), f = i(l, e.properties.clip, s), p = d(this.width, this.height, f);
218
- if (!w(p)) return;
219
- let m = c(s, l, e.properties.cullByVisibleRange), h = this.#o?.prepare(e) ?? !1, g = this.context;
220
- if (g.save(), f) {
221
- let e = f.rect.flatten(), t = f.clipX ? e.x : 0, n = f.clipY ? e.y : 0, r = f.clipX ? e.width : this.width, i = f.clipY ? e.height : this.height;
217
+ let s = this.currentCoords, l = n(t), u = r(l, e.properties.clip, s), d = C(this.width, this.height, u);
218
+ if (!c(d)) return;
219
+ let f = m(s, l, e.properties.cullByVisibleRange), h = this.#o?.prepare(e) ?? !1, g = this.context;
220
+ if (g.save(), u) {
221
+ let e = u.rect.flatten(), t = u.clipX ? e.x : 0, n = u.clipY ? e.y : 0, r = u.clipX ? e.width : this.width, i = u.clipY ? e.height : this.height;
222
222
  g.beginPath(), g.rect(t, n, r, i), g.clip();
223
223
  }
224
224
  try {
225
- u(e, t, s, this.#a, (t, n) => {
226
- let r = 0, i = n.length;
227
- return h && this.#o.query(n, this.#s) && (r = this.#s[0], i = this.#s[1]), K(e, {
225
+ let n = e.getOrder?.(), r = n && n.isActive();
226
+ p(e, t, s, this.#a, (t, i) => {
227
+ let o = 0, s = i.length;
228
+ h && this.#o.query(i, this.#s) && (o = this.#s[0], s = this.#s[1]);
229
+ let c = (n, r, i, o = !1) => K(e, {
228
230
  context: g,
229
231
  devicePixelRatio: this.devicePixelRatio,
230
232
  coords: t,
231
233
  data: n,
234
+ secondOrderPass: o,
232
235
  start: r,
233
236
  end: i,
234
- visibleBounds: p,
235
- anchorCullBounds: m,
237
+ visibleBounds: d,
238
+ anchorCullBounds: f,
236
239
  viewOpacity: 1,
237
240
  warn: (t) => a(`${t} View: ${e.unitView.getPathString()}`)
238
241
  });
242
+ if (!r) return c(i, o, s);
243
+ let l = 0, u = A(i, o, s, n.predicate, n.passes);
244
+ for (let [e, t] of u.entries()) t.length > 0 && (l += c(t, 0, t.length, e === 1));
245
+ return l;
239
246
  }, (t) => a(`Canvas2D could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
240
247
  } finally {
241
248
  g.restore();
242
249
  }
243
250
  }
244
251
  get currentCoords() {
245
- let e = t(this.#e);
252
+ let e = i(this.#e);
246
253
  if (!e) throw Error("No current view in Canvas2D rendering context.");
247
254
  return e.coords;
248
255
  }
@@ -269,9 +276,9 @@ function $(e, t, n) {
269
276
  }
270
277
  //#endregion
271
278
  //#region ../core/src/rendering/canvas2d/renderCanvas2D.js
272
- function ee(e) {
279
+ function te(e) {
273
280
  let t = new X({ picking: !1 }, e);
274
281
  e.layoutResult.collectRenderCommands(t);
275
282
  }
276
283
  //#endregion
277
- export { q as n, ee as t };
284
+ export { q as n, te as t };