@vitessce/vit-s 3.9.6 → 3.9.7

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
@@ -17852,6 +17852,11 @@ const CloseIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
17852
17852
  const CloudDownloadIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
17853
17853
  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.96M17 13l-5 5-5-5h3V9h4v4z"
17854
17854
  }), "CloudDownload");
17855
+ const MenuBookIcon = createSvgIcon([/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
17856
+ d: "M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"
17857
+ }, "0"), /* @__PURE__ */ jsxRuntimeExports.jsx("path", {
17858
+ d: "M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"
17859
+ }, "1")], "MenuBook");
17855
17860
  const HelpIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
17856
17861
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.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.25"
17857
17862
  }), "Help");
@@ -35109,7 +35114,7 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
35109
35114
  CoordinationType$1.HIERARCHY_LEVELS
35110
35115
  ]
35111
35116
  });
35112
- const version = "3.9.6";
35117
+ const version = "3.9.7";
35113
35118
  const META_VERSION = {
35114
35119
  version
35115
35120
  };
@@ -46502,7 +46507,7 @@ function DownloadOptions(props) {
46502
46507
  ) : null;
46503
46508
  }
46504
46509
  function HelpButton(props) {
46505
- const { helpText } = props;
46510
+ const { helpText, guideUrl } = props;
46506
46511
  const [open2, setOpen] = useState(false);
46507
46512
  const { classes } = useStyles$1();
46508
46513
  return /* @__PURE__ */ React__default.createElement(
@@ -46517,7 +46522,20 @@ function HelpButton(props) {
46517
46522
  "aria-label": "Open help info",
46518
46523
  withPaper: false
46519
46524
  },
46520
- /* @__PURE__ */ React__default.createElement("span", { className: classes.helpTextSpan }, helpText)
46525
+ /* @__PURE__ */ React__default.createElement("span", { className: classes.helpTextSpan }, helpText, guideUrl ? /* @__PURE__ */ React__default.createElement(
46526
+ IconButton,
46527
+ {
46528
+ component: "a",
46529
+ href: guideUrl,
46530
+ target: "_blank",
46531
+ rel: "noopener noreferrer",
46532
+ size: "small",
46533
+ className: classes.iconButton,
46534
+ title: "Open Navigation Guide",
46535
+ "aria-label": "Open navigation guide"
46536
+ },
46537
+ /* @__PURE__ */ React__default.createElement(MenuBookIcon, null)
46538
+ ) : null)
46521
46539
  );
46522
46540
  }
