@vitessce/neuroglancer 3.5.12 → 3.6.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/index.js CHANGED
@@ -1,6 +1,4 @@
1
- import { N } from "./index-2198a785.js";
2
- import "react";
3
- import "@vitessce/vit-s";
1
+ import { N } from "./index-C1Dm5JHD.js";
4
2
  export {
5
3
  N as NeuroglancerSubscriber
6
4
  };
@@ -1,2 +1,15 @@
1
- export function Neuroglancer(props: any): JSX.Element;
1
+ export class Neuroglancer {
2
+ constructor(props: any);
3
+ bundleRoot: any;
4
+ viewerState: any;
5
+ justReceivedExternalUpdate: boolean;
6
+ prevElement: any;
7
+ prevClickHandler: ((event: any) => void) | null;
8
+ prevMouseStateChanged: any;
9
+ prevHoverHandler: (() => void) | null;
10
+ onViewerStateChanged(nextState: any): void;
11
+ onRef(viewerRef: any): void;
12
+ UNSAFE_componentWillUpdate(prevProps: any): void;
13
+ render(): JSX.Element;
14
+ }
2
15
  //# sourceMappingURL=Neuroglancer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Neuroglancer.d.ts","sourceRoot":"","sources":["../src/Neuroglancer.js"],"names":[],"mappings":"AAiBA,sDA+BC"}
1
+ {"version":3,"file":"Neuroglancer.d.ts","sourceRoot":"","sources":["../src/Neuroglancer.js"],"names":[],"mappings":"AAkEA;IACE,wBAeC;IAZC,gBAAgC;IAEhC,iBAAoC;IACpC,oCAAuC;IAEvC,iBAAuB;IACvB,gDAA4B;IAC5B,2BAAiC;IACjC,sCAA4B;IAkD9B,2CASC;IArDD,4BA0CC;IAaD,iDAQC;IAED,sBAqBC;CACF"}
@@ -1,28 +1,132 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useCallback, useMemo, Suspense } from 'react';
2
+ /* eslint-disable react-refresh/only-export-components */
3
+ import React, { PureComponent, Suspense } from 'react';
3
4
  import { ChunkWorker } from '@vitessce/neuroglancer-workers';
4
- import { useStyles, globalNeuroglancerCss } from './styles.js';
5
- // We lazy load the Neuroglancer component,
6
- // because the non-dynamic import causes problems for Vitest,
7
- // as the package appears contain be a mix of CommonJS and ESM syntax.
5
+ import { isEqualWith, pick } from 'lodash-es';
6
+ import { NeuroglancerGlobalStyles } from './styles.js';
8
7
  const LazyReactNeuroglancer = React.lazy(async () => {
9
8
  const ReactNeuroglancer = await import('@janelia-flyem/react-neuroglancer');
10
9
  return ReactNeuroglancer;
11
10
  });
12
- // Reference: https://github.com/developit/jsdom-worker/issues/14#issuecomment-1268070123
13
11
  function createWorker() {
14
12
  return new ChunkWorker();
15
13
  }
