@zendir/ui 0.5.0 → 0.6.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 (391) hide show
  1. package/CHANGELOG.md +419 -386
  2. package/README.md +640 -631
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/index.js +17 -221
  5. package/dist/react/3d/CesiumCaptureSource.d.ts +0 -1
  6. package/dist/react/3d/CesiumCaptureSource.js +364 -283
  7. package/dist/react/3d/CesiumCaptureSource.js.map +1 -1
  8. package/dist/react/3d/ZenSpace3D.d.ts +2 -3
  9. package/dist/react/3d/ZenSpace3D.js +1681 -1237
  10. package/dist/react/3d/ZenSpace3D.js.map +1 -1
  11. package/dist/react/3d/ZenSpace3DCesium.d.ts +0 -1
  12. package/dist/react/3d/ZenSpace3DCesium.js +513 -560
  13. package/dist/react/3d/ZenSpace3DCesium.js.map +1 -1
  14. package/dist/react/3d/ZenSpace3DShaders.js +61 -66
  15. package/dist/react/3d/ZenSpace3DShaders.js.map +1 -1
  16. package/dist/react/3d/ZenSpace3DTypes.d.ts +19 -20
  17. package/dist/react/3d/ZenSpace3DUtils.d.ts +0 -1
  18. package/dist/react/3d/ZenSpace3DUtils.js +37 -24
  19. package/dist/react/3d/ZenSpace3DUtils.js.map +1 -1
  20. package/dist/react/3d/capturePngAnalysis.js +42 -36
  21. package/dist/react/3d/capturePngAnalysis.js.map +1 -1
  22. package/dist/react/3d/index.d.ts +3 -3
  23. package/dist/react/3d/index.js +5 -53
  24. package/dist/react/3d/threeLoader.d.ts +1 -1
  25. package/dist/react/3d/threeLoader.js +23 -18
  26. package/dist/react/3d/threeLoader.js.map +1 -1
  27. package/dist/react/astro/ClassificationBanner.d.ts +2 -3
  28. package/dist/react/astro/ClassificationBanner.js +95 -79
  29. package/dist/react/astro/ClassificationBanner.js.map +1 -1
  30. package/dist/react/astro/GlobalStatusBar.d.ts +0 -1
  31. package/dist/react/astro/GlobalStatusBar.js +157 -163
  32. package/dist/react/astro/GlobalStatusBar.js.map +1 -1
  33. package/dist/react/astro/MissionClock.d.ts +7 -8
  34. package/dist/react/astro/MissionClock.js +377 -400
  35. package/dist/react/astro/MissionClock.js.map +1 -1
  36. package/dist/react/astro/MonitoringIcon.d.ts +1 -2
  37. package/dist/react/astro/MonitoringIcon.js +422 -358
  38. package/dist/react/astro/MonitoringIcon.js.map +1 -1
  39. package/dist/react/astro/Notification.d.ts +1 -2
  40. package/dist/react/astro/Notification.js +229 -126
  41. package/dist/react/astro/Notification.js.map +1 -1
  42. package/dist/react/astro/Progress.d.ts +0 -1
  43. package/dist/react/astro/Progress.js +199 -141
  44. package/dist/react/astro/Progress.js.map +1 -1
  45. package/dist/react/astro/SimulationControls.d.ts +3 -4
  46. package/dist/react/astro/SimulationControls.js +596 -650
  47. package/dist/react/astro/SimulationControls.js.map +1 -1
  48. package/dist/react/astro/StatusIndicator.d.ts +0 -1
  49. package/dist/react/astro/StatusIndicator.js +236 -170
  50. package/dist/react/astro/StatusIndicator.js.map +1 -1
  51. package/dist/react/astro/UnifiedTimeline.d.ts +9 -10
  52. package/dist/react/astro/UnifiedTimeline.js +2345 -2392
  53. package/dist/react/astro/UnifiedTimeline.js.map +1 -1
  54. package/dist/react/astro/index.d.ts +5 -5
  55. package/dist/react/astro/index.js +1 -25
  56. package/dist/react/cards/AccessCard.d.ts +0 -1
  57. package/dist/react/cards/AccessCard.js +471 -405
  58. package/dist/react/cards/AccessCard.js.map +1 -1
  59. package/dist/react/cards/OrbitCard.d.ts +0 -1
  60. package/dist/react/cards/OrbitCard.js +487 -364
  61. package/dist/react/cards/OrbitCard.js.map +1 -1
  62. package/dist/react/cards/SpacecraftCard.d.ts +0 -1
  63. package/dist/react/cards/SpacecraftCard.js +813 -925
  64. package/dist/react/cards/SpacecraftCard.js.map +1 -1
  65. package/dist/react/cards/TelemetryCard.d.ts +0 -1
  66. package/dist/react/cards/TelemetryCard.js +1055 -732
  67. package/dist/react/cards/TelemetryCard.js.map +1 -1
  68. package/dist/react/cards/TelemetryStreamCard.d.ts +0 -1
  69. package/dist/react/cards/TelemetryStreamCard.js +323 -297
  70. package/dist/react/cards/TelemetryStreamCard.js.map +1 -1
  71. package/dist/react/cards/index.d.ts +1 -1
  72. package/dist/react/cards/index.js +1 -8
  73. package/dist/react/charts/GroundTrackMap.d.ts +6 -7
  74. package/dist/react/charts/GroundTrackMap.js +1377 -1256
  75. package/dist/react/charts/GroundTrackMap.js.map +1 -1
  76. package/dist/react/charts/GroundTrackMapLeaflet.d.ts +1 -2
  77. package/dist/react/charts/GroundTrackMapLeaflet.js +1065 -987
  78. package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -1
  79. package/dist/react/charts/groundTrackMapLeafletTiles.js +34 -25
  80. package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -1
  81. package/dist/react/charts/groundTrackMapLeafletUtils.js +70 -61
  82. package/dist/react/charts/groundTrackMapLeafletUtils.js.map +1 -1
  83. package/dist/react/charts/index.d.ts +1 -1
  84. package/dist/react/charts/index.js +7 -100
  85. package/dist/react/charts/unified/AstroChart.d.ts +1 -2
  86. package/dist/react/charts/unified/AstroChart.js +1331 -1411
  87. package/dist/react/charts/unified/AstroChart.js.map +1 -1
  88. package/dist/react/charts/unified/PowerOverviewChart.d.ts +3 -3
  89. package/dist/react/charts/unified/PowerOverviewChart.js +495 -478
  90. package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -1
  91. package/dist/react/charts/unified/domain.d.ts +12 -13
  92. package/dist/react/charts/unified/domain.js +3999 -3145
  93. package/dist/react/charts/unified/domain.js.map +1 -1
  94. package/dist/react/charts/unified/generators.d.ts +3 -4
  95. package/dist/react/charts/unified/generators.js +561 -498
  96. package/dist/react/charts/unified/generators.js.map +1 -1
  97. package/dist/react/charts/unified/index.d.ts +1 -1
  98. package/dist/react/charts/unified/presets.d.ts +14 -15
  99. package/dist/react/charts/unified/presets.js +857 -994
  100. package/dist/react/charts/unified/presets.js.map +1 -1
  101. package/dist/react/charts/unified/sync.d.ts +2 -3
  102. package/dist/react/charts/unified/sync.js +229 -195
  103. package/dist/react/charts/unified/sync.js.map +1 -1
  104. package/dist/react/charts/unified/theme.d.ts +11 -12
  105. package/dist/react/charts/unified/theme.js +606 -642
  106. package/dist/react/charts/unified/theme.js.map +1 -1
  107. package/dist/react/charts/unified/types.d.ts +32 -33
  108. package/dist/react/charts/unified/useChartStream.d.ts +1 -2
  109. package/dist/react/charts/unified/useChartStream.js +203 -216
  110. package/dist/react/charts/unified/useChartStream.js.map +1 -1
  111. package/dist/react/chatgpt/AppCard.d.ts +1 -2
  112. package/dist/react/chatgpt/index.d.ts +7 -7
  113. package/dist/react/chatgpt/index.js +160 -139
  114. package/dist/react/chatgpt/index.js.map +1 -1
  115. package/dist/react/context/CategoryContext.d.ts +0 -1
  116. package/dist/react/context/CategoryContext.js +78 -29
  117. package/dist/react/context/CategoryContext.js.map +1 -1
  118. package/dist/react/context/DisplaySettingsContext.d.ts +1 -2
  119. package/dist/react/context/DisplaySettingsContext.js +205 -156
  120. package/dist/react/context/DisplaySettingsContext.js.map +1 -1
  121. package/dist/react/context/SpatialSelectionContext.d.ts +0 -1
  122. package/dist/react/context/SpatialSelectionContext.js +36 -7
  123. package/dist/react/context/SpatialSelectionContext.js.map +1 -1
  124. package/dist/react/core/data/DataTable.d.ts +3 -4
  125. package/dist/react/core/data/DataTable.js +473 -440
  126. package/dist/react/core/data/DataTable.js.map +1 -1
  127. package/dist/react/core/data/DataValue.d.ts +4 -5
  128. package/dist/react/core/data/DataValue.js +605 -571
  129. package/dist/react/core/data/DataValue.js.map +1 -1
  130. package/dist/react/core/data/propertyConfig.d.ts +1 -2
  131. package/dist/react/core/data/propertyConfig.js +446 -382
  132. package/dist/react/core/data/propertyConfig.js.map +1 -1
  133. package/dist/react/core/display/AstroIcon.d.ts +4 -5
  134. package/dist/react/core/display/AstroIcon.js +339 -429
  135. package/dist/react/core/display/AstroIcon.js.map +1 -1
  136. package/dist/react/core/display/Badge.d.ts +2 -3
  137. package/dist/react/core/display/Badge.js +131 -131
  138. package/dist/react/core/display/Badge.js.map +1 -1
  139. package/dist/react/core/display/CardHeader.d.ts +0 -1
  140. package/dist/react/core/display/CardHeader.js +398 -311
  141. package/dist/react/core/display/CardHeader.js.map +1 -1
  142. package/dist/react/core/display/Container.d.ts +2 -3
  143. package/dist/react/core/display/Container.js +640 -668
  144. package/dist/react/core/display/Container.js.map +1 -1
  145. package/dist/react/core/display/CopyButton.d.ts +1 -2
  146. package/dist/react/core/display/CopyButton.js +158 -101
  147. package/dist/react/core/display/CopyButton.js.map +1 -1
  148. package/dist/react/core/display/GlassCard.d.ts +3 -4
  149. package/dist/react/core/display/GlassCard.js +416 -369
  150. package/dist/react/core/display/GlassCard.js.map +1 -1
  151. package/dist/react/core/display/HeaderIconWithStatus.d.ts +0 -1
  152. package/dist/react/core/display/HeaderIconWithStatus.js +152 -152
  153. package/dist/react/core/display/HeaderIconWithStatus.js.map +1 -1
  154. package/dist/react/core/display/Icon.d.ts +2 -3
  155. package/dist/react/core/display/Icon.js +172 -143
  156. package/dist/react/core/display/Icon.js.map +1 -1
  157. package/dist/react/core/display/Typography.d.ts +24 -25
  158. package/dist/react/core/display/Typography.js +360 -178
  159. package/dist/react/core/display/Typography.js.map +1 -1
  160. package/dist/react/core/feedback/ConfirmDialog.d.ts +1 -2
  161. package/dist/react/core/feedback/ConfirmDialog.js +343 -304
  162. package/dist/react/core/feedback/ConfirmDialog.js.map +1 -1
  163. package/dist/react/core/feedback/Dialog.d.ts +2 -3
  164. package/dist/react/core/feedback/Dialog.js +189 -197
  165. package/dist/react/core/feedback/Dialog.js.map +1 -1
  166. package/dist/react/core/feedback/Toast.d.ts +2 -3
  167. package/dist/react/core/feedback/Toast.js +346 -207
  168. package/dist/react/core/feedback/Toast.js.map +1 -1
  169. package/dist/react/core/index.d.ts +26 -26
  170. package/dist/react/core/index.js +7 -119
  171. package/dist/react/core/inputs/Button.d.ts +2 -3
  172. package/dist/react/core/inputs/Button.js +281 -304
  173. package/dist/react/core/inputs/Button.js.map +1 -1
  174. package/dist/react/core/inputs/Checkbox.d.ts +2 -3
  175. package/dist/react/core/inputs/Checkbox.js +139 -127
  176. package/dist/react/core/inputs/Checkbox.js.map +1 -1
  177. package/dist/react/core/inputs/Input.d.ts +3 -4
  178. package/dist/react/core/inputs/Input.js +277 -285
  179. package/dist/react/core/inputs/Input.js.map +1 -1
  180. package/dist/react/core/inputs/LimitsBar.d.ts +1 -2
  181. package/dist/react/core/inputs/LimitsBar.js +271 -196
  182. package/dist/react/core/inputs/LimitsBar.js.map +1 -1
  183. package/dist/react/core/inputs/NumberInput.d.ts +2 -3
  184. package/dist/react/core/inputs/NumberInput.js +531 -503
  185. package/dist/react/core/inputs/NumberInput.js.map +1 -1
  186. package/dist/react/core/inputs/PinInput.d.ts +2 -3
  187. package/dist/react/core/inputs/PinInput.js +224 -207
  188. package/dist/react/core/inputs/PinInput.js.map +1 -1
  189. package/dist/react/core/inputs/Select.d.ts +1 -2
  190. package/dist/react/core/inputs/Select.js +298 -299
  191. package/dist/react/core/inputs/Select.js.map +1 -1
  192. package/dist/react/core/inputs/Toggle.d.ts +2 -3
  193. package/dist/react/core/inputs/Toggle.js +142 -148
  194. package/dist/react/core/inputs/Toggle.js.map +1 -1
  195. package/dist/react/core/layout/Box.d.ts +3 -4
  196. package/dist/react/core/layout/Box.js +118 -122
  197. package/dist/react/core/layout/Box.js.map +1 -1
  198. package/dist/react/core/layout/Center.d.ts +0 -1
  199. package/dist/react/core/layout/Center.js +45 -32
  200. package/dist/react/core/layout/Center.js.map +1 -1
  201. package/dist/react/core/layout/Divider.d.ts +1 -2
  202. package/dist/react/core/layout/Divider.js +112 -106
  203. package/dist/react/core/layout/Divider.js.map +1 -1
  204. package/dist/react/core/layout/Flex.d.ts +4 -5
  205. package/dist/react/core/layout/Flex.js +120 -124
  206. package/dist/react/core/layout/Flex.js.map +1 -1
  207. package/dist/react/core/layout/Grid.d.ts +5 -6
  208. package/dist/react/core/layout/Grid.js +131 -138
  209. package/dist/react/core/layout/Grid.js.map +1 -1
  210. package/dist/react/core/layout/Spacer.d.ts +0 -1
  211. package/dist/react/core/layout/Spacer.js +36 -29
  212. package/dist/react/core/layout/Spacer.js.map +1 -1
  213. package/dist/react/core/layout/Stack.d.ts +4 -5
  214. package/dist/react/core/layout/Stack.js +127 -70
  215. package/dist/react/core/layout/Stack.js.map +1 -1
  216. package/dist/react/core/layout/responsive.d.ts +1 -2
  217. package/dist/react/core/layout/responsive.js +25 -19
  218. package/dist/react/core/layout/responsive.js.map +1 -1
  219. package/dist/react/core/layout/useBreakpoint.d.ts +1 -1
  220. package/dist/react/core/layout/useBreakpoint.js +119 -66
  221. package/dist/react/core/layout/useBreakpoint.js.map +1 -1
  222. package/dist/react/core/navigation/AppBar.d.ts +1 -2
  223. package/dist/react/core/navigation/AppBar.js +827 -805
  224. package/dist/react/core/navigation/AppBar.js.map +1 -1
  225. package/dist/react/core/navigation/Pagination.d.ts +2 -3
  226. package/dist/react/core/navigation/Pagination.js +207 -187
  227. package/dist/react/core/navigation/Pagination.js.map +1 -1
  228. package/dist/react/core/navigation/SideNav.d.ts +5 -6
  229. package/dist/react/core/navigation/SideNav.js +855 -629
  230. package/dist/react/core/navigation/SideNav.js.map +1 -1
  231. package/dist/react/core/navigation/Tabs.d.ts +0 -1
  232. package/dist/react/core/navigation/Tabs.js +113 -119
  233. package/dist/react/core/navigation/Tabs.js.map +1 -1
  234. package/dist/react/core/overlays/Popover.d.ts +2 -3
  235. package/dist/react/core/overlays/Popover.js +303 -282
  236. package/dist/react/core/overlays/Popover.js.map +1 -1
  237. package/dist/react/core/overlays/SidePanel.d.ts +1 -2
  238. package/dist/react/core/overlays/SidePanel.js +217 -212
  239. package/dist/react/core/overlays/SidePanel.js.map +1 -1
  240. package/dist/react/core/overlays/Tooltip.d.ts +1 -2
  241. package/dist/react/core/overlays/Tooltip.js +170 -176
  242. package/dist/react/core/overlays/Tooltip.js.map +1 -1
  243. package/dist/react/core/widgets/ActivityPlanner.d.ts +0 -1
  244. package/dist/react/core/widgets/ActivityPlanner.js +855 -517
  245. package/dist/react/core/widgets/ActivityPlanner.js.map +1 -1
  246. package/dist/react/core/widgets/Capture.d.ts +2 -3
  247. package/dist/react/core/widgets/Capture.js +965 -779
  248. package/dist/react/core/widgets/Capture.js.map +1 -1
  249. package/dist/react/core/widgets/ChatPanel.d.ts +16 -17
  250. package/dist/react/core/widgets/ChatPanel.js +1734 -1034
  251. package/dist/react/core/widgets/ChatPanel.js.map +1 -1
  252. package/dist/react/core/widgets/ColorPickerPanel.d.ts +0 -1
  253. package/dist/react/core/widgets/ColorPickerPanel.js +298 -287
  254. package/dist/react/core/widgets/ColorPickerPanel.js.map +1 -1
  255. package/dist/react/core/widgets/CommandBuilder.d.ts +2 -3
  256. package/dist/react/core/widgets/CommandBuilder.js +624 -516
  257. package/dist/react/core/widgets/CommandBuilder.js.map +1 -1
  258. package/dist/react/core/widgets/ConnectionForm.d.ts +2 -3
  259. package/dist/react/core/widgets/ConnectionForm.js +528 -492
  260. package/dist/react/core/widgets/ConnectionForm.js.map +1 -1
  261. package/dist/react/core/widgets/FileExplorer.d.ts +3 -4
  262. package/dist/react/core/widgets/FileExplorer.js +617 -505
  263. package/dist/react/core/widgets/FileExplorer.js.map +1 -1
  264. package/dist/react/core/widgets/HexViewer.d.ts +2 -3
  265. package/dist/react/core/widgets/HexViewer.js +1353 -1091
  266. package/dist/react/core/widgets/HexViewer.js.map +1 -1
  267. package/dist/react/core/widgets/ImageFrame.d.ts +1 -2
  268. package/dist/react/core/widgets/ImageFrame.js +230 -193
  269. package/dist/react/core/widgets/ImageFrame.js.map +1 -1
  270. package/dist/react/core/widgets/ImageGallery.d.ts +2 -1
  271. package/dist/react/core/widgets/ImageGallery.js +380 -314
  272. package/dist/react/core/widgets/ImageGallery.js.map +1 -1
  273. package/dist/react/core/widgets/ImagePanel.d.ts +0 -1
  274. package/dist/react/core/widgets/ImagePanel.js +110 -101
  275. package/dist/react/core/widgets/ImagePanel.js.map +1 -1
  276. package/dist/react/core/widgets/LogViewer.d.ts +2 -3
  277. package/dist/react/core/widgets/LogViewer.js +711 -607
  278. package/dist/react/core/widgets/LogViewer.js.map +1 -1
  279. package/dist/react/core/widgets/MessageStream.d.ts +3 -4
  280. package/dist/react/core/widgets/MessageStream.js +514 -444
  281. package/dist/react/core/widgets/MessageStream.js.map +1 -1
  282. package/dist/react/core/widgets/MissionCalendar.d.ts +3 -4
  283. package/dist/react/core/widgets/MissionCalendar.js +1488 -1020
  284. package/dist/react/core/widgets/MissionCalendar.js.map +1 -1
  285. package/dist/react/core/widgets/PacketViewer.d.ts +2 -3
  286. package/dist/react/core/widgets/PacketViewer.js +550 -421
  287. package/dist/react/core/widgets/PacketViewer.js.map +1 -1
  288. package/dist/react/core/widgets/capture-placeholder.png.js +6 -5
  289. package/dist/react/core/widgets/capture-placeholder.png.js.map +1 -1
  290. package/dist/react/hooks/index.d.ts +5 -5
  291. package/dist/react/hooks/useAccessWindows.d.ts +0 -1
  292. package/dist/react/hooks/useCompactMode.d.ts +1 -1
  293. package/dist/react/hooks/useCompactMode.js +104 -58
  294. package/dist/react/hooks/useCompactMode.js.map +1 -1
  295. package/dist/react/hooks/useGroundTrackHistory.d.ts +0 -1
  296. package/dist/react/hooks/useSimulationScene.d.ts +1 -2
  297. package/dist/react/hooks/useSimulationScene.js +481 -374
  298. package/dist/react/hooks/useSimulationScene.js.map +1 -1
  299. package/dist/react/index.d.ts +3 -3
  300. package/dist/react/panels/LayerControlPanel.d.ts +1 -2
  301. package/dist/react/panels/LayerControlPanel.js +223 -180
  302. package/dist/react/panels/LayerControlPanel.js.map +1 -1
  303. package/dist/react/panels/ObjectInventoryPanel.d.ts +2 -3
  304. package/dist/react/panels/ObjectInventoryPanel.js +315 -250
  305. package/dist/react/panels/ObjectInventoryPanel.js.map +1 -1
  306. package/dist/react/panels/index.d.ts +1 -1
  307. package/dist/react/panels/index.js +1 -6
  308. package/dist/react/shared/ErrorBoundary.d.ts +1 -2
  309. package/dist/react/shared/ErrorBoundary.js +170 -139
  310. package/dist/react/shared/ErrorBoundary.js.map +1 -1
  311. package/dist/react/shared/Skeleton.d.ts +1 -2
  312. package/dist/react/shared/Skeleton.js +300 -301
  313. package/dist/react/shared/Skeleton.js.map +1 -1
  314. package/dist/react/theme/ThemeProvider.d.ts +2 -321
  315. package/dist/react/theme/ThemeProvider.js +313 -939
  316. package/dist/react/theme/ThemeProvider.js.map +1 -1
  317. package/dist/react/theme/cardAccent.d.ts +1 -2
  318. package/dist/react/theme/cardAccent.js +196 -126
  319. package/dist/react/theme/cardAccent.js.map +1 -1
  320. package/dist/react/theme/config.d.ts +0 -1
  321. package/dist/react/theme/config.js +47 -25
  322. package/dist/react/theme/config.js.map +1 -1
  323. package/dist/react/theme/index.d.ts +2 -2
  324. package/dist/react/theme/index.js +1 -16
  325. package/dist/react/theme/types.d.ts +332 -0
  326. package/dist/react/theme/types.js +39 -0
  327. package/dist/react/theme/types.js.map +1 -0
  328. package/dist/react/types.d.ts +8 -8
  329. package/dist/react/types.js +147 -47
  330. package/dist/react/types.js.map +1 -1
  331. package/dist/react/utils/categoryPalette.d.ts +0 -1
  332. package/dist/react/utils/categoryPalette.js +91 -102
  333. package/dist/react/utils/categoryPalette.js.map +1 -1
  334. package/dist/react/utils/index.d.ts +5 -5
  335. package/dist/react/utils/index.js +457 -371
  336. package/dist/react/utils/index.js.map +1 -1
  337. package/dist/react/visualizations/EclipseTimerCard.d.ts +0 -1
  338. package/dist/react/visualizations/LinkBudgetCard.d.ts +0 -1
  339. package/dist/react/visualizations/NavBallCard.d.ts +0 -1
  340. package/dist/react/visualizations/PropulsionCard.d.ts +1 -2
  341. package/dist/react/visualizations/SensorFootprintCard.d.ts +1 -2
  342. package/dist/react/visualizations/ThermalHeatmapCard.d.ts +0 -1
  343. package/dist/react/visualizations/index.d.ts +3 -3
  344. package/dist/react.d.ts +2 -1
  345. package/dist/react.js +17 -221
  346. package/dist/shaders/atmosphere.frag.js +6 -5
  347. package/dist/shaders/atmosphere.frag.js.map +1 -1
  348. package/dist/shaders/atmosphere.vert.js +6 -5
  349. package/dist/shaders/atmosphere.vert.js.map +1 -1
  350. package/dist/shaders/stars.frag.js +6 -5
  351. package/dist/shaders/stars.frag.js.map +1 -1
  352. package/dist/shaders/stars.vert.js +6 -5
  353. package/dist/shaders/stars.vert.js.map +1 -1
  354. package/dist/style.css +26 -3
  355. package/dist/tokens/core.d.ts +159 -0
  356. package/dist/tokens/core.js +144 -0
  357. package/dist/tokens/core.js.map +1 -0
  358. package/dist/tokens/css-vars.d.ts +213 -2
  359. package/dist/tokens/css-vars.js +590 -227
  360. package/dist/tokens/css-vars.js.map +1 -1
  361. package/dist/tokens/index.d.ts +31 -228
  362. package/dist/tokens/index.js +281 -366
  363. package/dist/tokens/index.js.map +1 -1
  364. package/dist/tokens/palettes/astro.d.ts +129 -0
  365. package/dist/tokens/palettes/astro.js +112 -0
  366. package/dist/tokens/palettes/astro.js.map +1 -0
  367. package/dist/tokens/palettes/index.d.ts +288 -0
  368. package/dist/tokens/palettes/index.js +35 -0
  369. package/dist/tokens/palettes/index.js.map +1 -0
  370. package/dist/tokens/palettes/tailwind.d.ts +324 -0
  371. package/dist/tokens/palettes/tailwind.js +201 -0
  372. package/dist/tokens/palettes/tailwind.js.map +1 -0
  373. package/dist/tokens/palettes/zendir.d.ts +126 -0
  374. package/dist/tokens/palettes/zendir.js +92 -0
  375. package/dist/tokens/palettes/zendir.js.map +1 -0
  376. package/dist/tokens/themes.d.ts +30 -0
  377. package/dist/tokens/themes.js +704 -0
  378. package/dist/tokens/themes.js.map +1 -0
  379. package/dist/tokens/tokens.css +533 -155
  380. package/dist/types/index.d.ts +2 -2
  381. package/package.json +310 -313
  382. package/dist/index.js.map +0 -1
  383. package/dist/react/3d/index.js.map +0 -1
  384. package/dist/react/astro/index.js.map +0 -1
  385. package/dist/react/cards/index.js.map +0 -1
  386. package/dist/react/charts/index.js.map +0 -1
  387. package/dist/react/core/index.js.map +0 -1
  388. package/dist/react/panels/index.js.map +0 -1
  389. package/dist/react/theme/astro-tokens.d.ts +0 -153
  390. package/dist/react/theme/index.js.map +0 -1
  391. package/dist/react.js.map +0 -1
