themelia-react-ui 1.0.1 → 1.0.2

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 (488) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/README.md +59 -13
  3. package/dist/{accordion-B-5Focs8.js → accordion-BRTcsp8J.js} +8 -8
  4. package/dist/accordion-BRTcsp8J.js.map +1 -0
  5. package/dist/{action-menu-Cx3SdfbN.js → action-menu-Drxw_vJk.js} +36 -36
  6. package/dist/action-menu-Drxw_vJk.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CL84ZN9A.js +63 -0
  8. package/dist/affordance-geometry.generated-CL84ZN9A.js.map +1 -0
  9. package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-DLVdK0Py.js} +151 -155
  10. package/dist/ai-artifact-DLVdK0Py.js.map +1 -0
  11. package/dist/{app-shell-at8Kt4l_.js → app-shell-C_fKpljx.js} +11 -10
  12. package/dist/app-shell-C_fKpljx.js.map +1 -0
  13. package/dist/{attachment-BO2R47wn.js → attachment-DbjUWsP0.js} +12 -12
  14. package/dist/{attachment-BO2R47wn.js.map → attachment-DbjUWsP0.js.map} +1 -1
  15. package/dist/auth-CAQcasMV.js +723 -0
  16. package/dist/auth-CAQcasMV.js.map +1 -0
  17. package/dist/{avatar-Bpzty83c.js → avatar-Bu2HhitA.js} +6 -6
  18. package/dist/{avatar-Bpzty83c.js.map → avatar-Bu2HhitA.js.map} +1 -1
  19. package/dist/{badge-BZXZT9wd.js → badge-CzId1Wlm.js} +4 -4
  20. package/dist/{badge-BZXZT9wd.js.map → badge-CzId1Wlm.js.map} +1 -1
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +25 -27
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +150 -148
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  40. package/dist/base/feedback.js +4 -4
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +40 -43
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +1 -1
  51. package/dist/base/repeaters.js +33 -33
  52. package/dist/base/repeaters.js.map +1 -1
  53. package/dist/base/sheet.js +1 -1
  54. package/dist/base/sidebar.js +1 -1
  55. package/dist/base/signature-pad.js +83 -81
  56. package/dist/base/signature-pad.js.map +1 -1
  57. package/dist/base/skeleton.js +1 -1
  58. package/dist/base/spinner.js +1 -1
  59. package/dist/base/structure.js +1 -1
  60. package/dist/base/table.js +1 -1
  61. package/dist/base/text-inputs.js +2 -2
  62. package/dist/base/toaster.js +6 -6
  63. package/dist/base/toaster.js.map +1 -1
  64. package/dist/base/tree.js +1 -1
  65. package/dist/base/upload-queue.js +1 -1
  66. package/dist/base/upload.js +3 -3
  67. package/dist/base/value-inputs.js +1 -1
  68. package/dist/blocks/admin.js +134 -134
  69. package/dist/blocks/admin.js.map +1 -1
  70. package/dist/blocks/ai.js +120 -117
  71. package/dist/blocks/ai.js.map +1 -1
  72. package/dist/blocks/analytics/usage-card.js +1 -1
  73. package/dist/blocks/analytics.js +510 -472
  74. package/dist/blocks/analytics.js.map +1 -1
  75. package/dist/blocks/collaboration.js +2 -2
  76. package/dist/blocks/commerce/receipt.js +1 -1
  77. package/dist/blocks/commerce.js +395 -383
  78. package/dist/blocks/commerce.js.map +1 -1
  79. package/dist/blocks/data-display.js +1 -1
  80. package/dist/blocks/onboarding.js +6 -6
  81. package/dist/blocks/onboarding.js.map +1 -1
  82. package/dist/blocks/planning.js +36 -36
  83. package/dist/blocks/planning.js.map +1 -1
  84. package/dist/blocks/timelines.js +1 -1
  85. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BuYz5SDU.js} +9 -8
  86. package/dist/breadcrumbs-BuYz5SDU.js.map +1 -0
  87. package/dist/button-BZDasD04.js +651 -0
  88. package/dist/button-BZDasD04.js.map +1 -0
  89. package/dist/{button-BS6l5JUw.js → button-BZyfTvwm.js} +3 -3
  90. package/dist/button-BZyfTvwm.js.map +1 -0
  91. package/dist/buttons-D_6KJvEE.js +99 -0
  92. package/dist/buttons-D_6KJvEE.js.map +1 -0
  93. package/dist/{cards-Cum56XOF.js → cards-qGSErLw_.js} +12 -12
  94. package/dist/{cards-Cum56XOF.js.map → cards-qGSErLw_.js.map} +1 -1
  95. package/dist/chart-Bsc5BICK.js +150 -0
  96. package/dist/chart-Bsc5BICK.js.map +1 -0
  97. package/dist/{checkbox-BavDRjF7.js → checkbox-BQNDjUCh.js} +3 -3
  98. package/dist/checkbox-BQNDjUCh.js.map +1 -0
  99. package/dist/choice-inputs-Mk3iWbhr.js +725 -0
  100. package/dist/choice-inputs-Mk3iWbhr.js.map +1 -0
  101. package/dist/{code-block-xHKbAJDj.js → code-block-DzHKRybS.js} +23 -23
  102. package/dist/code-block-DzHKRybS.js.map +1 -0
  103. package/dist/{collapsible-DsnktFNv.js → collapsible-ClvC7Bj3.js} +3 -3
  104. package/dist/{collapsible-DsnktFNv.js.map → collapsible-ClvC7Bj3.js.map} +1 -1
  105. package/dist/{collection-content-C4fthJV_.js → collection-content-D6S8cv_n.js} +3 -3
  106. package/dist/{collection-content-C4fthJV_.js.map → collection-content-D6S8cv_n.js.map} +1 -1
  107. package/dist/{combobox-DEbdr-3u.js → combobox-BFnbJJp3.js} +18 -18
  108. package/dist/combobox-BFnbJJp3.js.map +1 -0
  109. package/dist/{combobox-xv3yJbzl.js → combobox-hozNwUcc.js} +313 -316
  110. package/dist/combobox-hozNwUcc.js.map +1 -0
  111. package/dist/{command-C0xe7u9B.js → command-BnmSchli.js} +9 -9
  112. package/dist/command-BnmSchli.js.map +1 -0
  113. package/dist/comments-u5L0OGip.js +1156 -0
  114. package/dist/comments-u5L0OGip.js.map +1 -0
  115. package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
  116. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  117. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  118. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  119. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  120. package/dist/components/base/cards/smart-card.types.d.ts +1 -1
  121. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  122. package/dist/components/base/date-pickers/datepicker.types.d.ts +3 -0
  123. package/dist/components/base/forms/form-field.d.ts +1 -0
  124. package/dist/components/base/forms/form-sizing.d.ts +3 -3
  125. package/dist/components/base/navigation/tabs.d.ts +3 -5
  126. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  127. package/dist/components/base/table/index.d.ts +1 -1
  128. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  129. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  130. package/dist/components/blocks/analytics/types.d.ts +1 -1
  131. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  132. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  133. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  134. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  135. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  136. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  137. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  138. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  139. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  140. package/dist/components/features/media-library/media-library.d.ts +1 -1
  141. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  142. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  143. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  144. package/dist/components/features/overlays/overlays.types.d.ts +5 -4
  145. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  146. package/dist/components/features/table/data-table.d.ts +1 -1
  147. package/dist/components/features/table/table.types.d.ts +1 -1
  148. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  149. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  150. package/dist/components/layout/page/page.d.ts +0 -1
  151. package/dist/components/layout/page/page.types.d.ts +9 -3
  152. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  153. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  154. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  155. package/dist/components/typography/heading.d.ts +5 -2
  156. package/dist/components/typography/index.d.ts +1 -1
  157. package/dist/components/typography/text.styles.d.ts +10 -0
  158. package/dist/components/ui/popover.d.ts +1 -1
  159. package/dist/components/ui/sidebar.d.ts +1 -1
  160. package/dist/components/ui/table.d.ts +2 -1
  161. package/dist/container.recipes-D9t8MHR3.js +27 -0
  162. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  163. package/dist/{containers-6s-ucRQQ.js → containers-DqB-bSYE.js} +33 -56
  164. package/dist/containers-DqB-bSYE.js.map +1 -0
  165. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  166. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  167. package/dist/{copyable-B7SBXJMr.js → copyable-BTSByfmq.js} +6 -6
  168. package/dist/{copyable-B7SBXJMr.js.map → copyable-BTSByfmq.js.map} +1 -1
  169. package/dist/{data-display-cWIRdeaf.js → data-display-Bihs9Ven.js} +545 -332
  170. package/dist/data-display-Bihs9Ven.js.map +1 -0
  171. package/dist/{date-BFNMnrS5.js → date-DOKhJPu7.js} +4 -4
  172. package/dist/{date-BFNMnrS5.js.map → date-DOKhJPu7.js.map} +1 -1
  173. package/dist/{date-picker-CA6ogMQB.js → date-picker-DzP5HQq7.js} +492 -472
  174. package/dist/date-picker-DzP5HQq7.js.map +1 -0
  175. package/dist/date-pickers-BpgGz7S-.js +196 -0
  176. package/dist/date-pickers-BpgGz7S-.js.map +1 -0
  177. package/dist/{display-CFM5myut.js → display-CS6Hbk18.js} +8 -8
  178. package/dist/{display-CFM5myut.js.map → display-CS6Hbk18.js.map} +1 -1
  179. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-D-boNgGO.js} +7 -7
  180. package/dist/{dropdown-menu-BlnyHr-9.js.map → dropdown-menu-D-boNgGO.js.map} +1 -1
  181. package/dist/features/activities.js +152 -141
  182. package/dist/features/activities.js.map +1 -1
  183. package/dist/features/ai-chat.js +182 -179
  184. package/dist/features/ai-chat.js.map +1 -1
  185. package/dist/features/async-preview.js +9 -9
  186. package/dist/features/async-preview.js.map +1 -1
  187. package/dist/features/combobox.js +1 -1
  188. package/dist/features/comments.js +1 -1
  189. package/dist/features/data-view.js +25 -23
  190. package/dist/features/data-view.js.map +1 -1
  191. package/dist/features/email-composer/engine.js +1 -1
  192. package/dist/features/email-composer.js +103 -104
  193. package/dist/features/email-composer.js.map +1 -1
  194. package/dist/features/event-calendar.js +375 -373
  195. package/dist/features/event-calendar.js.map +1 -1
  196. package/dist/features/filters.js +1 -1
  197. package/dist/features/global-search.js +222 -224
  198. package/dist/features/global-search.js.map +1 -1
  199. package/dist/features/kanban.js +29 -29
  200. package/dist/features/kanban.js.map +1 -1
  201. package/dist/features/map.js +59 -58
  202. package/dist/features/map.js.map +1 -1
  203. package/dist/features/media-library.js +856 -855
  204. package/dist/features/media-library.js.map +1 -1
  205. package/dist/features/mentions.js +1 -1
  206. package/dist/features/overlays.js +1 -1
  207. package/dist/features/products.js +1209 -1209
  208. package/dist/features/products.js.map +1 -1
  209. package/dist/features/questionnaire.js +52 -52
  210. package/dist/features/questionnaire.js.map +1 -1
  211. package/dist/features/resource-assignment.js +29 -31
  212. package/dist/features/resource-assignment.js.map +1 -1
  213. package/dist/features/resource.js +13 -13
  214. package/dist/features/resource.js.map +1 -1
  215. package/dist/features/rich-text-editor.js +2 -2
  216. package/dist/features/schema-form.js +82 -82
  217. package/dist/features/schema-form.js.map +1 -1
  218. package/dist/features/suggestions.js +3 -3
  219. package/dist/features/sync.js +4 -4
  220. package/dist/features/sync.js.map +1 -1
  221. package/dist/features/table.js +1 -1
  222. package/dist/features/theme-tweaker.js +456 -450
  223. package/dist/features/theme-tweaker.js.map +1 -1
  224. package/dist/{feedback-DWUkgEjR.js → feedback-CJkUAapr.js} +29 -29
  225. package/dist/feedback-CJkUAapr.js.map +1 -0
  226. package/dist/field-affordance-recipes-uKY4MsZ_.js +25 -0
  227. package/dist/field-affordance-recipes-uKY4MsZ_.js.map +1 -0
  228. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-DQQpiLWC.js} +3 -3
  229. package/dist/field-state-recipes-DQQpiLWC.js.map +1 -0
  230. package/dist/{filters-BhsUtsxW.js → filters-D6FF8L6s.js} +715 -720
  231. package/dist/filters-D6FF8L6s.js.map +1 -0
  232. package/dist/{form-field-Bn7ZH1rA.js → form-field-CZwrkP7m.js} +17 -9
  233. package/dist/form-field-CZwrkP7m.js.map +1 -0
  234. package/dist/{form-sizing-BWs70_a2.js → form-sizing-QP8aIRaW.js} +8 -5
  235. package/dist/form-sizing-QP8aIRaW.js.map +1 -0
  236. package/dist/{forms-B7pzS25o.js → forms-B5NCbkSC.js} +35 -35
  237. package/dist/{forms-B7pzS25o.js.map → forms-B5NCbkSC.js.map} +1 -1
  238. package/dist/forms-numeric-Crrm80Lm.js +867 -0
  239. package/dist/forms-numeric-Crrm80Lm.js.map +1 -0
  240. package/dist/{header-C59QZyxV.js → header-kxruN3RM.js} +53 -49
  241. package/dist/header-kxruN3RM.js.map +1 -0
  242. package/dist/{hooks-CM1Vp9Pe.js → hooks-BrlnCwQd.js} +2 -2
  243. package/dist/{hooks-CM1Vp9Pe.js.map → hooks-BrlnCwQd.js.map} +1 -1
  244. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  245. package/dist/http-CdEIHyQf.js.map +1 -0
  246. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-Btc6pQrp.js} +4 -4
  247. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-Btc6pQrp.js.map} +1 -1
  248. package/dist/index.js +2 -2
  249. package/dist/input-SX9V0AL3.js +255 -0
  250. package/dist/input-SX9V0AL3.js.map +1 -0
  251. package/dist/input-vxcaNCYC.js +20 -0
  252. package/dist/input-vxcaNCYC.js.map +1 -0
  253. package/dist/{item-pJ0GsOiJ.js → item-DE4YnuJx.js} +18 -17
  254. package/dist/item-DE4YnuJx.js.map +1 -0
  255. package/dist/layout/app-shell.js +1 -1
  256. package/dist/layout/auth.js +1 -1
  257. package/dist/layout/containers.js +1 -1
  258. package/dist/layout/header.js +1 -1
  259. package/dist/layout/hooks.js +1 -1
  260. package/dist/layout/navigation.js +1 -1
  261. package/dist/layout/page.js +1 -1
  262. package/dist/layout/settings.js +1 -1
  263. package/dist/layout/sidebar.js +2 -2
  264. package/dist/layout/workspace.js +1 -1
  265. package/dist/layout.js +10 -10
  266. package/dist/lib/affordance-geometry.generated.d.ts +40 -9
  267. package/dist/lib/control-group-recipes.d.ts +22 -0
  268. package/dist/lib/field-affordance-recipes.d.ts +35 -2
  269. package/dist/lib/field-state-recipes.d.ts +2 -2
  270. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  271. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
  272. package/dist/lib/surface-recipes.d.ts +5 -2
  273. package/dist/lib/token-merge.generated.d.ts +144 -2
  274. package/dist/lib/ui-provider/types.d.ts +4 -2
  275. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  276. package/dist/lib/utils.js +1 -1
  277. package/dist/{media-gallery-DhDRgnVZ.js → media-gallery-DLp3HAz0.js} +75 -74
  278. package/dist/media-gallery-DLp3HAz0.js.map +1 -0
  279. package/dist/{mentions-B8Ko-fhS.js → mentions-Cl0Kt_Pd.js} +52 -50
  280. package/dist/{mentions-B8Ko-fhS.js.map → mentions-Cl0Kt_Pd.js.map} +1 -1
  281. package/dist/message-SZUNB1eX.js +127 -0
  282. package/dist/message-SZUNB1eX.js.map +1 -0
  283. package/dist/{navigation-DBEu4POU.js → navigation-DnQSNMT0.js} +64 -55
  284. package/dist/navigation-DnQSNMT0.js.map +1 -0
  285. package/dist/{navigation-BUIn2Qxx.js → navigation-DyytsLRB.js} +37 -37
  286. package/dist/navigation-DyytsLRB.js.map +1 -0
  287. package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DQEXQcqY.js} +3 -3
  288. package/dist/navigation-row-recipes-DQEXQcqY.js.map +1 -0
  289. package/dist/{number-BNT_BIzJ.js → number-DasMFWEG.js} +4 -4
  290. package/dist/{number-BNT_BIzJ.js.map → number-DasMFWEG.js.map} +1 -1
  291. package/dist/overlays-DUbs1KEi.js +1011 -0
  292. package/dist/overlays-DUbs1KEi.js.map +1 -0
  293. package/dist/{page-BV6ioQg3.js → page-hGmT4nWK.js} +75 -64
  294. package/dist/page-hGmT4nWK.js.map +1 -0
  295. package/dist/{page-header-DQRa0jug.js → page-header-D8nERkn5.js} +9 -9
  296. package/dist/page-header-D8nERkn5.js.map +1 -0
  297. package/dist/{pagination-C29vvt3I.js → pagination-NLGqRirf.js} +20 -20
  298. package/dist/pagination-NLGqRirf.js.map +1 -0
  299. package/dist/{popover-CoLDEg19.js → popover-CghIYdQf.js} +23 -22
  300. package/dist/popover-CghIYdQf.js.map +1 -0
  301. package/dist/{popover-menu-GLIQTJTx.js → popover-menu-B4PoWhRl.js} +6 -6
  302. package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-B4PoWhRl.js.map} +1 -1
  303. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-QlD4JenO.js} +5 -5
  304. package/dist/popover.recipes-QlD4JenO.js.map +1 -0
  305. package/dist/{primitives-DKPOGVpj.js → primitives-C7ff0QaI.js} +120 -113
  306. package/dist/primitives-C7ff0QaI.js.map +1 -0
  307. package/dist/primitives.js +3 -3
  308. package/dist/{progress-BOe8l_FZ.js → progress-BroqrAyV.js} +10 -9
  309. package/dist/progress-BroqrAyV.js.map +1 -0
  310. package/dist/{receipt-BM8xsGFy.js → receipt-BuJynLgf.js} +8 -8
  311. package/dist/{receipt-BM8xsGFy.js.map → receipt-BuJynLgf.js.map} +1 -1
  312. package/dist/{rich-text-B7sBAdDG.js → rich-text-DlxDOtf4.js} +4 -4
  313. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-DlxDOtf4.js.map} +1 -1
  314. package/dist/rich-text-editor-BKyG7rWz.js +574 -0
  315. package/dist/rich-text-editor-BKyG7rWz.js.map +1 -0
  316. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-B72Nfuze.js} +35 -26
  317. package/dist/rich-text-editor.recipes-B72Nfuze.js.map +1 -0
  318. package/dist/{scroll-area-BheMQ270.js → scroll-area-D-pIhEKl.js} +3 -3
  319. package/dist/scroll-area-D-pIhEKl.js.map +1 -0
  320. package/dist/{separator-Gk_WXH-l.js → separator-BNIgG3au.js} +3 -3
  321. package/dist/{separator-Gk_WXH-l.js.map → separator-BNIgG3au.js.map} +1 -1
  322. package/dist/{separator-DO0EbCEm.js → separator-BhtFyo4x.js} +2 -2
  323. package/dist/{separator-DO0EbCEm.js.map → separator-BhtFyo4x.js.map} +1 -1
  324. package/dist/services/actions.js +1 -1
  325. package/dist/{settings-BnCyyPOJ.js → settings-DOTOzeZ2.js} +10 -9
  326. package/dist/{settings-BnCyyPOJ.js.map → settings-DOTOzeZ2.js.map} +1 -1
  327. package/dist/{sheet-B-q914Ad.js → sheet-BFhrNehm.js} +11 -11
  328. package/dist/sheet-BFhrNehm.js.map +1 -0
  329. package/dist/{sidebar-DPR7fmqN.js → sidebar-CyR4XKwR.js} +219 -200
  330. package/dist/sidebar-CyR4XKwR.js.map +1 -0
  331. package/dist/{sidebar-C_2p3Tfj.js → sidebar-SvGJ0Zwi.js} +63 -58
  332. package/dist/sidebar-SvGJ0Zwi.js.map +1 -0
  333. package/dist/{skeleton-CmT1ppqb.js → skeleton-3F0uhYn3.js} +4 -4
  334. package/dist/{skeleton-CmT1ppqb.js.map → skeleton-3F0uhYn3.js.map} +1 -1
  335. package/dist/{smart-card-CYLn46e6.js → smart-card-DjGVV2xr.js} +171 -165
  336. package/dist/smart-card-DjGVV2xr.js.map +1 -0
  337. package/dist/{spinner-BY9HbUEh.js → spinner-Cpf7oRkF.js} +5 -5
  338. package/dist/{spinner-BY9HbUEh.js.map → spinner-Cpf7oRkF.js.map} +1 -1
  339. package/dist/{structure-MvKVq-oL.js → structure-CRdqVawd.js} +2 -2
  340. package/dist/{structure-MvKVq-oL.js.map → structure-CRdqVawd.js.map} +1 -1
  341. package/dist/style.css +1 -1
  342. package/dist/{surface-recipes-CQfRr-VL.js → surface-recipes-Dd__PD-w.js} +4 -3
  343. package/dist/surface-recipes-Dd__PD-w.js.map +1 -0
  344. package/dist/{table-DnlAJ-xR.js → table-CLtJTxoR.js} +17 -16
  345. package/dist/table-CLtJTxoR.js.map +1 -0
  346. package/dist/table-CcRDZiLP.js +1444 -0
  347. package/dist/table-CcRDZiLP.js.map +1 -0
  348. package/dist/tabs-BNgu7g0u.js +188 -0
  349. package/dist/tabs-BNgu7g0u.js.map +1 -0
  350. package/dist/text-inputs-DsR56TR-.js +330 -0
  351. package/dist/text-inputs-DsR56TR-.js.map +1 -0
  352. package/dist/{text.styles-BwB7vAF2.js → text.styles-Q4sGAIgA.js} +18 -10
  353. package/dist/text.styles-Q4sGAIgA.js.map +1 -0
  354. package/dist/theme.css +77 -115
  355. package/dist/{timelines-B9ICkQcV.js → timelines-D1pkt3se.js} +84 -78
  356. package/dist/timelines-D1pkt3se.js.map +1 -0
  357. package/dist/{tree-BdWSaoFT.js → tree-BtmYyMZV.js} +8 -8
  358. package/dist/{tree-BdWSaoFT.js.map → tree-BtmYyMZV.js.map} +1 -1
  359. package/dist/typography/rich-text.js +1 -1
  360. package/dist/typography-BxQgiZyw.js +96 -0
  361. package/dist/typography-BxQgiZyw.js.map +1 -0
  362. package/dist/typography.js +1 -1
  363. package/dist/{ui-provider-CftIB6TY.js → ui-provider-DRPn3qNl.js} +3 -2
  364. package/dist/ui-provider-DRPn3qNl.js.map +1 -0
  365. package/dist/ui-provider.js +1 -1
  366. package/dist/{upload-D8Za5x_c.js → upload-CDbYw1WN.js} +326 -323
  367. package/dist/upload-CDbYw1WN.js.map +1 -0
  368. package/dist/{upload-queue-hIIYBLS7.js → upload-queue-CNd_hH_a.js} +25 -25
  369. package/dist/upload-queue-CNd_hH_a.js.map +1 -0
  370. package/dist/{usage-card-DnmnJ58D.js → usage-card-VyJLUwRr.js} +53 -54
  371. package/dist/usage-card-VyJLUwRr.js.map +1 -0
  372. package/dist/utils-BvH9PSmq.js +4275 -0
  373. package/dist/utils-BvH9PSmq.js.map +1 -0
  374. package/dist/value-inputs-D0KCrfVC.js +840 -0
  375. package/dist/value-inputs-D0KCrfVC.js.map +1 -0
  376. package/dist/{workspace-C1PZmk8L.js → workspace-CcR8r-Nt.js} +115 -122
  377. package/dist/workspace-CcR8r-Nt.js.map +1 -0
  378. package/docs/consumer-skill/SKILL.md +110 -119
  379. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  380. package/docs/consumer-skill/examples/app-layout.tsx +42 -12
  381. package/docs/consumer-skill/examples/detail.tsx +20 -4
  382. package/docs/consumer-skill/examples/manifest.json +13 -1
  383. package/docs/consumer-skill/examples/website.tsx +56 -0
  384. package/docs/consumer-skill/references/analytics.md +70 -0
  385. package/docs/consumer-skill/references/composition.md +116 -2
  386. package/docs/consumer-skill/references/design-contract.md +33 -7
  387. package/docs/consumer-skill/references/discovery.md +76 -5
  388. package/docs/consumer-skill/references/integration.md +14 -0
  389. package/docs/consumer-skill/references/public-api.json +2023 -218
  390. package/docs/consumer-skill/references/review.md +55 -3
  391. package/docs/consumer-skill/references/theming.md +52 -7
  392. package/docs/consumer-skill/references/tokens.json +177 -9
  393. package/docs/consumer-skill/references/workflows.md +32 -0
  394. package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
  395. package/docs/consumer-skill/scripts/composition-policy.mjs +179 -17
  396. package/docs/consumer-skill/scripts/discovery.mjs +61 -9
  397. package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
  398. package/package.json +7 -4
  399. package/dist/accordion-B-5Focs8.js.map +0 -1
  400. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  401. package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
  402. package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
  403. package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
  404. package/dist/app-shell-at8Kt4l_.js.map +0 -1
  405. package/dist/auth-OFwWSAap.js +0 -704
  406. package/dist/auth-OFwWSAap.js.map +0 -1
  407. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  408. package/dist/button-BS6l5JUw.js.map +0 -1
  409. package/dist/buttons-Co6GavvM.js +0 -674
  410. package/dist/buttons-Co6GavvM.js.map +0 -1
  411. package/dist/chart-DVfcwQu6.js +0 -149
  412. package/dist/chart-DVfcwQu6.js.map +0 -1
  413. package/dist/checkbox-BavDRjF7.js.map +0 -1
  414. package/dist/choice-inputs-CC7XqPQO.js +0 -619
  415. package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
  416. package/dist/code-block-xHKbAJDj.js.map +0 -1
  417. package/dist/combobox-DEbdr-3u.js.map +0 -1
  418. package/dist/combobox-xv3yJbzl.js.map +0 -1
  419. package/dist/command-C0xe7u9B.js.map +0 -1
  420. package/dist/comments-DviPLnwy.js +0 -1132
  421. package/dist/comments-DviPLnwy.js.map +0 -1
  422. package/dist/containers-6s-ucRQQ.js.map +0 -1
  423. package/dist/data-display-cWIRdeaf.js.map +0 -1
  424. package/dist/date-picker-CA6ogMQB.js.map +0 -1
  425. package/dist/date-pickers-BPIKLdsD.js +0 -224
  426. package/dist/date-pickers-BPIKLdsD.js.map +0 -1
  427. package/dist/feedback-DWUkgEjR.js.map +0 -1
  428. package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
  429. package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
  430. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  431. package/dist/filters-BhsUtsxW.js.map +0 -1
  432. package/dist/form-field-Bn7ZH1rA.js.map +0 -1
  433. package/dist/form-sizing-BWs70_a2.js.map +0 -1
  434. package/dist/forms-numeric-BUBxELBv.js +0 -867
  435. package/dist/forms-numeric-BUBxELBv.js.map +0 -1
  436. package/dist/header-C59QZyxV.js.map +0 -1
  437. package/dist/http-CLTVJc5I.js.map +0 -1
  438. package/dist/input-WwYQZJzG.js +0 -202
  439. package/dist/input-WwYQZJzG.js.map +0 -1
  440. package/dist/input-ci9fIgFH.js +0 -20
  441. package/dist/input-ci9fIgFH.js.map +0 -1
  442. package/dist/item-pJ0GsOiJ.js.map +0 -1
  443. package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
  444. package/dist/message-COsdEvXT.js +0 -108
  445. package/dist/message-COsdEvXT.js.map +0 -1
  446. package/dist/navigation-BUIn2Qxx.js.map +0 -1
  447. package/dist/navigation-DBEu4POU.js.map +0 -1
  448. package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
  449. package/dist/overlays-B11wZka6.js +0 -982
  450. package/dist/overlays-B11wZka6.js.map +0 -1
  451. package/dist/page-BV6ioQg3.js.map +0 -1
  452. package/dist/page-header-DQRa0jug.js.map +0 -1
  453. package/dist/pagination-C29vvt3I.js.map +0 -1
  454. package/dist/popover-CoLDEg19.js.map +0 -1
  455. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  456. package/dist/primitives-DKPOGVpj.js.map +0 -1
  457. package/dist/progress-BOe8l_FZ.js.map +0 -1
  458. package/dist/rich-text-editor-CoVrTiSv.js +0 -575
  459. package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
  460. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  461. package/dist/scroll-area-BheMQ270.js.map +0 -1
  462. package/dist/select-B2mb-qN2.js +0 -108
  463. package/dist/select-B2mb-qN2.js.map +0 -1
  464. package/dist/sheet-B-q914Ad.js.map +0 -1
  465. package/dist/sidebar-C_2p3Tfj.js.map +0 -1
  466. package/dist/sidebar-DPR7fmqN.js.map +0 -1
  467. package/dist/smart-card-CYLn46e6.js.map +0 -1
  468. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  469. package/dist/table-BS39xnlq.js +0 -1424
  470. package/dist/table-BS39xnlq.js.map +0 -1
  471. package/dist/table-DnlAJ-xR.js.map +0 -1
  472. package/dist/tabs-B5cNMWiP.js +0 -187
  473. package/dist/tabs-B5cNMWiP.js.map +0 -1
  474. package/dist/text-inputs-Dh9XGyiS.js +0 -331
  475. package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
  476. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  477. package/dist/timelines-B9ICkQcV.js.map +0 -1
  478. package/dist/typography-Cv8MT-82.js +0 -96
  479. package/dist/typography-Cv8MT-82.js.map +0 -1
  480. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  481. package/dist/upload-D8Za5x_c.js.map +0 -1
  482. package/dist/upload-queue-hIIYBLS7.js.map +0 -1
  483. package/dist/usage-card-DnmnJ58D.js.map +0 -1
  484. package/dist/utils-C2EKeIw3.js +0 -72
  485. package/dist/utils-C2EKeIw3.js.map +0 -1
  486. package/dist/value-inputs-DX2dbxjj.js +0 -824
  487. package/dist/value-inputs-DX2dbxjj.js.map +0 -1
  488. package/dist/workspace-C1PZmk8L.js.map +0 -1
