@genome-spy/app 0.89.0 → 0.90.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/{agentApi-BUcXm-JC.js → agentApi-Z65dw-sD.js} +2808 -2638
- package/dist/agentApi.es.js +1607 -1570
- package/dist/agentShared.es.js +737 -678
- package/dist/{canvas2d-CGuVGvQk.js → canvas2d-DiPQvNtZ.js} +11 -9
- package/dist/{canvas2d-DgF0kstG.js → canvas2d-t_N10CeW.js} +24 -22
- package/dist/{clipOptions-DBJX_W31.js → clipOptions-B5PibDq3.js} +890 -900
- package/dist/{clipOptions-8BPf0WMZ.js → clipOptions-Cba4I0AO.js} +544 -554
- package/dist/{componentStyles-FsNmIb22.js → componentStyles-DGtQXvwc.js} +17 -15
- package/dist/{debug-BEWbYuZD.js → debug-CVAlrcZt.js} +2 -2
- package/dist/{debug-DQj_7mFm.js → debug-DP4WzTNo.js} +2 -2
- package/dist/dialog.es.js +4 -3
- package/dist/esm-BiqrFjMh.js +443 -0
- package/dist/{esm-lwYrRdbg.js → esm-Bv7Frz7C.js} +142 -79
- package/dist/{esm-VvpZ9hsq.js → esm-C3A-AuRi.js} +1 -1
- package/dist/esm-CvpR1OcU.js +322 -0
- package/dist/esm-DFHFX1sH.js +1526 -0
- package/dist/esm-Dndm-NaA.js +1193 -0
- package/dist/{esm-CcDLRSvC.js → esm-DtNElqRr.js} +64 -63
- package/dist/esm-L53qjcYH.js +1155 -0
- package/dist/esm-VFJeyk9i.js +249 -0
- package/dist/{esm-BdLYkz-m.js → esm-_xCtpDwm.js} +1 -1
- package/dist/index.es.js +4203 -3910
- package/dist/index.js +900 -455
- package/dist/{indexer-D8Bgkkb8.js → indexer-DbFTKGlm.js} +1 -1
- package/dist/{indexer-Cdt_U05k.js → indexer-En7gpvLN.js} +1 -1
- package/dist/{lit-ByuJ0FJ4.js → lit-CoXp9NFX.js} +12 -10
- package/dist/{order-DIxlclRN.js → order-BkYCnwD7.js} +36 -30
- package/dist/{order-BPOzLe80.js → order-R043xTpC.js} +47 -41
- package/dist/{parquetRead-Cs2xRrvz.js → parquetRead-0hFIa3Cc.js} +532 -350
- package/dist/{rasterExport-Bl6w9t3J.js → rasterExport-C_FcNBkC.js} +8 -7
- package/dist/{rasterExport-DRvNAH-r.js → rasterExport-Z7gs5346.js} +8 -7
- package/dist/{rasterization-D0tOoKu_.js → rasterization-_-9JmSas.js} +3 -2
- package/dist/{renderCanvas2D-LdEYFnRo.js → renderCanvas2D-DK1c9TFK.js} +10 -10
- package/dist/{renderCanvas2D-Ct95auF3.js → renderCanvas2D-IM-A9DYG.js} +16 -16
- package/dist/schema.json +11 -0
- package/dist/{src-DjOlFqSn.js → src-DJtvThVC.js} +3 -5
- package/dist/style.css +1 -1
- package/dist/{svg-pkTPD4bv.js → svg-DW3tfUmm.js} +233 -232
- package/dist/{svg-Ag36-h_I.js → svg-PabUdcDi.js} +233 -232
- package/dist/{svgRasterizer-DrtJ9nLk.js → svgRasterizer-B6YtWLJs.js} +2 -2
- package/dist/{svgRasterizer-CksK4QTB.js → svgRasterizer-BEVDyyS3.js} +2 -2
- package/dist/{vega-scale-BWBFykuI.js → vega-scale-Byaw1K8O.js} +837 -726
- package/dist/{vega-scale-BJaDSHBJ.js → vega-scale-Ctz_wa3z.js} +942 -834
- package/dist/{viewIdentityRegistry-BvCJajXG.js → viewIdentityRegistry-BW415b3o.js} +1 -1
- package/dist/{viewIdentityRegistry-B-snqI3y.js → viewIdentityRegistry-_F0E7nkA.js} +1 -1
- package/dist/{viewSelectors-BlvzvG-z.js → viewSelectors-DYz-PhTO.js} +245 -243
- package/dist/{viewSelectors-C5q3qBiR.js → viewSelectors-KtD-QSN0.js} +106 -104
- package/dist/{viewUtils-C3vBtSvE.js → viewUtils-BZGPseMx.js} +1833 -1677
- package/dist/{webgl-CZX2pe5v.js → webgl-BKSGqHaz.js} +964 -951
- package/dist/{webgl-CexXSw_I.js → webgl-tdKf9SlZ.js} +239 -226
- package/package.json +5 -5
- package/dist/esm-80V4xF_D.js +0 -1098
- package/dist/esm-BA6yMcc-.js +0 -1222
- package/dist/esm-BdT7qUL-.js +0 -157
- package/dist/esm-CfYZhLHN.js +0 -1367
- package/dist/esm-D-iG_TIX.js +0 -441
- package/dist/esm-JAiZmFIS.js +0 -128
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
1
|
+
import { $t as e, Ot as t, St as n, Tt as r, V as i, an as a, b as o, cn as s, ft as c, gn as l, k as u, ln as d, o as f, pt as p, t as m, u as ee, un as te, wt as ne, xt as h } from "./clipOptions-Cba4I0AO.js";
|
|
2
|
+
import { a as g, n as re, r as ie, t as _ } from "./viewError-BiR9VCgL.js";
|
|
3
|
+
import { H as ae, m as oe, y as v } from "./vega-scale-Byaw1K8O.js";
|
|
4
|
+
import { t as se } from "./warning-CpIIpk8e.js";
|
|
5
5
|
//#region ../core/src/view/layout/flexLayout.js
|
|
6
|
-
function
|
|
6
|
+
function ce(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {}) {
|
|
7
7
|
n ||= 0, i ||= 0;
|
|
8
|
-
let o =
|
|
9
|
-
for (let t = 0; t < e.length; t++) s += o[t],
|
|
8
|
+
let o = ge(e, t, n), s = 0, c = 0;
|
|
9
|
+
for (let t = 0; t < e.length; t++) s += o[t], S(e[t]) || c++;
|
|
10
10
|
let l = s + Math.max(0, c - 1) * n, u = r === void 0 ? (e) => e : (e) => Math.round(e * r) / r, d = 0, f = [], p = (e) => {
|
|
11
11
|
let t = d;
|
|
12
12
|
if (!t) return;
|
|
@@ -18,13 +18,13 @@ function oe(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
|
|
|
18
18
|
});
|
|
19
19
|
m += r, d = 0;
|
|
20
20
|
}, m = a ? Math.max(t, l) : 0 + i;
|
|
21
|
-
if (e.length == 1 &&
|
|
21
|
+
if (e.length == 1 && S(e[0])) return [{
|
|
22
22
|
location: m,
|
|
23
23
|
size: 0
|
|
24
24
|
}];
|
|
25
25
|
for (let t = 0; t < e.length; t++) {
|
|
26
26
|
let r = e[t];
|
|
27
|
-
if (
|
|
27
|
+
if (S(r)) d++;
|
|
28
28
|
else {
|
|
29
29
|
p(f.length > 0);
|
|
30
30
|
let e = o[t];
|
|
@@ -36,34 +36,34 @@ function oe(e, t, { spacing: n, devicePixelRatio: r, offset: i, reverse: a } = {
|
|
|
36
36
|
}
|
|
37
37
|
return m += a ? n : -n, p(!1), f;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function le(e, { spacing: t } = { spacing: 0 }) {
|
|
40
40
|
let n = 0;
|
|
41
|
-
for (let r of e) n += E(r) + (
|
|
41
|
+
for (let r of e) n += E(r) + (S(r) ? 0 : t);
|
|
42
42
|
return Math.max(0, n - t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ue(e, t, { spacing: n = 0 } = {}) {
|
|
45
45
|
let r = [], i = [], a = 0, o = 0;
|
|
46
46
|
for (let [s, c] of e.entries()) {
|
|
47
|
-
let e = E(c), l = !
|
|
47
|
+
let e = E(c), l = !S(c), u = o && l ? n : 0;
|
|
48
48
|
i.length && a + u + e > t && (r.push(i), i = [], a = 0, o = 0), i.push(s), a += (o && l ? n : 0) + e, o += +!!l;
|
|
49
49
|
}
|
|
50
50
|
return i.length && r.push(i), r;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function de(e) {
|
|
53
53
|
let t = 0, n = 0, r = 0, i, a = !0;
|
|
54
54
|
for (let o of e) {
|
|
55
55
|
t = Math.max(t, o.px ?? 0), n = Math.max(n, o.grow ?? 0), r = Math.max(r, E(o));
|
|
56
56
|
let e = D(o);
|
|
57
57
|
e === void 0 ? a = !1 : i = i === void 0 ? e : Math.max(i, e);
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return O({
|
|
60
60
|
px: t,
|
|
61
61
|
grow: n,
|
|
62
62
|
minPx: r,
|
|
63
63
|
maxPx: a ? i : void 0
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function fe(e) {
|
|
67
67
|
let t = {
|
|
68
68
|
px: 0,
|
|
69
69
|
grow: 0,
|
|
@@ -71,13 +71,13 @@ function ue(e) {
|
|
|
71
71
|
maxPx: 0
|
|
72
72
|
}, n = !0;
|
|
73
73
|
for (let r of e) {
|
|
74
|
-
t.px +=
|
|
74
|
+
t.px += C(r.px), t.grow += C(r.grow), t.minPx += E(r);
|
|
75
75
|
let e = D(r);
|
|
76
76
|
e === void 0 ? n = !1 : t.maxPx += e;
|
|
77
77
|
}
|
|
78
|
-
return n || delete t.maxPx,
|
|
78
|
+
return n || delete t.maxPx, O(t);
|
|
79
79
|
}
|
|
80
|
-
var
|
|
80
|
+
var y = class e {
|
|
81
81
|
constructor(e, t) {
|
|
82
82
|
this.width = e, this.height = t;
|
|
83
83
|
}
|
|
@@ -88,31 +88,31 @@ var x = class e {
|
|
|
88
88
|
return this.#e(-e.width, -e.height);
|
|
89
89
|
}
|
|
90
90
|
#e(t, n) {
|
|
91
|
-
return new e(
|
|
91
|
+
return new e(ye(this.width, t), ye(this.height, n));
|
|
92
92
|
}
|
|
93
93
|
isGrowing() {
|
|
94
94
|
return !!(this.width.grow || this.height.grow);
|
|
95
95
|
}
|
|
96
|
-
},
|
|
96
|
+
}, b = Object.freeze({
|
|
97
97
|
px: 0,
|
|
98
98
|
grow: 0
|
|
99
|
-
}),
|
|
100
|
-
function
|
|
99
|
+
}), x = new y(b, b);
|
|
100
|
+
function S(e) {
|
|
101
101
|
return !e.px && !e.grow && !e.minPx;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function pe(e, t) {
|
|
104
104
|
return !e || !t ? !1 : e.px === t.px && e.grow === t.grow && e.minPx === t.minPx && e.maxPx === t.maxPx;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function C(e) {
|
|
107
107
|
return e || 0;
|
|
108
108
|
}
|
|
109
|
-
function pe(e) {
|
|
110
|
-
return e && (h(e.px) || h(e.grow) || h(e.minPx) || h(e.maxPx));
|
|
111
|
-
}
|
|
112
109
|
function me(e) {
|
|
110
|
+
return e && (s(e.px) || s(e.grow) || s(e.minPx) || s(e.maxPx));
|
|
111
|
+
}
|
|
112
|
+
function he(e) {
|
|
113
113
|
if (J(e)) throw Error("parseSizeDef does not accept step-based sizes.");
|
|
114
|
-
if (
|
|
115
|
-
if (
|
|
114
|
+
if (me(e)) return w(e), O(e);
|
|
115
|
+
if (s(e)) return {
|
|
116
116
|
px: e,
|
|
117
117
|
grow: 0
|
|
118
118
|
};
|
|
@@ -122,28 +122,28 @@ function me(e) {
|
|
|
122
122
|
};
|
|
123
123
|
throw Error(`Invalid sizeDef: ${e}`);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function ge(e, t, n) {
|
|
126
126
|
let r = !1;
|
|
127
|
-
for (let t of e)
|
|
128
|
-
if (!r) return
|
|
127
|
+
for (let t of e) w(t), r ||= ve(t);
|
|
128
|
+
if (!r) return _e(e, t, n);
|
|
129
129
|
let i = Array(e.length).fill(0), a = [];
|
|
130
|
-
for (let t = 0; t < e.length; t++)
|
|
130
|
+
for (let t = 0; t < e.length; t++) S(e[t]) || a.push(t);
|
|
131
131
|
let o = Math.max(0, a.length - 1) * n, s = Math.max(0, t - o), c = /* @__PURE__ */ new Set();
|
|
132
132
|
for (let t of a) {
|
|
133
133
|
let n = e[t];
|
|
134
|
-
|
|
134
|
+
C(n.grow) || (i[t] = T(C(n.px), n), c.add(t));
|
|
135
135
|
}
|
|
136
136
|
for (;;) {
|
|
137
137
|
let t = 0, n = 0, r = 0;
|
|
138
|
-
for (let o of a) c.has(o) ? r += i[o] : (t +=
|
|
138
|
+
for (let o of a) c.has(o) ? r += i[o] : (t += C(e[o].px), n += C(e[o].grow));
|
|
139
139
|
if (!n) {
|
|
140
|
-
for (let t of a) c.has(t) || (i[t] = T(
|
|
140
|
+
for (let t of a) c.has(t) || (i[t] = T(C(e[t].px), e[t]), c.add(t));
|
|
141
141
|
break;
|
|
142
142
|
}
|
|
143
143
|
let o = Math.max(0, s - r - t), l = 0, u = [], d = [];
|
|
144
144
|
for (let t of a) {
|
|
145
145
|
if (c.has(t)) continue;
|
|
146
|
-
let r = e[t], a =
|
|
146
|
+
let r = e[t], a = C(r.px) + C(r.grow) / n * o, s = T(a, r);
|
|
147
147
|
i[t] = s;
|
|
148
148
|
let f = s - a;
|
|
149
149
|
l += f, f > 0 ? u.push(t) : f < 0 && d.push(t);
|
|
@@ -155,47 +155,47 @@ function he(e, t, n) {
|
|
|
155
155
|
}
|
|
156
156
|
return i;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function _e(e, t, n) {
|
|
159
159
|
let r = 0, i = 0;
|
|
160
|
-
for (let t of e) r +=
|
|
160
|
+
for (let t of e) r += C(t.px) + (S(t) ? 0 : n), i += C(t.grow);
|
|
161
161
|
r -= n;
|
|
162
162
|
let a = Math.max(0, t - r), o = Array(e.length);
|
|
163
163
|
for (let t = 0; t < e.length; t++) {
|
|
164
164
|
let n = e[t];
|
|
165
|
-
o[t] =
|
|
165
|
+
o[t] = S(n) ? 0 : C(n.px) + (i ? C(n.grow) / i * a : 0);
|
|
166
166
|
}
|
|
167
167
|
return o;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function w(e) {
|
|
170
170
|
if (e.minPx !== void 0 && e.maxPx !== void 0 && e.minPx > e.maxPx) throw Error("SizeDef minPx cannot be greater than maxPx.");
|
|
171
171
|
}
|
|
172
172
|
function T(e, t) {
|
|
173
173
|
return Math.min(Math.max(e, t.minPx ?? 0), t.maxPx ?? Infinity);
|
|
174
174
|
}
|
|
175
175
|
function E(e) {
|
|
176
|
-
return T(
|
|
176
|
+
return T(C(e.px), e);
|
|
177
177
|
}
|
|
178
178
|
function D(e) {
|
|
179
|
-
return e.maxPx ?? (
|
|
179
|
+
return e.maxPx ?? (C(e.grow) ? void 0 : E(e));
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ve(e) {
|
|
182
182
|
return e.minPx !== void 0 || e.maxPx !== void 0;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return
|
|
184
|
+
function ye(e, t) {
|
|
185
|
+
return O({
|
|
186
186
|
px: (e.px ?? 0) + t,
|
|
187
187
|
grow: e.grow,
|
|
188
188
|
minPx: e.minPx === void 0 ? void 0 : Math.max(0, e.minPx + t),
|
|
189
189
|
maxPx: e.maxPx === void 0 ? void 0 : Math.max(0, e.maxPx + t)
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i =
|
|
194
|
-
return e.px ? t.px = e.px : e.px === 0 && (t.px = 0), e.grow ? t.grow = e.grow : e.grow === 0 ? t.grow = 0 : !n && !r && i && (t.grow = 1), e.minPx && e.minPx >
|
|
192
|
+
function O(e) {
|
|
193
|
+
let t = {}, n = e.px !== void 0, r = e.grow !== void 0, i = ve(e);
|
|
194
|
+
return e.px ? t.px = e.px : e.px === 0 && (t.px = 0), e.grow ? t.grow = e.grow : e.grow === 0 ? t.grow = 0 : !n && !r && i && (t.grow = 1), e.minPx && e.minPx > C(e.px) && (t.minPx = e.minPx), e.maxPx !== void 0 && (C(t.grow) || e.maxPx < C(e.px)) && (t.maxPx = e.maxPx), t;
|
|
195
195
|
}
|
|
196
196
|
//#endregion
|
|
197
197
|
//#region ../core/src/view/layout/padding.js
|
|
198
|
-
var
|
|
198
|
+
var k = class e {
|
|
199
199
|
constructor(e, t, n, r) {
|
|
200
200
|
this.top = e || 0, this.right = t || 0, this.bottom = n || 0, this.left = r || 0;
|
|
201
201
|
}
|
|
@@ -230,56 +230,57 @@ var j = class e {
|
|
|
230
230
|
return this.top + this.bottom;
|
|
231
231
|
}
|
|
232
232
|
static createFromConfig(e) {
|
|
233
|
-
return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) :
|
|
233
|
+
return typeof e == "number" ? this.createUniformPadding(e) : e ? this.createFromRecord(e) : A;
|
|
234
234
|
}
|
|
235
235
|
static createFromRecord(t) {
|
|
236
236
|
return new e(t.top, t.right, t.bottom, t.left);
|
|
237
237
|
}
|
|
238
238
|
static zero() {
|
|
239
|
-
return
|
|
239
|
+
return A;
|
|
240
240
|
}
|
|
241
241
|
static createUniformPadding(t) {
|
|
242
242
|
return new e(t, t, t, t);
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
|
-
function
|
|
246
|
-
return t ? new
|
|
245
|
+
function be(e, t) {
|
|
246
|
+
return t ? new k(t.top === !1 ? 0 : e.top, t.right === !1 ? 0 : e.right, t.bottom === !1 ? 0 : e.bottom, t.left === !1 ? 0 : e.left) : e;
|
|
247
247
|
}
|
|
248
|
-
var
|
|
249
|
-
Object.freeze(
|
|
248
|
+
var A = k.createUniformPadding(0);
|
|
249
|
+
Object.freeze(A);
|
|
250
250
|
//#endregion
|
|
251
251
|
//#region ../core/src/utils/url.js
|
|
252
|
-
var
|
|
253
|
-
function
|
|
254
|
-
if (t &&
|
|
252
|
+
var xe = /^([A-Za-z]+:)?\/\//;
|
|
253
|
+
function j(e, t) {
|
|
254
|
+
if (t && xe.test(t)) return t;
|
|
255
255
|
let n = typeof e == "function" ? e() : e;
|
|
256
256
|
if (!n) return t;
|
|
257
257
|
if (!t) return n;
|
|
258
258
|
if (/[#?]/.test(n)) throw Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);
|
|
259
|
-
return
|
|
259
|
+
return M(n) + t;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Se(e, t, n = Ce()) {
|
|
262
262
|
let r = typeof e == "function" ? e() : e;
|
|
263
263
|
if (!t) return r;
|
|
264
264
|
try {
|
|
265
265
|
if (r) {
|
|
266
266
|
let e = n ? new URL(r, n).href : new URL(r).href;
|
|
267
267
|
return new URL(t, e).href;
|
|
268
|
-
}
|
|
268
|
+
}
|
|
269
|
+
if (n) return new URL(t, n).href;
|
|
269
270
|
} catch {}
|
|
270
|
-
return
|
|
271
|
+
return j(r, t);
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
+
function M(e) {
|
|
273
274
|
let t = e.replace(/[^/]*$/, "");
|
|
274
275
|
return t === "" ? void 0 : t.endsWith("://") ? e + "/" : t;
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
+
function Ce() {
|
|
277
278
|
if (typeof document < "u" && document.baseURI) return document.baseURI;
|
|
278
279
|
if (typeof window < "u" && window.location?.href) return window.location.href;
|
|
279
280
|
}
|
|
280
281
|
//#endregion
|
|
281
282
|
//#region ../../node_modules/flatqueue/index.js
|
|
282
|
-
var
|
|
283
|
+
var N = class {
|
|
283
284
|
constructor(e = Infinity, t = Float64Array, n = Uint32Array) {
|
|
284
285
|
let r = e !== Infinity;
|
|
285
286
|
this.ids = r ? new n(e) : [], this.values = r ? new t(e) : [], this.capacity = e, this.length = 0;
|
|
@@ -303,7 +304,7 @@ var F = class {
|
|
|
303
304
|
if (r > 0) {
|
|
304
305
|
let n = e[r], i = t[r], a = 0, o = r >> 1;
|
|
305
306
|
for (; a < o;) {
|
|
306
|
-
let n = (a << 1) + 1, o = n + 1, s = n + (o < r &
|
|
307
|
+
let n = (a << 1) + 1, o = n + 1, s = n + (+(o < r) & t[o] < t[n]);
|
|
307
308
|
if (t[s] >= i) break;
|
|
308
309
|
e[a] = e[s], t[a] = t[s], a = s;
|
|
309
310
|
}
|
|
@@ -320,11 +321,11 @@ var F = class {
|
|
|
320
321
|
shrink() {
|
|
321
322
|
Array.isArray(this.ids) && (this.ids.length = this.length), Array.isArray(this.values) && (this.values.length = this.length);
|
|
322
323
|
}
|
|
323
|
-
},
|
|
324
|
-
function
|
|
324
|
+
}, P = Symbol("runtimeNode"), F = 1e6;
|
|
325
|
+
function we(e) {
|
|
325
326
|
return e ? (t, n) => e.addDisposer(t, n) : () => () => void 0;
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
+
function I(e, t, n = !0) {
|
|
328
329
|
let r = {
|
|
329
330
|
id: e.id,
|
|
330
331
|
name: e.name,
|
|
@@ -339,7 +340,7 @@ function we(e, t, n = !0) {
|
|
|
339
340
|
};
|
|
340
341
|
}
|
|
341
342
|
};
|
|
342
|
-
return Object.defineProperty(r,
|
|
343
|
+
return Object.defineProperty(r, P, {
|
|
343
344
|
enumerable: !1,
|
|
344
345
|
configurable: !1,
|
|
345
346
|
writable: !1,
|
|
@@ -349,7 +350,7 @@ function we(e, t, n = !0) {
|
|
|
349
350
|
} }) : r;
|
|
350
351
|
}
|
|
351
352
|
function Te(e) {
|
|
352
|
-
let t = e[
|
|
353
|
+
let t = e[P];
|
|
353
354
|
if (!t) throw Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");
|
|
354
355
|
return t;
|
|
355
356
|
}
|
|
@@ -373,12 +374,12 @@ var Oe = class {
|
|
|
373
374
|
#u = /* @__PURE__ */ new Map();
|
|
374
375
|
#d = /* @__PURE__ */ new Set();
|
|
375
376
|
#f = /* @__PURE__ */ new Set();
|
|
376
|
-
#p = new
|
|
377
|
-
#m = new
|
|
377
|
+
#p = new N();
|
|
378
|
+
#m = new N();
|
|
378
379
|
#h = /* @__PURE__ */ new Set();
|
|
379
380
|
#g;
|
|
380
381
|
constructor(e = {}) {
|
|
381
|
-
this.#g =
|
|
382
|
+
this.#g = we(e.lifecycleRegistry);
|
|
382
383
|
}
|
|
383
384
|
createWritable(e, t, n, r, i = {}) {
|
|
384
385
|
let a = "n" + this.#e++, o = i.notify ?? !0, s = {
|
|
@@ -400,7 +401,7 @@ var Oe = class {
|
|
|
400
401
|
}, l = () => {
|
|
401
402
|
s.disposed = !0, s.listeners.clear(), u();
|
|
402
403
|
}, u = this.#g(e, l);
|
|
403
|
-
return Object.assign(
|
|
404
|
+
return Object.assign(I(s, c, o), { dispose: l });
|
|
404
405
|
}
|
|
405
406
|
computed(e, t, n, r, i = {}) {
|
|
406
407
|
return this.#_(e, t, n, r, i);
|
|
@@ -435,12 +436,12 @@ var Oe = class {
|
|
|
435
436
|
})), l = c(), u = () => {
|
|
436
437
|
s.disposed || (s.disposed = !0, d(), l.forEach((e) => e()), s.listeners.clear(), this.#d.delete(s));
|
|
437
438
|
}, d = this.#g(e, u);
|
|
438
|
-
return Object.assign(
|
|
439
|
+
return Object.assign(I(s), {
|
|
439
440
|
dispose: u,
|
|
440
441
|
rebind: (e, n) => {
|
|
441
442
|
if (s.disposed) throw Error("Cannot rebind disposed operation: " + t);
|
|
442
443
|
let r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
443
|
-
let n = e[
|
|
444
|
+
let n = e[P];
|
|
444
445
|
if (n === s) throw Error("Reactive dependency cycle: " + t);
|
|
445
446
|
if (!r.has(n)) {
|
|
446
447
|
r.add(n);
|
|
@@ -589,8 +590,8 @@ var Oe = class {
|
|
|
589
590
|
this.#f.add(e), this.#m.push(e, this.#C(e.rank)), this.#w();
|
|
590
591
|
}
|
|
591
592
|
#C(e) {
|
|
592
|
-
let t = this.#t %
|
|
593
|
-
return this.#t += 1, e *
|
|
593
|
+
let t = this.#t % F;
|
|
594
|
+
return this.#t += 1, e * F + t;
|
|
594
595
|
}
|
|
595
596
|
#w() {
|
|
596
597
|
this.#r > 0 || this.#a || this.#o || (this.#a = !0, queueMicrotask(() => {
|
|
@@ -658,50 +659,50 @@ var Oe = class {
|
|
|
658
659
|
if (!t) throw Error("Unknown scope: " + e);
|
|
659
660
|
t.params.clear(), t.initializers.clear();
|
|
660
661
|
}
|
|
661
|
-
registerInitializer(e,
|
|
662
|
-
|
|
663
|
-
let
|
|
664
|
-
if (!
|
|
665
|
-
if (
|
|
666
|
-
|
|
667
|
-
initialize:
|
|
662
|
+
registerInitializer(e, n, r) {
|
|
663
|
+
t(n);
|
|
664
|
+
let i = this.#t.get(e);
|
|
665
|
+
if (!i) throw Error("Unknown scope: " + e);
|
|
666
|
+
if (i.params.has(n) || i.initializers.has(n)) throw Error(`Parameter "${n}" already exists in scope ${e}`);
|
|
667
|
+
i.initializers.set(n, {
|
|
668
|
+
initialize: r,
|
|
668
669
|
initializing: !1
|
|
669
670
|
});
|
|
670
671
|
}
|
|
671
|
-
register(e,
|
|
672
|
-
|
|
673
|
-
let
|
|
674
|
-
if (!
|
|
675
|
-
if (
|
|
676
|
-
return
|
|
677
|
-
}
|
|
678
|
-
resolve(e,
|
|
679
|
-
|
|
680
|
-
let
|
|
681
|
-
for (;
|
|
682
|
-
let e = this.#t.get(
|
|
683
|
-
if (!e) throw Error("Unknown scope: " +
|
|
684
|
-
let
|
|
685
|
-
if (
|
|
686
|
-
if (
|
|
687
|
-
|
|
672
|
+
register(e, n, r) {
|
|
673
|
+
t(n);
|
|
674
|
+
let i = this.#t.get(e);
|
|
675
|
+
if (!i) throw Error("Unknown scope: " + e);
|
|
676
|
+
if (i.params.has(n) || i.initializers.get(n)?.initializing === !1) throw Error("Parameter \"" + n + "\" already exists in scope " + e);
|
|
677
|
+
return i.params.set(n, r), r;
|
|
678
|
+
}
|
|
679
|
+
resolve(e, n) {
|
|
680
|
+
t(n);
|
|
681
|
+
let r = e;
|
|
682
|
+
for (; r;) {
|
|
683
|
+
let e = this.#t.get(r);
|
|
684
|
+
if (!e) throw Error("Unknown scope: " + r);
|
|
685
|
+
let t = e.initializers.get(n);
|
|
686
|
+
if (t) {
|
|
687
|
+
if (t.initializing) throw Error(`Parameter dependency cycle while initializing "${n}" in ${r}.`);
|
|
688
|
+
t.initializing = !0;
|
|
688
689
|
try {
|
|
689
|
-
if (
|
|
690
|
-
e.initializers.delete(
|
|
690
|
+
if (t.initialize(), !e.params.has(n)) throw Error(`Initializer did not register parameter "${n}".`);
|
|
691
|
+
e.initializers.delete(n);
|
|
691
692
|
} finally {
|
|
692
|
-
|
|
693
|
+
t.initializing = !1;
|
|
693
694
|
}
|
|
694
695
|
}
|
|
695
|
-
let i = e.params.get(
|
|
696
|
+
let i = e.params.get(n);
|
|
696
697
|
if (i) return i;
|
|
697
|
-
|
|
698
|
+
r = e.parentScope;
|
|
698
699
|
}
|
|
699
700
|
}
|
|
700
701
|
};
|
|
701
702
|
//#endregion
|
|
702
703
|
//#region ../core/src/paramRuntime/expressionCompiler.js
|
|
703
704
|
function je(e, t = {}, n = {}) {
|
|
704
|
-
return
|
|
705
|
+
return p(e, t, n);
|
|
705
706
|
}
|
|
706
707
|
//#endregion
|
|
707
708
|
//#region ../core/src/paramRuntime/expressionRef.js
|
|
@@ -940,28 +941,28 @@ var Be = class {
|
|
|
940
941
|
}
|
|
941
942
|
#g(e) {
|
|
942
943
|
if (!("select" in e)) return;
|
|
943
|
-
let t =
|
|
944
|
+
let t = i(e.select), n = t.type === "interval" ? "interval" : t.toggle ? "multi" : "single", r = t.type === "interval" ? Array.from(new Set(t.encodings)).sort() : [], a = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, o = {
|
|
944
945
|
kind: n,
|
|
945
946
|
components: r,
|
|
946
947
|
source: this.#s
|
|
947
|
-
}, s =
|
|
948
|
+
}, s = a.#c.get(e.name) ?? /* @__PURE__ */ new Set(), c = s.values().next().value;
|
|
948
949
|
if (c && (c.kind !== n || JSON.stringify(c.components) !== JSON.stringify(r))) throw Error(`Conflicting selection declarations for "${e.name}" in "${c.source?.name ?? e.name}" and "${this.#s?.name ?? e.name}".`);
|
|
949
|
-
s.add(o),
|
|
950
|
+
s.add(o), a.#c.set(e.name, s), this.#e.addScopeDisposer(this.#t, () => {
|
|
950
951
|
s.delete(o);
|
|
951
952
|
});
|
|
952
953
|
}
|
|
953
954
|
get #_() {
|
|
954
955
|
return { resolveScaleResolution: this.#f };
|
|
955
956
|
}
|
|
956
|
-
registerParam(e,
|
|
957
|
-
let
|
|
958
|
-
if (
|
|
959
|
-
if (He(e),
|
|
957
|
+
registerParam(e, n = {}) {
|
|
958
|
+
let r = e.name;
|
|
959
|
+
if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
|
|
960
|
+
if (He(e), n.defer) {
|
|
960
961
|
if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
|
|
961
|
-
return this.#e.registerInitializer(this.#t,
|
|
962
|
+
return this.#e.registerInitializer(this.#t, r, () => {
|
|
962
963
|
this.#v(e);
|
|
963
|
-
}), this.#i.set(
|
|
964
|
-
throw Error("Cannot set derived parameter \"" +
|
|
964
|
+
}), this.#i.set(r, e), () => {
|
|
965
|
+
throw Error("Cannot set derived parameter \"" + r + "\".");
|
|
965
966
|
};
|
|
966
967
|
}
|
|
967
968
|
return this.#v(e);
|
|
@@ -988,17 +989,17 @@ var Be = class {
|
|
|
988
989
|
});
|
|
989
990
|
}
|
|
990
991
|
#v(e) {
|
|
991
|
-
let t = e.name, n,
|
|
992
|
+
let t = e.name, n, r;
|
|
992
993
|
if (e.push == "outer") {
|
|
993
|
-
let
|
|
994
|
-
if (!
|
|
995
|
-
let
|
|
996
|
-
if (!
|
|
997
|
-
if ("expr" in
|
|
994
|
+
let i = this.findRuntimeForParam(t);
|
|
995
|
+
if (!i) throw Error(`Parameter "${t}" not found in outer scope!`);
|
|
996
|
+
let a = i.paramConfigs.get(t);
|
|
997
|
+
if (!a) throw Error(`Outer parameter "${t}" exists as a value but has no registered config.`);
|
|
998
|
+
if ("expr" in a || "select" in a || "ruler" in a) throw Error(`The outer parameter "${t}" must not have expr, select, or ruler properties!`);
|
|
998
999
|
n = (e) => {
|
|
999
|
-
|
|
1000
|
-
}, this.#n.set(t, n), "ruler" in e && (
|
|
1001
|
-
} else if ("value" in e)
|
|
1000
|
+
i.setValue(t, e);
|
|
1001
|
+
}, this.#n.set(t, n), "ruler" in e && (r = h(e, this), n(r));
|
|
1002
|
+
} else if ("value" in e) r = h(e, this), n = "transition" in e ? this.#b(t, r, e.transition) : this.#y(t, r);
|
|
1002
1003
|
else if ("expr" in e) {
|
|
1003
1004
|
if ("transition" in e) this.#x(t, e.expr, e.transition);
|
|
1004
1005
|
else if ("debounce" in e) this.#S(t, e.expr, e.debounce);
|
|
@@ -1009,43 +1010,43 @@ var Be = class {
|
|
|
1009
1010
|
n = () => {
|
|
1010
1011
|
throw Error("Cannot set derived parameter \"" + t + "\".");
|
|
1011
1012
|
};
|
|
1012
|
-
} else
|
|
1013
|
+
} else r = h(e, this), n = this.#y(t, r);
|
|
1013
1014
|
if ("select" in e) {
|
|
1014
|
-
if (
|
|
1015
|
-
let e = this.#e.registerSelection(this.#t, t,
|
|
1015
|
+
if (r ??= h(e, this), !this.#n.has(t)) {
|
|
1016
|
+
let e = this.#e.registerSelection(this.#t, t, r);
|
|
1016
1017
|
this.#r.set(t, e), this.#n.set(t, (t) => {
|
|
1017
1018
|
e.set(t), this.#e.flushNow();
|
|
1018
1019
|
}), n = this.#n.get(t);
|
|
1019
1020
|
}
|
|
1020
|
-
n(
|
|
1021
|
+
n(r);
|
|
1021
1022
|
}
|
|
1022
1023
|
return this.#i.set(t, e), this.#g(e), n;
|
|
1023
1024
|
}
|
|
1024
|
-
allocateSetter(e,
|
|
1025
|
-
if (
|
|
1026
|
-
let
|
|
1027
|
-
this.#r.set(e,
|
|
1028
|
-
let
|
|
1029
|
-
|
|
1025
|
+
allocateSetter(e, n, r = !1) {
|
|
1026
|
+
if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
|
|
1027
|
+
let i = this.#e.registerBase(this.#t, e, n, { notify: !r });
|
|
1028
|
+
this.#r.set(e, i);
|
|
1029
|
+
let a = (e) => {
|
|
1030
|
+
i.set(e), this.#e.flushNow();
|
|
1030
1031
|
};
|
|
1031
|
-
return this.#n.set(e,
|
|
1032
|
+
return this.#n.set(e, a), a;
|
|
1032
1033
|
}
|
|
1033
|
-
setValue(e,
|
|
1034
|
-
|
|
1035
|
-
let
|
|
1036
|
-
if (!
|
|
1037
|
-
|
|
1034
|
+
setValue(e, n, r) {
|
|
1035
|
+
t(e);
|
|
1036
|
+
let i = this.#n.get(e);
|
|
1037
|
+
if (!i) throw Error("Writable parameter not found in this scope: " + e);
|
|
1038
|
+
i(n, r);
|
|
1038
1039
|
}
|
|
1039
1040
|
getValue(e) {
|
|
1040
1041
|
return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
|
|
1041
1042
|
}
|
|
1042
1043
|
getParamRef(e) {
|
|
1043
|
-
|
|
1044
|
-
let
|
|
1045
|
-
if (
|
|
1044
|
+
t(e);
|
|
1045
|
+
let n = this.findRuntimeForParam(e);
|
|
1046
|
+
if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
|
|
1046
1047
|
}
|
|
1047
1048
|
getTargetValue(e) {
|
|
1048
|
-
return
|
|
1049
|
+
return t(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
|
|
1049
1050
|
}
|
|
1050
1051
|
subscribe(e, t) {
|
|
1051
1052
|
let n = this.getParamRef(e);
|
|
@@ -1062,16 +1063,16 @@ var Be = class {
|
|
|
1062
1063
|
return this.#i;
|
|
1063
1064
|
}
|
|
1064
1065
|
hasLocalParam(e) {
|
|
1065
|
-
|
|
1066
|
-
let
|
|
1067
|
-
return this.#r.has(e) || this.#a.has(e) ||
|
|
1066
|
+
t(e);
|
|
1067
|
+
let n = this.#i.get(e);
|
|
1068
|
+
return this.#r.has(e) || this.#a.has(e) || n !== void 0 && "expr" in n;
|
|
1068
1069
|
}
|
|
1069
1070
|
isPendingParam(e) {
|
|
1070
1071
|
let t = this.findRuntimeForParam(e);
|
|
1071
1072
|
return t !== void 0 && !t.#r.has(e);
|
|
1072
1073
|
}
|
|
1073
1074
|
hasConfiguredParamInScopeChain(e) {
|
|
1074
|
-
return
|
|
1075
|
+
return t(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
|
|
1075
1076
|
}
|
|
1076
1077
|
findRuntimeForParam(e) {
|
|
1077
1078
|
return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
|
|
@@ -1218,7 +1219,7 @@ var Be = class {
|
|
|
1218
1219
|
this.#h || (this.#h = !0, this.#e.disposeScope(this.#t), this.#n.clear(), this.#r.clear(), this.#i.clear(), this.#a.clear(), this.#o.clear(), this.#l.clear(), this.#u.clear());
|
|
1219
1220
|
}
|
|
1220
1221
|
hasPointSelections() {
|
|
1221
|
-
for (let e of this.#i.values()) if (
|
|
1222
|
+
for (let e of this.#i.values()) if (ne(e)) {
|
|
1222
1223
|
let t = e.select;
|
|
1223
1224
|
if (te(t)) {
|
|
1224
1225
|
if (t == "point") return !0;
|
|
@@ -1265,7 +1266,7 @@ function Ge(e) {
|
|
|
1265
1266
|
//#endregion
|
|
1266
1267
|
//#region ../core/src/config/mergeConfig.js
|
|
1267
1268
|
function L(e) {
|
|
1268
|
-
return
|
|
1269
|
+
return d(e) && !Array.isArray(e);
|
|
1269
1270
|
}
|
|
1270
1271
|
function Ke(e) {
|
|
1271
1272
|
let t = {};
|
|
@@ -1405,7 +1406,7 @@ var Ze = class {
|
|
|
1405
1406
|
#f = [];
|
|
1406
1407
|
#p = "none";
|
|
1407
1408
|
#m = /* @__PURE__ */ new Map();
|
|
1408
|
-
facetCoords = new
|
|
1409
|
+
facetCoords = new e([], JSON.stringify);
|
|
1409
1410
|
constructor(e, t, n, r, i, a = {}) {
|
|
1410
1411
|
if (!e) throw Error("View spec must be defined!");
|
|
1411
1412
|
if (this.context = t, this.layoutParent = n, this.dataParent = r, this.#t = i, this.spec = e, this.namedDataScope = new Qe(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
|
|
@@ -1414,14 +1415,14 @@ var Ze = class {
|
|
|
1414
1415
|
scale: {},
|
|
1415
1416
|
axis: {},
|
|
1416
1417
|
legend: {}
|
|
1417
|
-
},
|
|
1418
|
+
}, ie(this), this.options = {
|
|
1418
1419
|
inheritEncoding: !1,
|
|
1419
1420
|
layoutSizeParams: "own",
|
|
1420
1421
|
...a
|
|
1421
1422
|
}, this.flowHandle = void 0, this.needsAxes = {
|
|
1422
1423
|
x: !1,
|
|
1423
1424
|
y: !1
|
|
1424
|
-
}, this.paramRuntime = new Be(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { settleTemporalUpdatesImmediately: !0 }), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () =>
|
|
1425
|
+
}, this.paramRuntime = new Be(() => this.dataParent?.paramRuntime, (e) => this.getScaleResolution(e), t.animator, { settleTemporalUpdatesImmediately: !0 }), this.paramRuntime.setSelectionSource(this), "mark" in e && this.paramRuntime.registerLazyExpression("zoomLevel", "zoomLevel()", () => se("The automatic zoomLevel parameter is deprecated. Use zoomLevel() or an explicit channel such as zoomLevel(\"x\") instead."));
|
|
1425
1426
|
let l = [...e.params ?? [], ...Xe(e) ?? []];
|
|
1426
1427
|
for (let e of l) {
|
|
1427
1428
|
if ("expr" in e) {
|
|
@@ -1458,11 +1459,11 @@ var Ze = class {
|
|
|
1458
1459
|
}
|
|
1459
1460
|
getCursor() {
|
|
1460
1461
|
let e = this.getCursorSpec();
|
|
1461
|
-
return
|
|
1462
|
+
return n(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
|
|
1462
1463
|
}
|
|
1463
1464
|
watchCursor(e, t) {
|
|
1464
|
-
let
|
|
1465
|
-
|
|
1465
|
+
let r = this.getCursorSpec();
|
|
1466
|
+
n(r) && this.paramRuntime.watchExpression(r.expr, e, {
|
|
1466
1467
|
scopeOwned: !1,
|
|
1467
1468
|
registerDisposer: t
|
|
1468
1469
|
});
|
|
@@ -1474,53 +1475,55 @@ var Ze = class {
|
|
|
1474
1475
|
return this.facetCoords.values().next().value;
|
|
1475
1476
|
}
|
|
1476
1477
|
getPadding() {
|
|
1477
|
-
return this._cache("size/padding", () =>
|
|
1478
|
+
return this._cache("size/padding", () => k.createFromConfig(this.spec.padding));
|
|
1478
1479
|
}
|
|
1479
1480
|
getOverhang() {
|
|
1480
|
-
return
|
|
1481
|
+
return k.zero();
|
|
1481
1482
|
}
|
|
1482
1483
|
isScrollable() {
|
|
1483
1484
|
return this.spec.viewportWidth != null || this.spec.viewportHeight != null;
|
|
1484
1485
|
}
|
|
1485
1486
|
getSize() {
|
|
1486
|
-
return this._cache("size/size", () => this.isConfiguredVisible() ? new
|
|
1487
|
+
return this._cache("size/size", () => this.isConfiguredVisible() ? new y(this.#g("width"), this.#g("height")) : x);
|
|
1487
1488
|
}
|
|
1488
1489
|
getViewportSize() {
|
|
1489
1490
|
if (!this.isScrollable()) return this.getSize();
|
|
1490
|
-
if (!this.isConfiguredVisible()) return
|
|
1491
|
+
if (!this.isConfiguredVisible()) return x;
|
|
1491
1492
|
let e = this.getSize();
|
|
1492
|
-
return new
|
|
1493
|
+
return new y(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
|
|
1493
1494
|
}
|
|
1494
1495
|
#g(e) {
|
|
1495
1496
|
let { value: t, implicit: n } = this.#_(e), r = this.resolveSizeValue(e, t), i = J(r), a = e == "viewportWidth" || e == "viewportHeight";
|
|
1496
1497
|
if (i) {
|
|
1497
|
-
if (a) throw new
|
|
1498
|
+
if (a) throw new _(`Cannot use step-based size with "${e}"!`, this);
|
|
1498
1499
|
let t = this.#x(e, r), i = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
|
|
1499
1500
|
if (i) {
|
|
1500
1501
|
let n;
|
|
1501
|
-
if (
|
|
1502
|
+
if (v(i.type)) n = i.domain().length;
|
|
1502
1503
|
else if (["locus", "index"].includes(i.type)) {
|
|
1503
1504
|
let e = i.domain();
|
|
1504
|
-
n =
|
|
1505
|
-
} else throw new
|
|
1505
|
+
n = ee(e) - e[0];
|
|
1506
|
+
} else throw new _(`Cannot use step-based size with "${i.type}" scale!`, this);
|
|
1506
1507
|
let a = i;
|
|
1507
|
-
n =
|
|
1508
|
-
let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s &&
|
|
1508
|
+
n = oe(n, a.paddingInner(), a.paddingOuter());
|
|
1509
|
+
let o = e == "width" ? "xOffset" : "yOffset", s = this.getScaleResolution(o)?.getScale(), c = r.for ?? (s && v(s.type) ? "offset" : "position"), l = t;
|
|
1509
1510
|
if (c == "offset") {
|
|
1510
|
-
if (!s || !
|
|
1511
|
-
let t = s, n =
|
|
1511
|
+
if (!s || !v(s.type)) throw new _(`Cannot use ${e}.step.for = "offset" without a discrete ${o} scale!`, this);
|
|
1512
|
+
let t = s, n = oe(s.domain().length, t.paddingInner(), t.paddingOuter());
|
|
1512
1513
|
l *= n / (1 - a.paddingInner());
|
|
1513
1514
|
}
|
|
1514
1515
|
return {
|
|
1515
1516
|
px: n * l,
|
|
1516
1517
|
grow: 0
|
|
1517
1518
|
};
|
|
1518
|
-
}
|
|
1519
|
+
}
|
|
1520
|
+
if (n) return {
|
|
1519
1521
|
px: t,
|
|
1520
1522
|
grow: 0
|
|
1521
1523
|
};
|
|
1522
|
-
|
|
1523
|
-
}
|
|
1524
|
+
throw new _(`Cannot use step-based size with "${e}"!`, this);
|
|
1525
|
+
}
|
|
1526
|
+
return (r && he(r)) ?? (a ? void 0 : {
|
|
1524
1527
|
px: 0,
|
|
1525
1528
|
grow: 1
|
|
1526
1529
|
});
|
|
@@ -1540,13 +1543,13 @@ var Ze = class {
|
|
|
1540
1543
|
let t = this.getConfig().view;
|
|
1541
1544
|
if (!t) return;
|
|
1542
1545
|
let n = e == "width" ? "x" : "y", r = this.getScaleResolution(n)?.getResolvedScaleType();
|
|
1543
|
-
return r && !
|
|
1546
|
+
return r && !v(r) ? e == "width" ? t.continuousWidth : t.continuousHeight : (e == "width" ? t.discreteWidth : t.discreteHeight) ?? (t.step === void 0 ? void 0 : { step: t.step });
|
|
1544
1547
|
}
|
|
1545
1548
|
resolveSizeValue(e, t) {
|
|
1546
|
-
if (!
|
|
1547
|
-
let
|
|
1548
|
-
if (it(
|
|
1549
|
-
throw new
|
|
1549
|
+
if (!n(t)) return t;
|
|
1550
|
+
let r = this.#C(e)();
|
|
1551
|
+
if (it(r) || r === "container") return r;
|
|
1552
|
+
throw new _(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
|
|
1550
1553
|
}
|
|
1551
1554
|
registerSizeInvalidation() {
|
|
1552
1555
|
this.#y("width", "x"), this.#y("height", "y"), this.#b("width"), this.#b("height"), this.#b("viewportWidth"), this.#b("viewportHeight");
|
|
@@ -1557,27 +1560,27 @@ var Ze = class {
|
|
|
1557
1560
|
let i = this.getScaleResolution(t);
|
|
1558
1561
|
if (!i) {
|
|
1559
1562
|
if (r) return;
|
|
1560
|
-
throw new
|
|
1563
|
+
throw new _("Cannot use 'step' size without a scale!", this);
|
|
1561
1564
|
}
|
|
1562
1565
|
let a = () => {
|
|
1563
1566
|
let t = this.getSize()[e];
|
|
1564
1567
|
this.invalidateSizeCache();
|
|
1565
1568
|
let n = this.getSize()[e];
|
|
1566
|
-
|
|
1569
|
+
pe(t, n) || this.context.requestLayoutReflow();
|
|
1567
1570
|
};
|
|
1568
1571
|
if (i.addEventListener("domain", a), this.registerDisposer(() => i.removeEventListener("domain", a)), n.for != "position") {
|
|
1569
1572
|
let t = e == "width" ? "xOffset" : "yOffset", n = this.getScaleResolution(t);
|
|
1570
|
-
n &&
|
|
1573
|
+
n && v(n.getResolvedScaleType()) && (n.addEventListener("domain", a), this.registerDisposer(() => n.removeEventListener("domain", a)));
|
|
1571
1574
|
}
|
|
1572
1575
|
}
|
|
1573
1576
|
#b(e) {
|
|
1574
1577
|
let { value: t } = this.#_(e);
|
|
1575
|
-
|
|
1578
|
+
n(t) ? this.#S(e, t.expr) : J(t) && n(t.step) && this.#S(e + ".step", t.step.expr);
|
|
1576
1579
|
}
|
|
1577
1580
|
#x(e, t) {
|
|
1578
|
-
let
|
|
1579
|
-
if (it(
|
|
1580
|
-
throw new
|
|
1581
|
+
let r = n(t.step) ? this.#C(e + ".step")() : t.step;
|
|
1582
|
+
if (it(r)) return r;
|
|
1583
|
+
throw new _(`"${e}.step" ExprRef must resolve to a finite number!`, this);
|
|
1581
1584
|
}
|
|
1582
1585
|
#S(e, t) {
|
|
1583
1586
|
if (!this.#m.has(e)) {
|
|
@@ -1589,7 +1592,7 @@ var Ze = class {
|
|
|
1589
1592
|
}
|
|
1590
1593
|
#C(e) {
|
|
1591
1594
|
let t = this.#m.get(e);
|
|
1592
|
-
if (!t) throw new
|
|
1595
|
+
if (!t) throw new _(`"${e}" ExprRef was not registered before layout!`, this);
|
|
1593
1596
|
return t;
|
|
1594
1597
|
}
|
|
1595
1598
|
isConfiguredVisible() {
|
|
@@ -1720,8 +1723,8 @@ var Ze = class {
|
|
|
1720
1723
|
return this.#s;
|
|
1721
1724
|
}
|
|
1722
1725
|
arrange(e, t, n = {}) {
|
|
1723
|
-
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId,
|
|
1724
|
-
let e = this.getOverhang(), n = this.layoutParent ?
|
|
1726
|
+
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, f(n))), this.#a || this.#o) {
|
|
1727
|
+
let e = this.getOverhang(), n = this.layoutParent ? k.zero() : this.getPadding();
|
|
1725
1728
|
this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
|
|
1726
1729
|
}
|
|
1727
1730
|
this.#c = !0, this.#T();
|
|
@@ -1775,47 +1778,44 @@ var Ze = class {
|
|
|
1775
1778
|
return "independent";
|
|
1776
1779
|
}
|
|
1777
1780
|
getBaseUrl() {
|
|
1778
|
-
return
|
|
1781
|
+
return j(() => this.dataParent?.getBaseUrl(), Ge(this.spec.baseUrl));
|
|
1779
1782
|
}
|
|
1780
1783
|
isPickingSupported() {
|
|
1781
1784
|
return !0;
|
|
1782
1785
|
}
|
|
1783
1786
|
getTitleText() {
|
|
1784
1787
|
let e = this.spec.title;
|
|
1785
|
-
if (e) return te(e) ? e :
|
|
1788
|
+
if (e) return te(e) ? e : n(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
|
|
1786
1789
|
}
|
|
1787
1790
|
_cache(e, t) {
|
|
1788
|
-
return
|
|
1791
|
+
return re(this, e, t);
|
|
1789
1792
|
}
|
|
1790
1793
|
_invalidateCacheByPrefix(e, t = "self") {
|
|
1791
1794
|
switch (t) {
|
|
1792
1795
|
case "self":
|
|
1793
|
-
|
|
1796
|
+
g(this, e);
|
|
1794
1797
|
break;
|
|
1795
1798
|
case "ancestors":
|
|
1796
|
-
for (let t of this.getLayoutAncestors())
|
|
1799
|
+
for (let t of this.getLayoutAncestors()) g(t, e);
|
|
1797
1800
|
break;
|
|
1798
|
-
case "progeny":
|
|
1799
|
-
this.visit((t) => _(t, e));
|
|
1800
|
-
break;
|
|
1801
|
-
default:
|
|
1801
|
+
case "progeny": this.visit((t) => g(t, e));
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
1804
|
invalidateSizeCache() {
|
|
1805
|
-
|
|
1805
|
+
g(this, "size"), this._invalidateCacheByPrefix("size", "ancestors");
|
|
1806
1806
|
}
|
|
1807
1807
|
propagateInteraction(e) {}
|
|
1808
1808
|
};
|
|
1809
1809
|
function et(e) {
|
|
1810
1810
|
return "unitsPerPixel" in e;
|
|
1811
1811
|
}
|
|
1812
|
-
function tt(
|
|
1813
|
-
let
|
|
1814
|
-
if (
|
|
1815
|
-
if (
|
|
1816
|
-
if (et(
|
|
1817
|
-
let r = (
|
|
1818
|
-
let n =
|
|
1812
|
+
function tt(e) {
|
|
1813
|
+
let t = "opacity" in e.spec ? e.spec.opacity : void 0;
|
|
1814
|
+
if (t !== void 0) {
|
|
1815
|
+
if (s(t)) return (e) => e * t;
|
|
1816
|
+
if (et(t)) {
|
|
1817
|
+
let r = (t) => {
|
|
1818
|
+
let n = e.getScaleResolution(t), r = n?.getScale();
|
|
1819
1819
|
if ([
|
|
1820
1820
|
"linear",
|
|
1821
1821
|
"index",
|
|
@@ -1824,48 +1824,50 @@ function tt(t) {
|
|
|
1824
1824
|
scale: r,
|
|
1825
1825
|
scaleResolution: n
|
|
1826
1826
|
};
|
|
1827
|
-
},
|
|
1828
|
-
if (!
|
|
1827
|
+
}, i = rt(t.values, "opacity.values", e);
|
|
1828
|
+
if (!a(t.unitsPerPixel)) throw new _("\"opacity.unitsPerPixel\" must be an array.", e);
|
|
1829
1829
|
let o = () => 1, s = [], c = () => {
|
|
1830
|
-
let
|
|
1830
|
+
let t = nt(rt(s.map((e) => e()), "opacity.unitsPerPixel", e), i, e), n = ae().domain(t.unitsPerPixel).range(t.values).clamp(!0);
|
|
1831
1831
|
o = (e) => n(e);
|
|
1832
1832
|
};
|
|
1833
|
-
s =
|
|
1834
|
-
if (
|
|
1835
|
-
let n =
|
|
1836
|
-
c(),
|
|
1833
|
+
s = t.unitsPerPixel.map((t) => {
|
|
1834
|
+
if (n(t)) {
|
|
1835
|
+
let n = e.paramRuntime.watchExpression(t.expr, () => {
|
|
1836
|
+
c(), e.context.animator.requestRender();
|
|
1837
1837
|
});
|
|
1838
1838
|
return () => n(null);
|
|
1839
|
-
}
|
|
1839
|
+
}
|
|
1840
|
+
return () => t;
|
|
1840
1841
|
}), c();
|
|
1841
|
-
let u = (
|
|
1842
|
-
let
|
|
1843
|
-
return e
|
|
1842
|
+
let u = (e) => {
|
|
1843
|
+
let t = e.scaleResolution.getAxisLength() || 1e3;
|
|
1844
|
+
return l(e.scale.domain()) / t;
|
|
1844
1845
|
}, d;
|
|
1845
|
-
if (
|
|
1846
|
-
let
|
|
1847
|
-
if (
|
|
1848
|
-
else if (
|
|
1846
|
+
if (t.channel === "auto") {
|
|
1847
|
+
let t = r("x"), n = r("y");
|
|
1848
|
+
if (t && n) d = () => (u(t) + u(n)) / 2;
|
|
1849
|
+
else if (t) d = () => u(t);
|
|
1849
1850
|
else if (n) d = () => u(n);
|
|
1850
|
-
else throw new
|
|
1851
|
+
else throw new _("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
|
|
1851
1852
|
} else {
|
|
1852
|
-
let
|
|
1853
|
-
if (!
|
|
1854
|
-
d = () => u(
|
|
1853
|
+
let n = t.channel ? r(t.channel) : r("x") ?? r("y");
|
|
1854
|
+
if (!n) throw new _("Cannot find a resolved quantitative scale for dynamic opacity!", e);
|
|
1855
|
+
d = () => u(n);
|
|
1855
1856
|
}
|
|
1856
1857
|
return (e) => o(d()) * e;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
|
|
1858
|
+
}
|
|
1859
|
+
if (n(t)) {
|
|
1860
|
+
let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
|
|
1861
|
+
return (e) => n(null) * e;
|
|
1860
1862
|
}
|
|
1861
1863
|
}
|
|
1862
1864
|
return q;
|
|
1863
1865
|
}
|
|
1864
1866
|
function nt(e, t, n) {
|
|
1865
|
-
if (!e.length) throw new
|
|
1866
|
-
if (e.length !== t.length) throw new
|
|
1867
|
+
if (!e.length) throw new _("\"opacity.unitsPerPixel\" must contain at least one stop.", n);
|
|
1868
|
+
if (e.length !== t.length) throw new _("\"opacity.unitsPerPixel\" and \"opacity.values\" must have the same length.", n);
|
|
1867
1869
|
e.forEach((e, t) => {
|
|
1868
|
-
if (e <= 0) throw new
|
|
1870
|
+
if (e <= 0) throw new _("Invalid opacity.unitsPerPixel value at index " + t + ". Stop values must be positive.", n);
|
|
1869
1871
|
});
|
|
1870
1872
|
let r = e.map((e, n) => ({
|
|
1871
1873
|
stop: e,
|
|
@@ -1873,16 +1875,16 @@ function nt(e, t, n) {
|
|
|
1873
1875
|
}));
|
|
1874
1876
|
r.sort((e, t) => t.stop - e.stop);
|
|
1875
1877
|
let i = r.map((e) => e.stop), a = r.map((e) => e.value);
|
|
1876
|
-
for (let t = 1; t < e.length; t++) if (i[t - 1] <= i[t]) throw new
|
|
1878
|
+
for (let t = 1; t < e.length; t++) if (i[t - 1] <= i[t]) throw new _("\"opacity.unitsPerPixel\" must be strictly decreasing.", n);
|
|
1877
1879
|
return {
|
|
1878
1880
|
unitsPerPixel: i,
|
|
1879
1881
|
values: a
|
|
1880
1882
|
};
|
|
1881
1883
|
}
|
|
1882
1884
|
function rt(e, t, n) {
|
|
1883
|
-
if (!
|
|
1885
|
+
if (!a(e)) throw new _("\"" + t + "\" must evaluate to an array.", n);
|
|
1884
1886
|
return e.map((e, r) => {
|
|
1885
|
-
if (!
|
|
1887
|
+
if (!s(e) || !Number.isFinite(e)) throw new _("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
|
|
1886
1888
|
return e;
|
|
1887
1889
|
});
|
|
1888
1890
|
}
|
|
@@ -2008,7 +2010,7 @@ function Ct(e) {
|
|
|
2008
2010
|
if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
|
|
2009
2011
|
}
|
|
2010
2012
|
function Q(e) {
|
|
2011
|
-
return e.persist === !1 ? !1 :
|
|
2013
|
+
return e.persist === !1 ? !1 : ne(e) ? !0 : r(e) ? !!e.bind : !1;
|
|
2012
2014
|
}
|
|
2013
2015
|
function wt(e) {
|
|
2014
2016
|
let t = /* @__PURE__ */ new Set([e]);
|
|
@@ -2049,7 +2051,7 @@ function Ot(e, t, n) {
|
|
|
2049
2051
|
let a = /* @__PURE__ */ new Map();
|
|
2050
2052
|
for (let e of i) {
|
|
2051
2053
|
let t = Y.get(e), n = t ? t.name : void 0;
|
|
2052
|
-
typeof n
|
|
2054
|
+
typeof n == "string" && n.length && a.set(n, (a.get(n) ?? 0) + 1);
|
|
2053
2055
|
}
|
|
2054
2056
|
for (let [e, r] of a) r > 1 && n.push({
|
|
2055
2057
|
message: "Import instance name \"" + e + "\" is used multiple times for addressable instances in " + Et(t) + ".",
|
|
@@ -2061,7 +2063,7 @@ function kt(e, t) {
|
|
|
2061
2063
|
return $(e, t, (e) => {
|
|
2062
2064
|
if (Z(e).length !== t.length + 1) return;
|
|
2063
2065
|
let r = Y.get(e);
|
|
2064
|
-
|
|
2066
|
+
r && typeof r.name == "string" && n.push(e);
|
|
2065
2067
|
}, { includeNamedImportRoots: !0 }), n;
|
|
2066
2068
|
}
|
|
2067
2069
|
function At(e) {
|
|
@@ -2081,7 +2083,7 @@ function jt(e, t) {
|
|
|
2081
2083
|
let t, a = !1;
|
|
2082
2084
|
if ($(e, r, (e) => {
|
|
2083
2085
|
let n = Y.get(e);
|
|
2084
|
-
if (
|
|
2086
|
+
if (n && n.name === i && Z(e).length === r.length + 1) {
|
|
2085
2087
|
if (t) return a = !0, K;
|
|
2086
2088
|
t = e;
|
|
2087
2089
|
}
|
|
@@ -2112,4 +2114,4 @@ function Pt(e, t) {
|
|
|
2112
2114
|
return !0;
|
|
2113
2115
|
}
|
|
2114
2116
|
//#endregion
|
|
2115
|
-
export {
|
|
2117
|
+
export { M as A, ce as B, We as C, Fe as D, Re as E, b as F, fe as H, de as I, le as L, k as M, be as N, N as O, y as P, D as R, B as S, Le as T, ue as U, he as V, K as _, dt as a, H as b, lt as c, vt as d, _t as f, G as g, ht as h, ft as i, Se as j, j as k, at as l, gt as m, ct as n, mt as o, xt as p, Z as r, ut as s, bt as t, ot as u, $e as v, Be as w, U as x, Ye as y, E as z };
|