@genome-spy/app 0.73.0 → 0.74.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 (38) hide show
  1. package/dist/AbortablePromiseCache-3gHJdF3E.js +96 -0
  2. package/dist/blosc-oa0DlI6G.js +692 -0
  3. package/dist/browser-Dvlo92rx.js +126 -0
  4. package/dist/chunk-CPXzm0be.js +11 -0
  5. package/dist/chunk-INHXZS53-fPMmEwMt.js +13 -0
  6. package/dist/esm-B8-vSu-c.js +369 -0
  7. package/dist/esm-BDFRLEuD.js +1248 -0
  8. package/dist/esm-BygJiwh0.js +573 -0
  9. package/dist/esm-CGX-qz1d.js +155 -0
  10. package/dist/esm-Cmo4qEPr.js +1015 -0
  11. package/dist/esm-CuMSzCHy.js +298 -0
  12. package/dist/esm-D-WfYOx7.js +461 -0
  13. package/dist/esm-DCCYNvaz.js +1426 -0
  14. package/dist/esm-n0auOe11.js +121 -0
  15. package/dist/index.es.js +41039 -52718
  16. package/dist/index.js +1088 -1095
  17. package/dist/lz4-jZ0zyLBa.js +626 -0
  18. package/dist/parquetRead-CJe1UPsz.js +1609 -0
  19. package/dist/schema.json +8821 -2763
  20. package/dist/style.css +2 -1
  21. package/dist/zstd-C6ksIG9r.js +583 -0
  22. package/package.json +14 -5
  23. package/dist/AbortablePromiseCache-Dj0vzLnp.js +0 -149
  24. package/dist/blosc-D1xNXZJs.js +0 -719
  25. package/dist/browser-0iNU5Wit.js +0 -138
  26. package/dist/chunk-INHXZS53-DiyuLb3Z.js +0 -14
  27. package/dist/index-BUsSzlHg.js +0 -1771
  28. package/dist/index-BYsZN7b0.js +0 -1597
  29. package/dist/index-C7wOh6y1.js +0 -657
  30. package/dist/index-CRaQAuki.js +0 -326
  31. package/dist/index-D9v1PCj9.js +0 -507
  32. package/dist/index-GDOuv_D5.js +0 -266
  33. package/dist/index-Gt44EOIH.js +0 -628
  34. package/dist/inflate-GtwLkvSP.js +0 -1048
  35. package/dist/lz4-1Ws5oVWR.js +0 -640
  36. package/dist/parquetRead-BnAGCa4_.js +0 -1663
  37. package/dist/unzip-Bac01w6X.js +0 -1492
  38. package/dist/zstd-C4EcZnjq.js +0 -603
package/package.json CHANGED
@@ -8,12 +8,21 @@
8
8
  "contributors": [],
9
9
  "license": "MIT",
10
10
  "homepage": "https://genomespy.app/",
11
- "version": "0.73.0",
11
+ "version": "0.74.0",
12
12
  "main": "dist/index.js",
13
+ "module": "dist/index.es.js",
13
14
  "type": "module",
14
15
  "exports": {
15
- ".": "./dist/index.js",
16
- "./schema.json": "./dist/schema.json"
16
+ ".": {
17
+ "import": "./dist/index.es.js",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "./browser": {
21
+ "import": "./dist/index.es.js",
22
+ "default": "./dist/index.js"
23
+ },
24
+ "./schema.json": "./dist/schema.json",
25
+ "./style.css": "./dist/style.css"
17
26
  },
18
27
  "files": [
19
28
  "dist/"
@@ -39,7 +48,7 @@
39
48
  "@fortawesome/fontawesome-free": "^6.4.2",
40
49
  "@fortawesome/fontawesome-svg-core": "^6.4.2",
41
50
  "@fortawesome/free-solid-svg-icons": "^6.4.2",
42
- "@genome-spy/core": "^0.73.0",
51
+ "@genome-spy/core": "^0.74.0",
43
52
  "@reduxjs/toolkit": "^2.11.0",
44
53
  "d3-color": "^3.1.0",
45
54
  "idb": "^7.1.1",
@@ -50,5 +59,5 @@
50
59
  "redux-undo": "^1.0.1",
51
60
  "zarrita": "^0.6.1"
52
61
  },
53
- "gitHead": "925d6b740d4bbb3d28a8e6f4a869cfca60c58449"
62
+ "gitHead": "7648d8c8670e288486f20bd7fe73509c4844cd83"
54
63
  }
