@genome-spy/app 1.2.0 → 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.
Files changed (87) hide show
  1. package/dist/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
  2. package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
  3. package/dist/{agentApi-8hMSlqAQ.js → agentApi-BclFF9zB.js} +7130 -7509
  4. package/dist/agentApi.es.js +4344 -4015
  5. package/dist/agentShared.es.js +431 -458
  6. package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
  7. package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
  8. package/dist/{canvas2d-Bd8H8MMo.js → canvas2d-8MSf70d4.js} +78 -86
  9. package/dist/{canvas2d-D6VYooRf.js → canvas2d-BwGNI_Rx.js} +83 -91
  10. package/dist/clipOptions-SrrxeAEU.js +4316 -0
  11. package/dist/clipOptions-clBEbkjv.js +4326 -0
  12. package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
  13. package/dist/color-uTRRsy8i.js +116 -0
  14. package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
  15. package/dist/{containerView-aEVmYmkA.js → containerView-BItRtKqu.js} +5 -1
  16. package/dist/{containerView-CRJSc4bM.js → containerView-CWa6ZIJW.js} +5 -1
  17. package/dist/{debug-CQ0agCrd.js → debug-23s-jja_.js} +3 -2
  18. package/dist/{debug-DkIMiGdW.js → debug-CWRxvAss.js} +2 -3
  19. package/dist/dialog.es.js +1 -1
  20. package/dist/dist-CmY6iewb.js +1501 -0
  21. package/dist/dist-D6xbz5Ks.js +1501 -0
  22. package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
  23. package/dist/esm-BUkWqSr2.js +299 -0
  24. package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
  25. package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
  26. package/dist/esm-C6erfjPM.js +252 -0
  27. package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
  28. package/dist/esm-CqY5ezGz.js +1249 -0
  29. package/dist/esm-DfMIJ_N2.js +1522 -0
  30. package/dist/esm-Dls41IbZ.js +787 -0
  31. package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
  32. package/dist/esm-aGLCvYRP.js +238 -0
  33. package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
  34. package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
  35. package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
  36. package/dist/flowNode-BSjy0Wz3.js +1306 -0
  37. package/dist/flowOutput-D5qpxWe0.js +183 -0
  38. package/dist/index.es.js +4756 -5528
  39. package/dist/index.js +707 -547
  40. package/dist/inflate-BdC5KvHn.js +886 -0
  41. package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
  42. package/dist/{markUtils-CvLDz744.js → markUtils-RaatLEa-.js} +9 -6
  43. package/dist/metadataUtils-DxEPe0vj.js +879 -0
  44. package/dist/{order-BVvkjDRT.js → order-BnKzKjt4.js} +383 -347
  45. package/dist/{order-DmMoZsi1.js → order-BpJnq_nV.js} +375 -339
  46. package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
  47. package/dist/{rasterExport-jeRVq6kY.js → rasterExport-B-WrX1pa.js} +5 -5
  48. package/dist/{rasterExport-DxvowWjH.js → rasterExport-C_vx4Jwd.js} +3 -3
  49. package/dist/{rasterization-DFj3Cvx4.js → rasterization-QktH8Sn2.js} +1 -1
  50. package/dist/{rectangle-Dl4Dy0hS.js → rectangle-BAdoDPXu.js} +34 -31
  51. package/dist/{renderCanvas2D-Bfm1NHFu.js → renderCanvas2D-CsRO78Pq.js} +88 -87
  52. package/dist/{renderCanvas2D-DVjhp834.js → renderCanvas2D-Y7pkRzbC.js} +93 -92
  53. package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
  54. package/dist/{indexer-DOYMJ-Md.js → scaleNull-CVzag4z8.js} +2 -12
  55. package/dist/{indexer-DDC0YRGn.js → scaleNull-Pbz7QGnl.js} +2 -12
  56. package/dist/{scalePosition-0aeqp_kz.js → scalePosition-CRXa0rCC.js} +1 -1
  57. package/dist/schema.json +3801 -816
  58. package/dist/{svg-Bm2zxBPu.js → svg-BBMtLgtM.js} +369 -285
  59. package/dist/{svg-CkfuhONt.js → svg-JjWL6U-T.js} +371 -287
  60. package/dist/{svgRasterizer-DoRQEqFA.js → svgRasterizer-6OcftuoI.js} +2 -2
  61. package/dist/{svgRasterizer-raDDhBF-.js → svgRasterizer-DkNRaCPs.js} +4 -4
  62. package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
  63. package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
  64. package/dist/url-DeOdSRrv.js +183 -0
  65. package/dist/{viewError-BkJeVYXA.js → viewError-B0TMfOpB.js} +1 -1
  66. package/dist/{viewError-IYqyluc7.js → viewError-D9aO90cI.js} +1 -1
  67. package/dist/{viewSelectors-7LyasQN-.js → viewSelectors-DkFvo33d.js} +832 -734
  68. package/dist/{viewSelectors-CbmkSQRT.js → viewSelectors-lM93fHAq.js} +900 -802
  69. package/dist/{viewUtils-DuddMNNw.js → viewUtils-0SJOewM6.js} +1861 -2459
  70. package/dist/webgl-CXIO3OQz.js +5782 -0
  71. package/dist/webgl-Pdvfhio5.js +5783 -0
  72. package/package.json +7 -5
  73. package/src/agentApi/index.d.ts +3 -2
  74. package/src/agentShared/index.d.ts +2 -0
  75. package/src/appTypes.d.ts +1 -6
  76. package/src/embedTypes.d.ts +36 -1
  77. package/src/index.d.ts +6 -0
  78. package/src/spec/sampleView.d.ts +68 -13
  79. package/src/state/paramProvenanceTypes.d.ts +25 -2
  80. package/src/state.d.ts +14 -52
  81. package/dist/clipOptions-DElJ8dTZ.js +0 -3097
  82. package/dist/clipOptions-D_wBNhzs.js +0 -3087
  83. package/dist/esm-Dndm-NaA.js +0 -1193
  84. package/dist/vega-scale-BoGHANI7.js +0 -2446
  85. package/dist/vega-scale-o9TRyzYH.js +0 -2443
  86. package/dist/webgl-CQfvgnxo.js +0 -5633
  87. package/dist/webgl-DVYkXtiZ.js +0 -5632
