@genome-spy/app 0.84.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 (62) hide show
  1. package/README.md +28 -0
  2. package/dist/{agentApi-DHXYZVvQ.js → agentApi-DgopQbMV.js} +5804 -7009
  3. package/dist/agentApi.es.js +2823 -2594
  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/canvasSizeHelper-7h_8rOcx.js +56 -0
  8. package/dist/clipOptions-BQfNhxgP.js +2239 -0
  9. package/dist/clipOptions-taFzEljc.js +2259 -0
  10. package/dist/{debug-aHQsa6hU.js → debug-Bzc3SoRg.js} +8 -8
  11. package/dist/{debug-D6FqxKEj.js → debug-D_VtWQ6l.js} +8 -8
  12. package/dist/{esm-CGLz7idZ.js → esm-BA6yMcc-.js} +438 -434
  13. package/dist/{esm-D8vvQAP3.js → esm-CcDLRSvC.js} +33 -33
  14. package/dist/{esm-BeV56E_5.js → esm-CfYZhLHN.js} +33 -33
  15. package/dist/{esm-DQ3lJSQN.js → esm-JAiZmFIS.js} +1 -1
  16. package/dist/index.es.js +3067 -2987
  17. package/dist/index.js +2030 -2022
  18. package/dist/indexer-qiFctgR3.js +72 -0
  19. package/dist/indexer-qy_dq5l5.js +72 -0
  20. package/dist/layoutResult-D50MSHXR.js +97 -0
  21. package/dist/nativeText-DFV5XIx8.js +860 -0
  22. package/dist/nativeText-vT3AWE14.js +860 -0
  23. package/dist/performanceProfiler-CPLEjApa.js +20 -0
  24. package/dist/rasterExport-B8pVoOsj.js +44 -0
  25. package/dist/rasterExport-C4r4xjQT.js +44 -0
  26. package/dist/rasterImage-B4rPLaW9.js +18 -0
  27. package/dist/rasterization-CFogVB3B.js +50 -0
  28. package/dist/rectangle-DKnrAmKs.js +142 -0
  29. package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
  30. package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
  31. package/dist/schema.json +1559 -219
  32. package/dist/style.css +1 -1
  33. package/dist/svg-C-Sw6E6G.js +1167 -0
  34. package/dist/svg-CKHwwKRt.js +1167 -0
  35. package/dist/{svgNumber-C6aRPc8Z.js → svgNumber-DNxESJQB.js} +1 -1
  36. package/dist/svgRasterizer-BgD72AmG.js +40 -0
  37. package/dist/svgRasterizer-BgSNqI3L.js +40 -0
  38. package/dist/vega-scale-CK0_al6O.js +2700 -0
  39. package/dist/vega-scale-D46-iCaL.js +2700 -0
  40. package/dist/viewError-BiR9VCgL.js +29 -0
  41. package/dist/{viewIdentityRegistry-Dl7rR4Ay.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
  42. package/dist/{viewIdentityRegistry-AEQpJTDm.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
  43. package/dist/viewSelectors-CKfxF_LM.js +1817 -0
  44. package/dist/viewSelectors-D_imtq5Z.js +1817 -0
  45. package/dist/viewUtils-nCJ7AoaI.js +5782 -0
  46. package/dist/warning-CpIIpk8e.js +7 -0
  47. package/dist/webgl-BaA3jSa2.js +4128 -0
  48. package/dist/webgl-FP-4EsBL.js +4128 -0
  49. package/package.json +7 -6
  50. package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
  51. package/dist/clipOptions-Dqco1p8b.js +0 -377
  52. package/dist/framebufferReadback-Bje9lHb7.js +0 -1993
  53. package/dist/framebufferReadback-CC0D6Haw.js +0 -147
  54. package/dist/raster-9uKYMjHZ.js +0 -53
  55. package/dist/raster-BofBWXbe.js +0 -54
  56. package/dist/svg-CvsT1Y2V.js +0 -1793
  57. package/dist/svg-DRgWfcsL.js +0 -1793
  58. package/dist/twgl-full.module-BNEMlXRV.js +0 -1849
  59. package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
  60. package/dist/viewSelectors-BhW4mTR1.js +0 -6386
  61. package/dist/viewSelectors-Bwzj10Qz.js +0 -6363
  62. package/dist/viewUtils-DMNiWslc.js +0 -7228
@@ -1,147 +0,0 @@
1
- import { a as e, n as t, o as n, u as r } from "./clipOptions-Dqco1p8b.js";
2
- import { y as i } from "./twgl-full.module-BNEMlXRV.js";
3
- import { t as a } from "./viewRenderingContext-HtpqwS_x.js";
4
- //#region ../core/src/view/renderingContext/bufferedViewRenderingContext.js
5
- var o = class extends a {
6
- #e = [
7
- 0,
8
- 0,
9
- 0,
10
- 0
11
- ];
12
- #t;
13
- #n = [];
14
- #r;
15
- #i;
16
- #a = /* @__PURE__ */ new Set();
17
- #o;
18
- #s = void 0;
19
- #c = 1;
20
- #l = {
21
- width: 0,
22
- height: 0
23
- };
24
- #u;
25
- constructor(e, t) {
26
- if (super(e), this.#i = t.webGLHelper, this.#r = t.framebufferInfo, this.#c = t.devicePixelRatio, this.#l = t.canvasSize, this.#o = t.markPredicate ?? (() => !0), this.#u = t.pixelOffset, t.clearColor) {
27
- let e = r(t.clearColor).rgb();
28
- this.#e = [
29
- e.r / 255,
30
- e.g / 255,
31
- e.b / 255,
32
- e.opacity
33
- ];
34
- }
35
- }
36
- getDevicePixelRatio() {
37
- return this.#c;
38
- }
39
- pushView(e, t) {
40
- this.#a.add(e), this.#s = t;
41
- }
42
- renderMark(t, r) {
43
- if (!this.#o(t) || this.globalOptions.picking && !t.isPickingParticipant()) return;
44
- let i = t.render(r);
45
- if (i) {
46
- let a = e(r);
47
- this.#n.push({
48
- mark: t,
49
- callback: i,
50
- coords: this.#s,
51
- clip: n(a, t.properties.clip, this.#s),
52
- cullClip: a
53
- });
54
- }
55
- }
56
- render() {
57
- if (this.#t || this.#d(), this.#t.length == 0) return;
58
- let e = this.#i.gl, t = this.#r;
59
- t ? (e.bindFramebuffer(e.FRAMEBUFFER, t.framebuffer), e.viewport(0, 0, t.width, t.height)) : e.viewport(0, 0, e.drawingBufferWidth, e.drawingBufferHeight), e.disable(e.SCISSOR_TEST), e.clearColor(...this.#e), e.clear(e.COLOR_BUFFER_BIT);
60
- for (let e of this.#a) e.onBeforeRender();
61
- for (let e of this.#t) e();
62
- this.#r && e.bindFramebuffer(e.FRAMEBUFFER, null);
63
- }
64
- #d() {
65
- this.#t = [];
66
- let e = !0, n = !0, r = (t) => () => {
67
- e && t();
68
- }, a = (t) => () => {
69
- e && n && t();
70
- }, o = i(this.#n.reverse(), (e) => e.mark);
71
- for (let [i, s] of [...o.entries()].reverse()) {
72
- if (!i.isReady()) continue;
73
- this.#t.push(() => {
74
- e = i.unitView.getEffectiveOpacity() > 0;
75
- }), this.#t.push(...i.prepareRender(this.globalOptions).map((e) => r(e)));
76
- let o, c, l;
77
- for (let e of s) {
78
- let s = e.coords;
79
- (!s.equals(o) || !t(e.clip, c) || !t(e.cullClip, l)) && this.#t.push(r(() => {
80
- n = i.setViewport(this.#l, this.#c, s, e.clip, e.cullClip, this.#u);
81
- })), this.#t.push(a(e.callback)), o = e.coords, c = e.clip, l = e.cullClip;
82
- }
83
- }
84
- }
85
- };
86
- //#endregion
87
- //#region ../core/src/gl/framebufferReadback.js
88
- function s(e, t, n = {}) {
89
- let r = n.x ?? 0, i = n.y ?? 0, a = n.width ?? t.width, o = n.height ?? t.height;
90
- f(t, r, i, a, o);
91
- let s = new Uint8Array(a * o * 4);
92
- e.bindFramebuffer(e.FRAMEBUFFER, t.framebuffer);
93
- try {
94
- e.readPixels(r, t.height - i - o, a, o, e.RGBA, e.UNSIGNED_BYTE, s);
95
- } finally {
96
- e.bindFramebuffer(e.FRAMEBUFFER, null);
97
- }
98
- return {
99
- pixels: d(s, a, o, n.unpremultiplyAlpha ?? !1),
100
- width: a,
101
- height: o
102
- };
103
- }
104
- function c(e, t, n = "image/png", r = {}) {
105
- return u(e, t, r).toDataURL(n);
106
- }
107
- function l(e, t, n = "image/png", r = {}) {
108
- let i = u(e, t, r);
109
- return new Promise((e, t) => {
110
- i.toBlob((r) => {
111
- r ? e(r) : t(/* @__PURE__ */ Error(`Could not encode framebuffer as ${n}.`));
112
- }, n);
113
- });
114
- }
115
- function u(e, t, n) {
116
- let { pixels: r, width: i, height: a } = s(e, t, n), o = document.createElement("canvas");
117
- o.width = i, o.height = a;
118
- let c = o.getContext("2d"), l = c.createImageData(i, a);
119
- return l.data.set(r), c.putImageData(l, 0, 0), o;
120
- }
121
- function d(e, t, n, r) {
122
- let i = new Uint8ClampedArray(e.length), a = t * 4;
123
- for (let t = 0; t < n; t++) {
124
- let r = (n - t - 1) * a, o = t * a;
125
- i.set(e.subarray(r, r + a), o);
126
- }
127
- if (r) for (let e = 0; e < i.length; e += 4) {
128
- let t = i[e + 3];
129
- if (t == 0) i[e] = 0, i[e + 1] = 0, i[e + 2] = 0;
130
- else if (t < 255) {
131
- let n = 255 / t;
132
- i[e] = Math.round(i[e] * n), i[e + 1] = Math.round(i[e + 1] * n), i[e + 2] = Math.round(i[e + 2] * n);
133
- }
134
- }
135
- return i;
136
- }
137
- function f(e, t, n, r, i) {
138
- if (![
139
- t,
140
- n,
141
- r,
142
- i
143
- ].every(Number.isInteger)) throw RangeError("Framebuffer readback bounds must be integers.");
144
- if (t < 0 || n < 0 || r <= 0 || i <= 0 || t + r > e.width || n + i > e.height) throw RangeError("Framebuffer readback bounds are out of range.");
145
- }
146
- //#endregion
147
- export { c as n, o as r, l as t };
@@ -1,53 +0,0 @@
1
- import { n as e, r as t, s as n } from "./framebufferReadback-Bje9lHb7.js";
2
- import { n as r } from "./viewRenderingContext-HtpqwS_x.js";
3
- import { t as i } from "./svgNumber-C6aRPc8Z.js";
4
- //#region ../core/src/svg/raster/index.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 };
@@ -1,54 +0,0 @@
1
- import { i as e } from "./twgl-full.module-BNEMlXRV.js";
2
- import { n as t } from "./viewRenderingContext-HtpqwS_x.js";
3
- import { n, r } from "./framebufferReadback-CC0D6Haw.js";
4
- import { t as i } from "./svgNumber-C6aRPc8Z.js";
5
- //#region ../core/src/svg/raster/index.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 };