@vitessce/dev 3.9.7 → 3.9.9

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.
@@ -345,6 +345,7 @@ const CoordinationType$2 = {
345
345
  SPATIAL_LAYER_MODEL_MATRIX: "spatialLayerModelMatrix",
346
346
  SPATIAL_SEGMENTATION_FILLED: "spatialSegmentationFilled",
347
347
  SPATIAL_SEGMENTATION_STROKE_WIDTH: "spatialSegmentationStrokeWidth",
348
+ SPATIAL_POINT_STROKE_WIDTH: "spatialPointStrokeWidth",
348
349
  SPATIAL_CHANNEL_COLOR: "spatialChannelColor",
349
350
  SPATIAL_CHANNEL_VISIBLE: "spatialChannelVisible",
350
351
  SPATIAL_CHANNEL_OPACITY: "spatialChannelOpacity",
@@ -742,7 +743,8 @@ const COMPONENT_COORDINATION_TYPES = {
742
743
  CoordinationType$2.SPATIAL_CHANNEL_COLOR,
743
744
  CoordinationType$2.SPATIAL_CHANNEL_OPACITY,
744
745
  CoordinationType$2.SPATIAL_CHANNEL_VISIBLE,
745
- CoordinationType$2.LEGEND_VISIBLE
746
+ CoordinationType$2.LEGEND_VISIBLE,
747
+ CoordinationType$2.SPATIAL_POINT_STROKE_WIDTH
746
748
  ],
747
749
  [ViewType$2.SCATTERPLOT]: [
748
750
  CoordinationType$2.DATASET,
@@ -1126,6 +1128,7 @@ const COMPONENT_COORDINATION_TYPES = {
1126
1128
  CoordinationType$2.SPATIAL_CHANNEL_COLOR,
1127
1129
  CoordinationType$2.SPATIAL_SEGMENTATION_FILLED,
1128
1130
  CoordinationType$2.SPATIAL_SEGMENTATION_STROKE_WIDTH,
1131
+ CoordinationType$2.SPATIAL_POINT_STROKE_WIDTH,
1129
1132
  CoordinationType$2.IMAGE_CHANNEL,
1130
1133
  CoordinationType$2.IMAGE_LAYER,
1131
1134
  CoordinationType$2.SEGMENTATION_CHANNEL,
@@ -1380,7 +1383,7 @@ const COMPONENT_COORDINATION_TYPES = {
1380
1383
  CoordinationType$2.HIERARCHY_LEVELS
1381
1384
  ]
1382
1385
  };
1383
- const version$6 = "3.9.7";
1386
+ const version$6 = "3.9.9";
1384
1387
  const META_VERSION = {
1385
1388
  version: version$6
1386
1389
  };
@@ -7131,6 +7134,12 @@ function createGetRange(store) {
7131
7134
  throw new Error("Invalid rangeQuery value.");
7132
7135
  };
7133
7136
  }
7137
+ function flattenOmeAttrs(rootAttrs) {
7138
+ if (rootAttrs && typeof rootAttrs.ome === "object" && rootAttrs.ome !== null) {
7139
+ return { ...rootAttrs.ome, ...rootAttrs };
7140
+ }
7141
+ return rootAttrs;
7142
+ }
7134
7143
  class AbstractAutoConfig2 {
7135
7144
  constructor(parsedStore) {
7136
7145
  const { url, fileType, zmetadata } = parsedStore;
@@ -7223,7 +7232,8 @@ class SpatialDataAutoConfig extends AbstractAutoConfig2 {
7223
7232
  });
7224
7233
  availableElements.forEach(({ path: path2, attrs }) => {
7225
7234
  const relPath = path2.substring(1);
7226
- const firstCoordinateSystem = attrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
7235
+ const omeAttrs = flattenOmeAttrs(attrs);
7236
+ const firstCoordinateSystem = omeAttrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
7227
7237
  if (relPath.match(/^(images)\/([^/]*)$/)) {
7228
7238
  options.image = {
7229
7239
  path: relPath,
@@ -16479,7 +16489,7 @@ const { tss } = createTss({
16479
16489
  },
16480
16490
  "usePlugin": useMuiThemeStyleOverridesPlugin
16481
16491
  });
16482
- const useStyles$B = tss.create({});
16492
+ const useStyles$C = tss.create({});
16483
16493
  function createChainedFunction$1(...funcs) {
16484
16494
  return funcs.reduce((acc, func) => {
16485
16495
  if (func == null) {
@@ -20610,7 +20620,7 @@ const ErrorOutlineIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("pa
20610
20620
  const InfoOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
20611
20621
  d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
20612
20622
  }), "InfoOutlined");
20613
- const ClearIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
20623
+ const ClearIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
20614
20624
  d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
20615
20625
  }), "Close");
20616
20626
  const useUtilityClasses$1A = (ownerState) => {
@@ -20816,7 +20826,7 @@ const Alert = /* @__PURE__ */ React.forwardRef(function Alert2(inProps, ref2) {
20816
20826
  ownerState
20817
20827
  });
20818
20828
  const [CloseIconSlot, closeIconProps] = useSlot("closeIcon", {
20819
- elementType: ClearIcon,
20829
+ elementType: ClearIcon$1,
20820
20830
  externalForwardedProps,
20821
20831
  ownerState
20822
20832
  });
@@ -25979,7 +25989,7 @@ const Autocomplete = /* @__PURE__ */ React.forwardRef(function Autocomplete2(inP
25979
25989
  blurOnSelect = false,
25980
25990
  ChipProps: ChipPropsProp,
25981
25991
  className,
25982
- clearIcon = _ClearIcon || (_ClearIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(ClearIcon, {
25992
+ clearIcon = _ClearIcon || (_ClearIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(ClearIcon$1, {
25983
25993
  fontSize: "small"
25984
25994
  })),
25985
25995
  clearOnBlur = !props.freeSolo,
@@ -44875,6 +44885,9 @@ const VisibilityOffIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("p
44875
44885
  const WarningIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
44876
44886
  d: "M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"
44877
44887
  }), "Warning");
44888
+ const ClearIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
44889
+ d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
44890
+ }), "Clear");
44878
44891
  const reactMajor = parseInt(React.version, 10);
44879
44892
  const forwardRef = (render2) => {
44880
44893
  if (reactMajor >= 19) {
@@ -71732,7 +71745,7 @@ const Popper = React.forwardRef((props, ref2) => {
71732
71745
  }, [handlePopperRef]);
71733
71746
  React.useImperativeHandle(popperRefProp, () => popperRef.current, []);
71734
71747
  const [exited, setExited] = React.useState(true);
71735
- const { theme } = useStyles$B();
71748
+ const { theme } = useStyles$C();
71736
71749
  const rtlPlacement = flipPlacement(initialPlacement, theme);
71737
71750
  const [placement, setPlacement] = React.useState(rtlPlacement);
71738
71751
  React.useEffect(() => {
@@ -72466,7 +72479,7 @@ var VariableSizeList$1 = /* @__PURE__ */ createListComponent({
72466
72479
  });
72467
72480
  const VariableSizeList = VariableSizeList$1;
72468
72481
  const LIST_ROW_HEIGHT$1 = 48;
72469
- const useStyles$A = makeStyles()(() => ({
72482
+ const useStyles$B = makeStyles()(() => ({
72470
72483
  searchInput: {
72471
72484
  lineHeight: "initial",
72472
72485
  height: "auto !important"
@@ -72506,7 +72519,7 @@ const ListboxComponent$1 = React__default.forwardRef((props, ref2) => {
72506
72519
  });
72507
72520
  function SimpleAutocomplete(props) {
72508
72521
  const { getMatches, onChange, textInputLabel = "Enter a gene", getItemLabel = (option) => option.label } = props;
72509
- const { classes: classes2 } = useStyles$A();
72522
+ const { classes: classes2 } = useStyles$B();
72510
72523
  const [potentialItems, setPotentialItems] = useState([]);
72511
72524
  const handleInputChange = async (_event, value2) => {
72512
72525
  if (!value2) {
@@ -83689,6 +83702,8 @@ const ngPrecomputedMeshSchema = z.object({
83689
83702
  // projectionScale: z.number(),
83690
83703
  // position: z.array(z.number()).length(3),
83691
83704
  // projectionOrientation: z.array(z.number()).length(4),
83705
+ 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(),
83706
+ 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()
83692
83707
  }).partial().nullable();
83693
83708
  const ngPointAnnotationSchema = z.object({
83694
83709
  projectionAnnotationSpacing: z.number(),
@@ -92587,7 +92602,7 @@ function VitessceGrid(props) {
92587
92602
  }, [success, configKey]);
92588
92603
  return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes2.vitessceContainer), role: "group", "aria-label": altText, children: [jsxRuntimeExports.jsx(GridLayoutGlobalStyles, { classes: classes2 }), layout ? jsxRuntimeExports.jsx(VitessceGridLayout, { pageMode, role: "group", layout, height: height2, rowHeight, theme, viewTypes, fileTypes, coordinationTypes, stores, draggableHandle: titleClasses.titleLeft, margin, padding: padding$2, onRemoveComponent: removeComponent, onLayoutChange: changeLayoutPostMount, isBounded, onResize: onResize4, onResizeStop: onResize4, children: children3 }) : null] });
92589
92604
  }
92590
- const useStyles$z = makeStyles()((theme) => ({
92605
+ const useStyles$A = makeStyles()((theme) => ({
92591
92606
  warningLayout: {
92592
92607
  backgroundColor: theme.palette.gridLayoutBackground,
92593
92608
  position: "absolute",
@@ -92625,11 +92640,11 @@ const useStyles$z = makeStyles()((theme) => ({
92625
92640
  }));
92626
92641
  function Warning(props) {
92627
92642
  const { title: title2, preformatted, unformatted } = props;
92628
- const { classes: classes2 } = useStyles$z();
92643
+ const { classes: classes2 } = useStyles$A();
92629
92644
  return jsxRuntimeExports.jsx("div", { className: VITESSCE_CONTAINER, children: jsxRuntimeExports.jsx("div", { className: clsx(classes2.warningLayout, classes2.containerFluid), children: jsxRuntimeExports.jsx("div", { className: classes2.row, children: jsxRuntimeExports.jsxs("div", { className: classes2.warningCard, children: [jsxRuntimeExports.jsx("h1", { children: title2 }), preformatted ? jsxRuntimeExports.jsx("pre", { children: preformatted }) : null, jsxRuntimeExports.jsx("p", { children: unformatted })] }) }) }) });
92630
92645
  }
92631
92646
  function DebugWindow({ debugErrors }) {
92632
- const { classes: classes2 } = useStyles$z();
92647
+ const { classes: classes2 } = useStyles$A();
92633
92648
  return jsxRuntimeExports.jsx("div", { className: VITESSCE_CONTAINER, children: jsxRuntimeExports.jsx("div", { className: clsx(classes2.warningLayout, classes2.containerFluid), children: jsxRuntimeExports.jsx("div", { className: classes2.row, children: jsxRuntimeExports.jsx("div", { className: classes2.warningCard, children: debugErrors.map((error2, index2) => jsxRuntimeExports.jsxs("div", { children: [index2 === 0 && jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("h1", { children: ["Error Type: ", error2.name] }), Object.keys(error2).map((key2) => key2 !== "name" && key2 !== "message" && jsxRuntimeExports.jsxs("p", { children: [key2.charAt(0).toUpperCase() + key2.slice(1), ": ", error2[key2]] }, key2))] }), jsxRuntimeExports.jsxs("p", { children: ["Error: ", error2.message] })] }, error2.message || index2)) }) }) }) });
92634
92649
  }
92635
92650
  function validateViewConfig(viewConfig, pluginSpecificConfigSchema) {
@@ -92964,7 +92979,7 @@ function FallbackForVitS(props) {
92964
92979
  function VitSContainer(props) {
92965
92980
  return jsxRuntimeExports.jsx(ErrorBoundary$1, { FallbackComponent: FallbackForVitS, children: jsxRuntimeExports.jsx(VitS, { ...props }) });
92966
92981
  }
92967
- const useStyles$y = makeStyles()(() => ({
92982
+ const useStyles$z = makeStyles()(() => ({
92968
92983
  loadingIndicatorBackdrop: {
92969
92984
  position: "absolute",
92970
92985
  top: "0",
@@ -92992,10 +93007,10 @@ const useStyles$y = makeStyles()(() => ({
92992
93007
  }
92993
93008
  }));
92994
93009
  function LoadingIndicator() {
92995
- const { classes: classes2 } = useStyles$y();
93010
+ const { classes: classes2 } = useStyles$z();
92996
93011
  return jsxRuntimeExports.jsx("div", { className: classes2.loadingIndicatorBackdrop, children: jsxRuntimeExports.jsxs("div", { className: classes2.loadingIndicatorContainer, role: "status", "aria-live": "polite", children: [jsxRuntimeExports.jsx(CircularProgress, {}), jsxRuntimeExports.jsx("span", { className: classes2.visuallyHidden, children: "Loading..." })] }) });
92997
93012
  }
92998
- const useStyles$x = makeStyles()(() => ({
93013
+ const useStyles$y = makeStyles()(() => ({
92999
93014
  paper: {
93000
93015
  maxHeight: 200,
93001
93016
  overflowX: "hidden",
@@ -93011,7 +93026,7 @@ const useStyles$x = makeStyles()(() => ({
93011
93026
  }));
93012
93027
  function PopperMenu(props) {
93013
93028
  const { buttonIcon, open: open2, setOpen, children: children3, buttonClassName, placement = "bottom-end", withPaper = true, containerClassName, paperClassName, "aria-label": ariaLabel2 } = props;
93014
- const { classes: classes2 } = useStyles$x();
93029
+ const { classes: classes2 } = useStyles$y();
93015
93030
  const anchorRef = useRef();
93016
93031
  const handleClick = () => {
93017
93032
  setOpen((prev2) => !prev2);
@@ -93023,7 +93038,7 @@ function PopperMenu(props) {
93023
93038
  const getTooltipContainer = useVitessceContainer(anchorRef);
93024
93039
  return jsxRuntimeExports.jsxs("div", { ref: anchorRef, className: clsx(classes2.container, containerClassName), children: [jsxRuntimeExports.jsx(IconButton$1, { "aria-describedby": id2, onClick: handleClick, onTouchEnd: handleClick, size: "small", className: buttonClassName, "aria-label": ariaLabel2, children: buttonIcon }), jsxRuntimeExports.jsx(Popper$2, { id: id2, open: open2, anchorEl: anchorRef && anchorRef.current, container: getTooltipContainer, onClose: handleClose, placement, transition: true, children: ({ TransitionProps }) => jsxRuntimeExports.jsx(ClickAwayListener, { onClickAway: handleClose, children: jsxRuntimeExports.jsx(Fade, { ...TransitionProps, timeout: 100, children: jsxRuntimeExports.jsx("div", { children: withPaper ? jsxRuntimeExports.jsx(Paper, { elevation: 16, className: clsx(classes2.paper, paperClassName), children: jsxRuntimeExports.jsx(MenuList, { children: children3 }) }) : children3 }) }) }) })] });
93025
93040
  }
93026
- const useStyles$w = makeStyles()((theme) => ({
93041
+ const useStyles$x = makeStyles()((theme) => ({
93027
93042
  iconButton: {
93028
93043
  border: "none",
93029
93044
  marginLeft: 0,
@@ -93082,7 +93097,7 @@ function SettingsIconWithArrow({ open: open2 }) {
93082
93097
  function PlotOptions(props) {
93083
93098
  const { options } = props;
93084
93099
  const [open2, setOpen] = useState(false);
93085
- const { classes: classes2 } = useStyles$w();
93100
+ const { classes: classes2 } = useStyles$x();
93086
93101
  const buttonIcon = useMemo$1(() => jsxRuntimeExports.jsx(SettingsIconWithArrow, { open: open2 }), [open2]);
93087
93102
  return options ? jsxRuntimeExports.jsx(PopperMenu, { open: open2, setOpen, buttonIcon, buttonClassName: classes2.iconButton, placement: "bottom-end", title: "Plot Options", "aria-label": "Open plot options menu", children: options }) : null;
93088
93103
  }
@@ -93092,20 +93107,20 @@ function CloudDownloadIconWithArrow({ open: open2 }) {
93092
93107
  function DownloadOptions(props) {
93093
93108
  const { urls: urls2 } = props;
93094
93109
  const [open2, setOpen] = useState(false);
93095
- const { classes: classes2 } = useStyles$w();
93110
+ const { classes: classes2 } = useStyles$x();
93096
93111
  const buttonIcon = useMemo$1(() => jsxRuntimeExports.jsx(CloudDownloadIconWithArrow, { open: open2 }), [open2]);
93097
93112
  return urls2 && urls2.length ? jsxRuntimeExports.jsx(PopperMenu, { open: open2, setOpen, buttonIcon, buttonClassName: classes2.iconButton, placement: "bottom-end", title: "Download Options", "aria-label": "Open download options menu", children: urls2.map(({ url, name: name2 }) => jsxRuntimeExports.jsx(MenuItem, { dense: true, "aria-label": `Click to download ${name2}`, children: jsxRuntimeExports.jsxs(Link, { underline: "always", href: url, target: "_blank", rel: "noopener", className: classes2.downloadLink, children: ["Download ", name2] }) }, `${url}_${name2}`)) }) : null;
93098
93113
  }
93099
93114
  function HelpButton(props) {
93100
93115
  const { helpText, guideUrl } = props;
93101
93116
  const [open2, setOpen] = useState(false);
93102
- const { classes: classes2 } = useStyles$w();
93117
+ const { classes: classes2 } = useStyles$x();
93103
93118
  return jsxRuntimeExports.jsx(PopperMenu, { open: open2, setOpen, buttonIcon: jsxRuntimeExports.jsx(HelpIcon, {}), buttonClassName: classes2.iconButton, placement: "bottom-end", title: "Help Info", "aria-label": "Open help info", withPaper: false, children: jsxRuntimeExports.jsxs("span", { className: classes2.helpTextSpan, children: [helpText, guideUrl ? jsxRuntimeExports.jsx(IconButton$1, { component: "a", href: guideUrl, target: "_blank", rel: "noopener noreferrer", size: "small", className: classes2.iconButton, title: "Open Navigation Guide", "aria-label": "Open navigation guide", children: jsxRuntimeExports.jsx(MenuBookIcon, {}) }) : null] }) });
93104
93119
  }
93105
93120
  function ErrorInfo(props) {
93106
93121
  const { errors } = props;
93107
93122
  const [open2, setOpen] = useState(false);
93108
- const { classes: classes2 } = useStyles$w();
93123
+ const { classes: classes2 } = useStyles$x();
93109
93124
  return jsxRuntimeExports.jsx(PopperMenu, { open: open2, setOpen, buttonIcon: jsxRuntimeExports.jsx(WarningIcon, { color: "error" }), buttonClassName: classes2.iconButton, placement: "bottom-end", title: "View Errors", "aria-label": "Open error info", children: jsxRuntimeExports.jsx(List$4, { className: classes2.errorList, children: errors.map((error2, index2) => jsxRuntimeExports.jsxs(
93110
93125
  Alert,
93111
93126
  { severity: "error", className: classes2.errorListAlert, slots: { message: "span" }, slotProps: { message: { className: classes2.errorListItemText } }, children: [error2.name, ": ", error2.message] },
@@ -93114,7 +93129,7 @@ function ErrorInfo(props) {
93114
93129
  }
93115
93130
  function ClosePaneButton(props) {
93116
93131
  const { removeGridComponent } = props;
93117
- const { classes: classes2 } = useStyles$w();
93132
+ const { classes: classes2 } = useStyles$x();
93118
93133
  return jsxRuntimeExports.jsx(IconButton$1, { onClick: removeGridComponent, size: "small", className: classes2.iconButton, title: "Close View", "aria-label": "Close panel button", children: jsxRuntimeExports.jsx(CloseIcon, {}) });
93119
93134
  }
93120
93135
  function TitleInfo(props) {
@@ -94247,7 +94262,7 @@ typeof SuppressedError === "function" ? SuppressedError : function(error2, suppr
94247
94262
  var e3 = new Error(message);
94248
94263
  return e3.name = "SuppressedError", e3.error = error2, e3.suppressed = suppressed, e3;
94249
94264
  };
94250
- const useStyles$v = makeStyles()((theme) => ({
94265
+ const useStyles$w = makeStyles()((theme) => ({
94251
94266
  box: {
94252
94267
  boxSizing: "border-box"
94253
94268
  },
@@ -94297,7 +94312,7 @@ const useStyles$v = makeStyles()((theme) => ({
94297
94312
  }));
94298
94313
  function OptionSelect(props) {
94299
94314
  const { classes: classesProp = {} } = props;
94300
- const { classes: classes2 } = useStyles$v();
94315
+ const { classes: classes2 } = useStyles$w();
94301
94316
  return jsxRuntimeExports.jsx(NativeSelect, { disableUnderline: true, ...props, classes: {
94302
94317
  root: classes2.optionSelectRoot,
94303
94318
  ...classesProp
@@ -94305,7 +94320,7 @@ function OptionSelect(props) {
94305
94320
  }
94306
94321
  function CellColorEncodingOption(props) {
94307
94322
  const { observationsLabel, cellColorEncoding, setCellColorEncoding } = props;
94308
- const { classes: classes2 } = useStyles$v();
94323
+ const { classes: classes2 } = useStyles$w();
94309
94324
  const cellColorEncodingId = $bdb11010cef70236$export$f680877a34711e37();
94310
94325
  const observationsLabelNice = capitalize$3(observationsLabel);
94311
94326
  function handleColorEncodingChange(event2) {
@@ -94317,7 +94332,7 @@ function CellColorEncodingOption(props) {
94317
94332
  }
94318
94333
  function OptionsContainer(props) {
94319
94334
  const { children: children3 } = props;
94320
- const { classes: classes2 } = useStyles$v();
94335
+ const { classes: classes2 } = useStyles$w();
94321
94336
  return jsxRuntimeExports.jsx(Box, { className: classes2.box, children: jsxRuntimeExports.jsx(TableContainer, { className: classes2.tableContainer, children: jsxRuntimeExports.jsx(Table$2, { className: classes2.table, size: "small", "aria-label": "Menu of options available for the view", children: jsxRuntimeExports.jsx(TableBody, { children: children3 }) }) }) });
94322
94337
  }
94323
94338
  class PluginViewType {
@@ -103909,7 +103924,7 @@ function defaultUrlTransform(value2) {
103909
103924
  }
103910
103925
  return "";
103911
103926
  }
103912
- const useStyles$u = makeStyles()((theme) => ({
103927
+ const useStyles$v = makeStyles()((theme) => ({
103913
103928
  description: {
103914
103929
  "& p, details, table": {
103915
103930
  fontSize: "80%",
@@ -103946,7 +103961,7 @@ const useStyles$u = makeStyles()((theme) => ({
103946
103961
  }));
103947
103962
  function Description(props) {
103948
103963
  const { description: description2, metadata: metadata2, descriptionType } = props;
103949
- const { classes: classes2 } = useStyles$u();
103964
+ const { classes: classes2 } = useStyles$v();
103950
103965
  return jsxRuntimeExports.jsxs("div", { className: classes2.description, children: [descriptionType && descriptionType === DescriptionType.MARKDOWN ? jsxRuntimeExports.jsx(Markdown, { children: description2 }) : jsxRuntimeExports.jsx("p", { children: description2 }), metadata2 && Array.from(metadata2.entries()).map(([layerIndex, { name: layerName, metadata: metadataRecord }]) => metadataRecord && Object.entries(metadataRecord).length > 0 ? jsxRuntimeExports.jsxs("details", { children: [jsxRuntimeExports.jsx("summary", { children: layerName }), jsxRuntimeExports.jsx("div", { className: classes2.metadataContainer, children: jsxRuntimeExports.jsx("table", { children: jsxRuntimeExports.jsx("tbody", { children: Object.entries(metadataRecord).map(([key2, value2]) => jsxRuntimeExports.jsxs("tr", { children: [jsxRuntimeExports.jsx("th", { title: key2, children: key2 }), jsxRuntimeExports.jsx("td", { title: value2, children: value2 })] }, key2)) }) }) })] }, layerIndex) : null)] });
103951
103966
  }
103952
103967
  function DescriptionSubscriber(props) {
@@ -118950,7 +118965,7 @@ const Tooltip$2 = /* @__PURE__ */ React.forwardRef((props, ref2) => {
118950
118965
  }, extraProps), getChildren());
118951
118966
  });
118952
118967
  const nodeHeight = 32;
118953
- const useStyles$t = makeStyles()((theme) => ({
118968
+ const useStyles$u = makeStyles()((theme) => ({
118954
118969
  setsManager: {
118955
118970
  position: "relative",
118956
118971
  width: "100%",
@@ -119117,7 +119132,7 @@ const useStyles$t = makeStyles()((theme) => ({
119117
119132
  }));
119118
119133
  function SetsManagerTreeGlobalStyles(props) {
119119
119134
  const { classes: classes2 } = props;
119120
- const { theme } = useStyles$B();
119135
+ const { theme } = useStyles$C();
119121
119136
  return jsxRuntimeExports.jsx(ScopedGlobalStyles, { parentClassName: classes2.setsManagerTree, styles: {
119122
119137
  ".rc-tree": {
119123
119138
  paddingLeft: "0",
@@ -119458,7 +119473,7 @@ function HelpTooltipGlobalStyles(props) {
119458
119473
  }
119459
119474
  function PopoverGlobalStyles(props) {
119460
119475
  const { classes: classes2 } = props;
119461
- const { theme } = useStyles$B();
119476
+ const { theme } = useStyles$C();
119462
119477
  return jsxRuntimeExports.jsx(ScopedGlobalStyles, { parentClassName: classes2.popover, styles: {
119463
119478
  ".rc-tooltip-inner": {
119464
119479
  boxSizing: "border-box",
@@ -124142,7 +124157,7 @@ function NamedSetNodeStatic(props) {
124142
124157
  const onClick = level === 0 && !expanded ? () => onCheckLevel(nodeKey, nextLevelToCheck) : () => onNodeView(path2);
124143
124158
  const tooltipProps = disableTooltip ? { visible: false } : {};
124144
124159
  const popoverMenuConfig = makeNodeViewMenuConfig(props);
124145
- const { classes: classes2 } = useStyles$t();
124160
+ const { classes: classes2 } = useStyles$u();
124146
124161
  return jsxRuntimeExports.jsxs("span", { children: [jsxRuntimeExports.jsx(HelpTooltip, { title: tooltipText, ...tooltipProps, children: jsxRuntimeExports.jsx("button", { type: "button", onClick, onKeyPress: (e3) => callbackOnKeyPress(e3, "v", () => onNodeView(path2)), className: classes2.titleButton, children: title2 }) }), popoverMenuConfig.length > 0 ? jsxRuntimeExports.jsx(PopoverMenu, { menuConfig: makeNodeViewMenuConfig(props), color: level > 0 && editable ? color2 || getDefaultColor(theme) : null, setColor: (c2) => onNodeSetColor(path2, c2), children: jsxRuntimeExports.jsx("span", { children: jsxRuntimeExports.jsx(SvgMenu, { className: classes2.nodeMenuIcon, "aria-label": "Open Node View Menu" }) }) }) : null, level > 0 && isChecking ? checkbox2 : null, level > 0 && jsxRuntimeExports.jsx("span", { className: classes2.nodeSizeLabel, children: niceSize })] });
124147
124162
  }
124148
124163
  function NamedSetNodeEditing(props) {
@@ -124154,7 +124169,7 @@ function NamedSetNodeEditing(props) {
124154
124169
  onNodeSetName(path2, currentTitle, true);
124155
124170
  }
124156
124171
  }
124157
- const { classes: classes2 } = useStyles$t();
124172
+ const { classes: classes2 } = useStyles$u();
124158
124173
  return jsxRuntimeExports.jsxs("span", { className: classes2.titleButtonWithInput, children: [jsxRuntimeExports.jsx("input", {
124159
124174
  // eslint-disable-next-line jsx-a11y/no-autofocus
124160
124175
  autoFocus: true,
@@ -124180,7 +124195,7 @@ function LevelsButtons(props) {
124180
124195
  onCheckLevel(nodeKey, newLevel);
124181
124196
  }
124182
124197
  }
124183
- const { classes: classes2 } = useStyles$t();
124198
+ const { classes: classes2 } = useStyles$u();
124184
124199
  return jsxRuntimeExports.jsx("div", { className: classes2.levelButtonsContainer, children: range$b(1, height2 + 1).map((i2) => {
124185
124200
  const isChecked = isEqual$2(path2, checkedLevelPath) && i2 === checkedLevelIndex;
124186
124201
  return jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx(HelpTooltip, { title: getLevelTooltipText(i2), children: jsxRuntimeExports.jsx("input", { className: clsx(classes2.levelRadioButton, { [classes2.levelRadioButtonChecked]: isChecked && !hasColorEncoding }), type: "checkbox", value: i2, checked: isChecked && hasColorEncoding, onChange: onCheck }) }) }, i2);
@@ -124267,7 +124282,7 @@ let TreeNode$1 = class TreeNode extends TreeNode$2 {
124267
124282
  };
124268
124283
  function PlusButton(props) {
124269
124284
  const { datatype, onError, onImportTree, onCreateLevelZeroNode, importable, editable } = props;
124270
- const { classes: classes2 } = useStyles$t();
124285
+ const { classes: classes2 } = useStyles$u();
124271
124286
  const onImport = useCallback((importHandler, mimeType) => () => {
124272
124287
  const uploadInputNode = document.createElement("input");
124273
124288
  uploadInputNode.setAttribute("type", "file");
@@ -124384,7 +124399,7 @@ function SetsManager(props) {
124384
124399
  }, onNodeCheckNewName, onNodeSetIsEditing: setIsEditingNodeName, onNodeRemove, onExportLevelZeroNodeJSON, onExportLevelZeroNodeTabular, onExportSetJSON, disableTooltip: isDragging, onDragStart: () => setIsDragging(true), onDragEnd: () => setIsDragging(false), children: renderTreeNodes(node2.children, readOnly, newPath) }, pathToKey(newPath));
124385
124400
  });
124386
124401
  }
124387
- const { classes: classes2 } = useStyles$t();
124402
+ const { classes: classes2 } = useStyles$u();
124388
124403
  return jsxRuntimeExports.jsxs("div", { className: classes2.setsManager, children: [jsxRuntimeExports.jsx(SetsManagerTreeGlobalStyles, { classes: classes2 }), jsxRuntimeExports.jsxs("div", { className: classes2.setsManagerTree, children: [jsxRuntimeExports.jsx(Tree$1, { draggable: false, checkable, checkedKeys: setSelectionKeys, expandedKeys: setExpansionKeys, autoExpandParent, onCheck: (checkedKeys, info2) => onCheckNode(info2.node.props.nodeKey, info2.checked), onExpand: (expandedKeys, info2) => onExpandNode(expandedKeys, info2.node.props.nodeKey, info2.expanded), children: renderTreeNodes(processedSets.tree, true, []) }), jsxRuntimeExports.jsx(Tree$1, { draggable: true, checkable, checkedKeys: additionalSetSelectionKeys, expandedKeys: additionalSetExpansionKeys, autoExpandParent, onCheck: (checkedKeys, info2) => onCheckNode(info2.node.props.nodeKey, info2.checked), onExpand: (expandedKeys, info2) => onExpandNode(expandedKeys, info2.node.props.nodeKey, info2.expanded), onDrop: (info2) => {
124389
124404
  const { eventKey: dropKey } = info2.node.props;
124390
124405
  const { eventKey: dragKey } = info2.dragNode.props;
@@ -230354,22 +230369,22 @@ async function getDecoder(fileDirectory) {
230354
230369
  const Decoder = await importFn();
230355
230370
  return new Decoder(fileDirectory);
230356
230371
  }
230357
- addDecoder([void 0, 1], () => import("./raw-DTFSgRK6.js").then((m2) => m2.default));
230358
- addDecoder(5, () => import("./lzw-BXDFvDE8.js").then((m2) => m2.default));
230372
+ addDecoder([void 0, 1], () => import("./raw-COQICf8o.js").then((m2) => m2.default));
230373
+ addDecoder(5, () => import("./lzw-Dp8k6fHh.js").then((m2) => m2.default));
230359
230374
  addDecoder(6, () => {
230360
230375
  throw new Error("old style JPEG compression is not supported.");
230361
230376
  });
230362
- addDecoder(7, () => import("./jpeg-CjOQOmSy.js").then((m2) => m2.default));
230363
- addDecoder([8, 32946], () => import("./deflate-DYpRiTOW.js").then((m2) => m2.default));
230364
- addDecoder(32773, () => import("./packbits-uiZkXSMA.js").then((m2) => m2.default));
230377
+ addDecoder(7, () => import("./jpeg-DF0DG_In.js").then((m2) => m2.default));
230378
+ addDecoder([8, 32946], () => import("./deflate-BCgzIRaf.js").then((m2) => m2.default));
230379
+ addDecoder(32773, () => import("./packbits-BpGraQ9h.js").then((m2) => m2.default));
230365
230380
  addDecoder(
230366
230381
  34887,
230367
- () => import("./lerc-a3FmkkEz.js").then(async (m2) => {
230382
+ () => import("./lerc-CixLzOtk.js").then(async (m2) => {
230368
230383
  await m2.zstd.init();
230369
230384
  return m2;
230370
230385
  }).then((m2) => m2.default)
230371
230386
  );
230372
- addDecoder(50001, () => import("./webimage-BtSBSquN.js").then((m2) => m2.default));
230387
+ addDecoder(50001, () => import("./webimage-CQDe7uUY.js").then((m2) => m2.default));
230373
230388
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
230374
230389
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
230375
230390
  }
@@ -247142,7 +247157,7 @@ class ContourLayerWithText extends ContourLayer {
247142
247157
  }
247143
247158
  ContourLayerWithText.layerName = "ContourLayerWithText";
247144
247159
  ContourLayerWithText.defaultProps = defaultProps;
247145
- const useStyles$s = makeStyles()(() => ({
247160
+ const useStyles$t = makeStyles()(() => ({
247146
247161
  toolButton: {
247147
247162
  display: "inline-flex",
247148
247163
  "&:active": {
@@ -247204,12 +247219,12 @@ const useStyles$s = makeStyles()(() => ({
247204
247219
  }));
247205
247220
  function IconTool(props) {
247206
247221
  const { alt, onClick, isActive: isActive2, children: children3 } = props;
247207
- const { classes: classes2 } = useStyles$s();
247222
+ const { classes: classes2 } = useStyles$t();
247208
247223
  return jsxRuntimeExports.jsx("button", { className: clsx(classes2.toolIcon, { [classes2.toolActive]: isActive2 }), onClick, type: "button", title: alt, children: children3 });
247209
247224
  }
247210
247225
  function IconButton(props) {
247211
247226
  const { alt, onClick, children: children3 } = props;
247212
- const { classes: classes2 } = useStyles$s();
247227
+ const { classes: classes2 } = useStyles$t();
247213
247228
  return jsxRuntimeExports.jsx("button", { className: clsx(classes2.toolIcon, classes2.toolButton), onClick, type: "button", title: alt, children: children3 });
247214
247229
  }
247215
247230
  function ToolMenu(props) {
@@ -247217,7 +247232,7 @@ function ToolMenu(props) {
247217
247232
  const lassoIconAltText = "Select lasso";
247218
247233
  const { setActiveTool, activeTool, visibleTools = { pan: true, selectLasso: true, recenter: true }, recenterOnClick = () => {
247219
247234
  } } = props;
247220
- const { classes: classes2 } = useStyles$s();
247235
+ const { classes: classes2 } = useStyles$t();
247221
247236
  const onRecenterButtonCLick = () => {
247222
247237
  recenterOnClick();
247223
247238
  };
@@ -248047,7 +248062,7 @@ function ScatterplotOptions(props) {
248047
248062
  const { children: children3, observationsLabel, cellRadius, setCellRadius, cellRadiusMode, setCellRadiusMode, cellOpacity, setCellOpacity, cellOpacityMode, setCellOpacityMode, cellSetLabelsVisible, setCellSetLabelsVisible, tooltipsVisible, setTooltipsVisible, cellSetLabelSize, setCellSetLabelSize, cellSetPolygonsVisible, setCellSetPolygonsVisible, cellColorEncoding, setCellColorEncoding, geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange, embeddingPointsVisible, setEmbeddingPointsVisible, embeddingContoursVisible, setEmbeddingContoursVisible, embeddingContoursFilled, setEmbeddingContoursFilled, contourPercentiles, setContourPercentiles, defaultContourPercentiles, contourColorEncoding, setContourColorEncoding, featureAggregationStrategy, setFeatureAggregationStrategy } = props;
248048
248063
  const scatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
248049
248064
  const observationsLabelNice = capitalize$3(observationsLabel);
248050
- const { classes: classes2 } = useStyles$v();
248065
+ const { classes: classes2 } = useStyles$w();
248051
248066
  function handleCellRadiusModeChange(event2) {
248052
248067
  setCellRadiusMode(event2.target.value);
248053
248068
  }
@@ -248169,7 +248184,7 @@ function ScatterplotOptions(props) {
248169
248184
  id: `feature-aggregation-strategy-${scatterplotOptionsId}`
248170
248185
  }, children: FEATURE_AGGREGATION_STRATEGIES$1.map((opt) => jsxRuntimeExports.jsx("option", { value: opt, children: capitalize$3(opt) }, opt)) }) })] }) : null] });
248171
248186
  }
248172
- const useStyles$r = makeStyles()((theme) => ({
248187
+ const useStyles$s = makeStyles()((theme) => ({
248173
248188
  tooltipAnchor: {
248174
248189
  position: "relative",
248175
248190
  width: "0px",
@@ -248200,7 +248215,7 @@ const useStyles$r = makeStyles()((theme) => ({
248200
248215
  function Tooltip3(props) {
248201
248216
  const { x: x2, y: y2, parentWidth, parentHeight, children: children3 } = props;
248202
248217
  const ref2 = useRef();
248203
- const { classes: classes2 } = useStyles$r();
248218
+ const { classes: classes2 } = useStyles$s();
248204
248219
  const [placementX, setPlacementX] = useState("start");
248205
248220
  const [placementY, setPlacementY] = useState("bottom");
248206
248221
  const getTooltipContainer = useVitessceContainer(ref2);
@@ -248216,7 +248231,7 @@ function Tooltip3(props) {
248216
248231
  }, [x2, y2, parentWidth, parentHeight]);
248217
248232
  return jsxRuntimeExports.jsx("div", { ref: ref2, className: classes2.tooltipAnchor, children: ref2 && ref2.current ? jsxRuntimeExports.jsx(Popper, { open: true, anchorEl: ref2.current, container: getTooltipContainer, transition: true, placement: `${placementY}-${placementX}`, children: jsxRuntimeExports.jsx(Paper, { elevation: 8, className: classes2.tooltipContent, children: children3 }) }) : null });
248218
248233
  }
248219
- const useStyles$q = makeStyles()((theme) => ({
248234
+ const useStyles$r = makeStyles()((theme) => ({
248220
248235
  cellEmphasisCrosshair: {
248221
248236
  zIndex: 50,
248222
248237
  position: "absolute",
@@ -248227,7 +248242,7 @@ const useStyles$q = makeStyles()((theme) => ({
248227
248242
  }));
248228
248243
  function Tooltip2D(props) {
248229
248244
  const { parentUuid, sourceUuid, x: x2, y: y2, parentWidth, parentHeight, children: children3 } = props;
248230
- const { classes: classes2 } = useStyles$q();
248245
+ const { classes: classes2 } = useStyles$r();
248231
248246
  if (x2 < 0 || x2 > parentWidth || y2 < 0 || y2 > parentHeight) {
248232
248247
  return null;
248233
248248
  }
@@ -252132,7 +252147,7 @@ function getXlinkHref(cmap) {
252132
252147
  const xlinkHref = ramp(color2.copy().domain(quantize$3(interpolate$1$1(0, 1), n3))).toDataURL();
252133
252148
  return xlinkHref;
252134
252149
  }
252135
- const useStyles$p = makeStyles()(() => ({
252150
+ const useStyles$q = makeStyles()(() => ({
252136
252151
  legend: {
252137
252152
  position: "relative",
252138
252153
  // Needed for absolute positioning of slider overlay
@@ -252329,7 +252344,7 @@ function Legend(props) {
252329
252344
  contourThresholds
252330
252345
  } = props;
252331
252346
  const svgRef = useRef(null);
252332
- const { classes: classes2 } = useStyles$p();
252347
+ const { classes: classes2 } = useStyles$q();
252333
252348
  const [localRange, setLocalRange] = useState(featureValueColormapRange);
252334
252349
  useEffect(() => {
252335
252350
  setLocalRange(featureValueColormapRange);
@@ -252610,7 +252625,9 @@ function Legend(props) {
252610
252625
  isStaticColor,
252611
252626
  missing,
252612
252627
  showObsLabel,
252613
- staticColor
252628
+ staticColor,
252629
+ featureColor,
252630
+ pointsLegendElements
252614
252631
  ]);
252615
252632
  const showInteractiveSlider = !isPointsLayer && setFeatureValueColormapRange && ["geneSelection", "geneExpression"].includes(obsColorEncoding ?? "") && pointsVisible && featureValueColormap;
252616
252633
  const globalExtent = useMemo$1(() => {
@@ -252661,7 +252678,7 @@ function Legend(props) {
252661
252678
  }
252662
252679
  } })] })] });
252663
252680
  }
252664
- const useStyles$o = makeStyles()(() => ({
252681
+ const useStyles$p = makeStyles()(() => ({
252665
252682
  multiLegend: {
252666
252683
  position: "absolute",
252667
252684
  top: "0px",
@@ -252688,7 +252705,7 @@ function MultiLegend(props) {
252688
252705
  pointLayerCoordination,
252689
252706
  pointMultiIndicesData
252690
252707
  } = props;
252691
- const { classes: classes2 } = useStyles$o();
252708
+ const { classes: classes2 } = useStyles$p();
252692
252709
  const reversedSegmentationLayerScopes = useMemo$1(() => [...segmentationLayerScopes || []].reverse(), [segmentationLayerScopes]);
252693
252710
  const reversedSpotLayerScopes = useMemo$1(() => [...spotLayerScopes || []].reverse(), [spotLayerScopes]);
252694
252711
  const reversedPointLayerScopes = useMemo$1(() => [...pointLayerScopes || []].reverse(), [pointLayerScopes]);
@@ -252781,7 +252798,7 @@ function MultiLegend(props) {
252781
252798
  }) : null;
252782
252799
  }) : null] });
252783
252800
  }
252784
- const useStyles$n = makeStyles()(() => ({
252801
+ const useStyles$o = makeStyles()(() => ({
252785
252802
  channelNamesLegendContainer: {
252786
252803
  position: "absolute",
252787
252804
  bottom: "0px",
@@ -252804,7 +252821,7 @@ const useStyles$n = makeStyles()(() => ({
252804
252821
  }));
252805
252822
  function ChannelNamesLegend(props) {
252806
252823
  const { images, imageLayerScopes, imageLayerCoordination, imageChannelScopesByLayer, imageChannelCoordination } = props;
252807
- const { classes: classes2 } = useStyles$n();
252824
+ const { classes: classes2 } = useStyles$o();
252808
252825
  const reversedImageLayerScopes = useMemo$1(() => [...imageLayerScopes || []].reverse(), [imageLayerScopes]);
252809
252826
  return jsxRuntimeExports.jsx("div", { className: classes2.channelNamesLegendContainer, children: imageLayerScopes ? reversedImageLayerScopes.map((layerScope) => {
252810
252827
  const layerCoordination = imageLayerCoordination[0][layerScope];
@@ -253215,7 +253232,7 @@ function GatingScatterplotOptions(props) {
253215
253232
  const gatingScatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
253216
253233
  const gatingScatterplotGeneXId = $bdb11010cef70236$export$f680877a34711e37();
253217
253234
  const gatingScatterplotGeneYId = $bdb11010cef70236$export$f680877a34711e37();
253218
- const { classes: classes2 } = useStyles$v();
253235
+ const { classes: classes2 } = useStyles$w();
253219
253236
  const handleSelectionX = (event2) => {
253220
253237
  setGatingFeatureSelectionX(event2.target.value === "" ? null : event2.target.value);
253221
253238
  };
@@ -268908,10 +268925,12 @@ async function loadMultiscales(root2) {
268908
268925
  }
268909
268926
  throw e3;
268910
268927
  }
268928
+ rootAttrs = flattenOmeAttrs(rootAttrs);
268911
268929
  let paths = ["0"];
268912
268930
  let labels2 = ["t", "c", "z", "y", "x"];
268913
268931
  if ("multiscales" in rootAttrs) {
268914
- const { datasets, axes } = rootAttrs.multiscales[0];
268932
+ const { multiscales } = rootAttrs;
268933
+ const { datasets, axes } = multiscales[0];
268915
268934
  paths = datasets.map((d) => d.path);
268916
268935
  if (axes) {
268917
268936
  if (isAxis(axes)) {
@@ -269760,7 +269779,7 @@ function SpatialOptions(props) {
269760
269779
  function handleTooltipsVisibilityChange(event2) {
269761
269780
  setTooltipsVisible(event2.target.checked);
269762
269781
  }
269763
- const { classes: classes2 } = useStyles$v();
269782
+ const { classes: classes2 } = useStyles$w();
269764
269783
  return jsxRuntimeExports.jsxs(OptionsContainer, { children: [canShowColorEncodingOption ? jsxRuntimeExports.jsx(CellColorEncodingOption, { observationsLabel, cellColorEncoding, setCellColorEncoding }) : null, canShow3DOptions ? jsxRuntimeExports.jsx(ToggleFixedAxisButton, { setSpatialAxisFixed, spatialAxisFixed, use3d }) : null, jsxRuntimeExports.jsxs(TableRow, { children: [jsxRuntimeExports.jsx(TableCell, { className: classes2.labelCell, variant: "head", scope: "row", children: jsxRuntimeExports.jsx("label", { htmlFor: `gene-expression-colormap-option-tooltip-visibility-${spatialOptionsId}`, children: "Tooltips Visible" }) }), jsxRuntimeExports.jsx(TableCell, { className: classes2.inputCell, variant: "body", children: jsxRuntimeExports.jsx(Checkbox$1, {
269765
269784
  className: classes2.checkbox,
269766
269785
  /**
@@ -271782,12 +271801,12 @@ class ErrorBoundary2 extends React__default.Component {
271782
271801
  }
271783
271802
  }
271784
271803
  const LazySpatialThree = React__default.lazy(async () => {
271785
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-DOQcKDet.js");
271804
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-4QK113Cn.js");
271786
271805
  return { default: SpatialWrapper2 };
271787
271806
  });
271788
271807
  const SpatialThreeAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary2, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialThree, { ...props }) }) }) }));
271789
271808
  const LazySpatialAccelerated = React__default.lazy(async () => {
271790
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-KkFy43wF.js");
271809
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-BopFrQ1h.js");
271791
271810
  return { default: SpatialWrapper2 };
271792
271811
  });
271793
271812
  const SpatialAcceleratedAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary2, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialAccelerated, { ...props }) }) }) }));
@@ -273298,7 +273317,7 @@ function HeatmapTooltipSubscriber(props) {
273298
273317
  }
273299
273318
  function HeatmapOptions(props) {
273300
273319
  const { geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange, tooltipsVisible, setTooltipsVisible } = props;
273301
- const { classes: classes2 } = useStyles$v();
273320
+ const { classes: classes2 } = useStyles$w();
273302
273321
  const heatmapOptionsId = $bdb11010cef70236$export$f680877a34711e37();
273303
273322
  function handleGeneExpressionColormapChange(event2) {
273304
273323
  setGeneExpressionColormap(event2.target.value);
@@ -279907,7 +279926,7 @@ _defineProperty$3(WindowScroller, "defaultProps", {
279907
279926
  serverHeight: 0,
279908
279927
  serverWidth: 0
279909
279928
  });
279910
- const useStyles$m = makeStyles()((theme) => ({
279929
+ const useStyles$n = makeStyles()((theme) => ({
279911
279930
  selectableTable: {
279912
279931
  flex: "1 1 auto",
279913
279932
  outline: "none"
@@ -280056,7 +280075,7 @@ function SelectableTable(props) {
280056
280075
  onChange(null);
280057
280076
  }
280058
280077
  }, [selectedRows, allowMultiple]);
280059
- const { classes: classes2 } = useStyles$m();
280078
+ const { classes: classes2 } = useStyles$n();
280060
280079
  const inputUuid = v4$1();
280061
280080
  const rowRenderer = ({ index: index2, style: style2 }) => (
280062
280081
  // eslint-disable-next-line jsx-a11y/interactive-supports-focus
@@ -280081,7 +280100,7 @@ const FEATURELIST_SORT_OPTIONS = [
280081
280100
  "original"
280082
280101
  ];
280083
280102
  const ALT_COLNAME = "Alternate ID";
280084
- const useStyles$l = makeStyles()(() => ({
280103
+ const useStyles$m = makeStyles()(() => ({
280085
280104
  searchBar: {
280086
280105
  marginTop: "10px",
280087
280106
  marginLeft: "10px",
@@ -280094,7 +280113,7 @@ const useStyles$l = makeStyles()(() => ({
280094
280113
  }));
280095
280114
  function FeatureList(props) {
280096
280115
  const { width: width2, height: height2, hasColorEncoding, geneList = [], featureLabelsMap, geneSelection = [], geneFilter = null, setGeneSelection, enableMultiSelect, showFeatureTable, featureListSort, featureListSortKey, hasFeatureLabels, primaryColumnName } = props;
280097
- const { classes: classes2 } = useStyles$l();
280116
+ const { classes: classes2 } = useStyles$m();
280098
280117
  const [searchTerm, setSearchTerm] = useState("");
280099
280118
  const selectableTableSortKey = featureListSortKey === "featureIndex" ? "key" : "name";
280100
280119
  const searchResults = useMemo$1(() => geneList.filter((gene) => gene.toLowerCase().includes(searchTerm.toLowerCase()) || featureLabelsMap?.get(gene)?.toLowerCase().includes(searchTerm.toLowerCase()) || featureLabelsMap?.get(cleanFeatureId(gene))?.toLowerCase().includes(searchTerm.toLowerCase())), [geneList, searchTerm, featureLabelsMap]);
@@ -280158,7 +280177,7 @@ function FeatureListOptions(props) {
280158
280177
  function handleShowTableChange(event2) {
280159
280178
  setShowFeatureTable(event2.target.checked);
280160
280179
  }
280161
- const { classes: classes2 } = useStyles$v();
280180
+ const { classes: classes2 } = useStyles$w();
280162
280181
  return jsxRuntimeExports.jsxs(OptionsContainer, { children: [children3, jsxRuntimeExports.jsxs(TableRow, { children: [jsxRuntimeExports.jsx(TableCell, { className: classes2.labelCell, variant: "head", scope: "row", children: jsxRuntimeExports.jsx("label", { htmlFor: `feature-list-sort-option-${featureListId}`, children: "Sort Ordering" }) }), jsxRuntimeExports.jsx(TableCell, { variant: "body", children: jsxRuntimeExports.jsx(OptionSelect, { className: classes2.select, value: featureListSort, onChange: handleFeatureListSortChange, inputProps: {
280163
280182
  id: `feature-list-sort-option-${featureListId}`
280164
280183
  }, children: FEATURELIST_SORT_OPTIONS.map((option) => jsxRuntimeExports.jsx("option", { value: option, children: option }, option)) }) })] }), hasFeatureLabels ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs(TableRow, { children: [jsxRuntimeExports.jsx(TableCell, { className: classes2.labelCell, variant: "head", scope: "row", children: jsxRuntimeExports.jsx("label", { htmlFor: `feature-list-sort-key-${featureListId}`, children: "Sort Key" }) }), jsxRuntimeExports.jsx(TableCell, { variant: "body", children: jsxRuntimeExports.jsx(OptionSelect, { className: classes2.select, disabled: featureListSort === "original", value: featureListSortKey, onChange: handleFeatureListSortKeyChange, inputProps: {
@@ -280169,7 +280188,7 @@ function FeatureListOptions(props) {
280169
280188
  id: `feature-list-show-alternative-ids-${featureListId}`
280170
280189
  } } }) })] })] }) : null] });
280171
280190
  }
280172
- const useStyles$k = makeStyles()((theme) => ({
280191
+ const useStyles$l = makeStyles()((theme) => ({
280173
280192
  featureListContainer: {
280174
280193
  width: "100%",
280175
280194
  height: "100%",
@@ -280184,7 +280203,7 @@ function FeatureListSubscriber(props) {
280184
280203
  const loaders = useLoaders();
280185
280204
  const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
280186
280205
  const [width2, height2, containerRef] = useGridItemSize();
280187
- const { classes: classes2 } = useStyles$k();
280206
+ const { classes: classes2 } = useStyles$l();
280188
280207
  const [{ dataset, obsType, featureType, featureSelection: geneSelection, featureFilter: geneFilter, obsColorEncoding: cellColorEncoding }, { setFeatureSelection: setGeneSelection, setFeatureFilter: setGeneFilter, setFeatureHighlight: setGeneHighlight, setObsColorEncoding: setCellColorEncoding }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$2.FEATURE_LIST], coordinationScopes);
280189
280208
  const variablesLabel = variablesLabelOverride || featureType;
280190
280209
  const title2 = titleOverride || `${capitalize$3(variablesLabel)} List`;
@@ -280252,6 +280271,12 @@ const useControllerSectionStyles = makeStyles()((theme) => ({
280252
280271
  },
280253
280272
  layerControllerGrid: {
280254
280273
  marginTop: "10px"
280274
+ },
280275
+ layerControllerSubRow: {
280276
+ flexDirection: "column",
280277
+ marginLeft: "40px",
280278
+ padding: "0px 8px",
280279
+ backgroundColor: theme.palette.paperBackground
280255
280280
  }
280256
280281
  }));
280257
280282
  const useAccordionStyles = makeStyles()((theme) => ({
@@ -280313,7 +280338,7 @@ const useSelectionSliderStyles = makeStyles()(() => ({
280313
280338
  backgroundColor: "rgba(128, 128, 128, 0.7)"
280314
280339
  }
280315
280340
  }));
280316
- const useStyles$j = makeStyles()((theme) => ({
280341
+ const useStyles$k = makeStyles()((theme) => ({
280317
280342
  paletteContainer: {
280318
280343
  width: "70px",
280319
280344
  height: "40px",
@@ -280334,10 +280359,10 @@ const useStyles$j = makeStyles()((theme) => ({
280334
280359
  }
280335
280360
  }));
280336
280361
  const ColorPalette = ({ handleChange }) => {
280337
- const { classes: classes2 } = useStyles$j();
280362
+ const { classes: classes2 } = useStyles$k();
280338
280363
  return jsxRuntimeExports.jsx("div", { className: classes2.paletteContainer, "aria-label": "Color swatch", children: VIEWER_PALETTE.map((color2) => jsxRuntimeExports.jsx(IconButton$1, { className: classes2.button, onClick: () => handleChange(color2), "aria-label": `Change color to ${color2}`, children: jsxRuntimeExports.jsx(LensIcon, { fontSize: "small", style: { color: `rgb(${color2})` }, className: classes2.icon }) }, color2)) });
280339
280364
  };
280340
- const useStyles$i = makeStyles()(() => ({
280365
+ const useStyles$j = makeStyles()(() => ({
280341
280366
  menuButton: {
280342
280367
  backgroundColor: "transparent"
280343
280368
  },
@@ -280356,7 +280381,7 @@ function MuiSpan(props) {
280356
280381
  }
280357
280382
  function ChannelOptions$1({ handlePropertyChange, handleChannelRemove, handleIQRUpdate }) {
280358
280383
  const [open2, setOpen] = useState(false);
280359
- const { classes: classes2 } = useStyles$i();
280384
+ const { classes: classes2 } = useStyles$j();
280360
280385
  const handleColorSelect = (color2) => {
280361
280386
  handlePropertyChange("color", color2);
280362
280387
  };
@@ -280973,7 +280998,7 @@ function LayerController$1(props) {
280973
280998
  minWidth: "50%"
280974
280999
  } })] }), jsxRuntimeExports.jsx(TabPanel, { value: tab2, index: 0, children: FullController }), jsxRuntimeExports.jsx(TabPanel, { value: tab2, index: 1, style: { marginTop: 4 }, children: jsxRuntimeExports.jsx(VolumeOptions, { loader: loader2, handleSlicerSetting, handleRenderingModeChange: setRenderingMode, renderingMode, xSlice, ySlice, zSlice, use3d, setViewState, spatialHeight, spatialWidth, modelMatrix: modelMatrix2 }) })] }) : FullController, shouldShowRemoveLayerButton ? jsxRuntimeExports.jsx(Button, { onClick: handleLayerRemove, fullWidth: true, variant: "outlined", style: buttonStyles, size: "small", children: "Remove Image Layer" }) : null] })] });
280975
281000
  }
280976
- const useStyles$h = makeStyles()(() => ({
281001
+ const useStyles$i = makeStyles()(() => ({
280977
281002
  addButton: {
280978
281003
  marginTop: "10px",
280979
281004
  marginBottom: "10px",
@@ -280985,7 +281010,7 @@ function ImageAddIcon() {
280985
281010
  }
280986
281011
  function ImageAddButton({ imageOptions, handleImageAdd }) {
280987
281012
  const [open2, setOpen] = useState(false);
280988
- const { classes: classes2 } = useStyles$h();
281013
+ const { classes: classes2 } = useStyles$i();
280989
281014
  const handleAdd = (imgData) => {
280990
281015
  setOpen((prev2) => !prev2);
280991
281016
  handleImageAdd(imgData);
@@ -281317,7 +281342,7 @@ const useEllipsisMenuStyles = makeStyles()(() => ({
281317
281342
  padding: "4px"
281318
281343
  }
281319
281344
  }));
281320
- const useStyles$g = makeStyles()(() => ({
281345
+ const useStyles$h = makeStyles()(() => ({
281321
281346
  colorPickerPaper: {
281322
281347
  overflow: "hidden",
281323
281348
  "& > ul": {
@@ -281375,13 +281400,15 @@ function ChannelColorPickerMenu(props) {
281375
281400
  setColor2([rgb2.r, rgb2.g, rgb2.b]);
281376
281401
  }
281377
281402
  }
281378
- const { classes: classes2 } = useStyles$g();
281403
+ const { classes: classes2 } = useStyles$h();
281379
281404
  const currentColor = color2 ? colorArrayToString(color2) : colorArrayToString(getDefaultColor(theme));
281380
- return jsxRuntimeExports.jsx(PopperMenu, { open: isStaticColor && visible ? open2 : false, setOpen, buttonIcon: isStaticColor && visible ? jsxRuntimeExports.jsx("div", { className: clsx(classes2.colorIcon, {
281405
+ const isWritable = typeof setColor2 === "function";
281406
+ const derivedOpen = isWritable ? isStaticColor && visible ? open2 : false : false;
281407
+ return jsxRuntimeExports.jsx(PopperMenu, { open: derivedOpen, setOpen, buttonIcon: isStaticColor && visible ? jsxRuntimeExports.jsx("div", { className: clsx(classes2.colorIcon, {
281381
281408
  [classes2.colorIconOutline]: theme !== "dark" && isEqual$2(color2, [255, 255, 255])
281382
281409
  }), style: { backgroundColor: currentColor } }) : isColormap && visible && featureValueColormap ? jsxRuntimeExports.jsx("div", { className: classes2.colorIcon, children: jsxRuntimeExports.jsx("svg", { width: "18", height: "18", children: jsxRuntimeExports.jsx("image", { x: 0, y: 0, width: 18, height: 18, preserveAspectRatio: "none", href: getXlinkHref(featureValueColormap), clipPath: "inset(0% round 4px)" }) }) }) : jsxRuntimeExports.jsx("div", { className: classes2.colorIcon }), buttonClassName: classes2.colorIconButton, withPaper: true, paperClassName: classes2.colorPickerPaper, "aria-label": "Open color picker menu", children: jsxRuntimeExports.jsx(Twitter$1, { className: classes2.colorPicker, disableAlpha: true, width: 108, triangle: "hide", colors: defaultPalette, color: currentColor, onChangeComplete: handleColorChange }) });
281383
281410
  }
281384
- const useStyles$f = makeStyles()(() => ({
281411
+ const useStyles$g = makeStyles()(() => ({
281385
281412
  layerTypeSpotIcon: {
281386
281413
  height: "100%",
281387
281414
  marginLeft: "1px",
@@ -281394,7 +281421,7 @@ const useStyles$f = makeStyles()(() => ({
281394
281421
  function SpotLayerEllipsisMenu(props) {
281395
281422
  const { strokeWidth, setStrokeWidth, filled, setFilled, featureSelection, obsColorEncoding, setObsColorEncoding, featureValueColormap, setFeatureValueColormap, featureValueColormapRange, setFeatureValueColormapRange, tooltipsVisible, setTooltipsVisible, tooltipCrosshairsVisible, setTooltipCrosshairsVisible, legendVisible, setLegendVisible } = props;
281396
281423
  const [open2, setOpen] = useState(false);
281397
- const { classes: classes2 } = useStyles$f();
281424
+ const { classes: classes2 } = useStyles$g();
281398
281425
  const { classes: selectClasses2 } = useSelectStyles();
281399
281426
  const { classes: menuClasses } = useEllipsisMenuStyles();
281400
281427
  const filledId = $bdb11010cef70236$export$f680877a34711e37();
@@ -281416,7 +281443,7 @@ function SpotLayerController(props) {
281416
281443
  const Visibility = useMemo$1(() => visibleSetting ? VisibilityIcon : VisibilityOffIcon, [visibleSetting]);
281417
281444
  const isStaticColor = obsColorEncoding === "spatialLayerColor";
281418
281445
  const isColormap = obsColorEncoding === "geneSelection";
281419
- const { classes: classes2 } = useStyles$f();
281446
+ const { classes: classes2 } = useStyles$g();
281420
281447
  const { classes: lcClasses } = useControllerSectionStyles();
281421
281448
  const { classes: menuClasses } = useEllipsisMenuStyles();
281422
281449
  const handleVisibleChange = useCallback(() => {
@@ -281426,6 +281453,104 @@ function SpotLayerController(props) {
281426
281453
  const handleOpacityChange = useCallback((e3, v) => setOpacity2(v), [setOpacity2]);
281427
281454
  return jsxRuntimeExports.jsx(Grid$1, { className: lcClasses.layerControllerGrid, children: jsxRuntimeExports.jsx(Paper, { elevation: 4, className: lcClasses.layerControllerRoot, children: jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Button, { onClick: handleVisibleChange, className: menuClasses.imageLayerVisibleButton, "aria-label": "Toggle spot layer visibility", children: jsxRuntimeExports.jsx(Visibility, {}) }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(ChannelColorPickerMenu, { theme, color: color2, setColor: setColor2, palette, isStaticColor, isColormap, featureValueColormap, visible }) }), jsxRuntimeExports.jsx(Grid$1, { size: 6, children: jsxRuntimeExports.jsx(Typography, { className: menuClasses.imageLayerName, children: label2 }) }), jsxRuntimeExports.jsx(Grid$1, { size: 2, children: jsxRuntimeExports.jsx(Slider, { value: opacity2, min: 0, max: 1, step: 1e-3, onChange: handleOpacityChange, className: menuClasses.imageLayerOpacitySlider, orientation: "horizontal", "aria-label": `Adjust opacity for layer ${label2}` }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(SpotLayerEllipsisMenu, { filled, setFilled, strokeWidth, setStrokeWidth, featureSelection, obsColorEncoding, setObsColorEncoding, featureValueColormap, setFeatureValueColormap, featureValueColormapRange, setFeatureValueColormapRange, tooltipsVisible, setTooltipsVisible, tooltipCrosshairsVisible, setTooltipCrosshairsVisible, legendVisible, setLegendVisible }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(SvgSpots, { className: classes2.layerTypeSpotIcon }) })] }) }) });
281428
281455
  }
281456
+ const useStyles$f = makeStyles()(() => ({
281457
+ layerFeatureControllerGrid: {
281458
+ padding: "0",
281459
+ flexWrap: "nowrap"
281460
+ },
281461
+ layerFeatureExpansionButton: {
281462
+ display: "inline-block",
281463
+ margin: 0,
281464
+ padding: 0,
281465
+ minWidth: 0,
281466
+ lineHeight: 1,
281467
+ width: "50%"
281468
+ },
281469
+ layerTypeFeatureIcon: {
281470
+ height: "100%",
281471
+ paddingLeft: "2px",
281472
+ fill: "currentColor",
281473
+ fontSize: "14px",
281474
+ width: "50%",
281475
+ maxWidth: "16px"
281476
+ }
281477
+ }));
281478
+ function LayerPerFeatureController(props) {
281479
+ const { theme, palette = null, featureName, featureColor, setFeatureColor, featureValueColormap, featureSelection, setFeatureSelection, spatialLayerColor, featureIndex, obsColorEncoding, loadingDoneFraction, opacity: opacity2, handleOpacityChange } = props;
281480
+ const featureColorIndex = useMemo$1(() => featureColor?.findIndex((fc) => fc.name === featureName) ?? -1, [featureColor, featureName]);
281481
+ const varIndex = useMemo$1(() => featureIndex?.indexOf(featureName) ?? -1, [featureIndex, featureName]);
281482
+ const randomByFeatureColor = useMemo$1(() => varIndex >= 0 ? PALETTE[varIndex % PALETTE.length] : [255, 255, 255], [varIndex]);
281483
+ const handleRemoveFeature = useCallback(() => {
281484
+ setFeatureSelection(featureSelection.filter((f2) => f2 !== featureName));
281485
+ }, [featureName, featureSelection, setFeatureSelection]);
281486
+ const handleColorChange = useCallback((newColor) => {
281487
+ if (featureColorIndex >= 0) {
281488
+ const nextFeatureColor = [...featureColor];
281489
+ nextFeatureColor[featureColorIndex] = {
281490
+ ...nextFeatureColor[featureColorIndex],
281491
+ color: newColor
281492
+ };
281493
+ setFeatureColor(nextFeatureColor);
281494
+ } else {
281495
+ setFeatureColor([
281496
+ ...featureColor ?? [],
281497
+ { name: featureName, color: newColor }
281498
+ ]);
281499
+ }
281500
+ }, [featureName, featureColor, setFeatureColor, featureColorIndex]);
281501
+ const { classes: classes2 } = useStyles$f();
281502
+ const { classes: lcClasses } = useControllerSectionStyles();
281503
+ const { classes: menuClasses } = useEllipsisMenuStyles();
281504
+ const [open2, setOpen] = useState(false);
281505
+ const { colorPickerColor, colorPickerReadable, colorPickerWritable, colorPickerTooltip } = useMemo$1(() => {
281506
+ if (obsColorEncoding === "geneSelection") {
281507
+ return {
281508
+ colorPickerColor: featureColor?.[featureColorIndex]?.color ?? spatialLayerColor,
281509
+ colorPickerReadable: true,
281510
+ colorPickerWritable: true,
281511
+ colorPickerTooltip: null
281512
+ };
281513
+ }
281514
+ if (obsColorEncoding === "spatialLayerColor") {
281515
+ return {
281516
+ colorPickerColor: spatialLayerColor,
281517
+ colorPickerReadable: true,
281518
+ colorPickerWritable: false,
281519
+ colorPickerTooltip: 'Currently using the color value from the parent point layer. Per-feature colors can be modified when the Color Encoding mode of the parent layer is "Feature Color".'
281520
+ };
281521
+ }
281522
+ if (obsColorEncoding === "randomByFeature") {
281523
+ return {
281524
+ colorPickerColor: randomByFeatureColor,
281525
+ colorPickerReadable: true,
281526
+ colorPickerWritable: false,
281527
+ colorPickerTooltip: 'Currently using the assigned random color. Per-feature colors can be modified when the Color Encoding mode of the parent layer is "Feature Color".'
281528
+ };
281529
+ }
281530
+ if (obsColorEncoding === "random") {
281531
+ return {
281532
+ colorPickerColor: null,
281533
+ colorPickerReadable: false,
281534
+ colorPickerWritable: false,
281535
+ colorPickerTooltip: 'Currently using a random color per point. Per-feature colors can be modified when the Color Encoding mode of the parent layer is "Feature Color".'
281536
+ };
281537
+ }
281538
+ return {
281539
+ colorPickerColor: null,
281540
+ colorPickerReadable: false,
281541
+ colorPickerWritable: false,
281542
+ colorPickerTooltip: null
281543
+ };
281544
+ }, [
281545
+ obsColorEncoding,
281546
+ spatialLayerColor,
281547
+ featureName,
281548
+ featureColor,
281549
+ featureColorIndex,
281550
+ randomByFeatureColor
281551
+ ]);
281552
+ return jsxRuntimeExports.jsx(Grid$1, { className: lcClasses.layerControllerGrid, children: jsxRuntimeExports.jsxs(Paper, { elevation: 2, className: lcClasses.layerControllerSubRow, children: [jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Button, { onClick: handleRemoveFeature, className: menuClasses.imageLayerVisibleButton, "aria-label": "Remove feature", children: jsxRuntimeExports.jsx(ClearIcon, {}) }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Tooltip$3, { title: colorPickerTooltip ?? "", disableHoverListener: !colorPickerTooltip, placement: "top", children: jsxRuntimeExports.jsx("span", { children: jsxRuntimeExports.jsx(ChannelColorPickerMenu, { theme, color: colorPickerColor, setColor: colorPickerWritable ? handleColorChange : null, palette, isStaticColor: colorPickerReadable, isColormap: false, featureValueColormap, visible: true }) }) }) }), jsxRuntimeExports.jsx(Grid$1, { size: 6, children: jsxRuntimeExports.jsx(Typography, { className: menuClasses.imageLayerName, children: featureName }) }), jsxRuntimeExports.jsx(Grid$1, { size: 2, sx: { paddingRight: "12px", overflow: "visible" }, children: jsxRuntimeExports.jsx(Slider, { value: opacity2, min: 0, max: 1, step: 1e-3, onChange: handleOpacityChange, className: menuClasses.imageLayerOpacitySlider, orientation: "horizontal", "aria-label": `Adjust opacity for layer ${featureName}` }) }), jsxRuntimeExports.jsxs(Grid$1, { size: 1, container: true, direction: "row", children: [jsxRuntimeExports.jsx(SvgPoints, { className: classes2.layerTypeFeatureIcon }), null] })] }), loadingDoneFraction < 1 ? jsxRuntimeExports.jsx(Grid$1, { size: 12, container: true, direction: "column", justifyContent: "space-between", className: classes2.layerFeatureControllerGrid, children: jsxRuntimeExports.jsx(LinearProgress, { variant: loadingDoneFraction === 0 ? "indeterminate" : "determinate", value: loadingDoneFraction * 100 }) }) : null] }) }, featureName);
281553
+ }
281429
281554
  const useStyles$e = makeStyles()(() => ({
281430
281555
  pointLayerButton: {
281431
281556
  borderStyle: "dashed",
@@ -281468,7 +281593,7 @@ function PointLayerEllipsisMenu(props) {
281468
281593
  return jsxRuntimeExports.jsxs(PopperMenu, { open: open2, setOpen, buttonIcon: jsxRuntimeExports.jsx(MoreVertIcon, {}), buttonClassName: menuClasses.imageLayerMenuButton, containerClassName: menuClasses.imageLayerPopperContainer, withPaper: true, "aria-label": "Open point layer options menu", children: [jsxRuntimeExports.jsxs(MenuItem, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: quantitativeColormapId, children: "Color Encoding: " }), jsxRuntimeExports.jsxs(NativeSelect, { onChange: (e3) => setObsColorEncoding(e3.target.value), value: obsColorEncoding, inputProps: { id: quantitativeColormapId, "aria-label": "Color encoding selector" }, classes: { root: selectClasses2.selectRoot }, children: [jsxRuntimeExports.jsx("option", { value: "spatialLayerColor", children: "Static Color" }), jsxRuntimeExports.jsx("option", { value: "geneSelection", children: "Feature Color" }), jsxRuntimeExports.jsx("option", { value: "randomByFeature", children: "Random Color per Feature" }), jsxRuntimeExports.jsx("option", { value: "random", children: "Random Color per Point" })] })] }), jsxRuntimeExports.jsxs(MenuItem, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: featureFilterModeId, children: "Filter to Feature Selection: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", className: menuClasses.menuItemCheckbox, checked: featureFilterMode === "featureSelection", onChange: (e3, v) => setFeatureFilterMode(v ? "featureSelection" : null), slotProps: { input: { id: featureFilterModeId, "aria-label": "Toggle feature filter mode" } } })] }), jsxRuntimeExports.jsxs(MenuItem, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: colormapRangeId, children: "Colormap Range: " }), jsxRuntimeExports.jsx(Slider, { disabled: obsColorEncoding !== "geneSelection", value: featureValueColormapRange, min: 0, max: 1, step: 0.01, onChange: (e3, v) => setFeatureValueColormapRange(v), className: menuClasses.menuItemSlider, orientation: "horizontal", id: colormapRangeId, getAriaLabel: (index2) => index2 === 0 ? "Low value colormap range slider" : "High value colormap range slider" })] }), jsxRuntimeExports.jsxs(MenuItem, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: tooltipsVisibleId, children: "Tooltips Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", className: menuClasses.menuItemCheckbox, checked: tooltipsVisible, onChange: (e3, v) => setTooltipsVisible(v), slotProps: { input: { id: tooltipsVisibleId, "aria-label": "Toggle tooltip visibility" } } })] }), jsxRuntimeExports.jsxs(MenuItem, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: crosshairsVisibleId, children: "Tooltip Crosshairs Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", className: menuClasses.menuItemCheckbox, checked: tooltipCrosshairsVisible, onChange: (e3, v) => setTooltipCrosshairsVisible(v), slotProps: { input: { id: crosshairsVisibleId, "aria-label": "Toggle tooltip crosshair visibility" } } })] }), jsxRuntimeExports.jsxs(MenuItem, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: legendVisibleId, children: "Legend Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", className: menuClasses.menuItemCheckbox, checked: legendVisible, onChange: (e3, v) => setLegendVisible(v), slotProps: { input: { id: legendVisibleId, "aria-label": "Toggle legend visibility" } } })] })] });
281469
281594
  }
281470
281595
  function PointLayerController(props) {
281471
- const { theme, layerScope, layerCoordination, setLayerCoordination, palette = null, pointMatrixIndicesData, tiledPointsLoadingProgress } = props;
281596
+ const { theme, layerScope, layerCoordination, setLayerCoordination, palette = null, pointMatrixIndicesData, tiledPointsLoadingProgress, layerPerFeatureForPoints } = props;
281472
281597
  const [open2, setOpen] = useState(false);
281473
281598
  const loadingDoneFraction = useMemo$1(() => {
281474
281599
  if (tiledPointsLoadingProgress && typeof tiledPointsLoadingProgress === "object") {
@@ -281553,7 +281678,8 @@ function PointLayerController(props) {
281553
281678
  useCallback(() => setOpen((prev2) => !prev2), []);
281554
281679
  const [coloringTabIndex, setColoringTabIndex] = useState(0);
281555
281680
  const { featureIndex } = pointMatrixIndicesData || {};
281556
- return jsxRuntimeExports.jsx(Grid$1, { className: lcClasses.layerControllerGrid, children: jsxRuntimeExports.jsxs(Paper, { elevation: 4, className: lcClasses.layerControllerRoot, children: [jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Button, { onClick: handleVisibleChange, className: menuClasses.imageLayerVisibleButton, "aria-label": "Toggle layer visibility", children: jsxRuntimeExports.jsx(Visibility, {}) }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(ChannelColorPickerMenu, { theme, color: color2, setColor: setColor2, palette, isStaticColor, isColormap, featureValueColormap, visible }) }), jsxRuntimeExports.jsx(Grid$1, { size: 6, children: jsxRuntimeExports.jsx(Typography, { className: menuClasses.imageLayerName, children: label2 }) }), jsxRuntimeExports.jsx(Grid$1, { size: 2, children: jsxRuntimeExports.jsx(Slider, { value: opacity2, min: 0, max: 1, step: 1e-3, onChange: handleOpacityChange, className: menuClasses.imageLayerOpacitySlider, orientation: "horizontal", "aria-label": `Adjust opacity for layer ${label2}` }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(PointLayerEllipsisMenu, { featureSelection, obsColorEncoding, setObsColorEncoding, featureValueColormapRange, setFeatureValueColormapRange, tooltipsVisible, setTooltipsVisible, tooltipCrosshairsVisible, setTooltipCrosshairsVisible, legendVisible, setLegendVisible, featureFilterMode, setFeatureFilterMode }) }), jsxRuntimeExports.jsxs(Grid$1, { size: 1, container: true, direction: "row", children: [jsxRuntimeExports.jsx(SvgPoints, { className: classes2.layerTypePointIcon }), null] })] }), loadingDoneFraction < 1 ? jsxRuntimeExports.jsx(Grid$1, { size: 12, container: true, direction: "column", justifyContent: "space-between", className: classes2.pointFeatureControllerGrid, children: jsxRuntimeExports.jsx(LinearProgress, { variant: loadingDoneFraction === 0 ? "indeterminate" : "determinate", value: loadingDoneFraction * 100 }) }) : null, null] }) });
281681
+ const hasSelectedFeatures = Array.isArray(featureSelection) && featureSelection.length > 0;
281682
+ return jsxRuntimeExports.jsxs(Grid$1, { className: lcClasses.layerControllerGrid, children: [jsxRuntimeExports.jsxs(Paper, { elevation: 4, className: lcClasses.layerControllerRoot, children: [jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Button, { onClick: handleVisibleChange, className: menuClasses.imageLayerVisibleButton, "aria-label": "Toggle layer visibility", children: jsxRuntimeExports.jsx(Visibility, {}) }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(ChannelColorPickerMenu, { theme, color: color2, setColor: setColor2, palette, isStaticColor, isColormap, featureValueColormap, visible }) }), jsxRuntimeExports.jsx(Grid$1, { size: 6, children: jsxRuntimeExports.jsx(Typography, { className: menuClasses.imageLayerName, children: label2 }) }), jsxRuntimeExports.jsx(Grid$1, { size: 2, children: jsxRuntimeExports.jsx(Slider, { value: opacity2, min: 0, max: 1, step: 1e-3, onChange: handleOpacityChange, className: menuClasses.imageLayerOpacitySlider, orientation: "horizontal", "aria-label": `Adjust opacity for layer ${label2}` }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(PointLayerEllipsisMenu, { featureSelection, obsColorEncoding, setObsColorEncoding, featureValueColormapRange, setFeatureValueColormapRange, tooltipsVisible, setTooltipsVisible, tooltipCrosshairsVisible, setTooltipCrosshairsVisible, legendVisible, setLegendVisible, featureFilterMode, setFeatureFilterMode }) }), jsxRuntimeExports.jsxs(Grid$1, { size: 1, container: true, direction: "row", children: [jsxRuntimeExports.jsx(SvgPoints, { className: classes2.layerTypePointIcon }), null] })] }), loadingDoneFraction < 1 ? jsxRuntimeExports.jsx(Grid$1, { size: 12, container: true, direction: "column", justifyContent: "space-between", className: classes2.pointFeatureControllerGrid, children: jsxRuntimeExports.jsx(LinearProgress, { variant: loadingDoneFraction === 0 ? "indeterminate" : "determinate", value: loadingDoneFraction * 100 }) }) : null, null] }), layerPerFeatureForPoints && hasSelectedFeatures ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [featureSelection.map((featureName) => jsxRuntimeExports.jsx(LayerPerFeatureController, { theme, featureName, featureColor, setFeatureColor, spatialLayerColor, featureIndex, featureValueColormap, featureSelection, setFeatureSelection, obsColorEncoding, loadingDoneFraction, opacity: opacity2, handleOpacityChange }, featureName)), jsxRuntimeExports.jsx(Grid$1, { className: lcClasses.layerControllerGrid, children: jsxRuntimeExports.jsx(Paper, { elevation: 2, className: lcClasses.layerControllerSubRow, children: jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Button, { onClick: () => setFeatureFilterMode(featureFilterMode === "featureSelection" ? null : "featureSelection"), className: menuClasses.imageLayerVisibleButton, "aria-label": "Toggle visibility of unselected points", children: featureFilterMode === "featureSelection" ? jsxRuntimeExports.jsx(VisibilityOffIcon, {}) : jsxRuntimeExports.jsx(VisibilityIcon, {}) }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(ChannelColorPickerMenu, { theme, color: getDefaultColor("dark"), setColor: null, isStaticColor: true, isColormap: false, visible: true }) }), jsxRuntimeExports.jsx(Grid$1, { size: 6, children: jsxRuntimeExports.jsx(Typography, { className: menuClasses.imageLayerName, children: "Unselected" }) }), jsxRuntimeExports.jsx(Grid$1, { size: 2, sx: { paddingRight: "12px", overflow: "visible" }, children: jsxRuntimeExports.jsx(Slider, { value: opacity2, min: 0, max: 1, step: 1e-3, onChange: handleOpacityChange, className: menuClasses.imageLayerOpacitySlider, orientation: "horizontal", "aria-label": "Adjust opacity for unselected layer" }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(SvgPoints, { className: classes2.layerTypePointIcon }) })] }) }) })] }) : null] });
281557
281683
  }
281558
281684
  const useStyles$d = makeStyles()(() => ({
281559
281685
  layerTypeSegmentationIcon: {
@@ -281992,16 +282118,17 @@ function GlobalDimensionSlider(props) {
281992
282118
  const { classes: lcClasses } = useControllerSectionStyles();
281993
282119
  const { classes: classes2 } = useStyles$7();
281994
282120
  const isForZ = spatialRenderingMode !== null;
282121
+ const is3dMode = spatialRenderingMode === "3D";
281995
282122
  function handleRenderingModeChange(event2) {
281996
282123
  setSpatialRenderingMode(event2.target.checked ? "3D" : "2D");
281997
282124
  if (!event2.target.checked) {
281998
282125
  setTargetValue(Math.floor(targetValue));
281999
282126
  }
282000
282127
  }
282001
- return jsxRuntimeExports.jsx(Grid$1, { className: lcClasses.layerControllerGrid, children: jsxRuntimeExports.jsx(Paper, { elevation: 4, className: lcClasses.layerControllerRoot, children: jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(SvgDimensions, { className: classes2.dimensionsIcon }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Typography, { className: classes2.dimensionLabel, children: label2 }) }), jsxRuntimeExports.jsx(Grid$1, { size: 8, children: jsxRuntimeExports.jsx(Slider, { value: targetValue, min: min2, max: max2, step: 1, onChange: (e3, v) => setTargetValue(v), className: classes2.dimensionSlider, valueLabelDisplay: "auto", orientation: "horizontal", disabled: spatialRenderingMode === "3D", "aria-label": `${label2}-slice slider` }) }), jsxRuntimeExports.jsx(Grid$1, { size: 2, children: isForZ ? jsxRuntimeExports.jsx(FormGroup, { row: true, className: classes2.switchFormGroup, children: jsxRuntimeExports.jsx(FormControlLabel$1, { control: jsxRuntimeExports.jsx(Switch, { color: "primary", checked: spatialRenderingMode === "3D", onChange: handleRenderingModeChange, name: "is3dMode" }), label: "3D" }) }) : null })] }) }) });
282128
+ return jsxRuntimeExports.jsx(Grid$1, { className: lcClasses.layerControllerGrid, children: jsxRuntimeExports.jsx(Paper, { elevation: 4, className: lcClasses.layerControllerRoot, children: jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", children: [jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(SvgDimensions, { className: classes2.dimensionsIcon }) }), jsxRuntimeExports.jsx(Grid$1, { size: 1, children: jsxRuntimeExports.jsx(Typography, { className: classes2.dimensionLabel, children: label2 }) }), jsxRuntimeExports.jsx(Grid$1, { size: 8, children: !is3dMode ? jsxRuntimeExports.jsx(Slider, { value: targetValue, min: min2, max: max2, step: 1, onChange: (e3, v) => setTargetValue(v), className: classes2.dimensionSlider, valueLabelDisplay: "auto", orientation: "horizontal", disabled: spatialRenderingMode === "3D", "aria-label": `${label2}-slice slider` }) : null }), jsxRuntimeExports.jsx(Grid$1, { size: 2, children: isForZ ? jsxRuntimeExports.jsx(FormGroup, { row: true, className: classes2.switchFormGroup, children: jsxRuntimeExports.jsx(FormControlLabel$1, { control: jsxRuntimeExports.jsx(Switch, { color: "primary", checked: spatialRenderingMode === "3D", onChange: handleRenderingModeChange, name: "is3dMode" }), label: "3D" }) }) : null })] }) }) });
282002
282129
  }
282003
282130
  function LayerController(props) {
282004
- const { theme, coordinationScopesRaw, segmentationLayerScopes, segmentationLayerCoordination, segmentationChannelScopesByLayer, segmentationChannelCoordination, images, imageLayerScopes, imageLayerCoordination, targetT, targetZ, setTargetT, setTargetZ, spatialRenderingMode, setSpatialRenderingMode, imageChannelScopesByLayer, imageChannelCoordination, spotLayerScopes, spotLayerCoordination, pointLayerScopes, pointLayerCoordination, pointMultiIndicesData, volumeLoadingStatus, tiledPointsLoadingProgress } = props;
282131
+ const { theme, coordinationScopesRaw, segmentationLayerScopes, segmentationLayerCoordination, segmentationChannelScopesByLayer, segmentationChannelCoordination, images, imageLayerScopes, imageLayerCoordination, targetT, targetZ, setTargetT, setTargetZ, spatialRenderingMode, setSpatialRenderingMode, imageChannelScopesByLayer, imageChannelCoordination, spotLayerScopes, spotLayerCoordination, pointLayerScopes, pointLayerCoordination, pointMultiIndicesData, volumeLoadingStatus, tiledPointsLoadingProgress, layerPerFeatureForPoints } = props;
282005
282132
  const anyLayerHasT = Object.values(images || {}).some((image2) => image2?.image?.instance.hasTStack());
282006
282133
  const anyLayerHasZ = Object.values(images || {}).some((image2) => image2?.image?.instance.hasZStack());
282007
282134
  const maxT = Object.values(images || {}).reduce((a2, h2) => Math.max(a2, h2?.image?.instance.getNumT()), 1) - 1;
@@ -282010,10 +282137,10 @@ function LayerController(props) {
282010
282137
  const reversedSegmentationLayerScopes = useMemo$1(() => [...segmentationLayerScopes || []].reverse(), [segmentationLayerScopes]);
282011
282138
  const reversedSpotLayerScopes = useMemo$1(() => [...spotLayerScopes || []].reverse(), [spotLayerScopes]);
282012
282139
  const reversedPointLayerScopes = useMemo$1(() => [...pointLayerScopes || []].reverse(), [pointLayerScopes]);
282013
- return jsxRuntimeExports.jsxs("div", { children: [anyLayerHasZ ? jsxRuntimeExports.jsx(GlobalDimensionSlider, { label: "Z", targetValue: targetZ, setTargetValue: setTargetZ, max: maxZ, spatialRenderingMode, setSpatialRenderingMode }) : null, anyLayerHasT ? jsxRuntimeExports.jsx(GlobalDimensionSlider, { label: "T", targetValue: targetT, setTargetValue: setTargetT, max: maxT }) : null, pointLayerScopes && reversedPointLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(PointLayerController, { theme, layerScope, layerCoordination: pointLayerCoordination[0][layerScope], setLayerCoordination: pointLayerCoordination[1][layerScope], pointMatrixIndicesData: pointMultiIndicesData?.[layerScope], tiledPointsLoadingProgress }, layerScope)), spotLayerScopes && reversedSpotLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(SpotLayerController, { theme, layerScope, layerCoordination: spotLayerCoordination[0][layerScope], setLayerCoordination: spotLayerCoordination[1][layerScope] }, layerScope)), segmentationLayerScopes && reversedSegmentationLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(SegmentationLayerController, { theme, layerScope, layerCoordination: segmentationLayerCoordination[0][layerScope], setLayerCoordination: segmentationLayerCoordination[1][layerScope], channelScopes: segmentationChannelScopesByLayer[layerScope], channelCoordination: segmentationChannelCoordination[0][layerScope], setChannelCoordination: segmentationChannelCoordination[1][layerScope] }, layerScope)), imageLayerScopes && reversedImageLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(ImageLayerController, { theme, coordinationScopesRaw, layerScope, layerCoordination: imageLayerCoordination[0][layerScope], setLayerCoordination: imageLayerCoordination[1][layerScope], channelScopes: imageChannelScopesByLayer[layerScope], channelCoordination: imageChannelCoordination[0][layerScope], setChannelCoordination: imageChannelCoordination[1][layerScope], image: images[layerScope]?.image?.instance, featureIndex: images[layerScope]?.featureIndex, targetT, targetZ, spatialRenderingMode, volumeLoadingProgress: volumeLoadingStatus?.loadingProgress, onStopVolumeLoading: volumeLoadingStatus?.onStopLoading, onRestartVolumeLoading: volumeLoadingStatus?.onRestartLoading, volumeStillRef: volumeLoadingStatus?.stillRef }, layerScope))] });
282140
+ return jsxRuntimeExports.jsxs("div", { children: [anyLayerHasZ ? jsxRuntimeExports.jsx(GlobalDimensionSlider, { label: "Z", targetValue: targetZ, setTargetValue: setTargetZ, max: maxZ, spatialRenderingMode, setSpatialRenderingMode }) : null, anyLayerHasT ? jsxRuntimeExports.jsx(GlobalDimensionSlider, { label: "T", targetValue: targetT, setTargetValue: setTargetT, max: maxT }) : null, pointLayerScopes && reversedPointLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(PointLayerController, { theme, layerScope, layerCoordination: pointLayerCoordination[0][layerScope], setLayerCoordination: pointLayerCoordination[1][layerScope], pointMatrixIndicesData: pointMultiIndicesData?.[layerScope], tiledPointsLoadingProgress, layerPerFeatureForPoints }, layerScope)), spotLayerScopes && reversedSpotLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(SpotLayerController, { theme, layerScope, layerCoordination: spotLayerCoordination[0][layerScope], setLayerCoordination: spotLayerCoordination[1][layerScope] }, layerScope)), segmentationLayerScopes && reversedSegmentationLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(SegmentationLayerController, { theme, layerScope, layerCoordination: segmentationLayerCoordination[0][layerScope], setLayerCoordination: segmentationLayerCoordination[1][layerScope], channelScopes: segmentationChannelScopesByLayer[layerScope], channelCoordination: segmentationChannelCoordination[0][layerScope], setChannelCoordination: segmentationChannelCoordination[1][layerScope] }, layerScope)), imageLayerScopes && reversedImageLayerScopes.map((layerScope) => jsxRuntimeExports.jsx(ImageLayerController, { theme, coordinationScopesRaw, layerScope, layerCoordination: imageLayerCoordination[0][layerScope], setLayerCoordination: imageLayerCoordination[1][layerScope], channelScopes: imageChannelScopesByLayer[layerScope], channelCoordination: imageChannelCoordination[0][layerScope], setChannelCoordination: imageChannelCoordination[1][layerScope], image: images[layerScope]?.image?.instance, featureIndex: images[layerScope]?.featureIndex, targetT, targetZ, spatialRenderingMode, volumeLoadingProgress: volumeLoadingStatus?.loadingProgress, onStopVolumeLoading: volumeLoadingStatus?.onStopLoading, onRestartVolumeLoading: volumeLoadingStatus?.onRestartLoading, volumeStillRef: volumeLoadingStatus?.stillRef }, layerScope))] });
282014
282141
  }
282015
282142
  function LayerControllerSubscriber(props) {
282016
- const { coordinationScopes: coordinationScopesRaw, coordinationScopesBy: coordinationScopesByRaw, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: title2 = "Spatial Layers", uuid: uuid2, cameraPresets } = props;
282143
+ const { coordinationScopes: coordinationScopesRaw, coordinationScopesBy: coordinationScopesByRaw, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title: title2 = "Spatial Layers", uuid: uuid2, layerPerFeatureForPoints = false, cameraPresets } = props;
282017
282144
  const loaders = useLoaders();
282018
282145
  const mergeCoordination = useMergeCoordination();
282019
282146
  const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
@@ -282169,7 +282296,7 @@ function LayerControllerSubscriber(props) {
282169
282296
  imageDataStatus,
282170
282297
  pointMultiIndicesDataStatus
282171
282298
  ]);
282172
- return jsxRuntimeExports.jsx(TitleInfo, { title: title2, isScroll: true, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, isReady, errors, children: jsxRuntimeExports.jsx(LayerController, { theme, coordinationScopesRaw, segmentationLayerScopes, segmentationLayerCoordination, segmentationChannelScopesByLayer, segmentationChannelCoordination, images: imageData, imageLayerScopes, imageLayerCoordination, targetT, targetZ, setTargetT, setTargetZ, spatialRenderingMode, setSpatialRenderingMode, imageChannelScopesByLayer, imageChannelCoordination, spotLayerScopes, spotLayerCoordination, pointLayerScopes, pointLayerCoordination, pointMultiIndicesData, volumeLoadingStatus, tiledPointsLoadingProgress }) });
282299
+ return jsxRuntimeExports.jsx(TitleInfo, { title: title2, isScroll: true, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, isReady, errors, children: jsxRuntimeExports.jsx(LayerController, { theme, coordinationScopesRaw, segmentationLayerScopes, segmentationLayerCoordination, segmentationChannelScopesByLayer, segmentationChannelCoordination, images: imageData, imageLayerScopes, imageLayerCoordination, targetT, targetZ, setTargetT, setTargetZ, spatialRenderingMode, setSpatialRenderingMode, imageChannelScopesByLayer, imageChannelCoordination, spotLayerScopes, spotLayerCoordination, pointLayerScopes, pointLayerCoordination, pointMultiIndicesData, layerPerFeatureForPoints, volumeLoadingStatus, tiledPointsLoadingProgress }) });
282173
282300
  }
282174
282301
  function LinkController(props) {
282175
282302
  const { linkIDInit, authToken, linkEndpoint, websocketEndpoint, fileTypes, coordinationTypes, stores } = props;
@@ -284157,7 +284284,7 @@ function HiglassGlobalStyles(props) {
284157
284284
  }
284158
284285
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
284159
284286
  const LazyHiGlassComponent = React__default.lazy(async () => {
284160
- const { HiGlassComponent } = await import("./higlass-BSSjTJz8.js");
284287
+ const { HiGlassComponent } = await import("./higlass-BNRNwGCm.js");
284161
284288
  return { default: HiGlassComponent };
284162
284289
  });
284163
284290
  const HG_SIZE = 800;
@@ -287105,7 +287232,7 @@ function NeuroglancerGlobalStyles(props) {
287105
287232
  const { classes: classes2 } = props;
287106
287233
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalStyles$3, { styles: globalNeuroglancerCss }), jsxRuntimeExports.jsx(ScopedGlobalStyles, { styles: globalNeuroglancerStyles, parentClassName: classes2.neuroglancerWrapper })] });
287107
287234
  }
287108
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-B1SXObz_.js"));
287235
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-DvvZ7TpP.js"));
287109
287236
  function createWorker() {
287110
287237
  const worker = new WorkerFactory$1();
287111
287238
  worker.AsyncComputationWorker = WorkerFactory;
@@ -287176,8 +287303,8 @@ class NeuroglancerComp extends PureComponent {
287176
287303
  }
287177
287304
  }
287178
287305
  render() {
287179
- const { classes: classes2, viewerState, cellColorMapping } = this.props;
287180
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(NeuroglancerGlobalStyles, { classes: classes2 }), jsxRuntimeExports.jsx("div", { className: classes2.neuroglancerWrapper, children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazyReactNeuroglancer, { brainMapsClientId: "NOT_A_VALID_ID", viewerState, onViewerStateChanged: this.onViewerStateChanged, bundleRoot: this.bundleRoot, cellColorMapping, ref: this.onRef }) }) })] });
287306
+ const { classes: classes2, viewerState, cellColorMapping, onLayerLoadingChange } = this.props;
287307
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(NeuroglancerGlobalStyles, { classes: classes2 }), jsxRuntimeExports.jsx("div", { className: classes2.neuroglancerWrapper, children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazyReactNeuroglancer, { brainMapsClientId: "NOT_A_VALID_ID", viewerState, onViewerStateChanged: this.onViewerStateChanged, onLayerLoadingChange, bundleRoot: this.bundleRoot, cellColorMapping, ref: this.onRef }) }) })] });
287181
287308
  }
287182
287309
  }
287183
287310
  function useMemoCustomComparison(factory2, dependencies2, customIsEqual) {
@@ -287216,7 +287343,8 @@ function customIsEqualForCellColors(prevDeps, nextDeps) {
287216
287343
  "obsColorEncoding",
287217
287344
  "obsSetSelection",
287218
287345
  "additionalObsSets",
287219
- "spatialChannelColor"
287346
+ "spatialChannelColor",
287347
+ "spatialChannelOpacity"
287220
287348
  ])) {
287221
287349
  forceUpdate = true;
287222
287350
  }
@@ -287231,6 +287359,9 @@ function customIsEqualForInitialViewerState(prevDeps, nextDeps) {
287231
287359
  const curriedShallowDiffByLayer = (depName, scopeName) => shallowDiffByLayer(prevDeps, nextDeps, depName, scopeName);
287232
287360
  const curriedShallowDiffByLayerCoordinationWithKeys = (depName, layerScope, keys2) => shallowDiffByLayerCoordinationWithKeys(prevDeps, nextDeps, depName, layerScope, keys2);
287233
287361
  const curriedShallowDiffByChannelCoordinationWithKeys = (depName, layerScope, channelScope, keys2) => shallowDiffByChannelCoordinationWithKeys(prevDeps, nextDeps, depName, layerScope, channelScope, keys2);
287362
+ if (["theme", "showAxisLines"].some(curriedShallowDiff)) {
287363
+ forceUpdate = true;
287364
+ }
287234
287365
  if (["segmentationLayerScopes", "segmentationChannelScopesByLayer"].some(curriedShallowDiff)) {
287235
287366
  forceUpdate = true;
287236
287367
  } else {
@@ -287259,7 +287390,8 @@ function customIsEqualForInitialViewerState(prevDeps, nextDeps) {
287259
287390
  "spatialLayerColor",
287260
287391
  "featureSelection",
287261
287392
  "featureFilterMode",
287262
- "featureColor"
287393
+ "featureColor",
287394
+ "spatialPointStrokeWidth"
287263
287395
  ]) || Math.abs(prevDeps?.pointLayerCoordination?.[0]?.[layerScope]?.spatialLayerOpacity - nextDeps?.pointLayerCoordination?.[0]?.[layerScope]?.spatialLayerOpacity) >= 0.05) {
287264
287396
  forceUpdate = true;
287265
287397
  }
@@ -287270,21 +287402,25 @@ function customIsEqualForInitialViewerState(prevDeps, nextDeps) {
287270
287402
  function normalizeColor(rgbColor) {
287271
287403
  return rgbColor.map((c2) => c2 / 255);
287272
287404
  }
287405
+ function borderWidthGlsl(borderWidth = 0) {
287406
+ return `setPointMarkerBorderWidth(${borderWidth.toFixed(1)});`;
287407
+ }
287273
287408
  function toVec3(normalizedColor) {
287274
287409
  return `vec3(${normalizedColor.join(", ")})`;
287275
287410
  }
287276
287411
  function toVec4(normalizedColor, alpha2) {
287277
287412
  return `vec4(${normalizedColor.join(", ")}, ${alpha2})`;
287278
287413
  }
287279
- function getSpatialLayerColorShader(staticColor, opacity2) {
287414
+ function getSpatialLayerColorShader(staticColor, opacity2, borderWidth = 0) {
287280
287415
  const norm2 = normalizeColor(staticColor);
287281
287416
  return `
287282
287417
  void main() {
287283
287418
  setColor(${toVec4(norm2, opacity2)});
287419
+ ${borderWidthGlsl(borderWidth)}
287284
287420
  }
287285
287421
  `;
287286
287422
  }
287287
- function getSpatialLayerColorWithSelectionShader(staticColor, opacity2, featureIndices, defaultColor, featureIndexProp) {
287423
+ function getSpatialLayerColorWithSelectionShader(staticColor, opacity2, featureIndices, defaultColor, featureIndexProp, borderWidth = 0) {
287288
287424
  const normStatic = normalizeColor(staticColor);
287289
287425
  const normDefault = normalizeColor(defaultColor);
287290
287426
  const numFeatures = featureIndices.length;
@@ -287301,13 +287437,15 @@ function getSpatialLayerColorWithSelectionShader(staticColor, opacity2, featureI
287301
287437
  }
287302
287438
  if (isSelected) {
287303
287439
  setColor(${toVec4(normStatic, opacity2)});
287440
+ ${borderWidthGlsl(borderWidth)}
287304
287441
  } else {
287305
287442
  setColor(${toVec4(normDefault, opacity2)});
287443
+ ${borderWidthGlsl(borderWidth)}
287306
287444
  }
287307
287445
  }
287308
287446
  `;
287309
287447
  }
287310
- function getSpatialLayerColorFilteredShader(staticColor, opacity2, featureIndices, featureIndexProp) {
287448
+ function getSpatialLayerColorFilteredShader(staticColor, opacity2, featureIndices, featureIndexProp, borderWidth = 0) {
287311
287449
  const normStatic = normalizeColor(staticColor);
287312
287450
  const numFeatures = featureIndices.length;
287313
287451
  const indicesArr = `int selectedIndices[${numFeatures}] = int[${numFeatures}](${featureIndices.join(", ")});`;
@@ -287325,18 +287463,20 @@ function getSpatialLayerColorFilteredShader(staticColor, opacity2, featureIndice
287325
287463
  discard;
287326
287464
  }
287327
287465
  setColor(${toVec4(normStatic, opacity2)});
287466
+ ${borderWidthGlsl(borderWidth)}
287328
287467
  }
287329
287468
  `;
287330
287469
  }
287331
- function getGeneSelectionNoSelectionShader(staticColor, opacity2) {
287470
+ function getGeneSelectionNoSelectionShader(staticColor, opacity2, borderWidth = 0) {
287332
287471
  const norm2 = normalizeColor(staticColor);
287333
287472
  return `
287334
287473
  void main() {
287335
287474
  setColor(${toVec4(norm2, opacity2)});
287475
+ ${borderWidthGlsl(borderWidth)}
287336
287476
  }
287337
287477
  `;
287338
287478
  }
287339
- function getGeneSelectionWithSelectionShader(featureIndices, featureColors, staticColor, defaultColor, opacity2, featureIndexProp) {
287479
+ function getGeneSelectionWithSelectionShader(featureIndices, featureColors, staticColor, defaultColor, opacity2, featureIndexProp, borderWidth = 0) {
287340
287480
  const numFeatures = featureIndices.length;
287341
287481
  const normDefault = normalizeColor(defaultColor);
287342
287482
  const normColors = featureColors.map((c2) => normalizeColor(c2));
@@ -287356,10 +287496,11 @@ function getGeneSelectionWithSelectionShader(featureIndices, featureColors, stat
287356
287496
  }
287357
287497
  }
287358
287498
  setColor(color);
287499
+ ${borderWidthGlsl(borderWidth)}
287359
287500
  }
287360
287501
  `;
287361
287502
  }
287362
- function getGeneSelectionFilteredShader(featureIndices, featureColors, staticColor, opacity2, featureIndexProp) {
287503
+ function getGeneSelectionFilteredShader(featureIndices, featureColors, staticColor, opacity2, featureIndexProp, borderWidth = 0) {
287363
287504
  const numFeatures = featureIndices.length;
287364
287505
  const normColors = featureColors.map((c2) => normalizeColor(c2));
287365
287506
  const normStatic = normalizeColor(staticColor);
@@ -287383,10 +287524,11 @@ function getGeneSelectionFilteredShader(featureIndices, featureColors, staticCol
287383
287524
  discard;
287384
287525
  }
287385
287526
  setColor(vec4(matchedColor, ${opacity2}));
287527
+ ${borderWidthGlsl(borderWidth)}
287386
287528
  }
287387
287529
  `;
287388
287530
  }
287389
- function getRandomByFeatureShader(opacity2, featureIndexProp) {
287531
+ function getRandomByFeatureShader(opacity2, featureIndexProp, borderWidth = 0) {
287390
287532
  const paletteSize = PALETTE.length;
287391
287533
  const normPalette = PALETTE.map((c2) => normalizeColor(c2));
287392
287534
  const paletteDecl = `vec3 palette[${paletteSize}] = vec3[${paletteSize}](${normPalette.map((c2) => toVec3(c2)).join(", ")});`;
@@ -287398,10 +287540,11 @@ function getRandomByFeatureShader(opacity2, featureIndexProp) {
287398
287540
  if (colorIdx < 0) { colorIdx = -colorIdx; }
287399
287541
  vec3 color = palette[colorIdx];
287400
287542
  setColor(vec4(color, ${opacity2}));
287543
+ ${borderWidthGlsl(borderWidth)}
287401
287544
  }
287402
287545
  `;
287403
287546
  }
287404
- function getRandomByFeatureWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp) {
287547
+ function getRandomByFeatureWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp, borderWidth = 0) {
287405
287548
  const paletteSize = PALETTE.length;
287406
287549
  const normPalette = PALETTE.map((c2) => normalizeColor(c2));
287407
287550
  const normDefault = normalizeColor(defaultColor);
@@ -287423,13 +287566,15 @@ function getRandomByFeatureWithSelectionShader(featureIndices, defaultColor, opa
287423
287566
  int colorIdx = geneIndex - (geneIndex / ${paletteSize}) * ${paletteSize};
287424
287567
  if (colorIdx < 0) { colorIdx = -colorIdx; }
287425
287568
  setColor(vec4(palette[colorIdx], ${opacity2}));
287569
+ ${borderWidthGlsl(borderWidth)}
287426
287570
  } else {
287427
287571
  setColor(${toVec4(normDefault, opacity2)});
287572
+ ${borderWidthGlsl(borderWidth)}
287428
287573
  }
287429
287574
  }
287430
287575
  `;
287431
287576
  }
287432
- function getRandomByFeatureFilteredShader(featureIndices, opacity2, featureIndexProp) {
287577
+ function getRandomByFeatureFilteredShader(featureIndices, opacity2, featureIndexProp, borderWidth = 0) {
287433
287578
  const paletteSize = PALETTE.length;
287434
287579
  const normPalette = PALETTE.map((c2) => normalizeColor(c2));
287435
287580
  const numFeatures = featureIndices.length;
@@ -287452,6 +287597,7 @@ function getRandomByFeatureFilteredShader(featureIndices, opacity2, featureIndex
287452
287597
  int colorIdx = geneIndex - (geneIndex / ${paletteSize}) * ${paletteSize};
287453
287598
  if (colorIdx < 0) { colorIdx = -colorIdx; }
287454
287599
  setColor(vec4(palette[colorIdx], ${opacity2}));
287600
+ ${borderWidthGlsl(borderWidth)}
287455
287601
  }
287456
287602
  `;
287457
287603
  }
@@ -287466,7 +287612,7 @@ function hashToFloatGlsl() {
287466
287612
  }
287467
287613
  `;
287468
287614
  }
287469
- function getRandomPerPointShader(opacity2, featureIndexProp, pointIndexProp) {
287615
+ function getRandomPerPointShader(opacity2, featureIndexProp, pointIndexProp, borderWidth = 0) {
287470
287616
  return `
287471
287617
  ${hashToFloatGlsl()}
287472
287618
  void main() {
@@ -287476,10 +287622,11 @@ function getRandomPerPointShader(opacity2, featureIndexProp, pointIndexProp) {
287476
287622
  float g = hashToFloat(pointIndex, 1);
287477
287623
  float b = hashToFloat(pointIndex, 2);
287478
287624
  setColor(vec4(r, g, b, ${opacity2}));
287625
+ ${borderWidthGlsl(borderWidth)}
287479
287626
  }
287480
287627
  `;
287481
287628
  }
287482
- function getRandomPerPointWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp, pointIndexProp) {
287629
+ function getRandomPerPointWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp, pointIndexProp, borderWidth = 0) {
287483
287630
  const normDefault = normalizeColor(defaultColor);
287484
287631
  const numFeatures = featureIndices.length;
287485
287632
  const indicesDecl = `int selectedIndices[${numFeatures}] = int[${numFeatures}](${featureIndices.join(", ")});`;
@@ -287500,13 +287647,15 @@ function getRandomPerPointWithSelectionShader(featureIndices, defaultColor, opac
287500
287647
  float g = hashToFloat(pointIndex, 1);
287501
287648
  float b = hashToFloat(pointIndex, 2);
287502
287649
  setColor(vec4(r, g, b, ${opacity2}));
287650
+ ${borderWidthGlsl(borderWidth)}
287503
287651
  } else {
287504
287652
  setColor(${toVec4(normDefault, opacity2)});
287653
+ ${borderWidthGlsl(borderWidth)}
287505
287654
  }
287506
287655
  }
287507
287656
  `;
287508
287657
  }
287509
- function getRandomPerPointFilteredShader(featureIndices, opacity2, featureIndexProp, pointIndexProp) {
287658
+ function getRandomPerPointFilteredShader(featureIndices, opacity2, featureIndexProp, pointIndexProp, borderWidth = 0) {
287510
287659
  const numFeatures = featureIndices.length;
287511
287660
  const indicesDecl = `int selectedIndices[${numFeatures}] = int[${numFeatures}](${featureIndices.join(", ")});`;
287512
287661
  return `
@@ -287528,11 +287677,12 @@ function getRandomPerPointFilteredShader(featureIndices, opacity2, featureIndexP
287528
287677
  float g = hashToFloat(pointIndex, 1);
287529
287678
  float b = hashToFloat(pointIndex, 2);
287530
287679
  setColor(vec4(r, g, b, ${opacity2}));
287680
+ ${borderWidthGlsl(borderWidth)}
287531
287681
  }
287532
287682
  `;
287533
287683
  }
287534
287684
  function getPointsShader(layerCoordination) {
287535
- const { theme, featureIndex, spatialLayerOpacity, obsColorEncoding, spatialLayerColor, featureSelection, featureFilterMode, featureColor, featureIndexProp, pointIndexProp } = layerCoordination;
287685
+ const { theme, featureIndex, spatialLayerOpacity, obsColorEncoding, spatialLayerColor, featureSelection, featureFilterMode, featureColor, pointMarkerBorderWidth = 0, featureIndexProp, pointIndexProp } = layerCoordination;
287536
287686
  const defaultColor = getDefaultColor(theme);
287537
287687
  const opacity2 = spatialLayerOpacity ?? 1;
287538
287688
  const staticColor = Array.isArray(spatialLayerColor) && spatialLayerColor.length === 3 ? spatialLayerColor : defaultColor;
@@ -287549,50 +287699,50 @@ function getPointsShader(layerCoordination) {
287549
287699
  }) : [];
287550
287700
  if (obsColorEncoding === "spatialLayerColor") {
287551
287701
  if (!hasFeatureSelection || !hasResolvedIndices) {
287552
- return getSpatialLayerColorShader(staticColor, opacity2);
287702
+ return getSpatialLayerColorShader(staticColor, opacity2, pointMarkerBorderWidth);
287553
287703
  }
287554
287704
  if (isFiltered) {
287555
- return getSpatialLayerColorFilteredShader(staticColor, opacity2, featureIndices, featureIndexProp);
287705
+ return getSpatialLayerColorFilteredShader(staticColor, opacity2, featureIndices, featureIndexProp, pointMarkerBorderWidth);
287556
287706
  }
287557
- return getSpatialLayerColorWithSelectionShader(staticColor, opacity2, featureIndices, defaultColor, featureIndexProp);
287707
+ return getSpatialLayerColorWithSelectionShader(staticColor, opacity2, featureIndices, defaultColor, featureIndexProp, pointMarkerBorderWidth);
287558
287708
  }
287559
287709
  if (obsColorEncoding === "geneSelection") {
287560
287710
  if (!featureIndexProp) {
287561
287711
  throw new Error("In order to use gene-based color encoding for Neuroglancer Points, options.featureIndexProp must be specified for the obsPoints.ng-annotations fileType in the Vitessce configuration.");
287562
287712
  }
287563
287713
  if (!hasFeatureSelection || !hasResolvedIndices) {
287564
- return getGeneSelectionNoSelectionShader(staticColor, opacity2);
287714
+ return getGeneSelectionNoSelectionShader(staticColor, opacity2, pointMarkerBorderWidth);
287565
287715
  }
287566
287716
  if (isFiltered) {
287567
- return getGeneSelectionFilteredShader(featureIndices, resolvedFeatureColors, staticColor, opacity2, featureIndexProp);
287717
+ return getGeneSelectionFilteredShader(featureIndices, resolvedFeatureColors, staticColor, opacity2, featureIndexProp, pointMarkerBorderWidth);
287568
287718
  }
287569
- return getGeneSelectionWithSelectionShader(featureIndices, resolvedFeatureColors, staticColor, defaultColor, opacity2, featureIndexProp);
287719
+ return getGeneSelectionWithSelectionShader(featureIndices, resolvedFeatureColors, staticColor, defaultColor, opacity2, featureIndexProp, pointMarkerBorderWidth);
287570
287720
  }
287571
287721
  if (obsColorEncoding === "randomByFeature") {
287572
287722
  if (!featureIndexProp) {
287573
287723
  throw new Error("In order to use gene-based color encoding for Neuroglancer Points, options.featureIndexProp must be specified for the obsPoints.ng-annotations fileType in the Vitessce configuration.");
287574
287724
  }
287575
287725
  if (!hasFeatureSelection || !hasResolvedIndices) {
287576
- return getRandomByFeatureShader(opacity2, featureIndexProp);
287726
+ return getRandomByFeatureShader(opacity2, featureIndexProp, pointMarkerBorderWidth);
287577
287727
  }
287578
287728
  if (isFiltered) {
287579
- return getRandomByFeatureFilteredShader(featureIndices, opacity2, featureIndexProp);
287729
+ return getRandomByFeatureFilteredShader(featureIndices, opacity2, featureIndexProp, pointMarkerBorderWidth);
287580
287730
  }
287581
- return getRandomByFeatureWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp);
287731
+ return getRandomByFeatureWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp, pointMarkerBorderWidth);
287582
287732
  }
287583
287733
  if (obsColorEncoding === "random") {
287584
287734
  if (!pointIndexProp) {
287585
287735
  throw new Error("In order to use per-point color encoding for Neuroglancer Points, options.pointIndexProp must be specified for the obsPoints.ng-annotations fileType in the Vitessce configuration.");
287586
287736
  }
287587
287737
  if (!hasFeatureSelection || !hasResolvedIndices) {
287588
- return getRandomPerPointShader(opacity2, featureIndexProp, pointIndexProp);
287738
+ return getRandomPerPointShader(opacity2, featureIndexProp, pointIndexProp, pointMarkerBorderWidth);
287589
287739
  }
287590
287740
  if (isFiltered) {
287591
- return getRandomPerPointFilteredShader(featureIndices, opacity2, featureIndexProp, pointIndexProp);
287741
+ return getRandomPerPointFilteredShader(featureIndices, opacity2, featureIndexProp, pointIndexProp, pointMarkerBorderWidth);
287592
287742
  }
287593
- return getRandomPerPointWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp, pointIndexProp);
287743
+ return getRandomPerPointWithSelectionShader(featureIndices, defaultColor, opacity2, featureIndexProp, pointIndexProp, pointMarkerBorderWidth);
287594
287744
  }
287595
- return getSpatialLayerColorShader(staticColor, opacity2);
287745
+ return getSpatialLayerColorShader(staticColor, opacity2, pointMarkerBorderWidth);
287596
287746
  }
287597
287747
  const DEFAULT_NG_PROPS = {
287598
287748
  layout: "3d",
@@ -287622,7 +287772,7 @@ function toNgLayerName(dataType, layerScope, channelScope = null) {
287622
287772
  }
287623
287773
  throw new Error(`Unsupported data type: ${dataType}`);
287624
287774
  }
287625
- function useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentationChannelScopesByLayer, segmentationLayerCoordination, segmentationChannelCoordination, obsSegmentationsUrls, obsSegmentationsData, pointLayerScopes, pointLayerCoordination, obsPointsUrls, obsPointsData, pointMultiIndicesData) {
287775
+ function useNeuroglancerViewerState(theme, showAxisLines, segmentationLayerScopes, segmentationChannelScopesByLayer, segmentationLayerCoordination, segmentationChannelCoordination, obsSegmentationsUrls, obsSegmentationsData, pointLayerScopes, pointLayerCoordination, obsPointsUrls, obsPointsData, pointMultiIndicesData) {
287626
287776
  const viewerState = useMemoCustomComparison(() => {
287627
287777
  let result = cloneDeep$1(DEFAULT_NG_PROPS);
287628
287778
  segmentationLayerScopes.forEach((layerScope) => {
@@ -287635,13 +287785,20 @@ function useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentation
287635
287785
  channelScopes.forEach((channelScope) => {
287636
287786
  const channelCoordination = segmentationChannelCoordination[0]?.[layerScope]?.[channelScope];
287637
287787
  const { spatialChannelVisible } = channelCoordination || {};
287788
+ const { source: ngSource, ...otherNgOptions } = layerData.neuroglancerOptions ?? {};
287789
+ const hasNgSourceOptions = layerData.neuroglancerOptions?.subsources || layerData.neuroglancerOptions?.enableDefaultSubsources !== void 0;
287790
+ const source2 = hasNgSourceOptions ? {
287791
+ url: toPrecomputedSource(layerUrl),
287792
+ subsources: layerData.neuroglancerOptions.subsources,
287793
+ enableDefaultSubsources: layerData.neuroglancerOptions.enableDefaultSubsources ?? false
287794
+ } : toPrecomputedSource(layerUrl);
287638
287795
  result = {
287639
287796
  ...result,
287640
287797
  layers: [
287641
287798
  ...result.layers,
287642
287799
  {
287643
287800
  type: "segmentation",
287644
- source: toPrecomputedSource(layerUrl),
287801
+ source: source2,
287645
287802
  segments: [],
287646
287803
  name: toNgLayerName(DataType$4.OBS_SEGMENTATIONS, layerScope, channelScope),
287647
287804
  visible: spatialLayerVisible && spatialChannelVisible,
@@ -287649,7 +287806,7 @@ function useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentation
287649
287806
  // visibility must be true for the layer to be visible.
287650
287807
  // TODO: update this to extract specific properties from
287651
287808
  // neuroglancerOptions as needed.
287652
- ...layerData.neuroglancerOptions ?? {}
287809
+ ...otherNgOptions
287653
287810
  }
287654
287811
  ]
287655
287812
  };
@@ -287662,7 +287819,7 @@ function useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentation
287662
287819
  const layerUrl = obsPointsUrls[layerScope]?.[0]?.url;
287663
287820
  const featureIndex = pointMultiIndicesData[layerScope]?.featureIndex;
287664
287821
  if (layerUrl && layerData) {
287665
- const { spatialLayerVisible, spatialLayerOpacity, obsColorEncoding, spatialLayerColor, featureSelection, featureFilterMode, featureColor } = layerCoordination || {};
287822
+ const { spatialLayerVisible, spatialLayerOpacity, obsColorEncoding, spatialLayerColor, featureSelection, featureFilterMode, featureColor, spatialPointStrokeWidth } = layerCoordination || {};
287666
287823
  const shader = getPointsShader({
287667
287824
  theme,
287668
287825
  featureIndex,
@@ -287673,7 +287830,8 @@ function useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentation
287673
287830
  featureFilterMode,
287674
287831
  featureColor,
287675
287832
  featureIndexProp: layerData.neuroglancerOptions?.featureIndexProp,
287676
- pointIndexProp: layerData.neuroglancerOptions?.pointIndexProp
287833
+ pointIndexProp: layerData.neuroglancerOptions?.pointIndexProp,
287834
+ pointMarkerBorderWidth: spatialPointStrokeWidth ?? 0
287677
287835
  });
287678
287836
  result = {
287679
287837
  ...result,
@@ -287710,6 +287868,7 @@ function useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentation
287710
287868
  return result;
287711
287869
  }, {
287712
287870
  theme,
287871
+ showAxisLines,
287713
287872
  segmentationLayerScopes,
287714
287873
  segmentationChannelScopesByLayer,
287715
287874
  segmentationLayerCoordination,
@@ -317405,6 +317564,7 @@ function NeuroglancerSubscriber(props) {
317405
317564
  downloadButtonVisible,
317406
317565
  removeGridComponent,
317407
317566
  theme,
317567
+ showAxisLines = false,
317408
317568
  title: title2 = "Spatial",
317409
317569
  subtitle = "Powered by Neuroglancer",
317410
317570
  helpText = ViewHelpMapping.NEUROGLANCER,
@@ -317493,7 +317653,8 @@ function NeuroglancerSubscriber(props) {
317493
317653
  CoordinationType$2.OBS_HIGHLIGHT,
317494
317654
  CoordinationType$2.TOOLTIPS_VISIBLE,
317495
317655
  CoordinationType$2.TOOLTIP_CROSSHAIRS_VISIBLE,
317496
- CoordinationType$2.LEGEND_VISIBLE
317656
+ CoordinationType$2.LEGEND_VISIBLE,
317657
+ CoordinationType$2.SPATIAL_POINT_STROKE_WIDTH
317497
317658
  ], coordinationScopes, coordinationScopesBy, CoordinationType$2.POINT_LAYER);
317498
317659
  const [obsPointsData, obsPointsDataStatus, obsPointsUrls, obsPointsErrors] = useMultiObsPoints(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, uuid2);
317499
317660
  const [pointMultiIndicesData, pointMultiIndicesDataStatus, pointMultiIndicesDataErrors] = usePointMultiObsFeatureMatrixIndices(coordinationScopes, coordinationScopesBy, loaders, dataset);
@@ -317526,7 +317687,7 @@ function NeuroglancerSubscriber(props) {
317526
317687
  result[layerScope] = {};
317527
317688
  segmentationChannelScopesByLayer?.[layerScope]?.forEach((channelScope) => {
317528
317689
  const { obsSets: layerSets, obsIndex: layerIndex } = obsSegmentationsSetsData?.[layerScope]?.[channelScope] || {};
317529
- const { obsSetColor, obsColorEncoding, obsSetSelection, additionalObsSets, spatialChannelColor } = segmentationChannelCoordination[0][layerScope][channelScope];
317690
+ const { obsSetColor, obsColorEncoding, obsSetSelection, additionalObsSets, spatialChannelColor, spatialChannelOpacity } = segmentationChannelCoordination[0][layerScope][channelScope];
317530
317691
  if (obsColorEncoding === "spatialChannelColor") {
317531
317692
  if (layerIndex && spatialChannelColor) {
317532
317693
  const hex2 = rgbToHex$1(spatialChannelColor);
@@ -317546,6 +317707,7 @@ function NeuroglancerSubscriber(props) {
317546
317707
  });
317547
317708
  }
317548
317709
  result[layerScope][channelScope] = ngCellColors;
317710
+ result[layerScope].opacity = spatialChannelOpacity ?? 1;
317549
317711
  }
317550
317712
  } else if (layerSets && layerIndex) {
317551
317713
  const mergedCellSets = mergeObsSets(layerSets, additionalObsSets);
@@ -317561,6 +317723,7 @@ function NeuroglancerSubscriber(props) {
317561
317723
  ngCellColors[i2] = rgbToHex$1(color2);
317562
317724
  });
317563
317725
  result[layerScope][channelScope] = ngCellColors;
317726
+ result[layerScope].opacity = spatialChannelOpacity ?? 1;
317564
317727
  }
317565
317728
  });
317566
317729
  });
@@ -317574,7 +317737,7 @@ function NeuroglancerSubscriber(props) {
317574
317737
  segmentationChannelCoordination,
317575
317738
  theme
317576
317739
  }, customIsEqualForCellColors);
317577
- const initalViewerState = useNeuroglancerViewerState(theme, segmentationLayerScopes, segmentationChannelScopesByLayer, segmentationLayerCoordination, segmentationChannelCoordination, obsSegmentationsUrls, obsSegmentationsData, pointLayerScopes, pointLayerCoordination, obsPointsUrls, obsPointsData, pointMultiIndicesData);
317740
+ const initalViewerState = useNeuroglancerViewerState(theme, showAxisLines, segmentationLayerScopes, segmentationChannelScopesByLayer, segmentationLayerCoordination, segmentationChannelCoordination, obsSegmentationsUrls, obsSegmentationsData, pointLayerScopes, pointLayerCoordination, obsPointsUrls, obsPointsData, pointMultiIndicesData);
317578
317741
  const [latestViewerStateIteration, incrementLatestViewerStateIteration] = useReducer((x2) => x2 + 1, 0);
317579
317742
  const latestViewerStateRef = useRef({
317580
317743
  ...initalViewerState,
@@ -317608,6 +317771,7 @@ function NeuroglancerSubscriber(props) {
317608
317771
  z: spatialRotationZ,
317609
317772
  orbit: spatialRotationOrbit
317610
317773
  });
317774
+ const [isLayersLoaded, setIsLayersLoaded] = useState(false);
317611
317775
  const prevCoordsRef = useRef({
317612
317776
  zoom: spatialZoom,
317613
317777
  rx: spatialRotationX,
@@ -317712,7 +317876,10 @@ function NeuroglancerSubscriber(props) {
317712
317876
  const result = {};
317713
317877
  segmentationLayerScopes?.forEach((layerScope) => {
317714
317878
  const channelScope = segmentationChannelScopesByLayer?.[layerScope]?.[0];
317715
- result[layerScope] = segmentationColorMapping?.[layerScope]?.[channelScope] ?? {};
317879
+ result[layerScope] = {
317880
+ colors: segmentationColorMapping?.[layerScope]?.[channelScope] ?? {},
317881
+ opacity: segmentationColorMapping?.[layerScope]?.opacity ?? 1
317882
+ };
317716
317883
  });
317717
317884
  return result;
317718
317885
  }, [segmentationColorMapping, segmentationLayerScopes, segmentationChannelScopesByLayer]);
@@ -317775,12 +317942,13 @@ function NeuroglancerSubscriber(props) {
317775
317942
  }
317776
317943
  const updatedLayers = current2?.layers?.map((layer, idx) => {
317777
317944
  const layerScope = segmentationLayerScopes?.[idx];
317778
- const layerColorMapping = cellColorMappingByLayer?.[layerScope] ?? {};
317945
+ const layerColorMapping = cellColorMappingByLayer?.[layerScope]?.colors ?? {};
317779
317946
  const layerSegments = Object.keys(layerColorMapping);
317780
317947
  return {
317781
317948
  ...layer,
317782
317949
  segments: layerSegments,
317783
- segmentColors: layerColorMapping
317950
+ segmentColors: layerColorMapping,
317951
+ objectAlpha: cellColorMappingByLayer?.[layerScope]?.opacity ?? 1
317784
317952
  };
317785
317953
  }) ?? [];
317786
317954
  const updated = {
@@ -317815,14 +317983,29 @@ function NeuroglancerSubscriber(props) {
317815
317983
  const onSegmentHighlight = useCallback((obsId) => {
317816
317984
  setCellHighlight(String(obsId));
317817
317985
  }, [setCellHighlight]);
317986
+ const handleLayerLoadingChange = useCallback((isLoaded) => {
317987
+ setIsLayersLoaded(isLoaded);
317988
+ }, []);
317818
317989
  const hasLayers = derivedViewerState?.layers?.length > 0;
317819
- return jsxRuntimeExports.jsx(TitleInfo, { title: title2, info: subtitle, helpText, isSpatial: true, theme, closeButtonVisible, downloadButtonVisible, removeGridComponent, isReady, errors, withPadding: false, guideUrl: GUIDE_URL, children: hasLayers ? jsxRuntimeExports.jsxs("div", { style: { position: "relative", width: "100%", height: "100%" }, ref: containerRef, children: [jsxRuntimeExports.jsx("div", { style: { position: "absolute", top: 0, right: 0, zIndex: 50 }, children: jsxRuntimeExports.jsx(MultiLegend, { theme: "dark", maxHeight: ngHeight, segmentationLayerScopes, segmentationLayerCoordination, segmentationChannelScopesByLayer, segmentationChannelCoordination }) }), jsxRuntimeExports.jsx(NeuroglancerComp, { classes: classes2, onSegmentClick, onSelectHoveredCoords: onSegmentHighlight, viewerState: derivedViewerState, cellColorMapping: cellColorMappingByLayer, setViewerState: handleStateUpdate })] }) : null });
317990
+ return jsxRuntimeExports.jsx(TitleInfo, { title: title2, info: subtitle, helpText, isSpatial: true, theme, closeButtonVisible, downloadButtonVisible, removeGridComponent, isReady: isReady && isLayersLoaded, errors, withPadding: false, guideUrl: GUIDE_URL, children: hasLayers ? jsxRuntimeExports.jsxs("div", { style: { position: "relative", width: "100%", height: "100%" }, ref: containerRef, children: [jsxRuntimeExports.jsx("div", { style: { position: "absolute", top: 0, right: 0, zIndex: 50 }, children: jsxRuntimeExports.jsx(MultiLegend, {
317991
+ theme: "dark",
317992
+ maxHeight: ngHeight,
317993
+ // Segmentations
317994
+ segmentationLayerScopes,
317995
+ segmentationLayerCoordination,
317996
+ segmentationChannelScopesByLayer,
317997
+ segmentationChannelCoordination,
317998
+ // Points
317999
+ pointLayerScopes,
318000
+ pointLayerCoordination,
318001
+ pointMultiIndicesData
318002
+ }) }), jsxRuntimeExports.jsx(NeuroglancerComp, { classes: classes2, onSegmentClick, onSelectHoveredCoords: onSegmentHighlight, viewerState: derivedViewerState, cellColorMapping: cellColorMappingByLayer, setViewerState: handleStateUpdate, onLayerLoadingChange: handleLayerLoadingChange })] }) : null });
317820
318003
  }
317821
318004
  const FEATURE_AGGREGATION_STRATEGIES = ["first", "last", "sum", "mean"];
317822
318005
  function CellSetExpressionPlotOptions(props) {
317823
318006
  const { featureValueTransform, setFeatureValueTransform, featureValueTransformCoefficient, setFeatureValueTransformCoefficient, transformOptions, featureValuePositivityThreshold, setFeatureValuePositivityThreshold, featureValueColormap, setFeatureValueColormap, featureAggregationStrategy, setFeatureAggregationStrategy } = props;
317824
318007
  const cellSetExpressionPlotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
317825
- const { classes: classes2 } = useStyles$v();
318008
+ const { classes: classes2 } = useStyles$w();
317826
318009
  function handleFeatureValueColormapChange(event2) {
317827
318010
  setFeatureValueColormap(event2.target.value);
317828
318011
  }
@@ -319775,10 +319958,9 @@ function CellSetExpressionPlot(props) {
319775
319958
  if (!obsSetSelection) {
319776
319959
  return 0;
319777
319960
  }
319778
- const cellSetNames = obsSetSelection.map((d) => d.at(-1));
319779
- return cellSetNames.reduce((acc, name2) => {
319780
- acc = acc === void 0 || name2.length > acc ? name2.length : acc;
319781
- return acc;
319961
+ return obsSetSelection.reduce((acc, path2) => {
319962
+ const nameLength = path2?.at(-1)?.length ?? 0;
319963
+ return nameLength > acc ? nameLength : acc;
319782
319964
  }, 0);
319783
319965
  }, [obsSetSelection]);
319784
319966
  const isStratified = Array.isArray(sampleSetSelection) && sampleSetSelection.length === 2;
@@ -319857,7 +320039,7 @@ function CellSetExpressionPlot(props) {
319857
320039
  }
319858
320040
  g2.append("g").attr("transform", `translate(${marginLeft},0)`).call(axisLeft(y2)).selectAll("text").style("font-size", "11px");
319859
320041
  const xTickG = g2.append("g").attr("transform", `translate(0,${innerHeight})`).style("font-size", "14px");
319860
- xTickG.call(axisBottom(xGroup).tickFormat((d) => d.at(-1))).selectAll("text").style("font-size", "11px").attr("dx", "-6px").attr("dy", "6px").attr("transform", "rotate(-45)").style("text-anchor", "end");
320042
+ xTickG.call(axisBottom(xGroup).tickFormat((d) => d?.at(-1) ?? "")).selectAll("text").style("font-size", "11px").attr("dx", "-6px").attr("dy", "6px").attr("transform", "rotate(-45)").style("text-anchor", "end");
319861
320043
  if (isStratified) {
319862
320044
  const tickWidth = xGroup.bandwidth();
319863
320045
  xTickG.selectAll(".tick").append("rect").attr("x", -tickWidth / 2).attr("width", tickWidth).attr("height", 4).style("fill", (d) => obsSetColorScale(d));
@@ -370655,7 +370837,7 @@ const VEGA_THEMES = {
370655
370837
  };
370656
370838
  const DATASET_NAME = "table";
370657
370839
  function VegaGlobalStyles() {
370658
- const { theme } = useStyles$B();
370840
+ const { theme } = useStyles$C();
370659
370841
  return jsxRuntimeExports.jsx(GlobalStyles$3, { styles: {
370660
370842
  "#vg-tooltip-element.vg-tooltip.custom-theme": {
370661
370843
  boxShadow: "0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)",
@@ -370689,7 +370871,7 @@ function renderTooltipContents(tooltipText) {
370689
370871
  }
370690
370872
  function VegaPlot(props) {
370691
370873
  const { spec: partialSpec, data: data2, getTooltipText, signalListeners, renderer = "svg", onNewView } = props;
370692
- const { classes: tooltipClasses2 } = useStyles$r();
370874
+ const { classes: tooltipClasses2 } = useStyles$s();
370693
370875
  const tooltipHandler = useMemo$1(() => {
370694
370876
  if (typeof getTooltipText === "function") {
370695
370877
  const tooltipConfig = {
@@ -371621,7 +371803,7 @@ function Treemap(props) {
371621
371803
  function TreemapOptions(props) {
371622
371804
  const { children: children3, obsType, sampleType, hierarchyLevels, setHierarchyLevels, obsColorEncoding, setObsColorEncoding } = props;
371623
371805
  const treemapOptionsId = $bdb11010cef70236$export$f680877a34711e37();
371624
- const { classes: classes2 } = useStyles$v();
371806
+ const { classes: classes2 } = useStyles$w();
371625
371807
  function handleColorEncodingChange(event2) {
371626
371808
  setObsColorEncoding(event2.target.value);
371627
371809
  }
@@ -371859,7 +372041,7 @@ p-value: ${d.featureSignificance}`);
371859
372041
  function VolcanoPlotOptions(props) {
371860
372042
  const { children: children3, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold, setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold, setFeatureLabelSignificanceThreshold, setFeatureLabelFoldChangeThreshold } = props;
371861
372043
  const volcanoOptionsId = $bdb11010cef70236$export$f680877a34711e37();
371862
- const { classes: classes2 } = useStyles$v();
372044
+ const { classes: classes2 } = useStyles$w();
371863
372045
  function handlePointSignificanceChange(event2, value2) {
371864
372046
  setFeaturePointSignificanceThreshold(10 ** -value2);
371865
372047
  }
@@ -373440,11 +373622,21 @@ class AnnDataSource extends ZarrDataSource {
373440
373622
  categoriesValues = await this.getFlatArrDecompressed(`${prefix2}/${categories}`);
373441
373623
  }
373442
373624
  } else if (encodingType === "categorical") {
373443
- const { dtype } = await open$1(storeRoot.resolve(`${path2}/categories`), { kind: "array" });
373444
- if (dtype === "v2:object" || dtype === "|O") {
373625
+ const categoriesZattrs = await this.getJson(`${path2}/categories/.zattrs`);
373626
+ const categoriesEncodingType = categoriesZattrs?.["encoding-type"];
373627
+ if (categoriesEncodingType === "nullable-string-array") {
373628
+ categoriesValues = await this.getFlatArrDecompressed(`${path2}/categories/values`);
373629
+ } else if (categoriesEncodingType === "string-array") {
373445
373630
  categoriesValues = await this.getFlatArrDecompressed(`${path2}/categories`);
373631
+ } else {
373632
+ const { dtype } = await open$1(storeRoot.resolve(`${path2}/categories`), { kind: "array" });
373633
+ if (dtype === "v2:object" || dtype === "|O") {
373634
+ categoriesValues = await this.getFlatArrDecompressed(`${path2}/categories`);
373635
+ }
373446
373636
  }
373447
373637
  codesPath = `${path2}/codes`;
373638
+ } else if (encodingType === "nullable-string-array") {
373639
+ return this.getFlatArrDecompressed(`${path2}/values`);
373448
373640
  } else if (encodingType === "string-array") {
373449
373641
  return this.getFlatArrDecompressed(path2);
373450
373642
  } else {
@@ -375357,10 +375549,10 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
375357
375549
  const loader2 = await loadOmeZarr(this.storeRoot);
375358
375550
  const imageWrapper = new ImageWrapper(loader2, this.options);
375359
375551
  const { metadata: metadata2, data: data2 } = loader2;
375360
- const { omero, multiscales, channels_metadata: spatialDataChannels, "image-label": imageLabel } = metadata2;
375361
- const isSpatialData = !!spatialDataChannels || !!imageLabel;
375362
- const isLabels = !!imageLabel;
375363
- if (!isSpatialData && !omero) {
375552
+ const { omero, multiscales, channels_metadata: spatialDataChannels, "image-label": imageLabel, spatialdata_attrs: spatialDataAttrs } = metadata2;
375553
+ const isSpatialDataElement = !!spatialDataChannels || !!imageLabel || !!spatialDataAttrs;
375554
+ const isLabels = !!imageLabel || isSpatialDataElement && !omero && !spatialDataChannels;
375555
+ if (!isSpatialDataElement && !omero) {
375364
375556
  throw new Error("image.ome-zarr must have omero metadata in attributes.");
375365
375557
  }
375366
375558
  if (!Array.isArray(multiscales) || multiscales.length === 0) {
@@ -375389,23 +375581,21 @@ class OmeZarrLoader extends AbstractTwoStepLoader {
375389
375581
  let channelLabels = [];
375390
375582
  let initialTargetT = 0;
375391
375583
  let initialTargetZ = 0;
375392
- if (isSpatialData) {
375393
- if (isLabels) {
375394
- channelObjects = [{
375395
- selection: filterSelection2({ z: initialTargetZ, t: initialTargetT, c: 0 }),
375396
- slider: [0, 255],
375397
- color: [255, 255, 255]
375398
- }];
375399
- channelLabels = ["labels"];
375400
- } else {
375401
- const { channels: channels2 } = spatialDataChannels;
375402
- channelObjects = channels2.map((channel, i2) => ({
375403
- selection: filterSelection2({ z: initialTargetZ, t: initialTargetT, c: i2 }),
375404
- slider: [0, 255],
375405
- color: [255, 255, 255]
375406
- }));
375407
- channelLabels = channels2.map((c2) => c2.label);
375408
- }
375584
+ if (isLabels) {
375585
+ channelObjects = [{
375586
+ selection: filterSelection2({ z: initialTargetZ, t: initialTargetT, c: 0 }),
375587
+ slider: [0, 255],
375588
+ color: [255, 255, 255]
375589
+ }];
375590
+ channelLabels = ["labels"];
375591
+ } else if (spatialDataChannels) {
375592
+ const { channels: channels2 } = spatialDataChannels;
375593
+ channelObjects = channels2.map((channel, i2) => ({
375594
+ selection: filterSelection2({ z: initialTargetZ, t: initialTargetT, c: i2 }),
375595
+ slider: [0, 255],
375596
+ color: [255, 255, 255]
375597
+ }));
375598
+ channelLabels = channels2.map((c2) => c2.label);
375409
375599
  } else {
375410
375600
  const { rdefs = {}, channels: channels2 } = omero;
375411
375601
  if (typeof rdefs.defaultT === "number") {
@@ -375841,7 +376031,7 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
375841
376031
  }
375842
376032
  let locations;
375843
376033
  const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
375844
- if (formatVersion === "0.1") {
376034
+ if (formatVersion === "0.1" || formatVersion === "0.2") {
375845
376035
  locations = await this.dataSource.loadPoints(path2);
375846
376036
  } else {
375847
376037
  throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
@@ -375860,7 +376050,7 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
375860
376050
  }
375861
376051
  let locationsFeatureIndex;
375862
376052
  const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
375863
- if (formatVersion === "0.1") {
376053
+ if (formatVersion === "0.1" || formatVersion === "0.2") {
375864
376054
  locationsFeatureIndex = await this.dataSource.loadPointsFeatureIds(path2);
375865
376055
  } else {
375866
376056
  throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
@@ -375872,7 +376062,7 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
375872
376062
  const { path: path2, featureIndexColumn, mortonCodeColumn } = this.options;
375873
376063
  let locations;
375874
376064
  const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
375875
- if (formatVersion === "0.1") {
376065
+ if (formatVersion === "0.1" || formatVersion === "0.2") {
375876
376066
  locations = await this.dataSource.loadPointsInRect(path2, bounds2, signal, featureIndexColumn, mortonCodeColumn);
375877
376067
  } else {
375878
376068
  throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
@@ -375904,7 +376094,7 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
375904
376094
  // and for the presence of morton_code_2d and feature_index columns.
375905
376095
  this.dataSource.supportsLoadPointsInRect(path2, featureIndexColumnName, mortonCodeColumn)
375906
376096
  ]);
375907
- const isSupportedVersion = formatVersion === "0.1";
376097
+ const isSupportedVersion = formatVersion === "0.1" || formatVersion === "0.2";
375908
376098
  const boundingBox = zattrs?.bounding_box;
375909
376099
  const hasBoundingBox2D = typeof boundingBox?.x_max === "number" && typeof boundingBox?.x_min === "number" && typeof boundingBox?.y_max === "number" && typeof boundingBox?.y_min === "number";
375910
376100
  return isSupportedVersion && hasBoundingBox2D && hasRequiredColumnsAndRowGroupSize;
@@ -385532,7 +385722,7 @@ async function _loadParquetSchemaBytes({ queryClient, store }, parquetPath, part
385532
385722
  if (!tailBytes || tailBytes.length < TAIL_LENGTH) {
385533
385723
  throw new Error(`Failed to load parquet footerLength for ${partZeroPath}`);
385534
385724
  }
385535
- const footerLength = new DataView(tailBytes.buffer).getInt32(0, true);
385725
+ const footerLength = new DataView(tailBytes.buffer, tailBytes.byteOffset, tailBytes.byteLength).getInt32(0, true);
385536
385726
  const magic = new TextDecoder().decode(tailBytes.slice(4, 8));
385537
385727
  if (magic !== "PAR1") {
385538
385728
  throw new Error("Invalid Parquet file: missing PAR1 magic number");
@@ -392308,7 +392498,7 @@ class SpatialDataPointsSource extends SpatialDataTableSource {
392308
392498
  const zattrs = await this.loadSpatialDataElementAttrs(path2);
392309
392499
  const formatVersion = zattrs.spatialdata_attrs.version;
392310
392500
  const encodingType = zattrs["encoding-type"];
392311
- if (encodingType === "ngff:points" && !(formatVersion === "0.1")) {
392501
+ if (encodingType === "ngff:points" && !(formatVersion === "0.1" || formatVersion === "0.2")) {
392312
392502
  throw new Error(`Unexpected version for points spatialdata_attrs: ${formatVersion}`);
392313
392503
  }
392314
392504
  return formatVersion;
@@ -398124,6 +398314,7 @@ const baseCoordinationTypes = [
398124
398314
  new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_COLOR, [255, 255, 255], z.array(z.number()).length(3).nullable()),
398125
398315
  new PluginCoordinationType(CoordinationType$2.SPATIAL_SEGMENTATION_FILLED, true, z.boolean()),
398126
398316
  new PluginCoordinationType(CoordinationType$2.SPATIAL_SEGMENTATION_STROKE_WIDTH, 1, z.number()),
398317
+ new PluginCoordinationType(CoordinationType$2.SPATIAL_POINT_STROKE_WIDTH, 0, z.number()),
398127
398318
  new PluginCoordinationType(CoordinationType$2.SPATIAL_LOD_FACTOR, 1, z.number()),
398128
398319
  // Reference: https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html
398129
398320
  new PluginCoordinationType(CoordinationType$2.PHOTOMETRIC_INTERPRETATION, null, z.enum(["BlackIsZero", "RGB"]).nullable()),