@genome-spy/app 0.85.0 → 0.86.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 (56) hide show
  1. package/README.md +28 -0
  2. package/dist/{agentApi-Cz0hCnVp.js → agentApi-DgopQbMV.js} +5019 -6824
  3. package/dist/agentApi.es.js +2757 -2852
  4. package/dist/agentShared.es.js +15 -14
  5. package/dist/canvas2d-8uxuN_vx.js +619 -0
  6. package/dist/canvas2d-BtQC7Xr8.js +619 -0
  7. package/dist/{arrayUtils-LJpQOu-U.js → clipOptions-BQfNhxgP.js} +625 -561
  8. package/dist/{paramUtils-BYI4rwyL.js → clipOptions-taFzEljc.js} +192 -128
  9. package/dist/{debug-BvCZWumf.js → debug-Bzc3SoRg.js} +8 -8
  10. package/dist/{debug-CgDtmspT.js → debug-D_VtWQ6l.js} +8 -8
  11. package/dist/index.es.js +2992 -2915
  12. package/dist/index.js +2006 -2004
  13. package/dist/indexer-qiFctgR3.js +72 -0
  14. package/dist/indexer-qy_dq5l5.js +72 -0
  15. package/dist/layoutResult-D50MSHXR.js +97 -0
  16. package/dist/{nativeText-m5AUINMq.js → nativeText-DFV5XIx8.js} +247 -193
  17. package/dist/{nativeText-DMO8gLt7.js → nativeText-vT3AWE14.js} +244 -190
  18. package/dist/performanceProfiler-CPLEjApa.js +20 -0
  19. package/dist/rasterExport-B8pVoOsj.js +44 -0
  20. package/dist/rasterExport-C4r4xjQT.js +44 -0
  21. package/dist/rasterImage-B4rPLaW9.js +18 -0
  22. package/dist/rasterization-CFogVB3B.js +50 -0
  23. package/dist/rectangle-DKnrAmKs.js +142 -0
  24. package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
  25. package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
  26. package/dist/schema.json +71 -131
  27. package/dist/{svg-CCu8kYy2.js → svg-C-Sw6E6G.js} +286 -277
  28. package/dist/{svg-yFj875aX.js → svg-CKHwwKRt.js} +278 -269
  29. package/dist/svgRasterizer-BgD72AmG.js +40 -0
  30. package/dist/svgRasterizer-BgSNqI3L.js +40 -0
  31. package/dist/vega-scale-CK0_al6O.js +2700 -0
  32. package/dist/vega-scale-D46-iCaL.js +2700 -0
  33. package/dist/viewError-BiR9VCgL.js +29 -0
  34. package/dist/{viewIdentityRegistry-D3oPbN4O.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
  35. package/dist/{viewIdentityRegistry-BUdkK9zT.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
  36. package/dist/viewSelectors-CKfxF_LM.js +1817 -0
  37. package/dist/viewSelectors-D_imtq5Z.js +1817 -0
  38. package/dist/viewUtils-nCJ7AoaI.js +5782 -0
  39. package/dist/webgl-BaA3jSa2.js +4128 -0
  40. package/dist/webgl-FP-4EsBL.js +4128 -0
  41. package/package.json +7 -6
  42. package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
  43. package/dist/canvas2d-DoAXEiF9.js +0 -309
  44. package/dist/canvas2d-f5jl4A5D.js +0 -310
  45. package/dist/clipOptions-gqdb3fvW.js +0 -43
  46. package/dist/color-W5zffv-z.js +0 -335
  47. package/dist/framebufferReadback-CCLOjStu.js +0 -148
  48. package/dist/framebufferReadback-THWwFqs8.js +0 -1994
  49. package/dist/twgl-full.module-DB2UdP1k.js +0 -1849
  50. package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
  51. package/dist/viewSelectors-DGCspRN3.js +0 -4198
  52. package/dist/viewSelectors-U5oLCLHV.js +0 -4195
  53. package/dist/viewUtils-Dg4RA40Q.js +0 -7503
  54. package/dist/warning-DRGdb6BF.js +0 -59
  55. package/dist/webgl-Ci6ZhCCf.js +0 -54
  56. package/dist/webgl-Dpz8a3TI.js +0 -53
@@ -1,59 +0,0 @@
1
- //#region ../core/src/rendering/canvasSizeHelper.js
2
- var e = class {
3
- constructor(e, t, n, r) {
4
- this._container = e, this._canvas = t, this._sizeSource = n, this._onPhysicalSizeChange = r ?? (() => {}), this._logicalCanvasSize = void 0, this._devicePixelContentBoxSize = void 0, this._devicePixelContentBoxObserver = void 0, this._observeDevicePixelContentBox();
5
- }
6
- invalidate() {
7
- this._logicalCanvasSize = void 0, this._devicePixelContentBoxSize = void 0;
8
- }
9
- finalize() {
10
- this._devicePixelContentBoxObserver && this._devicePixelContentBoxObserver.disconnect();
11
- }
12
- getPhysicalCanvasSize(e) {
13
- if (this._devicePixelContentBoxSize) return this._devicePixelContentBoxSize;
14
- let t = window.devicePixelRatio ?? 1;
15
- return e ||= this.getLogicalCanvasSize(), {
16
- width: Math.round(e.width * t),
17
- height: Math.round(e.height * t)
18
- };
19
- }
20
- getDevicePixelRatio(e) {
21
- e ||= this.getLogicalCanvasSize();
22
- let t = this.getPhysicalCanvasSize(e), n = e.width > 0 ? t.width / e.width : void 0, r = e.height > 0 ? t.height / e.height : void 0;
23
- return n !== void 0 && r !== void 0 ? (n + r) / 2 : n === void 0 ? r === void 0 ? window.devicePixelRatio ?? 1 : r : n;
24
- }
25
- getLogicalCanvasSize() {
26
- if (this._logicalCanvasSize) return this._logicalCanvasSize;
27
- let e = this._sizeSource(), t = window.getComputedStyle(this._container, null), n = this._container.getBoundingClientRect(), r = parseFloat(t.paddingLeft), i = parseFloat(t.paddingRight), a = parseFloat(t.paddingTop), o = parseFloat(t.paddingBottom), s = parseFloat(t.borderLeftWidth), c = parseFloat(t.borderRightWidth), l = parseFloat(t.borderTopWidth), u = parseFloat(t.borderBottomWidth), d = e.width ?? n.width - r - i - s - c, f = e.height ?? n.height - a - o - l - u;
28
- return this._logicalCanvasSize = {
29
- width: d,
30
- height: f
31
- }, this._logicalCanvasSize;
32
- }
33
- _observeDevicePixelContentBox() {
34
- if (typeof ResizeObserver != "function") return;
35
- let e = new ResizeObserver((e) => {
36
- let t = e.find((e) => e.target == this._canvas);
37
- if (!t) return;
38
- let n = t.devicePixelContentBoxSize;
39
- if (!n) return;
40
- let r = Array.isArray(n) ? n[0] : n;
41
- if (!r) return;
42
- let i = {
43
- width: r.inlineSize,
44
- height: r.blockSize
45
- };
46
- this._devicePixelContentBoxSize && this._devicePixelContentBoxSize.width == i.width && this._devicePixelContentBoxSize.height == i.height || (this._devicePixelContentBoxSize = i, this._onPhysicalSizeChange());
47
- });
48
- try {
49
- e.observe(this._canvas, { box: "device-pixel-content-box" }), this._devicePixelContentBoxObserver = e;
50
- } catch {
51
- e.disconnect();
52
- }
53
- }
54
- }, t = /* @__PURE__ */ new Set();
55
- function n(e) {
56
- t.has(e) || (t.add(e), console.warn(e));
57
- }
58
- //#endregion
59
- export { e as n, n as t };
@@ -1,54 +0,0 @@
1
- import { i as e } from "./twgl-full.module-DB2UdP1k.js";
2
- import { n as t } from "./viewRenderingContext-HtpqwS_x.js";
3
- import { n, r } from "./framebufferReadback-CCLOjStu.js";
4
- import { t as i } from "./svgNumber-DNxESJQB.js";
5
- //#region ../core/src/rendering/svg/raster/webgl.js
6
- function a({ runs: a, viewRoot: c, webGLHelper: l, logicalWidth: u, logicalHeight: d, pixelRatio: f }) {
7
- let p = l.gl, m = Math.ceil(u * f), h = Math.ceil(d * f);
8
- o(p, m, h);
9
- let g = e(p, [{
10
- format: p.RGBA,
11
- type: p.UNSIGNED_BYTE,
12
- minMag: p.LINEAR,
13
- wrap: p.CLAMP_TO_EDGE
14
- }], m, h);
15
- try {
16
- for (let e of a) {
17
- let a = new r({ picking: !1 }, {
18
- webGLHelper: l,
19
- canvasSize: {
20
- width: u,
21
- height: d
22
- },
23
- devicePixelRatio: f,
24
- framebufferInfo: g,
25
- markPredicate: (t) => e.marks.has(t),
26
- pixelOffset: 0
27
- });
28
- c.render(a, t.create(0, 0, u, d), { firstFacet: !0 }), a.render();
29
- let o = s(e.bounds, f, m, h), _ = n(p, g, "image/png", {
30
- ...o,
31
- unpremultiplyAlpha: !0
32
- }), v = e.image;
33
- if (!v) throw Error("Raster run has no SVG image placeholder.");
34
- v.setAttribute("x", "" + i(o.x / f)), v.setAttribute("y", "" + i(o.y / f)), v.setAttribute("width", "" + i(o.width / f)), v.setAttribute("height", "" + i(o.height / f)), v.setAttribute("href", _);
35
- }
36
- } finally {
37
- p.bindFramebuffer(p.FRAMEBUFFER, null), p.deleteTexture(g.attachments[0]), p.deleteFramebuffer(g.framebuffer);
38
- }
39
- }
40
- function o(e, t, n) {
41
- let r = e.getParameter(e.MAX_RENDERBUFFER_SIZE), i = e.getParameter(e.MAX_TEXTURE_SIZE), a = Math.min(r, i);
42
- if (t <= 0 || n <= 0 || t > a || n > a) throw RangeError(`SVG raster dimensions ${t} x ${n} exceed the WebGL limit ${a}.`);
43
- }
44
- function s(e, t, n, r) {
45
- let i = Math.max(0, Math.floor(e.x1 * t)), a = Math.max(0, Math.floor(e.y1 * t)), o = Math.min(n, Math.ceil(e.x2 * t)), s = Math.min(r, Math.ceil(e.y2 * t));
46
- return {
47
- x: i,
48
- y: a,
49
- width: o - i,
50
- height: s - a
51
- };
52
- }
53
- //#endregion
54
- export { a as rasterizeSvgRuns };
@@ -1,53 +0,0 @@
1
- import { n as e, r as t, s as n } from "./framebufferReadback-THWwFqs8.js";
2
- import { n as r } from "./viewRenderingContext-HtpqwS_x.js";
3
- import { t as i } from "./svgNumber-DNxESJQB.js";
4
- //#region ../core/src/rendering/svg/raster/webgl.js
5
- function a({ runs: a, viewRoot: c, webGLHelper: l, logicalWidth: u, logicalHeight: d, pixelRatio: f }) {
6
- let p = l.gl, m = Math.ceil(u * f), h = Math.ceil(d * f);
7
- o(p, m, h);
8
- let g = n(p, [{
9
- format: p.RGBA,
10
- type: p.UNSIGNED_BYTE,
11
- minMag: p.LINEAR,
12
- wrap: p.CLAMP_TO_EDGE
13
- }], m, h);
14
- try {
15
- for (let n of a) {
16
- let a = new t({ picking: !1 }, {
17
- webGLHelper: l,
18
- canvasSize: {
19
- width: u,
20
- height: d
21
- },
22
- devicePixelRatio: f,
23
- framebufferInfo: g,
24
- markPredicate: (e) => n.marks.has(e),
25
- pixelOffset: 0
26
- });
27
- c.render(a, r.create(0, 0, u, d), { firstFacet: !0 }), a.render();
28
- let o = s(n.bounds, f, m, h), _ = e(p, g, "image/png", {
29
- ...o,
30
- unpremultiplyAlpha: !0
31
- }), v = n.image;
32
- if (!v) throw Error("Raster run has no SVG image placeholder.");
33
- v.setAttribute("x", "" + i(o.x / f)), v.setAttribute("y", "" + i(o.y / f)), v.setAttribute("width", "" + i(o.width / f)), v.setAttribute("height", "" + i(o.height / f)), v.setAttribute("href", _);
34
- }
35
- } finally {
36
- p.bindFramebuffer(p.FRAMEBUFFER, null), p.deleteTexture(g.attachments[0]), p.deleteFramebuffer(g.framebuffer);
37
- }
38
- }
39
- function o(e, t, n) {
40
- let r = e.getParameter(e.MAX_RENDERBUFFER_SIZE), i = e.getParameter(e.MAX_TEXTURE_SIZE), a = Math.min(r, i);
41
- if (t <= 0 || n <= 0 || t > a || n > a) throw RangeError(`SVG raster dimensions ${t} x ${n} exceed the WebGL limit ${a}.`);
42
- }
43
- function s(e, t, n, r) {
44
- let i = Math.max(0, Math.floor(e.x1 * t)), a = Math.max(0, Math.floor(e.y1 * t)), o = Math.min(n, Math.ceil(e.x2 * t)), s = Math.min(r, Math.ceil(e.y2 * t));
45
- return {
46
- x: i,
47
- y: a,
48
- width: o - i,
49
- height: s - a
50
- };
51
- }
52
- //#endregion
53
- export { a as rasterizeSvgRuns };