@@ -1,668 +1,614 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { memo, useMemo, useCallback, useState } from "react";
3
1
  import { useTheme } from "../theme/ThemeProvider.js";
4
- import { tabularNumsStyle, safeAccentText, classNames } from "../utils/index.js";
5
- import { AstroIcon } from "../core/display/AstroIcon.js";
2
+ import { classNames, safeAccentText, tabularNumsStyle } from "../utils/index.js";
6
3
  import { Tooltip } from "../core/overlays/Tooltip.js";
7
- const DEFAULT_TIME_SCALE_PRESETS = [0.1, 0.25, 0.5, 1, 2, 5, 10, 60, 3600];
8
- const DEFAULT_STEP_SIZE_PRESETS = [1, 5, 10, 30, 60, 300, 600, 3600];
4
+ import { AstroIcon } from "../core/display/AstroIcon.js";
5
+ import { memo, useCallback, useMemo, useState } from "react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/react/astro/SimulationControls.tsx
8
+ /**
9
+ * @zendir/ui - SimulationControls Component
10
+ *
11
+ * Space operations simulation playback controls following Astro UX patterns.
12
+ * Provides play/pause/stop/step controls for simulation time management.
13
+ *
14
+ * Features:
15
+ * - Play/Pause toggle with visual state feedback
16
+ * - Stop (reset) functionality
17
+ * - Step forward/backward controls
18
+ * - Time scale (playback rate) adjustment
19
+ * - Simulation time display integration
20
+ * - AOS/LOS timer integration
21
+ * - Keyboard accessibility
22
+ * - AstroUXDS compliant styling
23
+ *
24
+ * Space Operations Terminology:
25
+ * - SIM: Simulation mode indicator
26
+ * - MET: Mission Elapsed Time
27
+ * - Epoch: Simulation start time (t=0)
28
+ * - Time Scale: Playback speed multiplier
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * import { SimulationControls } from '@zendir/ui/react';
33
+ *
34
+ * <SimulationControls
35
+ * isPlaying={isPlaying}
36
+ * onPlay={handlePlay}
37
+ * onPause={handlePause}
38
+ * onStop={handleStop}
39
+ * timeScale={1}
40
+ * onTimeScaleChange={setTimeScale}
41
+ * currentTime={simulationTime}
42
+ * epoch={epoch}
43
+ * />
44
+ * ```
45
+ */
46
+ var DEFAULT_TIME_SCALE_PRESETS = [
47
+ .1,
48
+ .25,
49
+ .5,
50
+ 1,
51
+ 2,
52
+ 5,
53
+ 10,
54
+ 60,
55
+ 3600
56
+ ];
57
+ var DEFAULT_STEP_SIZE_PRESETS = [
58
+ 1,
59
+ 5,
60
+ 10,
61
+ 30,
62
+ 60,
63
+ 300,
64
+ 600,
65
+ 3600
66
+ ];
67
+ /**
68
+ * Format elapsed time as DD:HH:MM:SS
69
+ */
9
70
  function formatElapsedTime(seconds) {
10
- const absSeconds = Math.abs(seconds);
11
- const days = Math.floor(absSeconds / 86400);
12
- const hours = Math.floor(absSeconds % 86400 / 3600);
13
- const mins = Math.floor(absSeconds % 3600 / 60);
14
- const secs = Math.floor(absSeconds % 60);
15
- const sign = seconds < 0 ? "-" : "";
16
- if (days > 0) {
17
- return `${sign}${days}:${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
18
- }
19
- return `${sign}${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
71
+ const absSeconds = Math.abs(seconds);
72
+ const days = Math.floor(absSeconds / 86400);
73
+ const hours = Math.floor(absSeconds % 86400 / 3600);
74
+ const mins = Math.floor(absSeconds % 3600 / 60);
75
+ const secs = Math.floor(absSeconds % 60);
76
+ const sign = seconds < 0 ? "-" : "";
77
+ if (days > 0) return `${sign}${days}:${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
78
+ return `${sign}${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
20
79
  }
80
+ /**
81
+ * Format time scale for display
82
+ */
21
83
  function formatTimeScale(scale) {
22
- if (scale >= 3600) return `${scale / 3600}h/s`;
23
- if (scale >= 60) return `${scale / 60}m/s`;
24
- if (scale === 1) return "1×";
25
- if (scale < 1) return `${scale}×`;
26
- return `${scale}×`;
84
+ if (scale >= 3600) return `${scale / 3600}h/s`;
85
+ if (scale >= 60) return `${scale / 60}m/s`;
86
+ if (scale === 1) return "1×";
87
+ if (scale < 1) return `${scale}×`;
88
+ return `${scale}×`;
27
89
  }
90
+ /**
91
+ * Format step size for display
92
+ */
28
93
  function formatStepSize(seconds) {
29
- if (seconds >= 3600) return `${seconds / 3600}h`;
30
- if (seconds >= 60) return `${seconds / 60}m`;
31
- return `${seconds}s`;
94
+ if (seconds >= 3600) return `${seconds / 3600}h`;
95
+ if (seconds >= 60) return `${seconds / 60}m`;
96
+ return `${seconds}s`;
32
97
  }
98
+ /**
99
+ * Format time for display
100
+ */
33
101
  function formatTimeDisplay(date) {
34
- const hours = date.getUTCHours().toString().padStart(2, "0");
35
- const mins = date.getUTCMinutes().toString().padStart(2, "0");
36
- const secs = date.getUTCSeconds().toString().padStart(2, "0");
37
- return `${hours}:${mins}:${secs}`;
102
+ return `${date.getUTCHours().toString().padStart(2, "0")}:${date.getUTCMinutes().toString().padStart(2, "0")}:${date.getUTCSeconds().toString().padStart(2, "0")}`;
38
103
  }
104
+ /**
105
+ * Format date for display
106
+ */
39
107
  function formatDateDisplay(date) {
40
- const year = date.getUTCFullYear();
41
- const month = (date.getUTCMonth() + 1).toString().padStart(2, "0");
42
- const day = date.getUTCDate().toString().padStart(2, "0");
43
- return `${year}-${month}-${day}`;
108
+ return `${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, "0")}-${date.getUTCDate().toString().padStart(2, "0")}`;
44
109
  }
45
- const ControlButton = memo(function ControlButton2({
46
- icon,
47
- label,
48
- onClick,
49
- active = false,
50
- disabled = false,
51
- danger = false,
52
- tokens,
53
- small = false
54
- }) {
55
- const size = small ? 28 : 32;
56
- const iconSize = small ? 14 : 16;
57
- const baseColor = danger ? tokens.colors.status.critical : active ? tokens.colors.status.normal : tokens.colors.text.primary;
58
- const bgColor = active ? `${tokens.colors.status.normal}25` : "rgba(255,255,255,0.14)";
59
- return /* @__PURE__ */ jsx(Tooltip, { content: label, placement: "bottom", children: /* @__PURE__ */ jsx(
60
- "button",
61
- {
62
- onClick,
63
- disabled,
64
- "aria-label": label,
65
- style: {
66
- display: "flex",
67
- alignItems: "center",
68
- justifyContent: "center",
69
- width: size,
70
- height: size,
71
- padding: 0,
72
- border: "none",
73
- borderRadius: tokens.borderRadius.md,
74
- backgroundColor: disabled ? "rgba(255,255,255,0.06)" : bgColor,
75
- color: disabled ? tokens.colors.text.tertiary : baseColor,
76
- cursor: disabled ? "not-allowed" : "pointer",
77
- transition: "all 0.15s ease",
78
- opacity: disabled ? 0.5 : 1
79
- },
80
- onMouseEnter: (e) => {
81
- if (!disabled) {
82
- e.currentTarget.style.backgroundColor = active ? `${tokens.colors.status.normal}35` : "rgba(255,255,255,0.22)";
83
- }
84
- },
85
- onMouseLeave: (e) => {
86
- if (!disabled) {
87
- e.currentTarget.style.backgroundColor = bgColor;
88
- }
89
- },
90
- children: /* @__PURE__ */ jsx(
91
- AstroIcon,
92
- {
93
- name: icon,
94
- size: iconSize,
95
- color: disabled ? tokens.colors.text.tertiary : baseColor
96
- }
97
- )
98
- }
99
- ) });
110
+ var ControlButton = memo(function ControlButton({ icon, label, onClick, active = false, disabled = false, danger = false, tokens, small = false }) {
111
+ const size = small ? 28 : 32;
112
+ const iconSize = small ? 14 : 16;
113
+ const baseColor = danger ? tokens.colors.status.critical : active ? tokens.colors.status.normal : tokens.colors.text.primary;
114
+ const bgColor = active ? `${tokens.colors.status.normal}25` : "rgba(255,255,255,0.14)";
115
+ return /* @__PURE__ */ jsx(Tooltip, {
116
+ content: label,
117
+ placement: "bottom",
118
+ children: /* @__PURE__ */ jsx("button", {
119
+ onClick,
120
+ disabled,
121
+ "aria-label": label,
122
+ style: {
123
+ display: "flex",
124
+ alignItems: "center",
125
+ justifyContent: "center",
126
+ width: size,
127
+ height: size,
128
+ padding: 0,
129
+ border: "none",
130
+ borderRadius: tokens.borderRadius.md,
131
+ backgroundColor: disabled ? "rgba(255,255,255,0.06)" : bgColor,
132
+ color: disabled ? tokens.colors.text.tertiary : baseColor,
133
+ cursor: disabled ? "not-allowed" : "pointer",
134
+ transition: "all 0.15s ease",
135
+ opacity: disabled ? .5 : 1
136
+ },
137
+ onMouseEnter: (e) => {
138
+ if (!disabled) e.currentTarget.style.backgroundColor = active ? `${tokens.colors.status.normal}35` : "rgba(255,255,255,0.22)";
139
+ },
140
+ onMouseLeave: (e) => {
141
+ if (!disabled) e.currentTarget.style.backgroundColor = bgColor;
142
+ },
143
+ children: /* @__PURE__ */ jsx(AstroIcon, {
144
+ name: icon,
145
+ size: iconSize,
146
+ color: disabled ? tokens.colors.text.tertiary : baseColor
147
+ })
148
+ })
149
+ });
100
150
  });
101
- const TimeScaleSelector = memo(function TimeScaleSelector2({
102
- value,
103
- presets,
104
- onChange,
105
- disabled = false,
106
- tokens,
107
- small = false
108
- }) {
109
- const [isOpen, setIsOpen] = useState(false);
110
- return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
111
- /* @__PURE__ */ jsx(Tooltip, { content: "Time Scale / Playback Speed", placement: "bottom", children: /* @__PURE__ */ jsxs(
112
- "button",
113
- {
114
- onClick: () => !disabled && setIsOpen(!isOpen),
115
- disabled,
116
- style: {
117
- display: "flex",
118
- alignItems: "center",
119
- gap: 4,
120
- padding: small ? "4px 8px" : "6px 10px",
121
- border: "none",
122
- borderRadius: tokens.borderRadius.sm,
123
- backgroundColor: "rgba(255,255,255,0.08)",
124
- color: value !== 1 ? tokens.colors.status.caution : tokens.colors.text.secondary,
125
- fontSize: small ? tokens.typography.fontSize.xxs : "0.6875rem",
126
- // 10px/11px in rem
127
- fontWeight: 700,
128
- // AstroUXDS bold for time display (critical info)
129
- fontFamily: tokens.typography.fontFamily.mono,
130
- cursor: disabled ? "not-allowed" : "pointer",
131
- transition: "all 0.15s ease",
132
- opacity: disabled ? 0.5 : 1,
133
- ...tabularNumsStyle
134
- },
135
- children: [
136
- /* @__PURE__ */ jsx(AstroIcon, { name: "fast-forward", size: small ? 10 : 12, color: "inherit" }),
137
- formatTimeScale(value)
138
- ]
139
- }
140
- ) }),
141
- isOpen && !disabled && /* @__PURE__ */ jsxs(Fragment, { children: [
142
- /* @__PURE__ */ jsx(
143
- "div",
144
- {
145
- style: {
146
- position: "fixed",
147
- inset: 0,
148
- zIndex: 99
149
- },
150
- onClick: () => setIsOpen(false)
151
- }
152
- ),
153
- /* @__PURE__ */ jsx(
154
- "div",
155
- {
156
- style: {
157
- position: "absolute",
158
- top: "100%",
159
- left: "50%",
160
- transform: "translateX(-50%)",
161
- marginTop: 4,
162
- padding: 4,
163
- backgroundColor: tokens.colors.background.elevated,
164
- border: `1px solid ${tokens.colors.border.default}`,
165
- borderRadius: tokens.borderRadius.md,
166
- boxShadow: tokens.shadows.lg,
167
- zIndex: 100,
168
- minWidth: 80
169
- },
170
- children: presets.map((scale) => /* @__PURE__ */ jsx(
171
- "button",
172
- {
173
- onClick: () => {
174
- onChange == null ? void 0 : onChange(scale);
175
- setIsOpen(false);
176
- },
177
- style: {
178
- display: "block",
179
- width: "100%",
180
- padding: "6px 12px",
181
- border: "none",
182
- borderRadius: tokens.borderRadius.sm,
183
- backgroundColor: value === scale ? tokens.colors.accent.primary : "transparent",
184
- color: value === scale ? "#ffffff" : tokens.colors.text.secondary,
185
- fontSize: "0.6875rem",
186
- // 11px in rem
187
- fontWeight: value === scale ? 500 : 400,
188
- // AstroUXDS: 500 (medium) not 600
189
- fontFamily: tokens.typography.fontFamily.mono,
190
- textAlign: "center",
191
- cursor: "pointer",
192
- transition: "all 0.1s ease",
193
- ...tabularNumsStyle
194
- },
195
- onMouseEnter: (e) => {
196
- if (value !== scale) {
197
- e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)";
198
- }
199
- },
200
- onMouseLeave: (e) => {
201
- e.currentTarget.style.backgroundColor = value === scale ? tokens.colors.accent.primary : "transparent";
202
- },
203
- children: formatTimeScale(scale)
204
- },
205
- scale
206
- ))
207
- }
208
- )
209
- ] })
210
- ] });
151
+ var TimeScaleSelector = memo(function TimeScaleSelector({ value, presets, onChange, disabled = false, tokens, small = false }) {
152
+ const [isOpen, setIsOpen] = useState(false);
153
+ return /* @__PURE__ */ jsxs("div", {
154
+ style: { position: "relative" },
155
+ children: [/* @__PURE__ */ jsx(Tooltip, {
156
+ content: "Time Scale / Playback Speed",
157
+ placement: "bottom",
158
+ children: /* @__PURE__ */ jsxs("button", {
159
+ onClick: () => !disabled && setIsOpen(!isOpen),
160
+ disabled,
161
+ style: {
162
+ display: "flex",
163
+ alignItems: "center",
164
+ gap: 4,
165
+ padding: small ? "4px 8px" : "6px 10px",
166
+ border: "none",
167
+ borderRadius: tokens.borderRadius.sm,
168
+ backgroundColor: "rgba(255,255,255,0.08)",
169
+ color: value !== 1 ? tokens.colors.status.caution : tokens.colors.text.secondary,
170
+ fontSize: small ? tokens.typography.fontSize.xxs : "0.6875rem",
171
+ fontWeight: 700,
172
+ fontFamily: tokens.typography.fontFamily.mono,
173
+ cursor: disabled ? "not-allowed" : "pointer",
174
+ transition: "all 0.15s ease",
175
+ opacity: disabled ? .5 : 1,
176
+ ...tabularNumsStyle
177
+ },
178
+ children: [/* @__PURE__ */ jsx(AstroIcon, {
179
+ name: "fast-forward",
180
+ size: small ? 10 : 12,
181
+ color: "inherit"
182
+ }), formatTimeScale(value)]
183
+ })
184
+ }), isOpen && !disabled && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
185
+ style: {
186
+ position: "fixed",
187
+ inset: 0,
188
+ zIndex: 99
189
+ },
190
+ onClick: () => setIsOpen(false)
191
+ }), /* @__PURE__ */ jsx("div", {
192
+ style: {
193
+ position: "absolute",
194
+ top: "100%",
195
+ left: "50%",
196
+ transform: "translateX(-50%)",
197
+ marginTop: 4,
198
+ padding: 4,
199
+ backgroundColor: tokens.colors.background.elevated,
200
+ border: `1px solid ${tokens.colors.border.default}`,
201
+ borderRadius: tokens.borderRadius.md,
202
+ boxShadow: tokens.shadows.lg,
203
+ zIndex: 100,
204
+ minWidth: 80
205
+ },
206
+ children: presets.map((scale) => /* @__PURE__ */ jsx("button", {
207
+ onClick: () => {
208
+ onChange?.(scale);
209
+ setIsOpen(false);
210
+ },
211
+ style: {
212
+ display: "block",
213
+ width: "100%",
214
+ padding: "6px 12px",
215
+ border: "none",
216
+ borderRadius: tokens.borderRadius.sm,
217
+ backgroundColor: value === scale ? tokens.colors.accent.primary : "transparent",
218
+ color: value === scale ? "#ffffff" : tokens.colors.text.secondary,
219
+ fontSize: "0.6875rem",
220
+ fontWeight: value === scale ? 500 : 400,
221
+ fontFamily: tokens.typography.fontFamily.mono,
222
+ textAlign: "center",
223
+ cursor: "pointer",
224
+ transition: "all 0.1s ease",
225
+ ...tabularNumsStyle
226
+ },
227
+ onMouseEnter: (e) => {
228
+ if (value !== scale) e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.1)";
229
+ },
230
+ onMouseLeave: (e) => {
231
+ e.currentTarget.style.backgroundColor = value === scale ? tokens.colors.accent.primary : "transparent";
232
+ },
233
+ children: formatTimeScale(scale)
234
+ }, scale))
235
+ })] })]
236
+ });
211
237
  });
