@vitessce/vit-s 3.9.6 → 3.9.8

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");
@@ -22675,6 +22680,12 @@ function transformEntriesForZipFileStore(entries) {
22675
22680
  }));
22676
22681
  return newEntries;
22677
22682
  }
22683
+ function flattenOmeAttrs(rootAttrs) {
22684
+ if (rootAttrs && typeof rootAttrs.ome === "object" && rootAttrs.ome !== null) {
22685
+ return { ...rootAttrs.ome, ...rootAttrs };
22686
+ }
22687
+ return rootAttrs;
22688
+ }
22678
22689
  var Subscribable = class {
22679
22690
  constructor() {
22680
22691
  this.listeners = /* @__PURE__ */ new Set();
@@ -34101,6 +34112,7 @@ const CoordinationType$1 = {
34101
34112
  SPATIAL_LAYER_MODEL_MATRIX: "spatialLayerModelMatrix",
34102
34113
  SPATIAL_SEGMENTATION_FILLED: "spatialSegmentationFilled",
34103
34114
  SPATIAL_SEGMENTATION_STROKE_WIDTH: "spatialSegmentationStrokeWidth",
34115
+ SPATIAL_POINT_STROKE_WIDTH: "spatialPointStrokeWidth",
34104
34116
  SPATIAL_CHANNEL_COLOR: "spatialChannelColor",
34105
34117
  SPATIAL_CHANNEL_VISIBLE: "spatialChannelVisible",
34106
34118
  SPATIAL_CHANNEL_OPACITY: "spatialChannelOpacity",
@@ -34471,7 +34483,8 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
34471
34483
  CoordinationType$1.SPATIAL_CHANNEL_COLOR,
34472
34484
  CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
34473
34485
  CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
34474
- CoordinationType$1.LEGEND_VISIBLE
34486
+ CoordinationType$1.LEGEND_VISIBLE,
34487
+ CoordinationType$1.SPATIAL_POINT_STROKE_WIDTH
34475
34488
  ],
34476
34489
  [ViewType$1.SCATTERPLOT]: [
34477
34490
  CoordinationType$1.DATASET,
@@ -34855,6 +34868,7 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
34855
34868
  CoordinationType$1.SPATIAL_CHANNEL_COLOR,
34856
34869
  CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
34857
34870
  CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
34871
+ CoordinationType$1.SPATIAL_POINT_STROKE_WIDTH,
34858
34872
  CoordinationType$1.IMAGE_CHANNEL,
34859
34873
  CoordinationType$1.IMAGE_LAYER,
34860
34874
  CoordinationType$1.SEGMENTATION_CHANNEL,
@@ -35109,7 +35123,7 @@ const AUTO_INDEPENDENT_COORDINATION_TYPES = [
35109
35123
  CoordinationType$1.HIERARCHY_LEVELS
35110
35124
  ]
35111
35125
  });
35112
- const version = "3.9.6";
35126
+ const version = "3.9.8";
35113
35127
  const META_VERSION = {
35114
35128
  version
35115
35129
  };
@@ -35602,6 +35616,8 @@ z.object({
35602
35616
  // projectionScale: z.number(),
35603
35617
  // position: z.array(z.number()).length(3),
35604
35618
  // projectionOrientation: z.array(z.number()).length(4),
35619
+ subsources: z.record(z.boolean()).describe("Subsources are the individual data components of a source (e.g. meshes, skeletons, etc.). Each entry explicitly enables or disables a subsource.").optional(),
35620
+ enableDefaultSubsources: z.boolean().describe("When true (default), automatically loads all subsources (defined in mesh metadata), when false loads what is explicitly enabled in `subsources`.").optional()
35605
35621
  }).partial().nullable();
35606
35622
  z.object({
35607
35623
  projectionAnnotationSpacing: z.number(),
@@ -36862,7 +36878,8 @@ class SpatialDataAutoConfig extends AbstractAutoConfig {
36862
36878
  availableElements.forEach(({ path, attrs }) => {
36863
36879
  var _a3, _b2, _c2, _d2, _e2;
36864
36880
  const relPath = path.substring(1);
36865
- const firstCoordinateSystem = (_e2 = (_d2 = (_c2 = (_b2 = (_a3 = attrs == null ? void 0 : attrs.multiscales) == null ? void 0 : _a3[0]) == null ? void 0 : _b2.coordinateTransformations) == null ? void 0 : _c2[0]) == null ? void 0 : _d2.output) == null ? void 0 : _e2.name;
36881
+ const omeAttrs = flattenOmeAttrs(attrs);
36882
+ const firstCoordinateSystem = (_e2 = (_d2 = (_c2 = (_b2 = (_a3 = omeAttrs == null ? void 0 : omeAttrs.multiscales) == null ? void 0 : _a3[0]) == null ? void 0 : _b2.coordinateTransformations) == null ? void 0 : _c2[0]) == null ? void 0 : _d2.output) == null ? void 0 : _e2.name;
36866
36883
  if (relPath.match(/^(images)\/([^/]*)$/)) {
36867
36884
  options.image = {
36868
36885
  path: relPath,
@@ -46502,7 +46519,7 @@ function DownloadOptions(props) {
46502
46519
  ) : null;
46503
46520
  }
46504
46521
  function HelpButton(props) {
46505
- const { helpText } = props;
46522
+ const { helpText, guideUrl } = props;
46506
46523
  const [open2, setOpen] = useState(false);
46507
46524
  const { classes } = useStyles$1();
46508
46525
  return /* @__PURE__ */ React__default.createElement(
@@ -46517,7 +46534,20 @@ function HelpButton(props) {
46517
46534
  "aria-label": "Open help info",
46518
46535
  withPaper: false
46519
46536
  },
46520
- /* @__PURE__ */ React__default.createElement("span", { className: classes.helpTextSpan }, helpText)
46537
+ /* @__PURE__ */ React__default.createElement("span", { className: classes.helpTextSpan }, helpText, guideUrl ? /* @__PURE__ */ React__default.createElement(
46538
+ IconButton,
46539
+ {
46540
+ component: "a",
46541
+ href: guideUrl,
46542
+ target: "_blank",
46543
+ rel: "noopener noreferrer",
46544
+ size: "small",
46545
+ className: classes.iconButton,
46546
+ title: "Open Navigation Guide",
46547
+ "aria-label": "Open navigation guide"
46548
+ },
46549
+ /* @__PURE__ */ React__default.createElement(MenuBookIcon, null)
46550
+ ) : null)
46521
46551
  );
46522
46552
  }
46523
46553
  function ErrorInfo(props) {
@@ -46580,7 +46610,8 @@ function TitleInfo(props) {
46580
46610
  downloadButtonVisible = true,
46581
46611
  helpText,
46582
46612
  withPadding = true,
46583
- errors: errorsProp
46613
+ errors: errorsProp,
46614
+ guideUrl
46584
46615
  } = props;
46585
46616
  const errors = errorsProp == null ? void 0 : errorsProp.filter(Boolean);
46586
46617
  const { classes } = useTitleStyles();
@@ -46605,7 +46636,8 @@ function TitleInfo(props) {
46605
46636
  ) : null, helpText ? /* @__PURE__ */ React__default.createElement(
46606
46637
  HelpButton,
46607
46638
  {
46608
- helpText
46639
+ helpText,
46640
+ guideUrl
46609
46641
  }
46610
46642
  ) : null, closeButtonVisible && removeGridComponent ? /* @__PURE__ */ React__default.createElement(
46611
46643
  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.8",
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.8",
35
+ "@vitessce/error": "3.9.8",
36
+ "@vitessce/constants-internal": "3.9.8",
37
+ "@vitessce/utils": "3.9.8",
38
+ "@vitessce/schemas": "3.9.8",
39
+ "@vitessce/sets-utils": "3.9.8",
40
+ "@vitessce/abstract": "3.9.8",
41
+ "@vitessce/plugins": "3.9.8",
42
+ "@vitessce/config": "3.9.8",
43
+ "@vitessce/zarr-utils": "3.9.8",
44
+ "@vitessce/globals": "3.9.8"
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.8"
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 ? (