@vitessce/all 3.8.5 → 3.8.6

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,4 +1,4 @@
1
- import { aF as getDefaultExportFromCjs, aG as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aH as PCFSoftShadowMap, aI as VSMShadowMap, aJ as PCFShadowMap, aK as BasicShadowMap, aL as NoToneMapping, aM as ACESFilmicToneMapping, e as Vector3, V as Vector2, aN as Clock, aO as WebGLRenderer, aP as Camera, x as BufferGeometry, r as Material, aQ as Layers, a1 as Texture, aC as RGBAFormat, ay as UnsignedByteType, C as Color, aj as _extends, aR as THREE, aS as EventDispatcher, aT as MOUSE, aU as TOUCH, aV as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-diSsBj8e.js";
1
+ import { aF as getDefaultExportFromCjs, aG as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aH as PCFSoftShadowMap, aI as VSMShadowMap, aJ as PCFShadowMap, aK as BasicShadowMap, aL as NoToneMapping, aM as ACESFilmicToneMapping, e as Vector3, V as Vector2, aN as Clock, aO as WebGLRenderer, aP as Camera, x as BufferGeometry, r as Material, aQ as Layers, a1 as Texture, aC as RGBAFormat, ay as UnsignedByteType, C as Color, aj as _extends, aR as THREE, aS as EventDispatcher, aT as MOUSE, aU as TOUCH, aV as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-Z-pD1WnL.js";
2
2
  import * as React from "react";
3
3
  import React__default, { useReducer, useRef, useEffect, useLayoutEffect, useDebugValue, useState, useMemo } from "react";
4
4
  var constants = { exports: {} };
@@ -1,4 +1,4 @@
1
- import { aF as getDefaultExportFromCjs, b0 as requireAssign, b1 as require_export, b2 as require_core, b3 as require_fails, b4 as require_toObject, b5 as require_objectKeys, b6 as require_cof, b7 as require_wks, b8 as require_iterators, b9 as requireWeb_dom_iterable, ba as requireEs6_string_iterator, bb as require_anObject, bc as require_hide, bd as require_ctx, be as require_toLength, bf as require_global, bg as require_objectDp, bh as require_descriptors, bi as require_isObject, bj as require_objectCreate, bk as require_iterDefine, bl as require_iterStep, bm as require_meta, bn as require_isArray, bo as require_iobject, bp as require_setToStringTag, bq as require_aFunction, br as requireIterator, bs as require_propertyDesc, aZ as commonjsGlobal, bt as requireEs6_symbol, bu as requireDefineProperty, bv as require_toIobject, bw as require_objectGopd, bx as require_html, by as require_domCreate, bz as require_library, bA as requireSymbol, bB as require_objectPie, bC as require_has, bD as require_redefine, bE as require_objectAssign, bF as diffCameraState, ao as jsxRuntimeExports } from "./index-diSsBj8e.js";
1
+ import { aF as getDefaultExportFromCjs, b0 as requireAssign, b1 as require_export, b2 as require_core, b3 as require_fails, b4 as require_toObject, b5 as require_objectKeys, b6 as require_cof, b7 as require_wks, b8 as require_iterators, b9 as requireWeb_dom_iterable, ba as requireEs6_string_iterator, bb as require_anObject, bc as require_hide, bd as require_ctx, be as require_toLength, bf as require_global, bg as require_objectDp, bh as require_descriptors, bi as require_isObject, bj as require_objectCreate, bk as require_iterDefine, bl as require_iterStep, bm as require_meta, bn as require_isArray, bo as require_iobject, bp as require_setToStringTag, bq as require_aFunction, br as requireIterator, bs as require_propertyDesc, aZ as commonjsGlobal, bt as requireEs6_symbol, bu as requireDefineProperty, bv as require_toIobject, bw as require_objectGopd, bx as require_html, by as require_domCreate, bz as require_library, bA as requireSymbol, bB as require_objectPie, bC as require_has, bD as require_redefine, bE as require_objectAssign, bF as diffCameraState, ao as jsxRuntimeExports } from "./index-Z-pD1WnL.js";
2
2
  import React__default from "react";
3
3
  var assignExports = requireAssign();
4
4
  const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
2
+ import { aW as BaseDecoder } from "./index-Z-pD1WnL.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -1,7 +1,7 @@
1
1
  import * as React$7 from "react";
2
2
  import React__default, { isValidElement, PureComponent, Component, createElement, createContext, createRef } from "react";
3
3
  import ReactDOM__default, { findDOMNode as findDOMNode$1 } from "react-dom";
4
- import { aZ as commonjsGlobal$1, a_ as requireObjectAssign, aF as getDefaultExportFromCjs$1, a$ as earcut } from "./index-diSsBj8e.js";
4
+ import { aZ as commonjsGlobal$1, a_ as requireObjectAssign, aF as getDefaultExportFromCjs$1, a$ as earcut } from "./index-Z-pD1WnL.js";
5
5
  var promise = {};
6
6
  var hasRequiredPromise;
7
7
  function requirePromise() {
@@ -1,6 +1,6 @@
1
- import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, ao as jsxRuntimeExports, aE as GLSL3, am as BackSide } from "./index-diSsBj8e.js";
1
+ import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, ao as jsxRuntimeExports, aE as GLSL3, am as BackSide } from "./index-Z-pD1WnL.js";
2
2
  import { useRef, useState, useMemo, useEffect, useCallback } from "react";
3
- import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-CRmdQgxj.js";
3
+ import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-blC-_luf.js";
4
4
  const LogLevel = {
5
5
  INFO: "info",
6
6
  WARN: "warn",
@@ -220,6 +220,7 @@ function _requestBufferToRequestObjects(buffer, k) {
220
220
  class VolumeDataManager {
221
221
  constructor(glParam) {
222
222
  logWithColor$2("CLASS INITIALIZING");
223
+ log.debug("VolumeDataManager constructor", { glParam, glParamContext: glParam.getContext?.() });
223
224
  const gl = glParam.getContext?.() || glParam;
224
225
  const renderer = glParam;
225
226
  if (gl.domElement && gl.getContext) {
@@ -242,12 +243,20 @@ class VolumeDataManager {
242
243
  };
243
244
  return defaults[param] || 0;
244
245
  },
246
+ isContextLost: () => false,
245
247
  MAX_TEXTURE_SIZE: "MAX_TEXTURE_SIZE",
246
248
  MAX_3D_TEXTURE_SIZE: "MAX_3D_TEXTURE_SIZE",
247
249
  MAX_RENDERBUFFER_SIZE: "MAX_RENDERBUFFER_SIZE",
248
250
  MAX_UNIFORM_BUFFER_BINDINGS: "MAX_UNIFORM_BUFFER_BINDINGS"
249
251
  };
250
252
  }
253
+ this._originalGlParam = glParam;
254
+ this._isContextLost = false;
255
+ this._contextRestoredCallbacks = [];
256
+ if (this.gl && this.gl.canvas) {
257
+ this.gl.canvas.addEventListener("webglcontextlost", this._handleContextLost.bind(this));
258
+ this.gl.canvas.addEventListener("webglcontextrestored", this._handleContextRestored.bind(this));
259
+ }
251
260
  log.debug("GL CONSTANTS");
252
261
  log.debug(this.gl);
253
262
  log.debug(this.gl.TEXTURE0);
@@ -339,8 +348,78 @@ class VolumeDataManager {
339
348
  this.needsBailout = false;
340
349
  this.initStatus = INIT_STATUS.NOT_STARTED;
341
350
  this.initError = null;
351
+ this._lastChannelConfig = null;
342
352
  logWithColor$2("VolumeDataManager constructor complete");
343
353
  }
354
+ /**
355
+ * Handle WebGL context loss
356
+ */
357
+ _handleContextLost(event) {
358
+ logWithColor$2("CONTEXT LOST");
359
+ log.warn("WebGL context lost, preventing default and setting flag");
360
+ event.preventDefault();
361
+ this._isContextLost = true;
362
+ if (this.channels && this.channels.zarrMappings) {
363
+ this._lastChannelConfig = {
364
+ zarrMappings: [...this.channels.zarrMappings],
365
+ colorMappings: [...this.channels.colorMappings],
366
+ downsampleMin: [...this.channels.downsampleMin],
367
+ downsampleMax: [...this.channels.downsampleMax]
368
+ };
369
+ }
370
+ }
371
+ /**
372
+ * Handle WebGL context restoration
373
+ */
374
+ _handleContextRestored(event) {
375
+ logWithColor$2("CONTEXT RESTORED");
376
+ log.warn("WebGL context restored, reinitializing textures");
377
+ this._isContextLost = false;
378
+ if (this._originalGlParam && this._originalGlParam.getContext) {
379
+ this.gl = this._originalGlParam.getContext();
380
+ }
381
+ if (this._lastChannelConfig) {
382
+ this.channels.zarrMappings = [...this._lastChannelConfig.zarrMappings];
383
+ this.channels.colorMappings = [...this._lastChannelConfig.colorMappings];
384
+ this.channels.downsampleMin = [...this._lastChannelConfig.downsampleMin];
385
+ this.channels.downsampleMax = [...this._lastChannelConfig.downsampleMax];
386
+ log.debug("Restored channel configuration after context loss");
387
+ }
388
+ if (this.PT && this.zarrStore && this.zarrStore.brickLayout) {
389
+ try {
390
+ this.initMRMCPT();
391
+ log.debug("Successfully reinitialized MRMCPT after context restoration");
392
+ } catch (error) {
393
+ log.error("Failed to reinitialize MRMCPT after context restoration:", error);
394
+ }
395
+ }
396
+ this._contextRestoredCallbacks.forEach((callback) => {
397
+ try {
398
+ callback();
399
+ } catch (error) {
400
+ log.error("Error in context restored callback:", error);
401
+ }
402
+ });
403
+ }
404
+ /**
405
+ * Check if WebGL context is lost
406
+ */
407
+ isContextLost() {
408
+ if (this._isContextLost)
409
+ return true;
410
+ if (this.gl && typeof this.gl.isContextLost === "function") {
411
+ return this.gl.isContextLost();
412
+ }
413
+ return false;
414
+ }
415
+ /**
416
+ * Register a callback to be called when context is restored
417
+ */
418
+ onContextRestored(callback) {
419
+ if (typeof callback === "function") {
420
+ this._contextRestoredCallbacks.push(callback);
421
+ }
422
+ }
344
423
  initImages(images, imageLayerScopes) {
345
424
  logWithColor$2("INIT IMAGES");
346
425
  this.images = images;
@@ -629,6 +708,12 @@ class VolumeDataManager {
629
708
  log.debug("newColorMappings", newColorMappings);
630
709
  this.channels.colorMappings = newColorMappings;
631
710
  log.debug("updatedChannels", this.channels);
711
+ this._lastChannelConfig = {
712
+ zarrMappings: [...this.channels.zarrMappings],
713
+ colorMappings: [...this.channels.colorMappings],
714
+ downsampleMin: [...this.channels.downsampleMin],
715
+ downsampleMax: [...this.channels.downsampleMax]
716
+ };
632
717
  }
633
718
  /**
634
719
  * Try to load a resolution level
@@ -746,6 +831,10 @@ class VolumeDataManager {
746
831
  log.debug("processRequestData: already busy, skipping");
747
832
  return;
748
833
  }
834
+ if (this.isContextLost()) {
835
+ log.debug("processRequestData: WebGL context is lost, skipping");
836
+ return;
837
+ }
749
838
  this.isBusy = true;
750
839
  this.triggerRequest = false;
751
840
  const { requests, origRequestCount } = _requestBufferToRequestObjects(buffer, this.k);
@@ -763,6 +852,10 @@ class VolumeDataManager {
763
852
  this.needsBailout = true;
764
853
  return;
765
854
  }
855
+ if (this.isContextLost()) {
856
+ log.debug("processUsageData: WebGL context is lost, skipping");
857
+ return;
858
+ }
766
859
  this.isBusy = true;
767
860
  this.triggerUsage = false;
768
861
  const now = ++this.timeStamp;
@@ -804,6 +897,10 @@ class VolumeDataManager {
804
897
  log.error("pagetable texture not initialized");
805
898
  return;
806
899
  }
900
+ if (this.isContextLost()) {
901
+ log.warn("WebGL context is lost, skipping channel purge");
902
+ return;
903
+ }
807
904
  this.channels.downsampleMin[ptChannelIndex] = void 0;
808
905
  this.channels.downsampleMax[ptChannelIndex] = void 0;
809
906
  this.channels.zarrMappings[ptChannelIndex] = void 0;
@@ -833,6 +930,10 @@ class VolumeDataManager {
833
930
  _updatePTEntry(ptX, ptY, ptZ, ptVal) {
834
931
  if (!this.ptTHREE)
835
932
  return;
933
+ if (this.isContextLost()) {
934
+ log.warn("WebGL context is lost, skipping PT entry update");
935
+ return;
936
+ }
836
937
  const { gl } = this;
837
938
  const texPT = this.renderer.properties.get(this.ptTHREE).__webglTexture;
838
939
  gl.activeTexture(gl.TEXTURE0);
@@ -883,16 +984,51 @@ class VolumeDataManager {
883
984
  * 4. Upload one brick + PT entry *
884
985
  * ------------------------------------------------------------- */
885
986
  async _uploadBrick(ptCoord, bcSlot) {
987
+ log.debug("uploading brick", ptCoord, bcSlot);
988
+ if (this.isContextLost()) {
989
+ log.warn("WebGL context is lost, skipping brick upload");
990
+ return;
991
+ }
886
992
  if (ptCoord.x >= this.PT.xExtent || ptCoord.y >= this.PT.yExtent || ptCoord.z >= this.PT.zTotal || ptCoord.x < 0 || ptCoord.y < 0 || ptCoord.z < 0) {
887
993
  log.error("this.PT", this.PT);
888
994
  log.error("ptCoord out of bounds", ptCoord);
889
995
  return;
890
996
  }
891
997
  const { channel, resolution, x, y, z } = _ptToZarr(ptCoord.x, ptCoord.y, ptCoord.z, { PT_zExtent: this.PT.zExtent, PT_z0Extent: this.PT.z0Extent, PT_anchors: this.PT.anchors });
998
+ if (!this.channels || !this.channels.zarrMappings || this.channels.zarrMappings.length === 0) {
999
+ log.error("Channel mappings not initialized, skipping brick upload");
1000
+ return;
1001
+ }
1002
+ if (channel < 0 || channel >= this.channels.zarrMappings.length) {
1003
+ log.error("Channel index out of bounds", { channel, mappingsLength: this.channels.zarrMappings.length });
1004
+ return;
1005
+ }
892
1006
  const zarrChannel = this.channels.zarrMappings[channel];
893
1007
  if (zarrChannel === void 0 || zarrChannel === -1) {
894
- log.error("zarrChannel is undefined or -1", zarrChannel);
895
- return;
1008
+ log.warn("zarrChannel is undefined or -1", {
1009
+ zarrChannel,
1010
+ channel,
1011
+ ptCoord,
1012
+ channelMappings: this.channels.zarrMappings,
1013
+ contextLost: this.isContextLost()
1014
+ });
1015
+ if (this._lastChannelConfig && this._lastChannelConfig.zarrMappings[channel] !== void 0) {
1016
+ log.warn("Attempting to use last known channel config");
1017
+ this.channels.zarrMappings = [...this._lastChannelConfig.zarrMappings];
1018
+ this.channels.colorMappings = [...this._lastChannelConfig.colorMappings];
1019
+ this.channels.downsampleMin = [...this._lastChannelConfig.downsampleMin];
1020
+ this.channels.downsampleMax = [...this._lastChannelConfig.downsampleMax];
1021
+ const restoredZarrChannel = this.channels.zarrMappings[channel];
1022
+ if (restoredZarrChannel !== void 0 && restoredZarrChannel !== -1) {
1023
+ log.debug("Successfully restored channel mapping, continuing with upload");
1024
+ } else {
1025
+ log.error("Could not restore valid channel mapping, aborting brick upload");
1026
+ return;
1027
+ }
1028
+ } else {
1029
+ log.error("No fallback channel config available, aborting brick upload");
1030
+ return;
1031
+ }
896
1032
  }
897
1033
  log.debug("starting to load zarr chunk", { resolution, z, y, x, zarrChannel });
898
1034
  let chunk = await this.loadZarrChunk(0, zarrChannel, z, y, x, resolution);
@@ -962,6 +1098,7 @@ class VolumeDataManager {
962
1098
  if (ptRequests.length === 0)
963
1099
  return;
964
1100
  const slots = this._allocateBCSlots(ptRequests.length);
1101
+ log.debug("Handling brick requests:", { requestCount: ptRequests.length, slotCount: slots.length });
965
1102
  log.debug("handleBrickRequests: starting for loop");
966
1103
  for (let i = 0; i < ptRequests.length; ++i) {
967
1104
  log.debug("uploading brick", ptRequests[i], slots[i]);
@@ -3464,6 +3601,8 @@ function VolumeView(props) {
3464
3601
  useFrame((state, delta, xrFrame) => {
3465
3602
  if (!mrtRef.current || !dataManager || !renderManager)
3466
3603
  return;
3604
+ if (!renderState.shader)
3605
+ return;
3467
3606
  const { gl: frameGl, camera: frameCamera, scene: frameScene, clock } = state;
3468
3607
  if (!stillRef.current) {
3469
3608
  performGeometryPass(frameGl, frameCamera, frameScene, { mrtRef });
@@ -1,7 +1,7 @@
1
- import { G as Group, M as Matrix4, T as TrianglesDrawMode, a as TriangleFanDrawMode, b as TriangleStripDrawMode, R as REVISION, L as Loader, c as LoaderUtils, F as FileLoader, d as MeshPhysicalMaterial, V as Vector2, C as Color, S as SpotLight, P as PointLight, D as DirectionalLight, e as Vector3, I as InstancedMesh, Q as Quaternion, O as Object3D, f as TextureLoader, g as ImageBitmapLoader, B as BufferAttribute, h as InterleavedBuffer, i as LinearMipmapLinearFilter, N as NearestMipmapLinearFilter, j as LinearMipmapNearestFilter, k as NearestMipmapNearestFilter, l as LinearFilter, m as NearestFilter, n as RepeatWrapping, o as MirroredRepeatWrapping, p as ClampToEdgeWrapping, q as PointsMaterial, r as Material, s as LineBasicMaterial, t as MeshStandardMaterial, u as DoubleSide, v as MeshBasicMaterial, w as PropertyBinding, x as BufferGeometry, y as SkinnedMesh, z as Mesh, A as LineSegments, E as Line$1, H as LineLoop, J as Points, K as PerspectiveCamera, U as MathUtils, W as OrthographicCamera, X as Skeleton, Y as InterpolateDiscrete, Z as InterpolateLinear, _ as AnimationClip, $ as Bone, a0 as InterleavedBufferAttribute, a1 as Texture, a2 as VectorKeyframeTrack, a3 as QuaternionKeyframeTrack, a4 as NumberKeyframeTrack, a5 as FrontSide, a6 as Interpolant, a7 as Box3, a8 as Sphere, a9 as InstancedBufferGeometry, aa as Float32BufferAttribute, ab as InstancedInterleavedBuffer, ac as WireframeGeometry, ad as ShaderMaterial, ae as UniformsUtils, af as UniformsLib, ag as Vector4, ah as Line3, ai as SphereGeometry, aj as _extends, ak as Plane, al as Triangle, am as BackSide, an as Ray$1, ao as jsxRuntimeExports, ap as Matrix3, aq as CoordinationType, ar as Data3DTexture, as as RedFormat, at as FloatType, au as getImageSize, av as Scene } from "./index-diSsBj8e.js";
1
+ import { G as Group, M as Matrix4, T as TrianglesDrawMode, a as TriangleFanDrawMode, b as TriangleStripDrawMode, R as REVISION, L as Loader, c as LoaderUtils, F as FileLoader, d as MeshPhysicalMaterial, V as Vector2, C as Color, S as SpotLight, P as PointLight, D as DirectionalLight, e as Vector3, I as InstancedMesh, Q as Quaternion, O as Object3D, f as TextureLoader, g as ImageBitmapLoader, B as BufferAttribute, h as InterleavedBuffer, i as LinearMipmapLinearFilter, N as NearestMipmapLinearFilter, j as LinearMipmapNearestFilter, k as NearestMipmapNearestFilter, l as LinearFilter, m as NearestFilter, n as RepeatWrapping, o as MirroredRepeatWrapping, p as ClampToEdgeWrapping, q as PointsMaterial, r as Material, s as LineBasicMaterial, t as MeshStandardMaterial, u as DoubleSide, v as MeshBasicMaterial, w as PropertyBinding, x as BufferGeometry, y as SkinnedMesh, z as Mesh, A as LineSegments, E as Line$1, H as LineLoop, J as Points, K as PerspectiveCamera, U as MathUtils, W as OrthographicCamera, X as Skeleton, Y as InterpolateDiscrete, Z as InterpolateLinear, _ as AnimationClip, $ as Bone, a0 as InterleavedBufferAttribute, a1 as Texture, a2 as VectorKeyframeTrack, a3 as QuaternionKeyframeTrack, a4 as NumberKeyframeTrack, a5 as FrontSide, a6 as Interpolant, a7 as Box3, a8 as Sphere, a9 as InstancedBufferGeometry, aa as Float32BufferAttribute, ab as InstancedInterleavedBuffer, ac as WireframeGeometry, ad as ShaderMaterial, ae as UniformsUtils, af as UniformsLib, ag as Vector4, ah as Line3, ai as SphereGeometry, aj as _extends, ak as Plane, al as Triangle, am as BackSide, an as Ray$1, ao as jsxRuntimeExports, ap as Matrix3, aq as CoordinationType, ar as Data3DTexture, as as RedFormat, at as FloatType, au as getImageSize, av as Scene } from "./index-Z-pD1WnL.js";
2
2
  import * as React from "react";
3
3
  import { useRef, useEffect, useState, forwardRef } from "react";
4
- import { u as useThree, a as useFrame, c as create, e as extend, b as createPortal, O as OrbitControls, C as Canvas } from "./OrbitControls-CRmdQgxj.js";
4
+ import { u as useThree, a as useFrame, c as create, e as extend, b as createPortal, O as OrbitControls, C as Canvas } from "./OrbitControls-blC-_luf.js";
5
5
  const isPromise = (promise) => typeof promise === "object" && typeof promise.then === "function";
6
6
  const globalCache = [];
7
7
  function shallowEqualArrays(arrA, arrB, equal = (a, b) => a === b) {
@@ -5027,7 +5027,7 @@ const Text = /* @__PURE__ */ React.forwardRef(({
5027
5027
  const {
5028
5028
  Text: TextMeshImpl,
5029
5029
  preloadFont
5030
- } = suspend(async () => import("./troika-three-text.esm-C4ffdO6D.js"), []);
5030
+ } = suspend(async () => import("./troika-three-text.esm-BsP89YlX.js"), []);
5031
5031
  const invalidate = useThree(({
5032
5032
  invalidate: invalidate2
5033
5033
  }) => invalidate2);
@@ -209323,22 +209323,22 @@ async function getDecoder(fileDirectory) {
209323
209323
  const Decoder = await importFn();
209324
209324
  return new Decoder(fileDirectory);
209325
209325
  }
209326
- addDecoder([void 0, 1], () => import("./raw-DLW6Ob0W.js").then((m2) => m2.default));
209327
- addDecoder(5, () => import("./lzw-CVivhiK8.js").then((m2) => m2.default));
209326
+ addDecoder([void 0, 1], () => import("./raw-CRt4_45v.js").then((m2) => m2.default));
209327
+ addDecoder(5, () => import("./lzw-CE0HuE9L.js").then((m2) => m2.default));
209328
209328
  addDecoder(6, () => {
209329
209329
  throw new Error("old style JPEG compression is not supported.");
209330
209330
  });
209331
- addDecoder(7, () => import("./jpeg-CP3ptIzO.js").then((m2) => m2.default));
209332
- addDecoder([8, 32946], () => import("./deflate-CMHXRV2s.js").then((m2) => m2.default));
209333
- addDecoder(32773, () => import("./packbits-CSpmt53h.js").then((m2) => m2.default));
209331
+ addDecoder(7, () => import("./jpeg-DdeYvQ7M.js").then((m2) => m2.default));
209332
+ addDecoder([8, 32946], () => import("./deflate-CsetZFHb.js").then((m2) => m2.default));
209333
+ addDecoder(32773, () => import("./packbits-z6O-xEjB.js").then((m2) => m2.default));
209334
209334
  addDecoder(
209335
209335
  34887,
209336
- () => import("./lerc-DSNwBQly.js").then(async (m2) => {
209336
+ () => import("./lerc-D1O_lzXu.js").then(async (m2) => {
209337
209337
  await m2.zstd.init();
209338
209338
  return m2;
209339
209339
  }).then((m2) => m2.default)
209340
209340
  );
209341
- addDecoder(50001, () => import("./webimage-TKddjYdZ.js").then((m2) => m2.default));
209341
+ addDecoder(50001, () => import("./webimage-CLacHpNV.js").then((m2) => m2.default));
209342
209342
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
209343
209343
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
209344
209344
  }
@@ -247757,7 +247757,7 @@ function uri2href(url) {
247757
247757
  }
247758
247758
  throw Error(`Protocol not supported, got: ${JSON.stringify(protocol)}`);
247759
247759
  }
247760
- function fetch_range$1(url, offset2, length2, opts2 = {}) {
247760
+ function fetch_range(url, offset2, length2, opts2 = {}) {
247761
247761
  if (offset2 !== void 0 && length2 !== void 0) {
247762
247762
  opts2 = {
247763
247763
  ...opts2,
@@ -247769,7 +247769,7 @@ function fetch_range$1(url, offset2, length2, opts2 = {}) {
247769
247769
  }
247770
247770
  return fetch(url, opts2);
247771
247771
  }
247772
- function merge_init$1(storeOverrides, requestOverrides) {
247772
+ function merge_init(storeOverrides, requestOverrides) {
247773
247773
  return {
247774
247774
  ...storeOverrides,
247775
247775
  ...requestOverrides,
@@ -247783,7 +247783,7 @@ function assert$5(expression2, msg = "") {
247783
247783
  if (!expression2)
247784
247784
  throw new Error(msg);
247785
247785
  }
247786
- function resolve$2(root2, path2) {
247786
+ function resolve$1(root2, path2) {
247787
247787
  const base2 = typeof root2 === "string" ? new URL(root2) : root2;
247788
247788
  if (!base2.pathname.endsWith("/")) {
247789
247789
  base2.pathname += "/";
@@ -247792,7 +247792,7 @@ function resolve$2(root2, path2) {
247792
247792
  resolved.search = base2.search;
247793
247793
  return resolved;
247794
247794
  }
247795
- async function handle_response$1(response) {
247795
+ async function handle_response(response) {
247796
247796
  if (response.status === 404) {
247797
247797
  return void 0;
247798
247798
  }
@@ -247801,7 +247801,7 @@ async function handle_response$1(response) {
247801
247801
  }
247802
247802
  throw new Error(`Unexpected response status ${response.status} ${response.statusText}`);
247803
247803
  }
247804
- async function fetch_suffix$1(url, suffix_length, init2, use_suffix_request) {
247804
+ async function fetch_suffix(url, suffix_length, init2, use_suffix_request) {
247805
247805
  if (use_suffix_request) {
247806
247806
  return fetch(url, {
247807
247807
  ...init2,
@@ -247814,9 +247814,9 @@ async function fetch_suffix$1(url, suffix_length, init2, use_suffix_request) {
247814
247814
  }
247815
247815
  let content_length = response.headers.get("Content-Length");
247816
247816
  let length2 = Number(content_length);
247817
- return fetch_range$1(url, length2 - suffix_length, length2, init2);
247817
+ return fetch_range(url, length2 - suffix_length, length2, init2);
247818
247818
  }
247819
- let FetchStore$1 = class FetchStore {
247819
+ class FetchStore {
247820
247820
  #overrides;
247821
247821
  #use_suffix_request;
247822
247822
  constructor(url, options = {}) {
@@ -247825,25 +247825,25 @@ let FetchStore$1 = class FetchStore {
247825
247825
  this.#use_suffix_request = options.useSuffixRequest ?? false;
247826
247826
  }
247827
247827
  #merge_init(overrides) {
247828
- return merge_init$1(this.#overrides, overrides);
247828
+ return merge_init(this.#overrides, overrides);
247829
247829
  }
247830
247830
  async get(key2, options = {}) {
247831
- let href2 = resolve$2(this.url, key2).href;
247831
+ let href2 = resolve$1(this.url, key2).href;
247832
247832
  let response = await fetch(href2, this.#merge_init(options));
247833
- return handle_response$1(response);
247833
+ return handle_response(response);
247834
247834
  }
247835
247835
  async getRange(key2, range2, options = {}) {
247836
- let url = resolve$2(this.url, key2);
247836
+ let url = resolve$1(this.url, key2);
247837
247837
  let init2 = this.#merge_init(options);
247838
247838
  let response;
247839
247839
  if ("suffixLength" in range2) {
247840
- response = await fetch_suffix$1(url, range2.suffixLength, init2, this.#use_suffix_request);
247840
+ response = await fetch_suffix(url, range2.suffixLength, init2, this.#use_suffix_request);
247841
247841
  } else {
247842
- response = await fetch_range$1(url, range2.offset, range2.length, init2);
247842
+ response = await fetch_range(url, range2.offset, range2.length, init2);
247843
247843
  }
247844
- return handle_response$1(response);
247844
+ return handle_response(response);
247845
247845
  }
247846
- };
247846
+ }
247847
247847
  let BoolArray$1 = class BoolArray {
247848
247848
  #bytes;
247849
247849
  constructor(x2, byteOffset, length2) {
@@ -250135,7 +250135,7 @@ class HTTPRangeReader {
250135
250135
  if (size2 === 0) {
250136
250136
  return new Uint8Array(0);
250137
250137
  }
250138
- const req = await fetch_range$1(this.url, offset2, size2, this.#overrides);
250138
+ const req = await fetch_range(this.url, offset2, size2, this.#overrides);
250139
250139
  assert$5(req.ok, `failed http request ${this.url}, status: ${req.status} offset: ${offset2} size: ${size2}: ${req.statusText}`);
250140
250140
  return new Uint8Array(await req.arrayBuffer());
250141
250141
  }
@@ -250403,7 +250403,7 @@ class ReferenceStore {
250403
250403
  if (!url) {
250404
250404
  throw Error(`No url for key ${key2}, and no target url provided.`);
250405
250405
  }
250406
- let res = await fetch_range$1(uri2href(url), offset2, size2, merge_init$1(this.#overrides, opts2));
250406
+ let res = await fetch_range(uri2href(url), offset2, size2, merge_init(this.#overrides, opts2));
250407
250407
  if (res.status === 200 || res.status === 206) {
250408
250408
  return new Uint8Array(await res.arrayBuffer());
250409
250409
  }
@@ -250418,7 +250418,7 @@ class ReferenceStore {
250418
250418
  return ReferenceStore.fromSpec(spec, opts2);
250419
250419
  }
250420
250420
  }
250421
- class RelaxedFetchStore extends FetchStore$1 {
250421
+ class RelaxedFetchStore extends FetchStore {
250422
250422
  // This allows returning `undefined` for 403 responses,
250423
250423
  // as opposed to completely erroring.
250424
250424
  // Needed due to https://github.com/manzt/zarrita.js/pull/212
@@ -253036,12 +253036,12 @@ class ErrorBoundary extends React__default.Component {
253036
253036
  }
253037
253037
  }
253038
253038
  const LazySpatialThree = React__default.lazy(async () => {
253039
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-De5hOIAN.js");
253039
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-VG1RjUEu.js");
253040
253040
  return { default: SpatialWrapper2 };
253041
253041
  });
253042
253042
  const SpatialThreeAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialThree, { ...props }) }) }) }));
253043
253043
  const LazySpatialAccelerated = React__default.lazy(async () => {
253044
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-CoLUuXiI.js");
253044
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-CHxaVZhJ.js");
253045
253045
  return { default: SpatialWrapper2 };
253046
253046
  });
253047
253047
  const SpatialAcceleratedAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialAccelerated, { ...props }) }) }) }));
@@ -265938,89 +265938,6 @@ function set_from_chunk_binary(dest, src, bytes_per_element2, projections2) {
265938
265938
  }, bytes_per_element2, projs);
265939
265939
  }
265940
265940
  }
265941
- function fetch_range(url, offset2, length2, opts2 = {}) {
265942
- if (offset2 !== void 0 && length2 !== void 0) {
265943
- opts2 = {
265944
- ...opts2,
265945
- headers: {
265946
- ...opts2.headers,
265947
- Range: `bytes=${offset2}-${offset2 + length2 - 1}`
265948
- }
265949
- };
265950
- }
265951
- return fetch(url, opts2);
265952
- }
265953
- function merge_init(storeOverrides, requestOverrides) {
265954
- return {
265955
- ...storeOverrides,
265956
- ...requestOverrides,
265957
- headers: {
265958
- ...storeOverrides.headers,
265959
- ...requestOverrides.headers
265960
- }
265961
- };
265962
- }
265963
- function resolve$1(root2, path2) {
265964
- const base2 = typeof root2 === "string" ? new URL(root2) : root2;
265965
- if (!base2.pathname.endsWith("/")) {
265966
- base2.pathname += "/";
265967
- }
265968
- const resolved = new URL(path2.slice(1), base2);
265969
- resolved.search = base2.search;
265970
- return resolved;
265971
- }
265972
- async function handle_response(response) {
265973
- if (response.status === 404) {
265974
- return void 0;
265975
- }
265976
- if (response.status === 200 || response.status === 206) {
265977
- return new Uint8Array(await response.arrayBuffer());
265978
- }
265979
- throw new Error(`Unexpected response status ${response.status} ${response.statusText}`);
265980
- }
265981
- async function fetch_suffix(url, suffix_length, init2, use_suffix_request) {
265982
- if (use_suffix_request) {
265983
- return fetch(url, {
265984
- ...init2,
265985
- headers: { ...init2.headers, Range: `bytes=-${suffix_length}` }
265986
- });
265987
- }
265988
- let response = await fetch(url, { ...init2, method: "HEAD" });
265989
- if (!response.ok) {
265990
- return response;
265991
- }
265992
- let content_length = response.headers.get("Content-Length");
265993
- let length2 = Number(content_length);
265994
- return fetch_range(url, length2 - suffix_length, length2, init2);
265995
- }
265996
- class FetchStore2 {
265997
- #overrides;
265998
- #use_suffix_request;
265999
- constructor(url, options = {}) {
266000
- this.url = url;
266001
- this.#overrides = options.overrides ?? {};
266002
- this.#use_suffix_request = options.useSuffixRequest ?? false;
266003
- }
266004
- #merge_init(overrides) {
266005
- return merge_init(this.#overrides, overrides);
266006
- }
266007
- async get(key2, options = {}) {
266008
- let href2 = resolve$1(this.url, key2).href;
266009
- let response = await fetch(href2, this.#merge_init(options));
266010
- return handle_response(response);
266011
- }
266012
- async getRange(key2, range2, options = {}) {
266013
- let url = resolve$1(this.url, key2);
266014
- let init2 = this.#merge_init(options);
266015
- let response;
266016
- if ("suffixLength" in range2) {
266017
- response = await fetch_suffix(url, range2.suffixLength, init2, this.#use_suffix_request);
266018
- } else {
266019
- response = await fetch_range(url, range2.offset, range2.length, init2);
266020
- }
266021
- return handle_response(response);
266022
- }
266023
- }
266024
265941
  function multivecChunksToTileDenseArray(chunks, tileShape, isRow) {
266025
265942
  const fullTileLength = isRow ? tileShape[1] : tileShape[0] * tileShape[1];
266026
265943
  const fullTileArray = new Float32Array(fullTileLength);
@@ -266066,7 +265983,7 @@ var ZarrMultivecDataFetcher = function ZarrMultivecDataFetcher2(HGC, ...args) {
266066
265983
  this.storeRoot = Promise.resolve(ZarrMultivecDataFetcher2.urlToStoreRoot[dataConfig.url]);
266067
265984
  } else if (dataConfig.url) {
266068
265985
  const { url, options = {} } = dataConfig;
266069
- this.store = new FetchStore2(url, options);
265986
+ this.store = new FetchStore(url, options);
266070
265987
  this.storeRoot = Promise.resolve(root(this.store));
266071
265988
  }
266072
265989
  if (dataConfig.row !== void 0) {
@@ -266242,7 +266159,7 @@ function HiglassGlobalStyles(props) {
266242
266159
  }
266243
266160
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
266244
266161
  const LazyHiGlassComponent = React__default.lazy(async () => {
266245
- const { HiGlassComponent } = await import("./higlass-DOnQ6srf.js");
266162
+ const { HiGlassComponent } = await import("./higlass-BYlgWL_Y.js");
266246
266163
  return { default: HiGlassComponent };
266247
266164
  });
266248
266165
  const HG_SIZE = 800;
@@ -269189,7 +269106,7 @@ function NeuroglancerGlobalStyles(props) {
269189
269106
  const { classes: classes2 } = props;
269190
269107
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalStyles$3, { styles: globalNeuroglancerCss }), jsxRuntimeExports.jsx(ScopedGlobalStyles, { styles: globalNeuroglancerStyles, parentClassName: classes2.neuroglancerWrapper })] });
269191
269108
  }
269192
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-DLpKRSC5.js"));
269109
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-BV_821il.js"));
269193
269110
  function createWorker() {
269194
269111
  return new WorkerFactory();
269195
269112
  }
@@ -354087,6 +354004,24 @@ class ObsLabelsCsvLoader extends CsvLoader {
354087
354004
  return this.cachedResult;
354088
354005
  }
354089
354006
  }
354007
+ class VitessceConfigViewHConcat {
354008
+ constructor(views) {
354009
+ this.views = views;
354010
+ }
354011
+ }
354012
+ class VitessceConfigViewVConcat {
354013
+ constructor(views) {
354014
+ this.views = views;
354015
+ }
354016
+ }
354017
+ function hconcat(...views) {
354018
+ const vcvhc = new VitessceConfigViewHConcat(views);
354019
+ return vcvhc;
354020
+ }
354021
+ function vconcat(...views) {
354022
+ const vcvvc = new VitessceConfigViewVConcat(views);
354023
+ return vcvvc;
354024
+ }
354090
354025
  class CoordinationLevel {
354091
354026
  constructor(value2) {
354092
354027
  this.value = value2;
@@ -354105,6 +354040,233 @@ class CoordinationLevel {
354105
354040
  function CL(value2) {
354106
354041
  return new CoordinationLevel(value2);
354107
354042
  }
354043
+ class AbstractAutoConfig {
354044
+ constructor(parsedStore) {
354045
+ const { url, fileType, zmetadata } = parsedStore;
354046
+ this.url = url;
354047
+ this.fileType = fileType;
354048
+ this.zmetadata = zmetadata;
354049
+ }
354050
+ // eslint-disable-next-line class-methods-use-this
354051
+ addFiles(vc, dataset) {
354052
+ throw new Error("The addFiles() method has not been implemented.");
354053
+ }
354054
+ // eslint-disable-next-line class-methods-use-this
354055
+ addViews(vc, dataset, layoutOption) {
354056
+ throw new Error("The addViews() method has not been implemented.");
354057
+ }
354058
+ }
354059
+ class AnnDataAutoConfig extends AbstractAutoConfig {
354060
+ getOptions() {
354061
+ const { zmetadata } = this;
354062
+ const options = {
354063
+ obsEmbedding: [],
354064
+ obsSets: []
354065
+ };
354066
+ zmetadata.forEach(({ path: path2, attrs }) => {
354067
+ const lowerPath = path2.toLowerCase();
354068
+ const relPath = path2.substring(1);
354069
+ if (["/x"].includes(lowerPath)) {
354070
+ options.obsFeatureMatrix = {
354071
+ path: relPath
354072
+ // TODO: Also check the shape of X.
354073
+ // If X is very large, try to initialize initial-filtering properties
354074
+ // (will require that /var contains a boolean column however.)
354075
+ };
354076
+ }
354077
+ if (["/obsm/x_spatial", "/obsm/spatial"].includes(lowerPath)) {
354078
+ options.obsLocations = {
354079
+ path: relPath
354080
+ };
354081
+ }
354082
+ if (["/obsm/x_umap", "/obsm/umap"].includes(lowerPath)) {
354083
+ options.obsEmbedding.push({ path: relPath, embeddingType: "UMAP" });
354084
+ }
354085
+ if (["/obsm/x_tsne", "/obsm/tsne"].includes(lowerPath)) {
354086
+ options.obsEmbedding.push({ path: relPath, embeddingType: "t-SNE" });
354087
+ }
354088
+ if (["/obsm/x_pca", "/obsm/pca"].includes(lowerPath)) {
354089
+ options.obsEmbedding.push({ path: relPath, embeddingType: "PCA" });
354090
+ }
354091
+ const supportedObsSetsPaths = [
354092
+ "cluster",
354093
+ "clusters",
354094
+ "subcluster",
354095
+ "cell_type",
354096
+ "celltype",
354097
+ "leiden",
354098
+ "louvain",
354099
+ "disease",
354100
+ "organism",
354101
+ "self_reported_ethnicity",
354102
+ "tissue",
354103
+ "sex"
354104
+ ].map((colname) => `/obs/${colname}`);
354105
+ if (supportedObsSetsPaths.includes(lowerPath)) {
354106
+ const name2 = relPath.split("/").at(-1);
354107
+ options.obsSets.push({ path: relPath, name: name2 });
354108
+ }
354109
+ });
354110
+ return options;
354111
+ }
354112
+ addFiles(vc, dataset) {
354113
+ const { url, fileType } = this;
354114
+ dataset.addFile({
354115
+ url,
354116
+ fileType,
354117
+ options: this.getOptions()
354118
+ // TODO: coordination values?
354119
+ });
354120
+ }
354121
+ // eslint-disable-next-line class-methods-use-this
354122
+ addViews(vc, dataset, layoutOption) {
354123
+ }
354124
+ }
354125
+ class SpatialDataAutoConfig extends AbstractAutoConfig {
354126
+ getOptions() {
354127
+ const { zmetadata } = this;
354128
+ const options = {};
354129
+ const availableElements = zmetadata.filter(({ path: path2 }) => {
354130
+ const relPath = path2.substring(1);
354131
+ return relPath.match(/^(tables|table|images|labels|shapes|points)\/([^/]*)$/);
354132
+ });
354133
+ availableElements.forEach(({ path: path2, attrs }) => {
354134
+ const relPath = path2.substring(1);
354135
+ const firstCoordinateSystem = attrs?.multiscales?.[0]?.coordinateTransformations?.[0]?.output?.name;
354136
+ if (relPath.match(/^(images)\/([^/]*)$/)) {
354137
+ options.image = {
354138
+ path: relPath,
354139
+ coordinateSystem: firstCoordinateSystem
354140
+ // TODO: support a fileUid property in the schema?
354141
+ };
354142
+ }
354143
+ if (relPath.match(/^(labels)\/([^/]*)$/)) {
354144
+ options.obsSegmentations = {
354145
+ path: relPath,
354146
+ coordinateSystem: firstCoordinateSystem
354147
+ // TODO: support a fileUid property in the schema?
354148
+ };
354149
+ }
354150
+ if (relPath.match(/^(shapes)\/([^/]*)$/)) {
354151
+ options.obsSpots = {
354152
+ path: relPath,
354153
+ coordinateSystem: firstCoordinateSystem
354154
+ };
354155
+ }
354156
+ if (relPath.match(/^(points)\/([^/]*)$/)) {
354157
+ options.obsPoints = {
354158
+ path: relPath,
354159
+ coordinateSystem: firstCoordinateSystem
354160
+ };
354161
+ }
354162
+ if (relPath.match(/^(tables|table)\/([^/]*)$/)) {
354163
+ const tableEls = zmetadata.filter(({ path: subpath }) => subpath.startsWith(path2));
354164
+ const hasX = tableEls.find((el) => el.path === `${path2}/X`);
354165
+ if (hasX) {
354166
+ options.obsFeatureMatrix = {
354167
+ path: hasX.path.substring(1)
354168
+ // region: null,
354169
+ };
354170
+ }
354171
+ const hasObs = tableEls.find((el) => el.path === `${path2}/obs`);
354172
+ if (hasObs) {
354173
+ const columnOrder = hasObs.attrs?.["column-order"];
354174
+ options.obsSets = {
354175
+ // region: null,
354176
+ tablePath: relPath,
354177
+ obsSets: columnOrder.map((c2) => ({
354178
+ // TODO: determine whether this column is string/categorical.
354179
+ // TODO: determine whether this column contains too many
354180
+ // categories to make sense to consider a cell set.
354181
+ path: `${hasObs.path.substring(1)}/${c2}`,
354182
+ name: c2
354183
+ }))
354184
+ };
354185
+ }
354186
+ }
354187
+ });
354188
+ return options;
354189
+ }
354190
+ addFiles(vc, dataset) {
354191
+ const { url, fileType } = this;
354192
+ dataset.addFile({
354193
+ url,
354194
+ fileType,
354195
+ options: this.getOptions()
354196
+ // TODO: coordination values?
354197
+ });
354198
+ }
354199
+ // eslint-disable-next-line class-methods-use-this
354200
+ addViews(vc, dataset, layoutOption) {
354201
+ const options = this.getOptions();
354202
+ const spatialView = vc.addView(dataset, "spatialBeta");
354203
+ const lcView = vc.addView(dataset, "layerControllerBeta");
354204
+ const controlViews = [lcView];
354205
+ if (options.obsSets) {
354206
+ const obsSets = vc.addView(dataset, "obsSets");
354207
+ controlViews.push(obsSets);
354208
+ }
354209
+ if (options.obsFeatureMatrix) {
354210
+ const featureList = vc.addView(dataset, "featureList");
354211
+ controlViews.push(featureList);
354212
+ }
354213
+ vc.layout(hconcat(spatialView, vconcat(...controlViews)));
354214
+ }
354215
+ }
354216
+ class OmeAutoConfig extends AbstractAutoConfig {
354217
+ addFiles(vc, dataset) {
354218
+ const { url, fileType } = this;
354219
+ dataset.addFile({
354220
+ url,
354221
+ fileType
354222
+ // TODO: options?
354223
+ // TODO: coordination values?
354224
+ });
354225
+ }
354226
+ // eslint-disable-next-line class-methods-use-this
354227
+ addViews(vc, dataset, layoutOption) {
354228
+ const spatialView = vc.addView(dataset, "spatialBeta");
354229
+ const lcView = vc.addView(dataset, "layerControllerBeta");
354230
+ vc.layout(hconcat(spatialView, lcView));
354231
+ }
354232
+ }
354233
+ ({
354234
+ [FileType$1.IMAGE_OME_TIFF]: [".ome.tif", ".ome.tiff", ".ome.tf2", ".ome.tf8"],
354235
+ [FileType$1.IMAGE_OME_ZARR]: [".ome.zarr"],
354236
+ [FileType$1.IMAGE_OME_ZARR_ZIP]: [".ome.zarr.zip"],
354237
+ [FileType$1.ANNDATA_ZARR]: [".ad.zarr", ".h5ad.zarr", ".adata.zarr", ".anndata.zarr"],
354238
+ [FileType$1.ANNDATA_ZARR_ZIP]: [".ad.zarr.zip", ".h5ad.zarr.zip", ".adata.zarr.zip", ".anndata.zarr.zip"],
354239
+ // TODO: how to handle h5ad-based AnnData (since needs reference JSON file).
354240
+ // Perhaps just assume one H5AD+one JSON (or .ref.json) file correspond to each other?
354241
+ [FileType$1.SPATIALDATA_ZARR]: [".sd.zarr", ".sdata.zarr", ".spatialdata.zarr"],
354242
+ [FileType$1.SPATIALDATA_ZARR_ZIP]: [".sd.zarr.zip", ".sdata.zarr.zip", ".spatialdata.zarr.zip"]
354243
+ });
354244
+ ({
354245
+ // OME-TIFF
354246
+ [FileType$1.IMAGE_OME_TIFF]: OmeAutoConfig,
354247
+ [FileType$1.OBS_SEGMENTATIONS_OME_TIFF]: OmeAutoConfig,
354248
+ // OME-Zarr
354249
+ [FileType$1.IMAGE_OME_ZARR]: OmeAutoConfig,
354250
+ [FileType$1.IMAGE_OME_ZARR_ZIP]: OmeAutoConfig,
354251
+ [FileType$1.OBS_SEGMENTATIONS_OME_ZARR]: OmeAutoConfig,
354252
+ [FileType$1.OBS_SEGMENTATIONS_OME_ZARR_ZIP]: OmeAutoConfig,
354253
+ // AnnData
354254
+ [FileType$1.ANNDATA_ZARR]: AnnDataAutoConfig,
354255
+ [FileType$1.ANNDATA_ZARR_ZIP]: AnnDataAutoConfig,
354256
+ // SpatialData
354257
+ [FileType$1.SPATIALDATA_ZARR]: SpatialDataAutoConfig,
354258
+ [FileType$1.SPATIALDATA_ZARR_ZIP]: SpatialDataAutoConfig
354259
+ });
354260
+ [
354261
+ FileType$1.ANNDATA_ZARR,
354262
+ FileType$1.ANNDATA_ZARR_ZIP,
354263
+ FileType$1.SPATIALDATA_ZARR,
354264
+ FileType$1.SPATIALDATA_ZARR_ZIP,
354265
+ FileType$1.IMAGE_OME_ZARR,
354266
+ FileType$1.IMAGE_OME_ZARR_ZIP,
354267
+ FileType$1.OBS_SEGMENTATIONS_OME_ZARR,
354268
+ FileType$1.OBS_SEGMENTATIONS_OME_ZARR_ZIP
354269
+ ];
354108
354270
  class ObsSpotsCsvLoader extends CsvLoader {
354109
354271
  loadFromCache(data2) {
354110
354272
  if (this.cachedResult) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bQ, bO, bM, bP, bN, bL, bR } from "./index-diSsBj8e.js";
1
+ import { bQ, bO, bM, bP, bN, bL, bR } from "./index-Z-pD1WnL.js";
2
2
  import { useComplexCoordination, useComplexCoordinationSecondary, useCoordination, useCoordinationScopes, useCoordinationScopesBy, useGridItemSize, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondaryNonNull, usePageModeView } from "@vitessce/vit-s";
3
3
  export {
4
4
  bQ as PluginAsyncFunction,
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
1
+ import { aW as BaseDecoder } from "./index-Z-pD1WnL.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { aF as getDefaultExportFromCjs, aW as BaseDecoder, aX as LercParameters, aY as LercAddCompression } from "./index-diSsBj8e.js";
2
+ import { aF as getDefaultExportFromCjs, aW as BaseDecoder, aX as LercParameters, aY as LercAddCompression } from "./index-Z-pD1WnL.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
1
+ import { aW as BaseDecoder } from "./index-Z-pD1WnL.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
1
+ import { aW as BaseDecoder } from "./index-Z-pD1WnL.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
1
+ import { aW as BaseDecoder } from "./index-Z-pD1WnL.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { bG as MeshDistanceMaterial, bH as MeshDepthMaterial, bI as RGBADepthPacking, ae as UniformsUtils, bJ as ShaderChunk, a9 as InstancedBufferGeometry, a8 as Sphere, a7 as Box3, am as BackSide, u as DoubleSide, z as Mesh, a5 as FrontSide, v as MeshBasicMaterial, C as Color, e as Vector3, M as Matrix4, V as Vector2, ap as Matrix3, ag as Vector4, a1 as Texture, l as LinearFilter, aD as PlaneGeometry, x as BufferGeometry, aa as Float32BufferAttribute, bK as InstancedBufferAttribute } from "./index-diSsBj8e.js";
1
+ import { bG as MeshDistanceMaterial, bH as MeshDepthMaterial, bI as RGBADepthPacking, ae as UniformsUtils, bJ as ShaderChunk, a9 as InstancedBufferGeometry, a8 as Sphere, a7 as Box3, am as BackSide, u as DoubleSide, z as Mesh, a5 as FrontSide, v as MeshBasicMaterial, C as Color, e as Vector3, M as Matrix4, V as Vector2, ap as Matrix3, ag as Vector4, a1 as Texture, l as LinearFilter, aD as PlaneGeometry, x as BufferGeometry, aa as Float32BufferAttribute, bK as InstancedBufferAttribute } from "./index-Z-pD1WnL.js";
2
2
  function workerBootstrap() {
3
3
  var modules = /* @__PURE__ */ Object.create(null);
4
4
  function registerModule(ref, callback) {
@@ -1,4 +1,4 @@
1
- import { aW as BaseDecoder } from "./index-diSsBj8e.js";
1
+ import { aW as BaseDecoder } from "./index-Z-pD1WnL.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/all",
3
- "version": "3.8.5",
3
+ "version": "3.8.6",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -17,38 +17,38 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "zod": "^3.21.4",
20
- "@vitessce/styles": "3.8.5",
21
- "@vitessce/constants-internal": "3.8.5",
22
- "@vitessce/abstract": "3.8.5",
23
- "@vitessce/error": "3.8.5",
24
- "@vitessce/csv": "3.8.5",
25
- "@vitessce/description": "3.8.5",
26
- "@vitessce/feature-list": "3.8.5",
27
- "@vitessce/genomic-profiles": "3.8.5",
28
- "@vitessce/heatmap": "3.8.5",
29
- "@vitessce/glb": "3.8.5",
30
- "@vitessce/json": "3.8.5",
31
- "@vitessce/layer-controller": "3.8.5",
32
- "@vitessce/layer-controller-beta": "3.8.5",
33
- "@vitessce/link-controller": "3.8.5",
34
- "@vitessce/obs-sets-manager": "3.8.5",
35
- "@vitessce/ome-tiff": "3.8.5",
36
- "@vitessce/plugins": "3.8.5",
37
- "@vitessce/scatterplot-embedding": "3.8.5",
38
- "@vitessce/scatterplot-gating": "3.8.5",
39
- "@vitessce/schemas": "3.8.5",
40
- "@vitessce/spatial": "3.8.5",
41
- "@vitessce/spatial-beta": "3.8.5",
42
- "@vitessce/statistical-plots": "3.8.5",
43
- "@vitessce/status": "3.8.5",
44
- "@vitessce/vit-s": "3.8.5",
45
- "@vitessce/zarr": "3.8.5",
46
- "@vitessce/globals": "3.8.5",
47
- "@vitessce/spatial-zarr": "3.8.5",
48
- "@vitessce/spatial-three": "3.8.5",
49
- "@vitessce/spatial-accelerated": "3.8.5",
50
- "@vitessce/biomarker-select": "3.8.5",
51
- "@vitessce/neuroglancer": "3.8.5"
20
+ "@vitessce/styles": "3.8.6",
21
+ "@vitessce/constants-internal": "3.8.6",
22
+ "@vitessce/abstract": "3.8.6",
23
+ "@vitessce/error": "3.8.6",
24
+ "@vitessce/csv": "3.8.6",
25
+ "@vitessce/description": "3.8.6",
26
+ "@vitessce/feature-list": "3.8.6",
27
+ "@vitessce/genomic-profiles": "3.8.6",
28
+ "@vitessce/heatmap": "3.8.6",
29
+ "@vitessce/glb": "3.8.6",
30
+ "@vitessce/json": "3.8.6",
31
+ "@vitessce/layer-controller": "3.8.6",
32
+ "@vitessce/layer-controller-beta": "3.8.6",
33
+ "@vitessce/link-controller": "3.8.6",
34
+ "@vitessce/obs-sets-manager": "3.8.6",
35
+ "@vitessce/ome-tiff": "3.8.6",
36
+ "@vitessce/plugins": "3.8.6",
37
+ "@vitessce/scatterplot-embedding": "3.8.6",
38
+ "@vitessce/scatterplot-gating": "3.8.6",
39
+ "@vitessce/schemas": "3.8.6",
40
+ "@vitessce/spatial": "3.8.6",
41
+ "@vitessce/spatial-beta": "3.8.6",
42
+ "@vitessce/statistical-plots": "3.8.6",
43
+ "@vitessce/status": "3.8.6",
44
+ "@vitessce/vit-s": "3.8.6",
45
+ "@vitessce/zarr": "3.8.6",
46
+ "@vitessce/globals": "3.8.6",
47
+ "@vitessce/spatial-zarr": "3.8.6",
48
+ "@vitessce/spatial-three": "3.8.6",
49
+ "@vitessce/spatial-accelerated": "3.8.6",
50
+ "@vitessce/biomarker-select": "3.8.6",
51
+ "@vitessce/neuroglancer": "3.8.6"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^18.0.28",