@genome-spy/app 0.89.0 → 1.0.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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as ne, m as _, y as v } from "./vega-scale-
|
|
1
|
+
import { C as e, E as t, Kt as n, Q as r, S as i, Z as a, b as o, cn as s, dn as c, fn as l, k as u, nn as d, o as f, pn as p, t as m, ut as h, y as g, yn as ee, yt as te } from "./clipOptions-B5PibDq3.js";
|
|
2
|
+
import { E as ne, m as _, y as v } from "./vega-scale-Ctz_wa3z.js";
|
|
3
3
|
import { a as y, n as re, r as ie, t as b } from "./viewError-BiR9VCgL.js";
|
|
4
4
|
import { t as ae } from "./warning-CpIIpk8e.js";
|
|
5
5
|
//#region ../../node_modules/flatqueue/index.js
|
|
@@ -27,7 +27,7 @@ var x = class {
|
|
|
27
27
|
if (r > 0) {
|
|
28
28
|
let n = e[r], i = t[r], a = 0, o = r >> 1;
|
|
29
29
|
for (; a < o;) {
|
|
30
|
-
let n = (a << 1) + 1, o = n + 1, s = n + (o < r &
|
|
30
|
+
let n = (a << 1) + 1, o = n + 1, s = n + (+(o < r) & t[o] < t[n]);
|
|
31
31
|
if (t[s] >= i) break;
|
|
32
32
|
e[a] = e[s], t[a] = t[s], a = s;
|
|
33
33
|
}
|
|
@@ -382,41 +382,41 @@ var fe = class {
|
|
|
382
382
|
if (!t) throw Error("Unknown scope: " + e);
|
|
383
383
|
t.params.clear(), t.initializers.clear();
|
|
384
384
|
}
|
|
385
|
-
registerInitializer(e,
|
|
386
|
-
n
|
|
385
|
+
registerInitializer(e, n, r) {
|
|
386
|
+
t(n);
|
|
387
387
|
let i = this.#t.get(e);
|
|
388
388
|
if (!i) throw Error("Unknown scope: " + e);
|
|
389
|
-
if (i.params.has(
|
|
390
|
-
i.initializers.set(
|
|
389
|
+
if (i.params.has(n) || i.initializers.has(n)) throw Error(`Parameter "${n}" already exists in scope ${e}`);
|
|
390
|
+
i.initializers.set(n, {
|
|
391
391
|
initialize: r,
|
|
392
392
|
initializing: !1
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
register(e,
|
|
396
|
-
n
|
|
395
|
+
register(e, n, r) {
|
|
396
|
+
t(n);
|
|
397
397
|
let i = this.#t.get(e);
|
|
398
398
|
if (!i) throw Error("Unknown scope: " + e);
|
|
399
|
-
if (i.params.has(
|
|
400
|
-
return i.params.set(
|
|
399
|
+
if (i.params.has(n) || i.initializers.get(n)?.initializing === !1) throw Error("Parameter \"" + n + "\" already exists in scope " + e);
|
|
400
|
+
return i.params.set(n, r), r;
|
|
401
401
|
}
|
|
402
|
-
resolve(e,
|
|
403
|
-
n
|
|
402
|
+
resolve(e, n) {
|
|
403
|
+
t(n);
|
|
404
404
|
let r = e;
|
|
405
405
|
for (; r;) {
|
|
406
406
|
let e = this.#t.get(r);
|
|
407
407
|
if (!e) throw Error("Unknown scope: " + r);
|
|
408
|
-
let
|
|
409
|
-
if (
|
|
410
|
-
if (
|
|
411
|
-
|
|
408
|
+
let t = e.initializers.get(n);
|
|
409
|
+
if (t) {
|
|
410
|
+
if (t.initializing) throw Error(`Parameter dependency cycle while initializing "${n}" in ${r}.`);
|
|
411
|
+
t.initializing = !0;
|
|
412
412
|
try {
|
|
413
|
-
if (
|
|
414
|
-
e.initializers.delete(
|
|
413
|
+
if (t.initialize(), !e.params.has(n)) throw Error(`Initializer did not register parameter "${n}".`);
|
|
414
|
+
e.initializers.delete(n);
|
|
415
415
|
} finally {
|
|
416
|
-
|
|
416
|
+
t.initializing = !1;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
let i = e.params.get(
|
|
419
|
+
let i = e.params.get(n);
|
|
420
420
|
if (i) return i;
|
|
421
421
|
r = e.parentScope;
|
|
422
422
|
}
|
|
@@ -664,7 +664,7 @@ var C = class {
|
|
|
664
664
|
}
|
|
665
665
|
#g(e) {
|
|
666
666
|
if (!("select" in e)) return;
|
|
667
|
-
let t =
|
|
667
|
+
let t = u(e.select), n = t.type === "interval" ? "interval" : t.toggle ? "multi" : "single", r = t.type === "interval" ? Array.from(new Set(t.encodings)).sort() : [], i = e.push === "outer" ? this.findRuntimeForParam(e.name) : this, a = {
|
|
668
668
|
kind: n,
|
|
669
669
|
components: r,
|
|
670
670
|
source: this.#s
|
|
@@ -677,10 +677,10 @@ var C = class {
|
|
|
677
677
|
get #_() {
|
|
678
678
|
return { resolveScaleResolution: this.#f };
|
|
679
679
|
}
|
|
680
|
-
registerParam(e,
|
|
680
|
+
registerParam(e, n = {}) {
|
|
681
681
|
let r = e.name;
|
|
682
|
-
if (
|
|
683
|
-
if (Te(e),
|
|
682
|
+
if (t(r), this.#i.has(r) || this.#a.has(r)) throw Error("Parameter \"" + r + "\" already registered in this scope.");
|
|
683
|
+
if (Te(e), n.defer) {
|
|
684
684
|
if (!("expr" in e)) throw Error("Only expression parameters can be deferred.");
|
|
685
685
|
return this.#e.registerInitializer(this.#t, r, () => {
|
|
686
686
|
this.#v(e);
|
|
@@ -745,31 +745,31 @@ var C = class {
|
|
|
745
745
|
}
|
|
746
746
|
return this.#i.set(t, e), this.#g(e), n;
|
|
747
747
|
}
|
|
748
|
-
allocateSetter(e,
|
|
749
|
-
if (
|
|
750
|
-
let i = this.#e.registerBase(this.#t, e,
|
|
748
|
+
allocateSetter(e, n, r = !1) {
|
|
749
|
+
if (t(e), this.#n.has(e)) throw Error("Setter already allocated for parameter: " + e);
|
|
750
|
+
let i = this.#e.registerBase(this.#t, e, n, { notify: !r });
|
|
751
751
|
this.#r.set(e, i);
|
|
752
752
|
let a = (e) => {
|
|
753
753
|
i.set(e), this.#e.flushNow();
|
|
754
754
|
};
|
|
755
755
|
return this.#n.set(e, a), a;
|
|
756
756
|
}
|
|
757
|
-
setValue(e,
|
|
758
|
-
|
|
757
|
+
setValue(e, n, r) {
|
|
758
|
+
t(e);
|
|
759
759
|
let i = this.#n.get(e);
|
|
760
760
|
if (!i) throw Error("Writable parameter not found in this scope: " + e);
|
|
761
|
-
i(
|
|
761
|
+
i(n, r);
|
|
762
762
|
}
|
|
763
763
|
getValue(e) {
|
|
764
764
|
return !this.#r.has(e) && this.hasLocalParam(e) && this.#e.resolve(this.#t, e), this.#r.get(e)?.get();
|
|
765
765
|
}
|
|
766
766
|
getParamRef(e) {
|
|
767
|
-
|
|
768
|
-
let
|
|
769
|
-
if (
|
|
767
|
+
t(e);
|
|
768
|
+
let n = this.findRuntimeForParam(e);
|
|
769
|
+
if (n) return n.#r.has(e) || n.#e.resolve(n.#t, e), n.#r.get(e);
|
|
770
770
|
}
|
|
771
771
|
getTargetValue(e) {
|
|
772
|
-
return
|
|
772
|
+
return t(e), this.#l.get(e)?.target ?? this.#u.get(e)?.target ?? this.getValue(e);
|
|
773
773
|
}
|
|
774
774
|
subscribe(e, t) {
|
|
775
775
|
let n = this.getParamRef(e);
|
|
@@ -786,16 +786,16 @@ var C = class {
|
|
|
786
786
|
return this.#i;
|
|
787
787
|
}
|
|
788
788
|
hasLocalParam(e) {
|
|
789
|
-
|
|
790
|
-
let
|
|
791
|
-
return this.#r.has(e) || this.#a.has(e) ||
|
|
789
|
+
t(e);
|
|
790
|
+
let n = this.#i.get(e);
|
|
791
|
+
return this.#r.has(e) || this.#a.has(e) || n !== void 0 && "expr" in n;
|
|
792
792
|
}
|
|
793
793
|
isPendingParam(e) {
|
|
794
794
|
let t = this.findRuntimeForParam(e);
|
|
795
795
|
return t !== void 0 && !t.#r.has(e);
|
|
796
796
|
}
|
|
797
797
|
hasConfiguredParamInScopeChain(e) {
|
|
798
|
-
return
|
|
798
|
+
return t(e), this.#i.has(e) ? !0 : this.#d()?.hasConfiguredParamInScopeChain(e) ?? !1;
|
|
799
799
|
}
|
|
800
800
|
findRuntimeForParam(e) {
|
|
801
801
|
return this.hasLocalParam(e) ? this : this.#d()?.findRuntimeForParam(e);
|
|
@@ -942,9 +942,9 @@ var C = class {
|
|
|
942
942
|
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());
|
|
943
943
|
}
|
|
944
944
|
hasPointSelections() {
|
|
945
|
-
for (let e of this.#i.values()) if (
|
|
945
|
+
for (let e of this.#i.values()) if (i(e)) {
|
|
946
946
|
let t = e.select;
|
|
947
|
-
if (
|
|
947
|
+
if (p(t)) {
|
|
948
948
|
if (t == "point") return !0;
|
|
949
949
|
} else if (t.type == "point") return !0;
|
|
950
950
|
}
|
|
@@ -1082,12 +1082,12 @@ function k(e) {
|
|
|
1082
1082
|
return e || 0;
|
|
1083
1083
|
}
|
|
1084
1084
|
function Me(e) {
|
|
1085
|
-
return e && (
|
|
1085
|
+
return e && (c(e.px) || c(e.grow) || c(e.minPx) || c(e.maxPx));
|
|
1086
1086
|
}
|
|
1087
1087
|
function A(e) {
|
|
1088
1088
|
if (q(e)) throw Error("parseSizeDef does not accept step-based sizes.");
|
|
1089
1089
|
if (Me(e)) return j(e), L(e);
|
|
1090
|
-
if (
|
|
1090
|
+
if (c(e)) return {
|
|
1091
1091
|
px: e,
|
|
1092
1092
|
grow: 0
|
|
1093
1093
|
};
|
|
@@ -1240,7 +1240,8 @@ function Le(e, t, n = ze()) {
|
|
|
1240
1240
|
if (r) {
|
|
1241
1241
|
let e = n ? new URL(r, n).href : new URL(r).href;
|
|
1242
1242
|
return new URL(t, e).href;
|
|
1243
|
-
}
|
|
1243
|
+
}
|
|
1244
|
+
if (n) return new URL(t, n).href;
|
|
1244
1245
|
} catch {}
|
|
1245
1246
|
return B(r, t);
|
|
1246
1247
|
}
|
|
@@ -1264,8 +1265,8 @@ function Ve(e) {
|
|
|
1264
1265
|
}
|
|
1265
1266
|
//#endregion
|
|
1266
1267
|
//#region ../core/src/config/mergeConfig.js
|
|
1267
|
-
function V(
|
|
1268
|
-
return e
|
|
1268
|
+
function V(e) {
|
|
1269
|
+
return l(e) && !Array.isArray(e);
|
|
1269
1270
|
}
|
|
1270
1271
|
function He(e) {
|
|
1271
1272
|
let t = {};
|
|
@@ -1405,19 +1406,19 @@ var Qe = class {
|
|
|
1405
1406
|
#f = [];
|
|
1406
1407
|
#p = "none";
|
|
1407
1408
|
#m = /* @__PURE__ */ new Map();
|
|
1408
|
-
facetCoords = new
|
|
1409
|
-
constructor(e, t, n, r, i,
|
|
1409
|
+
facetCoords = new d([], JSON.stringify);
|
|
1410
|
+
constructor(e, t, n, r, i, o = {}) {
|
|
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 $e(this), r && e.theme !== void 0) throw Error("\"theme\" is only supported at the root specification. Use \"config\" and \"style\" for subtree customization.");
|
|
1412
|
-
let
|
|
1413
|
-
this.#e = [...
|
|
1413
|
+
let s = r ? r.getConfigScopes() : [t.getBaseConfig()], c = e.config;
|
|
1414
|
+
this.#e = [...s, c].filter((e) => !!e), this.resolutions = {
|
|
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
|
+
...o
|
|
1421
1422
|
}, this.flowHandle = void 0, this.needsAxes = {
|
|
1422
1423
|
x: !1,
|
|
1423
1424
|
y: !1
|
|
@@ -1425,7 +1426,7 @@ var Qe = class {
|
|
|
1425
1426
|
let l = [...e.params ?? [], ...Ze(e) ?? []];
|
|
1426
1427
|
for (let e of l) {
|
|
1427
1428
|
if ("expr" in e) {
|
|
1428
|
-
let { usesScaleHelper: t, globals: n } =
|
|
1429
|
+
let { usesScaleHelper: t, globals: n } = a(e.expr), r = n.some((e) => this.paramRuntime.isPendingParam(e));
|
|
1429
1430
|
if (t || r) {
|
|
1430
1431
|
this.paramRuntime.registerParam(e, { defer: !0 }), this.#d.push(e.name);
|
|
1431
1432
|
continue;
|
|
@@ -1458,11 +1459,11 @@ var Qe = class {
|
|
|
1458
1459
|
}
|
|
1459
1460
|
getCursor() {
|
|
1460
1461
|
let e = this.getCursorSpec();
|
|
1461
|
-
return
|
|
1462
|
+
return o(e) ? this.paramRuntime.evaluateAndGet(e.expr) : e;
|
|
1462
1463
|
}
|
|
1463
1464
|
watchCursor(e, t) {
|
|
1464
1465
|
let n = this.getCursorSpec();
|
|
1465
|
-
|
|
1466
|
+
o(n) && this.paramRuntime.watchExpression(n.expr, e, {
|
|
1466
1467
|
scopeOwned: !1,
|
|
1467
1468
|
registerDisposer: t
|
|
1468
1469
|
});
|
|
@@ -1492,35 +1493,37 @@ var Qe = class {
|
|
|
1492
1493
|
return new T(this.#g("viewportWidth") ?? e.width, this.#g("viewportHeight") ?? e.height);
|
|
1493
1494
|
}
|
|
1494
1495
|
#g(e) {
|
|
1495
|
-
let { value: t, implicit:
|
|
1496
|
-
if (
|
|
1497
|
-
if (
|
|
1498
|
-
let t = this.#x(e,
|
|
1499
|
-
if (
|
|
1500
|
-
let
|
|
1501
|
-
if (v(
|
|
1502
|
-
else if (["locus", "index"].includes(
|
|
1503
|
-
let e =
|
|
1504
|
-
|
|
1505
|
-
} else throw new b(`Cannot use step-based size with "${
|
|
1506
|
-
let
|
|
1507
|
-
|
|
1508
|
-
let
|
|
1509
|
-
if (
|
|
1510
|
-
if (!
|
|
1511
|
-
let t =
|
|
1512
|
-
|
|
1496
|
+
let { value: t, implicit: r } = this.#_(e), i = this.resolveSizeValue(e, t), a = q(i), o = e == "viewportWidth" || e == "viewportHeight";
|
|
1497
|
+
if (a) {
|
|
1498
|
+
if (o) throw new b(`Cannot use step-based size with "${e}"!`, this);
|
|
1499
|
+
let t = this.#x(e, i), a = this.getScaleResolution(e == "width" ? "x" : "y")?.getScale();
|
|
1500
|
+
if (a) {
|
|
1501
|
+
let r;
|
|
1502
|
+
if (v(a.type)) r = a.domain().length;
|
|
1503
|
+
else if (["locus", "index"].includes(a.type)) {
|
|
1504
|
+
let e = a.domain();
|
|
1505
|
+
r = n(e) - e[0];
|
|
1506
|
+
} else throw new b(`Cannot use step-based size with "${a.type}" scale!`, this);
|
|
1507
|
+
let o = a;
|
|
1508
|
+
r = _(r, o.paddingInner(), o.paddingOuter());
|
|
1509
|
+
let s = e == "width" ? "xOffset" : "yOffset", c = this.getScaleResolution(s)?.getScale(), l = i.for ?? (c && v(c.type) ? "offset" : "position"), u = t;
|
|
1510
|
+
if (l == "offset") {
|
|
1511
|
+
if (!c || !v(c.type)) throw new b(`Cannot use ${e}.step.for = "offset" without a discrete ${s} scale!`, this);
|
|
1512
|
+
let t = c, n = _(c.domain().length, t.paddingInner(), t.paddingOuter());
|
|
1513
|
+
u *= n / (1 - o.paddingInner());
|
|
1513
1514
|
}
|
|
1514
1515
|
return {
|
|
1515
|
-
px:
|
|
1516
|
+
px: r * u,
|
|
1516
1517
|
grow: 0
|
|
1517
1518
|
};
|
|
1518
|
-
}
|
|
1519
|
+
}
|
|
1520
|
+
if (r) return {
|
|
1519
1521
|
px: t,
|
|
1520
1522
|
grow: 0
|
|
1521
1523
|
};
|
|
1522
|
-
|
|
1523
|
-
}
|
|
1524
|
+
throw new b(`Cannot use step-based size with "${e}"!`, this);
|
|
1525
|
+
}
|
|
1526
|
+
return (i && A(i)) ?? (o ? void 0 : {
|
|
1524
1527
|
px: 0,
|
|
1525
1528
|
grow: 1
|
|
1526
1529
|
});
|
|
@@ -1543,7 +1546,7 @@ var Qe = class {
|
|
|
1543
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 (!
|
|
1549
|
+
if (!o(t)) return t;
|
|
1547
1550
|
let n = this.#C(e)();
|
|
1548
1551
|
if (at(n) || n === "container") return n;
|
|
1549
1552
|
throw new b(`"${e}" ExprRef must resolve to a finite number or "container"!`, this);
|
|
@@ -1572,10 +1575,10 @@ var Qe = class {
|
|
|
1572
1575
|
}
|
|
1573
1576
|
#b(e) {
|
|
1574
1577
|
let { value: t } = this.#_(e);
|
|
1575
|
-
|
|
1578
|
+
o(t) ? this.#S(e, t.expr) : q(t) && o(t.step) && this.#S(e + ".step", t.step.expr);
|
|
1576
1579
|
}
|
|
1577
1580
|
#x(e, t) {
|
|
1578
|
-
let n =
|
|
1581
|
+
let n = o(t.step) ? this.#C(e + ".step")() : t.step;
|
|
1579
1582
|
if (at(n)) return n;
|
|
1580
1583
|
throw new b(`"${e}.step" ExprRef must resolve to a finite number!`, this);
|
|
1581
1584
|
}
|
|
@@ -1720,7 +1723,7 @@ var Qe = 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,
|
|
1726
|
+
if (n.firstFacet && this.facetCoords.clear(), this.facetCoords.set(n.facetId, m(t, f(n))), this.#a || this.#o) {
|
|
1724
1727
|
let e = this.getOverhang(), n = this.layoutParent ? R.zero() : this.getPadding();
|
|
1725
1728
|
this.#a?.(t.width - e.width - n.width), this.#o?.(t.height - e.height - n.height);
|
|
1726
1729
|
}
|
|
@@ -1782,7 +1785,7 @@ var Qe = class {
|
|
|
1782
1785
|
}
|
|
1783
1786
|
getTitleText() {
|
|
1784
1787
|
let e = this.spec.title;
|
|
1785
|
-
if (e) return
|
|
1788
|
+
if (e) return p(e) ? e : o(e.text) ? this.paramRuntime.evaluateAndGet(e.text.expr) : e.text;
|
|
1786
1789
|
}
|
|
1787
1790
|
_cache(e, t) {
|
|
1788
1791
|
return re(this, e, t);
|
|
@@ -1795,10 +1798,7 @@ var Qe = class {
|
|
|
1795
1798
|
case "ancestors":
|
|
1796
1799
|
for (let t of this.getLayoutAncestors()) y(t, e);
|
|
1797
1800
|
break;
|
|
1798
|
-
case "progeny":
|
|
1799
|
-
this.visit((t) => y(t, e));
|
|
1800
|
-
break;
|
|
1801
|
-
default:
|
|
1801
|
+
case "progeny": this.visit((t) => y(t, e));
|
|
1802
1802
|
}
|
|
1803
1803
|
}
|
|
1804
1804
|
invalidateSizeCache() {
|
|
@@ -1812,7 +1812,7 @@ function tt(e) {
|
|
|
1812
1812
|
function nt(e) {
|
|
1813
1813
|
let t = "opacity" in e.spec ? e.spec.opacity : void 0;
|
|
1814
1814
|
if (t !== void 0) {
|
|
1815
|
-
if (
|
|
1815
|
+
if (c(t)) return (e) => e * t;
|
|
1816
1816
|
if (tt(t)) {
|
|
1817
1817
|
let n = (t) => {
|
|
1818
1818
|
let n = e.getScaleResolution(t), r = n?.getScale();
|
|
@@ -1826,35 +1826,37 @@ function nt(e) {
|
|
|
1826
1826
|
};
|
|
1827
1827
|
}, r = it(t.values, "opacity.values", e);
|
|
1828
1828
|
if (!s(t.unitsPerPixel)) throw new b("\"opacity.unitsPerPixel\" must be an array.", e);
|
|
1829
|
-
let i = () => 1, a = [],
|
|
1829
|
+
let i = () => 1, a = [], c = () => {
|
|
1830
1830
|
let t = rt(it(a.map((e) => e()), "opacity.unitsPerPixel", e), r, e), n = ne().domain(t.unitsPerPixel).range(t.values).clamp(!0);
|
|
1831
1831
|
i = (e) => n(e);
|
|
1832
1832
|
};
|
|
1833
1833
|
a = t.unitsPerPixel.map((t) => {
|
|
1834
|
-
if (
|
|
1834
|
+
if (o(t)) {
|
|
1835
1835
|
let n = e.paramRuntime.watchExpression(t.expr, () => {
|
|
1836
|
-
|
|
1836
|
+
c(), e.context.animator.requestRender();
|
|
1837
1837
|
});
|
|
1838
1838
|
return () => n(null);
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1839
|
+
}
|
|
1840
|
+
return () => t;
|
|
1841
|
+
}), c();
|
|
1842
|
+
let l = (e) => {
|
|
1842
1843
|
let t = e.scaleResolution.getAxisLength() || 1e3;
|
|
1843
|
-
return
|
|
1844
|
+
return ee(e.scale.domain()) / t;
|
|
1844
1845
|
}, u;
|
|
1845
1846
|
if (t.channel === "auto") {
|
|
1846
1847
|
let t = n("x"), r = n("y");
|
|
1847
|
-
if (t && r) u = () => (
|
|
1848
|
-
else if (t) u = () =>
|
|
1849
|
-
else if (r) u = () =>
|
|
1848
|
+
if (t && r) u = () => (l(t) + l(r)) / 2;
|
|
1849
|
+
else if (t) u = () => l(t);
|
|
1850
|
+
else if (r) u = () => l(r);
|
|
1850
1851
|
else throw new b("Cannot find a resolved quantitative x or y scale for dynamic opacity!", e);
|
|
1851
1852
|
} else {
|
|
1852
1853
|
let r = t.channel ? n(t.channel) : n("x") ?? n("y");
|
|
1853
1854
|
if (!r) throw new b("Cannot find a resolved quantitative scale for dynamic opacity!", e);
|
|
1854
|
-
u = () =>
|
|
1855
|
+
u = () => l(r);
|
|
1855
1856
|
}
|
|
1856
1857
|
return (e) => i(u()) * e;
|
|
1857
|
-
}
|
|
1858
|
+
}
|
|
1859
|
+
if (o(t)) {
|
|
1858
1860
|
let n = e.paramRuntime.watchExpression(t.expr, () => e.context.animator.requestRender());
|
|
1859
1861
|
return (e) => n(null) * e;
|
|
1860
1862
|
}
|
|
@@ -1882,7 +1884,7 @@ function rt(e, t, n) {
|
|
|
1882
1884
|
function it(e, t, n) {
|
|
1883
1885
|
if (!s(e)) throw new b("\"" + t + "\" must evaluate to an array.", n);
|
|
1884
1886
|
return e.map((e, r) => {
|
|
1885
|
-
if (!
|
|
1887
|
+
if (!c(e) || !Number.isFinite(e)) throw new b("Invalid " + t + " value at index " + r + ". Expected a finite number.", n);
|
|
1886
1888
|
return e;
|
|
1887
1889
|
});
|
|
1888
1890
|
}
|
|
@@ -2007,8 +2009,8 @@ function Ct(e) {
|
|
|
2007
2009
|
if (!e || !Array.isArray(e.scope)) throw Error("View selector scope must be an array.");
|
|
2008
2010
|
if (typeof e.view != "string" || !e.view.length) throw Error("View selector view must be a non-empty string.");
|
|
2009
2011
|
}
|
|
2010
|
-
function Q(
|
|
2011
|
-
return
|
|
2012
|
+
function Q(t) {
|
|
2013
|
+
return t.persist === !1 ? !1 : i(t) ? !0 : e(t) ? !!t.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 = J.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 (X(e).length !== t.length + 1) return;
|
|
2063
2065
|
let r = J.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 = J.get(e);
|
|
2084
|
-
if (
|
|
2086
|
+
if (n && n.name === i && X(e).length === r.length + 1) {
|
|
2085
2087
|
if (t) return a = !0, G;
|
|
2086
2088
|
t = e;
|
|
2087
2089
|
}
|