@aics/vole-app 2.14.0 → 3.1.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.
Files changed (81) hide show
  1. package/es/Globals.d.js +0 -0
  2. package/es/aics-image-viewer/components/App/ChannelUpdater.js +21 -3
  3. package/es/aics-image-viewer/components/App/index.js +184 -198
  4. package/es/aics-image-viewer/components/CellViewerCanvasWrapper/index.js +10 -9
  5. package/es/aics-image-viewer/components/ChannelsWidget.js +35 -22
  6. package/es/aics-image-viewer/components/ChannelsWidgetRow/index.js +26 -52
  7. package/es/aics-image-viewer/components/ChannelsWidgetRow/styles.css +0 -6
  8. package/es/aics-image-viewer/components/ColorPicker.js +1 -1
  9. package/es/aics-image-viewer/components/ControlPanel/index.js +5 -4
  10. package/es/aics-image-viewer/components/CustomizeWidget.js +12 -8
  11. package/es/aics-image-viewer/components/ErrorAlert/index.js +4 -4
  12. package/es/aics-image-viewer/components/GlobalVolumeControls.js +15 -12
  13. package/es/aics-image-viewer/components/StyleProvider/index.js +4 -2
  14. package/es/aics-image-viewer/components/TfEditor/index.js +304 -154
  15. package/es/aics-image-viewer/components/TfEditor/styles.css +53 -31
  16. package/es/aics-image-viewer/components/Toolbar/DownloadButton.js +1 -1
  17. package/es/aics-image-viewer/components/Toolbar/index.js +18 -16
  18. package/es/aics-image-viewer/components/shared/SharedCheckBox.js +1 -1
  19. package/es/aics-image-viewer/components/shared/SliderRow/index.js +8 -3
  20. package/es/aics-image-viewer/components/shared/SliderRow/styles.css +7 -0
  21. package/es/aics-image-viewer/components/shared/SmarterSlider.js +1 -1
  22. package/es/aics-image-viewer/components/shared/ViewerIcon.js +1 -1
  23. package/es/aics-image-viewer/components/useVolume.js +59 -58
  24. package/es/aics-image-viewer/shared/constants.js +2 -2
  25. package/es/aics-image-viewer/shared/utils/controlPointsToLut.js +57 -24
  26. package/es/aics-image-viewer/shared/utils/sceneStore.js +5 -3
  27. package/es/aics-image-viewer/shared/utils/storage.js +238 -0
  28. package/es/aics-image-viewer/shared/utils/test/storage.test.js +264 -0
  29. package/es/aics-image-viewer/shared/utils/test/urlParsing.test.js +240 -108
  30. package/es/aics-image-viewer/shared/utils/test/viewerChannelSettings.test.js +1 -1
  31. package/es/aics-image-viewer/shared/utils/urlParsing.js +278 -153
  32. package/es/aics-image-viewer/shared/utils/viewerState.js +4 -24
  33. package/es/aics-image-viewer/state/reset.js +111 -0
  34. package/es/aics-image-viewer/state/store.js +90 -0
  35. package/es/aics-image-viewer/state/subscribers.js +153 -0
  36. package/es/aics-image-viewer/state/test/reset.test.js +247 -0
  37. package/es/aics-image-viewer/state/util.js +71 -0
  38. package/es/index.js +3 -3
  39. package/package.json +18 -11
  40. package/type-declarations/aics-image-viewer/components/App/ChannelUpdater.d.ts +2 -4
  41. package/type-declarations/aics-image-viewer/components/App/types.d.ts +3 -3
  42. package/type-declarations/aics-image-viewer/components/AxisClipSliders/index.d.ts +6 -6
  43. package/type-declarations/aics-image-viewer/components/CellViewerCanvasWrapper/index.d.ts +5 -14
  44. package/type-declarations/aics-image-viewer/components/ChannelsWidget.d.ts +3 -6
  45. package/type-declarations/aics-image-viewer/components/ChannelsWidgetRow/index.d.ts +3 -6
  46. package/type-declarations/aics-image-viewer/components/ColorPicker.d.ts +1 -1
  47. package/type-declarations/aics-image-viewer/components/ControlPanel/index.d.ts +6 -7
  48. package/type-declarations/aics-image-viewer/components/CustomizeWidget.d.ts +2 -8
  49. package/type-declarations/aics-image-viewer/components/ErrorAlert/index.d.ts +4 -0
  50. package/type-declarations/aics-image-viewer/components/GlobalVolumeControls.d.ts +2 -9
  51. package/type-declarations/aics-image-viewer/components/MetadataViewer/index.d.ts +1 -1
  52. package/type-declarations/aics-image-viewer/components/StyleProvider/index.d.ts +1 -1
  53. package/type-declarations/aics-image-viewer/components/TfEditor/index.d.ts +10 -3
  54. package/type-declarations/aics-image-viewer/components/Toolbar/index.d.ts +3 -12
  55. package/type-declarations/aics-image-viewer/components/shared/SliderRow/index.d.ts +2 -1
  56. package/type-declarations/aics-image-viewer/components/shared/SmarterSlider.d.ts +1 -1
  57. package/type-declarations/aics-image-viewer/components/shared/ViewerIcon.d.ts +1 -1
  58. package/type-declarations/aics-image-viewer/components/useVolume.d.ts +7 -4
  59. package/type-declarations/aics-image-viewer/shared/constants.d.ts +5 -5
  60. package/type-declarations/aics-image-viewer/shared/types.d.ts +1 -1
  61. package/type-declarations/aics-image-viewer/shared/utils/controlPointsToLut.d.ts +9 -5
  62. package/type-declarations/aics-image-viewer/shared/utils/firebase/index.d.ts +1 -1
  63. package/type-declarations/aics-image-viewer/shared/utils/hooks.d.ts +1 -1
  64. package/type-declarations/aics-image-viewer/shared/utils/playControls.d.ts +1 -1
  65. package/type-declarations/aics-image-viewer/shared/utils/sceneStore.d.ts +8 -4
  66. package/type-declarations/aics-image-viewer/shared/utils/storage.d.ts +15 -0
  67. package/type-declarations/aics-image-viewer/shared/utils/urlParsing.d.ts +94 -31
  68. package/type-declarations/aics-image-viewer/shared/utils/viewerChannelSettings.d.ts +39 -1
  69. package/type-declarations/aics-image-viewer/shared/utils/viewerState.d.ts +3 -6
  70. package/type-declarations/aics-image-viewer/state/reset.d.ts +29 -0
  71. package/type-declarations/aics-image-viewer/state/store.d.ts +30 -0
  72. package/type-declarations/aics-image-viewer/state/subscribers.d.ts +4 -0
  73. package/type-declarations/aics-image-viewer/state/types.d.ts +46 -0
  74. package/type-declarations/aics-image-viewer/state/util.d.ts +8 -0
  75. package/type-declarations/index.d.ts +4 -4
  76. package/es/aics-image-viewer/components/ViewerStateProvider/ResetStateProvider.js +0 -163
  77. package/es/aics-image-viewer/components/ViewerStateProvider/index.js +0 -259
  78. package/type-declarations/aics-image-viewer/components/ViewerStateProvider/ResetStateProvider.d.ts +0 -34
  79. package/type-declarations/aics-image-viewer/components/ViewerStateProvider/index.d.ts +0 -33
  80. package/type-declarations/aics-image-viewer/components/ViewerStateProvider/types.d.ts +0 -107
  81. /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