@@ -1,149 +0,0 @@
1
- class h {
2
- }
3
- class d {
4
- constructor() {
5
- this.signals = /* @__PURE__ */ new Set(), this.abortController = new AbortController();
6
- }
7
- /**
8
- * @param {AbortSignal} [signal] optional AbortSignal to add. if falsy,
9
- * will be treated as a null-signal, and this abortcontroller will no
10
- * longer be abortable.
11
- */
12
- //@ts-ignore
13
- addSignal(t = new h()) {
14
- if (this.signal.aborted)
15
- throw new Error("cannot add a signal, already aborted!");
16
- this.signals.add(t), t.aborted ? this.handleAborted(t) : typeof t.addEventListener == "function" && t.addEventListener("abort", () => {
17
- this.handleAborted(t);
18
- });
19
- }
20
- handleAborted(t) {
21
- this.signals.delete(t), this.signals.size === 0 && this.abortController.abort();
22
- }
23
- get signal() {
24
- return this.abortController.signal;
25
- }
26
- abort() {
27
- this.abortController.abort();
28
- }
29
- }
30
- class b {
31
- constructor() {
32
- this.callbacks = /* @__PURE__ */ new Set();
33
- }
34
- addCallback(t = () => {
35
- }) {
36
- this.callbacks.add(t), this.currentMessage && t(this.currentMessage);
37
- }
38
- callback(t) {
39
- this.currentMessage = t;
40
- for (const e of this.callbacks)
41
- e(t);
42
- }
43
- }
44
- class l {
45
- constructor({ fill: t, cache: e }) {
46
- if (typeof t != "function")
47
- throw new TypeError("must pass a fill function");
48
- if (typeof e != "object")
49
- throw new TypeError("must pass a cache object");
50
- if (typeof e.get != "function" || typeof e.set != "function" || typeof e.delete != "function")
51
- throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");
52
- this.cache = e, this.fillCallback = t;
53
- }
54
- static isAbortException(t) {
55
- return (
56
- // DOMException
57
- t.name === "AbortError" || // standard-ish non-DOM abort exception
58
- //@ts-ignore
59
- t.code === "ERR_ABORTED" || // stringified DOMException
60
- t.message === "AbortError: aborted" || // stringified standard-ish exception
61
- t.message === "Error: aborted"
62
- );
63
- }
64
- evict(t, e) {
65
- this.cache.get(t) === e && this.cache.delete(t);
66
- }
67
- fill(t, e, r, s) {
68
- const o = new d(), i = new b();
69
- i.addCallback(s);
70
- const a = {
71
- aborter: o,
72
- promise: this.fillCallback(e, o.signal, (n) => {
73
- i.callback(n);
74
- }),
75
- settled: !1,
76
- statusReporter: i,
77
- get aborted() {
78
- return this.aborter.signal.aborted;
79
- }
80
- };
81
- a.aborter.addSignal(r), a.aborter.signal.addEventListener("abort", () => {
82
- a.settled || this.evict(t, a);
83
- }), a.promise.then(() => {
84
- a.settled = !0;
85
- }, () => {
86
- a.settled = !0, this.evict(t, a);
87
- }).catch((n) => {
88
- throw console.error(n), n;
89
- }), this.cache.set(t, a);
90
- }
91
- static checkSinglePromise(t, e) {
92
- function r() {
93
- if (e?.aborted)
94
- throw Object.assign(new Error("aborted"), { code: "ERR_ABORTED" });
95
- }
96
- return t.then((s) => (r(), s), (s) => {
97
- throw r(), s;
98
- });
99
- }
100
- has(t) {
101
- return this.cache.has(t);
102
- }
103
- /**
104
- * Callback for getting status of the pending async
105
- *
106
- * @callback statusCallback
107
- * @param {any} status, current status string or message object
108
- */
109
- /**
110
- * @param {any} key cache key to use for this request
111
- * @param {any} data data passed as the first argument to the fill callback
112
- * @param {AbortSignal} [signal] optional AbortSignal object that aborts the request
113
- * @param {statusCallback} a callback to get the current status of a pending async operation
114
- */
115
- get(t, e, r, s) {
116
- if (!r && e instanceof AbortSignal)
117
- throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");
118
- const o = this.cache.get(t);
119
- return o ? o.aborted && !o.settled ? (this.evict(t, o), this.get(t, e, r, s)) : o.settled ? o.promise : (o.aborter.addSignal(r), o.statusReporter.addCallback(s), l.checkSinglePromise(o.promise, r)) : (this.fill(t, e, r, s), l.checkSinglePromise(
120
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
121
- this.cache.get(t).promise,
122
- r
123
- ));
124
- }
125
- /**
126
- * delete the given entry from the cache. if it exists and its fill request has
127
- * not yet settled, the fill will be signaled to abort.
128
- *
129
- * @param {any} key
130
- */
131
- delete(t) {
132
- const e = this.cache.get(t);
133
- e && (e.settled || e.aborter.abort(), this.cache.delete(t));
134
- }
135
- /**
136
- * Clear all requests from the cache. Aborts any that have not settled.
137
- * @returns {number} count of entries deleted
138
- */
139
- clear() {
140
- const t = this.cache.keys();
141
- let e = 0;
142
- for (let r = t.next(); !r.done; r = t.next())
143
- this.delete(r.value), e += 1;
144
- return e;
145
- }
146
- }
147
- export {
148
- l as A
149
- };