@vitessce/layer-controller 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-64da21ec.js";
2
+ import { B as BaseDecoder } from "./index-a79502da.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useId, useRef, forwardRef } from "react";
2
+ import React__default, { Children, isValidElement, cloneElement, useState, useEffect, useCallback, useContext, useRef, forwardRef } from "react";
3
3
  import { PopperMenu, TitleInfo, useLoaders, useCoordination, useAuxiliaryCoordination, useComponentLayout, useClosestVitessceContainerSize, useWindowDimensions, useObsLocationsData, useObsSegmentationsData, useImageData, useReady } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default from "react-dom";
@@ -135596,16 +135596,16 @@ function addDecoder(cases, importFn) {
135596
135596
  }
135597
135597
  cases.forEach((c) => registry$1.set(c, importFn));
135598
135598
  }
135599
- addDecoder([void 0, 1], () => import("./raw-0ae87697.js").then((m) => m.default));
135600
- addDecoder(5, () => import("./lzw-f5a9e721.js").then((m) => m.default));
135599
+ addDecoder([void 0, 1], () => import("./raw-af4639cb.js").then((m) => m.default));
135600
+ addDecoder(5, () => import("./lzw-b6a080bc.js").then((m) => m.default));
135601
135601
  addDecoder(6, () => {
135602
135602
  throw new Error("old style JPEG compression is not supported.");
135603
135603
  });
135604
- addDecoder(7, () => import("./jpeg-29889288.js").then((m) => m.default));
135605
- addDecoder([8, 32946], () => import("./deflate-4152c8e9.js").then((m) => m.default));
135606
- addDecoder(32773, () => import("./packbits-5fc9c646.js").then((m) => m.default));
135607
- addDecoder(34887, () => import("./lerc-899a010f.js").then((m) => m.default));
135608
- addDecoder(50001, () => import("./webimage-1731afb4.js").then((m) => m.default));
135604
+ addDecoder(7, () => import("./jpeg-f13e87d5.js").then((m) => m.default));
135605
+ addDecoder([8, 32946], () => import("./deflate-822f733b.js").then((m) => m.default));
135606
+ addDecoder(32773, () => import("./packbits-fbb728f4.js").then((m) => m.default));
135607
+ addDecoder(34887, () => import("./lerc-e0b9e6f7.js").then((m) => m.default));
135608
+ addDecoder(50001, () => import("./webimage-cf240654.js").then((m) => m.default));
135609
135609
  function decodeRowAcc(row, stride) {
135610
135610
  let length2 = row.length - stride;
135611
135611
  let offset4 = 0;
@@ -144613,6 +144613,67 @@ function makeBoundingBox(viewState) {
144613
144613
  viewport.unproject([0, viewport.height])
144614
144614
  ];
144615
144615
  }
