@genome-spy/app 0.76.0 → 0.77.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 (33) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{agentApi-CzdacisO.js → agentApi-ClsLtELB.js} +7006 -5238
  3. package/dist/agentApi.es.js +3127 -1442
  4. package/dist/agentShared.es.js +20 -20
  5. package/dist/blosc-DL1kZHdE.js +692 -0
  6. package/dist/chunk-INHXZS53-Dx2aFznx.js +13 -0
  7. package/dist/esm-CHVYSGF2.js +1084 -0
  8. package/dist/esm-C_XrKaCY.js +137 -0
  9. package/dist/{esm-Cr7pLUfG.js → esm-CqrZuhTF.js} +1 -1
  10. package/dist/{esm-BWsx1OJ2.js → esm-Cz4iCfzF.js} +1 -1
  11. package/dist/esm-D2-C5ZzN.js +1084 -0
  12. package/dist/{esm-CdIesJ1z.js → esm-Dfo2M18m.js} +1 -1
  13. package/dist/{esm-BH0wx5y-.js → esm-Q6nrd9vJ.js} +1 -1
  14. package/dist/{esm-BLfLaJtE.js → esm-aOLxLL7A.js} +1 -1
  15. package/dist/esm-id9DWBZW.js +137 -0
  16. package/dist/{esm-DHOMWRoL.js → esm-kXhrPIYy.js} +1 -1
  17. package/dist/index.es.js +3768 -4997
  18. package/dist/index.js +420 -357
  19. package/dist/lz4-Csz5aoFA.js +626 -0
  20. package/dist/schema.json +44 -0
  21. package/dist/{viewUtils-C5htqZCm.js → viewUtils-3_xHIxmy.js} +2316 -2171
  22. package/dist/zstd-dJuUp1fl.js +583 -0
  23. package/package.json +4 -4
  24. package/src/agentApi/index.d.ts +24 -0
  25. package/src/sampleView/sampleViewTypes.d.ts +2 -0
  26. package/src/sampleView/state/payloadTypes.d.ts +84 -0
  27. package/src/sampleView/types.d.ts +3 -0
  28. package/src/spec/sampleView.d.ts +58 -0
  29. package/dist/esm-BY4T8YoD.js +0 -142
  30. package/dist/esm-DJUb6vy0.js +0 -1015
  31. package/dist/esm-DRZ5LLNH.js +0 -142
  32. package/dist/esm-PDPkTR1_.js +0 -1015
  33. /package/dist/{parquetRead-BuEN-6yG.js → parquetRead-C33mgLEo.js} +0 -0
