@vitessce/neuroglancer 3.6.17 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import React__default from "react";
2
- import { g as getDefaultExportFromCjs, c as commonjsGlobal, a as getAugmentedNamespace, r as requirePropTypes } from "./index-BXP8Qz6x.js";
2
+ import { g as getDefaultExportFromCjs, c as commonjsGlobal, a as getAugmentedNamespace, r as requirePropTypes } from "./index-BNCfoEHv.js";
3
3
  var lib = {};
4
4
  var es6_object_assign = {};
5
5
  var _global = { exports: {} };
@@ -1,6 +1,6 @@
1
1
  import * as React$1 from "react";
2
2
  import React__default, { useContext, forwardRef, useRef, useMemo, createContext, createElement, PureComponent, Suspense, useCallback } from "react";
3
- import { useCoordination, useLoaders, useObsSetsData, useObsEmbeddingData, TitleInfo } from "@vitessce/vit-s";
3
+ import { useLoaders, useCoordinationScopes, useCoordination, useObsSetsData, useObsEmbeddingData, TitleInfo } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  const ViewType$1 = {
6
6
  DESCRIPTION: "description",
@@ -28428,7 +28428,7 @@ function NeuroglancerGlobalStyles(props) {
28428
28428
  }
28429
28429
  ));
28430
28430
  }
28431
- const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-BGKoIvYb.js"));
28431
+ const LazyReactNeuroglancer = React__default.lazy(() => import("./ReactNeuroglancer-Crquekcy.js"));
28432
28432
  function createWorker() {
28433
28433
  return new WorkerFactory();
28434
28434
  }
@@ -28568,7 +28568,7 @@ function normalizeQuaternion(q) {
28568
28568
  }
