@vitessce/dev 3.2.0 → 3.2.2

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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-440cb4b9.js";
2
+ import { B as BaseDecoder } from "./index-d58f9b90.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  class DeflateDecoder extends BaseDecoder {
@@ -1,6 +1,6 @@
1
1
  import React__default from "react";
2
2
  import ReactDOM__default from "react-dom";
3
- import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-440cb4b9.js";
3
+ import { c as commonjsGlobal, o as objectAssign, g as getDefaultExportFromCjs, e as earcut, b as getAugmentedNamespace } from "./index-d58f9b90.js";
4
4
  function _mergeNamespaces(n, m) {
5
5
  for (var i = 0; i < m.length; i++) {
6
6
  const e = m[i];
@@ -5,7 +5,7 @@ var __publicField = (obj, key2, value2) => {
5
5
  return value2;
6
6
  };
7
7
  import * as React$6 from "react";
8
- import React__default, { Children, isValidElement, cloneElement as cloneElement$1, useReducer, useRef, useDebugValue, useEffect, useLayoutEffect as useLayoutEffect$1, createContext as createContext$1, createElement, useContext, useMemo, useCallback, useState, useId, forwardRef, useImperativeHandle, PureComponent, Component as Component$1, Suspense } from "react";
8
+ import React__default, { Children, isValidElement, cloneElement as cloneElement$1, useReducer, useRef, useDebugValue, useEffect, useLayoutEffect as useLayoutEffect$1, createContext as createContext$1, createElement, useContext, useMemo, useCallback, useState, forwardRef, useImperativeHandle, PureComponent, Component as Component$1, Suspense } from "react";
9
9
  import * as ReactDOM from "react-dom";
10
10
  import ReactDOM__default from "react-dom";
11
11
  function _mergeNamespaces(n3, m2) {
@@ -660,10 +660,10 @@ const COMPONENT_COORDINATION_TYPES = {
660
660
  ]
661
661
  };
662
662
  const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
663
- const version$6 = "3.2.0";
664
- const date$3 = "2023-09-12";
663
+ const version$6 = "3.2.2";
664
+ const date$3 = "2023-09-20";
665
665
  const branch = "changeset-release/main";
666
- const hash$1 = "13836ae8";
666
+ const hash$1 = "715881ca";
667
667
  const META_VERSION = {
668
668
  note,
669
669
  version: version$6,
@@ -11648,7 +11648,13 @@ function buildConfigSchema(pluginFileTypes, pluginJointFileTypes, pluginCoordina
11648
11648
  // Wrap each value schema in z.record()
11649
11649
  fromEntries(pluginCoordinationTypes.map((ct) => [
11650
11650
  ct.name,
11651
- z.record(coordinationScopeName, ct.valueSchema.optional()).optional()
11651
+ z.record(
11652
+ // For now, assume the key type is string (though it would be
11653
+ // slightly nicer if we could use the coordinationScopeName schema here).
11654
+ // Once https://github.com/colinhacks/zod/issues/2746 gets resolved
11655
+ // then we can try that approach again, but it should not be a big deal.
11656
+ ct.valueSchema.optional()
11657
+ ).optional()
11652
11658
  ]))
11653
11659
  ).strict().describe("The coordination space stores the values for each scope of each coordination object.").optional(),
11654
11660
  layout: z.array(z.object({
@@ -52344,6 +52350,38 @@ const useTitleStyles = makeStyles((theme) => ({
52344
52350
  }
52345
52351
  }
52346
52352
  }));
52353
+ function arrayToString(arr) {
52354
+ const arrF = arr.filter((item) => item !== void 0);
52355
+ if (arrF.length === 0) {
52356
+ return "";
52357
+ }
52358
+ if (arrF.length === 1) {
52359
+ return arrF[0];
52360
+ }
52361
+ return `${arr.slice(0, -1).join(", ")} and ${arr.slice(-1)}`;
52362
+ }
52363
+ const ViewTypesToText = /* @__PURE__ */ new Map([
52364
+ [ViewType$2.DESCRIPTION, "description"],
52365
+ [ViewType$2.STATUS, "status view for debugging"],
52366
+ [ViewType$2.SCATTERPLOT, "scatterplot with embeddings"],
52367
+ [ViewType$2.SPATIAL, "spatial view"],
52368
+ [ViewType$2.SPATIAL_BETA, "spatial view"],
52369
+ [ViewType$2.HEATMAP, "cell by gene heatmap"],
52370
+ [ViewType$2.LAYER_CONTROLLER, "layer controller"],
52371
+ [ViewType$2.LAYER_CONTROLLER_BETA, "layer controller"],
52372
+ [ViewType$2.GENOMIC_PROFILES, "genome browser tracks with bar plots"],
52373
+ [ViewType$2.GATING, "scatterplot of gated gene expression data"],
52374
+ [ViewType$2.FEATURE_LIST, "interactive list of features"],
52375
+ [ViewType$2.OBS_SETS, "list of potential observation sets"],
52376
+ [ViewType$2.OBS_SET_SIZES, "sizes of selected observation sets"],
52377
+ [ViewType$2.OBS_SET_FEATURE_VALUE_DISTRIBUTION, "violin plot with values"],
52378
+ [ViewType$2.FEATURE_VALUE_HISTOGRAM, "distribution of values"]
52379
+ ]);
52380
+ function getAltText(config3) {
52381
+ const componentList = config3.layout.map((c2) => c2.component);
52382
+ const altText = `Vitessce grid with ${componentList.length} views, including ${arrayToString(componentList.map((c2) => ViewTypesToText.get(c2) || "plugin view"))}.`;
52383
+ return altText;
52384
+ }
52347
52385
  const padding$2 = 10;
52348
52386
  const margin = 5;
52349
52387
  function VitessceGrid(props2) {
@@ -52353,6 +52391,7 @@ function VitessceGrid(props2) {
52353
52391
  const [componentWidth] = useClosestVitessceContainerSize(containerRef);
52354
52392
  const classes = useVitessceContainerStyles();
52355
52393
  const titleClasses = useTitleStyles();
52394
+ const altText = useMemo(() => getAltText(config3), [configKey]);
52356
52395
  useEffect(() => {
52357
52396
  onResize();
52358
52397
  }, [rowHeight, onResize]);
@@ -52377,7 +52416,7 @@ function VitessceGrid(props2) {
52377
52416
  setViewConfig(newConfig);
52378
52417
  setLoaders(newLoaders);
52379
52418
  }, [success, configKey]);
52380
- return jsxRuntimeExports.jsx("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes.vitessceContainer), children: layout2 ? jsxRuntimeExports.jsx(VitessceGridLayout, { layout: layout2, height: height2, rowHeight, theme, viewTypes, draggableHandle: titleClasses.title, margin, padding: padding$2, onRemoveComponent: removeComponent, onLayoutChange: changeLayoutPostMount, isBounded, onResize, onResizeStop: onResize }) : null });
52419
+ return jsxRuntimeExports.jsx("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes.vitessceContainer), role: "group", "aria-label": altText, children: layout2 ? jsxRuntimeExports.jsx(VitessceGridLayout, { role: "group", layout: layout2, height: height2, rowHeight, theme, viewTypes, draggableHandle: titleClasses.title, margin, padding: padding$2, onRemoveComponent: removeComponent, onLayoutChange: changeLayoutPostMount, isBounded, onResize, onResizeStop: onResize }) : null });
52381
52420
  }
52382
52421
  const useStyles$u = makeStyles((theme) => ({
52383
52422
  warningLayout: {
@@ -53773,6 +53812,132 @@ class LoaderResult {
53773
53812
  this.coordinationValues = coordinationValues;
53774
53813
  }
53775
53814
  }
53815
+ const $b5e257d569688ac6$var$defaultContext = {
53816
+ prefix: String(Math.round(Math.random() * 1e10)),
53817
+ current: 0
53818
+ };
53819
+ const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
53820
+ const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
53821
+ let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
53822
+ let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
53823
+ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
53824
+ let ctx2 = useContext($b5e257d569688ac6$var$SSRContext);
53825
+ let ref2 = useRef(null);
53826
+ if (ref2.current === null && !isDisabled) {
53827
+ var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
53828
+ let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
53829
+ if (currentOwner) {
53830
+ let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
53831
+ if (prevComponentValue == null)
53832
+ $b5e257d569688ac6$var$componentIds.set(currentOwner, {
53833
+ id: ctx2.current,
53834
+ state: currentOwner.memoizedState
53835
+ });
53836
+ else if (currentOwner.memoizedState !== prevComponentValue.state) {
53837
+ ctx2.current = prevComponentValue.id;
53838
+ $b5e257d569688ac6$var$componentIds.delete(currentOwner);
53839
+ }
53840
+ }
53841
+ ref2.current = ++ctx2.current;
53842
+ }
53843
+ return ref2.current;
53844
+ }
53845
+ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId2) {
53846
+ let ctx2 = useContext($b5e257d569688ac6$var$SSRContext);
53847
+ if (ctx2 === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
53848
+ console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
53849
+ let counter2 = $b5e257d569688ac6$var$useCounter(!!defaultId2);
53850
+ let prefix2 = ctx2 === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx2.prefix}`;
53851
+ return defaultId2 || `${prefix2}-${counter2}`;
53852
+ }
53853
+ function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId2) {
53854
+ let id2 = React__default.useId();
53855
+ let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
53856
+ let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
53857
+ return defaultId2 || `${prefix2}-${id2}`;
53858
+ }
53859
+ const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
53860
+ function $b5e257d569688ac6$var$getSnapshot() {
53861
+ return false;
53862
+ }
53863
+ function $b5e257d569688ac6$var$getServerSnapshot() {
53864
+ return true;
53865
+ }
53866
+ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
53867
+ return () => {
53868
+ };
53869
+ }
53870
+ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
53871
+ if (typeof React__default["useSyncExternalStore"] === "function")
53872
+ return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
53873
+ return useContext($b5e257d569688ac6$var$IsSSRContext);
53874
+ }
53875
+ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
53876
+ };
53877
+ let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
53878
+ function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
53879
+ let [value2, setValue] = useState(defaultId2);
53880
+ let nextId = useRef(null);
53881
+ let res = $b5e257d569688ac6$export$619500959fc48b26(value2);
53882
+ let updateValue = useCallback((val) => {
53883
+ nextId.current = val;
53884
+ }, []);
53885
+ $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
53886
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
53887
+ let r3 = res;
53888
+ return () => {
53889
+ $bdb11010cef70236$var$idsUpdaterMap.delete(r3);
53890
+ };
53891
+ }, [
53892
+ res
53893
+ ]);
53894
+ useEffect(() => {
53895
+ let newId = nextId.current;
53896
+ if (newId) {
53897
+ nextId.current = null;
53898
+ setValue(newId);
53899
+ }
53900
+ });
53901
+ return res;
53902
+ }
53903
+ let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
53904
+ let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
53905
+ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
53906
+ if (typeof window === "undefined")
53907
+ return;
53908
+ let onTransitionStart = (e3) => {
53909
+ let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e3.target);
53910
+ if (!transitions2) {
53911
+ transitions2 = /* @__PURE__ */ new Set();
53912
+ $bbed8b41f857bcc0$var$transitionsByElement.set(e3.target, transitions2);
53913
+ e3.target.addEventListener("transitioncancel", onTransitionEnd);
53914
+ }
53915
+ transitions2.add(e3.propertyName);
53916
+ };
53917
+ let onTransitionEnd = (e3) => {
53918
+ let properties2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e3.target);
53919
+ if (!properties2)
53920
+ return;
53921
+ properties2.delete(e3.propertyName);
53922
+ if (properties2.size === 0) {
53923
+ e3.target.removeEventListener("transitioncancel", onTransitionEnd);
53924
+ $bbed8b41f857bcc0$var$transitionsByElement.delete(e3.target);
53925
+ }
53926
+ if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
53927
+ for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
53928
+ cb();
53929
+ $bbed8b41f857bcc0$var$transitionCallbacks.clear();
53930
+ }
53931
+ };
53932
+ document.body.addEventListener("transitionrun", onTransitionStart);
53933
+ document.body.addEventListener("transitionend", onTransitionEnd);
53934
+ }
53935
+ if (typeof document !== "undefined") {
53936
+ if (document.readyState !== "loading")
53937
+ $bbed8b41f857bcc0$var$setupGlobalEvents();
53938
+ else
53939
+ document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
53940
+ }
53776
53941
  const useStyles$q = makeStyles((theme) => ({
53777
53942
  box: {
53778
53943
  boxSizing: "border-box"
@@ -53831,7 +53996,7 @@ function OptionSelect(props2) {
53831
53996
  function CellColorEncodingOption(props2) {
53832
53997
  const { observationsLabel, cellColorEncoding, setCellColorEncoding } = props2;
53833
53998
  const classes = useStyles$q();
53834
- const cellColorEncodingId = useId();
53999
+ const cellColorEncodingId = $bdb11010cef70236$export$f680877a34711e37();
53835
54000
  const observationsLabelNice = capitalize$2(observationsLabel);
53836
54001
  function handleColorEncodingChange(event2) {
53837
54002
  setCellColorEncoding(event2.target.value);
@@ -170004,16 +170169,16 @@ async function getDecoder(fileDirectory) {
170004
170169
  const Decoder = await importFn();
170005
170170
  return new Decoder(fileDirectory);
170006
170171
  }
170007
- addDecoder([void 0, 1], () => import("./raw-5df1bfd7.js").then((m2) => m2.default));
170008
- addDecoder(5, () => import("./lzw-29b3eaf8.js").then((m2) => m2.default));
170172
+ addDecoder([void 0, 1], () => import("./raw-2892023d.js").then((m2) => m2.default));
170173
+ addDecoder(5, () => import("./lzw-d13c5059.js").then((m2) => m2.default));
170009
170174
  addDecoder(6, () => {
170010
170175
  throw new Error("old style JPEG compression is not supported.");
170011
170176
  });
170012
- addDecoder(7, () => import("./jpeg-5e6a518a.js").then((m2) => m2.default));
170013
- addDecoder([8, 32946], () => import("./deflate-076fe90c.js").then((m2) => m2.default));
170014
- addDecoder(32773, () => import("./packbits-d0f1ab17.js").then((m2) => m2.default));
170015
- addDecoder(34887, () => import("./lerc-b2109cf1.js").then((m2) => m2.default));
170016
- addDecoder(50001, () => import("./webimage-3b6f4928.js").then((m2) => m2.default));
170177
+ addDecoder(7, () => import("./jpeg-44221470.js").then((m2) => m2.default));
170178
+ addDecoder([8, 32946], () => import("./deflate-af678fef.js").then((m2) => m2.default));
170179
+ addDecoder(32773, () => import("./packbits-19177477.js").then((m2) => m2.default));
170180
+ addDecoder(34887, () => import("./lerc-4cbb00e7.js").then((m2) => m2.default));
170181
+ addDecoder(50001, () => import("./webimage-cd20c54c.js").then((m2) => m2.default));
170017
170182
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
170018
170183
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
170019
170184
  }
@@ -184551,6 +184716,67 @@ function makeBoundingBox(viewState) {
184551
184716
  viewport.unproject([0, viewport.height])
184552
184717
  ];
184553
184718
  }
184719
+ const TARGETS = [1, 2, 3, 4, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1e3];
184720
+ const MIN_TARGET = TARGETS[0];
184721
+ const MAX_TARGET = TARGETS[TARGETS.length - 1];
184722
+ const SI_PREFIXES = [
184723
+ { symbol: "Y", exponent: 24 },
184724
+ { symbol: "Z", exponent: 21 },
184725
+ { symbol: "E", exponent: 18 },
184726
+ { symbol: "P", exponent: 15 },
184727
+ { symbol: "T", exponent: 12 },
184728
+ { symbol: "G", exponent: 9 },
184729
+ { symbol: "M", exponent: 6 },
184730
+ { symbol: "k", exponent: 3 },
184731
+ { symbol: "h", exponent: 2 },
184732
+ { symbol: "da", exponent: 1 },
184733
+ { symbol: "", exponent: 0 },
184734
+ { symbol: "d", exponent: -1 },
184735
+ { symbol: "c", exponent: -2 },
184736
+ { symbol: "m", exponent: -3 },
184737
+ { symbol: "µ", exponent: -6 },
184738
+ { symbol: "n", exponent: -9 },
184739
+ { symbol: "p", exponent: -12 },
184740
+ { symbol: "f", exponent: -15 },
184741
+ { symbol: "a", exponent: -18 },
184742
+ { symbol: "z", exponent: -21 },
184743
+ { symbol: "y", exponent: -24 }
184744
+ ];
184745
+ function sizeToMeters(size2, unit2) {
184746
+ if (!unit2 || unit2 === "m") {
184747
+ return size2;
184748
+ }
184749
+ if (unit2.length > 1) {
184750
+ let unitPrefix = unit2.substring(0, unit2.length - 1);
184751
+ if (unitPrefix === "u") {
184752
+ unitPrefix = "µ";
184753
+ }
184754
+ const unitObj = SI_PREFIXES.find((p) => p.symbol === unitPrefix);
184755
+ if (unitObj) {
184756
+ return size2 * 10 ** unitObj.exponent;
184757
+ }
184758
+ }
184759
+ throw new Error("Received unknown unit");
184760
+ }
184761
+ function snapValue(value2) {
184762
+ let magnitude = 0;
184763
+ if (value2 < MIN_TARGET || value2 > MAX_TARGET) {
184764
+ magnitude = Math.floor(Math.log10(value2));
184765
+ }
184766
+ let snappedUnit = SI_PREFIXES.find(
184767
+ (p) => p.exponent % 3 === 0 && p.exponent <= magnitude
184768
+ );
184769
+ let adjustedValue = value2 / 10 ** snappedUnit.exponent;
184770
+ if (adjustedValue > 500 && adjustedValue <= 1e3) {
184771
+ snappedUnit = SI_PREFIXES.find(
184772
+ (p) => p.exponent % 3 === 0 && p.exponent <= magnitude + 3
184773
+ );
184774
+ adjustedValue = value2 / 10 ** snappedUnit.exponent;
184775
+ }
184776
+ const targetNewUnits = TARGETS.find((t4) => t4 > adjustedValue);
184777
+ const targetOrigUnits = targetNewUnits * 10 ** snappedUnit.exponent;
184778
+ return [targetOrigUnits, targetNewUnits, snappedUnit.symbol];
184779
+ }
184554
184780
  const fs$1$1 = `#define SHADER_NAME xr-layer-fragment-shader
184555
184781
 
184556
184782
  precision highp float;
@@ -185318,26 +185544,27 @@ const OverviewLayer = class extends CompositeLayer {
185318
185544
  OverviewLayer.layerName = "OverviewLayer";
185319
185545
  OverviewLayer.defaultProps = defaultProps$3;
185320
185546
  function getPosition$1(boundingBox, position2, length2) {
185321
- const viewLength = boundingBox[2][0] - boundingBox[0][0];
185547
+ const viewWidth2 = boundingBox[2][0] - boundingBox[0][0];
185548
+ const viewHeight2 = boundingBox[2][1] - boundingBox[0][1];
185322
185549
  switch (position2) {
185323
185550
  case "bottom-right": {
185324
- const yCoord = boundingBox[2][1] - (boundingBox[2][1] - boundingBox[0][1]) * length2;
185325
- const xLeftCoord = boundingBox[2][0] - viewLength * length2;
185551
+ const yCoord = boundingBox[2][1] - viewHeight2 * length2;
185552
+ const xLeftCoord = boundingBox[2][0] - viewWidth2 * length2;
185326
185553
  return [yCoord, xLeftCoord];
185327
185554
  }
185328
185555
  case "top-right": {
185329
- const yCoord = (boundingBox[2][1] - boundingBox[0][1]) * length2;
185330
- const xLeftCoord = boundingBox[2][0] - viewLength * length2;
185556
+ const yCoord = boundingBox[0][1] + viewHeight2 * length2;
185557
+ const xLeftCoord = boundingBox[2][0] - viewWidth2 * length2;
185331
185558
  return [yCoord, xLeftCoord];
185332
185559
  }
185333
185560
  case "top-left": {
185334
- const yCoord = (boundingBox[2][1] - boundingBox[0][1]) * length2;
185335
- const xLeftCoord = viewLength * length2;
185561
+ const yCoord = boundingBox[0][1] + viewHeight2 * length2;
185562
+ const xLeftCoord = boundingBox[0][0] + viewWidth2 * length2;
185336
185563
  return [yCoord, xLeftCoord];
185337
185564
  }
185338
185565
  case "bottom-left": {
185339
- const yCoord = boundingBox[2][1] - (boundingBox[2][1] - boundingBox[0][1]) * length2;
185340
- const xLeftCoord = viewLength * length2;
185566
+ const yCoord = boundingBox[2][1] - viewHeight2 * length2;
185567
+ const xLeftCoord = boundingBox[0][0] + viewWidth2 * length2;
185341
185568
  return [yCoord, xLeftCoord];
185342
185569
  }
185343
185570
  default: {
@@ -185355,11 +185582,12 @@ const defaultProps$2 = {
185355
185582
  unit: { type: "string", value: "", compare: true },
185356
185583
  size: { type: "number", value: 1, compare: true },
185357
185584
  position: { type: "string", value: "bottom-right", compare: true },
185358
- length: { type: "number", value: 0.085, compare: true }
185585
+ length: { type: "number", value: 0.085, compare: true },
185586
+ snap: { type: "boolean", value: false, compare: true }
185359
185587
  };
185360
185588
  const ScaleBarLayer = class extends CompositeLayer {
185361
185589
  renderLayers() {
185362
- const { id: id2, unit: unit2, size: size2, position: position2, viewState, length: length2 } = this.props;
185590
+ const { id: id2, unit: unit2, size: size2, position: position2, viewState, length: length2, snap } = this.props;
185363
185591
  const boundingBox = makeBoundingBox(viewState);
185364
185592
  const { zoom: zoom2 } = viewState;
185365
185593
  const viewLength = boundingBox[2][0] - boundingBox[0][0];
@@ -185368,15 +185596,27 @@ const ScaleBarLayer = class extends CompositeLayer {
185368
185596
  2 ** (-zoom2 + 1.5),
185369
185597
  (boundingBox[2][1] - boundingBox[0][1]) * 7e-3
185370
185598
  );
185371
- const numUnits = barLength * size2;
185599
+ let adjustedBarLength = barLength;
185600
+ let displayNumber = (barLength * size2).toPrecision(5);
185601
+ let displayUnit = unit2;
185602
+ if (snap) {
185603
+ const meterSize = sizeToMeters(size2, unit2);
185604
+ const numUnits = barLength * meterSize;
185605
+ const [snappedOrigUnits, snappedNewUnits, snappedUnitPrefix] = snapValue(numUnits);
185606
+ adjustedBarLength = snappedOrigUnits / meterSize;
185607
+ displayNumber = snappedNewUnits;
185608
+ displayUnit = `${snappedUnitPrefix}m`;
185609
+ }
185372
185610
  const [yCoord, xLeftCoord] = getPosition$1(boundingBox, position2, length2);
185611
+ const xRightCoord = xLeftCoord + barLength;
185612
+ const isLeft = position2.endsWith("-left");
185373
185613
  const lengthBar = new LineLayer({
185374
185614
  id: `scale-bar-length-${id2}`,
185375
185615
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
185376
185616
  data: [
185377
185617
  [
185378
- [xLeftCoord, yCoord],
185379
- [xLeftCoord + barLength, yCoord]
185618
+ [isLeft ? xLeftCoord : xRightCoord - adjustedBarLength, yCoord],
185619
+ [isLeft ? xLeftCoord + adjustedBarLength : xRightCoord, yCoord]
185380
185620
  ]
185381
185621
  ],
185382
185622
  getSourcePosition: (d) => d[0],
@@ -185389,8 +185629,14 @@ const ScaleBarLayer = class extends CompositeLayer {
185389
185629
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
185390
185630
  data: [
185391
185631
  [
185392
- [xLeftCoord, yCoord - barHeight],
185393
- [xLeftCoord, yCoord + barHeight]
185632
+ [
185633
+ isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
185634
+ yCoord - barHeight
185635
+ ],
185636
+ [
185637
+ isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
185638
+ yCoord + barHeight
185639
+ ]
185394
185640
  ]
185395
185641
  ],
185396
185642
  getSourcePosition: (d) => d[0],
@@ -185403,8 +185649,14 @@ const ScaleBarLayer = class extends CompositeLayer {
185403
185649
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
185404
185650
  data: [
185405
185651
  [
185406
- [xLeftCoord + barLength, yCoord - barHeight],
185407
- [xLeftCoord + barLength, yCoord + barHeight]
185652
+ [
185653
+ isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
185654
+ yCoord - barHeight
185655
+ ],
185656
+ [
185657
+ isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
185658
+ yCoord + barHeight
185659
+ ]
185408
185660
  ]
185409
185661
  ],
185410
185662
  getSourcePosition: (d) => d[0],
@@ -185417,8 +185669,11 @@ const ScaleBarLayer = class extends CompositeLayer {
185417
185669
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
185418
185670
  data: [
185419
185671
  {
185420
- text: numUnits.toPrecision(5) + unit2,
185421
- position: [xLeftCoord + barLength * 0.5, yCoord + barHeight * 4]
185672
+ text: `${displayNumber}${displayUnit}`,
185673
+ position: [
185674
+ isLeft ? xLeftCoord + barLength * 0.5 : xRightCoord - barLength * 0.5,
185675
+ yCoord + barHeight * 4
185676
+ ]
185422
185677
  }
185423
185678
  ],
185424
185679
  getColor: [220, 220, 220, 255],
@@ -185427,7 +185682,7 @@ const ScaleBarLayer = class extends CompositeLayer {
185427
185682
  sizeUnits: "meters",
185428
185683
  sizeScale: 2 ** -zoom2,
185429
185684
  characterSet: [
185430
- ...unit2.split(""),
185685
+ ...displayUnit.split(""),
185431
185686
  ...range$5(10).map((i2) => String(i2)),
185432
185687
  ".",
185433
185688
  "e",
@@ -187718,7 +187973,7 @@ const ScatterplotWrapper = forwardRef((props2, deckRef) => jsxRuntimeExports.jsx
187718
187973
  ScatterplotWrapper.displayName = "ScatterplotWrapper";
187719
187974
  function ScatterplotOptions(props2) {
187720
187975
  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 } = props2;
187721
- const scatterplotOptionsId = useId();
187976
+ const scatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
187722
187977
  const observationsLabelNice = capitalize$2(observationsLabel);
187723
187978
  const classes = useStyles$q();
187724
187979
  function handleCellRadiusModeChange(event2) {
@@ -190243,7 +190498,7 @@ function EmbeddingScatterplotSubscriber(props2) {
190243
190498
  }
190244
190499
  function GatingScatterplotOptions(props2) {
190245
190500
  const { featureType, gatingFeatureSelectionX, setGatingFeatureSelectionX, gatingFeatureSelectionY, setGatingFeatureSelectionY, gatingFeatureValueTransform, setGatingFeatureValueTransform, gatingFeatureValueTransformCoefficient, setGatingFeatureValueTransformCoefficient, geneSelectOptions, transformOptions } = props2;
190246
- const gatingScatterplotOptionsId = useId();
190501
+ const gatingScatterplotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
190247
190502
  const classes = useStyles$q();
190248
190503
  const handleGeneSelectChange = (event2) => {
190249
190504
  const { options } = event2.target;
@@ -206387,6 +206642,7 @@ let Spatial$1 = class Spatial extends AbstractSpatialOrScatterplot {
206387
206642
  id: "scalebar-layer",
206388
206643
  unit: unit2,
206389
206644
  size: size2,
206645
+ snap: true,
206390
206646
  viewState: { ...viewState, width: width2, height: height2 }
206391
206647
  });
206392
206648
  }
@@ -206734,7 +206990,7 @@ const useToggleStyles = makeStyles(() => ({
206734
206990
  }
206735
206991
  }));
206736
206992
  const ToggleFixedAxisButton = ({ setSpatialAxisFixed, spatialAxisFixed, use3d }) => {
206737
- const toggleAxisId = useId();
206993
+ const toggleAxisId = $bdb11010cef70236$export$f680877a34711e37();
206738
206994
  const classes = useToggleStyles();
206739
206995
  return jsxRuntimeExports.jsxs(TableRow$1, { children: [jsxRuntimeExports.jsx(TableCell$1, { className: classes.cameraLabel, variant: "head", scope: "row", children: jsxRuntimeExports.jsx("label", { htmlFor: `spatial-camera-axis-${toggleAxisId}`, children: "Fix Camera Axis" }) }), jsxRuntimeExports.jsx(TableCell$1, { className: classes.toggleBox, variant: "body", children: jsxRuntimeExports.jsx(Checkbox$1, { onClick: () => setSpatialAxisFixed(!spatialAxisFixed), disabled: !use3d, checked: Boolean(spatialAxisFixed), inputProps: {
206740
206996
  "aria-label": "Fix or not fix spatial camera axis",
@@ -206743,7 +206999,7 @@ const ToggleFixedAxisButton = ({ setSpatialAxisFixed, spatialAxisFixed, use3d })
206743
206999
  };
206744
207000
  function SpatialOptions(props2) {
206745
207001
  const { observationsLabel, cellColorEncoding, setCellColorEncoding, setSpatialAxisFixed, spatialAxisFixed, use3d, tooltipsVisible, setTooltipsVisible, geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange, canShowExpressionOptions, canShowColorEncodingOption, canShow3DOptions } = props2;
206746
- const spatialOptionsId = useId();
207002
+ const spatialOptionsId = $bdb11010cef70236$export$f680877a34711e37();
206747
207003
  function handleGeneExpressionColormapChange(event2) {
206748
207004
  setGeneExpressionColormap(event2.target.value);
206749
207005
  }
@@ -207584,6 +207840,7 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
207584
207840
  id: "scalebar-layer",
207585
207841
  unit: "um",
207586
207842
  size: 1,
207843
+ snap: true,
207587
207844
  viewState: { ...viewState, width: width2, height: height2 }
207588
207845
  });
207589
207846
  }
@@ -209730,7 +209987,7 @@ function HeatmapTooltipSubscriber(props2) {
209730
209987
  function HeatmapOptions(props2) {
209731
209988
  const { geneExpressionColormap, setGeneExpressionColormap, geneExpressionColormapRange, setGeneExpressionColormapRange, tooltipsVisible, setTooltipsVisible } = props2;
209732
209989
  const classes = useStyles$q();
209733
- const heatmapOptionsId = useId();
209990
+ const heatmapOptionsId = $bdb11010cef70236$export$f680877a34711e37();
209734
209991
  function handleGeneExpressionColormapChange(event2) {
209735
209992
  setGeneExpressionColormap(event2.target.value);
209736
209993
  }
@@ -214221,7 +214478,7 @@ function FeatureList(props2) {
214221
214478
  }
214222
214479
  function FeatureListOptions(props2) {
214223
214480
  const { children: children3, featureListSort, setFeatureListSort, featureListSortKey, setFeatureListSortKey, showFeatureTable, setShowFeatureTable, hasFeatureLabels, primaryColumnName } = props2;
214224
- const featureListId = useId();
214481
+ const featureListId = $bdb11010cef70236$export$f680877a34711e37();
214225
214482
  function handleFeatureListSortChange(event2) {
214226
214483
  setFeatureListSort(event2.target.value);
214227
214484
  }
@@ -214671,11 +214928,11 @@ function LayerOptions({ colormap, opacity: opacity2, handleColormapChange, handl
214671
214928
  const hasViewableResolutions = Boolean(Array.from({
214672
214929
  length: loader2.data.length
214673
214930
  }).filter((_, res) => canLoadResolution(loader2.data, res)).length);
214674
- const globalSelectionSliderId = useId();
214675
- const colormapSelectId = useId();
214676
- const domainSelectorId = useId();
214677
- const opacitySliderId = useId();
214678
- const zeroTransparentId = useId();
214931
+ const globalSelectionSliderId = $bdb11010cef70236$export$f680877a34711e37();
214932
+ const colormapSelectId = $bdb11010cef70236$export$f680877a34711e37();
214933
+ const domainSelectorId = $bdb11010cef70236$export$f680877a34711e37();
214934
+ const opacitySliderId = $bdb11010cef70236$export$f680877a34711e37();
214935
+ const zeroTransparentId = $bdb11010cef70236$export$f680877a34711e37();
214679
214936
  return jsxRuntimeExports.jsxs(Grid$3, { container: true, direction: "column", style: { width: "100%" }, children: [hasZStack && !disable3d && hasViewableResolutions && jsxRuntimeExports.jsx(VolumeDropdown, { loader: loader2, handleSliderChange, handleDomainChange, channels: channels2, handleMultiPropertyChange, resolution, disable3d, setRasterLayerCallback, setAreAllChannelsLoading, setViewState, spatialHeight, spatialWidth, use3d, modelMatrix: modelMatrix2 }), hasDimensionsAndChannels && !use3d && globalControlLabels.map((field2) => shape2[labels2.indexOf(field2)] > 1 && jsxRuntimeExports.jsx(LayerOption, { name: field2, inputId: `${field2}-${globalSelectionSliderId}`, children: jsxRuntimeExports.jsx(GlobalSelectionSlider, { field: field2, inputId: `${field2}-${globalSelectionSliderId}`, value: globalLabelValues[field2], handleChange: handleGlobalChannelsSelectionChange, possibleValues: range$b(shape2[labels2.indexOf(field2)]) }) }, field2)), !disableChannelsIfRgbDetected ? jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [shouldShowColormap && jsxRuntimeExports.jsx(Grid$3, { item: true, children: jsxRuntimeExports.jsx(LayerOption, { name: "Colormap", inputId: colormapSelectId, children: jsxRuntimeExports.jsx(ColormapSelect, { value: colormap || "", inputId: colormapSelectId, handleChange: handleColormapChange }) }) }), shouldShowDomain && jsxRuntimeExports.jsx(Grid$3, { item: true, children: jsxRuntimeExports.jsx(LayerOption, { name: "Domain", inputId: domainSelectorId, children: jsxRuntimeExports.jsx(SliderDomainSelector, { value: domainType || DEFAULT_RASTER_DOMAIN_TYPE, inputId: domainSelectorId, handleChange: (value2) => {
214680
214937
  handleDomainChange(value2);
214681
214938
  } }) }) })] }) : null, !use3d && jsxRuntimeExports.jsx(Grid$3, { item: true, children: jsxRuntimeExports.jsx(LayerOption, { name: "Opacity", inputId: opacitySliderId, children: jsxRuntimeExports.jsx(OpacitySlider, { value: opacity2, handleChange: handleOpacityChange, inputId: opacitySliderId }) }) }), shouldShowTransparentColor && !use3d && jsxRuntimeExports.jsx(Grid$3, { item: true, children: jsxRuntimeExports.jsx(LayerOption, { name: "Zero Transparent", inputId: zeroTransparentId, children: jsxRuntimeExports.jsx(TransparentColorCheckbox, { value: transparentColor, handleChange: handleTransparentColorChange, inputId: zeroTransparentId }) }) })] });
@@ -214778,7 +215035,7 @@ function LayerController$1(props2) {
214778
215035
  channelRef.current = channels2;
214779
215036
  return void 0;
214780
215037
  }, [channels2]);
214781
- const layerControlsId = useId();
215038
+ const layerControlsId = $bdb11010cef70236$export$f680877a34711e37();
214782
215039
  const firstSelection = ((_a2 = channels2[0]) == null ? void 0 : _a2.selection) || {};
214783
215040
  const { data: data2, channels: channelOptions } = loader2;
214784
215041
  const [tab, setTab] = useState(0);
@@ -215418,13 +215675,13 @@ function SpotLayerEllipsisMenu(props2) {
215418
215675
  useStyles$c();
215419
215676
  const selectClasses = useSelectStyles();
215420
215677
  const menuClasses = useEllipsisMenuStyles();
215421
- const filledId = useId();
215422
- const strokeWidthId = useId();
215423
- const quantitativeColormapId = useId();
215424
- const colormapRangeId = useId();
215425
- const tooltipsVisibleId = useId();
215426
- const crosshairsVisibleId = useId();
215427
- const legendVisibleId = useId();
215678
+ const filledId = $bdb11010cef70236$export$f680877a34711e37();
215679
+ const strokeWidthId = $bdb11010cef70236$export$f680877a34711e37();
215680
+ const quantitativeColormapId = $bdb11010cef70236$export$f680877a34711e37();
215681
+ const colormapRangeId = $bdb11010cef70236$export$f680877a34711e37();
215682
+ const tooltipsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215683
+ const crosshairsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215684
+ const legendVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215428
215685
  return jsxRuntimeExports.jsxs(PopperMenu, { open, setOpen, buttonIcon: jsxRuntimeExports.jsx(MoreVertIcon, {}), buttonClassName: menuClasses.imageLayerMenuButton, containerClassName: menuClasses.imageLayerPopperContainer, withPaper: true, "aria-label": "Open spot layer options menu", children: [jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: filledId, children: "Filled: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: filled, onChange: (e3, v) => setFilled(v), inputProps: { id: filledId, "aria-label": "Toggle between filled and stroked spots" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: strokeWidthId, children: "Stroke Width:" }), jsxRuntimeExports.jsx(Slider$1, { disabled: filled, value: strokeWidth, min: 0.01, max: 5, step: 0.01, onChange: (e3, v) => setStrokeWidth(v), className: menuClasses.menuItemSlider, orientation: "horizontal", id: strokeWidthId, "aria-label": "Stroke width slider" })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: quantitativeColormapId, children: "Color Encoding: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, onChange: (e3) => setObsColorEncoding(e3.target.value), value: obsColorEncoding, inputProps: { id: quantitativeColormapId, "aria-label": "Color encoding selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { value: "spatialLayerColor", children: "Static Color" }), jsxRuntimeExports.jsx("option", { value: "geneSelection", children: "Feature Value" }), jsxRuntimeExports.jsx("option", { value: "cellSetSelection", children: "Set Selection" })] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: colormapRangeId, children: "Colormap Range: " }), jsxRuntimeExports.jsx(Slider$1, { 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$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: tooltipsVisibleId, children: "Tooltips Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipsVisible, onChange: (e3, v) => setTooltipsVisible(v), inputProps: { id: tooltipsVisibleId, "aria-label": "Toggle tooltip visibility" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: crosshairsVisibleId, children: "Tooltip Crosshairs Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipCrosshairsVisible, onChange: (e3, v) => setTooltipCrosshairsVisible(v), inputProps: { id: crosshairsVisibleId, "aria-label": "Toggle tooltip crosshair visibility" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: legendVisibleId, children: "Legend Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: legendVisible, onChange: (e3, v) => setLegendVisible(v), inputProps: { id: legendVisibleId, "aria-label": "Toggle legend visibility" } })] })] });
215429
215686
  }
215430
215687
  function SpotLayerController(props2) {
@@ -215461,11 +215718,11 @@ function PointLayerEllipsisMenu(props2) {
215461
215718
  const [open, setOpen] = useState(false);
215462
215719
  const selectClasses = useSelectStyles();
215463
215720
  const menuClasses = useEllipsisMenuStyles();
215464
- const quantitativeColormapId = useId();
215465
- const colormapRangeId = useId();
215466
- const tooltipsVisibleId = useId();
215467
- const crosshairsVisibleId = useId();
215468
- const legendVisibleId = useId();
215721
+ const quantitativeColormapId = $bdb11010cef70236$export$f680877a34711e37();
215722
+ const colormapRangeId = $bdb11010cef70236$export$f680877a34711e37();
215723
+ const tooltipsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215724
+ const crosshairsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215725
+ const legendVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215469
215726
  return jsxRuntimeExports.jsxs(PopperMenu, { open, setOpen, buttonIcon: jsxRuntimeExports.jsx(MoreVertIcon, {}), buttonClassName: menuClasses.imageLayerMenuButton, containerClassName: menuClasses.imageLayerPopperContainer, withPaper: true, "aria-label": "Open point layer options menu", children: [jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: quantitativeColormapId, children: "Color Encoding: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, onChange: (e3) => setObsColorEncoding(e3.target.value), value: obsColorEncoding, inputProps: { id: quantitativeColormapId, "aria-label": "Color encoding selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { value: "spatialLayerColor", children: "Static Color" }), jsxRuntimeExports.jsx("option", { value: "obsLabels", children: "Label Value" })] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: colormapRangeId, children: "Colormap Range: " }), jsxRuntimeExports.jsx(Slider$1, { 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$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: tooltipsVisibleId, children: "Tooltips Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipsVisible, onChange: (e3, v) => setTooltipsVisible(v), inputProps: { id: tooltipsVisibleId, "aria-label": "Toggle tooltip visibility" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: crosshairsVisibleId, children: "Tooltip Crosshairs Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipCrosshairsVisible, onChange: (e3, v) => setTooltipCrosshairsVisible(v), inputProps: { id: crosshairsVisibleId, "aria-label": "Toggle tooltip crosshair visibility" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: legendVisibleId, children: "Legend Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: legendVisible, onChange: (e3, v) => setLegendVisible(v), inputProps: { id: legendVisibleId, "aria-label": "Toggle legend visibility" } })] })] });
215470
215727
  }
215471
215728
  function PointLayerController(props2) {
@@ -215503,13 +215760,13 @@ function SegmentationChannelEllipsisMenu(props2) {
215503
215760
  useStyles$a();
215504
215761
  const selectClasses = useSelectStyles();
215505
215762
  const menuClasses = useEllipsisMenuStyles();
215506
- const filledId = useId();
215507
- const strokeWidthId = useId();
215508
- const quantitativeColormapId = useId();
215509
- const colormapRangeId = useId();
215510
- const tooltipsVisibleId = useId();
215511
- const crosshairsVisibleId = useId();
215512
- const legendVisibleId = useId();
215763
+ const filledId = $bdb11010cef70236$export$f680877a34711e37();
215764
+ const strokeWidthId = $bdb11010cef70236$export$f680877a34711e37();
215765
+ const quantitativeColormapId = $bdb11010cef70236$export$f680877a34711e37();
215766
+ const colormapRangeId = $bdb11010cef70236$export$f680877a34711e37();
215767
+ const tooltipsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215768
+ const crosshairsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215769
+ const legendVisibleId = $bdb11010cef70236$export$f680877a34711e37();
215513
215770
  return jsxRuntimeExports.jsxs(PopperMenu, { open, setOpen, buttonIcon: jsxRuntimeExports.jsx(MoreVertIcon, {}), buttonClassName: menuClasses.imageLayerMenuButton, containerClassName: menuClasses.imageLayerPopperContainer, withPaper: true, "aria-label": "Open segmentation channel options menu", children: [jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: filledId, children: "Filled: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: filled, onChange: (e3, v) => setFilled(v), inputProps: { id: filledId, "aria-label": "Toggle between filled and stroked segmentations" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: strokeWidthId, children: "Stroke Width:" }), jsxRuntimeExports.jsx(Slider$1, { disabled: filled, value: strokeWidth, min: 0.01, max: 5, step: 0.01, onChange: (e3, v) => setStrokeWidth(v), className: menuClasses.menuItemSlider, orientation: "horizontal", id: strokeWidthId, "aria-label": "Stroke width slider" })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: quantitativeColormapId, children: "Color Encoding: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, onChange: (e3) => setObsColorEncoding(e3.target.value), value: obsColorEncoding, inputProps: { id: quantitativeColormapId, "aria-label": "Color encoding selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { value: "spatialChannelColor", children: "Static Color" }), jsxRuntimeExports.jsx("option", { value: "geneSelection", children: "Feature Value" }), jsxRuntimeExports.jsx("option", { value: "cellSetSelection", children: "Set Selection" })] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: colormapRangeId, children: "Colormap Range: " }), jsxRuntimeExports.jsx(Slider$1, { 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$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: tooltipsVisibleId, children: "Tooltips Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipsVisible, onChange: (e3, v) => setTooltipsVisible(v), inputProps: { id: tooltipsVisibleId, "aria-label": "Toggle tooltip visibility" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: crosshairsVisibleId, children: "Tooltip Crosshairs Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipCrosshairsVisible, onChange: (e3, v) => setTooltipCrosshairsVisible(v), inputProps: { id: crosshairsVisibleId, "aria-label": "Toggle tooltip crosshair visibility" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: legendVisibleId, children: "Legend Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: legendVisible, onChange: (e3, v) => setLegendVisible(v), inputProps: { id: legendVisibleId, "aria-label": "Toggle legend visibility" } })] })] });
215514
215771
  }
215515
215772
  function SegmentationChannelController(props2) {
@@ -215592,7 +215849,7 @@ function ChannelOptions(props2) {
215592
215849
  function handleDomainTypeChange(event2) {
215593
215850
  setShowValueExtent(event2.target.value === "Value Min/Max");
215594
215851
  }
215595
- const domainTypeId = useId();
215852
+ const domainTypeId = $bdb11010cef70236$export$f680877a34711e37();
215596
215853
  return jsxRuntimeExports.jsxs(PopperMenu, { open, setOpen, buttonIcon: jsxRuntimeExports.jsx(MoreVertIcon, { fontSize: "small" }), buttonClassName: classes.channelMenuButton, containerClassName: menuClasses.imageLayerPopperContainer, placement: "bottom-end", withPaper: true, "aria-label": "Open channel options menu", children: [jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: domainTypeId, children: "Slider Extent: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, onChange: handleDomainTypeChange, value: showValueExtent ? "Value Min/Max" : "Dtype Min/Max", inputProps: { id: domainTypeId, "aria-label": "Slider extent selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { value: "Value Min/Max", children: "Value Min/Max" }), jsxRuntimeExports.jsx("option", { value: "Dtype Min/Max", children: "Dtype Min/Max" })] })] }), jsxRuntimeExports.jsx(MenuItem$1, { dense: true, disableGutters: true, component: "button", onClick: onResetWindowUsingIQR, className: classes.menuItemButton, "aria-label": "Click to use IQR for channel", children: "Reset window using IQR" }), jsxRuntimeExports.jsx(MenuItem$1, { dense: true, disableGutters: true, component: "button", onClick: handleRemove, className: classes.menuItemButton, "aria-label": "Click to remove channel", children: "Remove channel" })] });
215597
215854
  }
215598
215855
  const useStyles$8 = makeStyles(() => ({
@@ -215776,15 +216033,15 @@ function ImageLayerEllipsisMenu(props2) {
215776
216033
  function handleChannelLabelsOrientationChange(event2) {
215777
216034
  setChannelLabelsOrientation(event2.target.value);
215778
216035
  }
215779
- const colormapId = useId();
215780
- const interpretationId = useId();
215781
- const transparentId = useId();
215782
- const volumetricId = useId();
215783
- const resolutionId = useId();
215784
- const tooltipsVisibleId = useId();
215785
- const channelLabelsVisibleId = useId();
215786
- const channelLabelsOrientationId = useId();
215787
- const channelLabelSizeId = useId();
216036
+ const colormapId = $bdb11010cef70236$export$f680877a34711e37();
216037
+ const interpretationId = $bdb11010cef70236$export$f680877a34711e37();
216038
+ const transparentId = $bdb11010cef70236$export$f680877a34711e37();
216039
+ const volumetricId = $bdb11010cef70236$export$f680877a34711e37();
216040
+ const resolutionId = $bdb11010cef70236$export$f680877a34711e37();
216041
+ const tooltipsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
216042
+ const channelLabelsVisibleId = $bdb11010cef70236$export$f680877a34711e37();
216043
+ const channelLabelsOrientationId = $bdb11010cef70236$export$f680877a34711e37();
216044
+ const channelLabelSizeId = $bdb11010cef70236$export$f680877a34711e37();
215788
216045
  return jsxRuntimeExports.jsxs(PopperMenu, { open, setOpen, buttonIcon: jsxRuntimeExports.jsx(MoreVertIcon, {}), buttonClassName: menuClasses.imageLayerMenuButton, containerClassName: menuClasses.imageLayerPopperContainer, withPaper: true, "aria-label": "Open image layer options menu", children: [jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: colormapId, children: "Colormap: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, disabled: photometricInterpretation === "RGB", onChange: handleColormapChange, value: colormap === null ? "" : colormap, inputProps: { id: colormapId, "aria-label": "Colormap selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { "aria-label": "None", value: "", children: "None" }), COLORMAP_OPTIONS.map((name2) => jsxRuntimeExports.jsx("option", { value: name2, children: name2 }, name2))] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: interpretationId, children: "Photometric Interpretation: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, onChange: handleInterpretationChange, value: photometricInterpretation, inputProps: { id: interpretationId, "aria-label": "Photometric interpretation selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { "aria-label": "RGB", value: "RGB", children: "RGB" }), channelScopes.length > 0 ? jsxRuntimeExports.jsx("option", { "aria-label": "BlackIsZero", value: "BlackIsZero", children: "BlackIsZero" }) : null] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: transparentId, children: "Zero Transparent: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: spatialLayerTransparentColor !== null, onChange: (e3, v) => setSpatialLayerTransparentColor(v ? [0, 0, 0] : null), inputProps: { id: transparentId, "aria-label": "Render zero-value pixels as transparent" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: volumetricId, children: "Volumetric Rendering: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, onChange: handleVolumetricChange, value: volumetricRenderingAlgorithm, inputProps: { id: volumetricId, "aria-label": "Volumetric rendering algorithm selector" }, classes: { root: selectClasses.selectRoot }, disabled: !is3dMode, children: [jsxRuntimeExports.jsx("option", { "aria-label": "Additive", value: "additive", children: "Additive" }), jsxRuntimeExports.jsx("option", { "aria-label": "Maximum Intensity Projection", value: "maximumIntensityProjection", children: "Maximum Intensity Projection" })] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: resolutionId, children: "Volume Resolution: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, disabled: !is3dMode || !isMultiResolution, onChange: handleResolutionChange, value: spatialTargetResolution === null ? "auto" : spatialTargetResolution, inputProps: { id: resolutionId, "aria-label": "Volumetric resolution selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { value: "auto", children: "Auto" }), Array.isArray(multiResolutionStats) ? multiResolutionStats.map((stats, resolution) => stats.canLoad ? jsxRuntimeExports.jsx("option", { value: resolution, children: `3D: ${resolution}x Downsampled, ~${formatBytes(stats.totalBytes)} per channel, (${stats.height}, ${stats.width}, ${stats.depthDownsampled})` }, `(${stats.height}, ${stats.width}, ${stats.depthDownsampled})`) : null) : null] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: tooltipsVisibleId, children: "Tooltips Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { color: "primary", checked: tooltipsVisible, onChange: (e3, v) => setTooltipsVisible(v), inputProps: { id: tooltipsVisibleId, "aria-label": "Render pixel value tooltips" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: channelLabelsVisibleId, children: "Channel Labels Visible: " }), jsxRuntimeExports.jsx(Checkbox$1, { disabled: photometricInterpretation === "RGB", color: "primary", checked: channelLabelsVisible, onChange: (e3, v) => setChannelLabelsVisible(v), inputProps: { id: channelLabelsVisibleId, "aria-label": "Render channel labels" } })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: channelLabelsOrientationId, children: "Channel Labels Orientation: " }), jsxRuntimeExports.jsxs(Select$1, { native: true, disabled: photometricInterpretation === "RGB", onChange: handleChannelLabelsOrientationChange, value: channelLabelsOrientation, inputProps: { id: channelLabelsOrientationId, "aria-label": "Channel labels orientation selector" }, classes: { root: selectClasses.selectRoot }, children: [jsxRuntimeExports.jsx("option", { "aria-label": "Vertical", value: "vertical", children: "Vertical" }), jsxRuntimeExports.jsx("option", { "aria-label": "Horizontal", value: "horizontal", children: "Horizontal" })] })] }), jsxRuntimeExports.jsxs(MenuItem$1, { dense: true, disableGutters: true, children: [jsxRuntimeExports.jsx("label", { className: menuClasses.imageLayerMenuLabel, htmlFor: channelLabelSizeId, children: "Channel Labels Size: " }), jsxRuntimeExports.jsx(Slider$1, { disabled: photometricInterpretation === "RGB", value: channelLabelSize, min: 8, max: 36, step: 1, onChange: (e3, v) => setChannelLabelSize(v), className: menuClasses.menuItemSlider, orientation: "horizontal", id: channelLabelSizeId, "aria-label": "Channel labels text size slider" })] })] });
215789
216046
  }
215790
216047
  function ImageLayerController(props2) {
@@ -216522,7 +216779,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
216522
216779
  const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
216523
216780
  register({ dataFetcher: ZarrMultivecDataFetcher, config: ZarrMultivecDataFetcher.config }, { pluginType: "dataFetcher" });
216524
216781
  const LazyHiGlassComponent = React__default.lazy(async () => {
216525
- const { HiGlassComponent } = await import("./hglib-066524aa.js").then((n3) => n3.h);
216782
+ const { HiGlassComponent } = await import("./hglib-3a33324c.js").then((n3) => n3.h);
216526
216783
  return { default: HiGlassComponent };
216527
216784
  });
216528
216785
  const HG_SIZE = 800;
@@ -216810,7 +217067,7 @@ function GenomicProfilesSubscriber(props2) {
216810
217067
  }
216811
217068
  function CellSetExpressionPlotOptions(props2) {
216812
217069
  const { featureValueTransform, setFeatureValueTransform, featureValueTransformCoefficient, setFeatureValueTransformCoefficient, transformOptions } = props2;
216813
- const cellSetExpressionPlotOptionsId = useId();
217070
+ const cellSetExpressionPlotOptionsId = $bdb11010cef70236$export$f680877a34711e37();
216814
217071
  const classes = useStyles$q();
216815
217072
  const handleTransformChange = (event2) => {
216816
217073
  setFeatureValueTransform(event2.target.value === "" ? null : event2.target.value);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { k, C, D, F, H, n, h, r, P, s, q, V, p, i, f, d, l, m, j, v, z } from "./index-440cb4b9.js";
1
+ import { k, C, D, F, H, n, h, r, P, s, q, V, p, i, f, d, l, m, j, v, z } from "./index-d58f9b90.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-440cb4b9.js";
1
+ import { B as BaseDecoder } from "./index-d58f9b90.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const dctZigZag = new Int32Array([
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-440cb4b9.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-d58f9b90.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  var LercDecode = { exports: {} };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-440cb4b9.js";
1
+ import { B as BaseDecoder } from "./index-d58f9b90.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const MIN_BITS = 9;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-440cb4b9.js";
1
+ import { B as BaseDecoder } from "./index-d58f9b90.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  class PackbitsDecoder extends BaseDecoder {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-440cb4b9.js";
1
+ import { B as BaseDecoder } from "./index-d58f9b90.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  class RawDecoder extends BaseDecoder {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-440cb4b9.js";
1
+ import { B as BaseDecoder } from "./index-d58f9b90.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  class WebImageDecoder extends BaseDecoder {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/dev",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -16,10 +16,10 @@
16
16
  "dist-tsc"
17
17
  ],
18
18
  "dependencies": {
19
- "@vitessce/all": "3.2.0",
20
- "@vitessce/config": "3.2.0",
21
- "@vitessce/constants": "3.2.0",
22
- "@vitessce/export-utils": "3.2.0"
19
+ "@vitessce/all": "3.2.2",
20
+ "@vitessce/config": "3.2.2",
21
+ "@vitessce/constants": "3.2.2",
22
+ "@vitessce/export-utils": "3.2.2"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@vitejs/plugin-react": "^4.0.0",