46523
46541
  function ErrorInfo(props) {
@@ -46580,7 +46598,8 @@ function TitleInfo(props) {
46580
46598
  downloadButtonVisible = true,
46581
46599
  helpText,
46582
46600
  withPadding = true,
46583
- errors: errorsProp
46601
+ errors: errorsProp,
46602
+ guideUrl
46584
46603
  } = props;
46585
46604
  const errors = errorsProp == null ? void 0 : errorsProp.filter(Boolean);
46586
46605
  const { classes } = useTitleStyles();
@@ -46605,7 +46624,8 @@ function TitleInfo(props) {
46605
46624
  ) : null, helpText ? /* @__PURE__ */ React__default.createElement(
46606
46625
  HelpButton,
46607
46626
  {
46608
- helpText
46627
+ helpText,
46628
+ guideUrl
46609
46629
  }
46610
46630
  ) : null, closeButtonVisible && removeGridComponent ? /* @__PURE__ */ React__default.createElement(
46611
46631
  ClosePaneButton,
@@ -1 +1 @@
1
- {"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"AAmNA,mDAwEC"}
1
+ {"version":3,"file":"TitleInfo.d.ts","sourceRoot":"","sources":["../src/TitleInfo.js"],"names":[],"mappings":"AAqOA,mDAyEC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useState, useMemo } from 'react';
3
3
  import clsx from 'clsx';
4
- import { makeStyles, MenuItem, IconButton, Link, List, Alert, CloudDownload as CloudDownloadIcon, ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon, Settings as SettingsIcon, Close as CloseIcon, Help as HelpIcon, Warning as WarningIcon, } from '@vitessce/styles';
4
+ import { makeStyles, MenuItem, IconButton, Link, List, Alert, CloudDownload as CloudDownloadIcon, ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon, Settings as SettingsIcon, Close as CloseIcon, Help as HelpIcon, Warning as WarningIcon, MenuBook as MenuBookIcon, } from '@vitessce/styles';
5
5
  import { TOOLTIP_ANCESTOR } from './classNames.js';
6
6
  import LoadingIndicator from './LoadingIndicator.js';
7
7
  import { PopperMenu } from './shared-mui/components.js';
@@ -80,10 +80,10 @@ function DownloadOptions(props) {
80
80
  return (urls && urls.length ? (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: buttonIcon, buttonClassName: classes.iconButton, placement: "bottom-end", title: "Download Options", "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);
81
81
  }
82
82
  function HelpButton(props) {
83
- const { helpText } = props;
83
+ const { helpText, guideUrl } = props;
84
84
  const [open, setOpen] = useState(false);
85
85
  const { classes } = useStyles();
86
- return (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: _jsx(HelpIcon, {}), buttonClassName: classes.iconButton, placement: "bottom-end", title: "Help Info", "aria-label": "Open help info", withPaper: false, children: _jsx("span", { className: classes.helpTextSpan, children: helpText }) }));
86
+ return (_jsx(PopperMenu, { open: open, setOpen: setOpen, buttonIcon: _jsx(HelpIcon, {}), buttonClassName: classes.iconButton, placement: "bottom-end", title: "Help Info", "aria-label": "Open help info", withPaper: false, children: _jsxs("span", { className: classes.helpTextSpan, children: [helpText, guideUrl ? (_jsx(IconButton, { component: "a", href: guideUrl, target: "_blank", rel: "noopener noreferrer", size: "small", className: classes.iconButton, title: "Open Navigation Guide", "aria-label": "Open navigation guide", children: _jsx(MenuBookIcon, {}) })) : null] }) }));
87
87
  }
88
88
  function ErrorInfo(props) {
89
89
  const { errors } = props;
@@ -99,13 +99,13 @@ function ClosePaneButton(props) {
99
99
  return (_jsx(IconButton, { onClick: removeGridComponent, size: "small", className: classes.iconButton, title: "Close View", "aria-label": "Close panel button", children: _jsx(CloseIcon, {}) }));
100
100
  }
101
101
  export function TitleInfo(props) {
102
- const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, closeButtonVisible = true, downloadButtonVisible = true, helpText, withPadding = true, errors: errorsProp, } = props;
102
+ const { title, info, children, isScroll, isSpatial, removeGridComponent, urls, isReady, options, closeButtonVisible = true, downloadButtonVisible = true, helpText, withPadding = true, errors: errorsProp, guideUrl, } = props;
103
103
  const errors = errorsProp?.filter(Boolean);
104
104
  const { classes } = useTitleStyles();
105
105
  const hasInfoText = Boolean(info);
106
106
  return (
107
107
  // d-flex without wrapping div is not always full height; I don't understand the root cause.
108
- _jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, role: "banner", children: [_jsx("div", { className: classes.titleLeft, role: "heading", "aria-level": "1", children: title }), _jsxs("div", { className: classes.titleButtons, role: "toolbar", "aria-label": "Plot options and controls", children: [_jsx(PlotOptions, { options: options }), downloadButtonVisible ? (_jsx(DownloadOptions, { urls: urls })) : null, Array.isArray(errors) && errors.length > 0 ? (_jsx(ErrorInfo, { errors: errors })) : null, helpText ? (_jsx(HelpButton, { helpText: helpText })) : null, closeButtonVisible && removeGridComponent ? (_jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })) : null] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
108
+ _jsxs(_Fragment, { children: [_jsxs("div", { className: classes.title, role: "banner", children: [_jsx("div", { className: classes.titleLeft, role: "heading", "aria-level": "1", children: title }), _jsxs("div", { className: classes.titleButtons, role: "toolbar", "aria-label": "Plot options and controls", children: [_jsx(PlotOptions, { options: options }), downloadButtonVisible ? (_jsx(DownloadOptions, { urls: urls })) : null, Array.isArray(errors) && errors.length > 0 ? (_jsx(ErrorInfo, { errors: errors })) : null, helpText ? (_jsx(HelpButton, { helpText: helpText, guideUrl: guideUrl })) : null, closeButtonVisible && removeGridComponent ? (_jsx(ClosePaneButton, { removeGridComponent: removeGridComponent })) : null] })] }), _jsxs("div", { className: clsx(TOOLTIP_ANCESTOR, classes.card, {
109
109
  [classes.scrollCard]: isScroll,
110
110
  [classes.spatialCard]: isSpatial,
111
111
  [classes.noScrollCard]: !isScroll && !isSpatial,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/vit-s",
3
- "version": "3.9.6",
3
+ "version": "3.9.7",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -31,17 +31,17 @@
31
31
  "react-error-boundary": "^5.0.0",
32
32
  "@placemarkio/flat-drop-files": "^1.0.2",
33
33
  "zarrita": "0.6.1",
34
- "@vitessce/styles": "3.9.6",
35
- "@vitessce/error": "3.9.6",
36
- "@vitessce/abstract": "3.9.6",
37
- "@vitessce/plugins": "3.9.6",
38
- "@vitessce/constants-internal": "3.9.6",
39
- "@vitessce/schemas": "3.9.6",
40
- "@vitessce/utils": "3.9.6",
41
- "@vitessce/sets-utils": "3.9.6",
42
- "@vitessce/zarr-utils": "3.9.6",
43
- "@vitessce/config": "3.9.6",
44
- "@vitessce/globals": "3.9.6"
34
+ "@vitessce/styles": "3.9.7",
35
+ "@vitessce/abstract": "3.9.7",
36
+ "@vitessce/error": "3.9.7",
37
+ "@vitessce/plugins": "3.9.7",
38
+ "@vitessce/schemas": "3.9.7",
39
+ "@vitessce/utils": "3.9.7",
40
+ "@vitessce/constants-internal": "3.9.7",
41
+ "@vitessce/sets-utils": "3.9.7",
42
+ "@vitessce/config": "3.9.7",
43
+ "@vitessce/zarr-utils": "3.9.7",
44
+ "@vitessce/globals": "3.9.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@testing-library/jest-dom": "^6.6.3",
@@ -50,7 +50,7 @@
50
50
  "react-dom": "18.3.1",
51
51
  "vite": "^7.0.0",
52
52
  "vitest": "^3.1.4",
53
- "@vitessce/types": "3.9.6"
53
+ "@vitessce/types": "3.9.7"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
package/src/TitleInfo.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  Close as CloseIcon,
15
15
  Help as HelpIcon,
16
16
  Warning as WarningIcon,
17
+ MenuBook as MenuBookIcon,
17
18
  } from '@vitessce/styles';
18
19
 
19
20
  import { TOOLTIP_ANCESTOR } from './classNames.js';
@@ -141,7 +142,7 @@ function DownloadOptions(props) {
141
142
  }
142
143
 
143
144
  function HelpButton(props) {
144
- const { helpText } = props;
145
+ const { helpText, guideUrl } = props;
145
146
  const [open, setOpen] = useState(false);
146
147
  const { classes } = useStyles();
147
148
  return (
@@ -155,7 +156,23 @@ function HelpButton(props) {
155
156
  aria-label="Open help info"
156
157
  withPaper={false}
157
158
  >
158
- <span className={classes.helpTextSpan}>{helpText}</span>
159
+ <span className={classes.helpTextSpan}>
160
+ {helpText}
161
+ {guideUrl ? (
162
+ <IconButton
163
+ component="a"
164
+ href={guideUrl}
165
+ target="_blank"
166
+ rel="noopener noreferrer"
167
+ size="small"
168
+ className={classes.iconButton}
169
+ title="Open Navigation Guide"
170
+ aria-label="Open navigation guide"
171
+ >
172
+ <MenuBookIcon />
173
+ </IconButton>
174
+ ) : null}
175
+ </span>
159
176
  </PopperMenu>
160
177
  );
161
178
  }
@@ -209,11 +226,12 @@ function ClosePaneButton(props) {
209
226
  );
210
227
  }
211
228
 
229
+
212
230
  export function TitleInfo(props) {
213
231
  const {
214
232
  title, info, children, isScroll, isSpatial, removeGridComponent, urls,
215
233
  isReady, options, closeButtonVisible = true, downloadButtonVisible = true,
216
- helpText, withPadding = true, errors: errorsProp,
234
+ helpText, withPadding = true, errors: errorsProp, guideUrl,
217
235
  } = props;
218
236
 
219
237
  const errors = errorsProp?.filter(Boolean);
@@ -245,6 +263,7 @@ export function TitleInfo(props) {
245
263
  {helpText ? (
246
264
  <HelpButton
247
265
  helpText={helpText}
266
+ guideUrl={guideUrl}
248
267
  />
249
268
  ) : null}
250
269
  {closeButtonVisible && removeGridComponent ? (