28569
28569
  function NeuroglancerSubscriber(props) {
28570
28570
  const {
28571
- coordinationScopes,
28571
+ coordinationScopes: coordinationScopesRaw,
28572
28572
  closeButtonVisible,
28573
28573
  downloadButtonVisible,
28574
28574
  removeGridComponent,
@@ -28577,6 +28577,8 @@ function NeuroglancerSubscriber(props) {
28577
28577
  helpText = ViewHelpMapping.NEUROGLANCER,
28578
28578
  viewerState: initialViewerState
28579
28579
  } = props;
28580
+ const loaders = useLoaders();
28581
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
28580
28582
  const [{
28581
28583
  dataset,
28582
28584
  obsType,
@@ -28607,7 +28609,6 @@ function NeuroglancerSubscriber(props) {
28607
28609
  setSpatialZoom: setZoom
28608
28610
  }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$1.NEUROGLANCER], coordinationScopes);
28609
28611
  const { classes } = useStyles();
28610
- const loaders = useLoaders();
28611
28612
  const [{ obsSets: cellSets }] = useObsSetsData(
28612
28613
  loaders,
28613
28614
  dataset,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { N } from "./index-BXP8Qz6x.js";
1
+ import { N } from "./index-BNCfoEHv.js";
2
2
  export {
3
3
  N as NeuroglancerSubscriber
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NeuroglancerSubscriber.d.ts","sourceRoot":"","sources":["../src/NeuroglancerSubscriber.js"],"names":[],"mappings":"AAgEA,gEAqKC"}
1
+ {"version":3,"file":"NeuroglancerSubscriber.d.ts","sourceRoot":"","sources":["../src/NeuroglancerSubscriber.js"],"names":[],"mappings":"AAiEA,gEAuKC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /* eslint-disable no-unused-vars */
3
3
  import React, { useCallback, useMemo } from 'react';
4
- import { TitleInfo, useCoordination, useObsSetsData, useLoaders, useObsEmbeddingData, } from '@vitessce/vit-s';
4
+ import { TitleInfo, useCoordination, useObsSetsData, useLoaders, useObsEmbeddingData, useCoordinationScopes, } from '@vitessce/vit-s';
5
5
  import { ViewHelpMapping, ViewType, COMPONENT_COORDINATION_TYPES, } from '@vitessce/constants-internal';
6
6
  import { mergeObsSets, getCellColors, setObsSelection } from '@vitessce/sets-utils';
7
7
  import { Neuroglancer } from './Neuroglancer.js';
@@ -42,7 +42,9 @@ function normalizeQuaternion(q) {
42
42
  return q.map(value => value / length);
43
43
  }
44
44
  export function NeuroglancerSubscriber(props) {
45
- const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title = 'Neuroglancer', helpText = ViewHelpMapping.NEUROGLANCER, viewerState: initialViewerState, } = props;
45
+ const { coordinationScopes: coordinationScopesRaw, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title = 'Neuroglancer', helpText = ViewHelpMapping.NEUROGLANCER, viewerState: initialViewerState, } = props;
46
+ const loaders = useLoaders();
47
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
46
48
  const [{ dataset, obsType, spatialZoom, spatialTargetX, spatialTargetY, spatialRotationX, spatialRotationY,
47
49
  // spatialRotationZ,
48
50
  // spatialRotationOrbit,
@@ -52,7 +54,6 @@ export function NeuroglancerSubscriber(props) {
52
54
  // setSpatialRotationOrbit: setRotationOrbit,
53
55
  setSpatialZoom: setZoom, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.NEUROGLANCER], coordinationScopes);
54
56
  const { classes } = useStyles();
55
- const loaders = useLoaders();
56
57
  const [{ obsSets: cellSets }] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { cellSetSelection, obsSetColor: cellSetColor }, { obsType });
57
58
  const [{ obsIndex }] = useObsEmbeddingData(loaders, dataset, true, {}, {}, { obsType, embeddingType: mapping });
58
59
  const handleStateUpdate = useCallback((newState) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/neuroglancer",
3
- "version": "3.6.17",
3
+ "version": "3.7.0",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -19,24 +19,24 @@
19
19
  "@janelia-flyem/react-neuroglancer": "2.5.0",
20
20
  "@janelia-flyem/neuroglancer": "2.37.5",
21
21
  "lodash-es": "^4.17.21",
22
- "@vitessce/neuroglancer-workers": "3.6.17",
23
- "@vitessce/styles": "3.6.17",
24
- "@vitessce/constants-internal": "3.6.17",
25
- "@vitessce/vit-s": "3.6.17",
26
- "@vitessce/sets-utils": "3.6.17",
27
- "@vitessce/utils": "3.6.17",
28
- "@vitessce/tooltip": "3.6.17"
22
+ "@vitessce/neuroglancer-workers": "3.7.0",
23
+ "@vitessce/styles": "3.7.0",
24
+ "@vitessce/constants-internal": "3.7.0",
25
+ "@vitessce/vit-s": "3.7.0",
26
+ "@vitessce/sets-utils": "3.7.0",
27
+ "@vitessce/utils": "3.7.0",
28
+ "@vitessce/tooltip": "3.7.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "^16.3.0",
33
33
  "react": "^18.0.0",
34
34
  "react-dom": "^18.0.0",
35
- "vite": "^6.3.5",
35
+ "vite": "^7.0.0",
36
36
  "vitest": "^3.1.4"
37
37
  },
38
38
  "scripts": {
39
- "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
39
+ "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
40
40
  "test": "pnpm exec vitest --run"
41
41
  },
42
42
  "module": "dist/index.js",
@@ -6,6 +6,7 @@ import {
6
6
  useObsSetsData,
7
7
  useLoaders,
8
8
  useObsEmbeddingData,
9
+ useCoordinationScopes,
9
10
  } from '@vitessce/vit-s';
10
11
  import {
11
12
  ViewHelpMapping,
@@ -64,7 +65,7 @@ function normalizeQuaternion(q) {
64
65
 
65
66
  export function NeuroglancerSubscriber(props) {
66
67
  const {
67
- coordinationScopes,
68
+ coordinationScopes: coordinationScopesRaw,
68
69
  closeButtonVisible,
69
70
  downloadButtonVisible,
70
71
  removeGridComponent,
@@ -74,6 +75,9 @@ export function NeuroglancerSubscriber(props) {
74
75
  viewerState: initialViewerState,
75
76
  } = props;
76
77
 
78
+ const loaders = useLoaders();
79
+ const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
80
+
77
81
  const [{
78
82
  dataset,
79
83
  obsType,
@@ -106,7 +110,6 @@ export function NeuroglancerSubscriber(props) {
106
110
  }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.NEUROGLANCER], coordinationScopes);
107
111
 
108
112
  const { classes } = useStyles();
109
- const loaders = useLoaders();
110
113
 
111
114
  const [{ obsSets: cellSets }] = useObsSetsData(
112
115
  loaders, dataset, false,