@seed-ship/mcp-ui-solid 8.0.0-solid2.3 → 8.0.0-solid2.4

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 (276) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/README.md +12 -9
  3. package/dist/components/ActionGroupRenderer.cjs +49 -49
  4. package/dist/components/ActionGroupRenderer.cjs.map +1 -1
  5. package/dist/components/ActionGroupRenderer.js +50 -50
  6. package/dist/components/ActionGroupRenderer.js.map +1 -1
  7. package/dist/components/AgentCard.cjs +58 -57
  8. package/dist/components/AgentCard.cjs.map +1 -1
  9. package/dist/components/AgentCard.js +59 -58
  10. package/dist/components/AgentCard.js.map +1 -1
  11. package/dist/components/AgentHandoff.cjs +21 -27
  12. package/dist/components/AgentHandoff.cjs.map +1 -1
  13. package/dist/components/AgentHandoff.js +22 -28
  14. package/dist/components/AgentHandoff.js.map +1 -1
  15. package/dist/components/ArtifactRenderer.cjs +0 -1
  16. package/dist/components/ArtifactRenderer.cjs.map +1 -1
  17. package/dist/components/ArtifactRenderer.js +0 -1
  18. package/dist/components/ArtifactRenderer.js.map +1 -1
  19. package/dist/components/AutocompleteDropdown.cjs +165 -161
  20. package/dist/components/AutocompleteDropdown.cjs.map +1 -1
  21. package/dist/components/AutocompleteDropdown.js +165 -161
  22. package/dist/components/AutocompleteDropdown.js.map +1 -1
  23. package/dist/components/AutocompleteFormField.cjs +220 -214
  24. package/dist/components/AutocompleteFormField.cjs.map +1 -1
  25. package/dist/components/AutocompleteFormField.js +222 -216
  26. package/dist/components/AutocompleteFormField.js.map +1 -1
  27. package/dist/components/BriefingDiff.cjs +156 -146
  28. package/dist/components/BriefingDiff.cjs.map +1 -1
  29. package/dist/components/BriefingDiff.js +156 -146
  30. package/dist/components/BriefingDiff.js.map +1 -1
  31. package/dist/components/ChartJSRenderer.cjs +261 -250
  32. package/dist/components/ChartJSRenderer.cjs.map +1 -1
  33. package/dist/components/ChartJSRenderer.js +261 -250
  34. package/dist/components/ChartJSRenderer.js.map +1 -1
  35. package/dist/components/ChatPrompt.cjs +70 -67
  36. package/dist/components/ChatPrompt.cjs.map +1 -1
  37. package/dist/components/ChatPrompt.js +70 -67
  38. package/dist/components/ChatPrompt.js.map +1 -1
  39. package/dist/components/CodeBlockRenderer.cjs +46 -46
  40. package/dist/components/CodeBlockRenderer.cjs.map +1 -1
  41. package/dist/components/CodeBlockRenderer.js +48 -48
  42. package/dist/components/CodeBlockRenderer.js.map +1 -1
  43. package/dist/components/DataPreviewSection.cjs +187 -180
  44. package/dist/components/DataPreviewSection.cjs.map +1 -1
  45. package/dist/components/DataPreviewSection.js +188 -181
  46. package/dist/components/DataPreviewSection.js.map +1 -1
  47. package/dist/components/DegradedFallback.cjs +23 -26
  48. package/dist/components/DegradedFallback.cjs.map +1 -1
  49. package/dist/components/DegradedFallback.js +24 -27
  50. package/dist/components/DegradedFallback.js.map +1 -1
  51. package/dist/components/DraggableGridItem.cjs +32 -38
  52. package/dist/components/DraggableGridItem.cjs.map +1 -1
  53. package/dist/components/DraggableGridItem.js +33 -39
  54. package/dist/components/DraggableGridItem.js.map +1 -1
  55. package/dist/components/EditableUIResourceRenderer.cjs +115 -122
  56. package/dist/components/EditableUIResourceRenderer.cjs.map +1 -1
  57. package/dist/components/EditableUIResourceRenderer.js +116 -123
  58. package/dist/components/EditableUIResourceRenderer.js.map +1 -1
  59. package/dist/components/ExpandableWrapper.cjs +51 -52
  60. package/dist/components/ExpandableWrapper.cjs.map +1 -1
  61. package/dist/components/ExpandableWrapper.js +53 -54
  62. package/dist/components/ExpandableWrapper.js.map +1 -1
  63. package/dist/components/FeedbackInline.cjs +25 -26
  64. package/dist/components/FeedbackInline.cjs.map +1 -1
  65. package/dist/components/FeedbackInline.js +27 -28
  66. package/dist/components/FeedbackInline.js.map +1 -1
  67. package/dist/components/FooterRenderer.cjs +97 -89
  68. package/dist/components/FooterRenderer.cjs.map +1 -1
  69. package/dist/components/FooterRenderer.js +99 -91
  70. package/dist/components/FooterRenderer.js.map +1 -1
  71. package/dist/components/FormFieldRenderer.cjs +632 -599
  72. package/dist/components/FormFieldRenderer.cjs.map +1 -1
  73. package/dist/components/FormFieldRenderer.js +634 -601
  74. package/dist/components/FormFieldRenderer.js.map +1 -1
  75. package/dist/components/FormRenderer.cjs +100 -93
  76. package/dist/components/FormRenderer.cjs.map +1 -1
  77. package/dist/components/FormRenderer.js +100 -93
  78. package/dist/components/FormRenderer.js.map +1 -1
  79. package/dist/components/GenerativeUIErrorBoundary.cjs +34 -30
  80. package/dist/components/GenerativeUIErrorBoundary.cjs.map +1 -1
  81. package/dist/components/GenerativeUIErrorBoundary.js +34 -30
  82. package/dist/components/GenerativeUIErrorBoundary.js.map +1 -1
  83. package/dist/components/GhostText.cjs +52 -52
  84. package/dist/components/GhostText.cjs.map +1 -1
  85. package/dist/components/GhostText.js +53 -53
  86. package/dist/components/GhostText.js.map +1 -1
  87. package/dist/components/GraphRenderer.cjs +134 -140
  88. package/dist/components/GraphRenderer.cjs.map +1 -1
  89. package/dist/components/GraphRenderer.js +135 -141
  90. package/dist/components/GraphRenderer.js.map +1 -1
  91. package/dist/components/IframeFallbackLink.cjs +5 -6
  92. package/dist/components/IframeFallbackLink.cjs.map +1 -1
  93. package/dist/components/IframeFallbackLink.js +7 -8
  94. package/dist/components/IframeFallbackLink.js.map +1 -1
  95. package/dist/components/ImageGalleryRenderer.cjs +51 -49
  96. package/dist/components/ImageGalleryRenderer.cjs.map +1 -1
  97. package/dist/components/ImageGalleryRenderer.js +52 -50
  98. package/dist/components/ImageGalleryRenderer.js.map +1 -1
  99. package/dist/components/LightboxOverlay.cjs +127 -122
  100. package/dist/components/LightboxOverlay.cjs.map +1 -1
  101. package/dist/components/LightboxOverlay.js +129 -124
  102. package/dist/components/LightboxOverlay.js.map +1 -1
  103. package/dist/components/MapRenderer.cjs +54 -52
  104. package/dist/components/MapRenderer.cjs.map +1 -1
  105. package/dist/components/MapRenderer.js +55 -53
  106. package/dist/components/MapRenderer.js.map +1 -1
  107. package/dist/components/ModalRenderer.cjs +90 -87
  108. package/dist/components/ModalRenderer.cjs.map +1 -1
  109. package/dist/components/ModalRenderer.js +92 -89
  110. package/dist/components/ModalRenderer.js.map +1 -1
  111. package/dist/components/PortalDropdownMenu.cjs +28 -31
  112. package/dist/components/PortalDropdownMenu.cjs.map +1 -1
  113. package/dist/components/PortalDropdownMenu.js +30 -33
  114. package/dist/components/PortalDropdownMenu.js.map +1 -1
  115. package/dist/components/PresentationFeedback.cjs +133 -124
  116. package/dist/components/PresentationFeedback.cjs.map +1 -1
  117. package/dist/components/PresentationFeedback.js +135 -126
  118. package/dist/components/PresentationFeedback.js.map +1 -1
  119. package/dist/components/RenderContext.cjs +0 -1
  120. package/dist/components/RenderContext.cjs.map +1 -1
  121. package/dist/components/RenderContext.js +0 -1
  122. package/dist/components/RenderContext.js.map +1 -1
  123. package/dist/components/ScratchpadPanel.cjs +1487 -1443
  124. package/dist/components/ScratchpadPanel.cjs.map +1 -1
  125. package/dist/components/ScratchpadPanel.js +1488 -1444
  126. package/dist/components/ScratchpadPanel.js.map +1 -1
  127. package/dist/components/SplitStepper.cjs +43 -39
  128. package/dist/components/SplitStepper.cjs.map +1 -1
  129. package/dist/components/SplitStepper.js +44 -40
  130. package/dist/components/SplitStepper.js.map +1 -1
  131. package/dist/components/StreamingUIRenderer.cjs +209 -203
  132. package/dist/components/StreamingUIRenderer.cjs.map +1 -1
  133. package/dist/components/StreamingUIRenderer.js +210 -204
  134. package/dist/components/StreamingUIRenderer.js.map +1 -1
  135. package/dist/components/UIResourceRenderer.cjs +994 -984
  136. package/dist/components/UIResourceRenderer.cjs.map +1 -1
  137. package/dist/components/UIResourceRenderer.js +995 -985
  138. package/dist/components/UIResourceRenderer.js.map +1 -1
  139. package/dist/components/VideoRenderer.cjs +96 -91
  140. package/dist/components/VideoRenderer.cjs.map +1 -1
  141. package/dist/components/VideoRenderer.js +98 -93
  142. package/dist/components/VideoRenderer.js.map +1 -1
  143. package/dist/server/components/ActionGroupRenderer.cjs +51 -106
  144. package/dist/server/components/ActionGroupRenderer.cjs.map +1 -1
  145. package/dist/server/components/ActionGroupRenderer.js +52 -107
  146. package/dist/server/components/ActionGroupRenderer.js.map +1 -1
  147. package/dist/server/components/AgentCard.cjs +53 -102
  148. package/dist/server/components/AgentCard.cjs.map +1 -1
  149. package/dist/server/components/AgentCard.js +54 -103
  150. package/dist/server/components/AgentCard.js.map +1 -1
  151. package/dist/server/components/AgentHandoff.cjs +18 -44
  152. package/dist/server/components/AgentHandoff.cjs.map +1 -1
  153. package/dist/server/components/AgentHandoff.js +19 -45
  154. package/dist/server/components/AgentHandoff.js.map +1 -1
  155. package/dist/server/components/AutocompleteDropdown.cjs +144 -263
  156. package/dist/server/components/AutocompleteDropdown.cjs.map +1 -1
  157. package/dist/server/components/AutocompleteDropdown.js +144 -263
  158. package/dist/server/components/AutocompleteDropdown.js.map +1 -1
  159. package/dist/server/components/AutocompleteFormField.cjs +168 -353
  160. package/dist/server/components/AutocompleteFormField.cjs.map +1 -1
  161. package/dist/server/components/AutocompleteFormField.js +169 -354
  162. package/dist/server/components/AutocompleteFormField.js.map +1 -1
  163. package/dist/server/components/BriefingDiff.cjs +139 -289
  164. package/dist/server/components/BriefingDiff.cjs.map +1 -1
  165. package/dist/server/components/BriefingDiff.js +139 -289
  166. package/dist/server/components/BriefingDiff.js.map +1 -1
  167. package/dist/server/components/ChartJSRenderer.cjs +288 -536
  168. package/dist/server/components/ChartJSRenderer.cjs.map +1 -1
  169. package/dist/server/components/ChartJSRenderer.js +288 -536
  170. package/dist/server/components/ChartJSRenderer.js.map +1 -1
  171. package/dist/server/components/ChatPrompt.cjs +102 -197
  172. package/dist/server/components/ChatPrompt.cjs.map +1 -1
  173. package/dist/server/components/ChatPrompt.js +102 -197
  174. package/dist/server/components/ChatPrompt.js.map +1 -1
  175. package/dist/server/components/CodeBlockRenderer.cjs +62 -101
  176. package/dist/server/components/CodeBlockRenderer.cjs.map +1 -1
  177. package/dist/server/components/CodeBlockRenderer.js +64 -103
  178. package/dist/server/components/CodeBlockRenderer.js.map +1 -1
  179. package/dist/server/components/DataPreviewSection.cjs +161 -298
  180. package/dist/server/components/DataPreviewSection.cjs.map +1 -1
  181. package/dist/server/components/DataPreviewSection.js +162 -299
  182. package/dist/server/components/DataPreviewSection.js.map +1 -1
  183. package/dist/server/components/DegradedFallback.cjs +65 -125
  184. package/dist/server/components/DegradedFallback.cjs.map +1 -1
  185. package/dist/server/components/DegradedFallback.js +66 -126
  186. package/dist/server/components/DegradedFallback.js.map +1 -1
  187. package/dist/server/components/DraggableGridItem.cjs +64 -115
  188. package/dist/server/components/DraggableGridItem.cjs.map +1 -1
  189. package/dist/server/components/DraggableGridItem.js +65 -116
  190. package/dist/server/components/DraggableGridItem.js.map +1 -1
  191. package/dist/server/components/EditableUIResourceRenderer.cjs +119 -142
  192. package/dist/server/components/EditableUIResourceRenderer.cjs.map +1 -1
  193. package/dist/server/components/EditableUIResourceRenderer.js +120 -143
  194. package/dist/server/components/EditableUIResourceRenderer.js.map +1 -1
  195. package/dist/server/components/ExpandableWrapper.cjs +49 -92
  196. package/dist/server/components/ExpandableWrapper.cjs.map +1 -1
  197. package/dist/server/components/ExpandableWrapper.js +51 -94
  198. package/dist/server/components/ExpandableWrapper.js.map +1 -1
  199. package/dist/server/components/FeedbackInline.cjs +28 -60
  200. package/dist/server/components/FeedbackInline.cjs.map +1 -1
  201. package/dist/server/components/FeedbackInline.js +29 -61
  202. package/dist/server/components/FeedbackInline.js.map +1 -1
  203. package/dist/server/components/FooterRenderer.cjs +73 -146
  204. package/dist/server/components/FooterRenderer.cjs.map +1 -1
  205. package/dist/server/components/FooterRenderer.js +75 -148
  206. package/dist/server/components/FooterRenderer.js.map +1 -1
  207. package/dist/server/components/FormFieldRenderer.cjs +806 -1200
  208. package/dist/server/components/FormFieldRenderer.cjs.map +1 -1
  209. package/dist/server/components/FormFieldRenderer.js +808 -1202
  210. package/dist/server/components/FormFieldRenderer.js.map +1 -1
  211. package/dist/server/components/FormRenderer.cjs +112 -179
  212. package/dist/server/components/FormRenderer.cjs.map +1 -1
  213. package/dist/server/components/FormRenderer.js +112 -179
  214. package/dist/server/components/FormRenderer.js.map +1 -1
  215. package/dist/server/components/GenerativeUIErrorBoundary.cjs +63 -92
  216. package/dist/server/components/GenerativeUIErrorBoundary.cjs.map +1 -1
  217. package/dist/server/components/GenerativeUIErrorBoundary.js +63 -92
  218. package/dist/server/components/GenerativeUIErrorBoundary.js.map +1 -1
  219. package/dist/server/components/GhostText.cjs +76 -125
  220. package/dist/server/components/GhostText.cjs.map +1 -1
  221. package/dist/server/components/GhostText.js +77 -126
  222. package/dist/server/components/GhostText.js.map +1 -1
  223. package/dist/server/components/GraphRenderer.cjs +99 -170
  224. package/dist/server/components/GraphRenderer.cjs.map +1 -1
  225. package/dist/server/components/GraphRenderer.js +100 -171
  226. package/dist/server/components/GraphRenderer.js.map +1 -1
  227. package/dist/server/components/IframeFallbackLink.cjs +10 -37
  228. package/dist/server/components/IframeFallbackLink.cjs.map +1 -1
  229. package/dist/server/components/IframeFallbackLink.js +12 -39
  230. package/dist/server/components/IframeFallbackLink.js.map +1 -1
  231. package/dist/server/components/ImageGalleryRenderer.cjs +81 -129
  232. package/dist/server/components/ImageGalleryRenderer.cjs.map +1 -1
  233. package/dist/server/components/ImageGalleryRenderer.js +82 -130
  234. package/dist/server/components/ImageGalleryRenderer.js.map +1 -1
  235. package/dist/server/components/LightboxOverlay.cjs +86 -180
  236. package/dist/server/components/LightboxOverlay.cjs.map +1 -1
  237. package/dist/server/components/LightboxOverlay.js +88 -182
  238. package/dist/server/components/LightboxOverlay.js.map +1 -1
  239. package/dist/server/components/MapRenderer.cjs +78 -121
  240. package/dist/server/components/MapRenderer.cjs.map +1 -1
  241. package/dist/server/components/MapRenderer.js +79 -122
  242. package/dist/server/components/MapRenderer.js.map +1 -1
  243. package/dist/server/components/ModalRenderer.cjs +72 -138
  244. package/dist/server/components/ModalRenderer.cjs.map +1 -1
  245. package/dist/server/components/ModalRenderer.js +74 -140
  246. package/dist/server/components/ModalRenderer.js.map +1 -1
  247. package/dist/server/components/PortalDropdownMenu.cjs +11 -14
  248. package/dist/server/components/PortalDropdownMenu.cjs.map +1 -1
  249. package/dist/server/components/PortalDropdownMenu.js +13 -16
  250. package/dist/server/components/PortalDropdownMenu.js.map +1 -1
  251. package/dist/server/components/PresentationFeedback.cjs +94 -173
  252. package/dist/server/components/PresentationFeedback.cjs.map +1 -1
  253. package/dist/server/components/PresentationFeedback.js +96 -175
  254. package/dist/server/components/PresentationFeedback.js.map +1 -1
  255. package/dist/server/components/ScratchpadPanel.cjs +1873 -3070
  256. package/dist/server/components/ScratchpadPanel.cjs.map +1 -1
  257. package/dist/server/components/ScratchpadPanel.js +1873 -3070
  258. package/dist/server/components/ScratchpadPanel.js.map +1 -1
  259. package/dist/server/components/SplitStepper.cjs +48 -90
  260. package/dist/server/components/SplitStepper.cjs.map +1 -1
  261. package/dist/server/components/SplitStepper.js +49 -91
  262. package/dist/server/components/SplitStepper.js.map +1 -1
  263. package/dist/server/components/StreamingUIRenderer.cjs +180 -344
  264. package/dist/server/components/StreamingUIRenderer.cjs.map +1 -1
  265. package/dist/server/components/StreamingUIRenderer.js +181 -345
  266. package/dist/server/components/StreamingUIRenderer.js.map +1 -1
  267. package/dist/server/components/UIResourceRenderer.cjs +1378 -2070
  268. package/dist/server/components/UIResourceRenderer.cjs.map +1 -1
  269. package/dist/server/components/UIResourceRenderer.js +1379 -2071
  270. package/dist/server/components/UIResourceRenderer.js.map +1 -1
  271. package/dist/server/components/VideoRenderer.cjs +95 -173
  272. package/dist/server/components/VideoRenderer.cjs.map +1 -1
  273. package/dist/server/components/VideoRenderer.js +97 -175
  274. package/dist/server/components/VideoRenderer.js.map +1 -1
  275. package/docs/SOLID2-STABLE-QUALIFICATION-2026-11-18.md +94 -0
  276. package/package.json +10 -9
