@zendir/ui 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/CHANGELOG.md +20 -0
  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 +312 -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 +217 -194
  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 +419 -41
  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,372 +1,495 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { memo, useMemo } from "react";
3
- import { estimateOrbitalPeriod, estimateOrbitalVelocity } from "../types.js";
4
1
  import { useTheme } from "../theme/ThemeProvider.js";
5
2
  import { Icon } from "../core/display/Icon.js";
3
+ import { classNames, formatAltitude, formatCoordinate, formatDegrees, formatDuration, formatTime, formatVelocity, safeAccentText } from "../utils/index.js";
6
4
  import { AstroIcon } from "../core/display/AstroIcon.js";
7
5
  import { CardHeader } from "../core/display/CardHeader.js";
8
- import { classNames, formatAltitude, safeAccentText, formatVelocity, formatDegrees, formatDuration, formatCoordinate, formatTime } from "../utils/index.js";
9
6
  import { useCompactMode } from "../hooks/useCompactMode.js";
7
+ import { estimateOrbitalPeriod, estimateOrbitalVelocity } from "../types.js";
8
+ import { memo, useMemo } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ //#region src/react/cards/OrbitCard.tsx
11
+ /**
12
+ * @zendir/ui - OrbitCard Component
13
+ *
14
+ * Enterprise-grade orbital parameters display card.
15
+ *
16
+ * AstroUXDS Compliance:
17
+ * - Orbit type colors use Zendir-Astro data viz palette (categorical, not status)
18
+ * - Tabular numbers for orbital data display
19
+ * - Sentence-case labels per Tier 3 compliance
20
+ *
21
+ * Features:
22
+ * - Full null-safety with graceful fallbacks
23
+ * - WCAG 2.1 AA accessibility
24
+ * - Computed orbital parameters (period, velocity)
25
+ * - Orbit type classification with Zendir-branded color coding
26
+ * - Loading and empty states
27
+ */
28
+ /**
29
+ * Get orbit type info with Zendir-branded colors
30
+ * Uses AstroUXDS data visualization palette for orbit classification
31
+ */
10
32
  function getOrbitTypeInfo(orbitType) {
11
- const types = {
12
- LEO: { color: "#3E3CFF", description: "Low Earth Orbit (200-2,000 km)" },
13
- // Zendir Electric
14
- MEO: { color: "#3548C0", description: "Medium Earth Orbit (2,000-35,786 km)" },
15
- // Zendir Prussian Blue Light
16
- GEO: { color: "#9D70FF", description: "Geostationary Orbit (~35,786 km)" },
17
- // Zendir Purple
18
- HEO: { color: "#1B2DA0", description: "Highly Elliptical Orbit" },
19
- // Zendir Prussian Blue
20
- SSO: { color: "#B48DFF", description: "Sun-Synchronous Orbit" },
21
- // Zendir Purple Light
22
- POLAR: { color: "#6B69FF", description: "Polar Orbit" },
23
- // Zendir Electric Light
24
- MOLNIYA: { color: "#C9A8FF", description: "Molniya Orbit (12h period)" }
25
- // Zendir Purple Lighter
26
- };
27
- return types[(orbitType == null ? void 0 : orbitType.toUpperCase()) ?? ""] ?? { color: "#a4abb6", description: "Unknown orbit type" };
33
+ return {
34
+ LEO: {
35
+ color: "#3E3CFF",
36
+ description: "Low Earth Orbit (200-2,000 km)"
37
+ },
38
+ MEO: {
39
+ color: "#3548C0",
40
+ description: "Medium Earth Orbit (2,000-35,786 km)"
41
+ },
42
+ GEO: {
43
+ color: "#9D70FF",
44
+ description: "Geostationary Orbit (~35,786 km)"
45
+ },
46
+ HEO: {
47
+ color: "#1B2DA0",
48
+ description: "Highly Elliptical Orbit"
49
+ },
50
+ SSO: {
51
+ color: "#B48DFF",
52
+ description: "Sun-Synchronous Orbit"
53
+ },
54
+ POLAR: {
55
+ color: "#6B69FF",
56
+ description: "Polar Orbit"
57
+ },
58
+ MOLNIYA: {
59
+ color: "#C9A8FF",
60
+ description: "Molniya Orbit (12h period)"
61
+ }
62
+ }[orbitType?.toUpperCase() ?? ""] ?? {
63
+ color: "#a4abb6",
64
+ description: "Unknown orbit type"
65
+ };
28
66
  }
