@genome-spy/core 0.64.0 → 0.65.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.
- package/dist/bundle/{index-CCJIjehY.js → AbortablePromiseCache-CcuMrnn7.js} +22 -91
- package/dist/bundle/browser-txUcLy2H.js +123 -0
- package/dist/bundle/index-BQpbYrv4.js +1712 -0
- package/dist/bundle/index-BhtHKLUo.js +73 -0
- package/dist/bundle/index-C0llXMqm.js +280 -0
- package/dist/bundle/index-CCe8rnZz.js +716 -0
- package/dist/bundle/index-CD7FLu9x.js +269 -0
- package/dist/bundle/{index-C08YCM2T.js → index-D-w7Mmt9.js} +246 -126
- package/dist/bundle/index-D74H8TTz.js +508 -0
- package/dist/bundle/index-DhcU-Gk-.js +1487 -0
- package/dist/bundle/index.es.js +4878 -4680
- package/dist/bundle/index.js +151 -167
- package/dist/bundle/inflate-DRgHi_KK.js +1050 -0
- package/dist/schema.json +9 -1
- package/dist/src/data/collector.d.ts +7 -2
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +13 -2
- package/dist/src/data/dataFlow.d.ts +20 -42
- package/dist/src/data/dataFlow.d.ts.map +1 -1
- package/dist/src/data/dataFlow.js +57 -80
- package/dist/src/data/dataFlow.test.js +35 -2
- package/dist/src/data/flowHandle.d.ts +15 -0
- package/dist/src/data/flowHandle.d.ts.map +1 -0
- package/dist/src/data/flowHandle.js +13 -0
- package/dist/src/data/flowInit.d.ts +85 -0
- package/dist/src/data/flowInit.d.ts.map +1 -0
- package/dist/src/data/flowInit.js +238 -0
- package/dist/src/data/flowInit.test.d.ts +2 -0
- package/dist/src/data/flowInit.test.d.ts.map +1 -0
- package/dist/src/data/flowInit.test.js +413 -0
- package/dist/src/data/flowOptimizer.d.ts +6 -4
- package/dist/src/data/flowOptimizer.d.ts.map +1 -1
- package/dist/src/data/flowOptimizer.js +29 -14
- package/dist/src/data/flowOptimizer.test.js +20 -15
- package/dist/src/data/sources/lazy/bamSource.js +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +1 -1
- package/dist/src/data/sources/lazy/gff3Source.d.ts +2 -6
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +4 -8
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +17 -17
- package/dist/src/data/sources/lazy/tabixSource.js +1 -1
- package/dist/src/genomeSpy.d.ts +1 -1
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +18 -61
- package/dist/src/marks/mark.d.ts +1 -0
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +22 -1
- package/dist/src/spec/sampleView.d.ts +3 -2
- package/dist/src/types/viewContext.d.ts +1 -1
- package/dist/src/view/axisResolution.d.ts +5 -0
- package/dist/src/view/axisResolution.d.ts.map +1 -1
- package/dist/src/view/axisResolution.js +16 -1
- package/dist/src/view/facetView.d.ts.map +1 -1
- package/dist/src/view/facetView.js +1 -0
- package/dist/src/view/flowBuilder.d.ts +2 -2
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +21 -4
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +13 -0
- package/dist/src/view/gridView/selectionRect.d.ts +8 -4
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +28 -3
- package/dist/src/view/gridView/selectionRect.test.d.ts +2 -0
- package/dist/src/view/gridView/selectionRect.test.d.ts.map +1 -0
- package/dist/src/view/gridView/selectionRect.test.js +87 -0
- package/dist/src/view/paramMediator.d.ts +2 -1
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +13 -1
- package/dist/src/view/paramMediator.test.js +22 -0
- package/dist/src/view/scaleResolution.d.ts +5 -0
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +10 -0
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +16 -4
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +58 -8
- package/dist/src/view/view.d.ts +17 -1
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +57 -1
- package/dist/src/view/viewDispose.test.d.ts +2 -0
- package/dist/src/view/viewDispose.test.d.ts.map +1 -0
- package/dist/src/view/viewDispose.test.js +110 -0
- package/dist/src/view/viewUtils.d.ts +4 -4
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +19 -15
- package/dist/src/view/viewUtils.test.d.ts +2 -0
- package/dist/src/view/viewUtils.test.d.ts.map +1 -0
- package/dist/src/view/viewUtils.test.js +87 -0
- package/package.json +10 -10
- package/dist/bundle/__vite-browser-external-C--ziKoh.js +0 -8
- package/dist/bundle/_commonjsHelpers-DjF3Plf2.js +0 -26
- package/dist/bundle/index-5ajWdKly.js +0 -1319
- package/dist/bundle/index-B03-Om4z.js +0 -274
- package/dist/bundle/index-BftNdA0O.js +0 -27
- package/dist/bundle/index-Bg7C4Xat.js +0 -2750
- package/dist/bundle/index-C3QR8Lv6.js +0 -2131
- package/dist/bundle/index-DTcHjAHp.js +0 -505
- package/dist/bundle/index-DnIkxb0L.js +0 -1025
- package/dist/bundle/index-Ww3TAo6_.js +0 -71
- package/dist/bundle/index-g8iXgW0W.js +0 -651
- package/dist/bundle/long-B-FASCSo.js +0 -2387
- package/dist/bundle/remoteFile-BuaqFGWk.js +0 -94
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { b as d } from "./index-BftNdA0O.js";
|
|
2
|
-
function u(n) {
|
|
3
|
-
return (typeof n == "object" && n !== null && "message" in n ? n.message : `${n}`).replace(/\.$/, "");
|
|
4
|
-
}
|
|
5
|
-
class $ {
|
|
6
|
-
async getBufferFromResponse(e) {
|
|
7
|
-
const t = await e.arrayBuffer();
|
|
8
|
-
return d.Buffer.from(t);
|
|
9
|
-
}
|
|
10
|
-
constructor(e, t = {}) {
|
|
11
|
-
this.baseOverrides = {}, this.url = e;
|
|
12
|
-
const r = t.fetch || globalThis.fetch.bind(globalThis);
|
|
13
|
-
if (!r)
|
|
14
|
-
throw new TypeError("no fetch function supplied, and none found in global environment");
|
|
15
|
-
t.overrides && (this.baseOverrides = t.overrides), this.fetchImplementation = r;
|
|
16
|
-
}
|
|
17
|
-
async fetch(e, t) {
|
|
18
|
-
let r;
|
|
19
|
-
try {
|
|
20
|
-
r = await this.fetchImplementation(e, t);
|
|
21
|
-
} catch (s) {
|
|
22
|
-
if (`${s}`.includes("Failed to fetch")) {
|
|
23
|
-
console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);
|
|
24
|
-
try {
|
|
25
|
-
r = await this.fetchImplementation(e, {
|
|
26
|
-
...t,
|
|
27
|
-
cache: "reload"
|
|
28
|
-
});
|
|
29
|
-
} catch (i) {
|
|
30
|
-
throw new Error(`${u(i)} fetching ${e}`, { cause: i });
|
|
31
|
-
}
|
|
32
|
-
} else
|
|
33
|
-
throw new Error(`${u(s)} fetching ${e}`, { cause: s });
|
|
34
|
-
}
|
|
35
|
-
return r;
|
|
36
|
-
}
|
|
37
|
-
async read(e, t = 0, r, s = 0, i = {}) {
|
|
38
|
-
const { headers: c = {}, signal: o, overrides: f = {} } = i;
|
|
39
|
-
r < 1 / 0 ? c.range = `bytes=${s}-${s + r}` : r === 1 / 0 && s !== 0 && (c.range = `bytes=${s}-`);
|
|
40
|
-
const a = await this.fetch(this.url, {
|
|
41
|
-
...this.baseOverrides,
|
|
42
|
-
...f,
|
|
43
|
-
headers: {
|
|
44
|
-
...c,
|
|
45
|
-
...f.headers,
|
|
46
|
-
...this.baseOverrides.headers
|
|
47
|
-
},
|
|
48
|
-
method: "GET",
|
|
49
|
-
redirect: "follow",
|
|
50
|
-
mode: "cors",
|
|
51
|
-
signal: o
|
|
52
|
-
});
|
|
53
|
-
if (!a.ok)
|
|
54
|
-
throw new Error(`HTTP ${a.status} fetching ${this.url}`);
|
|
55
|
-
if (a.status === 200 && s === 0 || a.status === 206) {
|
|
56
|
-
const l = await this.getBufferFromResponse(a), g = l.copy(e, t, 0, Math.min(r, l.length)), w = a.headers.get("content-range"), h = /\/(\d+)$/.exec(w || "");
|
|
57
|
-
return h != null && h[1] && (this._stat = { size: parseInt(h[1], 10) }), { bytesRead: g, buffer: e };
|
|
58
|
-
}
|
|
59
|
-
throw a.status === 200 ? new Error(`${this.url} fetch returned status 200, expected 206`) : new Error(`HTTP ${a.status} fetching ${this.url}`);
|
|
60
|
-
}
|
|
61
|
-
async readFile(e = {}) {
|
|
62
|
-
let t, r;
|
|
63
|
-
typeof e == "string" ? (t = e, r = {}) : (t = e.encoding, r = e, delete r.encoding);
|
|
64
|
-
const { headers: s = {}, signal: i, overrides: c = {} } = r, o = await this.fetch(this.url, {
|
|
65
|
-
headers: s,
|
|
66
|
-
method: "GET",
|
|
67
|
-
redirect: "follow",
|
|
68
|
-
mode: "cors",
|
|
69
|
-
signal: i,
|
|
70
|
-
...this.baseOverrides,
|
|
71
|
-
...c
|
|
72
|
-
});
|
|
73
|
-
if (o.status !== 200)
|
|
74
|
-
throw new Error(`HTTP ${o.status} fetching ${this.url}`);
|
|
75
|
-
if (t === "utf8")
|
|
76
|
-
return o.text();
|
|
77
|
-
if (t)
|
|
78
|
-
throw new Error(`unsupported encoding: ${t}`);
|
|
79
|
-
return this.getBufferFromResponse(o);
|
|
80
|
-
}
|
|
81
|
-
async stat() {
|
|
82
|
-
if (!this._stat) {
|
|
83
|
-
const e = d.Buffer.allocUnsafe(10);
|
|
84
|
-
if (await this.read(e, 0, 10, 0), !this._stat)
|
|
85
|
-
throw new Error(`unable to determine size of file at ${this.url}`);
|
|
86
|
-
}
|
|
87
|
-
return this._stat;
|
|
88
|
-
}
|
|
89
|
-
async close() {
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export {
|
|
93
|
-
$ as R
|
|
94
|
-
};
|