@genome-spy/app 0.88.1 → 0.90.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 (65) hide show
  1. package/dist/{agentApi-BIpg3JKh.js → agentApi-Z65dw-sD.js} +5976 -6711
  2. package/dist/agentApi.es.js +3580 -4470
  3. package/dist/agentShared.es.js +742 -683
  4. package/dist/{canvas2d-BVQ7-2eJ.js → canvas2d-DiPQvNtZ.js} +122 -109
  5. package/dist/{canvas2d-D7SZK3xv.js → canvas2d-t_N10CeW.js} +114 -101
  6. package/dist/{canvasSizeHelper-7h_8rOcx.js → canvasSizeHelper-foL2YvGL.js} +15 -8
  7. package/dist/{clipOptions-DTMcB_9z.js → clipOptions-B5PibDq3.js} +1610 -1342
  8. package/dist/{clipOptions-BWHr3aTa.js → clipOptions-Cba4I0AO.js} +1872 -1644
  9. package/dist/{componentStyles-FsNmIb22.js → componentStyles-DGtQXvwc.js} +17 -15
  10. package/dist/{debug-CVpoEOWx.js → debug-CVAlrcZt.js} +2 -2
  11. package/dist/{debug-DYAMZZKl.js → debug-DP4WzTNo.js} +2 -2
  12. package/dist/dialog.es.js +4 -3
  13. package/dist/esm-BiqrFjMh.js +443 -0
  14. package/dist/{esm-lwYrRdbg.js → esm-Bv7Frz7C.js} +142 -79
  15. package/dist/{esm-VvpZ9hsq.js → esm-C3A-AuRi.js} +1 -1
  16. package/dist/esm-CvpR1OcU.js +322 -0
  17. package/dist/esm-DFHFX1sH.js +1526 -0
  18. package/dist/esm-Dndm-NaA.js +1193 -0
  19. package/dist/{esm-CcDLRSvC.js → esm-DtNElqRr.js} +64 -63
  20. package/dist/esm-L53qjcYH.js +1155 -0
  21. package/dist/esm-VFJeyk9i.js +249 -0
  22. package/dist/{esm-BdLYkz-m.js → esm-_xCtpDwm.js} +1 -1
  23. package/dist/index.es.js +4203 -3910
  24. package/dist/index.js +971 -482
  25. package/dist/{indexer-CXjZDo2Q.js → indexer-DbFTKGlm.js} +1 -1
  26. package/dist/{indexer-DAH_ruVn.js → indexer-En7gpvLN.js} +1 -1
  27. package/dist/{lit-ByuJ0FJ4.js → lit-CoXp9NFX.js} +12 -10
  28. package/dist/order-BkYCnwD7.js +1062 -0
  29. package/dist/order-R043xTpC.js +1062 -0
  30. package/dist/{parquetRead-Cs2xRrvz.js → parquetRead-0hFIa3Cc.js} +532 -350
  31. package/dist/rasterExport-C_FcNBkC.js +52 -0
  32. package/dist/rasterExport-Z7gs5346.js +52 -0
  33. package/dist/rasterization-_-9JmSas.js +63 -0
  34. package/dist/rectangle-DE98gIxF.js +108 -0
  35. package/dist/{renderCanvas2D-DxturTEW.js → renderCanvas2D-DK1c9TFK.js} +68 -67
  36. package/dist/{renderCanvas2D-DtcJjqpB.js → renderCanvas2D-IM-A9DYG.js} +57 -56
  37. package/dist/schema.json +599 -116
  38. package/dist/{src-DjOlFqSn.js → src-DJtvThVC.js} +3 -5
  39. package/dist/style.css +1 -1
  40. package/dist/{svg-SDJMzL--.js → svg-DW3tfUmm.js} +339 -326
  41. package/dist/{svg-CyrLfa9e.js → svg-PabUdcDi.js} +365 -352
  42. package/dist/{svgRasterizer-f7DJ3UO0.js → svgRasterizer-B6YtWLJs.js} +6 -5
  43. package/dist/{svgRasterizer-mWK7HTkx.js → svgRasterizer-BEVDyyS3.js} +6 -5
  44. package/dist/{vega-scale-DLKCwWRs.js → vega-scale-Byaw1K8O.js} +823 -780
  45. package/dist/{vega-scale-CypF85iS.js → vega-scale-Ctz_wa3z.js} +963 -923
  46. package/dist/{viewIdentityRegistry-Dl-vMN9I.js → viewIdentityRegistry-BW415b3o.js} +1 -1
  47. package/dist/{viewIdentityRegistry-DIDo44XQ.js → viewIdentityRegistry-_F0E7nkA.js} +1 -1
  48. package/dist/{viewSelectors-CymbZyE6.js → viewSelectors-DYz-PhTO.js} +407 -340
  49. package/dist/{viewSelectors-DNiDip5e.js → viewSelectors-KtD-QSN0.js} +349 -282
  50. package/dist/{viewUtils-BrJLIj2o.js → viewUtils-BZGPseMx.js} +2052 -1871
  51. package/dist/{webgl-tZfZ8y3q.js → webgl-BKSGqHaz.js} +2144 -784
  52. package/dist/{webgl-CTJt7jQd.js → webgl-tdKf9SlZ.js} +2386 -1026
  53. package/package.json +5 -5
  54. package/dist/esm-80V4xF_D.js +0 -1098
  55. package/dist/esm-BA6yMcc-.js +0 -1222
  56. package/dist/esm-BdT7qUL-.js +0 -157
  57. package/dist/esm-CfYZhLHN.js +0 -1367
  58. package/dist/esm-D-iG_TIX.js +0 -441
  59. package/dist/esm-JAiZmFIS.js +0 -128
  60. package/dist/order-C5CzA37O.js +0 -918
  61. package/dist/order-DvY7KNcu.js +0 -918
  62. package/dist/rasterExport-BgZ98e6U.js +0 -44
  63. package/dist/rasterExport-DEr8fOLm.js +0 -44
  64. package/dist/rasterization-CFogVB3B.js +0 -50
  65. package/dist/rectangle-DKnrAmKs.js +0 -142
