@vitessce/dev 3.6.10 → 3.6.12
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.
- package/dist/{ReactNeuroglancer-DmSpxUz2.js → ReactNeuroglancer-D0e-2I2W.js} +1 -1
- package/dist/{deflate-BeW_-drp.js → deflate-BUj6YN-D.js} +1 -1
- package/dist/{higlass-BnvfA_Ju.js → higlass-M_TEeQam.js} +1 -1
- package/dist/{index-Dz87k9HK.js → index-C2hCYQc3.js} +2 -2
- package/dist/{index-Cr2q7qvQ.js → index-DlMqI1iP.js} +227 -162
- package/dist/index.js +1 -1
- package/dist/{jpeg-BqN3hODs.js → jpeg-H7lIU7gC.js} +1 -1
- package/dist/{lerc-teu3lY5P.js → lerc-DDFqC4qD.js} +1 -1
- package/dist/{lzw-DemqF65k.js → lzw-CDpbQXzs.js} +1 -1
- package/dist/{packbits-DV-nsibU.js → packbits-CzE6Rw-_.js} +1 -1
- package/dist/{raw-BbBj4Aoj.js → raw-HTNHmwDt.js} +1 -1
- package/dist/{troika-three-text.esm-BtHhk0OO.js → troika-three-text.esm-EzcE6_dK.js} +1 -1
- package/dist/{webimage-SuGzu9KX.js → webimage-BVT-3iIv.js} +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, aV as requireAssign, aW as require_export, aX as require_core, aY as require_fails, aZ as require_toObject, a_ as require_objectKeys, a$ as require_cof, b0 as require_wks, b1 as require_iterators, b2 as requireWeb_dom_iterable, b3 as requireEs6_string_iterator, b4 as require_anObject, b5 as require_hide, b6 as require_ctx, b7 as require_toLength, b8 as require_global, b9 as require_objectDp, ba as require_descriptors, bb as require_isObject, bc as require_objectCreate, bd as require_iterDefine, be as require_iterStep, bf as require_meta, bg as require_isArray, bh as require_iobject, bi as require_setToStringTag, bj as require_aFunction, bk as requireIterator, bl as require_propertyDesc, bm as require_root, bn as require_baseGetTag, bo as requireIsObjectLike, bp as requireIsObject, bq as requireEs6_symbol, br as requireDefineProperty, bs as require_toIobject, bt as require_objectGopd, bu as require_html, bv as require_domCreate, bw as require_library, bx as requireSymbol, by as require_objectPie, bz as require_has, bA as require_redefine, bB as require_objectAssign, bC as getAugmentedNamespace, bD as requirePropTypes, aI as jsxRuntimeExports } from "./index-
|
|
1
|
+
import { g as getDefaultExportFromCjs, aV as requireAssign, aW as require_export, aX as require_core, aY as require_fails, aZ as require_toObject, a_ as require_objectKeys, a$ as require_cof, b0 as require_wks, b1 as require_iterators, b2 as requireWeb_dom_iterable, b3 as requireEs6_string_iterator, b4 as require_anObject, b5 as require_hide, b6 as require_ctx, b7 as require_toLength, b8 as require_global, b9 as require_objectDp, ba as require_descriptors, bb as require_isObject, bc as require_objectCreate, bd as require_iterDefine, be as require_iterStep, bf as require_meta, bg as require_isArray, bh as require_iobject, bi as require_setToStringTag, bj as require_aFunction, bk as requireIterator, bl as require_propertyDesc, bm as require_root, bn as require_baseGetTag, bo as requireIsObjectLike, bp as requireIsObject, bq as requireEs6_symbol, br as requireDefineProperty, bs as require_toIobject, bt as require_objectGopd, bu as require_html, bv as require_domCreate, bw as require_library, bx as requireSymbol, by as require_objectPie, bz as require_has, bA as require_redefine, bB as require_objectAssign, bC as getAugmentedNamespace, bD as requirePropTypes, aI as jsxRuntimeExports } from "./index-DlMqI1iP.js";
|
|
2
2
|
import React__default from "react";
|
|
3
3
|
var lib = {};
|
|
4
4
|
var assignExports = requireAssign();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { aP as BaseDecoder } from "./index-
|
|
2
|
+
import { aP as BaseDecoder } from "./index-DlMqI1iP.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 { aS as commonjsGlobal$1, aT as requireObjectAssign, g as getDefaultExportFromCjs$1, aU as earcut } from "./index-
|
|
4
|
+
import { aS as commonjsGlobal$1, aT as requireObjectAssign, g as getDefaultExportFromCjs$1, aU as earcut } from "./index-DlMqI1iP.js";
|
|
5
5
|
var promise = {};
|
|
6
6
|
var hasRequiredPromise;
|
|
7
7
|
function requirePromise() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs, R as Raycaster, O as OrthographicCamera, P as PerspectiveCamera, S as Scene, a as PCFSoftShadowMap, V as VSMShadowMap, b as PCFShadowMap, B as BasicShadowMap, N as NoToneMapping, A as ACESFilmicToneMapping, c as Vector3, d as Vector2, C as Clock, W as WebGLRenderer, e as Camera, f as BufferGeometry, M as Material, L as Layers, T as Texture, h as RGBAFormat, U as UnsignedByteType, i as Color, _ as _extends, j as THREE, G as Group, k as Matrix4, l as TrianglesDrawMode, m as TriangleFanDrawMode, n as TriangleStripDrawMode, o as REVISION, E as EventDispatcher, p as MOUSE, q as TOUCH, r as Spherical, Q as Quaternion, s as Ray$1, t as Plane, u as Loader, v as LoaderUtils, F as FileLoader, w as MeshPhysicalMaterial, x as SpotLight, y as PointLight, D as DirectionalLight, I as InstancedMesh, z as Object3D, H as TextureLoader, J as ImageBitmapLoader, K as BufferAttribute, X as InterleavedBuffer, Y as LinearMipmapLinearFilter, Z as NearestMipmapLinearFilter, $ as LinearMipmapNearestFilter, a0 as NearestMipmapNearestFilter, a1 as LinearFilter, a2 as NearestFilter, a3 as RepeatWrapping, a4 as MirroredRepeatWrapping, a5 as ClampToEdgeWrapping, a6 as PointsMaterial, a7 as LineBasicMaterial, a8 as MeshStandardMaterial, a9 as DoubleSide, aa as MeshBasicMaterial, ab as PropertyBinding, ac as SkinnedMesh, ad as Mesh, ae as LineSegments, af as Line$1, ag as LineLoop, ah as Points, ai as MathUtils, aj as Skeleton, ak as InterpolateDiscrete, al as InterpolateLinear, am as AnimationClip, an as Bone, ao as InterleavedBufferAttribute, ap as VectorKeyframeTrack, aq as QuaternionKeyframeTrack, ar as NumberKeyframeTrack, as as FrontSide, at as Interpolant, au as Box3, av as Sphere, aw as InstancedBufferGeometry, ax as Float32BufferAttribute, ay as InstancedInterleavedBuffer, az as WireframeGeometry, aA as ShaderMaterial, aB as UniformsUtils, aC as UniformsLib, aD as Vector4, aE as Line3, aF as SphereGeometry, aG as Triangle, aH as BackSide, aI as jsxRuntimeExports, aJ as Matrix3, aK as CoordinationType, aL as Data3DTexture, aM as RedFormat, aN as FloatType, aO as getImageSize } from "./index-
|
|
1
|
+
import { g as getDefaultExportFromCjs, R as Raycaster, O as OrthographicCamera, P as PerspectiveCamera, S as Scene, a as PCFSoftShadowMap, V as VSMShadowMap, b as PCFShadowMap, B as BasicShadowMap, N as NoToneMapping, A as ACESFilmicToneMapping, c as Vector3, d as Vector2, C as Clock, W as WebGLRenderer, e as Camera, f as BufferGeometry, M as Material, L as Layers, T as Texture, h as RGBAFormat, U as UnsignedByteType, i as Color, _ as _extends, j as THREE, G as Group, k as Matrix4, l as TrianglesDrawMode, m as TriangleFanDrawMode, n as TriangleStripDrawMode, o as REVISION, E as EventDispatcher, p as MOUSE, q as TOUCH, r as Spherical, Q as Quaternion, s as Ray$1, t as Plane, u as Loader, v as LoaderUtils, F as FileLoader, w as MeshPhysicalMaterial, x as SpotLight, y as PointLight, D as DirectionalLight, I as InstancedMesh, z as Object3D, H as TextureLoader, J as ImageBitmapLoader, K as BufferAttribute, X as InterleavedBuffer, Y as LinearMipmapLinearFilter, Z as NearestMipmapLinearFilter, $ as LinearMipmapNearestFilter, a0 as NearestMipmapNearestFilter, a1 as LinearFilter, a2 as NearestFilter, a3 as RepeatWrapping, a4 as MirroredRepeatWrapping, a5 as ClampToEdgeWrapping, a6 as PointsMaterial, a7 as LineBasicMaterial, a8 as MeshStandardMaterial, a9 as DoubleSide, aa as MeshBasicMaterial, ab as PropertyBinding, ac as SkinnedMesh, ad as Mesh, ae as LineSegments, af as Line$1, ag as LineLoop, ah as Points, ai as MathUtils, aj as Skeleton, ak as InterpolateDiscrete, al as InterpolateLinear, am as AnimationClip, an as Bone, ao as InterleavedBufferAttribute, ap as VectorKeyframeTrack, aq as QuaternionKeyframeTrack, ar as NumberKeyframeTrack, as as FrontSide, at as Interpolant, au as Box3, av as Sphere, aw as InstancedBufferGeometry, ax as Float32BufferAttribute, ay as InstancedInterleavedBuffer, az as WireframeGeometry, aA as ShaderMaterial, aB as UniformsUtils, aC as UniformsLib, aD as Vector4, aE as Line3, aF as SphereGeometry, aG as Triangle, aH as BackSide, aI as jsxRuntimeExports, aJ as Matrix3, aK as CoordinationType, aL as Data3DTexture, aM as RedFormat, aN as FloatType, aO as getImageSize } from "./index-DlMqI1iP.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import React__default, { useReducer, useRef, useEffect, useLayoutEffect, useDebugValue, useState, useMemo, forwardRef } from "react";
|
|
4
4
|
var constants = { exports: {} };
|
|
@@ -23637,7 +23637,7 @@ const Text = /* @__PURE__ */ React.forwardRef(({
|
|
|
23637
23637
|
const {
|
|
23638
23638
|
Text: TextMeshImpl,
|
|
23639
23639
|
preloadFont
|
|
23640
|
-
} = suspend(async () => import("./troika-three-text.esm-
|
|
23640
|
+
} = suspend(async () => import("./troika-three-text.esm-EzcE6_dK.js"), []);
|
|
23641
23641
|
const invalidate2 = useThree(({
|
|
23642
23642
|
invalidate: invalidate3
|
|
23643
23643
|
}) => invalidate3);
|
|
@@ -1324,7 +1324,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1324
1324
|
CoordinationType$2.HIERARCHY_LEVELS
|
|
1325
1325
|
]
|
|
1326
1326
|
};
|
|
1327
|
-
const version$6 = "3.6.
|
|
1327
|
+
const version$6 = "3.6.12";
|
|
1328
1328
|
const META_VERSION = {
|
|
1329
1329
|
version: version$6
|
|
1330
1330
|
};
|
|
@@ -2458,12 +2458,13 @@ class VitessceConfigDatasetFile {
|
|
|
2458
2458
|
* which may provide additional parameters to the loader class
|
|
2459
2459
|
* corresponding to the specified fileType.
|
|
2460
2460
|
*/
|
|
2461
|
-
constructor(url, fileType, coordinationValues, options) {
|
|
2461
|
+
constructor(url, fileType, coordinationValues, options, requestInit2) {
|
|
2462
2462
|
this.file = {
|
|
2463
2463
|
url,
|
|
2464
2464
|
fileType,
|
|
2465
2465
|
...coordinationValues ? { coordinationValues } : {},
|
|
2466
|
-
...options ? { options } : {}
|
|
2466
|
+
...options ? { options } : {},
|
|
2467
|
+
...requestInit2 ? { requestInit: requestInit2 } : {}
|
|
2467
2468
|
};
|
|
2468
2469
|
}
|
|
2469
2470
|
/**
|
|
@@ -2504,6 +2505,7 @@ class VitessceConfigDataset {
|
|
|
2504
2505
|
let fileType;
|
|
2505
2506
|
let coordinationValues;
|
|
2506
2507
|
let options;
|
|
2508
|
+
let requestInit2;
|
|
2507
2509
|
if (args.length > 0) {
|
|
2508
2510
|
url = params2;
|
|
2509
2511
|
let dataType;
|
|
@@ -2517,12 +2519,13 @@ class VitessceConfigDataset {
|
|
|
2517
2519
|
url,
|
|
2518
2520
|
fileType,
|
|
2519
2521
|
options,
|
|
2520
|
-
coordinationValues
|
|
2522
|
+
coordinationValues,
|
|
2523
|
+
requestInit: requestInit2
|
|
2521
2524
|
} = params2);
|
|
2522
2525
|
} else {
|
|
2523
2526
|
throw new Error("Expected addFile argument to be an object.");
|
|
2524
2527
|
}
|
|
2525
|
-
this.dataset.files.push(new VitessceConfigDatasetFile(url, fileType, coordinationValues, options));
|
|
2528
|
+
this.dataset.files.push(new VitessceConfigDatasetFile(url, fileType, coordinationValues, options, requestInit2));
|
|
2526
2529
|
return this;
|
|
2527
2530
|
}
|
|
2528
2531
|
/**
|
|
@@ -2855,13 +2858,19 @@ class VitessceConfig {
|
|
|
2855
2858
|
* Add a new view to the config.
|
|
2856
2859
|
* @param {VitessceConfigDataset} dataset The dataset instance which defines the data
|
|
2857
2860
|
* that will be displayed in the view.
|
|
2858
|
-
* @param {string} component A component name, such as "scatterplot"
|
|
2859
|
-
*
|
|
2860
|
-
* @param {
|
|
2861
|
-
* @param {number} options.
|
|
2862
|
-
*
|
|
2863
|
-
* @param {number} options.
|
|
2864
|
-
*
|
|
2861
|
+
* @param {string} component A component name, such as "scatterplot"
|
|
2862
|
+
* or "spatial".
|
|
2863
|
+
* @param {object|undefined} options Extra options for the component.
|
|
2864
|
+
* @param {number|undefined} options.x The x-coordinate for the view
|
|
2865
|
+
* in the grid layout.
|
|
2866
|
+
* @param {number|undefined} options.y The y-coordinate for the view
|
|
2867
|
+
* in the grid layout.
|
|
2868
|
+
* @param {number|undefined} options.w The width for the view in the
|
|
2869
|
+
* grid layout.
|
|
2870
|
+
* @param {number|undefined} options.h The height for the view in the
|
|
2871
|
+
* grid layout.
|
|
2872
|
+
* @param {string|undefined} options.mapping A convenience parameter
|
|
2873
|
+
* for setting the EMBEDDING_TYPE
|
|
2865
2874
|
* coordination value. Only applicable if the component is "scatterplot".
|
|
2866
2875
|
* @returns {VitessceConfigView} A new view instance.
|
|
2867
2876
|
*/
|
|
@@ -87808,6 +87817,7 @@ const useTitleStyles = makeStyles()((theme) => ({
|
|
|
87808
87817
|
flexDirection: "row",
|
|
87809
87818
|
flexShrink: "0"
|
|
87810
87819
|
},
|
|
87820
|
+
// Note: This class is specified as the draggable handle for the grid layout.
|
|
87811
87821
|
titleLeft: {
|
|
87812
87822
|
flexShrink: "1",
|
|
87813
87823
|
textOverflow: "ellipsis",
|
|
@@ -87942,7 +87952,7 @@ function VitessceGrid(props) {
|
|
|
87942
87952
|
setViewConfig(newConfig);
|
|
87943
87953
|
setLoaders(newLoaders);
|
|
87944
87954
|
}, [success, configKey]);
|
|
87945
|
-
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes2.vitessceContainer), role: "group", "aria-label": altText, children: [jsxRuntimeExports.jsx(GridLayoutGlobalStyles, { classes: classes2 }), layout ? jsxRuntimeExports.jsx(VitessceGridLayout, { pageMode, role: "group", layout, height: height2, rowHeight, theme, viewTypes, fileTypes, coordinationTypes, stores, draggableHandle: titleClasses.
|
|
87955
|
+
return jsxRuntimeExports.jsxs("div", { ref: containerRef, className: clsx(VITESSCE_CONTAINER, classes2.vitessceContainer), role: "group", "aria-label": altText, children: [jsxRuntimeExports.jsx(GridLayoutGlobalStyles, { classes: classes2 }), layout ? jsxRuntimeExports.jsx(VitessceGridLayout, { pageMode, role: "group", layout, height: height2, rowHeight, theme, viewTypes, fileTypes, coordinationTypes, stores, draggableHandle: titleClasses.titleLeft, margin, padding: padding$2, onRemoveComponent: removeComponent, onLayoutChange: changeLayoutPostMount, isBounded, onResize: onResize4, onResizeStop: onResize4, children: children3 }) : null] });
|
|
87946
87956
|
}
|
|
87947
87957
|
const useStyles$y = makeStyles()((theme) => ({
|
|
87948
87958
|
warningLayout: {
|
|
@@ -223897,7 +223907,8 @@ const PIXELATED_TEXTURE_PARAMETERS = {
|
|
|
223897
223907
|
const GLSL_COLORMAPS = [
|
|
223898
223908
|
"plasma",
|
|
223899
223909
|
"viridis",
|
|
223900
|
-
"jet"
|
|
223910
|
+
"jet",
|
|
223911
|
+
"greys"
|
|
223901
223912
|
];
|
|
223902
223913
|
const GLSL_COLORMAP_DEFAULT = "plasma";
|
|
223903
223914
|
const COLORMAP_SHADER_PLACEHOLDER = "COLORMAP_FUNC";
|
|
@@ -225665,22 +225676,22 @@ async function getDecoder(fileDirectory) {
|
|
|
225665
225676
|
const Decoder = await importFn();
|
|
225666
225677
|
return new Decoder(fileDirectory);
|
|
225667
225678
|
}
|
|
225668
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
225669
|
-
addDecoder(5, () => import("./lzw-
|
|
225679
|
+
addDecoder([void 0, 1], () => import("./raw-HTNHmwDt.js").then((m2) => m2.default));
|
|
225680
|
+
addDecoder(5, () => import("./lzw-CDpbQXzs.js").then((m2) => m2.default));
|
|
225670
225681
|
addDecoder(6, () => {
|
|
225671
225682
|
throw new Error("old style JPEG compression is not supported.");
|
|
225672
225683
|
});
|
|
225673
|
-
addDecoder(7, () => import("./jpeg-
|
|
225674
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
225675
|
-
addDecoder(32773, () => import("./packbits-
|
|
225684
|
+
addDecoder(7, () => import("./jpeg-H7lIU7gC.js").then((m2) => m2.default));
|
|
225685
|
+
addDecoder([8, 32946], () => import("./deflate-BUj6YN-D.js").then((m2) => m2.default));
|
|
225686
|
+
addDecoder(32773, () => import("./packbits-CzE6Rw-_.js").then((m2) => m2.default));
|
|
225676
225687
|
addDecoder(
|
|
225677
225688
|
34887,
|
|
225678
|
-
() => import("./lerc-
|
|
225689
|
+
() => import("./lerc-DDFqC4qD.js").then(async (m2) => {
|
|
225679
225690
|
await m2.zstd.init();
|
|
225680
225691
|
return m2;
|
|
225681
225692
|
}).then((m2) => m2.default)
|
|
225682
225693
|
);
|
|
225683
|
-
addDecoder(50001, () => import("./webimage-
|
|
225694
|
+
addDecoder(50001, () => import("./webimage-BVT-3iIv.js").then((m2) => m2.default));
|
|
225684
225695
|
function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
|
|
225685
225696
|
return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
|
|
225686
225697
|
}
|
|
@@ -247549,6 +247560,9 @@ function Legend(props) {
|
|
|
247549
247560
|
featureSelectionLabelRawStr = featureSelectionLabelRaw?.[0];
|
|
247550
247561
|
} else if (featureAggregationStrategy === "last") {
|
|
247551
247562
|
featureSelectionLabelRawStr = featureSelectionLabelRaw?.at(-1);
|
|
247563
|
+
} else if (typeof featureAggregationStrategy === "number") {
|
|
247564
|
+
const i2 = featureAggregationStrategy;
|
|
247565
|
+
featureSelectionLabelRawStr = featureSelectionLabelRaw?.[i2];
|
|
247552
247566
|
} else if (featureAggregationStrategy === "sum") {
|
|
247553
247567
|
featureSelectionLabelRawStr = "Sum of features";
|
|
247554
247568
|
} else if (featureAggregationStrategy === "mean") {
|
|
@@ -247956,7 +247970,7 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
247956
247970
|
return [1, 10, 100];
|
|
247957
247971
|
}, [contourPercentiles, sortedWeights]);
|
|
247958
247972
|
const circleInfo = useMemo$1(() => {
|
|
247959
|
-
if (!originalViewState || !width2 || !height2) {
|
|
247973
|
+
if (!originalViewState || !width2 || !height2 || !xRange || !yRange) {
|
|
247960
247974
|
return null;
|
|
247961
247975
|
}
|
|
247962
247976
|
const center2 = [
|
|
@@ -247967,7 +247981,8 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
247967
247981
|
if (!(typeof scaleFactor === "number" && typeof center2[0] === "number" && typeof center2[1] === "number") || Number.isNaN(scaleFactor)) {
|
|
247968
247982
|
return null;
|
|
247969
247983
|
}
|
|
247970
|
-
const
|
|
247984
|
+
const size2 = Math.max(xRange, yRange);
|
|
247985
|
+
const radius2 = size2 * Math.sqrt(2) / 2 * 0.8;
|
|
247971
247986
|
const numPoints = 96;
|
|
247972
247987
|
const options = { steps: numPoints, units: "degrees" };
|
|
247973
247988
|
const circlePolygon = circle$5(center2, radius2, options);
|
|
@@ -247977,7 +247992,7 @@ function EmbeddingScatterplotSubscriber(props) {
|
|
|
247977
247992
|
polygon: circlePolygon,
|
|
247978
247993
|
steps: numPoints
|
|
247979
247994
|
};
|
|
247980
|
-
}, [originalViewState, width2, height2]);
|
|
247995
|
+
}, [originalViewState, width2, height2, xRange, yRange]);
|
|
247981
247996
|
const [alignedEmbeddingIndex, alignedEmbeddingData] = useMemo$1(() => {
|
|
247982
247997
|
if (obsEmbedding?.data && obsEmbeddingIndex && matrixObsIndex) {
|
|
247983
247998
|
const matrixIndexMap = new Map(matrixObsIndex.map((key2, i2) => [key2, i2]));
|
|
@@ -263306,6 +263321,61 @@ function abbreviateNumber(value2) {
|
|
|
263306
263321
|
return naive;
|
|
263307
263322
|
return value2.toExponential(0);
|
|
263308
263323
|
}
|
|
263324
|
+
class DAG {
|
|
263325
|
+
/**
|
|
263326
|
+
* DAG constructor.
|
|
263327
|
+
* @param {{ from: string, to: string, attributes: any}[]} edges
|
|
263328
|
+
*/
|
|
263329
|
+
constructor(edges) {
|
|
263330
|
+
this.graph = /* @__PURE__ */ new Map();
|
|
263331
|
+
this.edgeData = new InternMap$1([], JSON.stringify);
|
|
263332
|
+
edges.forEach((edge) => {
|
|
263333
|
+
const { from: from2, to } = edge;
|
|
263334
|
+
if (!this.graph.has(from2)) {
|
|
263335
|
+
this.graph.set(from2, []);
|
|
263336
|
+
}
|
|
263337
|
+
this.graph.get(from2).push(to);
|
|
263338
|
+
this.edgeData.set([from2, to], edge.attributes);
|
|
263339
|
+
});
|
|
263340
|
+
}
|
|
263341
|
+
/**
|
|
263342
|
+
* Find a path from start to end using DFS.
|
|
263343
|
+
* @param {string} start
|
|
263344
|
+
* @param {string} end
|
|
263345
|
+
* @returns {{ from: string, to: string, attributes: any }[] | null} Returns
|
|
263346
|
+
* the path as an array of edges or null if no path exists.
|
|
263347
|
+
*/
|
|
263348
|
+
findPath(start2, end2) {
|
|
263349
|
+
const path2 = [];
|
|
263350
|
+
const visited = /* @__PURE__ */ new Set();
|
|
263351
|
+
const dfs = (node2) => {
|
|
263352
|
+
if (node2 === end2) {
|
|
263353
|
+
return true;
|
|
263354
|
+
}
|
|
263355
|
+
visited.add(node2);
|
|
263356
|
+
const neighbors = this.graph.get(node2) || [];
|
|
263357
|
+
for (const neighbor of neighbors) {
|
|
263358
|
+
if (!visited.has(neighbor)) {
|
|
263359
|
+
path2.push([node2, neighbor]);
|
|
263360
|
+
if (dfs(neighbor)) {
|
|
263361
|
+
return true;
|
|
263362
|
+
}
|
|
263363
|
+
path2.pop();
|
|
263364
|
+
}
|
|
263365
|
+
}
|
|
263366
|
+
return false;
|
|
263367
|
+
};
|
|
263368
|
+
const found = dfs(start2);
|
|
263369
|
+
if (found) {
|
|
263370
|
+
return path2.map(([from2, to]) => ({
|
|
263371
|
+
from: from2,
|
|
263372
|
+
to,
|
|
263373
|
+
attributes: this.edgeData.get([from2, to])
|
|
263374
|
+
}));
|
|
263375
|
+
}
|
|
263376
|
+
return null;
|
|
263377
|
+
}
|
|
263378
|
+
}
|
|
263309
263379
|
function getSourceFromLoader(loader2, level) {
|
|
263310
263380
|
const { data: data2 } = loader2;
|
|
263311
263381
|
const source2 = Array.isArray(data2) ? data2[data2.length - 1] : data2;
|
|
@@ -263602,8 +263672,14 @@ function coordinateTransformationsToMatrix(coordinateTransformations, axes) {
|
|
|
263602
263672
|
}
|
|
263603
263673
|
} else if (spatialOutputAxes.length === 2) {
|
|
263604
263674
|
const nextMat = new Matrix4$1().fromArray([
|
|
263605
|
-
|
|
263606
|
-
|
|
263675
|
+
filteredAffine[0][0],
|
|
263676
|
+
filteredAffine[0][1],
|
|
263677
|
+
0,
|
|
263678
|
+
filteredAffine[0][2],
|
|
263679
|
+
filteredAffine[1][0],
|
|
263680
|
+
filteredAffine[1][1],
|
|
263681
|
+
0,
|
|
263682
|
+
filteredAffine[1][2],
|
|
263607
263683
|
0,
|
|
263608
263684
|
0,
|
|
263609
263685
|
1,
|
|
@@ -263619,6 +263695,7 @@ function coordinateTransformationsToMatrix(coordinateTransformations, axes) {
|
|
|
263619
263695
|
const swapMat = new Matrix4$1().fromArray(swapMatNested.flat());
|
|
263620
263696
|
mat = mat.multiplyLeft(swapMat);
|
|
263621
263697
|
}
|
|
263698
|
+
mat = mat.transpose();
|
|
263622
263699
|
} else {
|
|
263623
263700
|
throw new Error("Affine transformation must have 2 or 3 rows.");
|
|
263624
263701
|
}
|
|
@@ -263645,6 +263722,9 @@ function coordinateTransformationsToMatrix(coordinateTransformations, axes) {
|
|
|
263645
263722
|
}
|
|
263646
263723
|
});
|
|
263647
263724
|
}
|
|
263725
|
+
if (mat.some((value2) => Number.isNaN(value2))) {
|
|
263726
|
+
throw new Error("Matrix contains NaN values");
|
|
263727
|
+
}
|
|
263648
263728
|
return mat;
|
|
263649
263729
|
}
|
|
263650
263730
|
function hexToRgb(hex2) {
|
|
@@ -263663,41 +263743,22 @@ function normalizeAxes(axes) {
|
|
|
263663
263743
|
return axisInfo;
|
|
263664
263744
|
});
|
|
263665
263745
|
}
|
|
263746
|
+
function getIntrinsicCoordinateSystem(normAxes) {
|
|
263747
|
+
return normAxes.map((axis2) => axis2.name).join("");
|
|
263748
|
+
}
|
|
263666
263749
|
function normalizeCoordinateTransformations(coordinateTransformations, datasets) {
|
|
263667
263750
|
let result = [];
|
|
263668
263751
|
if (Array.isArray(coordinateTransformations)) {
|
|
263669
263752
|
result = coordinateTransformations.flatMap((transform3) => {
|
|
263670
263753
|
if (transform3.input && transform3.output) {
|
|
263671
263754
|
const { type: type2 } = transform3;
|
|
263672
|
-
if (type2 === "translation") {
|
|
263673
|
-
return {
|
|
263674
|
-
type: type2,
|
|
263675
|
-
translation: transform3.translation
|
|
263676
|
-
};
|
|
263677
|
-
}
|
|
263678
|
-
if (type2 === "scale") {
|
|
263679
|
-
return {
|
|
263680
|
-
type: type2,
|
|
263681
|
-
scale: transform3.scale
|
|
263682
|
-
};
|
|
263683
|
-
}
|
|
263684
|
-
if (type2 === "affine") {
|
|
263685
|
-
return {
|
|
263686
|
-
type: type2,
|
|
263687
|
-
affine: transform3.affine,
|
|
263688
|
-
// Affine transformations can potentially swap axes,
|
|
263689
|
-
// so we need to include the input and output axes.
|
|
263690
|
-
input: transform3.input,
|
|
263691
|
-
output: transform3.output
|
|
263692
|
-
};
|
|
263693
|
-
}
|
|
263694
|
-
if (type2 === "identity") {
|
|
263695
|
-
return { type: type2 };
|
|
263696
|
-
}
|
|
263697
263755
|
if (type2 === "sequence") {
|
|
263698
|
-
return normalizeCoordinateTransformations(transform3.transformations,
|
|
263756
|
+
return normalizeCoordinateTransformations(transform3.transformations, null);
|
|
263757
|
+
}
|
|
263758
|
+
if (type2 === "affine" || type2 === "translation" || type2 === "scale" || type2 === "identity") {
|
|
263759
|
+
return transform3;
|
|
263699
263760
|
}
|
|
263700
|
-
log$c.
|
|
263761
|
+
log$c.error(`Coordinate transformation type "${type2}" is not supported.`);
|
|
263701
263762
|
}
|
|
263702
263763
|
return transform3;
|
|
263703
263764
|
});
|
|
@@ -263710,6 +263771,27 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
|
|
|
263710
263771
|
}
|
|
263711
263772
|
return result;
|
|
263712
263773
|
}
|
|
263774
|
+
function coordinateTransformationsToMatrixForSpatialData(ngffMetadata, targetCoordinateSystem) {
|
|
263775
|
+
const { datasets, coordinateTransformations, axes } = ngffMetadata;
|
|
263776
|
+
const normAxes = normalizeAxes(axes);
|
|
263777
|
+
const intrinsicCoordinateSystem = getIntrinsicCoordinateSystem(normAxes);
|
|
263778
|
+
const edges = coordinateTransformations.map((ct) => ({
|
|
263779
|
+
from: ct.input.name,
|
|
263780
|
+
to: ct.output.name,
|
|
263781
|
+
attributes: ct
|
|
263782
|
+
}));
|
|
263783
|
+
const dag = new DAG(edges);
|
|
263784
|
+
const ctPath = dag.findPath(intrinsicCoordinateSystem, targetCoordinateSystem);
|
|
263785
|
+
if (!ctPath) {
|
|
263786
|
+
if (!coordinateTransformations.find((ct) => ct.output.name === targetCoordinateSystem)) {
|
|
263787
|
+
throw new Error(`No coordinate transformation found with output.name "${targetCoordinateSystem}".`);
|
|
263788
|
+
}
|
|
263789
|
+
throw new Error(`No path found from "${intrinsicCoordinateSystem}" to "${targetCoordinateSystem}".`);
|
|
263790
|
+
}
|
|
263791
|
+
const filteredTransformations = ctPath.map((ctEdge) => ctEdge.attributes);
|
|
263792
|
+
const normalizedTransformations = normalizeCoordinateTransformations(filteredTransformations, datasets);
|
|
263793
|
+
return coordinateTransformationsToMatrix(normalizedTransformations, normAxes);
|
|
263794
|
+
}
|
|
263713
263795
|
class NodeNotFoundError extends Error {
|
|
263714
263796
|
constructor(context2, options = {}) {
|
|
263715
263797
|
super(`Node not found: ${context2}`, options);
|
|
@@ -269092,7 +269174,7 @@ class ErrorBoundary2 extends React__default.Component {
|
|
|
269092
269174
|
}
|
|
269093
269175
|
}
|
|
269094
269176
|
const LazySpatialThree = React__default.lazy(async () => {
|
|
269095
|
-
const { SpatialWrapper: SpatialWrapper2 } = await import("./index-
|
|
269177
|
+
const { SpatialWrapper: SpatialWrapper2 } = await import("./index-C2hCYQc3.js");
|
|
269096
269178
|
return { default: SpatialWrapper2 };
|
|
269097
269179
|
});
|
|
269098
269180
|
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 }) }) }) }));
|
|
@@ -279624,7 +279706,7 @@ function HiglassGlobalStyles(props) {
|
|
|
279624
279706
|
}
|
|
279625
279707
|
register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
|
|
279626
279708
|
const LazyHiGlassComponent = React__default.lazy(async () => {
|
|
279627
|
-
const { HiGlassComponent } = await import("./higlass-
|
|
279709
|
+
const { HiGlassComponent } = await import("./higlass-M_TEeQam.js");
|
|
279628
279710
|
return { default: HiGlassComponent };
|
|
279629
279711
|
});
|
|
279630
279712
|
const HG_SIZE = 800;
|
|
@@ -282567,7 +282649,7 @@ function NeuroglancerGlobalStyles(props) {
|
|
|
282567
282649
|
const { classes: classes2 } = props;
|
|
282568
282650
|
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalStyles$3, { styles: globalNeuroglancerCss }), jsxRuntimeExports.jsx(ScopedGlobalStyles, { styles: globalNeuroglancerStyles, parentClassName: classes2.neuroglancerWrapper })] });
|
|
282569
282651
|
}
|
|
282570
|
-
const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-
|
|
282652
|
+
const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-D0e-2I2W.js"));
|
|
282571
282653
|
function createWorker() {
|
|
282572
282654
|
return new WorkerFactory();
|
|
282573
282655
|
}
|
|
@@ -336061,26 +336143,7 @@ function ExpressionHistogramSubscriber(props) {
|
|
|
336061
336143
|
return jsxRuntimeExports.jsx(TitleInfo, { title: `Histogram${firstGeneSelected ? ` (${firstGeneSelected})` : ""}`, closeButtonVisible, downloadButtonVisible, removeGridComponent, urls: urls2, theme, isReady, helpText, errors, children: jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes2.vegaContainer, children: jsxRuntimeExports.jsx(ExpressionHistogram, { geneSelection, obsType, featureType, featureValueType, onSelect, data: data2, theme, width: width2, height: height2 }) }) });
|
|
336062
336144
|
}
|
|
336063
336145
|
function DotPlot(props) {
|
|
336064
|
-
const {
|
|
336065
|
-
isStratified,
|
|
336066
|
-
transpose: transpose2,
|
|
336067
|
-
data: rawData,
|
|
336068
|
-
theme,
|
|
336069
|
-
width: width2,
|
|
336070
|
-
height: height2,
|
|
336071
|
-
marginRight,
|
|
336072
|
-
marginBottom,
|
|
336073
|
-
obsType,
|
|
336074
|
-
sampleType,
|
|
336075
|
-
keyLength = 36,
|
|
336076
|
-
featureType,
|
|
336077
|
-
featureValueType,
|
|
336078
|
-
featureValueTransformName,
|
|
336079
|
-
// TODO: re-enable featureValueColormap coordination
|
|
336080
|
-
// featureValueColormap,
|
|
336081
|
-
obsSetSelection,
|
|
336082
|
-
obsSetColor
|
|
336083
|
-
} = props;
|
|
336146
|
+
const { isStratified, transpose: transpose2, data: rawData, theme, width: width2, height: height2, marginRight, marginBottom, obsType, sampleType, keyLength = 36, featureType, featureValueType, featureValueTransformName, featureValueColormap, obsSetSelection, obsSetColor, onDotSelect } = props;
|
|
336084
336147
|
const vegaContainerRef = useRef();
|
|
336085
336148
|
const data2 = rawData.map((d) => ({
|
|
336086
336149
|
...d,
|
|
@@ -336117,6 +336180,26 @@ function DotPlot(props) {
|
|
|
336117
336180
|
// Reference: https://vega.github.io/vega-lite/docs/mark.html
|
|
336118
336181
|
opacity: 1
|
|
336119
336182
|
},
|
|
336183
|
+
params: [
|
|
336184
|
+
{
|
|
336185
|
+
name: "dot_select",
|
|
336186
|
+
select: {
|
|
336187
|
+
type: "point",
|
|
336188
|
+
on: "click[event.shiftKey === false]",
|
|
336189
|
+
fields: ["feature"],
|
|
336190
|
+
empty: "none"
|
|
336191
|
+
}
|
|
336192
|
+
},
|
|
336193
|
+
{
|
|
336194
|
+
name: "shift_dot_select",
|
|
336195
|
+
select: {
|
|
336196
|
+
type: "point",
|
|
336197
|
+
on: "click[event.shiftKey]",
|
|
336198
|
+
fields: ["feature"],
|
|
336199
|
+
empty: "none"
|
|
336200
|
+
}
|
|
336201
|
+
}
|
|
336202
|
+
],
|
|
336120
336203
|
encoding: {
|
|
336121
336204
|
[transpose2 ? "y" : "x"]: {
|
|
336122
336205
|
field: "keyFeature",
|
|
@@ -336138,8 +336221,7 @@ function DotPlot(props) {
|
|
|
336138
336221
|
type: "quantitative",
|
|
336139
336222
|
title: meanTransform,
|
|
336140
336223
|
scale: {
|
|
336141
|
-
|
|
336142
|
-
scheme: "greys"
|
|
336224
|
+
scheme: featureValueColormap
|
|
336143
336225
|
},
|
|
336144
336226
|
legend: {
|
|
336145
336227
|
direction: "horizontal",
|
|
@@ -336181,6 +336263,14 @@ function DotPlot(props) {
|
|
|
336181
336263
|
} : {}
|
|
336182
336264
|
}
|
|
336183
336265
|
};
|
|
336266
|
+
const handleSignal = (name2, value2) => {
|
|
336267
|
+
if (name2 === "dot_select") {
|
|
336268
|
+
onDotSelect(value2.feature);
|
|
336269
|
+
} else if (name2 === "shift_dot_select") {
|
|
336270
|
+
onDotSelect(value2.feature, true);
|
|
336271
|
+
}
|
|
336272
|
+
};
|
|
336273
|
+
const signalListeners = { dot_select: handleSignal, shift_dot_select: handleSignal };
|
|
336184
336274
|
const getTooltipText = useCallback((item) => ({
|
|
336185
336275
|
[`${capitalize$3(featureType)}`]: item.datum.feature,
|
|
336186
336276
|
[`${capitalize$3(obsType)} Set`]: item.datum.group,
|
|
@@ -336205,7 +336295,7 @@ function DotPlot(props) {
|
|
|
336205
336295
|
useEffect(() => {
|
|
336206
336296
|
setVegaRenderIncrement((prev2) => prev2 + 1);
|
|
336207
336297
|
}, [rawData]);
|
|
336208
|
-
return jsxRuntimeExports.jsx("div", { ref: vegaContainerRef, children: jsxRuntimeExports.jsx(VegaPlot, { data: data2, spec, onNewView, getTooltipText, renderer: "svg" }) });
|
|
336298
|
+
return jsxRuntimeExports.jsx("div", { ref: vegaContainerRef, children: jsxRuntimeExports.jsx(VegaPlot, { data: data2, spec, onNewView, signalListeners, getTooltipText, renderer: "svg" }) });
|
|
336209
336299
|
}
|
|
336210
336300
|
function useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, posThreshold, featureLabelsMap) {
|
|
336211
336301
|
const mergedCellSets = useMemo$1(() => mergeObsSets(cellSets, additionalCellSets), [cellSets, additionalCellSets]);
|
|
@@ -336260,7 +336350,24 @@ function DotPlotSubscriber(props) {
|
|
|
336260
336350
|
const { coordinationScopes, removeGridComponent, theme, title: title2 = "Dot Plot", transpose: transpose2 = true, helpText = ViewHelpMapping.DOT_PLOT } = props;
|
|
336261
336351
|
const { classes: classes2 } = useStyles$3();
|
|
336262
336352
|
const loaders = useLoaders();
|
|
336263
|
-
const [{
|
|
336353
|
+
const [{
|
|
336354
|
+
dataset,
|
|
336355
|
+
obsType,
|
|
336356
|
+
featureType,
|
|
336357
|
+
featureValueType,
|
|
336358
|
+
featureSelection: geneSelection,
|
|
336359
|
+
featureValueTransform,
|
|
336360
|
+
featureValueTransformCoefficient,
|
|
336361
|
+
featureValuePositivityThreshold: posThreshold,
|
|
336362
|
+
featureValueColormap,
|
|
336363
|
+
obsSetSelection: cellSetSelection,
|
|
336364
|
+
obsSetColor: cellSetColor,
|
|
336365
|
+
additionalObsSets: additionalCellSets,
|
|
336366
|
+
sampleType,
|
|
336367
|
+
sampleSetSelection,
|
|
336368
|
+
// eslint-disable-next-line no-unused-vars
|
|
336369
|
+
featureAggregationStrategy
|
|
336370
|
+
}, { setFeatureValueTransform, setFeatureValueTransformCoefficient, setFeatureValuePositivityThreshold: setPosThreshold, setFeatureValueColormap, setFeatureAggregationStrategy }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$2.DOT_PLOT], coordinationScopes);
|
|
336264
336371
|
const [width2, height2, containerRef] = useGridItemSize();
|
|
336265
336372
|
const transformOptions = VALUE_TRANSFORM_OPTIONS;
|
|
336266
336373
|
const isStratified = Array.isArray(sampleSetSelection) && sampleSetSelection.length > 1;
|
|
@@ -336301,7 +336408,13 @@ function DotPlotSubscriber(props) {
|
|
|
336301
336408
|
]);
|
|
336302
336409
|
const [resultArr, meanExpressionMax] = useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, posThreshold, featureLabelsMap);
|
|
336303
336410
|
const selectedTransformName = transformOptions.find((o2) => o2.value === featureValueTransform)?.name;
|
|
336304
|
-
|
|
336411
|
+
const onDotSelect = useCallback((featureName, isShiftDown = false) => {
|
|
336412
|
+
const featureI = geneSelection.indexOf(featureName?.[0]);
|
|
336413
|
+
if (featureI >= 0) {
|
|
336414
|
+
setFeatureAggregationStrategy(featureI);
|
|
336415
|
+
}
|
|
336416
|
+
}, [setFeatureAggregationStrategy, geneSelection]);
|
|
336417
|
+
return jsxRuntimeExports.jsx(TitleInfo, { title: title2, removeGridComponent, urls: urls2, theme, isReady, helpText, errors, options: jsxRuntimeExports.jsx(CellSetExpressionPlotOptions, { featureValueTransform, setFeatureValueTransform, featureValueTransformCoefficient, setFeatureValueTransformCoefficient, transformOptions, featureValuePositivityThreshold: posThreshold, setFeatureValuePositivityThreshold: setPosThreshold, featureValueColormap, setFeatureValueColormap }), children: jsxRuntimeExports.jsx("div", { ref: containerRef, className: classes2.vegaContainer, children: resultArr ? jsxRuntimeExports.jsx(DotPlot, { isStratified, transpose: transpose2, domainMax: meanExpressionMax, data: resultArr, theme, width: width2, height: height2, obsType, sampleType, featureType, featureValueType, featureValueTransformName: selectedTransformName, featureValueColormap, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, onDotSelect }) : jsxRuntimeExports.jsxs("span", { children: ["Select at least one ", featureType, "."] }) }) });
|
|
336305
336418
|
}
|
|
336306
336419
|
const scaleBand = scale$6("band");
|
|
336307
336420
|
const OBS_KEY = "obsId";
|
|
@@ -340008,13 +340121,22 @@ class ImageWrapper {
|
|
|
340008
340121
|
return this.modelMatrix;
|
|
340009
340122
|
}
|
|
340010
340123
|
_getModelMatrix() {
|
|
340011
|
-
const { coordinateTransformations: coordinateTransformationsFromOptions } = this.options;
|
|
340124
|
+
const { coordinateSystem = "global", coordinateTransformations: coordinateTransformationsFromOptions } = this.options;
|
|
340012
340125
|
if ("multiscales" in this.vivLoader.metadata) {
|
|
340013
340126
|
const { multiscales: [{ datasets, coordinateTransformations: coordinateTransformationsFromFile, axes }] } = this.vivLoader.metadata;
|
|
340014
340127
|
const ngffAxes = getNgffAxes(axes);
|
|
340015
340128
|
const transformMatrixFromOptions = coordinateTransformationsToMatrix(coordinateTransformationsFromOptions, ngffAxes);
|
|
340016
|
-
|
|
340017
|
-
|
|
340129
|
+
let transformMatrixFromFile;
|
|
340130
|
+
if ("spatialdata_attrs" in this.vivLoader.metadata) {
|
|
340131
|
+
transformMatrixFromFile = coordinateTransformationsToMatrixForSpatialData(
|
|
340132
|
+
// Pass the first multiscales element.
|
|
340133
|
+
this.vivLoader.metadata.multiscales[0],
|
|
340134
|
+
coordinateSystem
|
|
340135
|
+
);
|
|
340136
|
+
} else {
|
|
340137
|
+
const normCoordinateTransformationsFromFile = normalizeCoordinateTransformations(coordinateTransformationsFromFile, datasets);
|
|
340138
|
+
transformMatrixFromFile = coordinateTransformationsToMatrix(normCoordinateTransformationsFromFile, ngffAxes);
|
|
340139
|
+
}
|
|
340018
340140
|
const transformMatrix = transformMatrixFromFile.multiplyLeft(transformMatrixFromOptions);
|
|
340019
340141
|
return transformMatrix;
|
|
340020
340142
|
}
|
|
@@ -340503,16 +340625,7 @@ class SpatialDataLabelsLoader extends SpatialDataImageLoader {
|
|
|
340503
340625
|
return result;
|
|
340504
340626
|
}
|
|
340505
340627
|
}
|
|
340506
|
-
|
|
340507
|
-
return `${path2}/coords`;
|
|
340508
|
-
}
|
|
340509
|
-
function getRadiusPath(path2) {
|
|
340510
|
-
return `${path2}/radius`;
|
|
340511
|
-
}
|
|
340512
|
-
function getGeometryPath$1(path2) {
|
|
340513
|
-
return `${path2}/geometry`;
|
|
340514
|
-
}
|
|
340515
|
-
const DEFAULT_AXES$1 = [
|
|
340628
|
+
const OLD_SHAPES_DEFAULT_AXES = [
|
|
340516
340629
|
{
|
|
340517
340630
|
name: "x",
|
|
340518
340631
|
type: "space",
|
|
@@ -340524,7 +340637,7 @@ const DEFAULT_AXES$1 = [
|
|
|
340524
340637
|
unit: "unit"
|
|
340525
340638
|
}
|
|
340526
340639
|
];
|
|
340527
|
-
const
|
|
340640
|
+
const OLD_SHAPES_DEFAULT_COORDINATE_TRANSFORMATIONS = [
|
|
340528
340641
|
{
|
|
340529
340642
|
input: {
|
|
340530
340643
|
axes: [
|
|
@@ -340559,6 +340672,15 @@ const DEFAULT_COORDINATE_TRANSFORMATIONS$1 = [
|
|
|
340559
340672
|
type: "identity"
|
|
340560
340673
|
}
|
|
340561
340674
|
];
|
|
340675
|
+
function getCoordsPath(path2) {
|
|
340676
|
+
return `${path2}/coords`;
|
|
340677
|
+
}
|
|
340678
|
+
function getRadiusPath(path2) {
|
|
340679
|
+
return `${path2}/radius`;
|
|
340680
|
+
}
|
|
340681
|
+
function getGeometryPath$1(path2) {
|
|
340682
|
+
return `${path2}/geometry`;
|
|
340683
|
+
}
|
|
340562
340684
|
class SpatialDataObsSpotsLoader extends AbstractTwoStepLoader {
|
|
340563
340685
|
async loadModelMatrix() {
|
|
340564
340686
|
const { path: path2, coordinateSystem = "global" } = this.options;
|
|
@@ -340566,12 +340688,9 @@ class SpatialDataObsSpotsLoader extends AbstractTwoStepLoader {
|
|
|
340566
340688
|
return this.modelMatrix;
|
|
340567
340689
|
}
|
|
340568
340690
|
const zattrs = await this.dataSource.loadSpatialDataElementAttrs(path2);
|
|
340569
|
-
const
|
|
340570
|
-
const axes = zattrs?.axes ??
|
|
340571
|
-
|
|
340572
|
-
const normCoordinateTransformationsFromFile = normalizeCoordinateTransformations(coordinateTransformationsFromFile, null);
|
|
340573
|
-
const transformMatrixFromFile = coordinateTransformationsToMatrix(normCoordinateTransformationsFromFile, normAxes);
|
|
340574
|
-
this.modelMatrix = transformMatrixFromFile;
|
|
340691
|
+
const coordinateTransformations = zattrs?.coordinateTransformations ?? OLD_SHAPES_DEFAULT_COORDINATE_TRANSFORMATIONS;
|
|
340692
|
+
const axes = zattrs?.axes ?? OLD_SHAPES_DEFAULT_AXES;
|
|
340693
|
+
this.modelMatrix = coordinateTransformationsToMatrixForSpatialData({ axes, coordinateTransformations }, coordinateSystem);
|
|
340575
340694
|
return this.modelMatrix;
|
|
340576
340695
|
}
|
|
340577
340696
|
/**
|
|
@@ -340669,53 +340788,6 @@ class SpatialDataObsSpotsLoader extends AbstractTwoStepLoader {
|
|
|
340669
340788
|
function getGeometryPath(path2) {
|
|
340670
340789
|
return `${path2}/geometry`;
|
|
340671
340790
|
}
|
|
340672
|
-
const DEFAULT_AXES = [
|
|
340673
|
-
{
|
|
340674
|
-
name: "x",
|
|
340675
|
-
type: "space",
|
|
340676
|
-
unit: "unit"
|
|
340677
|
-
},
|
|
340678
|
-
{
|
|
340679
|
-
name: "y",
|
|
340680
|
-
type: "space",
|
|
340681
|
-
unit: "unit"
|
|
340682
|
-
}
|
|
340683
|
-
];
|
|
340684
|
-
const DEFAULT_COORDINATE_TRANSFORMATIONS = [
|
|
340685
|
-
{
|
|
340686
|
-
input: {
|
|
340687
|
-
axes: [
|
|
340688
|
-
{
|
|
340689
|
-
name: "x",
|
|
340690
|
-
type: "space",
|
|
340691
|
-
unit: "unit"
|
|
340692
|
-
},
|
|
340693
|
-
{
|
|
340694
|
-
name: "y",
|
|
340695
|
-
type: "space",
|
|
340696
|
-
unit: "unit"
|
|
340697
|
-
}
|
|
340698
|
-
],
|
|
340699
|
-
name: "xy"
|
|
340700
|
-
},
|
|
340701
|
-
output: {
|
|
340702
|
-
axes: [
|
|
340703
|
-
{
|
|
340704
|
-
name: "x",
|
|
340705
|
-
type: "space",
|
|
340706
|
-
unit: "unit"
|
|
340707
|
-
},
|
|
340708
|
-
{
|
|
340709
|
-
name: "y",
|
|
340710
|
-
type: "space",
|
|
340711
|
-
unit: "unit"
|
|
340712
|
-
}
|
|
340713
|
-
],
|
|
340714
|
-
name: "global"
|
|
340715
|
-
},
|
|
340716
|
-
type: "identity"
|
|
340717
|
-
}
|
|
340718
|
-
];
|
|
340719
340791
|
class SpatialDataObsSegmentationsLoader extends AbstractTwoStepLoader {
|
|
340720
340792
|
async loadModelMatrix() {
|
|
340721
340793
|
const { path: path2, coordinateSystem = "global" } = this.options;
|
|
@@ -340723,12 +340795,9 @@ class SpatialDataObsSegmentationsLoader extends AbstractTwoStepLoader {
|
|
|
340723
340795
|
return this.modelMatrix;
|
|
340724
340796
|
}
|
|
340725
340797
|
const zattrs = await this.dataSource.loadSpatialDataElementAttrs(path2);
|
|
340726
|
-
const
|
|
340727
|
-
const axes = zattrs?.axes ??
|
|
340728
|
-
|
|
340729
|
-
const normCoordinateTransformationsFromFile = normalizeCoordinateTransformations(coordinateTransformationsFromFile, null);
|
|
340730
|
-
const transformMatrixFromFile = coordinateTransformationsToMatrix(normCoordinateTransformationsFromFile, normAxes);
|
|
340731
|
-
this.modelMatrix = transformMatrixFromFile;
|
|
340798
|
+
const coordinateTransformations = zattrs?.coordinateTransformations ?? OLD_SHAPES_DEFAULT_COORDINATE_TRANSFORMATIONS;
|
|
340799
|
+
const axes = zattrs?.axes ?? OLD_SHAPES_DEFAULT_AXES;
|
|
340800
|
+
this.modelMatrix = coordinateTransformationsToMatrixForSpatialData({ axes, coordinateTransformations }, coordinateSystem);
|
|
340732
340801
|
return this.modelMatrix;
|
|
340733
340802
|
}
|
|
340734
340803
|
/**
|
|
@@ -340805,11 +340874,7 @@ class SpatialDataObsPointsLoader extends AbstractTwoStepLoader {
|
|
|
340805
340874
|
if (!coordinateTransformations) {
|
|
340806
340875
|
throw new Error("The coordinate transformations metadata must be defined for point elements.");
|
|
340807
340876
|
}
|
|
340808
|
-
|
|
340809
|
-
const coordinateTransformationsFromFile = coordinateTransformations.filter(({ input: { name: inputName }, output: { name: outputName } }) => inputName === "xyz" && outputName === coordinateSystem);
|
|
340810
|
-
const normCoordinateTransformationsFromFile = normalizeCoordinateTransformations(coordinateTransformationsFromFile, null);
|
|
340811
|
-
const transformMatrixFromFile = coordinateTransformationsToMatrix(normCoordinateTransformationsFromFile, normAxes);
|
|
340812
|
-
this.modelMatrix = transformMatrixFromFile;
|
|
340877
|
+
this.modelMatrix = coordinateTransformationsToMatrixForSpatialData({ axes, coordinateTransformations }, coordinateSystem);
|
|
340813
340878
|
return this.modelMatrix;
|
|
340814
340879
|
}
|
|
340815
340880
|
/**
|
|
@@ -350440,7 +350505,7 @@ class SpatialDataTableSource extends AnnDataSource {
|
|
|
350440
350505
|
const schemaBytes = await this.loadParquetSchemaBytes(parquetPath);
|
|
350441
350506
|
if (schemaBytes) {
|
|
350442
350507
|
const wasmSchema = readSchema(schemaBytes);
|
|
350443
|
-
const arrowTableForSchema = tableFromIPC(wasmSchema.intoIPCStream());
|
|
350508
|
+
const arrowTableForSchema = await tableFromIPC(wasmSchema.intoIPCStream());
|
|
350444
350509
|
indexColumnName = tableToIndexColumnName(arrowTableForSchema);
|
|
350445
350510
|
}
|
|
350446
350511
|
} catch (e3) {
|
|
@@ -350456,14 +350521,14 @@ class SpatialDataTableSource extends AnnDataSource {
|
|
|
350456
350521
|
}
|
|
350457
350522
|
if (columns2 && !indexColumnName) {
|
|
350458
350523
|
const wasmSchema = readSchema(parquetBytes);
|
|
350459
|
-
const arrowTableForSchema = tableFromIPC(wasmSchema.intoIPCStream());
|
|
350524
|
+
const arrowTableForSchema = await tableFromIPC(wasmSchema.intoIPCStream());
|
|
350460
350525
|
indexColumnName = tableToIndexColumnName(arrowTableForSchema);
|
|
350461
350526
|
}
|
|
350462
350527
|
if (options.columns && indexColumnName) {
|
|
350463
350528
|
options.columns = [...options.columns, indexColumnName];
|
|
350464
350529
|
}
|
|
350465
350530
|
const wasmTable = readParquet(parquetBytes, options);
|
|
350466
|
-
const arrowTable = tableFromIPC(wasmTable.intoIPCStream());
|
|
350531
|
+
const arrowTable = await tableFromIPC(wasmTable.intoIPCStream());
|
|
350467
350532
|
return arrowTable;
|
|
350468
350533
|
}
|
|
350469
350534
|
// TABLE-SPECIFIC METHODS
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bU, bP, bN, bO, bY, bZ, bQ, c5, c3, c1, c4, c2, bM, c0, bR, bL, bK, bW, bV, bX, b$, b_, bT, ca, cd, c7, ce, cf, c8, cb, cc, c9, bS, c6 } from "./index-
|
|
1
|
+
import { bU, bP, bN, bO, bY, bZ, bQ, c5, c3, c1, c4, c2, bM, c0, bR, bL, bK, bW, bV, bX, b$, b_, bT, ca, cd, c7, ce, cf, c8, cb, cc, c9, bS, c6 } from "./index-DlMqI1iP.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
bU as CoordinationLevel,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { g as getDefaultExportFromCjs, aP as BaseDecoder, aQ as LercParameters, aR as LercAddCompression } from "./index-
|
|
2
|
+
import { g as getDefaultExportFromCjs, aP as BaseDecoder, aQ as LercParameters, aR as LercAddCompression } from "./index-DlMqI1iP.js";
|
|
3
3
|
var LercDecode = { exports: {} };
|
|
4
4
|
var hasRequiredLercDecode;
|
|
5
5
|
function requireLercDecode() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bE as MeshDistanceMaterial, bF as MeshDepthMaterial, bG as RGBADepthPacking, aB as UniformsUtils, bH as ShaderChunk, aw as InstancedBufferGeometry, av as Sphere, au as Box3, aH as BackSide, a9 as DoubleSide, ad as Mesh, as as FrontSide, aa as MeshBasicMaterial, i as Color, c as Vector3, k as Matrix4, d as Vector2, aJ as Matrix3, aD as Vector4, T as Texture, a1 as LinearFilter, bI as PlaneGeometry, f as BufferGeometry, ax as Float32BufferAttribute, bJ as InstancedBufferAttribute } from "./index-
|
|
1
|
+
import { bE as MeshDistanceMaterial, bF as MeshDepthMaterial, bG as RGBADepthPacking, aB as UniformsUtils, bH as ShaderChunk, aw as InstancedBufferGeometry, av as Sphere, au as Box3, aH as BackSide, a9 as DoubleSide, ad as Mesh, as as FrontSide, aa as MeshBasicMaterial, i as Color, c as Vector3, k as Matrix4, d as Vector2, aJ as Matrix3, aD as Vector4, T as Texture, a1 as LinearFilter, bI as PlaneGeometry, f as BufferGeometry, ax as Float32BufferAttribute, bJ as InstancedBufferAttribute } from "./index-DlMqI1iP.js";
|
|
2
2
|
function workerBootstrap() {
|
|
3
3
|
var modules = /* @__PURE__ */ Object.create(null);
|
|
4
4
|
function registerModule(ref, callback) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/dev",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.12",
|
|
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.6.
|
|
20
|
-
"@vitessce/config": "3.6.
|
|
21
|
-
"@vitessce/constants": "3.6.
|
|
22
|
-
"@vitessce/export-utils": "3.6.
|
|
19
|
+
"@vitessce/all": "3.6.12",
|
|
20
|
+
"@vitessce/config": "3.6.12",
|
|
21
|
+
"@vitessce/constants": "3.6.12",
|
|
22
|
+
"@vitessce/export-utils": "3.6.12"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@vitejs/plugin-react": "^4.5.0",
|