@@ -3,8 +3,8 @@ import { formatMCPUIString } from "../utils/format-string.js";
3
3
  import { useMCPUIStrings } from "../context/MCPUIStringsContext.js";
4
4
  import { lockOverlayScroll } from "../utils/overlay-lifecycle.js";
5
5
  import { createPanZoom } from "../utils/pan-zoom.js";
6
- import { Portal, escape, scope, ssr, ssrAttribute, ssrGroup, ssrHydrationKey, ssrStyle } from "@solidjs/web";
7
- import { Show, createEffect, createMemo } from "solid-js";
6
+ import { Portal, escape, memo, scope, ssr, ssrAttribute, ssrGroup, ssrHydrationKey, ssrStyle } from "@solidjs/web";
7
+ import { createEffect, createMemo } from "solid-js";
8
8
  // src/components/LightboxOverlay.tsx
9
9
  /**
10
10
  * LightboxOverlay - Fullscreen image viewer
@@ -17,27 +17,6 @@ import { Show, createEffect, createMemo } from "solid-js";
17
17
  * lightbox and needs no host opt-in.
18
18
  */
19
19
  var _tmpl$ = [
20
- "<button",
21
- " class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"",
22
- "><svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 19l-7-7 7-7\"></path></svg></button>"
23
- ];
24
- var _tmpl$2 = [
25
- "<button",
26
- " class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"",
27
- "><svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 5l7 7-7 7\"></path></svg></button>"
28
- ];
29
- var _tmpl$3 = [
30
- "<div",
31
- " class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">",
32
- "</div>"
33
- ];
34
- var _tmpl$4 = [
35
- "<button",
36
- " class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"",
37
- "",
38
- " type=\"button\"><svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"></path></svg></button>"
39
- ];
40
- var _tmpl$5 = [
41
20
  "<div",
42
21
  " class=\"fixed inset-0 z-50 bg-black/90 flex items-center justify-center\"",
43
22
  " role=\"dialog\" aria-modal=\"true\"",
@@ -62,6 +41,27 @@ var _tmpl$5 = [
62
41
  " type=\"button\"><svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6\"></path></svg></button><!--$-->",
63
42
  "<!--/--></div></div>"
64
43
  ];
44
+ var _tmpl$2 = [
45
+ "<button",
46
+ " class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"",
47
+ "><svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 19l-7-7 7-7\"></path></svg></button>"
48
+ ];
49
+ var _tmpl$3 = [
50
+ "<button",
51
+ " class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"",
52
+ "><svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 5l7 7-7 7\"></path></svg></button>"
53
+ ];
54
+ var _tmpl$4 = [
55
+ "<div",
56
+ " class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">",
57
+ "</div>"
58
+ ];
59
+ var _tmpl$5 = [
60
+ "<button",
61
+ " class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"",
62
+ "",
63
+ " type=\"button\"><svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"></path></svg></button>"
64
+ ];
65
65
  var _m$ = Symbol();
66
66
  var _m$2 = Symbol();
67
67
  var _m$3 = Symbol();
@@ -69,110 +69,7 @@ var _m$4 = Symbol();
69
69
  var _m$5 = Symbol();
70
70
  var _m$6 = Symbol();
71
71
  var _m$7 = Symbol();
72
- var _m$8 = Symbol();
73
72
  var _d$ = {
74
- get() {
75
- const canGoPrev = this[_m$];
76
- return canGoPrev();
77
- },
78
- enumerable: true,
79
- configurable: true
80
- };
81
- var _d$2 = {
82
- get() {
83
- const strings = this[_m$2];
84
- var _v$6 = ssrHydrationKey(), _v$7 = () => {
85
- return ssrAttribute("aria-label", escape(strings.lightboxPrevious, true));
86
- };
87
- return ssr(_tmpl$, _v$6, _v$7);
88
- },
89
- enumerable: true,
90
- configurable: true
91
- };
92
- function _P$(_p, _p2) {
93
- this[_m$] = _p;
94
- this[_m$2] = _p2;
95
- Object.defineProperty(this, "when", _d$);
96
- Object.defineProperty(this, "children", _d$2);
97
- }
98
- _P$.prototype = Object.prototype;
99
- var _d$3 = {
100
- get() {
101
- const canGoNext = this[_m$];
102
- return canGoNext();
103
- },
104
- enumerable: true,
105
- configurable: true
106
- };
107
- var _d$4 = {
108
- get() {
109
- const strings = this[_m$2];
110
- var _v$9 = ssrHydrationKey(), _v$10 = () => {
111
- return ssrAttribute("aria-label", escape(strings.lightboxNext, true));
112
- };
113
- return ssr(_tmpl$2, _v$9, _v$10);
114
- },
115
- enumerable: true,
116
- configurable: true
117
- };
118
- function _P$2(_p3, _p4) {
119
- this[_m$] = _p3;
120
- this[_m$2] = _p4;
121
- Object.defineProperty(this, "when", _d$3);
122
- Object.defineProperty(this, "children", _d$4);
123
- }
124
- _P$2.prototype = Object.prototype;
125
- var _d$5 = {
126
- get() {
127
- const currentImage = this[_m$];
128
- return currentImage()?.caption;
129
- },
130
- enumerable: true,
131
- configurable: true
132
- };
133
- var _d$6 = {
134
- get() {
135
- const currentImage = this[_m$];
136
- var _v$18 = ssrHydrationKey(), _v$19 = scope(() => {
137
- return escape(currentImage().caption);
138
- });
139
- return ssr(_tmpl$3, _v$18, _v$19);
140
- },
141
- enumerable: true,
142
- configurable: true
143
- };
144
- function _P$3(_p5) {
145
- this[_m$] = _p5;
146
- Object.defineProperty(this, "when", _d$5);
147
- Object.defineProperty(this, "children", _d$6);
148
- }
149
- _P$3.prototype = Object.prototype;
150
- var _d$7 = {
151
- get() {
152
- return this[_m$].isZoomed();
153
- },
154
- enumerable: true,
155
- configurable: true
156
- };
157
- var _d$8 = {
158
- get() {
159
- const strings = this[_m$2];
160
- var _v$30 = ssrHydrationKey(), _g$ = ssrGroup(() => {
161
- return [ssrAttribute("aria-label", escape(strings.zoomReset, true)), ssrAttribute("title", escape(strings.zoomReset, true))];
162
- }, 2);
163
- return ssr(_tmpl$4, _v$30, _g$, _g$);
164
- },
165
- enumerable: true,
166
- configurable: true
167
- };
168
- function _P$4(_p6, _p7) {
169
- this[_m$] = _p6;
170
- this[_m$2] = _p7;
171
- Object.defineProperty(this, "when", _d$7);
172
- Object.defineProperty(this, "children", _d$8);
173
- }
174
- _P$4.prototype = Object.prototype;
175
- var _d$9 = {
176
73
  get() {
177
74
  const panZoom = this[_m$];
178
75
  const strings = this[_m$2];
@@ -181,90 +78,95 @@ var _d$9 = {
181
78
  this[_m$5];
182
79
  const currentImage = this[_m$6];
183
80
  const props = this[_m$7];
184
- var _v$ = ssrHydrationKey(), _g$5 = ssrGroup(() => {
81
+ var _v$ = ssrHydrationKey(), _g$4 = ssrGroup(() => {
185
82
  return [
186
83
  ((_v$2) => _v$2 == null ? "" : ssrAttribute("style", ssrStyle(_v$2)))(panZoom.surfaceStyle()),
187
84
  ssrAttribute("aria-label", escape(strings.lightboxLabel, true)),
188
85
  ssrAttribute("aria-label", escape(strings.lightboxClose, true))
189
86
  ];
190
- }, 3), _v$8 = escape(Show(new _P$(canGoPrev, strings))), _v$11 = escape(Show(new _P$2(canGoNext, strings))), _g$4 = ssrGroup(() => {
87
+ }, 3), _v$6 = scope((() => {
88
+ var _c$ = memo(() => {
89
+ return !!canGoPrev();
90
+ });
91
+ return () => {
92
+ var _v$25, _v$26;
93
+ return _c$() ? (_v$25 = ssrHydrationKey(), _v$26 = () => {
94
+ return ssrAttribute("aria-label", escape(strings.lightboxPrevious, true));
95
+ }, ssr(_tmpl$2, _v$25, _v$26)) : void 0;
96
+ };
97
+ })()), _v$7 = scope((() => {
98
+ var _c$2 = memo(() => {
99
+ return !!canGoNext();
100
+ });
101
+ return () => {
102
+ var _v$27, _v$28;
103
+ return _c$2() ? (_v$27 = ssrHydrationKey(), _v$28 = () => {
104
+ return ssrAttribute("aria-label", escape(strings.lightboxNext, true));
105
+ }, ssr(_tmpl$3, _v$27, _v$28)) : void 0;
106
+ };
107
+ })()), _g$3 = ssrGroup(() => {
191
108
  return [
192
109
  ssrAttribute("src", escape(safeUrl(currentImage()?.url ?? "", { allowDataImage: true }), true)),
193
110
  ssrAttribute("alt", escape(currentImage()?.alt || "", true)),
194
111
  ssrAttribute("srcset", escape(currentImage()?.srcset, true)),
195
112
  ssrAttribute("sizes", escape(currentImage()?.sizes, true)),
196
- ((_v$16) => _v$16 == null ? "" : ssrAttribute("style", ssrStyle(_v$16)))(panZoom.contentStyle())
113
+ ((_v$12) => _v$12 == null ? "" : ssrAttribute("style", ssrStyle(_v$12)))(panZoom.contentStyle())
197
114
  ];
198
- }, 5), _v$20 = escape(Show(new _P$3(currentImage))), _v$21 = () => {
115
+ }, 5), _v$14 = scope((() => {
116
+ var _c$3 = memo(() => {
117
+ return !!currentImage()?.caption;
118
+ });
119
+ return () => {
120
+ var _v$29, _v$30;
121
+ return _c$3() ? (_v$29 = ssrHydrationKey(), _v$30 = scope(() => {
122
+ return escape(currentImage().caption);
123
+ }), ssr(_tmpl$4, _v$29, _v$30)) : void 0;
124
+ };
125
+ })()), _v$15 = () => {
199
126
  return escape(props.selectedIndex ?? 0) + 1;
200
- }, _v$22 = scope(() => {
127
+ }, _v$16 = scope(() => {
201
128
  return escape(props.images.length);
202
- }), _g$3 = ssrGroup(() => {
129
+ }), _g$2 = ssrGroup(() => {
203
130
  return [
204
131
  ssrAttribute("disabled", escape(panZoom.scale(), true) <= escape(panZoom.min, true)),
205
132
  ssrAttribute("aria-label", escape(strings.zoomOut, true)),
206
133
  ssrAttribute("title", escape(strings.zoomOut, true))
207
134
  ];
208
- }, 3), _v$26 = scope(() => {
135
+ }, 3), _v$20 = scope(() => {
209
136
  return escape(formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() }));
210
- }), _g$2 = ssrGroup(() => {
137
+ }), _g$ = ssrGroup(() => {
211
138
  return [
212
139
  ssrAttribute("disabled", escape(panZoom.scale(), true) >= escape(panZoom.max, true)),
213
140
  ssrAttribute("aria-label", escape(strings.zoomIn, true)),
214
141
  ssrAttribute("title", escape(strings.zoomIn, true))
215
142
  ];
216
- }, 3), _v$33 = escape(Show(new _P$4(panZoom, strings)));
217
- return ssr(_tmpl$5, _v$, _g$5, _g$5, _g$5, _v$8, _v$11, _g$4, _g$4, _g$4, _g$4, _g$4, _v$20, _v$21, _v$22, _g$3, _g$3, _g$3, _v$26, _g$2, _g$2, _g$2, _v$33);
143
+ }, 3), _v$24 = scope((() => {
144
+ var _c$4 = memo(() => {
145
+ return !!panZoom.isZoomed();
146
+ });
147
+ return () => {
148
+ var _v$31, _g$5;
149
+ return _c$4() ? (_v$31 = ssrHydrationKey(), _g$5 = ssrGroup(() => {
150
+ return [ssrAttribute("aria-label", escape(strings.zoomReset, true)), ssrAttribute("title", escape(strings.zoomReset, true))];
151
+ }, 2), ssr(_tmpl$5, _v$31, _g$5, _g$5)) : void 0;
152
+ };
153
+ })());
154
+ return ssr(_tmpl$, _v$, _g$4, _g$4, _g$4, _v$6, _v$7, _g$3, _g$3, _g$3, _g$3, _g$3, _v$14, _v$15, _v$16, _g$2, _g$2, _g$2, _v$20, _g$, _g$, _g$, _v$24);
218
155
  },
219
156
  enumerable: true,
220
157
  configurable: true
221
158
  };