- viewMode = props.viewMode,
45
- region = props.region,
46
- slice = props.slice,
47
- time = props.time;
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: props.scene,
74
+ scene: scene,
74
75
  playControls: props.playControls,
75
76
  playingAxis: props.playingAxis
76
77
  })), renderOverlay());
77
78
  };
78
- export default connectToViewerState(ViewerWrapper, ["autorotate", "viewMode", "region", "slice", "time", "scene", "changeViewerSetting"]);
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
- import { connectToViewerState } from "./ViewerStateProvider";
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
- props.changeChannelSetting(channelArray, _defineProperty({}, key, value));
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
- var channelSetting = channelSettings[channelIndex];
35
- if (!channelSetting) return;
36
- if (channelSetting.volumeEnabled) {
51
+ if (volumeEnabled[channelIndex]) {
37
52
  volChecked.push(channelIndex);
38
53
  }
39
- if (channelSetting.isosurfaceEnabled) {
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 thisChannelSettings = channelSettings[channelIndex];
60
- return thisChannelSettings ? /*#__PURE__*/React.createElement(ChannelsWidgetRow, {
61
- key: "".concat(channelIndex, "_").concat(thisChannelSettings.name, "_").concat(channelIndex),
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(thisChannelSettings.name, channelIndex, viewerChannelSettings),
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 (_ref) {
73
- var _ref2 = _slicedToArray(_ref, 2),
74
- key = _ref2[0],
75
- channelArray = _ref2[1];
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 (_ref3) {
78
- var _ref4 = _slicedToArray(_ref3, 2),
79
- key = _ref4[0],
80
- channelArray = _ref4[1];
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 connectToViewerState(ChannelsWidget, ["channelSettings", "changeChannelSetting"]);
113
+ export default ChannelsWidget;
@@ -6,54 +6,45 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
7
  import { Button, Checkbox, List } from "antd";
8
8
  import React, { useCallback, useState } from "react";
9
- import { 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
- changeChannelSetting = props.changeChannelSetting,
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 volumeCheckHandler = function volumeCheckHandler(_ref) {
29
- var target = _ref.target;
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(_ref2) {
35
- var target = _ref2.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
- var onIsovalueChange = function onIsovalueChange(_ref3) {
41
- var _ref4 = _slicedToArray(_ref3, 1),
42
- newValue = _ref4[0];
43
- return changeSettingForThisChannel({
44
- isovalue: newValue
45
- });
46
- };
47
- var onOpacityChange = function onOpacityChange(_ref5) {
48
- var _ref6 = _slicedToArray(_ref5, 1),
49
- newValue = _ref6[0];
50
- return changeSettingForThisChannel({
51
- opacity: newValue / ISOSURFACE_OPACITY_SLIDER_MAX
52
- });
53
- };
54
45
  var onColorChange = function onColorChange(newRGB, _oldRGB, index) {
55
46
  var color = colorObjectToArray(newRGB);
56
- props.changeChannelSetting(index, {
47
+ changeChannelSetting(index, {
57
48
  color: color
58
49
  });
59
50
  };
@@ -89,13 +80,15 @@ var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
89
80
  type: "text"
90
81
  }));
91
82
  var createTFEditor = function createTFEditor() {
83
+ // TODO this is most of `channelState`... should `TfEditor` just get `channelState`?
92
84
  var controlPoints = channelState.controlPoints,
93
85
  colorizeEnabled = channelState.colorizeEnabled,
94
86
  colorizeAlpha = channelState.colorizeAlpha,
95
87
  useControlPoints = channelState.useControlPoints,
96
88
  ramp = channelState.ramp,
97
89
  plotMin = channelState.plotMin,
98
- plotMax = channelState.plotMax;
90
+ plotMax = channelState.plotMax,
91
+ isovalue = channelState.isovalue;
99
92
  return /*#__PURE__*/React.createElement(TfEditor, {
100
93
  id: "TFEditor" + index,
101
94
  width: 418,
@@ -108,34 +101,15 @@ var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
108
101
  useControlPoints: useControlPoints,
109
102
  ramp: ramp,
110
103
  plotMin: plotMin,
111
- 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
112
111
  });
113
112
  };
114
- var renderSurfaceControls = function renderSurfaceControls() {
115
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SliderRow, {
116
- label: "Isovalue",
117
- max: 255,
118
- start: channelState.isovalue,
119
- onChange: onIsovalueChange,
120
- formatInteger: true
121
- }), /*#__PURE__*/React.createElement(SliderRow, {
122
- label: "Opacity",
123
- max: ISOSURFACE_OPACITY_SLIDER_MAX,
124
- start: channelState.opacity * ISOSURFACE_OPACITY_SLIDER_MAX,
125
- onChange: onOpacityChange,
126
- formatInteger: true
127
- }), /*#__PURE__*/React.createElement("div", {
128
- className: "button-row"
129
- }, /*#__PURE__*/React.createElement(Button, {
130
- onClick: function onClick() {
131
- return saveIsosurface(index, "GLTF");
132
- }
133
- }, "Export GLTF"), /*#__PURE__*/React.createElement(Button, {
134
- onClick: function onClick() {
135
- return saveIsosurface(index, "STL");
136
- }
137
- }, "Export STL")));
138
- };
139
113
  var renderControls = function renderControls() {
140
114
  if (!channelState.volumeEnabled && !channelState.isosurfaceEnabled) {
141
115
  return /*#__PURE__*/React.createElement("h4", {
@@ -144,7 +118,7 @@ var ChannelsWidgetRow = function ChannelsWidgetRow(props) {
144
118
  }
145
119
  }, "Not currently visible");
146
120
  }
147
- return /*#__PURE__*/React.createElement(React.Fragment, null, channelState.volumeEnabled && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h4", null, "Volume settings:"), createTFEditor()), channelState.isosurfaceEnabled && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h4", null, "Surface settings:"), renderSurfaceControls()));
121
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (channelState.volumeEnabled || channelState.isosurfaceEnabled) && createTFEditor());
148
122
  };
149
123
  var rowClass = controlsOpen ? "channel-row" : "channel-row controls-closed";
150
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: props.resetToDefaultViewerState
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.getMetadata()
178
+ metadata: props.metadata
178
179
  }))));