212
- const SimulationTimeDisplay = memo(function SimulationTimeDisplay2({
213
- currentTime,
214
- elapsedSeconds,
215
- showElapsed = true,
216
- showCurrent = true,
217
- showDate = false,
218
- isPlaying = false,
219
- tokens,
220
- small = false
221
- }) {
222
- return /* @__PURE__ */ jsxs(
223
- "div",
224
- {
225
- style: {
226
- display: "flex",
227
- flexDirection: "column",
228
- alignItems: "center",
229
- gap: 2,
230
- padding: `${tokens.spacing.xs} ${tokens.spacing.sm}`
231
- },
232
- children: [
233
- showDate && currentTime && /* @__PURE__ */ jsx(
234
- "span",
235
- {
236
- style: {
237
- fontSize: tokens.typography.fontSize.xs,
238
- fontFamily: tokens.typography.fontFamily.mono,
239
- color: tokens.colors.text.tertiary,
240
- ...tabularNumsStyle
241
- },
242
- children: formatDateDisplay(currentTime)
243
- }
244
- ),
245
- showCurrent && currentTime && /* @__PURE__ */ jsx(
246
- "span",
247
- {
248
- style: {
249
- fontSize: small ? tokens.typography.fontSize.lg : tokens.typography.fontSize.xl,
250
- fontWeight: tokens.typography.fontWeight.bold,
251
- // Bold (700) to match MissionClock
252
- fontFamily: tokens.typography.fontFamily.mono,
253
- color: tokens.colors.text.primary,
254
- ...tabularNumsStyle
255
- },
256
- children: formatTimeDisplay(currentTime)
257
- }
258
- ),
259
- showElapsed && elapsedSeconds !== void 0 && /* @__PURE__ */ jsxs(
260
- "span",
261
- {
262
- style: {
263
- fontSize: tokens.typography.fontSize.sm,
264
- fontFamily: tokens.typography.fontFamily.mono,
265
- color: tokens.colors.status.caution,
266
- ...tabularNumsStyle
267
- },
268
- children: [
269
- "T",
270
- elapsedSeconds >= 0 ? "+" : "",
271
- formatElapsedTime(elapsedSeconds)
272
- ]
273
- }
274
- ),
275
- /* @__PURE__ */ jsxs(
276
- "span",
277
- {
278
- style: {
279
- fontSize: tokens.typography.fontSize.xs,
280
- fontWeight: tokens.typography.fontWeight.medium,
281
- color: isPlaying ? safeAccentText(tokens.colors.accent.primary) : tokens.colors.status.standby,
282
- textTransform: "uppercase",
283
- letterSpacing: tokens.typography.letterSpacing.wide,
284
- display: "flex",
285
- alignItems: "center",
286
- gap: 4
287
- },
288
- children: [
289
- isPlaying && /* @__PURE__ */ jsx(
290
- "span",
291
- {
292
- style: {
293
- width: 6,
294
- height: 6,
295
- borderRadius: "50%",
296
- backgroundColor: tokens.colors.accent.primary,
297
- animation: "pulse 1.5s ease-in-out infinite"
298
- }
299
- }
300
- ),
301
- "SIM"
302
- ]
303
- }
304
- )
305
- ]
306
- }
307
- );
238
+ var SimulationTimeDisplay = memo(function SimulationTimeDisplay({ currentTime, elapsedSeconds, showElapsed = true, showCurrent = true, showDate = false, isPlaying = false, tokens, small = false }) {
239
+ return /* @__PURE__ */ jsxs("div", {
240
+ style: {
241
+ display: "flex",
242
+ flexDirection: "column",
243
+ alignItems: "center",
244
+ gap: 2,
245
+ padding: `${tokens.spacing.xs} ${tokens.spacing.sm}`
246
+ },
247
+ children: [
248
+ showDate && currentTime && /* @__PURE__ */ jsx("span", {
249
+ style: {
250
+ fontSize: tokens.typography.fontSize.xs,
251
+ fontFamily: tokens.typography.fontFamily.mono,
252
+ color: tokens.colors.text.tertiary,
253
+ ...tabularNumsStyle
254
+ },
255
+ children: formatDateDisplay(currentTime)
256
+ }),
257
+ showCurrent && currentTime && /* @__PURE__ */ jsx("span", {
258
+ style: {
259
+ fontSize: small ? tokens.typography.fontSize.lg : tokens.typography.fontSize.xl,
260
+ fontWeight: tokens.typography.fontWeight.bold,
261
+ fontFamily: tokens.typography.fontFamily.mono,
262
+ color: tokens.colors.text.primary,
263
+ ...tabularNumsStyle
264
+ },
265
+ children: formatTimeDisplay(currentTime)
266
+ }),
267
+ showElapsed && elapsedSeconds !== void 0 && /* @__PURE__ */ jsxs("span", {
268
+ style: {
269
+ fontSize: tokens.typography.fontSize.sm,
270
+ fontFamily: tokens.typography.fontFamily.mono,
271
+ color: tokens.colors.status.caution,
272
+ ...tabularNumsStyle
273
+ },
274
+ children: [
275
+ "T",
276
+ elapsedSeconds >= 0 ? "+" : "",
277
+ formatElapsedTime(elapsedSeconds)
278
+ ]
279
+ }),
280
+ /* @__PURE__ */ jsxs("span", {
281
+ style: {
282
+ fontSize: tokens.typography.fontSize.xs,
283
+ fontWeight: tokens.typography.fontWeight.medium,
284
+ color: isPlaying ? safeAccentText(tokens.colors.accent.primary) : tokens.colors.status.standby,
285
+ textTransform: "uppercase",
286
+ letterSpacing: tokens.typography.letterSpacing.wide,
287
+ display: "flex",
288
+ alignItems: "center",
289
+ gap: 4
290
+ },
291
+ children: [isPlaying && /* @__PURE__ */ jsx("span", { style: {
292
+ width: 6,
293
+ height: 6,
294
+ borderRadius: "50%",
295
+ backgroundColor: tokens.colors.accent.primary,
296
+ animation: "pulse 1.5s ease-in-out infinite"
297
+ } }), "SIM"]
298
+ })
299
+ ]
300
+ });
308
301
  });
309
- const SimulationControls = memo(function SimulationControls2({
310
- state,
311
- isPlaying: isPlayingProp,
312
- isPaused,
313
- onPlay,
314
- onPause,
315
- onStop,
316
- onStepForward,
317
- onStepBackward,
318
- currentTime: currentTimeProp,
319
- epoch,
320
- elapsedSeconds: elapsedSecondsProp,
321
- showElapsedTime = true,
322
- showCurrentTime = true,
323
- showDate = true,
324
- timeScale = 1,
325
- onTimeScaleChange,
326
- timeScalePresets = DEFAULT_TIME_SCALE_PRESETS,
327
- showTimeScale = true,
328
- stepSize = 60,
329
- onStepSizeChange: _onStepSizeChange,
330
- stepSizePresets: _stepSizePresets = DEFAULT_STEP_SIZE_PRESETS,
331
- showStepControls = true,
332
- compact = false,
333
- small = false,
334
- className = "",
335
- disabled = false,
336
- showStatus = true,
337
- label
338
- }) {
339
- const { tokens, theme } = useTheme();
340
- const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
341
- const isPlaying = useMemo(() => {
342
- if (state) return state === "playing";
343
- return isPlayingProp ?? false;
344
- }, [state, isPlayingProp]);
345
- const isStopped = useMemo(() => {
346
- if (state) return state === "stopped";
347
- return !isPlayingProp && !isPaused;
348
- }, [state, isPlayingProp, isPaused]);
349
- const currentTime = useMemo(() => {
350
- if (!currentTimeProp) return void 0;
351
- return typeof currentTimeProp === "string" ? new Date(currentTimeProp) : currentTimeProp;
352
- }, [currentTimeProp]);
353
- const elapsedSeconds = useMemo(() => {
354
- if (elapsedSecondsProp !== void 0) return elapsedSecondsProp;
355
- if (currentTime && epoch) {
356
- const epochDate = typeof epoch === "string" ? new Date(epoch) : epoch;
357
- return (currentTime.getTime() - epochDate.getTime()) / 1e3;
358
- }
359
- return void 0;
360
- }, [elapsedSecondsProp, currentTime, epoch]);
361
- const handlePlayPause = useCallback(() => {
362
- if (isPlaying) {
363
- onPause == null ? void 0 : onPause();
364
- } else {
365
- onPlay == null ? void 0 : onPlay();
366
- }
367
- }, [isPlaying, onPlay, onPause]);
368
- const handleKeyDown = useCallback((e) => {
369
- if (disabled) return;
370
- switch (e.key) {
371
- case " ":
372
- e.preventDefault();
373
- handlePlayPause();
374
- break;
375
- case "Escape":
376
- e.preventDefault();
377
- onStop == null ? void 0 : onStop();
378
- break;
379
- case "ArrowRight":
380
- e.preventDefault();
381
- onStepForward == null ? void 0 : onStepForward();
382
- break;
383
- case "ArrowLeft":
384
- e.preventDefault();
385
- onStepBackward == null ? void 0 : onStepBackward();
386
- break;
387
- }
388
- }, [disabled, handlePlayPause, onStop, onStepForward, onStepBackward]);
389
- return /* @__PURE__ */ jsxs(
390
- "div",
391
- {
392
- className: classNames("zendir-simulation-controls", className),
393
- role: "group",
394
- "aria-label": label || "Simulation Controls",
395
- onKeyDown: handleKeyDown,
396
- tabIndex: 0,
397
- style: {
398
- display: "flex",
399
- alignItems: "center",
400
- gap: compact ? tokens.spacing.sm : tokens.spacing.md,
401
- padding: compact ? `${tokens.spacing.xs} ${tokens.spacing.sm}` : `${tokens.spacing.sm} ${tokens.spacing.md}`,
402
- backgroundColor: isTransparentTheme ? "rgba(0,0,0,0.3)" : tokens.colors.background.surface,
403
- ...isTransparentTheme && {
404
- backdropFilter: "blur(12px)",
405
- WebkitBackdropFilter: "blur(12px)"
406
- },
407
- ...tokens.colors.border.cardStyle ?? { border: `1px solid ${tokens.colors.border.muted}` },
408
- borderRadius: tokens.borderRadius.lg,
409
- outline: "none",
410
- transition: tokens.animation.fast
411
- },
412
- children: [
413
- (showCurrentTime || showElapsedTime) && !compact && /* @__PURE__ */ jsx(
414
- SimulationTimeDisplay,
415
- {
416
- currentTime,
417
- elapsedSeconds,
418
- showElapsed: showElapsedTime,
419
- showCurrent: showCurrentTime,
420
- showDate,
421
- isPlaying,
422
- tokens,
423
- small
424
- }
425
- ),
426
- compact && currentTime && /* @__PURE__ */ jsxs(
427
- "div",
428
- {
429
- style: {
430
- display: "flex",
431
- alignItems: "center",
432
- gap: 8
433
- },
434
- children: [
435
- showDate && /* @__PURE__ */ jsx(
436
- "span",
437
- {
438
- style: {
439
- fontSize: tokens.typography.fontSize.xs,
440
- fontFamily: tokens.typography.fontFamily.mono,
441
- color: tokens.colors.text.tertiary,
442
- ...tabularNumsStyle
443
- },
444
- children: formatDateDisplay(currentTime)
445
- }
446
- ),
447
- /* @__PURE__ */ jsx(
448
- "span",
449
- {
450
- style: {
451
- fontSize: tokens.typography.fontSize.lg,
452
- fontWeight: tokens.typography.fontWeight.bold,
453
- // Bold (700) to match MissionClock
454
- fontFamily: tokens.typography.fontFamily.mono,
455
- color: tokens.colors.text.primary,
456
- ...tabularNumsStyle
457
- },
458
- children: formatTimeDisplay(currentTime)
459
- }
460
- ),
461
- showStatus && /* @__PURE__ */ jsxs(
462
- "span",
463
- {
464
- style: {
465
- fontSize: tokens.typography.fontSize.xs,
466
- fontWeight: tokens.typography.fontWeight.medium,
467
- color: isPlaying ? safeAccentText(tokens.colors.accent.primary) : tokens.colors.status.standby,
468
- textTransform: "uppercase",
469
- display: "flex",
470
- alignItems: "center",
471
- gap: 4
472
- },
473
- children: [
474
- isPlaying && /* @__PURE__ */ jsx(
475
- "span",
476
- {
477
- style: {
478
- width: 6,
479
- height: 6,
480
- borderRadius: "50%",
481
- backgroundColor: tokens.colors.accent.primary
482
- }
483
- }
484
- ),
485
- "SIM"
486
- ]
487
- }
488
- )
489
- ]
490
- }
491
- ),
492
- (showCurrentTime || showElapsedTime || compact && currentTime) && /* @__PURE__ */ jsx(
493
- "div",
494
- {
495
- style: {
496
- width: 1,
497
- height: 24,
498
- backgroundColor: tokens.colors.border.muted
499
- }
500
- }
501
- ),
502
- /* @__PURE__ */ jsxs(
503
- "div",
504
- {
505
- style: {
506
- display: "flex",
507
- alignItems: "center",
508
- gap: 4
509
- },
510
- children: [
511
- showStepControls && /* @__PURE__ */ jsx(
512
- ControlButton,
513
- {
514
- icon: "skip-previous",
515
- label: `Step backward ${formatStepSize(stepSize)}`,
516
- onClick: onStepBackward,
517
- disabled: disabled || !onStepBackward,
518
- tokens,
519
- small
520
- }
521
- ),
522
- /* @__PURE__ */ jsx(
523
- ControlButton,
524
- {
525
- icon: "stop",
526
- label: "Stop / Reset",
527
- onClick: onStop,
528
- disabled: disabled || !onStop,
529
- danger: !isStopped,
530
- tokens,
531
- small
532
- }
533
- ),
534
- /* @__PURE__ */ jsx(Tooltip, { content: isPlaying ? "Pause (Space)" : "Play (Space)", placement: "bottom", children: /* @__PURE__ */ jsx(
535
- "button",
536
- {
537
- onClick: handlePlayPause,
538
- disabled,
539
- "aria-label": isPlaying ? "Pause simulation" : "Play simulation",
540
- style: {
541
- display: "flex",
542
- alignItems: "center",
543
- justifyContent: "center",
544
- width: small ? 36 : 44,
545
- height: small ? 36 : 44,
546
- padding: 0,
547
- border: isPlaying ? `2px solid ${tokens.colors.accent.primary}` : "none",
548
- borderRadius: "50%",
549
- // Use accent primary for both states - playing has outline style
550
- backgroundColor: isPlaying ? "rgba(138, 43, 226, 0.15)" : tokens.colors.accent.primary,
551
- color: isPlaying ? safeAccentText(tokens.colors.accent.primary) : "#ffffff",
552
- cursor: disabled ? "not-allowed" : "pointer",
553
- transition: "all 0.15s ease",
554
- opacity: disabled ? 0.5 : 1,
555
- boxShadow: isPlaying ? `0 0 16px ${tokens.colors.accent.primary}50` : `0 0 8px ${tokens.colors.accent.primary}40`
556
- },
557
- onMouseEnter: (e) => {
558
- if (!disabled) {
559
- e.currentTarget.style.transform = "scale(1.05)";
560
- }
561
- },
562
- onMouseLeave: (e) => {
563
- e.currentTarget.style.transform = "scale(1)";
564
- },
565
- children: /* @__PURE__ */ jsx(
566
- AstroIcon,
567
- {
568
- name: isPlaying ? "pause" : "play-arrow",
569
- size: small ? 18 : 22,
570
- color: isPlaying ? tokens.colors.accent.primary : "#ffffff"
571
- }
572
- )
573
- }
574
- ) }),
575
- showStepControls && /* @__PURE__ */ jsx(
576
- ControlButton,
577
- {
578
- icon: "skip-next",
579
- label: `Step forward ${formatStepSize(stepSize)}`,
580
- onClick: onStepForward,
581
- disabled: disabled || !onStepForward,
582
- tokens,
583
- small
584
- }
585
- )
586
- ]
587
- }
588
- ),
589
- showTimeScale && /* @__PURE__ */ jsxs(Fragment, { children: [
590
- /* @__PURE__ */ jsx(
591
- "div",
592
- {
593
- style: {
594
- width: 1,
595
- height: 24,
596
- backgroundColor: tokens.colors.border.muted
597
- }
598
- }
599
- ),
600
- /* @__PURE__ */ jsx(
601
- TimeScaleSelector,
602
- {
603
- value: timeScale,
604
- presets: timeScalePresets,
605
- onChange: onTimeScaleChange,
606
- disabled: disabled || !onTimeScaleChange,
607
- tokens,
608
- small
609
- }
610
- )
611
- ] })
612
- ]
613
- }
614
- );
302
+ /**
303
+ * SimulationControls - Playback controls for space simulation
304
+ *
305
+ * Provides comprehensive simulation time control following Astro UX patterns.
306
+ * Designed for mission control and space operations applications.
307
+ *
308
+ * @example
309
+ * ```tsx
310
+ * // Basic usage
311
+ * <SimulationControls
312
+ * isPlaying={isPlaying}
313
+ * onPlay={() => setIsPlaying(true)}
314
+ * onPause={() => setIsPlaying(false)}
315
+ * onStop={handleReset}
316
+ * />
317
+ *
318
+ * // Full featured
319
+ * <SimulationControls
320
+ * isPlaying={isPlaying}
321
+ * onPlay={handlePlay}
322
+ * onPause={handlePause}
323
+ * onStop={handleStop}
324
+ * onStepForward={handleStepForward}
325
+ * onStepBackward={handleStepBackward}
326
+ * currentTime={simulationTime}
327
+ * epoch={epoch}
328
+ * elapsedSeconds={elapsed}
329
+ * timeScale={timeScale}
330
+ * onTimeScaleChange={setTimeScale}
331
+ * showTimeScale
332
+ * showStepControls
333
+ * showElapsedTime
334
+ * />
335
+ *
336
+ * // In AppBar center slot
337
+ * <AppBar
338
+ * appName="Mission Control"
339
+ * centerSlot={
340
+ * <SimulationControls
341
+ * compact
342
+ * isPlaying={isPlaying}
343
+ * onPlay={handlePlay}
344
+ * onPause={handlePause}
345
+ * currentTime={simTime}
346
+ * />
347
+ * }
348
+ * />
349
+ * ```
350
+ */
351
+ var SimulationControls = memo(function SimulationControls({ state, isPlaying: isPlayingProp, isPaused, onPlay, onPause, onStop, onStepForward, onStepBackward, currentTime: currentTimeProp, epoch, elapsedSeconds: elapsedSecondsProp, showElapsedTime = true, showCurrentTime = true, showDate = true, timeScale = 1, onTimeScaleChange, timeScalePresets = DEFAULT_TIME_SCALE_PRESETS, showTimeScale = true, stepSize = 60, onStepSizeChange: _onStepSizeChange, stepSizePresets: _stepSizePresets = DEFAULT_STEP_SIZE_PRESETS, showStepControls = true, compact = false, small = false, className = "", disabled = false, showStatus = true, label }) {
352
+ const { tokens, theme } = useTheme();
353
+ const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
354
+ const isPlaying = useMemo(() => {
355
+ if (state) return state === "playing";
356
+ return isPlayingProp ?? false;
357
+ }, [state, isPlayingProp]);
358
+ const isStopped = useMemo(() => {
359
+ if (state) return state === "stopped";
360
+ return !isPlayingProp && !isPaused;
361
+ }, [
362
+ state,
363
+ isPlayingProp,
364
+ isPaused
365
+ ]);
366
+ const currentTime = useMemo(() => {
367
+ if (!currentTimeProp) return void 0;
368
+ return typeof currentTimeProp === "string" ? new Date(currentTimeProp) : currentTimeProp;
369
+ }, [currentTimeProp]);
370
+ const elapsedSeconds = useMemo(() => {
371
+ if (elapsedSecondsProp !== void 0) return elapsedSecondsProp;
372
+ if (currentTime && epoch) {
373
+ const epochDate = typeof epoch === "string" ? new Date(epoch) : epoch;
374
+ return (currentTime.getTime() - epochDate.getTime()) / 1e3;
375
+ }
376
+ }, [
377
+ elapsedSecondsProp,
378
+ currentTime,
379
+ epoch
380
+ ]);
381
+ const handlePlayPause = useCallback(() => {
382
+ if (isPlaying) onPause?.();
383
+ else onPlay?.();
384
+ }, [
385
+ isPlaying,
386
+ onPlay,
387
+ onPause
388
+ ]);
389
+ const handleKeyDown = useCallback((e) => {
390
+ if (disabled) return;
391
+ switch (e.key) {
392
+ case " ":
393
+ e.preventDefault();
394
+ handlePlayPause();
395
+ break;
396
+ case "Escape":
397
+ e.preventDefault();
398
+ onStop?.();
399
+ break;
400
+ case "ArrowRight":
401
+ e.preventDefault();
402
+ onStepForward?.();
403
+ break;
404
+ case "ArrowLeft":
405
+ e.preventDefault();
406
+ onStepBackward?.();
407
+ break;
408
+ }
409
+ }, [
410
+ disabled,
411
+ handlePlayPause,
412
+ onStop,
413
+ onStepForward,
414
+ onStepBackward
415
+ ]);
416
+ return /* @__PURE__ */ jsxs("div", {
417
+ className: classNames("zendir-simulation-controls", className),
418
+ role: "group",
419
+ "aria-label": label || "Simulation Controls",
420
+ onKeyDown: handleKeyDown,
421
+ tabIndex: 0,
422
+ style: {
423
+ display: "flex",
424
+ alignItems: "center",
425
+ gap: compact ? tokens.spacing.sm : tokens.spacing.md,
426
+ padding: compact ? `${tokens.spacing.xs} ${tokens.spacing.sm}` : `${tokens.spacing.sm} ${tokens.spacing.md}`,
427
+ backgroundColor: isTransparentTheme ? "rgba(0,0,0,0.3)" : tokens.colors.background.surface,
428
+ ...isTransparentTheme && {
429
+ backdropFilter: "blur(12px)",
430
+ WebkitBackdropFilter: "blur(12px)"
431
+ },
432
+ ...tokens.colors.border.cardStyle ?? { border: `1px solid ${tokens.colors.border.muted}` },
433
+ borderRadius: tokens.borderRadius.lg,
434
+ outline: "none",
435
+ transition: tokens.animation.fast
436
+ },
437
+ children: [
438
+ (showCurrentTime || showElapsedTime) && !compact && /* @__PURE__ */ jsx(SimulationTimeDisplay, {
439
+ currentTime,
440
+ elapsedSeconds,
441
+ showElapsed: showElapsedTime,
442
+ showCurrent: showCurrentTime,
443
+ showDate,
444
+ isPlaying,
445
+ tokens,
446
+ small
447
+ }),
448
+ compact && currentTime && /* @__PURE__ */ jsxs("div", {
449
+ style: {
450
+ display: "flex",
451
+ alignItems: "center",
452
+ gap: 8
453
+ },
454
+ children: [
455
+ showDate && /* @__PURE__ */ jsx("span", {
456
+ style: {
457
+ fontSize: tokens.typography.fontSize.xs,
458
+ fontFamily: tokens.typography.fontFamily.mono,
459
+ color: tokens.colors.text.tertiary,
460
+ ...tabularNumsStyle
461
+ },
462
+ children: formatDateDisplay(currentTime)
463
+ }),
464
+ /* @__PURE__ */ jsx("span", {
465
+ style: {
466
+ fontSize: tokens.typography.fontSize.lg,
467
+ fontWeight: tokens.typography.fontWeight.bold,
468
+ fontFamily: tokens.typography.fontFamily.mono,
469
+ color: tokens.colors.text.primary,
470
+ ...tabularNumsStyle
471
+ },
472
+ children: formatTimeDisplay(currentTime)
473
+ }),
474
+ showStatus && /* @__PURE__ */ jsxs("span", {
475
+ style: {
476
+ fontSize: tokens.typography.fontSize.xs,
477
+ fontWeight: tokens.typography.fontWeight.medium,
478
+ color: isPlaying ? safeAccentText(tokens.colors.accent.primary) : tokens.colors.status.standby,
479
+ textTransform: "uppercase",
480
+ display: "flex",
481
+ alignItems: "center",
482
+ gap: 4
483
+ },
484
+ children: [isPlaying && /* @__PURE__ */ jsx("span", { style: {
485
+ width: 6,
486
+ height: 6,
487
+ borderRadius: "50%",
488
+ backgroundColor: tokens.colors.accent.primary
489
+ } }), "SIM"]
490
+ })
491
+ ]
492
+ }),
493
+ (showCurrentTime || showElapsedTime || compact && currentTime) && /* @__PURE__ */ jsx("div", { style: {
494
+ width: 1,
495
+ height: 24,
496
+ backgroundColor: tokens.colors.border.muted
497
+ } }),
498
+ /* @__PURE__ */ jsxs("div", {
499
+ style: {
500
+ display: "flex",
501
+ alignItems: "center",
502
+ gap: 4
503
+ },
504
+ children: [
505
+ showStepControls && /* @__PURE__ */ jsx(ControlButton, {
506
+ icon: "skip-previous",
507
+ label: `Step backward ${formatStepSize(stepSize)}`,
508
+ onClick: onStepBackward,
509
+ disabled: disabled || !onStepBackward,
510
+ tokens,
511
+ small
512
+ }),
513
+ /* @__PURE__ */ jsx(ControlButton, {
514
+ icon: "stop",
515
+ label: "Stop / Reset",
516
+ onClick: onStop,
517
+ disabled: disabled || !onStop,
518
+ danger: !isStopped,
519
+ tokens,
520
+ small
521
+ }),
522
+ /* @__PURE__ */ jsx(Tooltip, {
523
+ content: isPlaying ? "Pause (Space)" : "Play (Space)",
524
+ placement: "bottom",
525
+ children: /* @__PURE__ */ jsx("button", {
526
+ onClick: handlePlayPause,
527
+ disabled,
528
+ "aria-label": isPlaying ? "Pause simulation" : "Play simulation",
529
+ style: {
530
+ display: "flex",
531
+ alignItems: "center",
532
+ justifyContent: "center",
533
+ width: small ? 36 : 44,
534
+ height: small ? 36 : 44,
535
+ padding: 0,
536
+ border: isPlaying ? `2px solid ${tokens.colors.accent.primary}` : "none",
537
+ borderRadius: "50%",
538
+ backgroundColor: isPlaying ? "rgba(138, 43, 226, 0.15)" : tokens.colors.accent.primary,
539
+ color: isPlaying ? safeAccentText(tokens.colors.accent.primary) : "#ffffff",
540
+ cursor: disabled ? "not-allowed" : "pointer",
541
+ transition: "all 0.15s ease",
542
+ opacity: disabled ? .5 : 1,
543
+ boxShadow: isPlaying ? `0 0 16px ${tokens.colors.accent.primary}50` : `0 0 8px ${tokens.colors.accent.primary}40`
544
+ },
545
+ onMouseEnter: (e) => {
546
+ if (!disabled) e.currentTarget.style.transform = "scale(1.05)";
547
+ },
548
+ onMouseLeave: (e) => {
549
+ e.currentTarget.style.transform = "scale(1)";
550
+ },
551
+ children: /* @__PURE__ */ jsx(AstroIcon, {
552
+ name: isPlaying ? "pause" : "play-arrow",
553
+ size: small ? 18 : 22,
554
+ color: isPlaying ? tokens.colors.accent.primary : "#ffffff"
555
+ })
556
+ })
557
+ }),
558
+ showStepControls && /* @__PURE__ */ jsx(ControlButton, {
559
+ icon: "skip-next",
560
+ label: `Step forward ${formatStepSize(stepSize)}`,
561
+ onClick: onStepForward,
562
+ disabled: disabled || !onStepForward,
563
+ tokens,
564
+ small
565
+ })
566
+ ]
567
+ }),
568
+ showTimeScale && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { style: {
569
+ width: 1,
570
+ height: 24,
571
+ backgroundColor: tokens.colors.border.muted
572
+ } }), /* @__PURE__ */ jsx(TimeScaleSelector, {
573
+ value: timeScale,
574
+ presets: timeScalePresets,
575
+ onChange: onTimeScaleChange,
576
+ disabled: disabled || !onTimeScaleChange,
577
+ tokens,
578
+ small
579
+ })] })
580
+ ]
581
+ });
615
582
  });
