@zendir/ui 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +640 -631
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/index.js +17 -221
  5. package/dist/react/3d/CesiumCaptureSource.d.ts +0 -1
  6. package/dist/react/3d/CesiumCaptureSource.js +364 -283
  7. package/dist/react/3d/CesiumCaptureSource.js.map +1 -1
  8. package/dist/react/3d/ZenSpace3D.d.ts +2 -3
  9. package/dist/react/3d/ZenSpace3D.js +1681 -1237
  10. package/dist/react/3d/ZenSpace3D.js.map +1 -1
  11. package/dist/react/3d/ZenSpace3DCesium.d.ts +0 -1
  12. package/dist/react/3d/ZenSpace3DCesium.js +513 -560
  13. package/dist/react/3d/ZenSpace3DCesium.js.map +1 -1
  14. package/dist/react/3d/ZenSpace3DShaders.js +61 -66
  15. package/dist/react/3d/ZenSpace3DShaders.js.map +1 -1
  16. package/dist/react/3d/ZenSpace3DTypes.d.ts +19 -20
  17. package/dist/react/3d/ZenSpace3DUtils.d.ts +0 -1
  18. package/dist/react/3d/ZenSpace3DUtils.js +37 -24
  19. package/dist/react/3d/ZenSpace3DUtils.js.map +1 -1
  20. package/dist/react/3d/capturePngAnalysis.js +42 -36
  21. package/dist/react/3d/capturePngAnalysis.js.map +1 -1
  22. package/dist/react/3d/index.d.ts +3 -3
  23. package/dist/react/3d/index.js +5 -53
  24. package/dist/react/3d/threeLoader.d.ts +1 -1
  25. package/dist/react/3d/threeLoader.js +23 -18
  26. package/dist/react/3d/threeLoader.js.map +1 -1
  27. package/dist/react/astro/ClassificationBanner.d.ts +2 -3
  28. package/dist/react/astro/ClassificationBanner.js +95 -79
  29. package/dist/react/astro/ClassificationBanner.js.map +1 -1
  30. package/dist/react/astro/GlobalStatusBar.d.ts +0 -1
  31. package/dist/react/astro/GlobalStatusBar.js +157 -163
  32. package/dist/react/astro/GlobalStatusBar.js.map +1 -1
  33. package/dist/react/astro/MissionClock.d.ts +7 -8
  34. package/dist/react/astro/MissionClock.js +377 -400
  35. package/dist/react/astro/MissionClock.js.map +1 -1
  36. package/dist/react/astro/MonitoringIcon.d.ts +1 -2
  37. package/dist/react/astro/MonitoringIcon.js +422 -358
  38. package/dist/react/astro/MonitoringIcon.js.map +1 -1
  39. package/dist/react/astro/Notification.d.ts +1 -2
  40. package/dist/react/astro/Notification.js +229 -126
  41. package/dist/react/astro/Notification.js.map +1 -1
  42. package/dist/react/astro/Progress.d.ts +0 -1
  43. package/dist/react/astro/Progress.js +199 -141
  44. package/dist/react/astro/Progress.js.map +1 -1
  45. package/dist/react/astro/SimulationControls.d.ts +3 -4
  46. package/dist/react/astro/SimulationControls.js +596 -650
  47. package/dist/react/astro/SimulationControls.js.map +1 -1
  48. package/dist/react/astro/StatusIndicator.d.ts +0 -1
  49. package/dist/react/astro/StatusIndicator.js +236 -170
  50. package/dist/react/astro/StatusIndicator.js.map +1 -1
  51. package/dist/react/astro/UnifiedTimeline.d.ts +9 -10
  52. package/dist/react/astro/UnifiedTimeline.js +2345 -2392
  53. package/dist/react/astro/UnifiedTimeline.js.map +1 -1
  54. package/dist/react/astro/index.d.ts +5 -5
  55. package/dist/react/astro/index.js +1 -25
  56. package/dist/react/cards/AccessCard.d.ts +0 -1
  57. package/dist/react/cards/AccessCard.js +471 -405
  58. package/dist/react/cards/AccessCard.js.map +1 -1
  59. package/dist/react/cards/OrbitCard.d.ts +0 -1
  60. package/dist/react/cards/OrbitCard.js +487 -364
  61. package/dist/react/cards/OrbitCard.js.map +1 -1
  62. package/dist/react/cards/SpacecraftCard.d.ts +0 -1
  63. package/dist/react/cards/SpacecraftCard.js +813 -925
  64. package/dist/react/cards/SpacecraftCard.js.map +1 -1
  65. package/dist/react/cards/TelemetryCard.d.ts +0 -1
  66. package/dist/react/cards/TelemetryCard.js +1055 -732
  67. package/dist/react/cards/TelemetryCard.js.map +1 -1
  68. package/dist/react/cards/TelemetryStreamCard.d.ts +0 -1
  69. package/dist/react/cards/TelemetryStreamCard.js +323 -297
  70. package/dist/react/cards/TelemetryStreamCard.js.map +1 -1
  71. package/dist/react/cards/index.d.ts +1 -1
  72. package/dist/react/cards/index.js +1 -8
  73. package/dist/react/charts/GroundTrackMap.d.ts +6 -7
  74. package/dist/react/charts/GroundTrackMap.js +1377 -1256
  75. package/dist/react/charts/GroundTrackMap.js.map +1 -1
  76. package/dist/react/charts/GroundTrackMapLeaflet.d.ts +1 -2
  77. package/dist/react/charts/GroundTrackMapLeaflet.js +1065 -987
  78. package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -1
  79. package/dist/react/charts/groundTrackMapLeafletTiles.js +34 -25
  80. package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -1
  81. package/dist/react/charts/groundTrackMapLeafletUtils.js +70 -61
  82. package/dist/react/charts/groundTrackMapLeafletUtils.js.map +1 -1
  83. package/dist/react/charts/index.d.ts +1 -1
  84. package/dist/react/charts/index.js +7 -100
  85. package/dist/react/charts/unified/AstroChart.d.ts +1 -2
  86. package/dist/react/charts/unified/AstroChart.js +1331 -1411
  87. package/dist/react/charts/unified/AstroChart.js.map +1 -1
  88. package/dist/react/charts/unified/PowerOverviewChart.d.ts +3 -3
  89. package/dist/react/charts/unified/PowerOverviewChart.js +495 -478
  90. package/dist/react/charts/unified/PowerOverviewChart.js.map +1 -1
  91. package/dist/react/charts/unified/domain.d.ts +12 -13
  92. package/dist/react/charts/unified/domain.js +3999 -3145
  93. package/dist/react/charts/unified/domain.js.map +1 -1
  94. package/dist/react/charts/unified/generators.d.ts +3 -4
  95. package/dist/react/charts/unified/generators.js +561 -498
  96. package/dist/react/charts/unified/generators.js.map +1 -1
  97. package/dist/react/charts/unified/index.d.ts +1 -1
  98. package/dist/react/charts/unified/presets.d.ts +14 -15
  99. package/dist/react/charts/unified/presets.js +857 -994
  100. package/dist/react/charts/unified/presets.js.map +1 -1
  101. package/dist/react/charts/unified/sync.d.ts +2 -3
  102. package/dist/react/charts/unified/sync.js +229 -195
  103. package/dist/react/charts/unified/sync.js.map +1 -1
  104. package/dist/react/charts/unified/theme.d.ts +11 -12
  105. package/dist/react/charts/unified/theme.js +606 -642
  106. package/dist/react/charts/unified/theme.js.map +1 -1
  107. package/dist/react/charts/unified/types.d.ts +32 -33
  108. package/dist/react/charts/unified/useChartStream.d.ts +1 -2
  109. package/dist/react/charts/unified/useChartStream.js +203 -216
  110. package/dist/react/charts/unified/useChartStream.js.map +1 -1
  111. package/dist/react/chatgpt/AppCard.d.ts +1 -2
  112. package/dist/react/chatgpt/index.d.ts +7 -7
  113. package/dist/react/chatgpt/index.js +160 -139
  114. package/dist/react/chatgpt/index.js.map +1 -1
  115. package/dist/react/context/CategoryContext.d.ts +0 -1
  116. package/dist/react/context/CategoryContext.js +78 -29
  117. package/dist/react/context/CategoryContext.js.map +1 -1
  118. package/dist/react/context/DisplaySettingsContext.d.ts +1 -2
  119. package/dist/react/context/DisplaySettingsContext.js +205 -156
  120. package/dist/react/context/DisplaySettingsContext.js.map +1 -1
  121. package/dist/react/context/SpatialSelectionContext.d.ts +0 -1
  122. package/dist/react/context/SpatialSelectionContext.js +36 -7
  123. package/dist/react/context/SpatialSelectionContext.js.map +1 -1
  124. package/dist/react/core/data/DataTable.d.ts +3 -4
  125. package/dist/react/core/data/DataTable.js +473 -440
  126. package/dist/react/core/data/DataTable.js.map +1 -1
  127. package/dist/react/core/data/DataValue.d.ts +4 -5
  128. package/dist/react/core/data/DataValue.js +605 -571
  129. package/dist/react/core/data/DataValue.js.map +1 -1
  130. package/dist/react/core/data/propertyConfig.d.ts +1 -2
  131. package/dist/react/core/data/propertyConfig.js +446 -382
  132. package/dist/react/core/data/propertyConfig.js.map +1 -1
  133. package/dist/react/core/display/AstroIcon.d.ts +4 -5
  134. package/dist/react/core/display/AstroIcon.js +339 -429
  135. package/dist/react/core/display/AstroIcon.js.map +1 -1
  136. package/dist/react/core/display/Badge.d.ts +2 -3
  137. package/dist/react/core/display/Badge.js +131 -131
  138. package/dist/react/core/display/Badge.js.map +1 -1
  139. package/dist/react/core/display/CardHeader.d.ts +0 -1
  140. package/dist/react/core/display/CardHeader.js +398 -311
  141. package/dist/react/core/display/CardHeader.js.map +1 -1
  142. package/dist/react/core/display/Container.d.ts +2 -3
  143. package/dist/react/core/display/Container.js +640 -668
  144. package/dist/react/core/display/Container.js.map +1 -1
  145. package/dist/react/core/display/CopyButton.d.ts +1 -2
  146. package/dist/react/core/display/CopyButton.js +158 -101
  147. package/dist/react/core/display/CopyButton.js.map +1 -1
  148. package/dist/react/core/display/GlassCard.d.ts +3 -4
  149. package/dist/react/core/display/GlassCard.js +416 -369
  150. package/dist/react/core/display/GlassCard.js.map +1 -1
  151. package/dist/react/core/display/HeaderIconWithStatus.d.ts +0 -1
  152. package/dist/react/core/display/HeaderIconWithStatus.js +152 -152
  153. package/dist/react/core/display/HeaderIconWithStatus.js.map +1 -1
  154. package/dist/react/core/display/Icon.d.ts +2 -3
  155. package/dist/react/core/display/Icon.js +172 -143
  156. package/dist/react/core/display/Icon.js.map +1 -1
  157. package/dist/react/core/display/Typography.d.ts +24 -25
  158. package/dist/react/core/display/Typography.js +360 -178
  159. package/dist/react/core/display/Typography.js.map +1 -1
  160. package/dist/react/core/feedback/ConfirmDialog.d.ts +1 -2
  161. package/dist/react/core/feedback/ConfirmDialog.js +343 -304
  162. package/dist/react/core/feedback/ConfirmDialog.js.map +1 -1
  163. package/dist/react/core/feedback/Dialog.d.ts +2 -3
  164. package/dist/react/core/feedback/Dialog.js +189 -197
  165. package/dist/react/core/feedback/Dialog.js.map +1 -1
  166. package/dist/react/core/feedback/Toast.d.ts +2 -3
  167. package/dist/react/core/feedback/Toast.js +346 -207
  168. package/dist/react/core/feedback/Toast.js.map +1 -1
  169. package/dist/react/core/index.d.ts +26 -26
  170. package/dist/react/core/index.js +7 -119
  171. package/dist/react/core/inputs/Button.d.ts +2 -3
  172. package/dist/react/core/inputs/Button.js +281 -304
  173. package/dist/react/core/inputs/Button.js.map +1 -1
  174. package/dist/react/core/inputs/Checkbox.d.ts +2 -3
  175. package/dist/react/core/inputs/Checkbox.js +139 -127
  176. package/dist/react/core/inputs/Checkbox.js.map +1 -1
  177. package/dist/react/core/inputs/Input.d.ts +3 -4
  178. package/dist/react/core/inputs/Input.js +277 -285
  179. package/dist/react/core/inputs/Input.js.map +1 -1
  180. package/dist/react/core/inputs/LimitsBar.d.ts +1 -2
  181. package/dist/react/core/inputs/LimitsBar.js +271 -196
  182. package/dist/react/core/inputs/LimitsBar.js.map +1 -1
  183. package/dist/react/core/inputs/NumberInput.d.ts +2 -3
  184. package/dist/react/core/inputs/NumberInput.js +531 -503
  185. package/dist/react/core/inputs/NumberInput.js.map +1 -1
  186. package/dist/react/core/inputs/PinInput.d.ts +2 -3
  187. package/dist/react/core/inputs/PinInput.js +224 -207
  188. package/dist/react/core/inputs/PinInput.js.map +1 -1
  189. package/dist/react/core/inputs/Select.d.ts +1 -2
  190. package/dist/react/core/inputs/Select.js +298 -299
  191. package/dist/react/core/inputs/Select.js.map +1 -1
  192. package/dist/react/core/inputs/Toggle.d.ts +2 -3
  193. package/dist/react/core/inputs/Toggle.js +142 -148
  194. package/dist/react/core/inputs/Toggle.js.map +1 -1
  195. package/dist/react/core/layout/Box.d.ts +3 -4
  196. package/dist/react/core/layout/Box.js +118 -122
  197. package/dist/react/core/layout/Box.js.map +1 -1
  198. package/dist/react/core/layout/Center.d.ts +0 -1
  199. package/dist/react/core/layout/Center.js +45 -32
  200. package/dist/react/core/layout/Center.js.map +1 -1
  201. package/dist/react/core/layout/Divider.d.ts +1 -2
  202. package/dist/react/core/layout/Divider.js +112 -106
  203. package/dist/react/core/layout/Divider.js.map +1 -1
  204. package/dist/react/core/layout/Flex.d.ts +4 -5
  205. package/dist/react/core/layout/Flex.js +120 -124
  206. package/dist/react/core/layout/Flex.js.map +1 -1
  207. package/dist/react/core/layout/Grid.d.ts +5 -6
  208. package/dist/react/core/layout/Grid.js +131 -138
  209. package/dist/react/core/layout/Grid.js.map +1 -1
  210. package/dist/react/core/layout/Spacer.d.ts +0 -1
  211. package/dist/react/core/layout/Spacer.js +36 -29
  212. package/dist/react/core/layout/Spacer.js.map +1 -1
  213. package/dist/react/core/layout/Stack.d.ts +4 -5
  214. package/dist/react/core/layout/Stack.js +127 -70
  215. package/dist/react/core/layout/Stack.js.map +1 -1
  216. package/dist/react/core/layout/responsive.d.ts +1 -2
  217. package/dist/react/core/layout/responsive.js +25 -19
  218. package/dist/react/core/layout/responsive.js.map +1 -1
  219. package/dist/react/core/layout/useBreakpoint.d.ts +1 -1
  220. package/dist/react/core/layout/useBreakpoint.js +119 -66
  221. package/dist/react/core/layout/useBreakpoint.js.map +1 -1
  222. package/dist/react/core/navigation/AppBar.d.ts +1 -2
  223. package/dist/react/core/navigation/AppBar.js +827 -805
  224. package/dist/react/core/navigation/AppBar.js.map +1 -1
  225. package/dist/react/core/navigation/Pagination.d.ts +2 -3
  226. package/dist/react/core/navigation/Pagination.js +207 -187
  227. package/dist/react/core/navigation/Pagination.js.map +1 -1
  228. package/dist/react/core/navigation/SideNav.d.ts +5 -6
  229. package/dist/react/core/navigation/SideNav.js +855 -629
  230. package/dist/react/core/navigation/SideNav.js.map +1 -1
  231. package/dist/react/core/navigation/Tabs.d.ts +0 -1
  232. package/dist/react/core/navigation/Tabs.js +113 -119
  233. package/dist/react/core/navigation/Tabs.js.map +1 -1
  234. package/dist/react/core/overlays/Popover.d.ts +2 -3
  235. package/dist/react/core/overlays/Popover.js +303 -282
  236. package/dist/react/core/overlays/Popover.js.map +1 -1
  237. package/dist/react/core/overlays/SidePanel.d.ts +1 -2
  238. package/dist/react/core/overlays/SidePanel.js +217 -212
  239. package/dist/react/core/overlays/SidePanel.js.map +1 -1
  240. package/dist/react/core/overlays/Tooltip.d.ts +1 -2
  241. package/dist/react/core/overlays/Tooltip.js +170 -176
  242. package/dist/react/core/overlays/Tooltip.js.map +1 -1
  243. package/dist/react/core/widgets/ActivityPlanner.d.ts +0 -1
  244. package/dist/react/core/widgets/ActivityPlanner.js +855 -517
  245. package/dist/react/core/widgets/ActivityPlanner.js.map +1 -1
  246. package/dist/react/core/widgets/Capture.d.ts +2 -3
  247. package/dist/react/core/widgets/Capture.js +965 -779
  248. package/dist/react/core/widgets/Capture.js.map +1 -1
  249. package/dist/react/core/widgets/ChatPanel.d.ts +16 -17
  250. package/dist/react/core/widgets/ChatPanel.js +1734 -1034
  251. package/dist/react/core/widgets/ChatPanel.js.map +1 -1
  252. package/dist/react/core/widgets/ColorPickerPanel.d.ts +0 -1
  253. package/dist/react/core/widgets/ColorPickerPanel.js +298 -287
  254. package/dist/react/core/widgets/ColorPickerPanel.js.map +1 -1
  255. package/dist/react/core/widgets/CommandBuilder.d.ts +2 -3
  256. package/dist/react/core/widgets/CommandBuilder.js +624 -516
  257. package/dist/react/core/widgets/CommandBuilder.js.map +1 -1
  258. package/dist/react/core/widgets/ConnectionForm.d.ts +2 -3
  259. package/dist/react/core/widgets/ConnectionForm.js +528 -492
  260. package/dist/react/core/widgets/ConnectionForm.js.map +1 -1
  261. package/dist/react/core/widgets/FileExplorer.d.ts +3 -4
  262. package/dist/react/core/widgets/FileExplorer.js +617 -505
  263. package/dist/react/core/widgets/FileExplorer.js.map +1 -1
  264. package/dist/react/core/widgets/HexViewer.d.ts +2 -3
  265. package/dist/react/core/widgets/HexViewer.js +1353 -1091
  266. package/dist/react/core/widgets/HexViewer.js.map +1 -1
  267. package/dist/react/core/widgets/ImageFrame.d.ts +1 -2
  268. package/dist/react/core/widgets/ImageFrame.js +230 -193
  269. package/dist/react/core/widgets/ImageFrame.js.map +1 -1
  270. package/dist/react/core/widgets/ImageGallery.d.ts +2 -1
  271. package/dist/react/core/widgets/ImageGallery.js +380 -314
  272. package/dist/react/core/widgets/ImageGallery.js.map +1 -1
  273. package/dist/react/core/widgets/ImagePanel.d.ts +0 -1
  274. package/dist/react/core/widgets/ImagePanel.js +110 -101
  275. package/dist/react/core/widgets/ImagePanel.js.map +1 -1
  276. package/dist/react/core/widgets/LogViewer.d.ts +2 -3
  277. package/dist/react/core/widgets/LogViewer.js +711 -607
  278. package/dist/react/core/widgets/LogViewer.js.map +1 -1
  279. package/dist/react/core/widgets/MessageStream.d.ts +3 -4
  280. package/dist/react/core/widgets/MessageStream.js +514 -444
  281. package/dist/react/core/widgets/MessageStream.js.map +1 -1
  282. package/dist/react/core/widgets/MissionCalendar.d.ts +3 -4
  283. package/dist/react/core/widgets/MissionCalendar.js +1488 -1020
  284. package/dist/react/core/widgets/MissionCalendar.js.map +1 -1
  285. package/dist/react/core/widgets/PacketViewer.d.ts +2 -3
  286. package/dist/react/core/widgets/PacketViewer.js +550 -421
  287. package/dist/react/core/widgets/PacketViewer.js.map +1 -1
  288. package/dist/react/core/widgets/capture-placeholder.png.js +6 -5
  289. package/dist/react/core/widgets/capture-placeholder.png.js.map +1 -1
  290. package/dist/react/hooks/index.d.ts +5 -5
  291. package/dist/react/hooks/useAccessWindows.d.ts +0 -1
  292. package/dist/react/hooks/useCompactMode.d.ts +1 -1
  293. package/dist/react/hooks/useCompactMode.js +104 -58
  294. package/dist/react/hooks/useCompactMode.js.map +1 -1
  295. package/dist/react/hooks/useGroundTrackHistory.d.ts +0 -1
  296. package/dist/react/hooks/useSimulationScene.d.ts +1 -2
  297. package/dist/react/hooks/useSimulationScene.js +481 -374
  298. package/dist/react/hooks/useSimulationScene.js.map +1 -1
  299. package/dist/react/index.d.ts +3 -3
  300. package/dist/react/panels/LayerControlPanel.d.ts +1 -2
  301. package/dist/react/panels/LayerControlPanel.js +223 -180
  302. package/dist/react/panels/LayerControlPanel.js.map +1 -1
  303. package/dist/react/panels/ObjectInventoryPanel.d.ts +2 -3
  304. package/dist/react/panels/ObjectInventoryPanel.js +315 -250
  305. package/dist/react/panels/ObjectInventoryPanel.js.map +1 -1
  306. package/dist/react/panels/index.d.ts +1 -1
  307. package/dist/react/panels/index.js +1 -6
  308. package/dist/react/shared/ErrorBoundary.d.ts +1 -2
  309. package/dist/react/shared/ErrorBoundary.js +170 -139
  310. package/dist/react/shared/ErrorBoundary.js.map +1 -1
  311. package/dist/react/shared/Skeleton.d.ts +1 -2
  312. package/dist/react/shared/Skeleton.js +300 -301
  313. package/dist/react/shared/Skeleton.js.map +1 -1
  314. package/dist/react/theme/ThemeProvider.d.ts +2 -321
  315. package/dist/react/theme/ThemeProvider.js +312 -939
  316. package/dist/react/theme/ThemeProvider.js.map +1 -1
  317. package/dist/react/theme/cardAccent.d.ts +1 -2
  318. package/dist/react/theme/cardAccent.js +196 -126
  319. package/dist/react/theme/cardAccent.js.map +1 -1
  320. package/dist/react/theme/config.d.ts +0 -1
  321. package/dist/react/theme/config.js +47 -25
  322. package/dist/react/theme/config.js.map +1 -1
  323. package/dist/react/theme/index.d.ts +2 -2
  324. package/dist/react/theme/index.js +1 -16
  325. package/dist/react/theme/types.d.ts +332 -0
  326. package/dist/react/theme/types.js +39 -0
  327. package/dist/react/theme/types.js.map +1 -0
  328. package/dist/react/types.d.ts +8 -8
  329. package/dist/react/types.js +147 -47
  330. package/dist/react/types.js.map +1 -1
  331. package/dist/react/utils/categoryPalette.d.ts +0 -1
  332. package/dist/react/utils/categoryPalette.js +91 -102
  333. package/dist/react/utils/categoryPalette.js.map +1 -1
  334. package/dist/react/utils/index.d.ts +5 -5
  335. package/dist/react/utils/index.js +457 -371
  336. package/dist/react/utils/index.js.map +1 -1
  337. package/dist/react/visualizations/EclipseTimerCard.d.ts +0 -1
  338. package/dist/react/visualizations/LinkBudgetCard.d.ts +0 -1
  339. package/dist/react/visualizations/NavBallCard.d.ts +0 -1
  340. package/dist/react/visualizations/PropulsionCard.d.ts +1 -2
  341. package/dist/react/visualizations/SensorFootprintCard.d.ts +1 -2
  342. package/dist/react/visualizations/ThermalHeatmapCard.d.ts +0 -1
  343. package/dist/react/visualizations/index.d.ts +3 -3
  344. package/dist/react.d.ts +2 -1
  345. package/dist/react.js +17 -221
  346. package/dist/shaders/atmosphere.frag.js +6 -5
  347. package/dist/shaders/atmosphere.frag.js.map +1 -1
  348. package/dist/shaders/atmosphere.vert.js +6 -5
  349. package/dist/shaders/atmosphere.vert.js.map +1 -1
  350. package/dist/shaders/stars.frag.js +6 -5
  351. package/dist/shaders/stars.frag.js.map +1 -1
  352. package/dist/shaders/stars.vert.js +6 -5
  353. package/dist/shaders/stars.vert.js.map +1 -1
  354. package/dist/style.css +217 -194
  355. package/dist/tokens/core.d.ts +159 -0
  356. package/dist/tokens/core.js +144 -0
  357. package/dist/tokens/core.js.map +1 -0
  358. package/dist/tokens/css-vars.d.ts +213 -2
  359. package/dist/tokens/css-vars.js +590 -227
  360. package/dist/tokens/css-vars.js.map +1 -1
  361. package/dist/tokens/index.d.ts +31 -228
  362. package/dist/tokens/index.js +281 -366
  363. package/dist/tokens/index.js.map +1 -1
  364. package/dist/tokens/palettes/astro.d.ts +129 -0
  365. package/dist/tokens/palettes/astro.js +112 -0
  366. package/dist/tokens/palettes/astro.js.map +1 -0
  367. package/dist/tokens/palettes/index.d.ts +288 -0
  368. package/dist/tokens/palettes/index.js +35 -0
  369. package/dist/tokens/palettes/index.js.map +1 -0
  370. package/dist/tokens/palettes/tailwind.d.ts +324 -0
  371. package/dist/tokens/palettes/tailwind.js +201 -0
  372. package/dist/tokens/palettes/tailwind.js.map +1 -0
  373. package/dist/tokens/palettes/zendir.d.ts +126 -0
  374. package/dist/tokens/palettes/zendir.js +92 -0
  375. package/dist/tokens/palettes/zendir.js.map +1 -0
  376. package/dist/tokens/themes.d.ts +30 -0
  377. package/dist/tokens/themes.js +704 -0
  378. package/dist/tokens/themes.js.map +1 -0
  379. package/dist/tokens/tokens.css +419 -41
  380. package/dist/types/index.d.ts +2 -2
  381. package/package.json +310 -313
  382. package/dist/index.js.map +0 -1
  383. package/dist/react/3d/index.js.map +0 -1
  384. package/dist/react/astro/index.js.map +0 -1
  385. package/dist/react/cards/index.js.map +0 -1
  386. package/dist/react/charts/index.js.map +0 -1
  387. package/dist/react/core/index.js.map +0 -1
  388. package/dist/react/panels/index.js.map +0 -1
  389. package/dist/react/theme/astro-tokens.d.ts +0 -153
  390. package/dist/react/theme/index.js.map +0 -1
  391. package/dist/react.js.map +0 -1