16
- export function Neuroglancer(props) {
17
- const { viewerState, onViewerStateChanged, } = props;
18
- const classes = useStyles();
19
- const bundleRoot = useMemo(() => createWorker(), []);
20
- const handleStateChanged = useCallback((newState) => {
21
- if (JSON.stringify(newState) !== JSON.stringify(viewerState)) {
22
- if (onViewerStateChanged) {
23
- onViewerStateChanged(newState);
14
+ /**
15
+ * Is this a valid viewerState object?
16
+ * @param {object} viewerState
17
+ * @returns {boolean}
18
+ */
19
+ function isValidState(viewerState) {
20
+ const { projectionScale, projectionOrientation, position, dimensions } = viewerState || {};
21
+ return (dimensions !== undefined
22
+ && typeof projectionScale === 'number'
23
+ && Array.isArray(projectionOrientation)
24
+ && projectionOrientation.length === 4
25
+ && Array.isArray(position)
26
+ && position.length === 3);
27
+ }
28
+ // TODO: Do we want to use the same epsilon value
29
+ // for every viewstate property being compared?
30
+ const EPSILON = 1e-7;
31
+ const VIEWSTATE_KEYS = ['projectionScale', 'projectionOrientation', 'position'];
32
+ // Custom numeric comparison function
33
+ // for isEqualWith, to be able to set a custom epsilon.
34
+ function customizer(a, b) {
35
+ if (typeof a === 'number' && typeof b === 'number') {
36
+ // Returns true if the values are equivalent, else false.
37
+ return Math.abs(a - b) > EPSILON;
38
+ }
39
+ // Return undefined to fallback to the default
40
+ // comparison function.
41
+ return undefined;
42
+ }
43
+ /**
44
+ * Returns true if the two states are equal, or false if not.
45
+ * @param {object} prevState Previous viewer state.
46
+ * @param {object} nextState Next viewer state.
47
+ * @returns
48
+ */
49
+ function compareViewerState(prevState, nextState) {
50
+ if (isValidState(nextState)) {
51
+ // Subset the viewerState objects to only the keys
52
+ // that we want to use for comparison.
53
+ const prevSubset = pick(prevState, VIEWSTATE_KEYS);
54
+ const nextSubset = pick(nextState, VIEWSTATE_KEYS);
55
+ return isEqualWith(prevSubset, nextSubset, customizer);
56
+ }
57
+ return true;
58
+ }
59
+ export class Neuroglancer extends PureComponent {
60
+ constructor(props) {
61
+ super(props);
62
+ this.bundleRoot = createWorker();
63
+ this.viewerState = props.viewerState;
64
+ this.justReceivedExternalUpdate = false;
65
+ this.prevElement = null;
66
+ this.prevClickHandler = null;
67
+ this.prevMouseStateChanged = null;
68
+ this.prevHoverHandler = null;
69
+ this.onViewerStateChanged = this.onViewerStateChanged.bind(this);
70
+ this.onRef = this.onRef.bind(this);
71
+ }
72
+ onRef(viewerRef) {
73
+ // Here, we have access to the viewerRef.viewer object,
74
+ // which we can use to add/remove event handlers.
75
+ const { onSegmentClick, onSelectHoveredCoords, } = this.props;
76
+ if (viewerRef) {
77
+ // Mount
78
+ const { viewer } = viewerRef;
79
+ this.prevElement = viewer.element;
80
+ this.prevMouseStateChanged = viewer.mouseState.changed;
81
+ this.prevClickHandler = (event) => {
82
+ if (event.button === 0) {
83
+ setTimeout(() => {
84
+ const { pickedValue } = viewer.mouseState;
85
+ if (pickedValue && pickedValue?.low) {
86
+ onSegmentClick(pickedValue?.low);
87
+ }
88
+ }, 100);
89
+ }
90
+ };
91
+ viewer.element.addEventListener('mousedown', this.prevClickHandler);
92
+ this.prevHoverHandler = () => {
93
+ if (viewer.mouseState.pickedValue !== undefined) {
94
+ const pickedSegment = viewer.mouseState.pickedValue;
95
+ onSelectHoveredCoords(pickedSegment?.low);
96
+ }
97
+ };
98
+ viewer.mouseState.changed.add(this.prevHoverHandler);
99
+ }
100
+ else {
101
+ // Unmount (viewerRef is null)
102
+ if (this.prevElement && this.prevClickHandler) {
103
+ this.prevElement.removeEventListener('mousedown', this.prevClickHandler);
24
104
  }
105
+ if (this.prevMouseStateChanged && this.prevHoverHandler) {
106
+ this.prevMouseStateChanged.remove(this.prevHoverHandler);
107
+ }
108
+ }
109
+ }
110
+ onViewerStateChanged(nextState) {
111
+ const { setViewerState } = this.props;
112
+ const { viewerState: prevState } = this;
113
+ if (!this.justReceivedExternalUpdate && !compareViewerState(prevState, nextState)) {
114
+ this.viewerState = nextState;
115
+ this.justReceivedExternalUpdate = false;
116
+ setViewerState(nextState);
117
+ }
118
+ }
119
+ UNSAFE_componentWillUpdate(prevProps) {
120
+ if (!compareViewerState(this.viewerState, prevProps.viewerState)) {
121
+ this.viewerState = prevProps.viewerState;
122
+ this.justReceivedExternalUpdate = true;
123
+ setTimeout(() => {
124
+ this.justReceivedExternalUpdate = false;
125
+ }, 100);
25
126
  }
26
- }, [onViewerStateChanged, viewerState]);
27
- return (_jsxs(_Fragment, { children: [_jsx("style", { children: globalNeuroglancerCss }), _jsx("div", { className: classes.neuroglancerWrapper, children: _jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(LazyReactNeuroglancer, { brainMapsClientId: "NOT_A_VALID_ID", viewerState: viewerState, onViewerStateChanged: handleStateChanged, bundleRoot: bundleRoot }) }) })] }));
127
+ }
128
+ render() {
129
+ const { classes, } = this.props;
130
+ return (_jsxs(_Fragment, { children: [_jsx(NeuroglancerGlobalStyles, { classes: classes }), _jsx("div", { className: classes.neuroglancerWrapper, children: _jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(LazyReactNeuroglancer, { brainMapsClientId: "NOT_A_VALID_ID", viewerState: this.viewerState, onViewerStateChanged: this.onViewerStateChanged, bundleRoot: this.bundleRoot, ref: this.onRef }) }) })] }));
131
+ }
28
132
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NeuroglancerSubscriber.d.ts","sourceRoot":"","sources":["../src/NeuroglancerSubscriber.js"],"names":[],"mappings":"AAQA,gEA0BC"}
1
+ {"version":3,"file":"NeuroglancerSubscriber.d.ts","sourceRoot":"","sources":["../src/NeuroglancerSubscriber.js"],"names":[],"mappings":"AAgEA,gEAqKC"}
@@ -1,8 +1,124 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TitleInfo, } from '@vitessce/vit-s';
3
- import { ViewHelpMapping } from '@vitessce/constants-internal';
2
+ /* eslint-disable no-unused-vars */
3
+ import React, { useCallback, useMemo } from 'react';
4
+ import { TitleInfo, useCoordination, useObsSetsData, useLoaders, useObsEmbeddingData, } from '@vitessce/vit-s';
5
+ import { ViewHelpMapping, ViewType, COMPONENT_COORDINATION_TYPES, } from '@vitessce/constants-internal';
6
+ import { mergeObsSets, getCellColors, setObsSelection } from '@vitessce/sets-utils';
4
7
  import { Neuroglancer } from './Neuroglancer.js';
