@zendir/ui 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/CHANGELOG.md +419 -386
  2. package/README.md +640 -631
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/index.js +17 -221
  5. package/dist/react/3d/CesiumCaptureSource.d.ts +0 -1
  6. package/dist/react/3d/CesiumCaptureSource.js +364 -283
  7. package/dist/react/3d/CesiumCaptureSource.js.map +1 -1
  8. package/dist/react/3d/ZenSpace3D.d.ts +2 -3
  9. package/dist/react/3d/ZenSpace3D.js +1681 -1237
  10. package/dist/react/3d/ZenSpace3D.js.map +1 -1
  11. package/dist/react/3d/ZenSpace3DCesium.d.ts +0 -1
  12. package/dist/react/3d/ZenSpace3DCesium.js +513 -560
  13. package/dist/react/3d/ZenSpace3DCesium.js.map +1 -1
  14. package/dist/react/3d/ZenSpace3DShaders.js +61 -66
  15. package/dist/react/3d/ZenSpace3DShaders.js.map +1 -1
  16. package/dist/react/3d/ZenSpace3DTypes.d.ts +19 -20
  17. package/dist/react/3d/ZenSpace3DUtils.d.ts +0 -1
  18. package/dist/react/3d/ZenSpace3DUtils.js +37 -24
  19. package/dist/react/3d/ZenSpace3DUtils.js.map +1 -1
  20. package/dist/react/3d/capturePngAnalysis.js +42 -36
  21. package/dist/react/3d/capturePngAnalysis.js.map +1 -1
  22. package/dist/react/3d/index.d.ts +3 -3
  23. package/dist/react/3d/index.js +5 -53
  24. package/dist/react/3d/threeLoader.d.ts +1 -1
  25. package/dist/react/3d/threeLoader.js +23 -18
  26. package/dist/react/3d/threeLoader.js.map +1 -1
  27. package/dist/react/astro/ClassificationBanner.d.ts +2 -3
  28. package/dist/react/astro/ClassificationBanner.js +95 -79
  29. package/dist/react/astro/ClassificationBanner.js.map +1 -1
  30. package/dist/react/astro/GlobalStatusBar.d.ts +0 -1
  31. package/dist/react/astro/GlobalStatusBar.js +157 -163
  32. package/dist/react/astro/GlobalStatusBar.js.map +1 -1
  33. package/dist/react/astro/MissionClock.d.ts +7 -8
  34. package/dist/react/astro/MissionClock.js +377 -400
  35. package/dist/react/astro/MissionClock.js.map +1 -1
  36. package/dist/react/astro/MonitoringIcon.d.ts +1 -2
  37. package/dist/react/astro/MonitoringIcon.js +422 -358
  38. package/dist/react/astro/MonitoringIcon.js.map +1 -1
  39. package/dist/react/astro/Notification.d.ts +1 -2
  40. package/dist/react/astro/Notification.js +229 -126
  41. package/dist/react/astro/Notification.js.map +1 -1
  42. package/dist/react/astro/Progress.d.ts +0 -1
  43. package/dist/react/astro/Progress.js +199 -141
  44. package/dist/react/astro/Progress.js.map +1 -1
  45. package/dist/react/astro/SimulationControls.d.ts +3 -4
  46. package/dist/react/astro/SimulationControls.js +596 -650
  47. package/dist/react/astro/SimulationControls.js.map +1 -1
  48. package/dist/react/astro/StatusIndicator.d.ts +0 -1
  49. package/dist/react/astro/StatusIndicator.js +236 -170
  50. package/dist/react/astro/StatusIndicator.js.map +1 -1
  51. package/dist/react/astro/UnifiedTimeline.d.ts +9 -10
  52. package/dist/react/astro/UnifiedTimeline.js +2345 -2392
  53. package/dist/react/astro/UnifiedTimeline.js.map +1 -1
  54. package/dist/react/astro/index.d.ts +5 -5
  55. package/dist/react/astro/index.js +1 -25
  56. package/dist/react/cards/AccessCard.d.ts +0 -1
  57. package/dist/react/cards/AccessCard.js +471 -405
  58. package/dist/react/cards/AccessCard.js.map +1 -1
  59. package/dist/react/cards/OrbitCard.d.ts +0 -1
  60. package/dist/react/cards/OrbitCard.js +487 -364
  61. package/dist/react/cards/OrbitCard.js.map +1 -1
  62. package/dist/react/cards/SpacecraftCard.d.ts +0 -1
  63. package/dist/react/cards/SpacecraftCard.js +813 -925
  64. package/dist/react/cards/SpacecraftCard.js.map +1 -1
  65. package/dist/react/cards/TelemetryCard.d.ts +0 -1
  66. package/dist/react/cards/TelemetryCard.js +1055 -732
  67. package/dist/react/cards/TelemetryCard.js.map +1 -1
  68. package/dist/react/cards/TelemetryStreamCard.d.ts +0 -1
  69. package/dist/react/cards/TelemetryStreamCard.js +323 -297
  70. package/dist/react/cards/TelemetryStreamCard.js.map +1 -1
  71. package/dist/react/cards/index.d.ts +1 -1
  72. package/dist/react/cards/index.js +1 -8
  73. package/dist/react/charts/GroundTrackMap.d.ts +6 -7
  74. package/dist/react/charts/GroundTrackMap.js +1377 -1256
  75. package/dist/react/charts/GroundTrackMap.js.map +1 -1
  76. package/dist/react/charts/GroundTrackMapLeaflet.d.ts +1 -2
  77. package/dist/react/charts/GroundTrackMapLeaflet.js +1065 -987
  78. package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -1
  79. package/dist/react/charts/groundTrackMapLeafletTiles.js +34 -25
  80. package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -1
  81. package/dist/react/charts/groundTrackMapLeafletUtils.js +70 -61
  82. package/dist/react/charts/groundTrackMapLeafletUtils.js.map +1 -1
  83. package/dist/react/charts/index.d.ts +1 -1
  84. package/dist/react/charts/index.js +7 -100
  85. package/dist/react/charts/unified/AstroChart.d.ts +1 -2
  86. package/dist/react/charts/unified/AstroChart.js +1331 -1411
  87. package/dist/react/charts/unified/AstroChart.js.map +1 -1
  88. package/dist/react/charts/unified/PowerOverviewChart.d.ts +3 -3
  89. package/dist/react/charts/unified/PowerOverviewChart.js +495 -478
  90. package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -1
  91. package/dist/react/charts/unified/domain.d.ts +12 -13
  92. package/dist/react/charts/unified/domain.js +3999 -3145
  93. package/dist/react/charts/unified/domain.js.map +1 -1
  94. package/dist/react/charts/unified/generators.d.ts +3 -4
  95. package/dist/react/charts/unified/generators.js +561 -498
  96. package/dist/react/charts/unified/generators.js.map +1 -1
  97. package/dist/react/charts/unified/index.d.ts +1 -1
  98. package/dist/react/charts/unified/presets.d.ts +14 -15
  99. package/dist/react/charts/unified/presets.js +857 -994
  100. package/dist/react/charts/unified/presets.js.map +1 -1
  101. package/dist/react/charts/unified/sync.d.ts +2 -3
  102. package/dist/react/charts/unified/sync.js +229 -195
  103. package/dist/react/charts/unified/sync.js.map +1 -1
  104. package/dist/react/charts/unified/theme.d.ts +11 -12
  105. package/dist/react/charts/unified/theme.js +606 -642
  106. package/dist/react/charts/unified/theme.js.map +1 -1
  107. package/dist/react/charts/unified/types.d.ts +32 -33
  108. package/dist/react/charts/unified/useChartStream.d.ts +1 -2
  109. package/dist/react/charts/unified/useChartStream.js +203 -216
  110. package/dist/react/charts/unified/useChartStream.js.map +1 -1
  111. package/dist/react/chatgpt/AppCard.d.ts +1 -2
  112. package/dist/react/chatgpt/index.d.ts +7 -7
  113. package/dist/react/chatgpt/index.js +160 -139
  114. package/dist/react/chatgpt/index.js.map +1 -1
  115. package/dist/react/context/CategoryContext.d.ts +0 -1
  116. package/dist/react/context/CategoryContext.js +78 -29
  117. package/dist/react/context/CategoryContext.js.map +1 -1
  118. package/dist/react/context/DisplaySettingsContext.d.ts +1 -2
  119. package/dist/react/context/DisplaySettingsContext.js +205 -156
  120. package/dist/react/context/DisplaySettingsContext.js.map +1 -1
  121. package/dist/react/context/SpatialSelectionContext.d.ts +0 -1
  122. package/dist/react/context/SpatialSelectionContext.js +36 -7
  123. package/dist/react/context/SpatialSelectionContext.js.map +1 -1
  124. package/dist/react/core/data/DataTable.d.ts +3 -4
  125. package/dist/react/core/data/DataTable.js +473 -440
  126. package/dist/react/core/data/DataTable.js.map +1 -1
  127. package/dist/react/core/data/DataValue.d.ts +4 -5
  128. package/dist/react/core/data/DataValue.js +605 -571
  129. package/dist/react/core/data/DataValue.js.map +1 -1
  130. package/dist/react/core/data/propertyConfig.d.ts +1 -2
  131. package/dist/react/core/data/propertyConfig.js +446 -382
  132. package/dist/react/core/data/propertyConfig.js.map +1 -1
  133. package/dist/react/core/display/AstroIcon.d.ts +4 -5
  134. package/dist/react/core/display/AstroIcon.js +339 -429
  135. package/dist/react/core/display/AstroIcon.js.map +1 -1
  136. package/dist/react/core/display/Badge.d.ts +2 -3
  137. package/dist/react/core/display/Badge.js +131 -131
  138. package/dist/react/core/display/Badge.js.map +1 -1
  139. package/dist/react/core/display/CardHeader.d.ts +0 -1
  140. package/dist/react/core/display/CardHeader.js +398 -311
  141. package/dist/react/core/display/CardHeader.js.map +1 -1
  142. package/dist/react/core/display/Container.d.ts +2 -3
  143. package/dist/react/core/display/Container.js +640 -668
  144. package/dist/react/core/display/Container.js.map +1 -1
  145. package/dist/react/core/display/CopyButton.d.ts +1 -2
  146. package/dist/react/core/display/CopyButton.js +158 -101
  147. package/dist/react/core/display/CopyButton.js.map +1 -1
  148. package/dist/react/core/display/GlassCard.d.ts +3 -4
  149. package/dist/react/core/display/GlassCard.js +416 -369
  150. package/dist/react/core/display/GlassCard.js.map +1 -1
  151. package/dist/react/core/display/HeaderIconWithStatus.d.ts +0 -1
  152. package/dist/react/core/display/HeaderIconWithStatus.js +152 -152
  153. package/dist/react/core/display/HeaderIconWithStatus.js.map +1 -1
  154. package/dist/react/core/display/Icon.d.ts +2 -3
  155. package/dist/react/core/display/Icon.js +172 -143
  156. package/dist/react/core/display/Icon.js.map +1 -1
  157. package/dist/react/core/display/Typography.d.ts +24 -25
  158. package/dist/react/core/display/Typography.js +360 -178
  159. package/dist/react/core/display/Typography.js.map +1 -1
  160. package/dist/react/core/feedback/ConfirmDialog.d.ts +1 -2
  161. package/dist/react/core/feedback/ConfirmDialog.js +343 -304
  162. package/dist/react/core/feedback/ConfirmDialog.js.map +1 -1
  163. package/dist/react/core/feedback/Dialog.d.ts +2 -3
  164. package/dist/react/core/feedback/Dialog.js +189 -197
  165. package/dist/react/core/feedback/Dialog.js.map +1 -1
  166. package/dist/react/core/feedback/Toast.d.ts +2 -3
  167. package/dist/react/core/feedback/Toast.js +346 -207
  168. package/dist/react/core/feedback/Toast.js.map +1 -1
  169. package/dist/react/core/index.d.ts +26 -26
  170. package/dist/react/core/index.js +7 -119
  171. package/dist/react/core/inputs/Button.d.ts +2 -3
  172. package/dist/react/core/inputs/Button.js +281 -304
  173. package/dist/react/core/inputs/Button.js.map +1 -1
  174. package/dist/react/core/inputs/Checkbox.d.ts +2 -3
  175. package/dist/react/core/inputs/Checkbox.js +139 -127
  176. package/dist/react/core/inputs/Checkbox.js.map +1 -1
  177. package/dist/react/core/inputs/Input.d.ts +3 -4
  178. package/dist/react/core/inputs/Input.js +277 -285
  179. package/dist/react/core/inputs/Input.js.map +1 -1
  180. package/dist/react/core/inputs/LimitsBar.d.ts +1 -2
  181. package/dist/react/core/inputs/LimitsBar.js +271 -196
  182. package/dist/react/core/inputs/LimitsBar.js.map +1 -1
  183. package/dist/react/core/inputs/NumberInput.d.ts +2 -3
  184. package/dist/react/core/inputs/NumberInput.js +531 -503
  185. package/dist/react/core/inputs/NumberInput.js.map +1 -1
  186. package/dist/react/core/inputs/PinInput.d.ts +2 -3
  187. package/dist/react/core/inputs/PinInput.js +224 -207
  188. package/dist/react/core/inputs/PinInput.js.map +1 -1
  189. package/dist/react/core/inputs/Select.d.ts +1 -2
  190. package/dist/react/core/inputs/Select.js +298 -299
  191. package/dist/react/core/inputs/Select.js.map +1 -1
  192. package/dist/react/core/inputs/Toggle.d.ts +2 -3
  193. package/dist/react/core/inputs/Toggle.js +142 -148
  194. package/dist/react/core/inputs/Toggle.js.map +1 -1
  195. package/dist/react/core/layout/Box.d.ts +3 -4
  196. package/dist/react/core/layout/Box.js +118 -122
  197. package/dist/react/core/layout/Box.js.map +1 -1
  198. package/dist/react/core/layout/Center.d.ts +0 -1
  199. package/dist/react/core/layout/Center.js +45 -32
  200. package/dist/react/core/layout/Center.js.map +1 -1
  201. package/dist/react/core/layout/Divider.d.ts +1 -2
  202. package/dist/react/core/layout/Divider.js +112 -106
  203. package/dist/react/core/layout/Divider.js.map +1 -1
  204. package/dist/react/core/layout/Flex.d.ts +4 -5
  205. package/dist/react/core/layout/Flex.js +120 -124
  206. package/dist/react/core/layout/Flex.js.map +1 -1
  207. package/dist/react/core/layout/Grid.d.ts +5 -6
  208. package/dist/react/core/layout/Grid.js +131 -138
  209. package/dist/react/core/layout/Grid.js.map +1 -1
  210. package/dist/react/core/layout/Spacer.d.ts +0 -1
  211. package/dist/react/core/layout/Spacer.js +36 -29
  212. package/dist/react/core/layout/Spacer.js.map +1 -1
  213. package/dist/react/core/layout/Stack.d.ts +4 -5
  214. package/dist/react/core/layout/Stack.js +127 -70
  215. package/dist/react/core/layout/Stack.js.map +1 -1
  216. package/dist/react/core/layout/responsive.d.ts +1 -2
  217. package/dist/react/core/layout/responsive.js +25 -19
  218. package/dist/react/core/layout/responsive.js.map +1 -1
  219. package/dist/react/core/layout/useBreakpoint.d.ts +1 -1
  220. package/dist/react/core/layout/useBreakpoint.js +119 -66
  221. package/dist/react/core/layout/useBreakpoint.js.map +1 -1
  222. package/dist/react/core/navigation/AppBar.d.ts +1 -2
  223. package/dist/react/core/navigation/AppBar.js +827 -805
  224. package/dist/react/core/navigation/AppBar.js.map +1 -1
  225. package/dist/react/core/navigation/Pagination.d.ts +2 -3
  226. package/dist/react/core/navigation/Pagination.js +207 -187
  227. package/dist/react/core/navigation/Pagination.js.map +1 -1
  228. package/dist/react/core/navigation/SideNav.d.ts +5 -6
  229. package/dist/react/core/navigation/SideNav.js +855 -629
  230. package/dist/react/core/navigation/SideNav.js.map +1 -1
  231. package/dist/react/core/navigation/Tabs.d.ts +0 -1
  232. package/dist/react/core/navigation/Tabs.js +113 -119
  233. package/dist/react/core/navigation/Tabs.js.map +1 -1
  234. package/dist/react/core/overlays/Popover.d.ts +2 -3
  235. package/dist/react/core/overlays/Popover.js +303 -282
  236. package/dist/react/core/overlays/Popover.js.map +1 -1
  237. package/dist/react/core/overlays/SidePanel.d.ts +1 -2
  238. package/dist/react/core/overlays/SidePanel.js +217 -212
  239. package/dist/react/core/overlays/SidePanel.js.map +1 -1
  240. package/dist/react/core/overlays/Tooltip.d.ts +1 -2
  241. package/dist/react/core/overlays/Tooltip.js +170 -176
  242. package/dist/react/core/overlays/Tooltip.js.map +1 -1
  243. package/dist/react/core/widgets/ActivityPlanner.d.ts +0 -1
  244. package/dist/react/core/widgets/ActivityPlanner.js +855 -517
  245. package/dist/react/core/widgets/ActivityPlanner.js.map +1 -1
  246. package/dist/react/core/widgets/Capture.d.ts +2 -3
  247. package/dist/react/core/widgets/Capture.js +965 -779
  248. package/dist/react/core/widgets/Capture.js.map +1 -1
  249. package/dist/react/core/widgets/ChatPanel.d.ts +16 -17
  250. package/dist/react/core/widgets/ChatPanel.js +1734 -1034
  251. package/dist/react/core/widgets/ChatPanel.js.map +1 -1
  252. package/dist/react/core/widgets/ColorPickerPanel.d.ts +0 -1
  253. package/dist/react/core/widgets/ColorPickerPanel.js +298 -287
  254. package/dist/react/core/widgets/ColorPickerPanel.js.map +1 -1
  255. package/dist/react/core/widgets/CommandBuilder.d.ts +2 -3
  256. package/dist/react/core/widgets/CommandBuilder.js +624 -516
  257. package/dist/react/core/widgets/CommandBuilder.js.map +1 -1
  258. package/dist/react/core/widgets/ConnectionForm.d.ts +2 -3
  259. package/dist/react/core/widgets/ConnectionForm.js +528 -492
  260. package/dist/react/core/widgets/ConnectionForm.js.map +1 -1
  261. package/dist/react/core/widgets/FileExplorer.d.ts +3 -4
  262. package/dist/react/core/widgets/FileExplorer.js +617 -505
  263. package/dist/react/core/widgets/FileExplorer.js.map +1 -1
  264. package/dist/react/core/widgets/HexViewer.d.ts +2 -3
  265. package/dist/react/core/widgets/HexViewer.js +1353 -1091
  266. package/dist/react/core/widgets/HexViewer.js.map +1 -1
  267. package/dist/react/core/widgets/ImageFrame.d.ts +1 -2
  268. package/dist/react/core/widgets/ImageFrame.js +230 -193
  269. package/dist/react/core/widgets/ImageFrame.js.map +1 -1
  270. package/dist/react/core/widgets/ImageGallery.d.ts +2 -1
  271. package/dist/react/core/widgets/ImageGallery.js +380 -314
  272. package/dist/react/core/widgets/ImageGallery.js.map +1 -1
  273. package/dist/react/core/widgets/ImagePanel.d.ts +0 -1
  274. package/dist/react/core/widgets/ImagePanel.js +110 -101
  275. package/dist/react/core/widgets/ImagePanel.js.map +1 -1
  276. package/dist/react/core/widgets/LogViewer.d.ts +2 -3
  277. package/dist/react/core/widgets/LogViewer.js +711 -607
  278. package/dist/react/core/widgets/LogViewer.js.map +1 -1
  279. package/dist/react/core/widgets/MessageStream.d.ts +3 -4
  280. package/dist/react/core/widgets/MessageStream.js +514 -444
  281. package/dist/react/core/widgets/MessageStream.js.map +1 -1
  282. package/dist/react/core/widgets/MissionCalendar.d.ts +3 -4
  283. package/dist/react/core/widgets/MissionCalendar.js +1488 -1020
  284. package/dist/react/core/widgets/MissionCalendar.js.map +1 -1
  285. package/dist/react/core/widgets/PacketViewer.d.ts +2 -3
  286. package/dist/react/core/widgets/PacketViewer.js +550 -421
  287. package/dist/react/core/widgets/PacketViewer.js.map +1 -1
  288. package/dist/react/core/widgets/capture-placeholder.png.js +6 -5
  289. package/dist/react/core/widgets/capture-placeholder.png.js.map +1 -1
  290. package/dist/react/hooks/index.d.ts +5 -5
  291. package/dist/react/hooks/useAccessWindows.d.ts +0 -1
  292. package/dist/react/hooks/useCompactMode.d.ts +1 -1
  293. package/dist/react/hooks/useCompactMode.js +104 -58
  294. package/dist/react/hooks/useCompactMode.js.map +1 -1
  295. package/dist/react/hooks/useGroundTrackHistory.d.ts +0 -1
  296. package/dist/react/hooks/useSimulationScene.d.ts +1 -2
  297. package/dist/react/hooks/useSimulationScene.js +481 -374
  298. package/dist/react/hooks/useSimulationScene.js.map +1 -1
  299. package/dist/react/index.d.ts +3 -3
  300. package/dist/react/panels/LayerControlPanel.d.ts +1 -2
  301. package/dist/react/panels/LayerControlPanel.js +223 -180
  302. package/dist/react/panels/LayerControlPanel.js.map +1 -1
  303. package/dist/react/panels/ObjectInventoryPanel.d.ts +2 -3
  304. package/dist/react/panels/ObjectInventoryPanel.js +315 -250
  305. package/dist/react/panels/ObjectInventoryPanel.js.map +1 -1
  306. package/dist/react/panels/index.d.ts +1 -1
  307. package/dist/react/panels/index.js +1 -6
  308. package/dist/react/shared/ErrorBoundary.d.ts +1 -2
  309. package/dist/react/shared/ErrorBoundary.js +170 -139
  310. package/dist/react/shared/ErrorBoundary.js.map +1 -1
  311. package/dist/react/shared/Skeleton.d.ts +1 -2
  312. package/dist/react/shared/Skeleton.js +300 -301
  313. package/dist/react/shared/Skeleton.js.map +1 -1
  314. package/dist/react/theme/ThemeProvider.d.ts +2 -321
  315. package/dist/react/theme/ThemeProvider.js +313 -939
  316. package/dist/react/theme/ThemeProvider.js.map +1 -1
  317. package/dist/react/theme/cardAccent.d.ts +1 -2
  318. package/dist/react/theme/cardAccent.js +196 -126
  319. package/dist/react/theme/cardAccent.js.map +1 -1
  320. package/dist/react/theme/config.d.ts +0 -1
  321. package/dist/react/theme/config.js +47 -25
  322. package/dist/react/theme/config.js.map +1 -1
  323. package/dist/react/theme/index.d.ts +2 -2
  324. package/dist/react/theme/index.js +1 -16
  325. package/dist/react/theme/types.d.ts +332 -0
  326. package/dist/react/theme/types.js +39 -0
  327. package/dist/react/theme/types.js.map +1 -0
  328. package/dist/react/types.d.ts +8 -8
  329. package/dist/react/types.js +147 -47
  330. package/dist/react/types.js.map +1 -1
  331. package/dist/react/utils/categoryPalette.d.ts +0 -1
  332. package/dist/react/utils/categoryPalette.js +91 -102
  333. package/dist/react/utils/categoryPalette.js.map +1 -1
  334. package/dist/react/utils/index.d.ts +5 -5
  335. package/dist/react/utils/index.js +457 -371
  336. package/dist/react/utils/index.js.map +1 -1
  337. package/dist/react/visualizations/EclipseTimerCard.d.ts +0 -1
  338. package/dist/react/visualizations/LinkBudgetCard.d.ts +0 -1
  339. package/dist/react/visualizations/NavBallCard.d.ts +0 -1
  340. package/dist/react/visualizations/PropulsionCard.d.ts +1 -2
  341. package/dist/react/visualizations/SensorFootprintCard.d.ts +1 -2
  342. package/dist/react/visualizations/ThermalHeatmapCard.d.ts +0 -1
  343. package/dist/react/visualizations/index.d.ts +3 -3
  344. package/dist/react.d.ts +2 -1
  345. package/dist/react.js +17 -221
  346. package/dist/shaders/atmosphere.frag.js +6 -5
  347. package/dist/shaders/atmosphere.frag.js.map +1 -1
  348. package/dist/shaders/atmosphere.vert.js +6 -5
  349. package/dist/shaders/atmosphere.vert.js.map +1 -1
  350. package/dist/shaders/stars.frag.js +6 -5
  351. package/dist/shaders/stars.frag.js.map +1 -1
  352. package/dist/shaders/stars.vert.js +6 -5
  353. package/dist/shaders/stars.vert.js.map +1 -1
  354. package/dist/style.css +26 -3
  355. package/dist/tokens/core.d.ts +159 -0
  356. package/dist/tokens/core.js +144 -0
  357. package/dist/tokens/core.js.map +1 -0
  358. package/dist/tokens/css-vars.d.ts +213 -2
  359. package/dist/tokens/css-vars.js +590 -227
  360. package/dist/tokens/css-vars.js.map +1 -1
  361. package/dist/tokens/index.d.ts +31 -228
  362. package/dist/tokens/index.js +281 -366
  363. package/dist/tokens/index.js.map +1 -1
  364. package/dist/tokens/palettes/astro.d.ts +129 -0
  365. package/dist/tokens/palettes/astro.js +112 -0
  366. package/dist/tokens/palettes/astro.js.map +1 -0
  367. package/dist/tokens/palettes/index.d.ts +288 -0
  368. package/dist/tokens/palettes/index.js +35 -0
  369. package/dist/tokens/palettes/index.js.map +1 -0
  370. package/dist/tokens/palettes/tailwind.d.ts +324 -0
  371. package/dist/tokens/palettes/tailwind.js +201 -0
  372. package/dist/tokens/palettes/tailwind.js.map +1 -0
  373. package/dist/tokens/palettes/zendir.d.ts +126 -0
  374. package/dist/tokens/palettes/zendir.js +92 -0
  375. package/dist/tokens/palettes/zendir.js.map +1 -0
  376. package/dist/tokens/themes.d.ts +30 -0
  377. package/dist/tokens/themes.js +704 -0
  378. package/dist/tokens/themes.js.map +1 -0
  379. package/dist/tokens/tokens.css +533 -155
  380. package/dist/types/index.d.ts +2 -2
  381. package/package.json +310 -313
  382. package/dist/index.js.map +0 -1
  383. package/dist/react/3d/index.js.map +0 -1
  384. package/dist/react/astro/index.js.map +0 -1
  385. package/dist/react/cards/index.js.map +0 -1
  386. package/dist/react/charts/index.js.map +0 -1
  387. package/dist/react/core/index.js.map +0 -1
  388. package/dist/react/panels/index.js.map +0 -1
  389. package/dist/react/theme/astro-tokens.d.ts +0 -153
  390. package/dist/react/theme/index.js.map +0 -1
  391. package/dist/react.js.map +0 -1