@@ -1,211 +1,351 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { memo, useState, useRef, useCallback, useContext, createContext, useEffect } from "react";
3
1
  import { useTheme } from "../../theme/ThemeProvider.js";
4
2
  import { safeAccentText } from "../../utils/index.js";
5
3
  import { useBreakpoint } from "../layout/useBreakpoint.js";
6
- const ToastContext = createContext(null);
4
+ import { createContext, memo, useCallback, useContext, useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/react/core/feedback/Toast.tsx
7
+ /**
8
+ * @zendir/ui - Toast / Notification System
9
+ *
10
+ * Contextual toast notifications with queue management, auto-dismiss,
11
+ * and Astro UX status colors. Essential for operator dashboards surfacing
12
+ * connection events, command results, and system alerts.
13
+ *
14
+ * Astro UX Compliance:
15
+ * - 6-level status colors (off, standby, normal, caution, serious, critical)
16
+ * - Positioned top-right (operator dashboard convention)
17
+ * - Reduced motion support
18
+ * - ARIA live region for screen readers
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * // Wrap app in ToastProvider
23
+ * <ToastProvider>
24
+ * <App />
25
+ * </ToastProvider>
26
+ *
27
+ * // Use in any component
28
+ * const toast = useToast();
29
+ * toast({ status: 'normal', title: 'Connected', message: 'MQTT link established' });
30
+ * toast({ status: 'caution', title: 'SAFE Mode', message: 'Spacecraft entered SAFE mode', duration: 0 });
31
+ * toast({ status: 'critical', title: 'Link Lost', message: 'Downlink signal below threshold' });
32
+ * ```
33
+ */
34
+ var ToastContext = createContext(null);
35
+ /**
36
+ * Hook to show toast notifications.
37
+ * Must be used within a `<ToastProvider>`.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * const toast = useToast();
42
+ * toast({ status: 'normal', title: 'Success', message: 'Command sent' });
43
+ * ```
44
+ */
7
45
  function useToast() {
8
- const ctx = useContext(ToastContext);
9
- if (!ctx) throw new Error("useToast must be used within <ToastProvider>");
10
- return ctx.toast;
46
+ const ctx = useContext(ToastContext);
47
+ if (!ctx) throw new Error("useToast must be used within <ToastProvider>");
48
+ return ctx.toast;
11
49
  }
50
+ /**
51
+ * Hook to access full toast API (toast, dismiss, dismissAll).
52
+ */
12
53
  function useToastManager() {
13
- const ctx = useContext(ToastContext);
14
- if (!ctx) throw new Error("useToastManager must be used within <ToastProvider>");
15
- return ctx;
54
+ const ctx = useContext(ToastContext);
55
+ if (!ctx) throw new Error("useToastManager must be used within <ToastProvider>");
56
+ return ctx;
16
57
  }
17
- const ToastItem = memo(function ToastItem2({
18
- toast: t,
19
- onDismiss
20
- }) {
21
- const { tokens } = useTheme();
22
- const [exiting, setExiting] = useState(false);
23
- const dismissTimeoutRef = useRef();
24
- useEffect(() => {
25
- return () => {
26
- clearTimeout(dismissTimeoutRef.current);
27
- };
28
- }, []);
29
- const statusColors = {
30
- normal: tokens.colors.status.normal,
31
- standby: tokens.colors.status.standby,
32
- caution: tokens.colors.status.caution,
33
- serious: tokens.colors.status.serious,
34
- critical: tokens.colors.status.critical,
35
- off: tokens.colors.status.off
36
- };
37
- const color = statusColors[t.status || "off"] || tokens.colors.status.off;
38
- const handleDismiss = useCallback(() => {
39
- setExiting(true);
40
- dismissTimeoutRef.current = setTimeout(() => onDismiss(t.id), 200);
41
- }, [t.id, onDismiss]);
42
- useEffect(() => {
43
- const dur = t.duration ?? 5e3;
44
- if (dur <= 0) return;
45
- const timer = setTimeout(handleDismiss, dur);
46
- return () => clearTimeout(timer);
47
- }, [t.duration, handleDismiss]);
48
- const statusIcon = (() => {
49
- const s = 10;
50
- const h = s / 2;
51
- const status = t.status || "off";
52
- const sharedStyle = { flexShrink: 0, marginTop: "3px" };
53
- switch (status) {
54
- case "critical":
55
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: sharedStyle, children: /* @__PURE__ */ jsx("polygon", { points: `${h},${s} 0,0 ${s},0`, fill: color }) });
56
- case "serious":
57
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: sharedStyle, children: /* @__PURE__ */ jsx("polygon", { points: `${h},0 ${s},${h} ${h},${s} 0,${h}`, fill: color }) });
58
- case "caution":
59
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: sharedStyle, children: /* @__PURE__ */ jsx("rect", { width: s, height: s, fill: color }) });
60
- case "standby":
61
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: "0 0 12 12", style: sharedStyle, children: /* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "3.5", fill: "none", stroke: color, strokeWidth: "2" }) });
62
- case "off":
63
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: "0 0 12 12", style: sharedStyle, children: /* @__PURE__ */ jsx("circle", { cx: "6", cy: "6", r: "3", fill: color }) });
64
- default:
65
- return /* @__PURE__ */ jsx("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, style: sharedStyle, children: /* @__PURE__ */ jsx("circle", { cx: h, cy: h, r: h, fill: color }) });
66
- }
67
- })();
68
- return /* @__PURE__ */ jsxs(
69
- "div",
70
- {
71
- role: "alert",
72
- style: {
73
- display: "flex",
74
- gap: tokens.spacing.sm,
75
- padding: `${tokens.spacing.sm} ${tokens.spacing.md}`,
76
- backgroundColor: tokens.colors.background.elevated,
77
- border: `1px solid ${color}30`,
78
- borderLeft: `3px solid ${color}`,
79
- borderRadius: tokens.borderRadius.md,
80
- boxShadow: `${tokens.shadows.lg}, 0 0 20px ${color}15`,
81
- maxWidth: "min(400px, calc(100vw - 32px))",
82
- minWidth: "min(280px, calc(100vw - 32px))",
83
- fontFamily: tokens.typography.fontFamily.primary,
84
- animation: exiting ? `zendir-toast-exit 200ms ${tokens.animation.easing.default} forwards` : `zendir-toast-enter 300ms ${tokens.animation.easing.default}`,
85
- transition: tokens.animation.normal
86
- },
87
- children: [
88
- t.icon || statusIcon,
89
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
90
- /* @__PURE__ */ jsx("div", { style: {
91
- fontSize: tokens.typography.fontSize.sm,
92
- fontWeight: tokens.typography.fontWeight.semibold,
93
- color: tokens.colors.text.primary,
94
- lineHeight: tokens.typography.lineHeight.tight
95
- }, children: t.title }),
96
- t.message && /* @__PURE__ */ jsx("div", { style: {
97
- fontSize: tokens.typography.fontSize.xs,
98
- color: tokens.colors.text.secondary,
99
- marginTop: "2px",
100
- lineHeight: tokens.typography.lineHeight.normal
101
- }, children: t.message }),
102
- t.action && /* @__PURE__ */ jsx(
103
- "button",
104
- {
105
- onClick: t.action.onClick,
106
- style: {
107
- marginTop: tokens.spacing.xs,
108
- fontSize: tokens.typography.fontSize.xs,
109
- fontWeight: tokens.typography.fontWeight.semibold,
110
- color: safeAccentText(tokens.colors.accent.primary),
111
- background: "none",
112
- border: "none",
113
- padding: 0,
114
- cursor: "pointer",
115
- fontFamily: tokens.typography.fontFamily.primary
116
- },
117
- children: t.action.label
118
- }
119
- )
120
- ] }),
121
- t.dismissible !== false && /* @__PURE__ */ jsx(
122
- "button",
123
- {
124
- "aria-label": "Dismiss notification",
125
- onClick: handleDismiss,
126
- style: {
127
- display: "flex",
128
- alignItems: "center",
129
- justifyContent: "center",
130
- width: 44,
131
- height: 44,
132
- border: "none",
133
- background: "none",
134
- color: tokens.colors.text.tertiary,
135
- cursor: "pointer",
136
- borderRadius: tokens.borderRadius.sm,
137
- padding: tokens.spacing.xs,
138
- flexShrink: 0,
139
- transition: tokens.animation.fast
140
- },
141
- children: /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
142
- /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
143
- /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
144
- ] })
145
- }
146
- )
147
- ]
148
- }
149
- );
58
+ var ToastItem = memo(function ToastItem({ toast: t, onDismiss }) {
59
+ const { tokens } = useTheme();
60
+ const [exiting, setExiting] = useState(false);
61
+ const dismissTimeoutRef = useRef();
62
+ useEffect(() => {
63
+ return () => {
64
+ clearTimeout(dismissTimeoutRef.current);
65
+ };
66
+ }, []);
67
+ const color = {
68
+ normal: tokens.colors.status.normal,
69
+ standby: tokens.colors.status.standby,
70
+ caution: tokens.colors.status.caution,
71
+ serious: tokens.colors.status.serious,
72
+ critical: tokens.colors.status.critical,
73
+ off: tokens.colors.status.off
74
+ }[t.status || "off"] || tokens.colors.status.off;
75
+ const handleDismiss = useCallback(() => {
76
+ setExiting(true);
77
+ dismissTimeoutRef.current = setTimeout(() => onDismiss(t.id), 200);
78
+ }, [t.id, onDismiss]);
79
+ useEffect(() => {
80
+ const dur = t.duration ?? 5e3;
81
+ if (dur <= 0) return;
82
+ const timer = setTimeout(handleDismiss, dur);
83
+ return () => clearTimeout(timer);
84
+ }, [t.duration, handleDismiss]);
85
+ const statusIcon = (() => {
86
+ const s = 10;
87
+ const h = s / 2;
88
+ const status = t.status || "off";
89
+ const sharedStyle = {
90
+ flexShrink: 0,
91
+ marginTop: "3px"
92
+ };
93
+ switch (status) {
94
+ case "critical": return /* @__PURE__ */ jsx("svg", {
95
+ width: s,
96
+ height: s,
97
+ viewBox: `0 0 ${s} ${s}`,
98
+ style: sharedStyle,
99
+ children: /* @__PURE__ */ jsx("polygon", {
100
+ points: `${h},${s} 0,0 ${s},0`,
101
+ fill: color
102
+ })
103
+ });
104
+ case "serious": return /* @__PURE__ */ jsx("svg", {
105
+ width: s,
106
+ height: s,
107
+ viewBox: `0 0 ${s} ${s}`,
108
+ style: sharedStyle,
109
+ children: /* @__PURE__ */ jsx("polygon", {
110
+ points: `${h},0 ${s},${h} ${h},${s} 0,${h}`,
111
+ fill: color
112
+ })
113
+ });
114
+ case "caution": return /* @__PURE__ */ jsx("svg", {
115
+ width: s,
116
+ height: s,
117
+ viewBox: `0 0 ${s} ${s}`,
118
+ style: sharedStyle,
119
+ children: /* @__PURE__ */ jsx("rect", {
120
+ width: s,
121
+ height: s,
122
+ fill: color
123
+ })
124
+ });
125
+ case "standby": return /* @__PURE__ */ jsx("svg", {
126
+ width: s,
127
+ height: s,
128
+ viewBox: "0 0 12 12",
129
+ style: sharedStyle,
130
+ children: /* @__PURE__ */ jsx("circle", {
131
+ cx: "6",
132
+ cy: "6",
133
+ r: "3.5",
134
+ fill: "none",
135
+ stroke: color,
136
+ strokeWidth: "2"
137
+ })
138
+ });
139
+ case "off": return /* @__PURE__ */ jsx("svg", {
140
+ width: s,
141
+ height: s,
142
+ viewBox: "0 0 12 12",
143
+ style: sharedStyle,
144
+ children: /* @__PURE__ */ jsx("circle", {
145
+ cx: "6",
146
+ cy: "6",
147
+ r: "3",
148
+ fill: color
149
+ })
150
+ });
151
+ default: return /* @__PURE__ */ jsx("svg", {
152
+ width: s,
153
+ height: s,
154
+ viewBox: `0 0 ${s} ${s}`,
155
+ style: sharedStyle,
156
+ children: /* @__PURE__ */ jsx("circle", {
157
+ cx: h,
158
+ cy: h,
159
+ r: h,
160
+ fill: color
161
+ })
162
+ });
163
+ }
164
+ })();
165
+ return /* @__PURE__ */ jsxs("div", {
166
+ role: "alert",
167
+ style: {
168
+ display: "flex",
169
+ gap: tokens.spacing.sm,
170
+ padding: `${tokens.spacing.sm} ${tokens.spacing.md}`,
171
+ backgroundColor: tokens.colors.background.elevated,
172
+ border: `1px solid ${color}30`,
173
+ borderLeft: `3px solid ${color}`,
174
+ borderRadius: tokens.borderRadius.md,
175
+ boxShadow: `${tokens.shadows.lg}, 0 0 20px ${color}15`,
176
+ maxWidth: "min(400px, calc(100vw - 32px))",
177
+ minWidth: "min(280px, calc(100vw - 32px))",
178
+ fontFamily: tokens.typography.fontFamily.primary,
179
+ animation: exiting ? `zendir-toast-exit 200ms ${tokens.animation.easing.default} forwards` : `zendir-toast-enter 300ms ${tokens.animation.easing.default}`,
180
+ transition: tokens.animation.normal
181
+ },
182
+ children: [
183
+ t.icon || statusIcon,
184
+ /* @__PURE__ */ jsxs("div", {
185
+ style: {
186
+ flex: 1,
187
+ minWidth: 0
188
+ },
189
+ children: [
190
+ /* @__PURE__ */ jsx("div", {
191
+ style: {
192
+ fontSize: tokens.typography.fontSize.sm,
193
+ fontWeight: tokens.typography.fontWeight.semibold,
194
+ color: tokens.colors.text.primary,
195
+ lineHeight: tokens.typography.lineHeight.tight
196
+ },
197
+ children: t.title
198
+ }),
199
+ t.message && /* @__PURE__ */ jsx("div", {
200
+ style: {
201
+ fontSize: tokens.typography.fontSize.xs,
202
+ color: tokens.colors.text.secondary,
203
+ marginTop: "2px",
204
+ lineHeight: tokens.typography.lineHeight.normal
205
+ },
206
+ children: t.message
207
+ }),
208
+ t.action && /* @__PURE__ */ jsx("button", {
209
+ onClick: t.action.onClick,
210
+ style: {
211
+ marginTop: tokens.spacing.xs,
212
+ fontSize: tokens.typography.fontSize.xs,
213
+ fontWeight: tokens.typography.fontWeight.semibold,
214
+ color: safeAccentText(tokens.colors.accent.primary),
215
+ background: "none",
216
+ border: "none",
217
+ padding: 0,
218
+ cursor: "pointer",
219
+ fontFamily: tokens.typography.fontFamily.primary
220
+ },
221
+ children: t.action.label
222
+ })
223
+ ]
224
+ }),
225
+ t.dismissible !== false && /* @__PURE__ */ jsx("button", {
226
+ "aria-label": "Dismiss notification",
227
+ onClick: handleDismiss,
228
+ style: {
229
+ display: "flex",
230
+ alignItems: "center",
231
+ justifyContent: "center",
232
+ width: 44,
233
+ height: 44,
234
+ border: "none",
235
+ background: "none",
236
+ color: tokens.colors.text.tertiary,
237
+ cursor: "pointer",
238
+ borderRadius: tokens.borderRadius.sm,
239
+ padding: tokens.spacing.xs,
240
+ flexShrink: 0,
241
+ transition: tokens.animation.fast
242
+ },
243
+ children: /* @__PURE__ */ jsxs("svg", {
244
+ width: "14",
245
+ height: "14",
246
+ viewBox: "0 0 24 24",
247
+ fill: "none",
248
+ stroke: "currentColor",
249
+ strokeWidth: "2",
250
+ strokeLinecap: "round",
251
+ children: [/* @__PURE__ */ jsx("line", {
252
+ x1: "18",
253
+ y1: "6",
254
+ x2: "6",
255
+ y2: "18"
256
+ }), /* @__PURE__ */ jsx("line", {
257
+ x1: "6",
258
+ y1: "6",
259
+ x2: "18",
260
+ y2: "18"
261
+ })]
262
+ })
263
+ })
264
+ ]
265
+ });
150
266
  });
