@genome-spy/app 0.76.0 → 0.78.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 (39) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{agentApi-CzdacisO.js → agentApi-BwbEWjvl.js} +6362 -4470
  3. package/dist/agentApi.es.js +3315 -1561
  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-Cr7pLUfG.js → esm-BHjeb8gt.js} +2 -2
  8. package/dist/{esm-BH0wx5y-.js → esm-BI-plmf6.js} +2 -2
  9. package/dist/esm-BgpwI2cq.js +1221 -0
  10. package/dist/{esm-BWsx1OJ2.js → esm-BkagIzhP.js} +2 -2
  11. package/dist/esm-CHVYSGF2.js +1084 -0
  12. package/dist/esm-COzpU5N8.js +1221 -0
  13. package/dist/{esm-CdIesJ1z.js → esm-CPufCnsG.js} +2 -2
  14. package/dist/esm-C_XrKaCY.js +137 -0
  15. package/dist/esm-D2-C5ZzN.js +1084 -0
  16. package/dist/{esm-BLfLaJtE.js → esm-Daho46bY.js} +2 -2
  17. package/dist/esm-id9DWBZW.js +137 -0
  18. package/dist/{esm-DHOMWRoL.js → esm-sPWfZg9X.js} +2 -2
  19. package/dist/index.es.js +14184 -15233
  20. package/dist/index.js +598 -485
  21. package/dist/lz4-Csz5aoFA.js +626 -0
  22. package/dist/schema.json +1008 -137
  23. package/dist/{viewUtils-C5htqZCm.js → viewUtils-B7-F_Ae-.js} +2516 -2314
  24. package/dist/zstd-dJuUp1fl.js +583 -0
  25. package/package.json +4 -4
  26. package/src/agentApi/index.d.ts +24 -0
  27. package/src/bookmark/databaseSchema.d.ts +11 -1
  28. package/src/charts/sampleAttributePlotTypes.d.ts +26 -1
  29. package/src/sampleView/sampleViewTypes.d.ts +2 -0
  30. package/src/sampleView/state/payloadTypes.d.ts +84 -0
  31. package/src/sampleView/types.d.ts +3 -0
  32. package/src/spec/sampleView.d.ts +58 -0
  33. package/dist/esm-BDFRLEuD.js +0 -1248
  34. package/dist/esm-BY4T8YoD.js +0 -142
  35. package/dist/esm-DJUb6vy0.js +0 -1015
  36. package/dist/esm-DPS6pYKF.js +0 -1248
  37. package/dist/esm-DRZ5LLNH.js +0 -142
  38. package/dist/esm-PDPkTR1_.js +0 -1015
  39. /package/dist/{parquetRead-BuEN-6yG.js → parquetRead-C33mgLEo.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { t as e } from "./esm-DPS6pYKF.js";
2
- import { n as t } from "./esm-BY4T8YoD.js";
1
+ import { t as e } from "./esm-BgpwI2cq.js";
2
+ import { n as t } from "./esm-C_XrKaCY.js";
3
3
  //#region ../core/node_modules/@gmod/indexedfasta/esm/indexedFasta.js
4
4
  function n(e, t, n, r) {
5
5
  return e + t * Math.floor(r / n) + r % n;
@@ -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
- import { n as e, r as t } from "./esm-DPS6pYKF.js";
1
+ import { n as e, r as t } from "./esm-BgpwI2cq.js";
2
2
  import { t as n } from "./esm-Bz_92nH0.js";
3
- import { n as r, r as i } from "./esm-BY4T8YoD.js";
3
+ import { n as r, r as i } from "./esm-C_XrKaCY.js";
4
4
  //#region ../../node_modules/@gmod/bam/esm/chunk.js
5
5
  var a = class {
6
6
  constructor(e, t, n, r) {