visualizer-components 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/dist/assets/RudderIcon.d.ts +23 -0
  4. package/dist/assets/RudderIcon.d.ts.map +1 -0
  5. package/dist/assets/RudderIcon.js +23 -0
  6. package/dist/assets/RudderIcon.js.map +1 -0
  7. package/dist/assets/svgSources.d.ts +18 -0
  8. package/dist/assets/svgSources.d.ts.map +1 -0
  9. package/dist/assets/svgSources.js +18 -0
  10. package/dist/assets/svgSources.js.map +1 -0
  11. package/dist/components/Joystick.d.ts +23 -0
  12. package/dist/components/Joystick.d.ts.map +1 -0
  13. package/dist/components/Joystick.js +114 -0
  14. package/dist/components/Joystick.js.map +1 -0
  15. package/dist/components/TelemetryDashboard.d.ts +31 -0
  16. package/dist/components/TelemetryDashboard.d.ts.map +1 -0
  17. package/dist/components/TelemetryDashboard.js +127 -0
  18. package/dist/components/TelemetryDashboard.js.map +1 -0
  19. package/dist/components/controls/ControlOverlay.d.ts +64 -0
  20. package/dist/components/controls/ControlOverlay.d.ts.map +1 -0
  21. package/dist/components/controls/ControlOverlay.js +88 -0
  22. package/dist/components/controls/ControlOverlay.js.map +1 -0
  23. package/dist/components/controls/ControlsDrawer.d.ts +37 -0
  24. package/dist/components/controls/ControlsDrawer.d.ts.map +1 -0
  25. package/dist/components/controls/ControlsDrawer.js +93 -0
  26. package/dist/components/controls/ControlsDrawer.js.map +1 -0
  27. package/dist/components/controls/ForceVectorsPanel.d.ts +37 -0
  28. package/dist/components/controls/ForceVectorsPanel.d.ts.map +1 -0
  29. package/dist/components/controls/ForceVectorsPanel.js +76 -0
  30. package/dist/components/controls/ForceVectorsPanel.js.map +1 -0
  31. package/dist/components/controls/InfoPopover.d.ts +34 -0
  32. package/dist/components/controls/InfoPopover.d.ts.map +1 -0
  33. package/dist/components/controls/InfoPopover.js +41 -0
  34. package/dist/components/controls/InfoPopover.js.map +1 -0
  35. package/dist/components/controls/Legend.d.ts +29 -0
  36. package/dist/components/controls/Legend.d.ts.map +1 -0
  37. package/dist/components/controls/Legend.js +74 -0
  38. package/dist/components/controls/Legend.js.map +1 -0
  39. package/dist/components/controls/MobileBottomNav.d.ts +17 -0
  40. package/dist/components/controls/MobileBottomNav.d.ts.map +1 -0
  41. package/dist/components/controls/MobileBottomNav.js +46 -0
  42. package/dist/components/controls/MobileBottomNav.js.map +1 -0
  43. package/dist/components/hud/SceneHUD.d.ts +100 -0
  44. package/dist/components/hud/SceneHUD.d.ts.map +1 -0
  45. package/dist/components/hud/SceneHUD.js +216 -0
  46. package/dist/components/hud/SceneHUD.js.map +1 -0
  47. package/dist/components/hud/telemetry/Batteries.d.ts +40 -0
  48. package/dist/components/hud/telemetry/Batteries.d.ts.map +1 -0
  49. package/dist/components/hud/telemetry/Batteries.js +137 -0
  50. package/dist/components/hud/telemetry/Batteries.js.map +1 -0
  51. package/dist/components/hud/telemetry/Compass.d.ts +2 -0
  52. package/dist/components/hud/telemetry/Compass.d.ts.map +1 -0
  53. package/dist/components/hud/telemetry/Compass.js +147 -0
  54. package/dist/components/hud/telemetry/Compass.js.map +1 -0
  55. package/dist/components/hud/telemetry/Log.d.ts +2 -0
  56. package/dist/components/hud/telemetry/Log.d.ts.map +1 -0
  57. package/dist/components/hud/telemetry/Log.js +65 -0
  58. package/dist/components/hud/telemetry/Log.js.map +1 -0
  59. package/dist/components/hud/telemetry/Map.d.ts +4 -0
  60. package/dist/components/hud/telemetry/Map.d.ts.map +1 -0
  61. package/dist/components/hud/telemetry/Map.js +293 -0
  62. package/dist/components/hud/telemetry/Map.js.map +1 -0
  63. package/dist/components/hud/telemetry/PowerRudderPanel.d.ts +2 -0
  64. package/dist/components/hud/telemetry/PowerRudderPanel.d.ts.map +1 -0
  65. package/dist/components/hud/telemetry/PowerRudderPanel.js +115 -0
  66. package/dist/components/hud/telemetry/PowerRudderPanel.js.map +1 -0
  67. package/dist/components/hud/telemetry/RadiusVisualizer.d.ts +63 -0
  68. package/dist/components/hud/telemetry/RadiusVisualizer.d.ts.map +1 -0
  69. package/dist/components/hud/telemetry/RadiusVisualizer.js +139 -0
  70. package/dist/components/hud/telemetry/RadiusVisualizer.js.map +1 -0
  71. package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts +31 -0
  72. package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts.map +1 -0
  73. package/dist/components/hud/telemetry/RadiusVisualizerPanel.js +37 -0
  74. package/dist/components/hud/telemetry/RadiusVisualizerPanel.js.map +1 -0
  75. package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts +43 -0
  76. package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts.map +1 -0
  77. package/dist/components/hud/telemetry/ShipRudderVisualizer.js +121 -0
  78. package/dist/components/hud/telemetry/ShipRudderVisualizer.js.map +1 -0
  79. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts +26 -0
  80. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts.map +1 -0
  81. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js +29 -0
  82. package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js.map +1 -0
  83. package/dist/components/hud/telemetry/SignalLog.d.ts +7 -0
  84. package/dist/components/hud/telemetry/SignalLog.d.ts.map +1 -0
  85. package/dist/components/hud/telemetry/SignalLog.js +28 -0
  86. package/dist/components/hud/telemetry/SignalLog.js.map +1 -0
  87. package/dist/components/hud/telemetry/SignalStrength.d.ts +9 -0
  88. package/dist/components/hud/telemetry/SignalStrength.d.ts.map +1 -0
  89. package/dist/components/hud/telemetry/SignalStrength.js +53 -0
  90. package/dist/components/hud/telemetry/SignalStrength.js.map +1 -0
  91. package/dist/components/hud/telemetry/Speedometer.d.ts +2 -0
  92. package/dist/components/hud/telemetry/Speedometer.d.ts.map +1 -0
  93. package/dist/components/hud/telemetry/Speedometer.js +70 -0
  94. package/dist/components/hud/telemetry/Speedometer.js.map +1 -0
  95. package/dist/components/hud/telemetry/Task.d.ts +2 -0
  96. package/dist/components/hud/telemetry/Task.d.ts.map +1 -0
  97. package/dist/components/hud/telemetry/Task.js +61 -0
  98. package/dist/components/hud/telemetry/Task.js.map +1 -0
  99. package/dist/components/hud/telemetry/TaskData.d.ts +2 -0
  100. package/dist/components/hud/telemetry/TaskData.d.ts.map +1 -0
  101. package/dist/components/hud/telemetry/TaskData.js +62 -0
  102. package/dist/components/hud/telemetry/TaskData.js.map +1 -0
  103. package/dist/components/hud/telemetry/index.d.ts +40 -0
  104. package/dist/components/hud/telemetry/index.d.ts.map +1 -0
  105. package/dist/components/hud/telemetry/index.js +40 -0
  106. package/dist/components/hud/telemetry/index.js.map +1 -0
  107. package/dist/components/hud/telemetry/powerColor.d.ts +16 -0
  108. package/dist/components/hud/telemetry/powerColor.d.ts.map +1 -0
  109. package/dist/components/hud/telemetry/powerColor.js +15 -0
  110. package/dist/components/hud/telemetry/powerColor.js.map +1 -0
  111. package/dist/components/scenes/MappingScene.d.ts +19 -0
  112. package/dist/components/scenes/MappingScene.d.ts.map +1 -0
  113. package/dist/components/scenes/MappingScene.js +353 -0
  114. package/dist/components/scenes/MappingScene.js.map +1 -0
  115. package/dist/components/scenes/SceneCanvas.d.ts +96 -0
  116. package/dist/components/scenes/SceneCanvas.d.ts.map +1 -0
  117. package/dist/components/scenes/SceneCanvas.js +151 -0
  118. package/dist/components/scenes/SceneCanvas.js.map +1 -0
  119. package/dist/components/scenes/SceneRenderer.d.ts +16 -0
  120. package/dist/components/scenes/SceneRenderer.d.ts.map +1 -0
  121. package/dist/components/scenes/SceneRenderer.js +60 -0
  122. package/dist/components/scenes/SceneRenderer.js.map +1 -0
  123. package/dist/components/scenes/TelemetryScene.d.ts +6 -0
  124. package/dist/components/scenes/TelemetryScene.d.ts.map +1 -0
  125. package/dist/components/scenes/TelemetryScene.js +6 -0
  126. package/dist/components/scenes/TelemetryScene.js.map +1 -0
  127. package/dist/components/svg/CompassRose.d.ts +129 -0
  128. package/dist/components/svg/CompassRose.d.ts.map +1 -0
  129. package/dist/components/svg/CompassRose.js +221 -0
  130. package/dist/components/svg/CompassRose.js.map +1 -0
  131. package/dist/connection/config.d.ts +41 -0
  132. package/dist/connection/config.d.ts.map +1 -0
  133. package/dist/connection/config.js +44 -0
  134. package/dist/connection/config.js.map +1 -0
  135. package/dist/contexts/SceneContext.d.ts +35 -0
  136. package/dist/contexts/SceneContext.d.ts.map +1 -0
  137. package/dist/contexts/SceneContext.js +24 -0
  138. package/dist/contexts/SceneContext.js.map +1 -0
  139. package/dist/hooks/useAutoPathAnimation.d.ts +22 -0
  140. package/dist/hooks/useAutoPathAnimation.d.ts.map +1 -0
  141. package/dist/hooks/useAutoPathAnimation.js +102 -0
  142. package/dist/hooks/useAutoPathAnimation.js.map +1 -0
  143. package/dist/hooks/useLayoutConfig.d.ts +29 -0
  144. package/dist/hooks/useLayoutConfig.d.ts.map +1 -0
  145. package/dist/hooks/useLayoutConfig.js +30 -0
  146. package/dist/hooks/useLayoutConfig.js.map +1 -0
  147. package/dist/hooks/useSceneContext.d.ts +64 -0
  148. package/dist/hooks/useSceneContext.d.ts.map +1 -0
  149. package/dist/hooks/useSceneContext.js +37 -0
  150. package/dist/hooks/useSceneContext.js.map +1 -0
  151. package/dist/index.d.ts +44 -0
  152. package/dist/index.d.ts.map +1 -0
  153. package/dist/index.js +57 -0
  154. package/dist/index.js.map +1 -0
  155. package/dist/providers/TelemetryProvider.d.ts +27 -0
  156. package/dist/providers/TelemetryProvider.d.ts.map +1 -0
  157. package/dist/providers/TelemetryProvider.js +50 -0
  158. package/dist/providers/TelemetryProvider.js.map +1 -0
  159. package/dist/providers/TelemetryThemeProvider.d.ts +25 -0
  160. package/dist/providers/TelemetryThemeProvider.d.ts.map +1 -0
  161. package/dist/providers/TelemetryThemeProvider.js +54 -0
  162. package/dist/providers/TelemetryThemeProvider.js.map +1 -0
  163. package/dist/store/actions/connectionActions.d.ts +39 -0
  164. package/dist/store/actions/connectionActions.d.ts.map +1 -0
  165. package/dist/store/actions/connectionActions.js +162 -0
  166. package/dist/store/actions/connectionActions.js.map +1 -0
  167. package/dist/store/actions/fetchTelemetry.d.ts +51 -0
  168. package/dist/store/actions/fetchTelemetry.d.ts.map +1 -0
  169. package/dist/store/actions/fetchTelemetry.js +135 -0
  170. package/dist/store/actions/fetchTelemetry.js.map +1 -0
  171. package/dist/store/index.d.ts +23 -0
  172. package/dist/store/index.d.ts.map +1 -0
  173. package/dist/store/index.js +22 -0
  174. package/dist/store/index.js.map +1 -0
  175. package/dist/store/slices/connectionSlice.d.ts +15 -0
  176. package/dist/store/slices/connectionSlice.d.ts.map +1 -0
  177. package/dist/store/slices/connectionSlice.js +39 -0
  178. package/dist/store/slices/connectionSlice.js.map +1 -0
  179. package/dist/store/slices/discoveredGridSlice.d.ts +168 -0
  180. package/dist/store/slices/discoveredGridSlice.d.ts.map +1 -0
  181. package/dist/store/slices/discoveredGridSlice.js +146 -0
  182. package/dist/store/slices/discoveredGridSlice.js.map +1 -0
  183. package/dist/store/slices/sceneSlice.d.ts +185 -0
  184. package/dist/store/slices/sceneSlice.d.ts.map +1 -0
  185. package/dist/store/slices/sceneSlice.js +95 -0
  186. package/dist/store/slices/sceneSlice.js.map +1 -0
  187. package/dist/store/slices/simulationSlice.d.ts +87 -0
  188. package/dist/store/slices/simulationSlice.d.ts.map +1 -0
  189. package/dist/store/slices/simulationSlice.js +55 -0
  190. package/dist/store/slices/simulationSlice.js.map +1 -0
  191. package/dist/store/slices/telemetrySlice.d.ts +10 -0
  192. package/dist/store/slices/telemetrySlice.d.ts.map +1 -0
  193. package/dist/store/slices/telemetrySlice.js +88 -0
  194. package/dist/store/slices/telemetrySlice.js.map +1 -0
  195. package/dist/store/slices/videoSlice.d.ts +12 -0
  196. package/dist/store/slices/videoSlice.d.ts.map +1 -0
  197. package/dist/store/slices/videoSlice.js +27 -0
  198. package/dist/store/slices/videoSlice.js.map +1 -0
  199. package/dist/store/slices/visualizationSlice.d.ts +152 -0
  200. package/dist/store/slices/visualizationSlice.d.ts.map +1 -0
  201. package/dist/store/slices/visualizationSlice.js +58 -0
  202. package/dist/store/slices/visualizationSlice.js.map +1 -0
  203. package/dist/store/store.d.ts +61 -0
  204. package/dist/store/store.d.ts.map +1 -0
  205. package/dist/store/store.js +78 -0
  206. package/dist/store/store.js.map +1 -0
  207. package/dist/theme/index.d.ts +14 -0
  208. package/dist/theme/index.d.ts.map +1 -0
  209. package/dist/theme/index.js +14 -0
  210. package/dist/theme/index.js.map +1 -0
  211. package/dist/theme/lightTheme.d.ts +151 -0
  212. package/dist/theme/lightTheme.d.ts.map +1 -0
  213. package/dist/theme/lightTheme.js +194 -0
  214. package/dist/theme/lightTheme.js.map +1 -0
  215. package/dist/theme/telemetryTheme.d.ts +90 -0
  216. package/dist/theme/telemetryTheme.d.ts.map +1 -0
  217. package/dist/theme/telemetryTheme.js +157 -0
  218. package/dist/theme/telemetryTheme.js.map +1 -0
  219. package/dist/types/detectedObjectsTypes.d.ts +18 -0
  220. package/dist/types/detectedObjectsTypes.d.ts.map +1 -0
  221. package/dist/types/detectedObjectsTypes.js +8 -0
  222. package/dist/types/detectedObjectsTypes.js.map +1 -0
  223. package/dist/types/index.d.ts +16 -0
  224. package/dist/types/index.d.ts.map +1 -0
  225. package/dist/types/index.js +16 -0
  226. package/dist/types/index.js.map +1 -0
  227. package/dist/types/ros.d.ts +87 -0
  228. package/dist/types/ros.d.ts.map +1 -0
  229. package/dist/types/ros.js +17 -0
  230. package/dist/types/ros.js.map +1 -0
  231. package/dist/types/statusTypes.d.ts +81 -0
  232. package/dist/types/statusTypes.d.ts.map +1 -0
  233. package/dist/types/statusTypes.js +52 -0
  234. package/dist/types/statusTypes.js.map +1 -0
  235. package/dist/types/taskTypes.d.ts +65 -0
  236. package/dist/types/taskTypes.d.ts.map +1 -0
  237. package/dist/types/taskTypes.js +18 -0
  238. package/dist/types/taskTypes.js.map +1 -0
  239. package/dist/types/telemetryInterfaces.d.ts +81 -0
  240. package/dist/types/telemetryInterfaces.d.ts.map +1 -0
  241. package/dist/types/telemetryInterfaces.js +30 -0
  242. package/dist/types/telemetryInterfaces.js.map +1 -0
  243. package/dist/utils/basestation.d.ts +7 -0
  244. package/dist/utils/basestation.d.ts.map +1 -0
  245. package/dist/utils/basestation.js +49 -0
  246. package/dist/utils/basestation.js.map +1 -0
  247. package/dist/utils/batteryUtil.d.ts +8 -0
  248. package/dist/utils/batteryUtil.d.ts.map +1 -0
  249. package/dist/utils/batteryUtil.js +32 -0
  250. package/dist/utils/batteryUtil.js.map +1 -0
  251. package/dist/utils/telemetry/index.d.ts +13 -0
  252. package/dist/utils/telemetry/index.d.ts.map +1 -0
  253. package/dist/utils/telemetry/index.js +13 -0
  254. package/dist/utils/telemetry/index.js.map +1 -0
  255. package/dist/utils/telemetry/telemetryFactory.d.ts +48 -0
  256. package/dist/utils/telemetry/telemetryFactory.d.ts.map +1 -0
  257. package/dist/utils/telemetry/telemetryFactory.js +390 -0
  258. package/dist/utils/telemetry/telemetryFactory.js.map +1 -0
  259. package/package.json +91 -0
