@vitessce/layer-controller 3.5.12 → 3.6.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/dist/deflate-DcFBP_ON.js +10 -0
- package/dist/{index-d816962c.js → index-BYqNjxB4.js} +68396 -65622
- package/dist/index.js +1 -4
- package/dist/{jpeg-f0fc1e44.js → jpeg-BRMnDFy7.js} +20 -4
- package/dist/lerc-edG1hf7C.js +2020 -0
- package/dist/{lzw-af978121.js → lzw-ByU_vDUr.js} +1 -4
- package/dist/{packbits-48365e34.js → packbits-6stor0im.js} +1 -4
- package/dist/{pako.esm-68f84e2a.js → pako.esm-SxljTded.js} +33 -1839
- package/dist/{raw-0be8a541.js → raw-CTEIV_TP.js} +1 -4
- package/dist/{webimage-0d7dbd51.js → webimage-BPClhqkm.js} +1 -4
- package/dist-tsc/BitmaskChannelController.d.ts.map +1 -1
- package/dist-tsc/BitmaskChannelController.js +2 -3
- package/dist-tsc/ChannelOptions.d.ts.map +1 -1
- package/dist-tsc/ChannelOptions.js +4 -5
- package/dist-tsc/ColorPalette.d.ts.map +1 -1
- package/dist-tsc/ColorPalette.js +4 -5
- package/dist-tsc/ImageAddButton.d.ts.map +1 -1
- package/dist-tsc/ImageAddButton.js +3 -4
- package/dist-tsc/LayerController.d.ts.map +1 -1
- package/dist-tsc/LayerController.js +12 -19
- package/dist-tsc/LayerControllerSubscriber.d.ts.map +1 -1
- package/dist-tsc/LayerControllerSubscriber.js +4 -4
- package/dist-tsc/LayerOptions.d.ts.map +1 -1
- package/dist-tsc/LayerOptions.js +15 -15
- package/dist-tsc/RasterChannelController.js +4 -4
- package/dist-tsc/VectorLayerController.js +4 -4
- package/dist-tsc/VolumeOptions.d.ts.map +1 -1
- package/dist-tsc/VolumeOptions.js +7 -7
- package/dist-tsc/shared-channel-controls.d.ts.map +1 -1
- package/dist-tsc/shared-channel-controls.js +6 -4
- package/dist-tsc/styles.d.ts +72 -8
- package/dist-tsc/styles.d.ts.map +1 -1
- package/dist-tsc/styles.js +31 -16
- package/package.json +10 -11
- package/src/BitmaskChannelController.js +4 -5
- package/src/ChannelOptions.js +4 -5
- package/src/ColorPalette.js +4 -5
- package/src/ImageAddButton.js +3 -4
- package/src/LayerController.js +30 -30
- package/src/LayerControllerSubscriber.js +4 -6
- package/src/LayerOptions.js +21 -24
- package/src/RasterChannelController.js +8 -8
- package/src/VectorLayerController.js +7 -7
- package/src/VolumeOptions.js +12 -14
- package/src/shared-channel-controls.js +8 -6
- package/src/styles.js +31 -16
- package/dist/deflate-2c798302.js +0 -13
- package/dist/lerc-59798e8d.js +0 -2014
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Grid, Checkbox, Paper, Typography, Slider } from '@
|
|
3
|
+
import { Grid, Checkbox, Paper, Typography, Slider } from '@vitessce/styles';
|
|
4
4
|
import { useControllerSectionStyles } from './styles.js';
|
|
5
5
|
|
|
6
6
|
export default function VectorLayerController(props) {
|
|
@@ -27,10 +27,10 @@ export default function VectorLayerController(props) {
|
|
|
27
27
|
handleLayerChange({ ...layer, visible: v });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const classes = useControllerSectionStyles();
|
|
30
|
+
const { classes } = useControllerSectionStyles();
|
|
31
31
|
return (
|
|
32
|
-
<Grid
|
|
33
|
-
<Paper className={classes.layerControllerRoot}>
|
|
32
|
+
<Grid sx={{ marginTop: '10px' }}>
|
|
33
|
+
<Paper elevation={4} className={classes.layerControllerRoot}>
|
|
34
34
|
<Typography
|
|
35
35
|
style={{
|
|
36
36
|
padding: '15px 8px 0px 8px',
|
|
@@ -40,15 +40,15 @@ export default function VectorLayerController(props) {
|
|
|
40
40
|
{label}
|
|
41
41
|
</Typography>
|
|
42
42
|
<Grid container direction="row" justifyContent="space-between">
|
|
43
|
-
<Grid
|
|
43
|
+
<Grid size={2}>
|
|
44
44
|
<Checkbox
|
|
45
45
|
color="primary"
|
|
46
46
|
checked={isOn}
|
|
47
47
|
onChange={(e, v) => handleCheckBoxChange(v)}
|
|
48
|
-
|
|
48
|
+
slotProps={{ input: { 'aria-label': 'Show or hide vector layer' } }}
|
|
49
49
|
/>
|
|
50
50
|
</Grid>
|
|
51
|
-
<Grid
|
|
51
|
+
<Grid size={9} sx={{ paddingRight: '16px' }}>
|
|
52
52
|
<Slider
|
|
53
53
|
value={slider}
|
|
54
54
|
min={0}
|
package/src/VolumeOptions.js
CHANGED
|
@@ -5,17 +5,16 @@ import {
|
|
|
5
5
|
Typography,
|
|
6
6
|
Button,
|
|
7
7
|
makeStyles,
|
|
8
|
-
createStyles,
|
|
9
8
|
FormControl,
|
|
10
|
-
|
|
9
|
+
NativeSelect,
|
|
11
10
|
InputLabel,
|
|
12
11
|
Slider,
|
|
13
|
-
} from '@
|
|
12
|
+
} from '@vitessce/styles';
|
|
14
13
|
import { viv } from '@vitessce/gl';
|
|
15
14
|
import { abbreviateNumber, getBoundingCube } from '@vitessce/spatial-utils';
|
|
16
15
|
import { useSelectStyles } from './styles.js';
|
|
17
16
|
|
|
18
|
-
const useSlicerStyles = makeStyles(theme =>
|
|
17
|
+
const useSlicerStyles = makeStyles()(theme => ({
|
|
19
18
|
enabled: {},
|
|
20
19
|
disabled: {
|
|
21
20
|
color: theme.palette.text.disabled,
|
|
@@ -61,7 +60,7 @@ const Slicer = ({
|
|
|
61
60
|
],
|
|
62
61
|
];
|
|
63
62
|
|
|
64
|
-
const classes = useSlicerStyles();
|
|
63
|
+
const { classes } = useSlicerStyles();
|
|
65
64
|
const Slicers = sliceValuesAndSetSliceFunctions.map(
|
|
66
65
|
([val, setVal, label, [min, max]]) => (
|
|
67
66
|
<Grid
|
|
@@ -71,7 +70,7 @@ const Slicer = ({
|
|
|
71
70
|
alignItems="center"
|
|
72
71
|
key={label}
|
|
73
72
|
>
|
|
74
|
-
<Grid
|
|
73
|
+
<Grid size={1}>
|
|
75
74
|
<Typography
|
|
76
75
|
className={!use3d ? classes.disabled : classes.enabled}
|
|
77
76
|
style={{ marginBottom: 0 }}
|
|
@@ -79,7 +78,7 @@ const Slicer = ({
|
|
|
79
78
|
{label}:
|
|
80
79
|
</Typography>
|
|
81
80
|
</Grid>
|
|
82
|
-
<Grid
|
|
81
|
+
<Grid size={11}>
|
|
83
82
|
<Slider
|
|
84
83
|
disabled={!use3d}
|
|
85
84
|
className={!use3d ? classes.disabled : classes.enabled}
|
|
@@ -87,7 +86,7 @@ const Slicer = ({
|
|
|
87
86
|
onChange={(e, v) => setVal(v)}
|
|
88
87
|
valueLabelDisplay="auto"
|
|
89
88
|
valueLabelFormat={v => abbreviateNumber(v)}
|
|
90
|
-
|
|
89
|
+
getAriaLabel={index => `Clipping plane ${label} slider ${index === 0 ? 'min' : 'max'}`}
|
|
91
90
|
min={min}
|
|
92
91
|
max={max}
|
|
93
92
|
step={0.005}
|
|
@@ -117,14 +116,13 @@ function RenderingModeSelect({
|
|
|
117
116
|
renderingMode,
|
|
118
117
|
use3d,
|
|
119
118
|
}) {
|
|
120
|
-
const classes = useSelectStyles();
|
|
119
|
+
const { classes } = useSelectStyles();
|
|
121
120
|
// Empty option allows for displaying the title of the dropdown fully in the UI.
|
|
122
121
|
const options = !use3d ? [...renderingOptions, ''] : renderingOptions;
|
|
123
122
|
return (
|
|
124
123
|
<FormControl fullWidth>
|
|
125
|
-
<InputLabel htmlFor="rendering-mode-select">Rendering Mode</InputLabel>
|
|
126
|
-
<
|
|
127
|
-
native
|
|
124
|
+
<InputLabel htmlFor="rendering-mode-select" variant="standard">Rendering Mode</InputLabel>
|
|
125
|
+
<NativeSelect
|
|
128
126
|
onChange={e => handleRenderingModeChange(e.target.value)}
|
|
129
127
|
value={use3d ? renderingMode : ''}
|
|
130
128
|
inputProps={{
|
|
@@ -140,7 +138,7 @@ function RenderingModeSelect({
|
|
|
140
138
|
{name}
|
|
141
139
|
</option>
|
|
142
140
|
))}
|
|
143
|
-
</
|
|
141
|
+
</NativeSelect>
|
|
144
142
|
</FormControl>
|
|
145
143
|
);
|
|
146
144
|
}
|
|
@@ -153,7 +151,7 @@ const ReCenterButton = ({
|
|
|
153
151
|
loader,
|
|
154
152
|
modelMatrix,
|
|
155
153
|
}) => (
|
|
156
|
-
<Grid
|
|
154
|
+
<Grid size="auto" key="recenter">
|
|
157
155
|
<Button
|
|
158
156
|
onClick={() => {
|
|
159
157
|
const defaultViewState = viv.getDefaultInitialViewState(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { Checkbox,
|
|
3
|
+
import { Checkbox, NativeSelect } from '@vitessce/styles';
|
|
4
4
|
import { useSelectStyles } from './styles.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,11 +16,10 @@ export function ChannelSelectionDropdown({
|
|
|
16
16
|
channelOptions,
|
|
17
17
|
selectionIndex,
|
|
18
18
|
}) {
|
|
19
|
-
const classes = useSelectStyles();
|
|
19
|
+
const { classes } = useSelectStyles();
|
|
20
20
|
return (
|
|
21
|
-
<
|
|
21
|
+
<NativeSelect
|
|
22
22
|
classes={{ root: classes.selectRoot }}
|
|
23
|
-
native
|
|
24
23
|
value={selectionIndex}
|
|
25
24
|
onChange={e => handleChange(Number(e.target.value))}
|
|
26
25
|
inputProps={{ 'aria-label': 'Select a channel' }}
|
|
@@ -30,7 +29,7 @@ export function ChannelSelectionDropdown({
|
|
|
30
29
|
{opt}
|
|
31
30
|
</option>
|
|
32
31
|
))}
|
|
33
|
-
</
|
|
32
|
+
</NativeSelect>
|
|
34
33
|
);
|
|
35
34
|
}
|
|
36
35
|
|
|
@@ -49,8 +48,11 @@ export function ChannelVisibilityCheckbox({
|
|
|
49
48
|
onChange={toggle}
|
|
50
49
|
checked={checked}
|
|
51
50
|
disabled={disabled}
|
|
51
|
+
sx={{ paddingLeft: 0 }}
|
|
52
52
|
style={{ color, '&$checked': { color } }}
|
|
53
|
-
|
|
53
|
+
slotProps={{
|
|
54
|
+
input: { 'aria-label': 'Toggle on or off a channel' },
|
|
55
|
+
}}
|
|
54
56
|
/>
|
|
55
57
|
);
|
|
56
58
|
}
|
package/src/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeStyles } from '@
|
|
1
|
+
import { makeStyles } from '@vitessce/styles';
|
|
2
2
|
|
|
3
|
-
export const useSpanStyles = makeStyles(() => ({
|
|
3
|
+
export const useSpanStyles = makeStyles()(() => ({
|
|
4
4
|
span: {
|
|
5
5
|
width: '70px',
|
|
6
6
|
textAlign: 'center',
|
|
@@ -9,38 +9,53 @@ export const useSpanStyles = makeStyles(() => ({
|
|
|
9
9
|
},
|
|
10
10
|
}));
|
|
11
11
|
|
|
12
|
-
export const useChannelSliderStyles = makeStyles(
|
|
12
|
+
export const useChannelSliderStyles = makeStyles()(() => ({
|
|
13
13
|
valueLabel: {
|
|
14
14
|
marginTop: '7px',
|
|
15
|
-
'& span': {
|
|
16
|
-
color: theme.palette.secondaryForeground, // Change color here
|
|
17
|
-
backgroundColor: theme.palette.secondaryBackgroundDim, // Change color here
|
|
18
|
-
},
|
|
19
15
|
},
|
|
20
16
|
}));
|
|
21
17
|
|
|
22
|
-
export const useSelectStyles = makeStyles(() => ({
|
|
18
|
+
export const useSelectStyles = makeStyles()(() => ({
|
|
23
19
|
selectRoot: {
|
|
24
20
|
padding: 0,
|
|
25
21
|
height: 'auto',
|
|
26
|
-
margin:
|
|
27
|
-
fontSize: '14px',
|
|
22
|
+
margin: 0,
|
|
23
|
+
fontSize: '14px !important',
|
|
28
24
|
width: '100%',
|
|
29
25
|
},
|
|
30
26
|
}));
|
|
31
27
|
|
|
32
|
-
export const useControllerSectionStyles = makeStyles((
|
|
28
|
+
export const useControllerSectionStyles = makeStyles()(theme => ({
|
|
33
29
|
layerControllerRoot: {
|
|
34
30
|
width: '100%',
|
|
35
31
|
flexDirection: 'column',
|
|
36
32
|
padding: '0px 8px',
|
|
33
|
+
backgroundColor: theme.palette.paperBackground,
|
|
34
|
+
},
|
|
35
|
+
accordionRoot: {
|
|
36
|
+
backgroundColor: theme.palette.paperBackground,
|
|
37
37
|
},
|
|
38
38
|
layerControllerGrid: {
|
|
39
39
|
marginTop: '10px',
|
|
40
40
|
},
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
export const useAccordionStyles = makeStyles(theme => ({
|
|
43
|
+
export const useAccordionStyles = makeStyles()(theme => ({
|
|
44
|
+
accordionVisibilityIconBox: {
|
|
45
|
+
margin: 0,
|
|
46
|
+
padding: 0,
|
|
47
|
+
minWidth: 0,
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
display: 'inline-flex',
|
|
50
|
+
'&:hover': {
|
|
51
|
+
opacity: 0.8,
|
|
52
|
+
},
|
|
53
|
+
color: theme.palette.primary[500],
|
|
54
|
+
},
|
|
55
|
+
accordionNameBox: {
|
|
56
|
+
marginLeft: '10px',
|
|
57
|
+
fontSize: '14px !important',
|
|
58
|
+
},
|
|
44
59
|
accordionDetailsRoot: {
|
|
45
60
|
width: '100%',
|
|
46
61
|
flexDirection: 'column',
|
|
@@ -50,7 +65,7 @@ export const useAccordionStyles = makeStyles(theme => ({
|
|
|
50
65
|
padding: '0px 8px',
|
|
51
66
|
},
|
|
52
67
|
content: {
|
|
53
|
-
margin: '4px 0px',
|
|
68
|
+
margin: '4px 0px !important',
|
|
54
69
|
minWidth: '0px',
|
|
55
70
|
},
|
|
56
71
|
expanded: {
|
|
@@ -64,13 +79,13 @@ export const useAccordionStyles = makeStyles(theme => ({
|
|
|
64
79
|
},
|
|
65
80
|
}));
|
|
66
81
|
|
|
67
|
-
export const useInputLabelStyles = makeStyles(() => ({
|
|
82
|
+
export const useInputLabelStyles = makeStyles()(() => ({
|
|
68
83
|
inputLabelRoot: {
|
|
69
84
|
fontSize: '14px',
|
|
70
85
|
},
|
|
71
86
|
}));
|
|
72
87
|
|
|
73
|
-
export const useOverflowEllipsisGridStyles = makeStyles(() => ({
|
|
88
|
+
export const useOverflowEllipsisGridStyles = makeStyles()(() => ({
|
|
74
89
|
item: {
|
|
75
90
|
width: '100%',
|
|
76
91
|
overflow: 'hidden',
|
|
@@ -79,7 +94,7 @@ export const useOverflowEllipsisGridStyles = makeStyles(() => ({
|
|
|
79
94
|
},
|
|
80
95
|
}));
|
|
81
96
|
|
|
82
|
-
export const useSelectionSliderStyles = makeStyles(() => ({
|
|
97
|
+
export const useSelectionSliderStyles = makeStyles()(() => ({
|
|
83
98
|
selectionSliderRoot: {
|
|
84
99
|
marginTop: '7px',
|
|
85
100
|
},
|
package/dist/deflate-2c798302.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-d816962c.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "@vitessce/vit-s";
|
|
5
|
-
import "react-dom";
|
|
6
|
-
class DeflateDecoder extends BaseDecoder {
|
|
7
|
-
decodeBlock(buffer) {
|
|
8
|
-
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
DeflateDecoder as default
|
|
13
|
-
};
|