@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
@@ -0,0 +1,332 @@
1
+ import { default as React } from 'react';
2
+ export type ThemeVariant = "astro" | "purple-hue" | "hybrid" | "nebula" | "transparent" | "transparent-bold" | "transparent-minimal";
3
+ export type ThemeMode = "light" | "dark";
4
+ export interface ThemeColors {
5
+ background: {
6
+ base: string;
7
+ surface: string;
8
+ elevated: string;
9
+ overlay: string;
10
+ };
11
+ border: {
12
+ default: string;
13
+ muted: string;
14
+ focus: string;
15
+ /** Transparent theme: thin faded top-to-bottom border (box-shadow, use with border: 'none') */
16
+ fadedBoxShadow?: string;
17
+ /** Card border style (computed from theme – solid or transparent faded). Use ...tokens.colors.border.cardStyle */
18
+ cardStyle?: React.CSSProperties;
19
+ /** Card border for dashed/empty state. Use ...tokens.colors.border.cardStyleDashed */
20
+ cardStyleDashed?: React.CSSProperties;
21
+ /** Card border using default color (e.g. NavBall, EclipseTimer). Use ...tokens.colors.border.cardStyleDefault */
22
+ cardStyleDefault?: React.CSSProperties;
23
+ };
24
+ text: {
25
+ primary: string;
26
+ secondary: string;
27
+ tertiary: string;
28
+ /** Muted/placeholder text (alias for tertiary when not set) */
29
+ muted?: string;
30
+ inverse: string;
31
+ };
32
+ status: {
33
+ normal: string;
34
+ standby: string;
35
+ caution: string;
36
+ serious: string;
37
+ critical: string;
38
+ off: string;
39
+ };
40
+ semantic: {
41
+ success: string;
42
+ warning: string;
43
+ error: string;
44
+ info: string;
45
+ };
46
+ accent: {
47
+ primary: string;
48
+ secondary: string;
49
+ tertiary: string;
50
+ };
51
+ interactive: {
52
+ default: string;
53
+ hover: string;
54
+ active: string;
55
+ disabled: string;
56
+ /** Transparent theme: button/control bg (low opacity purple) when not hovered */
57
+ transparentDefault?: string;
58
+ /** Transparent theme: button/control bg on hover (higher opacity purple) */
59
+ transparentHover?: string;
60
+ /** Transparent theme: input field bg (semi-transparent purple tint) */
61
+ transparentInputBg?: string;
62
+ };
63
+ }
64
+ export interface ThemeAnimation {
65
+ /** Fast transitions (hover states) - 150ms */
66
+ fast: string;
67
+ /** Normal transitions (most interactions) - 250ms */
68
+ normal: string;
69
+ /** Slow transitions (page/mode changes) - 400ms */
70
+ slow: string;
71
+ /** Spring animation for playful interactions */
72
+ spring: string;
73
+ /** Easing function */
74
+ easing: {
75
+ default: string;
76
+ in: string;
77
+ out: string;
78
+ inOut: string;
79
+ };
80
+ /** Duration values in milliseconds */
81
+ duration: {
82
+ instant: number;
83
+ fast: number;
84
+ normal: number;
85
+ slow: number;
86
+ };
87
+ }
88
+ export interface ThemeFocus {
89
+ /** Focus ring color */
90
+ color: string;
91
+ /** Focus ring width */
92
+ width: string;
93
+ /** Focus ring offset */
94
+ offset: string;
95
+ /** Full focus ring CSS */
96
+ ring: string;
97
+ /** Focus ring style object */
98
+ style: React.CSSProperties;
99
+ }
100
+ /**
101
+ * Astro UX Typography Style Token
102
+ * Based on https://www.astrouxds.com/foundations/typography/
103
+ */
104
+ export interface TypographyStyle {
105
+ fontSize: string;
106
+ fontWeight: number;
107
+ letterSpacing: string;
108
+ lineHeight: string;
109
+ }
110
+ export interface ThemeTokens {
111
+ colors: ThemeColors;
112
+ spacing: {
113
+ /** 2px — micro adjustments, decorative offsets */
114
+ xxs: string;
115
+ /** 4px — tight gaps, icon padding */
116
+ xs: string;
117
+ /** 8px — compact spacing, small gaps */
118
+ sm: string;
119
+ /** 12px — form fields, compact cards (between sm and md) */
120
+ smd: string;
121
+ /** 16px — default card padding, section gaps */
122
+ md: string;
123
+ /** 20px — slightly generous spacing */
124
+ mdl: string;
125
+ /** 24px — generous spacing, content area padding */
126
+ lg: string;
127
+ /** 32px — large section gaps */
128
+ xl: string;
129
+ /** 48px — extra large spacing */
130
+ xxl: string;
131
+ };
132
+ borderRadius: {
133
+ none: string;
134
+ /** 1px — very subtle rounding */
135
+ xs: string;
136
+ /** 2px — small elements, badges, tooltips */
137
+ sm: string;
138
+ /** 4px — inputs, selects, standard controls */
139
+ md: string;
140
+ /** 8px — cards, containers */
141
+ lg: string;
142
+ /** 12px — prominent surfaces, modals */
143
+ xl: string;
144
+ /** 9999px — pills, fully rounded */
145
+ full: string;
146
+ };
147
+ /** Standardised element heights for interactive controls */
148
+ elementSize: {
149
+ /** 28px — compact controls */
150
+ sm: string;
151
+ /** 36px — default controls */
152
+ md: string;
153
+ /** 44px — prominent controls, touch targets */
154
+ lg: string;
155
+ };
156
+ typography: {
157
+ fontFamily: {
158
+ primary: string;
159
+ /** Heading stack (Sora → fallbacks); set by every theme. */
160
+ heading: string;
161
+ mono: string;
162
+ };
163
+ display: {
164
+ 1: TypographyStyle;
165
+ 2: TypographyStyle;
166
+ };
167
+ heading: {
168
+ 1: TypographyStyle;
169
+ "1Bold": TypographyStyle;
170
+ 2: TypographyStyle;
171
+ 3: TypographyStyle;
172
+ 4: TypographyStyle;
173
+ 5: TypographyStyle;
174
+ 6: TypographyStyle;
175
+ };
176
+ body: {
177
+ 1: TypographyStyle;
178
+ "1Bold": TypographyStyle;
179
+ 2: TypographyStyle;
180
+ "2Bold": TypographyStyle;
181
+ 3: TypographyStyle;
182
+ "3Bold": TypographyStyle;
183
+ };
184
+ control: {
185
+ 1: TypographyStyle;
186
+ "1Bold": TypographyStyle;
187
+ };
188
+ fontSize: {
189
+ micro: string;
190
+ xxs: string;
191
+ xs: string;
192
+ sm: string;
193
+ base: string;
194
+ md: string;
195
+ lg: string;
196
+ xl: string;
197
+ xxl: string;
198
+ xxxl: string;
199
+ };
200
+ fontWeight: {
201
+ light: number;
202
+ normal: number;
203
+ medium: number;
204
+ semibold: number;
205
+ bold: number;
206
+ };
207
+ lineHeight: {
208
+ tight: string;
209
+ normal: string;
210
+ relaxed: string;
211
+ };
212
+ letterSpacing: {
213
+ tight: string;
214
+ normal: string;
215
+ wide: string;
216
+ };
217
+ };
218
+ shadows: {
219
+ none: string;
220
+ sm: string;
221
+ md: string;
222
+ lg: string;
223
+ xl: string;
224
+ glow: (color: string) => string;
225
+ };
226
+ animation: ThemeAnimation;
227
+ focus: ThemeFocus;
228
+ /** Semantic layout tokens for consistent spacing across cards, forms, and sections */
229
+ layout: LayoutTokens;
230
+ /** Semantic border tokens for consistent element styling (derived from theme colors) */
231
+ borders: BorderTokens;
232
+ }
233
+ export interface LayoutTokens {
234
+ /** Card / panel container spacing */
235
+ card: {
236
+ /** Internal padding of card containers */
237
+ padding: string;
238
+ /** Gap between cards in grid layouts (desktop) */
239
+ gap: string;
240
+ /** Gap between cards in grid layouts (mobile / compact) */
241
+ gapCompact: string;
242
+ /** Card heading: icon size, title typography, gap — single system for all cards/charts */
243
+ heading: {
244
+ iconSize: number;
245
+ iconSizeCompact: number;
246
+ titleFontSize: string;
247
+ /** Smaller title for chart headers (e.g. Power Trends) so they match card visual weight */
248
+ titleFontSizeChart: string;
249
+ titleFontWeight: number;
250
+ gap: number;
251
+ };
252
+ };
253
+ /** Section heading spacing (heading + divider + content) */
254
+ section: {
255
+ /** Padding below heading text, above the divider border */
256
+ headerPaddingBottom: string;
257
+ /** Margin below the divider border, before content */
258
+ headerMarginBottom: string;
259
+ /** Padding above the first content element after heading */
260
+ contentPaddingTop: string;
261
+ };
262
+ /** Form and input field spacing */
263
+ form: {
264
+ /** Vertical gap between stacked form fields */
265
+ fieldGap: string;
266
+ /** Horizontal gap between side-by-side inline fields */
267
+ inlineGap: string;
268
+ /** Padding inside grouped / nested field containers */
269
+ groupPadding: string;
270
+ /** Gap between items within a field group */
271
+ groupGap: string;
272
+ /** Gap between label text and helper icons (e.g. tooltip) */
273
+ labelGap: string;
274
+ };
275
+ /** Nested surface / panel spacing (e.g. grouped fields within a card) */
276
+ surface: {
277
+ /** Internal padding of nested surfaces */
278
+ padding: string;
279
+ /** Border radius of nested surfaces */
280
+ borderRadius: string;
281
+ /** Gap between items in compact nested surfaces */
282
+ gap: string;
283
+ };
284
+ }
285
+ export interface BorderTokens {
286
+ /** Border widths — standardised across all interactive elements */
287
+ width: {
288
+ /** Thin (1px) — inputs, cards, dividers, dropdowns */
289
+ thin: string;
290
+ /** Medium (1.5px) — secondary buttons, emphasised inputs */
291
+ medium: string;
292
+ /** Thick (2px) — checkboxes, accent borders, active tabs */
293
+ thick: string;
294
+ };
295
+ /** Pre-computed input / control borders (width + style + color) */
296
+ input: {
297
+ /** Default resting state */
298
+ default: string;
299
+ /** Hover state (accent at 50% opacity) */
300
+ hover: string;
301
+ /** Focused state (full accent) */
302
+ focus: string;
303
+ /** Error / critical state */
304
+ error: string;
305
+ };
306
+ /** Focus ring box-shadow values for interactive elements */
307
+ focusRing: {
308
+ /** Standard ring for inputs and selects */
309
+ default: string;
310
+ /** Ring for buttons (double-ring pattern) */
311
+ button: string;
312
+ /** Subtle ring for checkboxes, tabs, toggles */
313
+ subtle: string;
314
+ };
315
+ /** Section divider border (headings, dialog headers/footers, tab bars) */
316
+ divider: string;
317
+ /** Dropdown / popover container border */
318
+ dropdown: string;
319
+ /** Separator line inside elements (unit separators, table rows) */
320
+ separator: string;
321
+ }
322
+ /**
323
+ * Derives border tokens from a theme's resolved colors.
324
+ * Called once per theme change inside the ThemeProvider useMemo.
325
+ */
326
+ export declare function computeBorderTokens(colors: ThemeColors): BorderTokens;
327
+ /**
328
+ * Base theme type used for static theme definitions.
329
+ * `borders` is omitted because it is derived from colors at runtime
330
+ * inside the ThemeProvider useMemo (see computeBorderTokens).
331
+ */
332
+ export type ThemeTokensBase = Omit<ThemeTokens, "borders">;
@@ -0,0 +1,39 @@
1
+ //#region src/react/theme/types.ts
2
+ /**
3
+ * Derives border tokens from a theme's resolved colors.
4
+ * Called once per theme change inside the ThemeProvider useMemo.
5
+ */
6
+ function computeBorderTokens(colors) {
7
+ const thin = "1px";
8
+ const medium = "1.5px";
9
+ const thick = "2px";
10
+ const accent = colors.accent.primary;
11
+ const muted = colors.border.muted;
12
+ const critical = colors.status.critical;
13
+ const bgBase = colors.background.base;
14
+ return {
15
+ width: {
16
+ thin,
17
+ medium,
18
+ thick
19
+ },
20
+ input: {
21
+ default: `${thin} solid ${muted}`,
22
+ hover: `${thin} solid ${accent}80`,
23
+ focus: `${thin} solid ${accent}`,
24
+ error: `${thin} solid ${critical}`
25
+ },
26
+ focusRing: {
27
+ default: `0 0 0 3px ${accent}50, 0 0 20px ${accent}15`,
28
+ button: `0 0 0 2px ${bgBase}, 0 0 0 4px ${accent}`,
29
+ subtle: `0 0 0 2px ${accent}60`
30
+ },
31
+ divider: `${thin} solid ${muted}`,
32
+ dropdown: `${thin} solid ${accent}30`,
33
+ separator: `${thin} solid ${muted}`
34
+ };
35
+ }
36
+ //#endregion
37
+ export { computeBorderTokens };
38
+
39
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/react/theme/types.ts"],"sourcesContent":["/**\r\n * @zendir/ui — Theme type definitions and derived-token helpers.\r\n *\r\n * Shared home for the theme token shapes so both the runtime provider\r\n * (ThemeProvider) and the static theme definitions (src/tokens/themes.ts)\r\n * reference one set of types. Isolating these here keeps the token-build\r\n * script (which imports the theme definitions) free of the full React\r\n * provider module.\r\n */\r\n\r\nimport React from \"react\";\r\n\r\nexport type ThemeVariant =\r\n | \"astro\"\r\n | \"purple-hue\"\r\n | \"hybrid\"\r\n | \"nebula\"\r\n | \"transparent\"\r\n | \"transparent-bold\"\r\n | \"transparent-minimal\";\r\nexport type ThemeMode = \"light\" | \"dark\";\r\n\r\nexport interface ThemeColors {\r\n background: {\r\n base: string;\r\n surface: string;\r\n elevated: string;\r\n overlay: string;\r\n };\r\n border: {\r\n default: string;\r\n muted: string;\r\n focus: string;\r\n /** Transparent theme: thin faded top-to-bottom border (box-shadow, use with border: 'none') */\r\n fadedBoxShadow?: string;\r\n /** Card border style (computed from theme – solid or transparent faded). Use ...tokens.colors.border.cardStyle */\r\n cardStyle?: React.CSSProperties;\r\n /** Card border for dashed/empty state. Use ...tokens.colors.border.cardStyleDashed */\r\n cardStyleDashed?: React.CSSProperties;\r\n /** Card border using default color (e.g. NavBall, EclipseTimer). Use ...tokens.colors.border.cardStyleDefault */\r\n cardStyleDefault?: React.CSSProperties;\r\n };\r\n text: {\r\n primary: string;\r\n secondary: string;\r\n tertiary: string;\r\n /** Muted/placeholder text (alias for tertiary when not set) */\r\n muted?: string;\r\n inverse: string;\r\n };\r\n status: {\r\n normal: string;\r\n standby: string;\r\n caution: string;\r\n serious: string;\r\n critical: string;\r\n off: string;\r\n };\r\n semantic: {\r\n success: string;\r\n warning: string;\r\n error: string;\r\n info: string;\r\n };\r\n accent: {\r\n primary: string;\r\n secondary: string;\r\n tertiary: string;\r\n };\r\n interactive: {\r\n default: string;\r\n hover: string;\r\n active: string;\r\n disabled: string;\r\n /** Transparent theme: button/control bg (low opacity purple) when not hovered */\r\n transparentDefault?: string;\r\n /** Transparent theme: button/control bg on hover (higher opacity purple) */\r\n transparentHover?: string;\r\n /** Transparent theme: input field bg (semi-transparent purple tint) */\r\n transparentInputBg?: string;\r\n };\r\n}\r\n\r\nexport interface ThemeAnimation {\r\n /** Fast transitions (hover states) - 150ms */\r\n fast: string;\r\n /** Normal transitions (most interactions) - 250ms */\r\n normal: string;\r\n /** Slow transitions (page/mode changes) - 400ms */\r\n slow: string;\r\n /** Spring animation for playful interactions */\r\n spring: string;\r\n /** Easing function */\r\n easing: {\r\n default: string;\r\n in: string;\r\n out: string;\r\n inOut: string;\r\n };\r\n /** Duration values in milliseconds */\r\n duration: {\r\n instant: number;\r\n fast: number;\r\n normal: number;\r\n slow: number;\r\n };\r\n}\r\n\r\nexport interface ThemeFocus {\r\n /** Focus ring color */\r\n color: string;\r\n /** Focus ring width */\r\n width: string;\r\n /** Focus ring offset */\r\n offset: string;\r\n /** Full focus ring CSS */\r\n ring: string;\r\n /** Focus ring style object */\r\n style: React.CSSProperties;\r\n}\r\n\r\n/**\r\n * Astro UX Typography Style Token\r\n * Based on https://www.astrouxds.com/foundations/typography/\r\n */\r\nexport interface TypographyStyle {\r\n fontSize: string;\r\n fontWeight: number;\r\n letterSpacing: string;\r\n lineHeight: string;\r\n}\r\n\r\nexport interface ThemeTokens {\r\n colors: ThemeColors;\r\n spacing: {\r\n /** 2px — micro adjustments, decorative offsets */\r\n xxs: string;\r\n /** 4px — tight gaps, icon padding */\r\n xs: string;\r\n /** 8px — compact spacing, small gaps */\r\n sm: string;\r\n /** 12px — form fields, compact cards (between sm and md) */\r\n smd: string;\r\n /** 16px — default card padding, section gaps */\r\n md: string;\r\n /** 20px — slightly generous spacing */\r\n mdl: string;\r\n /** 24px — generous spacing, content area padding */\r\n lg: string;\r\n /** 32px — large section gaps */\r\n xl: string;\r\n /** 48px — extra large spacing */\r\n xxl: string;\r\n };\r\n borderRadius: {\r\n none: string;\r\n /** 1px — very subtle rounding */\r\n xs: string;\r\n /** 2px — small elements, badges, tooltips */\r\n sm: string;\r\n /** 4px — inputs, selects, standard controls */\r\n md: string;\r\n /** 8px — cards, containers */\r\n lg: string;\r\n /** 12px — prominent surfaces, modals */\r\n xl: string;\r\n /** 9999px — pills, fully rounded */\r\n full: string;\r\n };\r\n /** Standardised element heights for interactive controls */\r\n elementSize: {\r\n /** 28px — compact controls */\r\n sm: string;\r\n /** 36px — default controls */\r\n md: string;\r\n /** 44px — prominent controls, touch targets */\r\n lg: string;\r\n };\r\n typography: {\r\n fontFamily: {\r\n primary: string;\r\n /** Heading stack (Sora → fallbacks); set by every theme. */\r\n heading: string;\r\n mono: string;\r\n };\r\n // Astro UX Typography Tokens (rem-based)\r\n // https://www.astrouxds.com/foundations/typography/\r\n display: {\r\n 1: TypographyStyle;\r\n 2: TypographyStyle;\r\n };\r\n heading: {\r\n 1: TypographyStyle;\r\n \"1Bold\": TypographyStyle;\r\n 2: TypographyStyle;\r\n 3: TypographyStyle;\r\n 4: TypographyStyle;\r\n 5: TypographyStyle;\r\n 6: TypographyStyle;\r\n };\r\n body: {\r\n 1: TypographyStyle;\r\n \"1Bold\": TypographyStyle;\r\n 2: TypographyStyle;\r\n \"2Bold\": TypographyStyle;\r\n 3: TypographyStyle;\r\n \"3Bold\": TypographyStyle;\r\n };\r\n control: {\r\n 1: TypographyStyle;\r\n \"1Bold\": TypographyStyle;\r\n };\r\n // Legacy/convenience tokens (keeping for backward compatibility)\r\n fontSize: {\r\n micro: string; // 9px - very tight spaces\r\n xxs: string; // 10px - compact labels\r\n xs: string;\r\n sm: string;\r\n base: string;\r\n md: string;\r\n lg: string;\r\n xl: string;\r\n xxl: string;\r\n xxxl: string;\r\n };\r\n fontWeight: {\r\n light: number;\r\n normal: number;\r\n medium: number;\r\n semibold: number;\r\n bold: number;\r\n };\r\n lineHeight: {\r\n tight: string;\r\n normal: string;\r\n relaxed: string;\r\n };\r\n letterSpacing: {\r\n tight: string;\r\n normal: string;\r\n wide: string;\r\n };\r\n };\r\n shadows: {\r\n none: string;\r\n sm: string;\r\n md: string;\r\n lg: string;\r\n xl: string;\r\n glow: (color: string) => string;\r\n };\r\n animation: ThemeAnimation;\r\n focus: ThemeFocus;\r\n /** Semantic layout tokens for consistent spacing across cards, forms, and sections */\r\n layout: LayoutTokens;\r\n /** Semantic border tokens for consistent element styling (derived from theme colors) */\r\n borders: BorderTokens;\r\n}\r\n\r\n// ============================================================================\r\n// Layout Tokens Interface\r\n// Semantic spacing for cards, sections, forms, and nested surfaces.\r\n// These decouple layout intent from raw pixel values, enabling consistent\r\n// spacing across all consuming applications.\r\n// ============================================================================\r\n\r\nexport interface LayoutTokens {\r\n /** Card / panel container spacing */\r\n card: {\r\n /** Internal padding of card containers */\r\n padding: string;\r\n /** Gap between cards in grid layouts (desktop) */\r\n gap: string;\r\n /** Gap between cards in grid layouts (mobile / compact) */\r\n gapCompact: string;\r\n /** Card heading: icon size, title typography, gap — single system for all cards/charts */\r\n heading: {\r\n iconSize: number;\r\n iconSizeCompact: number;\r\n titleFontSize: string;\r\n /** Smaller title for chart headers (e.g. Power Trends) so they match card visual weight */\r\n titleFontSizeChart: string;\r\n titleFontWeight: number;\r\n gap: number;\r\n };\r\n };\r\n /** Section heading spacing (heading + divider + content) */\r\n section: {\r\n /** Padding below heading text, above the divider border */\r\n headerPaddingBottom: string;\r\n /** Margin below the divider border, before content */\r\n headerMarginBottom: string;\r\n /** Padding above the first content element after heading */\r\n contentPaddingTop: string;\r\n };\r\n /** Form and input field spacing */\r\n form: {\r\n /** Vertical gap between stacked form fields */\r\n fieldGap: string;\r\n /** Horizontal gap between side-by-side inline fields */\r\n inlineGap: string;\r\n /** Padding inside grouped / nested field containers */\r\n groupPadding: string;\r\n /** Gap between items within a field group */\r\n groupGap: string;\r\n /** Gap between label text and helper icons (e.g. tooltip) */\r\n labelGap: string;\r\n };\r\n /** Nested surface / panel spacing (e.g. grouped fields within a card) */\r\n surface: {\r\n /** Internal padding of nested surfaces */\r\n padding: string;\r\n /** Border radius of nested surfaces */\r\n borderRadius: string;\r\n /** Gap between items in compact nested surfaces */\r\n gap: string;\r\n };\r\n}\r\n\r\n// ============================================================================\r\n// Border Tokens Interface\r\n// Standardised border widths, element borders, focus rings, and dividers.\r\n// These are DERIVED from theme colors at runtime via computeBorderTokens().\r\n// ============================================================================\r\n\r\nexport interface BorderTokens {\r\n /** Border widths — standardised across all interactive elements */\r\n width: {\r\n /** Thin (1px) — inputs, cards, dividers, dropdowns */\r\n thin: string;\r\n /** Medium (1.5px) — secondary buttons, emphasised inputs */\r\n medium: string;\r\n /** Thick (2px) — checkboxes, accent borders, active tabs */\r\n thick: string;\r\n };\r\n /** Pre-computed input / control borders (width + style + color) */\r\n input: {\r\n /** Default resting state */\r\n default: string;\r\n /** Hover state (accent at 50% opacity) */\r\n hover: string;\r\n /** Focused state (full accent) */\r\n focus: string;\r\n /** Error / critical state */\r\n error: string;\r\n };\r\n /** Focus ring box-shadow values for interactive elements */\r\n focusRing: {\r\n /** Standard ring for inputs and selects */\r\n default: string;\r\n /** Ring for buttons (double-ring pattern) */\r\n button: string;\r\n /** Subtle ring for checkboxes, tabs, toggles */\r\n subtle: string;\r\n };\r\n /** Section divider border (headings, dialog headers/footers, tab bars) */\r\n divider: string;\r\n /** Dropdown / popover container border */\r\n dropdown: string;\r\n /** Separator line inside elements (unit separators, table rows) */\r\n separator: string;\r\n}\r\n\r\n/**\r\n * Derives border tokens from a theme's resolved colors.\r\n * Called once per theme change inside the ThemeProvider useMemo.\r\n */\r\nexport function computeBorderTokens(colors: ThemeColors): BorderTokens {\r\n const thin = \"1px\";\r\n const medium = \"1.5px\";\r\n const thick = \"2px\";\r\n const accent = colors.accent.primary;\r\n const muted = colors.border.muted;\r\n const critical = colors.status.critical;\r\n const bgBase = colors.background.base;\r\n\r\n return {\r\n width: { thin, medium, thick },\r\n input: {\r\n default: `${thin} solid ${muted}`,\r\n hover: `${thin} solid ${accent}80`,\r\n focus: `${thin} solid ${accent}`,\r\n error: `${thin} solid ${critical}`,\r\n },\r\n focusRing: {\r\n // WCAG 2.4.13: focus indicators ≥ 3:1 contrast — raised from 20%/30% to 50%/60%\r\n default: `0 0 0 3px ${accent}50, 0 0 20px ${accent}15`,\r\n button: `0 0 0 2px ${bgBase}, 0 0 0 4px ${accent}`,\r\n subtle: `0 0 0 2px ${accent}60`,\r\n },\r\n divider: `${thin} solid ${muted}`,\r\n dropdown: `${thin} solid ${accent}30`,\r\n separator: `${thin} solid ${muted}`,\r\n };\r\n}\r\n\r\n/**\r\n * Base theme type used for static theme definitions.\r\n * `borders` is omitted because it is derived from colors at runtime\r\n * inside the ThemeProvider useMemo (see computeBorderTokens).\r\n */\r\nexport type ThemeTokensBase = Omit<ThemeTokens, \"borders\">;\r\n"],"mappings":";;;;;AA+WA,SAAgB,oBAAoB,QAAmC;CACrE,MAAM,OAAO;CACb,MAAM,SAAS;CACf,MAAM,QAAQ;CACd,MAAM,SAAS,OAAO,OAAO;CAC7B,MAAM,QAAQ,OAAO,OAAO;CAC5B,MAAM,WAAW,OAAO,OAAO;CAC/B,MAAM,SAAS,OAAO,WAAW;CAEjC,OAAO;EACL,OAAO;GAAE;GAAM;GAAQ;EAAM;EAC7B,OAAO;GACL,SAAS,GAAG,KAAK,SAAS;GAC1B,OAAO,GAAG,KAAK,SAAS,OAAO;GAC/B,OAAO,GAAG,KAAK,SAAS;GACxB,OAAO,GAAG,KAAK,SAAS;EAC1B;EACA,WAAW;GAET,SAAS,aAAa,OAAO,eAAe,OAAO;GACnD,QAAQ,aAAa,OAAO,cAAc;GAC1C,QAAQ,aAAa,OAAO;EAC9B;EACA,SAAS,GAAG,KAAK,SAAS;EAC1B,UAAU,GAAG,KAAK,SAAS,OAAO;EAClC,WAAW,GAAG,KAAK,SAAS;CAC9B;AACF"}
@@ -59,7 +59,7 @@ export interface SpacecraftPosition {
59
59
  /** Orbital inclination in degrees */
60
60
  inclination?: number;
61
61
  /** Health/operational status using AstroUXDS 6-level system */
62
- status?: 'off' | 'standby' | 'normal' | 'caution' | 'serious' | 'critical';
62
+ status?: "off" | "standby" | "normal" | "caution" | "serious" | "critical";
63
63
  }
