@vitessce/dev 3.9.0 → 3.9.1

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 { aI as getDefaultExportFromCjs, aJ as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aK as PCFSoftShadowMap, aL as VSMShadowMap, aM as PCFShadowMap, aN as BasicShadowMap, aO as NoToneMapping, aP as ACESFilmicToneMapping, e as Vector3, V as Vector2, aQ as Clock, aR as WebGLRenderer, aS as Camera, x as BufferGeometry, r as Material, aT as Layers, a1 as Texture, aE as RGBAFormat, az as UnsignedByteType, C as Color, aj as _extends, aU as THREE, aV as EventDispatcher, aW as MOUSE, aX as TOUCH, aY as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-P1FfHDqS.js";
1
+ import { aI as getDefaultExportFromCjs, aJ as Raycaster, W as OrthographicCamera, K as PerspectiveCamera, av as Scene, aK as PCFSoftShadowMap, aL as VSMShadowMap, aM as PCFShadowMap, aN as BasicShadowMap, aO as NoToneMapping, aP as ACESFilmicToneMapping, e as Vector3, V as Vector2, aQ as Clock, aR as WebGLRenderer, aS as Camera, x as BufferGeometry, r as Material, aT as Layers, a1 as Texture, aE as RGBAFormat, az as UnsignedByteType, C as Color, aj as _extends, aU as THREE, aV as EventDispatcher, aW as MOUSE, aX as TOUCH, aY as Spherical, Q as Quaternion, an as Ray, ak as Plane } from "./index-D4RkbvuW.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,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { aI as getDefaultExportFromCjs, b3 as requireAssign, b4 as require_export, b5 as require_core, b6 as require_fails, b7 as require_toObject, b8 as require_objectKeys, b9 as require_cof, ba as require_wks, bb as require_iterators, bc as requireWeb_dom_iterable, bd as requireEs6_string_iterator, be as require_anObject, bf as require_hide, bg as require_ctx, bh as require_toLength, bi as require_global, bj as require_objectDp, bk as require_descriptors, bl as require_isObject, bm as require_objectCreate, bn as require_iterDefine, bo as require_iterStep, bp as require_meta, bq as require_isArray, br as require_iobject, bs as require_setToStringTag, bt as require_aFunction, bu as requireIterator, bv as require_propertyDesc, bw as require_root, bx as require_baseGetTag, by as requireIsObjectLike, bz as requireIsObject, bA as requireEs6_symbol, bB as requireDefineProperty, bC as require_toIobject, bD as require_objectGopd, bE as require_html, bF as require_domCreate, bG as require_library, bH as requireSymbol, bI as require_objectPie, bJ as require_has, bK as require_redefine, bL as require_objectAssign, bM as diffCameraState, ao as jsxRuntimeExports } from "./index-P1FfHDqS.js";
4
+ import { aI as getDefaultExportFromCjs, b3 as requireAssign, b4 as require_export, b5 as require_core, b6 as require_fails, b7 as require_toObject, b8 as require_objectKeys, b9 as require_cof, ba as require_wks, bb as require_iterators, bc as requireWeb_dom_iterable, bd as requireEs6_string_iterator, be as require_anObject, bf as require_hide, bg as require_ctx, bh as require_toLength, bi as require_global, bj as require_objectDp, bk as require_descriptors, bl as require_isObject, bm as require_objectCreate, bn as require_iterDefine, bo as require_iterStep, bp as require_meta, bq as require_isArray, br as require_iobject, bs as require_setToStringTag, bt as require_aFunction, bu as requireIterator, bv as require_propertyDesc, bw as require_root, bx as require_baseGetTag, by as requireIsObjectLike, bz as requireIsObject, bA as requireEs6_symbol, bB as requireDefineProperty, bC as require_toIobject, bD as require_objectGopd, bE as require_html, bF as require_domCreate, bG as require_library, bH as requireSymbol, bI as require_objectPie, bJ as require_has, bK as require_redefine, bL as require_objectAssign, bM as diffCameraState, ao as jsxRuntimeExports } from "./index-D4RkbvuW.js";
5
5
  import React__default from "react";
6
6
  var assignExports = requireAssign();
7
7
  const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { aZ as BaseDecoder } from "./index-P1FfHDqS.js";
2
+ import { aZ as BaseDecoder } from "./index-D4RkbvuW.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 { b0 as commonjsGlobal$1, b1 as requireObjectAssign, aI as getDefaultExportFromCjs$1, b2 as earcut } from "./index-P1FfHDqS.js";
4
+ import { b0 as commonjsGlobal$1, b1 as requireObjectAssign, aI as getDefaultExportFromCjs$1, b2 as earcut } from "./index-D4RkbvuW.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, ay as atLeastLogLevel, ar as Data3DTexture, as as RedFormat, az as UnsignedByteType, l as LinearFilter, aA as RedIntegerFormat, aB as UnsignedIntType, m as NearestFilter, aC as LogLevel, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aD as WebGLMultipleRenderTargets, aE as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aF as PlaneGeometry, aG as useEventCallback, ao as jsxRuntimeExports, aH as GLSL3, am as BackSide } from "./index-P1FfHDqS.js";
1
+ import { aw as log, ax as isEqual, ay as atLeastLogLevel, ar as Data3DTexture, as as RedFormat, az as UnsignedByteType, l as LinearFilter, aA as RedIntegerFormat, aB as UnsignedIntType, m as NearestFilter, aC as LogLevel, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aD as WebGLMultipleRenderTargets, aE as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aF as PlaneGeometry, aG as useEventCallback, ao as jsxRuntimeExports, aH as GLSL3, am as BackSide } from "./index-D4RkbvuW.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-XnzJtnMh.js";
3
+ import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-tHA8Hk-K.js";
4
4
  const BRICK_SIZE = 32;
5
5
  const BRICK_CACHE_SIZE_X = 64;
6
6
  const BRICK_CACHE_SIZE_Y = 64;
@@ -1345,7 +1345,7 @@ const COMPONENT_COORDINATION_TYPES = {
1345
1345
  CoordinationType$2.HIERARCHY_LEVELS
1346
1346
  ]
1347
1347
  };