@@ -1,25 +1,28 @@
1
1
  "use client";
2
- import { useStrings as e } from "../lib/strings.js";
3
- import { t } from "../utils-C2EKeIw3.js";
4
- import { n } from "../buttons-Co6GavvM.js";
5
- import { a as r, r as i } from "../typography-Cv8MT-82.js";
6
- import { r as a, t as o } from "../structure-MvKVq-oL.js";
7
- import { n as s, t as c } from "../feedback-DWUkgEjR.js";
8
- import { r as l } from "../overlays-B11wZka6.js";
9
- import { a as u, i as d, t as f } from "../primitives-DKPOGVpj.js";
10
- import { n as p, t as m } from "../number-BNT_BIzJ.js";
11
- import { t as h } from "../badge-BZXZT9wd.js";
12
- import { t as g } from "../input-WwYQZJzG.js";
13
- import { t as _ } from "../form-field-Bn7ZH1rA.js";
14
- import { c as v, s as y } from "../choice-inputs-CC7XqPQO.js";
15
- import { a as b } from "../upload-queue-hIIYBLS7.js";
16
- import { l as x } from "../data-display-cWIRdeaf.js";
17
- import { createContext as S, useCallback as C, useContext as w, useEffect as T, useMemo as E, useRef as D, useState as O } from "react";
18
- import { Fragment as ee, jsx as k, jsxs as A } from "react/jsx-runtime";
19
- import { ArrowLeft as te, ArrowRight as ne, Check as j, File as M, Grid2X2 as re, ImageIcon as N, ImagePlus as ie, Info as P, Layers3 as ae, LayoutList as oe, Lock as F, Play as se, Plus as I, Search as ce, Star as L, Trash2 as le, UploadCloud as R, Video as ue, X as de } from "lucide-react";
20
- import { createPortal as fe } from "react-dom";
2
+ import { _ as e, s as t } from "../ui-provider-DRPn3qNl.js";
3
+ import { useStrings as n } from "../lib/strings.js";
4
+ import { t as r } from "../utils-BvH9PSmq.js";
5
+ import { a as i, r as a } from "../typography-BxQgiZyw.js";
6
+ import { t as o } from "../button-BZDasD04.js";
7
+ import { r as s, t as c } from "../structure-CRdqVawd.js";
8
+ import { i as l } from "../smart-card-DjGVV2xr.js";
9
+ import { n as u, t as d } from "../feedback-CJkUAapr.js";
10
+ import { r as f } from "../overlays-DUbs1KEi.js";
11
+ import { a as p, i as m, t as h } from "../primitives-C7ff0QaI.js";
12
+ import { n as g, t as _ } from "../number-DasMFWEG.js";
13
+ import { t as v } from "../badge-CzId1Wlm.js";
14
+ import { t as y } from "../input-SX9V0AL3.js";
15
+ import { c as b, s as x } from "../choice-inputs-Mk3iWbhr.js";
16
+ import { t as S } from "../form-field-CZwrkP7m.js";
17
+ import { a as C } from "../upload-queue-CNd_hH_a.js";
18
+ import { l as w } from "../data-display-Bihs9Ven.js";
19
+ import { r as T, t as E } from "../control-group-recipes-DBXmfh2E.js";
20
+ import { createContext as D, useCallback as O, useContext as ee, useEffect as k, useMemo as A, useRef as j, useState as M } from "react";
21
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
22
+ import { ArrowLeft as I, ArrowRight as te, Check as ne, File as re, Grid2X2 as ie, ImageIcon as L, ImagePlus as ae, Info as R, Layers3 as oe, LayoutList as z, Lock as se, Play as B, Plus as ce, Search as le, Star as ue, Trash2 as de, UploadCloud as fe, Video as pe, X as me } from "lucide-react";
23
+ import { createPortal as he } from "react-dom";
21
24
  //#region src/components/features/media-library/media-library.strings.ts
22
- var pe = {
25
+ var ge = {
23
26
  title: "Add media",
24
27
  description: "Pick from the library, or upload new files.",
25
28
  close: "Close media library",
@@ -139,19 +142,19 @@ var pe = {
139
142
  maxReached: "Maximum reached"
140
143
  }
141
144
  };
142
- function z(e, t) {
145
+ function V(e, t) {
143
146
  return e.replace(/\{(\w+), plural, one \{([^}]*)\} other \{([^}]*)\}\}/g, (e, n, r, i) => Number(t[n]) === 1 ? r : i).replace(/\{(\w+)\}/g, (e, n) => String(t[n] ?? ""));
144
147
  }
145
148
  //#endregion
146
149
  //#region src/components/features/media-library/hooks/use-media-library.ts