179
180
  }
180
- export default connectToViewerState(ControlPanel, ["resetToDefaultViewerState"]);
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 { connectToViewerState } from "./ViewerStateProvider";
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: props.backgroundColor,
28
+ color: backgroundColor,
25
29
  onColorChange: function onColorChange(color) {
26
- return props.changeViewerSetting("backgroundColor", color);
30
+ return changeViewerSetting("backgroundColor", color);
27
31
  }
28
32
  }, "Background color"), props.visibleControls.boundingBoxColorPicker && /*#__PURE__*/React.createElement(ColorPickerRow, {
29
- color: props.boundingBoxColor,
33
+ color: boundingBoxColor,
30
34
  onColorChange: function onColorChange(color) {
31
- return props.changeViewerSetting("boundingBoxColor", color);
35
+ return changeViewerSetting("boundingBoxColor", color);
32
36
  }
33
- }, "Bounding box color", !props.showBoundingBox && /*#__PURE__*/React.createElement("i", null, " - bounding box turned off")));
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 connectToViewerState(CustomizeWidget, ["showBoundingBox", "backgroundColor", "boundingBoxColor", "changeViewerSetting"]);
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
- import React from "react";
2
1
  import { Checkbox } from "antd";
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
- props.changeViewerSetting(propKey, selectValue);
15
+ changeViewerSetting(propKey, selectValue);
10
16
  };