616
- const MiniSimulationControls = memo(function MiniSimulationControls2({
617
- isPlaying = false,
618
- onPlay,
619
- onPause,
620
- onStop,
621
- timeScale = 1,
622
- onTimeScaleChange,
623
- disabled = false,
624
- className = ""
625
- }) {
626
- return /* @__PURE__ */ jsx(
627
- SimulationControls,
628
- {
629
- isPlaying,
630
- onPlay,
631
- onPause,
632
- onStop,
633
- timeScale,
634
- onTimeScaleChange,
635
- disabled,
636
- compact: true,
637
- small: true,
638
- showCurrentTime: false,
639
- showElapsedTime: false,
640
- showDate: false,
641
- showStepControls: false,
642
- showTimeScale: Boolean(onTimeScaleChange),
643
- className
644
- }
645
- );
583
+ var MiniSimulationControls = memo(function MiniSimulationControls({ isPlaying = false, onPlay, onPause, onStop, timeScale = 1, onTimeScaleChange, disabled = false, className = "" }) {
584
+ return /* @__PURE__ */ jsx(SimulationControls, {
585
+ isPlaying,
586
+ onPlay,
587
+ onPause,
588
+ onStop,
589
+ timeScale,
590
+ onTimeScaleChange,
591
+ disabled,
592
+ compact: true,
593
+ small: true,
594
+ showCurrentTime: false,
595
+ showElapsedTime: false,
596
+ showDate: false,
597
+ showStepControls: false,
598
+ showTimeScale: Boolean(onTimeScaleChange),
599
+ className
600
+ });
646
601
  });
647
- const SimulationControlsWithClock = memo(function SimulationControlsWithClock2({
648
- clockFormat: _clockFormat = "24h",
649
- timezone = "SIM",
650
- ...props
651
- }) {
652
- return /* @__PURE__ */ jsx(
653
- SimulationControls,
654
- {
655
- ...props,
656
- showCurrentTime: true,
657
- showElapsedTime: true,
658
- showDate: true,
659
- label: `Simulation Controls - ${timezone}`
660
- }
661
- );
602
+ var SimulationControlsWithClock = memo(function SimulationControlsWithClock({ clockFormat: _clockFormat = "24h", timezone = "SIM", ...props }) {
603
+ return /* @__PURE__ */ jsx(SimulationControls, {
604
+ ...props,
605
+ showCurrentTime: true,
606
+ showElapsedTime: true,
607
+ showDate: true,
608
+ label: `Simulation Controls - ${timezone}`
609
+ });
662
610
  });
663
- export {
664
- MiniSimulationControls,
665
- SimulationControls,
666
- SimulationControlsWithClock
667
- };
668
- //# sourceMappingURL=SimulationControls.js.map
611
+ //#endregion
612
+ export { MiniSimulationControls, SimulationControls, SimulationControls as default, SimulationControlsWithClock };
613
+
614
+ //# sourceMappingURL=SimulationControls.js.map