@vitessce/all 3.9.1 → 3.9.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,4 +1,4 @@
1
- import { aG as getDefaultExportFromCjs, aH as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aI as PCFSoftShadowMap, aJ as VSMShadowMap, aK as PCFShadowMap, aL as BasicShadowMap, aM as NoToneMapping, aN as ACESFilmicToneMapping, e as Vector3, V as Vector2, aO as Clock, aP as WebGLRenderer, aQ as Camera, x as BufferGeometry, r as Material, aR as Layers, a1 as Texture, aC as RGBAFormat, ay as UnsignedByteType, C as Color, aj as _extends, aS as THREE, aT as EventDispatcher, aU as MOUSE, aV as TOUCH, aW as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-B-aCUFst.js";
1
+ import { aG as getDefaultExportFromCjs, aH as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aI as PCFSoftShadowMap, aJ as VSMShadowMap, aK as PCFShadowMap, aL as BasicShadowMap, aM as NoToneMapping, aN as ACESFilmicToneMapping, e as Vector3, V as Vector2, aO as Clock, aP as WebGLRenderer, aQ as Camera, x as BufferGeometry, r as Material, aR as Layers, a1 as Texture, aC as RGBAFormat, ay as UnsignedByteType, C as Color, aj as _extends, aS as THREE, aT as EventDispatcher, aU as MOUSE, aV as TOUCH, aW as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-DKpg3n-y.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 { aG as getDefaultExportFromCjs, b1 as requireAssign, b2 as require_export, b3 as require_core, b4 as require_fails, b5 as require_toObject, b6 as require_objectKeys, b7 as require_cof, b8 as require_wks, b9 as require_iterators, ba as requireWeb_dom_iterable, bb as requireEs6_string_iterator, bc as require_anObject, bd as require_hide, be as require_ctx, bf as require_toLength, bg as require_global, bh as require_objectDp, bi as require_descriptors, bj as require_isObject, bk as require_objectCreate, bl as require_iterDefine, bm as require_iterStep, bn as require_meta, bo as require_isArray, bp as require_iobject, bq as require_setToStringTag, br as require_aFunction, bs as requireIterator, bt as require_propertyDesc, a_ as commonjsGlobal, bu as requireEs6_symbol, bv as requireDefineProperty, bw as require_toIobject, bx as require_objectGopd, by as require_html, bz as require_domCreate, bA as require_library, bB as requireSymbol, bC as require_objectPie, bD as require_has, bE as require_redefine, bF as require_objectAssign, bG as diffCameraState, ao as jsxRuntimeExports } from "./index-B-aCUFst.js";
1
+ import { aG as getDefaultExportFromCjs, b1 as requireAssign, b2 as require_export, b3 as require_core, b4 as require_fails, b5 as require_toObject, b6 as require_objectKeys, b7 as require_cof, b8 as require_wks, b9 as require_iterators, ba as requireWeb_dom_iterable, bb as requireEs6_string_iterator, bc as require_anObject, bd as require_hide, be as require_ctx, bf as require_toLength, bg as require_global, bh as require_objectDp, bi as require_descriptors, bj as require_isObject, bk as require_objectCreate, bl as require_iterDefine, bm as require_iterStep, bn as require_meta, bo as require_isArray, bp as require_iobject, bq as require_setToStringTag, br as require_aFunction, bs as requireIterator, bt as require_propertyDesc, a_ as commonjsGlobal, bu as requireEs6_symbol, bv as requireDefineProperty, bw as require_toIobject, bx as require_objectGopd, by as require_html, bz as require_domCreate, bA as require_library, bB as requireSymbol, bC as require_objectPie, bD as require_has, bE as require_redefine, bF as require_objectAssign, bG as diffCameraState, ao as jsxRuntimeExports } from "./index-DKpg3n-y.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 { aX as BaseDecoder } from "./index-B-aCUFst.js";
2
+ import { aX as BaseDecoder } from "./index-DKpg3n-y.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 { a_ as commonjsGlobal$1, a$ as requireObjectAssign, aG as getDefaultExportFromCjs$1, b0 as earcut } from "./index-B-aCUFst.js";
4
+ import { a_ as commonjsGlobal$1, a$ as requireObjectAssign, aG as getDefaultExportFromCjs$1, b0 as earcut } from "./index-DKpg3n-y.js";
5
5
  var promise = {};
6
6
  var hasRequiredPromise;
7
7
  function requirePromise() {
@@ -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-B-aCUFst.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-DKpg3n-y.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-BpeUSyh9.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-DcLq7d8o.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-Cf8otk5M.js"), []);
5030
+ } = suspend(async () => import("./troika-three-text.esm-1SLW0Iby.js"), []);
5031
5031
  const invalidate = useThree(({
5032
5032
  invalidate: invalidate2
5033
5033
  }) => invalidate2);
@@ -72922,21 +72922,20 @@ Popper$1.Utils = (typeof window !== "undefined" ? window : global).PopperUtils;
72922
72922
  Popper$1.placements = placements$1;
72923
72923
  Popper$1.Defaults = Defaults;
72924
72924
  function createChainedFunction(...funcs) {
72925
- return funcs.reduce((acc, func) => {
72926
- if (func == null) {
72927
- return acc;
72928
- }
72929
- {
72930
- if (typeof func !== "function") {
72931
- console.error("Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.");
72925
+ return funcs.reduce(
72926
+ (acc, func) => {
72927
+ if (func == null) {
72928
+ return acc;
72932
72929
  }
72930
+ return function chainedFunction(...args) {
72931
+ acc.apply(this, args);
72932
+ func.apply(this, args);
72933
+ };
72934
+ },
72935
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
72936
+ () => {
72933
72937
  }
72934
- return function chainedFunction(...args) {
72935
- acc.apply(this, args);
72936
- func.apply(this, args);
72937
- };
72938
- }, () => {
72939
- });
72938
+ );
72940
72939
  }
72941
72940
  function setRef(ref2, value2) {
72942
72941
  if (typeof ref2 === "function") {
@@ -72975,7 +72974,7 @@ function flipPlacement(placement, theme) {
72975
72974
  }
72976
72975
  }
72977
72976
  function getAnchorEl(anchorEl) {
72978
- return typeof anchorEl === "function" ? anchorEl() : anchorEl;
72977
+ return typeof anchorEl === "function" ? anchorEl(document.body) : anchorEl;
72979
72978
  }
72980
72979
  const useEnhancedEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
72981
72980
  const defaultPopperOptions = {};
@@ -73005,25 +73004,18 @@ const Popper = React.forwardRef((props, ref2) => {
73005
73004
  }
73006
73005
  if (popperRef.current) {
73007
73006
  popperRef.current.destroy();
73008
- handlePopperRefRef.current(null);
73007
+ if (handlePopperRefRef.current) {
73008
+ setRef(handlePopperRefRef.current, null);
73009
+ }
73009
73010
  }
73010
73011
  const handlePopperUpdate = (data2) => {
73011
73012
  setPlacement(data2.placement);
73012
73013
  };
73013
- const resolvedAnchorEl = getAnchorEl(anchorEl);
73014
- {
73015
- if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {
73016
- const box = resolvedAnchorEl.getBoundingClientRect();
73017
- if (box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {
73018
- console.warn([
73019
- "Material-UI: The `anchorEl` prop provided to the component is invalid.",
73020
- "The anchor element should be part of the document layout.",
73021
- "Make sure the element is present in the document or that it's not display none."
73022
- ].join("\n"));
73023
- }
73024
- }
73014
+ const anchorElement = getAnchorEl(anchorEl);
73015
+ if (!anchorElement) {
73016
+ return;
73025
73017
  }
73026
- const popper2 = new Popper$1(getAnchorEl(anchorEl), tooltipRef.current, {
73018
+ const popper2 = new Popper$1(anchorElement, tooltipRef.current, {
73027
73019
  placement: rtlPlacement,
73028
73020
  ...popperOptions,
73029
73021
  modifiers: {
@@ -73041,7 +73033,9 @@ const Popper = React.forwardRef((props, ref2) => {
73041
73033
  onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),
73042
73034
  onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)
73043
73035
  });
73044
- handlePopperRefRef.current(popper2);
73036
+ if (handlePopperRefRef.current) {
73037
+ setRef(handlePopperRefRef.current, popper2);
73038
+ }
73045
73039
  }, [anchorEl, disablePortal, modifiers2, open2, rtlPlacement, popperOptions]);
73046
73040
  const handleRef = React.useCallback((node2) => {
73047
73041
  setRef(ownRef, node2);
@@ -73055,7 +73049,9 @@ const Popper = React.forwardRef((props, ref2) => {
73055
73049
  return;
73056
73050
  }
73057
73051
  popperRef.current.destroy();
73058
- handlePopperRefRef.current(null);
73052
+ if (handlePopperRefRef.current) {
73053
+ setRef(handlePopperRefRef.current, null);
73054
+ }
73059
73055
  };
73060
73056
  const handleExited = () => {
73061
73057
  setExited(true);
@@ -73086,7 +73082,7 @@ const Popper = React.forwardRef((props, ref2) => {
73086
73082
  // Fix Popper.js display issue
73087
73083
  top: 0,
73088
73084
  left: 0,
73089
- display: !open2 && keepMounted && !transition3 ? "none" : null,
73085
+ display: !open2 && keepMounted && !transition3 ? "none" : void 0,
73090
73086
  ...style2
73091
73087
  }, children: typeof children3 === "function" ? children3(childProps) : children3 }) });
73092
73088
  });
@@ -73101,7 +73097,7 @@ function ScopedGlobalStyles(props) {
73101
73097
  const component = useMemo$1(() => {
73102
73098
  const computedStyles = prependParentClassName(styles2, parentClassName);
73103
73099
  return jsxRuntimeExports.jsx(GlobalStyles$3, { styles: computedStyles });
73104
- }, [parentClassName]);
73100
+ }, [parentClassName, styles2]);
73105
73101
  return component;
73106
73102
  }
73107
73103
  function ok$1() {
@@ -209142,22 +209138,22 @@ async function getDecoder(fileDirectory) {
209142
209138
  const Decoder = await importFn();
209143
209139
  return new Decoder(fileDirectory);
209144
209140
  }
209145
- addDecoder([void 0, 1], () => import("./raw-fm6sEfJs.js").then((m2) => m2.default));
209146
- addDecoder(5, () => import("./lzw-fa9yKTSy.js").then((m2) => m2.default));
209141
+ addDecoder([void 0, 1], () => import("./raw-QxVylWDO.js").then((m2) => m2.default));
209142
+ addDecoder(5, () => import("./lzw-CMvKxrGF.js").then((m2) => m2.default));
209147
209143
  addDecoder(6, () => {
209148
209144
  throw new Error("old style JPEG compression is not supported.");
209149
209145
  });
209150
- addDecoder(7, () => import("./jpeg-BZSLq5O3.js").then((m2) => m2.default));
209151
- addDecoder([8, 32946], () => import("./deflate-C63ycJxP.js").then((m2) => m2.default));
209152
- addDecoder(32773, () => import("./packbits-8C0e8lDT.js").then((m2) => m2.default));
209146
+ addDecoder(7, () => import("./jpeg-DeFocpVz.js").then((m2) => m2.default));
209147
+ addDecoder([8, 32946], () => import("./deflate-CmVftsf2.js").then((m2) => m2.default));
209148
+ addDecoder(32773, () => import("./packbits-Crf3i8qg.js").then((m2) => m2.default));
209153
209149
  addDecoder(
209154
209150
  34887,
209155
- () => import("./lerc-BZk5g5T2.js").then(async (m2) => {
209151
+ () => import("./lerc-BCstSar4.js").then(async (m2) => {
209156
209152
  await m2.zstd.init();
209157
209153
  return m2;
209158
209154
  }).then((m2) => m2.default)
209159
209155
  );
209160
- addDecoder(50001, () => import("./webimage-CyRSWQVR.js").then((m2) => m2.default));
209156
+ addDecoder(50001, () => import("./webimage-DJBIWr5d.js").then((m2) => m2.default));
209161
209157
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
209162
209158
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
209163
209159
  }
@@ -252456,21 +252452,18 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
252456
252452
  };
252457
252453
  }
252458
252454
  }
252459
- const isStaticColor = obsColorEncoding === "spatialLayerColor";
252460
- const getMoleculeColor = (object2, { data: data2, index: index2, target: target2 }) => {
252461
- const obsId = data2.src.obsIndex[index2];
252462
- if (data2.src.obsLabelsMap && data2.src.uniqueObsLabels && data2.src.PALETTE) {
252463
- const obsLabel = data2.src.obsLabelsMap.get(obsId);
252464
- const labelIndex = data2.src.uniqueObsLabels.indexOf(obsLabel);
252465
- target2[0] = data2.src.PALETTE[labelIndex % data2.src.PALETTE.length]?.[0];
252466
- target2[1] = data2.src.PALETTE[labelIndex % data2.src.PALETTE.length]?.[1];
252467
- target2[2] = data2.src.PALETTE[labelIndex % data2.src.PALETTE.length]?.[2];
252468
- }
252469
- return target2;
252470
- };
252471
- const { obsPointsModelMatrix, obsPoints, obsPointsTilingType, loadPointsInRect } = this.obsPointsData?.[layerScope]?.src ?? {};
252455
+ const {
252456
+ obsPointsModelMatrix,
252457
+ obsPoints,
252458
+ // featureIndices: obsPointsFeatureIndices,
252459
+ obsPointsTilingType,
252460
+ loadPointsInRect
252461
+ } = this.obsPointsData?.[layerScope]?.src ?? {};
252472
252462
  obsPoints?.shape?.[0] === 3;
252473
252463
  const modelMatrix2 = obsPointsModelMatrix?.clone();
252464
+ const hasFeatureIndicesMinMax = !showUnselected && Array.isArray(featureIndices) && featureIndices.length === 1;
252465
+ const FILTER_PLACEHOLDER = 0;
252466
+ const featureIndicesMinMax = hasFeatureIndicesMinMax ? [featureIndices[0], featureIndices[0]] : [FILTER_PLACEHOLDER, FILTER_PLACEHOLDER];
252474
252467
  if (obsPointsTilingType === "tiled") {
252475
252468
  return new TileLayer({
252476
252469
  id: `Tiled-${POINT_LAYER_PREFIX}${layerScope}`,
@@ -252521,9 +252514,6 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
252521
252514
  renderSubLayers: (subLayerProps) => {
252522
252515
  const { bbox: bbox2, content: tileData } = subLayerProps.tile;
252523
252516
  const { left: left2, top: top2, right: right2, bottom: bottom2 } = bbox2;
252524
- const hasFeatureIndicesMinMax = !showUnselected && Array.isArray(featureIndices) && featureIndices.length === 1;
252525
- const FILTER_PLACEHOLDER = 0;
252526
- const featureIndicesMinMax = hasFeatureIndicesMinMax ? [featureIndices[0], featureIndices[0]] : [FILTER_PLACEHOLDER, FILTER_PLACEHOLDER];
252527
252517
  return new ScatterplotLayer(subLayerProps, {
252528
252518
  bounds: [left2, top2, right2, bottom2],
252529
252519
  data: tileData,
@@ -252600,26 +252590,44 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
252600
252590
  coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
252601
252591
  pickable: true,
252602
252592
  autoHighlight: AUTO_HIGHLIGHT,
252603
- radiusMaxPixels: 3,
252604
252593
  opacity: spatialLayerOpacity,
252605
252594
  visible: spatialLayerVisible,
252606
252595
  modelMatrix: modelMatrix2,
252607
- getRadius: 300,
252596
+ getRadius: 5,
252597
+ radiusMaxPixels: 3,
252608
252598
  getPosition: (object2, { data: data2, index: index2, target: target2 }) => {
252609
252599
  target2[0] = data2.src.obsPoints.data[0][index2];
252610
252600
  target2[1] = data2.src.obsPoints.data[1][index2];
252611
252601
  target2[2] = 0;
252612
252602
  return target2;
252613
252603
  },
252614
- getLineColor: isStaticColor ? staticColor : getMoleculeColor,
252615
- getFillColor: isStaticColor ? staticColor : getMoleculeColor,
252604
+ getFillColor,
252616
252605
  onHover: (info2) => delegateHover(info2, "point", layerScope),
252606
+ // Use GPU filtering to filter to only the points in the tile bounding box,
252607
+ // since the row groups may contain points from other tiles.
252608
+ // Note: this can be improved using filterCategories,
252609
+ // but it is not available until post-v9 deck.gl/extensions.
252610
+ filterRange: [featureIndicesMinMax],
252611
+ getFilterValue: hasFeatureIndicesMinMax ? (object2, { data: data2, index: index2 }) => [
252612
+ data2.src.featureIndices[index2]
252613
+ ] : (object2, { data: data2, index: index2 }) => [
252614
+ FILTER_PLACEHOLDER
252615
+ ],
252616
+ extensions: [
252617
+ new DataFilterExtension({ filterSize: 1 })
252618
+ ],
252617
252619
  updateTriggers: {
252618
- getRadius: [],
252619
- getFillColor: [obsColorEncoding, staticColor],
252620
- getLineColor: [obsColorEncoding, staticColor]
252621
- },
252622
- ...{}
252620
+ getFillColor: [
252621
+ showUnselected,
252622
+ featureColor,
252623
+ obsColorEncoding,
252624
+ spatialLayerColor,
252625
+ featureSelection,
252626
+ hasMultipleFeaturesSelected
252627
+ ],
252628
+ getFilterValue: [hasFeatureIndicesMinMax, showUnselected, featureSelection],
252629
+ filterRange: [hasFeatureIndicesMinMax, showUnselected, featureSelection]
252630
+ }
252623
252631
  });
252624
252632
  }
252625
252633
  createSelectionLayer() {
@@ -253158,8 +253166,8 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
253158
253166
  this.obsSegmentationsLayers = this.createSegmentationLayers();
253159
253167
  }
253160
253168
  onUpdatePointsData(layerScope) {
253161
- const { obsPoints, pointMultiObsLabels } = this.props;
253162
- const { obsIndex, obsPoints: layerObsPoints, obsPointsModelMatrix, loadPointsInRect, obsPointsTilingType } = obsPoints?.[layerScope] || {};
253169
+ const { obsPoints, pointMultiObsLabels, pointMatrixIndices } = this.props;
253170
+ const { obsIndex, obsPoints: layerObsPoints, featureIds: layerObsPointsFeatureIds, obsPointsModelMatrix, loadPointsInRect, obsPointsTilingType } = obsPoints?.[layerScope] || {};
253163
253171
  const { obsIndex: obsLabelsIndex, obsLabels } = pointMultiObsLabels?.[layerScope] || {};
253164
253172
  if (obsPointsTilingType === "tiled") {
253165
253173
  this.obsPointsData[layerScope] = {
@@ -253167,6 +253175,7 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
253167
253175
  obsPointsTilingType,
253168
253176
  obsIndex: null,
253169
253177
  obsPoints: null,
253178
+ featureIndices: null,
253170
253179
  obsPointsModelMatrix,
253171
253180
  obsLabelsMap: null,
253172
253181
  uniqueObsLabels: null,
@@ -253179,11 +253188,17 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
253179
253188
  if (layerObsPoints) {
253180
253189
  const getCellCoords = makeDefaultGetObsCoords(layerObsPoints);
253181
253190
  this.obsPointsQuadTree[layerScope] = createQuadTree(layerObsPoints, getCellCoords);
253191
+ let pointFeatureIndex = pointMatrixIndices?.[layerScope]?.featureIndex;
253192
+ if (!pointFeatureIndex) {
253193
+ pointFeatureIndex = Array.from(new Set(layerObsPointsFeatureIds));
253194
+ }
253195
+ const featureIndices = layerObsPointsFeatureIds.map((featureId2) => pointFeatureIndex?.indexOf(featureId2));
253182
253196
  this.obsPointsData[layerScope] = {
253183
253197
  src: {
253184
253198
  obsPointsTilingType,
253185
253199
  obsIndex,
253186
253200
  obsPoints: layerObsPoints,
253201
+ featureIndices,
253187
253202
  obsPointsModelMatrix,
253188
253203
  obsLabelsMap: null,
253189
253204
  uniqueObsLabels: null,
@@ -253396,7 +253411,7 @@ class Spatial2 extends AbstractSpatialOrScatterplot {
253396
253411
  forceUpdate = true;
253397
253412
  } else {
253398
253413
  this.props.pointLayerScopes.forEach((layerScope) => {
253399
- if (shallowDiffByLayer("obsPoints", layerScope) || shallowDiffByLayer("pointMultiObsLabels", layerScope)) {
253414
+ if (shallowDiffByLayer("obsPoints", layerScope) || shallowDiffByLayer("pointMultiObsLabels", layerScope) || shallowDiffByLayer("pointMatrixIndices", layerScope)) {
253400
253415
  this.onUpdatePointsData(layerScope);
253401
253416
  forceUpdate = true;
253402
253417
  }
@@ -253561,12 +253576,12 @@ class ErrorBoundary extends React__default.Component {
253561
253576
  }
253562
253577
  }
253563
253578
  const LazySpatialThree = React__default.lazy(async () => {
253564
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-DBnzUqAs.js");
253579
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-4Tuk9eGd.js");
253565
253580
  return { default: SpatialWrapper2 };
253566
253581
  });
253567
253582
  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 }) }) }) }));
253568
253583
  const LazySpatialAccelerated = React__default.lazy(async () => {
253569
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-Do4xvqoi.js");
253584
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-txFb0D-X.js");
253570
253585
  return { default: SpatialWrapper2 };
253571
253586
  });
253572
253587
  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 }) }) }) }));
