@vitessce/all 4.0.10 → 4.1.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.
- package/dist/{GeometryAndMeshXR-BovcVfOy.js → GeometryAndMeshXR-BSJ2rBtK.js} +1 -1
- package/dist/{ReactNeuroglancer-Ch1xO_u5.js → ReactNeuroglancer-Db7O0CnI.js} +33 -12
- package/dist/{XREnterButton-Dz4r7Jjx.js → XREnterButton-D-MyjNiM.js} +1 -1
- package/dist/{XRSceneComponents-CGcz34cr.js → XRSceneComponents-KvBqtraG.js} +1 -1
- package/dist/{XRWrapper-C1AfBFtW.js → XRWrapper-BNdj_qnt.js} +2 -2
- package/dist/{deflate-BKJk_mLF.js → deflate-B9RQRiyy.js} +1 -1
- package/dist/{higlass-BzshVp46.js → higlass-CJExboBo.js} +1 -1
- package/dist/{index-CNXTPnLt.js → index-CZ9S9EsT.js} +1 -1
- package/dist/{index-CfweEgJW.js → index-Vg2it-xm.js} +5 -5
- package/dist/{index-EoA5CfO8.js → index-uF7T9QQ9.js} +38170 -26277
- package/dist/index.js +6 -4
- package/dist/{jpeg-DXSq15HV.js → jpeg-D1J1ZLjO.js} +1 -1
- package/dist/{lerc-uTsWAc7Y.js → lerc-BYUvdCVc.js} +1 -1
- package/dist/{lzw-CIpLYaya.js → lzw-BnX_a9ES.js} +1 -1
- package/dist/{packbits-Cf0TB9M_.js → packbits-DxNVm_vW.js} +1 -1
- package/dist/{raw-CR3kVxsB.js → raw-D529ykG0.js} +1 -1
- package/dist/{webimage-Dp3HLfwF.js → webimage-D6fsjgI6.js} +1 -1
- package/dist/{xrStore-B2qW6VGJ.js → xrStore-2FzrFs3o.js} +1 -1
- package/dist-tsc/base-plugins.d.ts +20 -2
- package/dist-tsc/base-plugins.d.ts.map +1 -1
- package/dist-tsc/base-plugins.js +15 -1
- package/dist-tsc/base-plugins.js.map +1 -1
- package/dist-tsc/index.d.ts +1 -1
- package/dist-tsc/index.d.ts.map +1 -1
- package/dist-tsc/index.js +1 -1
- package/dist-tsc/index.js.map +1 -1
- package/package.json +34 -34
- package/src/base-plugins.ts +19 -1
- package/src/index.ts +2 -0
|
@@ -3,7 +3,7 @@ import { useRef, useEffect, useState } from "react";
|
|
|
3
3
|
import { useThree, useFrame } from "@react-three/fiber";
|
|
4
4
|
import { Bvh } from "@react-three/drei";
|
|
5
5
|
import { Matrix4, Vector3, Box3, FrontSide } from "three";
|
|
6
|
-
import { g as getXRModule, i as isValidGeometrySize, M as MeasureLine, s as stringifyLineData } from "./index-
|
|
6
|
+
import { g as getXRModule, i as isValidGeometrySize, M as MeasureLine, s as stringifyLineData } from "./index-Vg2it-xm.js";
|
|
7
7
|
function getHandJoint(hand, jointName) {
|
|
8
8
|
return hand.get(jointName);
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { g as getDefaultExportFromCjs, d as requireAssign, f as require_export, h as require_core, j as require_fails, k as require_toObject, m as require_objectKeys, n as require_cof, o as require_wks, p as require_iterators, q as requireWeb_dom_iterable, s as requireEs6_string_iterator, t as require_anObject, v as require_hide, w as require_ctx, x as require_toLength, y as require_global, z as require_objectDp, A as require_descriptors, D as require_isObject, E as require_objectCreate, F as require_iterDefine, G as require_iterStep, H as require_meta, I as require_isArray, J as require_iobject, K as require_setToStringTag, M as require_aFunction, N as requireIterator, O as require_propertyDesc, c as commonjsGlobal, P as requireEs6_symbol, Q as requireDefineProperty, R as require_toIobject, S as require_objectGopd, T as require_html, U as require_domCreate, V as require_library, W as requireSymbol, X as require_objectPie, Y as require_has, Z as require_redefine, _ as require_objectAssign, $ as GREY_HEX, a0 as diffCameraState } from "./index-uF7T9QQ9.js";
|
|
4
4
|
var assignExports = requireAssign();
|
|
5
5
|
const _Object$assign = /* @__PURE__ */ getDefaultExportFromCjs(assignExports);
|
|
6
6
|
var es6_object_keys = {};
|
|
@@ -65461,6 +65461,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65461
65461
|
this.prevColorOverrides = /* @__PURE__ */ new Set();
|
|
65462
65462
|
this.overrideColorsById = /* @__PURE__ */ Object.create(null);
|
|
65463
65463
|
this.allKnownIdsByLayer = {};
|
|
65464
|
+
this.lastAppliedCameraState = null;
|
|
65464
65465
|
}
|
|
65465
65466
|
minimalPoseSnapshot = () => {
|
|
65466
65467
|
const v = this.viewer;
|
|
@@ -65638,7 +65639,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65638
65639
|
const { visibleChunksChanged } = this.viewer.chunkQueueManager;
|
|
65639
65640
|
let firstChunkLoaded = false;
|
|
65640
65641
|
const checkAndMarkLoaded = () => {
|
|
65641
|
-
if (firstChunkLoaded)
|
|
65642
|
+
if (firstChunkLoaded || !this.viewer)
|
|
65642
65643
|
return false;
|
|
65643
65644
|
for (const layer of this.viewer.layerManager.managedLayers) {
|
|
65644
65645
|
if (layer.layer instanceof SegmentationUserLayer) {
|
|
@@ -65687,17 +65688,16 @@ class Neuroglancer extends React__default.Component {
|
|
|
65687
65688
|
return false;
|
|
65688
65689
|
};
|
|
65689
65690
|
this.disposers.push(visibleChunksChanged.add(checkAndMarkLoaded));
|
|
65690
|
-
setTimeout(() => {
|
|
65691
|
+
const timeoutId1 = setTimeout(() => {
|
|
65691
65692
|
if (!firstChunkLoaded)
|
|
65692
65693
|
checkAndMarkLoaded();
|
|
65693
65694
|
}, 100);
|
|
65694
|
-
setTimeout(() => {
|
|
65695
|
+
const timeoutId2 = setTimeout(() => {
|
|
65695
65696
|
if (!firstChunkLoaded)
|
|
65696
65697
|
checkAndMarkLoaded();
|
|
65697
65698
|
}, 1e3);
|
|
65698
|
-
this.disposers.push(() =>
|
|
65699
|
-
|
|
65700
|
-
});
|
|
65699
|
+
this.disposers.push(() => clearTimeout(timeoutId1));
|
|
65700
|
+
this.disposers.push(() => clearTimeout(timeoutId2));
|
|
65701
65701
|
document.addEventListener("wheel", (e) => {
|
|
65702
65702
|
if (e.ctrlKey)
|
|
65703
65703
|
e.preventDefault();
|
|
@@ -65755,7 +65755,7 @@ class Neuroglancer extends React__default.Component {
|
|
|
65755
65755
|
const prevVS = prevProps.viewerState;
|
|
65756
65756
|
const prevLayers = prevProps.viewerState?.layers;
|
|
65757
65757
|
const nextLayers = viewerState?.layers;
|
|
65758
|
-
const camState = diffCameraState(prevVS, viewerState);
|
|
65758
|
+
const camState = diffCameraState(this.lastAppliedCameraState ?? prevVS, viewerState);
|
|
65759
65759
|
if (camState.changed) {
|
|
65760
65760
|
const patch = {};
|
|
65761
65761
|
if (camState.scale) {
|
|
@@ -65768,6 +65768,11 @@ class Neuroglancer extends React__default.Component {
|
|
|
65768
65768
|
if (camState.rot)
|
|
65769
65769
|
patch.projectionOrientation = viewerState.projectionOrientation;
|
|
65770
65770
|
this.withoutEmitting(() => this.viewer.state.restoreState(patch));
|
|
65771
|
+
this.lastAppliedCameraState = {
|
|
65772
|
+
position: viewerState.position,
|
|
65773
|
+
projectionOrientation: viewerState.projectionOrientation,
|
|
65774
|
+
projectionScale: viewerState.projectionScale
|
|
65775
|
+
};
|
|
65771
65776
|
}
|
|
65772
65777
|
if (this.didLayersChange(prevVS, viewerState)) {
|
|
65773
65778
|
this.withoutEmitting(() => {
|
|
@@ -65791,10 +65796,22 @@ class Neuroglancer extends React__default.Component {
|
|
|
65791
65796
|
this.applyColorsAndVisibility(cellColorMappingByLayer);
|
|
65792
65797
|
});
|
|
65793
65798
|
}
|
|
65794
|
-
const
|
|
65795
|
-
const
|
|
65796
|
-
const
|
|
65797
|
-
|
|
65799
|
+
const prevSegLayers = (prevLayers ?? []).filter((l) => l.type === "segmentation");
|
|
65800
|
+
const nextSegLayers = (nextLayers ?? []).filter((l) => l.type === "segmentation");
|
|
65801
|
+
const segIdsChangedForLayer = (name2) => {
|
|
65802
|
+
const prevIds = prevSegLayers.find((l) => l.name === name2)?.segments ?? [];
|
|
65803
|
+
const nextIds = nextSegLayers.find((l) => l.name === name2)?.segments ?? [];
|
|
65804
|
+
if (prevIds.length !== nextIds.length)
|
|
65805
|
+
return true;
|
|
65806
|
+
return prevIds.some((id, i) => String(id) !== String(nextIds[i]));
|
|
65807
|
+
};
|
|
65808
|
+
const allSegLayerNames = /* @__PURE__ */ new Set([
|
|
65809
|
+
...prevSegLayers.map((l) => l.name),
|
|
65810
|
+
...nextSegLayers.map((l) => l.name)
|
|
65811
|
+
]);
|
|
65812
|
+
const segmentsChanged = [...allSegLayerNames].some(segIdsChangedForLayer);
|
|
65813
|
+
const nextSegIds = nextSegLayers.flatMap((l) => l.segments ?? []);
|
|
65814
|
+
if (segmentsChanged && (nextSegIds.length > 0 || this.props.allowEmptySegments)) {
|
|
65798
65815
|
this.preserveDimensions(() => {
|
|
65799
65816
|
this.viewer.state.restoreState({ layers: nextLayers });
|
|
65800
65817
|
});
|
|
@@ -65809,6 +65826,10 @@ class Neuroglancer extends React__default.Component {
|
|
|
65809
65826
|
}
|
|
65810
65827
|
});
|
|
65811
65828
|
this.disposers = [];
|
|
65829
|
+
if (this.viewer) {
|
|
65830
|
+
this.viewer.dispose();
|
|
65831
|
+
this.viewer = null;
|
|
65832
|
+
}
|
|
65812
65833
|
const { key } = this.props;
|
|
65813
65834
|
if (key) {
|
|
65814
65835
|
delete viewersKeyed[key];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { g as getXrStore } from "./xrStore-
|
|
3
|
+
import { g as getXrStore } from "./xrStore-2FzrFs3o.js";
|
|
4
4
|
function XREnterButton() {
|
|
5
5
|
const [supported, setSupported] = useState(false);
|
|
6
6
|
const [entered, setEntered] = useState(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
import { useThree, useFrame } from "@react-three/fiber";
|
|
4
|
-
import { g as getXRModule } from "./index-
|
|
4
|
+
import { g as getXRModule } from "./index-Vg2it-xm.js";
|
|
5
5
|
function getHandJoint(hand, jointName) {
|
|
6
6
|
return hand.get(jointName);
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { g as getXRModule } from "./index-
|
|
3
|
-
import { g as getXrStore } from "./xrStore-
|
|
2
|
+
import { g as getXRModule } from "./index-Vg2it-xm.js";
|
|
3
|
+
import { g as getXrStore } from "./xrStore-2FzrFs3o.js";
|
|
4
4
|
function XRWrapper({ children }) {
|
|
5
5
|
const { XR } = getXRModule();
|
|
6
6
|
return jsx(XR, { store: getXrStore(), children });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-
|
|
2
|
+
import { B as BaseDecoder } from "./index-uF7T9QQ9.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import React__default, { createContext, isValidElement, PureComponent, Component, useMemo, useState, useRef, useEffect, useCallback, memo, useContext, useReducer, useLayoutEffect } from "react";
|
|
3
|
-
import { r as requireObjectAssign,
|
|
3
|
+
import { r as requireObjectAssign, g as getDefaultExportFromCjs$1, c as commonjsGlobal, e as earcut } from "./index-uF7T9QQ9.js";
|
|
4
4
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
function finallyConstructor(callback) {
|
|
@@ -4,7 +4,7 @@ import { useThree, useFrame, Canvas } from "@react-three/fiber";
|
|
|
4
4
|
import { OrbitControls } from "@react-three/drei";
|
|
5
5
|
import * as THREE from "three";
|
|
6
6
|
import { Data3DTexture, RedFormat, UnsignedByteType, LinearFilter, RedIntegerFormat, UnsignedIntType, NearestFilter, Vector3, Vector2, Vector4, UniformsUtils } from "three";
|
|
7
|
-
import { l as log, i as isEqual, C as CoordinationType, u as useEventCallback } from "./index-
|
|
7
|
+
import { l as log, i as isEqual, C as CoordinationType, u as useEventCallback } from "./index-uF7T9QQ9.js";
|
|
8
8
|
const LogLevel = {
|
|
9
9
|
INFO: "info",
|
|
10
10
|
WARN: "warn",
|
|
@@ -3,7 +3,7 @@ import React__default, { useRef, useState, useEffect, Suspense, forwardRef } fro
|
|
|
3
3
|
import { Canvas } from "@react-three/fiber";
|
|
4
4
|
import { Center, Text, Line, Bvh, OrbitControls } from "@react-three/drei";
|
|
5
5
|
import { Matrix3, Matrix4, Vector3, Vector2, UniformsUtils, Data3DTexture, RedFormat, FloatType, LinearFilter, FrontSide, Scene, Group, MeshPhysicalMaterial, MeshBasicMaterial, MeshStandardMaterial, BackSide } from "three";
|
|
6
|
-
import { C as CoordinationType,
|
|
6
|
+
import { C as CoordinationType, b as getImageSize } from "./index-uF7T9QQ9.js";
|
|
7
7
|
function MeasureLine({ currentLine, scale }) {
|
|
8
8
|
const textRef = useRef(null);
|
|
9
9
|
return jsxs("group", { children: [jsx(Center, { bottom: true, right: true, position: [currentLine.midPoint.x, currentLine.midPoint.y, currentLine.midPoint.z], rotation: [0, 0, 0], children: jsx(Text, { color: "gray", scale: 0.05, ref: textRef, children: `${(currentLine.startPoint.distanceTo(currentLine.endPoint) * scale).toFixed(2)} µm` }) }), jsx(Line, {
|
|
@@ -945,8 +945,8 @@ function GeometryAndMesh(props) {
|
|
|
945
945
|
setObsHighlight(e.object.name);
|
|
946
946
|
}, onPointerOut: () => setObsHighlight(null) }) })] }) : null, renderingSettings.uniforms && renderingSettings.shader && renderingSettings.meshScale && renderingSettings.geometrySize ? jsx("group", { children: jsxs("mesh", { scale: renderingSettings.meshScale, ref: materialRef, children: [jsx("boxGeometry", { args: renderingSettings.geometrySize }), jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: FrontSide, uniforms: renderingSettings.uniforms, needsUpdate: true, transparent: true, vertexShader: renderingSettings.shader.vertexShader, fragmentShader: renderingSettings.shader.fragmentShader })] }) }) : null] }), jsx("group", { name: "lines", children: lines.map((object) => jsx(MeasureLine, { currentLine: object, scale: 1 }, stringifyLineData(object))) })] });
|
|
947
947
|
}
|
|
948
|
-
const LazyGeometryAndMeshXR = React__default.lazy(() => import("./GeometryAndMeshXR-
|
|
949
|
-
const LazyXRSceneComponents = React__default.lazy(() => import("./XRSceneComponents-
|
|
948
|
+
const LazyGeometryAndMeshXR = React__default.lazy(() => import("./GeometryAndMeshXR-BSJ2rBtK.js").catch(() => ({ default: GeometryAndMesh })));
|
|
949
|
+
const LazyXRSceneComponents = React__default.lazy(() => import("./XRSceneComponents-KvBqtraG.js").catch(() => ({ default: () => null })));
|
|
950
950
|
function SpatialThree(props) {
|
|
951
951
|
const materialRef = useRef(null);
|
|
952
952
|
const orbitRef = useRef(null);
|
|
@@ -1303,13 +1303,13 @@ function getXRModule() {
|
|
|
1303
1303
|
}
|
|
1304
1304
|
const LazyXRWrapper = React__default.lazy(
|
|
1305
1305
|
// eslint-disable-next-line implicit-arrow-linebreak, function-paren-newline
|
|
1306
|
-
() => import("./XRWrapper-
|
|
1306
|
+
() => import("./XRWrapper-BNdj_qnt.js").catch(() => ({
|
|
1307
1307
|
default: ({ children }) => children
|
|
1308
1308
|
}))
|
|
1309
1309
|
);
|
|
1310
1310
|
const LazyXREnterButton = React__default.lazy(
|
|
1311
1311
|
// eslint-disable-next-line implicit-arrow-linebreak, function-paren-newline
|
|
1312
|
-
() => import("./XREnterButton-
|
|
1312
|
+
() => import("./XREnterButton-D-MyjNiM.js").catch(() => ({
|
|
1313
1313
|
default: () => null
|
|
1314
1314
|
}))
|
|
1315
1315
|
);
|