1348
- const version$6 = "3.9.0";
1348
+ const version$6 = "3.9.1";
1349
1349
  const META_VERSION = {
1350
1350
  version: version$6
1351
1351
  };
@@ -82356,7 +82356,9 @@ const obsSegmentationsSpatialdataSchema = z.object({
82356
82356
  const obsPointsSpatialdataSchema = z.object({
82357
82357
  path: z.string().describe("The path to the point data."),
82358
82358
  tablePath: z.string().optional().describe("The path to a table which annotates the points. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected."),
82359
- coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.')
82359
+ coordinateSystem: z.string().optional().describe('The name of a coordinate transformation output used to transform the image. If not provided, the "global" coordinate system is assumed.'),
82360
+ featureIndexColumn: z.string().optional().describe("The name of the column in the table which contains the feature (e.g., gene) indices associated with each point (aligned with the table var.index dataframe column)."),
82361
+ mortonCodeColumn: z.string().optional().describe('The name of the column in the table which contains the Morton codes for each point, used for efficient spatial querying. If not provided, Vitessce will assume the default column name "morton_code_2d".')
82360
82362
  });
82361
82363
  z.object({
82362
82364
  path: z.string(),
@@ -91525,7 +91527,7 @@ function initialize$2(config3, jointFileTypes, coordinationTypes, viewTypes) {
91525
91527
  return assignViewUids(newConfig);
91526
91528
  }
91527
91529
  function VitS(props) {
91528
- const { config: config3, stores, rowHeight, height: height2, theme, onWarn, onConfigChange, onLoaderChange, validateConfig = true, validateOnConfigChange = false, isBounded = false, uid: uid2 = null, styleContainer, remountOnUidChange = true, viewTypes: viewTypesProp, fileTypes: fileTypesProp, jointFileTypes: jointFileTypesProp, coordinationTypes: coordinationTypesProp, asyncFunctions: asyncFunctionsProp, warning: warning2, pageMode = false, children: children3, debugMode = DEFAULT_DEBUG_MODE, logLevel = DEFAULT_LOG_LEVEL } = props;
91530
+ const { config: config3, stores: storesProp, rowHeight, height: height2, theme, onWarn, onConfigChange, onLoaderChange, validateConfig = true, validateOnConfigChange = false, isBounded = false, uid: uid2 = null, styleContainer, remountOnUidChange = true, viewTypes: viewTypesProp, fileTypes: fileTypesProp, jointFileTypes: jointFileTypesProp, coordinationTypes: coordinationTypesProp, asyncFunctions: asyncFunctionsProp, warning: warning2, pageMode = false, children: children3, debugMode = DEFAULT_DEBUG_MODE, logLevel = DEFAULT_LOG_LEVEL } = props;
91529
91531
  const [debugErrors, setDebugErrors] = useState([]);
91530
91532
  const viewTypes = useMemo$1(() => viewTypesProp || [], [viewTypesProp]);
91531
91533
  const fileTypes = useMemo$1(() => fileTypesProp || [], [fileTypesProp]);
@@ -91545,6 +91547,30 @@ function VitS(props) {
91545
91547
  return JSON.stringify(config3);
91546
91548
  }, [config3]);
91547
91549
  const pluginSpecificConfigSchema = useMemo$1(() => buildConfigSchema(fileTypes, jointFileTypes, coordinationTypes, viewTypes), [viewTypes, fileTypes, jointFileTypes, coordinationTypes]);
91550
+ const mergedStores = useMemo$1(() => {
91551
+ const result = storesProp ?? {};
91552
+ const urlMap = /* @__PURE__ */ new Map();
91553
+ if (Array.isArray(config3.datasets)) {
91554
+ config3.datasets.forEach((dataset) => {
91555
+ dataset.files?.forEach((file) => {
91556
+ if (file.fileType?.endsWith(".zip") && file.url) {
91557
+ if (!urlMap.has(file.url)) {
91558
+ urlMap.set(file.url, file.requestInit);
91559
+ }
91560
+ }
91561
+ });
91562
+ });
91563
+ }
91564
+ urlMap.forEach((requestInit2, url) => {
91565
+ if (!result[url]) {
91566
+ result[url] = ZipFileStore.fromUrl(url, {
91567
+ overrides: requestInit2,
91568
+ transformEntries: transformEntriesForZipFileStore
91569
+ });
91570
+ }
91571
+ });
91572
+ return result;
91573
+ }, [configKey]);
91548
91574
  const [configOrWarning, success] = useMemo$1(() => {
91549
91575
  if (warning2) {
91550
91576
  return [warning2, false];
@@ -91627,7 +91653,7 @@ function VitS(props) {
91627
91653
  }, [success, configKey, configOrWarning, onConfigChange]);
91628
91654
  const createViewConfigStoreClosure = useCallback(() => {
91629
91655
  if (success) {
91630
- const loaders = createLoaders(configOrWarning.datasets, configOrWarning.description, fileTypes, coordinationTypes, stores, queryClient);
91656
+ const loaders = createLoaders(configOrWarning.datasets, configOrWarning.description, fileTypes, coordinationTypes, mergedStores, queryClient);
91631
91657
  return createViewConfigStore(loaders, configOrWarning);
91632
91658
  }
91633
91659
  return createViewConfigStore(null, null);
@@ -91635,7 +91661,7 @@ function VitS(props) {
91635
91661
  if (debugMode && debugErrors.length > 0) {
91636
91662
  return jsxRuntimeExports.jsx(CacheProvider, { value: muiCache, children: jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: jsxRuntimeExports.jsx(DebugWindow, { debugErrors }) }) });
91637
91663
  }
91638
- return success ? jsxRuntimeExports.jsx(CacheProvider, { value: muiCache, children: jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: jsxRuntimeExports.jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: jsxRuntimeExports.jsx(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: jsxRuntimeExports.jsxs(AsyncFunctionsContext.Provider, { value: asyncFunctions, children: [jsxRuntimeExports.jsx(VitessceGrid, { pageMode, success, configKey, viewTypes, fileTypes, coordinationTypes, config: configOrWarning, rowHeight, height: height2, theme, isBounded, stores, queryClient, children: children3 }), jsxRuntimeExports.jsx(CallbackPublisher, { onWarn, onConfigChange, onLoaderChange, validateOnConfigChange, pluginSpecificConfigSchema })] }) }) }, remountOnUidChange ? configKey : void 0) }) }) }) : jsxRuntimeExports.jsx(CacheProvider, { value: muiCache, children: jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: jsxRuntimeExports.jsx(Warning, { ...configOrWarning }) }) });
91664
+ return success ? jsxRuntimeExports.jsx(CacheProvider, { value: muiCache, children: jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: jsxRuntimeExports.jsx(QueryClientProvider, { client: queryClient, children: jsxRuntimeExports.jsx(ViewConfigProvider, { createStore: createViewConfigStoreClosure, children: jsxRuntimeExports.jsx(AuxiliaryProvider, { createStore: createAuxiliaryStore, children: jsxRuntimeExports.jsxs(AsyncFunctionsContext.Provider, { value: asyncFunctions, children: [jsxRuntimeExports.jsx(VitessceGrid, { pageMode, success, configKey, viewTypes, fileTypes, coordinationTypes, config: configOrWarning, rowHeight, height: height2, theme, isBounded, stores: mergedStores, queryClient, children: children3 }), jsxRuntimeExports.jsx(CallbackPublisher, { onWarn, onConfigChange, onLoaderChange, validateOnConfigChange, pluginSpecificConfigSchema })] }) }) }, remountOnUidChange ? configKey : void 0) }) }) }) : jsxRuntimeExports.jsx(CacheProvider, { value: muiCache, children: jsxRuntimeExports.jsx(ThemeProvider, { theme: muiTheme[theme], children: jsxRuntimeExports.jsx(Warning, { ...configOrWarning }) }) });
91639
91665
  }