@@ -1,44 +0,0 @@
1
- import { t as e } from "./rasterization-CFogVB3B.js";
2
- import { t } from "./rectangle-DKnrAmKs.js";
3
- import { t as n } from "./layoutResult-D50MSHXR.js";
4
- import { t as r } from "./renderCanvas2D-DtcJjqpB.js";
5
- //#region ../core/src/rendering/canvas2d/rasterExport.js
6
- async function i(e) {
7
- let t = e.mimeType ?? "image/png";
8
- if (t != "image/png") throw Error(`Unsupported raster export MIME type: ${t}`);
9
- let n = o(e);
10
- return new Promise((e, r) => {
11
- n.toBlob((t) => {
12
- t ? e(t) : r(/* @__PURE__ */ Error("Canvas2D could not encode the raster export."));
13
- }, t);
14
- });
15
- }
16
- function a(e) {
17
- return o({
18
- ...e,
19
- pixelRatio: e.devicePixelRatio ?? e.pixelRatio
20
- }).toDataURL("image/png");
21
- }
22
- function o(i) {
23
- let a = i.logicalWidth ?? i.liveSize.width, o = i.logicalHeight ?? i.liveSize.height, s = i.pixelRatio ?? i.liveDevicePixelRatio, c, l;
24
- try {
25
- c = document.createElement("canvas"), c.width = Math.floor(a * s), c.height = Math.floor(o * s), l = c.getContext("2d");
26
- } catch (t) {
27
- throw new e("Unable to initialize a Canvas2D export context.", { cause: t });
28
- }
29
- if (!l) throw new e("Unable to initialize a Canvas2D export context.");
30
- return r({
31
- layoutResult: n(i.viewRoot, t.create(0, 0, a, o), {
32
- devicePixelRatio: s,
33
- renderingOptions: { firstFacet: !0 }
34
- }),
35
- context: l,
36
- width: a,
37
- height: o,
38
- devicePixelRatio: s,
39
- background: i.clearColor ?? null,
40
- paint: !0
41
- }), c;
42
- }
43
- //#endregion
44
- export { a as exportCanvas, i as exportRaster };
@@ -1,44 +0,0 @@
1
- import { t as e } from "./rasterization-CFogVB3B.js";
2
- import { t } from "./rectangle-DKnrAmKs.js";
3
- import { t as n } from "./layoutResult-D50MSHXR.js";
4
- import { t as r } from "./renderCanvas2D-DxturTEW.js";
5
- //#region ../core/src/rendering/canvas2d/rasterExport.js
6
- async function i(e) {
7
- let t = e.mimeType ?? "image/png";
8
- if (t != "image/png") throw Error(`Unsupported raster export MIME type: ${t}`);
9
- let n = o(e);
10
- return new Promise((e, r) => {
11
- n.toBlob((t) => {
12
- t ? e(t) : r(/* @__PURE__ */ Error("Canvas2D could not encode the raster export."));
13
- }, t);
14
- });
15
- }
16
- function a(e) {
17
- return o({
18
- ...e,
19
- pixelRatio: e.devicePixelRatio ?? e.pixelRatio
20
- }).toDataURL("image/png");
21
- }
22
- function o(i) {
23
- let a = i.logicalWidth ?? i.liveSize.width, o = i.logicalHeight ?? i.liveSize.height, s = i.pixelRatio ?? i.liveDevicePixelRatio, c, l;
24
- try {
25
- c = document.createElement("canvas"), c.width = Math.floor(a * s), c.height = Math.floor(o * s), l = c.getContext("2d");
26
- } catch (t) {
27
- throw new e("Unable to initialize a Canvas2D export context.", { cause: t });
28
- }
29
- if (!l) throw new e("Unable to initialize a Canvas2D export context.");
30
- return r({
31
- layoutResult: n(i.viewRoot, t.create(0, 0, a, o), {
32
- devicePixelRatio: s,
33
- renderingOptions: { firstFacet: !0 }
34
- }),
35
- context: l,
36
- width: a,
37
- height: o,
38
- devicePixelRatio: s,
39
- background: i.clearColor ?? null,
40
- paint: !0
41
- }), c;
42
- }
43
- //#endregion
44
- export { a as exportCanvas, i as exportRaster };
@@ -1,50 +0,0 @@
1
- //#region ../core/src/rendering/renderingModuleRegistry.js
2
- var e = {}, t = class extends Error {
3
- constructor(e, t) {
4
- super(e, t), this.name = "RasterizationUnavailableError";
5
- }
6
- };
7
- async function n(n, r) {
8
- if (n.exportRaster) try {
9
- return await n.exportRaster(r);
10
- } catch (e) {
11
- if (!(e instanceof t)) throw e;
12
- }
13
- if (!e.canvasRasterExport) throw i();
14
- let a;
15
- try {
16
- a = await e.canvasRasterExport();
17
- } catch (e) {
18
- throw i(e);
19
- }
20
- try {
21
- return await a.exportRaster({
22
- ...r,
23
- liveSize: n.surface.getLogicalCanvasSize(),
24
- liveDevicePixelRatio: n.surface.getDevicePixelRatio()
25
- });
26
- } catch (e) {
27
- throw e instanceof t ? i(e) : e;
28
- }
29
- }
30
- async function r(n, r) {
31
- if (n.rasterizeSvgRuns) try {
32
- await n.rasterizeSvgRuns(r);
33
- return;
34
- } catch (e) {
35
- if (!(e instanceof t)) throw e;
36
- }
37
- if (!e.canvasSvgRasterizer) throw new t("No raster backend supports selective SVG rasterization. Import \"@genome-spy/core/rendering/canvas.js\" to enable the Canvas2D fallback.");
38
- let i;
39
- try {
40
- i = await e.canvasSvgRasterizer();
41
- } catch (e) {
42
- throw new t("No raster backend supports selective SVG rasterization.", { cause: e });
43
- }
44
- await i.createCanvas2DSvgRasterizer()(r);
45
- }
46
- function i(e) {
47
- return new t("Raster export is unsupported because no raster rendering backend is available. Import \"@genome-spy/core/rendering/canvas.js\" to enable the Canvas2D fallback.", { cause: e });
48
- }
49
- //#endregion
50
- export { e as i, n, r, t };
@@ -1,142 +0,0 @@
1
- function e(e) {
2
- let t = [];
3
- for (let e = 0; e <= 127; e++) t.push(void 0);
4
- let n = /* @__PURE__ */ new Map();
5
- for (let r of e.chars) r.id <= 127 ? t[r.id] = r : n.set(r.id, r);
6
- let r = 8722;
7
- n.has(r) || n.set(r, t[45]);
8
- function i(e) {
9
- return (e <= 127 ? t[e] : n.get(e)) || t[63];
10
- }
11
- function a(e) {
12
- return i(e.charCodeAt(0));
13
- }
14
- let o = e.common.base, s = a("x"), c = a("X"), l = a("q"), u = s.height - 10, d = c.height - 10, f = l.height - s.height + l.yoffset - s.yoffset;
15
- function p(e, t = 1) {
16
- let n = 0;
17
- for (let t = 0; t < e.length; t++) n += i(e.charCodeAt(t)).xadvance;
18
- return n / o * t;
19
- }
20
- let m = 0;
21
- for (let t of e.chars) t.id > m && (m = t.id);
22
- return {
23
- measureWidth: p,
24
- getCharByCode: i,
25
- getChar: a,
26
- chars: e.chars,
27
- maxCharId: m,
28
- xHeight: u,
29
- capHeight: d,
30
- descent: f,
31
- common: e.common
32
- };
33
- }
34
- //#endregion
35
- //#region ../core/src/view/layout/rectangle.js
36
- function t(e) {
37
- return () => e;
38
- }
39
- var n = class e {
40
- static create(n, r, i, a) {
41
- return new e(t(n), t(r), t(i), t(a));
42
- }
43
- static ZERO = e.create(0, 0, 0, 0);
44
- _offset(e, t) {
45
- let n = this["_" + e];
46
- if (t === 0) return n;
47
- switch (typeof t) {
48
- case "number": return () => n() + t;
49
- case "function": return () => n() + t();
50
- default: throw Error("Not a number of function");
51
- }
52
- }
53
- _passThrough(e) {
54
- return this._offset(e, 0);
55
- }
56
- constructor(e, t, n, r) {
57
- this._x = e, this._y = t, this._width = n, this._height = r;
58
- }
59
- get x() {
60
- return this._x();
61
- }
62
- get y() {
63
- return this._y();
64
- }
65
- get width() {
66
- return this._width();
67
- }
68
- get height() {
69
- return this._height();
70
- }
71
- get x2() {
72
- return this._x() + this._width();
73
- }
74
- get y2() {
75
- return this._y() + this._height();
76
- }
77
- equals(e) {
78
- return e ? this === e || this.x === e.x && this.y === e.y && this.width === e.width && this.height === e.height : !1;
79
- }
80
- modify(n) {
81
- if (!Object.keys(n).length) return this;
82
- let r = (e) => {
83
- let r = n[e];
84
- return typeof r == "number" ? t(r) : typeof r == "function" ? r : this._passThrough(e);
85
- };
86
- return new e(r("x"), r("y"), r("width"), r("height"));
87
- }
88
- translate(t, n) {
89
- return t === 0 && n === 0 ? this : new e(this._offset("x", t), this._offset("y", n), this._passThrough("width"), this._passThrough("height"));
90
- }
91
- translateBy(e) {
92
- return this.translate(e.x, e.y);
93
- }
94
- expand(t, n = 1) {
95
- return t.left == 0 && t.top == 0 && t.right == 0 && t.bottom == 0 ? this : new e(t.left ? this._offset("x", -t.left * n) : this._passThrough("x"), t.top ? this._offset("y", -t.top * n) : this._passThrough("y"), t.width ? this._offset("width", t.width * n) : this._passThrough("width"), t.height ? this._offset("height", t.height * n) : this._passThrough("height"));
96
- }
97
- shrink(e) {
98
- return this.expand(e, -1);
99
- }
100
- intersect(t) {
101
- return this === t || t == null ? this : new e(() => Math.max(this.x, t.x), () => Math.max(this.y, t.y), () => Math.min(this.x2, t.x2) - Math.max(this.x, t.x), () => Math.min(this.y2, t.y2) - Math.max(this.y, t.y));
102
- }
103
- intersectX(t) {
104
- return this === t || t == null ? this : new e(() => Math.max(this.x, t.x), this._passThrough("y"), () => Math.min(this.x2, t.x2) - Math.max(this.x, t.x), this._passThrough("height"));
105
- }
106
- intersectY(t) {
107
- return this === t || t == null ? this : new e(this._passThrough("x"), () => Math.max(this.y, t.y), this._passThrough("width"), () => Math.min(this.y2, t.y2) - Math.max(this.y, t.y));
108
- }
109
- union(t) {
110
- return this === t || t == null ? this : new e(() => Math.min(this.x, t.x), () => Math.min(this.y, t.y), () => Math.max(this.x2, t.x2) - Math.min(this.x, t.x), () => Math.max(this.y2, t.y2) - Math.min(this.y, t.y));
111
- }
112
- isDefined() {
113
- return this.width >= 0 && this.height >= 0;
114
- }
115
- flatten() {
116
- return new e(t(this.x), t(this.y), t(this.width), t(this.height));
117
- }
118
- containsPoint(e, t) {
119
- return e >= this.x && e < this.x2 && t >= this.y && t < this.y2;
120
- }
121
- normalizePoint(e, t, n = !1) {
122
- let r = {
123
- x: (e - this.x) / this.width,
124
- y: (t - this.y) / this.height
125
- };
126
- return n && (r.y = 1 - r.y), r;
127
- }
128
- denormalizePoint(e, t, n = !1) {
129
- return n && (t = 1 - t), {
130
- x: this.x + e * this.width,
131
- y: this.y + t * this.height
132
- };
133
- }
134
- toString() {
135
- return `Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`;
136
- }
137
- toRoundedString() {
138
- return `Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`;
139
- }
140
- };
141
- //#endregion
142
- export { e as n, n as t };