144616
+ const TARGETS = [1, 2, 3, 4, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1e3];
144617
+ const MIN_TARGET = TARGETS[0];
144618
+ const MAX_TARGET = TARGETS[TARGETS.length - 1];
144619
+ const SI_PREFIXES = [
144620
+ { symbol: "Y", exponent: 24 },
144621
+ { symbol: "Z", exponent: 21 },
144622
+ { symbol: "E", exponent: 18 },
144623
+ { symbol: "P", exponent: 15 },
144624
+ { symbol: "T", exponent: 12 },
144625
+ { symbol: "G", exponent: 9 },
144626
+ { symbol: "M", exponent: 6 },
144627
+ { symbol: "k", exponent: 3 },
144628
+ { symbol: "h", exponent: 2 },
144629
+ { symbol: "da", exponent: 1 },
144630
+ { symbol: "", exponent: 0 },
144631
+ { symbol: "d", exponent: -1 },
144632
+ { symbol: "c", exponent: -2 },
144633
+ { symbol: "m", exponent: -3 },
144634
+ { symbol: "µ", exponent: -6 },
144635
+ { symbol: "n", exponent: -9 },
144636
+ { symbol: "p", exponent: -12 },
144637
+ { symbol: "f", exponent: -15 },
144638
+ { symbol: "a", exponent: -18 },
144639
+ { symbol: "z", exponent: -21 },
144640
+ { symbol: "y", exponent: -24 }
144641
+ ];
144642
+ function sizeToMeters(size, unit) {
144643
+ if (!unit || unit === "m") {
144644
+ return size;
144645
+ }
144646
+ if (unit.length > 1) {
144647
+ let unitPrefix = unit.substring(0, unit.length - 1);
144648
+ if (unitPrefix === "u") {
144649
+ unitPrefix = "µ";
144650
+ }
144651
+ const unitObj = SI_PREFIXES.find((p) => p.symbol === unitPrefix);
144652
+ if (unitObj) {
144653
+ return size * 10 ** unitObj.exponent;
144654
+ }
144655
+ }
144656
+ throw new Error("Received unknown unit");
144657
+ }
144658
+ function snapValue(value) {
144659
+ let magnitude = 0;
144660
+ if (value < MIN_TARGET || value > MAX_TARGET) {
144661
+ magnitude = Math.floor(Math.log10(value));
144662
+ }
144663
+ let snappedUnit = SI_PREFIXES.find(
144664
+ (p) => p.exponent % 3 === 0 && p.exponent <= magnitude
144665
+ );
144666
+ let adjustedValue = value / 10 ** snappedUnit.exponent;
144667
+ if (adjustedValue > 500 && adjustedValue <= 1e3) {
144668
+ snappedUnit = SI_PREFIXES.find(
144669
+ (p) => p.exponent % 3 === 0 && p.exponent <= magnitude + 3
144670
+ );
144671
+ adjustedValue = value / 10 ** snappedUnit.exponent;
144672
+ }
144673
+ const targetNewUnits = TARGETS.find((t2) => t2 > adjustedValue);
144674
+ const targetOrigUnits = targetNewUnits * 10 ** snappedUnit.exponent;
144675
+ return [targetOrigUnits, targetNewUnits, snappedUnit.symbol];
144676
+ }
144616
144677
  const fs$1$1 = `#define SHADER_NAME xr-layer-fragment-shader
144617
144678
 
144618
144679
  precision highp float;
@@ -145380,26 +145441,27 @@ const OverviewLayer = class extends CompositeLayer {
145380
145441
  OverviewLayer.layerName = "OverviewLayer";
145381
145442
  OverviewLayer.defaultProps = defaultProps$3;
145382
145443
  function getPosition(boundingBox, position, length2) {
145383
- const viewLength = boundingBox[2][0] - boundingBox[0][0];
145444
+ const viewWidth = boundingBox[2][0] - boundingBox[0][0];
145445
+ const viewHeight = boundingBox[2][1] - boundingBox[0][1];
145384
145446
  switch (position) {
145385
145447
  case "bottom-right": {
145386
- const yCoord = boundingBox[2][1] - (boundingBox[2][1] - boundingBox[0][1]) * length2;
145387
- const xLeftCoord = boundingBox[2][0] - viewLength * length2;
145448
+ const yCoord = boundingBox[2][1] - viewHeight * length2;
145449
+ const xLeftCoord = boundingBox[2][0] - viewWidth * length2;
145388
145450
  return [yCoord, xLeftCoord];
145389
145451
  }
145390
145452
  case "top-right": {
145391
- const yCoord = (boundingBox[2][1] - boundingBox[0][1]) * length2;
145392
- const xLeftCoord = boundingBox[2][0] - viewLength * length2;
145453
+ const yCoord = boundingBox[0][1] + viewHeight * length2;
145454
+ const xLeftCoord = boundingBox[2][0] - viewWidth * length2;
145393
145455
  return [yCoord, xLeftCoord];
145394
145456
  }
145395
145457
  case "top-left": {
145396
- const yCoord = (boundingBox[2][1] - boundingBox[0][1]) * length2;
145397
- const xLeftCoord = viewLength * length2;
145458
+ const yCoord = boundingBox[0][1] + viewHeight * length2;
145459
+ const xLeftCoord = boundingBox[0][0] + viewWidth * length2;
145398
145460
  return [yCoord, xLeftCoord];
145399
145461
  }
145400
145462
  case "bottom-left": {
145401
- const yCoord = boundingBox[2][1] - (boundingBox[2][1] - boundingBox[0][1]) * length2;
145402
- const xLeftCoord = viewLength * length2;
145463
+ const yCoord = boundingBox[2][1] - viewHeight * length2;
145464
+ const xLeftCoord = boundingBox[0][0] + viewWidth * length2;
145403
145465
  return [yCoord, xLeftCoord];
145404
145466
  }
145405
145467
  default: {
@@ -145417,11 +145479,12 @@ const defaultProps$2 = {
145417
145479
  unit: { type: "string", value: "", compare: true },
145418
145480
  size: { type: "number", value: 1, compare: true },
145419
145481
  position: { type: "string", value: "bottom-right", compare: true },
145420
- length: { type: "number", value: 0.085, compare: true }
145482
+ length: { type: "number", value: 0.085, compare: true },
145483
+ snap: { type: "boolean", value: false, compare: true }
145421
145484
  };
145422
145485
  const ScaleBarLayer = class extends CompositeLayer {
145423
145486
  renderLayers() {
145424
- const { id, unit, size, position, viewState, length: length2 } = this.props;
145487
+ const { id, unit, size, position, viewState, length: length2, snap } = this.props;
145425
145488
  const boundingBox = makeBoundingBox(viewState);
145426
145489
  const { zoom } = viewState;
145427
145490
  const viewLength = boundingBox[2][0] - boundingBox[0][0];
@@ -145430,15 +145493,27 @@ const ScaleBarLayer = class extends CompositeLayer {
145430
145493
  2 ** (-zoom + 1.5),
145431
145494
  (boundingBox[2][1] - boundingBox[0][1]) * 7e-3
145432
145495
  );
145433
- const numUnits = barLength * size;
145496
+ let adjustedBarLength = barLength;
145497
+ let displayNumber = (barLength * size).toPrecision(5);
145498
+ let displayUnit = unit;
145499
+ if (snap) {
145500
+ const meterSize = sizeToMeters(size, unit);
145501
+ const numUnits = barLength * meterSize;
145502
+ const [snappedOrigUnits, snappedNewUnits, snappedUnitPrefix] = snapValue(numUnits);
145503
+ adjustedBarLength = snappedOrigUnits / meterSize;
145504
+ displayNumber = snappedNewUnits;
145505
+ displayUnit = `${snappedUnitPrefix}m`;
145506
+ }
145434
145507
  const [yCoord, xLeftCoord] = getPosition(boundingBox, position, length2);
145508
+ const xRightCoord = xLeftCoord + barLength;
145509
+ const isLeft = position.endsWith("-left");
145435
145510
  const lengthBar = new LineLayer({
145436
145511
  id: `scale-bar-length-${id}`,
145437
145512
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
145438
145513
  data: [
145439
145514
  [
145440
- [xLeftCoord, yCoord],
145441
- [xLeftCoord + barLength, yCoord]
145515
+ [isLeft ? xLeftCoord : xRightCoord - adjustedBarLength, yCoord],
145516
+ [isLeft ? xLeftCoord + adjustedBarLength : xRightCoord, yCoord]
145442
145517
  ]
145443
145518
  ],
145444
145519
  getSourcePosition: (d) => d[0],
@@ -145451,8 +145526,14 @@ const ScaleBarLayer = class extends CompositeLayer {
145451
145526
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
145452
145527
  data: [
145453
145528
  [
145454
- [xLeftCoord, yCoord - barHeight],
145455
- [xLeftCoord, yCoord + barHeight]
145529
+ [
145530
+ isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
145531
+ yCoord - barHeight
145532
+ ],
145533
+ [
145534
+ isLeft ? xLeftCoord : xRightCoord - adjustedBarLength,
145535
+ yCoord + barHeight
145536
+ ]
145456
145537
  ]
145457
145538
  ],
145458
145539
  getSourcePosition: (d) => d[0],
@@ -145465,8 +145546,14 @@ const ScaleBarLayer = class extends CompositeLayer {
145465
145546
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
145466
145547
  data: [
145467
145548
  [
145468
- [xLeftCoord + barLength, yCoord - barHeight],
145469
- [xLeftCoord + barLength, yCoord + barHeight]
145549
+ [
145550
+ isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
145551
+ yCoord - barHeight
145552
+ ],
145553
+ [
145554
+ isLeft ? xLeftCoord + adjustedBarLength : xRightCoord,
145555
+ yCoord + barHeight
145556
+ ]
145470
145557
  ]
145471
145558
  ],
145472
145559
  getSourcePosition: (d) => d[0],
@@ -145479,8 +145566,11 @@ const ScaleBarLayer = class extends CompositeLayer {
145479
145566
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
145480
145567
  data: [
145481
145568
  {
145482
- text: numUnits.toPrecision(5) + unit,
145483
- position: [xLeftCoord + barLength * 0.5, yCoord + barHeight * 4]
145569
+ text: `${displayNumber}${displayUnit}`,
145570
+ position: [
145571
+ isLeft ? xLeftCoord + barLength * 0.5 : xRightCoord - barLength * 0.5,
145572
+ yCoord + barHeight * 4
145573
+ ]
145484
145574
  }
145485
145575
  ],
145486
145576
  getColor: [220, 220, 220, 255],
@@ -145489,7 +145579,7 @@ const ScaleBarLayer = class extends CompositeLayer {
145489
145579
  sizeUnits: "meters",
145490
145580
  sizeScale: 2 ** -zoom,
145491
145581
  characterSet: [
145492
- ...unit.split(""),
145582
+ ...displayUnit.split(""),
145493
145583
  ...range(10).map((i2) => String(i2)),
145494
145584
  ".",
145495
145585
  "e",
@@ -147770,6 +147860,132 @@ function VectorLayerController(props2) {
147770
147860
  ] })
147771
147861
  ] }) });
147772
147862
  }
147863
+ const $b5e257d569688ac6$var$defaultContext = {
147864
+ prefix: String(Math.round(Math.random() * 1e10)),
147865
+ current: 0
147866
+ };
147867
+ const $b5e257d569688ac6$var$SSRContext = /* @__PURE__ */ React__default.createContext($b5e257d569688ac6$var$defaultContext);
147868
+ const $b5e257d569688ac6$var$IsSSRContext = /* @__PURE__ */ React__default.createContext(false);
147869
+ let $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
147870
+ let $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap();
147871
+ function $b5e257d569688ac6$var$useCounter(isDisabled = false) {
147872
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
147873
+ let ref = useRef(null);
147874
+ if (ref.current === null && !isDisabled) {
147875
+ var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
147876
+ 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;
147877
+ if (currentOwner) {
147878
+ let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);
147879
+ if (prevComponentValue == null)
147880
+ $b5e257d569688ac6$var$componentIds.set(currentOwner, {
147881
+ id: ctx.current,
147882
+ state: currentOwner.memoizedState
147883
+ });
147884
+ else if (currentOwner.memoizedState !== prevComponentValue.state) {
147885
+ ctx.current = prevComponentValue.id;
147886
+ $b5e257d569688ac6$var$componentIds.delete(currentOwner);
147887
+ }
147888
+ }
147889
+ ref.current = ++ctx.current;
147890
+ }
147891
+ return ref.current;
147892
+ }
147893
+ function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
147894
+ let ctx = useContext($b5e257d569688ac6$var$SSRContext);
147895
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
147896
+ console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
147897
+ let counter2 = $b5e257d569688ac6$var$useCounter(!!defaultId);
147898
+ let prefix2 = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
147899
+ return defaultId || `${prefix2}-${counter2}`;
147900
+ }
147901
+ function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {
147902
+ let id = React__default.useId();
147903
+ let [didSSR] = useState($b5e257d569688ac6$export$535bd6ca7f90a273());
147904
+ let prefix2 = didSSR || false ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;
147905
+ return defaultId || `${prefix2}-${id}`;
147906
+ }
147907
+ const $b5e257d569688ac6$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;
147908
+ function $b5e257d569688ac6$var$getSnapshot() {
147909
+ return false;
147910
+ }
147911
+ function $b5e257d569688ac6$var$getServerSnapshot() {
147912
+ return true;
147913
+ }
147914
+ function $b5e257d569688ac6$var$subscribe(onStoreChange) {
147915
+ return () => {
147916
+ };
147917
+ }
147918
+ function $b5e257d569688ac6$export$535bd6ca7f90a273() {
147919
+ if (typeof React__default["useSyncExternalStore"] === "function")
147920
+ return React__default["useSyncExternalStore"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);
147921
+ return useContext($b5e257d569688ac6$var$IsSSRContext);
147922
+ }
147923
+ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
147924
+ };
147925
+ let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
147926
+ function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
147927
+ let [value, setValue] = useState(defaultId);
147928
+ let nextId = useRef(null);
147929
+ let res = $b5e257d569688ac6$export$619500959fc48b26(value);
147930
+ let updateValue = useCallback((val) => {
147931
+ nextId.current = val;
147932
+ }, []);
147933
+ $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
147934
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
147935
+ let r2 = res;
147936
+ return () => {
147937
+ $bdb11010cef70236$var$idsUpdaterMap.delete(r2);
147938
+ };
147939
+ }, [
147940
+ res
147941
+ ]);
147942
+ useEffect(() => {
147943
+ let newId = nextId.current;
147944
+ if (newId) {
147945
+ nextId.current = null;
147946
+ setValue(newId);
147947
+ }
147948
+ });
147949
+ return res;
147950
+ }
147951
+ let $bbed8b41f857bcc0$var$transitionsByElement = /* @__PURE__ */ new Map();
147952
+ let $bbed8b41f857bcc0$var$transitionCallbacks = /* @__PURE__ */ new Set();
147953
+ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
147954
+ if (typeof window === "undefined")
147955
+ return;
147956
+ let onTransitionStart = (e2) => {
147957
+ let transitions2 = $bbed8b41f857bcc0$var$transitionsByElement.get(e2.target);
147958
+ if (!transitions2) {
147959
+ transitions2 = /* @__PURE__ */ new Set();
147960
+ $bbed8b41f857bcc0$var$transitionsByElement.set(e2.target, transitions2);
147961
+ e2.target.addEventListener("transitioncancel", onTransitionEnd);
147962
+ }
147963
+ transitions2.add(e2.propertyName);
147964
+ };
147965
+ let onTransitionEnd = (e2) => {
147966
+ let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e2.target);
147967
+ if (!properties)
147968
+ return;
147969
+ properties.delete(e2.propertyName);
147970
+ if (properties.size === 0) {
147971
+ e2.target.removeEventListener("transitioncancel", onTransitionEnd);
147972
+ $bbed8b41f857bcc0$var$transitionsByElement.delete(e2.target);
147973
+ }
147974
+ if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
147975
+ for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)
147976
+ cb();
147977
+ $bbed8b41f857bcc0$var$transitionCallbacks.clear();
147978
+ }
147979
+ };
147980
+ document.body.addEventListener("transitionrun", onTransitionStart);
147981
+ document.body.addEventListener("transitionend", onTransitionEnd);
147982
+ }
147983
+ if (typeof document !== "undefined") {
147984
+ if (document.readyState !== "loading")
147985
+ $bbed8b41f857bcc0$var$setupGlobalEvents();
147986
+ else
147987
+ document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
147988
+ }
147773
147989
  const DOMAIN_OPTIONS = ["Full", "Min/Max"];
147774
147990
  function VolumeDropdown({
147775
147991
  loader: loaderWithMeta,
@@ -148047,11 +148263,11 @@ function LayerOptions({
148047
148263
  const hasViewableResolutions = Boolean(Array.from({
148048
148264
  length: loader.data.length
148049
148265
  }).filter((_, res) => canLoadResolution(loader.data, res)).length);
148050
- const globalSelectionSliderId = useId();
148051
- const colormapSelectId = useId();
148052
- const domainSelectorId = useId();
148053
- const opacitySliderId = useId();
148054
- const zeroTransparentId = useId();
148266
+ const globalSelectionSliderId = $bdb11010cef70236$export$f680877a34711e37();
148267
+ const colormapSelectId = $bdb11010cef70236$export$f680877a34711e37();
148268
+ const domainSelectorId = $bdb11010cef70236$export$f680877a34711e37();
148269
+ const opacitySliderId = $bdb11010cef70236$export$f680877a34711e37();
148270
+ const zeroTransparentId = $bdb11010cef70236$export$f680877a34711e37();
148055
148271
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", style: { width: "100%" }, children: [
148056
148272
  hasZStack && !disable3d && hasViewableResolutions && /* @__PURE__ */ jsxRuntimeExports.jsx(
148057
148273
  VolumeDropdown,
@@ -148421,7 +148637,7 @@ function LayerController(props2) {
148421
148637
  channelRef.current = channels2;
148422
148638
  return void 0;
148423
148639
  }, [channels2]);
148424
- const layerControlsId = useId();
148640
+ const layerControlsId = $bdb11010cef70236$export$f680877a34711e37();
148425
148641
  const firstSelection = ((_a2 = channels2[0]) == null ? void 0 : _a2.selection) || {};
148426
148642
  const { data, channels: channelOptions } = loader;
148427
148643
  const [tab, setTab] = useState(0);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a, L, V, d, c, e, f, b, h, u } from "./index-64da21ec.js";
1
+ import { a, L, V, d, c, e, f, b, h, u } from "./index-a79502da.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-64da21ec.js";
1
+ import { B as BaseDecoder } from "./index-a79502da.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-64da21ec.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-a79502da.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-64da21ec.js";
1
+ import { B as BaseDecoder } from "./index-a79502da.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-64da21ec.js";
1
+ import { B as BaseDecoder } from "./index-a79502da.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-64da21ec.js";
1
+ import { B as BaseDecoder } from "./index-a79502da.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-64da21ec.js";
1
+ import { B as BaseDecoder } from "./index-a79502da.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- {"version":3,"file":"LayerController.d.ts","sourceRoot":"","sources":["../src/LayerController.js"],"names":[],"mappings":"AA4EA;;;;;;;GAOG;AACH,iEAuhBC"}
1
+ {"version":3,"file":"LayerController.d.ts","sourceRoot":"","sources":["../src/LayerController.js"],"names":[],"mappings":"AA6EA;;;;;;;GAOG;AACH,iEAuhBC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useState, useRef, useEffect, useId } from 'react';
2
+ import React, { useState, useRef, useEffect } from 'react';
3
+ import { useId } from 'react-aria';
3
4
  import { viv } from '@vitessce/gl';
4
5
  import { GLOBAL_LABELS, getSourceFromLoader, isRgb, getMultiSelectionStats, DOMAINS, canLoadResolution, } from '@vitessce/spatial-utils';
5
6
  import { Grid, Button, Slider, Tabs, Tab, InputLabel, Accordion, AccordionDetails, AccordionSummary, } from '@material-ui/core';
@@ -1 +1 @@
1
- {"version":3,"file":"LayerOptions.d.ts","sourceRoot":"","sources":["../src/LayerOptions.js"],"names":[],"mappings":";AA8UA;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAyIC"}
1
+ {"version":3,"file":"LayerOptions.d.ts","sourceRoot":"","sources":["../src/LayerOptions.js"],"names":[],"mappings":";AA+UA;;;;;;;;;;;;;GAaG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAyIC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import React, { useId } from 'react';
2
+ import React from 'react';
3
+ import { useId } from 'react-aria';
3
4
  import { range } from 'lodash-es';
4
5
  import { Matrix4 } from 'math.gl';
5
6
  import { Grid, Slider, InputLabel, Select, Checkbox } from '@material-ui/core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/layer-controller",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,11 +20,12 @@
20
20
  "@material-ui/icons": "~4.11.2",
21
21
  "lodash-es": "^4.17.21",
22
22
  "math.gl": "^3.5.6",
23
- "@vitessce/constants-internal": "3.2.0",
24
- "@vitessce/gl": "3.2.0",
25
- "@vitessce/spatial-utils": "3.2.0",
26
- "@vitessce/utils": "3.2.0",
27
- "@vitessce/vit-s": "3.2.0"
23
+ "react-aria": "^3.28.0",
24
+ "@vitessce/gl": "3.2.2",
25
+ "@vitessce/constants-internal": "3.2.2",
26
+ "@vitessce/spatial-utils": "3.2.2",
27
+ "@vitessce/utils": "3.2.2",
28
+ "@vitessce/vit-s": "3.2.2"
28
29
  },
29
30
  "devDependencies": {
30
31
  "react": "^18.0.0",
@@ -1,4 +1,5 @@
1
- import React, { useState, useRef, useEffect, useId } from 'react';
1
+ import React, { useState, useRef, useEffect } from 'react';
2
+ import { useId } from 'react-aria';
2
3
  import { viv } from '@vitessce/gl';
3
4
  import {
4
5
  GLOBAL_LABELS,
@@ -1,4 +1,5 @@
1
- import React, { useId } from 'react';
1
+ import React from 'react';
2
+ import { useId } from 'react-aria';
2
3
  import { range } from 'lodash-es';
3
4
  import { Matrix4 } from 'math.gl';
4
5
  import { Grid, Slider, InputLabel, Select, Checkbox } from '@material-ui/core';