@genome-spy/app 0.89.0 → 1.0.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 (57) hide show
  1. package/dist/{agentApi-BUcXm-JC.js → agentApi-Z65dw-sD.js} +2808 -2638
  2. package/dist/agentApi.es.js +1607 -1570
  3. package/dist/agentShared.es.js +737 -678
  4. package/dist/{canvas2d-CGuVGvQk.js → canvas2d-DiPQvNtZ.js} +11 -9
  5. package/dist/{canvas2d-DgF0kstG.js → canvas2d-t_N10CeW.js} +24 -22
  6. package/dist/{clipOptions-DBJX_W31.js → clipOptions-B5PibDq3.js} +890 -900
  7. package/dist/{clipOptions-8BPf0WMZ.js → clipOptions-Cba4I0AO.js} +544 -554
  8. package/dist/{componentStyles-FsNmIb22.js → componentStyles-DGtQXvwc.js} +17 -15
  9. package/dist/{debug-BEWbYuZD.js → debug-CVAlrcZt.js} +2 -2
  10. package/dist/{debug-DQj_7mFm.js → debug-DP4WzTNo.js} +2 -2
  11. package/dist/dialog.es.js +4 -3
  12. package/dist/esm-BiqrFjMh.js +443 -0
  13. package/dist/{esm-lwYrRdbg.js → esm-Bv7Frz7C.js} +142 -79
  14. package/dist/{esm-VvpZ9hsq.js → esm-C3A-AuRi.js} +1 -1
  15. package/dist/esm-CvpR1OcU.js +322 -0
  16. package/dist/esm-DFHFX1sH.js +1526 -0
  17. package/dist/esm-Dndm-NaA.js +1193 -0
  18. package/dist/{esm-CcDLRSvC.js → esm-DtNElqRr.js} +64 -63
  19. package/dist/esm-L53qjcYH.js +1155 -0
  20. package/dist/esm-VFJeyk9i.js +249 -0
  21. package/dist/{esm-BdLYkz-m.js → esm-_xCtpDwm.js} +1 -1
  22. package/dist/index.es.js +4203 -3910
  23. package/dist/index.js +900 -455
  24. package/dist/{indexer-D8Bgkkb8.js → indexer-DbFTKGlm.js} +1 -1
  25. package/dist/{indexer-Cdt_U05k.js → indexer-En7gpvLN.js} +1 -1
  26. package/dist/{lit-ByuJ0FJ4.js → lit-CoXp9NFX.js} +12 -10
  27. package/dist/{order-DIxlclRN.js → order-BkYCnwD7.js} +36 -30
  28. package/dist/{order-BPOzLe80.js → order-R043xTpC.js} +47 -41
  29. package/dist/{parquetRead-Cs2xRrvz.js → parquetRead-0hFIa3Cc.js} +532 -350
  30. package/dist/{rasterExport-Bl6w9t3J.js → rasterExport-C_FcNBkC.js} +8 -7
  31. package/dist/{rasterExport-DRvNAH-r.js → rasterExport-Z7gs5346.js} +8 -7
  32. package/dist/{rasterization-D0tOoKu_.js → rasterization-_-9JmSas.js} +3 -2
  33. package/dist/{renderCanvas2D-LdEYFnRo.js → renderCanvas2D-DK1c9TFK.js} +10 -10
  34. package/dist/{renderCanvas2D-Ct95auF3.js → renderCanvas2D-IM-A9DYG.js} +16 -16
  35. package/dist/schema.json +11 -0
  36. package/dist/{src-DjOlFqSn.js → src-DJtvThVC.js} +3 -5
  37. package/dist/style.css +1 -1
  38. package/dist/{svg-pkTPD4bv.js → svg-DW3tfUmm.js} +233 -232
  39. package/dist/{svg-Ag36-h_I.js → svg-PabUdcDi.js} +233 -232
  40. package/dist/{svgRasterizer-DrtJ9nLk.js → svgRasterizer-B6YtWLJs.js} +2 -2
  41. package/dist/{svgRasterizer-CksK4QTB.js → svgRasterizer-BEVDyyS3.js} +2 -2
  42. package/dist/{vega-scale-BWBFykuI.js → vega-scale-Byaw1K8O.js} +837 -726
  43. package/dist/{vega-scale-BJaDSHBJ.js → vega-scale-Ctz_wa3z.js} +942 -834
  44. package/dist/{viewIdentityRegistry-BvCJajXG.js → viewIdentityRegistry-BW415b3o.js} +1 -1
  45. package/dist/{viewIdentityRegistry-B-snqI3y.js → viewIdentityRegistry-_F0E7nkA.js} +1 -1
  46. package/dist/{viewSelectors-BlvzvG-z.js → viewSelectors-DYz-PhTO.js} +245 -243
  47. package/dist/{viewSelectors-C5q3qBiR.js → viewSelectors-KtD-QSN0.js} +106 -104
  48. package/dist/{viewUtils-C3vBtSvE.js → viewUtils-BZGPseMx.js} +1833 -1677
  49. package/dist/{webgl-CZX2pe5v.js → webgl-BKSGqHaz.js} +964 -951
  50. package/dist/{webgl-CexXSw_I.js → webgl-tdKf9SlZ.js} +239 -226
  51. package/package.json +5 -5
  52. package/dist/esm-80V4xF_D.js +0 -1098
  53. package/dist/esm-BA6yMcc-.js +0 -1222
  54. package/dist/esm-BdT7qUL-.js +0 -157
  55. package/dist/esm-CfYZhLHN.js +0 -1367
  56. package/dist/esm-D-iG_TIX.js +0 -441
  57. package/dist/esm-JAiZmFIS.js +0 -128
@@ -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
  }