@genome-spy/app 0.78.0 → 0.79.1

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 (54) hide show
  1. package/dist/agentApi.es.js +4918 -2499
  2. package/dist/agentShared.es.js +20 -22
  3. package/dist/{blosc-DL1kZHdE.js → blosc-JROzDOnd.js} +1 -1
  4. package/dist/{chunk-INHXZS53-DwEV9sMh.js → chunk-INHXZS53-CsrPGdTf.js} +1 -1
  5. package/dist/{componentStyles-CIXoKEp0.js → componentStyles-BGy033io.js} +2 -2
  6. package/dist/dialog.es.js +3 -3
  7. package/dist/{esm-D2-C5ZzN.js → esm-80V4xF_D.js} +226 -212
  8. package/dist/esm-B8j57WO7.js +441 -0
  9. package/dist/{esm-BkagIzhP.js → esm-BEHZgiVL.js} +30 -30
  10. package/dist/esm-BNd2PfFt.js +1367 -0
  11. package/dist/esm-BdLYkz-m.js +248 -0
  12. package/dist/{esm-id9DWBZW.js → esm-BdT7qUL-.js} +51 -31
  13. package/dist/esm-Bn4VTHqw.js +128 -0
  14. package/dist/{esm-C_XrKaCY.js → esm-C3k-CPce.js} +51 -31
  15. package/dist/{esm-CHVYSGF2.js → esm-CPzTvCZH.js} +226 -212
  16. package/dist/{esm-CPufCnsG.js → esm-CWd6i_cL.js} +30 -30
  17. package/dist/{esm-BgpwI2cq.js → esm-Cx-EbkOj.js} +13 -13
  18. package/dist/esm-D-iG_TIX.js +441 -0
  19. package/dist/esm-WxH0jQt4.js +128 -0
  20. package/dist/esm-cvhwoclu.js +1367 -0
  21. package/dist/{esm-BL9SNSnj.js → esm-k9p3oHkt.js} +133 -158
  22. package/dist/index.es.js +41477 -11008
  23. package/dist/index.js +579 -662
  24. package/dist/{lit-ymUSmGBw.js → lit-ByuJ0FJ4.js} +1 -1
  25. package/dist/{lz4-Csz5aoFA.js → lz4-CUYSbVey.js} +1 -1
  26. package/dist/{parquetRead-C33mgLEo.js → parquetRead-CBUyqZwZ.js} +473 -399
  27. package/dist/{chunk-CPXzm0be.js → rolldown-runtime-DF993M8W.js} +1 -1
  28. package/dist/schema.json +20018 -6213
  29. package/dist/{viewUtils-B7-F_Ae-.js → viewUtils-BBRWguwj.js} +4947 -4127
  30. package/dist/{zstd-dJuUp1fl.js → zstd-YMzMcush.js} +1 -1
  31. package/package.json +6 -4
  32. package/src/appTypes.d.ts +0 -1
  33. package/src/sampleView/state/payloadTypes.d.ts +9 -2
  34. package/src/spec/sampleView.d.ts +53 -0
  35. package/dist/AbortablePromiseCache-beUIcZcW.js +0 -96
  36. package/dist/agentApi-BwbEWjvl.js +0 -27118
  37. package/dist/blosc-BX4BJ8sR.js +0 -692
  38. package/dist/chunk-INHXZS53-Dx2aFznx.js +0 -13
  39. package/dist/esm-BHjeb8gt.js +0 -1426
  40. package/dist/esm-BI-plmf6.js +0 -121
  41. package/dist/esm-BwW--bVV.js +0 -369
  42. package/dist/esm-COzpU5N8.js +0 -1221
  43. package/dist/esm-CZvS2Ldm.js +0 -155
  44. package/dist/esm-D-y0Ce1M.js +0 -573
  45. package/dist/esm-D2_c7lXY.js +0 -298
  46. package/dist/esm-Daho46bY.js +0 -121
  47. package/dist/esm-DjF6pKy5.js +0 -369
  48. package/dist/esm-sPWfZg9X.js +0 -1426
  49. package/dist/esm-s_SlArJ8.js +0 -298
  50. package/dist/lz4-BSYl80V8.js +0 -626
  51. package/dist/parquetRead-m8-8_SpH.js +0 -1609
  52. package/dist/zstd-BAfRM3IH.js +0 -583
  53. /package/dist/{AbortablePromiseCache-BDH1cqFl.js → AbortablePromiseCache-BTmAcN-t.js} +0 -0
  54. /package/dist/{esm-Bz_92nH0.js → esm-VvpZ9hsq.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunk-INHXZS53-Dx2aFznx.js";
1
+ import { t as e } from "./chunk-INHXZS53-CsrPGdTf.js";
2
2
  //#region ../../node_modules/numcodecs/dist/zstd.js
3
3
  var t = (typeof document < "u" && document.currentScript?.src, function(e = {}) {
4
4
  var t, n = e, r, i, a = new Promise((e, t) => {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "contributors": [],
9
9
  "license": "MIT",
10
10
  "homepage": "https://genomespy.app/",
11
- "version": "0.78.0",
11
+ "version": "0.79.1",
12
12
  "main": "dist/index.js",
13
13
  "module": "dist/index.es.js",
14
14
  "type": "module",
@@ -70,7 +70,7 @@
70
70
  "@fortawesome/fontawesome-free": "^6.4.2",
71
71
  "@fortawesome/fontawesome-svg-core": "^6.4.2",
72
72
  "@fortawesome/free-solid-svg-icons": "^6.4.2",
73
- "@genome-spy/core": "^0.78.0",
73
+ "@genome-spy/core": "^0.79.1",
74
74
  "@reduxjs/toolkit": "^2.11.0",
75
75
  "d3-color": "^3.1.0",
76
76
  "idb": "^7.1.1",
@@ -79,10 +79,12 @@
79
79
  "mapsort": "^1.0.5",
80
80
  "micromark": "^4.0.0",
81
81
  "redux-undo": "^1.0.1",
82
+ "vega-util": "2.1.0",
82
83
  "zarrita": "^0.6.1"
83
84
  },
84
85
  "devDependencies": {
85
- "@genome-spy/app-agent": "^0.78.0"
86
+ "@genome-spy/app-agent": "^0.79.1",
87
+ "@genome-spy/inspector": "^0.79.1"
86
88
  },
87
- "gitHead": "54041db3a590ae8df78fa43aa755b9e07fe3503c"
89
+ "gitHead": "bd399afa44797ccbf7da2564ccc2ab52c7aa0a72"
88
90
  }
package/src/appTypes.d.ts CHANGED
@@ -6,7 +6,6 @@ export type UrlHash = Partial<BookmarkEntry>;
6
6
 
7
7
  export type AppEmbedOptions =
8
8
  import("@genome-spy/core/types/embedApi.js").EmbedOptions & {
9
- showInspectorButton?: boolean;
10
9
  plugins?: AppPlugin[];
11
10
  };
12
11
 
@@ -263,9 +263,16 @@ export interface PayloadWithAttribute {
263
263
  }
264
264
 
265
265
  /**
266
- * Payload for sorting samples in descending order by an attribute.
266
+ * Payload for sorting samples by an attribute.
267
267
  */
268
- export interface SortBy extends PayloadWithAttribute {}
268
+ export interface SortBy extends PayloadWithAttribute {
269
+ /**
270
+ * Sort direction.
271
+ *
272
+ * __Default value:__ `"descending"`
273
+ */
274
+ order?: "ascending" | "descending";
275
+ }
269
276
 
270
277
  /**
271
278
  * Payload for retaining the first sample of each distinct category.
@@ -1,6 +1,7 @@
1
1
  import { Data, InlineData, UrlData } from "@genome-spy/core/spec/data.js";
2
2
  import { Align, FontStyle, FontWeight } from "@genome-spy/core/spec/font.js";
3
3
  import { Scale } from "@genome-spy/core/spec/scale.js";
4
+ import { Title } from "@genome-spy/core/spec/title.js";
4
5
  import { ViewSpecBase, ViewBackground } from "@genome-spy/core/spec/view.js";
5
6
  import {
6
7
  AppConfigurableVisibilitySpec,
@@ -37,6 +38,15 @@ export interface SampleSpec extends Omit<ViewSpecBase, "templates"> {
37
38
  */
38
39
  sampleLayout?: SampleLayoutDef;
39
40
 
41
+ /**
42
+ * Controls how vertical axes are shown for repeated sample plots.
43
+ *
44
+ * Set to `null` to disable sample y-axes.
45
+ *
46
+ * __Default value:__ `{"mode": "all", "minSampleHeight": 60}`
47
+ */
48
+ sampleYAxis?: SampleYAxisDef | null;
49
+
40
50
  /**
41
51
  * An object defining the view background and outline. The background is
42
52
  * repeated for each group.
@@ -60,6 +70,28 @@ export interface SampleSpec extends Omit<ViewSpecBase, "templates"> {
60
70
  stickySummaries?: boolean;
61
71
  }
62
72
 
73
+ export type SampleYAxisMode = "all" | "top" | "middle" | "bottom";
74
+
75
+ export interface SampleYAxisDef {
76
+ /**
77
+ * How vertical axes are shown for repeated sample plots.
78
+ *
79
+ * - `"all"` shows an axis for every eligible visible sample.
80
+ * - `"top"`, `"middle"`, and `"bottom"` show one representative axis.
81
+ *
82
+ * __Default value:__ `"all"`
83
+ */
84
+ mode?: SampleYAxisMode;
85
+
86
+ /**
87
+ * Minimum visible sample height in pixels required before a repeated y-axis
88
+ * can be shown.
89
+ *
90
+ * __Default value:__ `60`
91
+ */
92
+ minSampleHeight?: number;
93
+ }
94
+
63
95
  export type SampleAttributeType = "nominal" | "ordinal" | "quantitative";
64
96
 
65
97
  export type SampleAttributeSemanticType =
@@ -377,6 +409,15 @@ export type MetadataSourceEntry =
377
409
  | { import: MetadataSourceImportDef };
378
410
 
379
411
  export interface MetadataDef {
412
+ /**
413
+ * Title shown above metadata columns.
414
+ *
415
+ * Set to `null` to hide the metadata title.
416
+ *
417
+ * __Default value:__ `"Sample metadata"`
418
+ */
419
+ title?: string | Title | null;
420
+
380
421
  /**
381
422
  * Metadata source definitions used for startup and on-demand imports.
382
423
  *
@@ -443,6 +484,18 @@ export interface MetadataDef {
443
484
  * __Default value:__ `-90`
444
485
  */
445
486
  labelAngle?: number;
487
+
488
+ /**
489
+ * Whether metadata attribute titles reserve layout space outside the sample
490
+ * rows.
491
+ *
492
+ * Setting this to `false` enables wilder layouts where attribute titles
493
+ * may overlap nearby content. This is useful for dense metadata matrices
494
+ * with rotated labels.
495
+ *
496
+ * __Default value:__ `false`
497
+ */
498
+ titleReserve?: boolean;
446
499
  }
447
500
 
448
501
  export interface SampleDef {
@@ -1,96 +0,0 @@
1
- //#region ../../node_modules/@gmod/abortable-promise-cache/esm/AggregateAbortController.js
2
- var e = class {}, t = class {
3
- constructor() {
4
- this.signals = /* @__PURE__ */ new Set(), this.abortController = new AbortController();
5
- }
6
- addSignal(t = new e()) {
7
- if (this.signal.aborted) throw Error("cannot add a signal, already aborted!");
8
- this.signals.add(t), t.aborted ? this.handleAborted(t) : typeof t.addEventListener == "function" && t.addEventListener("abort", () => {
9
- this.handleAborted(t);
10
- });
11
- }
12
- handleAborted(e) {
13
- this.signals.delete(e), this.signals.size === 0 && this.abortController.abort();
14
- }
15
- get signal() {
16
- return this.abortController.signal;
17
- }
18
- abort() {
19
- this.abortController.abort();
20
- }
21
- }, n = class {
22
- constructor() {
23
- this.callbacks = /* @__PURE__ */ new Set();
24
- }
25
- addCallback(e = () => {}) {
26
- this.callbacks.add(e), this.currentMessage && e(this.currentMessage);
27
- }
28
- callback(e) {
29
- this.currentMessage = e;
30
- for (let t of this.callbacks) t(e);
31
- }
32
- }, r = class e {
33
- constructor({ fill: e, cache: t }) {
34
- if (typeof e != "function") throw TypeError("must pass a fill function");
35
- if (typeof t != "object") throw TypeError("must pass a cache object");
36
- if (typeof t.get != "function" || typeof t.set != "function" || typeof t.delete != "function") throw TypeError("cache must implement get(key), set(key, val), and and delete(key)");
37
- this.cache = t, this.fillCallback = e;
38
- }
39
- static isAbortException(e) {
40
- return e.name === "AbortError" || e.code === "ERR_ABORTED" || e.message === "AbortError: aborted" || e.message === "Error: aborted";
41
- }
42
- evict(e, t) {
43
- this.cache.get(e) === t && this.cache.delete(e);
44
- }
45
- fill(e, r, i, a) {
46
- let o = new t(), s = new n();
47
- s.addCallback(a);
48
- let c = {
49
- aborter: o,
50
- promise: this.fillCallback(r, o.signal, (e) => {
51
- s.callback(e);
52
- }),
53
- settled: !1,
54
- statusReporter: s,
55
- get aborted() {
56
- return this.aborter.signal.aborted;
57
- }
58
- };
59
- c.aborter.addSignal(i), c.aborter.signal.addEventListener("abort", () => {
60
- c.settled || this.evict(e, c);
61
- }), c.promise.then(() => {
62
- c.settled = !0;
63
- }, () => {
64
- c.settled = !0, this.evict(e, c);
65
- }).catch((e) => {
66
- throw console.error(e), e;
67
- }), this.cache.set(e, c);
68
- }
69
- static checkSinglePromise(e, t) {
70
- function n() {
71
- if (t?.aborted) throw Object.assign(/* @__PURE__ */ Error("aborted"), { code: "ERR_ABORTED" });
72
- }
73
- return e.then((e) => (n(), e), (e) => {
74
- throw n(), e;
75
- });
76
- }
77
- has(e) {
78
- return this.cache.has(e);
79
- }
80
- get(t, n, r, i) {
81
- if (!r && n instanceof AbortSignal) throw TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");
82
- let a = this.cache.get(t);
83
- return a ? a.aborted && !a.settled ? (this.evict(t, a), this.get(t, n, r, i)) : a.settled ? a.promise : (a.aborter.addSignal(r), a.statusReporter.addCallback(i), e.checkSinglePromise(a.promise, r)) : (this.fill(t, n, r, i), e.checkSinglePromise(this.cache.get(t).promise, r));
84
- }
85
- delete(e) {
86
- let t = this.cache.get(e);
87
- t && (t.settled || t.aborter.abort(), this.cache.delete(e));
88
- }
89
- clear() {
90
- let e = this.cache.keys(), t = 0;
91
- for (let n = e.next(); !n.done; n = e.next()) this.delete(n.value), t += 1;
92
- return t;
93
- }
94
- };
95
- //#endregion
96
- export { r as t };