147
- var me = {
150
+ var _e = {
148
151
  collection: void 0,
149
152
  tags: [],
150
153
  public: !0
151
- }, he = [];
152
- function B(e, t, n) {
153
- let [r, i] = O(t), a = e ?? r;
154
- return [a, C((t) => {
154
+ }, ve = [];
155
+ function H(e, t, n) {
156
+ let [r, i] = M(t), a = e ?? r;
157
+ return [a, O((t) => {
155
158
  let r = typeof t == "function" ? t(a) : t;
156
159
  e === void 0 && i(r), n?.(r);
157
160
  }, [
@@ -160,7 +163,7 @@ function B(e, t, n) {
160
163
  a
161
164
  ])];
162
165
  }
163
- var ge = {
166
+ var ye = {
164
167
  getId: (e) => e.id,
165
168
  getName: (e) => e.name,
166
169
  getType: (e) => e.type,
@@ -178,47 +181,47 @@ var ge = {
178
181
  getTint: (e) => e.tint,
179
182
  getMimeType: (e) => e.mimeType
180
183
  };
181
- function _e(e) {
184
+ function be(e) {
182
185
  return {
183
- ...ge,
184
- ...e ?? {}
186
+ ...ye,
187
+ ...e
185
188
  };
186
189
  }
187
- function ve(e) {
188
- return u(e) ?? "";
190
+ function xe(e) {
191
+ return p(e) ?? "";
189
192
  }
190
- function ye(e, t) {
193
+ function U(e, t) {
191
194
  let n = t.getWidth(e), r = t.getHeight(e);
192
195
  return !n || !r ? "" : `${n} x ${r}`;
193
196
  }
194
- function be(e, t) {
197
+ function Se(e, t) {
195
198
  let n = t.getUploadedAt(e);
196
199
  if (!n) return 0;
197
200
  let r = (n instanceof Date ? n : new Date(n)).getTime();
198
201
  return Number.isFinite(r) ? r : 0;
199
202
  }
200
- function xe(e) {
203
+ function Ce(e) {
201
204
  return e.type.startsWith("image/") ? "image" : e.type.startsWith("video/") ? "video" : "file";
202
205
  }
203
- function Se(e) {
206
+ function we(e) {
204
207
  if (e.type.startsWith("image/") && typeof URL < "u" && typeof URL.createObjectURL == "function") return URL.createObjectURL(e);
205
208
  }
206
- function Ce(e) {
209
+ function Te(e) {
207
210
  e && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(e);
208
211
  }
209
- function we(e) {
212
+ function Ee(e) {
210
213
  return Array.isArray(e) ? {
211
214
  items: e,
212
215
  total: e.length
213
216
  } : e;
214
217
  }
215
- function V(e, t) {
218
+ function De(e, t) {
216
219
  return t && typeof e == "object" && e ? {
217
220
  ...e,
218
221
  ...t
219
222
  } : e;
220
223
  }
221
- function H(e, t, n, r, i) {
224
+ function Oe(e, t, n, r, i) {
222
225
  let a = n.trim().toLowerCase();
223
226
  return e.filter((e) => r !== "all" && t.getType(e) !== r || i !== "all" && t.getCollection(e) !== i ? !1 : !a || [
224
227
  t.getName(e),
@@ -227,154 +230,154 @@ function H(e, t, n, r, i) {
227
230
  ...t.getTags(e)
228
231
  ].filter(Boolean).join(" ").toLowerCase().includes(a));
229
232
  }
230
- function Te(e, t, n) {
233
+ function ke(e, t, n) {
231
234
  let r = e.slice();
232
- return n === "name" ? r.sort((e, n) => t.getName(e).localeCompare(t.getName(n))) : n === "size" ? r.sort((e, n) => (t.getSize(n) ?? 0) - (t.getSize(e) ?? 0)) : n === "usage" ? r.sort((e, n) => (t.getUsageCount(n) ?? 0) - (t.getUsageCount(e) ?? 0)) : r.sort((e, n) => be(n, t) - be(e, t)), r;
235
+ return n === "name" ? r.sort((e, n) => t.getName(e).localeCompare(t.getName(n))) : n === "size" ? r.sort((e, n) => (t.getSize(n) ?? 0) - (t.getSize(e) ?? 0)) : n === "usage" ? r.sort((e, n) => (t.getUsageCount(n) ?? 0) - (t.getUsageCount(e) ?? 0)) : r.sort((e, n) => Se(n, t) - Se(e, t)), r;
233
236
  }
234
- function Ee({ items: e = he, fetcher: t, accessors: n, selectionMode: r = "multiple", value: i, defaultValue: a = [], onValueChange: o, onItemUpdate: s, onItemDelete: c, onUpload: l, onError: u, tab: d, defaultTab: f = "library", onTabChange: p, view: m, defaultView: h = "grid", onViewChange: g, query: _, defaultQuery: v = "", onQueryChange: y, type: b, defaultType: x = "all", onTypeChange: S, collection: w, defaultCollection: ee = "all", onCollectionChange: k, sort: A, defaultSort: te = "newest", onSortChange: ne, uploadOptions: j, defaultUploadOptions: M, onUploadOptionsChange: re } = {}) {
235
- let N = E(() => _e(n), [n]), [ie, P] = B(d, f, p), [ae, oe] = B(m, h, g), [F, se] = B(_, v, y), [I, ce] = B(b, x, S), [L, le] = B(w, ee, k), [R, ue] = B(A, te, ne), [de, fe] = O(null), [pe, z] = O(() => [...a]), [ge, ve] = O([]), [ye, be] = O(), [Ee, U] = O(!1), [W, G] = O(null), [De, Oe] = O([]), [ke, Ae] = O(() => /* @__PURE__ */ new Set()), [je, Me] = O({}), [Ne, K] = O([]), [Pe, Fe] = O(!1), Ie = E(() => ({
236
- ...me,
237
- ...M,
238
- tags: M?.tags ?? me.tags
239
- }), [M]), [Le, Re] = B(E(() => j ? {
240
- ...me,
241
- ...j,
242
- tags: j.tags ?? me.tags
243
- } : void 0, [j]), Ie, re), q = i !== void 0, J = E(() => q ? [...i ?? []] : pe, [
244
- pe,
245
- q,
237
+ function Ae({ items: e = ve, fetcher: t, accessors: n, selectionMode: r = "multiple", value: i, defaultValue: a = [], onValueChange: o, onItemUpdate: s, onItemDelete: c, onUpload: l, onError: u, tab: d, defaultTab: f = "library", onTabChange: p, view: m, defaultView: h = "grid", onViewChange: g, query: _, defaultQuery: v = "", onQueryChange: y, type: b, defaultType: x = "all", onTypeChange: S, collection: C, defaultCollection: w = "all", onCollectionChange: T, sort: E, defaultSort: D = "newest", onSortChange: ee, uploadOptions: N, defaultUploadOptions: P, onUploadOptionsChange: F } = {}) {
238
+ let I = A(() => be(n), [n]), [te, ne] = H(d, f, p), [re, ie] = H(m, h, g), [L, ae] = H(_, v, y), [R, oe] = H(b, x, S), [z, se] = H(C, w, T), [B, ce] = H(E, D, ee), [le, ue] = M(null), [de, fe] = M(() => [...a]), [pe, me] = M([]), [he, ge] = M(), [V, ye] = M(!1), [xe, U] = M(null), [Se, Ae] = M([]), [je, W] = M(() => /* @__PURE__ */ new Set()), [G, Me] = M({}), [K, q] = M([]), [Ne, Pe] = M(!1), Fe = A(() => ({
239
+ ..._e,
240
+ ...P,
241
+ tags: P?.tags ?? _e.tags
242
+ }), [P]), [Ie, Le] = H(A(() => N ? {
243
+ ..._e,
244
+ ...N,
245
+ tags: N.tags ?? _e.tags
246
+ } : void 0, [N]), Fe, F), Re = i !== void 0, J = A(() => Re ? [...i ?? []] : de, [
247
+ de,
248
+ Re,
246
249
  i
247
- ]), Y = E(() => new Set(J), [J]), ze = D(/* @__PURE__ */ new Set()), X = D(null), Z = D(/* @__PURE__ */ new Map());
248
- T(() => {
250
+ ]), Y = A(() => new Set(J), [J]), ze = j(/* @__PURE__ */ new Set()), X = j(null), Be = j(/* @__PURE__ */ new Map());
251
+ k(() => {
249
252
  if (!t) return;
250
253
  let e = new AbortController();
251
- return U(!0), G(null), t({
252
- query: F,
253
- type: I,
254
- collection: L === "all" ? void 0 : L,
255
- sort: R,
254
+ return ye(!0), U(null), t({
255
+ query: L,
256
+ type: R,
257
+ collection: z === "all" ? void 0 : z,
258
+ sort: B,
256
259
  signal: e.signal
257
260
  }).then((t) => {
258
261
  if (e.signal.aborted) return;
259
- let n = we(t);
260
- ve(n.items), be(n.total);
262
+ let n = Ee(t);
263
+ me(n.items), ge(n.total);
261
264
  }).catch((t) => {
262
- e.signal.aborted || (G(t), u?.(t));
265
+ e.signal.aborted || (U(t), u?.(t));
263
266
  }).finally(() => {
264
- e.signal.aborted || U(!1);
267
+ e.signal.aborted || ye(!1);
265
268
  }), () => e.abort();
266
269
  }, [
267
- L,
270
+ z,
268
271
  t,
269
272
  u,
270
- F,
271
- R,
272
- I
273
- ]), T(() => {
273
+ L,
274
+ B,
275
+ R
276
+ ]), k(() => {
274
277
  let e = ze.current;
275
278
  return () => {
276
279
  X.current?.abort();
277
- for (let t of e) Ce(t);
280
+ for (let t of e) Te(t);
278
281
  e.clear();
279
282
  };
280
283
  }, []);
281
- let Be = E(() => t ? ge : [...De, ...e], [
282
- De,
283
- ge,
284
+ let Z = A(() => t ? pe : [...Se, ...e], [
285
+ Se,
286
+ pe,
284
287
  t,
285
288
  e
286
- ]), Q = E(() => Be.filter((e) => !ke.has(N.getId(e))).map((e) => V(e, je[N.getId(e)])), [
287
- N,
289
+ ]), Q = A(() => Z.filter((e) => !je.has(I.getId(e))).map((e) => De(e, G[I.getId(e)])), [
290
+ I,
291
+ G,
288
292
  je,
289
- ke,
290
- Be
291
- ]), Ve = E(() => {
292
- let e = t ? Q : H(Q, N, F, I, L);
293
- return t ? e : Te(e, N, R);
293
+ Z
294
+ ]), Ve = A(() => {
295
+ let e = t ? Q : Oe(Q, I, L, R, z);
296
+ return t ? e : ke(e, I, B);
294
297
  }, [
295
- N,
296
- L,
298
+ I,
299
+ z,
297
300
  t,
298
301
  Q,
299
- F,
300
- R,
301
- I
302
- ]), He = ye ?? Q.length, Ue = Ve.length, We = E(() => Q.filter((e) => Y.has(N.getId(e))), [
303
- N,
302
+ L,
303
+ B,
304
+ R
305
+ ]), He = he ?? Q.length, Ue = Ve.length, We = A(() => Q.filter((e) => Y.has(I.getId(e))), [
306
+ I,
304
307
  Q,
305
308
  Y
306
- ]), Ge = !!F.trim() || I !== "all" || L !== "all", $ = C((e) => {
307
- q || z(e);
308
- let t = new Set(e), n = Q.filter((e) => t.has(N.getId(e)));
309
+ ]), Ge = !!L.trim() || R !== "all" || z !== "all", $ = O((e) => {
310
+ Re || fe(e);
311
+ let t = new Set(e), n = Q.filter((e) => t.has(I.getId(e)));
309
312
  o?.(e, n);
310
313
  }, [
311
- N,
312
- q,
314
+ I,
315
+ Re,
313
316
  o,
314
317
  Q
315
- ]), Ke = C((e) => {
318
+ ]), Ke = O((e) => {
316
319
  let t = new Set(r === "single" ? [] : Y);
317
320
  Y.has(e) && r !== "single" ? t.delete(e) : t.add(e), $(Array.from(t));
318
321
  }, [
319
322
  $,
320
323
  Y,
321
324
  r
322
- ]), qe = C(() => $([]), [$]), Je = C(() => {
323
- se(""), ce("all"), le("all");
325
+ ]), qe = O(() => $([]), [$]), Je = O(() => {
326
+ ae(""), oe("all"), se("all");
324
327
  }, [
325
- le,
326
328
  se,
327
- ce
328
- ]), Ye = C((e) => {
329
- K((t) => [...t, ...e.map((e, t) => {
330
- let n = Se(e);
329
+ ae,
330
+ oe
331
+ ]), Ye = O((e) => {
332
+ q((t) => [...t, ...e.map((e, t) => {
333
+ let n = we(e);
331
334
  return n && ze.current.add(n), {
332
335
  id: `staged-${Date.now()}-${t}`,
333
336
  file: e,
334
337
  name: e.name,
335
338
  size: e.size,
336
- type: xe(e),
339
+ type: Ce(e),
337
340
  src: n,
338
341
  progress: 0,
339
342
  status: "staged"
340
343
  };
341
344
  })]);
342
- }, []), Xe = C((e) => {
343
- K((t) => {
345
+ }, []), Xe = O((e) => {
346
+ q((t) => {
344
347
  let n = t.find((t) => t.id === e);
345
- return n?.src && (Ce(n.src), ze.current.delete(n.src)), t.filter((t) => t.id !== e);
348
+ return n?.src && (Te(n.src), ze.current.delete(n.src)), t.filter((t) => t.id !== e);
346
349
  });
347
- }, []), Ze = C(() => {
348
- K((e) => {
349
- for (let t of e) t.src && (Ce(t.src), ze.current.delete(t.src));
350
+ }, []), Ze = O(() => {
351
+ q((e) => {
352
+ for (let t of e) t.src && (Te(t.src), ze.current.delete(t.src));
350
353
  return [];
351
354
  });
352
- }, []), Qe = C((e) => {
353
- Re((t) => ({
355
+ }, []), Qe = O((e) => {
356
+ Le((t) => ({
354
357
  ...t,
355
358
  ...e
356
359
  }));
357
- }, [Re]), $e = C((e, t) => {
358
- K((n) => n.map((n) => n.id === e ? {
360
+ }, [Le]), $e = O((e, t) => {
361
+ q((n) => n.map((n) => n.id === e ? {
359
362
  ...n,
360
363
  ...t
361
364
  } : n));
362
365
  }, []);
363
366
  return {
364
- tab: ie,
365
- setTab: P,
366
- view: ae,
367
- setView: oe,
368
- query: F,
369
- setQuery: se,
370
- type: I,
371
- setType: ce,
372
- collection: L,
373
- setCollection: le,
374
- sort: R,
375
- setSort: ue,
376
- detailId: de,
377
- setDetailId: fe,
367
+ tab: te,
368
+ setTab: ne,
369
+ view: re,
370
+ setView: ie,
371
+ query: L,
372
+ setQuery: ae,
373
+ type: R,
374
+ setType: oe,
375
+ collection: z,
376
+ setCollection: se,
377
+ sort: B,
378
+ setSort: ce,
379
+ detailId: le,
380
+ setDetailId: ue,
378
381
  items: Q,
379
382
  visibleItems: Ve,
380
383
  selectedIds: J,
@@ -383,22 +386,22 @@ function Ee({ items: e = he, fetcher: t, accessors: n, selectionMode: r = "multi
383
386
  toggleSelection: Ke,
384
387
  clearSelection: qe,
385
388
  clearFilters: Je,
386
- loading: Ee,
387
- error: W,
389
+ loading: V,
390
+ error: xe,
388
391
  hasFilters: Ge,
389
392
  totalCount: He,
390
393
  filteredCount: Ue,
391
- stagedFiles: Ne,
394
+ stagedFiles: K,
392
395
  addFiles: Ye,
393
396
  removeStagedFile: Xe,
394
397
  clearStagedFiles: Ze,
395
398
  updateUploadOptions: Qe,
396
- uploadOptions: Le,
397
- uploading: Pe,
398
- startUpload: C(async () => {
399
- if (Pe || Ne.length === 0) return;
399
+ uploadOptions: Ie,
400
+ uploading: Ne,
401
+ startUpload: O(async () => {
402
+ if (Ne || K.length === 0) return;
400
403
  let e = new AbortController();
401
- X.current?.abort(), X.current = e, G(null), Fe(!0), K((e) => e.map((e) => ({
404
+ X.current?.abort(), X.current = e, U(null), Pe(!0), q((e) => e.map((e) => ({
402
405
  ...e,
403
406
  status: "uploading",
404
407
  progress: 0
@@ -416,55 +419,55 @@ function Ee({ items: e = he, fetcher: t, accessors: n, selectionMode: r = "multi
416
419
  }
417
420
  };
418
421
  try {
419
- let n = Ne.map((e) => e.file), i = await l?.(n, Le, t);
422
+ let n = K.map((e) => e.file), i = await l?.(n, Ie, t);
420
423
  if (e.signal.aborted) return;
421
- if (K((e) => e.map((e) => ({
424
+ if (q((e) => e.map((e) => ({
422
425
  ...e,
423
426
  status: "done",
424
427
  progress: 100
425
428
  }))), i?.length) {
426
- Oe((e) => [...i, ...e]);
427
- let e = i.map((e) => N.getId(e));
429
+ Ae((e) => [...i, ...e]);
430
+ let e = i.map((e) => I.getId(e));
428
431
  $(r === "single" ? e.slice(0, 1) : Array.from(/* @__PURE__ */ new Set([...e, ...J])));
429
432
  }
430
- Ze(), P("library");
433
+ Ze(), ne("library");
431
434
  } catch (t) {
432
435
  if (e.signal.aborted) return;
433
- G(t), K((e) => e.map((e) => e.status === "uploading" ? {
436
+ U(t), q((e) => e.map((e) => e.status === "uploading" ? {
434
437
  ...e,
435
438
  status: "error",
436
439
  error: "Upload failed"
437
440
  } : e)), u?.(t);
438
441
  } finally {
439
- X.current === e && (X.current = null, Fe(!1));
442
+ X.current === e && (X.current = null, Pe(!1));
440
443
  }
441
444
  }, [
442
- N,
445
+ I,
443
446
  $,
444
447
  Ze,
445
448
  u,
446
449
  l,
447
450
  J,
448
451
  r,
449
- P,
452
+ ne,
450
453
  $e,
451
- Ne,
452
- Le,
453
- Pe
454
+ K,
455
+ Ie,
456
+ Ne
454
457
  ]),
455
- cancelUpload: C(() => {
456
- X.current?.abort(), X.current = null, Fe(!1), K((e) => e.map((e) => e.status === "uploading" ? {
458
+ cancelUpload: O(() => {
459
+ X.current?.abort(), X.current = null, Pe(!1), q((e) => e.map((e) => e.status === "uploading" ? {
457
460
  ...e,
458
461
  status: "staged",
459
462
  progress: 0,
460
463
  error: void 0
461
464
  } : e));
462
465
  }, []),
463
- updateItem: C(async (e, t) => {
464
- let n = N.getId(e), r = `update:${n}`, i = (Z.current.get(r) ?? 0) + 1;
465
- Z.current.set(r, i);
466
- let a = je[n];
467
- G(null), Me((e) => ({
466
+ updateItem: O(async (e, t) => {
467
+ let n = I.getId(e), r = `update:${n}`, i = (Be.current.get(r) ?? 0) + 1;
468
+ Be.current.set(r, i);
469
+ let a = G[n];
470
+ U(null), Me((e) => ({
468
471
  ...e,
469
472
  [n]: {
470
473
  ...e[n],
@@ -474,68 +477,69 @@ function Ee({ items: e = he, fetcher: t, accessors: n, selectionMode: r = "multi
474
477
  try {
475
478
  return await s?.(e, t), !0;
476
479
  } catch (e) {
477
- return Z.current.get(r) === i && Me((e) => {
480
+ return Be.current.get(r) === i && Me((e) => {
478
481
  let t = { ...e };
479
482
  return a ? t[n] = a : delete t[n], t;
480
- }), G(e), u?.(e), !1;
483
+ }), U(e), u?.(e), !1;
481
484
  }
482
485
  }, [
483
- N,
484
- je,
486
+ I,
487
+ G,
485
488
  u,
486
489
  s
487
490
  ]),
488
- removeItem: C(async (e) => {
489
- let t = N.getId(e), n = `delete:${t}`, r = (Z.current.get(n) ?? 0) + 1;
490
- Z.current.set(n, r);
491
- let i = ke.has(t);
492
- G(null), Ae((e) => new Set(e).add(t));
491
+ removeItem: O(async (e) => {
492
+ let t = I.getId(e), n = `delete:${t}`, r = (Be.current.get(n) ?? 0) + 1;
493
+ Be.current.set(n, r);
494
+ let i = je.has(t);
495
+ U(null), W((e) => new Set(e).add(t));
493
496
  try {
494
497
  return await c?.(e), Y.has(t) && $(J.filter((e) => e !== t)), !0;
495
498
  } catch (e) {
496
- return !i && Z.current.get(n) === r && Ae((e) => {
499
+ return !i && Be.current.get(n) === r && W((e) => {
497
500
  let n = new Set(e);
498
501
  return n.delete(t), n;
499
- }), G(e), u?.(e), !1;
502
+ }), U(e), u?.(e), !1;
500
503
  }
501
504
  }, [
502
- N,
505
+ I,
503
506
  $,
504
507
  u,
505
508
  c,
506
- ke,
509
+ je,
507
510
  J,
508
511
  Y
509
512
  ]),
510
- accessors: N
513
+ accessors: I
511
514
  };
512
515
  }
513
516
  //#endregion
514
517
  //#region src/components/features/media-library/partials/media-library-partials.tsx
515
- function U(e, t) {
516
- return k(e === "image" ? N : e === "video" ? ue : M, { className: t ?? "size-icon" });
517
- }
518
+ var je = "absolute inset-0 z-10 box-border block h-full w-full cursor-pointer border-0 bg-transparent p-0 font-sans outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset";
518
519
  function W(e, t) {
519
- return e === "image" ? t.typeImage : e === "video" ? t.typeVideo : t.typeFile;
520
+ return P(e === "image" ? L : e === "video" ? pe : re, { className: t ?? "size-icon" });
520
521
  }
521
522
  function G(e, t) {
522
- return e ? z(t.usedIn, { count: e }) : t.notUsed;
523
+ return e === "image" ? t.typeImage : e === "video" ? t.typeVideo : t.typeFile;
523
524
  }
524
- function De({ children: e, tint: n, className: r }) {
525
- return /* @__PURE__ */ k("div", {
526
- className: t("media-library-preview relative overflow-hidden bg-muted", r),
527
- style: n ? { background: n } : void 0,
525
+ function Me(e, t) {
526
+ return e ? V(t.usedIn, { count: e }) : t.notUsed;
527
+ }
528
+ function K({ children: e, tint: t, className: n }) {
529
+ return /* @__PURE__ */ P("div", {
530
+ className: r("media-library-preview relative overflow-hidden bg-muted", n),
531
+ style: t ? { background: t } : void 0,
528
532
  children: e
529
533
  });
530
534
  }
531
- function Oe({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
532
- let [a, o] = O(!1);
533
- return T(() => {
535
+ function q({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
536
+ let [a, o] = M(!1);
537
+ return k(() => {
534
538
  o(!1);
535
- }, [e]), !e || a ? /* @__PURE__ */ k("div", {
539
+ }, [e]), !e || a ? /* @__PURE__ */ P("div", {
536
540
  className: "media-library-preview--fallback flex size-full items-center justify-center text-muted-foreground",
537
- children: U(n, "size-6")
538
- }) : /* @__PURE__ */ k("img", {
541
+ children: W(n, "size-6")
542
+ }) : /* @__PURE__ */ P("img", {
539
543
  src: e,
540
544
  alt: t,
541
545
  loading: i,
@@ -543,136 +547,136 @@ function Oe({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
543
547
  onError: () => o(!0)
544
548
  });
545
549
  }
546
- function ke({ icon: e, title: n, description: r, action: i, className: a }) {
547
- return /* @__PURE__ */ k(x, {
548
- title: n,
549
- description: r ?? !1,
550
+ function Ne({ icon: e, title: t, description: n, action: i, className: a }) {
551
+ return /* @__PURE__ */ P(w, {
552
+ title: t,
553
+ description: n ?? !1,
550
554
  actions: i,
551
- media: e ?? /* @__PURE__ */ k(N, {
555
+ media: e ?? /* @__PURE__ */ P(L, {
552
556
  className: "size-icon",
553
557
  "aria-hidden": "true"
554
558
  }),
555
559
  mediaVariant: "icon-soft",
556
560
  padding: "md",
557
561
  border: !0,
558
- className: t("media-library-empty-state--component min-h-64 bg-muted/20", a)
562
+ className: r("media-library-empty-state--component min-h-64 bg-muted/20", a)
559
563
  });
560
564
  }
561
- function Ae({ query: e, type: i, typeFilters: a, collection: s, sort: c, view: l, collections: u = [], strings: d, onQueryChange: f, onTypeChange: p, onCollectionChange: m, onSortChange: _, onViewChange: y, onClearFilters: b, toolbarEnd: x }) {
562
- let S = [
565
+ function Pe({ query: n, type: a, typeFilters: s, collection: l, sort: u, view: d, collections: f = [], strings: p, onQueryChange: m, onTypeChange: h, onCollectionChange: g, onSortChange: _, onViewChange: x, onClearFilters: S, toolbarEnd: C }) {
566
+ let { defaultScale: w } = t(), D = e(void 0, w), O = [
563
567
  {
564
568
  value: "all",
565
- label: d.allTypes,
569
+ label: p.allTypes,
566
570
  icon: null
567
571
  },
568
572
  {
569
573
  value: "image",
570
- label: d.images,
571
- icon: N
574
+ label: p.images,
575
+ icon: L
572
576
  },
573
577
  {
574
578
  value: "video",
575
- label: d.videos,
576
- icon: ue
579
+ label: p.videos,
580
+ icon: pe
577
581
  },
578
582
  {
579
583
  value: "file",
580
- label: d.files,
581
- icon: M
584
+ label: p.files,
585
+ icon: re
582
586
  }
583
- ].filter((e) => (a ?? [
587
+ ].filter((e) => (s ?? [
584
588
  "all",
585
589
  "image",
586
590
  "video"
587
- ]).includes(e.value)), C = [{
591
+ ]).includes(e.value)), ee = [{
588
592
  value: "all",
589
- label: d.allCollections
590
- }, ...u.map((e) => ({
593
+ label: p.allCollections
594
+ }, ...f.map((e) => ({
591
595
  value: e.value,
592
596
  label: String(e.label)
593
- }))], w = [
597
+ }))], k = [
594
598
  {
595
599
  value: "newest",
596
- label: d.sortNewest
600
+ label: p.sortNewest
597
601
  },
598
602
  {
599
603
  value: "name",
600
- label: d.sortName
604
+ label: p.sortName
601
605
  },
602
606
  {
603
607
  value: "size",
604
- label: d.sortSize
608
+ label: p.sortSize
605
609
  },
606
610
  {
607
611
  value: "usage",
608
- label: d.sortUsage
612
+ label: p.sortUsage
609
613
  }
610
- ], T = e.trim(), E = T.length > 0, D = E || i !== "all" || s !== "all";
611
- return /* @__PURE__ */ A(o, {
614
+ ], A = n.trim(), j = A.length > 0, M = j || a !== "all" || l !== "all";
615
+ return /* @__PURE__ */ F(c, {
612
616
  direction: "horizontal",
613
617
  wrap: !0,
614
- align: "center",
618
+ align: "start",
615
619
  gap: "md",
616
620
  className: "media-library-toolbar--component",
617
621
  children: [
618
- /* @__PURE__ */ A(o, {
622
+ /* @__PURE__ */ F(c, {
619
623
  gap: "xs",
620
624
  className: "media-library-toolbar--search min-w-52 flex-1",
621
- children: [/* @__PURE__ */ k(g, {
622
- value: e,
623
- onChange: (e) => f(e.target.value),
624
- placeholder: d.searchPlaceholder,
625
- startIcon: ce,
625
+ children: [/* @__PURE__ */ P(y, {
626
+ value: n,
627
+ onChange: (e) => m(e.target.value),
628
+ placeholder: p.searchPlaceholder,
629
+ startIcon: le,
626
630
  clearable: !0,
627
- onClear: () => f(""),
628
- strings: { clear: d.clearSearch },
629
- className: t("rounded-radius bg-background", E && "border-info/60 bg-info/5 text-foreground shadow-xs ring-1 ring-info/15")
630
- }), !!E && /* @__PURE__ */ k(o, {
631
+ onClear: () => m(""),
632
+ strings: { clear: p.clearSearch },
633
+ className: r("bg-background", j && "border-info/60 bg-info/5 text-foreground shadow-xs ring-1 ring-info/15")
634
+ }), !!j && /* @__PURE__ */ P(c, {
631
635
  direction: "horizontal",
632
636
  gap: "xs",
633
637
  wrap: !1,
634
638
  className: "media-library-toolbar--search-value px-space-xs",
635
- children: /* @__PURE__ */ A(h, {
639
+ children: /* @__PURE__ */ F(v, {
636
640
  tone: "info",
637
641
  className: "max-w-full",
638
642
  children: [
639
- /* @__PURE__ */ k(ce, {
643
+ /* @__PURE__ */ P(le, {
640
644
  className: "size-icon-sm",
641
645
  "aria-hidden": "true"
642
646
  }),
643
- /* @__PURE__ */ k(r, {
647
+ /* @__PURE__ */ P(i, {
644
648
  tag: "span",
645
649
  size: "inherit",
646
650
  className: "text-current",
647
- children: d.activeSearchLabel
651
+ children: p.activeSearchLabel
648
652
  }),
649
- /* @__PURE__ */ k(r, {
653
+ /* @__PURE__ */ P(i, {
650
654
  tag: "span",
651
655
  size: "inherit",
652
656
  weight: "normal",
653
657
  className: "min-w-0 truncate text-current",
654
- children: T
658
+ children: A
655
659
  })
656
660
  ]
657
661
  })
658
662
  })]
659
663
  }),
660
- /* @__PURE__ */ k("div", {
661
- className: "media-library-toolbar--type-toggle flex h-action items-center rounded-radius-md bg-muted p-space-2xs",
664
+ /* @__PURE__ */ P("div", {
665
+ className: r("media-library-toolbar--type-toggle", T.frame, E[D]),
662
666
  role: "tablist",
663
- "aria-label": d.typeFilterLabel,
664
- children: S.map((e) => {
665
- let a = e.icon, o = i === e.value;
666
- return /* @__PURE__ */ A(n, {
667
+ "aria-label": p.typeFilterLabel,
668
+ children: O.map((e) => {
669
+ let t = e.icon, n = a === e.value;
670
+ return /* @__PURE__ */ F(o, {
667
671
  type: "button",
668
672
  role: "tab",
669
- "aria-selected": o,
673
+ "aria-selected": n,
670
674
  tone: "secondary",
671
675
  buttonStyle: "ghost",
672
676
  size: "sm",
673
- className: t("rounded-radius-sm shadow-none", o ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
674
- onClick: () => p(e.value),
675
- children: [a && /* @__PURE__ */ k(a, { className: "size-icon-md" }), /* @__PURE__ */ k(r, {
677
+ className: r(T.item, "shadow-none", n ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
678
+ onClick: () => h(e.value),
679
+ children: [t && /* @__PURE__ */ P(t, { className: "size-icon-md" }), /* @__PURE__ */ P(i, {
676
680
  tag: "span",
677
681
  size: "xs",
678
682
  weight: "medium",
@@ -682,149 +686,147 @@ function Ae({ query: e, type: i, typeFilters: a, collection: s, sort: c, view: l
682
686
  }, e.value);
683
687
  })
684
688
  }),
685
- /* @__PURE__ */ k("div", {
689
+ /* @__PURE__ */ P("div", {
686
690
  className: "min-w-40",
687
- children: /* @__PURE__ */ k(v, {
688
- value: s,
689
- options: C,
690
- onValueChange: (e) => m(e ?? "all"),
691
- placeholder: d.collectionFilterLabel,
692
- "aria-label": d.collectionFilterLabel,
691
+ children: /* @__PURE__ */ P(b, {
692
+ value: l,
693
+ options: ee,
694
+ onValueChange: (e) => g(e ?? "all"),
695
+ placeholder: p.collectionFilterLabel,
696
+ "aria-label": p.collectionFilterLabel,
693
697
  className: "bg-background"
694
698
  })
695
699
  }),
696
- /* @__PURE__ */ k("div", {
700
+ /* @__PURE__ */ P("div", {
697
701
  className: "min-w-32",
698
- children: /* @__PURE__ */ k(v, {
699
- value: c,
700
- options: w,
702
+ children: /* @__PURE__ */ P(b, {
703
+ value: u,
704
+ options: k,
701
705
  onValueChange: (e) => _(e ?? "newest"),
702
- placeholder: d.sortLabel,
703
- "aria-label": d.sortLabel,
706
+ placeholder: p.sortLabel,
707
+ "aria-label": p.sortLabel,
704
708
  className: "bg-background"
705
709
  })
706
710
  }),
707
- /* @__PURE__ */ A("div", {
708
- className: "media-library-toolbar--view-toggle ml-auto flex h-action items-center rounded-radius-md bg-muted p-space-2xs",
709
- children: [/* @__PURE__ */ k(n, {
711
+ /* @__PURE__ */ F("div", {
712
+ className: r("media-library-toolbar--view-toggle ml-auto", T.frame, E[D]),
713
+ children: [/* @__PURE__ */ P(o, {
710
714
  type: "button",
711
- tone: l === "grid" ? "neutral" : "secondary",
712
- buttonStyle: l === "grid" ? "solid" : "ghost",
715
+ tone: d === "grid" ? "neutral" : "secondary",
716
+ buttonStyle: d === "grid" ? "solid" : "ghost",
713
717
  size: "sm",
714
718
  iconOnly: !0,
715
- className: t(l === "grid" && "bg-background text-foreground shadow-xs hover:bg-background"),
716
- "aria-label": d.gridView,
717
- onClick: () => y("grid"),
718
- children: /* @__PURE__ */ k(re, { className: "size-icon-md" })
719
- }), /* @__PURE__ */ k(n, {
719
+ className: r(T.item, d === "grid" && "bg-background text-foreground shadow-xs hover:bg-background"),
720
+ "aria-label": p.gridView,
721
+ onClick: () => x("grid"),
722
+ children: /* @__PURE__ */ P(ie, { className: "size-icon-md" })
723
+ }), /* @__PURE__ */ P(o, {
720
724
  type: "button",
721
- tone: l === "table" ? "neutral" : "secondary",
722
- buttonStyle: l === "table" ? "solid" : "ghost",
725
+ tone: d === "table" ? "neutral" : "secondary",
726
+ buttonStyle: d === "table" ? "solid" : "ghost",
723
727
  size: "sm",
724
728
  iconOnly: !0,
725
- className: t(l === "table" && "bg-background text-foreground shadow-xs hover:bg-background"),
726
- "aria-label": d.tableView,
727
- onClick: () => y("table"),
728
- children: /* @__PURE__ */ k(oe, { className: "size-icon-md" })
729
+ className: r(T.item, d === "table" && "bg-background text-foreground shadow-xs hover:bg-background"),
730
+ "aria-label": p.tableView,
731
+ onClick: () => x("table"),
732
+ children: /* @__PURE__ */ P(z, { className: "size-icon-md" })
729
733
  })]
730
734
  }),
731
- !!D && /* @__PURE__ */ k(n, {
735
+ !!M && /* @__PURE__ */ P(o, {
732
736
  type: "button",
733
737
  tone: "secondary",
734
738
  buttonStyle: "ghost",
735
- size: "sm",
736
- onClick: b,
737
- children: d.clearFilters
739
+ onClick: S,
740
+ children: p.clearFilters
738
741
  }),
739
- x
742
+ C
740
743
  ]
741
744
  });
742
745
  }
743
- function je({ item: e, selected: i = !1, density: s = "comfortable", showMeta: c = !0, accessors: l, strings: u, onToggle: f, onDetails: p, className: m }) {
744
- let g = l.getType(e), _ = l.getName(e), v = l.getSrc(e), y = l.getAlt(e) || _, b = l.getSize(e), x = l.getUsageCount(e), S = l.getPublic(e) === !1, C = l.getDuration(e);
745
- return /* @__PURE__ */ A("div", {
746
- "data-selected": i || void 0,
747
- "data-density": s,
748
- className: t("media-library-card--component relative group/card overflow-hidden rounded-radius-lg border border-border/70 bg-card text-left shadow-xs transition-all", "hover:border-primary/30 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", i && "media-library-card--selected border-primary ring-1 ring-primary", m),
749
- onClick: f,
746
+ function Fe({ item: e, selected: t = !1, density: n = "comfortable", showMeta: a = !0, accessors: l, strings: u, onToggle: d, onDetails: f, className: p }) {
747
+ let h = l.getType(e), g = l.getName(e), _ = l.getSrc(e), y = l.getAlt(e) || g, b = l.getSize(e), x = l.getUsageCount(e), S = l.getPublic(e) === !1, C = l.getDuration(e);
748
+ return /* @__PURE__ */ F("div", {
749
+ "data-selected": t || void 0,
750
+ "data-gallery-density": n,
751
+ className: r("media-library-card--component relative group/card overflow-hidden rounded-radius border border-border/70 bg-card text-left shadow-xs transition-all", "hover:border-primary/30 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t && "media-library-card--selected border-primary ring-1 ring-primary", p),
752
+ onClick: d,
750
753
  children: [
751
- !!f && /* @__PURE__ */ k(n, {
754
+ !!d && /* @__PURE__ */ P("button", {
752
755
  type: "button",
753
- tone: "secondary",
754
- buttonStyle: "ghost",
755
- "aria-label": _,
756
- "aria-pressed": i,
757
- className: "media-library-card--select absolute inset-0 z-10 h-full w-full rounded-radius-lg [&:not([aria-disabled=true]):not(:disabled)]:hover:bg-transparent focus-visible:ring-inset",
756
+ "aria-label": g,
757
+ "aria-pressed": t,
758
+ className: r("media-library-card--select rounded-radius", je),
758
759
  onClick: (e) => {
759
- e.stopPropagation(), f();
760
+ e.stopPropagation(), d();
760
761
  }
761
762
  }),
762
- /* @__PURE__ */ A(De, {
763
+ /* @__PURE__ */ F(K, {
763
764
  tint: l.getTint(e),
764
- className: t(s === "compact" ? "aspect-square" : "aspect-[4/3]"),
765
+ className: r(n === "compact" ? "aspect-square" : "aspect-[4/3]"),
765
766
  children: [
766
- /* @__PURE__ */ k(Oe, {
767
- src: v,
767
+ /* @__PURE__ */ P(q, {
768
+ src: _,
768
769
  alt: y,
769
- type: g,
770
+ type: h,
770
771
  className: "size-full object-cover"
771
772
  }),
772
- /* @__PURE__ */ k("span", {
773
- className: t("media-library-card--check absolute left-2 top-2 inline-flex size-icon-lg items-center justify-center rounded-radius-md border border-border bg-background/95 text-transparent opacity-0 shadow-xs backdrop-blur transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100", i && "bg-primary text-primary-foreground opacity-100"),
773
+ /* @__PURE__ */ P("span", {
774
+ className: r("media-library-card--check absolute left-2 top-2 inline-flex size-icon-lg items-center justify-center rounded-radius border border-border bg-background/95 text-transparent opacity-0 shadow-xs backdrop-blur transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100", t && "bg-primary text-primary-foreground opacity-100"),
774
775
  "aria-hidden": "true",
775
- children: /* @__PURE__ */ k(j, { className: "size-icon-sm" })
776
+ children: /* @__PURE__ */ P(ne, { className: "size-icon-sm" })
776
777
  }),
777
- !!p && /* @__PURE__ */ k(n, {
778
+ !!f && /* @__PURE__ */ P(o, {
778
779
  type: "button",
779
780
  tone: "secondary",
780
781
  buttonStyle: "solid",
781
782
  size: "sm",
782
783
  iconOnly: !0,
783
784
  className: "media-library-card--details absolute z-20 right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100",
784
- "aria-label": z(u.cardDetails, { name: _ }),
785
+ "aria-label": V(u.cardDetails, { name: g }),
785
786
  onClick: (e) => {
786
- e.stopPropagation(), p();
787
+ e.stopPropagation(), f();
787
788
  },
788
- children: /* @__PURE__ */ k(P, { className: "size-icon-md" })
789
+ children: /* @__PURE__ */ P(R, { className: "size-icon-md" })
789
790
  }),
790
- g === "video" && !!C && /* @__PURE__ */ A(h, {
791
+ h === "video" && !!C && /* @__PURE__ */ F(v, {
791
792
  tone: "secondary",
792
793
  className: "media-library-card--duration absolute bottom-2 left-2 bg-inverse-background text-inverse-foreground",
793
- children: [/* @__PURE__ */ k(se, { className: "size-icon-sm fill-current" }), C]
794
+ children: [/* @__PURE__ */ P(B, { className: "size-icon-sm fill-current" }), C]
794
795
  }),
795
- S && /* @__PURE__ */ k(h, {
796
+ S && /* @__PURE__ */ P(v, {
796
797
  tone: "secondary",
797
798
  className: "media-library-card--private absolute bottom-2 right-2 bg-card text-card-foreground",
798
- children: /* @__PURE__ */ k(F, { className: "size-icon-sm" })
799
+ children: /* @__PURE__ */ P(se, { className: "size-icon-sm" })
799
800
  })
800
801
  ]
801
802
  }),
802
- /* @__PURE__ */ k("div", {
803
- className: t("media-library-card--body", s === "compact" ? "p-surface-xs" : "p-surface"),
804
- children: /* @__PURE__ */ A(a, {
803
+ /* @__PURE__ */ P("div", {
804
+ className: r("media-library-card--body", n === "compact" ? "p-surface-xs" : "p-surface"),
805
+ children: /* @__PURE__ */ F(s, {
805
806
  columns: 1,
806
807
  gap: "xs",
807
- children: [/* @__PURE__ */ k(r, {
808
+ children: [/* @__PURE__ */ P(i, {
808
809
  tag: "div",
809
810
  weight: "semibold",
810
811
  className: "truncate",
811
- children: _
812
- }), c && /* @__PURE__ */ A(o, {
812
+ children: g
813
+ }), a && /* @__PURE__ */ F(c, {
813
814
  direction: "horizontal",
814
815
  align: "center",
816
+ justify: "between",
815
817
  gap: "md",
816
818
  className: "min-w-0",
817
- children: [/* @__PURE__ */ k(d, {
819
+ children: [/* @__PURE__ */ P(m, {
818
820
  value: b,
819
821
  size: "xs",
820
822
  className: "truncate",
821
823
  emptyLabel: u.unknownSize
822
- }), !!x && /* @__PURE__ */ A(r, {
824
+ }), !!x && /* @__PURE__ */ F(i, {
823
825
  tag: "span",
824
826
  size: "xs",
825
827
  type: "secondary",
826
- className: "ml-auto inline-flex items-center gap-space-xs",
827
- children: [/* @__PURE__ */ k(ae, { className: "size-icon-sm" }), x]
828
+ className: "inline-flex items-center gap-space-xs",
829
+ children: [/* @__PURE__ */ P(oe, { className: "size-icon-sm" }), x]
828
830
  })]
829
831
  })]
830
832
  })
@@ -832,185 +834,184 @@ function je({ item: e, selected: i = !1, density: s = "comfortable", showMeta: c
832
834
  ]
833
835
  });
834
836
  }
835
- function Me({ items: e, selectedSet: a, accessors: o, strings: s, onToggle: c, onDetails: l }) {
836
- return /* @__PURE__ */ A("div", {
837
+ function Ie({ items: e, selectedSet: t, accessors: n, strings: s, onToggle: c, onDetails: l }) {
838
+ return /* @__PURE__ */ F("div", {
837
839
  className: "media-library-list--component min-w-180",
838
- children: [/* @__PURE__ */ A("div", {
840
+ children: [/* @__PURE__ */ F("div", {
839
841
  className: "sticky top-0 z-10 grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-space-lg border-b border-border bg-background px-row-x py-row-y",
840
842
  children: [
841
- /* @__PURE__ */ k("span", {}),
842
- /* @__PURE__ */ k("span", {}),
843
- /* @__PURE__ */ k(i, { children: s.table.name }),
844
- /* @__PURE__ */ k(i, { children: s.table.type }),
845
- /* @__PURE__ */ k(i, { children: s.table.size }),
846
- /* @__PURE__ */ k(i, { children: s.table.collection }),
847
- /* @__PURE__ */ k(i, { children: s.table.used }),
848
- /* @__PURE__ */ k("span", {})
843
+ /* @__PURE__ */ P("span", {}),
844
+ /* @__PURE__ */ P("span", {}),
845
+ /* @__PURE__ */ P(a, { children: s.table.name }),
846
+ /* @__PURE__ */ P(a, { children: s.table.type }),
847
+ /* @__PURE__ */ P(a, { children: s.table.size }),
848
+ /* @__PURE__ */ P(a, { children: s.table.collection }),
849
+ /* @__PURE__ */ P(a, { children: s.table.used }),
850
+ /* @__PURE__ */ P("span", {})
849
851
  ]
850
852
  }), e.map((e) => {
851
- let i = o.getId(e), u = a.has(i), f = o.getType(e), p = o.getName(e), m = o.getSrc(e), g = o.getPublic(e) === !1;
852
- return /* @__PURE__ */ A("div", {
853
+ let a = n.getId(e), u = t.has(a), d = n.getType(e), f = n.getName(e), p = n.getSrc(e), h = n.getPublic(e) === !1;
854
+ return /* @__PURE__ */ F("div", {
853
855
  "data-selected": u || void 0,
854
- className: t("media-library-list--row relative grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-space-lg border-b border-border/60 px-row-x py-row-y last:border-b-0", "cursor-pointer rounded-radius transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", u && "bg-primary/10"),
855
- onClick: () => c(i),
856
+ className: r("media-library-list--row relative grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-space-lg border-b border-border/60 px-row-x py-row-y last:border-b-0", "cursor-pointer rounded-inner transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", u && "bg-primary/10"),
857
+ onClick: () => c(a),
856
858
  children: [
857
- /* @__PURE__ */ k(n, {
859
+ /* @__PURE__ */ P("button", {
858
860
  type: "button",
859
- tone: "secondary",
860
- buttonStyle: "ghost",
861
- "aria-label": p,
861
+ "aria-label": f,
862
862
  "aria-pressed": u,
863
- className: "media-library-list--select absolute inset-0 z-10 h-full w-full [&:not([aria-disabled=true]):not(:disabled)]:hover:bg-transparent focus-visible:ring-inset",
863
+ className: r("media-library-list--select rounded-inner", je),
864
864
  onClick: (e) => {
865
- e.stopPropagation(), c(i);
865
+ e.stopPropagation(), c(a);
866
866
  }
867
867
  }),
868
- /* @__PURE__ */ k("span", {
869
- className: t("inline-flex size-icon-lg items-center justify-center rounded-radius-md border border-border text-transparent", u && "border-primary bg-primary text-primary-foreground"),
868
+ /* @__PURE__ */ P("span", {
869
+ className: r("inline-flex size-icon-lg items-center justify-center rounded-radius border border-border text-transparent", u && "border-primary bg-primary text-primary-foreground"),
870
870
  "aria-hidden": "true",
871
- children: /* @__PURE__ */ k(j, { className: "size-icon-sm" })
871
+ children: /* @__PURE__ */ P(ne, { className: "size-icon-sm" })
872
872
  }),
873
- /* @__PURE__ */ k(De, {
874
- tint: o.getTint(e),
875
- className: "size-9 rounded-radius-md",
876
- children: m ? /* @__PURE__ */ k("img", {
877
- src: m,
873
+ /* @__PURE__ */ P(K, {
874
+ tint: n.getTint(e),
875
+ className: "size-9 rounded-inner",
876
+ children: p ? /* @__PURE__ */ P("img", {
877
+ src: p,
878
878
  alt: "",
879
879
  loading: "lazy",
880
880
  className: "size-full object-cover"
881
- }) : /* @__PURE__ */ k("div", {
881
+ }) : /* @__PURE__ */ P("div", {
882
882
  className: "flex size-full items-center justify-center text-muted-foreground",
883
- children: U(f, "size-icon")
883
+ children: W(d, "size-icon")
884
884
  })
885
885
  }),
886
- /* @__PURE__ */ A(r, {
886
+ /* @__PURE__ */ F(i, {
887
887
  tag: "div",
888
888
  weight: "semibold",
889
889
  className: "flex min-w-0 items-center gap-space-xs truncate",
890
- children: [p, g && /* @__PURE__ */ k(F, { className: "size-icon-sm shrink-0 text-muted-foreground" })]
890
+ children: [f, h && /* @__PURE__ */ P(se, { className: "size-icon-sm shrink-0 text-muted-foreground" })]
891
891
  }),
892
- /* @__PURE__ */ k(h, {
892
+ /* @__PURE__ */ P(v, {
893
893
  tone: "secondary",
894
- children: W(f, s)
894
+ children: G(d, s)
895
895
  }),
896
- /* @__PURE__ */ k(d, {
897
- value: o.getSize(e),
896
+ /* @__PURE__ */ P(m, {
897
+ value: n.getSize(e),
898
898
  size: "xs",
899
899
  emptyLabel: s.unknownSize
900
900
  }),
901
- /* @__PURE__ */ k(r, {
901
+ /* @__PURE__ */ P(i, {
902
902
  size: "xs",
903
903
  type: "secondary",
904
904
  className: "truncate",
905
- children: o.getCollection(e) || "-"
905
+ children: n.getCollection(e) || "-"
906
906
  }),
907
- /* @__PURE__ */ k(r, {
907
+ /* @__PURE__ */ P(i, {
908
908
  size: "xs",
909
909
  type: "secondary",
910
- children: o.getUsageCount(e) ? o.getUsageCount(e) : "-"
910
+ children: n.getUsageCount(e) ? n.getUsageCount(e) : "-"
911
911
  }),
912
- /* @__PURE__ */ k(n, {
912
+ /* @__PURE__ */ P(o, {
913
913
  type: "button",
914
914
  tone: "secondary",
915
915
  buttonStyle: "ghost",
916
916
  size: "sm",
917
917
  iconOnly: !0,
918
918
  className: "relative z-20",
919
- "aria-label": z(s.cardDetails, { name: p }),
919
+ "aria-label": V(s.cardDetails, { name: f }),
920
920
  onClick: (e) => {
921
- e.stopPropagation(), l(i);
921
+ e.stopPropagation(), l(a);
922
922
  },
923
- children: /* @__PURE__ */ k(P, { className: "size-icon-md" })
923
+ children: /* @__PURE__ */ P(R, { className: "size-icon-md" })
924
924
  })
925
925
  ]
926
- }, i);
926
+ }, a);
927
927
  })]
928
928
  });
929
929
  }
930
- function Ne({ item: e, collections: t = [], accessors: i, strings: s, onClose: c, onUpdate: l, onRemove: u, renderDetail: p }) {
930
+ function Le({ item: e, collections: t = [], accessors: n, strings: r, onClose: a, onUpdate: l, onRemove: u, onReplace: d, renderDetail: f }) {
931
931
  if (!e) return null;
932
- let m = i.getName(e), b = i.getType(e), x = i.getSrc(e), S = i.getCollection(e) ?? t[0]?.value ?? "", C = i.getTags(e), w = i.getPublic(e) ?? !0, T = p?.(e, {
933
- accessors: i,
932
+ let p = n.getName(e), g = n.getType(e), _ = n.getSrc(e), C = n.getCollection(e) ?? t[0]?.value ?? "", w = n.getTags(e), T = n.getPublic(e) ?? !0, E = f?.(e, {
933
+ accessors: n,
934
934
  update: l,
935
935
  remove: u,
936
- close: c
936
+ replace: d,
937
+ close: a
937
938
  });
938
- return T ? /* @__PURE__ */ k(ee, { children: T }) : /* @__PURE__ */ A("aside", {
939
+ return E ? /* @__PURE__ */ P(N, { children: E }) : /* @__PURE__ */ F("aside", {
939
940
  className: "media-library-detail-panel--component flex min-h-0 w-full flex-col border-l border-border bg-background @2xl/media-library:w-72",
940
- children: [/* @__PURE__ */ k("div", {
941
+ children: [/* @__PURE__ */ P("div", {
941
942
  className: "media-library-detail-panel--header border-b border-border p-surface",
942
- children: /* @__PURE__ */ A(o, {
943
+ children: /* @__PURE__ */ F(c, {
943
944
  direction: "horizontal",
944
945
  align: "center",
945
946
  gap: "md",
946
- children: [/* @__PURE__ */ k(n, {
947
+ children: [/* @__PURE__ */ P(o, {
947
948
  type: "button",
948
949
  tone: "secondary",
949
950
  buttonStyle: "ghost",
950
951
  size: "sm",
951
952
  iconOnly: !0,
952
- "aria-label": s.detail.close,
953
- onClick: c,
954
- children: /* @__PURE__ */ k(te, { className: "size-icon-md" })
955
- }), /* @__PURE__ */ k(r, {
953
+ "aria-label": r.detail.close,
954
+ onClick: a,
955
+ children: /* @__PURE__ */ P(I, { className: "size-icon-md" })
956
+ }), /* @__PURE__ */ P(i, {
956
957
  weight: "semibold",
957
- children: s.detail.title
958
+ children: r.detail.title
958
959
  })]
959
960
  })
960
- }), /* @__PURE__ */ A("div", {
961
+ }), /* @__PURE__ */ F("div", {
961
962
  className: "media-library-detail-panel--body grid min-h-0 gap-space-xl overflow-y-auto p-surface",
962
963
  children: [
963
- /* @__PURE__ */ A(De, {
964
- tint: i.getTint(e),
964
+ /* @__PURE__ */ F(K, {
965
+ tint: n.getTint(e),
965
966
  className: "aspect-[4/3] rounded-radius border border-border",
966
- children: [/* @__PURE__ */ k(Oe, {
967
- src: x,
968
- alt: i.getAlt(e) || m,
969
- type: b,
967
+ children: [/* @__PURE__ */ P(q, {
968
+ src: _,
969
+ alt: n.getAlt(e) || p,
970
+ type: g,
970
971
  className: "size-full object-cover"
971
- }), b === "video" && !!i.getDuration(e) && /* @__PURE__ */ A(h, {
972
+ }), g === "video" && !!n.getDuration(e) && /* @__PURE__ */ F(v, {
972
973
  className: "absolute bottom-2 right-2 bg-inverse-background text-inverse-foreground",
973
- children: [/* @__PURE__ */ k(se, { className: "size-icon-sm fill-current" }), i.getDuration(e)]
974
+ children: [/* @__PURE__ */ P(B, { className: "size-icon-sm fill-current" }), n.getDuration(e)]
974
975
  })]
975
976
  }),
976
- /* @__PURE__ */ k(r, {
977
+ /* @__PURE__ */ P(i, {
977
978
  tag: "div",
978
979
  weight: "semibold",
979
980
  className: "break-words",
980
- children: m
981
+ children: p
981
982
  }),
982
- /* @__PURE__ */ k(a, {
983
- render: /* @__PURE__ */ k("dl", {}),
983
+ /* @__PURE__ */ P(s, {
984
+ render: /* @__PURE__ */ P("dl", {}),
984
985
  columns: 1,
985
986
  gap: "md",
986
987
  className: "media-library-detail-panel--facts",
987
988
  children: [
988
- [s.detail.type, W(b, s)],
989
- [s.detail.size, /* @__PURE__ */ k(d, {
990
- value: i.getSize(e),
989
+ [r.detail.type, G(g, r)],
990
+ [r.detail.size, /* @__PURE__ */ P(m, {
991
+ value: n.getSize(e),
991
992
  weight: "medium",
992
- emptyLabel: s.unknownSize
993
+ emptyLabel: r.unknownSize
993
994
  })],
994
- [s.detail.dimensions, /* @__PURE__ */ k(f, {
995
- width: i.getWidth(e),
996
- height: i.getHeight(e),
995
+ [r.detail.dimensions, /* @__PURE__ */ P(h, {
996
+ width: n.getWidth(e),
997
+ height: n.getHeight(e),
997
998
  weight: "medium",
998
- emptyLabel: s.unknownSize
999
+ emptyLabel: r.unknownSize
999
1000
  })],
1000
- [s.detail.uploaded, String(i.getUploadedAt(e) ?? "-")],
1001
- [s.detail.usedIn, G(i.getUsageCount(e), s)]
1002
- ].map(([e, t]) => /* @__PURE__ */ A(o, {
1001
+ [r.detail.uploaded, String(n.getUploadedAt(e) ?? "-")],
1002
+ [r.detail.usedIn, Me(n.getUsageCount(e), r)]
1003
+ ].map(([e, t]) => /* @__PURE__ */ F(c, {
1003
1004
  direction: "horizontal",
1004
1005
  justify: "between",
1005
1006
  gap: "xl",
1006
- children: [/* @__PURE__ */ k("dt", { children: /* @__PURE__ */ k(r, {
1007
+ children: [/* @__PURE__ */ P("dt", { children: /* @__PURE__ */ P(i, {
1007
1008
  tag: "span",
1008
1009
  size: "xs",
1009
1010
  type: "secondary",
1010
1011
  children: e
1011
- }) }), /* @__PURE__ */ k("dd", {
1012
+ }) }), /* @__PURE__ */ P("dd", {
1012
1013
  className: "m-0 text-right",
1013
- children: typeof t == "string" ? /* @__PURE__ */ k(r, {
1014
+ children: typeof t == "string" ? /* @__PURE__ */ P(i, {
1014
1015
  tag: "span",
1015
1016
  weight: "medium",
1016
1017
  children: t
@@ -1018,196 +1019,197 @@ function Ne({ item: e, collections: t = [], accessors: i, strings: s, onClose: c
1018
1019
  })]
1019
1020
  }, e))
1020
1021
  }),
1021
- /* @__PURE__ */ k(_, {
1022
- label: s.detail.altText,
1023
- children: /* @__PURE__ */ k(g, {
1024
- value: i.getAlt(e) ?? "",
1025
- placeholder: s.detail.altPlaceholder,
1022
+ /* @__PURE__ */ P(S, {
1023
+ label: r.detail.altText,
1024
+ children: /* @__PURE__ */ P(y, {
1025
+ value: n.getAlt(e) ?? "",
1026
+ placeholder: r.detail.altPlaceholder,
1026
1027
  onChange: (e) => l({ alt: e.target.value })
1027
1028
  })
1028
1029
  }),
1029
- /* @__PURE__ */ k(_, {
1030
- label: s.detail.collection,
1031
- children: /* @__PURE__ */ k(v, {
1032
- value: S,
1030
+ /* @__PURE__ */ P(S, {
1031
+ label: r.detail.collection,
1032
+ children: /* @__PURE__ */ P(b, {
1033
+ value: C,
1033
1034
  options: t.map((e) => ({
1034
1035
  value: e.value,
1035
1036
  label: String(e.label)
1036
1037
  })),
1037
- "aria-label": s.detail.collection,
1038
+ "aria-label": r.detail.collection,
1038
1039
  onValueChange: (e) => l({ collection: e })
1039
1040
  })
1040
1041
  }),
1041
- /* @__PURE__ */ k(_, {
1042
- label: s.detail.tags,
1043
- children: /* @__PURE__ */ k(g, {
1044
- value: C.join(", "),
1045
- placeholder: s.detail.tagsPlaceholder,
1042
+ /* @__PURE__ */ P(S, {
1043
+ label: r.detail.tags,
1044
+ children: /* @__PURE__ */ P(y, {
1045
+ value: w.join(", "),
1046
+ placeholder: r.detail.tagsPlaceholder,
1046
1047
  onChange: (e) => l({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
1047
1048
  })
1048
1049
  }),
1049
- /* @__PURE__ */ k("div", {
1050
+ /* @__PURE__ */ P("div", {
1050
1051
  className: "media-library-detail-panel--public rounded-radius border border-border bg-muted/20 p-surface",
1051
- children: /* @__PURE__ */ A(o, {
1052
+ children: /* @__PURE__ */ F(c, {
1052
1053
  direction: "horizontal",
1053
1054
  align: "center",
1054
1055
  justify: "between",
1055
1056
  gap: "xl",
1056
- children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(r, {
1057
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(i, {
1057
1058
  weight: "semibold",
1058
- children: s.detail.public
1059
- }), /* @__PURE__ */ k(r, {
1059
+ children: r.detail.public
1060
+ }), /* @__PURE__ */ P(i, {
1060
1061
  size: "xs",
1061
1062
  type: "secondary",
1062
- children: w ? s.detail.publicHint : s.detail.privateHint
1063
- })] }), /* @__PURE__ */ k(y, {
1064
- "aria-label": s.detail.public,
1065
- checked: w,
1063
+ children: T ? r.detail.publicHint : r.detail.privateHint
1064
+ })] }), /* @__PURE__ */ P(x, {
1065
+ "aria-label": r.detail.public,
1066
+ checked: T,
1066
1067
  onValueChange: (e) => l({ public: e })
1067
1068
  })]
1068
1069
  })
1069
1070
  }),
1070
- /* @__PURE__ */ A("div", {
1071
+ /* @__PURE__ */ F("div", {
1071
1072
  className: "media-library-detail-panel--actions flex flex-wrap gap-space-md",
1072
- children: [/* @__PURE__ */ A(n, {
1073
+ children: [d && /* @__PURE__ */ F(o, {
1073
1074
  type: "button",
1074
1075
  tone: "secondary",
1075
1076
  buttonStyle: "outline",
1076
- children: [/* @__PURE__ */ k(R, { className: "size-icon-md" }), s.detail.replace]
1077
- }), /* @__PURE__ */ A(n, {
1077
+ onClick: d,
1078
+ children: [/* @__PURE__ */ P(fe, { className: "size-icon-md" }), r.detail.replace]
1079
+ }), /* @__PURE__ */ F(o, {
1078
1080
  type: "button",
1079
1081
  tone: "destructive",
1080
1082
  buttonStyle: "ghost",
1081
1083
  onClick: u,
1082
- children: [/* @__PURE__ */ k(le, { className: "size-icon-md" }), s.detail.delete]
1084
+ children: [/* @__PURE__ */ P(de, { className: "size-icon-md" }), r.detail.delete]
1083
1085
  })]
1084
1086
  })
1085
1087
  ]
1086
1088
  })]
1087
1089
  });
1088
1090
  }
1089
- function K({ stagedFiles: e, uploadOptions: t, collections: i = [], uploading: a = !1, strings: s, onFiles: c, onRemoveFile: l, onOptionsChange: u, empty: f }) {
1090
- return /* @__PURE__ */ k("div", {
1091
+ function Re({ stagedFiles: e, uploadOptions: t, collections: n = [], uploading: r = !1, strings: a, onFiles: s, onRemoveFile: l, onOptionsChange: u, empty: d }) {
1092
+ return /* @__PURE__ */ P("div", {
1091
1093
  className: "media-library-upload-panel--component p-surface",
1092
- children: /* @__PURE__ */ A(o, {
1094
+ children: /* @__PURE__ */ F(c, {
1093
1095
  gap: "xl",
1094
1096
  children: [
1095
- /* @__PURE__ */ k(b, {
1096
- onDrop: c,
1097
+ /* @__PURE__ */ P(C, {
1098
+ onDrop: s,
1097
1099
  accept: "image/*,video/*",
1098
1100
  multiple: !0,
1099
1101
  size: "md",
1100
1102
  strings: {
1101
- instruction: s.upload.dropTitle,
1102
- helper: s.upload.dropHint,
1103
- dragOver: s.upload.dragOver
1103
+ instruction: a.upload.dropTitle,
1104
+ helper: a.upload.dropHint,
1105
+ dragOver: a.upload.dragOver
1104
1106
  }
1105
1107
  }),
1106
- e.length > 0 ? /* @__PURE__ */ k(o, {
1108
+ e.length > 0 ? /* @__PURE__ */ P(c, {
1107
1109
  gap: "md",
1108
1110
  className: "media-library-upload-panel--staged",
1109
- children: e.map((e) => /* @__PURE__ */ A("div", {
1111
+ children: e.map((e) => /* @__PURE__ */ F("div", {
1110
1112
  className: "media-library-upload-panel--staged-file flex items-center gap-space-lg rounded-radius border border-border bg-card px-row-x py-row-y",
1111
1113
  children: [
1112
- /* @__PURE__ */ k(De, {
1113
- className: "size-10 rounded-radius-md",
1114
- children: e.src ? /* @__PURE__ */ k("img", {
1114
+ /* @__PURE__ */ P(K, {
1115
+ className: "size-10 rounded-inner",
1116
+ children: e.src ? /* @__PURE__ */ P("img", {
1115
1117
  src: e.src,
1116
1118
  alt: e.name,
1117
1119
  className: "size-full object-cover"
1118
- }) : /* @__PURE__ */ k("div", {
1120
+ }) : /* @__PURE__ */ P("div", {
1119
1121
  className: "flex size-full items-center justify-center text-muted-foreground",
1120
- children: U(e.type, "size-icon")
1122
+ children: W(e.type, "size-icon")
1121
1123
  })
1122
1124
  }),
1123
- /* @__PURE__ */ A("div", {
1125
+ /* @__PURE__ */ F("div", {
1124
1126
  className: "min-w-0 flex-1",
1125
1127
  children: [
1126
- /* @__PURE__ */ A("div", {
1128
+ /* @__PURE__ */ F("div", {
1127
1129
  className: "flex items-baseline gap-space-lg",
1128
- children: [/* @__PURE__ */ k(r, {
1130
+ children: [/* @__PURE__ */ P(i, {
1129
1131
  weight: "semibold",
1130
1132
  className: "truncate",
1131
1133
  children: e.name
1132
- }), /* @__PURE__ */ k(d, {
1134
+ }), /* @__PURE__ */ P(m, {
1133
1135
  value: e.size,
1134
1136
  size: "xs",
1135
1137
  className: "ml-auto shrink-0"
1136
1138
  })]
1137
1139
  }),
1138
- (e.status === "uploading" || e.status === "done") && /* @__PURE__ */ k("div", {
1140
+ (e.status === "uploading" || e.status === "done") && /* @__PURE__ */ P("div", {
1139
1141
  className: "mt-space-md h-1 overflow-hidden rounded-full bg-muted",
1140
- children: /* @__PURE__ */ k("div", {
1142
+ children: /* @__PURE__ */ P("div", {
1141
1143
  className: "h-full rounded-full bg-primary transition-[width]",
1142
1144
  style: { width: `${e.progress}%` }
1143
1145
  })
1144
1146
  }),
1145
- e.status === "error" && /* @__PURE__ */ k(r, {
1147
+ e.status === "error" && /* @__PURE__ */ P(i, {
1146
1148
  type: "error",
1147
1149
  children: e.error
1148
1150
  })
1149
1151
  ]
1150
1152
  }),
1151
- e.status === "done" ? /* @__PURE__ */ k(h, {
1153
+ e.status === "done" ? /* @__PURE__ */ P(v, {
1152
1154
  tone: "success",
1153
- children: s.upload.done
1154
- }) : e.status === "uploading" ? /* @__PURE__ */ k(p, {
1155
+ children: a.upload.done
1156
+ }) : e.status === "uploading" ? /* @__PURE__ */ P(g, {
1155
1157
  value: Math.round(e.progress),
1156
1158
  scaled: !0,
1157
1159
  size: "xs",
1158
1160
  type: "secondary"
1159
- }) : /* @__PURE__ */ k(n, {
1161
+ }) : /* @__PURE__ */ P(o, {
1160
1162
  type: "button",
1161
1163
  tone: "secondary",
1162
1164
  buttonStyle: "ghost",
1163
1165
  size: "sm",
1164
1166
  iconOnly: !0,
1165
- disabled: a,
1166
- "aria-label": z(s.upload.removeFile, { name: e.name }),
1167
+ disabled: r,
1168
+ "aria-label": V(a.upload.removeFile, { name: e.name }),
1167
1169
  onClick: () => l(e.id),
1168
- children: /* @__PURE__ */ k(de, { className: "size-icon-md" })
1170
+ children: /* @__PURE__ */ P(me, { className: "size-icon-md" })
1169
1171
  })
1170
1172
  ]
1171
1173
  }, e.id))
1172
- }) : f,
1173
- /* @__PURE__ */ A("div", {
1174
+ }) : d,
1175
+ /* @__PURE__ */ F("div", {
1174
1176
  className: "media-library-upload-panel--options grid gap-space-lg rounded-radius border border-border bg-muted/20 p-surface @2xl/media-library:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]",
1175
1177
  children: [
1176
- /* @__PURE__ */ k(_, {
1177
- label: s.upload.collection,
1178
- children: /* @__PURE__ */ k(v, {
1179
- value: t.collection ?? i[0]?.value,
1180
- options: i.map((e) => ({
1178
+ /* @__PURE__ */ P(S, {
1179
+ label: a.upload.collection,
1180
+ children: /* @__PURE__ */ P(b, {
1181
+ value: t.collection ?? n[0]?.value,
1182
+ options: n.map((e) => ({
1181
1183
  value: e.value,
1182
1184
  label: String(e.label)
1183
1185
  })),
1184
- "aria-label": s.upload.collection,
1186
+ "aria-label": a.upload.collection,
1185
1187
  onValueChange: (e) => u({ collection: e })
1186
1188
  })
1187
1189
  }),
1188
- /* @__PURE__ */ k(_, {
1189
- label: s.upload.tags,
1190
- children: /* @__PURE__ */ k(g, {
1190
+ /* @__PURE__ */ P(S, {
1191
+ label: a.upload.tags,
1192
+ children: /* @__PURE__ */ P(y, {
1191
1193
  value: t.tags.join(", "),
1192
- placeholder: s.upload.tagsPlaceholder,
1194
+ placeholder: a.upload.tagsPlaceholder,
1193
1195
  onChange: (e) => u({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
1194
1196
  })
1195
1197
  }),
1196
- /* @__PURE__ */ A(o, {
1198
+ /* @__PURE__ */ F(c, {
1197
1199
  direction: "horizontal",
1198
1200
  align: "center",
1199
1201
  justify: "between",
1200
1202
  gap: "xl",
1201
1203
  className: "@2xl/media-library:self-end",
1202
- children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(r, {
1204
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(i, {
1203
1205
  weight: "semibold",
1204
- children: s.upload.public
1205
- }), /* @__PURE__ */ k(r, {
1206
+ children: a.upload.public
1207
+ }), /* @__PURE__ */ P(i, {
1206
1208
  size: "xs",
1207
1209
  type: "secondary",
1208
- children: s.upload.publicHint
1209
- })] }), /* @__PURE__ */ k(y, {
1210
- "aria-label": s.upload.public,
1210
+ children: a.upload.publicHint
1211
+ })] }), /* @__PURE__ */ P(x, {
1212
+ "aria-label": a.upload.public,
1211
1213
  checked: t.public,
1212
1214
  onValueChange: (e) => u({ public: e })
1213
1215
  })]
@@ -1218,93 +1220,93 @@ function K({ stagedFiles: e, uploadOptions: t, collections: i = [], uploading: a
1218
1220
  })
1219
1221
  });
1220
1222
  }
1221
- function Pe({ tab: e, selectedIds: i, selectionMode: a, stagedFiles: o, strings: s, onClearSelection: c, className: l }) {
1222
- let d = i.length, f = o.reduce((e, t) => e + t.size, 0), p = o.length, m = t("media-library-footer-summary--component flex min-w-0 items-center gap-space-lg", l);
1223
- return e === "upload" ? /* @__PURE__ */ k("div", {
1223
+ function J({ tab: e, selectedIds: t, selectionMode: n, stagedFiles: a, strings: s, onClearSelection: c, className: l }) {
1224
+ let u = t.length, d = a.reduce((e, t) => e + t.size, 0), f = a.length, m = r("media-library-footer-summary--component flex min-w-0 items-center gap-space-lg", l);
1225
+ return e === "upload" ? /* @__PURE__ */ P("div", {
1224
1226
  className: m,
1225
1227
  "aria-live": "polite",
1226
- children: /* @__PURE__ */ k(r, {
1228
+ children: /* @__PURE__ */ P(i, {
1227
1229
  size: "xs",
1228
1230
  type: "secondary",
1229
1231
  className: "truncate",
1230
- children: p === 0 ? s.footer.noFiles : z(s.footer.stagedSummary, {
1231
- count: p,
1232
- size: u(f) ?? s.unknownSize
1232
+ children: f === 0 ? s.footer.noFiles : V(s.footer.stagedSummary, {
1233
+ count: f,
1234
+ size: p(d) ?? s.unknownSize
1233
1235
  })
1234
1236
  })
1235
- }) : /* @__PURE__ */ k("div", {
1237
+ }) : /* @__PURE__ */ P("div", {
1236
1238
  className: m,
1237
1239
  "aria-live": "polite",
1238
- children: d > 0 ? /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(r, {
1240
+ children: u > 0 ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(i, {
1239
1241
  weight: "semibold",
1240
1242
  className: "whitespace-nowrap",
1241
- children: z(s.footer.selectedCount, { count: d })
1242
- }), /* @__PURE__ */ k(n, {
1243
+ children: V(s.footer.selectedCount, { count: u })
1244
+ }), /* @__PURE__ */ P(o, {
1243
1245
  type: "button",
1244
1246
  tone: "secondary",
1245
1247
  buttonStyle: "ghost",
1246
1248
  size: "sm",
1247
1249
  onClick: c,
1248
1250
  children: s.footer.clear
1249
- })] }) : /* @__PURE__ */ k(r, {
1251
+ })] }) : /* @__PURE__ */ P(i, {
1250
1252
  size: "xs",
1251
1253
  type: "secondary",
1252
1254
  className: "truncate",
1253
- children: a === "single" ? s.footer.pickOne : s.footer.pickMany
1255
+ children: n === "single" ? s.footer.pickOne : s.footer.pickMany
1254
1256
  })
1255
1257
  });
1256
1258
  }
1257
- function Fe({ tab: e, selectedItems: r, selectedIds: i, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onUpload: f, onCancelUpload: p, className: m }) {
1258
- let h = i.length, g = a.length;
1259
- return e === "upload" ? /* @__PURE__ */ A("div", {
1260
- className: t("media-library-footer-actions--component flex min-w-0 flex-col-reverse gap-space-md @md/media-library:flex-row @md/media-library:justify-end", m),
1261
- children: [/* @__PURE__ */ k(n, {
1259
+ function Y({ tab: e, selectedItems: t, selectedIds: n, stagedFiles: i, uploading: a = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onUpload: f, onCancelUpload: p, className: m }) {
1260
+ let h = n.length, g = i.length;
1261
+ return e === "upload" ? /* @__PURE__ */ F("div", {
1262
+ className: r("media-library-footer-actions--component flex min-w-0 flex-col-reverse gap-space-md @md/media-library:flex-row @md/media-library:justify-end", m),
1263
+ children: [/* @__PURE__ */ P(o, {
1262
1264
  type: "button",
1263
1265
  tone: "secondary",
1264
1266
  buttonStyle: "ghost",
1265
- disabled: o,
1267
+ disabled: a,
1266
1268
  onClick: p,
1267
1269
  children: l ?? s.footer.cancel
1268
- }), /* @__PURE__ */ k(n, {
1270
+ }), /* @__PURE__ */ P(o, {
1269
1271
  type: "button",
1270
- disabled: g === 0 || o,
1272
+ disabled: g === 0 || a,
1271
1273
  onClick: f,
1272
- loading: o,
1274
+ loading: a,
1273
1275
  strings: { loading: s.footer.uploading },
1274
- children: g <= 1 ? s.footer.upload : z(s.footer.uploadMany, { count: g })
1276
+ children: g <= 1 ? s.footer.upload : V(s.footer.uploadMany, { count: g })
1275
1277
  })]
1276
- }) : /* @__PURE__ */ A("div", {
1277
- className: t("media-library-footer-actions--component flex min-w-0 flex-col-reverse gap-space-md @md/media-library:flex-row @md/media-library:justify-end", m),
1278
- children: [/* @__PURE__ */ k(n, {
1278
+ }) : /* @__PURE__ */ F("div", {
1279
+ className: r("media-library-footer-actions--component flex min-w-0 flex-col-reverse gap-space-md @md/media-library:flex-row @md/media-library:justify-end", m),
1280
+ children: [/* @__PURE__ */ P(o, {
1279
1281
  type: "button",
1280
1282
  tone: "secondary",
1281
1283
  buttonStyle: "ghost",
1282
1284
  onClick: u,
1283
1285
  children: l ?? s.footer.cancel
1284
- }), /* @__PURE__ */ k(n, {
1286
+ }), /* @__PURE__ */ P(o, {
1285
1287
  type: "button",
1286
1288
  disabled: h === 0,
1287
1289
  onClick: d,
1288
- children: c ?? (h === 0 ? s.footer.confirmEmpty : r.length === 1 ? s.footer.confirmOne : z(s.footer.confirmMany, { count: h }))
1290
+ children: c ?? (h === 0 ? s.footer.confirmEmpty : t.length === 1 ? s.footer.confirmOne : V(s.footer.confirmMany, { count: h }))
1289
1291
  })]
1290
1292
  });
1291
1293
  }
1292
- function Ie({ tab: e, selectedItems: n, selectedIds: r, selectionMode: i, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onClearSelection: f, onUpload: p, onCancelUpload: m, chrome: h = "section", className: g }) {
1293
- return /* @__PURE__ */ k("footer", {
1294
- className: t("media-library-footer--component", h === "section" && "border-t border-border bg-background p-surface", g),
1295
- children: /* @__PURE__ */ A("div", {
1294
+ function ze({ tab: e, selectedItems: t, selectedIds: n, selectionMode: i, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onClearSelection: f, onUpload: p, onCancelUpload: m, chrome: h = "section", className: g }) {
1295
+ return /* @__PURE__ */ P("footer", {
1296
+ className: r("media-library-footer--component", h === "section" && "border-t border-border bg-background p-surface", g),
1297
+ children: /* @__PURE__ */ F("div", {
1296
1298
  className: "flex min-w-0 flex-col gap-space-lg @md/media-library:flex-row @md/media-library:justify-between",
1297
- children: [/* @__PURE__ */ k(Pe, {
1299
+ children: [/* @__PURE__ */ P(J, {
1298
1300
  tab: e,
1299
- selectedIds: r,
1301
+ selectedIds: n,
1300
1302
  selectionMode: i,
1301
1303
  stagedFiles: a,
1302
1304
  strings: s,
1303
1305
  onClearSelection: f
1304
- }), /* @__PURE__ */ k(Fe, {
1306
+ }), /* @__PURE__ */ P(Y, {
1305
1307
  tab: e,
1306
- selectedItems: n,
1307
- selectedIds: r,
1308
+ selectedItems: t,
1309
+ selectedIds: n,
1308
1310
  stagedFiles: a,
1309
1311
  uploading: o,
1310
1312
  strings: s,
@@ -1320,9 +1322,9 @@ function Ie({ tab: e, selectedItems: n, selectedIds: r, selectionMode: i, staged
1320
1322
  }
1321
1323
  //#endregion
1322
1324
  //#region src/components/features/media-library/media-library.tsx
1323
- var Le = S(null);
1324
- function Re(e, t, n) {
1325
- return E(() => {
1325
+ var X = D(null);
1326
+ function Be(e, t, n) {
1327
+ return A(() => {
1326
1328
  if (e) return e;
1327
1329
  let r = /* @__PURE__ */ new Set();
1328
1330
  for (let e of t) {
@@ -1339,299 +1341,300 @@ function Re(e, t, n) {
1339
1341
  t
1340
1342
  ]);
1341
1343
  }
1342
- function q({ title: i, description: a, confirmLabel: l, cancelLabel: u, selectionMode: d = "multiple", density: f = "comfortable", showMeta: p = !0, allowUpload: h = !0, typeFilters: g, confirmOnSelect: _ = !1, onConfirm: v, onCancel: y, onClose: b, strings: x, slots: S, heightClassName: C, className: T, items: E, fetcher: D, accessors: O, collections: ee, value: te, defaultValue: ne, onValueChange: j, onItemUpdate: M, onItemDelete: re, onUpload: ie, onError: P, tab: ae, defaultTab: oe, onTabChange: F, view: se, defaultView: I, onViewChange: ce, query: L, defaultQuery: le, onQueryChange: ue, type: de, defaultType: me, onTypeChange: he, collection: B, defaultCollection: ge, onCollectionChange: _e, sort: ve, defaultSort: ye, onSortChange: be, uploadOptions: xe, defaultUploadOptions: Se, onUploadOptionsChange: Ce, ...we }) {
1343
- let V = e(pe, x), H = Ee({
1344
- items: E,
1345
- fetcher: D,
1346
- accessors: O,
1347
- collections: ee,
1348
- selectionMode: d,
1344
+ function Z({ title: a, titleSuffix: s, description: f, confirmLabel: p, cancelLabel: m, selectionMode: h = "multiple", density: g = "comfortable", showMeta: v = !0, allowUpload: y = !0, typeFilters: b, confirmOnSelect: x = !1, onConfirm: S, onCancel: C, onClose: w, strings: D, slots: O, heightClassName: k, className: A, items: j, fetcher: M, accessors: N, collections: I, value: te, defaultValue: ne, onValueChange: re, onItemUpdate: ie, onItemDelete: ae, onItemReplace: R, onUpload: oe, onError: z, tab: se, defaultTab: B, onTabChange: ce, view: le, defaultView: ue, onViewChange: de, query: pe, defaultQuery: me, onQueryChange: _e, type: ve, defaultType: H, onTypeChange: ye, collection: be, defaultCollection: xe, onCollectionChange: U, sort: Se, defaultSort: Ce, onSortChange: we, uploadOptions: Te, defaultUploadOptions: Ee, onUploadOptionsChange: De, ...Oe }) {
1345
+ let { defaultScale: ke } = t(), je = e(void 0, ke), W = n(ge, D), G = Ae({
1346
+ items: j,
1347
+ fetcher: M,
1348
+ accessors: N,
1349
+ collections: I,
1350
+ selectionMode: h,
1349
1351
  value: te,
1350
1352
  defaultValue: ne,
1351
- onValueChange: j,
1352
- onItemUpdate: M,
1353
- onItemDelete: re,
1354
- onUpload: ie,
1355
- onError: P,
1356
- tab: ae,
1357
- defaultTab: oe,
1358
- onTabChange: F,
1359
- view: se,
1360
- defaultView: I,
1361
- onViewChange: ce,
1362
- query: L,
1363
- defaultQuery: le,
1364
- onQueryChange: ue,
1365
- type: de,
1366
- defaultType: me,
1367
- onTypeChange: he,
1368
- collection: B,
1369
- defaultCollection: ge,
1370
- onCollectionChange: _e,
1371
- sort: ve,
1372
- defaultSort: ye,
1373
- onSortChange: be,
1374
- uploadOptions: xe,
1375
- defaultUploadOptions: Se,
1376
- onUploadOptionsChange: Ce
1377
- }), Te = Re(ee, H.items, H.accessors.getCollection), U = h ? H.tab : "library", W = H.detailId ? H.items.find((e) => H.accessors.getId(e) === H.detailId) ?? null : null, G = w(Le), De = !S?.footer, Oe = G && De ? /* @__PURE__ */ k(Pe, {
1378
- tab: U,
1379
- selectedIds: H.selectedIds,
1380
- selectionMode: d,
1381
- stagedFiles: H.stagedFiles,
1382
- strings: V,
1383
- onClearSelection: H.clearSelection,
1353
+ onValueChange: re,
1354
+ onItemUpdate: ie,
1355
+ onItemDelete: ae,
1356
+ onUpload: oe,
1357
+ onError: z,
1358
+ tab: se,
1359
+ defaultTab: B,
1360
+ onTabChange: ce,
1361
+ view: le,
1362
+ defaultView: ue,
1363
+ onViewChange: de,
1364
+ query: pe,
1365
+ defaultQuery: me,
1366
+ onQueryChange: _e,
1367
+ type: ve,
1368
+ defaultType: H,
1369
+ onTypeChange: ye,
1370
+ collection: be,
1371
+ defaultCollection: xe,
1372
+ onCollectionChange: U,
1373
+ sort: Se,
1374
+ defaultSort: Ce,
1375
+ onSortChange: we,
1376
+ uploadOptions: Te,
1377
+ defaultUploadOptions: Ee,
1378
+ onUploadOptionsChange: De
1379
+ }), Me = Be(I, G.items, G.accessors.getCollection), K = y ? G.tab : "library", q = G.detailId ? G.items.find((e) => G.accessors.getId(e) === G.detailId) ?? null : null, Z = ee(X), Q = !O?.footer, Ve = Z && Q ? /* @__PURE__ */ P(J, {
1380
+ tab: K,
1381
+ selectedIds: G.selectedIds,
1382
+ selectionMode: h,
1383
+ stagedFiles: G.stagedFiles,
1384
+ strings: W,
1385
+ onClearSelection: G.clearSelection,
1384
1386
  className: "media-library-dialog--selection-summary shrink-0 justify-end"
1385
- }) : null, q = !!(i || a || S?.headerStart), J = !!(h || S?.headerEnd || Oe), Y = q || J, ze = () => {
1386
- v?.(H.selectedItems, H.selectedIds), b?.();
1387
- }, X = () => {
1388
- y?.(), b?.();
1389
- }, Z = (e) => {
1390
- let t = H.accessors.getId(e);
1391
- H.toggleSelection(t), _ && (v?.([e], [t]), b?.());
1392
- }, Be = H.query.trim(), Q = Be.length > 0 ? z(V.countSearch, {
1393
- count: H.filteredCount,
1394
- total: H.totalCount,
1395
- query: Be
1396
- }) : H.filteredCount === H.totalCount ? z(V.countAll, { count: H.totalCount }) : z(V.countFiltered, {
1397
- count: H.filteredCount,
1398
- total: H.totalCount
1399
- }), Ve = S?.footer ?? (G ? /* @__PURE__ */ k(Fe, {
1400
- tab: U,
1401
- selectedItems: H.selectedItems,
1402
- selectedIds: H.selectedIds,
1403
- stagedFiles: H.stagedFiles,
1404
- uploading: H.uploading,
1405
- strings: V,
1406
- confirmLabel: l,
1407
- cancelLabel: u,
1408
- onCancel: X,
1409
- onConfirm: ze,
1410
- onUpload: H.startUpload,
1387
+ }) : null, He = !!(a || s || f || O?.headerStart), Ue = !!(y || O?.headerEnd || Ve), We = He || Ue, Ge = () => {
1388
+ S?.(G.selectedItems, G.selectedIds), w?.();
1389
+ }, $ = () => {
1390
+ C?.(), w?.();
1391
+ }, Ke = (e) => {
1392
+ let t = G.accessors.getId(e);
1393
+ G.toggleSelection(t), x && (S?.([e], [t]), w?.());
1394
+ }, qe = G.query.trim(), Je = qe.length > 0 ? V(W.countSearch, {
1395
+ count: G.filteredCount,
1396
+ total: G.totalCount,
1397
+ query: qe
1398
+ }) : G.filteredCount === G.totalCount ? V(W.countAll, { count: G.totalCount }) : V(W.countFiltered, {
1399
+ count: G.filteredCount,
1400
+ total: G.totalCount
1401
+ }), Ye = O?.footer ?? (Z ? /* @__PURE__ */ P(Y, {
1402
+ tab: K,
1403
+ selectedItems: G.selectedItems,
1404
+ selectedIds: G.selectedIds,
1405
+ stagedFiles: G.stagedFiles,
1406
+ uploading: G.uploading,
1407
+ strings: W,
1408
+ confirmLabel: p,
1409
+ cancelLabel: m,
1410
+ onCancel: $,
1411
+ onConfirm: Ge,
1412
+ onUpload: G.startUpload,
1411
1413
  onCancelUpload: () => {
1412
- H.cancelUpload(), H.clearStagedFiles(), H.setTab("library");
1414
+ G.cancelUpload(), G.clearStagedFiles(), G.setTab("library");
1413
1415
  },
1414
1416
  className: "ml-auto"
1415
- }) : /* @__PURE__ */ k(Ie, {
1416
- tab: U,
1417
- selectedItems: H.selectedItems,
1418
- selectedIds: H.selectedIds,
1419
- selectionMode: d,
1420
- stagedFiles: H.stagedFiles,
1421
- uploading: H.uploading,
1422
- strings: V,
1423
- confirmLabel: l,
1424
- cancelLabel: u,
1425
- onCancel: X,
1426
- onConfirm: ze,
1427
- onClearSelection: H.clearSelection,
1428
- onUpload: H.startUpload,
1417
+ }) : /* @__PURE__ */ P(ze, {
1418
+ tab: K,
1419
+ selectedItems: G.selectedItems,
1420
+ selectedIds: G.selectedIds,
1421
+ selectionMode: h,
1422
+ stagedFiles: G.stagedFiles,
1423
+ uploading: G.uploading,
1424
+ strings: W,
1425
+ confirmLabel: p,
1426
+ cancelLabel: m,
1427
+ onCancel: $,
1428
+ onConfirm: Ge,
1429
+ onClearSelection: G.clearSelection,
1430
+ onUpload: G.startUpload,
1429
1431
  onCancelUpload: () => {
1430
- H.cancelUpload(), H.clearStagedFiles(), H.setTab("library");
1432
+ G.cancelUpload(), G.clearStagedFiles(), G.setTab("library");
1431
1433
  }
1432
1434
  }));
1433
- return /* @__PURE__ */ A("section", {
1434
- className: t("media-library--component @container/media-library flex min-h-0 flex-col overflow-hidden rounded-radius border border-border bg-background", C ?? "h-190 max-h-[calc(100vh-7rem)]", T),
1435
- ...we,
1435
+ return /* @__PURE__ */ F("section", {
1436
+ className: r("media-library--component @container/media-library flex min-h-0 flex-col overflow-hidden rounded-radius border border-border bg-background", k ?? "h-190 max-h-[calc(100vh-7rem)]", A),
1437
+ ...Oe,
1436
1438
  children: [
1437
- Y && /* @__PURE__ */ A("header", {
1439
+ We && /* @__PURE__ */ F("header", {
1438
1440
  className: "media-library--header flex flex-col gap-space-lg border-b border-border p-surface @2xl/media-library:flex-row @2xl/media-library:items-center @2xl/media-library:justify-between",
1439
- children: [q && /* @__PURE__ */ A(o, {
1441
+ children: [He && /* @__PURE__ */ F(c, {
1440
1442
  direction: "horizontal",
1441
1443
  align: "start",
1442
1444
  gap: "lg",
1443
1445
  className: "min-w-0",
1444
- children: [S?.headerStart, (i || a) && /* @__PURE__ */ A("div", {
1446
+ children: [O?.headerStart, (a || s || f) && /* @__PURE__ */ F(c, {
1447
+ gap: "normal",
1445
1448
  className: "min-w-0",
1446
- children: [!!i && /* @__PURE__ */ k(r, {
1447
- tag: "div",
1448
- weight: "semibold",
1449
- children: i
1450
- }), !!a && /* @__PURE__ */ k(r, {
1449
+ children: [!!(a || s) && /* @__PURE__ */ P(l, {
1450
+ title: a,
1451
+ suffix: s,
1452
+ className: "media-library--title"
1453
+ }), !!f && /* @__PURE__ */ P(i, {
1451
1454
  type: "secondary",
1452
- className: "mt-0.5",
1453
- children: a
1455
+ children: f
1454
1456
  })]
1455
1457
  })]
1456
- }), J && /* @__PURE__ */ A("div", {
1457
- className: t("media-library--header-controls flex min-w-0 flex-wrap items-center gap-space-md", Oe ? "flex-1 justify-between" : "@2xl/media-library:justify-end"),
1458
- children: [/* @__PURE__ */ A(o, {
1458
+ }), Ue && /* @__PURE__ */ F("div", {
1459
+ className: r("media-library--header-controls flex min-w-0 flex-wrap items-center gap-space-md", Ve ? "flex-1 justify-between" : "@2xl/media-library:justify-end"),
1460
+ children: [/* @__PURE__ */ F(c, {
1459
1461
  direction: "horizontal",
1460
1462
  wrap: !0,
1461
1463
  align: "center",
1462
1464
  gap: "md",
1463
1465
  className: "min-w-0",
1464
- children: [h && /* @__PURE__ */ A("div", {
1465
- className: "media-library--tabs flex items-center rounded-radius-md bg-muted p-space-2xs",
1466
+ children: [y && /* @__PURE__ */ F("div", {
1467
+ className: r("media-library--tabs", T.frame, E[je]),
1466
1468
  role: "tablist",
1467
- children: [/* @__PURE__ */ A(n, {
1469
+ children: [/* @__PURE__ */ F(o, {
1468
1470
  type: "button",
1469
1471
  role: "tab",
1470
- "aria-selected": U === "library",
1472
+ "aria-selected": K === "library",
1471
1473
  tone: "secondary",
1472
1474
  buttonStyle: "ghost",
1473
1475
  size: "sm",
1474
- className: t("rounded-radius-sm shadow-none", U === "library" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1475
- onClick: () => H.setTab("library"),
1476
- children: [/* @__PURE__ */ k(N, { className: "size-icon-md" }), V.tabs.library]
1477
- }), /* @__PURE__ */ A(n, {
1476
+ className: r(T.item, "shadow-none", K === "library" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1477
+ onClick: () => G.setTab("library"),
1478
+ children: [/* @__PURE__ */ P(L, { className: "size-icon-md" }), W.tabs.library]
1479
+ }), /* @__PURE__ */ F(o, {
1478
1480
  type: "button",
1479
1481
  role: "tab",
1480
- "aria-selected": U === "upload",
1482
+ "aria-selected": K === "upload",
1481
1483
  tone: "secondary",
1482
1484
  buttonStyle: "ghost",
1483
1485
  size: "sm",
1484
- className: t("rounded-radius-sm shadow-none", U === "upload" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1485
- onClick: () => H.setTab("upload"),
1486
+ className: r(T.item, "shadow-none", K === "upload" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1487
+ onClick: () => G.setTab("upload"),
1486
1488
  children: [
1487
- /* @__PURE__ */ k(R, { className: "size-icon-md" }),
1488
- V.tabs.upload,
1489
- H.stagedFiles.length > 0 && /* @__PURE__ */ k(m, {
1490
- value: H.stagedFiles.length,
1489
+ /* @__PURE__ */ P(fe, { className: "size-icon-md" }),
1490
+ W.tabs.upload,
1491
+ G.stagedFiles.length > 0 && /* @__PURE__ */ P(_, {
1492
+ value: G.stagedFiles.length,
1491
1493
  size: "xs",
1492
1494
  align: "center",
1493
1495
  className: "rounded-full bg-background/20 px-1.5"
1494
1496
  })
1495
1497
  ]
1496
1498
  })]
1497
- }), S?.headerEnd]
1498
- }), Oe]
1499
+ }), O?.headerEnd]
1500
+ }), Ve]
1499
1501
  })]
1500
1502
  }),
1501
- /* @__PURE__ */ A("div", {
1503
+ /* @__PURE__ */ F("div", {
1502
1504
  className: "media-library--body flex min-h-0 flex-1",
1503
- children: [U === "upload" ? /* @__PURE__ */ k("div", {
1505
+ children: [K === "upload" ? /* @__PURE__ */ P("div", {
1504
1506
  className: "min-w-0 flex-1 overflow-y-auto",
1505
- children: /* @__PURE__ */ k(K, {
1506
- stagedFiles: H.stagedFiles,
1507
- uploadOptions: H.uploadOptions,
1508
- collections: Te,
1509
- uploading: H.uploading,
1510
- strings: V,
1511
- onFiles: H.addFiles,
1512
- onRemoveFile: H.removeStagedFile,
1513
- onOptionsChange: H.updateUploadOptions,
1514
- empty: S?.uploadEmpty
1507
+ children: /* @__PURE__ */ P(Re, {
1508
+ stagedFiles: G.stagedFiles,
1509
+ uploadOptions: G.uploadOptions,
1510
+ collections: Me,
1511
+ uploading: G.uploading,
1512
+ strings: W,
1513
+ onFiles: G.addFiles,
1514
+ onRemoveFile: G.removeStagedFile,
1515
+ onOptionsChange: G.updateUploadOptions,
1516
+ empty: O?.uploadEmpty
1515
1517
  })
1516
- }) : /* @__PURE__ */ A("div", {
1517
- className: t("media-library--library min-w-0 flex-1 flex-col", W ? "hidden @2xl/media-library:flex" : "flex"),
1518
- children: [/* @__PURE__ */ A("div", {
1518
+ }) : /* @__PURE__ */ F("div", {
1519
+ className: r("media-library--library min-w-0 flex-1 flex-col", q ? "hidden @2xl/media-library:flex" : "flex"),
1520
+ children: [/* @__PURE__ */ F(c, {
1521
+ gap: "md",
1519
1522
  className: "media-library--toolbar border-b border-border/70 p-surface",
1520
- children: [/* @__PURE__ */ k(Ae, {
1521
- query: H.query,
1522
- type: H.type,
1523
- typeFilters: g,
1524
- collection: H.collection,
1525
- sort: H.sort,
1526
- view: H.view,
1527
- collections: Te,
1528
- strings: V,
1529
- onQueryChange: H.setQuery,
1530
- onTypeChange: H.setType,
1531
- onCollectionChange: H.setCollection,
1532
- onSortChange: H.setSort,
1533
- onViewChange: H.setView,
1534
- onClearFilters: H.clearFilters,
1535
- toolbarEnd: S?.toolbarEnd
1536
- }), /* @__PURE__ */ k(r, {
1523
+ children: [/* @__PURE__ */ P(Pe, {
1524
+ query: G.query,
1525
+ type: G.type,
1526
+ typeFilters: b,
1527
+ collection: G.collection,
1528
+ sort: G.sort,
1529
+ view: G.view,
1530
+ collections: Me,
1531
+ strings: W,
1532
+ onQueryChange: G.setQuery,
1533
+ onTypeChange: G.setType,
1534
+ onCollectionChange: G.setCollection,
1535
+ onSortChange: G.setSort,
1536
+ onViewChange: G.setView,
1537
+ onClearFilters: G.clearFilters,
1538
+ toolbarEnd: O?.toolbarEnd
1539
+ }), /* @__PURE__ */ P(i, {
1537
1540
  size: "xs",
1538
1541
  type: "secondary",
1539
- className: "mt-space-md",
1540
1542
  "aria-live": "polite",
1541
- children: Q
1543
+ children: Je
1542
1544
  })]
1543
- }), /* @__PURE__ */ k("div", {
1545
+ }), /* @__PURE__ */ P("div", {
1544
1546
  role: "region",
1545
- "aria-label": V.resultsLabel,
1547
+ "aria-label": W.resultsLabel,
1546
1548
  tabIndex: 0,
1547
1549
  className: "media-library--results min-h-0 flex-1 overflow-y-auto p-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
1548
- children: H.loading ? S?.loading ?? /* @__PURE__ */ k(s, {
1550
+ children: G.loading ? O?.loading ?? /* @__PURE__ */ P(u, {
1549
1551
  className: "min-h-64",
1550
- label: V.loading
1551
- }) : H.error ? S?.error ?? /* @__PURE__ */ k(c, {
1552
- title: V.errorTitle,
1553
- description: V.errorDescription
1554
- }) : H.visibleItems.length === 0 ? S?.empty ?? /* @__PURE__ */ k(ke, {
1555
- title: H.hasFilters ? V.emptyFilteredTitle : V.emptyLibraryTitle,
1556
- description: H.hasFilters ? V.emptyFilteredDescription : V.emptyLibraryDescription,
1557
- action: H.hasFilters ? /* @__PURE__ */ k(n, {
1552
+ label: W.loading
1553
+ }) : G.error ? O?.error ?? /* @__PURE__ */ P(d, {
1554
+ title: W.errorTitle,
1555
+ description: W.errorDescription
1556
+ }) : G.visibleItems.length === 0 ? O?.empty ?? /* @__PURE__ */ P(Ne, {
1557
+ title: G.hasFilters ? W.emptyFilteredTitle : W.emptyLibraryTitle,
1558
+ description: G.hasFilters ? W.emptyFilteredDescription : W.emptyLibraryDescription,
1559
+ action: G.hasFilters ? /* @__PURE__ */ P(o, {
1558
1560
  type: "button",
1559
1561
  tone: "secondary",
1560
1562
  buttonStyle: "outline",
1561
- onClick: H.clearFilters,
1562
- children: V.clearFilters
1563
- }) : h ? /* @__PURE__ */ A(n, {
1563
+ onClick: G.clearFilters,
1564
+ children: W.clearFilters
1565
+ }) : y ? /* @__PURE__ */ F(o, {
1564
1566
  type: "button",
1565
- onClick: () => H.setTab("upload"),
1566
- children: [/* @__PURE__ */ k(R, { className: "size-icon-md" }), V.uploadMedia]
1567
+ onClick: () => G.setTab("upload"),
1568
+ children: [/* @__PURE__ */ P(fe, { className: "size-icon-md" }), W.uploadMedia]
1567
1569
  }) : void 0
1568
- }) : H.view === "table" ? /* @__PURE__ */ k("div", {
1570
+ }) : G.view === "table" ? /* @__PURE__ */ P("div", {
1569
1571
  className: "overflow-x-auto",
1570
- children: /* @__PURE__ */ k(Me, {
1571
- items: H.visibleItems,
1572
- selectedSet: H.selectedSet,
1573
- selectionMode: d,
1574
- accessors: H.accessors,
1575
- strings: V,
1572
+ children: /* @__PURE__ */ P(Ie, {
1573
+ items: G.visibleItems,
1574
+ selectedSet: G.selectedSet,
1575
+ selectionMode: h,
1576
+ accessors: G.accessors,
1577
+ strings: W,
1576
1578
  onToggle: (e) => {
1577
- let t = H.items.find((t) => H.accessors.getId(t) === e);
1578
- t && Z(t);
1579
+ let t = G.items.find((t) => G.accessors.getId(t) === e);
1580
+ t && Ke(t);
1579
1581
  },
1580
- onDetails: H.setDetailId
1582
+ onDetails: G.setDetailId
1581
1583
  })
1582
- }) : /* @__PURE__ */ k("div", {
1583
- className: t("media-library--grid grid min-w-0 gap-space-lg", f === "compact" ? "grid-cols-[repeat(auto-fill,minmax(136px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(168px,1fr))]"),
1584
- children: H.visibleItems.map((e) => {
1585
- let t = H.accessors.getId(e), n = {
1584
+ }) : /* @__PURE__ */ P("div", {
1585
+ className: r("media-library--grid grid min-w-0 gap-space-lg", g === "compact" ? "grid-cols-[repeat(auto-fill,minmax(136px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(168px,1fr))]"),
1586
+ children: G.visibleItems.map((e) => {
1587
+ let t = G.accessors.getId(e), n = {
1586
1588
  id: t,
1587
- selected: H.selectedSet.has(t),
1588
- selectionMode: d,
1589
- accessors: H.accessors,
1590
- toggle: () => Z(e),
1591
- openDetails: () => H.setDetailId(t)
1592
- }, r = S?.renderItem?.(e, n);
1593
- return r ? /* @__PURE__ */ k("div", { children: r }, t) : /* @__PURE__ */ k(je, {
1589
+ selected: G.selectedSet.has(t),
1590
+ selectionMode: h,
1591
+ accessors: G.accessors,
1592
+ toggle: () => Ke(e),
1593
+ openDetails: () => G.setDetailId(t)
1594
+ }, r = O?.renderItem?.(e, n);
1595
+ return r ? /* @__PURE__ */ P("div", { children: r }, t) : /* @__PURE__ */ P(Fe, {
1594
1596
  item: e,
1595
1597
  selected: n.selected,
1596
- density: f,
1597
- showMeta: p,
1598
- selectionMode: d,
1599
- accessors: H.accessors,
1600
- strings: V,
1598
+ density: g,
1599
+ showMeta: v,
1600
+ selectionMode: h,
1601
+ accessors: G.accessors,
1602
+ strings: W,
1601
1603
  onToggle: n.toggle,
1602
1604
  onDetails: n.openDetails
1603
1605
  }, t);
1604
1606
  })
1605
1607
  })
1606
1608
  })]
1607
- }), U === "library" && /* @__PURE__ */ k(Ne, {
1608
- item: W,
1609
- collections: Te,
1610
- accessors: H.accessors,
1611
- strings: V,
1612
- onClose: () => H.setDetailId(null),
1613
- onUpdate: (e) => W ? H.updateItem(W, e) : Promise.resolve(!1),
1609
+ }), K === "library" && /* @__PURE__ */ P(Le, {
1610
+ item: q,
1611
+ collections: Me,
1612
+ accessors: G.accessors,
1613
+ strings: W,
1614
+ onClose: () => G.setDetailId(null),
1615
+ onUpdate: (e) => q ? G.updateItem(q, e) : Promise.resolve(!1),
1616
+ onReplace: R && q ? () => R(q) : void 0,
1614
1617
  onRemove: async () => {
1615
- if (!W) return !1;
1616
- let e = await H.removeItem(W);
1617
- return e && H.setDetailId(null), e;
1618
+ if (!q) return !1;
1619
+ let e = await G.removeItem(q);
1620
+ return e && G.setDetailId(null), e;
1618
1621
  },
1619
- renderDetail: S?.renderDetail
1622
+ renderDetail: O?.renderDetail
1620
1623
  })]
1621
1624
  }),
1622
- G ? G.element ? fe(Ve, G.element) : null : Ve
1625
+ Z ? Z.element ? he(Ye, Z.element) : null : Ye
1623
1626
  ]
1624
1627
  });
1625
1628
  }
1626
- function J({ open: n, onOpenChange: r, trigger: i, dialogTitle: a, dialogDescription: o, onClose: s, className: c, dialogClassName: u, contentClassName: d, closeOnEscape: f = !0, closeOnBackdropClick: p = !0, ...m }) {
1627
- let h = e(pe, m.strings), [g, _] = O(!1), [v, y] = O(null), b = n !== void 0, x = b ? n : g, S = (e) => {
1628
- b || _(e), r?.(e);
1629
+ function Q({ open: e, onOpenChange: t, trigger: i, dialogTitle: a, dialogDescription: o, onClose: s, className: c, dialogClassName: l, contentClassName: u, closeOnEscape: d = !0, closeOnBackdropClick: p = !0, ...m }) {
1630
+ let h = n(ge, m.strings), [g, _] = M(!1), [v, y] = M(null), b = e !== void 0, x = b ? e : g, S = (e) => {
1631
+ b || _(e), t?.(e);
1629
1632
  }, C = () => {
1630
1633
  S(!1), s?.();
1631
1634
  };
1632
- return /* @__PURE__ */ k(Le.Provider, {
1635
+ return /* @__PURE__ */ P(X.Provider, {
1633
1636
  value: { element: v },
1634
- children: /* @__PURE__ */ k(l, {
1637
+ children: /* @__PURE__ */ P(f, {
1635
1638
  open: x,
1636
1639
  onOpenChange: S,
1637
1640
  onClose: s,
@@ -1641,18 +1644,18 @@ function J({ open: n, onOpenChange: r, trigger: i, dialogTitle: a, dialogDescrip
1641
1644
  size: "full",
1642
1645
  showCancel: !1,
1643
1646
  showConfirm: !1,
1644
- footer: /* @__PURE__ */ k("div", {
1647
+ footer: /* @__PURE__ */ P("div", {
1645
1648
  ref: y,
1646
1649
  className: "media-library-dialog--footer @container/media-library w-full"
1647
1650
  }),
1648
- className: t("media-library-dialog--component max-h-[calc(100vh-2rem)] max-w-[min(1060px,calc(100vw-2rem))] sm:max-w-[min(1060px,calc(100vw-2rem))]", u),
1649
- contentClassName: t("media-library-dialog--body flex min-h-0 flex-col overflow-hidden p-0", d),
1651
+ className: r("media-library-dialog--component max-h-[calc(100vh-2rem)] max-w-[min(1060px,calc(100vw-2rem))] sm:max-w-[min(1060px,calc(100vw-2rem))]", l),
1652
+ contentClassName: r("media-library-dialog--body flex min-h-0 flex-col overflow-hidden p-0", u),
1650
1653
  closeOnBackdropClick: p,
1651
- closeOnEscape: f,
1652
- children: /* @__PURE__ */ k(q, {
1654
+ closeOnEscape: d,
1655
+ children: /* @__PURE__ */ P(Z, {
1653
1656
  ...m,
1654
1657
  onClose: C,
1655
- className: t("media-library-dialog--library rounded-none border-0", c),
1658
+ className: r("media-library-dialog--library rounded-none border-0", c),
1656
1659
  heightClassName: m.heightClassName ?? "min-h-0 flex-1",
1657
1660
  strings: m.strings
1658
1661
  })
@@ -1661,47 +1664,45 @@ function J({ open: n, onOpenChange: r, trigger: i, dialogTitle: a, dialogDescrip
1661
1664
  }
1662
1665
  //#endregion
1663
1666
  //#region src/components/features/media-library/media-resource-gallery.tsx
1664
- function Y(e, t, n) {
1667
+ function Ve(e, t, n) {
1665
1668
  let r = e.slice(), [i] = r.splice(t, 1);
1666
1669
  return i === void 0 || r.splice(n, 0, i), r;
1667
1670
  }
1668
- function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, onPrimaryChange: u, onRemove: f, onReorder: p, onAdd: m, maxItems: g, layout: _ = "field", density: v = "comfortable", readOnly: y = !1, empty: b, action: x, renderItem: S, strings: C, className: w, ...T }) {
1669
- let E = e(pe, C), D = _e(a), O = i.length, ee = l ?? (O > 0 ? D.getId(i[0]) : void 0), j = !y && !!m && (g === void 0 || O < g), re = j && (_ === "field" || O > 0) ? /* @__PURE__ */ k(n, {
1671
+ function He({ items: e, accessors: t, title: a, description: s, primaryId: l, onPrimaryChange: u, onRemove: d, onReorder: f, onAdd: p, maxItems: h, layout: g = "field", density: _ = "comfortable", readOnly: y = !1, empty: b, action: x, renderItem: S, strings: C, className: w, ...T }) {
1672
+ let E = n(ge, C), D = be(t), O = e.length, ee = l ?? (O > 0 ? D.getId(e[0]) : void 0), k = !y && !!p && (h === void 0 || O < h), A = k && (g === "field" || O > 0) ? /* @__PURE__ */ P(o, {
1670
1673
  type: "button",
1671
1674
  tone: "secondary",
1672
1675
  buttonStyle: "outline",
1673
- icon: I,
1674
- onClick: m,
1676
+ icon: ce,
1677
+ onClick: p,
1675
1678
  children: E.gallery.add
1676
- }) : g !== void 0 && O >= g ? /* @__PURE__ */ k(h, {
1679
+ }) : h !== void 0 && O >= h ? /* @__PURE__ */ P(v, {
1677
1680
  tone: "secondary",
1678
1681
  children: E.gallery.maxReached
1679
- }) : null, N = (e, t) => {
1680
- if (t < 0 || t >= O || e === t) return;
1681
- let n = Y(i, e, t);
1682
- p?.(n.map((e) => D.getId(e)), n);
1683
- }, P = !!(s || c || x || re), ae = O === 0 && _ !== "field", oe = () => !j || _ !== "field" ? null : /* @__PURE__ */ A(n, {
1682
+ }) : null, j = (t, n) => {
1683
+ if (n < 0 || n >= O || t === n) return;
1684
+ let r = Ve(e, t, n);
1685
+ f?.(r.map((e) => D.getId(e)), r);
1686
+ }, M = !!(a || s || x || A), N = O === 0 && g !== "field", ne = () => !k || g !== "field" ? null : /* @__PURE__ */ F("button", {
1684
1687
  type: "button",
1685
- tone: "secondary",
1686
- buttonStyle: "ghost",
1687
- className: t("media-resource-gallery--add-tile h-auto min-h-24 w-full flex-col rounded-radius border border-dashed border-border bg-background text-muted-foreground shadow-none", "aspect-square hover:border-primary-accent/50 hover:bg-primary/5 hover:text-primary-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),
1688
+ className: r("media-resource-gallery--add-tile box-border m-0 inline-flex w-full cursor-pointer items-center justify-center p-space-md font-sans rounded-radius border border-dashed border-border bg-background text-muted-foreground shadow-none", "aspect-square hover:border-primary-accent/50 hover:bg-primary/5 hover:text-primary-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),
1688
1689
  "aria-label": E.gallery.addTile,
1689
- onClick: m,
1690
- children: [/* @__PURE__ */ k(I, { className: "size-icon" }), /* @__PURE__ */ k(r, {
1690
+ onClick: p,
1691
+ children: [/* @__PURE__ */ P(ce, { className: "size-icon" }), /* @__PURE__ */ P(i, {
1691
1692
  tag: "span",
1692
1693
  size: "inherit",
1693
1694
  className: "sr-only",
1694
1695
  children: E.gallery.addTile
1695
1696
  })]
1696
1697
  });
1697
- return /* @__PURE__ */ A("section", {
1698
- className: t("media-resource-gallery--component @container/media-resource-gallery rounded-radius border border-border bg-card shadow-xs", w),
1699
- "data-layout": _,
1700
- "data-density": v,
1698
+ return /* @__PURE__ */ F("section", {
1699
+ className: r("media-resource-gallery--component @container/media-resource-gallery rounded-radius border border-border bg-card shadow-xs", w),
1700
+ "data-layout": g,
1701
+ "data-gallery-density": _,
1701
1702
  ...T,
1702
- children: [P && /* @__PURE__ */ k("header", {
1703
+ children: [M && /* @__PURE__ */ P("header", {
1703
1704
  className: "media-resource-gallery--header p-surface",
1704
- children: /* @__PURE__ */ A(o, {
1705
+ children: /* @__PURE__ */ F(c, {
1705
1706
  direction: {
1706
1707
  base: "vertical",
1707
1708
  md: "horizontal"
@@ -1709,82 +1710,82 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1709
1710
  gap: "lg",
1710
1711
  align: { md: "start" },
1711
1712
  justify: { md: "between" },
1712
- children: [/* @__PURE__ */ A("div", {
1713
+ children: [/* @__PURE__ */ F(c, {
1714
+ gap: "normal",
1713
1715
  className: "min-w-0",
1714
- children: [!!s && /* @__PURE__ */ k(r, {
1716
+ children: [!!a && /* @__PURE__ */ P(i, {
1715
1717
  tag: "div",
1716
1718
  weight: "semibold",
1717
- children: s
1718
- }), !!c && /* @__PURE__ */ k(r, {
1719
+ children: a
1720
+ }), !!s && /* @__PURE__ */ P(i, {
1719
1721
  type: "secondary",
1720
- className: "mt-0.5",
1721
- children: c
1722
+ children: s
1722
1723
  })]
1723
- }), /* @__PURE__ */ k(o, {
1724
+ }), /* @__PURE__ */ P(c, {
1724
1725
  direction: "horizontal",
1725
1726
  wrap: !0,
1726
1727
  align: "center",
1727
1728
  gap: "md",
1728
1729
  className: "media-resource-gallery--actions",
1729
- children: x ?? re
1730
+ children: x ?? A
1730
1731
  })]
1731
1732
  })
1732
- }), ae ? /* @__PURE__ */ k("div", {
1733
+ }), N ? /* @__PURE__ */ P("div", {
1733
1734
  className: "media-resource-gallery--empty px-surface pb-surface",
1734
- children: b ?? /* @__PURE__ */ k(ke, {
1735
+ children: b ?? /* @__PURE__ */ P(Ne, {
1735
1736
  title: E.gallery.emptyTitle,
1736
1737
  description: E.gallery.emptyDescription,
1737
- action: j ? /* @__PURE__ */ k(n, {
1738
+ action: k ? /* @__PURE__ */ P(o, {
1738
1739
  type: "button",
1739
- icon: ie,
1740
- onClick: m,
1740
+ icon: ae,
1741
+ onClick: p,
1741
1742
  children: E.gallery.add
1742
1743
  }) : void 0
1743
1744
  })
1744
- }) : /* @__PURE__ */ A("div", {
1745
- className: t("grid min-w-0 grid-cols-1", _ === "list" ? "gap-space-md" : "gap-space-lg", "media-resource-gallery--items p-surface", P && "pt-0", _ === "list" ? void 0 : _ === "field" ? "grid-cols-[repeat(auto-fill,minmax(96px,1fr))] @md/media-resource-gallery:grid-cols-[repeat(auto-fill,minmax(108px,1fr))]" : v === "compact" ? "grid-cols-[repeat(auto-fill,minmax(132px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(164px,1fr))]"),
1746
- children: [i.map((e, i) => {
1747
- let a = D.getId(e), s = D.getName(e), c = D.getType(e), l = D.getSrc(e), p = D.getAlt(e) || s, m = a === ee, g = D.getPublic(e) === !1, b = D.getDuration(e), x = i > 0, C = i < O - 1, w = S?.(e, {
1748
- id: a,
1749
- index: i,
1745
+ }) : /* @__PURE__ */ F("div", {
1746
+ className: r("grid min-w-0 grid-cols-1", g === "list" ? "gap-space-md" : "gap-space-lg", "media-resource-gallery--items p-surface", M && "pt-0", g === "list" ? void 0 : g === "field" ? "grid-cols-[repeat(auto-fill,minmax(96px,1fr))] @md/media-resource-gallery:grid-cols-[repeat(auto-fill,minmax(108px,1fr))]" : _ === "compact" ? "grid-cols-[repeat(auto-fill,minmax(132px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(164px,1fr))]"),
1747
+ children: [e.map((e, t) => {
1748
+ let n = D.getId(e), a = D.getName(e), s = D.getType(e), l = D.getSrc(e), f = D.getAlt(e) || a, p = n === ee, h = D.getPublic(e) === !1, b = D.getDuration(e), x = t > 0, C = t < O - 1, w = S?.(e, {
1749
+ id: n,
1750
+ index: t,
1750
1751
  total: O,
1751
- primary: m,
1752
+ primary: p,
1752
1753
  accessors: D,
1753
1754
  canMovePrevious: x,
1754
1755
  canMoveNext: C,
1755
- setPrimary: () => u?.(a, e),
1756
- remove: () => f?.(a, e),
1757
- movePrevious: () => N(i, i - 1),
1758
- moveNext: () => N(i, i + 1)
1756
+ setPrimary: () => u?.(n, e),
1757
+ remove: () => d?.(n, e),
1758
+ movePrevious: () => j(t, t - 1),
1759
+ moveNext: () => j(t, t + 1)
1759
1760
  });
1760
- return w ? /* @__PURE__ */ k("div", { children: w }, a) : _ === "field" ? /* @__PURE__ */ A("div", {
1761
- className: t("media-resource-gallery--item group/gallery relative aspect-square overflow-hidden rounded-radius border border-border bg-background shadow-xs", "transition-colors hover:border-primary/40 focus-within:border-primary/50", m && "col-span-2 row-span-2 min-h-52"),
1762
- "data-primary": m || void 0,
1761
+ return w ? /* @__PURE__ */ P("div", { children: w }, n) : g === "field" ? /* @__PURE__ */ F("div", {
1762
+ className: r("media-resource-gallery--item group/gallery relative aspect-square overflow-hidden rounded-radius border border-border bg-background shadow-xs", "transition-colors hover:border-primary/40 focus-within:border-primary/50", p && "col-span-2 row-span-2 min-h-52"),
1763
+ "data-primary": p || void 0,
1763
1764
  children: [
1764
- l ? /* @__PURE__ */ k("img", {
1765
+ l ? /* @__PURE__ */ P("img", {
1765
1766
  src: l,
1766
- alt: p,
1767
+ alt: f,
1767
1768
  loading: "lazy",
1768
1769
  className: "size-full object-cover"
1769
- }) : /* @__PURE__ */ k("div", {
1770
+ }) : /* @__PURE__ */ P("div", {
1770
1771
  className: "flex size-full items-center justify-center bg-muted text-muted-foreground",
1771
- children: /* @__PURE__ */ k(M, { className: m ? "size-7" : "size-icon-lg" })
1772
+ children: /* @__PURE__ */ P(re, { className: p ? "size-7" : "size-icon-lg" })
1772
1773
  }),
1773
- m && /* @__PURE__ */ k(h, {
1774
+ p && /* @__PURE__ */ P(v, {
1774
1775
  tone: "secondary",
1775
1776
  className: "absolute left-2 top-2 bg-background/90 shadow-xs",
1776
1777
  children: E.gallery.cover
1777
1778
  }),
1778
- c === "video" && !!b && /* @__PURE__ */ A(h, {
1779
+ s === "video" && !!b && /* @__PURE__ */ F(v, {
1779
1780
  tone: "secondary",
1780
1781
  className: "absolute bottom-2 left-2 bg-foreground text-background",
1781
- children: [/* @__PURE__ */ k(se, { className: "size-icon-sm fill-current" }), b]
1782
+ children: [/* @__PURE__ */ P(B, { className: "size-icon-sm fill-current" }), b]
1782
1783
  }),
1783
- g && /* @__PURE__ */ k("span", {
1784
+ h && /* @__PURE__ */ P("span", {
1784
1785
  className: "absolute bottom-2 right-2 inline-flex size-6 items-center justify-center rounded-full border border-border bg-background/90 text-muted-foreground shadow-xs",
1785
- children: /* @__PURE__ */ k(F, { className: "size-icon-sm" })
1786
+ children: /* @__PURE__ */ P(se, { className: "size-icon-sm" })
1786
1787
  }),
1787
- !y && /* @__PURE__ */ k(n, {
1788
+ !y && /* @__PURE__ */ P(o, {
1788
1789
  type: "button",
1789
1790
  tone: "secondary",
1790
1791
  buttonStyle: "solid",
@@ -1792,57 +1793,57 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1792
1793
  iconOnly: !0,
1793
1794
  className: "absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/gallery:opacity-100 group-focus-within/gallery:opacity-100",
1794
1795
  "aria-label": E.gallery.remove,
1795
- onClick: () => f?.(a, e),
1796
- children: /* @__PURE__ */ k(de, { className: "size-icon-md" })
1796
+ onClick: () => d?.(n, e),
1797
+ children: /* @__PURE__ */ P(me, { className: "size-icon-md" })
1797
1798
  })
1798
1799
  ]
1799
- }, a) : _ === "list" ? /* @__PURE__ */ A(o, {
1800
+ }, n) : g === "list" ? /* @__PURE__ */ F(c, {
1800
1801
  direction: "horizontal",
1801
1802
  wrap: !0,
1802
1803
  align: "center",
1803
1804
  gap: "lg",
1804
- className: t("media-resource-gallery--item min-w-0 rounded-radius border border-border bg-background px-row-x", v === "compact" ? "py-row-y-sm" : "py-row-y"),
1805
- "data-primary": m || void 0,
1805
+ className: r("media-resource-gallery--item min-w-0 rounded-radius border border-border bg-background px-row-x", _ === "compact" ? "py-row-y-sm" : "py-row-y"),
1806
+ "data-primary": p || void 0,
1806
1807
  children: [
1807
- /* @__PURE__ */ k("div", {
1808
- className: "relative size-12 shrink-0 overflow-hidden rounded-radius-md bg-muted",
1809
- children: l ? /* @__PURE__ */ k("img", {
1808
+ /* @__PURE__ */ P("div", {
1809
+ className: "relative size-12 shrink-0 overflow-hidden rounded-inner bg-muted",
1810
+ children: l ? /* @__PURE__ */ P("img", {
1810
1811
  src: l,
1811
- alt: p,
1812
+ alt: f,
1812
1813
  loading: "lazy",
1813
1814
  className: "size-full object-cover"
1814
- }) : /* @__PURE__ */ k("div", {
1815
+ }) : /* @__PURE__ */ P("div", {
1815
1816
  className: "flex size-full items-center justify-center text-muted-foreground",
1816
- children: /* @__PURE__ */ k(M, { className: "size-icon" })
1817
+ children: /* @__PURE__ */ P(re, { className: "size-icon" })
1817
1818
  })
1818
1819
  }),
1819
- /* @__PURE__ */ A("div", {
1820
+ /* @__PURE__ */ F("div", {
1820
1821
  className: "min-w-0 flex-1",
1821
- children: [/* @__PURE__ */ A(o, {
1822
+ children: [/* @__PURE__ */ F(c, {
1822
1823
  direction: "horizontal",
1823
1824
  wrap: !0,
1824
1825
  align: "center",
1825
1826
  gap: "md",
1826
1827
  className: "min-w-0",
1827
- children: [/* @__PURE__ */ k(r, {
1828
+ children: [/* @__PURE__ */ P(i, {
1828
1829
  tag: "div",
1829
1830
  weight: "semibold",
1830
1831
  className: "min-w-0 break-all",
1831
- children: s
1832
- }), m && /* @__PURE__ */ k(h, {
1832
+ children: a
1833
+ }), p && /* @__PURE__ */ P(v, {
1833
1834
  tone: "info",
1834
1835
  children: E.gallery.primary
1835
1836
  })]
1836
- }), /* @__PURE__ */ A(r, {
1837
+ }), /* @__PURE__ */ F(i, {
1837
1838
  size: "xs",
1838
1839
  type: "secondary",
1839
1840
  children: [
1840
- z(E.gallery.itemPosition, {
1841
- index: i + 1,
1841
+ V(E.gallery.itemPosition, {
1842
+ index: t + 1,
1842
1843
  total: O
1843
1844
  }),
1844
1845
  " · ",
1845
- /* @__PURE__ */ k(d, {
1846
+ /* @__PURE__ */ P(m, {
1846
1847
  value: D.getSize(e),
1847
1848
  size: "xs",
1848
1849
  align: "left",
@@ -1851,21 +1852,21 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1851
1852
  ]
1852
1853
  })]
1853
1854
  }),
1854
- !y && /* @__PURE__ */ A("div", {
1855
+ !y && /* @__PURE__ */ F("div", {
1855
1856
  className: "media-resource-gallery--item-actions flex basis-full flex-wrap items-center justify-end gap-space-xs @sm/media-resource-gallery:basis-auto",
1856
1857
  children: [
1857
- /* @__PURE__ */ k(n, {
1858
+ /* @__PURE__ */ P(o, {
1858
1859
  type: "button",
1859
1860
  tone: "secondary",
1860
1861
  buttonStyle: "ghost",
1861
1862
  size: "sm",
1862
1863
  iconOnly: !0,
1863
- disabled: m,
1864
+ disabled: p,
1864
1865
  "aria-label": E.gallery.setPrimary,
1865
- onClick: () => u?.(a, e),
1866
- children: /* @__PURE__ */ k(L, { className: "size-icon-md" })
1866
+ onClick: () => u?.(n, e),
1867
+ children: /* @__PURE__ */ P(ue, { className: "size-icon-md" })
1867
1868
  }),
1868
- /* @__PURE__ */ k(n, {
1869
+ /* @__PURE__ */ P(o, {
1869
1870
  type: "button",
1870
1871
  tone: "secondary",
1871
1872
  buttonStyle: "ghost",
@@ -1873,10 +1874,10 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1873
1874
  iconOnly: !0,
1874
1875
  disabled: !x,
1875
1876
  "aria-label": E.gallery.movePrevious,
1876
- onClick: () => N(i, i - 1),
1877
- children: /* @__PURE__ */ k(te, { className: "size-icon-md" })
1877
+ onClick: () => j(t, t - 1),
1878
+ children: /* @__PURE__ */ P(I, { className: "size-icon-md" })
1878
1879
  }),
1879
- /* @__PURE__ */ k(n, {
1880
+ /* @__PURE__ */ P(o, {
1880
1881
  type: "button",
1881
1882
  tone: "secondary",
1882
1883
  buttonStyle: "ghost",
@@ -1884,82 +1885,82 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1884
1885
  iconOnly: !0,
1885
1886
  disabled: !C,
1886
1887
  "aria-label": E.gallery.moveNext,
1887
- onClick: () => N(i, i + 1),
1888
- children: /* @__PURE__ */ k(ne, { className: "size-icon-md" })
1888
+ onClick: () => j(t, t + 1),
1889
+ children: /* @__PURE__ */ P(te, { className: "size-icon-md" })
1889
1890
  }),
1890
- /* @__PURE__ */ k(n, {
1891
+ /* @__PURE__ */ P(o, {
1891
1892
  type: "button",
1892
1893
  tone: "destructive",
1893
1894
  buttonStyle: "ghost",
1894
1895
  size: "sm",
1895
1896
  iconOnly: !0,
1896
1897
  "aria-label": E.gallery.remove,
1897
- onClick: () => f?.(a, e),
1898
- children: /* @__PURE__ */ k(le, { className: "size-icon-md" })
1898
+ onClick: () => d?.(n, e),
1899
+ children: /* @__PURE__ */ P(de, { className: "size-icon-md" })
1899
1900
  })
1900
1901
  ]
1901
1902
  })
1902
1903
  ]
1903
- }, a) : /* @__PURE__ */ A("div", {
1904
+ }, n) : /* @__PURE__ */ F("div", {
1904
1905
  className: "media-resource-gallery--item group/gallery overflow-hidden rounded-radius border border-border bg-background shadow-xs transition-colors hover:border-primary/40",
1905
- "data-primary": m || void 0,
1906
- children: [/* @__PURE__ */ A("div", {
1906
+ "data-primary": p || void 0,
1907
+ children: [/* @__PURE__ */ F("div", {
1907
1908
  className: "relative aspect-[4/3] bg-muted",
1908
- children: [l ? /* @__PURE__ */ k("img", {
1909
+ children: [l ? /* @__PURE__ */ P("img", {
1909
1910
  src: l,
1910
- alt: p,
1911
+ alt: f,
1911
1912
  loading: "lazy",
1912
1913
  className: "size-full object-cover"
1913
- }) : /* @__PURE__ */ k("div", {
1914
+ }) : /* @__PURE__ */ P("div", {
1914
1915
  className: "flex size-full items-center justify-center text-muted-foreground",
1915
- children: /* @__PURE__ */ k(M, { className: "size-6" })
1916
- }), /* @__PURE__ */ A("div", {
1916
+ children: /* @__PURE__ */ P(re, { className: "size-6" })
1917
+ }), /* @__PURE__ */ F("div", {
1917
1918
  className: "absolute left-2 top-2 flex flex-wrap gap-space-xs",
1918
- children: [m && /* @__PURE__ */ k(h, {
1919
+ children: [p && /* @__PURE__ */ P(v, {
1919
1920
  tone: "info",
1920
1921
  className: "bg-card",
1921
1922
  children: E.gallery.primary
1922
- }), /* @__PURE__ */ k(h, {
1923
+ }), /* @__PURE__ */ P(v, {
1923
1924
  tone: "secondary",
1924
1925
  className: "bg-card text-card-foreground",
1925
- children: z(E.gallery.itemPosition, {
1926
- index: i + 1,
1926
+ children: V(E.gallery.itemPosition, {
1927
+ index: t + 1,
1927
1928
  total: O
1928
1929
  })
1929
1930
  })]
1930
1931
  })]
1931
- }), /* @__PURE__ */ k("div", {
1932
- className: t("media-resource-gallery--item-body", v === "compact" ? "p-surface-xs" : "p-surface"),
1933
- children: /* @__PURE__ */ A(o, {
1932
+ }), /* @__PURE__ */ P("div", {
1933
+ className: r("media-resource-gallery--item-body", _ === "compact" ? "p-surface-xs" : "p-surface"),
1934
+ children: /* @__PURE__ */ F(c, {
1934
1935
  gap: "md",
1935
- children: [/* @__PURE__ */ A("div", {
1936
+ children: [/* @__PURE__ */ F("div", {
1936
1937
  className: "min-w-0",
1937
- children: [/* @__PURE__ */ k(r, {
1938
+ children: [/* @__PURE__ */ P(i, {
1938
1939
  tag: "div",
1939
1940
  weight: "semibold",
1940
1941
  className: "truncate",
1941
- children: s
1942
- }), /* @__PURE__ */ k(d, {
1942
+ children: a
1943
+ }), /* @__PURE__ */ P(m, {
1943
1944
  value: D.getSize(e),
1944
1945
  size: "xs",
1945
1946
  align: "left",
1946
1947
  emptyLabel: E.unknownSize
1947
1948
  })]
1948
- }), !y && /* @__PURE__ */ A("div", {
1949
+ }), !y && /* @__PURE__ */ F("div", {
1949
1950
  className: "flex items-center gap-space-xs",
1950
1951
  children: [
1951
- /* @__PURE__ */ k(n, {
1952
+ /* @__PURE__ */ P(o, {
1952
1953
  type: "button",
1953
1954
  tone: "secondary",
1954
1955
  buttonStyle: "ghost",
1955
1956
  size: "sm",
1956
1957
  iconOnly: !0,
1957
- disabled: m,
1958
+ disabled: p,
1958
1959
  "aria-label": E.gallery.setPrimary,
1959
- onClick: () => u?.(a, e),
1960
- children: /* @__PURE__ */ k(L, { className: "size-icon-md" })
1960
+ onClick: () => u?.(n, e),
1961
+ children: /* @__PURE__ */ P(ue, { className: "size-icon-md" })
1961
1962
  }),
1962
- /* @__PURE__ */ k(n, {
1963
+ /* @__PURE__ */ P(o, {
1963
1964
  type: "button",
1964
1965
  tone: "secondary",
1965
1966
  buttonStyle: "ghost",
@@ -1967,10 +1968,10 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1967
1968
  iconOnly: !0,
1968
1969
  disabled: !x,
1969
1970
  "aria-label": E.gallery.movePrevious,
1970
- onClick: () => N(i, i - 1),
1971
- children: /* @__PURE__ */ k(te, { className: "size-icon-md" })
1971
+ onClick: () => j(t, t - 1),
1972
+ children: /* @__PURE__ */ P(I, { className: "size-icon-md" })
1972
1973
  }),
1973
- /* @__PURE__ */ k(n, {
1974
+ /* @__PURE__ */ P(o, {
1974
1975
  type: "button",
1975
1976
  tone: "secondary",
1976
1977
  buttonStyle: "ghost",
@@ -1978,10 +1979,10 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1978
1979
  iconOnly: !0,
1979
1980
  disabled: !C,
1980
1981
  "aria-label": E.gallery.moveNext,
1981
- onClick: () => N(i, i + 1),
1982
- children: /* @__PURE__ */ k(ne, { className: "size-icon-md" })
1982
+ onClick: () => j(t, t + 1),
1983
+ children: /* @__PURE__ */ P(te, { className: "size-icon-md" })
1983
1984
  }),
1984
- /* @__PURE__ */ k(n, {
1985
+ /* @__PURE__ */ P(o, {
1985
1986
  type: "button",
1986
1987
  tone: "destructive",
1987
1988
  buttonStyle: "ghost",
@@ -1989,19 +1990,19 @@ function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, on
1989
1990
  iconOnly: !0,
1990
1991
  className: "ml-auto",
1991
1992
  "aria-label": E.gallery.remove,
1992
- onClick: () => f?.(a, e),
1993
- children: /* @__PURE__ */ k(le, { className: "size-icon-md" })
1993
+ onClick: () => d?.(n, e),
1994
+ children: /* @__PURE__ */ P(de, { className: "size-icon-md" })
1994
1995
  })
1995
1996
  ]
1996
1997
  })]
1997
1998
  })
1998
1999
  })]
1999
- }, a);
2000
- }), oe()]
2000
+ }, n);
2001
+ }), ne()]
2001
2002
  })]
2002
2003
  });
2003
2004
  }
2004
2005
  //#endregion
2005
- export { q as MediaLibrary, je as MediaLibraryCard, Ne as MediaLibraryDetailPanel, J as MediaLibraryDialog, ke as MediaLibraryEmptyState, Ie as MediaLibraryFooter, Me as MediaLibraryList, Ae as MediaLibraryToolbar, K as MediaLibraryUploadPanel, ze as MediaResourceGallery, pe as defaultMediaLibraryStrings, ve as formatMediaLibrarySize, z as formatMediaLibraryString, ye as getMediaLibraryDimensions, _e as resolveMediaLibraryAccessors, Ee as useMediaLibrary };
2006
+ export { Z as MediaLibrary, Fe as MediaLibraryCard, Le as MediaLibraryDetailPanel, Q as MediaLibraryDialog, Ne as MediaLibraryEmptyState, ze as MediaLibraryFooter, Ie as MediaLibraryList, Pe as MediaLibraryToolbar, Re as MediaLibraryUploadPanel, He as MediaResourceGallery, ge as defaultMediaLibraryStrings, xe as formatMediaLibrarySize, V as formatMediaLibraryString, U as getMediaLibraryDimensions, be as resolveMediaLibraryAccessors, Ae as useMediaLibrary };
2006
2007
 
2007
2008
  //# sourceMappingURL=media-library.js.map