29
- const OrbitCard = memo(function OrbitCard2({
30
- spacecraft,
31
- showComputed = true,
32
- loading = false,
33
- className = "",
34
- compact = false,
35
- defaultExpanded = false,
36
- onPinChange
37
- }) {
38
- const { tokens, theme, prefersReducedMotion } = useTheme();
39
- const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
40
- const isBoldVariant = theme === "transparent-bold";
41
- const isMinimalVariant = theme === "transparent-minimal";
42
- const useGlassMode = isBoldVariant || isMinimalVariant;
43
- const glassAccentColor = tokens.colors.accent.primary;
44
- const glassAccentMuted = `${glassAccentColor}66`;
45
- const cardBg = isTransparentTheme ? "transparent" : tokens.colors.background.surface;
46
- const cardGlass = isTransparentTheme ? {
47
- backdropFilter: "blur(12px)",
48
- WebkitBackdropFilter: "blur(12px)"
49
- } : {};
50
- const glassContainerStyle = useGlassMode ? {
51
- backgroundColor: "rgba(10, 15, 25, 0.35)",
52
- backdropFilter: "blur(12px)",
53
- WebkitBackdropFilter: "blur(12px)",
54
- border: `1px solid ${glassAccentMuted}`,
55
- borderTop: isBoldVariant ? `2px solid ${glassAccentColor}` : `1px solid ${glassAccentColor}`
56
- } : {};
57
- const { expanded, isPinned, handlers, transitionDuration } = useCompactMode({
58
- compact,
59
- defaultExpanded,
60
- onPinChange
61
- });
62
- const orbitInfo = useMemo(() => getOrbitTypeInfo(spacecraft == null ? void 0 : spacecraft.orbitType), [spacecraft == null ? void 0 : spacecraft.orbitType]);
63
- const computedPeriod = useMemo(() => {
64
- if (!(spacecraft == null ? void 0 : spacecraft.altitude)) return null;
65
- try {
66
- return estimateOrbitalPeriod(spacecraft.altitude);
67
- } catch {
68
- return null;
69
- }
70
- }, [spacecraft == null ? void 0 : spacecraft.altitude]);
71
- const computedVelocity = useMemo(() => {
72
- if (!(spacecraft == null ? void 0 : spacecraft.altitude)) return null;
73
- try {
74
- return estimateOrbitalVelocity(spacecraft.altitude);
75
- } catch {
76
- return null;
77
- }
78
- }, [spacecraft == null ? void 0 : spacecraft.altitude]);
79
- if (loading) {
80
- return /* @__PURE__ */ jsxs(
81
- "div",
82
- {
83
- className: classNames("zendir-orbit-card", "loading", className),
84
- role: "article",
85
- "aria-busy": "true",
86
- "aria-label": "Loading orbit data",
87
- style: {
88
- backgroundColor: cardBg,
89
- ...cardGlass,
90
- ...tokens.colors.border.cardStyle ?? {},
91
- borderRadius: tokens.borderRadius.lg,
92
- padding: tokens.spacing.md,
93
- minHeight: 200
94
- },
95
- children: [
96
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, marginBottom: 20 }, children: [
97
- /* @__PURE__ */ jsx("div", { style: { width: 40, height: 40, borderRadius: 8, backgroundColor: "rgba(255,255,255,0.1)" } }),
98
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
99
- /* @__PURE__ */ jsx("div", { style: { height: 18, width: "50%", backgroundColor: "rgba(255,255,255,0.1)", borderRadius: 4 } }),
100
- /* @__PURE__ */ jsx("div", { style: { height: 12, width: "70%", backgroundColor: "rgba(255,255,255,0.06)", borderRadius: 4, marginTop: 6 } })
101
- ] })
102
- ] }),
103
- /* @__PURE__ */ jsx("div", { style: { display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: 16 }, children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxs("div", { children: [
104
- /* @__PURE__ */ jsx("div", { style: { height: 10, width: "40%", backgroundColor: "rgba(255,255,255,0.06)", borderRadius: 2 } }),
105
- /* @__PURE__ */ jsx("div", { style: { height: 20, width: "60%", backgroundColor: "rgba(255,255,255,0.1)", borderRadius: 4, marginTop: 4 } })
106
- ] }, i)) })
107
- ]
108
- }
109
- );
110
- }
111
- if (!spacecraft) {
112
- return /* @__PURE__ */ jsxs(
113
- "div",
114
- {
115
- className: classNames("zendir-orbit-card", "empty", className),
116
- role: "article",
117
- "aria-label": "No orbit data",
118
- style: {
119
- backgroundColor: cardBg,
120
- ...cardGlass,
121
- ...tokens.colors.border.cardStyleDashed ?? {},
122
- borderRadius: tokens.borderRadius.lg,
123
- padding: tokens.spacing.lg,
124
- textAlign: "center",
125
- color: tokens.colors.text.tertiary
126
- },
127
- children: [
128
- /* @__PURE__ */ jsxs("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "currentColor", style: { opacity: 0.5, marginBottom: 8 }, children: [
129
- /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" }),
130
- /* @__PURE__ */ jsx("ellipse", { cx: "12", cy: "12", rx: "10", ry: "4", fill: "none", stroke: "currentColor", strokeWidth: "1", strokeDasharray: "3,3" })
131
- ] }),
132
- /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: tokens.typography.body[2].fontSize }, children: "No orbit data available" })
133
- ]
134
- }
135
- );
136
- }
137
- if (compact && !expanded) {
138
- return /* @__PURE__ */ jsxs(
139
- "article",
140
- {
141
- className: classNames("zendir-orbit-card", "compact", className),
142
- ...handlers,
143
- "aria-label": `Orbit: ${spacecraft.orbitType ?? "Unknown"} (compact)`,
144
- style: {
145
- position: "relative",
146
- overflow: "hidden",
147
- ...useGlassMode ? glassContainerStyle : {
148
- backgroundColor: cardBg,
149
- ...cardGlass,
150
- ...tokens.colors.border.cardStyle ?? {}
151
- },
152
- borderRadius: tokens.borderRadius.lg,
153
- padding: `${tokens.spacing.sm} ${tokens.spacing.md}`,
154
- fontFamily: tokens.typography.fontFamily.primary,
155
- color: tokens.colors.text.primary,
156
- fontSize: tokens.typography.fontSize.sm,
157
- cursor: "pointer",
158
- transition: `all ${transitionDuration} ease-out`,
159
- transform: "scale(1)"
160
- },
161
- onMouseEnter: (e) => {
162
- handlers.onMouseEnter();
163
- if (!prefersReducedMotion) {
164
- e.currentTarget.style.transform = "scale(1.01)";
165
- e.currentTarget.style.boxShadow = `0 4px 12px ${orbitInfo.color}20`;
166
- }
167
- },
168
- onMouseLeave: (e) => {
169
- handlers.onMouseLeave();
170
- e.currentTarget.style.transform = "scale(1)";
171
- e.currentTarget.style.boxShadow = "";
172
- },
173
- children: [
174
- useGlassMode && /* @__PURE__ */ jsx(
175
- "div",
176
- {
177
- style: {
178
- position: "absolute",
179
- inset: 0,
180
- background: "linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",
181
- pointerEvents: "none",
182
- zIndex: 0
183
- }
184
- }
185
- ),
186
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: tokens.spacing.md, position: "relative", zIndex: 1 }, children: [
187
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.sm, flex: 1, minWidth: 0 }, children: [
188
- /* @__PURE__ */ jsx(AstroIcon, { name: "360", size: 16, color: orbitInfo.color }),
189
- /* @__PURE__ */ jsx("span", { style: {
190
- fontWeight: tokens.typography.fontWeight.medium,
191
- color: useGlassMode ? glassAccentColor : void 0,
192
- textShadow: useGlassMode ? `0 0 16px ${glassAccentMuted}` : void 0
193
- }, children: "Orbit" }),
194
- useGlassMode && /* @__PURE__ */ jsx("div", { style: {
195
- flex: 1,
196
- height: isBoldVariant ? "2px" : "1px",
197
- minWidth: 20,
198
- background: `linear-gradient(90deg, ${glassAccentColor} 0%, ${glassAccentMuted} 60%, transparent 100%)`,
199
- boxShadow: isBoldVariant ? `0 0 8px ${glassAccentMuted}` : void 0
200
- } })
201
- ] }),
202
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.sm, flexShrink: 0 }, children: [
203
- /* @__PURE__ */ jsx(
204
- "span",
205
- {
206
- style: {
207
- backgroundColor: `${orbitInfo.color}20`,
208
- color: orbitInfo.color,
209
- padding: `2px 6px`,
210
- borderRadius: tokens.borderRadius.sm,
211
- fontSize: tokens.typography.fontSize.xs,
212
- fontWeight: tokens.typography.fontWeight.medium
213
- },
214
- children: spacecraft.orbitType ?? "—"
215
- }
216
- ),
217
- /* @__PURE__ */ jsx("span", { style: {
218
- fontVariantNumeric: "tabular-nums",
219
- fontFamily: tokens.typography.fontFamily.mono,
220
- fontSize: tokens.typography.fontSize.xs
221
- }, children: formatAltitude(spacecraft.altitude) }),
222
- isPinned && /* @__PURE__ */ jsx(Icon, { name: "lock", size: 12, color: tokens.colors.accent.primary })
223
- ] })
224
- ] })
225
- ]
226
- }
227
- );
228
- }
229
- const labelStyle = {
230
- color: tokens.colors.text.secondary,
231
- // WCAG AA compliant - 4.5:1 contrast
232
- fontSize: tokens.typography.fontSize.xs,
233
- fontWeight: tokens.typography.fontWeight.medium
234
- };
235
- const valueStyle = {
236
- color: tokens.colors.text.primary,
237
- fontWeight: tokens.typography.fontWeight.medium,
238
- fontFamily: tokens.typography.fontFamily.mono,
239
- fontVariantNumeric: "tabular-nums",
240
- fontSize: tokens.typography.fontSize.md,
241
- marginTop: 2
242
- };
243
- return /* @__PURE__ */ jsxs(
244
- "article",
245
- {
246
- className: classNames("zendir-orbit-card", compact ? "expanded" : "", className),
247
- ...compact ? handlers : {},
248
- role: compact ? handlers.role : "article",
249
- tabIndex: compact ? handlers.tabIndex : void 0,
250
- "aria-expanded": compact ? handlers["aria-expanded"] : void 0,
251
- "aria-label": `Orbit data for ${spacecraft.name ?? spacecraft.id}`,
252
- style: {
253
- position: "relative",
254
- overflow: "hidden",
255
- ...useGlassMode ? glassContainerStyle : {
256
- backgroundColor: cardBg,
257
- ...cardGlass,
258
- ...tokens.colors.border.cardStyle ?? {}
259
- },
260
- borderRadius: tokens.borderRadius.lg,
261
- padding: tokens.spacing.md,
262
- fontFamily: tokens.typography.fontFamily.primary,
263
- cursor: compact ? "pointer" : void 0,
264
- transition: compact ? `all ${transitionDuration} ease-out` : void 0,
265
- color: tokens.colors.text.primary,
266
- fontSize: tokens.typography.fontSize.sm
267
- },
268
- children: [
269
- useGlassMode && /* @__PURE__ */ jsx(
270
- "div",
271
- {
272
- style: {
273
- position: "absolute",
274
- inset: 0,
275
- background: "linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",
276
- pointerEvents: "none",
277
- zIndex: 0
278
- }
279
- }
280
- ),
281
- /* @__PURE__ */ jsx(
282
- CardHeader,
283
- {
284
- icon: "360",
285
- title: spacecraft.name ?? spacecraft.id ?? "Unknown",
286
- subtitle: orbitInfo.description,
287
- badge: spacecraft.orbitType ?? "ORBIT",
288
- badgeColor: orbitInfo.color,
289
- iconColor: orbitInfo.color,
290
- hideStatusIndicator: true
291
- }
292
- ),
293
- /* @__PURE__ */ jsx("section", { "aria-label": "Orbital parameters", children: /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: tokens.spacing.md }, children: [
294
- /* @__PURE__ */ jsxs("div", { children: [
295
- /* @__PURE__ */ jsx("span", { style: labelStyle, children: "Altitude" }),
296
- /* @__PURE__ */ jsx("div", { style: { ...valueStyle, color: safeAccentText(tokens.colors.accent.primary) }, children: formatAltitude(spacecraft.altitude) })
297
- ] }),
298
- /* @__PURE__ */ jsxs("div", { children: [
299
- /* @__PURE__ */ jsx("span", { style: labelStyle, children: "Velocity" }),
300
- /* @__PURE__ */ jsx("div", { style: valueStyle, children: spacecraft.velocity ? formatVelocity(spacecraft.velocity) : computedVelocity ? formatVelocity(computedVelocity) : "-- km/s" })
301
- ] }),
302
- spacecraft.inclination !== void 0 && /* @__PURE__ */ jsxs("div", { children: [
303
- /* @__PURE__ */ jsx("span", { style: labelStyle, children: "Inclination" }),
304
- /* @__PURE__ */ jsx("div", { style: valueStyle, children: formatDegrees(spacecraft.inclination) })
305
- ] }),
306
- showComputed && computedPeriod !== null && /* @__PURE__ */ jsxs("div", { children: [
307
- /* @__PURE__ */ jsx("span", { style: labelStyle, children: "Period" }),
308
- /* @__PURE__ */ jsx("div", { style: valueStyle, children: formatDuration(computedPeriod) })
309
- ] })
310
- ] }) }),
311
- /* @__PURE__ */ jsxs(
312
- "section",
313
- {
314
- style: {
315
- marginTop: tokens.spacing.lg,
316
- paddingTop: tokens.spacing.lg,
317
- borderTop: `1px solid ${tokens.colors.border.muted}`
318
- },
319
- "aria-label": "Current position",
320
- children: [
321
- /* @__PURE__ */ jsxs(
322
- "h4",
323
- {
324
- style: {
325
- margin: `0 0 ${tokens.spacing.sm} 0`,
326
- ...labelStyle,
327
- display: "flex",
328
- alignItems: "center",
329
- gap: 4
330
- },
331
- children: [
332
- /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z" }) }),
333
- "Current Position"
334
- ]
335
- }
336
- ),
337
- /* @__PURE__ */ jsxs("div", { style: { display: "grid", gridTemplateColumns: "repeat(2, 1fr)", gap: tokens.spacing.md }, children: [
338
- /* @__PURE__ */ jsxs("div", { children: [
339
- /* @__PURE__ */ jsx("span", { style: labelStyle, children: "Latitude" }),
340
- /* @__PURE__ */ jsx("div", { style: valueStyle, children: formatCoordinate(spacecraft.latitude, "lat") })
341
- ] }),
342
- /* @__PURE__ */ jsxs("div", { children: [
343
- /* @__PURE__ */ jsx("span", { style: labelStyle, children: "Longitude" }),
344
- /* @__PURE__ */ jsx("div", { style: valueStyle, children: formatCoordinate(spacecraft.longitude, "lon") })
345
- ] })
346
- ] })
347
- ]
348
- }
349
- ),
350
- spacecraft.timestamp && /* @__PURE__ */ jsx(
351
- "footer",
352
- {
353
- style: {
354
- marginTop: tokens.spacing.md,
355
- fontSize: tokens.typography.fontSize.xs,
356
- color: tokens.colors.text.tertiary,
357
- textAlign: "right"
358
- },
359
- children: /* @__PURE__ */ jsxs("time", { dateTime: spacecraft.timestamp, children: [
360
- formatTime(spacecraft.timestamp),
361
- " UTC"
362
- ] })
363
- }
364
- )
365
- ]
366
- }
367
- );
67
+ /**
68
+ * OrbitCard - Displays spacecraft orbital parameters
69
+ *
70
+ * @example
71
+ * ```tsx
72
+ * <OrbitCard
73
+ * spacecraft={spacecraftData}
74
+ * showComputed
75
+ * />
76
+ * ```
77
+ */
78
+ var OrbitCard = memo(function OrbitCard({ spacecraft, showComputed = true, loading = false, className = "", compact = false, defaultExpanded = false, onPinChange }) {
79
+ const { tokens, theme, prefersReducedMotion } = useTheme();
80
+ const isTransparentTheme = theme === "transparent" || theme === "transparent-bold" || theme === "transparent-minimal";
81
+ const isBoldVariant = theme === "transparent-bold";
82
+ const useGlassMode = isBoldVariant || theme === "transparent-minimal";
83
+ const glassAccentColor = tokens.colors.accent.primary;
84
+ const glassAccentMuted = `${glassAccentColor}66`;
85
+ const cardBg = isTransparentTheme ? "transparent" : tokens.colors.background.surface;
86
+ const cardGlass = isTransparentTheme ? {
87
+ backdropFilter: "blur(12px)",
88
+ WebkitBackdropFilter: "blur(12px)"
89
+ } : {};
90
+ const glassContainerStyle = useGlassMode ? {
91
+ backgroundColor: "rgba(10, 15, 25, 0.35)",
92
+ backdropFilter: "blur(12px)",
93
+ WebkitBackdropFilter: "blur(12px)",
94
+ border: `1px solid ${glassAccentMuted}`,
95
+ borderTop: isBoldVariant ? `2px solid ${glassAccentColor}` : `1px solid ${glassAccentColor}`
96
+ } : {};
97
+ const { expanded, isPinned, handlers, transitionDuration } = useCompactMode({
98
+ compact,
99
+ defaultExpanded,
100
+ onPinChange
101
+ });
102
+ const orbitInfo = useMemo(() => getOrbitTypeInfo(spacecraft?.orbitType), [spacecraft?.orbitType]);
103
+ const computedPeriod = useMemo(() => {
104
+ if (!spacecraft?.altitude) return null;
105
+ try {
106
+ return estimateOrbitalPeriod(spacecraft.altitude);
107
+ } catch {
108
+ return null;
109
+ }
110
+ }, [spacecraft?.altitude]);
111
+ const computedVelocity = useMemo(() => {
112
+ if (!spacecraft?.altitude) return null;
113
+ try {
114
+ return estimateOrbitalVelocity(spacecraft.altitude);
115
+ } catch {
116
+ return null;
117
+ }
118
+ }, [spacecraft?.altitude]);
119
+ if (loading) return /* @__PURE__ */ jsxs("div", {
120
+ className: classNames("zendir-orbit-card", "loading", className),
121
+ role: "article",
122
+ "aria-busy": "true",
123
+ "aria-label": "Loading orbit data",
124
+ style: {
125
+ backgroundColor: cardBg,
126
+ ...cardGlass,
127
+ ...tokens.colors.border.cardStyle ?? {},
128
+ borderRadius: tokens.borderRadius.lg,
129
+ padding: tokens.spacing.md,
130
+ minHeight: 200
131
+ },
132
+ children: [/* @__PURE__ */ jsxs("div", {
133
+ style: {
134
+ display: "flex",
135
+ alignItems: "center",
136
+ gap: 12,
137
+ marginBottom: 20
138
+ },
139
+ children: [/* @__PURE__ */ jsx("div", { style: {
140
+ width: 40,
141
+ height: 40,
142
+ borderRadius: 8,
143
+ backgroundColor: "rgba(255,255,255,0.1)"
144
+ } }), /* @__PURE__ */ jsxs("div", {
145
+ style: { flex: 1 },
146
+ children: [/* @__PURE__ */ jsx("div", { style: {
147
+ height: 18,
148
+ width: "50%",
149
+ backgroundColor: "rgba(255,255,255,0.1)",
150
+ borderRadius: 4
151
+ } }), /* @__PURE__ */ jsx("div", { style: {
152
+ height: 12,
153
+ width: "70%",
154
+ backgroundColor: "rgba(255,255,255,0.06)",
155
+ borderRadius: 4,
156
+ marginTop: 6
157
+ } })]
158
+ })]
159
+ }), /* @__PURE__ */ jsx("div", {
160
+ style: {
161
+ display: "grid",
162
+ gridTemplateColumns: "repeat(2, 1fr)",
163
+ gap: 16
164
+ },
165
+ children: [
166
+ 1,
167
+ 2,
168
+ 3,
169
+ 4
170
+ ].map((i) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", { style: {
171
+ height: 10,
172
+ width: "40%",
173
+ backgroundColor: "rgba(255,255,255,0.06)",
174
+ borderRadius: 2
175
+ } }), /* @__PURE__ */ jsx("div", { style: {
176
+ height: 20,
177
+ width: "60%",
178
+ backgroundColor: "rgba(255,255,255,0.1)",
179
+ borderRadius: 4,
180
+ marginTop: 4
181
+ } })] }, i))
182
+ })]
183
+ });
184
+ if (!spacecraft) return /* @__PURE__ */ jsxs("div", {
185
+ className: classNames("zendir-orbit-card", "empty", className),
186
+ role: "article",
187
+ "aria-label": "No orbit data",
188
+ style: {
189
+ backgroundColor: cardBg,
190
+ ...cardGlass,
191
+ ...tokens.colors.border.cardStyleDashed ?? {},
192
+ borderRadius: tokens.borderRadius.lg,
193
+ padding: tokens.spacing.lg,
194
+ textAlign: "center",
195
+ color: tokens.colors.text.tertiary
196
+ },
197
+ children: [/* @__PURE__ */ jsxs("svg", {
198
+ width: "32",
199
+ height: "32",
200
+ viewBox: "0 0 24 24",
201
+ fill: "currentColor",
202
+ style: {
203
+ opacity: .5,
204
+ marginBottom: 8
205
+ },
206
+ children: [/* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" }), /* @__PURE__ */ jsx("ellipse", {
207
+ cx: "12",
208
+ cy: "12",
209
+ rx: "10",
210
+ ry: "4",
211
+ fill: "none",
212
+ stroke: "currentColor",
213
+ strokeWidth: "1",
214
+ strokeDasharray: "3,3"
215
+ })]
216
+ }), /* @__PURE__ */ jsx("p", {
217
+ style: {
218
+ margin: 0,
219
+ fontSize: tokens.typography.body[2].fontSize
220
+ },
221
+ children: "No orbit data available"
222
+ })]
223
+ });
224
+ if (compact && !expanded) return /* @__PURE__ */ jsxs("article", {
225
+ className: classNames("zendir-orbit-card", "compact", className),
226
+ ...handlers,
227
+ "aria-label": `Orbit: ${spacecraft.orbitType ?? "Unknown"} (compact)`,
228
+ style: {
229
+ position: "relative",
230
+ overflow: "hidden",
231
+ ...useGlassMode ? glassContainerStyle : {
232
+ backgroundColor: cardBg,
233
+ ...cardGlass,
234
+ ...tokens.colors.border.cardStyle ?? {}
235
+ },
236
+ borderRadius: tokens.borderRadius.lg,
237
+ padding: `${tokens.spacing.sm} ${tokens.spacing.md}`,
238
+ fontFamily: tokens.typography.fontFamily.primary,
239
+ color: tokens.colors.text.primary,
240
+ fontSize: tokens.typography.fontSize.sm,
241
+ cursor: "pointer",
242
+ transition: `all ${transitionDuration} ease-out`,
243
+ transform: "scale(1)"
244
+ },
245
+ onMouseEnter: (e) => {
246
+ handlers.onMouseEnter();
247
+ if (!prefersReducedMotion) {
248
+ e.currentTarget.style.transform = "scale(1.01)";
249
+ e.currentTarget.style.boxShadow = `0 4px 12px ${orbitInfo.color}20`;
250
+ }
251
+ },
252
+ onMouseLeave: (e) => {
253
+ handlers.onMouseLeave();
254
+ e.currentTarget.style.transform = "scale(1)";
255
+ e.currentTarget.style.boxShadow = "";
256
+ },
257
+ children: [useGlassMode && /* @__PURE__ */ jsx("div", { style: {
258
+ position: "absolute",
259
+ inset: 0,
260
+ background: "linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",
261
+ pointerEvents: "none",
262
+ zIndex: 0
263
+ } }), /* @__PURE__ */ jsxs("div", {
264
+ style: {
265
+ display: "flex",
266
+ alignItems: "center",
267
+ justifyContent: "space-between",
268
+ gap: tokens.spacing.md,
269
+ position: "relative",
270
+ zIndex: 1
271
+ },
272
+ children: [/* @__PURE__ */ jsxs("div", {
273
+ style: {
274
+ display: "flex",
275
+ alignItems: "center",
276
+ gap: tokens.spacing.sm,
277
+ flex: 1,
278
+ minWidth: 0
279
+ },
280
+ children: [
281
+ /* @__PURE__ */ jsx(AstroIcon, {
282
+ name: "360",
283
+ size: 16,
284
+ color: orbitInfo.color
285
+ }),
286
+ /* @__PURE__ */ jsx("span", {
287
+ style: {
288
+ fontWeight: tokens.typography.fontWeight.medium,
289
+ color: useGlassMode ? glassAccentColor : void 0,
290
+ textShadow: useGlassMode ? `0 0 16px ${glassAccentMuted}` : void 0
291
+ },
292
+ children: "Orbit"
293
+ }),
294
+ useGlassMode && /* @__PURE__ */ jsx("div", { style: {
295
+ flex: 1,
296
+ height: isBoldVariant ? "2px" : "1px",
297
+ minWidth: 20,
298
+ background: `linear-gradient(90deg, ${glassAccentColor} 0%, ${glassAccentMuted} 60%, transparent 100%)`,
299
+ boxShadow: isBoldVariant ? `0 0 8px ${glassAccentMuted}` : void 0
300
+ } })
301
+ ]
302
+ }), /* @__PURE__ */ jsxs("div", {
303
+ style: {
304
+ display: "flex",
305
+ alignItems: "center",
306
+ gap: tokens.spacing.sm,
307
+ flexShrink: 0
308
+ },
309
+ children: [
310
+ /* @__PURE__ */ jsx("span", {
311
+ style: {
312
+ backgroundColor: `${orbitInfo.color}20`,
313
+ color: orbitInfo.color,
314
+ padding: `2px 6px`,
315
+ borderRadius: tokens.borderRadius.sm,
316
+ fontSize: tokens.typography.fontSize.xs,
317
+ fontWeight: tokens.typography.fontWeight.medium
318
+ },
319
+ children: spacecraft.orbitType ?? "—"
320
+ }),
321
+ /* @__PURE__ */ jsx("span", {
322
+ style: {
323
+ fontVariantNumeric: "tabular-nums",
324
+ fontFamily: tokens.typography.fontFamily.mono,
325
+ fontSize: tokens.typography.fontSize.xs
326
+ },
327
+ children: formatAltitude(spacecraft.altitude)
328
+ }),
329
+ isPinned && /* @__PURE__ */ jsx(Icon, {
330
+ name: "lock",
331
+ size: 12,
332
+ color: tokens.colors.accent.primary
333
+ })
334
+ ]
335
+ })]
336
+ })]
337
+ });
338
+ const labelStyle = {
339
+ color: tokens.colors.text.secondary,
340
+ fontSize: tokens.typography.fontSize.xs,
341
+ fontWeight: tokens.typography.fontWeight.medium
342
+ };
343
+ const valueStyle = {
344
+ color: tokens.colors.text.primary,
345
+ fontWeight: tokens.typography.fontWeight.medium,
346
+ fontFamily: tokens.typography.fontFamily.mono,
347
+ fontVariantNumeric: "tabular-nums",
348
+ fontSize: tokens.typography.fontSize.md,
349
+ marginTop: 2
350
+ };
351
+ return /* @__PURE__ */ jsxs("article", {
352
+ className: classNames("zendir-orbit-card", compact ? "expanded" : "", className),
353
+ ...compact ? handlers : {},
354
+ role: compact ? handlers.role : "article",
355
+ tabIndex: compact ? handlers.tabIndex : void 0,
356
+ "aria-expanded": compact ? handlers["aria-expanded"] : void 0,
357
+ "aria-label": `Orbit data for ${spacecraft.name ?? spacecraft.id}`,
358
+ style: {
359
+ position: "relative",
360
+ overflow: "hidden",
361
+ ...useGlassMode ? glassContainerStyle : {
362
+ backgroundColor: cardBg,
363
+ ...cardGlass,
364
+ ...tokens.colors.border.cardStyle ?? {}
365
+ },
366
+ borderRadius: tokens.borderRadius.lg,
367
+ padding: tokens.spacing.md,
368
+ fontFamily: tokens.typography.fontFamily.primary,
369
+ cursor: compact ? "pointer" : void 0,
370
+ transition: compact ? `all ${transitionDuration} ease-out` : void 0,
371
+ color: tokens.colors.text.primary,
372
+ fontSize: tokens.typography.fontSize.sm
373
+ },
374
+ children: [
375
+ useGlassMode && /* @__PURE__ */ jsx("div", { style: {
376
+ position: "absolute",
377
+ inset: 0,
378
+ background: "linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%, rgba(0,0,0,0.1) 100%)",
379
+ pointerEvents: "none",
380
+ zIndex: 0
381
+ } }),
382
+ /* @__PURE__ */ jsx(CardHeader, {
383
+ icon: "360",
384
+ title: spacecraft.name ?? spacecraft.id ?? "Unknown",
385
+ subtitle: orbitInfo.description,
386
+ badge: spacecraft.orbitType ?? "ORBIT",
387
+ badgeColor: orbitInfo.color,
388
+ iconColor: orbitInfo.color,
389
+ hideStatusIndicator: true
390
+ }),
391
+ /* @__PURE__ */ jsx("section", {
392
+ "aria-label": "Orbital parameters",
393
+ children: /* @__PURE__ */ jsxs("div", {
394
+ style: {
395
+ display: "grid",
396
+ gridTemplateColumns: "repeat(2, 1fr)",
397
+ gap: tokens.spacing.md
398
+ },
399
+ children: [
400
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
401
+ style: labelStyle,
402
+ children: "Altitude"
403
+ }), /* @__PURE__ */ jsx("div", {
404
+ style: {
405
+ ...valueStyle,
406
+ color: safeAccentText(tokens.colors.accent.primary)
407
+ },
408
+ children: formatAltitude(spacecraft.altitude)
409
+ })] }),
410
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
411
+ style: labelStyle,
412
+ children: "Velocity"
413
+ }), /* @__PURE__ */ jsx("div", {
414
+ style: valueStyle,
415
+ children: spacecraft.velocity ? formatVelocity(spacecraft.velocity) : computedVelocity ? formatVelocity(computedVelocity) : "-- km/s"
416
+ })] }),
417
+ spacecraft.inclination !== void 0 && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
418
+ style: labelStyle,
419
+ children: "Inclination"
420
+ }), /* @__PURE__ */ jsx("div", {
421
+ style: valueStyle,
422
+ children: formatDegrees(spacecraft.inclination)
423
+ })] }),
424
+ showComputed && computedPeriod !== null && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
425
+ style: labelStyle,
426
+ children: "Period"
427
+ }), /* @__PURE__ */ jsx("div", {
428
+ style: valueStyle,
429
+ children: formatDuration(computedPeriod)
430
+ })] })
431
+ ]
432
+ })
433
+ }),
434
+ /* @__PURE__ */ jsxs("section", {
435
+ style: {
436
+ marginTop: tokens.spacing.lg,
437
+ paddingTop: tokens.spacing.lg,
438
+ borderTop: `1px solid ${tokens.colors.border.muted}`
439
+ },
440
+ "aria-label": "Current position",
441
+ children: [/* @__PURE__ */ jsxs("h4", {
442
+ style: {
443
+ margin: `0 0 ${tokens.spacing.sm} 0`,
444
+ ...labelStyle,
445
+ display: "flex",
446
+ alignItems: "center",
447
+ gap: 4
448
+ },
449
+ children: [/* @__PURE__ */ jsx("svg", {
450
+ width: "12",
451
+ height: "12",
452
+ viewBox: "0 0 24 24",
453
+ fill: "currentColor",
454
+ children: /* @__PURE__ */ jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z" })
455
+ }), "Current Position"]
456
+ }), /* @__PURE__ */ jsxs("div", {
457
+ style: {
458
+ display: "grid",
459
+ gridTemplateColumns: "repeat(2, 1fr)",
460
+ gap: tokens.spacing.md
461
+ },
462
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
463
+ style: labelStyle,
464
+ children: "Latitude"
465
+ }), /* @__PURE__ */ jsx("div", {
466
+ style: valueStyle,
467
+ children: formatCoordinate(spacecraft.latitude, "lat")
468
+ })] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
469
+ style: labelStyle,
470
+ children: "Longitude"
471
+ }), /* @__PURE__ */ jsx("div", {
472
+ style: valueStyle,
473
+ children: formatCoordinate(spacecraft.longitude, "lon")
474
+ })] })]
475
+ })]
476
+ }),
477
+ spacecraft.timestamp && /* @__PURE__ */ jsx("footer", {
478
+ style: {
479
+ marginTop: tokens.spacing.md,
480
+ fontSize: tokens.typography.fontSize.xs,
481
+ color: tokens.colors.text.tertiary,
482
+ textAlign: "right"
483
+ },
484
+ children: /* @__PURE__ */ jsxs("time", {
485
+ dateTime: spacecraft.timestamp,
486
+ children: [formatTime(spacecraft.timestamp), " UTC"]
487
+ })
488
+ })
489
+ ]
490
+ });
368
491
  });
369
- export {
370
- OrbitCard
371
- };
372
- //# sourceMappingURL=OrbitCard.js.map
492
+ //#endregion
493
+ export { OrbitCard };
494
+
495
+ //# sourceMappingURL=OrbitCard.js.map