@@ -0,0 +1,93 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file ControlsDrawer.tsx
4
+ * @description Drawer panel for controlling the ASV visualizer. Contains simulation mode toggles, connection status, and other control options.
5
+ * @author Carson Fujita
6
+ * @license MIT
7
+ */
8
+ import React from 'react';
9
+ import { Drawer, Box, Typography, Stack, Paper, Button, Switch, Tooltip, IconButton, CircularProgress, useTheme, alpha, } from '@mui/material';
10
+ import TuneIcon from '@mui/icons-material/Tune';
11
+ import AutorenewIcon from '@mui/icons-material/Autorenew';
12
+ import WifiIcon from '@mui/icons-material/Wifi';
13
+ import { useAppSelector, useAppDispatch } from '../../store';
14
+ import { setSimMode, setCurrentHeading } from '../../store/slices/simulationSlice';
15
+ import { selectActiveScene } from '../../store/slices/sceneSlice';
16
+ import { setASVHeading } from '../../store/slices/telemetrySlice';
17
+ import { retryConnection } from '../../store/actions/connectionActions';
18
+ import { ForceVectorsPanel } from './ForceVectorsPanel';
19
+ import { ControlOverlay } from './ControlOverlay';
20
+ import { InteractiveCompass } from '../svg/CompassRose';
21
+ import { getTelemetryConnectionConfig } from '../../connection/config';
22
+ /**
23
+ * @component ControlsDrawer
24
+ * @description Drawer panel for controlling the ASV visualizer. Contains simulation mode toggles, connection status, and other control options.
25
+ * @param {ControlsDrawerProps} props - Properties for the component.
26
+ * @remarks
27
+ * The ControlsDrawer component provides a side panel for controlling various aspects of the ASV visualizer, including simulation mode toggles, connection status, and other control options.
28
+ * It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
29
+ * The drawer can be opened or closed based on the `open` prop, and provides callback functions for closing the drawer and regenerating the map.
30
+ * @example
31
+ * <ControlsDrawer
32
+ * open={isDrawerOpen}
33
+ * onClose={() => setIsDrawerOpen(false)}
34
+ * onRegenerateMap={handleRegenerateMap}
35
+ * />
36
+ */
37
+ export const ControlsDrawer = ({ open, onClose, onRegenerateMap }) => {
38
+ const theme = useTheme();
39
+ const dispatch = useAppDispatch();
40
+ const connectionStatus = useAppSelector(state => state.connection.status);
41
+ // URL resolved by initConnection(); before the first attempt, show the configured endpoint.
42
+ const connectionUrl = useAppSelector(state => state.connection.url) || getTelemetryConnectionConfig().wsUrl;
43
+ const simMode = useAppSelector(state => state.simulation.simMode);
44
+ const activeSceneId = useAppSelector(selectActiveScene);
45
+ const asvHeading = useAppSelector(state => state.telemetry.asv.heading);
46
+ const asvSpeed = useAppSelector(state => state.telemetry.asv.speed);
47
+ const currentHeading = useAppSelector(state => state.simulation.currentHeading);
48
+ const isConnected = connectionStatus === 'connected';
49
+ const autoSimActive = !isConnected && simMode === 'automatic';
50
+ const currentRad = (currentHeading || 0) * Math.PI / 180;
51
+ return (_jsxs(Drawer, { anchor: "right", open: open, onClose: onClose, slotProps: {
52
+ backdrop: { sx: { bgcolor: alpha(theme.palette.scene.skyDark, 0.3) } },
53
+ paper: {
54
+ sx: {
55
+ width: { xs: '100%', sm: 360 },
56
+ bgcolor: theme.palette.scene.skyDark,
57
+ color: theme.palette.common.white,
58
+ borderLeft: `1px solid ${alpha(theme.palette.common.white, 0.1)}`,
59
+ backgroundImage: 'none',
60
+ p: 0,
61
+ display: 'flex',
62
+ flexDirection: 'column',
63
+ },
64
+ },
65
+ }, children: [_jsxs(Box, { sx: { p: 3, borderBottom: `1px solid ${alpha(theme.palette.common.white, 0.05)}`, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [_jsx(Typography, { variant: "h6", sx: { fontWeight: 700 }, children: "System Configuration" }), _jsx(Tooltip, { title: "Close", placement: "left", children: _jsx(IconButton, { onClick: onClose, sx: { color: theme.palette.common.white }, children: _jsx(TuneIcon, {}) }) })] }), _jsx(Box, { sx: { p: 3, flex: 1, overflowY: 'auto' }, children: _jsxs(Stack, { spacing: 2, children: [!isConnected && (_jsxs(Paper, { sx: { p: 2, bgcolor: theme.palette.gui.primary, borderRadius: 2, border: `1px solid ${alpha(theme.palette.common.white, 0.1)}` }, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, color: theme.palette.gui.subtle, textTransform: 'uppercase', fontSize: '0.7rem', letterSpacing: '0.08em', mb: 1.5 }, children: "Simulation Mode" }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', justifyContent: 'space-between' }, children: [_jsxs(Box, { children: [_jsx(Typography, { variant: "body2", sx: { fontWeight: 700, color: autoSimActive ? theme.palette.sim.auto : theme.palette.sim.manual }, children: autoSimActive ? 'Automatic' : 'Manual' }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.subtle }, children: autoSimActive
66
+ ? 'Vessel follows the planned BFS path'
67
+ : 'Control speed and heading via sliders' })] }), _jsx(Tooltip, { title: autoSimActive ? 'Switch to manual control' : 'Switch to automatic', placement: "left", children: _jsx(Switch, { checked: autoSimActive, onChange: () => dispatch(setSimMode(autoSimActive ? 'manual' : 'automatic')), sx: {
68
+ '& .MuiSwitch-switchBase.Mui-checked': { color: theme.palette.sim.auto },
69
+ '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { bgcolor: theme.palette.sim.auto },
70
+ '& .MuiSwitch-switchBase': { color: theme.palette.sim.manual },
71
+ '& .MuiSwitch-track': { bgcolor: theme.palette.sim.manual },
72
+ } }) })] })] })), !isConnected && (_jsxs(Paper, { sx: { p: 2, bgcolor: theme.palette.gui.primary, borderRadius: 2, border: `1px solid ${alpha(theme.palette.common.white, 0.1)}` }, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, color: theme.palette.gui.subtle, textTransform: 'uppercase', fontSize: '0.7rem', letterSpacing: '0.08em', mb: 1.5 }, children: "Simulation Data" }), _jsx(Tooltip, { title: "Generate a new obstacle map, noise field, and BFS path", placement: "top", children: _jsx(Button, { fullWidth: true, variant: "outlined", startIcon: _jsx(AutorenewIcon, {}), onClick: onRegenerateMap, sx: {
73
+ color: theme.palette.sim.auto,
74
+ borderColor: alpha(theme.palette.sim.auto, 0.4),
75
+ '&:hover': { borderColor: theme.palette.sim.auto, bgcolor: alpha(theme.palette.sim.auto, 0.08) },
76
+ textTransform: 'none',
77
+ fontWeight: 600,
78
+ }, children: "Regenerate Map" }) }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.faint, display: 'block', mt: 1 }, children: "New Gaussian noise field, obstacle islands, and BFS path" })] })), _jsxs(Paper, { sx: { p: 2, bgcolor: theme.palette.gui.primary, borderRadius: 2, border: `1px solid ${alpha(theme.palette.common.white, 0.1)}` }, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, color: theme.palette.gui.subtle, textTransform: 'uppercase', fontSize: '0.7rem', letterSpacing: '0.08em', mb: 1.5 }, children: "Basestation Connection" }), _jsx(Tooltip, { title: isConnected ? 'Re-establish the WebSocket connection' : connectionStatus === 'connecting' ? 'Connection in progress…' : 'Connect to the basestation WebSocket', placement: "top", children: _jsx("span", { children: _jsx(Button, { fullWidth: true, variant: "outlined", disabled: connectionStatus === 'connecting', startIcon: connectionStatus === 'connecting'
79
+ ? _jsx(CircularProgress, { size: 14, sx: { color: theme.palette.sim.connecting } })
80
+ : _jsx(WifiIcon, {}), onClick: () => { dispatch(retryConnection()); onClose(); }, sx: {
81
+ color: isConnected ? theme.palette.status.primary.autonomous : theme.palette.sim.connecting,
82
+ borderColor: isConnected ? alpha(theme.palette.status.primary.autonomous, 0.4) : alpha(theme.palette.sim.connecting, 0.4),
83
+ '&:hover': {
84
+ borderColor: isConnected ? theme.palette.status.primary.autonomous : theme.palette.sim.connecting,
85
+ bgcolor: isConnected ? alpha(theme.palette.status.primary.autonomous, 0.08) : alpha(theme.palette.sim.connecting, 0.08),
86
+ },
87
+ '&.Mui-disabled': { color: theme.palette.sim.connecting, borderColor: alpha(theme.palette.sim.connecting, 0.2) },
88
+ textTransform: 'none',
89
+ fontWeight: 600,
90
+ width: '100%',
91
+ }, children: isConnected ? 'Reconnect' : connectionStatus === 'connecting' ? 'Connecting…' : 'Connect to Basestation' }) }) }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.faint, display: 'block', mt: 1, wordBreak: 'break-all' }, children: connectionUrl })] }), activeSceneId === 'forces' && (_jsx(ForceVectorsPanel, { objectHeading: asvHeading, currentRad: currentRad, currentSpeed: asvSpeed })), activeSceneId === 'forces' && (_jsxs(Paper, { sx: { p: 2, bgcolor: theme.palette.gui.primary, borderRadius: 2, border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`, textAlign: 'center' }, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, color: theme.palette.primary.light, mb: 2, textTransform: 'uppercase', fontSize: '0.75rem', letterSpacing: '0.05em' }, children: "Vessel Heading" }), _jsx(Box, { sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: _jsx(InteractiveCompass, { heading: asvHeading, onHeadingChange: (h) => dispatch(setASVHeading(h)), isConnected: isConnected, size: 160, outerRadius: 60, innerRadius: 50 }) }), _jsx(Typography, { variant: "caption", sx: { display: 'block', mt: 1.5, color: theme.palette.gui.faint }, children: "Drag to set the vessel's heading direction" })] })), activeSceneId === 'forces' && (_jsxs(Paper, { sx: { p: 2, bgcolor: theme.palette.gui.primary, borderRadius: 2, border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`, textAlign: 'center' }, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, color: theme.palette.info.main, mb: 2, textTransform: 'uppercase', fontSize: '0.75rem', letterSpacing: '0.05em' }, children: "Flow Control" }), _jsx(Box, { sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: _jsx(InteractiveCompass, { heading: currentHeading, onHeadingChange: (h) => dispatch(setCurrentHeading(h)), isConnected: isConnected, size: 160, outerRadius: 60, innerRadius: 50 }) }), _jsx(Typography, { variant: "caption", sx: { display: 'block', mt: 1.5, color: theme.palette.gui.faint }, children: "Drag to set the simulated water current direction" })] })), _jsx(ControlOverlay, { title: activeSceneId === 'forces' ? 'Simulation Params' : 'Mapping Params', showLocalRotation: activeSceneId === 'mapping' && !isConnected && !autoSimActive, showVelocity: !isConnected && !autoSimActive, showObjectHeading: activeSceneId === 'forces' && !isConnected, showGlobalGrid: true, showGlobalAxes: true, showLocalAxes: true, showLocalGrid: activeSceneId === 'mapping', showLegend: true, showCourseTrail: activeSceneId === 'mapping', showFogOfWar: activeSceneId === 'mapping', showCurrentHeading: activeSceneId === 'forces', showCurrentSpeed: activeSceneId === 'forces', isLocked: isConnected })] }) })] }));
92
+ };
93
+ //# sourceMappingURL=ControlsDrawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControlsDrawer.js","sourceRoot":"","sources":["../../../src/components/controls/ControlsDrawer.tsx"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EA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CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EACtD,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,GAAG,EACT,WAAW,EAAE,EAAE,EACf,WAAW,EAAE,EAAE,GACjB,GACA,EACN,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,kEAElF,IACT,CACX,EAED,KAAC,cAAc,IACX,KAAK,EAAE,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,EAC1E,iBAAiB,EAAE,aAAa,KAAK,SAAS,IAAI,CAAC,WAAW,IAAI,CAAC,aAAa,EAChF,YAAY,EAAE,CAAC,WAAW,IAAI,CAAC,aAAa,EAC5C,iBAAiB,EAAE,aAAa,KAAK,QAAQ,IAAI,CAAC,WAAW,EAC7D,cAAc,QACd,cAAc,QACd,aAAa,QACb,aAAa,EAAE,aAAa,KAAK,SAAS,EAC1C,UAAU,QACV,eAAe,EAAE,aAAa,KAAK,SAAS,EAC5C,YAAY,EAAE,aAAa,KAAK,SAAS,EACzC,kBAAkB,EAAE,aAAa,KAAK,QAAQ,EAC9C,gBAAgB,EAAE,aAAa,KAAK,QAAQ,EAC5C,QAAQ,EAAE,WAAW,GACvB,IACE,GACN,IACD,CACZ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @file ForceVectorsPanel.tsx
3
+ * @description HTML overlay showing numerical values of force vectors using MUI.
4
+ */
5
+ import React from 'react';
6
+ /**
7
+ * @interface ForceVectorsPanelProps
8
+ * @description Properties for the {@link ForceVectorsPanel} component.
9
+ * @see {@link ForceVectorsPanel}
10
+ * @property {number} objectHeading - Current heading of the object in degrees.
11
+ * @property {number} currentRad - Current heading of the water in radians.
12
+ * @property {number} currentSpeed - Current speed of the water.
13
+ */
14
+ export interface ForceVectorsPanelProps {
15
+ /** Current heading of the object in degrees. */
16
+ objectHeading: number;
17
+ /** Current heading of the water in radians. */
18
+ currentRad: number;
19
+ /** Current speed of the water. */
20
+ currentSpeed: number;
21
+ }
22
+ /**
23
+ * @component ForceVectorsPanel
24
+ * @description Renders a panel containing the numerical decomposition of forces acting on the object.
25
+ * @param {ForceVectorsPanelProps} props - Properties for the component.
26
+ * @remarks
27
+ * This component displays a panel with the numerical values of various force vectors acting on the floating object,
28
+ * including weight, buoyancy, current, drag, and net XY forces. It uses Material-UI components for styling and layout.
29
+ * @example
30
+ * <ForceVectorsPanel
31
+ * objectHeading={45}
32
+ * currentRad={Math.PI / 4}
33
+ * currentSpeed={2.5}
34
+ * />
35
+ */
36
+ export declare const ForceVectorsPanel: React.FC<ForceVectorsPanelProps>;
37
+ //# sourceMappingURL=ForceVectorsPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForceVectorsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/controls/ForceVectorsPanel.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACnC,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAwF9D,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file ForceVectorsPanel.tsx
4
+ * @description HTML overlay showing numerical values of force vectors using MUI.
5
+ */
6
+ import React from 'react';
7
+ import { useTheme, Box, Typography, Paper, alpha } from '@mui/material';
8
+ import { getCardinalLabel } from '../../types';
9
+ /**
10
+ * @component ForceVectorsPanel
11
+ * @description Renders a panel containing the numerical decomposition of forces acting on the object.
12
+ * @param {ForceVectorsPanelProps} props - Properties for the component.
13
+ * @remarks
14
+ * This component displays a panel with the numerical values of various force vectors acting on the floating object,
15
+ * including weight, buoyancy, current, drag, and net XY forces. It uses Material-UI components for styling and layout.
16
+ * @example
17
+ * <ForceVectorsPanel
18
+ * objectHeading={45}
19
+ * currentRad={Math.PI / 4}
20
+ * currentSpeed={2.5}
21
+ * />
22
+ */
23
+ export const ForceVectorsPanel = ({ objectHeading, currentRad, currentSpeed }) => {
24
+ const theme = useTheme();
25
+ /**
26
+ * @remarks
27
+ * Defines the legend items for the force vectors panel, including labels, colors, and values.
28
+ * The values are calculated based on the current heading and speed of the water.
29
+ */
30
+ const items = [
31
+ { label: 'Heading:', color: theme.palette.common.white, value: `${objectHeading}° (${getCardinalLabel(objectHeading)})` },
32
+ { label: 'Weight:', color: theme.palette.map.weight, value: '(0, 0, −mg)' },
33
+ { label: 'Buoyancy:', color: theme.palette.map.buoyancy, value: '(0, 0, +ρVg)' },
34
+ {
35
+ label: 'Current:',
36
+ color: theme.palette.map.current,
37
+ value: `(${(-Math.sin(currentRad) * currentSpeed).toFixed(1)}, ${(Math.cos(currentRad) * currentSpeed).toFixed(1)}, 0)`
38
+ },
39
+ {
40
+ label: 'Drag:',
41
+ color: theme.palette.map.drag,
42
+ value: `(${(Math.sin(currentRad) * currentSpeed * 0.5).toFixed(1)}, ${(-Math.cos(currentRad) * currentSpeed * 0.5).toFixed(1)}, 0)`
43
+ },
44
+ {
45
+ label: 'Net XY:',
46
+ color: theme.palette.map.xAxis,
47
+ value: `(${(-Math.sin(currentRad) * currentSpeed * 0.5).toFixed(1)}, ${(Math.cos(currentRad) * currentSpeed * 0.5).toFixed(1)}, 0)`
48
+ },
49
+ ];
50
+ return (_jsxs(Paper, { elevation: 0, sx: {
51
+ width: '100%',
52
+ backgroundColor: theme.palette.gui.primary,
53
+ backdropFilter: 'blur(4px)',
54
+ borderRadius: 2,
55
+ p: 2,
56
+ border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`,
57
+ color: theme.palette.common.white,
58
+ }, children: [_jsx(Typography, { variant: "subtitle2", sx: {
59
+ fontWeight: 800,
60
+ mb: 1.5,
61
+ fontSize: '0.875rem',
62
+ textTransform: 'uppercase',
63
+ letterSpacing: '0.05em'
64
+ }, children: "Force Vectors:" }), _jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 0.5 }, children: items.map((item) => (_jsxs(Box, { sx: { display: 'flex', alignItems: 'baseline' }, children: [_jsx(Typography, { variant: "caption", sx: {
65
+ color: item.color,
66
+ fontWeight: 'bold',
67
+ fontSize: '0.65rem',
68
+ width: '65px',
69
+ flexShrink: 0
70
+ }, children: item.label }), _jsx(Typography, { variant: "caption", sx: {
71
+ color: theme.palette.gui.muted,
72
+ fontSize: '0.65rem',
73
+ fontFamily: 'monospace'
74
+ }, children: item.value })] }, item.label))) })] }));
75
+ };
76
+ //# sourceMappingURL=ForceVectorsPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForceVectorsPanel.js","sourceRoot":"","sources":["../../../src/components/controls/ForceVectorsPanel.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAmB/C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAChE,aAAa,EACb,UAAU,EACV,YAAY,EACf,EAAE,EAAE;IACD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB;;;;OAIG;IACH,MAAM,KAAK,GAAG;QACV,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,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ACF,EACb,KAAC,UAAU,IACP,OAAO,EAAC,SAAS,EACjB,EAAE,EAAE;gCACA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;gCAC9B,QAAQ,EAAE,SAAS;gCACnB,UAAU,EAAE,WAAW;6BAC1B,YAEA,IAAI,CAAC,KAAK,GACF,KAtBP,IAAI,CAAC,KAAK,CAuBd,CACT,CAAC,GACA,IACF,CACX,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @file InfoPopover.tsx
3
+ * @description Popover panel that explains the different simulation modes and connection states in the ASV visualizer.
4
+ *
5
+ * @author Carson Fujita
6
+ * @license MIT
7
+ */
8
+ import React from 'react';
9
+ /**
10
+ * @interface InfoPopoverProps
11
+ * @description Properties for the {@link InfoPopover} component.
12
+ * @see {@link InfoPopover}
13
+ * @property {HTMLElement | null} anchor - The HTML element to which the popover is anchored.
14
+ * @property {() => void} onClose - Callback function to close the popover.
15
+ */
16
+ export interface InfoPopoverProps {
17
+ anchor: HTMLElement | null;
18
+ onClose: () => void;
19
+ }
20
+ /**
21
+ * @component InfoPopover
22
+ * @description Popover that explains LIVE/SIM connection states and AUTO/MAN simulation modes.
23
+ * @param {InfoPopoverProps} props - Properties for the component.
24
+ * @remarks
25
+ * This component renders a popover panel that provides information about the different simulation modes (AUTO and MAN) and connection states (LIVE and SIM) in the ASV visualizer. It uses Material-UI components for styling and layout.
26
+ * The popover is anchored to a specified HTML element and can be closed via a callback function.
27
+ * @example
28
+ * <InfoPopover
29
+ * anchor={anchorElement}
30
+ * onClose={() => setAnchor(null)}
31
+ * />
32
+ */
33
+ export declare const InfoPopover: React.FC<InfoPopoverProps>;
34
+ //# sourceMappingURL=InfoPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoPopover.d.ts","sourceRoot":"","sources":["../../../src/components/controls/InfoPopover.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2ElD,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file InfoPopover.tsx
4
+ * @description Popover panel that explains the different simulation modes and connection states in the ASV visualizer.
5
+ *
6
+ * @author Carson Fujita
7
+ * @license MIT
8
+ */
9
+ import React from 'react';
10
+ import { Popover, Typography, Divider, Stack, Box, useTheme, alpha } from '@mui/material';
11
+ /**
12
+ * @component InfoPopover
13
+ * @description Popover that explains LIVE/SIM connection states and AUTO/MAN simulation modes.
14
+ * @param {InfoPopoverProps} props - Properties for the component.
15
+ * @remarks
16
+ * This component renders a popover panel that provides information about the different simulation modes (AUTO and MAN) and connection states (LIVE and SIM) in the ASV visualizer. It uses Material-UI components for styling and layout.
17
+ * The popover is anchored to a specified HTML element and can be closed via a callback function.
18
+ * @example
19
+ * <InfoPopover
20
+ * anchor={anchorElement}
21
+ * onClose={() => setAnchor(null)}
22
+ * />
23
+ */
24
+ export const InfoPopover = ({ anchor, onClose }) => {
25
+ const theme = useTheme();
26
+ return (_jsxs(Popover, { open: Boolean(anchor), anchorEl: anchor, onClose: onClose, anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, slotProps: {
27
+ paper: {
28
+ sx: {
29
+ bgcolor: theme.palette.scene.skyDark,
30
+ color: theme.palette.common.white,
31
+ border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`,
32
+ backgroundImage: 'none',
33
+ borderRadius: 2,
34
+ p: 2.5,
35
+ maxWidth: 320,
36
+ boxShadow: `0 25px 50px -12px ${alpha(theme.palette.common.black, 0.6)}`,
37
+ },
38
+ },
39
+ }, children: [_jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 800, color: theme.palette.water.highlight, textTransform: 'uppercase', letterSpacing: '0.08em', mb: 1.5 }, children: "System Visualizer" }), _jsxs(Stack, { spacing: 0.5, mb: 2, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Box, { sx: { width: 8, height: 8, borderRadius: '50%', bgcolor: theme.palette.status.primary.autonomous, flexShrink: 0 } }), _jsx(Typography, { variant: "caption", sx: { fontWeight: 700, color: theme.palette.status.primary.autonomous, letterSpacing: '0.05em' }, children: "LIVE" })] }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.muted, pl: 2.5, display: 'block' }, children: "Connected to the ASV basestation over WebSocket. All telemetry \u2014 speed, heading, position, grid maps \u2014 streams from the vessel in real time. Simulation controls are locked." })] }), _jsxs(Stack, { spacing: 0.5, mb: 2.5, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Box, { sx: { width: 8, height: 8, borderRadius: '50%', bgcolor: theme.palette.map.drag, flexShrink: 0 } }), _jsx(Typography, { variant: "caption", sx: { fontWeight: 700, color: theme.palette.map.drag, letterSpacing: '0.05em' }, children: "SIM" })] }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.muted, pl: 2.5, display: 'block' }, children: "No live connection. A 20\u00D720 map is generated procedurally using Gaussian noise blurred into obstacle islands, then BFS finds a navigable path between two free cells." })] }), _jsx(Divider, { sx: { borderColor: alpha(theme.palette.common.white, 0.08), mb: 2 } }), _jsx(Typography, { variant: "caption", sx: { fontWeight: 700, color: theme.palette.gui.subtle, textTransform: 'uppercase', letterSpacing: '0.08em', display: 'block', mb: 1.5 }, children: "Simulation Modes" }), _jsxs(Stack, { spacing: 0.5, mb: 2, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Box, { sx: { width: 8, height: 8, borderRadius: '50%', bgcolor: theme.palette.sim.auto, flexShrink: 0 } }), _jsx(Typography, { variant: "caption", sx: { fontWeight: 700, color: theme.palette.sim.auto, letterSpacing: '0.05em' }, children: "AUTO" })] }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.muted, pl: 2.5, display: 'block' }, children: "The vessel follows the planned BFS path from current position to objective, looping continuously. If the objective is unreachable the vessel holds position. The course-over-ground trail marks every visited cell." })] }), _jsxs(Stack, { spacing: 0.5, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Box, { sx: { width: 8, height: 8, borderRadius: '50%', bgcolor: theme.palette.sim.manual, flexShrink: 0 } }), _jsx(Typography, { variant: "caption", sx: { fontWeight: 700, color: theme.palette.sim.manual, letterSpacing: '0.05em' }, children: "MAN" })] }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.muted, pl: 2.5, display: 'block' }, children: "Full manual control. Use the speed and rotation sliders in the settings drawer to drive the vessel around the map. The grid wraps seamlessly at the boundary." })] })] }));
40
+ };
41
+ //# sourceMappingURL=InfoPopover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoPopover.js","sourceRoot":"","sources":["../../../src/components/controls/InfoPopover.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAc1F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IAC3E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACP,MAAC,OAAO,IACJ,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,EAChB,YAAY,EA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EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAI,EAC3G,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,oBAAkB,IAC7H,EACR,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,8KAElF,IACT,IACF,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @file Legend.tsx
3
+ * @description Legend component for the Mapping Visualizer explaining colors and symbols.
4
+ */
5
+ import React from 'react';
6
+ /**
7
+ * @interface LegendProps
8
+ * @description Properties for the {@link Legend} component.
9
+ * @see {@link Legend}
10
+ */
11
+ interface LegendProps {
12
+ /** The type of legend to display. Defaults to 'mapping'. */
13
+ variant?: 'mapping' | 'forces';
14
+ /** If true, renders without the Paper wrapper. */
15
+ disablePaper?: boolean;
16
+ /** If true, hides the internal title. */
17
+ hideTitle?: boolean;
18
+ }
19
+ /**
20
+ * @component Legend
21
+ * @description Renders an HTML legend panel using MUI.
22
+ * @param {LegendProps} props - Properties for the component.
23
+ * @remarks
24
+ * Renders an HTML legend panel using MUI.
25
+ * Uses the application theme for consistent styling of text and shapes.
26
+ */
27
+ export declare const Legend: React.FC<LegendProps>;
28
+ export {};
29
+ //# sourceMappingURL=Legend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../src/components/controls/Legend.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;GAIG;AACH,UAAU,WAAW;IACnB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,kDAAkD;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AA0BD;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2GxC,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file Legend.tsx
4
+ * @description Legend component for the Mapping Visualizer explaining colors and symbols.
5
+ */
6
+ import React from 'react';
7
+ import { useTheme, Box, Typography, Paper, alpha } from '@mui/material';
8
+ /**
9
+ * @component Legend
10
+ * @description Renders an HTML legend panel using MUI.
11
+ * @param {LegendProps} props - Properties for the component.
12
+ * @remarks
13
+ * Renders an HTML legend panel using MUI.
14
+ * Uses the application theme for consistent styling of text and shapes.
15
+ */
16
+ export const Legend = ({ variant = 'mapping', disablePaper = false, hideTitle = false }) => {
17
+ const theme = useTheme();
18
+ const isForces = variant === 'forces';
19
+ // Define legend items based on the variant
20
+ const items = isForces
21
+ ? [
22
+ { label: 'Object Heading', color: theme.palette.map.heading, type: 'line', strokeWidth: 3 },
23
+ { label: 'Weight (-Z)', color: theme.palette.map.weight, type: 'line', strokeWidth: 3, textColor: theme.palette.error.light },
24
+ { label: 'Buoyancy (+Z)', color: theme.palette.map.buoyancy, type: 'line', strokeWidth: 3, textColor: theme.palette.success.light },
25
+ { label: 'Current (XY plane)', color: theme.palette.map.current, type: 'line', strokeWidth: 3, textColor: theme.palette.info.light },
26
+ { label: 'Drag (opposes current)', color: theme.palette.map.drag, type: 'line', strokeWidth: 3, textColor: theme.palette.warning.light },
27
+ ]
28
+ : [
29
+ { label: 'Global Grid (Low-Res)', color: theme.palette.map.grid, type: 'line', strokeWidth: 2, opacity: 0.5 },
30
+ { label: 'X Axis (Global & Local)', color: theme.palette.map.xAxis, type: 'line', strokeWidth: 2 },
31
+ { label: 'Y Axis / Local YZ Plane', color: theme.palette.map.yAxis, type: 'line', strokeWidth: 2 },
32
+ { label: 'Local XY Plane', color: theme.palette.map.localXY, type: 'line', strokeWidth: 2 },
33
+ { label: 'Local XZ Plane', color: theme.palette.map.localXZ, type: 'line', strokeWidth: 2 },
34
+ { label: 'Local Origin Point', color: theme.palette.map.localOrigin, type: 'circle', radius: 5 },
35
+ { label: 'Global Origin (0,0)', color: theme.palette.map.globalOrigin, type: 'circle', stroke: theme.palette.map.grid, strokeWidth: 1, radius: 4 },
36
+ ];
37
+ const content = (_jsxs(Box, { sx: { width: '100%' }, children: [!hideTitle && (_jsx(Typography, { variant: "subtitle2", sx: {
38
+ fontWeight: 800,
39
+ mb: 1.5,
40
+ fontSize: '0.75rem',
41
+ color: theme.palette.primary.light,
42
+ textTransform: 'uppercase',
43
+ letterSpacing: '0.05em'
44
+ }, children: isForces ? 'Forces:' : 'Legend' })), _jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 1.2 }, children: items.map((item) => (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1.5 }, children: [_jsx(Box, { sx: { width: 20, display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: item.type === 'line' ? (_jsx(Box, { sx: {
45
+ width: '100%',
46
+ height: item.strokeWidth || 2,
47
+ bgcolor: item.color,
48
+ opacity: item.opacity ?? 1,
49
+ borderRadius: 1
50
+ } })) : (_jsx(Box, { sx: {
51
+ width: (item.radius || 4) * 2,
52
+ height: (item.radius || 4) * 2,
53
+ borderRadius: '50%',
54
+ bgcolor: item.color,
55
+ border: item.stroke ? `${item.strokeWidth || 1}px solid ${item.stroke}` : 'none'
56
+ } })) }), _jsx(Typography, { variant: "caption", sx: {
57
+ fontSize: '0.7rem',
58
+ fontWeight: 600,
59
+ color: item.textColor || 'inherit',
60
+ lineHeight: 1.2
61
+ }, children: item.label })] }, item.label))) })] }));
62
+ if (disablePaper)
63
+ return content;
64
+ return (_jsx(Paper, { elevation: 0, sx: {
65
+ width: '100%',
66
+ backgroundColor: alpha(theme.palette.scene.skyDark, 0.7),
67
+ backdropFilter: 'blur(10px)',
68
+ borderRadius: 2,
69
+ p: 2,
70
+ color: theme.palette.common.white,
71
+ border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`
72
+ }, children: content }));
73
+ };
74
+ //# sourceMappingURL=Legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Legend.js","sourceRoot":"","sources":["../../../src/components/controls/Legend.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAwCxE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC5C,OAAO,GAAG,SAAS,EACnB,YAAY,GAAG,KAAK,EACpB,SAAS,GAAG,KAAK,EAClB,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,QAAQ,GAAG,OAAO,KAAK,QAAQ,CAAC;IAEtC,2CAA2C;IAC3C,MAAM,KAAK,GAAiB,QAAQ;QAClC,CAAC,CAAC;YACE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE;YAC3F,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,SA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AmCd,CACP,CAAC,GACE,IACF,CACP,CAAC;IAEF,IAAI,YAAY;QAAE,OAAO,OAAO,CAAC;IAEjC,OAAO,CACL,KAAC,KAAK,IACJ,SAAS,EAAE,CAAC,EACZ,EAAE,EAAE;YACF,KAAK,EAAE,MAAM;YACb,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC;YACxD,cAAc,EAAE,YAAY;YAC5B,YAAY,EAAE,CAAC;YACf,CAAC,EAAE,CAAC;YACJ,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;YACjC,MAAM,EAAE,aAAa,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;SAC9D,YAEA,OAAO,GACF,CACT,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @file MobileBottomNav.tsx
3
+ * @description Bottom navigation bar for mobile view in the ASV visualizer. Allows switching between mapping and forces panels.
4
+ * @author Carson Fujita
5
+ * @license MIT
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @component MobileBottomNav
10
+ * @description Fixed bottom navigation bar for mobile view that allows switching between the Mapping and Forces tabs.
11
+ * @remarks
12
+ * This component renders a fixed bottom navigation bar that is visible on mobile devices. It allows users to switch between the Mapping and Forces panels in the ASV visualizer. The active tab is highlighted, and clicking on a tab dispatches an action to update the active scene in the Redux store.
13
+ * @example
14
+ * <MobileBottomNav />
15
+ */
16
+ export declare const MobileBottomNav: React.FC;
17
+ //# sourceMappingURL=MobileBottomNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileBottomNav.d.ts","sourceRoot":"","sources":["../../../src/components/controls/MobileBottomNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAA0B,MAAM,OAAO,CAAC;AAO/C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAsCnC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @file MobileBottomNav.tsx
4
+ * @description Bottom navigation bar for mobile view in the ASV visualizer. Allows switching between mapping and forces panels.
5
+ * @author Carson Fujita
6
+ * @license MIT
7
+ */
8
+ import React, { startTransition } from 'react';
9
+ import { Paper, BottomNavigation, BottomNavigationAction, useTheme } from '@mui/material';
10
+ import MapIcon from '@mui/icons-material/Map';
11
+ import SpeedIcon from '@mui/icons-material/Speed';
12
+ import { useAppSelector, useAppDispatch } from '../../store';
13
+ import { setActiveScene, selectActiveTabIndex, selectRegisteredScenes } from '../../store/slices/sceneSlice';
14
+ /**
15
+ * @component MobileBottomNav
16
+ * @description Fixed bottom navigation bar for mobile view that allows switching between the Mapping and Forces tabs.
17
+ * @remarks
18
+ * This component renders a fixed bottom navigation bar that is visible on mobile devices. It allows users to switch between the Mapping and Forces panels in the ASV visualizer. The active tab is highlighted, and clicking on a tab dispatches an action to update the active scene in the Redux store.
19
+ * @example
20
+ * <MobileBottomNav />
21
+ */
22
+ export const MobileBottomNav = () => {
23
+ const theme = useTheme();
24
+ const dispatch = useAppDispatch();
25
+ const activeTabIndex = useAppSelector(selectActiveTabIndex);
26
+ const scenes = useAppSelector(selectRegisteredScenes);
27
+ return (_jsx(Paper, { sx: {
28
+ position: 'fixed',
29
+ bottom: 0,
30
+ left: 0,
31
+ right: 0,
32
+ zIndex: 100,
33
+ borderRadius: 0,
34
+ borderTop: '1px solid',
35
+ borderColor: 'divider',
36
+ }, elevation: 3, children: _jsxs(BottomNavigation, { showLabels: true, value: activeTabIndex, onChange: (_, v) => {
37
+ const scene = scenes.find(s => s.tabIndex === v);
38
+ if (scene)
39
+ startTransition(() => { dispatch(setActiveScene(scene.id)); });
40
+ }, sx: {
41
+ bgcolor: theme.palette.scene.skyDark,
42
+ '& .Mui-selected': { color: `${theme.palette.water.highlight} !important` },
43
+ '& .MuiBottomNavigationAction-root': { color: theme.palette.gui.muted },
44
+ }, children: [_jsx(BottomNavigationAction, { label: "Mapping", icon: _jsx(MapIcon, {}) }), _jsx(BottomNavigationAction, { label: "Forces", icon: _jsx(SpeedIcon, {}) })] }) }));
45
+ };
46
+ //# sourceMappingURL=MobileBottomNav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileBottomNav.js","sourceRoot":"","sources":["../../../src/components/controls/MobileBottomNav.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE7G;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAa,GAAG,EAAE;IAC1C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;IAClC,MAAM,cAAc,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAEtD,OAAO,CACH,KAAC,KAAK,IACF,EAAE,EAAE;YACA,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,GAAG;YACX,YAAY,EAAE,CAAC;YACf,SAAS,EAAE,WAAW;YACtB,WAAW,EAAE,SAAS;SACzB,EACD,SAAS,EAAE,CAA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