8
+ import { useStyles } from './styles.js';
9
+ const NEUROGLANCER_ZOOM_BASIS = 16;
10
+ function mapVitessceToNeuroglancer(zoom) {
11
+ return NEUROGLANCER_ZOOM_BASIS * (2 ** -zoom);
12
+ }
13
+ function mapNeuroglancerToVitessce(projectionScale) {
14
+ return -Math.log2(projectionScale / NEUROGLANCER_ZOOM_BASIS);
15
+ }
16
+ function quaternionToEuler([x, y, z, w]) {
17
+ // X-axis rotation (Roll)
18
+ const thetaX = Math.atan2(2 * (w * x + y * z), 1 - 2 * (x * x + y * y));
19
+ // Y-axis rotation (Pitch)
20
+ const sinp = 2 * (w * y - z * x);
21
+ const thetaY = Math.abs(sinp) >= 1 ? Math.sign(sinp) * (Math.PI / 2) : Math.asin(sinp);
22
+ // Convert to degrees as Vitessce expects degrees?
23
+ return [thetaX * (180 / Math.PI), thetaY * (180 / Math.PI)];
24
+ }
25
+ function eulerToQuaternion(thetaX, thetaY) {
26
+ // Convert Euler angles (X, Y rotations) to quaternion
27
+ const halfThetaX = thetaX / 2;
28
+ const halfThetaY = thetaY / 2;
29
+ const sinX = Math.sin(halfThetaX);
30
+ const cosX = Math.cos(halfThetaX);
31
+ const sinY = Math.sin(halfThetaY);
32
+ const cosY = Math.cos(halfThetaY);
33
+ return [
34
+ sinX * cosY,
35
+ cosX * sinY,
36
+ sinX * sinY,
37
+ cosX * cosY,
38
+ ];
39
+ }
40
+ function normalizeQuaternion(q) {
41
+ const length = Math.sqrt((q[0] ** 2) + (q[1] ** 2) + (q[2] ** 2) + (q[3] ** 2));
42
+ return q.map(value => value / length);
43
+ }
5
44
  export function NeuroglancerSubscriber(props) {
6
- const { closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title = 'Neuroglancer', viewerState: viewerStateInitial = null, helpText = ViewHelpMapping.NEUROGLANCER, } = props;
7
- return (_jsx(TitleInfo, { title: title, helpText: helpText, isSpatial: true, theme: theme, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: true, children: viewerStateInitial && _jsx(Neuroglancer, { viewerState: viewerStateInitial }) }));
45
+ const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, title = 'Neuroglancer', helpText = ViewHelpMapping.NEUROGLANCER, viewerState: initialViewerState, } = props;
46
+ const [{ dataset, obsType, spatialZoom, spatialTargetX, spatialTargetY, spatialRotationX, spatialRotationY,
47
+ // spatialRotationZ,
48
+ // spatialRotationOrbit,
49
+ // spatialOrbitAxis,
50
+ embeddingType: mapping, obsSetSelection: cellSetSelection, additionalObsSets: additionalCellSets, obsSetColor: cellSetColor, }, { setAdditionalObsSets: setAdditionalCellSets, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setObsSetSelection: setCellSetSelection, setObsHighlight: setCellHighlight, setSpatialTargetX: setTargetX, setSpatialTargetY: setTargetY, setSpatialRotationX: setRotationX, setSpatialRotationY: setRotationY,
51
+ // setSpatialRotationZ: setRotationZ,
52
+ // setSpatialRotationOrbit: setRotationOrbit,
53
+ setSpatialZoom: setZoom, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.NEUROGLANCER], coordinationScopes);
54
+ const { classes } = useStyles();
55
+ const loaders = useLoaders();
56
+ const [{ obsSets: cellSets }] = useObsSetsData(loaders, dataset, false, { setObsSetSelection: setCellSetSelection, setObsSetColor: setCellSetColor }, { cellSetSelection, obsSetColor: cellSetColor }, { obsType });
57
+ const [{ obsIndex }] = useObsEmbeddingData(loaders, dataset, true, {}, {}, { obsType, embeddingType: mapping });
58
+ const handleStateUpdate = useCallback((newState) => {
59
+ const { projectionScale, projectionOrientation, position } = newState;
60
+ setZoom(mapNeuroglancerToVitessce(projectionScale));
61
+ const vitessceEularMapping = quaternionToEuler(projectionOrientation);
62
+ // TODO: support z rotation on SpatialView?
63
+ setRotationX(vitessceEularMapping[0]);
64
+ setRotationY(vitessceEularMapping[1]);
65
+ // Note: To pan in Neuroglancer, use shift+leftKey+drag
66
+ setTargetX(position[0]);
67
+ setTargetY(position[1]);
68
+ }, [setZoom, setTargetX, setTargetY, setRotationX, setRotationY]);
69
+ const onSegmentClick = useCallback((value) => {
70
+ if (value) {
71
+ const selectedCellIds = [String(value)];
72
+ setObsSelection(selectedCellIds, additionalCellSets, cellSetColor, setCellSetSelection, setAdditionalCellSets, setCellSetColor, setCellColorEncoding, 'Selection ', `: based on selected segments ${value}`);
73
+ }
74
+ }, [additionalCellSets, cellSetColor, setAdditionalCellSets,
75
+ setCellColorEncoding, setCellSetColor, setCellSetSelection,
76
+ ]);
77
+ const mergedCellSets = useMemo(() => mergeObsSets(cellSets, additionalCellSets), [cellSets, additionalCellSets]);
78
+ const cellColors = useMemo(() => getCellColors({
79
+ cellSets: mergedCellSets,
80
+ cellSetSelection,
81
+ cellSetColor,
82
+ obsIndex,
83
+ theme,
84
+ }), [mergedCellSets, theme,
85
+ cellSetColor, cellSetSelection, obsIndex]);
86
+ const rgbToHex = useCallback(rgb => (typeof rgb === 'string' ? rgb
87
+ : `#${rgb.map(c => c.toString(16).padStart(2, '0')).join('')}`), []);
88
+ const cellColorMapping = useMemo(() => {
89
+ const colorCellMapping = {};
90
+ cellColors.forEach((color, cell) => {
91
+ colorCellMapping[cell] = rgbToHex(color);
92
+ });
93
+ return colorCellMapping;
94
+ }, [cellColors, rgbToHex]);
95
+ const derivedViewerState = useMemo(() => ({
96
+ ...initialViewerState,
97
+ layers: initialViewerState.layers.map((layer, index) => (index === 0
98
+ ? {
99
+ ...layer,
100
+ segments: Object.keys(cellColorMapping).map(String),
101
+ segmentColors: cellColorMapping,
102
+ }
103
+ : layer)),
104
+ }), [cellColorMapping, initialViewerState]);
105
+ const derivedViewerState2 = useMemo(() => {
106
+ if (typeof spatialZoom === 'number' && typeof spatialTargetX === 'number') {
107
+ const projectionScale = mapVitessceToNeuroglancer(spatialZoom);
108
+ const position = [spatialTargetX, spatialTargetY, derivedViewerState.position[2]];
109
+ const projectionOrientation = normalizeQuaternion(eulerToQuaternion(spatialRotationX, spatialRotationY));
110
+ return {
111
+ ...derivedViewerState,
112
+ projectionScale,
113
+ position,
114
+ projectionOrientation,
115
+ };
116
+ }
117
+ return derivedViewerState;
118
+ }, [derivedViewerState, spatialZoom, spatialTargetX,
119
+ spatialTargetY, spatialRotationX, spatialRotationY]);
120
+ const onSegmentHighlight = useCallback((obsId) => {
121
+ setCellHighlight(String(obsId));
122
+ }, [obsIndex, setCellHighlight]);
123
+ return (_jsx(TitleInfo, { title: title, helpText: helpText, isSpatial: true, theme: theme, closeButtonVisible: closeButtonVisible, downloadButtonVisible: downloadButtonVisible, removeGridComponent: removeGridComponent, isReady: true, withPadding: false, children: _jsx(Neuroglancer, { classes: classes, onSegmentClick: onSegmentClick, onSelectHoveredCoords: onSegmentHighlight, viewerState: derivedViewerState2, setViewerState: handleStateUpdate }) }));
8
124
  }