11
17
  return /*#__PURE__*/React.createElement(SliderRow, {
12
18
  label: label,
@@ -15,24 +21,21 @@ 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,
26
28
  paddingBottom: 22
27
29
  }
28
30
  }, showControls.alphaMaskSlider && createSliderRow("mask cell", maskAlpha, 100, "maskAlpha"), showControls.brightnessSlider && createSliderRow("brightness", brightness, 100, "brightness"), showControls.densitySlider && createSliderRow("density", density, 100, "density"), showControls.levelsSliders && createSliderRow("levels", levels, 255, "levels"), showControls.interpolationControl && /*#__PURE__*/React.createElement(SliderRow, {
29
- label: "interpolate"
31
+ label: "interpolate",
32
+ hideSlider: true
30
33
  }, /*#__PURE__*/React.createElement(Checkbox, {
31
- checked: props.interpolationEnabled,
34
+ checked: interpolationEnabled,
32
35
  onChange: function onChange(_ref) {
33
36
  var target = _ref.target;
34
- return props.changeViewerSetting("interpolationEnabled", target.checked);
37
+ return changeViewerSetting("interpolationEnabled", target.checked);
35
38
  }
36
39
  })));
37
40
  };
38
- export default connectToViewerState(GlobalVolumeControls, ["maskAlpha", "brightness", "density", "levels", "interpolationEnabled", "changeViewerSetting"]);
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
  /**