@vitessce/vit-s 3.4.9 → 3.4.11

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/index.js CHANGED
@@ -24826,6 +24826,9 @@ const configSchema1_0_16 = configSchema1_0_13.extend({
24826
24826
  coordinationScopesBy: componentCoordinationScopesBy.optional()
24827
24827
  }))
24828
24828
  });
24829
+ const configSchema1_0_17 = configSchema1_0_16.extend({
24830
+ version: z.literal("1.0.17")
24831
+ });
24829
24832
  let getRandomValues;
24830
24833
  const rnds8 = new Uint8Array(16);
24831
24834
  function rng() {
@@ -25739,7 +25742,43 @@ function upgradeFrom1_0_15(config2) {
25739
25742
  version: "1.0.16"
25740
25743
  };
25741
25744
  }
25742
- const latestConfigSchema = configSchema1_0_16;
25745
+ function upgradeFrom1_0_16(config2) {
25746
+ const newConfig = cloneDeep(config2);
25747
+ const { datasets } = newConfig;
25748
+ const newDatasets = datasets.map((datasetDef) => {
25749
+ const { files } = datasetDef;
25750
+ const newFiles = files.map((fileDef) => {
25751
+ const { fileType, options } = fileDef;
25752
+ if (fileType === "obsSets.anndata.zarr") {
25753
+ return {
25754
+ ...fileDef,
25755
+ options: {
25756
+ obsSets: options
25757
+ }
25758
+ };
25759
+ }
25760
+ if (fileType === "obsFeatureColumns.anndata.zarr") {
25761
+ return {
25762
+ ...fileDef,
25763
+ options: {
25764
+ obsFeatureColumns: options
25765
+ }
25766
+ };
25767
+ }
25768
+ return fileDef;
25769
+ });
25770
+ return {
25771
+ ...datasetDef,
25772
+ files: newFiles
25773
+ };
25774
+ });
25775
+ return {
25776
+ ...newConfig,
25777
+ datasets: newDatasets,
25778
+ version: "1.0.17"
25779
+ };
25780
+ }
25781
+ const latestConfigSchema = configSchema1_0_17;
25743
25782
  const SCHEMA_HANDLERS = [
25744
25783
  [configSchema0_1_0, upgradeFrom0_1_0],
25745
25784
  [configSchema1_0_0, upgradeFrom1_0_0],
@@ -25757,7 +25796,8 @@ const SCHEMA_HANDLERS = [
25757
25796
  [configSchema1_0_12, upgradeFrom1_0_12],
25758
25797
  [configSchema1_0_13, upgradeFrom1_0_13],
25759
25798
  [configSchema1_0_14, upgradeFrom1_0_14],
25760
- [configSchema1_0_15, upgradeFrom1_0_15]
25799
+ [configSchema1_0_15, upgradeFrom1_0_15],
25800
+ [configSchema1_0_16, upgradeFrom1_0_16]
25761
25801
  ];
25762
25802
  var re$3 = { exports: {} };
25763
25803
  const SEMVER_SPEC_VERSION = "2.0.0";
@@ -27903,6 +27943,7 @@ const FileType$1 = {
27903
27943
  // Joint file types
27904
27944
  ANNDATA_ZARR: "anndata.zarr",
27905
27945
  ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
27946
+ ANNDATA_H5AD: "anndata.h5ad",
27906
27947
  SPATIALDATA_ZARR: "spatialdata.zarr",
27907
27948
  // Atomic file types
27908
27949
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -27943,6 +27984,18 @@ const FileType$1 = {
27943
27984
  OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
27944
27985
  FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
27945
27986
  SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
27987
+ // AnnData - h5ad via reference spec
27988
+ OBS_FEATURE_MATRIX_ANNDATA_H5AD: "obsFeatureMatrix.anndata.h5ad",
27989
+ OBS_FEATURE_COLUMNS_ANNDATA_H5AD: "obsFeatureColumns.anndata.h5ad",
27990
+ OBS_SETS_ANNDATA_H5AD: "obsSets.anndata.h5ad",
27991
+ OBS_EMBEDDING_ANNDATA_H5AD: "obsEmbedding.anndata.h5ad",
27992
+ OBS_SPOTS_ANNDATA_H5AD: "obsSpots.anndata.h5ad",
27993
+ OBS_POINTS_ANNDATA_H5AD: "obsPoints.anndata.h5ad",
27994
+ OBS_LOCATIONS_ANNDATA_H5AD: "obsLocations.anndata.h5ad",
27995
+ OBS_SEGMENTATIONS_ANNDATA_H5AD: "obsSegmentations.anndata.h5ad",
27996
+ OBS_LABELS_ANNDATA_H5AD: "obsLabels.anndata.h5ad",
27997
+ FEATURE_LABELS_ANNDATA_H5AD: "featureLabels.anndata.h5ad",
27998
+ SAMPLE_EDGES_ANNDATA_H5AD: "sampleEdges.anndata.h5ad",
27946
27999
  // SpatialData
27947
28000
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
27948
28001
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -28194,10 +28247,10 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
28194
28247
  CoordinationType$1.EMBEDDING_OBS_OPACITY
28195
28248
  ];
28196
28249
  const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
28197
- const version = "3.4.9";
28198
- const date = "2024-07-26";
28250
+ const version = "3.4.11";
28251
+ const date = "2024-09-27";
28199
28252
  const branch = "changeset-release/main";
28200
- const hash = "9582ddcf";
28253
+ const hash = "efd7d698";
28201
28254
  const META_VERSION = {
28202
28255
  note,
28203
28256
  version,
@@ -28369,10 +28422,11 @@ function makeConstantWithDeprecationMessage(currObj, oldObj) {
28369
28422
  const handler = {
28370
28423
  get(obj, prop) {
28371
28424
  const oldKeys = Object.keys(oldObj);
28372
- if (oldKeys.includes(prop)) {
28373
- console.warn(`Notice about the constant mapping ${prop}: '${oldObj[prop][0]}':
28374
- ${oldObj[prop][1]}`);
28375
- return oldObj[prop];
28425
+ const propKey = String(prop);
28426
+ if (oldKeys.includes(propKey)) {
28427
+ console.warn(`Notice about the constant mapping ${propKey}: '${oldObj[propKey][0]}':
28428
+ ${oldObj[propKey][1]}`);
28429
+ return oldObj[propKey];
28376
28430
  }
28377
28431
  return obj[prop];
28378
28432
  }
@@ -28528,7 +28582,7 @@ const annDataObsFeatureMatrix = z.object({
28528
28582
  featureFilterPath: z.string().optional().describe("If the feature index should be filtered, put a boolean column here (analogous to the previous geneFilter option). e.g., var/in_obsm_X_small_matrix"),
28529
28583
  initialFeatureFilterPath: z.string().optional().describe("If only a subset of the matrix should be loaded initially, put a boolean column along the feature axis here (analogous to the previous matrixGeneFilter option). e.g., var/highly_variable")
28530
28584
  });
28531
- const annDataObsSets = z.array(z.object({
28585
+ const annDataObsSetsArr = z.array(z.object({
28532
28586
  name: z.string().describe("The display name for the set, like 'Cell Type' or 'Louvain.'"),
28533
28587
  path: z.union([
28534
28588
  z.string().describe("The location in the AnnData store for the set, like 'obs/louvain' or 'obs/celltype.'"),
@@ -28536,9 +28590,15 @@ const annDataObsSets = z.array(z.object({
28536
28590
  ]),
28537
28591
  scorePath: z.string().optional().describe("The location in the AnnData store for the set confidence scores, like 'obs/celltype_prediction_score.'")
28538
28592
  }));
28539
- z.array(z.object({
28593
+ const annDataObsSets = z.object({
28594
+ obsSets: annDataObsSetsArr
28595
+ });
28596
+ const annDataObsFeatureColumnsArr = z.array(z.object({
28540
28597
  path: z.string()
28541
28598
  }));
28599
+ z.object({
28600
+ obsFeatureColumns: annDataObsFeatureColumnsArr
28601
+ });
28542
28602
  const annDataObsSpots = annDataObsm;
28543
28603
  const annDataObsPoints = annDataObsm;
28544
28604
  const annDataObsLocations = annDataObsm;
@@ -28661,7 +28721,7 @@ z.object({
28661
28721
  scoreColumn: z.string().optional()
28662
28722
  }))
28663
28723
  });
28664
- z.object({
28724
+ const anndataZarrSchema = z.object({
28665
28725
  obsLabels: z.union([
28666
28726
  annDataObsLabels,
28667
28727
  z.array(annDataConvenienceObsLabelsItem)
@@ -28671,7 +28731,7 @@ z.object({
28671
28731
  z.array(annDataConvenienceFeatureLabelsItem)
28672
28732
  ]),
28673
28733
  obsFeatureMatrix: annDataObsFeatureMatrix,
28674
- obsSets: annDataObsSets,
28734
+ obsSets: annDataObsSetsArr,
28675
28735
  obsSpots: annDataObsSpots,
28676
28736
  obsPoints: annDataObsPoints,
28677
28737
  obsLocations: annDataObsLocations,
@@ -28682,6 +28742,9 @@ z.object({
28682
28742
  ]),
28683
28743
  sampleEdges: annDataSampleEdges
28684
28744
  }).partial();
28745
+ anndataZarrSchema.extend({
28746
+ refSpecUrl: z.string()
28747
+ });
28685
28748
  z.object({
28686
28749
  // TODO: should `image` be a special schema
28687
28750
  // to allow specifying fileUid (like for embeddingType)?
@@ -36964,6 +37027,7 @@ function createLoaders(datasets, configDescription, fileTypes, coordinationTypes
36964
37027
  url,
36965
37028
  fileType,
36966
37029
  requestInit: requestInit2,
37030
+ refSpecUrl: options == null ? void 0 : options.refSpecUrl,
36967
37031
  // Optionally, pass a Zarrita store to the data source,
36968
37032
  // if one was mapped to this URL.
36969
37033
  store: stores == null ? void 0 : stores[url]
@@ -38116,6 +38180,9 @@ const CloseIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
38116
38180
  const CloudDownloadIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
38117
38181
  d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"
38118
38182
  }), "CloudDownload");
38183
+ const HelpIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
38184
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"
38185
+ }), "Help");
38119
38186
  const SettingsIcon = createSvgIcon(/* @__PURE__ */ React$6.createElement("path", {
38120
38187
  d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"
38121
38188
  }), "Settings");
@@ -38241,6 +38308,18 @@ const useStyles$1 = makeStyles((theme) => ({
38241
38308
  },
38242
38309
  downloadLink: {
38243
38310
  color: theme.palette.primaryForeground
38311
+ },
38312
+ helpTextSpan: {
38313
+ maxWidth: "400px",
38314
+ padding: "5px 10px",
38315
+ display: "inline-block",
38316
+ textAlign: "justify",
38317
+ fontSize: "14px",
38318
+ backgroundColor: theme.palette.gridLayoutBackground,
38319
+ color: theme.palette.tooltipText,
38320
+ borderRadius: "8px",
38321
+ boxShadow: "0 0 10px rgba(0, 0, 0, 0.2)",
38322
+ border: "10px solid grey"
38244
38323
  }
38245
38324
  }));
38246
38325
  function SettingsIconWithArrow({ open }) {
@@ -38294,6 +38373,24 @@ function DownloadOptions(props) {
38294
38373
  }
38295
38374
  ) : null;
38296
38375
  }
38376
+ function HelpButton(props) {
38377
+ const { helpText } = props;
38378
+ const [open, setOpen] = useState(false);
38379
+ const classes = useStyles$1();
38380
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
38381
+ PopperMenu,
38382
+ {
38383
+ open,
38384
+ setOpen,
38385
+ buttonIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(HelpIcon, {}),
38386
+ buttonClassName: classes.iconButton,
38387
+ placement: "bottom-end",
38388
+ "aria-label": "Open help info",
38389
+ withPaper: false,
38390
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classes.helpTextSpan, children: helpText })
38391
+ }
38392
+ );
38393
+ }
38297
38394
  function ClosePaneButton(props) {
38298
38395
  const { removeGridComponent } = props;
38299
38396
  const classes = useStyles$1();
@@ -38321,7 +38418,8 @@ function TitleInfo(props) {
38321
38418
  isReady,
38322
38419
  options,
38323
38420
  closeButtonVisible = true,
38324
- downloadButtonVisible = true
38421
+ downloadButtonVisible = true,
38422
+ helpText
38325
38423
  } = props;
38326
38424
  const classes = useTitleStyles();
38327
38425
  return (
@@ -38343,6 +38441,12 @@ function TitleInfo(props) {
38343
38441
  urls
38344
38442
  }
38345
38443
  ) : null,
38444
+ helpText ? /* @__PURE__ */ jsxRuntimeExports.jsx(
38445
+ HelpButton,
38446
+ {
38447
+ helpText
38448
+ }
38449
+ ) : null,
38346
38450
  closeButtonVisible && removeGridComponent ? /* @__PURE__ */ jsxRuntimeExports.jsx(
38347
38451
  ClosePaneButton,
38348
38452
  {
@@ -38366,7 +38470,7 @@ function TitleInfo(props) {
38366
38470
  "aria-busy": !isReady,
38367
38471
  role: "main",
38368
38472
  children: [
38369
- !isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingIndicator, {}),
38473
+ !isReady ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingIndicator, {}) : null,
38370
38474
  children2
38371
38475
  ]
38372
38476
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"AA6HA,mDAqDC"}
1
+ {"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"AA8JA,mDA2DC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import React, { useState, useMemo } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { makeStyles, MenuItem, IconButton, Link } from '@material-ui/core';
5
- import { CloudDownload as CloudDownloadIcon, ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon, Settings as SettingsIcon, Close as CloseIcon, } from '@material-ui/icons';
5
+ import { CloudDownload as CloudDownloadIcon, ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon, Settings as SettingsIcon, Close as CloseIcon, Help as HelpIcon, } from '@material-ui/icons';
6
6
  import { TOOLTIP_ANCESTOR } from './classNames.js';
7
7
  import LoadingIndicator from './LoadingIndicator.js';
8
8
  import { PopperMenu } from './shared-mui/components.js';
@@ -35,6 +35,18 @@ const useStyles = makeStyles(theme => ({
35
35
  downloadLink: {
36
36
  color: theme.palette.primaryForeground,
37
37
  },
38
+ helpTextSpan: {
39
+ maxWidth: '400px',
40
+ padding: '5px 10px',
41
+ display: 'inline-block',
42
+ textAlign: 'justify',
43
+ fontSize: '14px',
44
+ backgroundColor: theme.palette.gridLayoutBackground,
45
+ color: theme.palette.tooltipText,
46
+ borderRadius: '8px',
47
+ boxShadow: '0 0 10px rgba(0, 0, 0, 0.2)',
48
+ border: '10px solid grey',
49
+ },
38
50
  }));
39
51
  function SettingsIconWithArrow({ open }) {
40
52
  return (_jsxs(_Fragment, { children: [_jsx(SettingsIcon, {}), open ? _jsx(ArrowDropUpIcon, {}) : _jsx(ArrowDropDownIcon, {})] }));
@@ -56,21 +68,27 @@ function DownloadOptions(props) {
56
68
  const buttonIcon = useMemo(() => (_jsx(CloudDownloadIconWithArrow, { open: open })), [open]);
57
69
  return (urls && urls.length ? (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: buttonIcon, buttonClassName: classes.iconButton, placement: "bottom-end", "aria-label": "Open download options menu", children: urls.map(({ url, name }) => (_jsx(MenuItem, { dense: true, "aria-label": `Click to download ${name}`, children: _jsxs(Link, { underline: "always", href: url, target: "_blank", rel: "noopener", className: classes.downloadLink, children: ["Download ", name] }) }, `${url}_${name}`))) })) : null);
58
70
  }
71
+ function HelpButton(props) {
72
+ const { helpText } = props;
73
+ const [open, setOpen] = useState(false);
74
+ const classes = useStyles();
75
+ return (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: _jsx(HelpIcon, {}), buttonClassName: classes.iconButton, placement: "bottom-end", "aria-label": "Open help info", withPaper: false, children: _jsx("span", { className: classes.helpTextSpan, children: helpText }) }));
76
+ }
59
77
  function ClosePaneButton(props) {
60
78
  const { removeGridComponent } = props;
61
79
  const classes = useStyles();
62
80
  return (_jsx(IconButton, { onClick: removeGridComponent, size: "small", className: classes.iconButton, title: "close", "aria-label": "Close panel button", children: _jsx(CloseIcon, {}) }));
63
81
  }
64
82
  export function TitleInfo(props) {
65
- const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, closeButtonVisible = true, downloadButtonVisible = true, } = props;
83
+ const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, closeButtonVisible = true, downloadButtonVisible = true, helpText, } = props;
66
84
  const classes = useTitleStyles();
67
85
  return (
68
86
  // d-flex without wrapping div is not always full height; I don't understand the root cause.
69
- _jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, role: "banner", children: [_jsx("div", { className: classes.titleLeft, role: "heading", "aria-level": "1", children: title }), _jsx("div", { className: classes.titleInfo, title: info, role: "note", children: info }), _jsxs("div", { className: classes.titleButtons, role: "toolbar", "aria-label": "Plot options and controls", children: [_jsx(PlotOptions, { options: options }), downloadButtonVisible ? (_jsx(DownloadOptions, { urls: urls })) : null, closeButtonVisible && removeGridComponent ? (_jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })) : null] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
87
+ _jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, role: "banner", children: [_jsx("div", { className: classes.titleLeft, role: "heading", "aria-level": "1", children: title }), _jsx("div", { className: classes.titleInfo, title: info, role: "note", children: info }), _jsxs("div", { className: classes.titleButtons, role: "toolbar", "aria-label": "Plot options and controls", children: [_jsx(PlotOptions, { options: options }), downloadButtonVisible ? (_jsx(DownloadOptions, { urls: urls })) : null, helpText ? (_jsx(HelpButton, { helpText: helpText })) : null, closeButtonVisible && removeGridComponent ? (_jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })) : null] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
70
88
  [classes.scrollCard]: isScroll,
71
89
  [classes.spatialCard]: isSpatial,
72
90
  [classes.noScrollCard]: !isScroll && !isSpatial,
73
- }), "aria-busy": !isReady, role: "main", children: [!isReady && _jsx(LoadingIndicator, {}), children] })] })
91
+ }), "aria-busy": !isReady, role: "main", children: [!isReady ? _jsx(LoadingIndicator, {}) : null, children] })] })
74
92
  // "pl-2" only matters when the window is very narrow.
