@vitessce/layer-controller 2.0.0-beta.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.
- package/LICENSE +21 -0
- package/dist/BitmaskChannelController.js +31 -0
- package/dist/ChannelOptions.js +39 -0
- package/dist/ColorPalette.js +31 -0
- package/dist/ImageAddButton.js +28 -0
- package/dist/LayerController.js +310 -0
- package/dist/LayerControllerSubscriber.js +197 -0
- package/dist/LayerOptions.js +210 -0
- package/dist/RasterChannelController.js +160 -0
- package/dist/RasterChannelController.test.js +21 -0
- package/dist/VectorLayerController.js +30 -0
- package/dist/VolumeOptions.js +78 -0
- package/dist/constants.js +12 -0
- package/dist/index.js +3 -0
- package/dist/shared-channel-controls.js +26 -0
- package/dist/styles.js +103 -0
- package/dist/utils.js +109 -0
- package/package.json +38 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Matrix4 } from 'math.gl';
|
|
4
|
+
import Grid from '@material-ui/core/Grid';
|
|
5
|
+
import Typography from '@material-ui/core/Typography';
|
|
6
|
+
import Button from '@material-ui/core/Button';
|
|
7
|
+
import { makeStyles, createStyles } from '@material-ui/core/styles';
|
|
8
|
+
import FormControl from '@material-ui/core/FormControl';
|
|
9
|
+
import Select from '@material-ui/core/Select';
|
|
10
|
+
import InputLabel from '@material-ui/core/InputLabel';
|
|
11
|
+
import Slider from '@material-ui/core/Slider';
|
|
12
|
+
import { viv } from '@vitessce/gl';
|
|
13
|
+
import { abbreviateNumber, getBoundingCube } from './utils';
|
|
14
|
+
import { useSelectStyles } from './styles';
|
|
15
|
+
const useSlicerStyles = makeStyles(theme => createStyles({
|
|
16
|
+
enabled: {},
|
|
17
|
+
disabled: {
|
|
18
|
+
color: theme.palette.text.disabled,
|
|
19
|
+
// Because of the .5 opacity of the disabled color in the theme, and the fact
|
|
20
|
+
// that there are multiple overlaid parts to the slider,
|
|
21
|
+
// this needs to be set manually for the desired effect.
|
|
22
|
+
'& .MuiSlider-thumb': {
|
|
23
|
+
color: 'rgb(100, 100, 100, 1.0)',
|
|
24
|
+
},
|
|
25
|
+
'& .MuiSlider-track': {
|
|
26
|
+
color: 'rgb(100, 100, 100, 1.0)',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
const Slicer = ({ xSlice, ySlice, zSlice, handleSlicerSetting, loader, use3d, }) => {
|
|
31
|
+
const [xSliceInit, ySliceInit, zSliceInit] = getBoundingCube(loader.data);
|
|
32
|
+
const sliceValuesAndSetSliceFunctions = [
|
|
33
|
+
[
|
|
34
|
+
xSlice,
|
|
35
|
+
xSliceNew => handleSlicerSetting('x', xSliceNew),
|
|
36
|
+
'x',
|
|
37
|
+
xSliceInit,
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
ySlice,
|
|
41
|
+
ySliceNew => handleSlicerSetting('y', ySliceNew),
|
|
42
|
+
'y',
|
|
43
|
+
ySliceInit,
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
zSlice,
|
|
47
|
+
zSliceNew => handleSlicerSetting('z', zSliceNew),
|
|
48
|
+
'z',
|
|
49
|
+
zSliceInit,
|
|
50
|
+
],
|
|
51
|
+
];
|
|
52
|
+
const classes = useSlicerStyles();
|
|
53
|
+
const Slicers = sliceValuesAndSetSliceFunctions.map(([val, setVal, label, [min, max]]) => (_jsxs(Grid, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [_jsx(Grid, { item: true, xs: 1, children: _jsxs(Typography, { className: !use3d ? classes.disabled : classes.enabled, style: { marginBottom: 0 }, children: [label, ":"] }) }), _jsx(Grid, { item: true, xs: 11, children: _jsx(Slider, { disabled: !use3d, className: !use3d ? classes.disabled : classes.enabled, value: val, onChange: (e, v) => setVal(v), valueLabelDisplay: "auto", valueLabelFormat: v => abbreviateNumber(v), getAriaLabel: () => `${label} slider`, min: min, max: max, step: 0.005, orientation: "horizontal" }) })] }, label)));
|
|
54
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Typography, { className: !use3d ? classes.disabled : classes.enabled, style: { marginTop: 16, marginBottom: 0 }, children: ["Clipping Planes:", ' '] }), ' ', Slicers] }));
|
|
55
|
+
};
|
|
56
|
+
const renderingOptions = Object.values(viv.RENDERING_MODES);
|
|
57
|
+
function RenderingModeSelect({ handleRenderingModeChange, renderingMode, use3d, }) {
|
|
58
|
+
const classes = useSelectStyles();
|
|
59
|
+
// Empty option allows for displaying the title of the dropdown fully in the UI.
|
|
60
|
+
const options = !use3d ? [...renderingOptions, ''] : renderingOptions;
|
|
61
|
+
return (_jsxs(FormControl, { fullWidth: true, children: [_jsx(InputLabel, { htmlFor: "rendering-mode-select", children: "Rendering Mode" }), _jsx(Select, { native: true, onChange: e => handleRenderingModeChange(e.target.value), value: use3d ? renderingMode : '', inputProps: {
|
|
62
|
+
name: 'rendering-mode',
|
|
63
|
+
id: 'rendering-mode-select',
|
|
64
|
+
}, disabled: !use3d, classes: { root: classes.selectRoot }, children: options.map(name => (_jsx("option", { value: name, children: name }, name))) })] }));
|
|
65
|
+
}
|
|
66
|
+
const ReCenterButton = ({ setViewState, use3d, spatialHeight, spatialWidth, loader, modelMatrix, }) => (_jsx(Grid, { item: true, xs: "auto", children: _jsx(Button, { onClick: () => {
|
|
67
|
+
const defaultViewState = viv.getDefaultInitialViewState(loader.data, { height: spatialHeight, width: spatialWidth }, 1.5, use3d, new Matrix4(modelMatrix));
|
|
68
|
+
setViewState({
|
|
69
|
+
...defaultViewState,
|
|
70
|
+
rotationX: 0,
|
|
71
|
+
rotationOrbit: 0,
|
|
72
|
+
});
|
|
73
|
+
}, disabled: !use3d, style: {
|
|
74
|
+
padding: 0,
|
|
75
|
+
marginBottom: 6,
|
|
76
|
+
}, children: "Re-Center" }) }, "recenter"));
|
|
77
|
+
const VolumeOptions = ({ handleSlicerSetting, handleRenderingModeChange, renderingMode, xSlice, ySlice, zSlice, use3d, loader, setViewState, spatialHeight, spatialWidth, modelMatrix, }) => (_jsxs(_Fragment, { children: [_jsx(RenderingModeSelect, { handleRenderingModeChange: handleRenderingModeChange, renderingMode: renderingMode, use3d: use3d }), _jsx(Slicer, { xSlice: xSlice, ySlice: ySlice, zSlice: zSlice, handleSlicerSetting: handleSlicerSetting, use3d: use3d, loader: loader }), _jsx(ReCenterButton, { setViewState: setViewState, use3d: use3d, spatialHeight: spatialHeight, spatialWidth: spatialWidth, loader: loader, modelMatrix: modelMatrix })] }));
|
|
78
|
+
export default VolumeOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { viv } from '@vitessce/gl';
|
|
2
|
+
function getDomains() {
|
|
3
|
+
const domains = {};
|
|
4
|
+
const needMin = ['Int8', 'Int16', 'Int32'];
|
|
5
|
+
Object.keys(viv.DTYPE_VALUES).forEach((dtype) => {
|
|
6
|
+
const { max } = viv.DTYPE_VALUES[dtype];
|
|
7
|
+
const min = needMin.includes(dtype) ? -(max + 1) : 0;
|
|
8
|
+
domains[dtype] = [min, max];
|
|
9
|
+
});
|
|
10
|
+
return domains;
|
|
11
|
+
}
|
|
12
|
+
export const DOMAINS = getDomains();
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Checkbox from '@material-ui/core/Checkbox';
|
|
4
|
+
import Select from '@material-ui/core/Select';
|
|
5
|
+
import { useSelectStyles } from './styles';
|
|
6
|
+
/**
|
|
7
|
+
* Dropdown for selecting a channel.
|
|
8
|
+
* @prop {function} handleChange Callback for each new selection.
|
|
9
|
+
* @prop {array} channelOptions List of available selections, like ['DAPI', 'FITC', ...].
|
|
10
|
+
* @prop {boolean} disabled Whether or not the component is disabled.
|
|
11
|
+
* @prop {number} selectionIndex Current numeric index of a selection.
|
|
12
|
+
*/
|
|
13
|
+
export function ChannelSelectionDropdown({ handleChange, disabled, channelOptions, selectionIndex, }) {
|
|
14
|
+
const classes = useSelectStyles();
|
|
15
|
+
return (_jsx(Select, { classes: { root: classes.selectRoot }, native: true, value: selectionIndex, onChange: e => handleChange(Number(e.target.value)), children: channelOptions.map((opt, i) => (_jsx("option", { disabled: disabled, value: i, children: opt }, opt))) }));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Checkbox for toggling on/off of a channel.
|
|
19
|
+
* @prop {string} color Current color for this channel.
|
|
20
|
+
* @prop {boolean} checked Whether or not this channel is "on".
|
|
21
|
+
* @prop {boolean} disabled Whether or not the component is disabled.
|
|
22
|
+
* @prop {function} toggle Callback for toggling on/off.
|
|
23
|
+
*/
|
|
24
|
+
export function ChannelVisibilityCheckbox({ color, checked, toggle, disabled, }) {
|
|
25
|
+
return (_jsx(Checkbox, { onChange: toggle, checked: checked, disabled: disabled, style: { color, '&$checked': { color } } }));
|
|
26
|
+
}
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles, withStyles } from '@material-ui/core/styles';
|
|
3
|
+
import AccordionSummary from '@material-ui/core/AccordionSummary';
|
|
4
|
+
import AccordionDetails from '@material-ui/core/AccordionDetails';
|
|
5
|
+
import InputLabel from '@material-ui/core/InputLabel';
|
|
6
|
+
import Slider from '@material-ui/core/Slider';
|
|
7
|
+
import Grid from '@material-ui/core/Grid';
|
|
8
|
+
const useSpanStyles = makeStyles(() => ({
|
|
9
|
+
span: {
|
|
10
|
+
width: '70px',
|
|
11
|
+
textAlign: 'center',
|
|
12
|
+
paddingLeft: '2px',
|
|
13
|
+
paddingRight: '2px',
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
16
|
+
export function MuiSpan(props) {
|
|
17
|
+
const { children } = props;
|
|
18
|
+
const classes = useSpanStyles();
|
|
19
|
+
return _jsx("span", { className: classes.span, children: children });
|
|
20
|
+
}
|
|
21
|
+
export const useSelectStyles = makeStyles(() => ({
|
|
22
|
+
selectRoot: {
|
|
23
|
+
padding: 0,
|
|
24
|
+
height: 'auto',
|
|
25
|
+
margin: '4px 0',
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
export const useOptionStyles = withStyles(theme => ({
|
|
29
|
+
paper: {
|
|
30
|
+
backgroundColor: theme.palette.background.paper,
|
|
31
|
+
},
|
|
32
|
+
span: {
|
|
33
|
+
width: '70px',
|
|
34
|
+
textAlign: 'center',
|
|
35
|
+
paddingLeft: '2px',
|
|
36
|
+
paddingRight: '2px',
|
|
37
|
+
},
|
|
38
|
+
colors: {
|
|
39
|
+
'&:hover': {
|
|
40
|
+
backgroundColor: 'transparent',
|
|
41
|
+
},
|
|
42
|
+
paddingLeft: '2px',
|
|
43
|
+
paddingRight: '2px',
|
|
44
|
+
},
|
|
45
|
+
popper: {
|
|
46
|
+
zIndex: 4,
|
|
47
|
+
},
|
|
48
|
+
}));
|
|
49
|
+
const sharedControllerStyles = {
|
|
50
|
+
width: '100%',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
};
|
|
53
|
+
export const useControllerSectionStyles = makeStyles(() => ({
|
|
54
|
+
root: {
|
|
55
|
+
...sharedControllerStyles,
|
|
56
|
+
padding: '0px 8px',
|
|
57
|
+
},
|
|
58
|
+
}));
|
|
59
|
+
export const StyledAccordionDetails = withStyles(() => ({
|
|
60
|
+
root: {
|
|
61
|
+
...sharedControllerStyles,
|
|
62
|
+
padding: '8px 8px 24px 8px',
|
|
63
|
+
},
|
|
64
|
+
}))(AccordionDetails);
|
|
65
|
+
export const StyledAccordionSummary = withStyles(theme => ({
|
|
66
|
+
root: {
|
|
67
|
+
padding: '0px 8px',
|
|
68
|
+
},
|
|
69
|
+
content: {
|
|
70
|
+
margin: '4px 0px',
|
|
71
|
+
minWidth: '0px',
|
|
72
|
+
},
|
|
73
|
+
expanded: {
|
|
74
|
+
marginBottom: theme.spacing(-3),
|
|
75
|
+
top: theme.spacing(-1),
|
|
76
|
+
},
|
|
77
|
+
expandIcon: {
|
|
78
|
+
'&$expanded': {
|
|
79
|
+
top: theme.spacing(-1.3),
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
}))(AccordionSummary);
|
|
83
|
+
export const StyledInputLabel = withStyles(() => ({
|
|
84
|
+
root: {
|
|
85
|
+
fontSize: '14px',
|
|
86
|
+
},
|
|
87
|
+
}))(InputLabel);
|
|
88
|
+
export const OverflowEllipsisGrid = withStyles(() => ({
|
|
89
|
+
item: {
|
|
90
|
+
width: '100%',
|
|
91
|
+
overflow: 'hidden',
|
|
92
|
+
whiteSpace: 'nowrap',
|
|
93
|
+
textOverflow: 'ellipsis',
|
|
94
|
+
},
|
|
95
|
+
}))(Grid);
|
|
96
|
+
export const StyledSelectionSlider = withStyles(() => ({
|
|
97
|
+
root: {
|
|
98
|
+
marginTop: '7px',
|
|
99
|
+
},
|
|
100
|
+
markActive: {
|
|
101
|
+
backgroundColor: 'rgba(128, 128, 128, 0.7)',
|
|
102
|
+
},
|
|
103
|
+
}))(Slider);
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { viv } from '@vitessce/gl';
|
|
2
|
+
import { Matrix4 } from 'math.gl';
|
|
3
|
+
async function getSingleSelectionStats2D({ loader, selection }) {
|
|
4
|
+
const data = Array.isArray(loader) ? loader[loader.length - 1] : loader;
|
|
5
|
+
const raster = await data.getRaster({ selection });
|
|
6
|
+
const selectionStats = viv.getChannelStats(raster.data);
|
|
7
|
+
const { domain, contrastLimits: slider } = selectionStats;
|
|
8
|
+
return { domain, slider };
|
|
9
|
+
}
|
|
10
|
+
async function getSingleSelectionStats3D({ loader, selection }) {
|
|
11
|
+
const lowResSource = loader[loader.length - 1];
|
|
12
|
+
const { shape, labels } = lowResSource;
|
|
13
|
+
// eslint-disable-next-line no-bitwise
|
|
14
|
+
const sizeZ = shape[labels.indexOf('z')] >> (loader.length - 1);
|
|
15
|
+
const raster0 = await lowResSource.getRaster({
|
|
16
|
+
selection: { ...selection, z: 0 },
|
|
17
|
+
});
|
|
18
|
+
const rasterMid = await lowResSource.getRaster({
|
|
19
|
+
selection: { ...selection, z: Math.floor(sizeZ / 2) },
|
|
20
|
+
});
|
|
21
|
+
const rasterTop = await lowResSource.getRaster({
|
|
22
|
+
selection: { ...selection, z: Math.max(0, sizeZ - 1) },
|
|
23
|
+
});
|
|
24
|
+
const stats0 = viv.getChannelStats(raster0.data);
|
|
25
|
+
const statsMid = viv.getChannelStats(rasterMid.data);
|
|
26
|
+
const statsTop = viv.getChannelStats(rasterTop.data);
|
|
27
|
+
return {
|
|
28
|
+
domain: [
|
|
29
|
+
Math.min(stats0.domain[0], statsMid.domain[0], statsTop.domain[0]),
|
|
30
|
+
Math.max(stats0.domain[1], statsMid.domain[1], statsTop.domain[1]),
|
|
31
|
+
],
|
|
32
|
+
slider: [
|
|
33
|
+
Math.min(stats0.contrastLimits[0], statsMid.contrastLimits[0], statsTop.contrastLimits[0]),
|
|
34
|
+
Math.max(stats0.contrastLimits[1], statsMid.contrastLimits[1], statsTop.contrastLimits[1]),
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get bounding cube for a given loader i.e [[0, width], [0, height], [0, depth]]
|
|
40
|
+
* @param {Object} loader PixelSource|PixelSource[]
|
|
41
|
+
* @param {[]} selection Selection for stats.
|
|
42
|
+
* @param {boolean} use3d Whether or not to get 3d stats.
|
|
43
|
+
* @returns {Object} { domains, sliders }
|
|
44
|
+
*/
|
|
45
|
+
export const getSingleSelectionStats = async ({ loader, selection, use3d }) => {
|
|
46
|
+
const getStats = use3d
|
|
47
|
+
? getSingleSelectionStats3D
|
|
48
|
+
: getSingleSelectionStats2D;
|
|
49
|
+
return getStats({ loader, selection });
|
|
50
|
+
};
|
|
51
|
+
export const getMultiSelectionStats = async ({ loader, selections, use3d }) => {
|
|
52
|
+
const stats = await Promise.all(selections.map(selection => getSingleSelectionStats({ loader, selection, use3d })));
|
|
53
|
+
const domains = stats.map(stat => stat.domain);
|
|
54
|
+
const sliders = stats.map(stat => stat.slider);
|
|
55
|
+
return { domains, sliders };
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Get physical size scaling Matrix4
|
|
59
|
+
* @param {Object} loader PixelSource
|
|
60
|
+
* @returns {Object} matrix
|
|
61
|
+
*/
|
|
62
|
+
export function getPhysicalSizeScalingMatrix(loader) {
|
|
63
|
+
const { x, y, z } = loader?.meta?.physicalSizes ?? {};
|
|
64
|
+
if (x?.size && y?.size && z?.size) {
|
|
65
|
+
const min = Math.min(z.size, x.size, y.size);
|
|
66
|
+
const ratio = [x.size / min, y.size / min, z.size / min];
|
|
67
|
+
return new Matrix4().scale(ratio);
|
|
68
|
+
}
|
|
69
|
+
return new Matrix4().identity();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get bounding cube for a given loader
|
|
73
|
+
* @param {Object} loader PixelSource|PixelSource[]
|
|
74
|
+
* @returns {Array} [0, width], [0, height], [0, depth]]
|
|
75
|
+
*/
|
|
76
|
+
export function getBoundingCube(loader) {
|
|
77
|
+
const source = Array.isArray(loader) ? loader[0] : loader;
|
|
78
|
+
const { shape, labels } = source;
|
|
79
|
+
const physicalSizeScalingMatrix = getPhysicalSizeScalingMatrix(source);
|
|
80
|
+
const xSlice = [0, physicalSizeScalingMatrix[0] * shape[labels.indexOf('x')]];
|
|
81
|
+
const ySlice = [0, physicalSizeScalingMatrix[5] * shape[labels.indexOf('y')]];
|
|
82
|
+
const zSlice = [
|
|
83
|
+
0,
|
|
84
|
+
physicalSizeScalingMatrix[10] * shape[labels.indexOf('z')],
|
|
85
|
+
];
|
|
86
|
+
return [xSlice, ySlice, zSlice];
|
|
87
|
+
}
|
|
88
|
+
export function abbreviateNumber(value) {
|
|
89
|
+
// Return an abbreviated representation of value, in 5 characters or less.
|
|
90
|
+
const maxLength = 5;
|
|
91
|
+
let maxNaiveDigits = maxLength;
|
|
92
|
+
/* eslint-disable no-plusplus */
|
|
93
|
+
if (!Number.isInteger(value)) {
|
|
94
|
+
--maxNaiveDigits;
|
|
95
|
+
} // Wasted on "."
|
|
96
|
+
if (value < 1) {
|
|
97
|
+
--maxNaiveDigits;
|
|
98
|
+
} // Wasted on "0."
|
|
99
|
+
/* eslint-disable no-plusplus */
|
|
100
|
+
const naive = Intl.NumberFormat('en-US', {
|
|
101
|
+
maximumSignificantDigits: maxNaiveDigits,
|
|
102
|
+
useGrouping: false,
|
|
103
|
+
}).format(value);
|
|
104
|
+
if (naive.length <= maxLength)
|
|
105
|
+
return naive;
|
|
106
|
+
// "e+9" consumes 3 characters, so if we even had two significant digits,
|
|
107
|
+
// it would take take us to six characters, including the decimal point.
|
|
108
|
+
return value.toExponential(0);
|
|
109
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vitessce/layer-controller",
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
|
+
"author": "Gehlenborg Lab",
|
|
5
|
+
"homepage": "http://vitessce.io",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/vitessce/vitessce.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@material-ui/core": "~4.12.3",
|
|
17
|
+
"@material-ui/icons": "~4.11.2",
|
|
18
|
+
"@vitessce/constants-internal": "2.0.0-beta.0",
|
|
19
|
+
"@vitessce/gl": "2.0.0-beta.0",
|
|
20
|
+
"@vitessce/utils": "2.0.0-beta.0",
|
|
21
|
+
"@vitessce/vit-s": "2.0.0-beta.0",
|
|
22
|
+
"lodash": "^4.17.21",
|
|
23
|
+
"math.gl": "^3.5.6"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"react": "^18.0.0",
|
|
27
|
+
"vite": "^3.0.0",
|
|
28
|
+
"vitest": "^0.23.4"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"start": "tsc --watch",
|
|
35
|
+
"build": "tsc",
|
|
36
|
+
"test": "pnpm exec vitest --run -r ../../../ --dir ."
|
|
37
|
+
}
|
|
38
|
+
}
|