91640
91666
  function FallbackForVitS(props) {
91641
91667
  const {
@@ -229036,22 +229062,22 @@ async function getDecoder(fileDirectory) {
229036
229062
  const Decoder = await importFn();
229037
229063
  return new Decoder(fileDirectory);
229038
229064
  }
229039
- addDecoder([void 0, 1], () => import("./raw-DgICW0IR.js").then((m2) => m2.default));
229040
- addDecoder(5, () => import("./lzw-CdFWMxJD.js").then((m2) => m2.default));
229065
+ addDecoder([void 0, 1], () => import("./raw-B9C7wwCT.js").then((m2) => m2.default));
229066
+ addDecoder(5, () => import("./lzw-BLhuO_Wm.js").then((m2) => m2.default));
229041
229067
  addDecoder(6, () => {
229042
229068
  throw new Error("old style JPEG compression is not supported.");
229043
229069
  });
229044
- addDecoder(7, () => import("./jpeg-B-cJrwmt.js").then((m2) => m2.default));
229045
- addDecoder([8, 32946], () => import("./deflate-0UC3wUc7.js").then((m2) => m2.default));
229046
- addDecoder(32773, () => import("./packbits-C-CYBJdL.js").then((m2) => m2.default));
229070
+ addDecoder(7, () => import("./jpeg-Bm_SJrtp.js").then((m2) => m2.default));
229071
+ addDecoder([8, 32946], () => import("./deflate-CB3_OBbG.js").then((m2) => m2.default));
229072
+ addDecoder(32773, () => import("./packbits-BJBaYgcY.js").then((m2) => m2.default));
229047
229073
  addDecoder(
229048
229074
  34887,
229049
- () => import("./lerc-BdcQu2oQ.js").then(async (m2) => {
229075
+ () => import("./lerc-dsrFlWfH.js").then(async (m2) => {
229050
229076
  await m2.zstd.init();
229051
229077
  return m2;
229052
229078
  }).then((m2) => m2.default)
229053
229079
  );
229054
- addDecoder(50001, () => import("./webimage-B0Qn48pR.js").then((m2) => m2.default));
229080
+ addDecoder(50001, () => import("./webimage-DgSczDFu.js").then((m2) => m2.default));
229055
229081
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
229056
229082
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
229057
229083
  }
@@ -270445,12 +270471,12 @@ class ErrorBoundary2 extends React__default.Component {
270445
270471
  }
270446
270472
  }
270447
270473
  const LazySpatialThree = React__default.lazy(async () => {
270448
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-B-7qLcpV.js");
270474
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-Rt4Kn4Ra.js");
270449
270475
  return { default: SpatialWrapper2 };
270450
270476
  });
270451
270477
  const SpatialThreeAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary2, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialThree, { ...props }) }) }) }));