@@ -1,3 +1,11 @@
1
- export const globalNeuroglancerCss: "\n\n.neuroglancer-position-widget, \n.neuroglancer-viewer-top-row,\n.neuroglancer-layer-panel, \n.neuroglancer-side-panel-column,\n.neuroglancer-data-panel-layout-controls button{\n display: none !important;\n}\n \n.neuroglancer-segment-list-header-label {\n display: none !important;\n}\n.overlay {\n height:100%;\n width:100%;\n position:fixed;\n z-index:99;\n top:0;\n left:0;\n background-color:#000c;\n}\n.overlay-content {\n position:absolute;\n top:50%;\n left:50%;\n transform:translate(-50%,-50%);\n background-color:#fff;\n z-index:100;\n color:#000;\n padding:1em;\n}\n.neuroglancer-state-editor {\n width: 80%\n}\n.close-button {\n position: absolute;\n right: 15px\n}\n\n.CodeMirror {\n font-family: monospace;\n height: 300px;\n color: #000;\n direction: ltr\n}\n\n.CodeMirror-lines {\n padding: 4px 0\n}\n\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n padding: 0 4px\n}\n\n.CodeMirror-scrollbar-filler,\n.CodeMirror-gutter-filler {\n background-color: #fff\n}\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap\n}\n\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap\n}\n\n.CodeMirror-guttermarker {\n color: #000\n}\n\n.CodeMirror-guttermarker-subtle {\n color: #999\n}\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0\n}\n\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver\n}\n\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7\n}\n\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1\n}\n\n.cm-fat-cursor-mark {\n background-color: #14ff1480;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite\n}\n\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7\n}\n\n@-moz-keyframes blink {\n 50% {\n background-color: transparent\n }\n}\n\n@-webkit-keyframes blink {\n 50% {\n background-color: transparent\n }\n}\n\n@keyframes blink {\n 50% {\n background-color: transparent\n }\n}\n\n.cm-tab {\n display: inline-block;\n text-decoration: inherit\n}\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0;\n right: 0;\n top: -50px;\n bottom: 0;\n overflow: hidden\n}\n\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0;\n bottom: 0;\n position: absolute\n}\n\n.cm-s-default .cm-header {\n color: #00f\n}\n\n.cm-s-default .cm-quote {\n color: #090\n}\n\n.cm-negative {\n color: #d44\n}\n\n.cm-positive {\n color: #292\n}\n\n.cm-header,\n.cm-strong {\n font-weight: bold\n}\n\n.cm-em {\n font-style: italic\n}\n\n.cm-link {\n text-decoration: underline\n}\n\n.cm-strikethrough {\n text-decoration: line-through\n}\n\n.cm-s-default .cm-keyword {\n color: #708\n}\n\n.cm-s-default .cm-atom {\n color: #219\n}\n\n.cm-s-default .cm-number {\n color: #164\n}\n\n.cm-s-default .cm-def {\n color: #00f\n}\n\n.cm-s-default .cm-variable-2 {\n color: #05a\n}\n\n.cm-s-default .cm-variable-3,\n.cm-s-default .cm-type {\n color: #085\n}\n\n.cm-s-default .cm-comment {\n color: #a50\n}\n\n.cm-s-default .cm-string {\n color: #a11\n}\n\n.cm-s-default .cm-string-2 {\n color: #f50\n}\n\n.cm-s-default .cm-meta {\n color: #555\n}\n\n.cm-s-default .cm-qualifier {\n color: #555\n}\n\n.cm-s-default .cm-builtin {\n color: #30a\n}\n\n.cm-s-default .cm-bracket {\n color: #997\n}\n\n.cm-s-default .cm-tag {\n color: #170\n}\n\n.cm-s-default .cm-attribute {\n color: #00c\n}\n\n.cm-s-default .cm-hr {\n color: #999\n}\n\n.cm-s-default .cm-link {\n color: #00c\n}\n\n.cm-s-default .cm-error {\n color: red\n}\n\n.cm-invalidchar {\n color: red\n}\n\n.CodeMirror-composing {\n border-bottom: 2px solid\n}\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {\n color: #0b0\n}\n\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {\n color: #a22\n}\n\n.CodeMirror-matchingtag {\n background: rgba(255, 150, 0, .3)\n}\n\n.CodeMirror-activeline-background {\n background: #e8f2ff\n}\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important;\n margin-bottom: -50px;\n margin-right: -50px;\n padding-bottom: 50px;\n height: 100%;\n outline: none;\n position: relative\n}\n\n.CodeMirror-sizer {\n position: relative;\n border-right: 50px solid transparent\n}\n\n.CodeMirror-vscrollbar,\n.CodeMirror-hscrollbar,\n.CodeMirror-scrollbar-filler,\n.CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n outline: none\n}\n\n.CodeMirror-vscrollbar {\n right: 0;\n top: 0;\n overflow-x: hidden;\n overflow-y: scroll\n}\n\n.CodeMirror-hscrollbar {\n bottom: 0;\n left: 0;\n overflow-y: hidden;\n overflow-x: scroll\n}\n\n.CodeMirror-scrollbar-filler {\n right: 0;\n bottom: 0\n}\n\n.CodeMirror-gutter-filler {\n left: 0;\n bottom: 0\n}\n\n.CodeMirror-gutters {\n position: absolute;\n left: 0;\n top: 0;\n min-height: 100%;\n z-index: 3\n}\n\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -50px\n}\n\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important\n}\n\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 4\n}\n\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4\n}\n\n.CodeMirror-gutter-wrapper ::selection {\n background-color: transparent\n}\n\n.CodeMirror-gutter-wrapper ::-moz-selection {\n background-color: transparent\n}\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px\n}\n\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n -moz-border-radius: 0;\n -webkit-border-radius: 0;\n border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual\n}\n\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 0\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: .1px\n}\n\n.CodeMirror-rtl pre {\n direction: rtl\n}\n\n.CodeMirror-code {\n outline: none\n}\n\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none\n}\n\n.CodeMirror-measure pre {\n position: static\n}\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3\n}\n\ndiv.CodeMirror-dragcursors {\n visibility: visible\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible\n}\n\n.CodeMirror-selected {\n background: #d9d9d9\n}\n\n.CodeMirror-focused .CodeMirror-selected {\n background: #d7d4f0\n}\n\n.CodeMirror-crosshair {\n cursor: crosshair\n}\n\n.CodeMirror-line::selection,\n.CodeMirror-line>span::selection,\n.CodeMirror-line>span>span::selection {\n background: #d7d4f0\n}\n\n.CodeMirror-line::-moz-selection,\n.CodeMirror-line>span::-moz-selection,\n.CodeMirror-line>span>span::-moz-selection {\n background: #d7d4f0\n}\n\n.cm-searching {\n background-color: #ffa;\n background-color: #ff06\n}\n\n.cm-force-border {\n padding-right: .1px\n}\n\n@media print {\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden\n }\n}\n\n.cm-tab-wrap-hack:after {\n content: \"\"\n}\n\nspan.CodeMirror-selectedtext {\n background: none\n}\n\n.CodeMirror-foldmarker {\n color: #00f;\n text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n font-family: arial;\n line-height: .3;\n cursor: pointer\n}\n\n.CodeMirror-foldgutter {\n width: .7em\n}\n\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n cursor: pointer\n}\n\n.CodeMirror-foldgutter-open:after {\n content: \"\\25be\"\n}\n\n.CodeMirror-foldgutter-folded:after {\n content: \"\\25b8\"\n}\n\n.CodeMirror-lint-markers {\n width: 16px\n}\n\n.CodeMirror-lint-tooltip {\n background-color: #ffd;\n border: 1px solid black;\n border-radius: 4px;\n color: #000;\n font-family: monospace;\n font-size: 10pt;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n white-space: pre;\n white-space: pre-wrap;\n z-index: 100;\n max-width: 600px;\n opacity: 0;\n transition: opacity .4s;\n -moz-transition: opacity .4s;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n -ms-transition: opacity .4s\n}\n\n.CodeMirror-lint-mark {\n background-position: left bottom;\n background-repeat: repeat-x\n}\n\n.CodeMirror-lint-mark-warning {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=)\n}\n\n.CodeMirror-lint-mark-error {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==)\n}\n\n.CodeMirror-lint-marker {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n position: relative\n}\n\n.CodeMirror-lint-message {\n padding-left: 18px;\n background-position: top left;\n background-repeat: no-repeat\n}\n\n.CodeMirror-lint-marker-warning,\n.CodeMirror-lint-message-warning {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=)\n}\n\n.CodeMirror-lint-marker-error,\n.CodeMirror-lint-message-error {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=)\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC);\n background-repeat: no-repeat;\n background-position: right bottom;\n width: 100%;\n height: 100%\n}\n";
2
- export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"neuroglancerWrapper">;
1
+ export function NeuroglancerGlobalStyles(props: any): import(".pnpm/@types+react@19.1.6/node_modules/@types/react").JSX.Element;
2
+ export const useStyles: (params: void, muiStyleOverridesParams?: {
3
+ props: Record<string, unknown>;
4
+ ownerState?: Record<string, unknown> | undefined;
5
+ } | undefined) => {
6
+ classes: Record<"neuroglancerWrapper", string>;
7
+ theme: import("@mui/material").Theme;
8
+ css: import("tss-react").Css;
9
+ cx: import("tss-react").Cx;
10
+ };
3
11
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAmBA,4jXAqnBE;AAEF,2HA27DI"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAmkFA,gIAcC;AA7kFD;;cAiBe,CAAC;;;kBAIP,eAAsB;gBACxB,WAAU;eAGf,WAAU;EApBR"}