@@ -1,13 +1,14 @@
1
- import { Dt as e, a as t, o as n, rn as r, s as i } from "./clipOptions-D_wBNhzs.js";
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 { n as o } from "./layoutResult-D50MSHXR.js";
4
+ import { r as o } from "./color-jETn8xK_.js";
4
5
  import { n as s } from "./performanceProfiler-CPLEjApa.js";
5
- import { A as c, C as l, D as u, I as d, L as f, M as p, N as m, O as h, P as g, S as _, T as v, _ as y, a as b, b as ee, c as x, d as S, g as C, h as w, i as T, j as E, l as D, m as O, p as k, s as A, t as j, u as M, v as N, x as P, y as F } from "./order-BVvkjDRT.js";
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 I(e, t) {
8
- let n = e, r = t.context, i = n.encoders, a = l(n);
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 = h(i.fill, t), s = h(i.stroke, t), c, d;
11
+ let o = m(i.fill, t), s = m(i.stroke, t), u, d;
11
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) {
@@ -16,32 +17,32 @@ function I(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 = o ?? E(i.fill(e.datum)), l = u(i.fillOpacity, e.datum) * t.viewOpacity;
20
- n != "none" && l > 0 && (c != n && (r.fillStyle = n, c = n), r.globalAlpha = l, r.fill());
21
- let f = s ?? E(i.stroke(e.datum)), p = u(i.strokeOpacity, e.datum) * t.viewOpacity;
22
- f != "none" && p > 0 && e.strokeWidth > 0 && (d != f && (r.strokeStyle = f, d = f), r.globalAlpha = p, r.lineWidth = e.strokeWidth, r.stroke());
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());
23
24
  }, s);
24
25
  }
25
26
  //#endregion
26
27
  //#region ../core/src/rendering/canvas2d/renderers/link.js
27
- function L(e, t) {
28
- let n = e, i = t.context, a = 1 / t.devicePixelRatio, o = n.encoders, s = N(n), c = _(n, s.shape, t.secondOrderPass);
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);
29
30
  i.lineCap = "butt", i.lineJoin = "miter", i.miterLimit = 2;