151
- const ToastProvider = memo(function ToastProvider2({
152
- position = "top-right",
153
- maxVisible = 5,
154
- defaultDuration = 5e3,
155
- children
156
- }) {
157
- const { tokens } = useTheme();
158
- const { isMobile } = useBreakpoint();
159
- const [toasts, setToasts] = useState([]);
160
- const idCounter = useRef(0);
161
- const toast = useCallback((options) => {
162
- const id = `toast-${++idCounter.current}-${Date.now()}`;
163
- const instance = {
164
- ...options,
165
- id,
166
- createdAt: Date.now(),
167
- duration: options.duration ?? defaultDuration
168
- };
169
- setToasts((prev) => [...prev, instance].slice(-maxVisible * 2));
170
- return id;
171
- }, [defaultDuration, maxVisible]);
172
- const dismiss = useCallback((id) => {
173
- setToasts((prev) => prev.filter((t) => t.id !== id));
174
- }, []);
175
- const dismissAll = useCallback(() => {
176
- setToasts([]);
177
- }, []);
178
- const inset = isMobile ? tokens.spacing.sm : tokens.spacing.md;
179
- const positionStyles = {
180
- "top-right": { top: inset, right: inset },
181
- "top-left": { top: inset, left: inset },
182
- "bottom-right": { bottom: inset, right: inset },
183
- "bottom-left": { bottom: inset, left: inset },
184
- "top-center": { top: inset, left: "50%", transform: "translateX(-50%)" },
185
- "bottom-center": { bottom: inset, left: "50%", transform: "translateX(-50%)" }
186
- };
187
- const isBottom = position.startsWith("bottom");
188
- const visibleToasts = toasts.slice(-maxVisible);
189
- return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: { toast, dismiss, dismissAll }, children: [
190
- children,
191
- visibleToasts.length > 0 && /* @__PURE__ */ jsx(
192
- "div",
193
- {
194
- "aria-live": visibleToasts.some((t) => t.status === "critical" || t.status === "serious") ? "assertive" : "polite",
195
- "aria-atomic": "false",
196
- style: {
197
- position: "fixed",
198
- zIndex: 9999,
199
- display: "flex",
200
- flexDirection: isBottom ? "column-reverse" : "column",
201
- gap: tokens.spacing.sm,
202
- pointerEvents: "none",
203
- ...positionStyles[position]
204
- },
205
- children: visibleToasts.map((t) => /* @__PURE__ */ jsx("div", { style: { pointerEvents: "auto" }, children: /* @__PURE__ */ jsx(ToastItem, { toast: t, onDismiss: dismiss }) }, t.id))
206
- }
207
- ),
208
- /* @__PURE__ */ jsx("style", { children: `
267
+ var ToastProvider = memo(function ToastProvider({ position = "top-right", maxVisible = 5, defaultDuration = 5e3, children }) {
268
+ const { tokens } = useTheme();
269
+ const { isMobile } = useBreakpoint();
270
+ const [toasts, setToasts] = useState([]);
271
+ const idCounter = useRef(0);
272
+ const toast = useCallback((options) => {
273
+ const id = `toast-${++idCounter.current}-${Date.now()}`;
274
+ const instance = {
275
+ ...options,
276
+ id,
277
+ createdAt: Date.now(),
278
+ duration: options.duration ?? defaultDuration
279
+ };
280
+ setToasts((prev) => [...prev, instance].slice(-maxVisible * 2));
281
+ return id;
282
+ }, [defaultDuration, maxVisible]);
283
+ const dismiss = useCallback((id) => {
284
+ setToasts((prev) => prev.filter((t) => t.id !== id));
285
+ }, []);
286
+ const dismissAll = useCallback(() => {
287
+ setToasts([]);
288
+ }, []);
289
+ const inset = isMobile ? tokens.spacing.sm : tokens.spacing.md;
290
+ const positionStyles = {
291
+ "top-right": {
292
+ top: inset,
293
+ right: inset
294
+ },
295
+ "top-left": {
296
+ top: inset,
297
+ left: inset
298
+ },
299
+ "bottom-right": {
300
+ bottom: inset,
301
+ right: inset
302
+ },
303
+ "bottom-left": {
304
+ bottom: inset,
305
+ left: inset
306
+ },
307
+ "top-center": {
308
+ top: inset,
309
+ left: "50%",
310
+ transform: "translateX(-50%)"
311
+ },
312
+ "bottom-center": {
313
+ bottom: inset,
314
+ left: "50%",
315
+ transform: "translateX(-50%)"
316
+ }
317
+ };
318
+ const isBottom = position.startsWith("bottom");
319
+ const visibleToasts = toasts.slice(-maxVisible);
320
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, {
321
+ value: {
322
+ toast,
323
+ dismiss,
324
+ dismissAll
325
+ },
326
+ children: [
327
+ children,
328
+ visibleToasts.length > 0 && /* @__PURE__ */ jsx("div", {
329
+ "aria-live": visibleToasts.some((t) => t.status === "critical" || t.status === "serious") ? "assertive" : "polite",
330
+ "aria-atomic": "false",
331
+ style: {
332
+ position: "fixed",
333
+ zIndex: 9999,
334
+ display: "flex",
335
+ flexDirection: isBottom ? "column-reverse" : "column",
336
+ gap: tokens.spacing.sm,
337
+ pointerEvents: "none",
338
+ ...positionStyles[position]
339
+ },
340
+ children: visibleToasts.map((t) => /* @__PURE__ */ jsx("div", {
341
+ style: { pointerEvents: "auto" },
342
+ children: /* @__PURE__ */ jsx(ToastItem, {
343
+ toast: t,
344
+ onDismiss: dismiss
345
+ })
346
+ }, t.id))
347
+ }),
348
+ /* @__PURE__ */ jsx("style", { children: `
209
349
  @keyframes zendir-toast-enter {
210
350
  from { opacity: 0; transform: translateX(20px); }
211
351
  to { opacity: 1; transform: translateX(0); }
@@ -219,11 +359,10 @@ const ToastProvider = memo(function ToastProvider2({
219
359
  @keyframes zendir-toast-exit { from { opacity: 1; } to { opacity: 0; } }
220
360
  }
221
361
  ` })
222
- ] });
362
+ ]
363
+ });
223
364
  });
224
- export {
225
- ToastProvider,
226
- useToast,
227
- useToastManager
228
- };
229
- //# sourceMappingURL=Toast.js.map
365
+ //#endregion
366
+ export { ToastProvider, ToastProvider as default, useToast, useToastManager };
367
+
368
+ //# sourceMappingURL=Toast.js.map