@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
@@ -0,0 +1,249 @@
1
+ import { n as e, t } from "./rolldown-runtime-DF993M8W.js";
2
+ //#region ../../node_modules/generic-filehandle2/esm/util.js
3
+ async function n(e) {
4
+ return e.bytes ? e.bytes() : new Uint8Array(await e.arrayBuffer());
5
+ }
6
+ async function r(e, t, r) {
7
+ if (t === "utf8" || t === "utf-8") return e.text();
8
+ if (t) throw Error(`unsupported encoding: ${t}`);
9
+ return r && "body" in e ? c(e, r) : n(e);
10
+ }
11
+ function i(e) {
12
+ return typeof e == "string" ? {
13
+ encoding: e,
14
+ opts: {}
15
+ } : {
16
+ encoding: e?.encoding,
17
+ opts: e ?? {}
18
+ };
19
+ }
20
+ function a(e) {
21
+ let t = /\/(\d+)$/.exec(e ?? "")?.[1];
22
+ return t === void 0 ? void 0 : parseInt(t, 10);
23
+ }
24
+ function o(e) {
25
+ let t = e.headers.get("content-length"), n = t === null ? NaN : Number(t);
26
+ return Number.isSafeInteger(n) && n >= 0 ? n : void 0;
27
+ }
28
+ var s = 50;
29
+ async function c(e, t) {
30
+ let r = o(e), i = e.body;
31
+ if (!i || r === void 0) {
32
+ let i = await n(e);
33
+ return t(i.byteLength, r ?? i.byteLength), i;
34
+ }
35
+ let a = i.getReader(), c = new Uint8Array(r), l = 0, u = Date.now();
36
+ t(0, r);
37
+ for (let e = await a.read(); !e.done; e = await a.read()) {
38
+ if (l + e.value.byteLength > c.length) {
39
+ let t = new Uint8Array(Math.max(l + e.value.byteLength, c.length * 2));
40
+ t.set(c.subarray(0, l)), c = t;
41
+ }
42
+ c.set(e.value, l), l += e.value.byteLength;
43
+ let n = Date.now();
44
+ n - u >= s && (u = n, t(l, r));
45
+ }
46
+ return t(l, r), l === c.length ? c : c.slice(0, l);
47
+ }
48
+ //#endregion
49
+ //#region ../../node_modules/generic-filehandle2/esm/blobFile.js
50
+ var l = class {
51
+ source;
52
+ blob;
53
+ constructor(e) {
54
+ this.blob = e;
55
+ }
56
+ async read(e, t = 0, r = {}) {
57
+ if (e === 0) return /* @__PURE__ */ new Uint8Array();
58
+ r.signal?.throwIfAborted();
59
+ let i = await n(this.blob.slice(t, t + e));
60
+ return r.signal?.throwIfAborted(), i;
61
+ }
62
+ async readFile(e) {
63
+ let { encoding: t, opts: n } = i(e);
64
+ n.signal?.throwIfAborted();
65
+ let a = await r(this.blob, t);
66
+ return n.signal?.throwIfAborted(), a;
67
+ }
68
+ stat() {
69
+ return Promise.resolve({ size: this.blob.size });
70
+ }
71
+ close() {
72
+ return Promise.resolve();
73
+ }
74
+ };
75
+ //#endregion
76
+ //#region ../../node_modules/generic-filehandle2/esm/remoteFile.js
77
+ function u(e, t = {}) {
78
+ let n = new Set(Object.keys(t).map((e) => e.toLowerCase())), r = Object.entries(e).filter(([e]) => !n.has(e.toLowerCase()));
79
+ return {
80
+ ...Object.fromEntries(r),
81
+ ...t
82
+ };
83
+ }
84
+ function d(e) {
85
+ return Number.isSafeInteger(e) && e >= 0;
86
+ }
87
+ function f(e) {
88
+ return (typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : `${e}`).replace(/\.$/, "");
89
+ }
90
+ var p = class {
91
+ url;
92
+ get source() {
93
+ return this.url;
94
+ }
95
+ _stat;
96
+ statProbe;
97
+ fetchImplementation;
98
+ baseHeaders;
99
+ baseOverrides;
100
+ baseSignal;
101
+ constructor(e, t = {}) {
102
+ this.url = e, this.baseHeaders = t.headers ?? {}, this.baseOverrides = t.overrides ?? {}, this.baseSignal = t.signal, this.fetchImplementation = t.fetch ?? globalThis.fetch.bind(globalThis);
103
+ }
104
+ buildRequest(e, t) {
105
+ let n = e.signal ?? this.baseSignal;
106
+ return {
107
+ method: "GET",
108
+ redirect: "follow",
109
+ mode: "cors",
110
+ ...this.baseOverrides,
111
+ ...e.overrides,
112
+ headers: u({
113
+ ...this.baseHeaders,
114
+ ...e.headers
115
+ }, t),
116
+ ...n ? { signal: n } : {}
117
+ };
118
+ }
119
+ async fetch(e, t) {
120
+ let n = (t) => Error(`${f(t)} fetching ${e}`, { cause: t }), r;
121
+ try {
122
+ r = await this.fetchImplementation(e, t);
123
+ } catch (i) {
124
+ if (`${i}`.includes("Failed to fetch")) {
125
+ console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);
126
+ try {
127
+ r = await this.fetchImplementation(e, {
128
+ ...t,
129
+ cache: "reload"
130
+ });
131
+ } catch (e) {
132
+ throw n(e);
133
+ }
134
+ } else throw n(i);
135
+ }
136
+ return r;
137
+ }
138
+ async read(e, t, n = {}) {
139
+ if (e === 0) return /* @__PURE__ */ new Uint8Array();
140
+ if (!d(e) || !d(t)) throw TypeError(`read() called with an invalid length or position (length=${e}, position=${t}). The index file may be corrupt.`);
141
+ return this.fetchBytes(e, t, n);
142
+ }
143
+ async fetchBytes(e, t, r) {
144
+ let i = await this.fetch(this.url, this.buildRequest(r, { range: `bytes=${t}-${t + e - 1}` }));
145
+ if (i.status === 416) return /* @__PURE__ */ new Uint8Array();
146
+ if (this.checkOk(i), i.status === 200 && t === 0 || i.status === 206) {
147
+ let t = a(i.headers.get("content-range"));
148
+ t !== void 0 && (this._stat = { size: t });
149
+ let o = r.onProgress ? await c(i, r.onProgress) : await n(i);
150
+ return !this._stat && i.status === 200 && (this._stat = { size: o.byteLength }), o.byteLength <= e ? o : o.slice(0, e);
151
+ }
152
+ throw Error(i.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${i.status} fetching ${this.url}`);
153
+ }
154
+ checkOk(e) {
155
+ if (!e.ok) throw Error(`HTTP ${e.status} fetching ${this.url}`);
156
+ }
157
+ async readFile(e) {
158
+ let { encoding: t, opts: n } = i(e), a = await this.fetch(this.url, this.buildRequest(n));
159
+ this.checkOk(a);
160
+ let o = await r(a, t, n.onProgress);
161
+ return a.status === 200 && typeof o != "string" && (this._stat = { size: o.byteLength }), o;
162
+ }
163
+ async stat() {
164
+ return this._stat || (this.statProbe ??= this.read(10, 0).finally(() => {
165
+ this.statProbe = void 0;
166
+ }), await this.statProbe), this._stat ?? { size: 0 };
167
+ }
168
+ close() {
169
+ return Promise.resolve();
170
+ }
171
+ }, m = (/* @__PURE__ */ t(((e, t) => {
172
+ t.exports = {};
173
+ })))();
174
+ function h(e) {
175
+ return typeof e == "object" && !!e && "unref" in e && typeof e.unref == "function";
176
+ }
177
+ var g = class {
178
+ filename;
179
+ get source() {
180
+ return this.filename;
181
+ }
182
+ cacheFd;
183
+ fdIdleTimeoutMs;
184
+ fh;
185
+ opening;
186
+ idleTimer;
187
+ constructor(e, t = {}) {
188
+ this.filename = e, this.cacheFd = t.cacheFd ?? !0, this.fdIdleTimeoutMs = t.fdIdleTimeoutMs ?? 3e4;
189
+ }
190
+ touch() {
191
+ this.fdIdleTimeoutMs <= 0 || (this.idleTimer !== void 0 && clearTimeout(this.idleTimer), this.idleTimer = setTimeout(() => {
192
+ this.idleTimer = void 0, this.dropHandle();
193
+ }, this.fdIdleTimeoutMs), h(this.idleTimer) && this.idleTimer.unref());
194
+ }
195
+ async handle() {
196
+ return this.fh ? this.fh : (this.opening ??= (0, m.open)(this.filename, "r").then((e) => (this.fh = e, this.opening = void 0, e), (e) => {
197
+ throw this.opening = void 0, e;
198
+ }), this.opening);
199
+ }
200
+ async dropHandle() {
201
+ this.idleTimer !== void 0 && (clearTimeout(this.idleTimer), this.idleTimer = void 0);
202
+ let e = this.fh ?? await this.opening?.catch(() => void 0);
203
+ if (this.fh = void 0, e) try {
204
+ await e.close();
205
+ } catch {}
206
+ }
207
+ async read(e, t = 0, n = {}) {
208
+ if (e === 0) return /* @__PURE__ */ new Uint8Array();
209
+ if (n.signal?.throwIfAborted(), !this.cacheFd) return this.readWithOwnHandle(e, t, n);
210
+ for (let r = 0;; r++) {
211
+ let i = await this.handle();
212
+ try {
213
+ let r = await this.readFrom(i, e, t, n);
214
+ return this.touch(), r;
215
+ } catch (e) {
216
+ if (await this.dropHandle(), r > 0 || n.signal?.aborted) throw e;
217
+ }
218
+ }
219
+ }
220
+ async readFrom(e, t, n, r) {
221
+ let i = new Uint8Array(t), a = await e.read(i, 0, t, n);
222
+ return r.signal?.throwIfAborted(), a.buffer.subarray(0, a.bytesRead);
223
+ }
224
+ async readWithOwnHandle(e, t, n) {
225
+ let r;
226
+ try {
227
+ return r = await (0, m.open)(this.filename, "r"), await this.readFrom(r, e, t, n);
228
+ } finally {
229
+ if (r) try {
230
+ await r.close();
231
+ } catch {}
232
+ }
233
+ }
234
+ async readFile(e) {
235
+ return (0, m.readFile)(this.filename, e);
236
+ }
237
+ async stat() {
238
+ return (0, m.stat)(this.filename);
239
+ }
240
+ async close() {
241
+ await this.dropHandle();
242
+ }
243
+ }, _ = /* @__PURE__ */ e({
244
+ BlobFile: () => l,
245
+ LocalFile: () => g,
246
+ RemoteFile: () => p
247
+ });
248
+ //#endregion
249
+ export { g as n, p as r, _ as t };
@@ -11,7 +11,7 @@ function t(t) {
11
11
  for (; a < t.length;) if (t[a] === "%" && a + 2 < t.length) {
12
12
  r += t.slice(i, a);
13
13
  let n = e[t.slice(a + 1, a + 3)];
14
- n === void 0 ? r += t.slice(a, a + 3) : r += n, a += 3, i = a;
14
+ r += n === void 0 ? t.slice(a, a + 3) : n, a += 3, i = a;
15
15
  } else a++;
16
16
  return r + t.slice(i);
17
17
  }