@aics/vole-app 2.15.0 → 3.1.2
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/es/aics-image-viewer/components/App/ChannelUpdater.js +21 -3
- package/es/aics-image-viewer/components/App/index.js +156 -199
- package/es/aics-image-viewer/components/CellViewerCanvasWrapper/index.js +10 -9
- package/es/aics-image-viewer/components/ChannelsWidget.js +35 -22
- package/es/aics-image-viewer/components/ChannelsWidgetRow/index.js +27 -71
- package/es/aics-image-viewer/components/ChannelsWidgetRow/styles.css +0 -6
- package/es/aics-image-viewer/components/ColorPicker.js +1 -1
- package/es/aics-image-viewer/components/ControlPanel/index.js +5 -4
- package/es/aics-image-viewer/components/CustomizeWidget.js +12 -8
- package/es/aics-image-viewer/components/ErrorAlert/index.js +4 -4
- package/es/aics-image-viewer/components/GlobalVolumeControls.js +12 -10
- package/es/aics-image-viewer/components/StyleProvider/index.js +4 -2
- package/es/aics-image-viewer/components/TfEditor/index.js +304 -154
- package/es/aics-image-viewer/components/TfEditor/styles.css +53 -31
- package/es/aics-image-viewer/components/Toolbar/DownloadButton.js +1 -1
- package/es/aics-image-viewer/components/Toolbar/index.js +18 -16
- package/es/aics-image-viewer/components/shared/SharedCheckBox.js +1 -1
- package/es/aics-image-viewer/components/shared/SliderRow/styles.css +1 -0
- package/es/aics-image-viewer/components/shared/SmarterSlider.js +1 -1
- package/es/aics-image-viewer/components/shared/ViewerIcon.js +1 -1
- package/es/aics-image-viewer/components/useVolume.js +68 -59
- package/es/aics-image-viewer/shared/constants.js +2 -2
- package/es/aics-image-viewer/shared/utils/controlPointsToLut.js +57 -24
- package/es/aics-image-viewer/shared/utils/sceneStore.js +14 -4
- package/es/aics-image-viewer/shared/utils/storage.js +238 -0
- package/es/aics-image-viewer/shared/utils/test/storage.test.js +264 -0
- package/es/aics-image-viewer/shared/utils/test/urlParsing.test.js +249 -109
- package/es/aics-image-viewer/shared/utils/test/viewerChannelSettings.test.js +1 -1
- package/es/aics-image-viewer/shared/utils/urlParsing.js +287 -154
- package/es/aics-image-viewer/shared/utils/viewerState.js +4 -24
- package/es/aics-image-viewer/state/reset.js +111 -0
- package/es/aics-image-viewer/state/store.js +90 -0
- package/es/aics-image-viewer/state/subscribers.js +153 -0
- package/es/aics-image-viewer/state/test/reset.test.js +247 -0
- package/es/aics-image-viewer/state/util.js +71 -0
- package/es/index.js +3 -3
- package/package.json +18 -11
- package/type-declarations/aics-image-viewer/components/App/ChannelUpdater.d.ts +2 -4
- package/type-declarations/aics-image-viewer/components/App/types.d.ts +3 -3
- package/type-declarations/aics-image-viewer/components/AxisClipSliders/index.d.ts +6 -6
- package/type-declarations/aics-image-viewer/components/CellViewerCanvasWrapper/index.d.ts +5 -14
- package/type-declarations/aics-image-viewer/components/ChannelsWidget.d.ts +3 -6
- package/type-declarations/aics-image-viewer/components/ChannelsWidgetRow/index.d.ts +3 -6
- package/type-declarations/aics-image-viewer/components/ColorPicker.d.ts +1 -1
- package/type-declarations/aics-image-viewer/components/ControlPanel/index.d.ts +6 -7
- package/type-declarations/aics-image-viewer/components/CustomizeWidget.d.ts +2 -8
- package/type-declarations/aics-image-viewer/components/ErrorAlert/index.d.ts +4 -0
- package/type-declarations/aics-image-viewer/components/GlobalVolumeControls.d.ts +2 -9
- package/type-declarations/aics-image-viewer/components/MetadataViewer/index.d.ts +1 -1
- package/type-declarations/aics-image-viewer/components/StyleProvider/index.d.ts +1 -1
- package/type-declarations/aics-image-viewer/components/TfEditor/index.d.ts +10 -3
- package/type-declarations/aics-image-viewer/components/Toolbar/index.d.ts +3 -12
- package/type-declarations/aics-image-viewer/components/shared/SliderRow/index.d.ts +1 -1
- package/type-declarations/aics-image-viewer/components/shared/SmarterSlider.d.ts +1 -1
- package/type-declarations/aics-image-viewer/components/shared/ViewerIcon.d.ts +1 -1
- package/type-declarations/aics-image-viewer/components/useVolume.d.ts +7 -4
- package/type-declarations/aics-image-viewer/shared/constants.d.ts +5 -5
- package/type-declarations/aics-image-viewer/shared/types.d.ts +1 -1
- package/type-declarations/aics-image-viewer/shared/utils/controlPointsToLut.d.ts +9 -5
- package/type-declarations/aics-image-viewer/shared/utils/firebase/index.d.ts +1 -1
- package/type-declarations/aics-image-viewer/shared/utils/hooks.d.ts +1 -1
- package/type-declarations/aics-image-viewer/shared/utils/playControls.d.ts +1 -1
- package/type-declarations/aics-image-viewer/shared/utils/sceneStore.d.ts +8 -4
- package/type-declarations/aics-image-viewer/shared/utils/storage.d.ts +15 -0
- package/type-declarations/aics-image-viewer/shared/utils/urlParsing.d.ts +94 -31
- package/type-declarations/aics-image-viewer/shared/utils/viewerChannelSettings.d.ts +39 -1
- package/type-declarations/aics-image-viewer/shared/utils/viewerState.d.ts +3 -6
- package/type-declarations/aics-image-viewer/state/reset.d.ts +29 -0
- package/type-declarations/aics-image-viewer/state/store.d.ts +30 -0
- package/type-declarations/aics-image-viewer/state/subscribers.d.ts +4 -0
- package/type-declarations/aics-image-viewer/state/types.d.ts +46 -0
- package/type-declarations/aics-image-viewer/state/util.d.ts +8 -0
- package/type-declarations/index.d.ts +4 -4
- package/es/aics-image-viewer/components/ViewerStateProvider/ResetStateProvider.js +0 -163
- package/es/aics-image-viewer/components/ViewerStateProvider/index.js +0 -259
- package/type-declarations/aics-image-viewer/components/ViewerStateProvider/ResetStateProvider.d.ts +0 -34
- package/type-declarations/aics-image-viewer/components/ViewerStateProvider/index.d.ts +0 -33
- package/type-declarations/aics-image-viewer/components/ViewerStateProvider/types.d.ts +0 -107
- /package/es/aics-image-viewer/{components/ViewerStateProvider → state}/types.js +0 -0
|
@@ -8,9 +8,9 @@ import { LoadingOutlined } from "@ant-design/icons";
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { CLIPPING_PANEL_HEIGHT_DEFAULT, CLIPPING_PANEL_HEIGHT_TALL } from "../../shared/constants";
|
|
10
10
|
import { ViewMode } from "../../shared/enums";
|
|
11
|
+
import { select, useViewerState } from "../../state/store";
|
|
11
12
|
import AxisClipSliders from "../AxisClipSliders";
|
|
12
13
|
import BottomPanel from "../BottomPanel";
|
|
13
|
-
import { connectToViewerState } from "../ViewerStateProvider";
|
|
14
14
|
import "./styles.css";
|
|
15
15
|
var ViewerWrapper = function ViewerWrapper(props) {
|
|
16
16
|
var view3dviewerRef = /*#__PURE__*/React.createRef();
|
|
@@ -37,14 +37,15 @@ var ViewerWrapper = function ViewerWrapper(props) {
|
|
|
37
37
|
return noImageText || spinner;
|
|
38
38
|
};
|
|
39
39
|
var appHeight = props.appHeight,
|
|
40
|
-
changeViewerSetting = props.changeViewerSetting,
|
|
41
40
|
visibleControls = props.visibleControls,
|
|
42
41
|
numTimesteps = props.numTimesteps,
|
|
43
|
-
numScenes = props.numScenes
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
numScenes = props.numScenes;
|
|
43
|
+
var changeViewerSetting = useViewerState(select("changeViewerSetting"));
|
|
44
|
+
var viewMode = useViewerState(select("viewMode"));
|
|
45
|
+
var region = useViewerState(select("region"));
|
|
46
|
+
var slice = useViewerState(select("slice"));
|
|
47
|
+
var time = useViewerState(select("time"));
|
|
48
|
+
var scene = useViewerState(select("scene"));
|
|
48
49
|
var clippingPanelTall = numTimesteps > 1 && numScenes > 1 && viewMode === ViewMode.threeD;
|
|
49
50
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
51
|
className: "cell-canvas",
|
|
@@ -70,12 +71,12 @@ var ViewerWrapper = function ViewerWrapper(props) {
|
|
|
70
71
|
slices: slice,
|
|
71
72
|
numTimesteps: numTimesteps,
|
|
72
73
|
time: time,
|
|
73
|
-
scene:
|
|
74
|
+
scene: scene,
|
|
74
75
|
playControls: props.playControls,
|
|
75
76
|
playingAxis: props.playingAxis
|
|
76
77
|
})), renderOverlay());
|
|
77
78
|
};
|
|
78
|
-
export default
|
|
79
|
+
export default ViewerWrapper;
|
|
79
80
|
var STYLES = {
|
|
80
81
|
viewer: {
|
|
81
82
|
display: "flex",
|
|
@@ -10,19 +10,36 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
11
|
import { Collapse, List } from "antd";
|
|
12
12
|
import React from "react";
|
|
13
|
+
import { useShallow } from "zustand/shallow";
|
|
13
14
|
import { getDisplayName } from "../shared/utils/viewerChannelSettings";
|
|
15
|
+
import { select, useViewerState } from "../state/store";
|
|
14
16
|
import ChannelsWidgetRow from "./ChannelsWidgetRow";
|
|
15
17
|
import SharedCheckBox from "./shared/SharedCheckBox";
|
|
16
|
-
|
|
18
|
+
|
|
19
|
+
/** A quick custom hook to grab a single state field from every channel */
|
|
20
|
+
var useSelectFromAllChannels = function useSelectFromAllChannels(key) {
|
|
21
|
+
return useShallow(function (_ref) {
|
|
22
|
+
var channelSettings = _ref.channelSettings;
|
|
23
|
+
return channelSettings.map(function (settings) {
|
|
24
|
+
return settings[key];
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
};
|
|
17
28
|
var ChannelsWidget = function ChannelsWidget(props) {
|
|
18
29
|
var channelGroupedByType = props.channelGroupedByType,
|
|
19
|
-
channelSettings = props.channelSettings,
|
|
20
30
|
channelDataChannels = props.channelDataChannels,
|
|
21
31
|
filterFunc = props.filterFunc,
|
|
22
32
|
viewerChannelSettings = props.viewerChannelSettings;
|
|
33
|
+
var changeChannelSetting = useViewerState(select("changeChannelSetting"));
|
|
34
|
+
var selectVolumeEnabled = useSelectFromAllChannels("volumeEnabled");
|
|
35
|
+
var selectIsosurfaceEnabled = useSelectFromAllChannels("isosurfaceEnabled");
|
|
36
|
+
var selectNames = useSelectFromAllChannels("name");
|
|
37
|
+
var volumeEnabled = useViewerState(selectVolumeEnabled);
|
|
38
|
+
var isosurfaceEnabled = useViewerState(selectIsosurfaceEnabled);
|
|
39
|
+
var channelNames = useViewerState(selectNames);
|
|
23
40
|
var createCheckboxHandler = function createCheckboxHandler(key) {
|
|
24
41
|
return function (value, channelArray) {
|
|
25
|
-
|
|
42
|
+
changeChannelSetting(channelArray, _defineProperty({}, key, value));
|
|
26
43
|
};
|
|
27
44
|
};
|
|
28
45
|
var showVolumes = createCheckboxHandler("volumeEnabled");
|
|
@@ -31,12 +48,10 @@ var ChannelsWidget = function ChannelsWidget(props) {
|
|
|
31
48
|
var volChecked = [];
|
|
32
49
|
var isoChecked = [];
|
|
33
50
|
channelArray.forEach(function (channelIndex) {
|
|
34
|
-
|
|
35
|
-
if (!channelSetting) return;
|
|
36
|
-
if (channelSetting.volumeEnabled) {
|
|
51
|
+
if (volumeEnabled[channelIndex]) {
|
|
37
52
|
volChecked.push(channelIndex);
|
|
38
53
|
}
|
|
39
|
-
if (
|
|
54
|
+
if (isosurfaceEnabled[channelIndex]) {
|
|
40
55
|
isoChecked.push(channelIndex);
|
|
41
56
|
}
|
|
42
57
|
});
|
|
@@ -56,28 +71,26 @@ var ChannelsWidget = function ChannelsWidget(props) {
|
|
|
56
71
|
}, "All Surf"));
|
|
57
72
|
};
|
|
58
73
|
var renderChannelRow = function renderChannelRow(channelIndex) {
|
|
59
|
-
var
|
|
60
|
-
return
|
|
61
|
-
key:
|
|
74
|
+
var channelName = channelNames[channelIndex];
|
|
75
|
+
return channelName ? /*#__PURE__*/React.createElement(ChannelsWidgetRow, {
|
|
76
|
+
key: channelIndex,
|
|
62
77
|
index: channelIndex,
|
|
63
78
|
channelDataForChannel: channelDataChannels[channelIndex],
|
|
64
|
-
name: getDisplayName(
|
|
65
|
-
channelState: thisChannelSettings,
|
|
66
|
-
changeChannelSetting: props.changeChannelSetting,
|
|
79
|
+
name: getDisplayName(channelName, channelIndex, viewerChannelSettings),
|
|
67
80
|
onColorChangeComplete: props.onColorChangeComplete,
|
|
68
81
|
saveIsosurface: props.saveIsosurface
|
|
69
82
|
}) : null;
|
|
70
83
|
};
|
|
71
84
|
var firstKey = Object.keys(channelGroupedByType)[0];
|
|
72
|
-
var rows = channelDataChannels && Object.entries(channelGroupedByType).filter(function (
|
|
73
|
-
var
|
|
74
|
-
key =
|
|
75
|
-
channelArray =
|
|
85
|
+
var rows = channelDataChannels && Object.entries(channelGroupedByType).filter(function (_ref2) {
|
|
86
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
87
|
+
key = _ref3[0],
|
|
88
|
+
channelArray = _ref3[1];
|
|
76
89
|
return channelArray.length > 0 && (!filterFunc || filterFunc(key));
|
|
77
|
-
}).map(function (
|
|
78
|
-
var
|
|
79
|
-
key =
|
|
80
|
-
channelArray =
|
|
90
|
+
}).map(function (_ref4) {
|
|
91
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
92
|
+
key = _ref5[0],
|
|
93
|
+
channelArray = _ref5[1];
|
|
81
94
|
var children = /*#__PURE__*/React.createElement(List, {
|
|
82
95
|
itemLayout: "horizontal",
|
|
83
96
|
dataSource: channelArray,
|
|
@@ -97,4 +110,4 @@ var ChannelsWidget = function ChannelsWidget(props) {
|
|
|
97
110
|
collapsible: "icon"
|
|
98
111
|
});
|
|
99
112
|
};
|
|
100
|
-
export default
|
|
113
|
+
export default ChannelsWidget;
|
|
@@ -4,42 +4,47 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
|
-
import { Button, Checkbox,
|
|
7
|
+
import { Button, Checkbox, List } from "antd";
|
|
8
8
|
import React, { useCallback, useState } from "react";
|
|
9
|
-
import { DTYPE_RANGE, ISOSURFACE_OPACITY_SLIDER_MAX } from "../../shared/constants";
|
|
10
9
|
import { colorArrayToObject, colorObjectToArray } from "../../shared/utils/colorRepresentations";
|
|
10
|
+
import { select, useViewerState } from "../../state/store";
|
|
11
11
|
import ColorPicker from "../ColorPicker";
|
|
12
|
-
import SliderRow from "../shared/SliderRow";
|
|
13
12
|
import ViewerIcon from "../shared/ViewerIcon";
|
|
14
13
|
import TfEditor from "../TfEditor";
|
|
15
14
|
import "./styles.css";
|
|
16
15
|
var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
|
|
17
16
|
var index = props.index,
|
|
18
|
-
|
|
19
|
-
saveIsosurface = props.saveIsosurface,
|
|
20
|
-
channelState = props.channelState;
|
|
17
|
+
saveIsosurface = props.saveIsosurface;
|
|
21
18
|
var _useState = useState(false),
|
|
22
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
20
|
controlsOpen = _useState2[0],
|
|
24
21
|
setControlsOpen = _useState2[1];
|
|
22
|
+
var changeChannelSetting = useViewerState(select("changeChannelSetting"));
|
|
23
|
+
var channelState = useViewerState(function (_ref) {
|
|
24
|
+
var channelSettings = _ref.channelSettings;
|
|
25
|
+
return channelSettings[props.index];
|
|
26
|
+
});
|
|
25
27
|
var changeSettingForThisChannel = useCallback(function (value) {
|
|
26
28
|
return changeChannelSetting(index, value);
|
|
27
29
|
}, [changeChannelSetting, index]);
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
+
var saveThisIsosurface = useCallback(function (format) {
|
|
31
|
+
return saveIsosurface(index, format);
|
|
32
|
+
}, [saveIsosurface, index]);
|
|
33
|
+
var volumeCheckHandler = function volumeCheckHandler(_ref2) {
|
|
34
|
+
var target = _ref2.target;
|
|
30
35
|
changeChannelSetting(index, {
|
|
31
36
|
volumeEnabled: target.checked
|
|
32
37
|
});
|
|
33
38
|
};
|
|
34
|
-
var isosurfaceCheckHandler = function isosurfaceCheckHandler(
|
|
35
|
-
var target =
|
|
39
|
+
var isosurfaceCheckHandler = function isosurfaceCheckHandler(_ref3) {
|
|
40
|
+
var target = _ref3.target;
|
|
36
41
|
changeChannelSetting(index, {
|
|
37
42
|
isosurfaceEnabled: target.checked
|
|
38
43
|
});
|
|
39
44
|
};
|
|
40
45
|
var onColorChange = function onColorChange(newRGB, _oldRGB, index) {
|
|
41
46
|
var color = colorObjectToArray(newRGB);
|
|
42
|
-
|
|
47
|
+
changeChannelSetting(index, {
|
|
43
48
|
color: color
|
|
44
49
|
});
|
|
45
50
|
};
|
|
@@ -75,13 +80,15 @@ var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
|
|
|
75
80
|
type: "text"
|
|
76
81
|
}));
|
|
77
82
|
var createTFEditor = function createTFEditor() {
|
|
83
|
+
// TODO this is most of `channelState`... should `TfEditor` just get `channelState`?
|
|
78
84
|
var controlPoints = channelState.controlPoints,
|
|
79
85
|
colorizeEnabled = channelState.colorizeEnabled,
|
|
80
86
|
colorizeAlpha = channelState.colorizeAlpha,
|
|
81
87
|
useControlPoints = channelState.useControlPoints,
|
|
82
88
|
ramp = channelState.ramp,
|
|
83
89
|
plotMin = channelState.plotMin,
|
|
84
|
-
plotMax = channelState.plotMax
|
|
90
|
+
plotMax = channelState.plotMax,
|
|
91
|
+
isovalue = channelState.isovalue;
|
|
85
92
|
return /*#__PURE__*/React.createElement(TfEditor, {
|
|
86
93
|
id: "TFEditor" + index,
|
|
87
94
|
width: 418,
|
|
@@ -94,66 +101,15 @@ var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
|
|
|
94
101
|
useControlPoints: useControlPoints,
|
|
95
102
|
ramp: ramp,
|
|
96
103
|
plotMin: plotMin,
|
|
97
|
-
plotMax: plotMax
|
|
104
|
+
plotMax: plotMax,
|
|
105
|
+
keepIntensityRange: channelState.keepIntensityRange,
|
|
106
|
+
isovalue: isovalue,
|
|
107
|
+
opacity: channelState.opacity,
|
|
108
|
+
volumeEnabled: channelState.volumeEnabled,
|
|
109
|
+
isosurfaceEnabled: channelState.isosurfaceEnabled,
|
|
110
|
+
saveIsosurface: saveThisIsosurface
|
|
98
111
|
});
|
|
99
112
|
};
|
|
100
|
-
var renderSurfaceControls = function renderSurfaceControls() {
|
|
101
|
-
var range = DTYPE_RANGE[props.channelDataForChannel.dtype];
|
|
102
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SliderRow, {
|
|
103
|
-
label: "Isovalue",
|
|
104
|
-
min: range.min,
|
|
105
|
-
max: range.max,
|
|
106
|
-
start: channelState.isovalue,
|
|
107
|
-
onChange: function onChange(_ref3) {
|
|
108
|
-
var _ref4 = _slicedToArray(_ref3, 1),
|
|
109
|
-
isovalue = _ref4[0];
|
|
110
|
-
return changeSettingForThisChannel({
|
|
111
|
-
isovalue: isovalue
|
|
112
|
-
});
|
|
113
|
-
},
|
|
114
|
-
formatInteger: true
|
|
115
|
-
}, /*#__PURE__*/React.createElement(InputNumber, {
|
|
116
|
-
value: channelState.isovalue,
|
|
117
|
-
onChange: function onChange(isovalue) {
|
|
118
|
-
return isovalue !== null && changeSettingForThisChannel({
|
|
119
|
-
isovalue: isovalue
|
|
120
|
-
});
|
|
121
|
-
},
|
|
122
|
-
formatter: function formatter(v) {
|
|
123
|
-
return v === undefined ? "" : Number(v).toFixed(0);
|
|
124
|
-
},
|
|
125
|
-
min: range.min,
|
|
126
|
-
max: range.max,
|
|
127
|
-
size: "small",
|
|
128
|
-
controls: false,
|
|
129
|
-
style: {
|
|
130
|
-
width: "64px",
|
|
131
|
-
marginLeft: "8px"
|
|
132
|
-
}
|
|
133
|
-
})), /*#__PURE__*/React.createElement(SliderRow, {
|
|
134
|
-
label: "Opacity",
|
|
135
|
-
max: ISOSURFACE_OPACITY_SLIDER_MAX,
|
|
136
|
-
start: channelState.opacity * ISOSURFACE_OPACITY_SLIDER_MAX,
|
|
137
|
-
onChange: function onChange(_ref5) {
|
|
138
|
-
var _ref6 = _slicedToArray(_ref5, 1),
|
|
139
|
-
opacity = _ref6[0];
|
|
140
|
-
return changeSettingForThisChannel({
|
|
141
|
-
opacity: opacity / ISOSURFACE_OPACITY_SLIDER_MAX
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
formatInteger: true
|
|
145
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
146
|
-
className: "button-row"
|
|
147
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
148
|
-
onClick: function onClick() {
|
|
149
|
-
return saveIsosurface(index, "GLTF");
|
|
150
|
-
}
|
|
151
|
-
}, "Export GLTF"), /*#__PURE__*/React.createElement(Button, {
|
|
152
|
-
onClick: function onClick() {
|
|
153
|
-
return saveIsosurface(index, "STL");
|
|
154
|
-
}
|
|
155
|
-
}, "Export STL")));
|
|
156
|
-
};
|
|
157
113
|
var renderControls = function renderControls() {
|
|
158
114
|
if (!channelState.volumeEnabled && !channelState.isosurfaceEnabled) {
|
|
159
115
|
return /*#__PURE__*/React.createElement("h4", {
|
|
@@ -162,7 +118,7 @@ var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
|
|
|
162
118
|
}
|
|
163
119
|
}, "Not currently visible");
|
|
164
120
|
}
|
|
165
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, channelState.volumeEnabled
|
|
121
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (channelState.volumeEnabled || channelState.isosurfaceEnabled) && createTFEditor());
|
|
166
122
|
};
|
|
167
123
|
var rowClass = controlsOpen ? "channel-row" : "channel-row controls-closed";
|
|
168
124
|
return /*#__PURE__*/React.createElement(List.Item, {
|
|
@@ -9,12 +9,6 @@
|
|
|
9
9
|
color:var(--color-controlpanel-text);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.channel-rows-list .ant-list-item.channel-row h4{
|
|
13
|
-
color:var(--color-text-section);
|
|
14
|
-
margin-top:28px;
|
|
15
|
-
margin-bottom:10px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
12
|
.channel-rows-list .ant-list-item.channel-row .ant-btn-text{
|
|
19
13
|
color:var(--color-button-icon-activated-text);
|
|
20
14
|
transition:color 0.3s;
|
|
@@ -10,9 +10,9 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
10
10
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import { map } from "lodash";
|
|
13
14
|
import React from "react";
|
|
14
15
|
import { SketchPicker } from "react-color";
|
|
15
|
-
import { map } from "lodash";
|
|
16
16
|
// if there are fewer than this many screen pixels below the swatch but more above, open above the swatch
|
|
17
17
|
var OPEN_ABOVE_MARGIN = 310;
|
|
18
18
|
var DEFAULT_COLOR = {
|
|
@@ -12,12 +12,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
import { Button, Collapse, Dropdown, Flex, Tooltip } from "antd";
|
|
13
13
|
import React from "react";
|
|
14
14
|
import { PRESET_COLOR_MAP } from "../../shared/constants";
|
|
15
|
+
import { select, useViewerState } from "../../state/store";
|
|
15
16
|
import ChannelsWidget from "../ChannelsWidget";
|
|
16
17
|
import CustomizeWidget from "../CustomizeWidget";
|
|
17
18
|
import GlobalVolumeControls from "../GlobalVolumeControls";
|
|
18
19
|
import MetadataViewer from "../MetadataViewer";
|
|
19
20
|
import ViewerIcon from "../shared/ViewerIcon";
|
|
20
|
-
import { connectToViewerState } from "../ViewerStateProvider";
|
|
21
21
|
import "./styles.css";
|
|
22
22
|
var ControlTab = /*#__PURE__*/function (ControlTab) {
|
|
23
23
|
ControlTab[ControlTab["Channels"] = 0] = "Channels";
|
|
@@ -35,6 +35,7 @@ function ControlPanel(props) {
|
|
|
35
35
|
_setTab(newTab);
|
|
36
36
|
props.setCollapsed(false);
|
|
37
37
|
};
|
|
38
|
+
var resetToDefaultViewerState = useViewerState(select("resetToDefaultViewerState"));
|
|
38
39
|
var controlPanelContainerRef = React.useRef(null);
|
|
39
40
|
var getDropdownContainer = controlPanelContainerRef.current ? function () {
|
|
40
41
|
return controlPanelContainerRef.current;
|
|
@@ -130,7 +131,7 @@ function ControlPanel(props) {
|
|
|
130
131
|
placement: "right",
|
|
131
132
|
title: "Clears ALL rendering settings and channel configuration to the default viewer state. This will replace any edits to channel settings, color presets, and rendering adjustments."
|
|
132
133
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
133
|
-
onClick:
|
|
134
|
+
onClick: resetToDefaultViewerState
|
|
134
135
|
}, "Clear all settings"))));
|
|
135
136
|
};
|
|
136
137
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -174,7 +175,7 @@ function ControlPanel(props) {
|
|
|
174
175
|
filterFunc: props.filterFunc,
|
|
175
176
|
viewerChannelSettings: viewerChannelSettings
|
|
176
177
|
}), tab === ControlTab.Advanced && renderAdvancedSettings(), tab === ControlTab.Metadata && /*#__PURE__*/React.createElement(MetadataViewer, {
|
|
177
|
-
metadata: props.
|
|
178
|
+
metadata: props.metadata
|
|
178
179
|
}))));
|
|
179
180
|
}
|
|
180
|
-
export default
|
|
181
|
+
export default ControlPanel;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import ColorPicker from "./ColorPicker";
|
|
3
2
|
import { colorArrayToObject, colorObjectToArray } from "../shared/utils/colorRepresentations";
|
|
4
|
-
import {
|
|
3
|
+
import { select, useViewerState } from "../state/store";
|
|
4
|
+
import ColorPicker from "./ColorPicker";
|
|
5
5
|
var ColorPickerRow = function ColorPickerRow(_ref) {
|
|
6
6
|
var color = _ref.color,
|
|
7
7
|
_onColorChange = _ref.onColorChange,
|
|
@@ -20,17 +20,21 @@ var ColorPickerRow = function ColorPickerRow(_ref) {
|
|
|
20
20
|
})), /*#__PURE__*/React.createElement("span", null, children));
|
|
21
21
|
};
|
|
22
22
|
var CustomizeWidget = function CustomizeWidget(props) {
|
|
23
|
+
var showBoundingBox = useViewerState(select("showBoundingBox"));
|
|
24
|
+
var backgroundColor = useViewerState(select("backgroundColor"));
|
|
25
|
+
var boundingBoxColor = useViewerState(select("boundingBoxColor"));
|
|
26
|
+
var changeViewerSetting = useViewerState(select("changeViewerSetting"));
|
|
23
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, props.visibleControls.backgroundColorPicker && /*#__PURE__*/React.createElement(ColorPickerRow, {
|
|
24
|
-
color:
|
|
28
|
+
color: backgroundColor,
|
|
25
29
|
onColorChange: function onColorChange(color) {
|
|
26
|
-
return
|
|
30
|
+
return changeViewerSetting("backgroundColor", color);
|
|
27
31
|
}
|
|
28
32
|
}, "Background color"), props.visibleControls.boundingBoxColorPicker && /*#__PURE__*/React.createElement(ColorPickerRow, {
|
|
29
|
-
color:
|
|
33
|
+
color: boundingBoxColor,
|
|
30
34
|
onColorChange: function onColorChange(color) {
|
|
31
|
-
return
|
|
35
|
+
return changeViewerSetting("boundingBoxColor", color);
|
|
32
36
|
}
|
|
33
|
-
}, "Bounding box color", !
|
|
37
|
+
}, "Bounding box color", !showBoundingBox && /*#__PURE__*/React.createElement("i", null, " - bounding box turned off")));
|
|
34
38
|
};
|
|
35
39
|
var STYLES = {
|
|
36
40
|
colorPickerRow: {
|
|
@@ -43,4 +47,4 @@ var STYLES = {
|
|
|
43
47
|
marginRight: "16px"
|
|
44
48
|
}
|
|
45
49
|
};
|
|
46
|
-
export default
|
|
50
|
+
export default CustomizeWidget;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
1
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
3
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
@@ -9,6 +8,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
9
8
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
12
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -37,13 +37,13 @@ var ERROR_TYPE_DESCRIPTIONS = _defineProperty(_defineProperty(_defineProperty(_d
|
|
|
37
37
|
}, "start a bug report here"), ".")), VolumeLoadErrorType.INVALID_METADATA, /*#__PURE__*/React.createElement(React.Fragment, null, "The viewer was unable to read all necessary information from this volume's metadata. Check that your dataset's metadata is complete and properly formatted. If you believe your data is valid and should be supported by our viewer, let us know by ", /*#__PURE__*/React.createElement(IssueLink, null, "opening a GitHub issue"), ".")), VolumeLoadErrorType.INVALID_MULTI_SOURCE_ZARR, /*#__PURE__*/React.createElement(React.Fragment, null, "The viewer is currently configured to consolidate multiple OME-Zarr datasets into a single volume, but the provided datasets can't all be matched up. Ensure that all dataset URLs are correct and that at least one equivalently-sized scale level exists in all datasets."));
|
|
38
38
|
var getErrorTitle = function getErrorTitle(error) {
|
|
39
39
|
var _error$toString;
|
|
40
|
-
return error instanceof Error && ((_error$toString = error.toString) === null || _error$toString === void 0 ? void 0 : _error$toString.call(error)) || typeof error === "string" && error || "Unknown error";
|
|
40
|
+
return error instanceof Error && ((_error$toString = error.toString) === null || _error$toString === void 0 ? void 0 : _error$toString.call(error)) || typeof error === "string" && error || _typeof(error) === "object" && error !== null && error.title || "Unknown error";
|
|
41
41
|
};
|
|
42
42
|
var getErrorDescription = function getErrorDescription(error) {
|
|
43
43
|
var _ERROR_TYPE_DESCRIPTI2;
|
|
44
44
|
var type = error.type;
|
|
45
45
|
if (!type) {
|
|
46
|
-
return UNKNOWN_ERROR_DESCRIPTION;
|
|
46
|
+
return _typeof(error) === "object" && error !== null && error.description || UNKNOWN_ERROR_DESCRIPTION;
|
|
47
47
|
}
|
|
48
48
|
return (_ERROR_TYPE_DESCRIPTI2 = ERROR_TYPE_DESCRIPTIONS[type]) !== null && _ERROR_TYPE_DESCRIPTI2 !== void 0 ? _ERROR_TYPE_DESCRIPTI2 : UNKNOWN_ERROR_DESCRIPTION;
|
|
49
49
|
};
|
|
@@ -109,8 +109,8 @@ export var useErrorAlert = function useErrorAlert() {
|
|
|
109
109
|
setErrorCounts = _React$useState8[1];
|
|
110
110
|
var addError = React.useCallback(function (error) {
|
|
111
111
|
var _seenErrors$get;
|
|
112
|
-
console.error(error);
|
|
113
112
|
var errorTitle = getErrorTitle(error);
|
|
113
|
+
console.error(error instanceof Error ? error : errorTitle);
|
|
114
114
|
var errorSeenCount = ((_seenErrors$get = seenErrors.get(errorTitle)) !== null && _seenErrors$get !== void 0 ? _seenErrors$get : 0) + 1;
|
|
115
115
|
setErrorList(function (prev) {
|
|
116
116
|
return [].concat(_toConsumableArray(prev), [error]);
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Checkbox } from "antd";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { select, useViewerState } from "../state/store";
|
|
3
4
|
import SliderRow from "./shared/SliderRow";
|
|
4
|
-
import { connectToViewerState } from "./ViewerStateProvider";
|
|
5
5
|
var GlobalVolumeControls = function GlobalVolumeControls(props) {
|
|
6
|
+
var maskAlpha = useViewerState(select("maskAlpha"));
|
|
7
|
+
var brightness = useViewerState(select("brightness"));
|
|
8
|
+
var density = useViewerState(select("density"));
|
|
9
|
+
var levels = useViewerState(select("levels"));
|
|
10
|
+
var interpolationEnabled = useViewerState(select("interpolationEnabled"));
|
|
11
|
+
var changeViewerSetting = useViewerState(select("changeViewerSetting"));
|
|
6
12
|
var createSliderRow = function createSliderRow(label, start, max, propKey) {
|
|
7
13
|
var onUpdate = function onUpdate(_strValues, _handle, values) {
|
|
8
14
|
var selectValue = values.length === 1 ? values[0] : values;
|
|
9
|
-
|
|
15
|
+
changeViewerSetting(propKey, selectValue);
|
|
10
16
|
};
|
|
11
17
|
return /*#__PURE__*/React.createElement(SliderRow, {
|
|
12
18
|
label: label,
|
|
@@ -15,11 +21,7 @@ var GlobalVolumeControls = function GlobalVolumeControls(props) {
|
|
|
15
21
|
onUpdate: onUpdate
|
|
16
22
|
});
|
|
17
23
|
};
|
|
18
|
-
var showControls = props.visibleControls
|
|
19
|
-
maskAlpha = props.maskAlpha,
|
|
20
|
-
brightness = props.brightness,
|
|
21
|
-
density = props.density,
|
|
22
|
-
levels = props.levels;
|
|
24
|
+
var showControls = props.visibleControls;
|
|
23
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
24
26
|
style: {
|
|
25
27
|
paddingTop: 18,
|
|
@@ -29,11 +31,11 @@ var GlobalVolumeControls = function GlobalVolumeControls(props) {
|
|
|
29
31
|
label: "interpolate",
|
|
30
32
|
hideSlider: true
|
|
31
33
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
32
|
-
checked:
|
|
34
|
+
checked: interpolationEnabled,
|
|
33
35
|
onChange: function onChange(_ref) {
|
|
34
36
|
var target = _ref.target;
|
|
35
|
-
return
|
|
37
|
+
return changeViewerSetting("interpolationEnabled", target.checked);
|
|
36
38
|
}
|
|
37
39
|
})));
|
|
38
40
|
};
|
|
39
|
-
export default
|
|
41
|
+
export default GlobalVolumeControls;
|
|
@@ -20,6 +20,7 @@ var palette = {
|
|
|
20
20
|
veryLtPurple: "#e7e4f2",
|
|
21
21
|
brightRed: "#ff4d4d",
|
|
22
22
|
brightGreen: "#61d900",
|
|
23
|
+
veryBrightGreen: "#61ff00",
|
|
23
24
|
brightBlue: "#0099ff"
|
|
24
25
|
};
|
|
25
26
|
var theme = {
|
|
@@ -93,7 +94,8 @@ var theme = {
|
|
|
93
94
|
text: palette.ltGrey,
|
|
94
95
|
sectionBg: palette.medDarkGrey,
|
|
95
96
|
drawerBg: palette.veryDarkGrey,
|
|
96
|
-
rampSlider: palette.medPurple
|
|
97
|
+
rampSlider: palette.medPurple,
|
|
98
|
+
isovalueSlider: palette.veryBrightGreen
|
|
97
99
|
},
|
|
98
100
|
toolbar: {
|
|
99
101
|
buttonBg: "#000000cc"
|
|
@@ -136,7 +138,7 @@ var theme = {
|
|
|
136
138
|
/** Makes theme styling available to child components via CSS variables. */
|
|
137
139
|
var CssProvider = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n\n ", "\n\n h1, h2, h3, h4, p {\n font-family: var(--font-family);\n }\n\n h1 {\n color: var(--color-text-header);\n font-size: 28px;\n font-weight: 400;\n }\n\n h2 {\n color: var(--color-text-section);\n font-size: 19px;\n font-weight: 400;\n }\n\n h3 {\n color: var(--color-text-header);\n font-size: 16px;\n font-weight: 600;\n }\n\n h4 {\n color: var(--color-text-header);\n font-size: 14px;\n font-weight: 400;\n }\n\n p {\n color: var(--color-text-body);\n font-size: 14px;\n font-weight: 400;\n }\n\n a {\n color: var(--color-text-link);\n }\n\n & *::selection {\n background-color: var(--color-text-selection-bg);\n color: var(--color-text-selection-text);\n }\n\n /** TODO: Go through these styles and see if we can use Ant ConfigProvider for them instead. */\n .ant-btn-link,\n .ant-btn-text,\n .ant-btn-primary,\n .ant-btn-icon-only {\n box-shadow: none;\n\n &:hover:not(:disabled),\n &:focus-visible:not(:disabled) {\n background-color: var(--color-button-primary-hover-bg);\n border-color: var(--color-button-primary-hover-bg);\n color: var(--color-button-primary-text);\n }\n\n &:active:not(:disabled) {\n background-color: var(--color-button-primary-hover-bg);\n border: 1px solid var(--color-button-primary-active-outline);\n color: var(--color-button-primary-text);\n }\n }\n\n /* Let us use buttons with type=\"text\" as purely semantic containers - don't bring any styling! */\n .ant-btn-text {\n width: unset;\n height: unset;\n padding: unset;\n\n &:hover:not(:disabled),\n &:focus-visible:not(:disabled) {\n background-color: unset;\n border-color: transparent;\n }\n }\n\n .ant-btn-icon-only:disabled {\n color: var(--color-button-icon-disabled-text);\n }\n\n .ant-btn-link:not(:disabled) {\n // Change from default blue link text\n color: var(--color-button-link-text);\n }\n\n /**\n * Tertiary style buttons. Grey outline by default, turns to light\n * purple outline on hover.\n */\n .ant-btn-default:not(.ant-btn-icon-only) {\n background-color: var(--color-button-tertiary-bg);\n color: var(--color-button-tertiary-text);\n border-color: var(--color-button-tertiary-outline);\n\n &:hover:not(:disabled),\n &:focus-visible:not(:disabled) {\n background-color: transparent;\n border-color: var(--color-button-tertiary-hover-bg);\n color: var(--color-button-tertiary-hover-text);\n }\n\n &:active:not(:disabled) {\n background-color: transparent;\n border-color: var(--color-button-tertiary-active-outline);\n color: var(--color-button-tertiary-active-text);\n }\n }\n\n // Overrides for checkbox styling\n & .ant-checkbox-input {\n &:hover,\n &:focus-visible {\n border: 1px solid white;\n }\n }\n\n & .ant-checkbox.ant-checkbox-checked {\n background-color: var(--color-checkbox-bg);\n }\n\n .ant-checkbox-inner {\n background-color: transparent !important;\n }\n\n // Add outlines to modals and dropdowns\n & .ant-select-dropdown,\n & .ant-dropdown-menu,\n & .ant-modal-content {\n border: 1px solid var(--color-modal-border);\n }\n\n // Force active/hovered text to be white instead of grey for better contrast\n & .ant-dropdown-menu-item-active {\n color: var(--color-menu-hover-text);\n }\n\n // Remove padding in dropdown menus and make items reactangular + flush with the edge\n & .ant-dropdown-menu,\n & .ant-select-dropdown {\n padding: 0;\n overflow: hidden;\n\n & .ant-dropdown-menu-item,\n & .ant-select-item {\n border-radius: 0;\n }\n }\n"])), function (_ref) {
|
|
138
140
|
var $theme = _ref.$theme;
|
|
139
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* Component and color variables. */\n // TODO: Fix inconsistent use of border vs. outline\n // TODO: Remove variables that aren't used in other CSS files. These should be set directly\n // from the $theme object to reduce unnecessary variables.\n --color-text-link: ", ";\n --color-text-header: ", ";\n --color-text-section: ", ";\n --color-text-body: ", ";\n --color-text-error: ", ";\n\n --color-text-selection-bg: ", ";\n --color-text-selection-text: ", ";\n\n --color-header-title: ", ";\n --color-header-hover-title: ", ";\n --color-header-bg: ", ";\n --color-header-border: ", ";\n\n --color-button-primary-bg: ", ";\n --color-button-primary-text: ", ";\n --color-button-primary-hover-bg: ", ";\n --color-button-primary-active-bg: ", ";\n --color-button-primary-active-outline: ", ";\n --color-button-primary-disabled-bg: ", ";\n\n --color-button-link-text: ", ";\n\n --color-button-secondary-bg: ", ";\n --color-button-secondary-text: ", ";\n --color-button-secondary-outline: ", ";\n\n --color-button-tertiary-bg: transparent;\n --color-button-tertiary-text: ", ";\n --color-button-tertiary-outline: ", ";\n --color-button-tertiary-hover-outline: ", ";\n --color-button-tertiary-hover-text: ", ";\n --color-button-tertiary-active-outline: ", ";\n --color-button-tertiary-active-text: ", ";\n\n --color-button-icon-disabled-text: ", ";\n --color-button-icon-disabled-text: ", ";\n --color-button-icon-activated-text: ", ";\n --color-button-icon-activated-bg: ", ";\n --color-button-icon-activated-outline: ", ";\n\n --color-toolbar-button-bg: ", ";\n\n --color-controlpanel-bg: ", ";\n --color-controlpanel-border: ", ";\n --color-controlpanel-section-text: ", ";\n --color-controlpanel-text: ", ";\n --color-controlpanel-section-bg: ", ";\n --color-controlpanel-drawer-bg: ", ";\n --color-controlpanel-ramp-slider: ", ";\n\n --color-landingpage-bg: ", ";\n --color-landingpage-bg-alt: ", ";\n --color-landingpage-text: ", ";\n --color-landingpage-banner-highlight-bg: ", ";\n\n --color-statusflag-border: ", ";\n --color-statusflag-text: ", ";\n\n --color-layout-dividers: ", ";\n\n --color-modal-border: ", ";\n\n --color-menu-hover-text: ", ";\n --color-menu-selected-text: ", ";\n\n --color-checkbox-bg: ", ";\n\n --font-family: ", ";\n "])), $theme.colors.text.link, $theme.colors.text.header, $theme.colors.text.section, $theme.colors.text.body, $theme.colors.text.error, $theme.colors.text.selectionBg, $theme.colors.text.selectionText, $theme.colors.header.title, $theme.colors.header.hoverTitle, $theme.colors.header.bg, $theme.colors.header.border, $theme.colors.button.primary.bg, $theme.colors.button.primary.text, $theme.colors.button.primary.hoverBg, $theme.colors.button.primary.hoverBg, $theme.colors.button.primary.activeOutline, $theme.colors.button.primary.disabledBg, $theme.colors.button.link.text, $theme.colors.button.secondary.bg, $theme.colors.button.secondary.text, $theme.colors.button.secondary.outline, $theme.colors.button.tertiary.text, $theme.colors.button.tertiary.outline, $theme.colors.button.tertiary.hoverOutline, $theme.colors.button.tertiary.hoverText, $theme.colors.button.tertiary.activeOutline, $theme.colors.button.tertiary.hoverText, $theme.colors.button.tertiary.disabledText, $theme.colors.button.tertiary.disabledText, $theme.colors.button.tertiary.activatedText, $theme.colors.button.tertiary.activatedBg, $theme.colors.button.tertiary.activatedOutline, $theme.colors.toolbar.buttonBg, $theme.colors.controlPanel.bg, $theme.colors.controlPanel.border, $theme.colors.controlPanel.sectionText, $theme.colors.controlPanel.text, $theme.colors.controlPanel.sectionBg, $theme.colors.controlPanel.drawerBg, $theme.colors.controlPanel.rampSlider, $theme.colors.landingPage.bg, $theme.colors.landingPage.bgAlt, $theme.colors.landingPage.text, $theme.colors.landingPage.bannerBg, $theme.colors.statusFlag.border, $theme.colors.statusFlag.text, $theme.colors.layout.dividers, $theme.colors.modal.border, $theme.colors.menu.hoverText, $theme.colors.menu.selectedText, $theme.colors.checkbox.bg, $theme.fonts.family);
|
|
141
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* Component and color variables. */\n // TODO: Fix inconsistent use of border vs. outline\n // TODO: Remove variables that aren't used in other CSS files. These should be set directly\n // from the $theme object to reduce unnecessary variables.\n --color-text-link: ", ";\n --color-text-header: ", ";\n --color-text-section: ", ";\n --color-text-body: ", ";\n --color-text-error: ", ";\n\n --color-text-selection-bg: ", ";\n --color-text-selection-text: ", ";\n\n --color-header-title: ", ";\n --color-header-hover-title: ", ";\n --color-header-bg: ", ";\n --color-header-border: ", ";\n\n --color-button-primary-bg: ", ";\n --color-button-primary-text: ", ";\n --color-button-primary-hover-bg: ", ";\n --color-button-primary-active-bg: ", ";\n --color-button-primary-active-outline: ", ";\n --color-button-primary-disabled-bg: ", ";\n\n --color-button-link-text: ", ";\n\n --color-button-secondary-bg: ", ";\n --color-button-secondary-text: ", ";\n --color-button-secondary-outline: ", ";\n\n --color-button-tertiary-bg: transparent;\n --color-button-tertiary-text: ", ";\n --color-button-tertiary-outline: ", ";\n --color-button-tertiary-hover-outline: ", ";\n --color-button-tertiary-hover-text: ", ";\n --color-button-tertiary-active-outline: ", ";\n --color-button-tertiary-active-text: ", ";\n\n --color-button-icon-disabled-text: ", ";\n --color-button-icon-disabled-text: ", ";\n --color-button-icon-activated-text: ", ";\n --color-button-icon-activated-bg: ", ";\n --color-button-icon-activated-outline: ", ";\n\n --color-toolbar-button-bg: ", ";\n\n --color-controlpanel-bg: ", ";\n --color-controlpanel-border: ", ";\n --color-controlpanel-section-text: ", ";\n --color-controlpanel-text: ", ";\n --color-controlpanel-section-bg: ", ";\n --color-controlpanel-drawer-bg: ", ";\n --color-controlpanel-ramp-slider: ", ";\n --color-controlpanel-isovalue-slider: ", ";\n\n --color-landingpage-bg: ", ";\n --color-landingpage-bg-alt: ", ";\n --color-landingpage-text: ", ";\n --color-landingpage-banner-highlight-bg: ", ";\n\n --color-statusflag-border: ", ";\n --color-statusflag-text: ", ";\n\n --color-layout-dividers: ", ";\n\n --color-modal-border: ", ";\n\n --color-menu-hover-text: ", ";\n --color-menu-selected-text: ", ";\n\n --color-checkbox-bg: ", ";\n\n --font-family: ", ";\n "])), $theme.colors.text.link, $theme.colors.text.header, $theme.colors.text.section, $theme.colors.text.body, $theme.colors.text.error, $theme.colors.text.selectionBg, $theme.colors.text.selectionText, $theme.colors.header.title, $theme.colors.header.hoverTitle, $theme.colors.header.bg, $theme.colors.header.border, $theme.colors.button.primary.bg, $theme.colors.button.primary.text, $theme.colors.button.primary.hoverBg, $theme.colors.button.primary.hoverBg, $theme.colors.button.primary.activeOutline, $theme.colors.button.primary.disabledBg, $theme.colors.button.link.text, $theme.colors.button.secondary.bg, $theme.colors.button.secondary.text, $theme.colors.button.secondary.outline, $theme.colors.button.tertiary.text, $theme.colors.button.tertiary.outline, $theme.colors.button.tertiary.hoverOutline, $theme.colors.button.tertiary.hoverText, $theme.colors.button.tertiary.activeOutline, $theme.colors.button.tertiary.hoverText, $theme.colors.button.tertiary.disabledText, $theme.colors.button.tertiary.disabledText, $theme.colors.button.tertiary.activatedText, $theme.colors.button.tertiary.activatedBg, $theme.colors.button.tertiary.activatedOutline, $theme.colors.toolbar.buttonBg, $theme.colors.controlPanel.bg, $theme.colors.controlPanel.border, $theme.colors.controlPanel.sectionText, $theme.colors.controlPanel.text, $theme.colors.controlPanel.sectionBg, $theme.colors.controlPanel.drawerBg, $theme.colors.controlPanel.rampSlider, $theme.colors.controlPanel.isovalueSlider, $theme.colors.landingPage.bg, $theme.colors.landingPage.bgAlt, $theme.colors.landingPage.text, $theme.colors.landingPage.bannerBg, $theme.colors.statusFlag.border, $theme.colors.statusFlag.text, $theme.colors.layout.dividers, $theme.colors.modal.border, $theme.colors.menu.hoverText, $theme.colors.menu.selectedText, $theme.colors.checkbox.bg, $theme.fonts.family);
|
|
140
142
|
});
|
|
141
143
|
|
|
142
144
|
/**
|