270452
270478
  const LazySpatialAccelerated = React__default.lazy(async () => {
270453
- const { SpatialWrapper: SpatialWrapper2 } = await import("./index-4EtK005E.js");
270479
+ const { SpatialWrapper: SpatialWrapper2 } = await import("./index-ByJRcSWV.js");
270454
270480
  return { default: SpatialWrapper2 };
270455
270481
  });
270456
270482
  const SpatialAcceleratedAdapter = React__default.forwardRef((props, ref2) => jsxRuntimeExports.jsx("div", { ref: ref2, style: { width: "100%", height: "100%" }, children: jsxRuntimeExports.jsx(ErrorBoundary2, { children: jsxRuntimeExports.jsx(Suspense, { fallback: jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: jsxRuntimeExports.jsx(LazySpatialAccelerated, { ...props }) }) }) }));
@@ -282694,7 +282720,7 @@ function HiglassGlobalStyles(props) {
282694
282720
  }
282695
282721
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
282696
282722
  const LazyHiGlassComponent = React__default.lazy(async () => {
282697
- const { HiGlassComponent } = await import("./higlass-DTBEnOUt.js");
282723
+ const { HiGlassComponent } = await import("./higlass-C-cVw2J8.js");
282698
282724
  return { default: HiGlassComponent };
282699
282725
  });