@@ -1,442 +1,352 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { memo, useState, useRef, useEffect } from "react";
3
1
  import { useTheme } from "../../theme/ThemeProvider.js";
4
- import { isValidIconName, Icon } from "./Icon.js";
5
- const SIZE_MAP = {
6
- "extra-small": 16,
7
- "small": 24,
8
- "normal": 32,
9
- "large": 48
2
+ import { Icon, isValidIconName } from "./Icon.js";
3
+ import { memo, useEffect, useRef, useState } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/react/core/display/AstroIcon.tsx
6
+ /**
7
+ * @zendir/ui - AstroIcon Component
8
+ *
9
+ * Wrapper around official @astrouxds/react RuxIcon component.
10
+ * Provides all 400+ official Astro UXD icons with consistent API.
11
+ *
12
+ * SECURITY: Uses dynamic import with proper error handling.
13
+ * FLEXIBILITY: Works with or without @astrouxds/react installed.
14
+ *
15
+ * @see https://www.astrouxds.com/components/icon-library/
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { AstroIcon } from '@zendir/ui/react';
20
+ *
21
+ * <AstroIcon name="satellite" />
22
+ * <AstroIcon name="antenna" size="large" />
23
+ * <AstroIcon name="thermal" color="#ff0000" />
24
+ * ```
25
+ */
26
+ var SIZE_MAP = {
27
+ "extra-small": 16,
28
+ small: 24,
29
+ normal: 32,
30
+ large: 48
10
31
  };
11
- const ICON_ALIASES = {
12
- // === Orbit & Trajectory ===
13
- "orbit": "360",
14
- // Orbital path
15
- "trajectory": "360",
16
- // Flight path
17
- "orbital": "360",
18
- // Orbital mechanics
19
- // === Ground Operations ===
20
- "ground-station": "antenna",
21
- // Ground station
22
- "ground-control": "antenna",
23
- // Mission control
24
- "dish": "antenna",
25
- // Antenna dish
26
- "tracking-station": "antenna",
27
- // Tracking facility
28
- // === Communication ===
29
- "uplink": "antenna-transmit",
30
- // Command upload
31
- "downlink": "antenna-receive",
32
- // Data download
33
- "command": "antenna-transmit",
34
- // Send command
35
- "telemetry": "antenna-receive",
36
- // Receive telemetry
37
- "comms": "netcom",
38
- // Communications
39
- "rf": "antenna",
40
- // Radio frequency
41
- "link": "netcom",
42
- // Communication link
43
- "signal": "antenna-transmit",
44
- // Signal transmission
45
- "data-link": "netcom",
46
- // Data link
47
- // === Satellite States ===
48
- "satellite": "satellite-transmit",
49
- // Default satellite (active)
50
- "spacecraft": "satellite-transmit",
51
- // Spacecraft
52
- "vehicle": "satellite-transmit",
53
- // Space vehicle
54
- "sat": "satellite-transmit",
55
- // Abbreviation
56
- "sc": "satellite-transmit",
57
- // Spacecraft abbreviation
58
- // === Power Systems ===
59
- "power": "propulsion-power",
60
- // Power system
61
- "battery": "battery-full",
62
- // Battery status
63
- "energy": "propulsion-power",
64
- // Energy management
65
- "solar-array": "solar",
66
- // Solar arrays
67
- "solar-panel": "solar",
68
- // Solar panels
69
- "photovoltaic": "solar",
70
- // PV system
71
- // === Propulsion ===
72
- "thruster": "propulsion-power",
73
- // Thruster
74
- "engine": "propulsion-power",
75
- // Engine
76
- "burn": "propulsion-power",
77
- // Burn/maneuver
78
- "maneuver": "propulsion-power",
79
- // Orbital maneuver
80
- "delta-v": "propulsion-power",
81
- // Delta-V
82
- "rcs": "propulsion-power",
83
- // Reaction control system
84
- // === Thermal ===
85
- "temperature": "thermal",
86
- // Temperature
87
- "heat": "thermal",
88
- // Heat management
89
- "cooling": "thermal",
90
- // Cooling system
91
- "heater": "thermal",
92
- // Heater
93
- // === Attitude & Control ===
94
- "attitude": "explore",
95
- // Attitude control
96
- "pointing": "explore",
97
- // Pointing direction
98
- "orientation": "explore",
99
- // Spacecraft orientation
100
- "adcs": "explore",
101
- // Attitude determination & control
102
- "gyro": "explore",
103
- // Gyroscope
104
- "gyroscope": "explore",
105
- // Gyroscope
106
- // === Navigation ===
107
- "gps": "gps-fixed",
108
- // GPS/GNSS
109
- "gnss": "gps-fixed",
110
- // Global navigation
111
- "position": "gps-fixed",
112
- // Position
113
- "location": "place",
114
- // Location
115
- "ephemeris": "timeline",
116
- // Ephemeris data
117
- // === Status & Health ===
118
- "health": "favorite",
119
- // System health
120
- "status": "info",
121
- // Status indicator
122
- "nominal": "check-circle",
123
- // Nominal/OK
124
- "anomaly": "error",
125
- // Anomaly detected
126
- "fault": "error",
127
- // Fault condition
128
- "safe-mode": "warning",
129
- // Safe mode
130
- "emergency": "warning",
131
- // Emergency
132
- "critical": "error",
133
- // Critical status
134
- "caution": "warning",
135
- // Caution
136
- // === Time & Scheduling ===
137
- "pass": "schedule",
138
- // Satellite pass
139
- "contact": "schedule",
140
- // Ground contact
141
- "access": "schedule",
142
- // Access window
143
- "window": "schedule",
144
- // Time window
145
- "aos": "schedule",
146
- // Acquisition of signal
147
- "los": "schedule",
148
- // Loss of signal
149
- "eclipse": "brightness-3",
150
- // Eclipse period
151
- "sunlight": "wb-sunny",
152
- // In sunlight
153
- "shadow": "brightness-3",
154
- // In shadow
155
- // === Subsystems ===
156
- "subsystem": "developer-board",
157
- // Generic subsystem
158
- "computer": "memory",
159
- // Onboard computer
160
- "obc": "memory",
161
- // Onboard computer
162
- "cdh": "memory",
163
- // Command & data handling
164
- "flight-computer": "memory",
165
- // Flight computer
166
- "sensor": "settings-input-component",
167
- // Sensor
168
- "instrument": "settings-input-component",
169
- // Instrument
170
- // === Launch & Deployment ===
171
- "launch": "flight-takeoff",
172
- // Launch
173
- "rocket": "flight-takeoff",
174
- // Rocket
175
- "liftoff": "flight-takeoff",
176
- // Liftoff
177
- "deployment": "open-in-new",
178
- // Deployment
179
- "deploy": "open-in-new",
180
- // Deploy
181
- "separation": "call-split",
182
- // Stage separation
183
- // === Operations ===
184
- "ops": "build",
185
- // Operations
186
- "operations": "build",
187
- // Operations
188
- "control": "tune",
189
- // Control
190
- "automation": "autorenew",
191
- // Automation
192
- "sequence": "playlist-play",
193
- // Command sequence
194
- "procedure": "list",
195
- // Procedure
196
- // === Data & Storage ===
197
- "storage": "sd-storage",
198
- // Data storage
199
- "memory": "memory",
200
- // Memory
201
- "recorder": "fiber-dvr",
202
- // Data recorder
203
- "playback": "play-arrow",
204
- // Playback
205
- "record": "fiber-manual-record",
206
- // Recording
207
- // === Monitoring ===
208
- "monitor": "desktop-mac",
209
- // Monitoring
210
- "dashboard": "dashboard",
211
- // Dashboard
212
- "console": "desktop-windows",
213
- // Console
214
- "display": "tv",
215
- // Display
216
- // === Crew (if applicable) ===
217
- "astronaut": "person",
218
- // Astronaut
219
- "crew": "group",
220
- // Crew
221
- "eva": "directions-walk"
222
- // Extra-vehicular activity
32
+ /**
33
+ * Space Operations Icon Aliases
34
+ * Maps common space terminology to existing Astro icons.
35
+ * Provides better developer experience with intuitive naming.
36
+ */
37
+ var ICON_ALIASES = {
38
+ orbit: "360",
39
+ trajectory: "360",
40
+ orbital: "360",
41
+ "ground-station": "antenna",
42
+ "ground-control": "antenna",
43
+ dish: "antenna",
44
+ "tracking-station": "antenna",
45
+ uplink: "antenna-transmit",
46
+ downlink: "antenna-receive",
47
+ command: "antenna-transmit",
48
+ telemetry: "antenna-receive",
49
+ comms: "netcom",
50
+ rf: "antenna",
51
+ link: "netcom",
52
+ signal: "antenna-transmit",
53
+ "data-link": "netcom",
54
+ satellite: "satellite-transmit",
55
+ spacecraft: "satellite-transmit",
56
+ vehicle: "satellite-transmit",
57
+ sat: "satellite-transmit",
58
+ sc: "satellite-transmit",
59
+ power: "propulsion-power",
60
+ battery: "battery-full",
61
+ energy: "propulsion-power",
62
+ "solar-array": "solar",
63
+ "solar-panel": "solar",
64
+ photovoltaic: "solar",
65
+ thruster: "propulsion-power",
66
+ engine: "propulsion-power",
67
+ burn: "propulsion-power",
68
+ maneuver: "propulsion-power",
69
+ "delta-v": "propulsion-power",
70
+ rcs: "propulsion-power",
71
+ temperature: "thermal",
72
+ heat: "thermal",
73
+ cooling: "thermal",
74
+ heater: "thermal",
75
+ attitude: "explore",
76
+ pointing: "explore",
77
+ orientation: "explore",
78
+ adcs: "explore",
79
+ gyro: "explore",
80
+ gyroscope: "explore",
81
+ gps: "gps-fixed",
82
+ gnss: "gps-fixed",
83
+ position: "gps-fixed",
84
+ location: "place",
85
+ ephemeris: "timeline",
86
+ health: "favorite",
87
+ status: "info",
88
+ nominal: "check-circle",
89
+ anomaly: "error",
90
+ fault: "error",
91
+ "safe-mode": "warning",
92
+ emergency: "warning",
93
+ critical: "error",
94
+ caution: "warning",
95
+ pass: "schedule",
96
+ contact: "schedule",
97
+ access: "schedule",
98
+ window: "schedule",
99
+ aos: "schedule",
100
+ los: "schedule",
101
+ eclipse: "brightness-3",
102
+ sunlight: "wb-sunny",
103
+ shadow: "brightness-3",
104
+ subsystem: "developer-board",
105
+ computer: "memory",
106
+ obc: "memory",
107
+ cdh: "memory",
108
+ "flight-computer": "memory",
109
+ sensor: "settings-input-component",
110
+ instrument: "settings-input-component",
111
+ launch: "flight-takeoff",
112
+ rocket: "flight-takeoff",
113
+ liftoff: "flight-takeoff",
114
+ deployment: "open-in-new",
115
+ deploy: "open-in-new",
116
+ separation: "call-split",
117
+ ops: "build",
118
+ operations: "build",
119
+ control: "tune",
120
+ automation: "autorenew",
121
+ sequence: "playlist-play",
122
+ procedure: "list",
123
+ storage: "sd-storage",
124
+ memory: "memory",
125
+ recorder: "fiber-dvr",
126
+ playback: "play-arrow",
127
+ record: "fiber-manual-record",
128
+ monitor: "desktop-mac",
129
+ dashboard: "dashboard",
130
+ console: "desktop-windows",
131
+ display: "tv",
132
+ astronaut: "person",
133
+ crew: "group",
134
+ eva: "directions-walk"
223
135
  };
136
+ /**
137
+ * Resolve icon alias to actual Astro icon name
138
+ */
224
139
  function resolveIconAlias(name) {
225
- return ICON_ALIASES[name] || name;
140
+ return ICON_ALIASES[name] || name;
226
141
  }
227
- let loadState = "pending";
228
- let RuxIconComponent = null;
229
- const subscribers = /* @__PURE__ */ new Set();
142
+ var loadState = "pending";
143
+ var RuxIconComponent = null;
144
+ var subscribers = /* @__PURE__ */ new Set();
230
145
  function subscribe(callback) {
231
- subscribers.add(callback);
232
- return () => subscribers.delete(callback);
146
+ subscribers.add(callback);
147
+ return () => subscribers.delete(callback);
233
148
  }
234
149
  function notifySubscribers() {
235
- subscribers.forEach((cb) => cb());
150
+ subscribers.forEach((cb) => cb());
236
151
  }
152
+ /**
153
+ * Safely load RuxIcon from @astrouxds/react
154
+ * Returns null if not available
155
+ */
237
156
  async function loadRuxIcon() {
238
- if (loadState === "loaded") {
239
- return RuxIconComponent;
240
- }
241
- if (loadState === "failed") {
242
- return null;
243
- }
244
- if (loadState === "loading") {
245
- return new Promise((resolve) => {
246
- const unsub = subscribe(() => {
247
- unsub();
248
- resolve(RuxIconComponent);
249
- });
250
- });
251
- }
252
- loadState = "loading";
253
- try {
254
- const astroModule = await import("@astrouxds/react");
255
- RuxIconComponent = astroModule.RuxIcon;
256
- loadState = "loaded";
257
- notifySubscribers();
258
- return RuxIconComponent;
259
- } catch (err) {
260
- loadState = "failed";
261
- notifySubscribers();
262
- return null;
263
- }
157
+ if (loadState === "loaded") return RuxIconComponent;
158
+ if (loadState === "failed") return null;
159
+ if (loadState === "loading") return new Promise((resolve) => {
160
+ const unsub = subscribe(() => {
161
+ unsub();
162
+ resolve(RuxIconComponent);
163
+ });
164
+ });
165
+ loadState = "loading";
166
+ try {
167
+ RuxIconComponent = (await import("@astrouxds/react")).RuxIcon;
168
+ loadState = "loaded";
169
+ notifySubscribers();
170
+ return RuxIconComponent;
171
+ } catch (err) {
172
+ loadState = "failed";
173
+ notifySubscribers();
174
+ return null;
175
+ }
264
176
  }
265
- function FallbackIcon({
266
- name,
267
- size,
268
- color,
269
- label,
270
- className,
271
- style,
272
- onClick,
273
- "data-testid": testId
274
- }) {
275
- const { tokens } = useTheme();
276
- const actualSize = typeof size === "number" ? size : SIZE_MAP[size || "normal"];
277
- if (isValidIconName(name)) {
278
- return /* @__PURE__ */ jsx(
279
- Icon,
280
- {
281
- name,
282
- size: actualSize,
283
- color,
284
- className,
285
- "aria-label": label || name,
286
- onClick,
287
- style
288
- }
289
- );
290
- }
291
- return /* @__PURE__ */ jsx(
292
- "span",
293
- {
294
- role: "img",
295
- "aria-label": label || name,
296
- className,
297
- "data-testid": testId,
298
- onClick,
299
- tabIndex: onClick ? 0 : void 0,
300
- onKeyDown: onClick ? (e) => e.key === "Enter" && onClick() : void 0,
301
- style: {
302
- display: "inline-flex",
303
- alignItems: "center",
304
- justifyContent: "center",
305
- width: actualSize,
306
- height: actualSize,
307
- fontSize: actualSize * 0.4,
308
- fontFamily: tokens.typography.fontFamily.mono,
309
- fontWeight: 700,
310
- color: color || tokens.colors.status.off,
311
- backgroundColor: tokens.colors.background.surface,
312
- border: `1px solid ${tokens.colors.border.default}`,
313
- borderRadius: 4,
314
- cursor: onClick ? "pointer" : "default",
315
- userSelect: "none",
316
- ...style
317
- },
318
- title: `Icon: ${name} (install @astrouxds/react for official icons)`,
319
- children: /* @__PURE__ */ jsxs(
320
- "svg",
321
- {
322
- width: actualSize * 0.6,
323
- height: actualSize * 0.6,
324
- viewBox: "0 0 24 24",
325
- fill: "currentColor",
326
- children: [
327
- /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
328
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" })
329
- ]
330
- }
331
- )
332
- }
333
- );
177
+ /**
178
+ * Fallback icon component when @astrouxds/react is not installed.
179
+ * Uses built-in Icon SVGs when the name matches, otherwise shows a generic placeholder.
180
+ */
181
+ function FallbackIcon({ name, size, color, label, className, style, onClick, "data-testid": testId }) {
182
+ const { tokens } = useTheme();
183
+ const actualSize = typeof size === "number" ? size : SIZE_MAP[size || "normal"];
184
+ if (isValidIconName(name)) return /* @__PURE__ */ jsx(Icon, {
185
+ name,
186
+ size: actualSize,
187
+ color,
188
+ className,
189
+ "aria-label": label || name,
190
+ onClick,
191
+ style
192
+ });
193
+ return /* @__PURE__ */ jsx("span", {
194
+ role: "img",
195
+ "aria-label": label || name,
196
+ className,
197
+ "data-testid": testId,
198
+ onClick,
199
+ tabIndex: onClick ? 0 : void 0,
200
+ onKeyDown: onClick ? (e) => e.key === "Enter" && onClick() : void 0,
201
+ style: {
202
+ display: "inline-flex",
203
+ alignItems: "center",
204
+ justifyContent: "center",
205
+ width: actualSize,
206
+ height: actualSize,
207
+ fontSize: actualSize * .4,
208
+ fontFamily: tokens.typography.fontFamily.mono,
209
+ fontWeight: 700,
210
+ color: color || tokens.colors.status.off,
211
+ backgroundColor: tokens.colors.background.surface,
212
+ border: `1px solid ${tokens.colors.border.default}`,
213
+ borderRadius: 4,
214
+ cursor: onClick ? "pointer" : "default",
215
+ userSelect: "none",
216
+ ...style
217
+ },
218
+ title: `Icon: ${name} (install @astrouxds/react for official icons)`,
219
+ children: /* @__PURE__ */ jsxs("svg", {
220
+ width: actualSize * .6,
221
+ height: actualSize * .6,
222
+ viewBox: "0 0 24 24",
223
+ fill: "currentColor",
224
+ children: [/* @__PURE__ */ jsx("rect", {
225
+ x: "3",
226
+ y: "3",
227
+ width: "18",
228
+ height: "18",
229
+ rx: "2",
230
+ fill: "none",
231
+ stroke: "currentColor",
232
+ strokeWidth: "1.5"
233
+ }), /* @__PURE__ */ jsx("circle", {
234
+ cx: "12",
235
+ cy: "12",
236
+ r: "2",
237
+ fill: "currentColor"
238
+ })]
239
+ })
240
+ });
334
241
  }
335
- const AstroIcon = memo(function AstroIcon2(props) {
336
- const {
337
- name,
338
- size = "normal",
339
- color,
340
- label,
341
- className,
342
- style,
343
- onClick,
344
- "data-testid": testId
345
- } = props;
346
- const [, forceUpdate] = useState(0);
347
- const [currentState, setCurrentState] = useState(loadState);
348
- const mountedRef = useRef(true);
349
- useEffect(() => {
350
- mountedRef.current = true;
351
- const unsubscribe = subscribe(() => {
352
- if (mountedRef.current) {
353
- setCurrentState(loadState);
354
- forceUpdate((n) => n + 1);
355
- }
356
- });
357
- if (loadState === "pending") {
358
- loadRuxIcon();
359
- }
360
- return () => {
361
- mountedRef.current = false;
362
- unsubscribe();
363
- };
364
- }, []);
365
- if (currentState === "pending" || currentState === "loading") {
366
- const actualSize = typeof size === "number" ? size : SIZE_MAP[size];
367
- return /* @__PURE__ */ jsx(
368
- "span",
369
- {
370
- style: {
371
- display: "inline-block",
372
- width: actualSize,
373
- height: actualSize,
374
- ...style
375
- },
376
- className,
377
- "aria-hidden": "true"
378
- }
379
- );
380
- }
381
- const resolvedName = resolveIconAlias(name);
382
- if (RuxIconComponent) {
383
- const RuxIcon = RuxIconComponent;
384
- const pixelSize = typeof size === "number" ? size : SIZE_MAP[size];
385
- const getClosestAstroSize = (px) => {
386
- if (px <= 18) return "extra-small";
387
- if (px <= 28) return "small";
388
- if (px <= 40) return "normal";
389
- return "large";
390
- };
391
- const astroSize = typeof size === "number" ? getClosestAstroSize(size) : size;
392
- const iconColor = color || "var(--color-status-off, #a4abb6)";
393
- return /* @__PURE__ */ jsx(
394
- "span",
395
- {
396
- role: "img",
397
- "aria-label": label || name,
398
- style: {
399
- display: "inline-flex",
400
- alignItems: "center",
401
- justifyContent: "center",
402
- width: pixelSize,
403
- height: pixelSize,
404
- minWidth: pixelSize,
405
- minHeight: pixelSize,
406
- flexShrink: 0,
407
- // Don't use overflow:hidden - it clips the icon SVG
408
- ...style
409
- },
410
- className,
411
- children: /* @__PURE__ */ jsx(
412
- RuxIcon,
413
- {
414
- icon: resolvedName,
415
- size: astroSize,
416
- label: label || name,
417
- "data-testid": testId,
418
- onClick,
419
- style: {
420
- // Force the RuxIcon to respect our exact pixel size
421
- "--iconDefaultSize": `${pixelSize}px`,
422
- "--iconSize": `${pixelSize}px`,
423
- "--size": `${pixelSize}px`,
424
- color: iconColor,
425
- width: `${pixelSize}px`,
426
- height: `${pixelSize}px`,
427
- display: "flex",
428
- alignItems: "center",
429
- justifyContent: "center",
430
- ...onClick && { cursor: "pointer" }
431
- }
432
- }
433
- )
434
- }
435
- );
436
- }
437
- return /* @__PURE__ */ jsx(FallbackIcon, { ...props, name: resolvedName });
242
+ /**
243
+ * AstroIcon - Official Astro UXD Icons
244
+ *
245
+ * Displays icons from the official Astro UX Design System.
246
+ * Automatically uses @astrouxds/react if installed, otherwise shows fallback.
247
+ *
248
+ * @example
249
+ * ```tsx
250
+ * // Basic usage
251
+ * <AstroIcon name="satellite" />
252
+ *
253
+ * // With size
254
+ * <AstroIcon name="antenna" size="large" />
255
+ * <AstroIcon name="thermal" size={48} />
256
+ *
257
+ * // With color
258
+ * <AstroIcon name="warning" color="var(--zendir-status-caution)" />
259
+ *
260
+ * // With click handler
261
+ * <AstroIcon name="settings" onClick={() => openSettings()} />
262
+ * ```
263
+ */
264
+ var AstroIcon = memo(function AstroIcon(props) {
265
+ const { name, size = "normal", color, label, className, style, onClick, "data-testid": testId } = props;
266
+ const [, forceUpdate] = useState(0);
267
+ const [currentState, setCurrentState] = useState(loadState);
268
+ const mountedRef = useRef(true);
269
+ useEffect(() => {
270
+ mountedRef.current = true;
271
+ const unsubscribe = subscribe(() => {
272
+ if (mountedRef.current) {
273
+ setCurrentState(loadState);
274
+ forceUpdate((n) => n + 1);
275
+ }
276
+ });
277
+ if (loadState === "pending") loadRuxIcon();
278
+ return () => {
279
+ mountedRef.current = false;
280
+ unsubscribe();
281
+ };
282
+ }, []);
283
+ if (currentState === "pending" || currentState === "loading") {
284
+ const actualSize = typeof size === "number" ? size : SIZE_MAP[size];
285
+ return /* @__PURE__ */ jsx("span", {
286
+ style: {
287
+ display: "inline-block",
288
+ width: actualSize,
289
+ height: actualSize,
290
+ ...style
291
+ },
292
+ className,
293
+ "aria-hidden": "true"
294
+ });
295
+ }
296
+ const resolvedName = resolveIconAlias(name);
297
+ if (RuxIconComponent) {
298
+ const RuxIcon = RuxIconComponent;
299
+ const pixelSize = typeof size === "number" ? size : SIZE_MAP[size];
300
+ const getClosestAstroSize = (px) => {
301
+ if (px <= 18) return "extra-small";
302
+ if (px <= 28) return "small";
303
+ if (px <= 40) return "normal";
304
+ return "large";
305
+ };
306
+ const astroSize = typeof size === "number" ? getClosestAstroSize(size) : size;
307
+ const iconColor = color || "var(--zendir-status-off, #a4abb6)";
308
+ return /* @__PURE__ */ jsx("span", {
309
+ role: "img",
310
+ "aria-label": label || name,
311
+ style: {
312
+ display: "inline-flex",
313
+ alignItems: "center",
314
+ justifyContent: "center",
315
+ width: pixelSize,
316
+ height: pixelSize,
317
+ minWidth: pixelSize,
318
+ minHeight: pixelSize,
319
+ flexShrink: 0,
320
+ ...style
321
+ },
322
+ className,
323
+ children: /* @__PURE__ */ jsx(RuxIcon, {
324
+ icon: resolvedName,
325
+ size: astroSize,
326
+ label: label || name,
327
+ "data-testid": testId,
328
+ onClick,
329
+ style: {
330
+ "--iconDefaultSize": `${pixelSize}px`,
331
+ "--iconSize": `${pixelSize}px`,
332
+ "--size": `${pixelSize}px`,
333
+ color: iconColor,
334
+ width: `${pixelSize}px`,
335
+ height: `${pixelSize}px`,
336
+ display: "flex",
337
+ alignItems: "center",
338
+ justifyContent: "center",
339
+ ...onClick && { cursor: "pointer" }
340
+ }
341
+ })
342
+ });
343
+ }
344
+ return /* @__PURE__ */ jsx(FallbackIcon, {
345
+ ...props,
346
+ name: resolvedName
347
+ });
438
348
  });
439
- export {
440
- AstroIcon
441
- };
442
- //# sourceMappingURL=AstroIcon.js.map
349
+ //#endregion
350
+ export { AstroIcon, AstroIcon as default };
351
+
352
+ //# sourceMappingURL=AstroIcon.js.map