@vitessce/dev 3.9.7 → 3.9.8
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-BChrH4xp.js → OrbitControls-DjHg7LmD.js} +1 -1
- package/dist/{ReactNeuroglancer-B1SXObz_.js → ReactNeuroglancer-BeBHVTed.js} +48 -5
- package/dist/{deflate-DYpRiTOW.js → deflate-BO8U0f-B.js} +1 -1
- package/dist/{higlass-BSSjTJz8.js → higlass-OmKZOSSo.js} +1 -1
- package/dist/{index-KkFy43wF.js → index-BmJxxT9m.js} +2 -2
- package/dist/{index-BcB1ltME.js → index-DjEMnpx3.js} +348 -167
- package/dist/{index-DOQcKDet.js → index-Iv8UkaIJ.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{jpeg-CjOQOmSy.js → jpeg-B63iC4Df.js} +1 -1
- package/dist/{lerc-a3FmkkEz.js → lerc-Cq3zOE2J.js} +1 -1
- package/dist/{lzw-BXDFvDE8.js → lzw-BtBv3TjK.js} +1 -1
- package/dist/{packbits-uiZkXSMA.js → packbits-DIdOwI-e.js} +1 -1
- package/dist/{raw-DTFSgRK6.js → raw-DMpwMWTL.js} +1 -1
- package/dist/{troika-three-text.esm-slXZyCye.js → troika-three-text.esm-Wh8GRZYy.js} +1 -1
- package/dist/{webimage-BtSBSquN.js → webimage-DQvrB4B4.js} +1 -1
- package/package.json +5 -5
|
@@ -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-
|
|
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-DjEMnpx3.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-
|
|
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-DjEMnpx3.js";
|
|
5
5
|
import React__default from "react";
|
|
6
6
|
var assignExports = requireAssign();
|
|
7
7
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
|
@@ -65378,7 +65378,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65378
65378
|
const baseLayers = this.props.viewerState?.layers ?? (this.viewer.state.toJSON().layers || []);
|
|
65379
65379
|
const newLayers = baseLayers.map((layer) => {
|
|
65380
65380
|
const layerScope = Object.keys(cellColorMappingByLayer).find((scope) => layer.name?.includes(scope));
|
|
65381
|
-
const selected = { ...cellColorMappingByLayer[layerScope] || {} };
|
|
65381
|
+
const selected = { ...cellColorMappingByLayer[layerScope]?.colors || {} };
|
|
65382
65382
|
if (!this.allKnownIdsByLayer)
|
|
65383
65383
|
this.allKnownIdsByLayer = {};
|
|
65384
65384
|
if (!this.allKnownIdsByLayer[layerScope]) {
|
|
@@ -65541,6 +65541,34 @@ class Neuroglancer extends React__default.Component {
|
|
|
65541
65541
|
} else {
|
|
65542
65542
|
viewerNoKey = this.viewer;
|
|
65543
65543
|
}
|
|
65544
|
+
const { visibleChunksChanged } = this.viewer.chunkQueueManager;
|
|
65545
|
+
let firstChunkLoaded = false;
|
|
65546
|
+
this.disposers.push(visibleChunksChanged.add(() => {
|
|
65547
|
+
if (!firstChunkLoaded) {
|
|
65548
|
+
for (const layer of this.viewer.layerManager.managedLayers) {
|
|
65549
|
+
if (layer.layer instanceof SegmentationUserLayer) {
|
|
65550
|
+
const hasVisibleChunk = layer.layer.renderLayers?.some((rl) => {
|
|
65551
|
+
const { numVisibleChunksAvailable, numVisibleChunksNeeded } = rl.layerChunkProgressInfo || {};
|
|
65552
|
+
if (!numVisibleChunksNeeded || !numVisibleChunksAvailable)
|
|
65553
|
+
return false;
|
|
65554
|
+
return numVisibleChunksAvailable / numVisibleChunksNeeded > 0.25;
|
|
65555
|
+
});
|
|
65556
|
+
if (hasVisibleChunk) {
|
|
65557
|
+
firstChunkLoaded = true;
|
|
65558
|
+
requestAnimationFrame(() => {
|
|
65559
|
+
requestAnimationFrame(() => {
|
|
65560
|
+
this.props.onLayerLoadingChange?.(true);
|
|
65561
|
+
});
|
|
65562
|
+
});
|
|
65563
|
+
return;
|
|
65564
|
+
}
|
|
65565
|
+
}
|
|
65566
|
+
}
|
|
65567
|
+
}
|
|
65568
|
+
}));
|
|
65569
|
+
this.disposers.push(() => {
|
|
65570
|
+
firstChunkLoaded = false;
|
|
65571
|
+
});
|
|
65544
65572
|
}
|
|
65545
65573
|
componentDidUpdate(prevProps, prevState) {
|
|
65546
65574
|
const { viewerState, cellColorMapping: cellColorMappingByLayer } = this.props;
|
|
@@ -65555,6 +65583,20 @@ class Neuroglancer extends React__default.Component {
|
|
|
65555
65583
|
if (layer.layer instanceof SegmentationUserLayer) {
|
|
65556
65584
|
const { segmentSelectionState } = layer.layer.displayState;
|
|
65557
65585
|
segmentSelectionState.set(selectedSegments[layer.name]);
|
|
65586
|
+
const layerScope = Object.keys(cellColorMappingByLayer).find((scope) => layer.name?.includes(scope));
|
|
65587
|
+
if (layerScope) {
|
|
65588
|
+
const opacity = cellColorMappingByLayer[layerScope]?.opacity ?? 1;
|
|
65589
|
+
layer.layer.displayState.objectAlpha.value = opacity;
|
|
65590
|
+
}
|
|
65591
|
+
}
|
|
65592
|
+
if (layer.layer instanceof AnnotationUserLayer) {
|
|
65593
|
+
const matchingLayer = (viewerState?.layers || []).find((l) => l.name === layer.name);
|
|
65594
|
+
if (matchingLayer?.shader) {
|
|
65595
|
+
const currentShader = layer.layer.annotationDisplayState.shader.value_;
|
|
65596
|
+
if (currentShader !== matchingLayer.shader) {
|
|
65597
|
+
layer.layer.annotationDisplayState.shader.value = matchingLayer.shader;
|
|
65598
|
+
}
|
|
65599
|
+
}
|
|
65558
65600
|
}
|
|
65559
65601
|
}
|
|
65560
65602
|
if (!viewerState)
|
|
@@ -65583,8 +65625,8 @@ class Neuroglancer extends React__default.Component {
|
|
|
65583
65625
|
}
|
|
65584
65626
|
});
|
|
65585
65627
|
}
|
|
65586
|
-
const prevSize = prevProps.cellColorMapping ? Object.
|
|
65587
|
-
const currSize = cellColorMappingByLayer ? Object.
|
|
65628
|
+
const prevSize = prevProps.cellColorMapping ? Object.values(prevProps.cellColorMapping).reduce((acc, v) => acc + Object.keys(v?.colors || {}).length, 0) : 0;
|
|
65629
|
+
const currSize = cellColorMappingByLayer ? Object.values(cellColorMappingByLayer).reduce((acc, v) => acc + Object.keys(v?.colors || {}).length, 0) : 0;
|
|
65588
65630
|
const mappingRefChanged = prevProps.cellColorMapping !== this.props.cellColorMapping;
|
|
65589
65631
|
if (!this.didLayersChange(prevVS, viewerState) && (mappingRefChanged || prevSize !== currSize)) {
|
|
65590
65632
|
this.withoutEmitting(() => {
|
|
@@ -65594,7 +65636,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65594
65636
|
const stripSegFields = (layers) => (layers || []).map((l) => {
|
|
65595
65637
|
if (!l)
|
|
65596
65638
|
return l;
|
|
65597
|
-
const { segments, segmentColors, ...rest } = l;
|
|
65639
|
+
const { segments, segmentColors, objectAlpha, ...rest } = l;
|
|
65598
65640
|
return rest;
|
|
65599
65641
|
});
|
|
65600
65642
|
const prevLayers = prevProps.viewerState?.layers;
|
|
@@ -65658,6 +65700,7 @@ __publicField(Neuroglancer, "defaultProps", {
|
|
|
65658
65700
|
onVisibleChanged: null,
|
|
65659
65701
|
onSelectionDetailsStateChanged: null,
|
|
65660
65702
|
onViewerStateChanged: null,
|
|
65703
|
+
onLayerLoadingChange: null,
|
|
65661
65704
|
key: null,
|
|
65662
65705
|
callbacks: [],
|
|
65663
65706
|
ngServer: "https://neuroglancer-demo.appspot.com/"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { aZ as BaseDecoder } from "./index-
|
|
2
|
+
import { aZ as BaseDecoder } from "./index-DjEMnpx3.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-
|
|
4
|
+
import { b0 as commonjsGlobal$1, b1 as requireObjectAssign, aI as getDefaultExportFromCjs$1, b2 as earcut } from "./index-DjEMnpx3.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-
|
|
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-DjEMnpx3.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-DjHg7LmD.js";
|
|
4
4
|
const BRICK_SIZE = 32;
|
|
5
5
|
const BRICK_CACHE_SIZE_X = 64;
|
|
6
6
|
const BRICK_CACHE_SIZE_Y = 64;
|