@vitessce/all 3.9.5 → 3.9.7
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/{OrbitControls-BdKhfTcE.js → OrbitControls-DJu5u6tM.js} +1 -1
- package/dist/{ReactNeuroglancer-D0d2tFQ8.js → ReactNeuroglancer-DC-9NQV1.js} +38 -26
- package/dist/{deflate-DQCna24L.js → deflate-BVXiBwpd.js} +1 -1
- package/dist/{higlass-CgLnON4r.js → higlass-BABKAqJw.js} +1 -1
- package/dist/{index-vsMcaCd5.js → index-BA1bwFuv.js} +2 -2
- package/dist/{index-cqprKTFO.js → index-CC-2MyaG.js} +3 -3
- package/dist/{index-CJ0WrLWz.js → index-C_0Ni_kA.js} +903 -233
- package/dist/index.js +1 -1
- package/dist/{jpeg-BpDeSW3W.js → jpeg-Bx2qADwx.js} +1 -1
- package/dist/{lerc-ed9YjGeI.js → lerc-BVprPTmk.js} +1 -1
- package/dist/{lzw-7E8bYZIo.js → lzw-xRmfciyv.js} +1 -1
- package/dist/{packbits-COn2hgkH.js → packbits-DymgLbq7.js} +1 -1
- package/dist/{raw-C5vEl2Zl.js → raw-BHe10UqL.js} +1 -1
- package/dist/{troika-three-text.esm-Bn837OOO.js → troika-three-text.esm-C_yrtgNH.js} +1 -1
- package/dist/{webimage-f_OnujWl.js → webimage-DBDXmZdm.js} +1 -1
- package/dist-tsc/base-plugins.d.ts.map +1 -1
- package/dist-tsc/base-plugins.js +4 -3
- package/package.json +33 -33
- package/src/base-plugins.ts +7 -3
|
@@ -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-
|
|
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-C_0Ni_kA.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-
|
|
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-C_0Ni_kA.js";
|
|
2
2
|
import React__default from "react";
|
|
3
3
|
var assignExports = requireAssign();
|
|
4
4
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
|
@@ -30147,9 +30147,7 @@ const svg_bin = '<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
|
30147
30147
|
function makeDeleteButton(options = {}) {
|
|
30148
30148
|
const icon = makeIcon(_Object$assign({ svg: svg_bin }, options));
|
|
30149
30149
|
const svg = icon.firstElementChild;
|
|
30150
|
-
if (svg)
|
|
30151
|
-
svg.style.fill = "white";
|
|
30152
|
-
}
|
|
30150
|
+
if (svg) svg.style.fill = "white";
|
|
30153
30151
|
return icon;
|
|
30154
30152
|
}
|
|
30155
30153
|
var es6_string_raw = {};
|
|
@@ -45794,6 +45792,18 @@ class DataManagementContext extends RefCounted {
|
|
|
45794
45792
|
this.frameNumberCounter = frameNumberCounter;
|
|
45795
45793
|
const chunk_worker_url = bundleRoot + "chunk_worker.bundle.js";
|
|
45796
45794
|
this.worker = typeof bundleRoot === "string" ? new Worker(chunk_worker_url) : bundleRoot;
|
|
45795
|
+
if (typeof bundleRoot !== "string") {
|
|
45796
|
+
this.worker.addEventListener("message", (msg) => {
|
|
45797
|
+
if (msg.data?.functionName === "Worker" && msg.data?.path === "async_computation.bundle.js") {
|
|
45798
|
+
msg.stopImmediatePropagation();
|
|
45799
|
+
const AsyncWorker = bundleRoot.AsyncComputationWorker;
|
|
45800
|
+
if (AsyncWorker) {
|
|
45801
|
+
const asyncWorker = new AsyncWorker();
|
|
45802
|
+
asyncWorker.postMessage({ port: msg.data.port }, [msg.data.port]);
|
|
45803
|
+
}
|
|
45804
|
+
}
|
|
45805
|
+
}, true);
|
|
45806
|
+
}
|
|
45797
45807
|
this.chunkQueueManager = this.registerDisposer(new ChunkQueueManager(new RPC(this.worker), this.gl, this.frameNumberCounter, {
|
|
45798
45808
|
gpuMemory: new CapacitySpecification({ defaultItemLimit: 1e6, defaultSizeLimit: 1e9 }),
|
|
45799
45809
|
systemMemory: new CapacitySpecification({ defaultItemLimit: 1e7, defaultSizeLimit: 2e9 }),
|
|
@@ -65445,7 +65455,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65445
65455
|
this.disposers = [];
|
|
65446
65456
|
this.prevColorOverrides = /* @__PURE__ */ new Set();
|
|
65447
65457
|
this.overrideColorsById = /* @__PURE__ */ Object.create(null);
|
|
65448
|
-
this.
|
|
65458
|
+
this.allKnownIdsByLayer = {};
|
|
65449
65459
|
}
|
|
65450
65460
|
minimalPoseSnapshot = () => {
|
|
65451
65461
|
const v = this.viewer;
|
|
@@ -65495,24 +65505,26 @@ class Neuroglancer extends React__default.Component {
|
|
|
65495
65505
|
return JSON.stringify(prevLayers) !== JSON.stringify(nextLayers);
|
|
65496
65506
|
};
|
|
65497
65507
|
/* To add colors to the segments, turning unselected to grey */
|
|
65498
|
-
applyColorsAndVisibility = (
|
|
65508
|
+
applyColorsAndVisibility = (cellColorMappingByLayer) => {
|
|
65499
65509
|
if (!this.viewer)
|
|
65500
65510
|
return;
|
|
65501
|
-
const selected = { ...cellColorMapping || {} };
|
|
65502
|
-
for (const id of Object.keys(selected))
|
|
65503
|
-
this.allKnownIds.add(id);
|
|
65504
|
-
if (this.allKnownIds.size === 0) {
|
|
65505
|
-
const init = this.props.viewerState?.layers?.[0]?.segmentColors || {};
|
|
65506
|
-
for (const id of Object.keys(init))
|
|
65507
|
-
this.allKnownIds.add(id);
|
|
65508
|
-
}
|
|
65509
|
-
const fullSegmentColors = {};
|
|
65510
|
-
for (const id of this.allKnownIds) {
|
|
65511
|
-
fullSegmentColors[id] = selected[id] || GREY_HEX;
|
|
65512
|
-
}
|
|
65513
65511
|
const baseLayers = this.props.viewerState?.layers ?? (this.viewer.state.toJSON().layers || []);
|
|
65514
|
-
const newLayers = baseLayers.map((layer
|
|
65515
|
-
|
|
65512
|
+
const newLayers = baseLayers.map((layer) => {
|
|
65513
|
+
const layerScope = Object.keys(cellColorMappingByLayer).find((scope) => layer.name?.includes(scope));
|
|
65514
|
+
const selected = { ...cellColorMappingByLayer[layerScope] || {} };
|
|
65515
|
+
if (!this.allKnownIdsByLayer)
|
|
65516
|
+
this.allKnownIdsByLayer = {};
|
|
65517
|
+
if (!this.allKnownIdsByLayer[layerScope]) {
|
|
65518
|
+
this.allKnownIdsByLayer[layerScope] = /* @__PURE__ */ new Set();
|
|
65519
|
+
}
|
|
65520
|
+
for (const id of Object.keys(selected)) {
|
|
65521
|
+
this.allKnownIdsByLayer[layerScope].add(id);
|
|
65522
|
+
}
|
|
65523
|
+
const fullSegmentColors = {};
|
|
65524
|
+
for (const id of this.allKnownIdsByLayer[layerScope] || []) {
|
|
65525
|
+
fullSegmentColors[id] = selected[id] || GREY_HEX;
|
|
65526
|
+
}
|
|
65527
|
+
if (layer.type === "segmentation") {
|
|
65516
65528
|
return { ...layer, segmentColors: fullSegmentColors };
|
|
65517
65529
|
}
|
|
65518
65530
|
return layer;
|
|
@@ -65561,7 +65573,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65561
65573
|
}
|
|
65562
65574
|
}
|
|
65563
65575
|
componentDidUpdate(prevProps, prevState) {
|
|
65564
|
-
const { viewerState, cellColorMapping } = this.props;
|
|
65576
|
+
const { viewerState, cellColorMapping: cellColorMappingByLayer } = this.props;
|
|
65565
65577
|
const selectedSegments = {};
|
|
65566
65578
|
for (const layer of this.viewer.layerManager.managedLayers) {
|
|
65567
65579
|
if (layer.layer instanceof SegmentationUserLayer) {
|
|
@@ -65596,17 +65608,17 @@ class Neuroglancer extends React__default.Component {
|
|
|
65596
65608
|
this.withoutEmitting(() => {
|
|
65597
65609
|
const layers = Array.isArray(viewerState.layers) ? viewerState.layers : [];
|
|
65598
65610
|
this.viewer.state.restoreState({ layers });
|
|
65599
|
-
if (
|
|
65600
|
-
this.applyColorsAndVisibility(
|
|
65611
|
+
if (cellColorMappingByLayer && Object.keys(cellColorMappingByLayer).length) {
|
|
65612
|
+
this.applyColorsAndVisibility(cellColorMappingByLayer);
|
|
65601
65613
|
}
|
|
65602
65614
|
});
|
|
65603
65615
|
}
|
|
65604
65616
|
const prevSize = prevProps.cellColorMapping ? Object.keys(prevProps.cellColorMapping).length : 0;
|
|
65605
|
-
const currSize =
|
|
65606
|
-
const mappingRefChanged = prevProps.cellColorMapping !== cellColorMapping;
|
|
65617
|
+
const currSize = cellColorMappingByLayer ? Object.keys(cellColorMappingByLayer).length : 0;
|
|
65618
|
+
const mappingRefChanged = prevProps.cellColorMapping !== this.props.cellColorMapping;
|
|
65607
65619
|
if (!this.didLayersChange(prevVS, viewerState) && (mappingRefChanged || prevSize !== currSize)) {
|
|
65608
65620
|
this.withoutEmitting(() => {
|
|
65609
|
-
this.applyColorsAndVisibility(
|
|
65621
|
+
this.applyColorsAndVisibility(cellColorMappingByLayer);
|
|
65610
65622
|
});
|
|
65611
65623
|
}
|
|
65612
65624
|
const stripSegFields = (layers) => (layers || []).map((l) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { aX as BaseDecoder } from "./index-
|
|
2
|
+
import { aX as BaseDecoder } from "./index-C_0Ni_kA.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-
|
|
4
|
+
import { a_ as commonjsGlobal$1, a$ as requireObjectAssign, aG as getDefaultExportFromCjs$1, b0 as earcut } from "./index-C_0Ni_kA.js";
|
|
5
5
|
var promise = {};
|
|
6
6
|
var hasRequiredPromise;
|
|
7
7
|
function requirePromise() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { aw as log, ax as isEqual, ar as Data3DTexture, as as RedFormat, ay as UnsignedByteType, l as LinearFilter, az as RedIntegerFormat, aA as UnsignedIntType, m as NearestFilter, e as Vector3, V as Vector2, ag as Vector4, ae as UniformsUtils, aq as CoordinationType, aB as WebGLMultipleRenderTargets, aC as RGBAFormat, av as Scene, W as OrthographicCamera, ad as ShaderMaterial, z as Mesh, aD as PlaneGeometry, aE as useEventCallback, ao as jsxRuntimeExports, aF as GLSL3, am as BackSide } from "./index-
|
|
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-C_0Ni_kA.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-
|
|
3
|
+
import { u as useThree, a as useFrame, O as OrbitControls, C as Canvas } from "./OrbitControls-DJu5u6tM.js";
|
|
4
4
|
const LogLevel = {
|
|
5
5
|
INFO: "info",
|
|
6
6
|
WARN: "warn",
|
|
@@ -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-
|
|
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-C_0Ni_kA.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-
|
|
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-DJu5u6tM.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-
|
|
5030
|
+
} = suspend(async () => import("./troika-three-text.esm-C_yrtgNH.js"), []);
|
|
5031
5031
|
const invalidate = useThree(({
|
|
5032
5032
|
invalidate: invalidate2
|
|
5033
5033
|
}) => invalidate2);
|