75
93
  );
76
94
  }
@@ -1,2 +1,2 @@
1
- export function Warning(props: any): import("../../plugins/node_modules/@types/react/index.js").JSX.Element;
1
+ export function Warning(props: any): import("react").JSX.Element;
2
2
  //# sourceMappingURL=Warning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Warning.d.ts","sourceRoot":"","sources":["../src/Warning.js"],"names":[],"mappings":"AAyCA,4GAoBC"}
1
+ {"version":3,"file":"Warning.d.ts","sourceRoot":"","sources":["../src/Warning.js"],"names":[],"mappings":"AAyCA,iEAoBC"}
@@ -287,9 +287,9 @@ export function useEmitGridResize(): Function;
287
287
  export const ViewConfigProvider: ({ initialStore, createStore, children, }: {
288
288
  initialStore?: import("zustand").UseBoundStore<object> | undefined;
289
289
  createStore: () => import("zustand").UseBoundStore<object>;
290
- children: import("../../../plugins/node_modules/@types/react/index.js").ReactNode;
291
- }) => import("../../../plugins/node_modules/@types/react/index.js").FunctionComponentElement<import("../../../plugins/node_modules/@types/react/index.js").ProviderProps<import("zustand").UseBoundStore<object> | undefined>>;
292
- export const useViewConfigStore: import("zustand/context.js").UseContextStore<object>;
290
+ children: import("react").ReactNode;
291
+ }) => import("react").FunctionComponentElement<import("react").ProviderProps<import("zustand").UseBoundStore<object> | undefined>>;
292
+ export const useViewConfigStore: import("zustand/context").UseContextStore<object>;
293
293
  export const useViewConfigStoreApi: () => {
294
294
  getState: import("zustand").GetState<object>;
295
295
  setState: import("zustand").SetState<object>;
@@ -299,9 +299,9 @@ export const useViewConfigStoreApi: () => {
299
299
  export const AuxiliaryProvider: ({ initialStore, createStore, children, }: {
300
300
  initialStore?: import("zustand").UseBoundStore<object> | undefined;
301
301
  createStore: () => import("zustand").UseBoundStore<object>;
302
- children: import("../../../plugins/node_modules/@types/react/index.js").ReactNode;
303
- }) => import("../../../plugins/node_modules/@types/react/index.js").FunctionComponentElement<import("../../../plugins/node_modules/@types/react/index.js").ProviderProps<import("zustand").UseBoundStore<object> | undefined>>;
304
- export const useAuxiliaryStore: import("zustand/context.js").UseContextStore<object>;
302
+ children: import("react").ReactNode;
303
+ }) => import("react").FunctionComponentElement<import("react").ProviderProps<import("zustand").UseBoundStore<object> | undefined>>;
304
+ export const useAuxiliaryStore: import("zustand/context").UseContextStore<object>;
305
305
  export function createViewConfigStore(initialLoaders: any, initialConfig: any): Function;