30
- let l = h(o.color, t), d;
31
- return F(n, s, t, (e) => {
32
- let n = l ?? E(o.color(e.datum)), s = u(o.opacity, e.datum) * t.viewOpacity;
33
- if (n == "none" || s <= 0 || e.strokeWidth <= 0) return;
34
- let f = c && e.geometry.type == "cubic" && P(e.geometry.points[0], e.geometry.points[3], c);
35
- if (f) {
36
- let { normalX: e, normalY: t, offset: a, start: o, end: s } = f, c = i.createLinearGradient(e * (a - s), t * (a - s), e * (a + s), t * (a + s)), l = r(n), u = l.opacity;
37
- for (let e of ee(o, s)) l.opacity = u * e.opacity, c.addColorStop(e.offset, l.formatRgb());
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;
34
+ if (r == "none" || s <= 0 || t.strokeWidth <= 0) return;
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
- } else d != n && (i.strokeStyle = n, d = n);
40
- i.globalAlpha = s * Math.min(e.strokeWidth / a, 1), i.lineWidth = Math.max(e.strokeWidth, a);
41
- let { geometry: p } = e, m = p.points[0];
42
- if (i.beginPath(), i.moveTo(m[0], m[1]), p.type == "orthogonal") for (let e of p.points.slice(1)) i.lineTo(e[0], e[1]);
40
+ } else d != r && (i.strokeStyle = r, d = r);
41
+ i.globalAlpha = s * Math.min(t.strokeWidth / a, 1), i.lineWidth = Math.max(t.strokeWidth, a);
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]);
43
44
  else {
44
- let [, e, t, n] = p.points;
45
+ let [, e, t, n] = m.points;
45
46
  i.bezierCurveTo(e[0], e[1], t[0], t[1], n[0], n[1]);
46
47
  }
47
48
  i.stroke();
@@ -49,50 +50,50 @@ function L(e, t) {
49
50
  }
50
51
  //#endregion
51
52
  //#region ../core/src/rendering/canvas2d/renderers/point.js