222
- function _P$5(_p8, _p9, _p0, _p1, _p10, _p11, _p12) {
223
- this[_m$] = _p8;
224
- this[_m$2] = _p9;
225
- this[_m$3] = _p0;
226
- this[_m$4] = _p1;
227
- this[_m$5] = _p10;
228
- this[_m$6] = _p11;
229
- this[_m$7] = _p12;
230
- Object.defineProperty(this, "children", _d$9);
231
- }
232
- _P$5.prototype = Object.prototype;
233
- var _d$10 = {
234
- get() {
235
- const isOpen = this[_m$];
236
- return isOpen();
237
- },
238
- enumerable: true,
239
- configurable: true
240
- };
241
- var _d$11 = {
242
- get() {
243
- const panZoom = this[_m$2];
244
- const strings = this[_m$3];
245
- const canGoPrev = this[_m$4];
246
- const canGoNext = this[_m$5];
247
- const imageRef = this[_m$6];
248
- const currentImage = this[_m$7];
249
- const props = this[_m$8];
250
- return Portal(new _P$5(panZoom, strings, canGoPrev, canGoNext, imageRef, currentImage, props));
251
- },
252
- enumerable: true,
253
- configurable: true
254
- };
255
- function _P$6(_p13, _p14, _p15, _p16, _p17, _p18, _p19, _p20) {
256
- this[_m$] = _p13;
257
- this[_m$2] = _p14;
258
- this[_m$3] = _p15;
259
- this[_m$4] = _p16;
260
- this[_m$5] = _p17;
261
- this[_m$6] = _p18;
262
- this[_m$7] = _p19;
263
- this[_m$8] = _p20;
264
- Object.defineProperty(this, "when", _d$10);
265
- Object.defineProperty(this, "children", _d$11);
159
+ function _P$(_p, _p2, _p3, _p4, _p5, _p6, _p7) {
160
+ this[_m$] = _p;
161
+ this[_m$2] = _p2;
162
+ this[_m$3] = _p3;
163
+ this[_m$4] = _p4;
164
+ this[_m$5] = _p5;
165
+ this[_m$6] = _p6;
166
+ this[_m$7] = _p7;
167
+ Object.defineProperty(this, "children", _d$);
266
168
  }
267
- _P$6.prototype = Object.prototype;
169
+ _P$.prototype = Object.prototype;
268
170
  /** Highest magnification of the lightbox — 8× the fitted size. */
269
171
  var MAX_ZOOM = 8;
270
172
  /** Ratio one press of a zoom button (or of `+` / `-`) applies. */
@@ -419,7 +321,11 @@ var LightboxOverlay = (props) => {
419
321
  releaseScroll();
420
322
  };
421
323
  });