306
306
  export function useComponentLayout(component: any, scopes: any, coordinationScopes: any): Object;
307
307
  export function createAuxiliaryStore(): Function;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/state/hooks.js"],"names":[],"mappings":"AAmCA;;;;;;GAMG;AACH,8CAJW,GAAC,mBAEC,MAAM,GAAC,SAAS,CA4B5B;AAED;;;;;;;GAOG;AACH,gDALW,GAAC,wBACD,GAAC,qBAEC,MAAM,GAAC,SAAS,CA0C5B;AAED;;;;;GAKG;AACH,6CAJW,MAAM,sBACN,GAAC,GACC,MAAM,GAAC,SAAS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;;;;GAKG;AACH,0CAEC;AAED;;;;;GAKG;AACH,iDAEC;AAED;;;;;GAKG;AACH,oEAIC;AAED;;;;;GAKG;AACH,qCAHa,MAAM,CAKlB;AAED;;;;;GAKG;AACH,iDAEC;AAED;;;;;GAKG;AACH,8BAHa,MAAM,CAKlB;AAED;;;;;GAKG;AACH,0CAEC;AAED;;;;;GAKG;AACH,iDAHa,MAAM,CAKlB;AAED;;;;;GAKG;AACH,6DAOC;AAED;;;;GAIG;AACH,iCAFa,MAAM,CAIlB;AAED;;;;;GAKG;AACH,8CAEC;AA5oCD;;;;+NAA0D;AAC1D,sFAA0D;AAC1D;;;;;EAAgE;AAOhE;;;;+NAAwD;AACxD,qFAAwD;AAiIjD,yFA+KJ;AAOI,0FAFM,MAAM,CAOlB;AAcM,iDAUJ"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/state/hooks.js"],"names":[],"mappings":"AAmCA;;;;;;GAMG;AACH,8CAJW,GAAC,mBAEC,MAAM,GAAC,SAAS,CA4B5B;AAED;;;;;;;GAOG;AACH,gDALW,GAAC,wBACD,GAAC,qBAEC,MAAM,GAAC,SAAS,CA0C5B;AAED;;;;;GAKG;AACH,6CAJW,MAAM,sBACN,GAAC,GACC,MAAM,GAAC,SAAS,CAI5B;AAED;;;;;;GAMG;AACH,+CALW,MAAM,mDACN,GAAC,wBACD,GAAC,GACC,MAAM,GAAC,SAAS,CAc5B;AA4RD;;;;;;;;;GASG;AACH,mDALW,MAAM,EAAE,sBACR,MAAM,GAEJ,MAAM,CAclB;AAED;;;;;;;;;;;;;;;GAeG;AACH,4CATW,MAAM,EAAE,sBACR,MAAM,GAEJ,KAAK,CAmCjB;AAED,yFAKC;AAED,gGAqBC;AAED,0IA4BC;AAED,iJAkEC;AAED,yFAmBC;AAED;;;;GAIG;AACH,mDAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;;;;;;;GAaG;AACH,mDAXW,MAAM,EAAE,sBACR,MAAM,wBACN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;;;mIAAwD;AACxD,kFAAwD;AAiIjD,yFA+KJ;AAOI,0FAFM,MAAM,CAOlB;AAcM,iDAUJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"vitessce-grid-utils.d.ts","sourceRoot":"","sources":["../src/vitessce-grid-utils.js"],"names":[],"mappings":"AAyCA,gHA6CC;AA4BD;;;;;;;;;;GAUG;AACH,wCATW,MAAM,EAAE,qBACR,MAAM,aAEN,cAAc,EAAE,qBAChB,sBAAsB,EAAE,UACxB,MAAM,GACJ,MAAM,CA6DlB"}
