@hjmds/react 1.41.2 → 1.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/README.md +2 -2
  2. package/dist/actions.d.ts +41 -0
  3. package/dist/actions.d.ts.map +1 -1
  4. package/dist/actions.js +40 -3
  5. package/dist/actions.js.map +1 -1
  6. package/dist/activity-chip.d.ts.map +1 -1
  7. package/dist/activity-chip.js +1 -0
  8. package/dist/activity-chip.js.map +1 -1
  9. package/dist/advanced-display.d.ts +47 -14
  10. package/dist/advanced-display.d.ts.map +1 -1
  11. package/dist/advanced-display.js +72 -17
  12. package/dist/advanced-display.js.map +1 -1
  13. package/dist/advanced-forms.d.ts.map +1 -1
  14. package/dist/advanced-forms.js +1 -0
  15. package/dist/advanced-forms.js.map +1 -1
  16. package/dist/affix.d.ts +6 -1
  17. package/dist/affix.d.ts.map +1 -1
  18. package/dist/affix.js +5 -3
  19. package/dist/affix.js.map +1 -1
  20. package/dist/agreement.d.ts.map +1 -1
  21. package/dist/agreement.js +1 -0
  22. package/dist/agreement.js.map +1 -1
  23. package/dist/alert-dialog-queue.d.ts +24 -0
  24. package/dist/alert-dialog-queue.d.ts.map +1 -0
  25. package/dist/alert-dialog-queue.js +44 -0
  26. package/dist/alert-dialog-queue.js.map +1 -0
  27. package/dist/anchor.d.ts.map +1 -1
  28. package/dist/anchor.js +1 -0
  29. package/dist/anchor.js.map +1 -1
  30. package/dist/asset.d.ts.map +1 -1
  31. package/dist/asset.js +1 -0
  32. package/dist/asset.js.map +1 -1
  33. package/dist/auth-screen.d.ts.map +1 -1
  34. package/dist/auth-screen.js +1 -0
  35. package/dist/auth-screen.js.map +1 -1
  36. package/dist/avatar-blobatar-motion.d.ts.map +1 -1
  37. package/dist/avatar-blobatar-motion.js +1 -0
  38. package/dist/avatar-blobatar-motion.js.map +1 -1
  39. package/dist/avatar-blobatar.d.ts.map +1 -1
  40. package/dist/avatar-blobatar.js +1 -0
  41. package/dist/avatar-blobatar.js.map +1 -1
  42. package/dist/bottom-cta.d.ts.map +1 -1
  43. package/dist/bottom-cta.js +1 -0
  44. package/dist/bottom-cta.js.map +1 -1
  45. package/dist/bottom-info.d.ts.map +1 -1
  46. package/dist/bottom-info.js +1 -0
  47. package/dist/bottom-info.js.map +1 -1
  48. package/dist/bottom-navigation.d.ts.map +1 -1
  49. package/dist/bottom-navigation.js +1 -0
  50. package/dist/bottom-navigation.js.map +1 -1
  51. package/dist/breadcrumb.d.ts.map +1 -1
  52. package/dist/breadcrumb.js +1 -0
  53. package/dist/breadcrumb.js.map +1 -1
  54. package/dist/calendar.d.ts.map +1 -1
  55. package/dist/calendar.js +1 -0
  56. package/dist/calendar.js.map +1 -1
  57. package/dist/carousel-motion.d.ts.map +1 -1
  58. package/dist/carousel-motion.js +1 -0
  59. package/dist/carousel-motion.js.map +1 -1
  60. package/dist/carousel.d.ts.map +1 -1
  61. package/dist/carousel.js +1 -0
  62. package/dist/carousel.js.map +1 -1
  63. package/dist/celebration.d.ts.map +1 -1
  64. package/dist/celebration.js +1 -0
  65. package/dist/celebration.js.map +1 -1
  66. package/dist/chart.d.ts +7 -2
  67. package/dist/chart.d.ts.map +1 -1
  68. package/dist/chart.js +6 -3
  69. package/dist/chart.js.map +1 -1
  70. package/dist/choice-row.d.ts +10 -2
  71. package/dist/choice-row.d.ts.map +1 -1
  72. package/dist/choice-row.js +7 -3
  73. package/dist/choice-row.js.map +1 -1
  74. package/dist/clipboard.d.ts.map +1 -1
  75. package/dist/clipboard.js +1 -0
  76. package/dist/clipboard.js.map +1 -1
  77. package/dist/collapsible.d.ts.map +1 -1
  78. package/dist/collapsible.js +1 -0
  79. package/dist/collapsible.js.map +1 -1
  80. package/dist/collection-rail.d.ts.map +1 -1
  81. package/dist/collection-rail.js +3 -1
  82. package/dist/collection-rail.js.map +1 -1
  83. package/dist/color-picker.d.ts.map +1 -1
  84. package/dist/color-picker.js +1 -0
  85. package/dist/color-picker.js.map +1 -1
  86. package/dist/command-palette.d.ts.map +1 -1
  87. package/dist/command-palette.js +1 -0
  88. package/dist/command-palette.js.map +1 -1
  89. package/dist/communication.d.ts +92 -0
  90. package/dist/communication.d.ts.map +1 -1
  91. package/dist/communication.js +49 -1
  92. package/dist/communication.js.map +1 -1
  93. package/dist/content-transition.d.ts.map +1 -1
  94. package/dist/content-transition.js +1 -0
  95. package/dist/content-transition.js.map +1 -1
  96. package/dist/context-menu.d.ts.map +1 -1
  97. package/dist/context-menu.js +1 -0
  98. package/dist/context-menu.js.map +1 -1
  99. package/dist/conversation-row.d.ts.map +1 -1
  100. package/dist/conversation-row.js +1 -0
  101. package/dist/conversation-row.js.map +1 -1
  102. package/dist/data-table.d.ts.map +1 -1
  103. package/dist/data-table.js +1 -0
  104. package/dist/data-table.js.map +1 -1
  105. package/dist/date-entry.d.ts.map +1 -1
  106. package/dist/date-entry.js +1 -0
  107. package/dist/date-entry.js.map +1 -1
  108. package/dist/date-picker.d.ts.map +1 -1
  109. package/dist/date-picker.js +1 -0
  110. package/dist/date-picker.js.map +1 -1
  111. package/dist/date-range.d.ts.map +1 -1
  112. package/dist/date-range.js +1 -0
  113. package/dist/date-range.js.map +1 -1
  114. package/dist/design-profile.d.ts.map +1 -1
  115. package/dist/design-profile.js +1 -0
  116. package/dist/design-profile.js.map +1 -1
  117. package/dist/display.d.ts +21 -1
  118. package/dist/display.d.ts.map +1 -1
  119. package/dist/display.js +34 -8
  120. package/dist/display.js.map +1 -1
  121. package/dist/duration-field.d.ts.map +1 -1
  122. package/dist/duration-field.js +1 -0
  123. package/dist/duration-field.js.map +1 -1
  124. package/dist/effect-surface.d.ts.map +1 -1
  125. package/dist/effect-surface.js +1 -0
  126. package/dist/effect-surface.js.map +1 -1
  127. package/dist/evidence.d.ts +1 -1
  128. package/dist/evidence.js +1 -1
  129. package/dist/evidence.js.map +1 -1
  130. package/dist/feedback.d.ts.map +1 -1
  131. package/dist/feedback.js +1 -0
  132. package/dist/feedback.js.map +1 -1
  133. package/dist/field-group.d.ts.map +1 -1
  134. package/dist/field-group.js +1 -0
  135. package/dist/field-group.js.map +1 -1
  136. package/dist/file-picker.d.ts.map +1 -1
  137. package/dist/file-picker.js +1 -0
  138. package/dist/file-picker.js.map +1 -1
  139. package/dist/floating-action-button.d.ts.map +1 -1
  140. package/dist/floating-action-button.js +1 -0
  141. package/dist/floating-action-button.js.map +1 -1
  142. package/dist/folder-preview.d.ts.map +1 -1
  143. package/dist/folder-preview.js +1 -0
  144. package/dist/folder-preview.js.map +1 -1
  145. package/dist/forms.d.ts +30 -6
  146. package/dist/forms.d.ts.map +1 -1
  147. package/dist/forms.js +56 -14
  148. package/dist/forms.js.map +1 -1
  149. package/dist/gravity-letters.d.ts.map +1 -1
  150. package/dist/gravity-letters.js +1 -0
  151. package/dist/gravity-letters.js.map +1 -1
  152. package/dist/grid-reveal.d.ts.map +1 -1
  153. package/dist/grid-reveal.js +1 -0
  154. package/dist/grid-reveal.js.map +1 -1
  155. package/dist/heading.d.ts.map +1 -1
  156. package/dist/heading.js +1 -0
  157. package/dist/heading.js.map +1 -1
  158. package/dist/image-choice.d.ts.map +1 -1
  159. package/dist/image-choice.js +1 -0
  160. package/dist/image-choice.js.map +1 -1
  161. package/dist/image-comparison.d.ts.map +1 -1
  162. package/dist/image-comparison.js +1 -0
  163. package/dist/image-comparison.js.map +1 -1
  164. package/dist/image-viewer.d.ts +22 -1
  165. package/dist/image-viewer.d.ts.map +1 -1
  166. package/dist/image-viewer.js +14 -1
  167. package/dist/image-viewer.js.map +1 -1
  168. package/dist/index.d.ts +3 -3
  169. package/dist/index.d.ts.map +1 -1
  170. package/dist/index.js +1 -1
  171. package/dist/index.js.map +1 -1
  172. package/dist/inline-confirm.d.ts.map +1 -1
  173. package/dist/inline-confirm.js +1 -0
  174. package/dist/inline-confirm.js.map +1 -1
  175. package/dist/internal/document-resource.d.ts.map +1 -1
  176. package/dist/internal/document-resource.js +1 -0
  177. package/dist/internal/document-resource.js.map +1 -1
  178. package/dist/internal/initial-focus.d.ts.map +1 -1
  179. package/dist/internal/initial-focus.js +1 -0
  180. package/dist/internal/initial-focus.js.map +1 -1
  181. package/dist/internal/media-album.d.ts.map +1 -1
  182. package/dist/internal/media-album.js +1 -0
  183. package/dist/internal/media-album.js.map +1 -1
  184. package/dist/internal/message-reactions.d.ts.map +1 -1
  185. package/dist/internal/message-reactions.js +1 -0
  186. package/dist/internal/message-reactions.js.map +1 -1
  187. package/dist/internal/overlay-origin-motion.d.ts.map +1 -1
  188. package/dist/internal/overlay-origin-motion.js +1 -0
  189. package/dist/internal/overlay-origin-motion.js.map +1 -1
  190. package/dist/internal/pending-content.d.ts.map +1 -1
  191. package/dist/internal/pending-content.js +1 -0
  192. package/dist/internal/pending-content.js.map +1 -1
  193. package/dist/internal/photo-source-icon.d.ts.map +1 -1
  194. package/dist/internal/photo-source-icon.js +1 -0
  195. package/dist/internal/photo-source-icon.js.map +1 -1
  196. package/dist/internal/screen-exit.d.ts.map +1 -1
  197. package/dist/internal/screen-exit.js +1 -0
  198. package/dist/internal/screen-exit.js.map +1 -1
  199. package/dist/internal/screen-footer.d.ts.map +1 -1
  200. package/dist/internal/screen-footer.js +1 -0
  201. package/dist/internal/screen-footer.js.map +1 -1
  202. package/dist/internal/spinner.d.ts.map +1 -1
  203. package/dist/internal/spinner.js +1 -0
  204. package/dist/internal/spinner.js.map +1 -1
  205. package/dist/internal/use-composition-action.d.ts.map +1 -1
  206. package/dist/internal/use-composition-action.js +1 -0
  207. package/dist/internal/use-composition-action.js.map +1 -1
  208. package/dist/internal.d.ts.map +1 -1
  209. package/dist/internal.js +1 -0
  210. package/dist/internal.js.map +1 -1
  211. package/dist/layout.d.ts +11 -1
  212. package/dist/layout.d.ts.map +1 -1
  213. package/dist/layout.js +8 -4
  214. package/dist/layout.js.map +1 -1
  215. package/dist/mentions.d.ts.map +1 -1
  216. package/dist/mentions.js +1 -0
  217. package/dist/mentions.js.map +1 -1
  218. package/dist/menu-morph.d.ts.map +1 -1
  219. package/dist/menu-morph.js +1 -0
  220. package/dist/menu-morph.js.map +1 -1
  221. package/dist/menubar.d.ts.map +1 -1
  222. package/dist/menubar.js +1 -0
  223. package/dist/menubar.js.map +1 -1
  224. package/dist/modal.d.ts.map +1 -1
  225. package/dist/modal.js +1 -0
  226. package/dist/modal.js.map +1 -1
  227. package/dist/navigation-bar.d.ts.map +1 -1
  228. package/dist/navigation-bar.js +1 -0
  229. package/dist/navigation-bar.js.map +1 -1
  230. package/dist/navigation.d.ts.map +1 -1
  231. package/dist/navigation.js +1 -0
  232. package/dist/navigation.js.map +1 -1
  233. package/dist/notification-bell.d.ts +1 -1
  234. package/dist/notification-bell.d.ts.map +1 -1
  235. package/dist/notification-bell.js +5 -1
  236. package/dist/notification-bell.js.map +1 -1
  237. package/dist/number-field.d.ts.map +1 -1
  238. package/dist/number-field.js +1 -0
  239. package/dist/number-field.js.map +1 -1
  240. package/dist/overlay-stack.d.ts.map +1 -1
  241. package/dist/overlay-stack.js +1 -0
  242. package/dist/overlay-stack.js.map +1 -1
  243. package/dist/overlays.d.ts.map +1 -1
  244. package/dist/overlays.js +11 -2
  245. package/dist/overlays.js.map +1 -1
  246. package/dist/pagination.d.ts.map +1 -1
  247. package/dist/pagination.js +1 -0
  248. package/dist/pagination.js.map +1 -1
  249. package/dist/popover.d.ts.map +1 -1
  250. package/dist/popover.js +1 -0
  251. package/dist/popover.js.map +1 -1
  252. package/dist/portal.d.ts.map +1 -1
  253. package/dist/portal.js +1 -0
  254. package/dist/portal.js.map +1 -1
  255. package/dist/progressive-blur.d.ts.map +1 -1
  256. package/dist/progressive-blur.js +1 -0
  257. package/dist/progressive-blur.js.map +1 -1
  258. package/dist/provider-button.d.ts.map +1 -1
  259. package/dist/provider-button.js +1 -0
  260. package/dist/provider-button.js.map +1 -1
  261. package/dist/provider.d.ts +9 -1
  262. package/dist/provider.d.ts.map +1 -1
  263. package/dist/provider.js +2 -2
  264. package/dist/provider.js.map +1 -1
  265. package/dist/public-exports.generated.d.ts +9 -0
  266. package/dist/public-exports.generated.d.ts.map +1 -1
  267. package/dist/public-exports.generated.js +27 -0
  268. package/dist/public-exports.generated.js.map +1 -1
  269. package/dist/rating.d.ts.map +1 -1
  270. package/dist/rating.js +1 -0
  271. package/dist/rating.js.map +1 -1
  272. package/dist/reaction-picker.d.ts.map +1 -1
  273. package/dist/reaction-picker.js +1 -0
  274. package/dist/reaction-picker.js.map +1 -1
  275. package/dist/saved-items.d.ts.map +1 -1
  276. package/dist/saved-items.js +1 -0
  277. package/dist/saved-items.js.map +1 -1
  278. package/dist/screen-flows.d.ts +5 -1
  279. package/dist/screen-flows.d.ts.map +1 -1
  280. package/dist/screen-flows.js +13 -4
  281. package/dist/screen-flows.js.map +1 -1
  282. package/dist/screens.d.ts +24 -4
  283. package/dist/screens.d.ts.map +1 -1
  284. package/dist/screens.js +39 -12
  285. package/dist/screens.js.map +1 -1
  286. package/dist/scroll-progress.d.ts.map +1 -1
  287. package/dist/scroll-progress.js +1 -0
  288. package/dist/scroll-progress.js.map +1 -1
  289. package/dist/select.d.ts.map +1 -1
  290. package/dist/select.js +1 -0
  291. package/dist/select.js.map +1 -1
  292. package/dist/selection.d.ts +7 -1
  293. package/dist/selection.d.ts.map +1 -1
  294. package/dist/selection.js +33 -10
  295. package/dist/selection.js.map +1 -1
  296. package/dist/side-panel.d.ts.map +1 -1
  297. package/dist/side-panel.js +1 -0
  298. package/dist/side-panel.js.map +1 -1
  299. package/dist/sidebar.d.ts +21 -2
  300. package/dist/sidebar.d.ts.map +1 -1
  301. package/dist/sidebar.js +40 -20
  302. package/dist/sidebar.js.map +1 -1
  303. package/dist/skip-nav.d.ts.map +1 -1
  304. package/dist/skip-nav.js +1 -0
  305. package/dist/skip-nav.js.map +1 -1
  306. package/dist/slider.d.ts.map +1 -1
  307. package/dist/slider.js +1 -0
  308. package/dist/slider.js.map +1 -1
  309. package/dist/sortable.d.ts.map +1 -1
  310. package/dist/sortable.js +1 -0
  311. package/dist/sortable.js.map +1 -1
  312. package/dist/splitter.d.ts.map +1 -1
  313. package/dist/splitter.js +1 -0
  314. package/dist/splitter.js.map +1 -1
  315. package/dist/statistic-motion.d.ts.map +1 -1
  316. package/dist/statistic-motion.js +1 -0
  317. package/dist/statistic-motion.js.map +1 -1
  318. package/dist/status-text.d.ts.map +1 -1
  319. package/dist/status-text.js +1 -0
  320. package/dist/status-text.js.map +1 -1
  321. package/dist/step-player.d.ts.map +1 -1
  322. package/dist/step-player.js +1 -0
  323. package/dist/step-player.js.map +1 -1
  324. package/dist/steps.d.ts +16 -14
  325. package/dist/steps.d.ts.map +1 -1
  326. package/dist/steps.js +26 -9
  327. package/dist/steps.js.map +1 -1
  328. package/dist/styles.css +165 -41
  329. package/dist/styles.layered.css +165 -41
  330. package/dist/supplemental-display.d.ts.map +1 -1
  331. package/dist/supplemental-display.js +1 -0
  332. package/dist/supplemental-display.js.map +1 -1
  333. package/dist/supplemental-navigation.d.ts.map +1 -1
  334. package/dist/supplemental-navigation.js +1 -0
  335. package/dist/supplemental-navigation.js.map +1 -1
  336. package/dist/swipe-actions.d.ts.map +1 -1
  337. package/dist/swipe-actions.js +1 -0
  338. package/dist/swipe-actions.js.map +1 -1
  339. package/dist/table-family.d.ts.map +1 -1
  340. package/dist/table-family.js +1 -0
  341. package/dist/table-family.js.map +1 -1
  342. package/dist/table-sort-button.d.ts.map +1 -1
  343. package/dist/table-sort-button.js +1 -0
  344. package/dist/table-sort-button.js.map +1 -1
  345. package/dist/tags-input.d.ts.map +1 -1
  346. package/dist/tags-input.js +1 -0
  347. package/dist/tags-input.js.map +1 -1
  348. package/dist/task-list.d.ts.map +1 -1
  349. package/dist/task-list.js +1 -0
  350. package/dist/task-list.js.map +1 -1
  351. package/dist/text-annotation.d.ts.map +1 -1
  352. package/dist/text-annotation.js +1 -0
  353. package/dist/text-annotation.js.map +1 -1
  354. package/dist/text-formats.d.ts.map +1 -1
  355. package/dist/text-formats.js +1 -0
  356. package/dist/text-formats.js.map +1 -1
  357. package/dist/theme.d.ts.map +1 -1
  358. package/dist/theme.js +12 -1
  359. package/dist/theme.js.map +1 -1
  360. package/dist/thinking-orb.d.ts.map +1 -1
  361. package/dist/thinking-orb.js +1 -0
  362. package/dist/thinking-orb.js.map +1 -1
  363. package/dist/toast.d.ts.map +1 -1
  364. package/dist/toast.js +1 -0
  365. package/dist/toast.js.map +1 -1
  366. package/dist/toggle-group.d.ts.map +1 -1
  367. package/dist/toggle-group.js +1 -0
  368. package/dist/toggle-group.js.map +1 -1
  369. package/dist/top-bar.d.ts.map +1 -1
  370. package/dist/top-bar.js +1 -0
  371. package/dist/top-bar.js.map +1 -1
  372. package/dist/top.d.ts.map +1 -1
  373. package/dist/top.js +4 -3
  374. package/dist/top.js.map +1 -1
  375. package/dist/tour.d.ts.map +1 -1
  376. package/dist/tour.js +1 -0
  377. package/dist/tour.js.map +1 -1
  378. package/dist/transfer-list.d.ts.map +1 -1
  379. package/dist/transfer-list.js +1 -0
  380. package/dist/transfer-list.js.map +1 -1
  381. package/dist/tree.d.ts.map +1 -1
  382. package/dist/tree.js +1 -0
  383. package/dist/tree.js.map +1 -1
  384. package/dist/upload-item.d.ts.map +1 -1
  385. package/dist/upload-item.js +1 -0
  386. package/dist/upload-item.js.map +1 -1
  387. package/dist/virtual-list.d.ts.map +1 -1
  388. package/dist/virtual-list.js +1 -0
  389. package/dist/virtual-list.js.map +1 -1
  390. package/dist/voice-note.d.ts.map +1 -1
  391. package/dist/voice-note.js +1 -0
  392. package/dist/voice-note.js.map +1 -1
  393. package/package.json +8 -3