64
64
  export interface Spacecraft {
65
65
  id: string;
@@ -67,7 +67,7 @@ export interface Spacecraft {
67
67
  noradId?: number;
68
68
  type?: string;
69
69
  /** Status using AstroUXDS 6-level system */
70
- status?: 'off' | 'standby' | 'normal' | 'caution' | 'serious' | 'critical';
70
+ status?: "off" | "standby" | "normal" | "caution" | "serious" | "critical";
71
71
  }
72
72
  export interface GroundStation {
73
73
  id: string;
@@ -257,7 +257,7 @@ export interface AttitudeData {
257
257
  /** Target direction vector [x, y, z] */
258
258
  targetDirection?: [number, number, number];
259
259
  }
260
- export type PointingMode = 'nadir' | 'sun' | 'target' | 'inertial' | 'velocity';
260
+ export type PointingMode = "nadir" | "sun" | "target" | "inertial" | "velocity";
261
261
  export interface EclipseInfo {
262
262
  inEclipse: boolean;
263
263
  timeToEclipse: number;
@@ -307,7 +307,7 @@ export interface ThermalData {
307
307
  export interface ThrusterStatus {
308
308
  id: string;
309
309
  name: string;
310
- status: 'ready' | 'firing' | 'disabled' | 'error';
310
+ status: "ready" | "firing" | "disabled" | "error";
311
311
  fuelFlow?: number;
312
312
  }
313
313
  export interface PropulsionSummary {
@@ -324,7 +324,7 @@ export interface ReactionWheelData {
324
324
  /** Display name (e.g. "RW-X", "RW-1") */
325
325
  name: string;
326
326
  /** Mounted axis */
327
- axis: 'X' | 'Y' | 'Z' | 'skew';
327
+ axis: "X" | "Y" | "Z" | "skew";
328
328
  /** Current stored angular momentum in N·m·s */
329
329
  momentumNms: number;
330
330
  /** Maximum momentum capacity in N·m·s */
@@ -334,7 +334,7 @@ export interface ReactionWheelData {
334
334
  /** Maximum wheel speed in RPM */
335
335
  maxSpeedRpm: number;
336
336
  /** Operational status */
337
- status: 'nominal' | 'saturated' | 'desaturating' | 'off' | 'error';
337
+ status: "nominal" | "saturated" | "desaturating" | "off" | "error";
338
338
  /** Power consumption in Watts */
339
339
  powerW?: number;
340
340
  /** Bearing temperature in °C */
@@ -373,9 +373,9 @@ export interface ThrusterFireEvent {
373
373
  /** Burn duration in seconds */
374
374
  durationSeconds: number;
375
375
  /** Event type */
376
- type: 'impulsive' | 'finite' | 'continuous';
376
+ type: "impulsive" | "finite" | "continuous";
377
377
  }
378
- export type PlanetId = 'sun' | 'mercury' | 'venus' | 'earth' | 'moon' | 'mars' | 'jupiter' | 'saturn' | 'uranus' | 'neptune' | 'pluto';
378
+ export type PlanetId = "sun" | "mercury" | "venus" | "earth" | "moon" | "mars" | "jupiter" | "saturn" | "uranus" | "neptune" | "pluto";
379
379
  export interface PlanetInfo {
380
380
  id: PlanetId;
381
381
  name: string;
@@ -1,58 +1,158 @@
1
+ //#region src/react/types.ts
2
+ /**
3
+ * Estimate orbital period from altitude (simplified)
4
+ */
1
5
  function estimateOrbitalPeriod(altitudeKm) {
2
- const earthRadiusKm = 6371;
3
- const mu = 398600.4418;
4
- const semiMajorAxis = earthRadiusKm + altitudeKm;
5
- const period = 2 * Math.PI * Math.sqrt(Math.pow(semiMajorAxis, 3) / mu);
6
- return period / 60;
6
+ const earthRadiusKm = 6371;
7
+ const mu = 398600.4418;
8
+ const semiMajorAxis = earthRadiusKm + altitudeKm;
9
+ return 2 * Math.PI * Math.sqrt(Math.pow(semiMajorAxis, 3) / mu) / 60;
7
10
  }
11
+ /**
12
+ * Estimate orbital velocity from altitude (simplified)
13
+ */
8
14
  function estimateOrbitalVelocity(altitudeKm) {
9
- const earthRadiusKm = 6371;
10
- const mu = 398600.4418;
11
- const radius = earthRadiusKm + altitudeKm;
12
- return Math.sqrt(mu / radius);
15
+ const earthRadiusKm = 6371;
16
+ const mu = 398600.4418;
17
+ const radius = earthRadiusKm + altitudeKm;
18
+ return Math.sqrt(mu / radius);
13
19
  }
20
+ /**
21
+ * Convert AU to kilometers
22
+ */
14
23
  function auToKm(au) {
15
- return au * 1495978707e-1;
24
+ return au * 149597870.7;
16
25
  }
26
+ /**
27
+ * Normalize planet name to PlanetId
28
+ */
17
29
  function normalizePlanetName(name) {
18
- const normalized = name.toLowerCase().trim();
19
- const validPlanets = [
20
- "sun",
21
- "mercury",
22
- "venus",
23
- "earth",
24
- "moon",
25
- "mars",
26
- "jupiter",
27
- "saturn",
28
- "uranus",
29
- "neptune",
30
- "pluto"
31
- ];
32
- return validPlanets.includes(normalized) ? normalized : null;
30
+ const normalized = name.toLowerCase().trim();
31
+ return [
32
+ "sun",
33
+ "mercury",
34
+ "venus",
35
+ "earth",
36
+ "moon",
37
+ "mars",
38
+ "jupiter",
39
+ "saturn",
40
+ "uranus",
41
+ "neptune",
42
+ "pluto"
43
+ ].includes(normalized) ? normalized : null;
33
44
  }
45
+ /**
46
+ * Get planet info by ID
47
+ */
34
48
  function getPlanet(id) {
35
- return PLANETS.find((p) => p.id === id);
49
+ return PLANETS.find((p) => p.id === id);
36
50
  }
37
- const PLANETS = [
38
- { id: "sun", name: "Sun", radius: 696340, mass: 1989e27, semiMajorAxis: 0, orbitalPeriod: 0, color: "#ffcc00" },
39
- { id: "mercury", name: "Mercury", radius: 2439.7, mass: 33011e19, semiMajorAxis: 0.387, orbitalPeriod: 88, color: "#b5b5b5" },
40
- { id: "venus", name: "Venus", radius: 6051.8, mass: 48675e20, semiMajorAxis: 0.723, orbitalPeriod: 225, color: "#e6c87a" },
41
- { id: "earth", name: "Earth", radius: 6371, mass: 5972e21, semiMajorAxis: 1, orbitalPeriod: 365, color: "#4da6ff" },
42
- { id: "moon", name: "Moon", radius: 1737.4, mass: 7342e19, semiMajorAxis: 257e-5, orbitalPeriod: 27.3, color: "#c0c0c0" },
43
- { id: "mars", name: "Mars", radius: 3389.5, mass: 64171e19, semiMajorAxis: 1.524, orbitalPeriod: 687, color: "#e07b4a" },
44
- { id: "jupiter", name: "Jupiter", radius: 69911, mass: 18982e23, semiMajorAxis: 5.203, orbitalPeriod: 4333, color: "#d8ca9d" },
45
- { id: "saturn", name: "Saturn", radius: 58232, mass: 56834e22, semiMajorAxis: 9.537, orbitalPeriod: 10759, color: "#f4d59e" },
46
- { id: "uranus", name: "Uranus", radius: 25362, mass: 8681e22, semiMajorAxis: 19.19, orbitalPeriod: 30687, color: "#b3e0e6" },
47
- { id: "neptune", name: "Neptune", radius: 24622, mass: 102413e21, semiMajorAxis: 30.07, orbitalPeriod: 60190, color: "#5b7fff" },
48
- { id: "pluto", name: "Pluto", radius: 1188.3, mass: 1303e19, semiMajorAxis: 39.48, orbitalPeriod: 90560, color: "#c9b79c" }
51
+ /**
52
+ * Planet data (simplified)
53
+ */
54
+ var PLANETS = [
55
+ {
56
+ id: "sun",
57
+ name: "Sun",
58
+ radius: 696340,
59
+ mass: 1989e27,
60
+ semiMajorAxis: 0,
61
+ orbitalPeriod: 0,
62
+ color: "#ffcc00"
63
+ },
64
+ {
65
+ id: "mercury",
66
+ name: "Mercury",
67
+ radius: 2439.7,
68
+ mass: 33011e19,
69
+ semiMajorAxis: .387,
70
+ orbitalPeriod: 88,
71
+ color: "#b5b5b5"
72
+ },
73
+ {
74
+ id: "venus",
75
+ name: "Venus",
76
+ radius: 6051.8,
77
+ mass: 48675e20,
78
+ semiMajorAxis: .723,
79
+ orbitalPeriod: 225,
80
+ color: "#e6c87a"
81
+ },
82
+ {
83
+ id: "earth",
84
+ name: "Earth",
85
+ radius: 6371,
86
+ mass: 5972e21,
87
+ semiMajorAxis: 1,
88
+ orbitalPeriod: 365,
89
+ color: "#4da6ff"
90
+ },
91
+ {
92
+ id: "moon",
93
+ name: "Moon",
94
+ radius: 1737.4,
95
+ mass: 7342e19,
96
+ semiMajorAxis: .00257,
97
+ orbitalPeriod: 27.3,
98
+ color: "#c0c0c0"
99
+ },
100
+ {
101
+ id: "mars",
102
+ name: "Mars",
103
+ radius: 3389.5,
104
+ mass: 64171e19,
105
+ semiMajorAxis: 1.524,
106
+ orbitalPeriod: 687,
107
+ color: "#e07b4a"
108
+ },
109
+ {
110
+ id: "jupiter",
111
+ name: "Jupiter",
112
+ radius: 69911,
113
+ mass: 18982e23,
114
+ semiMajorAxis: 5.203,
115
+ orbitalPeriod: 4333,
116
+ color: "#d8ca9d"
117
+ },
118
+ {
119
+ id: "saturn",
120
+ name: "Saturn",
121
+ radius: 58232,
122
+ mass: 56834e22,
123
+ semiMajorAxis: 9.537,
124
+ orbitalPeriod: 10759,
125
+ color: "#f4d59e"
126
+ },
127
+ {
128
+ id: "uranus",
129
+ name: "Uranus",
130
+ radius: 25362,
131
+ mass: 8681e22,
132
+ semiMajorAxis: 19.19,
133
+ orbitalPeriod: 30687,
134
+ color: "#b3e0e6"
135
+ },
136
+ {
137
+ id: "neptune",
138
+ name: "Neptune",
139
+ radius: 24622,
140
+ mass: 102413e21,
141
+ semiMajorAxis: 30.07,
142
+ orbitalPeriod: 60190,
143
+ color: "#5b7fff"
144
+ },
145
+ {
146
+ id: "pluto",
147
+ name: "Pluto",
148
+ radius: 1188.3,
149
+ mass: 1303e19,
150
+ semiMajorAxis: 39.48,
151
+ orbitalPeriod: 90560,
152
+ color: "#c9b79c"
153
+ }
49
154
  ];
50
- export {
51
- PLANETS,
52
- auToKm,
53
- estimateOrbitalPeriod,
54
- estimateOrbitalVelocity,
55
- getPlanet,
56
- normalizePlanetName
57
- };
58
- //# sourceMappingURL=types.js.map
155
+ //#endregion
156
+ export { PLANETS, auToKm, estimateOrbitalPeriod, estimateOrbitalVelocity, getPlanet, normalizePlanetName };
157
+
158
+ //# sourceMappingURL=types.js.map