1
+ {"version":3,"file":"vitessce-grid-utils.d.ts","sourceRoot":"","sources":["../src/vitessce-grid-utils.js"],"names":[],"mappings":"AAyCA,gHA6CC;AA4BD;;;;;;;;;;GAUG;AACH,wCATW,MAAM,EAAE,qBACR,MAAM,aAEN,cAAc,EAAE,qBAChB,sBAAsB,EAAE,UACxB,MAAM,GACJ,MAAM,CA8DlB"}
@@ -132,6 +132,7 @@ export function createLoaders(datasets, configDescription, fileTypes, coordinati
132
132
  url,
133
133
  fileType,
134
134
  requestInit,
135
+ refSpecUrl: options?.refSpecUrl,
135
136
  // Optionally, pass a Zarrita store to the data source,
136
137
  // if one was mapped to this URL.
137
138
  store: stores?.[url],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/vit-s",
3
- "version": "3.4.9",
3
+ "version": "3.4.11",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -29,12 +29,12 @@
29
29
  "uuid": "^9.0.0",
30
30
  "zustand": "^3.5.10",
31
31
  "react-aria": "^3.28.0",
32
- "@vitessce/constants-internal": "3.4.9",
33
- "@vitessce/plugins": "3.4.9",
34
- "@vitessce/schemas": "3.4.9",
35
- "@vitessce/utils": "3.4.9",
36
- "@vitessce/sets-utils": "3.4.9",
37
- "@vitessce/config": "3.4.9"
32
+ "@vitessce/constants-internal": "3.4.11",
33
+ "@vitessce/plugins": "3.4.11",
34
+ "@vitessce/schemas": "3.4.11",
35
+ "@vitessce/utils": "3.4.11",
36
+ "@vitessce/sets-utils": "3.4.11",
37
+ "@vitessce/config": "3.4.11"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@testing-library/jest-dom": "^5.16.4",
@@ -42,7 +42,7 @@
42
42
  "react": "^18.0.0",
43
43
  "vite": "^4.3.0",
44
44
  "vitest": "^0.32.2",
45
- "@vitessce/types": "3.4.9"
45
+ "@vitessce/types": "3.4.11"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
package/src/TitleInfo.js CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  ArrowDropUp as ArrowDropUpIcon,
8
8
  Settings as SettingsIcon,
9
9
  Close as CloseIcon,
10
+ Help as HelpIcon,
10
11
  } from '@material-ui/icons';
