@genome-spy/app 0.57.0 → 0.58.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/app.css +1 -0
- package/dist/index-BftNdA0O.js +27 -0
- package/dist/index-C08YCM2T.js +539 -0
- package/dist/{index-C159nEYc.js → index-CCJIjehY.js} +89 -83
- package/dist/index-CalimFw3.js +2131 -0
- package/dist/index-DS2hvLgl.js +3425 -0
- package/dist/index-DTcHjAHp.js +505 -0
- package/dist/{index-CfEH2hsw.js → index-Dec7VcMU.js} +25 -25
- package/dist/index-DnIkxb0L.js +1025 -0
- package/dist/{index-Bg62fPK7.js → index-DwLfOHEk.js} +435 -465
- package/dist/{index-DhPRJZz0.js → index-Ww3TAo6_.js} +7 -7
- package/dist/{index-DutovjI-.js → index-vgGDWUPz.js} +2 -2
- package/dist/index.es.js +5398 -6589
- package/dist/index.js +400 -396
- package/dist/long-BviWyoZx.js +2387 -0
- package/dist/{remoteFile-DwSeXAZ0.js → remoteFile-BuaqFGWk.js} +1 -1
- package/package.json +3 -3
- package/dist/index-CubKalvr.js +0 -500
- package/dist/index-DNzxWHJt.js +0 -2136
- package/dist/index-DluFz_0j.js +0 -1042
- package/dist/index-Dpv0n-cZ.js +0 -3998
- package/dist/long-DM5IWGqg.js +0 -2375
- package/dist/style.css +0 -1
@@ -1,7 +1,7 @@
|
|
1
|
-
import { g as
|
2
|
-
class d {
|
3
|
-
}
|
1
|
+
import { g as u } from "./_commonjsHelpers-DjF3Plf2.js";
|
4
2
|
class f {
|
3
|
+
}
|
4
|
+
class b {
|
5
5
|
constructor() {
|
6
6
|
this.signals = /* @__PURE__ */ new Set(), this.abortController = new AbortController();
|
7
7
|
}
|
@@ -11,7 +11,7 @@ class f {
|
|
11
11
|
* longer be abortable.
|
12
12
|
*/
|
13
13
|
//@ts-ignore
|
14
|
-
addSignal(t = new
|
14
|
+
addSignal(t = new f()) {
|
15
15
|
if (this.signal.aborted)
|
16
16
|
throw new Error("cannot add a signal, already aborted!");
|
17
17
|
this.signals.add(t), t.aborted ? this.handleAborted(t) : typeof t.addEventListener == "function" && t.addEventListener("abort", () => {
|
@@ -28,7 +28,7 @@ class f {
|
|
28
28
|
this.abortController.abort();
|
29
29
|
}
|
30
30
|
}
|
31
|
-
class
|
31
|
+
class g {
|
32
32
|
constructor() {
|
33
33
|
this.callbacks = /* @__PURE__ */ new Set();
|
34
34
|
}
|
@@ -42,7 +42,7 @@ class u {
|
|
42
42
|
e(t);
|
43
43
|
}
|
44
44
|
}
|
45
|
-
class
|
45
|
+
class l {
|
46
46
|
constructor({ fill: t, cache: e }) {
|
47
47
|
if (typeof t != "function")
|
48
48
|
throw new TypeError("must pass a fill function");
|
@@ -65,13 +65,13 @@ class n {
|
|
65
65
|
evict(t, e) {
|
66
66
|
this.cache.get(t) === e && this.cache.delete(t);
|
67
67
|
}
|
68
|
-
fill(t, e, r,
|
69
|
-
const s = new
|
70
|
-
c.addCallback(
|
71
|
-
const
|
68
|
+
fill(t, e, r, i) {
|
69
|
+
const s = new b(), c = new g();
|
70
|
+
c.addCallback(i);
|
71
|
+
const a = {
|
72
72
|
aborter: s,
|
73
|
-
promise: this.fillCallback(e, s.signal, (
|
74
|
-
c.callback(
|
73
|
+
promise: this.fillCallback(e, s.signal, (h) => {
|
74
|
+
c.callback(h);
|
75
75
|
}),
|
76
76
|
settled: !1,
|
77
77
|
statusReporter: c,
|
@@ -79,23 +79,23 @@ class n {
|
|
79
79
|
return this.aborter.signal.aborted;
|
80
80
|
}
|
81
81
|
};
|
82
|
-
|
83
|
-
|
84
|
-
}),
|
85
|
-
|
82
|
+
a.aborter.addSignal(r), a.aborter.signal.addEventListener("abort", () => {
|
83
|
+
a.settled || this.evict(t, a);
|
84
|
+
}), a.promise.then(() => {
|
85
|
+
a.settled = !0;
|
86
86
|
}, () => {
|
87
|
-
|
88
|
-
}).catch((
|
89
|
-
throw console.error(
|
90
|
-
}), this.cache.set(t,
|
87
|
+
a.settled = !0, this.evict(t, a);
|
88
|
+
}).catch((h) => {
|
89
|
+
throw console.error(h), h;
|
90
|
+
}), this.cache.set(t, a);
|
91
91
|
}
|
92
92
|
static checkSinglePromise(t, e) {
|
93
93
|
function r() {
|
94
94
|
if (e != null && e.aborted)
|
95
95
|
throw Object.assign(new Error("aborted"), { code: "ERR_ABORTED" });
|
96
96
|
}
|
97
|
-
return t.then((
|
98
|
-
throw r(),
|
97
|
+
return t.then((i) => (r(), i), (i) => {
|
98
|
+
throw r(), i;
|
99
99
|
});
|
100
100
|
}
|
101
101
|
has(t) {
|
@@ -113,11 +113,11 @@ class n {
|
|
113
113
|
* @param {AbortSignal} [signal] optional AbortSignal object that aborts the request
|
114
114
|
* @param {statusCallback} a callback to get the current status of a pending async operation
|
115
115
|
*/
|
116
|
-
get(t, e, r,
|
116
|
+
get(t, e, r, i) {
|
117
117
|
if (!r && e instanceof AbortSignal)
|
118
118
|
throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");
|
119
119
|
const s = this.cache.get(t);
|
120
|
-
return s ? s.aborted && !s.settled ? (this.evict(t, s), this.get(t, e, r,
|
120
|
+
return s ? s.aborted && !s.settled ? (this.evict(t, s), this.get(t, e, r, i)) : s.settled ? s.promise : (s.aborter.addSignal(r), s.statusReporter.addCallback(i), l.checkSinglePromise(s.promise, r)) : (this.fill(t, e, r, i), l.checkSinglePromise(
|
121
121
|
//see https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-
|
122
122
|
this.cache.get(t).promise,
|
123
123
|
r
|
@@ -145,68 +145,74 @@ class n {
|
|
145
145
|
return e;
|
146
146
|
}
|
147
147
|
}
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
get(t) {
|
158
|
-
if (this.cache.has(t))
|
159
|
-
return this.cache.get(t);
|
160
|
-
if (this.oldCache.has(t)) {
|
161
|
-
const e = this.oldCache.get(t);
|
162
|
-
return this.oldCache.delete(t), this._set(t, e), e;
|
148
|
+
var n, d;
|
149
|
+
function p() {
|
150
|
+
if (d) return n;
|
151
|
+
d = 1;
|
152
|
+
class o {
|
153
|
+
constructor(e = {}) {
|
154
|
+
if (!(e.maxSize && e.maxSize > 0))
|
155
|
+
throw new TypeError("`maxSize` must be a number greater than 0");
|
156
|
+
this.maxSize = e.maxSize, this.cache = /* @__PURE__ */ new Map(), this.oldCache = /* @__PURE__ */ new Map(), this._size = 0;
|
163
157
|
}
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
158
|
+
_set(e, r) {
|
159
|
+
this.cache.set(e, r), this._size++, this._size >= this.maxSize && (this._size = 0, this.oldCache = this.cache, this.cache = /* @__PURE__ */ new Map());
|
160
|
+
}
|
161
|
+
get(e) {
|
162
|
+
if (this.cache.has(e))
|
163
|
+
return this.cache.get(e);
|
164
|
+
if (this.oldCache.has(e)) {
|
165
|
+
const r = this.oldCache.get(e);
|
166
|
+
return this.oldCache.delete(e), this._set(e, r), r;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
set(e, r) {
|
170
|
+
return this.cache.has(e) ? this.cache.set(e, r) : this._set(e, r), this;
|
171
|
+
}
|
172
|
+
has(e) {
|
173
|
+
return this.cache.has(e) || this.oldCache.has(e);
|
174
|
+
}
|
175
|
+
peek(e) {
|
176
|
+
if (this.cache.has(e))
|
177
|
+
return this.cache.get(e);
|
178
|
+
if (this.oldCache.has(e))
|
179
|
+
return this.oldCache.get(e);
|
180
|
+
}
|
181
|
+
delete(e) {
|
182
|
+
const r = this.cache.delete(e);
|
183
|
+
return r && this._size--, this.oldCache.delete(e) || r;
|
184
|
+
}
|
185
|
+
clear() {
|
186
|
+
this.cache.clear(), this.oldCache.clear(), this._size = 0;
|
187
|
+
}
|
188
|
+
*keys() {
|
189
|
+
for (const [e] of this)
|
190
|
+
yield e;
|
191
|
+
}
|
192
|
+
*values() {
|
193
|
+
for (const [, e] of this)
|
194
|
+
yield e;
|
195
|
+
}
|
196
|
+
*[Symbol.iterator]() {
|
197
|
+
for (const e of this.cache)
|
198
|
+
yield e;
|
199
|
+
for (const e of this.oldCache) {
|
200
|
+
const [r] = e;
|
201
|
+
this.cache.has(r) || (yield e);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
get size() {
|
205
|
+
let e = 0;
|
206
|
+
for (const r of this.oldCache.keys())
|
207
|
+
this.cache.has(r) || e++;
|
208
|
+
return this._size + e;
|
198
209
|
}
|
199
210
|
}
|
200
|
-
|
201
|
-
let t = 0;
|
202
|
-
for (const e of this.oldCache.keys())
|
203
|
-
this.cache.has(e) || t++;
|
204
|
-
return this._size + t;
|
205
|
-
}
|
211
|
+
return n = o, n;
|
206
212
|
}
|
207
|
-
var
|
208
|
-
const
|
213
|
+
var m = p();
|
214
|
+
const C = /* @__PURE__ */ u(m);
|
209
215
|
export {
|
210
|
-
|
211
|
-
|
216
|
+
l as A,
|
217
|
+
C as L
|
212
218
|
};
|