52
- function R(e, t) {
53
+ function z(e, t) {
53
54
  let n = e;
54
- c(n, n.properties.fillGradientStrength) && t.warn("Canvas2D ignored unsupported point property fillGradientStrength."), n.properties.geometricZoomBound && t.warn("Canvas2D ignored unsupported point property geometricZoomBound.");
55
- let r = C(n), i = t.context, a = n.encoders, o = h(a.fill, t), s = h(a.stroke, t), l, d;
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;
56
57
  return y(n, r, t, (e) => {
57
- let n = e.datum, r = e.lineShape, c = o ?? E(a.fill(n)), f = u(a.fillOpacity, n) * t.viewOpacity, p = s ?? E(a.stroke(n)), m = u(a.strokeOpacity, n) * t.viewOpacity;
58
- r && (p == "none" || m <= 0) && (p = c, m = f), i.beginPath();
59
- let h = e.angle != 0 && e.shape != "circle";
60
- h && (i.save(), i.translate(e.x, e.y), i.rotate(e.angle * Math.PI / 180));
61
- let g = h ? 0 : e.x, _ = h ? 0 : e.y, v = !0;
62
- if (e.shape == "circle") i.arc(g, _, e.geometryRadius, 0, Math.PI * 2);
63
- else if (e.shape == "square") {
64
- let t = e.geometryRadius * 2;
65
- i.rect(g - e.geometryRadius, _ - e.geometryRadius, t, t);
66
- } else v = w(e.shape, g, _, e.geometryRadius, i);
67
- h && i.restore(), v || (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" && f > 0 && (l != c && (i.fillStyle = c, l = c), z(i, f), i.fill()), p != "none" && m > 0 && e.strokeWidth > 0 && (r && i.lineCap != "butt" && (i.lineCap = "butt"), d != p && (i.strokeStyle = p, d = p), z(i, m), B(i, e.strokeWidth), i.stroke());
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());
68
62
  });
69
63
  }
70
- function z(e, t) {
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) {
71
72
  e.globalAlpha != t && (e.globalAlpha = t);
72
73
  }
73
- function B(e, t) {
74
+ function H(e, t) {
74
75
  e.lineWidth != t && (e.lineWidth = t);
75
76
  }
76
77
  //#endregion
77
78
  //#region ../core/src/rendering/canvas2d/renderers/rect.js
78
- function V(e, t) {
79
- let n = e, r = k(n);
79
+ function U(e, t) {
80
+ let n = e, r = A(n);
80
81
  r.hatch != "none" && t.warn("Canvas2D ignored unsupported rect hatch.");
81
82
  let i = t.start ?? 0;
82
83
  if (i === (t.end ?? t.data.length)) return 0;
83
- let a = t.context, o = n.encoders, s, c, l = [
84
+ let a = t.context, o = n.encoders, s, c, u = [
84
85
  0,
85
86
  0,
86
87
  0,
87
88
  0
88
- ], d = o.strokeOpacity.constant, f = h(o.stroke, t), p = f == "none", m = !p && d ? u(o.strokeOpacity, t.data[i]) : 0;
89
- return O(n, r, t, (e) => {
90
- r.shadow.opacity > 0 && H(e, r.shadow, t, l);
91
- let n = e.opacityFactor, i = e.fill != "none" && e.fillOpacity > 0, h = f ?? E(o.stroke(e.datum)), g = (d ? m : u(o.strokeOpacity, e.datum)) * t.viewOpacity * n, _ = !p && h != "none" && g > 0 && e.strokeWidth > 0, v = r.hasCornerRadii && (e.radii.topLeft != 0 || e.radii.topRight != 0 || e.radii.bottomRight != 0 || e.radii.bottomLeft != 0);
92
- v && (i || _) && (l[0] = e.radii.topLeft, l[1] = e.radii.topRight, l[2] = e.radii.bottomRight, l[3] = e.radii.bottomLeft, a.beginPath(), a.roundRect(e.x, e.y, e.width, e.height, l)), i && (s != e.fill && (a.fillStyle = e.fill, s = e.fill), U(a, e.fillOpacity * n), v ? a.fill() : a.fillRect(e.x, e.y, e.width, e.height)), _ && (c != h && (a.strokeStyle = h, c = h), U(a, g), W(a, e.strokeWidth), v ? a.stroke() : a.strokeRect(e.x, e.y, e.width, e.height));
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));
93
94
  });
94
95
  }
95
- function H(e, t, n, r) {
96
+ function W(e, t, n, r) {
96
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;
97
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();
98
99
  try {
@@ -101,58 +102,58 @@ function H(e, t, n, r) {
101
102
  i.restore();
102
103
  }
103
104
  }
104
- function U(e, t) {
105
+ function G(e, t) {
105
106
  e.globalAlpha != t && (e.globalAlpha = t);
106
107
  }
107
- function W(e, t) {
108
+ function K(e, t) {
108
109
  e.lineWidth != t && (e.lineWidth = t);
109
110
  }
110
111
  //#endregion
111
112
  //#region ../core/src/rendering/canvas2d/renderers/rule.js
112
- function G(e, t) {
113
+ function q(e, t) {
113
114
  let n = e, r = t.context, i = n.encoders;
114
- r.lineCap = c(n, n.properties.strokeCap), r.setLineDash(c(n, n.properties.strokeDash) ?? []), r.lineDashOffset = c(n, n.properties.strokeDashOffset);
115
- let a = h(i.color, t), o;
116
- return S(n, M(n), t, (e) => {
117
- let n = a ?? E(i.color(e.datum)), s = u(i.opacity, e.datum) * t.viewOpacity;
118
- n == "none" || s <= 0 || e.strokeWidth <= 0 || (o != n && (r.strokeStyle = n, o = n), r.globalAlpha = s, r.lineWidth = e.strokeWidth, r.beginPath(), r.moveTo(e.x1, e.y1), r.lineTo(e.x2, e.y2), r.stroke());
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()));
119
120
  });
120
121
  }
121
122
  //#endregion
122
123
  //#region ../core/src/rendering/canvas2d/renderers/text.js
123
- function K(e, t) {
124
- let n = e, r = n.properties, i = t.textMetrics ?? n.unitView.context.textMetrics, a = i.requestFont(r), o = T(i, r), s = x(n), l = t.context, d = n.encoders, f = b(r.font), p = `${r.fontStyle ?? "normal"} ${A(r.fontWeight ?? "normal")} `, m = s.baseline == "baseline" ? "alphabetic" : s.baseline;
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;
125
126
  [
126
127
  r.viewportEdgeFadeWidthTop,
127
128
  r.viewportEdgeFadeWidthRight,
128
129
  r.viewportEdgeFadeWidthBottom,
129
130
  r.viewportEdgeFadeWidthLeft
130
- ].some((e) => c(n, e) > 0) && t.warn("Canvas2D ignored unsupported text viewport edge fading.");
131
- let g = h(d.color, t), _, v;
132
- return s.logoLetters || (l.textAlign = s.align, l.textBaseline = m), D(n, s, {
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, {
133
134
  ...t,
134
135
  fontMeasurement: a,
135
136
  measureLogoInkBounds: o
136
137
  }, (e) => {
137
138
  e.multiCharacterLogo && t.warn("Canvas2D stretches multi-character logo text as a single glyph cell.");
138
- let n = g ?? E(d.color(e.datum)), r = u(d.opacity, e.datum) * t.viewOpacity * e.fadeOpacity;
139
- n == "none" || r <= 0 || (_ != n && (l.fillStyle = n, _ = n), l.globalAlpha = r, v != e.size && (l.font = `${p}${e.size}px ${f}`, v = e.size), e.logoTransform ? (l.save(), l.translate(e.x, e.y), l.rotate(e.angle * Math.PI / 180), l.translate(e.dx, e.dy), l.scale(e.logoTransform.scaleX, e.logoTransform.scaleY), l.translate(-e.logoTransform.originX, -e.logoTransform.originY), l.textAlign = "left", l.textBaseline = "alphabetic", l.fillText(e.text, 0, 0), l.restore()) : e.angle || e.scale != 1 ? (l.save(), l.translate(e.x, e.y), l.rotate(e.angle * Math.PI / 180), l.translate(e.dx, e.dy), l.scale(e.scale, e.scale), l.fillText(e.text, 0, 0), l.restore()) : l.fillText(e.text, e.x + e.dx, e.y + e.dy));
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));
140
141
  });
141
142
  }
142
143
  //#endregion
143
144
  //#region ../core/src/rendering/canvas2d/renderers/index.js
144
- function q(e, t) {
145
- return (t.start ?? 0) === (t.end ?? t.data.length) ? 0 : e.getType() == "arrow" ? I(e, t) : e.getType() == "link" ? L(e, t) : e.getType() == "rect" ? V(e, t) : e.getType() == "point" ? R(e, t) : e.getType() == "rule" || e.getType() == "tick" ? G(e, t) : e.getType() == "text" ? K(e, t) : (t.warn(`Canvas2D rendering is not implemented for mark type "${e.getType()}".`), 0);
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);
146
147
  }
147
148
  //#endregion
148
149
  //#region ../core/src/rendering/sampleFacet.js
149
- function J(e) {
150
+ function X(e) {
150
151
  let t = e.pixelToUnit, n = e.locSize.location * t, r = e.locSize.size * t;
151
152
  return !(n > 1 || n + r < 0);
152
153
  }
153
154
  //#endregion
154
155
  //#region ../core/src/rendering/canvas2d/canvas2DViewRenderingContext.js
155
- var Y = 8, X = 16777216, Z = class extends o {
156
+ var Z = 8, Q = 16777216, te = class extends o {
156
157
  #e = [];
157
158
  #t = /* @__PURE__ */ new WeakSet();
158
159
  #n = /* @__PURE__ */ new WeakMap();
@@ -182,7 +183,7 @@ var Y = 8, X = 16777216, Z = class extends o {
182
183
  this.paint && !this.#t.has(e) && (e.onBeforeRender(), this.#t.add(e));
183
184
  let r = e.getOpacity();
184
185
  if (this.paint && r > 0 && r !== 1) {
185
- let r = t(e), i = Q(n, this.devicePixelRatio, this.#c, r), a = te(this.#l, this.#u.length, i.width, i.height);
186
+ let r = t(e), i = ne(n, this.devicePixelRatio, this.#c, r), a = re(this.#l, this.#u.length, i.width, i.height);
186
187
  a.setTransform(this.devicePixelRatio, 0, 0, this.devicePixelRatio, -i.x, -i.y), this.#u.push({
187
188
  context: this.context,
188
189
  bounds: this.#c
@@ -211,27 +212,27 @@ var Y = 8, X = 16777216, Z = class extends o {
211
212
  }
212
213
  renderMark(e, t) {
213
214
  if (!this.paint || !this.#r(e)) return;
214
- let r = this.#n.get(e.unitView);
215
- if (r === void 0 && (r = e.unitView.getEffectiveOpacity(), this.#n.set(e.unitView, r)), r <= 0) return;
215
+ let i = this.#n.get(e.unitView);
216
+ if (i === void 0 && (i = e.unitView.getEffectiveOpacity(), this.#n.set(e.unitView, i)), i <= 0) return;
216
217
  e.initializeRenderingRevisions(Object.keys(e.properties));
217
218
  let o = t.sampleFacetRenderingOptions;
218
- if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !J(o))) {
219
+ if (o && !e.encoders.facetIndex && (this.#i?.addCount("canvasSampleFacetOccurrences"), !X(o))) {
219
220
  this.#i?.addCount("canvasCulledSampleFacetOccurrences");
220
221
  return;
221
222
  }
222
- let s = this.currentCoords, c = n(t), l = i(c, e.properties.clip, s), u = m(this.width, this.height, l);
223
- if (!g(u)) return;
224
- let d = p(s, c, e.properties.cullByVisibleRange), h = this.#o?.prepare(e) ?? !1, _ = this.context;
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;
225
226
  if (_.save(), l) {
226
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;
227
228
  _.beginPath(), _.rect(t, n, r, i), _.clip();
228
229
  }
229
230
  try {
230
231
  let n = e.getOrder?.(), r = n && n.isActive();
231
- f(e, t, s, this.#a, (t, i) => {
232
+ g(e, t, s, this.#a, (t, i) => {
232
233
  let o = 0, s = i.length;
233
- h && this.#o.query(i, this.#s) && (o = this.#s[0], s = this.#s[1]);
234
- let c = (n, r, i, o = !1) => q(e, {
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, {
235
236
  context: _,
236
237
  devicePixelRatio: this.devicePixelRatio,
237
238
  coords: t,
@@ -239,15 +240,15 @@ var Y = 8, X = 16777216, Z = class extends o {
239
240
  secondOrderPass: o,
240
241
  start: r,
241
242
  end: i,
242
- visibleBounds: u,
243
- anchorCullBounds: d,
243
+ visibleBounds: d,
244
+ anchorCullBounds: f,
244
245
  viewOpacity: 1,
245
246
  textMetrics: this.textMetrics,
246
247
  warn: (t) => a(`${t} View: ${e.unitView.getPathString()}`)
247
248
  });
248
249
  if (!r) return c(i, o, s);
249
- let l = 0, f = j(i, o, s, n.predicate, n.passes);
250
- for (let [e, t] of f.entries()) t.length > 0 && (l += c(t, 0, t.length, e === 1));
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));
251
252
  return l;
252
253
  }, (t) => a(`Canvas2D could not resolve sample facet index ${t}. View: ${e.unitView.getPathString()}`));
253
254
  } finally {
@@ -255,12 +256,12 @@ var Y = 8, X = 16777216, Z = class extends o {
255
256
  }
256
257
  }
257
258
  get currentCoords() {
258
- let t = e(this.#e);
259
- if (!t) throw Error("No current view in Canvas2D rendering context.");
260
- return t.coords;
259
+ let e = i(this.#e);
260
+ if (!e) throw Error("No current view in Canvas2D rendering context.");
261
+ return e.coords;
261
262
  }
262
263
  };
263
- function Q(e, t, n, r) {
264
+ function ne(e, t, n, r) {
264
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;
265
266
  return {
266
267
  x: o,
@@ -269,8 +270,8 @@ function Q(e, t, n, r) {
269
270
  height: l - s
270
271
  };
271
272
  }
272
- function te(e, t, n, r) {
273
- 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 < Y && o + i <= X;
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;
274
275
  if (!a || !s) {
275
276
  if (a = document.createElement("canvas").getContext("2d"), !a) throw Error("Unable to create a Canvas2D view group.");
276
277
  s && (e[t] = a);
@@ -282,9 +283,9 @@ function $(e, t, n) {
282
283
  }
283
284
  //#endregion
284
285
  //#region ../core/src/rendering/canvas2d/renderCanvas2D.js
285
- function ne(e) {
286
- let t = new Z({ picking: !1 }, e);
286
+ function ie(e) {
287
+ let t = new te({ picking: !1 }, e);
287
288
  e.layoutResult.collectRenderCommands(t);
288
289
  }
289
290
  //#endregion
290
- export { J as n, ne as t };
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 { dn as e } from "./clipOptions-D_wBNhzs.js";
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
- //#region ../core/src/utils/indexer.js
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 { mn as e } from "./clipOptions-DElJ8dTZ.js";
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
- //#region ../core/src/utils/indexer.js
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 };
@@ -8,7 +8,7 @@ function e(e, t = .5) {
8
8
  return 0;
9
9
  }
10
10
  function t(e, t, n) {
11
- if ("gapMapping" in e) {
11
+ if (e.type === "index" || e.type === "locus") {
12
12
  let r = e;
13
13
  return r.gapMapping(n)?.invertPoint(t).value ?? r.invert(t);
14
14
  }