@@ -1 +1 @@
1
- {"version":3,"file":"image-viewer.js","sourceRoot":"","sources":["../src/image-viewer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAqC,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CA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OAAO,CAAC,GAAI,EAC/K,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,QAAQ,YAAE,YAAY,GAAQ,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,eAAK,IAAI,EAAC,OAAO,aAAE,UAAU,EAAC,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YAAG,UAAU,GAAU,IAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC1M,CAAC","sourcesContent":["import { useRef, useState, type ReactNode, type PointerEvent } from \"react\";\nimport { HjmPortal, getModalLayer, useModalFocus } from \"./modal.js\";\nimport { IconButton } from \"./actions.js\";\n\nexport type ImageViewerItem = { id: string; uri: string; label: string };\nexport type ImageViewerProps = {\n actions?: ReactNode;\n open: boolean; items: readonly ImageViewerItem[]; initialIndex?: number;\n onClose: () => void; onIndexChange?: (index: number) => void;\n closeLabel: string; previousLabel: string; nextLabel: string;\n loadingLabel: string; errorLabel: string; retryLabel: string;\n /** Authorized image hosts keep their fetching, loading and retry policy. Only the selected item mounts. */\n renderImage?: (item: ImageViewerItem) => ReactNode;\n};\n\n/** Full viewport photo presentation; shares modal isolation, focus return and Escape with Dialog. */\nexport function ImageViewer(props: ImageViewerProps) {\n if (!props.open) return null;\n if (!props.items.length || new Set(props.items.map(item => item.id)).size !== props.items.length ||\n props.items.some(item => !item.id.trim() || !item.uri.trim() || !item.label.trim()) ||\n [props.closeLabel, props.previousLabel, props.nextLabel, props.loadingLabel, props.errorLabel, props.retryLabel].some(label => !label.trim()) ||\n !Number.isInteger(props.initialIndex ?? 0) || (props.initialIndex ?? 0) < 0 || (props.initialIndex ?? 0) >= props.items.length)\n throw new TypeError(\"ImageViewer needs named images, localized controls and a valid index\");\n return <ViewerSession key={JSON.stringify(props.items.map(item => [item.id, item.uri]))} {...props} />;\n}\nfunction ViewerSession(props: ImageViewerProps) {\n const contentRef = useRef<HTMLDivElement>(null), closeRef = useRef<HTMLButtonElement>(null);\n const [index, setIndex] = useState(props.initialIndex ?? 0);\n const [view, setView] = useState({ scale: 1, x: 0, y: 0 });\n const pointers = useRef(new Map<number, { x: number; y: number }>());\n const item = props.items[index]!;\n useModalFocus({ active: true, contentRef, initialFocusRef: closeRef, onEscape: props.onClose });\n const move = (next: number) => { pointers.current.clear(); setView({ scale: 1, x: 0, y: 0 }); setIndex(next); props.onIndexChange?.(next); };\n const clamp = (scale: number, x = view.x, y = view.y) => {\n const bounds = contentRef.current?.querySelector(\".hjm-image-viewer__stage\")?.getBoundingClientRect();\n const image = contentRef.current?.querySelector('img');\n const fit = image?.naturalWidth && bounds ? Math.min(bounds.width / image.naturalWidth, bounds.height / image.naturalHeight) : 1;\n const imageWidth = image?.naturalWidth ? image.naturalWidth * fit : bounds?.width ?? 0;\n const imageHeight = image?.naturalHeight ? image.naturalHeight * fit : bounds?.height ?? 0;\n const limitX = Math.max(0, imageWidth * scale - (bounds?.width ?? 0)) / 2;\n const limitY = Math.max(0, imageHeight * scale - (bounds?.height ?? 0)) / 2;\n setView({ scale, x: Math.max(-limitX, Math.min(limitX, x)), y: Math.max(-limitY, Math.min(limitY, y)) });\n };\n const pointerMove = (event: PointerEvent<HTMLDivElement>) => {\n const old = pointers.current.get(event.pointerId);\n if (!old) return;\n const other = [...pointers.current.entries()].find(([id]) => id !== event.pointerId)?.[1];\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });\n if (other) {\n const before = Math.hypot(old.x - other.x, old.y - other.y);\n if (before > 0) clamp(Math.max(1, Math.min(4, view.scale * Math.hypot(event.clientX - other.x, event.clientY - other.y) / before)));\n } else if (view.scale > 1) clamp(view.scale, view.x + event.clientX - old.x, view.y + event.clientY - old.y);\n };\n return <HjmPortal><div className=\"hjm-image-viewer\" style={{ zIndex: getModalLayer(0) }} ref={contentRef}\n role=\"dialog\" aria-modal=\"true\" aria-label={item.label} data-hjm-modal-content=\"\" tabIndex={-1}>\n <div className=\"hjm-image-viewer__header\"><IconButton ref={closeRef} label={props.closeLabel} tone=\"ghost\" onClick={props.onClose}>×</IconButton>{props.actions ? <div className=\"hjm-image-viewer__actions\">{props.actions}</div> : null}</div>\n <div className=\"hjm-image-viewer__stage\" onDoubleClick={() => clamp(view.scale === 1 ? 2 : 1, 0, 0)}\n onPointerDown={event => {\n if ((event.target as HTMLElement).closest(\"button\")) return;\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY }); event.currentTarget.setPointerCapture(event.pointerId);\n }} onPointerMove={pointerMove} onPointerUp={event => pointers.current.delete(event.pointerId)} onPointerCancel={event => pointers.current.delete(event.pointerId)}\n onKeyDown={event => {\n if (event.key === \"+\" || event.key === \"=\") { event.preventDefault(); clamp(Math.min(4, view.scale + 1)); }\n if (event.key === \"-\") { event.preventDefault(); clamp(Math.max(1, view.scale - 1)); }\n if (event.key.startsWith('Arrow')) {\n event.preventDefault();\n if (view.scale > 1) clamp(view.scale, view.x + (event.key === 'ArrowLeft' ? 40 : event.key === 'ArrowRight' ? -40 : 0), view.y + (event.key === 'ArrowUp' ? 40 : event.key === 'ArrowDown' ? -40 : 0));\n else if (event.key === 'ArrowLeft' && index > 0) move(index - 1);\n else if (event.key === 'ArrowRight' && index + 1 < props.items.length) move(index + 1);\n }\n }} tabIndex={0} aria-label={item.label}>\n <div className=\"hjm-image-viewer__image\" style={{ transform: `translate(${view.x}px, ${view.y}px) scale(${view.scale})` }}>\n {props.renderImage ? props.renderImage(item) : <ViewerImage key={item.uri} item={item} {...props} />}\n </div>\n </div>\n <div className=\"hjm-image-viewer__footer\">\n {props.items.length > 1 ? <IconButton label={props.previousLabel} tone=\"ghost\" disabled={index === 0} onClick={() => move(index - 1)}>‹</IconButton> : null}\n <span aria-live=\"polite\">{item.label}{props.items.length > 1 ? ` · ${index + 1}/${props.items.length}` : \"\"}</span>\n {props.items.length > 1 ? <IconButton label={props.nextLabel} tone=\"ghost\" disabled={index === props.items.length - 1} onClick={() => move(index + 1)}>›</IconButton> : null}\n </div>\n </div></HjmPortal>;\n}\nfunction ViewerImage({ item, loadingLabel, errorLabel, retryLabel }: ImageViewerProps & { item: ImageViewerItem }) {\n const [attempt, setAttempt] = useState(0);\n // A retry retires the whole host, so an old image callback cannot mark a new attempt ready.\n return <ImageAttempt key={attempt} item={item} loadingLabel={loadingLabel} errorLabel={errorLabel} retryLabel={retryLabel} onRetry={() => setAttempt(n => n + 1)} />;\n}\nfunction ImageAttempt({ item, loadingLabel, errorLabel, retryLabel, onRetry }: Pick<ImageViewerProps, 'loadingLabel' | 'errorLabel' | 'retryLabel'> & { item: ImageViewerItem; onRetry: () => void }) {\n const [status, setStatus] = useState<\"loading\" | \"ready\" | \"error\">(\"loading\");\n return <><img src={item.uri} alt={item.label} draggable={false} onLoad={() => setStatus(current => current === 'error' ? current : 'ready')} onError={() => setStatus(\"error\")} />\n {status === \"loading\" ? <span role=\"status\">{loadingLabel}</span> : status === \"error\" ? <div role=\"alert\">{errorLabel}<button type=\"button\" onClick={onRetry}>{retryLabel}</button></div> : null}</>;\n}\n"]}
1
+ {"version":3,"file":"image-viewer.js","sourceRoot":"","sources":["../src/image-viewer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAoF,MAAM,OAAO,CAAC;AACvI,OAAO,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAErH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAA6C,SAAS,kBAAkB,CAClH,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAE1D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E,OAAO,EAAyH;IAClM,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAgC,SAAS,CAAC,CAAC;IAC/E,OAAO,8BAAE,cAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,GAAI,EAC/K,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,QAAQ,YAAE,YAAY,GAAQ,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,eAAK,IAAI,EAAC,OAAO,aAAE,UAAU,EAAC,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YAAG,UAAU,GAAU,IAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC1M,CAAC","sourcesContent":["\"use client\";\n\nimport { forwardRef, useRef, useState, type ButtonHTMLAttributes, type CSSProperties, type ReactNode, type PointerEvent } from \"react\";\nimport { imageViewerTriggerRecipe, validateImageViewerTriggerLabel } from \"@hjmds/design-contracts/components/image\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nimport { classNames } from \"./internal.js\";\nimport { HjmPortal, getModalLayer, useModalFocus } from \"./modal.js\";\nimport { IconButton } from \"./actions.js\";\n\nexport type ImageViewerItem = { id: string; uri: string; label: string };\nexport type ImageViewerProps = {\n actions?: ReactNode;\n open: boolean; items: readonly ImageViewerItem[]; initialIndex?: number;\n onClose: () => void; onIndexChange?: (index: number) => void;\n closeLabel: string; previousLabel: string; nextLabel: string;\n loadingLabel: string; errorLabel: string; retryLabel: string;\n /** Authorized image hosts keep their fetching, loading and retry policy. Only the selected item mounts. */\n renderImage?: (item: ImageViewerItem) => ReactNode;\n};\n\nexport type ImageViewerTriggerProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\" | \"aria-label\" | \"type\" | \"style\"> & Readonly<{\n /** Localized accessible name, e.g. \"사진 크게 보기\". The media inside is decorative. */\n label: string;\n /** Product media (HJM `Image` with `decorative`, `<img alt=\"\">`). */\n children: ReactNode;\n /** Layout-only placement; the trigger fills its container width by default, set `width` for a thumbnail. */\n layoutStyle?: HjmCompositionStyleProp;\n}>;\n\n/**\n * Button around product media that opens ImageViewer. The product keeps the viewer's `open` state and calls it from\n * `onClick`; the trigger owns the name, focus ring on the image frame radius, zoom cursor and pressed opacity.\n */\nexport const ImageViewerTrigger = forwardRef<HTMLButtonElement, ImageViewerTriggerProps>(function ImageViewerTrigger(\n { label, children, className, layoutStyle, ...props }, ref,\n) {\n validateImageViewerTriggerLabel(label);\n return <button {...props} ref={ref} type=\"button\" aria-label={label} aria-haspopup=\"dialog\"\n className={classNames(\"hjm-image-viewer-trigger\", className)}\n style={{ ...layoutStyle, \"--hjm-image-viewer-trigger-pressed-opacity\": imageViewerTriggerRecipe.pressedOpacity,\n \"--hjm-image-viewer-trigger-disabled-opacity\": imageViewerTriggerRecipe.disabledOpacity,\n \"--hjm-image-viewer-trigger-cursor\": imageViewerTriggerRecipe.cursor } as CSSProperties}>\n {children}\n </button>;\n});\n\n/** Full viewport photo presentation; shares modal isolation, focus return and Escape with Dialog. */\nexport function ImageViewer(props: ImageViewerProps) {\n if (!props.open) return null;\n if (!props.items.length || new Set(props.items.map(item => item.id)).size !== props.items.length ||\n props.items.some(item => !item.id.trim() || !item.uri.trim() || !item.label.trim()) ||\n [props.closeLabel, props.previousLabel, props.nextLabel, props.loadingLabel, props.errorLabel, props.retryLabel].some(label => !label.trim()) ||\n !Number.isInteger(props.initialIndex ?? 0) || (props.initialIndex ?? 0) < 0 || (props.initialIndex ?? 0) >= props.items.length)\n throw new TypeError(\"ImageViewer needs named images, localized controls and a valid index\");\n return <ViewerSession key={JSON.stringify(props.items.map(item => [item.id, item.uri]))} {...props} />;\n}\nfunction ViewerSession(props: ImageViewerProps) {\n const contentRef = useRef<HTMLDivElement>(null), closeRef = useRef<HTMLButtonElement>(null);\n const [index, setIndex] = useState(props.initialIndex ?? 0);\n const [view, setView] = useState({ scale: 1, x: 0, y: 0 });\n const pointers = useRef(new Map<number, { x: number; y: number }>());\n const item = props.items[index]!;\n useModalFocus({ active: true, contentRef, initialFocusRef: closeRef, onEscape: props.onClose });\n const move = (next: number) => { pointers.current.clear(); setView({ scale: 1, x: 0, y: 0 }); setIndex(next); props.onIndexChange?.(next); };\n const clamp = (scale: number, x = view.x, y = view.y) => {\n const bounds = contentRef.current?.querySelector(\".hjm-image-viewer__stage\")?.getBoundingClientRect();\n const image = contentRef.current?.querySelector('img');\n const fit = image?.naturalWidth && bounds ? Math.min(bounds.width / image.naturalWidth, bounds.height / image.naturalHeight) : 1;\n const imageWidth = image?.naturalWidth ? image.naturalWidth * fit : bounds?.width ?? 0;\n const imageHeight = image?.naturalHeight ? image.naturalHeight * fit : bounds?.height ?? 0;\n const limitX = Math.max(0, imageWidth * scale - (bounds?.width ?? 0)) / 2;\n const limitY = Math.max(0, imageHeight * scale - (bounds?.height ?? 0)) / 2;\n setView({ scale, x: Math.max(-limitX, Math.min(limitX, x)), y: Math.max(-limitY, Math.min(limitY, y)) });\n };\n const pointerMove = (event: PointerEvent<HTMLDivElement>) => {\n const old = pointers.current.get(event.pointerId);\n if (!old) return;\n const other = [...pointers.current.entries()].find(([id]) => id !== event.pointerId)?.[1];\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });\n if (other) {\n const before = Math.hypot(old.x - other.x, old.y - other.y);\n if (before > 0) clamp(Math.max(1, Math.min(4, view.scale * Math.hypot(event.clientX - other.x, event.clientY - other.y) / before)));\n } else if (view.scale > 1) clamp(view.scale, view.x + event.clientX - old.x, view.y + event.clientY - old.y);\n };\n return <HjmPortal><div className=\"hjm-image-viewer\" style={{ zIndex: getModalLayer(0) }} ref={contentRef}\n role=\"dialog\" aria-modal=\"true\" aria-label={item.label} data-hjm-modal-content=\"\" tabIndex={-1}>\n <div className=\"hjm-image-viewer__header\"><IconButton ref={closeRef} label={props.closeLabel} tone=\"ghost\" onClick={props.onClose}>×</IconButton>{props.actions ? <div className=\"hjm-image-viewer__actions\">{props.actions}</div> : null}</div>\n <div className=\"hjm-image-viewer__stage\" onDoubleClick={() => clamp(view.scale === 1 ? 2 : 1, 0, 0)}\n onPointerDown={event => {\n if ((event.target as HTMLElement).closest(\"button\")) return;\n pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY }); event.currentTarget.setPointerCapture(event.pointerId);\n }} onPointerMove={pointerMove} onPointerUp={event => pointers.current.delete(event.pointerId)} onPointerCancel={event => pointers.current.delete(event.pointerId)}\n onKeyDown={event => {\n if (event.key === \"+\" || event.key === \"=\") { event.preventDefault(); clamp(Math.min(4, view.scale + 1)); }\n if (event.key === \"-\") { event.preventDefault(); clamp(Math.max(1, view.scale - 1)); }\n if (event.key.startsWith('Arrow')) {\n event.preventDefault();\n if (view.scale > 1) clamp(view.scale, view.x + (event.key === 'ArrowLeft' ? 40 : event.key === 'ArrowRight' ? -40 : 0), view.y + (event.key === 'ArrowUp' ? 40 : event.key === 'ArrowDown' ? -40 : 0));\n else if (event.key === 'ArrowLeft' && index > 0) move(index - 1);\n else if (event.key === 'ArrowRight' && index + 1 < props.items.length) move(index + 1);\n }\n }} tabIndex={0} aria-label={item.label}>\n <div className=\"hjm-image-viewer__image\" style={{ transform: `translate(${view.x}px, ${view.y}px) scale(${view.scale})` }}>\n {props.renderImage ? props.renderImage(item) : <ViewerImage key={item.uri} item={item} {...props} />}\n </div>\n </div>\n <div className=\"hjm-image-viewer__footer\">\n {props.items.length > 1 ? <IconButton label={props.previousLabel} tone=\"ghost\" disabled={index === 0} onClick={() => move(index - 1)}>‹</IconButton> : null}\n <span aria-live=\"polite\">{item.label}{props.items.length > 1 ? ` · ${index + 1}/${props.items.length}` : \"\"}</span>\n {props.items.length > 1 ? <IconButton label={props.nextLabel} tone=\"ghost\" disabled={index === props.items.length - 1} onClick={() => move(index + 1)}>›</IconButton> : null}\n </div>\n </div></HjmPortal>;\n}\nfunction ViewerImage({ item, loadingLabel, errorLabel, retryLabel }: ImageViewerProps & { item: ImageViewerItem }) {\n const [attempt, setAttempt] = useState(0);\n // A retry retires the whole host, so an old image callback cannot mark a new attempt ready.\n return <ImageAttempt key={attempt} item={item} loadingLabel={loadingLabel} errorLabel={errorLabel} retryLabel={retryLabel} onRetry={() => setAttempt(n => n + 1)} />;\n}\nfunction ImageAttempt({ item, loadingLabel, errorLabel, retryLabel, onRetry }: Pick<ImageViewerProps, 'loadingLabel' | 'errorLabel' | 'retryLabel'> & { item: ImageViewerItem; onRetry: () => void }) {\n const [status, setStatus] = useState<\"loading\" | \"ready\" | \"error\">(\"loading\");\n return <><img src={item.uri} alt={item.label} draggable={false} onLoad={() => setStatus(current => current === 'error' ? current : 'ready')} onError={() => setStatus(\"error\")} />\n {status === \"loading\" ? <span role=\"status\">{loadingLabel}</span> : status === \"error\" ? <div role=\"alert\">{errorLabel}<button type=\"button\" onClick={onRetry}>{retryLabel}</button></div> : null}</>;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { TopBar, type TopBarProps } from "./top-bar.js";
3
3
  export { BottomCTA, type BottomCTAAction, type BottomCTAProps } from "./bottom-cta.js";
4
4
  export { hjmCompositionStyleKeys, type HjmCompositionStyle, type HjmCompositionStyleKey, type HjmCompositionStyleProp, } from "./composition-style.js";
5
5
  export { AspectRatio, Container, Grid, Layout, Section, Stack, Surface, Text, VisuallyHidden, type AspectRatioProps, type AspectRatioValue, type ContainerGutter, type ContainerProps, type ContainerSize, type GridGap, type GridProps, type LayoutProps, type LayoutSidebar, type SectionProps, type StackAlign, type StackAxis, type StackGap, type StackJustify, type StackProps, type SurfacePadding, type SurfaceProps, type SurfaceRadius, type SurfaceTone, type TextEmphasis, type TextProps, type TextTone, type VisuallyHiddenProps, } from "./layout.js";
6
- export { Button, ButtonLink, type ButtonLinkProps, IconButton, Link, type ButtonAlign, type ButtonProps, type ButtonShape, type ButtonAppearance, type ButtonSize, type ButtonTone, type IconButtonProps, type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkRenderProps, type LinkProps, } from "./actions.js";
6
+ export { Button, ButtonLink, type ButtonLinkProps, IconButton, IconButtonLink, type IconButtonLinkProps, Link, type ButtonAlign, type ButtonProps, type ButtonShape, type ButtonAppearance, type ButtonSize, type ButtonTone, type IconButtonProps, type IconButtonShape, type IconButtonSize, type IconButtonTone, type LinkRenderProps, type LinkProps, } from "./actions.js";
7
7
  export { Field, OtpField, PasswordField, SearchField, TextArea, TextField, type FieldControlProps, type FieldProps, type OtpFieldProps, type PasswordFieldProps, type PasswordFieldToggleRenderProps, type SearchFieldProps, type SearchFieldIconRenderProps, type TextAreaProps, type TextFieldProps, } from "./forms.js";
8
8
  export { Combobox, Form, type ComboboxItem, type ComboboxOpenChangeReason, type ComboboxProps, type FormProps, type FormSubmitHandler, NativeSelect, type NativeSelectProps, type SelectOption, } from "./advanced-forms.js";
9
9
  export { Select, type SelectItem, type SelectLeadingRenderProps, type SelectOptionLeadingRenderProps, type SelectProps, type SelectSection, } from "./select.js";
@@ -20,7 +20,7 @@ export { Steps, type StepsProps, } from "./steps.js";
20
20
  export { BottomNavigation, BottomNavigationInsetProvider, useBottomNavigationInset, getBottomNavigationGridColumn, isUnmodifiedPrimaryBottomNavigationClick, shouldHideBottomNavigationForKeyboard, type BottomNavigationIconRenderProps, type BottomNavigationInsetProviderProps, type BottomNavigationLinkRenderProps, type BottomNavigationProps, } from "./bottom-navigation.js";
21
21
  export { Badge, Card, QuoteCard, ListRow, Tag, type BadgeProps, type BadgeVariant, type CardHeadingLevel, type CardProps, type QuoteCardProps, type ListRowProps, type TagProps, type TagTone, } from "./display.js";
22
22
  export { CounterBadge, Icon, Image, type CounterBadgeProps, type IconProps, type ImageAdapterProps, type ImageProps, } from "./supplemental-display.js";
23
- export { Accordion, Avatar, AvatarGroup, type AvatarGroupProps, DescriptionList, Divider, List, ListSeparator, Statistic, StatisticGroup, Table, Timeline, type AccordionItem, type AccordionProps, type AvatarProps, type DescriptionListProps, type DividerInset, type DividerOrientation, type DividerProps, type ListAppearance, type ListProps, type ListSeparatorProps, type StatisticProps, type StatisticGroupProps, type StatisticTrendMarkRenderProps, type ComposeStatisticAccessibilityLabel, type TableColumn, type TableProps, type TableSortDirection, type TimelineProps, } from "./advanced-display.js";
23
+ export { Accordion, Avatar, AvatarGroup, type AvatarGroupProps, DescriptionList, Divider, List, ListSeparator, Statistic, StatisticGroup, Table, Timeline, type AccordionItem, type AccordionProps, type AvatarProps, type AvatarImageRenderProps, type DescriptionListProps, type DividerInset, type DividerOrientation, type DividerProps, type ListAppearance, type ListProps, type ListSeparatorProps, type StatisticProps, type StatisticGroupProps, type StatisticTrendMarkRenderProps, type ComposeStatisticAccessibilityLabel, type TableColumn, type TableProps, type TableSortDirection, type TimelineProps, } from "./advanced-display.js";
24
24
  export { UploadItem, type UploadItemProps, } from "./upload-item.js";
25
25
  export { EmptyState, Notice, Progress, Result, Skeleton, Spinner, PendingContent, type PendingContentProps, type EmptyStateProps, type NoticeProps, type ProgressProps, type ResultProps, type SkeletonProps, type SpinnerProps, } from "./feedback.js";
26
26
  export { Toast, ToastProvider, useToast, type ToastApi, type ToastProps, type ToastProviderProps, } from "./toast.js";
@@ -46,7 +46,7 @@ export { ToggleGroup, type ToggleGroupProps } from "./toggle-group.js";
46
46
  export { TagsInput, type TagsInputProps } from "./tags-input.js";
47
47
  export { SkipNav, type SkipNavProps } from "./skip-nav.js";
48
48
  export { BottomInfo, type BottomInfoProps } from "./bottom-info.js";
49
- export { Sidebar, type SidebarProps } from "./sidebar.js";
49
+ export { Sidebar, type SidebarLinkRenderProps, type SidebarProps, type SidebarSize } from "./sidebar.js";
50
50
  export { DateRangePicker, type DateRangePickerProps } from "./date-range.js";
51
51
  export { OverlayStackProvider, useOverlayStack, useDialog, useSheet, type OverlayStackApi, type OverlayStackProviderProps, type OverlayHandle, } from "./overlay-stack.js";
52
52
  export { AuthProviderButton, type AuthProviderButtonProps } from "./provider-button.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EACL,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,mBAAmB,GACzB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM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E,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnM,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ export { TopBar } from "./top-bar.js";
3
3
  export { BottomCTA } from "./bottom-cta.js";
4
4
  export { hjmCompositionStyleKeys, } from "./composition-style.js";
5
5
  export { AspectRatio, Container, Grid, Layout, Section, Stack, Surface, Text, VisuallyHidden, } from "./layout.js";
6
- export { Button, ButtonLink, IconButton, Link, } from "./actions.js";
6
+ export { Button, ButtonLink, IconButton, IconButtonLink, Link, } from "./actions.js";
7
7
  export { Field, OtpField, PasswordField, SearchField, TextArea, TextField, } from "./forms.js";
8
8
  export { Combobox, Form, NativeSelect, } from "./advanced-forms.js";
9
9
  export { Select, } from "./select.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,GAIZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAoB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EACL,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,cAAc,GAwBf,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,MAAM,EACN,UAAU,EAEV,UAAU,EACV,IAAI,GAaL,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,GAUV,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,IAAI,EAMJ,YAAY,GAGb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,MAAM,GAMP,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,GAEZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,MAAM,GAEP,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,GAGX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,UAAU,GAEX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,MAAM,GAaP,MAAM,gBAAgB,CAAC;AAExB,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M,sBAAsB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAA+G,MAAM,kBAAkB,CAAC;AACnM,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAyB,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,WAAW,EAA+C,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAqB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAyC,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n HjmProvider,\n useHjmTheme,\n type HjmBrandPalette,\n type HjmProviderHost,\n type HjmProviderProps,\n} from \"./provider.js\";\n\nexport { TopBar, type TopBarProps } from \"./top-bar.js\";\nexport { BottomCTA, type BottomCTAAction, type BottomCTAProps } from \"./bottom-cta.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n ButtonLink,\n type ButtonLinkProps,\n IconButton,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonAppearance,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport { Breadcrumb, type BreadcrumbProps } from \"./breadcrumb.js\";\nexport { Pagination, type PaginationProps } from \"./pagination.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n BottomNavigationInsetProvider,\n useBottomNavigationInset,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationInsetProviderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n QuoteCard,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type QuoteCardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n AvatarGroup,\n type AvatarGroupProps,\n DescriptionList,\n Divider,\n List,\n ListSeparator,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type ListSeparatorProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n PendingContent,\n type PendingContentProps,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n ImmersiveOverlay,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type ImmersiveOverlayOpenChangeReason,\n type ImmersiveOverlayProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type SheetSize,\n type TooltipProps,\n} from \"./overlays.js\";\n\nexport { Carousel, PageIndicator, type CarouselProps, type CarouselLabels, type PageIndicatorProps } from \"./carousel.js\";\n\nexport { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance, type FloatingActionButtonProps } from \"./floating-action-button.js\";\n\nexport { Calendar, type CalendarProps, type CalendarMonthAction, type CalendarHandle, type CalendarOverflow } from \"./calendar.js\";\n\nexport { Anchor, type AnchorProps } from \"./anchor.js\";\n\nexport { Popover, type PopoverProps, type PopoverContentActions } from \"./popover.js\";\nexport { SidePanel, type SidePanelProps } from \"./side-panel.js\";\nexport { Splitter, type SplitterProps } from \"./splitter.js\";\nexport { Tour, type TourProps } from \"./tour.js\";\nexport { Tree, type TreeProps } from \"./tree.js\";\nexport { TransferList, type TransferListProps, type TransferListLabels } from \"./transfer-list.js\";\nexport { Mentions, type MentionsProps, type MentionCandidate } from \"./mentions.js\";\nexport { CommandPalette, type CommandPaletteProps } from \"./command-palette.js\";\nexport { Agreement, type AgreementProps } from \"./agreement.js\";\nexport { Top, type TopProps } from \"./top.js\";\nexport { Heading, type HeadingProps } from \"./heading.js\";\nexport { TextFormat, type TextFormatProps } from \"./text-formats.js\";\nexport { ClipboardButton, ClipboardIconButton, type ClipboardButtonProps, type ClipboardIconButtonProps } from \"./clipboard.js\";\nexport { ToggleGroup, type ToggleGroupProps } from \"./toggle-group.js\";\nexport { TagsInput, type TagsInputProps } from \"./tags-input.js\";\nexport { SkipNav, type SkipNavProps } from \"./skip-nav.js\";\nexport { BottomInfo, type BottomInfoProps } from \"./bottom-info.js\";\nexport { Sidebar, type SidebarProps } from \"./sidebar.js\";\nexport { DateRangePicker, type DateRangePickerProps } from \"./date-range.js\";\nexport {\n OverlayStackProvider,\n useOverlayStack,\n useDialog,\n useSheet,\n type OverlayStackApi,\n type OverlayStackProviderProps,\n type OverlayHandle,\n} from \"./overlay-stack.js\";\nexport { AuthProviderButton, type AuthProviderButtonProps } from \"./provider-button.js\";\nexport { AuthScreenLayout, AuthScreenHero, AuthScreenFooter, type AuthScreenLayoutProps, type AuthScreenHeroProps, type AuthScreenFooterProps, type AuthScreenPolicyLink } from \"./auth-screen.js\";\nexport { DataTable, type DataTableProps, type DataTableLabels } from \"./data-table.js\";\nexport { Collapsible, CollapsibleMarker, type CollapsibleProps } from \"./collapsible.js\";\nexport { ContextMenu, type ContextMenuItem, type ContextMenuProps } from \"./context-menu.js\";\nexport { Menubar, type MenubarProps } from \"./menubar.js\";\nexport { Asset, AssetGroup, type AssetProps, type AssetGroupProps } from \"./asset.js\";\n\nexport { StatusText, type StatusTextProps } from \"./status-text.js\";\n\nexport { TimePicker, type TimePickerProps } from \"./time-picker.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,GAIZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAoB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAA6C,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EACL,uBAAuB,GAIxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,WAAW,EACX,SAAS,EACT,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,cAAc,GAwBf,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} from \"./provider.js\";\n\nexport { TopBar, type TopBarProps } from \"./top-bar.js\";\nexport { BottomCTA, type BottomCTAAction, type BottomCTAProps } from \"./bottom-cta.js\";\n\nexport {\n hjmCompositionStyleKeys,\n type HjmCompositionStyle,\n type HjmCompositionStyleKey,\n type HjmCompositionStyleProp,\n} from \"./composition-style.js\";\n\nexport {\n AspectRatio,\n Container,\n Grid,\n Layout,\n Section,\n Stack,\n Surface,\n Text,\n VisuallyHidden,\n type AspectRatioProps,\n type AspectRatioValue,\n type ContainerGutter,\n type ContainerProps,\n type ContainerSize,\n type GridGap,\n type GridProps,\n type LayoutProps,\n type LayoutSidebar,\n type SectionProps,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StackProps,\n type SurfacePadding,\n type SurfaceProps,\n type SurfaceRadius,\n type SurfaceTone,\n type TextEmphasis,\n type TextProps,\n type TextTone,\n type VisuallyHiddenProps,\n} from \"./layout.js\";\n\nexport {\n Button,\n ButtonLink,\n type ButtonLinkProps,\n IconButton,\n IconButtonLink,\n type IconButtonLinkProps,\n Link,\n type ButtonAlign,\n type ButtonProps,\n type ButtonShape,\n type ButtonAppearance,\n type ButtonSize,\n type ButtonTone,\n type IconButtonProps,\n type IconButtonShape,\n type IconButtonSize,\n type IconButtonTone,\n type LinkRenderProps,\n type LinkProps,\n} from \"./actions.js\";\n\nexport {\n Field,\n OtpField,\n PasswordField,\n SearchField,\n TextArea,\n TextField,\n type FieldControlProps,\n type FieldProps,\n type OtpFieldProps,\n type PasswordFieldProps,\n type PasswordFieldToggleRenderProps,\n type SearchFieldProps,\n type SearchFieldIconRenderProps,\n type TextAreaProps,\n type TextFieldProps,\n} from \"./forms.js\";\n\nexport {\n Combobox,\n Form,\n type ComboboxItem,\n type ComboboxOpenChangeReason,\n type ComboboxProps,\n type FormProps,\n type FormSubmitHandler,\n NativeSelect,\n type NativeSelectProps,\n type SelectOption,\n} from \"./advanced-forms.js\";\n\nexport {\n Select,\n type SelectItem,\n type SelectLeadingRenderProps,\n type SelectOptionLeadingRenderProps,\n type SelectProps,\n type SelectSection,\n} from \"./select.js\";\n\nexport {\n NumberField,\n type NumberFieldProps,\n} from \"./number-field.js\";\n\nexport {\n Slider,\n type SliderProps,\n} from \"./slider.js\";\n\nexport {\n DatePicker,\n type DatePickerMonthAction,\n type DatePickerProps,\n} from \"./date-picker.js\";\n\nexport {\n FilePicker,\n type FilePickerProps,\n} from \"./file-picker.js\";\n\nexport {\n Checkbox,\n CheckboxGroup,\n Chip,\n Radio,\n RadioGroup,\n SegmentedControl,\n Switch,\n type CheckboxProps,\n type CheckboxGroupItem,\n type CheckboxGroupProps,\n type ChipProps,\n type ChoiceLeadingRenderProps,\n type RadioProps,\n type RadioGroupItem,\n type RadioGroupProps,\n type SegmentedControlItem,\n type SegmentedControlProps,\n type SwitchProps,\n type SwitchSize,\n} from \"./selection.js\";\n\nexport {\n TabPanel,\n Tabs,\n getDynamicTabPanelId,\n getTabId,\n getTabPanelId,\n type TabLeadingRenderProps,\n type TabItem,\n type TabPanelProps,\n type TabsProps,\n} from \"./navigation.js\";\n\nexport { Breadcrumb, type BreadcrumbProps } from \"./breadcrumb.js\";\nexport { Pagination, type PaginationProps } from \"./pagination.js\";\n\nexport {\n LoadMore,\n type LoadMoreProps,\n} from \"./supplemental-navigation.js\";\n\nexport {\n Steps,\n type StepsProps,\n} from \"./steps.js\";\n\nexport {\n BottomNavigation,\n BottomNavigationInsetProvider,\n useBottomNavigationInset,\n getBottomNavigationGridColumn,\n isUnmodifiedPrimaryBottomNavigationClick,\n shouldHideBottomNavigationForKeyboard,\n type BottomNavigationIconRenderProps,\n type BottomNavigationInsetProviderProps,\n type BottomNavigationLinkRenderProps,\n type BottomNavigationProps,\n} from \"./bottom-navigation.js\";\n\nexport {\n Badge,\n Card,\n QuoteCard,\n ListRow,\n Tag,\n type BadgeProps,\n type BadgeVariant,\n type CardHeadingLevel,\n type CardProps,\n type QuoteCardProps,\n type ListRowProps,\n type TagProps,\n type TagTone,\n} from \"./display.js\";\n\nexport {\n CounterBadge,\n Icon,\n Image,\n type CounterBadgeProps,\n type IconProps,\n type ImageAdapterProps,\n type ImageProps,\n} from \"./supplemental-display.js\";\n\nexport {\n Accordion,\n Avatar,\n AvatarGroup,\n type AvatarGroupProps,\n DescriptionList,\n Divider,\n List,\n ListSeparator,\n Statistic,\n StatisticGroup,\n Table,\n Timeline,\n type AccordionItem,\n type AccordionProps,\n type AvatarProps,\n type AvatarImageRenderProps,\n type DescriptionListProps,\n type DividerInset,\n type DividerOrientation,\n type DividerProps,\n type ListAppearance,\n type ListProps,\n type ListSeparatorProps,\n type StatisticProps,\n type StatisticGroupProps,\n type StatisticTrendMarkRenderProps,\n type ComposeStatisticAccessibilityLabel,\n type TableColumn,\n type TableProps,\n type TableSortDirection,\n type TimelineProps,\n} from \"./advanced-display.js\";\n\nexport {\n UploadItem,\n type UploadItemProps,\n} from \"./upload-item.js\";\n\nexport {\n EmptyState,\n Notice,\n Progress,\n Result,\n Skeleton,\n Spinner,\n PendingContent,\n type PendingContentProps,\n type EmptyStateProps,\n type NoticeProps,\n type ProgressProps,\n type ResultProps,\n type SkeletonProps,\n type SpinnerProps,\n} from \"./feedback.js\";\n\nexport {\n Toast,\n ToastProvider,\n useToast,\n type ToastApi,\n type ToastProps,\n type ToastProviderProps,\n} from \"./toast.js\";\n\nexport {\n AlertDialog,\n Dialog,\n ImmersiveOverlay,\n Menu,\n Sheet,\n Tooltip,\n type AlertDialogProps,\n type DialogOpenChangeReason,\n type DialogProps,\n type ImmersiveOverlayOpenChangeReason,\n type ImmersiveOverlayProps,\n type MenuItem,\n type MenuAsyncState,\n type MenuOpenChangeReason,\n type MenuProps,\n type MenuSection,\n type OverlayTrigger,\n type SheetPlacement,\n type SheetProps,\n type SheetSize,\n type TooltipProps,\n} from \"./overlays.js\";\n\nexport { Carousel, PageIndicator, type CarouselProps, type CarouselLabels, type PageIndicatorProps } from \"./carousel.js\";\n\nexport { FloatingActionButton, useFloatingActionButtonScroll, resolveFloatingActionButtonContentClearance, type FloatingActionButtonProps } from \"./floating-action-button.js\";\n\nexport { Calendar, type CalendarProps, type CalendarMonthAction, type CalendarHandle, type CalendarOverflow } from \"./calendar.js\";\n\nexport { Anchor, type AnchorProps } from \"./anchor.js\";\n\nexport { Popover, type PopoverProps, type PopoverContentActions } from \"./popover.js\";\nexport { SidePanel, type SidePanelProps } from \"./side-panel.js\";\nexport { Splitter, type SplitterProps } from \"./splitter.js\";\nexport { Tour, type TourProps } from \"./tour.js\";\nexport { Tree, type TreeProps } from \"./tree.js\";\nexport { TransferList, type TransferListProps, type TransferListLabels } from \"./transfer-list.js\";\nexport { Mentions, type MentionsProps, type MentionCandidate } from \"./mentions.js\";\nexport { CommandPalette, type CommandPaletteProps } from \"./command-palette.js\";\nexport { Agreement, type AgreementProps } from \"./agreement.js\";\nexport { Top, type TopProps } from \"./top.js\";\nexport { Heading, type HeadingProps } from \"./heading.js\";\nexport { TextFormat, type TextFormatProps } from \"./text-formats.js\";\nexport { ClipboardButton, ClipboardIconButton, type ClipboardButtonProps, type ClipboardIconButtonProps } from \"./clipboard.js\";\nexport { ToggleGroup, type ToggleGroupProps } from \"./toggle-group.js\";\nexport { TagsInput, type TagsInputProps } from \"./tags-input.js\";\nexport { SkipNav, type SkipNavProps } from \"./skip-nav.js\";\nexport { BottomInfo, type BottomInfoProps } from \"./bottom-info.js\";\nexport { Sidebar, type SidebarLinkRenderProps, type SidebarProps, type SidebarSize } from \"./sidebar.js\";\nexport { DateRangePicker, type DateRangePickerProps } from \"./date-range.js\";\nexport {\n OverlayStackProvider,\n useOverlayStack,\n useDialog,\n useSheet,\n type OverlayStackApi,\n type OverlayStackProviderProps,\n type OverlayHandle,\n} from \"./overlay-stack.js\";\nexport { AuthProviderButton, type AuthProviderButtonProps } from \"./provider-button.js\";\nexport { AuthScreenLayout, AuthScreenHero, AuthScreenFooter, type AuthScreenLayoutProps, type AuthScreenHeroProps, type AuthScreenFooterProps, type AuthScreenPolicyLink } from \"./auth-screen.js\";\nexport { DataTable, type DataTableProps, type DataTableLabels } from \"./data-table.js\";\nexport { Collapsible, CollapsibleMarker, type CollapsibleProps } from \"./collapsible.js\";\nexport { ContextMenu, type ContextMenuItem, type ContextMenuProps } from \"./context-menu.js\";\nexport { Menubar, type MenubarProps } from \"./menubar.js\";\nexport { Asset, AssetGroup, type AssetProps, type AssetGroupProps } from \"./asset.js\";\n\nexport { StatusText, type StatusTextProps } from \"./status-text.js\";\n\nexport { TimePicker, type TimePickerProps } from \"./time-picker.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"inline-confirm.d.ts","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9O,uHAAuH;IACvH,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAG3C,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAyCtD"}
1
+ {"version":3,"file":"inline-confirm.d.ts","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9O,uHAAuH;IACvH,WAAW,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC;AAG3C,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAyCtD"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useEffect, useRef, useState, useSyncExternalStore } from "react";
3
4
  import { createAlertDialogSession } from "@hjmds/design-contracts/components/alert-dialog";
@@ -1 +1 @@
1
- {"version":3,"file":"inline-confirm.js","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAA2B,MAAM,iDAAiD,CAAC;AACpH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKtC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;AACtC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;AACjC,qFAAqF;AACrF,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,0EAA0E;IAC1E,2EAA2E;IAC3E,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3C,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,G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,OAAO,EAAE,KAAK,EAAE,CAAC;4BAClG,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC;wBACzB,CAAC,YAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,GAAU,IACxD,IACF,CAAC;AACT,CAAC","sourcesContent":["import { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport { createAlertDialogSession, type AlertDialogSession } from \"@hjmds/design-contracts/components/alert-dialog\";\nimport { Button } from \"./actions.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type InlineConfirmProps = Readonly<{ label: string; prompt: string; confirmLabel: string; cancelLabel: string; pendingLabel: string; successLabel: string; errorLabel: string; disabled?: boolean; onConfirm: () => void | Promise<void>;\n /** Canonical layout-only placement, applied to whichever root the current phase renders so the block does not jump. */\n layoutStyle?: HjmCompositionStyleProp }>;\nconst emptySubscribe = () => () => {};\nconst emptySnapshot = () => null;\n/** Low-complexity confirmation using the existing async dialog session semantics. */\nexport function InlineConfirm(props: InlineConfirmProps) {\n // The displayed prompt can change while confirmation is open. Execute the\n // current action rather than the callback captured when the prompt opened.\n const confirmRef = useRef(props.onConfirm);\n confirmRef.current = props.onConfirm;\n const [session, setSession] = useState<AlertDialogSession | null>(null);\n const [done, setDone] = useState(false);\n const phase = useSyncExternalStore(session?.subscribe ?? emptySubscribe, session?.getSnapshot ?? emptySnapshot, emptySnapshot);\n const trigger = useRef<HTMLButtonElement>(null);\n const cancel = useRef<HTMLButtonElement>(null);\n const confirm = useRef<HTMLButtonElement>(null);\n const group = useRef<HTMLDivElement>(null);\n const result = useRef<HTMLSpanElement>(null);\n const focusResult = useRef(false);\n useEffect(() => { if (session) cancel.current?.focus(); }, [session]);\n useEffect(() => {\n if (phase?.status !== \"closing\") return;\n const confirmed = phase.result.outcome === \"confirmed\";\n // Completion removes both actions. Move only this group's current focus;\n // an async response must not steal focus from another part of the page.\n focusResult.current = confirmed && (group.current?.contains(document.activeElement) ?? false);\n session?.completeExit();setDone(confirmed);setSession(null);\n // Cancel returns focus to the original action; success leaves a live result.\n if (!confirmed) queueMicrotask(() => trigger.current?.focus());\n }, [phase, session]);\n useEffect(() => { if (done && focusResult.current) { focusResult.current = false; result.current?.focus(); } }, [done]);\n if (done) return <span ref={result} tabIndex={-1} role=\"status\" style={props.layoutStyle}>{props.successLabel}</span>;\n if (!session) return <Button ref={trigger} tone=\"danger\" disabled={props.disabled ?? false} {...(props.layoutStyle === undefined ? {} : { layoutStyle: props.layoutStyle })} onClick={() => setSession(createAlertDialogSession({ mode: \"confirm\", tone: \"danger\", title: props.label, description: props.prompt, confirmLabel: props.confirmLabel, cancelLabel: props.cancelLabel, onConfirm: () => confirmRef.current(), fallbackErrorMessage: props.errorLabel }))}>{props.label}</Button>;\n const busy = phase?.status === \"busy\";\n return <div ref={group} role=\"group\" aria-label={props.prompt} onKeyDown={event => { if (event.key === \"Escape\" && !busy) { event.stopPropagation();session.cancel(\"escape\"); } }} style={{ ...props.layoutStyle, display: \"grid\", gap: \"var(--hjm-space-sm)\" }}>\n <span>{props.prompt}</span>{phase?.status === \"error\" && <span role=\"alert\">{phase.message}</span>}\n <div style={{ display: \"flex\", flexWrap: \"wrap\", gap: \"var(--hjm-space-xs)\" }}>\n <Button ref={cancel} tone=\"ghost\" disabled={busy} onClick={() => session.cancel(\"cancel-action\")}>{props.cancelLabel}</Button>\n <Button ref={confirm} tone=\"danger\" loading={busy} disabled={props.disabled ?? false} onClick={event => {\n // WebKit pointer activation can leave focus on the now-disabled cancel\n // button. Transfer it before submitting; loading already blocks repeats.\n if (event.detail > 0 || group.current?.contains(document.activeElement)) confirm.current?.focus();\n void session.confirm();\n }}>{busy ? props.pendingLabel : props.confirmLabel}</Button>\n </div>\n </div>;\n}\n"]}
1
+ {"version":3,"file":"inline-confirm.js","sourceRoot":"","sources":["../src/inline-confirm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SA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AqB,EAAE,aAC3E,KAAC,MAAM,IAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,YAAG,KAAK,CAAC,WAAW,GAAU,EAC9H,KAAC,MAAM,IAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE;4BACrG,uEAAuE;4BACvE,yEAAyE;4BACzE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC;gCAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;4BAClG,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC;wBACzB,CAAC,YAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,GAAU,IACxD,IACF,CAAC;AACT,CAAC","sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport { createAlertDialogSession, type AlertDialogSession } from \"@hjmds/design-contracts/components/alert-dialog\";\nimport { Button } from \"./actions.js\";\nimport type { HjmCompositionStyleProp } from \"./composition-style.js\";\nexport type InlineConfirmProps = Readonly<{ label: string; prompt: string; confirmLabel: string; cancelLabel: string; pendingLabel: string; successLabel: string; errorLabel: string; disabled?: boolean; onConfirm: () => void | Promise<void>;\n /** Canonical layout-only placement, applied to whichever root the current phase renders so the block does not jump. */\n layoutStyle?: HjmCompositionStyleProp }>;\nconst emptySubscribe = () => () => {};\nconst emptySnapshot = () => null;\n/** Low-complexity confirmation using the existing async dialog session semantics. */\nexport function InlineConfirm(props: InlineConfirmProps) {\n // The displayed prompt can change while confirmation is open. Execute the\n // current action rather than the callback captured when the prompt opened.\n const confirmRef = useRef(props.onConfirm);\n confirmRef.current = props.onConfirm;\n const [session, setSession] = useState<AlertDialogSession | null>(null);\n const [done, setDone] = useState(false);\n const phase = useSyncExternalStore(session?.subscribe ?? emptySubscribe, session?.getSnapshot ?? emptySnapshot, emptySnapshot);\n const trigger = useRef<HTMLButtonElement>(null);\n const cancel = useRef<HTMLButtonElement>(null);\n const confirm = useRef<HTMLButtonElement>(null);\n const group = useRef<HTMLDivElement>(null);\n const result = useRef<HTMLSpanElement>(null);\n const focusResult = useRef(false);\n useEffect(() => { if (session) cancel.current?.focus(); }, [session]);\n useEffect(() => {\n if (phase?.status !== \"closing\") return;\n const confirmed = phase.result.outcome === \"confirmed\";\n // Completion removes both actions. Move only this group's current focus;\n // an async response must not steal focus from another part of the page.\n focusResult.current = confirmed && (group.current?.contains(document.activeElement) ?? false);\n session?.completeExit();setDone(confirmed);setSession(null);\n // Cancel returns focus to the original action; success leaves a live result.\n if (!confirmed) queueMicrotask(() => trigger.current?.focus());\n }, [phase, session]);\n useEffect(() => { if (done && focusResult.current) { focusResult.current = false; result.current?.focus(); } }, [done]);\n if (done) return <span ref={result} tabIndex={-1} role=\"status\" style={props.layoutStyle}>{props.successLabel}</span>;\n if (!session) return <Button ref={trigger} tone=\"danger\" disabled={props.disabled ?? false} {...(props.layoutStyle === undefined ? {} : { layoutStyle: props.layoutStyle })} onClick={() => setSession(createAlertDialogSession({ mode: \"confirm\", tone: \"danger\", title: props.label, description: props.prompt, confirmLabel: props.confirmLabel, cancelLabel: props.cancelLabel, onConfirm: () => confirmRef.current(), fallbackErrorMessage: props.errorLabel }))}>{props.label}</Button>;\n const busy = phase?.status === \"busy\";\n return <div ref={group} role=\"group\" aria-label={props.prompt} onKeyDown={event => { if (event.key === \"Escape\" && !busy) { event.stopPropagation();session.cancel(\"escape\"); } }} style={{ ...props.layoutStyle, display: \"grid\", gap: \"var(--hjm-space-sm)\" }}>\n <span>{props.prompt}</span>{phase?.status === \"error\" && <span role=\"alert\">{phase.message}</span>}\n <div style={{ display: \"flex\", flexWrap: \"wrap\", gap: \"var(--hjm-space-xs)\" }}>\n <Button ref={cancel} tone=\"ghost\" disabled={busy} onClick={() => session.cancel(\"cancel-action\")}>{props.cancelLabel}</Button>\n <Button ref={confirm} tone=\"danger\" loading={busy} disabled={props.disabled ?? false} onClick={event => {\n // WebKit pointer activation can leave focus on the now-disabled cancel\n // button. Transfer it before submitting; loading already blocks repeats.\n if (event.detail > 0 || group.current?.contains(document.activeElement)) confirm.current?.focus();\n void session.confirm();\n }}>{busy ? props.pendingLabel : props.confirmLabel}</Button>\n </div>\n </div>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"document-resource.d.ts","sourceRoot":"","sources":["../../src/internal/document-resource.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAmC,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAI3H,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GAAG,QAAQ,CAAC;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAEzH,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAwDxF"}
1
+ {"version":3,"file":"document-resource.d.ts","sourceRoot":"","sources":["../../src/internal/document-resource.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAmC,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAI3H,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GAAG,QAAQ,CAAC;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAEzH,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAwDxF"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useCallback, useLayoutEffect, useRef } from "react";
3
4
  import { resolveDocumentResourceControls } from "@hjmds/design-contracts/document-resource";
@@ -1 +1 @@
1
- {"version":3,"file":"document-resource.js","sourceRoot":"","sources":["../../src/internal/document-resource.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAiC,MAAM,2CAA2C,CAAC;AAC3H,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpD,uEAAuE;AACvE,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB;IACvF,MAAM,QAAQ,GAAG,+BAA+B,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC;IAC1D,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC;IACpD,MAAM,aAAa,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,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,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAC1F,EACR,UAAU,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAQ,CAAC,CAAC,CAAC,IAAI,EAC3J,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW;4BAC7G,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAQ,CAAC,CAAC,CAAC,IAAI,IAC9F,EACP,UAAU,IACL,GACA,CAAC;AACb,CAAC","sourcesContent":["import { useCallback, useLayoutEffect, useRef, type ReactNode } from \"react\";\nimport { resolveDocumentResourceControls, type DocumentResourceControls } from \"@hjmds/design-contracts/document-resource\";\nimport { Button } from \"../actions.js\";\nimport { Stack, Surface, Text } from \"../layout.js\";\n\nexport type DocumentResourceProps = DocumentResourceControls & Readonly<{ preview?: ReactNode; moreAction?: ReactNode }>;\n\n/** Rendering a host result never initiates file access or transfer. */\nexport function DocumentResource({ preview, moreAction, ...props }: DocumentResourceProps) {\n const resource = resolveDocumentResourceControls(props);\n const { labels } = props;\n const previewFailed = resource.preview.status === \"error\";\n const saveFailed = resource.save.status === \"error\";\n const previewButton = useRef<HTMLButtonElement>(null);\n const saveButton = useRef<HTMLButtonElement>(null);\n const retryButton = useRef<HTMLButtonElement | null>(null);\n const previousId = useRef(resource.id);\n const detachedFocus = useRef<Document | null>(null);\n const attachRetry = useCallback((node: HTMLButtonElement | null) => {\n const old = retryButton.current;\n // Capture before removal: after commit the browser has already dropped focus to body.\n if (!node && old && old.ownerDocument.activeElement === old) detachedFocus.current = old.ownerDocument;\n retryButton.current = node;\n }, []);\n useLayoutEffect(() => {\n const owner = detachedFocus.current;\n detachedFocus.current = null;\n // Only recover our removed control; never move focus across file identities or from another control.\n if (owner && previousId.current === resource.id && owner.activeElement === owner.body) {\n const target = [previewButton.current, saveButton.current].find(button =>\n button && !button.disabled && button.getAttribute(\"aria-disabled\") !== \"true\");\n target?.focus();\n }\n previousId.current = resource.id;\n });\n return <Surface padding=\"md\" radius=\"lg\" role=\"group\" aria-label={resource.name}>\n <Stack gap=\"sm\">\n {/* A file name is not automatically a page heading. Keep it readable when the preview fails. */}\n <Text emphasis=\"strong\" style={{ overflowWrap: \"anywhere\" }}>{resource.name}</Text>\n {resource.metadata.map((label, index) => <Text key={index} variant=\"caption\" tone=\"muted\">{label}</Text>)}\n {resource.description ? <Text>{resource.description}</Text> : null}\n {/* Center each state with its own actions without moving the document metadata. */}\n {resource.preview.status !== \"ready\" || preview != null || props.onPreview ? <Stack gap=\"sm\" justify=\"center\">\n {resource.preview.status === \"ready\" ? preview : null}\n {resource.preview.status === \"none\" ? <Text tone=\"muted\" style={{ textAlign: \"center\" }}>{labels.previewUnavailable}</Text> : null}\n {resource.preview.status === \"loading\" ? <Text role=\"status\" style={{ textAlign: \"center\" }}>{labels.previewLoading}</Text> : null}\n {previewFailed ? <Text tone=\"danger\" role=\"alert\" style={{ textAlign: \"center\" }}>{resource.preview.status === \"error\" ? resource.preview.message : \"\"}</Text> : null}\n {/* Independent buttons prevent preview navigation from swallowing save/menu interaction. */}\n <Stack gap=\"xs\">{props.onPreview ? <Button ref={previewButton} tone=\"secondary\" disabled={!resource.canPreview} onClick={props.onPreview}>{labels.preview}</Button> : null}\n {previewFailed && resource.preview.retryable ? <Button ref={attachRetry} tone=\"secondary\" disabled={!resource.canRetryPreview} onClick={props.onRetryPreview}>{labels.retryPreview}</Button> : null}</Stack>\n </Stack> : null}\n <Stack gap=\"sm\" justify=\"center\">\n <Button ref={saveButton} disabled={saveFailed ? !resource.canRetrySave : !resource.canSave}\n loading={resource.save.status === \"pending\"}\n onClick={saveFailed ? props.onRetrySave : props.onSave}>\n {saveFailed ? labels.retrySave : resource.save.status === \"pending\" ? labels.saving : labels.save}\n </Button>\n {saveFailed ? <Text tone=\"danger\" role=\"alert\" style={{ textAlign: \"center\" }}>{resource.save.status === \"error\" ? resource.save.message : \"\"}</Text> : null}\n {resource.save.status === \"started\" || resource.save.status === \"saved\" || resource.save.status === \"cancelled\"\n ? <Text role=\"status\" style={{ textAlign: \"center\" }}>{labels[resource.save.status]}</Text> : null}\n </Stack>\n {moreAction}\n </Stack>\n </Surface>;\n}\n"]}
1
+ {"version":3,"file":"document-resource.js","sourceRoot":"","sources":["../../src/internal/document-resource.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,+BAA+B,EAAiC,MAAM,2CAA2C,CAAC;AAC3H,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpD,uEAAuE;AACvE,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,EAAyB;IACvF,MAAM,QAAQ,GAAG,+BAA+B,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC;IAC1D,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,C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AAO,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,YACrD,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAC1F,EACR,UAAU,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAQ,CAAC,CAAC,CAAC,IAAI,EAC3J,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW;4BAC7G,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAQ,CAAC,CAAC,CAAC,IAAI,IAC9F,EACP,UAAU,IACL,GACA,CAAC;AACb,CAAC","sourcesContent":["\"use client\";\n\nimport { useCallback, useLayoutEffect, useRef, type ReactNode } from \"react\";\nimport { resolveDocumentResourceControls, type DocumentResourceControls } from \"@hjmds/design-contracts/document-resource\";\nimport { Button } from \"../actions.js\";\nimport { Stack, Surface, Text } from \"../layout.js\";\n\nexport type DocumentResourceProps = DocumentResourceControls & Readonly<{ preview?: ReactNode; moreAction?: ReactNode }>;\n\n/** Rendering a host result never initiates file access or transfer. */\nexport function DocumentResource({ preview, moreAction, ...props }: DocumentResourceProps) {\n const resource = resolveDocumentResourceControls(props);\n const { labels } = props;\n const previewFailed = resource.preview.status === \"error\";\n const saveFailed = resource.save.status === \"error\";\n const previewButton = useRef<HTMLButtonElement>(null);\n const saveButton = useRef<HTMLButtonElement>(null);\n const retryButton = useRef<HTMLButtonElement | null>(null);\n const previousId = useRef(resource.id);\n const detachedFocus = useRef<Document | null>(null);\n const attachRetry = useCallback((node: HTMLButtonElement | null) => {\n const old = retryButton.current;\n // Capture before removal: after commit the browser has already dropped focus to body.\n if (!node && old && old.ownerDocument.activeElement === old) detachedFocus.current = old.ownerDocument;\n retryButton.current = node;\n }, []);\n useLayoutEffect(() => {\n const owner = detachedFocus.current;\n detachedFocus.current = null;\n // Only recover our removed control; never move focus across file identities or from another control.\n if (owner && previousId.current === resource.id && owner.activeElement === owner.body) {\n const target = [previewButton.current, saveButton.current].find(button =>\n button && !button.disabled && button.getAttribute(\"aria-disabled\") !== \"true\");\n target?.focus();\n }\n previousId.current = resource.id;\n });\n return <Surface padding=\"md\" radius=\"lg\" role=\"group\" aria-label={resource.name}>\n <Stack gap=\"sm\">\n {/* A file name is not automatically a page heading. Keep it readable when the preview fails. */}\n <Text emphasis=\"strong\" style={{ overflowWrap: \"anywhere\" }}>{resource.name}</Text>\n {resource.metadata.map((label, index) => <Text key={index} variant=\"caption\" tone=\"muted\">{label}</Text>)}\n {resource.description ? <Text>{resource.description}</Text> : null}\n {/* Center each state with its own actions without moving the document metadata. */}\n {resource.preview.status !== \"ready\" || preview != null || props.onPreview ? <Stack gap=\"sm\" justify=\"center\">\n {resource.preview.status === \"ready\" ? preview : null}\n {resource.preview.status === \"none\" ? <Text tone=\"muted\" style={{ textAlign: \"center\" }}>{labels.previewUnavailable}</Text> : null}\n {resource.preview.status === \"loading\" ? <Text role=\"status\" style={{ textAlign: \"center\" }}>{labels.previewLoading}</Text> : null}\n {previewFailed ? <Text tone=\"danger\" role=\"alert\" style={{ textAlign: \"center\" }}>{resource.preview.status === \"error\" ? resource.preview.message : \"\"}</Text> : null}\n {/* Independent buttons prevent preview navigation from swallowing save/menu interaction. */}\n <Stack gap=\"xs\">{props.onPreview ? <Button ref={previewButton} tone=\"secondary\" disabled={!resource.canPreview} onClick={props.onPreview}>{labels.preview}</Button> : null}\n {previewFailed && resource.preview.retryable ? <Button ref={attachRetry} tone=\"secondary\" disabled={!resource.canRetryPreview} onClick={props.onRetryPreview}>{labels.retryPreview}</Button> : null}</Stack>\n </Stack> : null}\n <Stack gap=\"sm\" justify=\"center\">\n <Button ref={saveButton} disabled={saveFailed ? !resource.canRetrySave : !resource.canSave}\n loading={resource.save.status === \"pending\"}\n onClick={saveFailed ? props.onRetrySave : props.onSave}>\n {saveFailed ? labels.retrySave : resource.save.status === \"pending\" ? labels.saving : labels.save}\n </Button>\n {saveFailed ? <Text tone=\"danger\" role=\"alert\" style={{ textAlign: \"center\" }}>{resource.save.status === \"error\" ? resource.save.message : \"\"}</Text> : null}\n {resource.save.status === \"started\" || resource.save.status === \"saved\" || resource.save.status === \"cancelled\"\n ? <Text role=\"status\" style={{ textAlign: \"center\" }}>{labels[resource.save.status]}</Text> : null}\n </Stack>\n {moreAction}\n </Stack>\n </Surface>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"initial-focus.d.ts","sourceRoot":"","sources":["../../src/internal/initial-focus.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6F,KAAK,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3K,OAAO,EAA0E,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/H,OAAO,EAAoC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF,KAAK,KAAK,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,OAAO,IAAI,WAAW,GAAG,IAAI,CAAC;IAAC,SAAS,IAAI,OAAO,C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AC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,uBAAuB,CAkG9M;AAED,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,uBAAuB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAEhH;AAED,iHAAiH;AACjH,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAGpG;AAED,8GAA8G;AAC9G,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,QAe5G;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAE7E"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import { resolveEntryFocus } from "@hjmds/design-contracts/screen-patterns";
3
4
  import { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"initial-focus.js","sourceRoot":"","sources":["../../src/internal/initial-focus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAiG,MAAM,yCAAyC,CAAC;AAC3K,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAkC,MAAM,OAAO,CAAC;AAC/H,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAoB,MAAM,aAAa,CAAC;AAOjF;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,aAAa,CAAkB,IAA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,EAAE,IAAI,YAAG,QAAQ,GAAgC,GAAoC,CAAC;AACnL,CAAC","sourcesContent":["import { resolveEntryFocus, type EntryFocusEvent, type EntryFocusPhase, type InitialFocusCandidate, type InitialFocusMode } from \"@hjmds/design-contracts/screen-patterns\";\nimport { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef, type ReactNode, type RefObject } from \"react\";\nimport { getTopModal, subscribeModalClose, type ActiveModal } from \"../modal.js\";\n\ntype Entry = { order: number; preference: boolean | undefined; element(): HTMLElement | null; focusable(): boolean };\ntype Registry = { nextOrder(): number; register(entry: Entry, mounted: boolean): () => void };\n/** The overlay's own entry on the shared modal stack while it is active (set by `useModalFocus`). */\nexport type ModalLayerRef = { current: ActiveModal | null };\n\n/**\n * Nearest screen/overlay scope that chooses the field focused on entry (rules: screen-patterns `resolveEntryFocus`,\n * shared with Native). Fields register by context, the same model as Native, instead of the scope querying the DOM; a\n * scope with mode \"none\" still owns its fields so they never reach an outer scope.\n */\nconst InitialFocusContext = createContext<Registry | null>(null);\n// A bottom sheet owns this boundary, including ScreenLayout/marked fields nested inside its body.\nconst EntryFocusEnabledContext = createContext(true);\n/** Layer of the enclosing HJM overlay; null on the page itself. A ScreenLayout inside a sheet uses the sheet's. */\nconst ModalLayerContext = createContext<ModalLayerRef | null>(null);\n\ntype NestedScope = { enter(): HTMLElement | null; settle(): void };\n/**\n * Screen scopes rendered inside an HJM overlay, keyed by that overlay's layer. Their fields register with the screen,\n * not the overlay, so the overlay's activation asks them for the entry field instead of focusing its first control\n * over them (BurnTok search: a ScreenLayout in a Sheet left focus on the close button, 2026-10-18).\n */\nconst nestedScopes = new WeakMap<ModalLayerRef, Set<NestedScope>>();\n\n/**\n * Product modals (not on the HJM stack) layered above the scope. A product modal that contains the scope's own fields\n * wraps the screen rather than covering it, so it does not block (BurnTok search overlay, 2026-10-18).\n */\nfunction productModalAbove(fields: readonly HTMLElement[]): boolean {\n return [...document.querySelectorAll('[aria-modal=\"true\"], dialog[open]')]\n .some(modal => !fields.some(field => modal.contains(field)));\n}\n\nfunction isEditable(element: Element | null): boolean {\n return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement\n || (element instanceof HTMLElement && element.isContentEditable);\n}\n\ntype Candidate = InitialFocusCandidate & { entry: Entry };\nexport type InitialFocusScopeHandle = Readonly<{\n registry: Registry;\n layer: ModalLayerRef | null;\n enabled: boolean;\n /**\n * Overlays only: runs entry when the modal activates and returns the field for `useModalFocus` to focus. `explicit`\n * means the overlay already has an `initialFocusRef`, so entry settles without choosing a field.\n */\n enter(explicit: boolean): HTMLElement | null;\n}>;\n\n/**\n * Screen scopes enter on mount (Web has no enter transition to wait for); overlays pass `layer` and enter through\n * `useModalFocus`. User pointer, key, wheel or touch input while no modal is above the scope ends the entry window.\n */\nexport function useInitialFocusScope({ mode, active = true, layer: ownLayer, enabled = true }: { mode: InitialFocusMode; active?: boolean; layer?: ModalLayerRef; enabled?: boolean }): InitialFocusScopeHandle {\n const inherited = useContext(ModalLayerContext);\n const inheritedEnabled = useContext(EntryFocusEnabledContext);\n // A separate overlay owns its policy; ordinary nested screens inherit their enclosing sheet's policy.\n const entryFocusEnabled = enabled && (ownLayer !== undefined || inheritedEnabled);\n const enabledRef = useRef(entryFocusEnabled); enabledRef.current = entryFocusEnabled;\n const layer = ownLayer ?? inherited;\n const overlay = ownLayer !== undefined;\n const modeRef = useRef(mode); modeRef.current = mode;\n const state = useRef({ phase: \"inactive\" as EntryFocusPhase, entries: new Set<Entry>(), fresh: new Set<Entry>(), counter: 0, flushQueued: false });\n\n const scope = useMemo(() => {\n const s = state.current;\n const blocked = () => {\n const own = layer?.current ?? null;\n // Inside an HJM overlay that is not on the stack yet: its activation runs this scope's entry (`nestedScopes`).\n if (layer !== null && own === null) return true;\n const top = getTopModal();\n if (top) return top !== own;\n // A product's own modal above the page still covers it; overlay content is portaled outside product markup.\n if (layer !== null) return false;\n const fields = [...s.entries].map(entry => entry.element()).filter((element): element is HTMLElement => element !== null);\n return productModalAbove(fields);\n };\n const dispatch = (event: EntryFocusEvent<Candidate> | { kind: \"register\"; entry: Entry }): HTMLElement | null => {\n if (!enabledRef.current) return null;\n const candidates: Candidate[] = [...s.entries].map(entry => ({ entry, order: entry.order, preference: entry.preference, focusable: entry.focusable() }));\n const resolved = event.kind === \"register\" && \"entry\" in event\n ? { kind: \"register\" as const, field: candidates.find(candidate => candidate.entry === event.entry)! }\n : event as EntryFocusEvent<Candidate>;\n const result = resolveEntryFocus(s.phase, resolved, { mode: modeRef.current, candidates, blocked: blocked(), textEntryFocused: isEditable(document.activeElement) });\n s.phase = result.phase;\n return result.target?.entry.element() ?? null;\n };\n const focus = (target: HTMLElement | null) => target?.focus({ preventScroll: true });\n // Fields mounting in one commit are judged together.\n const flush = () => {\n s.flushQueued = false;\n const fresh = [...s.fresh].filter(entry => s.entries.has(entry)).sort((a, b) => a.order - b.order);\n s.fresh.clear();\n const field = fresh.find(entry => entry.preference === true) ?? fresh[0];\n if (field) focus(dispatch({ kind: \"register\", entry: field }));\n };\n const registry: Registry = {\n nextOrder: () => s.counter++,\n register(entry, mounted) {\n s.entries.add(entry);\n if (mounted) { s.fresh.add(entry); if (!s.flushQueued) { s.flushQueued = true; queueMicrotask(flush); } }\n return () => { s.entries.delete(entry); s.fresh.delete(entry); };\n },\n };\n const settle = () => { s.phase = \"settled\"; };\n const enter = (explicit: boolean) => {\n s.fresh.clear();\n const nested = overlay && layer ? [...(nestedScopes.get(layer) ?? [])] : [];\n if (explicit) { settle(); for (const scope of nested) scope.settle(); return null; }\n // A user can open a menu before the deferred entry runs. Never reset their settled entry window.\n if (s.phase === \"settled\") return null;\n if (s.phase === \"inactive\") dispatch({ kind: \"activate\" });\n const own = dispatch({ kind: s.phase === \"open\" ? \"unblock\" : \"enter\" });\n if (own) return own;\n for (const scope of nested) { const target = scope.enter(); if (target) return target; }\n return null;\n };\n return { registry, layer, dispatch, focus, enter, settle };\n }, [layer, overlay]);\n\n useEffect(() => {\n if (!active) { scope.dispatch({ kind: \"deactivate\" }); return undefined; }\n // Observe interaction immediately; deferring activation too would lose a click before the entry microtask.\n scope.dispatch({ kind: \"activate\" });\n // After every effect of this commit, so a modal opening in the same commit (an app-root consent dialog) is\n // already on the stack and blocks entry instead of taking focus away and handing it back later.\n let cancelled = false;\n if (!overlay) queueMicrotask(() => { if (!cancelled) scope.focus(scope.enter(false)); });\n // A screen inside an overlay that activates later enters when the overlay does (see `enter`).\n let nested: Set<NestedScope> | undefined;\n const nestedEntry: NestedScope = { enter: () => scope.enter(false), settle: scope.settle };\n if (!overlay && scope.layer) {\n nested = nestedScopes.get(scope.layer) ?? new Set();\n nestedScopes.set(scope.layer, nested);\n nested.add(nestedEntry);\n }\n const interact = () => { scope.dispatch({ kind: \"interact\" }); };\n const events = [\"pointerdown\", \"click\", \"contextmenu\", \"keydown\", \"wheel\", \"touchstart\"] as const;\n for (const type of events) document.addEventListener(type, interact, true);\n // A modal above closed (after its return focus ran): retry a pending entry.\n const unsubscribe = subscribeModalClose(() => scope.focus(scope.dispatch({ kind: \"unblock\" })));\n return () => {\n cancelled = true;\n nested?.delete(nestedEntry);\n for (const type of events) document.removeEventListener(type, interact, true);\n unsubscribe();\n scope.dispatch({ kind: \"deactivate\" });\n };\n }, [active, overlay, scope, entryFocusEnabled]);\n\n return useMemo(() => ({ registry: scope.registry, layer: scope.layer, enter: scope.enter, enabled: entryFocusEnabled }), [scope, entryFocusEnabled]);\n}\n\nexport function InitialFocusProvider({ scope, children }: { scope: InitialFocusScopeHandle; children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={scope.enabled}><ModalLayerContext.Provider value={scope.layer}><InitialFocusContext.Provider value={scope.registry}>{children}</InitialFocusContext.Provider></ModalLayerContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n\n/** Screen scope: focuses the chosen field on mount, never over a field the user is in or under an open modal. */\nexport function InitialFocusScope({ mode, children }: { mode: InitialFocusMode; children: ReactNode }) {\n const scope = useInitialFocusScope({ mode });\n return <InitialFocusProvider scope={scope}>{children}</InitialFocusProvider>;\n}\n\n/** Registers a text field with the nearest scope. `preference` is the field's public `initialFocusTarget`. */\nexport function useInitialFocusTarget(element: RefObject<HTMLElement | null>, preference: boolean | undefined) {\n const registry = useContext(InitialFocusContext);\n // Tree order is fixed at first registration, so changing `preference` later does not move the field to the end.\n const order = useRef<number | null>(null);\n useLayoutEffect(() => {\n if (!registry) return undefined;\n // Only the first registration of this field instance counts as \"appeared\"; a later `preference` change does not.\n const mounted = order.current === null;\n order.current ??= registry.nextOrder();\n return registry.register({\n order: order.current, preference, element: () => element.current,\n // Disabled and read-only fields are never focused on entry.\n focusable: () => { const node = element.current as (HTMLInputElement | HTMLTextAreaElement | null); return !!node && !node.disabled && !node.readOnly; },\n }, mounted);\n }, [registry, preference, element]);\n}\n\n/** Page footer inputs are bottom-anchored, so entry must not open their keyboard (2026-10-18 user request).\n * Keep the boundary through nested screens; a separately opened overlay owns its own focus policy.\n */\nexport function BottomEntryFocusBoundary({ children }: { children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={false}><InitialFocusContext.Provider value={null}>{children}</InitialFocusContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n"]}
1
+ {"version":3,"file":"initial-focus.js","sourceRoot":"","sources":["../../src/internal/initial-focus.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,iBAAiB,EAAiG,MAAM,yCAAyC,CAAC;AAC3K,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAkC,MAAM,OAAO,CAAC;AAC/H,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAoB,MAAM,aAAa,CAAC;AAOjF;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,aAAa,CAAkB,IAAI,CAAC,CAAC;AACjE,kGAAkG;AAClG,MAAM,wBAAwB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;AACrD,mHAAmH;AAC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ocusEvent, type EntryFocusPhase, type InitialFocusCandidate, type InitialFocusMode } from \"@hjmds/design-contracts/screen-patterns\";\nimport { createContext, useContext, useEffect, useLayoutEffect, useMemo, useRef, type ReactNode, type RefObject } from \"react\";\nimport { getTopModal, subscribeModalClose, type ActiveModal } from \"../modal.js\";\n\ntype Entry = { order: number; preference: boolean | undefined; element(): HTMLElement | null; focusable(): boolean };\ntype Registry = { nextOrder(): number; register(entry: Entry, mounted: boolean): () => void };\n/** The overlay's own entry on the shared modal stack while it is active (set by `useModalFocus`). */\nexport type ModalLayerRef = { current: ActiveModal | null };\n\n/**\n * Nearest screen/overlay scope that chooses the field focused on entry (rules: screen-patterns `resolveEntryFocus`,\n * shared with Native). Fields register by context, the same model as Native, instead of the scope querying the DOM; a\n * scope with mode \"none\" still owns its fields so they never reach an outer scope.\n */\nconst InitialFocusContext = createContext<Registry | null>(null);\n// A bottom sheet owns this boundary, including ScreenLayout/marked fields nested inside its body.\nconst EntryFocusEnabledContext = createContext(true);\n/** Layer of the enclosing HJM overlay; null on the page itself. A ScreenLayout inside a sheet uses the sheet's. */\nconst ModalLayerContext = createContext<ModalLayerRef | null>(null);\n\ntype NestedScope = { enter(): HTMLElement | null; settle(): void };\n/**\n * Screen scopes rendered inside an HJM overlay, keyed by that overlay's layer. Their fields register with the screen,\n * not the overlay, so the overlay's activation asks them for the entry field instead of focusing its first control\n * over them (BurnTok search: a ScreenLayout in a Sheet left focus on the close button, 2026-10-18).\n */\nconst nestedScopes = new WeakMap<ModalLayerRef, Set<NestedScope>>();\n\n/**\n * Product modals (not on the HJM stack) layered above the scope. A product modal that contains the scope's own fields\n * wraps the screen rather than covering it, so it does not block (BurnTok search overlay, 2026-10-18).\n */\nfunction productModalAbove(fields: readonly HTMLElement[]): boolean {\n return [...document.querySelectorAll('[aria-modal=\"true\"], dialog[open]')]\n .some(modal => !fields.some(field => modal.contains(field)));\n}\n\nfunction isEditable(element: Element | null): boolean {\n return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement\n || (element instanceof HTMLElement && element.isContentEditable);\n}\n\ntype Candidate = InitialFocusCandidate & { entry: Entry };\nexport type InitialFocusScopeHandle = Readonly<{\n registry: Registry;\n layer: ModalLayerRef | null;\n enabled: boolean;\n /**\n * Overlays only: runs entry when the modal activates and returns the field for `useModalFocus` to focus. `explicit`\n * means the overlay already has an `initialFocusRef`, so entry settles without choosing a field.\n */\n enter(explicit: boolean): HTMLElement | null;\n}>;\n\n/**\n * Screen scopes enter on mount (Web has no enter transition to wait for); overlays pass `layer` and enter through\n * `useModalFocus`. User pointer, key, wheel or touch input while no modal is above the scope ends the entry window.\n */\nexport function useInitialFocusScope({ mode, active = true, layer: ownLayer, enabled = true }: { mode: InitialFocusMode; active?: boolean; layer?: ModalLayerRef; enabled?: boolean }): InitialFocusScopeHandle {\n const inherited = useContext(ModalLayerContext);\n const inheritedEnabled = useContext(EntryFocusEnabledContext);\n // A separate overlay owns its policy; ordinary nested screens inherit their enclosing sheet's policy.\n const entryFocusEnabled = enabled && (ownLayer !== undefined || inheritedEnabled);\n const enabledRef = useRef(entryFocusEnabled); enabledRef.current = entryFocusEnabled;\n const layer = ownLayer ?? inherited;\n const overlay = ownLayer !== undefined;\n const modeRef = useRef(mode); modeRef.current = mode;\n const state = useRef({ phase: \"inactive\" as EntryFocusPhase, entries: new Set<Entry>(), fresh: new Set<Entry>(), counter: 0, flushQueued: false });\n\n const scope = useMemo(() => {\n const s = state.current;\n const blocked = () => {\n const own = layer?.current ?? null;\n // Inside an HJM overlay that is not on the stack yet: its activation runs this scope's entry (`nestedScopes`).\n if (layer !== null && own === null) return true;\n const top = getTopModal();\n if (top) return top !== own;\n // A product's own modal above the page still covers it; overlay content is portaled outside product markup.\n if (layer !== null) return false;\n const fields = [...s.entries].map(entry => entry.element()).filter((element): element is HTMLElement => element !== null);\n return productModalAbove(fields);\n };\n const dispatch = (event: EntryFocusEvent<Candidate> | { kind: \"register\"; entry: Entry }): HTMLElement | null => {\n if (!enabledRef.current) return null;\n const candidates: Candidate[] = [...s.entries].map(entry => ({ entry, order: entry.order, preference: entry.preference, focusable: entry.focusable() }));\n const resolved = event.kind === \"register\" && \"entry\" in event\n ? { kind: \"register\" as const, field: candidates.find(candidate => candidate.entry === event.entry)! }\n : event as EntryFocusEvent<Candidate>;\n const result = resolveEntryFocus(s.phase, resolved, { mode: modeRef.current, candidates, blocked: blocked(), textEntryFocused: isEditable(document.activeElement) });\n s.phase = result.phase;\n return result.target?.entry.element() ?? null;\n };\n const focus = (target: HTMLElement | null) => target?.focus({ preventScroll: true });\n // Fields mounting in one commit are judged together.\n const flush = () => {\n s.flushQueued = false;\n const fresh = [...s.fresh].filter(entry => s.entries.has(entry)).sort((a, b) => a.order - b.order);\n s.fresh.clear();\n const field = fresh.find(entry => entry.preference === true) ?? fresh[0];\n if (field) focus(dispatch({ kind: \"register\", entry: field }));\n };\n const registry: Registry = {\n nextOrder: () => s.counter++,\n register(entry, mounted) {\n s.entries.add(entry);\n if (mounted) { s.fresh.add(entry); if (!s.flushQueued) { s.flushQueued = true; queueMicrotask(flush); } }\n return () => { s.entries.delete(entry); s.fresh.delete(entry); };\n },\n };\n const settle = () => { s.phase = \"settled\"; };\n const enter = (explicit: boolean) => {\n s.fresh.clear();\n const nested = overlay && layer ? [...(nestedScopes.get(layer) ?? [])] : [];\n if (explicit) { settle(); for (const scope of nested) scope.settle(); return null; }\n // A user can open a menu before the deferred entry runs. Never reset their settled entry window.\n if (s.phase === \"settled\") return null;\n if (s.phase === \"inactive\") dispatch({ kind: \"activate\" });\n const own = dispatch({ kind: s.phase === \"open\" ? \"unblock\" : \"enter\" });\n if (own) return own;\n for (const scope of nested) { const target = scope.enter(); if (target) return target; }\n return null;\n };\n return { registry, layer, dispatch, focus, enter, settle };\n }, [layer, overlay]);\n\n useEffect(() => {\n if (!active) { scope.dispatch({ kind: \"deactivate\" }); return undefined; }\n // Observe interaction immediately; deferring activation too would lose a click before the entry microtask.\n scope.dispatch({ kind: \"activate\" });\n // After every effect of this commit, so a modal opening in the same commit (an app-root consent dialog) is\n // already on the stack and blocks entry instead of taking focus away and handing it back later.\n let cancelled = false;\n if (!overlay) queueMicrotask(() => { if (!cancelled) scope.focus(scope.enter(false)); });\n // A screen inside an overlay that activates later enters when the overlay does (see `enter`).\n let nested: Set<NestedScope> | undefined;\n const nestedEntry: NestedScope = { enter: () => scope.enter(false), settle: scope.settle };\n if (!overlay && scope.layer) {\n nested = nestedScopes.get(scope.layer) ?? new Set();\n nestedScopes.set(scope.layer, nested);\n nested.add(nestedEntry);\n }\n const interact = () => { scope.dispatch({ kind: \"interact\" }); };\n const events = [\"pointerdown\", \"click\", \"contextmenu\", \"keydown\", \"wheel\", \"touchstart\"] as const;\n for (const type of events) document.addEventListener(type, interact, true);\n // A modal above closed (after its return focus ran): retry a pending entry.\n const unsubscribe = subscribeModalClose(() => scope.focus(scope.dispatch({ kind: \"unblock\" })));\n return () => {\n cancelled = true;\n nested?.delete(nestedEntry);\n for (const type of events) document.removeEventListener(type, interact, true);\n unsubscribe();\n scope.dispatch({ kind: \"deactivate\" });\n };\n }, [active, overlay, scope, entryFocusEnabled]);\n\n return useMemo(() => ({ registry: scope.registry, layer: scope.layer, enter: scope.enter, enabled: entryFocusEnabled }), [scope, entryFocusEnabled]);\n}\n\nexport function InitialFocusProvider({ scope, children }: { scope: InitialFocusScopeHandle; children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={scope.enabled}><ModalLayerContext.Provider value={scope.layer}><InitialFocusContext.Provider value={scope.registry}>{children}</InitialFocusContext.Provider></ModalLayerContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n\n/** Screen scope: focuses the chosen field on mount, never over a field the user is in or under an open modal. */\nexport function InitialFocusScope({ mode, children }: { mode: InitialFocusMode; children: ReactNode }) {\n const scope = useInitialFocusScope({ mode });\n return <InitialFocusProvider scope={scope}>{children}</InitialFocusProvider>;\n}\n\n/** Registers a text field with the nearest scope. `preference` is the field's public `initialFocusTarget`. */\nexport function useInitialFocusTarget(element: RefObject<HTMLElement | null>, preference: boolean | undefined) {\n const registry = useContext(InitialFocusContext);\n // Tree order is fixed at first registration, so changing `preference` later does not move the field to the end.\n const order = useRef<number | null>(null);\n useLayoutEffect(() => {\n if (!registry) return undefined;\n // Only the first registration of this field instance counts as \"appeared\"; a later `preference` change does not.\n const mounted = order.current === null;\n order.current ??= registry.nextOrder();\n return registry.register({\n order: order.current, preference, element: () => element.current,\n // Disabled and read-only fields are never focused on entry.\n focusable: () => { const node = element.current as (HTMLInputElement | HTMLTextAreaElement | null); return !!node && !node.disabled && !node.readOnly; },\n }, mounted);\n }, [registry, preference, element]);\n}\n\n/** Page footer inputs are bottom-anchored, so entry must not open their keyboard (2026-10-18 user request).\n * Keep the boundary through nested screens; a separately opened overlay owns its own focus policy.\n */\nexport function BottomEntryFocusBoundary({ children }: { children: ReactNode }) {\n return <EntryFocusEnabledContext.Provider value={false}><InitialFocusContext.Provider value={null}>{children}</InitialFocusContext.Provider></EntryFocusEnabledContext.Provider>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"media-album.d.ts","sourceRoot":"","sources":["../../src/internal/media-album.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4E,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOjH,KAAK,cAAc,GAAG,QAAQ,CAAC;IAC7B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,gEAAgE;IAChE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAChD,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,I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EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,CAS5G;AAKD,MAAM,MAAM,yBAAyB,GACjC,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,CAAC,CAAC,+DAA+D;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC5G,QAAQ,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC,CAAC,mDAAmD;IAAC,KAAK,EAAE,MAAM,CAAC;IAC1F,4DAA4D,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,IAAI,IAAI,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAE3H;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,+BAYpE;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,QAAQ,CAAC;IACjG,KAAK,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrE,+GAA+G;IAC/G,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnD,CAAC,+BAuBD"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { createContext, useContext, useLayoutEffect, useState } from "react";
3
4
  import { mediaAlbumRecipe, resolveMediaAlbumIndex, validateMediaAlbum, validateMediaAlbumPageStatus } from "@hjmds/design-contracts/screen-patterns";
@@ -1 +1 @@
1
- {"version":3,"file":"media-album.js","sourceRoot":"","sources":["../../src/internal/media-album.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,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KAAK,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,IAChI,EACL,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,eAAK,SAAS,EAAC,2BAA2B,aAE3D,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,gBAAgB,CAAC,WAAW,EAAE,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,GAAG,GAAa,EAC/M,MAAC,IAAI,IAAC,OAAO,EAAC,SAAS,eAAW,QAAQ,aAAE,KAAK,GAAG,CAAC,OAAG,KAAK,CAAC,KAAK,IAAQ,EAC3E,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,gBAAgB,CAAC,WAAW,EAAE,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAE,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,GAAa,IACjN,CAAC,CAAC,CAAC,IAAI,IACT,CAAC;AACT,CAAC","sourcesContent":["import { createContext, useContext, useLayoutEffect, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { mediaAlbumRecipe, resolveMediaAlbumIndex, validateMediaAlbum, validateMediaAlbumPageStatus } from \"@hjmds/design-contracts/screen-patterns\";\nimport { Button, IconButton } from \"../actions.js\";\nimport { Text } from \"../layout.js\";\nimport { Icon } from \"../supplemental-display.js\";\nimport { Spinner } from \"./spinner.js\";\n\ntype MediaAlbumBase = Readonly<{\n /** Number of photos in the set; at least one. */\n count: number;\n /**\n * Draws one page. HJM calls it only for the page on screen, so the product can fetch, authorize and decode that\n * photo alone instead of mounting every image in the set.\n */\n renderPage(index: number): ReactNode;\n /** Localized accessible name of a page, e.g. \"Photo 2 of 5\". */\n pageLabel(index: number, count: number): string;\n /** Localized accessible names of the previous/next icon buttons. */\n previousLabel: string;\n nextLabel: string;\n /** Page frame width / height. Defaults to `mediaAlbumRecipe.defaultAspectRatio` (square). */\n aspectRatio?: number;\n /**\n * Opens the shown page (viewer); without it the page is a static image. While the page renders a\n * `MediaAlbumPageStatus` it is not an image yet, so it does not open.\n */\n onPress?(index: number): void;\n}>;\n\n/**\n * Paged photo set (2026-10-18). Products own image sources, authorization and the viewer; HJM owns the frame,\n * the counter row and which page is mounted. Controlled with `index` + `onIndexChange`, or uncontrolled from\n * `defaultIndex`.\n */\nexport type MediaAlbum = MediaAlbumBase & (\n | Readonly<{ index: number; onIndexChange(index: number): void; defaultIndex?: never }>\n | Readonly<{ index?: never; defaultIndex?: number; onIndexChange?(index: number): void }>\n);\n\n/**\n * Hosts keep the page state so every copy of the album they render (the message and its hold-menu preview) shows\n * the same page. Called unconditionally; `album` may be absent.\n */\nexport function useMediaAlbumIndex(album: MediaAlbum | undefined): readonly [number, (index: number) => void] {\n const [own, setOwn] = useState(album?.defaultIndex ?? 0);\n if (!album) return [0, setOwn];\n if (album.index !== undefined) {\n validateMediaAlbum(album.count, album.index);\n return [album.index, album.onIndexChange];\n }\n const current = resolveMediaAlbumIndex(album.count, own);\n return [current, (next: number) => { setOwn(next); album.onIndexChange?.(next); }];\n}\n\n/** Lets a page's status tell its frame that the page is not an image yet. */\nconst MediaAlbumPageContext = createContext<((shown: boolean) => void) | null>(null);\n\nexport type MediaAlbumPageStatusProps =\n | Readonly<{ kind: \"loading\"; /** Localized name of what is loading, e.g. \"Loading photo\". */ label: string }>\n | Readonly<{ kind: \"error\"; /** Localized failure text, shown and announced. */ label: string;\n /** Retry button; label and action come from the product. */ retry?: Readonly<{ label: string; onPress(): void }> }>;\n\n/**\n * Loading or failed page of a `mediaAlbum` (2026-10-18 Utilverse). Return it from `renderPage` (or the component it\n * renders) while the photo is not available. While it is shown the frame drops its image name and open action, so\n * the spinner's name, the failure text and the retry button are reachable by screen readers and pointer instead of\n * being swallowed by one accessible image. Centered in the frame (VQ-09).\n */\nexport function MediaAlbumPageStatus(props: MediaAlbumPageStatusProps) {\n validateMediaAlbumPageStatus(props.kind, props.label);\n const report = useContext(MediaAlbumPageContext);\n // Layout effect: the frame switches its semantics before the browser paints, so the status never shows inside\n // an image or button for a frame.\n useLayoutEffect(() => { report?.(true); return () => report?.(false); }, [report]);\n const s = mediaAlbumRecipe.pageStatus;\n return <div className=\"hjm-media-album__status\" style={{ gap: s.gap, padding: s.padding }}>\n {props.kind === \"loading\" ? <Spinner label={props.label} />\n : <><Text as=\"p\" role=\"alert\" variant={s.textVariant} tone=\"muted\">{props.label}</Text>\n {props.retry ? <Button type=\"button\" tone={s.retryTone} size={s.retrySize} onClick={props.retry.onPress}>{props.retry.label}</Button> : null}</>}\n </div>;\n}\n\nexport function MediaAlbumView({ album, index, onIndexChange, width, radius, className }: Readonly<{\n album: MediaAlbum; index: number; onIndexChange(index: number): void;\n /** Host media width (chat `mediaWidth`, comment `mediaMaxWidth`); the album never grows past its container. */\n width: number; radius: number; className?: string;\n}>) {\n validateMediaAlbum(album.count, index);\n const [statusShown, setStatusShown] = useState(false);\n const label = album.pageLabel(index, album.count);\n const frame = { aspectRatio: album.aspectRatio ?? mediaAlbumRecipe.defaultAspectRatio, borderRadius: radius } as CSSProperties;\n const page = album.renderPage(index);\n const opens = album.onPress !== undefined && !statusShown;\n // The frame element and the page wrapper stay the same elements in every state, so the product's page (which owns\n // the fetch) is never remounted when its status comes and goes. Only roles and the open overlay change.\n return <div className={[\"hjm-media-album\", className].filter(Boolean).join(\" \")} style={{ inlineSize: width, gap: mediaAlbumRecipe.controlGap }}>\n <div className=\"hjm-media-album__page\" style={frame} role={statusShown || album.onPress ? undefined : \"img\"} aria-label={statusShown || album.onPress ? undefined : label}>\n <div className=\"hjm-media-album__content\" aria-hidden={opens || undefined}>\n <MediaAlbumPageContext.Provider value={setStatusShown}>{page}</MediaAlbumPageContext.Provider>\n </div>\n {opens ? <button type=\"button\" className=\"hjm-media-album__open\" aria-label={label} onClick={() => album.onPress?.(index)} /> : null}\n </div>\n {album.count > 1 ? <div className=\"hjm-media-album__controls\">\n {/* Same counter presentation as CarouselMotion navigation=\"counter\"; logical chevrons mirror in RTL. */}\n <IconButton label={album.previousLabel} tone=\"ghost\" size={mediaAlbumRecipe.controlSize} edge=\"start\" disabled={index === 0} onClick={() => onIndexChange(index - 1)}><Icon name=\"chevronStart\" /></IconButton>\n <Text variant=\"caption\" aria-live=\"polite\">{index + 1}/{album.count}</Text>\n <IconButton label={album.nextLabel} tone=\"ghost\" size={mediaAlbumRecipe.controlSize} edge=\"end\" disabled={index === album.count - 1} onClick={() => onIndexChange(index + 1)}><Icon name=\"chevronEnd\" /></IconButton>\n </div> : null}\n </div>;\n}\n"]}
1
+ {"version":3,"file":"media-album.js","sourceRoot":"","sources":["../../src/internal/media-album.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AACrJ,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAkCvC;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA6B;IAC9D,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,G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AI,IAAC,OAAO,EAAC,SAAS,eAAW,QAAQ,aAAE,KAAK,GAAG,CAAC,OAAG,KAAK,CAAC,KAAK,IAAQ,EAC3E,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,gBAAgB,CAAC,WAAW,EAAE,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAE,KAAK,KAAK,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC,CAAC,YAAE,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,GAAa,IACjN,CAAC,CAAC,CAAC,IAAI,IACT,CAAC;AACT,CAAC","sourcesContent":["\"use client\";\n\nimport { createContext, useContext, useLayoutEffect, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { mediaAlbumRecipe, resolveMediaAlbumIndex, validateMediaAlbum, validateMediaAlbumPageStatus } from \"@hjmds/design-contracts/screen-patterns\";\nimport { Button, IconButton } from \"../actions.js\";\nimport { Text } from \"../layout.js\";\nimport { Icon } from \"../supplemental-display.js\";\nimport { Spinner } from \"./spinner.js\";\n\ntype MediaAlbumBase = Readonly<{\n /** Number of photos in the set; at least one. */\n count: number;\n /**\n * Draws one page. HJM calls it only for the page on screen, so the product can fetch, authorize and decode that\n * photo alone instead of mounting every image in the set.\n */\n renderPage(index: number): ReactNode;\n /** Localized accessible name of a page, e.g. \"Photo 2 of 5\". */\n pageLabel(index: number, count: number): string;\n /** Localized accessible names of the previous/next icon buttons. */\n previousLabel: string;\n nextLabel: string;\n /** Page frame width / height. Defaults to `mediaAlbumRecipe.defaultAspectRatio` (square). */\n aspectRatio?: number;\n /**\n * Opens the shown page (viewer); without it the page is a static image. While the page renders a\n * `MediaAlbumPageStatus` it is not an image yet, so it does not open.\n */\n onPress?(index: number): void;\n}>;\n\n/**\n * Paged photo set (2026-10-18). Products own image sources, authorization and the viewer; HJM owns the frame,\n * the counter row and which page is mounted. Controlled with `index` + `onIndexChange`, or uncontrolled from\n * `defaultIndex`.\n */\nexport type MediaAlbum = MediaAlbumBase & (\n | Readonly<{ index: number; onIndexChange(index: number): void; defaultIndex?: never }>\n | Readonly<{ index?: never; defaultIndex?: number; onIndexChange?(index: number): void }>\n);\n\n/**\n * Hosts keep the page state so every copy of the album they render (the message and its hold-menu preview) shows\n * the same page. Called unconditionally; `album` may be absent.\n */\nexport function useMediaAlbumIndex(album: MediaAlbum | undefined): readonly [number, (index: number) => void] {\n const [own, setOwn] = useState(album?.defaultIndex ?? 0);\n if (!album) return [0, setOwn];\n if (album.index !== undefined) {\n validateMediaAlbum(album.count, album.index);\n return [album.index, album.onIndexChange];\n }\n const current = resolveMediaAlbumIndex(album.count, own);\n return [current, (next: number) => { setOwn(next); album.onIndexChange?.(next); }];\n}\n\n/** Lets a page's status tell its frame that the page is not an image yet. */\nconst MediaAlbumPageContext = createContext<((shown: boolean) => void) | null>(null);\n\nexport type MediaAlbumPageStatusProps =\n | Readonly<{ kind: \"loading\"; /** Localized name of what is loading, e.g. \"Loading photo\". */ label: string }>\n | Readonly<{ kind: \"error\"; /** Localized failure text, shown and announced. */ label: string;\n /** Retry button; label and action come from the product. */ retry?: Readonly<{ label: string; onPress(): void }> }>;\n\n/**\n * Loading or failed page of a `mediaAlbum` (2026-10-18 Utilverse). Return it from `renderPage` (or the component it\n * renders) while the photo is not available. While it is shown the frame drops its image name and open action, so\n * the spinner's name, the failure text and the retry button are reachable by screen readers and pointer instead of\n * being swallowed by one accessible image. Centered in the frame (VQ-09).\n */\nexport function MediaAlbumPageStatus(props: MediaAlbumPageStatusProps) {\n validateMediaAlbumPageStatus(props.kind, props.label);\n const report = useContext(MediaAlbumPageContext);\n // Layout effect: the frame switches its semantics before the browser paints, so the status never shows inside\n // an image or button for a frame.\n useLayoutEffect(() => { report?.(true); return () => report?.(false); }, [report]);\n const s = mediaAlbumRecipe.pageStatus;\n return <div className=\"hjm-media-album__status\" style={{ gap: s.gap, padding: s.padding }}>\n {props.kind === \"loading\" ? <Spinner label={props.label} />\n : <><Text as=\"p\" role=\"alert\" variant={s.textVariant} tone=\"muted\">{props.label}</Text>\n {props.retry ? <Button type=\"button\" tone={s.retryTone} size={s.retrySize} onClick={props.retry.onPress}>{props.retry.label}</Button> : null}</>}\n </div>;\n}\n\nexport function MediaAlbumView({ album, index, onIndexChange, width, radius, className }: Readonly<{\n album: MediaAlbum; index: number; onIndexChange(index: number): void;\n /** Host media width (chat `mediaWidth`, comment `mediaMaxWidth`); the album never grows past its container. */\n width: number; radius: number; className?: string;\n}>) {\n validateMediaAlbum(album.count, index);\n const [statusShown, setStatusShown] = useState(false);\n const label = album.pageLabel(index, album.count);\n const frame = { aspectRatio: album.aspectRatio ?? mediaAlbumRecipe.defaultAspectRatio, borderRadius: radius } as CSSProperties;\n const page = album.renderPage(index);\n const opens = album.onPress !== undefined && !statusShown;\n // The frame element and the page wrapper stay the same elements in every state, so the product's page (which owns\n // the fetch) is never remounted when its status comes and goes. Only roles and the open overlay change.\n return <div className={[\"hjm-media-album\", className].filter(Boolean).join(\" \")} style={{ inlineSize: width, gap: mediaAlbumRecipe.controlGap }}>\n <div className=\"hjm-media-album__page\" style={frame} role={statusShown || album.onPress ? undefined : \"img\"} aria-label={statusShown || album.onPress ? undefined : label}>\n <div className=\"hjm-media-album__content\" aria-hidden={opens || undefined}>\n <MediaAlbumPageContext.Provider value={setStatusShown}>{page}</MediaAlbumPageContext.Provider>\n </div>\n {opens ? <button type=\"button\" className=\"hjm-media-album__open\" aria-label={label} onClick={() => album.onPress?.(index)} /> : null}\n </div>\n {album.count > 1 ? <div className=\"hjm-media-album__controls\">\n {/* Same counter presentation as CarouselMotion navigation=\"counter\"; logical chevrons mirror in RTL. */}\n <IconButton label={album.previousLabel} tone=\"ghost\" size={mediaAlbumRecipe.controlSize} edge=\"start\" disabled={index === 0} onClick={() => onIndexChange(index - 1)}><Icon name=\"chevronStart\" /></IconButton>\n <Text variant=\"caption\" aria-live=\"polite\">{index + 1}/{album.count}</Text>\n <IconButton label={album.nextLabel} tone=\"ghost\" size={mediaAlbumRecipe.controlSize} edge=\"end\" disabled={index === album.count - 1} onClick={() => onIndexChange(index + 1)}><Icon name=\"chevronEnd\" /></IconButton>\n </div> : null}\n </div>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"message-reactions.d.ts","sourceRoot":"","sources":["../../src/internal/message-reactions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACnG,OAAO,EAA0C,KAAK,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAC/H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,+FAA+F;AAC/F,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,IAAI,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,iDAAiD;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC/L,uGAAuG,CAAC,IAAI,CAAC,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AACjI,iFAAiF;AACjF,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAAE,IAAI,IAAI,IAAI,CAAA;CAAE,CAAC,CAAC;AAChE,KAAK,KAAK,GAAG,mBAAmB,GAAG,QAAQ,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAA,OAAO,IAAG,IAAI,CAAC;QAAA,QAAQ,CAAC,EAAC,OAAO,CAAA;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AAY,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,EAAE,KAAK,+BAwChO;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,QAAQ,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAEpI;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC,uBAAuB,GAAG,QAAQ,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,IAAI,IAAI,CAAA;CAAE,CAAC,+BAO5P;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC,uBAAuB,GAAG,QAAQ,CAAC;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,EAAE,CAAA;CAAE,CAAC,+BAMhK"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useEffect, useImperativeHandle, useRef, useState } from "react";
3
4
  import { chatMessageRecipe, screenPatternRecipe } from "@hjmds/design-contracts/screen-patterns";