422
- return Show(new _P$6(isOpen, panZoom, strings, canGoPrev, canGoNext, imageRef, currentImage, props));
324
+ return memo(() => {
325
+ return memo(() => {
326
+ return !!isOpen();
327
+ })() ? Portal(new _P$(panZoom, strings, canGoPrev, canGoNext, imageRef, currentImage, props)) : void 0;
328
+ });
423
329
  };
424
330
  export { LightboxOverlay };
425
331
 
@@ -1 +1 @@
1
- {"version":3,"file":"LightboxOverlay.js","names":["strings.lightboxPrevious","<button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>","aria-label={strings.lightboxPrevious}","strings.lightboxNext","<button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>","aria-label={strings.lightboxNext}","{currentImage()!.caption}","currentImage()!.caption","<div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>","aria-label={strings.zoomReset}","strings.zoomReset","title={strings.zoomReset}","<button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>","aria-label={strings.lightboxLabel}","strings.lightboxLabel","aria-label={strings.lightboxClose}","strings.lightboxClose","<Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>","<Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>","src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}","safeUrl(currentImage()?.url ?? '', { allowDataImage: true })","alt={currentImage()?.alt || ''}","currentImage()?.alt || ''","srcset={currentImage()?.srcset}","currentImage()?.srcset","sizes={currentImage()?.sizes}","currentImage()?.sizes","<Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>","props.selectedIndex ?? 0","{props.images.length}","props.images.length","disabled={panZoom.scale() <= panZoom.min}","panZoom.scale()","panZoom.min","aria-label={strings.zoomOut}","strings.zoomOut","title={strings.zoomOut}","{formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}","formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })","disabled={panZoom.scale() >= panZoom.max}","panZoom.max","aria-label={strings.zoomIn}","strings.zoomIn","title={strings.zoomIn}","<Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>\n </Show>","<div\n class=\"fixed inset-0 z-50 bg-black/90 flex items-center justify-center\"\n style={panZoom.surfaceStyle()}\n onClick={handleBackdropClick}\n onWheel={panZoom.onWheel}\n onPointerDown={handlePointerDown}\n onPointerMove={panZoom.onPointerMove}\n onPointerUp={panZoom.onPointerUp}\n onPointerCancel={panZoom.onPointerCancel}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={strings.lightboxLabel}\n >\n {/* Close button */}\n <button\n class=\"absolute top-4 right-4 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={props.onClose}\n aria-label={strings.lightboxClose}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n {/* Previous button */}\n <Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Next button */}\n <Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Image — `max-w/max-h` fit it, the transform zooms it from there */}\n <img\n ref={imageRef}\n src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}\n alt={currentImage()?.alt || ''}\n srcset={currentImage()?.srcset}\n sizes={currentImage()?.sizes}\n class=\"max-w-[90vw] max-h-[90vh] object-contain\"\n style={panZoom.contentStyle()}\n draggable={false}\n onClick={(e) => e.stopPropagation()}\n onDblClick={handleDoubleClick}\n />\n\n {/* Caption */}\n <Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>\n\n {/* Counter */}\n <div class=\"absolute top-4 left-4 text-white/80 bg-black/40 px-3 py-1 rounded-full text-sm\">\n {(props.selectedIndex ?? 0) + 1} / {props.images.length}\n </div>\n\n {/* Zoom controls — the pointer-only gestures made reachable by\n keyboard and touch. The wrapper swallows the click so the\n backdrop's close handler never sees it. */}\n <div\n class=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 bg-black/50 rounded-full px-2 py-1\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() <= panZoom.min}\n aria-label={strings.zoomOut}\n title={strings.zoomOut}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6\"\n />\n </svg>\n </button>\n\n <span\n class=\"text-white/80 text-xs tabular-nums text-center min-w-[4rem]\"\n aria-live=\"polite\"\n >\n {formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}\n </span>\n\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() >= panZoom.max}\n aria-label={strings.zoomIn}\n title={strings.zoomIn}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6\"\n />\n </svg>\n </button>\n\n {/* Only while there is something to reset — at 100% it would be a\n button that does nothing. */}\n <Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>\n </Show>\n </div>\n </div>","{(props.selectedIndex ?? 0) + 1}","_$ssrHydrationKey","_$ssrAttribute","_$escape","_$ssr","_$scope","_$ssrGroup","_$ssrStyle"],"sources":["../../../src/components/LightboxOverlay.tsx"],"sourcesContent":["/**\n * LightboxOverlay - Fullscreen image viewer\n * Sprint 5: Media Components\n *\n * v6.22.0 — zoom & pan. The overlay is a fullscreen `<Portal>`: it OWNS the\n * viewport, nothing scrolls behind it (the effect below locks `body`), so\n * hijacking the wheel here is legitimate in a way it would not be for a\n * component sitting inline in a chat feed. Zoom is therefore always on in the\n * lightbox and needs no host opt-in.\n */\n\nimport { Component, Show, createEffect, createMemo } from 'solid-js'\nimport { Portal } from \"@solidjs/web\";\nimport type { GalleryImage } from '../types'\nimport { safeUrl } from '../utils/safe-url'\nimport { lockOverlayScroll } from '../utils/overlay-lifecycle'\nimport { createPanZoom, type PanZoomPoint } from '../utils/pan-zoom'\nimport { formatMCPUIString, useMCPUIStrings } from '../context/MCPUIStringsContext'\n\n/** Highest magnification of the lightbox — 8× the fitted size. */\nconst MAX_ZOOM = 8\n\n/** Ratio one press of a zoom button (or of `+` / `-`) applies. */\nconst ZOOM_BUTTON_FACTOR = 1.5\n\n/**\n * Scale a double-click jumps to. Deliberately modest: a double-click is a\n * coarse gesture, and the wheel is right there for the rest.\n */\nconst DOUBLE_CLICK_ZOOM = 2\n\nexport interface LightboxOverlayProps {\n /**\n * Array of images to navigate through\n */\n images: GalleryImage[]\n\n /**\n * Currently selected image index (null when closed)\n */\n selectedIndex: number | null\n\n /**\n * Callback when lightbox should close\n */\n onClose: () => void\n\n /**\n * Callback when navigating to a different image\n */\n onNavigate: (index: number) => void\n}\n\nexport const LightboxOverlay: Component<LightboxOverlayProps> = (props) => {\n const strings = useMCPUIStrings()\n let imageRef: HTMLImageElement | undefined\n\n /**\n * The handlers are bound on the BACKDROP, not on the `<img>`: a pan that\n * drags the image out from under the cursor must keep receiving the pointer\n * stream, and a wheel event over the black margin around a portrait image\n * must still zoom. `target` therefore points the maths back at the image,\n * which is the element that actually carries the transform.\n */\n const panZoom = createPanZoom({ min: 1, max: MAX_ZOOM, target: () => imageRef })\n\n const isOpen = () => props.selectedIndex !== null\n const currentImage = () =>\n props.selectedIndex !== null ? props.images[props.selectedIndex] : null\n const canGoPrev = () => props.selectedIndex !== null && props.selectedIndex > 0\n const canGoNext = () =>\n props.selectedIndex !== null && props.selectedIndex < props.images.length - 1\n\n const handlePrev = () => {\n if (canGoPrev()) {\n props.onNavigate(props.selectedIndex! - 1)\n }\n }\n\n const handleNext = () => {\n if (canGoNext()) {\n props.onNavigate(props.selectedIndex! + 1)\n }\n }\n\n /**\n * Identity of the picture on screen, as a VALUE rather than as an object\n * reference — `null` while the overlay is closed.\n *\n * The index alone does not name a picture. A host that replaces `images`\n * under a held `selectedIndex` — a gallery whose list streams in, a refilter,\n * a re-render that rebuilds the array — puts a different photo on screen\n * without the index ever moving. `url` and `srcset` are what the `<img>`\n * below actually resolves, so together with the index they are what \"the\n * displayed image changed\" has to mean. (`sizes` is left out on purpose: it\n * re-picks among the candidates of the SAME picture, so it changes the\n * resolution fetched, never the subject the zoom is framing.)\n *\n * A memo, and a string, so the comparison is by value: `ImageGalleryRenderer`\n * passes `params()?.images || []`, a fresh array on every parent update, and\n * re-reading that must not by itself count as a new picture — it would throw\n * away a zoom the user is in the middle of. The index stays in the key so\n * that navigating between two entries sharing a URL is still the clean slate\n * the arrows promise.\n */\n const displayedImage = createMemo(() => {\n if (props.selectedIndex === null) return null\n const image = props.images[props.selectedIndex]\n return JSON.stringify([props.selectedIndex, image?.url ?? null, image?.srcset ?? null])\n })\n\n /**\n * Every image opens at its fitted size. Without this the transform left over\n * from the previous picture would be applied to the next one — a 6× zoom on\n * a corner of a portrait photo, carried onto a landscape one, shows black.\n * It also settles the \"arrows vs. panning\" question: navigating away is\n * always a clean slate rather than a frame half-belonging to two images.\n *\n * The dependency is `displayedImage()` and not `selectedIndex`, for the same\n * reason: a swapped-out `images` array reaches the user as exactly that black\n * frame — the old picture's scale and offset applied to a new photo — with no\n * navigation to blame it on.\n *\n * `reset()` reads its state through `untrack`, so this effect subscribes to\n * that one memo and never re-runs on its own write. The scale and offset it\n * writes are absent from the memo for the same reason: panning must not\n * reset the pan.\n *\n * `cancelGesture()` comes first, and matters most on the CLOSE (`null`): the\n * pan handlers live on the backdrop, inside the `<Show>` below, but the\n * controller belongs to this component — which `ImageGalleryRenderer` mounts\n * once and never unmounts. Close the overlay with a button still held\n * (Escape mid-drag) and the backdrop is detached before its `pointerup`,\n * which is then delivered to whatever is underneath and never to these\n * handlers. Nothing else would end that gesture: `reset()` only writes the\n * transform, and `onCleanup` belongs to an owner that is still alive. The\n * overlay would reopen stuck at `cursor: grabbing`, with `isPanning()` true\n * and the arrow keys dead behind their pan guards.\n */\n createEffect(displayedImage, () => {\n panZoom.cancelGesture()\n panZoom.reset()\n })\n\n /**\n * Is the keystroke going into something the user is typing in?\n *\n * The overlay binds its shortcuts on `document`, so it hears every key in\n * the page — and it does not trap focus, so the host's own composer can keep\n * it while the lightbox is open (`Tab` from the thumbnail that opened the\n * overlay walks on into the host, since the `<Portal>` content is appended\n * after it). The zoom keys are `-`, `+`, `=` and `0`: characters. Calling\n * `preventDefault()` on them without this check silently eats them out of\n * the host's text field — typing a date would zoom the photo instead.\n *\n * `Escape` stays global, as it was before the zoom keys existed: it produces\n * no character, and dismissing the modal is what it is for.\n */\n const isEditableTarget = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) return false\n if (target.isContentEditable) return true\n return ['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName)\n }\n\n // Keyboard navigation\n createEffect(isOpen, (open) => {\n if (!open) return\n\n const handleKeydown = (e: KeyboardEvent) => {\n // Ctrl/Cmd + `+` / `-` / `0` is the browser's own page zoom; the overlay\n // must not swallow it.\n const isZoomChord = e.ctrlKey || e.metaKey\n\n // A field the user is typing in owns its keys — all of them but the one\n // that dismisses a modal.\n if (e.key !== 'Escape' && isEditableTarget(e.target)) return\n\n switch (e.key) {\n case 'Escape':\n props.onClose()\n break\n case 'ArrowLeft':\n // Mid-drag the arrows would move the picture the user is holding.\n if (panZoom.isPanning()) break\n handlePrev()\n break\n case 'ArrowRight':\n if (panZoom.isPanning()) break\n handleNext()\n break\n case '+':\n case '=':\n // `=` is `+` unshifted — the key people actually press.\n if (isZoomChord) break\n e.preventDefault()\n panZoom.zoomBy(ZOOM_BUTTON_FACTOR)\n break\n case '-':\n if (isZoomChord) break\n e.preventDefault()\n panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)\n break\n case '0':\n if (isZoomChord) break\n e.preventDefault()\n panZoom.reset()\n break\n }\n }\n\n document.addEventListener('keydown', handleKeydown)\n const releaseScroll = lockOverlayScroll(document)\n\n return () => {\n document.removeEventListener('keydown', handleKeydown)\n releaseScroll()\n }\n })\n\n /**\n * Closing on a backdrop click is the behaviour users expect — but a pan\n * releases the pointer over the backdrop as often as not, and the browser\n * then fires a `click` on the common ancestor of the press and the release.\n * `wasDragged()` is exactly that distinction: it stays true from the moment\n * the pointer travelled more than a few pixels until the next `pointerdown`,\n * so the click that closes the overlay is only ever a click that did not move.\n */\n const handleBackdropClick = () => {\n if (panZoom.wasDragged()) return\n props.onClose()\n }\n\n /**\n * The chrome (close, prev/next, the zoom toolbar) sits on top of the pan\n * surface. Pressing a button must not open a gesture: while zoomed\n * `onPointerDown` calls `preventDefault()`, which costs the button its focus,\n * and a hand that shakes on the way to \"next\" would pan the image instead.\n */\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (target instanceof Element && target.closest('button')) return\n panZoom.onPointerDown(event)\n }\n\n /**\n * Viewport point of a mouse event, in the space `zoomTo` anchors on: client\n * pixels measured from the image's UNTRANSFORMED top-left corner. That corner\n * is not directly observable — `getBoundingClientRect()` already includes the\n * transform — but with `transform-origin: 0 0` the rendered left edge is\n * exactly `corner + offset`, so subtracting the current offset recovers it\n * whatever the flex centring did.\n *\n * `createPanZoom` computes the same point for the wheel but keeps it private;\n * this is the double-click's copy of it.\n */\n const anchorOf = (event: MouseEvent): PanZoomPoint | undefined => {\n if (!imageRef) return undefined\n const rect = imageRef.getBoundingClientRect()\n const offset = panZoom.offset()\n return {\n x: event.clientX - (rect.left - offset.x),\n y: event.clientY - (rect.top - offset.y),\n }\n }\n\n /** Double-click toggles: in at the spot that was double-clicked, or back out. */\n const handleDoubleClick = (event: MouseEvent) => {\n event.stopPropagation()\n if (panZoom.isZoomed()) {\n panZoom.reset()\n } else {\n panZoom.zoomTo(DOUBLE_CLICK_ZOOM, anchorOf(event))\n }\n }\n\n return (\n <Show when={isOpen()}>\n <Portal>\n <div\n class=\"fixed inset-0 z-50 bg-black/90 flex items-center justify-center\"\n style={panZoom.surfaceStyle()}\n onClick={handleBackdropClick}\n onWheel={panZoom.onWheel}\n onPointerDown={handlePointerDown}\n onPointerMove={panZoom.onPointerMove}\n onPointerUp={panZoom.onPointerUp}\n onPointerCancel={panZoom.onPointerCancel}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={strings.lightboxLabel}\n >\n {/* Close button */}\n <button\n class=\"absolute top-4 right-4 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={props.onClose}\n aria-label={strings.lightboxClose}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n {/* Previous button */}\n <Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Next button */}\n <Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Image — `max-w/max-h` fit it, the transform zooms it from there */}\n <img\n ref={imageRef}\n src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}\n alt={currentImage()?.alt || ''}\n srcset={currentImage()?.srcset}\n sizes={currentImage()?.sizes}\n class=\"max-w-[90vw] max-h-[90vh] object-contain\"\n style={panZoom.contentStyle()}\n draggable={false}\n onClick={(e) => e.stopPropagation()}\n onDblClick={handleDoubleClick}\n />\n\n {/* Caption */}\n <Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>\n\n {/* Counter */}\n <div class=\"absolute top-4 left-4 text-white/80 bg-black/40 px-3 py-1 rounded-full text-sm\">\n {(props.selectedIndex ?? 0) + 1} / {props.images.length}\n </div>\n\n {/* Zoom controls — the pointer-only gestures made reachable by\n keyboard and touch. The wrapper swallows the click so the\n backdrop's close handler never sees it. */}\n <div\n class=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 bg-black/50 rounded-full px-2 py-1\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() <= panZoom.min}\n aria-label={strings.zoomOut}\n title={strings.zoomOut}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6\"\n />\n </svg>\n </button>\n\n <span\n class=\"text-white/80 text-xs tabular-nums text-center min-w-[4rem]\"\n aria-live=\"polite\"\n >\n {formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}\n </span>\n\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() >= panZoom.max}\n aria-label={strings.zoomIn}\n title={strings.zoomIn}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6\"\n />\n </svg>\n </button>\n\n {/* Only while there is something to reset — at 100% it would be a\n button that does nothing. */}\n <Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2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AAe;KACjB,QAAQ,MAAM;GAElB;EACF;EAEA,SAAS,iBAAiB,WAAW,aAAa;EAClD,MAAM,gBAAgB,kBAAkB,QAAQ;EAEhD,aAAa;GACX,SAAS,oBAAoB,WAAW,aAAa;GACrD,cAAc;EAChB;CACF,CAAC;CA0DD,OAAA,KACE,IAAA,KAAY,QAIC,SASK,SAmBA,WAqBA,WAsBL,UACQ,cAoBX,KA4EJ,CAAA;AAEV"}
1
+ {"version":3,"file":"LightboxOverlay.js","names":["aria-label={strings.lightboxLabel}","strings.lightboxLabel","aria-label={strings.lightboxClose}","strings.lightboxClose","<Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>","strings.lightboxPrevious","<button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>","aria-label={strings.lightboxPrevious}","<Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>","strings.lightboxNext","<button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>","aria-label={strings.lightboxNext}","src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}","safeUrl(currentImage()?.url ?? '', { allowDataImage: true })","alt={currentImage()?.alt || ''}","currentImage()?.alt || ''","srcset={currentImage()?.srcset}","currentImage()?.srcset","sizes={currentImage()?.sizes}","currentImage()?.sizes","<Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>","{currentImage()!.caption}","currentImage()!.caption","<div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>","props.selectedIndex ?? 0","{props.images.length}","props.images.length","disabled={panZoom.scale() <= panZoom.min}","panZoom.scale()","panZoom.min","aria-label={strings.zoomOut}","strings.zoomOut","title={strings.zoomOut}","{formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}","formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })","disabled={panZoom.scale() >= panZoom.max}","panZoom.max","aria-label={strings.zoomIn}","strings.zoomIn","title={strings.zoomIn}","<Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>\n </Show>","aria-label={strings.zoomReset}","strings.zoomReset","title={strings.zoomReset}","<button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>","<div\n class=\"fixed inset-0 z-50 bg-black/90 flex items-center justify-center\"\n style={panZoom.surfaceStyle()}\n onClick={handleBackdropClick}\n onWheel={panZoom.onWheel}\n onPointerDown={handlePointerDown}\n onPointerMove={panZoom.onPointerMove}\n onPointerUp={panZoom.onPointerUp}\n onPointerCancel={panZoom.onPointerCancel}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={strings.lightboxLabel}\n >\n {/* Close button */}\n <button\n class=\"absolute top-4 right-4 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={props.onClose}\n aria-label={strings.lightboxClose}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n {/* Previous button */}\n <Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Next button */}\n <Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Image — `max-w/max-h` fit it, the transform zooms it from there */}\n <img\n ref={imageRef}\n src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}\n alt={currentImage()?.alt || ''}\n srcset={currentImage()?.srcset}\n sizes={currentImage()?.sizes}\n class=\"max-w-[90vw] max-h-[90vh] object-contain\"\n style={panZoom.contentStyle()}\n draggable={false}\n onClick={(e) => e.stopPropagation()}\n onDblClick={handleDoubleClick}\n />\n\n {/* Caption */}\n <Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>\n\n {/* Counter */}\n <div class=\"absolute top-4 left-4 text-white/80 bg-black/40 px-3 py-1 rounded-full text-sm\">\n {(props.selectedIndex ?? 0) + 1} / {props.images.length}\n </div>\n\n {/* Zoom controls — the pointer-only gestures made reachable by\n keyboard and touch. The wrapper swallows the click so the\n backdrop's close handler never sees it. */}\n <div\n class=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 bg-black/50 rounded-full px-2 py-1\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() <= panZoom.min}\n aria-label={strings.zoomOut}\n title={strings.zoomOut}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6\"\n />\n </svg>\n </button>\n\n <span\n class=\"text-white/80 text-xs tabular-nums text-center min-w-[4rem]\"\n aria-live=\"polite\"\n >\n {formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}\n </span>\n\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() >= panZoom.max}\n aria-label={strings.zoomIn}\n title={strings.zoomIn}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6\"\n />\n </svg>\n </button>\n\n {/* Only while there is something to reset — at 100% it would be a\n button that does nothing. */}\n <Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>\n </Show>\n </div>\n </div>","{(props.selectedIndex ?? 0) + 1}","<Show when={isOpen()}>\n <Portal>\n <div\n class=\"fixed inset-0 z-50 bg-black/90 flex items-center justify-center\"\n style={panZoom.surfaceStyle()}\n onClick={handleBackdropClick}\n onWheel={panZoom.onWheel}\n onPointerDown={handlePointerDown}\n onPointerMove={panZoom.onPointerMove}\n onPointerUp={panZoom.onPointerUp}\n onPointerCancel={panZoom.onPointerCancel}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={strings.lightboxLabel}\n >\n {/* Close button */}\n <button\n class=\"absolute top-4 right-4 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={props.onClose}\n aria-label={strings.lightboxClose}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n {/* Previous button */}\n <Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Next button */}\n <Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Image — `max-w/max-h` fit it, the transform zooms it from there */}\n <img\n ref={imageRef}\n src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}\n alt={currentImage()?.alt || ''}\n srcset={currentImage()?.srcset}\n sizes={currentImage()?.sizes}\n class=\"max-w-[90vw] max-h-[90vh] object-contain\"\n style={panZoom.contentStyle()}\n draggable={false}\n onClick={(e) => e.stopPropagation()}\n onDblClick={handleDoubleClick}\n />\n\n {/* Caption */}\n <Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>\n\n {/* Counter */}\n <div class=\"absolute top-4 left-4 text-white/80 bg-black/40 px-3 py-1 rounded-full text-sm\">\n {(props.selectedIndex ?? 0) + 1} / {props.images.length}\n </div>\n\n {/* Zoom controls — the pointer-only gestures made reachable by\n keyboard and touch. The wrapper swallows the click so the\n backdrop's close handler never sees it. */}\n <div\n class=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 bg-black/50 rounded-full px-2 py-1\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() <= panZoom.min}\n aria-label={strings.zoomOut}\n title={strings.zoomOut}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6\"\n />\n </svg>\n </button>\n\n <span\n class=\"text-white/80 text-xs tabular-nums text-center min-w-[4rem]\"\n aria-live=\"polite\"\n >\n {formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}\n </span>\n\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() >= panZoom.max}\n aria-label={strings.zoomIn}\n title={strings.zoomIn}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6\"\n />\n </svg>\n </button>\n\n {/* Only while there is something to reset — at 100% it would be a\n button that does nothing. */}\n <Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>\n </Show>\n </div>\n </div>\n </Portal>\n </Show>","_$ssrHydrationKey","_$ssrGroup","_$ssrAttribute","_$ssrStyle","_$escape","_$scope","_$memo","_$ssr"],"sources":["../../../src/components/LightboxOverlay.tsx"],"sourcesContent":["/**\n * LightboxOverlay - Fullscreen image viewer\n * Sprint 5: Media Components\n *\n * v6.22.0 — zoom & pan. The overlay is a fullscreen `<Portal>`: it OWNS the\n * viewport, nothing scrolls behind it (the effect below locks `body`), so\n * hijacking the wheel here is legitimate in a way it would not be for a\n * component sitting inline in a chat feed. Zoom is therefore always on in the\n * lightbox and needs no host opt-in.\n */\n\nimport { Component, Show, createEffect, createMemo } from 'solid-js'\nimport { Portal } from \"@solidjs/web\";\nimport type { GalleryImage } from '../types'\nimport { safeUrl } from '../utils/safe-url'\nimport { lockOverlayScroll } from '../utils/overlay-lifecycle'\nimport { createPanZoom, type PanZoomPoint } from '../utils/pan-zoom'\nimport { formatMCPUIString, useMCPUIStrings } from '../context/MCPUIStringsContext'\n\n/** Highest magnification of the lightbox — 8× the fitted size. */\nconst MAX_ZOOM = 8\n\n/** Ratio one press of a zoom button (or of `+` / `-`) applies. */\nconst ZOOM_BUTTON_FACTOR = 1.5\n\n/**\n * Scale a double-click jumps to. Deliberately modest: a double-click is a\n * coarse gesture, and the wheel is right there for the rest.\n */\nconst DOUBLE_CLICK_ZOOM = 2\n\nexport interface LightboxOverlayProps {\n /**\n * Array of images to navigate through\n */\n images: GalleryImage[]\n\n /**\n * Currently selected image index (null when closed)\n */\n selectedIndex: number | null\n\n /**\n * Callback when lightbox should close\n */\n onClose: () => void\n\n /**\n * Callback when navigating to a different image\n */\n onNavigate: (index: number) => void\n}\n\nexport const LightboxOverlay: Component<LightboxOverlayProps> = (props) => {\n const strings = useMCPUIStrings()\n let imageRef: HTMLImageElement | undefined\n\n /**\n * The handlers are bound on the BACKDROP, not on the `<img>`: a pan that\n * drags the image out from under the cursor must keep receiving the pointer\n * stream, and a wheel event over the black margin around a portrait image\n * must still zoom. `target` therefore points the maths back at the image,\n * which is the element that actually carries the transform.\n */\n const panZoom = createPanZoom({ min: 1, max: MAX_ZOOM, target: () => imageRef })\n\n const isOpen = () => props.selectedIndex !== null\n const currentImage = () =>\n props.selectedIndex !== null ? props.images[props.selectedIndex] : null\n const canGoPrev = () => props.selectedIndex !== null && props.selectedIndex > 0\n const canGoNext = () =>\n props.selectedIndex !== null && props.selectedIndex < props.images.length - 1\n\n const handlePrev = () => {\n if (canGoPrev()) {\n props.onNavigate(props.selectedIndex! - 1)\n }\n }\n\n const handleNext = () => {\n if (canGoNext()) {\n props.onNavigate(props.selectedIndex! + 1)\n }\n }\n\n /**\n * Identity of the picture on screen, as a VALUE rather than as an object\n * reference — `null` while the overlay is closed.\n *\n * The index alone does not name a picture. A host that replaces `images`\n * under a held `selectedIndex` — a gallery whose list streams in, a refilter,\n * a re-render that rebuilds the array — puts a different photo on screen\n * without the index ever moving. `url` and `srcset` are what the `<img>`\n * below actually resolves, so together with the index they are what \"the\n * displayed image changed\" has to mean. (`sizes` is left out on purpose: it\n * re-picks among the candidates of the SAME picture, so it changes the\n * resolution fetched, never the subject the zoom is framing.)\n *\n * A memo, and a string, so the comparison is by value: `ImageGalleryRenderer`\n * passes `params()?.images || []`, a fresh array on every parent update, and\n * re-reading that must not by itself count as a new picture — it would throw\n * away a zoom the user is in the middle of. The index stays in the key so\n * that navigating between two entries sharing a URL is still the clean slate\n * the arrows promise.\n */\n const displayedImage = createMemo(() => {\n if (props.selectedIndex === null) return null\n const image = props.images[props.selectedIndex]\n return JSON.stringify([props.selectedIndex, image?.url ?? null, image?.srcset ?? null])\n })\n\n /**\n * Every image opens at its fitted size. Without this the transform left over\n * from the previous picture would be applied to the next one — a 6× zoom on\n * a corner of a portrait photo, carried onto a landscape one, shows black.\n * It also settles the \"arrows vs. panning\" question: navigating away is\n * always a clean slate rather than a frame half-belonging to two images.\n *\n * The dependency is `displayedImage()` and not `selectedIndex`, for the same\n * reason: a swapped-out `images` array reaches the user as exactly that black\n * frame — the old picture's scale and offset applied to a new photo — with no\n * navigation to blame it on.\n *\n * `reset()` reads its state through `untrack`, so this effect subscribes to\n * that one memo and never re-runs on its own write. The scale and offset it\n * writes are absent from the memo for the same reason: panning must not\n * reset the pan.\n *\n * `cancelGesture()` comes first, and matters most on the CLOSE (`null`): the\n * pan handlers live on the backdrop, inside the `<Show>` below, but the\n * controller belongs to this component — which `ImageGalleryRenderer` mounts\n * once and never unmounts. Close the overlay with a button still held\n * (Escape mid-drag) and the backdrop is detached before its `pointerup`,\n * which is then delivered to whatever is underneath and never to these\n * handlers. Nothing else would end that gesture: `reset()` only writes the\n * transform, and `onCleanup` belongs to an owner that is still alive. The\n * overlay would reopen stuck at `cursor: grabbing`, with `isPanning()` true\n * and the arrow keys dead behind their pan guards.\n */\n createEffect(displayedImage, () => {\n panZoom.cancelGesture()\n panZoom.reset()\n })\n\n /**\n * Is the keystroke going into something the user is typing in?\n *\n * The overlay binds its shortcuts on `document`, so it hears every key in\n * the page — and it does not trap focus, so the host's own composer can keep\n * it while the lightbox is open (`Tab` from the thumbnail that opened the\n * overlay walks on into the host, since the `<Portal>` content is appended\n * after it). The zoom keys are `-`, `+`, `=` and `0`: characters. Calling\n * `preventDefault()` on them without this check silently eats them out of\n * the host's text field — typing a date would zoom the photo instead.\n *\n * `Escape` stays global, as it was before the zoom keys existed: it produces\n * no character, and dismissing the modal is what it is for.\n */\n const isEditableTarget = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) return false\n if (target.isContentEditable) return true\n return ['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName)\n }\n\n // Keyboard navigation\n createEffect(isOpen, (open) => {\n if (!open) return\n\n const handleKeydown = (e: KeyboardEvent) => {\n // Ctrl/Cmd + `+` / `-` / `0` is the browser's own page zoom; the overlay\n // must not swallow it.\n const isZoomChord = e.ctrlKey || e.metaKey\n\n // A field the user is typing in owns its keys — all of them but the one\n // that dismisses a modal.\n if (e.key !== 'Escape' && isEditableTarget(e.target)) return\n\n switch (e.key) {\n case 'Escape':\n props.onClose()\n break\n case 'ArrowLeft':\n // Mid-drag the arrows would move the picture the user is holding.\n if (panZoom.isPanning()) break\n handlePrev()\n break\n case 'ArrowRight':\n if (panZoom.isPanning()) break\n handleNext()\n break\n case '+':\n case '=':\n // `=` is `+` unshifted — the key people actually press.\n if (isZoomChord) break\n e.preventDefault()\n panZoom.zoomBy(ZOOM_BUTTON_FACTOR)\n break\n case '-':\n if (isZoomChord) break\n e.preventDefault()\n panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)\n break\n case '0':\n if (isZoomChord) break\n e.preventDefault()\n panZoom.reset()\n break\n }\n }\n\n document.addEventListener('keydown', handleKeydown)\n const releaseScroll = lockOverlayScroll(document)\n\n return () => {\n document.removeEventListener('keydown', handleKeydown)\n releaseScroll()\n }\n })\n\n /**\n * Closing on a backdrop click is the behaviour users expect — but a pan\n * releases the pointer over the backdrop as often as not, and the browser\n * then fires a `click` on the common ancestor of the press and the release.\n * `wasDragged()` is exactly that distinction: it stays true from the moment\n * the pointer travelled more than a few pixels until the next `pointerdown`,\n * so the click that closes the overlay is only ever a click that did not move.\n */\n const handleBackdropClick = () => {\n if (panZoom.wasDragged()) return\n props.onClose()\n }\n\n /**\n * The chrome (close, prev/next, the zoom toolbar) sits on top of the pan\n * surface. Pressing a button must not open a gesture: while zoomed\n * `onPointerDown` calls `preventDefault()`, which costs the button its focus,\n * and a hand that shakes on the way to \"next\" would pan the image instead.\n */\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (target instanceof Element && target.closest('button')) return\n panZoom.onPointerDown(event)\n }\n\n /**\n * Viewport point of a mouse event, in the space `zoomTo` anchors on: client\n * pixels measured from the image's UNTRANSFORMED top-left corner. That corner\n * is not directly observable — `getBoundingClientRect()` already includes the\n * transform — but with `transform-origin: 0 0` the rendered left edge is\n * exactly `corner + offset`, so subtracting the current offset recovers it\n * whatever the flex centring did.\n *\n * `createPanZoom` computes the same point for the wheel but keeps it private;\n * this is the double-click's copy of it.\n */\n const anchorOf = (event: MouseEvent): PanZoomPoint | undefined => {\n if (!imageRef) return undefined\n const rect = imageRef.getBoundingClientRect()\n const offset = panZoom.offset()\n return {\n x: event.clientX - (rect.left - offset.x),\n y: event.clientY - (rect.top - offset.y),\n }\n }\n\n /** Double-click toggles: in at the spot that was double-clicked, or back out. */\n const handleDoubleClick = (event: MouseEvent) => {\n event.stopPropagation()\n if (panZoom.isZoomed()) {\n panZoom.reset()\n } else {\n panZoom.zoomTo(DOUBLE_CLICK_ZOOM, anchorOf(event))\n }\n }\n\n return (\n <Show when={isOpen()}>\n <Portal>\n <div\n class=\"fixed inset-0 z-50 bg-black/90 flex items-center justify-center\"\n style={panZoom.surfaceStyle()}\n onClick={handleBackdropClick}\n onWheel={panZoom.onWheel}\n onPointerDown={handlePointerDown}\n onPointerMove={panZoom.onPointerMove}\n onPointerUp={panZoom.onPointerUp}\n onPointerCancel={panZoom.onPointerCancel}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={strings.lightboxLabel}\n >\n {/* Close button */}\n <button\n class=\"absolute top-4 right-4 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={props.onClose}\n aria-label={strings.lightboxClose}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n\n {/* Previous button */}\n <Show when={canGoPrev()}>\n <button\n class=\"absolute left-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handlePrev()\n }}\n aria-label={strings.lightboxPrevious}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Next button */}\n <Show when={canGoNext()}>\n <button\n class=\"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={(e) => {\n e.stopPropagation()\n handleNext()\n }}\n aria-label={strings.lightboxNext}\n >\n <svg class=\"w-8 h-8\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M9 5l7 7-7 7\"\n />\n </svg>\n </button>\n </Show>\n\n {/* Image — `max-w/max-h` fit it, the transform zooms it from there */}\n <img\n ref={imageRef}\n src={safeUrl(currentImage()?.url ?? '', { allowDataImage: true })}\n alt={currentImage()?.alt || ''}\n srcset={currentImage()?.srcset}\n sizes={currentImage()?.sizes}\n class=\"max-w-[90vw] max-h-[90vh] object-contain\"\n style={panZoom.contentStyle()}\n draggable={false}\n onClick={(e) => e.stopPropagation()}\n onDblClick={handleDoubleClick}\n />\n\n {/* Caption */}\n <Show when={currentImage()?.caption}>\n <div class=\"absolute bottom-16 left-1/2 -translate-x-1/2 bg-black/60 text-white px-4 py-2 rounded-lg max-w-[80vw] text-center\">\n {currentImage()!.caption}\n </div>\n </Show>\n\n {/* Counter */}\n <div class=\"absolute top-4 left-4 text-white/80 bg-black/40 px-3 py-1 rounded-full text-sm\">\n {(props.selectedIndex ?? 0) + 1} / {props.images.length}\n </div>\n\n {/* Zoom controls — the pointer-only gestures made reachable by\n keyboard and touch. The wrapper swallows the click so the\n backdrop's close handler never sees it. */}\n <div\n class=\"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-1 bg-black/50 rounded-full px-2 py-1\"\n onClick={(e) => e.stopPropagation()}\n >\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(1 / ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() <= panZoom.min}\n aria-label={strings.zoomOut}\n title={strings.zoomOut}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM13.5 10.5h-6\"\n />\n </svg>\n </button>\n\n <span\n class=\"text-white/80 text-xs tabular-nums text-center min-w-[4rem]\"\n aria-live=\"polite\"\n >\n {formatMCPUIString(strings.zoomLevel, { percent: panZoom.percent() })}\n </span>\n\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors disabled:opacity-40 disabled:hover:bg-transparent\"\n onClick={() => panZoom.zoomBy(ZOOM_BUTTON_FACTOR)}\n disabled={panZoom.scale() >= panZoom.max}\n aria-label={strings.zoomIn}\n title={strings.zoomIn}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607zM10.5 7.5v6m3-3h-6\"\n />\n </svg>\n </button>\n\n {/* Only while there is something to reset — at 100% it would be a\n button that does nothing. */}\n <Show when={panZoom.isZoomed()}>\n <button\n class=\"text-white/80 hover:text-white p-2 rounded-full hover:bg-white/10 transition-colors\"\n onClick={() => panZoom.reset()}\n aria-label={strings.zoomReset}\n title={strings.zoomReset}\n type=\"button\"\n >\n <svg class=\"w-5 h-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M16.023 9.348h4.992V4.356m0 4.992l-3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7\"\n />\n </svg>\n </button>\n </Show>\n </div>\n </div>\n </Portal>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;E,UAsRQgD,gBAwKK,G,OAxKLC,eAAA;;MAEE,SAAA,QAAA,OAAA,KAAAC,aAAA,SAAAC,SAAA,IAA6B,CAAA,EAAA,CAAtB,QAAQ,aAAa,CAAC;IAS7BnD,aAAAA,cAAYC,OAAAA,QAAQ,eAAR,IAAoB,CAAC;IAM/BC,aAAAA,cAAYC,OAAAA,QAAQ,eAAR,IAAoB,CAAC;;EAjBrC,GAAA,CAAA,G,OA8BEC,aAAAA;;IAAY,OAAA,CAAA,CAAA,UAAU;GAkBhB,CAAA;GAlBN,aAAA;;IAkBM,OAAA,IAAA,KAjBJ,QAAA4C,gBAgBQ,GAhBR,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