@@ -0,0 +1,137 @@
1
+ import { n as e, t } from "./chunk-CPXzm0be.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
+ //#endregion
7
+ //#region ../../node_modules/generic-filehandle2/esm/blobFile.js
8
+ var r = class {
9
+ blob;
10
+ constructor(e) {
11
+ this.blob = e;
12
+ }
13
+ async read(e, t = 0) {
14
+ return e === 0 ? new Uint8Array() : n(this.blob.slice(t, t + e));
15
+ }
16
+ async readFile(e) {
17
+ let t = typeof e == "string" ? e : e?.encoding;
18
+ if (t === "utf8") return this.blob.text();
19
+ if (t) throw Error(`unsupported encoding: ${t}`);
20
+ return n(this.blob);
21
+ }
22
+ stat() {
23
+ return Promise.resolve({ size: this.blob.size });
24
+ }
25
+ close() {
26
+ return Promise.resolve();
27
+ }
28
+ };
29
+ //#endregion
30
+ //#region ../../node_modules/generic-filehandle2/esm/remoteFile.js
31
+ function i(e) {
32
+ return (typeof e == "object" && e && "message" in e && typeof e.message == "string" ? e.message : `${e}`).replace(/\.$/, "");
33
+ }
34
+ var a = class {
35
+ url;
36
+ _stat;
37
+ fetchImplementation;
38
+ baseHeaders;
39
+ baseOverrides;
40
+ constructor(e, t = {}) {
41
+ this.url = e, this.baseHeaders = t.headers ?? {}, this.baseOverrides = t.overrides ?? {}, this.fetchImplementation = t.fetch ?? globalThis.fetch.bind(globalThis);
42
+ }
43
+ buildRequest(e, t) {
44
+ return {
45
+ ...this.baseOverrides,
46
+ ...e.overrides,
47
+ headers: {
48
+ ...this.baseHeaders,
49
+ ...e.headers,
50
+ ...t
51
+ },
52
+ method: "GET",
53
+ redirect: "follow",
54
+ mode: "cors",
55
+ signal: e.signal
56
+ };
57
+ }
58
+ async fetch(e, t) {
59
+ let n = (t) => Error(`${i(t)} fetching ${e}`, { cause: t }), r;
60
+ try {
61
+ r = await this.fetchImplementation(e, t);
62
+ } catch (i) {
63
+ if (`${i}`.includes("Failed to fetch")) {
64
+ console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);
65
+ try {
66
+ r = await this.fetchImplementation(e, {
67
+ ...t,
68
+ cache: "reload"
69
+ });
70
+ } catch (e) {
71
+ throw n(e);
72
+ }
73
+ } else throw n(i);
74
+ }
75
+ return r;
76
+ }
77
+ async read(e, t, r = {}) {
78
+ if (e === 0) return new Uint8Array();
79
+ if (Number.isNaN(e) || Number.isNaN(t)) throw TypeError(`read() called with NaN length or position (length=${e}, position=${t}). The index file may be corrupt.`);
80
+ let i = await this.fetch(this.url, this.buildRequest(r, { range: `bytes=${t}-${t + e - 1}` }));
81
+ if (i.status === 416) return new Uint8Array();
82
+ if (!i.ok) throw Error(`HTTP ${i.status} fetching ${this.url}`);
83
+ if (i.status === 200 && t === 0 || i.status === 206) {
84
+ let t = i.headers.get("content-range"), r = /\/(\d+)$/.exec(t ?? "");
85
+ r?.[1] && (this._stat = { size: parseInt(r[1], 10) });
86
+ let a = await n(i);
87
+ return !this._stat && i.status === 200 && (this._stat = { size: a.byteLength }), a.byteLength <= e ? a : a.subarray(0, e);
88
+ }
89
+ throw Error(i.status === 200 ? `${this.url} fetch returned status 200, expected 206` : `HTTP ${i.status} fetching ${this.url}`);
90
+ }
91
+ async readFile(e = {}) {
92
+ let t = typeof e == "string" ? e : e.encoding, r = typeof e == "string" ? {} : e, i = await this.fetch(this.url, this.buildRequest(r));
93
+ if (!i.ok) throw Error(`HTTP ${i.status} fetching ${this.url}`);
94
+ if (t === "utf8") return i.text();
95
+ if (t) throw Error(`unsupported encoding: ${t}`);
96
+ return n(i);
97
+ }
98
+ async stat() {
99
+ return this._stat || await this.read(10, 0), this._stat ?? { size: 0 };
100
+ }
101
+ close() {
102
+ return Promise.resolve();
103
+ }
104
+ }, o = (/* @__PURE__ */ t(((e, t) => {
105
+ t.exports = {};
106
+ })))(), s = class {
107
+ filename;
108
+ constructor(e) {
109
+ this.filename = e;
110
+ }
111
+ async read(e, t = 0) {
112
+ if (e === 0) return new Uint8Array();
113
+ let n = new Uint8Array(e), r;
114
+ try {
115
+ r = await (0, o.open)(this.filename, "r");
116
+ let i = await r.read(n, 0, e, t);
117
+ return i.buffer.subarray(0, i.bytesRead);
118
+ } finally {
119
+ if (r) try {
120
+ await r.close();
121
+ } catch {}
122
+ }
123
+ }
124
+ async readFile(e) {
125
+ return (0, o.readFile)(this.filename, e);
126
+ }
127
+ async stat() {
128
+ return (0, o.stat)(this.filename);
129
+ }
130
+ async close() {}
131
+ }, c = /* @__PURE__ */ e({
132
+ BlobFile: () => r,
133
+ LocalFile: () => s,
134
+ RemoteFile: () => a
135
+ });
136
+ //#endregion
137
+ export { s as n, a as r, c as t };
@@ -1,6 +1,6 @@
1
1
  import { n as e, r as t } from "./esm-BDFRLEuD.js";
2
2
  import { t as n } from "./esm-CZvS2Ldm.js";
3
- import { n as r, r as i } from "./esm-DRZ5LLNH.js";
3
+ import { n as r, r as i } from "./esm-id9DWBZW.js";
4
4
  //#region ../../node_modules/@gmod/bam/esm/chunk.js
5
5
  var a = class {
6
6
  constructor(e, t, n, r) {
@@ -1,6 +1,6 @@
1
1
  import { n as e, r as t } from "./esm-BDFRLEuD.js";
2
2
  import { t as n } from "./esm-CZvS2Ldm.js";
3
- import { n as r, r as i } from "./esm-DRZ5LLNH.js";
3
+ import { n as r, r as i } from "./esm-id9DWBZW.js";
4
4
  import { t as a } from "./AbortablePromiseCache-beUIcZcW.js";
5
5
  //#region ../../node_modules/@gmod/tabix/esm/chunk.js
6
6
  var o = class {