282700
282726
  const HG_SIZE = 800;
@@ -285641,7 +285667,7 @@ function NeuroglancerGlobalStyles(props) {
285641
285667
  const { classes: classes2 } = props;
285642
285668
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalStyles$3, { styles: globalNeuroglancerCss }), jsxRuntimeExports.jsx(ScopedGlobalStyles, { styles: globalNeuroglancerStyles, parentClassName: classes2.neuroglancerWrapper })] });
285643
285669
  }
285644
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-BTLpuV09.js"));
285670
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-C8BcA6uO.js"));
285645
285671
  function createWorker() {
285646
285672
  return new WorkerFactory();
285647
285673
  }
@@ -373784,14 +373810,14 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
373784
373810
  * @returns {Promise} A promise for an array of columns.
373785
373811
  */
373786
373812
  async loadPoints() {
373787
- const { path: path2 } = this.options;
373813
+ const { path: path2, featureIndexColumn } = this.options;
373788
373814
  if (this.locations) {
373789
373815
  return this.locations;
373790
373816
  }
373791
373817
  let locations;
373792
373818
  const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
373793
373819
  if (formatVersion === "0.1") {
373794
- locations = await this.dataSource.loadPoints(path2);
373820
+ locations = await this.dataSource.loadPoints(path2, featureIndexColumn);
373795
373821
  } else {
373796
373822
  throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
373797
373823
  }
@@ -373799,11 +373825,11 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
373799
373825
  return this.locations;
373800
373826
  }
373801
373827
  async loadPointsInRect(bounds2, signal) {
373802
- const { path: path2 } = this.options;
373828
+ const { path: path2, featureIndexColumn, mortonCodeColumn } = this.options;
373803
373829
  let locations;
373804
373830
  const formatVersion = await this.dataSource.getPointsFormatVersion(path2);
373805
373831
  if (formatVersion === "0.1") {
373806
- locations = await this.dataSource.loadPointsInRect(path2, bounds2, signal);
373832
+ locations = await this.dataSource.loadPointsInRect(path2, bounds2, signal, featureIndexColumn, mortonCodeColumn);
373807
373833
  } else {
373808
373834
  throw new UnknownSpatialDataFormatError("Only points format version 0.1 is supported.");
373809
373835
  }
@@ -373822,15 +373848,17 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
373822
373848
  return null;
373823
373849
  }