11
12
 
12
13
  import { TOOLTIP_ANCESTOR } from './classNames.js';
@@ -42,6 +43,18 @@ const useStyles = makeStyles(theme => ({
42
43
  downloadLink: {
43
44
  color: theme.palette.primaryForeground,
44
45
  },
46
+ helpTextSpan: {
47
+ maxWidth: '400px',
48
+ padding: '5px 10px',
49
+ display: 'inline-block',
50
+ textAlign: 'justify',
51
+ fontSize: '14px',
52
+ backgroundColor: theme.palette.gridLayoutBackground,
53
+ color: theme.palette.tooltipText,
54
+ borderRadius: '8px',
55
+ boxShadow: '0 0 10px rgba(0, 0, 0, 0.2)',
56
+ border: '10px solid grey',
57
+ },
45
58
  }));
46
59
 
47
60
  function SettingsIconWithArrow({ open }) {
@@ -107,6 +120,26 @@ function DownloadOptions(props) {
107
120
  ) : null);
108
121
  }
109
122
 
123
+ function HelpButton(props) {
124
+ const { helpText } = props;
125
+ const [open, setOpen] = useState(false);
126
+ const classes = useStyles();
127
+ return (
128
+ <PopperMenu
129
+ open={open}
130
+ setOpen={setOpen}
131
+ buttonIcon={<HelpIcon />}
132
+ buttonClassName={classes.iconButton}
133
+ placement="bottom-end"
134
+ aria-label="Open help info"
135
+ withPaper={false}
136
+ >
137
+ <span className={classes.helpTextSpan}>{helpText}</span>
138
+ </PopperMenu>
139
+ );
140
+ }
141
+
142
+
110
143
  function ClosePaneButton(props) {
111
144
  const { removeGridComponent } = props;
112
145
  const classes = useStyles();
@@ -127,6 +160,7 @@ export function TitleInfo(props) {
127
160
  const {
128
161
  title, info, children, isScroll, isSpatial, removeGridComponent, urls,
129
162
  isReady, options, closeButtonVisible = true, downloadButtonVisible = true,
163
+ helpText,
130
164
  } = props;
131
165
 
132
166
  const classes = useTitleStyles();
@@ -150,6 +184,11 @@ export function TitleInfo(props) {
150
184
  urls={urls}
151
185
  />
152
186
  ) : null}
187
+ {helpText ? (
188
+ <HelpButton
189
+ helpText={helpText}
190
+ />
191
+ ) : null}
153
192
  {closeButtonVisible && removeGridComponent ? (
154
193
  <ClosePaneButton
155
194
  removeGridComponent={removeGridComponent}
@@ -170,7 +209,7 @@ export function TitleInfo(props) {
170
209
  aria-busy={!isReady}
171
210
  role="main"
172
211
  >
173
- { !isReady && <LoadingIndicator /> }
212
+ { !isReady ? <LoadingIndicator /> : null }
174
213
  {children}
175
214
  </div>
176
215
  </>
@@ -164,6 +164,7 @@ export function createLoaders(datasets, configDescription, fileTypes, coordinati
164
164
  url,
165
165
  fileType,
166
166
  requestInit,
167
+ refSpecUrl: options?.refSpecUrl,
167
168
  // Optionally, pass a Zarrita store to the data source,
168
169
  // if one was mapped to this URL.
169
170
  store: stores?.[url],