@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,320 +1,386 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { memo, useState, useEffect, useCallback } from "react";
3
1
  import { useTheme } from "../../theme/ThemeProvider.js";
4
- import { useBreakpoint, resolveResponsiveValue } from "../layout/useBreakpoint.js";
2
+ import { resolveResponsiveValue, useBreakpoint } from "../layout/useBreakpoint.js";
5
3
  import { Pagination } from "../navigation/Pagination.js";
6
- const ImageGallery = memo(function ImageGallery2({
7
- images,
8
- columns = [2, 3, 4],
9
- pageSize = 12,
10
- onDownload,
11
- onDelete,
12
- onClick,
13
- lightbox = true,
14
- thumbnailHeight = 140,
15
- emptyMessage = "No images captured",
16
- newCount: _newCount,
17
- style
18
- }) {
19
- const { tokens } = useTheme();
20
- const { breakpoint } = useBreakpoint();
21
- const [currentPage, setCurrentPage] = useState(0);
22
- const [selectedImage, setSelectedImage] = useState(null);
23
- const [hoveredId, setHoveredId] = useState(null);
24
- const cols = Array.isArray(columns) ? resolveResponsiveValue(columns, breakpoint) : columns;
25
- const totalPages = pageSize > 0 ? Math.ceil(images.length / pageSize) : 1;
26
- const pageImages = pageSize > 0 ? images.slice(currentPage * pageSize, (currentPage + 1) * pageSize) : images;
27
- useEffect(() => {
28
- if (currentPage >= totalPages && totalPages > 0) {
29
- setCurrentPage(totalPages - 1);
30
- }
31
- }, [images.length, totalPages, currentPage]);
32
- useEffect(() => {
33
- if (!selectedImage) return;
34
- const handler = (e) => {
35
- if (e.key === "Escape") setSelectedImage(null);
36
- };
37
- document.addEventListener("keydown", handler);
38
- return () => document.removeEventListener("keydown", handler);
39
- }, [selectedImage]);
40
- const handleImageClick = useCallback((img) => {
41
- onClick == null ? void 0 : onClick(img);
42
- if (lightbox) setSelectedImage(img);
43
- }, [onClick, lightbox]);
44
- const formatTime = (ts) => {
45
- if (!ts) return "";
46
- const d = new Date(ts);
47
- return d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit" });
48
- };
49
- const ActionBtn = ({ icon, label, onClick: handler, color }) => /* @__PURE__ */ jsx(
50
- "button",
51
- {
52
- "aria-label": label,
53
- onClick: (e) => {
54
- e.stopPropagation();
55
- handler();
56
- },
57
- style: {
58
- display: "flex",
59
- alignItems: "center",
60
- justifyContent: "center",
61
- width: 28,
62
- height: 28,
63
- border: `1px solid ${tokens.colors.border.muted}`,
64
- borderRadius: tokens.borderRadius.sm,
65
- backgroundColor: `${tokens.colors.background.elevated}e0`,
66
- color: color || tokens.colors.text.secondary,
67
- cursor: "pointer",
68
- transition: tokens.animation.fast,
69
- backdropFilter: "blur(4px)"
70
- },
71
- children: icon
72
- }
73
- );
74
- const downloadIcon = /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
75
- /* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
76
- /* @__PURE__ */ jsx("polyline", { points: "7 10 12 15 17 10" }),
77
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
78
- ] });
79
- const deleteIcon = /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
80
- /* @__PURE__ */ jsx("polyline", { points: "3 6 5 6 21 6" }),
81
- /* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
82
- ] });
83
- return /* @__PURE__ */ jsxs("div", { style: { fontFamily: tokens.typography.fontFamily.primary, ...style }, children: [
84
- images.length === 0 && /* @__PURE__ */ jsx("div", { style: {
85
- display: "flex",
86
- alignItems: "center",
87
- justifyContent: "center",
88
- height: 200,
89
- color: tokens.colors.text.tertiary,
90
- fontSize: tokens.typography.fontSize.sm,
91
- border: `1px dashed ${tokens.colors.border.muted}`,
92
- borderRadius: tokens.borderRadius.md
93
- }, children: emptyMessage }),
94
- pageImages.length > 0 && /* @__PURE__ */ jsx("div", { style: {
95
- display: "grid",
96
- gridTemplateColumns: `repeat(${cols}, 1fr)`,
97
- gap: tokens.spacing.sm
98
- }, children: pageImages.map((img) => {
99
- const isHovered = hoveredId === img.id;
100
- return /* @__PURE__ */ jsxs(
101
- "div",
102
- {
103
- role: "button",
104
- tabIndex: 0,
105
- "aria-label": `View image ${img.name || img.id}`,
106
- onClick: () => handleImageClick(img),
107
- onKeyDown: (e) => {
108
- if (e.key === "Enter" || e.key === " ") {
109
- e.preventDefault();
110
- handleImageClick(img);
111
- }
112
- },
113
- onMouseEnter: () => setHoveredId(img.id),
114
- onMouseLeave: () => setHoveredId(null),
115
- style: {
116
- position: "relative",
117
- borderRadius: tokens.borderRadius.md,
118
- border: `1px solid ${tokens.colors.border.muted}`,
119
- overflow: "hidden",
120
- cursor: "pointer",
121
- transition: tokens.animation.fast,
122
- transform: isHovered ? "translateY(-2px)" : "none",
123
- boxShadow: isHovered ? tokens.shadows.md : "none",
124
- backgroundColor: tokens.colors.background.surface
125
- },
126
- children: [
127
- /* @__PURE__ */ jsx("div", { style: {
128
- height: thumbnailHeight,
129
- display: "flex",
130
- alignItems: "center",
131
- justifyContent: "center",
132
- overflow: "hidden",
133
- backgroundColor: tokens.colors.background.base
134
- }, children: /* @__PURE__ */ jsx(
135
- "img",
136
- {
137
- src: img.src,
138
- alt: img.name,
139
- loading: "lazy",
140
- onError: (e) => {
141
- const target = e.target;
142
- target.style.display = "none";
143
- target.parentElement.innerHTML = `<span style="color:${tokens.colors.text.tertiary};font-size:${tokens.typography.fontSize.xxs}">Image unavailable</span>`;
144
- },
145
- style: {
146
- maxWidth: "100%",
147
- maxHeight: "100%",
148
- objectFit: "contain"
149
- }
150
- }
151
- ) }),
152
- /* @__PURE__ */ jsxs("div", { style: {
153
- padding: `${tokens.spacing.xs} ${tokens.spacing.sm}`,
154
- borderTop: `1px solid ${tokens.colors.border.muted}`
155
- }, children: [
156
- /* @__PURE__ */ jsx("div", { style: {
157
- fontSize: tokens.typography.fontSize.xxs,
158
- fontWeight: tokens.typography.fontWeight.medium,
159
- color: tokens.colors.text.primary,
160
- whiteSpace: "nowrap",
161
- overflow: "hidden",
162
- textOverflow: "ellipsis"
163
- }, children: img.name }),
164
- img.timestamp && /* @__PURE__ */ jsx("div", { style: {
165
- fontSize: tokens.typography.fontSize.micro,
166
- color: tokens.colors.text.tertiary,
167
- fontFamily: tokens.typography.fontFamily.mono
168
- }, children: formatTime(img.timestamp) })
169
- ] }),
170
- isHovered && /* @__PURE__ */ jsxs("div", { style: {
171
- position: "absolute",
172
- top: tokens.spacing.xs,
173
- right: tokens.spacing.xs,
174
- display: "flex",
175
- gap: "4px"
176
- }, children: [
177
- onDownload && /* @__PURE__ */ jsx(ActionBtn, { icon: downloadIcon, label: "Download", onClick: () => onDownload(img) }),
178
- onDelete && /* @__PURE__ */ jsx(ActionBtn, { icon: deleteIcon, label: "Delete", onClick: () => onDelete(img), color: tokens.colors.status.critical })
179
- ] })
180
- ]
181
- },
182
- img.id
183
- );
184
- }) }),
185
- totalPages > 1 && /* @__PURE__ */ jsx("div", { style: {
186
- display: "flex",
187
- justifyContent: "center",
188
- alignItems: "center",
189
- marginTop: tokens.spacing.md
190
- }, children: /* @__PURE__ */ jsx(
191
- Pagination,
192
- {
193
- currentPage: currentPage + 1,
194
- totalPages,
195
- onChange: (page) => setCurrentPage(Math.max(0, page - 1)),
196
- showFirstLast: false,
197
- displayMode: "text",
198
- size: "small"
199
- }
200
- ) }),
201
- selectedImage && /* @__PURE__ */ jsxs(Fragment, { children: [
202
- /* @__PURE__ */ jsx(
203
- "div",
204
- {
205
- "aria-hidden": "true",
206
- onClick: () => setSelectedImage(null),
207
- style: {
208
- position: "fixed",
209
- inset: 0,
210
- zIndex: 9998,
211
- backgroundColor: `${tokens.colors.background.base}e0`,
212
- backdropFilter: "blur(8px)",
213
- animation: `zendir-lb-fade 200ms ${tokens.animation.easing.default}`
214
- }
215
- }
216
- ),
217
- /* @__PURE__ */ jsxs(
218
- "div",
219
- {
220
- role: "dialog",
221
- "aria-modal": "true",
222
- "aria-label": `Image: ${selectedImage.name}`,
223
- onClick: () => setSelectedImage(null),
224
- style: {
225
- position: "fixed",
226
- inset: 0,
227
- zIndex: 9999,
228
- display: "flex",
229
- flexDirection: "column",
230
- alignItems: "center",
231
- justifyContent: "center",
232
- padding: tokens.spacing.xl
233
- },
234
- children: [
235
- /* @__PURE__ */ jsx(
236
- "img",
237
- {
238
- src: selectedImage.src,
239
- alt: selectedImage.name,
240
- onClick: (e) => e.stopPropagation(),
241
- style: {
242
- maxWidth: "90vw",
243
- maxHeight: "80vh",
244
- objectFit: "contain",
245
- borderRadius: tokens.borderRadius.md,
246
- boxShadow: tokens.shadows.xl,
247
- animation: `zendir-lb-scale 250ms ${tokens.animation.easing.default}`
248
- }
249
- }
250
- ),
251
- /* @__PURE__ */ jsxs(
252
- "div",
253
- {
254
- style: {
255
- display: "flex",
256
- alignItems: "center",
257
- gap: tokens.spacing.md,
258
- marginTop: tokens.spacing.md
259
- },
260
- onClick: (e) => e.stopPropagation(),
261
- children: [
262
- /* @__PURE__ */ jsx("span", { style: {
263
- color: tokens.colors.text.primary,
264
- fontSize: tokens.typography.fontSize.sm,
265
- fontWeight: tokens.typography.fontWeight.medium
266
- }, children: selectedImage.name }),
267
- onDownload && /* @__PURE__ */ jsx(
268
- "button",
269
- {
270
- onClick: () => onDownload(selectedImage),
271
- style: {
272
- padding: "6px 16px",
273
- fontSize: tokens.typography.fontSize.xs,
274
- color: tokens.colors.text.primary,
275
- backgroundColor: `${tokens.colors.accent.primary}20`,
276
- border: `1px solid ${tokens.colors.accent.primary}40`,
277
- borderRadius: tokens.borderRadius.md,
278
- cursor: "pointer",
279
- fontFamily: tokens.typography.fontFamily.primary
280
- },
281
- children: "Download"
282
- }
283
- ),
284
- onDelete && /* @__PURE__ */ jsx(
285
- "button",
286
- {
287
- onClick: () => {
288
- onDelete(selectedImage);
289
- setSelectedImage(null);
290
- },
291
- style: {
292
- padding: "6px 16px",
293
- fontSize: tokens.typography.fontSize.xs,
294
- color: tokens.colors.status.critical,
295
- backgroundColor: `${tokens.colors.status.critical}15`,
296
- border: `1px solid ${tokens.colors.status.critical}30`,
297
- borderRadius: tokens.borderRadius.md,
298
- cursor: "pointer",
299
- fontFamily: tokens.typography.fontFamily.primary
300
- },
301
- children: "Delete"
302
- }
303
- )
304
- ]
305
- }
306
- )
307
- ]
308
- }
309
- ),
310
- /* @__PURE__ */ jsx("style", { children: `
4
+ import { memo, useCallback, useEffect, useState } from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/react/core/widgets/ImageGallery.tsx
7
+ /**
8
+ * @zendir/ui - ImageGallery Component
9
+ *
10
+ * Grid of image thumbnails with lightbox, download, delete, and pagination.
11
+ * Designed for spacecraft image capture galleries in operator dashboards.
12
+ *
13
+ * Astro UX Compliance:
14
+ * - Consistent card styling with GlassCard
15
+ * - Status-based border colors
16
+ * - Keyboard navigation (Escape to close lightbox)
17
+ * - Focus management
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <ImageGallery
22
+ * images={[
23
+ * { id: '1', name: 'capture_001.png', src: dataUrl, timestamp: Date.now() },
24
+ * { id: '2', name: 'capture_002.png', src: dataUrl, timestamp: Date.now() },
25
+ * ]}
26
+ * columns={[2, 3, 4]}
27
+ * onDownload={(img) => saveAs(img.src, img.name)}
28
+ * onDelete={(img) => removeImage(img.id)}
29
+ * pageSize={12}
30
+ * />
31
+ * ```
32
+ */
33
+ var ImageGallery = memo(function ImageGallery({ images, columns = [
34
+ 2,
35
+ 3,
36
+ 4
37
+ ], pageSize = 12, onDownload, onDelete, onClick, lightbox = true, thumbnailHeight = 140, emptyMessage = "No images captured", newCount: _newCount, style }) {
38
+ const { tokens } = useTheme();
39
+ const { breakpoint } = useBreakpoint();
40
+ const [currentPage, setCurrentPage] = useState(0);
41
+ const [selectedImage, setSelectedImage] = useState(null);
42
+ const [hoveredId, setHoveredId] = useState(null);
43
+ const cols = Array.isArray(columns) ? resolveResponsiveValue(columns, breakpoint) : columns;
44
+ const totalPages = pageSize > 0 ? Math.ceil(images.length / pageSize) : 1;
45
+ const pageImages = pageSize > 0 ? images.slice(currentPage * pageSize, (currentPage + 1) * pageSize) : images;
46
+ useEffect(() => {
47
+ if (currentPage >= totalPages && totalPages > 0) setCurrentPage(totalPages - 1);
48
+ }, [
49
+ images.length,
50
+ totalPages,
51
+ currentPage
52
+ ]);
53
+ useEffect(() => {
54
+ if (!selectedImage) return;
55
+ const handler = (e) => {
56
+ if (e.key === "Escape") setSelectedImage(null);
57
+ };
58
+ document.addEventListener("keydown", handler);
59
+ return () => document.removeEventListener("keydown", handler);
60
+ }, [selectedImage]);
61
+ const handleImageClick = useCallback((img) => {
62
+ onClick?.(img);
63
+ if (lightbox) setSelectedImage(img);
64
+ }, [onClick, lightbox]);
65
+ const formatTime = (ts) => {
66
+ if (!ts) return "";
67
+ return new Date(ts).toLocaleTimeString([], {
68
+ hour: "2-digit",
69
+ minute: "2-digit",
70
+ second: "2-digit"
71
+ });
72
+ };
73
+ const ActionBtn = ({ icon, label, onClick: handler, color }) => /* @__PURE__ */ jsx("button", {
74
+ "aria-label": label,
75
+ onClick: (e) => {
76
+ e.stopPropagation();
77
+ handler();
78
+ },
79
+ style: {
80
+ display: "flex",
81
+ alignItems: "center",
82
+ justifyContent: "center",
83
+ width: 28,
84
+ height: 28,
85
+ border: `1px solid ${tokens.colors.border.muted}`,
86
+ borderRadius: tokens.borderRadius.sm,
87
+ backgroundColor: `${tokens.colors.background.elevated}e0`,
88
+ color: color || tokens.colors.text.secondary,
89
+ cursor: "pointer",
90
+ transition: tokens.animation.fast,
91
+ backdropFilter: "blur(4px)"
92
+ },
93
+ children: icon
94
+ });
95
+ const downloadIcon = /* @__PURE__ */ jsxs("svg", {
96
+ width: "14",
97
+ height: "14",
98
+ viewBox: "0 0 24 24",
99
+ fill: "none",
100
+ stroke: "currentColor",
101
+ strokeWidth: "2",
102
+ strokeLinecap: "round",
103
+ children: [
104
+ /* @__PURE__ */ jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
105
+ /* @__PURE__ */ jsx("polyline", { points: "7 10 12 15 17 10" }),
106
+ /* @__PURE__ */ jsx("line", {
107
+ x1: "12",
108
+ y1: "15",
109
+ x2: "12",
110
+ y2: "3"
111
+ })
112
+ ]
113
+ });
114
+ const deleteIcon = /* @__PURE__ */ jsxs("svg", {
115
+ width: "14",
116
+ height: "14",
117
+ viewBox: "0 0 24 24",
118
+ fill: "none",
119
+ stroke: "currentColor",
120
+ strokeWidth: "2",
121
+ strokeLinecap: "round",
122
+ children: [/* @__PURE__ */ jsx("polyline", { points: "3 6 5 6 21 6" }), /* @__PURE__ */ jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })]
123
+ });
124
+ return /* @__PURE__ */ jsxs("div", {
125
+ style: {
126
+ fontFamily: tokens.typography.fontFamily.primary,
127
+ ...style
128
+ },
129
+ children: [
130
+ images.length === 0 && /* @__PURE__ */ jsx("div", {
131
+ style: {
132
+ display: "flex",
133
+ alignItems: "center",
134
+ justifyContent: "center",
135
+ height: 200,
136
+ color: tokens.colors.text.tertiary,
137
+ fontSize: tokens.typography.fontSize.sm,
138
+ border: `1px dashed ${tokens.colors.border.muted}`,
139
+ borderRadius: tokens.borderRadius.md
140
+ },
141
+ children: emptyMessage
142
+ }),
143
+ pageImages.length > 0 && /* @__PURE__ */ jsx("div", {
144
+ style: {
145
+ display: "grid",
146
+ gridTemplateColumns: `repeat(${cols}, 1fr)`,
147
+ gap: tokens.spacing.sm
148
+ },
149
+ children: pageImages.map((img) => {
150
+ const isHovered = hoveredId === img.id;
151
+ return /* @__PURE__ */ jsxs("div", {
152
+ role: "button",
153
+ tabIndex: 0,
154
+ "aria-label": `View image ${img.name || img.id}`,
155
+ onClick: () => handleImageClick(img),
156
+ onKeyDown: (e) => {
157
+ if (e.key === "Enter" || e.key === " ") {
158
+ e.preventDefault();
159
+ handleImageClick(img);
160
+ }
161
+ },
162
+ onMouseEnter: () => setHoveredId(img.id),
163
+ onMouseLeave: () => setHoveredId(null),
164
+ style: {
165
+ position: "relative",
166
+ borderRadius: tokens.borderRadius.md,
167
+ border: `1px solid ${tokens.colors.border.muted}`,
168
+ overflow: "hidden",
169
+ cursor: "pointer",
170
+ transition: tokens.animation.fast,
171
+ transform: isHovered ? "translateY(-2px)" : "none",
172
+ boxShadow: isHovered ? tokens.shadows.md : "none",
173
+ backgroundColor: tokens.colors.background.surface
174
+ },
175
+ children: [
176
+ img.badge ? /* @__PURE__ */ jsx("span", {
177
+ style: {
178
+ position: "absolute",
179
+ top: tokens.spacing.xs,
180
+ left: tokens.spacing.xs,
181
+ zIndex: 1,
182
+ padding: `2px ${tokens.spacing.xs}`,
183
+ borderRadius: tokens.borderRadius.sm,
184
+ backgroundColor: tokens.colors.accent.primary,
185
+ color: "#fff",
186
+ fontSize: tokens.typography.fontSize.micro,
187
+ fontWeight: tokens.typography.fontWeight.bold,
188
+ letterSpacing: "0.06em",
189
+ textTransform: "uppercase",
190
+ lineHeight: 1.4,
191
+ pointerEvents: "none",
192
+ boxShadow: tokens.shadows.sm
193
+ },
194
+ children: img.badge
195
+ }) : null,
196
+ /* @__PURE__ */ jsx("div", {
197
+ style: {
198
+ height: thumbnailHeight,
199
+ display: "flex",
200
+ alignItems: "center",
201
+ justifyContent: "center",
202
+ overflow: "hidden",
203
+ backgroundColor: tokens.colors.background.base
204
+ },
205
+ children: /* @__PURE__ */ jsx("img", {
206
+ src: img.src,
207
+ alt: img.name,
208
+ loading: "lazy",
209
+ onError: (e) => {
210
+ const target = e.target;
211
+ target.style.display = "none";
212
+ target.parentElement.innerHTML = `<span style="color:${tokens.colors.text.tertiary};font-size:${tokens.typography.fontSize.xxs}">Image unavailable</span>`;
213
+ },
214
+ style: {
215
+ maxWidth: "100%",
216
+ maxHeight: "100%",
217
+ objectFit: "contain"
218
+ }
219
+ })
220
+ }),
221
+ /* @__PURE__ */ jsxs("div", {
222
+ style: {
223
+ padding: `${tokens.spacing.xs} ${tokens.spacing.sm}`,
224
+ borderTop: `1px solid ${tokens.colors.border.muted}`
225
+ },
226
+ children: [/* @__PURE__ */ jsx("div", {
227
+ style: {
228
+ fontSize: tokens.typography.fontSize.xxs,
229
+ fontWeight: tokens.typography.fontWeight.medium,
230
+ color: tokens.colors.text.primary,
231
+ whiteSpace: "nowrap",
232
+ overflow: "hidden",
233
+ textOverflow: "ellipsis"
234
+ },
235
+ children: img.name
236
+ }), img.timestamp && /* @__PURE__ */ jsx("div", {
237
+ style: {
238
+ fontSize: tokens.typography.fontSize.micro,
239
+ color: tokens.colors.text.tertiary,
240
+ fontFamily: tokens.typography.fontFamily.mono
241
+ },
242
+ children: formatTime(img.timestamp)
243
+ })]
244
+ }),
245
+ isHovered && /* @__PURE__ */ jsxs("div", {
246
+ style: {
247
+ position: "absolute",
248
+ top: tokens.spacing.xs,
249
+ right: tokens.spacing.xs,
250
+ display: "flex",
251
+ gap: "4px"
252
+ },
253
+ children: [onDownload && /* @__PURE__ */ jsx(ActionBtn, {
254
+ icon: downloadIcon,
255
+ label: "Download",
256
+ onClick: () => onDownload(img)
257
+ }), onDelete && /* @__PURE__ */ jsx(ActionBtn, {
258
+ icon: deleteIcon,
259
+ label: "Delete",
260
+ onClick: () => onDelete(img),
261
+ color: tokens.colors.status.critical
262
+ })]
263
+ })
264
+ ]
265
+ }, img.id);
266
+ })
267
+ }),
268
+ totalPages > 1 && /* @__PURE__ */ jsx("div", {
269
+ style: {
270
+ display: "flex",
271
+ justifyContent: "center",
272
+ alignItems: "center",
273
+ marginTop: tokens.spacing.md
274
+ },
275
+ children: /* @__PURE__ */ jsx(Pagination, {
276
+ currentPage: currentPage + 1,
277
+ totalPages,
278
+ onChange: (page) => setCurrentPage(Math.max(0, page - 1)),
279
+ showFirstLast: false,
280
+ displayMode: "text",
281
+ size: "small"
282
+ })
283
+ }),
284
+ selectedImage && /* @__PURE__ */ jsxs(Fragment, { children: [
285
+ /* @__PURE__ */ jsx("div", {
286
+ "aria-hidden": "true",
287
+ onClick: () => setSelectedImage(null),
288
+ style: {
289
+ position: "fixed",
290
+ inset: 0,
291
+ zIndex: 9998,
292
+ backgroundColor: `${tokens.colors.background.base}e0`,
293
+ backdropFilter: "blur(8px)",
294
+ animation: `zendir-lb-fade 200ms ${tokens.animation.easing.default}`
295
+ }
296
+ }),
297
+ /* @__PURE__ */ jsxs("div", {
298
+ role: "dialog",
299
+ "aria-modal": "true",
300
+ "aria-label": `Image: ${selectedImage.name}`,
301
+ onClick: () => setSelectedImage(null),
302
+ style: {
303
+ position: "fixed",
304
+ inset: 0,
305
+ zIndex: 9999,
306
+ display: "flex",
307
+ flexDirection: "column",
308
+ alignItems: "center",
309
+ justifyContent: "center",
310
+ padding: tokens.spacing.xl
311
+ },
312
+ children: [/* @__PURE__ */ jsx("img", {
313
+ src: selectedImage.src,
314
+ alt: selectedImage.name,
315
+ onClick: (e) => e.stopPropagation(),
316
+ style: {
317
+ maxWidth: "90vw",
318
+ maxHeight: "80vh",
319
+ objectFit: "contain",
320
+ borderRadius: tokens.borderRadius.md,
321
+ boxShadow: tokens.shadows.xl,
322
+ animation: `zendir-lb-scale 250ms ${tokens.animation.easing.default}`
323
+ }
324
+ }), /* @__PURE__ */ jsxs("div", {
325
+ style: {
326
+ display: "flex",
327
+ alignItems: "center",
328
+ gap: tokens.spacing.md,
329
+ marginTop: tokens.spacing.md
330
+ },
331
+ onClick: (e) => e.stopPropagation(),
332
+ children: [
333
+ /* @__PURE__ */ jsx("span", {
334
+ style: {
335
+ color: tokens.colors.text.primary,
336
+ fontSize: tokens.typography.fontSize.sm,
337
+ fontWeight: tokens.typography.fontWeight.medium
338
+ },
339
+ children: selectedImage.name
340
+ }),
341
+ onDownload && /* @__PURE__ */ jsx("button", {
342
+ onClick: () => onDownload(selectedImage),
343
+ style: {
344
+ padding: "6px 16px",
345
+ fontSize: tokens.typography.fontSize.xs,
346
+ color: tokens.colors.text.primary,
347
+ backgroundColor: `${tokens.colors.accent.primary}20`,
348
+ border: `1px solid ${tokens.colors.accent.primary}40`,
349
+ borderRadius: tokens.borderRadius.md,
350
+ cursor: "pointer",
351
+ fontFamily: tokens.typography.fontFamily.primary
352
+ },
353
+ children: "Download"
354
+ }),
355
+ onDelete && /* @__PURE__ */ jsx("button", {
356
+ onClick: () => {
357
+ onDelete(selectedImage);
358
+ setSelectedImage(null);
359
+ },
360
+ style: {
361
+ padding: "6px 16px",
362
+ fontSize: tokens.typography.fontSize.xs,
363
+ color: tokens.colors.status.critical,
364
+ backgroundColor: `${tokens.colors.status.critical}15`,
365
+ border: `1px solid ${tokens.colors.status.critical}30`,
366
+ borderRadius: tokens.borderRadius.md,
367
+ cursor: "pointer",
368
+ fontFamily: tokens.typography.fontFamily.primary
369
+ },
370
+ children: "Delete"
371
+ })
372
+ ]
373
+ })]
374
+ }),
375
+ /* @__PURE__ */ jsx("style", { children: `
311
376
  @keyframes zendir-lb-fade { from { opacity: 0; } to { opacity: 1; } }
312
377
  @keyframes zendir-lb-scale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
313
378
  ` })
314
- ] })
315
- ] });
379
+ ] })
380
+ ]
381
+ });
316
382
  });
317
- export {
318
- ImageGallery
319
- };
320
- //# sourceMappingURL=ImageGallery.js.map
383
+ //#endregion
384
+ export { ImageGallery, ImageGallery as default };
385
+
386
+ //# sourceMappingURL=ImageGallery.js.map