373824
373850
  async supportsTiling() {
373825
- const { path: path2 } = this.options;
373826
- const [formatVersion, zattrs, hasRequiredColumnsAndRowGroupSize] = await Promise.all([
373851
+ const { path: path2, featureIndexColumn: featureIndexColumnNameFromOptions, mortonCodeColumn } = this.options;
373852
+ const zattrs = await this.dataSource.loadSpatialDataElementAttrs(path2);
373853
+ const { spatialdata_attrs: spatialDataAttrs } = zattrs;
373854
+ const { feature_key: featureKey } = spatialDataAttrs;
373855
+ const featureIndexColumnName = featureIndexColumnNameFromOptions ?? `${featureKey}_codes`;
373856
+ const [formatVersion, hasRequiredColumnsAndRowGroupSize] = await Promise.all([
373827
373857
  // Check the points format version.
373828
373858
  this.dataSource.getPointsFormatVersion(path2),
373829
- // Check for the presence of bounding_box metadata.
373830
- this.dataSource.loadSpatialDataElementAttrs(path2),
373831
373859
  // Check the size of parquet row groups,
373832
373860
  // and for the presence of morton_code_2d and feature_index columns.
373833
- this.dataSource.supportsLoadPointsInRect(path2)
373861
+ this.dataSource.supportsLoadPointsInRect(path2, featureIndexColumnName, mortonCodeColumn)
373834
373862
  ]);
373835
373863
  const isSupportedVersion = formatVersion === "0.1";
373836
373864
  const boundingBox = zattrs?.bounding_box;
@@ -383678,7 +383706,7 @@ async function _bisectRowGroupsRight({ queryClient, store }, parquetPath, column
383678
383706
  meta: { queryClient, store }
383679
383707
  });
383680
383708
  }
383681
- async function _rectToRowGroupIndices({ queryClient, store }, parquetPath, tileBbox, allPointsBbox) {
383709
+ async function _rectToRowGroupIndices({ queryClient, store }, parquetPath, tileBbox, allPointsBbox, mortonCodeColumnName) {
383682
383710
  return queryClient.fetchQuery({
383683
383711
  queryKey: ["SpatialDataTableSource", "_rectToRowGroupIndices", parquetPath, tileBbox, allPointsBbox],
383684
383712
  staleTime: Infinity,
@@ -383701,8 +383729,8 @@ async function _rectToRowGroupIndices({ queryClient, store }, parquetPath, tileB
383701
383729
  const [startMin, startMax] = mortonIntervals[startIndex];
383702
383730
  const [endMin, endMax] = mortonIntervals[endIndex];
383703
383731
  const [rowGroupIndexMin, rowGroupIndexMax] = await Promise.all([
383704
- _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, "morton_code_2d", startMin),
383705
- _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, "morton_code_2d", endMax)
383732
+ _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, mortonCodeColumnName, startMin),
383733
+ _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, mortonCodeColumnName, endMax)
383706
383734
  ]);
383707
383735
  if (rowGroupIndexMin === rowGroupIndexMax) {
383708
383736
  return [false, [rowGroupIndexMin]];
@@ -383724,8 +383752,8 @@ async function _rectToRowGroupIndices({ queryClient, store }, parquetPath, tileB
383724
383752
  if (startIndex === endIndex) {
383725
383753
  const [intervalMin, intervalMax] = mortonIntervals[startIndex];
383726
383754
  const [rowGroupIndexMin, rowGroupIndexMax] = await Promise.all([
383727
- _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, "morton_code_2d", intervalMin),
383728
- _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, "morton_code_2d", intervalMax)
383755
+ _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, mortonCodeColumnName, intervalMin),
383756
+ _bisectRowGroupsRight({ queryClient: queryClient2, store: store2 }, parquetPath, mortonCodeColumnName, intervalMax)
383729
383757
  ]);
383730
383758
  if (rowGroupIndexMin <= rowGroupIndexMax) {
383731
383759
  coveredRowGroupIndices = coveredRowGroupIndices.concat(range$b(rowGroupIndexMin, rowGroupIndexMax + 1));
@@ -384052,7 +384080,7 @@ class SpatialDataTableSource extends AnnDataSource {
384052
384080
  this.varAliases[varPath] = this.varAliases[varPath].map((val, ind) => val ? val.concat(` (${index2[ind]})`) : index2[ind]);
384053
384081
  return this.varAliases[varPath];
384054
384082
  }
384055
- async _supportsTiledPoints(parquetPath) {
384083
+ async _supportsTiledPoints(parquetPath, featureIndexColumnName, mortonCodeColumn) {
384056
384084
  const { queryClient } = this;
384057
384085
  const { store } = this.storeRoot;
384058
384086
  const allMetadata = await _loadParquetMetadataByPart({ queryClient, store }, parquetPath);
@@ -384064,7 +384092,8 @@ class SpatialDataTableSource extends AnnDataSource {
384064
384092
  }
384065
384093
  return false;
384066
384094
  }
384067
- const requiredColumns = ["x", "y", "feature_index", "morton_code_2d"];
384095
+ const mortonCodeColumnName = mortonCodeColumn ?? "morton_code_2d";
384096
+ const requiredColumns = ["x", "y", featureIndexColumnName, mortonCodeColumnName];
384068
384097
  const hasColumns = allMetadata?.schema?.fields?.map((f2) => f2.name);
384069
384098
  if (!hasColumns) {
384070
384099
  return false;
@@ -384083,9 +384112,10 @@ class SpatialDataTableSource extends AnnDataSource {
384083
384112
  * @param {string[]|undefined} columns An optional list of column names to load.
384084
384113
  * @returns
384085
384114
  */
384086
- async loadParquetTableInRect(parquetPath, tileBbox, allPointsBbox, signal) {
384115
+ async loadParquetTableInRect(parquetPath, tileBbox, allPointsBbox, signal, featureIndexColumnName, mortonCodeColumn) {
384087
384116
  const { queryClient } = this;
384088
384117
  const { store } = this.storeRoot;
384118
+ const mortonCodeColumnName = mortonCodeColumn ?? "morton_code_2d";
384089
384119
  const TILE_SIZE2 = 256;
384090
384120
  let tileBboxes = [];
384091
384121
  if (tileBbox.right - tileBbox.left > TILE_SIZE2 || tileBbox.bottom - tileBbox.top > TILE_SIZE2) {
@@ -384107,7 +384137,7 @@ class SpatialDataTableSource extends AnnDataSource {
384107
384137
  } else {
384108
384138
  tileBboxes = [tileBbox];
384109
384139
  }
384110
- const rowGroupIndicesPerTile = await Promise.all(tileBboxes.map(async (subTileBbox) => _rectToRowGroupIndices({ queryClient, store }, parquetPath, subTileBbox, allPointsBbox)));
384140
+ const rowGroupIndicesPerTile = await Promise.all(tileBboxes.map(async (subTileBbox) => _rectToRowGroupIndices({ queryClient, store }, parquetPath, subTileBbox, allPointsBbox, mortonCodeColumnName)));
384111
384141
  const uniqueCoveredRowGroupIndices = Array.from(new Set(rowGroupIndicesPerTile.flat())).toSorted((a2, b2) => a2 - b2);
384112
384142
  const allMetadata = await _loadParquetMetadataByPart({ queryClient, store }, parquetPath);
384113
384143
  const { numRowsPerGroup } = allMetadata;
@@ -384121,7 +384151,7 @@ class SpatialDataTableSource extends AnnDataSource {
384121
384151
  rowGroupTables.forEach((table2) => {
384122
384152
  const xColumn = table2.getChild("x");
384123
384153
  const yColumn = table2.getChild("y");
384124
- const featureIndexColumn = table2.getChild("feature_index");
384154
+ const featureIndexColumn = table2.getChild(featureIndexColumnName);
384125
384155
  if (!xColumn || !yColumn || !featureIndexColumn) {
384126
384156
  throw new Error(`Missing required column in parquet table at ${parquetPath}. Required columns: x, y, feature_index`);
384127
384157
  }
@@ -390273,7 +390303,7 @@ class SpatialDataPointsSource extends SpatialDataTableSource {
390273
390303
  * shape: [number, number],
390274
390304
  * }>} A promise for a zarr array containing the data.
390275
390305
  */
390276
- async loadPoints(elementPath) {
390306
+ async loadPoints(elementPath, featureIndexColumnNameFromOptions) {
390277
390307
  const parquetPath = getParquetPath(elementPath);
390278
390308
  const zattrs = await this.loadSpatialDataElementAttrs(elementPath);
390279
390309
  const { axes, spatialdata_attrs: spatialDataAttrs } = zattrs;
@@ -390303,23 +390333,25 @@ class SpatialDataPointsSource extends SpatialDataTableSource {
390303
390333
  * shape: [number, number],
390304
390334
  * }>} A promise for a zarr array containing the data.
390305
390335
  */
390306
- async loadPointsInRect(elementPath, tileBbox, signal) {
390336
+ async loadPointsInRect(elementPath, tileBbox, signal, featureIndexColumnNameFromOptions, mortonCodeColumn) {
390307
390337
  const parquetPath = getParquetPath(elementPath);
390308
390338
  const zattrs = await this.loadSpatialDataElementAttrs(elementPath);
390309
390339
  const {
390310
390340
  // axes,
390311
- // spatialdata_attrs: spatialDataAttrs,
390341
+ spatialdata_attrs: spatialDataAttrs,
390312
390342
  // The bounding box (extent) of all points.
390313
390343
  // Required for un-normalization from uints back to floats.
390314
390344
  // TODO: decide whether these will be stored here or somewhere else.
390315
390345
  // Reference: https://github.com/vitessce/vitessce-python/pull/476#issuecomment-3362656956
390316
390346
  bounding_box: allPointsBbox
390317
390347
  } = zattrs;
390318
- return this.loadParquetTableInRect(parquetPath, tileBbox, allPointsBbox, signal);
390348
+ const { feature_key: featureKey } = spatialDataAttrs;
390349
+ const featureIndexColumnName = featureIndexColumnNameFromOptions ?? `${featureKey}_codes`;
390350
+ return this.loadParquetTableInRect(parquetPath, tileBbox, allPointsBbox, signal, featureIndexColumnName, mortonCodeColumn);
390319
390351
  }
390320
- async supportsLoadPointsInRect(elementPath) {
390352
+ async supportsLoadPointsInRect(elementPath, featureIndexColumnName, mortonCodeColumn) {
390321
390353
  const parquetPath = getParquetPath(elementPath);
390322
- return this._supportsTiledPoints(parquetPath);
390354
+ return this._supportsTiledPoints(parquetPath, featureIndexColumnName, mortonCodeColumn);
390323
390355
  }
390324
390356
  }
390325
390357
  class OmeTiffSource {
@@ -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-P1FfHDqS.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-D4RkbvuW.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-XnzJtnMh.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-tHA8Hk-K.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-Cz3t4bdh.js"), []);
5030
+ } = suspend(async () => import("./troika-three-text.esm-BkvTw-z2.js"), []);
5031
5031
  const invalidate = useThree(({
5032
5032
  invalidate: invalidate2
5033
5033
  }) => invalidate2);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c0, bX, bV, bW, c4, c5, bY, cg, ce, cc, cf, cd, bU, cb, bZ, bT, bS, c2, c8, c1, c3, c7, c6, b$, c9, ca, cl, co, ci, cp, cq, cj, cm, cn, ck, b_, ch } from "./index-P1FfHDqS.js";
1
+ import { c0, bX, bV, bW, c4, c5, bY, cg, ce, cc, cf, cd, bU, cb, bZ, bT, bS, c2, c8, c1, c3, c7, c6, b$, c9, ca, cl, co, ci, cp, cq, cj, cm, cn, ck, b_, ch } from "./index-D4RkbvuW.js";
2
2
  import "react";
3
3
  export {
4
4
  c0 as CoordinationLevel,
@@ -1,4 +1,4 @@
1
- import { aZ as BaseDecoder } from "./index-P1FfHDqS.js";
1
+ import { aZ as BaseDecoder } from "./index-D4RkbvuW.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 { aI as getDefaultExportFromCjs, aZ as BaseDecoder, a_ as LercParameters, a$ as LercAddCompression } from "./index-P1FfHDqS.js";
2
+ import { aI as getDefaultExportFromCjs, aZ as BaseDecoder, a_ as LercParameters, a$ as LercAddCompression } from "./index-D4RkbvuW.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { aZ as BaseDecoder } from "./index-P1FfHDqS.js";
1
+ import { aZ as BaseDecoder } from "./index-D4RkbvuW.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 { aZ as BaseDecoder } from "./index-P1FfHDqS.js";
1
+ import { aZ as BaseDecoder } from "./index-D4RkbvuW.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { aZ as BaseDecoder } from "./index-P1FfHDqS.js";
1
+ import { aZ as BaseDecoder } from "./index-D4RkbvuW.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { bN as MeshDistanceMaterial, bO as MeshDepthMaterial, bP as RGBADepthPacking, ae as UniformsUtils, bQ 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, aF as PlaneGeometry, x as BufferGeometry, aa as Float32BufferAttribute, bR as InstancedBufferAttribute } from "./index-P1FfHDqS.js";
1
+ import { bN as MeshDistanceMaterial, bO as MeshDepthMaterial, bP as RGBADepthPacking, ae as UniformsUtils, bQ 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, aF as PlaneGeometry, x as BufferGeometry, aa as Float32BufferAttribute, bR as InstancedBufferAttribute } from "./index-D4RkbvuW.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 { aZ as BaseDecoder } from "./index-P1FfHDqS.js";
1
+ import { aZ as BaseDecoder } from "./index-D4RkbvuW.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/dev",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -16,10 +16,10 @@
16
16
  "dist-tsc"
17
17
  ],
18
18
  "dependencies": {
19
- "@vitessce/all": "3.9.0",
20
- "@vitessce/config": "3.9.0",
21
- "@vitessce/constants": "3.9.0",
22
- "@vitessce/export-utils": "3.9.0"
19
+ "@vitessce/all": "3.9.1",
20
+ "@vitessce/config": "3.9.1",
21
+ "@vitessce/export-utils": "3.9.1",
22
+ "@vitessce/constants": "3.9.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@vitejs/plugin-react": "^4.5.0",