@@ -267044,7 +267059,7 @@ function HiglassGlobalStyles(props) {
267044
267059
  }
267045
267060
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
267046
267061
  const LazyHiGlassComponent = React__default.lazy(async () => {
267047
- const { HiGlassComponent } = await import("./higlass-Dsba4gSg.js");
267062
+ const { HiGlassComponent } = await import("./higlass-BE5OHbDt.js");
267048
267063
  return { default: HiGlassComponent };
267049
267064
  });
267050
267065
  const HG_SIZE = 800;
@@ -269991,7 +270006,7 @@ function NeuroglancerGlobalStyles(props) {
269991
270006
  const { classes: classes2 } = props;
269992
270007
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalStyles$3, { styles: globalNeuroglancerCss }), jsxRuntimeExports.jsx(ScopedGlobalStyles, { styles: globalNeuroglancerStyles, parentClassName: classes2.neuroglancerWrapper })] });
269993
270008
  }
269994
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-CGvAuFr6.js"));
270009
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-DmKC4Wha.js"));
269995
270010
  function createWorker() {
269996
270011
  return new WorkerFactory();
269997
270012
  }
@@ -356077,6 +356092,9 @@ class AnnDataSource extends ZarrDataSource {
356077
356092
  async getFlatArrDecompressed(path2) {
356078
356093
  const { storeRoot } = this;
356079
356094
  const arr = await open$1(storeRoot.resolve(path2), { kind: "array" });
356095
+ if (arr.shape[0] === 0) {
356096
+ return [];
356097
+ }
356080
356098
  const data2 = await get$c(arr);
356081
356099
  if (data2.data?.[Symbol.iterator]) {
356082
356100
  return (
@@ -358391,20 +358409,39 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
358391
358409
  * @returns {Promise} A promise for an array of columns.
358392
358410
  */
358393
358411
  async loadPoints() {
358394
- const { path: path2, featureIndexColumn } = this.options;
358412
+ const { path: path2 } = this.options;
358395
358413
  if (this.locations) {
358396
358414
  return this.locations;
358397
358415
  }
358398
358416
  let locations;
358399
358417
  const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
358400
358418
  if (formatVersion === "0.1") {
358401
- locations = await this.dataSource.loadPoints(path2, featureIndexColumn);
358419
+ locations = await this.dataSource.loadPoints(path2);
358402
358420
  } else {
358403
358421
  throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
358404
358422
  }
358405
358423
  this.locations = locations;
358406
358424
  return this.locations;
358407
358425
  }
358426
+ /**
358427
+ * Class method for loading the feature index column for points.
358428
+ * @returns {Promise} A promise for a column array of integers.
358429
+ */
358430
+ async loadPointsFeatureIds() {
358431
+ const { path: path2 } = this.options;
358432
+ if (this.locationsFeatureIndex) {
358433
+ return this.locationsFeatureIndex;
358434
+ }
358435
+ let locationsFeatureIndex;
358436
+ const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
358437
+ if (formatVersion === "0.1") {
358438
+ locationsFeatureIndex = await this.dataSource.loadPointsFeatureIds(path2);
358439
+ } else {
358440
+ throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
358441
+ }
358442
+ this.locationsFeatureIndex = locationsFeatureIndex;
358443
+ return this.locationsFeatureIndex;
358444
+ }
358408
358445
  async loadPointsInRect(bounds2, signal) {
358409
358446
  const { path: path2, featureIndexColumn, mortonCodeColumn } = this.options;
358410
358447
  let locations;
@@ -358467,23 +358504,19 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
358467
358504
  };
358468
358505
  let obsIndex = null;
358469
358506
  let obsPoints = null;
358470
- const featureIndices = null;
358507
+ let featureIds = null;
358471
358508
  if (!supportsTiling) {
358472
- [obsIndex, obsPoints] = await Promise.all([
358509
+ [obsIndex, obsPoints, featureIds] = await Promise.all([
358473
358510
  this.loadObsIndex(),
358474
- this.loadPoints()
358511
+ this.loadPoints(),
358512
+ this.loadPointsFeatureIds()
358475
358513
  ]);
358476
358514
  }
358477
358515
  return new LoaderResult({
358478
- /* obsIndex: ["1"], // TEMP
358479
- obsPoints: { // TEMP
358480
- shape: [2, 1],
358481
- data: [[0], [0]],
358482
- }, */
358483
358516
  // These will be null if tiling is supported.
358484
358517
  obsIndex,
358485
358518
  obsPoints,
358486
- featureIndices,
358519
+ featureIds,
358487
358520
  obsPointsModelMatrix: modelMatrix2,
358488
358521
  // Return 'tiled' if the morton_code_2d column
358489
358522
  // and bounding_box metadata are present,
@@ -374884,14 +374917,13 @@ class SpatialDataPointsSource extends SpatialDataTableSource {
374884
374917
  * shape: [number, number],
374885
374918
  * }>} A promise for a zarr array containing the data.
374886
374919
  */
374887
- async loadPoints(elementPath, featureIndexColumnNameFromOptions) {
374920
+ async loadPoints(elementPath) {
374888
374921
  const parquetPath = getParquetPath(elementPath);
374889
374922
  const zattrs = await this.loadSpatialDataElementAttrs(elementPath);
374890
- const { axes, spatialdata_attrs: spatialDataAttrs } = zattrs;
374923
+ const { axes } = zattrs;
374891
374924
  const normAxes = normalizeAxes(axes);
374892
374925
  const axisNames = normAxes.map((axis2) => axis2.name);
374893
- const { feature_key: featureKey } = spatialDataAttrs;
374894
- const columnNames = [...axisNames, featureKey].filter(Boolean);
374926
+ const columnNames = axisNames.filter(Boolean);
374895
374927
  const arrowTable = await this.loadParquetTable(parquetPath, columnNames);
374896
374928
  const axisColumnArrs = axisNames.map((name2) => {
374897
374929
  const column2 = arrowTable.getChild(name2);
@@ -374905,6 +374937,30 @@ class SpatialDataPointsSource extends SpatialDataTableSource {
374905
374937
  data: axisColumnArrs
374906
374938
  };
374907
374939
  }
374940
+ /**
374941
+ *
374942
+ * @param {string} elementPath The path to the points element,
374943
+ * like "points/element_name".
374944
+ * @param {string|undefined} featureIndexColumnNameFromOptions The name
374945
+ * of the feature index column specified in the file definition options, if any.
374946
+ * @returns {Promise<number[]>} A promise for a zarr array containing the data.
374947
+ */
374948
+ async loadPointsFeatureIds(elementPath) {
374949
+ const parquetPath = getParquetPath(elementPath);
374950
+ const zattrs = await this.loadSpatialDataElementAttrs(elementPath);
374951
+ const { spatialdata_attrs: spatialDataAttrs } = zattrs;
374952
+ const { feature_key: featureKey } = spatialDataAttrs;
374953
+ const columnNames = [featureKey];
374954
+ const arrowTable = await this.loadParquetTable(parquetPath, columnNames);
374955
+ const axisColumnArrs = columnNames.map((name2) => {
374956
+ const column2 = arrowTable.getChild(name2);
374957
+ if (!column2) {
374958
+ throw new Error(`Column "${name2}" not found in the arrow table.`);
374959
+ }
374960
+ return column2.toArray();
374961
+ });
374962
+ return axisColumnArrs[0];
374963
+ }
374908
374964
  /**
374909
374965
  *
374910
374966
  * @param {string} elementPath
@@ -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, aE as useEventCallback, ao as jsxRuntimeExports, aF as GLSL3, am as BackSide } from "./index-B-aCUFst.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, aE as useEventCallback, ao as jsxRuntimeExports, aF as GLSL3, am as BackSide } from "./index-DKpg3n-y.js";
2
2
  import { useRef, useState, useMemo, useEffect, Suspense } from "react";
3
- import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-BpeUSyh9.js";
3
+ import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-DcLq7d8o.js";
4
4
  const LogLevel = {
5
5
  INFO: "info",
6
6
  WARN: "warn",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { bR, bP, bN, bQ, bO, bM, bS } from "./index-B-aCUFst.js";
1
+ import { bR, bP, bN, bQ, bO, bM, bS } from "./index-DKpg3n-y.js";
2
2
  import { useComplexCoordination, useComplexCoordinationSecondary, useCoordination, useCoordinationScopes, useCoordinationScopesBy, useGridItemSize, useMultiCoordinationScopesNonNull, useMultiCoordinationScopesSecondaryNonNull, usePageModeView } from "@vitessce/vit-s";
3
3
  export {
4
4
  bR as PluginAsyncFunction,
@@ -1,4 +1,4 @@
1
- import { aX as BaseDecoder } from "./index-B-aCUFst.js";
1
+ import { aX as BaseDecoder } from "./index-DKpg3n-y.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 { aG as getDefaultExportFromCjs, aX as BaseDecoder, aY as LercParameters, aZ as LercAddCompression } from "./index-B-aCUFst.js";
2
+ import { aG as getDefaultExportFromCjs, aX as BaseDecoder, aY as LercParameters, aZ as LercAddCompression } from "./index-DKpg3n-y.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { aX as BaseDecoder } from "./index-B-aCUFst.js";
1
+ import { aX as BaseDecoder } from "./index-DKpg3n-y.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 { aX as BaseDecoder } from "./index-B-aCUFst.js";
1
+ import { aX as BaseDecoder } from "./index-DKpg3n-y.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { aX as BaseDecoder } from "./index-B-aCUFst.js";
1
+ import { aX as BaseDecoder } from "./index-DKpg3n-y.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { bH as MeshDistanceMaterial, bI as MeshDepthMaterial, bJ as RGBADepthPacking, ae as UniformsUtils, bK 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, bL as InstancedBufferAttribute } from "./index-B-aCUFst.js";
1
+ import { bH as MeshDistanceMaterial, bI as MeshDepthMaterial, bJ as RGBADepthPacking, ae as UniformsUtils, bK 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, bL as InstancedBufferAttribute } from "./index-DKpg3n-y.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 { aX as BaseDecoder } from "./index-B-aCUFst.js";
1
+ import { aX as BaseDecoder } from "./index-DKpg3n-y.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.9.1",
3
+ "version": "3.9.2",
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.9.1",
21
- "@vitessce/abstract": "3.9.1",
22
- "@vitessce/constants-internal": "3.9.1",
23
- "@vitessce/error": "3.9.1",
24
- "@vitessce/description": "3.9.1",
25
- "@vitessce/feature-list": "3.9.1",
26
- "@vitessce/genomic-profiles": "3.9.1",
27
- "@vitessce/csv": "3.9.1",
28
- "@vitessce/heatmap": "3.9.1",
29
- "@vitessce/json": "3.9.1",
30
- "@vitessce/layer-controller": "3.9.1",
31
- "@vitessce/link-controller": "3.9.1",
32
- "@vitessce/glb": "3.9.1",
33
- "@vitessce/obs-sets-manager": "3.9.1",
34
- "@vitessce/ome-tiff": "3.9.1",
35
- "@vitessce/layer-controller-beta": "3.9.1",
36
- "@vitessce/plugins": "3.9.1",
37
- "@vitessce/scatterplot-gating": "3.9.1",
38
- "@vitessce/scatterplot-embedding": "3.9.1",
39
- "@vitessce/schemas": "3.9.1",
40
- "@vitessce/statistical-plots": "3.9.1",
41
- "@vitessce/spatial": "3.9.1",
42
- "@vitessce/spatial-beta": "3.9.1",
43
- "@vitessce/vit-s": "3.9.1",
44
- "@vitessce/status": "3.9.1",
45
- "@vitessce/zarr": "3.9.1",
46
- "@vitessce/spatial-zarr": "3.9.1",
47
- "@vitessce/globals": "3.9.1",
48
- "@vitessce/spatial-three": "3.9.1",
49
- "@vitessce/spatial-accelerated": "3.9.1",
50
- "@vitessce/biomarker-select": "3.9.1",
51
- "@vitessce/neuroglancer": "3.9.1"
20
+ "@vitessce/constants-internal": "3.9.2",
21
+ "@vitessce/abstract": "3.9.2",
22
+ "@vitessce/styles": "3.9.2",
23
+ "@vitessce/error": "3.9.2",
24
+ "@vitessce/csv": "3.9.2",
25
+ "@vitessce/description": "3.9.2",
26
+ "@vitessce/genomic-profiles": "3.9.2",
27
+ "@vitessce/feature-list": "3.9.2",
28
+ "@vitessce/heatmap": "3.9.2",
29
+ "@vitessce/glb": "3.9.2",
30
+ "@vitessce/json": "3.9.2",
31
+ "@vitessce/layer-controller": "3.9.2",
32
+ "@vitessce/layer-controller-beta": "3.9.2",
33
+ "@vitessce/plugins": "3.9.2",
34
+ "@vitessce/obs-sets-manager": "3.9.2",
35
+ "@vitessce/ome-tiff": "3.9.2",
36
+ "@vitessce/link-controller": "3.9.2",
37
+ "@vitessce/scatterplot-gating": "3.9.2",
38
+ "@vitessce/scatterplot-embedding": "3.9.2",
39
+ "@vitessce/spatial": "3.9.2",
40
+ "@vitessce/schemas": "3.9.2",
41
+ "@vitessce/statistical-plots": "3.9.2",
42
+ "@vitessce/status": "3.9.2",
43
+ "@vitessce/vit-s": "3.9.2",
44
+ "@vitessce/globals": "3.9.2",
45
+ "@vitessce/spatial-beta": "3.9.2",
46
+ "@vitessce/spatial-zarr": "3.9.2",
47
+ "@vitessce/spatial-three": "3.9.2",
48
+ "@vitessce/zarr": "3.9.2",
49
+ "@vitessce/spatial-accelerated": "3.9.2",
50
+ "@vitessce/biomarker-select": "3.9.2",
51
+ "@vitessce/neuroglancer": "3.9.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^18.0.28",