themelia-react-ui 2.0.0 → 2.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 (707) hide show
  1. package/CHANGELOG.md +527 -0
  2. package/README.md +47 -14
  3. package/THIRD_PARTY_NOTICES.md +13 -0
  4. package/dist/accordion-Cjb6sx0G.js +208 -0
  5. package/dist/accordion-Cjb6sx0G.js.map +1 -0
  6. package/dist/action-menu-CllU52Mm.js +280 -0
  7. package/dist/action-menu-CllU52Mm.js.map +1 -0
  8. package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
  9. package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
  10. package/dist/ai-artifact-DvTwDVyL.js +1148 -0
  11. package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
  12. package/dist/{app-shell-BE_j8-AT.js → app-shell-C4FhvCqF.js} +5 -5
  13. package/dist/{app-shell-BE_j8-AT.js.map → app-shell-C4FhvCqF.js.map} +1 -1
  14. package/dist/attachment-BxDfL2mw.js +246 -0
  15. package/dist/attachment-BxDfL2mw.js.map +1 -0
  16. package/dist/{auth-M3vGMgDR.js → auth-ax2BqjrI.js} +241 -235
  17. package/dist/auth-ax2BqjrI.js.map +1 -0
  18. package/dist/{avatar-djdaaQ_s.js → avatar-DAPlDvhJ.js} +67 -66
  19. package/dist/avatar-DAPlDvhJ.js.map +1 -0
  20. package/dist/badge-HpFqoqSY.js +93 -0
  21. package/dist/badge-HpFqoqSY.js.map +1 -0
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +3 -0
  28. package/dist/base/buttons.js +2 -3
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +50 -46
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +69 -81
  33. package/dist/base/cascader.js.map +1 -1
  34. package/dist/base/chart.js +1 -1
  35. package/dist/base/choice-inputs.js +3 -3
  36. package/dist/base/code-block.js +1 -1
  37. package/dist/base/combobox.js +2 -2
  38. package/dist/base/command.js +1 -1
  39. package/dist/base/copyable.js +1 -1
  40. package/dist/base/date-pickers.js +2 -2
  41. package/dist/base/display.js +7 -7
  42. package/dist/base/feedback.js +3 -3
  43. package/dist/base/forms-numeric.js +1 -1
  44. package/dist/base/forms.js +2 -2
  45. package/dist/base/inline-edit.js +20 -20
  46. package/dist/base/inline-edit.js.map +1 -1
  47. package/dist/base/item.js +1 -1
  48. package/dist/base/media-gallery.js +1 -1
  49. package/dist/base/metadata-list.js +3 -0
  50. package/dist/base/navigation.js +7 -7
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +1 -1
  54. package/dist/base/repeaters.js +216 -220
  55. package/dist/base/repeaters.js.map +1 -1
  56. package/dist/base/sheet.js +1 -1
  57. package/dist/base/sidebar.js +1 -1
  58. package/dist/base/signature-pad.js +147 -137
  59. package/dist/base/signature-pad.js.map +1 -1
  60. package/dist/base/skeleton.js +1 -1
  61. package/dist/base/spinner.js +79 -2
  62. package/dist/base/spinner.js.map +1 -0
  63. package/dist/base/structure.js +1 -1
  64. package/dist/base/table.js +1 -1
  65. package/dist/base/text-inputs.js +2 -2
  66. package/dist/base/toaster.js +46 -45
  67. package/dist/base/toaster.js.map +1 -1
  68. package/dist/base/tree.js +1 -1
  69. package/dist/base/upload-queue.js +1 -1
  70. package/dist/base/upload.js +3 -3
  71. package/dist/base/value-inputs.js +2 -2
  72. package/dist/batch-action-bar-DnUJ21NQ.js +105 -0
  73. package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
  74. package/dist/blocks/admin.js +171 -169
  75. package/dist/blocks/admin.js.map +1 -1
  76. package/dist/blocks/ai.js +308 -285
  77. package/dist/blocks/ai.js.map +1 -1
  78. package/dist/blocks/analytics/usage-card.js +1 -1
  79. package/dist/blocks/analytics.js +626 -589
  80. package/dist/blocks/analytics.js.map +1 -1
  81. package/dist/blocks/collaboration.js +1 -1
  82. package/dist/blocks/commerce/receipt.js +1 -1
  83. package/dist/blocks/commerce.js +2051 -1329
  84. package/dist/blocks/commerce.js.map +1 -1
  85. package/dist/blocks/data-display.js +3 -2
  86. package/dist/blocks/onboarding.js +68 -58
  87. package/dist/blocks/onboarding.js.map +1 -1
  88. package/dist/blocks/planning.js +27 -26
  89. package/dist/blocks/planning.js.map +1 -1
  90. package/dist/blocks/timelines.js +1 -1
  91. package/dist/breadcrumbs-C-oqs1sQ.js +129 -0
  92. package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
  93. package/dist/{button-R9CCoH7A.js → button-DVzspB_G.js} +15 -14
  94. package/dist/button-DVzspB_G.js.map +1 -0
  95. package/dist/{button-BS3KDg00.js → buttons-DPZekJFu.js} +208 -216
  96. package/dist/buttons-DPZekJFu.js.map +1 -0
  97. package/dist/cards-BaBZR-AU.js +68 -0
  98. package/dist/cards-BaBZR-AU.js.map +1 -0
  99. package/dist/{chart-DwYRKKc-.js → chart-ZOYyK2xG.js} +58 -55
  100. package/dist/chart-ZOYyK2xG.js.map +1 -0
  101. package/dist/checkbox-AWIhNhmo.js +36 -0
  102. package/dist/checkbox-AWIhNhmo.js.map +1 -0
  103. package/dist/choice-inputs-CNHvARCJ.js +770 -0
  104. package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
  105. package/dist/code-block-DeneBJR_.js +185 -0
  106. package/dist/code-block-DeneBJR_.js.map +1 -0
  107. package/dist/{collapsible-oMUGM4tr.js → collapsible-C-_l4hpy.js} +4 -4
  108. package/dist/{collapsible-oMUGM4tr.js.map → collapsible-C-_l4hpy.js.map} +1 -1
  109. package/dist/{collection-content-Ys-OZOkY.js → collection-content-By56pLog.js} +3 -3
  110. package/dist/{collection-content-Ys-OZOkY.js.map → collection-content-By56pLog.js.map} +1 -1
  111. package/dist/combobox-C0EQW6dr.js +875 -0
  112. package/dist/combobox-C0EQW6dr.js.map +1 -0
  113. package/dist/combobox-xCQ2RMNE.js +309 -0
  114. package/dist/combobox-xCQ2RMNE.js.map +1 -0
  115. package/dist/{command-kPMPjIxJ.js → command-C25VMRII.js} +7 -7
  116. package/dist/{command-kPMPjIxJ.js.map → command-C25VMRII.js.map} +1 -1
  117. package/dist/{comments-You0Bzbr.js → comments-BYYlTA8E.js} +390 -379
  118. package/dist/comments-BYYlTA8E.js.map +1 -0
  119. package/dist/components/base/action-menu/action-menu.d.ts +21 -4
  120. package/dist/components/base/action-menu/action-menu.recipes.d.ts +21 -0
  121. package/dist/components/base/action-menu/index.d.ts +1 -0
  122. package/dist/components/base/badge/badge.recipes.d.ts +5 -5
  123. package/dist/components/base/batch-action-bar/batch-action-bar.d.ts +50 -0
  124. package/dist/components/base/batch-action-bar/batch-action-bar.strings.d.ts +20 -0
  125. package/dist/components/base/batch-action-bar/index.d.ts +8 -0
  126. package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
  127. package/dist/components/base/buttons/button.recipes.d.ts +2 -2
  128. package/dist/components/base/buttons/loader-button.d.ts +2 -1
  129. package/dist/components/base/cards/card.recipes.d.ts +2 -3
  130. package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
  131. package/dist/components/base/cards/smart-card.types.d.ts +11 -4
  132. package/dist/components/base/chart/chart.d.ts +2 -5
  133. package/dist/components/base/choice-inputs/checkbox.d.ts +2 -2
  134. package/dist/components/base/choice-inputs/choice-types.d.ts +18 -6
  135. package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
  136. package/dist/components/base/combobox/index.d.ts +30 -4
  137. package/dist/components/base/display/alert-dialog.d.ts +6 -5
  138. package/dist/components/base/display/dialog.d.ts +4 -8
  139. package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
  140. package/dist/components/base/forms/form-sizing.d.ts +26 -15
  141. package/dist/components/base/metadata-list/index.d.ts +12 -0
  142. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.d.ts +28 -25
  143. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-value.d.ts +2 -2
  144. package/dist/components/base/navigation/index.d.ts +1 -1
  145. package/dist/components/base/navigation/page-header/index.d.ts +1 -0
  146. package/dist/components/base/navigation/page-header/page-header-commands.d.ts +73 -0
  147. package/dist/components/base/navigation/page-header/page-header.d.ts +26 -3
  148. package/dist/components/base/navigation/pagination.d.ts +5 -2
  149. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  150. package/dist/components/base/sheet/sheet.d.ts +4 -8
  151. package/dist/components/base/signature-pad/signature-pad.types.d.ts +5 -1
  152. package/dist/components/base/signature-pad/signature-pad.utils.d.ts +11 -3
  153. package/dist/components/base/table/index.d.ts +9 -2
  154. package/dist/components/base/text-inputs/field-clear-button.d.ts +6 -0
  155. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  156. package/dist/components/base/upload/upload.recipes.d.ts +25 -3
  157. package/dist/components/base/value-inputs/index.d.ts +5 -5
  158. package/dist/components/base/value-inputs/tags-input.d.ts +36 -12
  159. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  160. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  161. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  162. package/dist/components/blocks/commerce/address-card/types.d.ts +2 -1
  163. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +3 -1
  164. package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
  165. package/dist/components/blocks/commerce/cart-summary/types.d.ts +6 -1
  166. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +3 -1
  167. package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
  168. package/dist/components/blocks/commerce/discount-stack/types.d.ts +16 -4
  169. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +5 -0
  170. package/dist/components/blocks/commerce/fulfillment-group/index.d.ts +2 -0
  171. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +45 -0
  172. package/dist/components/blocks/commerce/index.d.ts +13 -5
  173. package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
  174. package/dist/components/blocks/commerce/invoice-header/types.d.ts +4 -2
  175. package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +1 -1
  176. package/dist/components/blocks/commerce/invoice-mini/types.d.ts +2 -1
  177. package/dist/components/blocks/commerce/order-customer/index.d.ts +2 -0
  178. package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +5 -0
  179. package/dist/components/blocks/commerce/order-customer/types.d.ts +48 -0
  180. package/dist/components/blocks/commerce/order-header/index.d.ts +2 -0
  181. package/dist/components/blocks/commerce/order-header/order-header.d.ts +5 -0
  182. package/dist/components/blocks/commerce/order-header/types.d.ts +37 -0
  183. package/dist/components/blocks/commerce/order-line-item/index.d.ts +2 -0
  184. package/dist/components/blocks/commerce/order-line-item/order-line-item.d.ts +5 -0
  185. package/dist/components/blocks/commerce/order-line-item/types.d.ts +46 -0
  186. package/dist/components/blocks/commerce/order-summary/index.d.ts +2 -0
  187. package/dist/components/blocks/commerce/order-summary/order-summary.d.ts +5 -0
  188. package/dist/components/blocks/commerce/order-summary/types.d.ts +42 -0
  189. package/dist/components/blocks/commerce/order-transactions/index.d.ts +2 -0
  190. package/dist/components/blocks/commerce/order-transactions/order-transactions.d.ts +5 -0
  191. package/dist/components/blocks/commerce/order-transactions/types.d.ts +46 -0
  192. package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
  193. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +9 -1
  194. package/dist/components/blocks/commerce/payment-method/types.d.ts +12 -1
  195. package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
  196. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +3 -1
  197. package/dist/components/blocks/commerce/refund-status/types.d.ts +6 -3
  198. package/dist/components/blocks/commerce/shared/address-lines.d.ts +21 -0
  199. package/dist/components/blocks/commerce/shared/line-thumbnail.d.ts +9 -0
  200. package/dist/components/blocks/commerce/shared/order-status.d.ts +51 -0
  201. package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
  202. package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +27 -6
  203. package/dist/components/blocks/commerce/summary-panel/amount-row.d.ts +2 -0
  204. package/dist/components/blocks/commerce/summary-panel/index.d.ts +3 -0
  205. package/dist/components/blocks/commerce/summary-panel/summary-panel.d.ts +2 -0
  206. package/dist/components/blocks/commerce/summary-panel/types.d.ts +26 -0
  207. package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
  208. package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +2 -1
  209. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  210. package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
  211. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  212. package/dist/components/features/activities/partials/activity-row.d.ts +6 -2
  213. package/dist/components/features/activities/partials/tone-tokens.d.ts +0 -6
  214. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  215. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  216. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  217. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  218. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  219. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  220. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  221. package/dist/components/features/combobox/types.d.ts +4 -0
  222. package/dist/components/features/global-search/partials/global-search-group-heading.d.ts +15 -0
  223. package/dist/components/features/global-search/partials/tone-palettes.d.ts +0 -5
  224. package/dist/components/features/kanban/kanban.d.ts +1 -1
  225. package/dist/components/features/kanban/kanban.strings.d.ts +1 -1
  226. package/dist/components/features/kanban/kanban.types.d.ts +2 -2
  227. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  228. package/dist/components/features/media-library/index.d.ts +1 -1
  229. package/dist/components/features/media-library/media-library.d.ts +1 -1
  230. package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
  231. package/dist/components/features/media-library/media-library.types.d.ts +74 -1
  232. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  233. package/dist/components/features/mentions/partials/mention-kind-toggles.d.ts +16 -0
  234. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  235. package/dist/components/features/overlays/dialog.d.ts +1 -1
  236. package/dist/components/features/overlays/index.d.ts +1 -1
  237. package/dist/components/features/overlays/overlay-tone-icon.d.ts +3 -3
  238. package/dist/components/features/overlays/overlays.types.d.ts +20 -0
  239. package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
  240. package/dist/components/features/products/components/product-details-card.d.ts +5 -0
  241. package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
  242. package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
  243. package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
  244. package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
  245. package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
  246. package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
  247. package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
  248. package/dist/components/features/products/components/product-variant-action-menu.d.ts +23 -1
  249. package/dist/components/features/products/products.types.d.ts +9 -2
  250. package/dist/components/features/resource/index.d.ts +1 -1
  251. package/dist/components/features/resource/resource.d.ts +1 -1
  252. package/dist/components/features/resource/resource.types.d.ts +34 -6
  253. package/dist/components/features/rich-text-editor/index.d.ts +2 -1
  254. package/dist/components/features/rich-text-editor/partials/image-nodes.d.ts +13 -0
  255. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +66 -0
  256. package/dist/components/features/rich-text-editor/partials/inline-reference-node.d.ts +19 -0
  257. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +7 -1
  258. package/dist/components/features/rich-text-editor/rich-text-editor.strings.d.ts +14 -0
  259. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +54 -1
  260. package/dist/components/features/rich-text-editor/use-rich-text-images.d.ts +18 -0
  261. package/dist/components/features/sync/index.d.ts +26 -3
  262. package/dist/components/features/table/data-table.d.ts +1 -1
  263. package/dist/components/features/table/table-header.d.ts +1 -1
  264. package/dist/components/features/table/table.strings.d.ts +55 -1
  265. package/dist/components/features/table/table.types.d.ts +49 -11
  266. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  267. package/dist/components/layout/page/index.d.ts +1 -1
  268. package/dist/components/layout/page/page.types.d.ts +33 -36
  269. package/dist/components/layout/page/partials/page-actions.d.ts +1 -0
  270. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  271. package/dist/components/layout/settings/settings.d.ts +16 -2
  272. package/dist/components/layout/workspace/workspace.types.d.ts +21 -4
  273. package/dist/components/primitives/number.d.ts +4 -2
  274. package/dist/components/primitives/value.d.ts +3 -1
  275. package/dist/components/typography/rich-text/index.d.ts +1 -1
  276. package/dist/components/typography/rich-text/rich-text-tree.d.ts +19 -0
  277. package/dist/components/typography/rich-text/rich-text.d.ts +16 -0
  278. package/dist/components/typography/text-link.d.ts +8 -3
  279. package/dist/components/ui/checkbox.d.ts +4 -3
  280. package/dist/components/ui/combobox.d.ts +6 -2
  281. package/dist/components/ui/item.d.ts +8 -8
  282. package/dist/components/ui/overlay.recipes.d.ts +0 -9
  283. package/dist/components/ui/switch.d.ts +2 -2
  284. package/dist/components/ui/tabs.d.ts +1 -1
  285. package/dist/{containers-D_L4mTVb.js → containers-Mu1LMGV1.js} +36 -35
  286. package/dist/containers-Mu1LMGV1.js.map +1 -0
  287. package/dist/{copyable-DDjTeW_j.js → copyable-ClBuk_UK.js} +6 -6
  288. package/dist/{copyable-DDjTeW_j.js.map → copyable-ClBuk_UK.js.map} +1 -1
  289. package/dist/data-display-DT_khPl_.js +971 -0
  290. package/dist/data-display-DT_khPl_.js.map +1 -0
  291. package/dist/{date-uf3z37Nm.js → date-DCrsDTZc.js} +5 -5
  292. package/dist/{date-uf3z37Nm.js.map → date-DCrsDTZc.js.map} +1 -1
  293. package/dist/date-picker-ay0Pha_a.js +1530 -0
  294. package/dist/date-picker-ay0Pha_a.js.map +1 -0
  295. package/dist/date-pickers-Ccw8DL2b.js +175 -0
  296. package/dist/date-pickers-Ccw8DL2b.js.map +1 -0
  297. package/dist/display-hAc1HjpI.js +344 -0
  298. package/dist/display-hAc1HjpI.js.map +1 -0
  299. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  300. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  301. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  302. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  303. package/dist/features/activities.js +478 -542
  304. package/dist/features/activities.js.map +1 -1
  305. package/dist/features/ai-chat.js +209 -199
  306. package/dist/features/ai-chat.js.map +1 -1
  307. package/dist/features/appointment-calendar.js +683 -0
  308. package/dist/features/appointment-calendar.js.map +1 -0
  309. package/dist/features/async-preview.js +109 -107
  310. package/dist/features/async-preview.js.map +1 -1
  311. package/dist/features/combobox.js +1 -1
  312. package/dist/features/comments.js +1 -1
  313. package/dist/features/data-view.js +30 -29
  314. package/dist/features/data-view.js.map +1 -1
  315. package/dist/features/email-composer/engine.js +1 -1
  316. package/dist/features/email-composer.js +285 -283
  317. package/dist/features/email-composer.js.map +1 -1
  318. package/dist/features/event-calendar.js +282 -273
  319. package/dist/features/event-calendar.js.map +1 -1
  320. package/dist/features/filters.js +1 -1
  321. package/dist/features/global-search.js +318 -318
  322. package/dist/features/global-search.js.map +1 -1
  323. package/dist/features/kanban.js +146 -147
  324. package/dist/features/kanban.js.map +1 -1
  325. package/dist/features/map.js +269 -268
  326. package/dist/features/map.js.map +1 -1
  327. package/dist/features/media-library.js +970 -863
  328. package/dist/features/media-library.js.map +1 -1
  329. package/dist/features/mentions.js +1 -1
  330. package/dist/features/overlays.js +1 -1
  331. package/dist/features/products.js +1137 -1124
  332. package/dist/features/products.js.map +1 -1
  333. package/dist/features/questionnaire.js +206 -194
  334. package/dist/features/questionnaire.js.map +1 -1
  335. package/dist/features/resource-assignment.js +24 -21
  336. package/dist/features/resource-assignment.js.map +1 -1
  337. package/dist/features/resource.js +77 -69
  338. package/dist/features/resource.js.map +1 -1
  339. package/dist/features/rich-text-editor.js +30 -11
  340. package/dist/features/rich-text-editor.js.map +1 -1
  341. package/dist/features/schema-form.js +35 -33
  342. package/dist/features/schema-form.js.map +1 -1
  343. package/dist/features/suggestions.js +3 -3
  344. package/dist/features/sync.js +11 -5
  345. package/dist/features/sync.js.map +1 -1
  346. package/dist/features/table.js +1 -1
  347. package/dist/features/theme-tweaker.js +501 -496
  348. package/dist/features/theme-tweaker.js.map +1 -1
  349. package/dist/feedback-BYIhtitP.js +239 -0
  350. package/dist/feedback-BYIhtitP.js.map +1 -0
  351. package/dist/field-affordance-recipes-DZhnIL_Y.js +41 -0
  352. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  353. package/dist/field-state-recipes-BVA2CWHo.js +12 -0
  354. package/dist/field-state-recipes-BVA2CWHo.js.map +1 -0
  355. package/dist/{filters-Da-gNPsE.js → filters-BGfvjP4d.js} +483 -472
  356. package/dist/filters-BGfvjP4d.js.map +1 -0
  357. package/dist/focus-recipes-B653VaLq.js +12 -0
  358. package/dist/focus-recipes-B653VaLq.js.map +1 -0
  359. package/dist/{form-field-VZRULhUK.js → form-field-CwH9y77i.js} +6 -5
  360. package/dist/form-field-CwH9y77i.js.map +1 -0
  361. package/dist/{form-sizing-uWP4lzVh.js → form-sizing-BdP_Mf5p.js} +45 -46
  362. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  363. package/dist/{forms-DDeEnXSY.js → forms-B9G_xwzi.js} +22 -22
  364. package/dist/{forms-DDeEnXSY.js.map → forms-B9G_xwzi.js.map} +1 -1
  365. package/dist/forms-numeric-B_jraJaQ.js +906 -0
  366. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  367. package/dist/{header-2ycNqGOR.js → header-CGXuhcRm.js} +164 -161
  368. package/dist/header-CGXuhcRm.js.map +1 -0
  369. package/dist/{hooks-DQ5SPwZw.js → hooks-Dkz0K2WT.js} +2 -2
  370. package/dist/{hooks-DQ5SPwZw.js.map → hooks-Dkz0K2WT.js.map} +1 -1
  371. package/dist/{http-CdEIHyQf.js → http-D_6rOnzU.js} +2 -2
  372. package/dist/{http-CdEIHyQf.js.map → http-D_6rOnzU.js.map} +1 -1
  373. package/dist/icon-badge-DYKIwvOV.js +55 -0
  374. package/dist/icon-badge-DYKIwvOV.js.map +1 -0
  375. package/dist/index.js +7 -7
  376. package/dist/input-CZw8iU99.js +21 -0
  377. package/dist/input-CZw8iU99.js.map +1 -0
  378. package/dist/input-DQdEd0YD.js +263 -0
  379. package/dist/input-DQdEd0YD.js.map +1 -0
  380. package/dist/interaction-recipes-XR9ZpVYL.js +25 -0
  381. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  382. package/dist/item-K5_ghvze.js +275 -0
  383. package/dist/item-K5_ghvze.js.map +1 -0
  384. package/dist/layer-recipes-CCpklYME.js +13 -0
  385. package/dist/layer-recipes-CCpklYME.js.map +1 -0
  386. package/dist/layout/app-shell.js +1 -1
  387. package/dist/layout/auth.js +1 -1
  388. package/dist/layout/containers.js +1 -1
  389. package/dist/layout/header.js +1 -1
  390. package/dist/layout/hooks.js +1 -1
  391. package/dist/layout/navigation.js +1 -1
  392. package/dist/layout/page.js +1 -1
  393. package/dist/layout/settings.js +1 -1
  394. package/dist/layout/sidebar.js +2 -2
  395. package/dist/layout/workspace.js +1 -1
  396. package/dist/layout.js +10 -10
  397. package/dist/lib/affordance-geometry.generated.d.ts +72 -0
  398. package/dist/lib/editable-text-recipe.d.ts +4 -4
  399. package/dist/lib/field-affordance-recipes.d.ts +8 -3
  400. package/dist/lib/field-state-recipes.d.ts +9 -8
  401. package/dist/lib/focus-recipes.d.ts +24 -0
  402. package/dist/lib/interaction-recipes.d.ts +40 -0
  403. package/dist/lib/layer-recipes.d.ts +19 -0
  404. package/dist/lib/motion-recipes.d.ts +1 -0
  405. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -0
  406. package/dist/lib/safe-image-src.d.ts +10 -0
  407. package/dist/lib/sanitize-html.d.ts +15 -3
  408. package/dist/lib/surface-recipes.d.ts +47 -7
  409. package/dist/lib/theme-mode-css.d.ts +7 -0
  410. package/dist/lib/token-merge.generated.d.ts +9 -6
  411. package/dist/lib/tone-recipes.d.ts +87 -0
  412. package/dist/lib/ui-provider/hooks.d.ts +2 -1
  413. package/dist/lib/ui-provider/index.d.ts +2 -2
  414. package/dist/lib/ui-provider/types.d.ts +11 -2
  415. package/dist/lib/utils.js +1 -1
  416. package/dist/media-gallery-3zIVLMWH.js +203 -0
  417. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  418. package/dist/mentions-utuUvH1K.js +570 -0
  419. package/dist/mentions-utuUvH1K.js.map +1 -0
  420. package/dist/{message-YfFmbXNP.js → message-DZ_ruyUV.js} +7 -6
  421. package/dist/message-DZ_ruyUV.js.map +1 -0
  422. package/dist/metadata-list-8N16ZMW_.js +405 -0
  423. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  424. package/dist/{motion-recipes-B6jKXEcN.js → motion-recipes-ChBg4HBq.js} +3 -2
  425. package/dist/{motion-recipes-B6jKXEcN.js.map → motion-recipes-ChBg4HBq.js.map} +1 -1
  426. package/dist/navigation-Bnotn4AQ.js +145 -0
  427. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  428. package/dist/navigation-BzhHI3lo.js +269 -0
  429. package/dist/navigation-BzhHI3lo.js.map +1 -0
  430. package/dist/{navigation-row-recipes-DlU-4QYO.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  431. package/dist/{navigation-row-recipes-DlU-4QYO.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  432. package/dist/{number-CKRBYmZK.js → number-DbV1Dija.js} +36 -34
  433. package/dist/{number-CKRBYmZK.js.map → number-DbV1Dija.js.map} +1 -1
  434. package/dist/overflow-tab-bar-CWY7Nogn.js +282 -0
  435. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  436. package/dist/overlay.recipes-8GHqmlb4.js +6 -0
  437. package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
  438. package/dist/overlays-DNWmZrJ4.js +1001 -0
  439. package/dist/overlays-DNWmZrJ4.js.map +1 -0
  440. package/dist/page-Bgl1F560.js +224 -0
  441. package/dist/page-Bgl1F560.js.map +1 -0
  442. package/dist/page-header-commands-DOb6WsfD.js +126 -0
  443. package/dist/page-header-commands-DOb6WsfD.js.map +1 -0
  444. package/dist/pagination-BL25hu2s.js +158 -0
  445. package/dist/pagination-BL25hu2s.js.map +1 -0
  446. package/dist/{popover-Dcv_9jxr.js → popover-7_m66eYW.js} +11 -10
  447. package/dist/popover-7_m66eYW.js.map +1 -0
  448. package/dist/popover-menu-B9WWygpa.js +100 -0
  449. package/dist/popover-menu-B9WWygpa.js.map +1 -0
  450. package/dist/{popover.recipes-wmbvL8Ah.js → popover.recipes-D3j8R8Yp.js} +18 -11
  451. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  452. package/dist/{primitives-BHrwQXFC.js → primitives-BFK08r9M.js} +45 -44
  453. package/dist/primitives-BFK08r9M.js.map +1 -0
  454. package/dist/primitives.js +4 -4
  455. package/dist/{progress-Br9WTFya.js → progress-B1VnCT0K.js} +9 -9
  456. package/dist/{progress-Br9WTFya.js.map → progress-B1VnCT0K.js.map} +1 -1
  457. package/dist/{receipt-CV89q1fs.js → receipt-BVSOH3Xo.js} +9 -6
  458. package/dist/{receipt-CV89q1fs.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  459. package/dist/rich-text-GOUyKQ-s.js +78 -0
  460. package/dist/rich-text-GOUyKQ-s.js.map +1 -0
  461. package/dist/rich-text-editor-cRLC-eBK.js +1196 -0
  462. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  463. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  464. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  465. package/dist/rich-text-editor.strings-CB59ekH2.js +38 -0
  466. package/dist/rich-text-editor.strings-CB59ekH2.js.map +1 -0
  467. package/dist/safe-image-src-C6kQSMBZ.js +17 -0
  468. package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
  469. package/dist/sanitize-html-DsQmI48u.js +92 -0
  470. package/dist/sanitize-html-DsQmI48u.js.map +1 -0
  471. package/dist/scroll-area-DcI-M1UT.js +48 -0
  472. package/dist/scroll-area-DcI-M1UT.js.map +1 -0
  473. package/dist/{separator-Do5GWDYi.js → separator-BDV-Y648.js} +3 -3
  474. package/dist/{separator-Do5GWDYi.js.map → separator-BDV-Y648.js.map} +1 -1
  475. package/dist/{separator-BMEvwnSX.js → separator-Bom7NsGO.js} +2 -2
  476. package/dist/{separator-BMEvwnSX.js.map → separator-Bom7NsGO.js.map} +1 -1
  477. package/dist/services/actions/action-adapters.d.ts +18 -0
  478. package/dist/services/actions/index.d.ts +1 -1
  479. package/dist/services/actions.js +16 -4
  480. package/dist/services/actions.js.map +1 -1
  481. package/dist/settings-ybnjVwbd.js +171 -0
  482. package/dist/settings-ybnjVwbd.js.map +1 -0
  483. package/dist/sheet-CGpB3omz.js +211 -0
  484. package/dist/sheet-CGpB3omz.js.map +1 -0
  485. package/dist/{sidebar-Cb8WzOvE.js → sidebar-A0ElHINE.js} +17 -16
  486. package/dist/sidebar-A0ElHINE.js.map +1 -0
  487. package/dist/{sidebar-Crc9M9JV.js → sidebar-CPx_7YBa.js} +205 -203
  488. package/dist/sidebar-CPx_7YBa.js.map +1 -0
  489. package/dist/{skeleton-DVMXr15h.js → skeleton-Byjnt7qr.js} +9 -9
  490. package/dist/{skeleton-DVMXr15h.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  491. package/dist/smart-card-DiC5aac3.js +604 -0
  492. package/dist/smart-card-DiC5aac3.js.map +1 -0
  493. package/dist/{structure-hzCW-XsV.js → structure-BmisBK-3.js} +2 -2
  494. package/dist/{structure-hzCW-XsV.js.map → structure-BmisBK-3.js.map} +1 -1
  495. package/dist/style.css +1 -1
  496. package/dist/surface-recipes-BKRVW8Os.js +43 -0
  497. package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
  498. package/dist/table-BweFy_P9.js +1530 -0
  499. package/dist/table-BweFy_P9.js.map +1 -0
  500. package/dist/table-DsfzoUia.js +175 -0
  501. package/dist/table-DsfzoUia.js.map +1 -0
  502. package/dist/tabs-CDocW5D1.js +191 -0
  503. package/dist/tabs-CDocW5D1.js.map +1 -0
  504. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  505. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  506. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  507. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  508. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  509. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  510. package/dist/theme.css +285 -228
  511. package/dist/themes/green.css +16 -12
  512. package/dist/timelines-CwM_9IhD.js +457 -0
  513. package/dist/timelines-CwM_9IhD.js.map +1 -0
  514. package/dist/tone-recipes-BPsRAvhu.js +73 -0
  515. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  516. package/dist/tooltip-yiRJUFjp.js +111 -0
  517. package/dist/tooltip-yiRJUFjp.js.map +1 -0
  518. package/dist/{tree-BotPlyiD.js → tree-WnKQzwbq.js} +69 -67
  519. package/dist/tree-WnKQzwbq.js.map +1 -0
  520. package/dist/typography/rich-text.js +1 -1
  521. package/dist/typography-UTnveOEy.js +117 -0
  522. package/dist/typography-UTnveOEy.js.map +1 -0
  523. package/dist/typography.js +2 -2
  524. package/dist/{ui-provider-D2_TeLqw.js → ui-provider-C_U0Xma4.js} +13 -5
  525. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  526. package/dist/ui-provider.js +3 -3
  527. package/dist/{upload-B0WHW7ak.js → upload-CXyxmQBP.js} +210 -209
  528. package/dist/upload-CXyxmQBP.js.map +1 -0
  529. package/dist/{upload-queue-BHZ_wBfd.js → upload-queue-Boscubn9.js} +111 -111
  530. package/dist/upload-queue-Boscubn9.js.map +1 -0
  531. package/dist/upload.recipes-BbxTqrCT.js +61 -0
  532. package/dist/upload.recipes-BbxTqrCT.js.map +1 -0
  533. package/dist/{usage-card-U0YBLTNT.js → usage-card-BhO5eqkX.js} +45 -29
  534. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  535. package/dist/{utils-Cospvlj1.js → utils-BRhFDwuU.js} +114 -67
  536. package/dist/utils-BRhFDwuU.js.map +1 -0
  537. package/dist/value-inputs-DXPDjvBU.js +963 -0
  538. package/dist/value-inputs-DXPDjvBU.js.map +1 -0
  539. package/dist/{value-typography-Deb3yQZg.js → value-typography-BP8OG6h5.js} +2 -2
  540. package/dist/{value-typography-Deb3yQZg.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  541. package/dist/workspace-Cdrg7k9f.js +408 -0
  542. package/dist/workspace-Cdrg7k9f.js.map +1 -0
  543. package/docs/consumer-skill/SKILL.md +21 -22
  544. package/docs/consumer-skill/examples/app-layout.tsx +1 -1
  545. package/docs/consumer-skill/examples/composition.tsx +3 -3
  546. package/docs/consumer-skill/examples/detail.tsx +59 -12
  547. package/docs/consumer-skill/examples/edit.tsx +1 -1
  548. package/docs/consumer-skill/examples/receipt.tsx +2 -2
  549. package/docs/consumer-skill/examples/scoped-directory.tsx +1 -1
  550. package/docs/consumer-skill/examples/website.tsx +1 -1
  551. package/docs/consumer-skill/references/agents-md.md +33 -0
  552. package/docs/consumer-skill/references/analytics.md +1 -1
  553. package/docs/consumer-skill/references/composition.md +58 -13
  554. package/docs/consumer-skill/references/design-contract.md +12 -3
  555. package/docs/consumer-skill/references/installation.md +11 -1
  556. package/docs/consumer-skill/references/integration.md +4 -3
  557. package/docs/consumer-skill/references/public-api.json +956 -453
  558. package/docs/consumer-skill/references/review.md +32 -5
  559. package/docs/consumer-skill/references/theming.md +78 -9
  560. package/docs/consumer-skill/references/tokens.json +1 -1
  561. package/docs/consumer-skill/references/workflows.md +54 -10
  562. package/docs/consumer-skill/scripts/composition-policy.mjs +42 -11
  563. package/docs/consumer-skill/scripts/surface-policy.mjs +150 -5
  564. package/package.json +17 -5
  565. package/dist/accordion-CQXVcd7Q.js +0 -205
  566. package/dist/accordion-CQXVcd7Q.js.map +0 -1
  567. package/dist/action-menu-BTpyPWJ2.js +0 -264
  568. package/dist/action-menu-BTpyPWJ2.js.map +0 -1
  569. package/dist/affordance-geometry.generated-CCIXb2A1.js +0 -68
  570. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +0 -1
  571. package/dist/ai-artifact-2PQ2fItc.js +0 -1112
  572. package/dist/ai-artifact-2PQ2fItc.js.map +0 -1
  573. package/dist/attachment-q69dlt5Y.js +0 -244
  574. package/dist/attachment-q69dlt5Y.js.map +0 -1
  575. package/dist/auth-M3vGMgDR.js.map +0 -1
  576. package/dist/avatar-djdaaQ_s.js.map +0 -1
  577. package/dist/badge-0tATj-tW.js +0 -92
  578. package/dist/badge-0tATj-tW.js.map +0 -1
  579. package/dist/breadcrumbs-BG_FfMK4.js +0 -128
  580. package/dist/breadcrumbs-BG_FfMK4.js.map +0 -1
  581. package/dist/button-BS3KDg00.js.map +0 -1
  582. package/dist/button-R9CCoH7A.js.map +0 -1
  583. package/dist/buttons-DS0ZIwJ_.js +0 -99
  584. package/dist/buttons-DS0ZIwJ_.js.map +0 -1
  585. package/dist/cards-QoJ4syG9.js +0 -66
  586. package/dist/cards-QoJ4syG9.js.map +0 -1
  587. package/dist/chart-DwYRKKc-.js.map +0 -1
  588. package/dist/checkbox-B7ygNTYp.js +0 -35
  589. package/dist/checkbox-B7ygNTYp.js.map +0 -1
  590. package/dist/choice-inputs-DrJ17tpL.js +0 -752
  591. package/dist/choice-inputs-DrJ17tpL.js.map +0 -1
  592. package/dist/code-block-CD0B7M93.js +0 -183
  593. package/dist/code-block-CD0B7M93.js.map +0 -1
  594. package/dist/combobox-6dvVny2q.js +0 -272
  595. package/dist/combobox-6dvVny2q.js.map +0 -1
  596. package/dist/combobox-CB7039j7.js +0 -865
  597. package/dist/combobox-CB7039j7.js.map +0 -1
  598. package/dist/comments-You0Bzbr.js.map +0 -1
  599. package/dist/components/layout/page/partials/page-header-commands.d.ts +0 -13
  600. package/dist/containers-D_L4mTVb.js.map +0 -1
  601. package/dist/data-display-3xWQUnMA.js +0 -1335
  602. package/dist/data-display-3xWQUnMA.js.map +0 -1
  603. package/dist/date-picker-DrDFj8Lo.js +0 -1527
  604. package/dist/date-picker-DrDFj8Lo.js.map +0 -1
  605. package/dist/date-pickers-CnFCb0n2.js +0 -174
  606. package/dist/date-pickers-CnFCb0n2.js.map +0 -1
  607. package/dist/display-DrdvPwF0.js +0 -343
  608. package/dist/display-DrdvPwF0.js.map +0 -1
  609. package/dist/dropdown-menu-CURh59jb.js +0 -193
  610. package/dist/dropdown-menu-CURh59jb.js.map +0 -1
  611. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  612. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  613. package/dist/feedback-C7nR0UtT.js +0 -232
  614. package/dist/feedback-C7nR0UtT.js.map +0 -1
  615. package/dist/field-affordance-recipes-CkOCdE2y.js +0 -46
  616. package/dist/field-affordance-recipes-CkOCdE2y.js.map +0 -1
  617. package/dist/field-state-recipes-C-MFBX_8.js +0 -11
  618. package/dist/field-state-recipes-C-MFBX_8.js.map +0 -1
  619. package/dist/filters-Da-gNPsE.js.map +0 -1
  620. package/dist/form-field-VZRULhUK.js.map +0 -1
  621. package/dist/form-sizing-uWP4lzVh.js.map +0 -1
  622. package/dist/forms-numeric-D3CO60IF.js +0 -905
  623. package/dist/forms-numeric-D3CO60IF.js.map +0 -1
  624. package/dist/header-2ycNqGOR.js.map +0 -1
  625. package/dist/icon-badge-DKlaKXoo.js +0 -53
  626. package/dist/icon-badge-DKlaKXoo.js.map +0 -1
  627. package/dist/input-BoLm9Hks.js +0 -20
  628. package/dist/input-BoLm9Hks.js.map +0 -1
  629. package/dist/input-DhQdBnV3.js +0 -255
  630. package/dist/input-DhQdBnV3.js.map +0 -1
  631. package/dist/item-xzh8Df65.js +0 -264
  632. package/dist/item-xzh8Df65.js.map +0 -1
  633. package/dist/media-gallery-DQUQ0m3O.js +0 -201
  634. package/dist/media-gallery-DQUQ0m3O.js.map +0 -1
  635. package/dist/mentions-DwnO1hh4.js +0 -564
  636. package/dist/mentions-DwnO1hh4.js.map +0 -1
  637. package/dist/message-YfFmbXNP.js.map +0 -1
  638. package/dist/navigation-Cbp5V8gG.js +0 -264
  639. package/dist/navigation-Cbp5V8gG.js.map +0 -1
  640. package/dist/navigation-Cs1npsPm.js +0 -300
  641. package/dist/navigation-Cs1npsPm.js.map +0 -1
  642. package/dist/overlay.recipes-CNO2S9V6.js +0 -34
  643. package/dist/overlay.recipes-CNO2S9V6.js.map +0 -1
  644. package/dist/overlays-DhZO7N-I.js +0 -994
  645. package/dist/overlays-DhZO7N-I.js.map +0 -1
  646. package/dist/page-C6R_8jFt.js +0 -325
  647. package/dist/page-C6R_8jFt.js.map +0 -1
  648. package/dist/page-header-hUTzcRZX.js +0 -112
  649. package/dist/page-header-hUTzcRZX.js.map +0 -1
  650. package/dist/pagination-Cm0jqa3I.js +0 -149
  651. package/dist/pagination-Cm0jqa3I.js.map +0 -1
  652. package/dist/popover-Dcv_9jxr.js.map +0 -1
  653. package/dist/popover-menu-DnRFKnHP.js +0 -99
  654. package/dist/popover-menu-DnRFKnHP.js.map +0 -1
  655. package/dist/popover.recipes-wmbvL8Ah.js.map +0 -1
  656. package/dist/primitives-BHrwQXFC.js.map +0 -1
  657. package/dist/rich-text-editor-CF8QYt5p.js +0 -574
  658. package/dist/rich-text-editor-CF8QYt5p.js.map +0 -1
  659. package/dist/rich-text-editor.recipes-CnrbmTS1.js +0 -81
  660. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +0 -1
  661. package/dist/rich-text-editor.strings-BpnIQgMl.js +0 -25
  662. package/dist/rich-text-editor.strings-BpnIQgMl.js.map +0 -1
  663. package/dist/rich-text-j-FGAeZW.js +0 -32
  664. package/dist/rich-text-j-FGAeZW.js.map +0 -1
  665. package/dist/sanitize-html-BG9FGe-j.js +0 -64
  666. package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
  667. package/dist/scroll-area-DRdr16Pt.js +0 -47
  668. package/dist/scroll-area-DRdr16Pt.js.map +0 -1
  669. package/dist/settings-DHk0L2MF.js +0 -161
  670. package/dist/settings-DHk0L2MF.js.map +0 -1
  671. package/dist/sheet-DRFNY1_D.js +0 -207
  672. package/dist/sheet-DRFNY1_D.js.map +0 -1
  673. package/dist/sidebar-Cb8WzOvE.js.map +0 -1
  674. package/dist/sidebar-Crc9M9JV.js.map +0 -1
  675. package/dist/smart-card-Bek-TwUp.js +0 -599
  676. package/dist/smart-card-Bek-TwUp.js.map +0 -1
  677. package/dist/spinner-CmTAbEp0.js +0 -80
  678. package/dist/spinner-CmTAbEp0.js.map +0 -1
  679. package/dist/surface-recipes-DOdoBXGm.js +0 -28
  680. package/dist/surface-recipes-DOdoBXGm.js.map +0 -1
  681. package/dist/table-D6zKeYQX.js +0 -162
  682. package/dist/table-D6zKeYQX.js.map +0 -1
  683. package/dist/table-Dn4XSrSB.js +0 -1444
  684. package/dist/table-Dn4XSrSB.js.map +0 -1
  685. package/dist/tabs-Dk8E_knt.js +0 -189
  686. package/dist/tabs-Dk8E_knt.js.map +0 -1
  687. package/dist/text-inputs-BFpku0Qd.js +0 -331
  688. package/dist/text-inputs-BFpku0Qd.js.map +0 -1
  689. package/dist/theme-scope-kStaAer0.js +0 -39
  690. package/dist/theme-scope-kStaAer0.js.map +0 -1
  691. package/dist/timelines-CxuAFIc2.js +0 -439
  692. package/dist/timelines-CxuAFIc2.js.map +0 -1
  693. package/dist/tree-BotPlyiD.js.map +0 -1
  694. package/dist/typography-CAr3dQhX.js +0 -116
  695. package/dist/typography-CAr3dQhX.js.map +0 -1
  696. package/dist/ui-provider-D2_TeLqw.js.map +0 -1
  697. package/dist/upload-B0WHW7ak.js.map +0 -1
  698. package/dist/upload-queue-BHZ_wBfd.js.map +0 -1
  699. package/dist/usage-card-U0YBLTNT.js.map +0 -1
  700. package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
  701. package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
  702. package/dist/utils-Cospvlj1.js.map +0 -1
  703. package/dist/value-inputs-CjfzGMsN.js +0 -854
  704. package/dist/value-inputs-CjfzGMsN.js.map +0 -1
  705. package/dist/workspace-YoFjXi6i.js +0 -394
  706. package/dist/workspace-YoFjXi6i.js.map +0 -1
  707. /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
@@ -1,28 +1,34 @@
1
1
  "use client";
2
- import { _ as e, s as t } from "../ui-provider-D2_TeLqw.js";
2
+ import { s as e, v as t } from "../ui-provider-C_U0Xma4.js";
3
3
  import { useStrings as n } from "../lib/strings.js";
4
- import { t as r } from "../utils-Cospvlj1.js";
5
- import { a as i, s as a } from "../typography-CAr3dQhX.js";
6
- import { t as o } from "../button-BS3KDg00.js";
7
- import { r as s, t as c } from "../structure-hzCW-XsV.js";
8
- import { i as l } from "../smart-card-Bek-TwUp.js";
9
- import { n as u, t as d } from "../feedback-C7nR0UtT.js";
10
- import { r as f } from "../overlays-DhZO7N-I.js";
11
- import { a as p, i as m, t as h } from "../primitives-BHrwQXFC.js";
12
- import { n as g, t as _ } from "../number-CKRBYmZK.js";
13
- import { t as v } from "../badge-0tATj-tW.js";
14
- import { t as y } from "../input-DhQdBnV3.js";
15
- import { t as b } from "../form-field-VZRULhUK.js";
16
- import { c as x, s as S } from "../choice-inputs-DrJ17tpL.js";
17
- import { r as C, t as w } from "../control-group-recipes-DBXmfh2E.js";
18
- import { a as ee } from "../upload-queue-BHZ_wBfd.js";
19
- import { l as T } from "../data-display-3xWQUnMA.js";
20
- import { createContext as E, useCallback as D, useContext as te, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
21
- import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
22
- import { ArrowLeft as F, ArrowRight as ne, Check as re, File as ie, Grid2X2 as ae, ImageIcon as I, ImagePlus as oe, Info as L, Layers3 as se, LayoutList as R, Lock as z, 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";
4
+ import { t as r } from "../utils-BRhFDwuU.js";
5
+ import { n as i } from "../buttons-DPZekJFu.js";
6
+ import { c as a, o } from "../typography-UTnveOEy.js";
7
+ import { t as s } from "../focus-recipes-B653VaLq.js";
8
+ import { r as c, t as l } from "../structure-BmisBK-3.js";
9
+ import { i as u } from "../smart-card-DiC5aac3.js";
10
+ import { n as d, t as f } from "../feedback-BYIhtitP.js";
11
+ import { t as p } from "../progress-B1VnCT0K.js";
12
+ import { r as m } from "../overlays-DNWmZrJ4.js";
13
+ import { t as h } from "../interaction-recipes-XR9ZpVYL.js";
14
+ import { a as g, i as _, t as v } from "../primitives-BFK08r9M.js";
15
+ import { n as y, t as b } from "../number-DbV1Dija.js";
16
+ import { t as x } from "../badge-HpFqoqSY.js";
17
+ import { t as S } from "../batch-action-bar-DnUJ21NQ.js";
18
+ import { t as C } from "../input-DQdEd0YD.js";
19
+ import { t as w } from "../form-field-CwH9y77i.js";
20
+ import { c as T, l as E } from "../choice-inputs-CNHvARCJ.js";
21
+ import { r as D, t as O } from "../control-group-recipes-DBXmfh2E.js";
22
+ import { t as k } from "../upload.recipes-BbxTqrCT.js";
23
+ import { t as A } from "../metadata-list-8N16ZMW_.js";
24
+ import { a as ee } from "../upload-queue-Boscubn9.js";
25
+ import { s as te } from "../data-display-DT_khPl_.js";
26
+ import { createContext as j, useCallback as M, useContext as ne, useEffect as re, useMemo as N, useRef as ie, useState as P } from "react";
27
+ import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
28
+ import { ArrowLeft as ae, ArrowRight as oe, Check as R, File as z, Grid2X2 as se, ImageIcon as ce, ImagePlus as B, Info as le, Layers3 as V, LayoutList as ue, Lock as de, Play as fe, Plus as pe, Search as me, Star as he, Trash2 as ge, UploadCloud as _e, Video as ve, X as ye } from "lucide-react";
29
+ import { createPortal as be } from "react-dom";
24
30
  //#region src/components/features/media-library/media-library.strings.ts
25
- var ge = {
31
+ var xe = {
26
32
  title: "Add media",
27
33
  description: "Pick from the library, or upload new files.",
28
34
  close: "Close media library",
@@ -62,6 +68,9 @@ var ge = {
62
68
  errorTitle: "Media could not load",
63
69
  errorDescription: "Try again or adjust your filters.",
64
70
  cardDetails: "Details for {name}",
71
+ selectMode: "Select",
72
+ selectItem: "Select {name}",
73
+ batchActionsLabel: "Batch actions",
65
74
  privateLabel: "Private",
66
75
  publicLabel: "Public",
67
76
  typeImage: "Image",
@@ -142,19 +151,19 @@ var ge = {
142
151
  maxReached: "Maximum reached"
143
152
  }
144
153
  };
145
- function V(e, t) {
154
+ function H(e, t) {
146
155
  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] ?? ""));
147
156
  }
148
157
  //#endregion
149
158
  //#region src/components/features/media-library/hooks/use-media-library.ts
150
- var _e = {
159
+ var Se = {
151
160
  collection: void 0,
152
161
  tags: [],
153
162
  public: !0
154
- }, ve = [];
155
- function H(e, t, n) {
156
- let [r, i] = j(t), a = e ?? r;
157
- return [a, D((t) => {
163
+ }, Ce = [];
164
+ function U(e, t, n) {
165
+ let [r, i] = P(t), a = e ?? r;
166
+ return [a, M((t) => {
158
167
  let r = typeof t == "function" ? t(a) : t;
159
168
  e === void 0 && i(r), n?.(r);
160
169
  }, [
@@ -163,7 +172,7 @@ function H(e, t, n) {
163
172
  a
164
173
  ])];
165
174
  }
166
- var ye = {
175
+ var we = {
167
176
  getId: (e) => e.id,
168
177
  getName: (e) => e.name,
169
178
  getType: (e) => e.type,
@@ -181,47 +190,47 @@ var ye = {
181
190
  getTint: (e) => e.tint,
182
191
  getMimeType: (e) => e.mimeType
183
192
  };
184
- function be(e) {
193
+ function Te(e) {
185
194
  return {
186
- ...ye,
195
+ ...we,
187
196
  ...e
188
197
  };
189
198
  }
190
- function xe(e) {
191
- return p(e) ?? "";
199
+ function Ee(e) {
200
+ return g(e) ?? "";
192
201
  }
193
- function U(e, t) {
202
+ function De(e, t) {
194
203
  let n = t.getWidth(e), r = t.getHeight(e);
195
204
  return !n || !r ? "" : `${n} x ${r}`;
196
205
  }
197
- function Se(e, t) {
206
+ function Oe(e, t) {
198
207
  let n = t.getUploadedAt(e);
199
208
  if (!n) return 0;
200
209
  let r = (n instanceof Date ? n : new Date(n)).getTime();
201
210
  return Number.isFinite(r) ? r : 0;
202
211
  }
203
- function Ce(e) {
212
+ function ke(e) {
204
213
  return e.type.startsWith("image/") ? "image" : e.type.startsWith("video/") ? "video" : "file";
205
214
  }
206
- function we(e) {
215
+ function Ae(e) {
207
216
  if (e.type.startsWith("image/") && typeof URL < "u" && typeof URL.createObjectURL == "function") return URL.createObjectURL(e);
208
217
  }
209
- function Te(e) {
218
+ function je(e) {
210
219
  e && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(e);
211
220
  }
212
- function Ee(e) {
221
+ function Me(e) {
213
222
  return Array.isArray(e) ? {
214
223
  items: e,
215
224
  total: e.length
216
225
  } : e;
217
226
  }
218
- function De(e, t) {
227
+ function Ne(e, t) {
219
228
  return t && typeof e == "object" && e ? {
220
229
  ...e,
221
230
  ...t
222
231
  } : e;
223
232
  }
224
- function Oe(e, t, n, r, i) {
233
+ function Pe(e, t, n, r, i) {
225
234
  let a = n.trim().toLowerCase();
226
235
  return e.filter((e) => r !== "all" && t.getType(e) !== r || i !== "all" && t.getCollection(e) !== i ? !1 : !a || [
227
236
  t.getName(e),
@@ -230,178 +239,186 @@ function Oe(e, t, n, r, i) {
230
239
  ...t.getTags(e)
231
240
  ].filter(Boolean).join(" ").toLowerCase().includes(a));
232
241
  }
233
- function ke(e, t, n) {
242
+ function Fe(e, t, n) {
234
243
  let r = e.slice();
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;
244
+ 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) => Oe(n, t) - Oe(e, t)), r;
236
245
  }
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: ee, sort: T, defaultSort: E = "newest", onSortChange: te, uploadOptions: M, defaultUploadOptions: N, onUploadOptionsChange: P } = {}) {
238
- let F = k(() => be(n), [n]), [ne, re] = H(d, f, p), [ie, ae] = H(m, h, g), [I, oe] = H(_, v, y), [L, se] = H(b, x, S), [R, z] = H(C, w, ee), [B, ce] = H(T, E, te), [le, ue] = j(null), [de, fe] = j(() => [...a]), [pe, me] = j([]), [he, ge] = j(), [V, ye] = j(!1), [xe, U] = j(null), [Se, Ae] = j([]), [je, W] = j(() => /* @__PURE__ */ new Set()), [G, Me] = j({}), [K, q] = j([]), [Ne, Pe] = j(!1), Fe = k(() => ({
239
- ..._e,
240
- ...N,
241
- tags: N?.tags ?? _e.tags
242
- }), [N]), [Ie, Le] = H(k(() => M ? {
243
- ..._e,
244
- ...M,
245
- tags: M.tags ?? _e.tags
246
- } : void 0, [M]), Fe, P), Re = i !== void 0, J = k(() => Re ? [...i ?? []] : de, [
247
- de,
248
- Re,
246
+ function Ie({ items: e = Ce, 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: O, uploadOptions: k, defaultUploadOptions: A, onUploadOptionsChange: ee, selecting: te, defaultSelecting: j = !1, onSelectingChange: ne } = {}) {
247
+ let F = N(() => Te(n), [n]), [I, L] = U(d, f, p), [ae, oe] = U(m, h, g), [R, z] = U(_, v, y), [se, ce] = U(b, x, S), [B, le] = U(C, w, T), [V, ue] = U(E, D, O), [de, fe] = P(null), [pe, me] = P(() => [...a]), [he, ge] = P([]), [_e, ve] = P(), [ye, be] = P(!1), [xe, H] = P(null), [we, Ee] = P([]), [De, Oe] = P(() => /* @__PURE__ */ new Set()), [Ie, Le] = P({}), [Re, W] = P([]), [ze, Be] = P(!1), Ve = N(() => ({
248
+ ...Se,
249
+ ...A,
250
+ tags: A?.tags ?? Se.tags
251
+ }), [A]), [G, K] = U(N(() => k ? {
252
+ ...Se,
253
+ ...k,
254
+ tags: k.tags ?? Se.tags
255
+ } : void 0, [k]), Ve, ee), He = i !== void 0, q = N(() => He ? [...i ?? []] : pe, [
256
+ pe,
257
+ He,
249
258
  i
250
- ]), Y = k(() => new Set(J), [J]), ze = A(/* @__PURE__ */ new Set()), X = A(null), Be = A(/* @__PURE__ */ new Map());
251
- O(() => {
259
+ ]), J = N(() => new Set(q), [q]), Ue = ie(/* @__PURE__ */ new Set()), Y = ie(null), X = ie(/* @__PURE__ */ new Map());
260
+ re(() => {
252
261
  if (!t) return;
253
262
  let e = new AbortController();
254
- return ye(!0), U(null), t({
255
- query: I,
256
- type: L,
257
- collection: R === "all" ? void 0 : R,
258
- sort: B,
263
+ return be(!0), H(null), t({
264
+ query: R,
265
+ type: se,
266
+ collection: B === "all" ? void 0 : B,
267
+ sort: V,
259
268
  signal: e.signal
260
269
  }).then((t) => {
261
270
  if (e.signal.aborted) return;
262
- let n = Ee(t);
263
- me(n.items), ge(n.total);
271
+ let n = Me(t);
272
+ ge(n.items), ve(n.total);
264
273
  }).catch((t) => {
265
- e.signal.aborted || (U(t), u?.(t));
274
+ e.signal.aborted || (H(t), u?.(t));
266
275
  }).finally(() => {
267
- e.signal.aborted || ye(!1);
276
+ e.signal.aborted || be(!1);
268
277
  }), () => e.abort();
269
278
  }, [
270
- R,
279
+ B,
271
280
  t,
272
281
  u,
273
- I,
274
- B,
275
- L
276
- ]), O(() => {
277
- let e = ze.current;
282
+ R,
283
+ V,
284
+ se
285
+ ]), re(() => {
286
+ let e = Ue.current;
278
287
  return () => {
279
- X.current?.abort();
280
- for (let t of e) Te(t);
288
+ Y.current?.abort();
289
+ for (let t of e) je(t);
281
290
  e.clear();
282
291
  };
283
292
  }, []);
284
- let Z = k(() => t ? pe : [...Se, ...e], [
285
- Se,
286
- pe,
293
+ let We = N(() => t ? he : [...we, ...e], [
294
+ we,
295
+ he,
287
296
  t,
288
297
  e
289
- ]), Q = k(() => Z.filter((e) => !je.has(F.getId(e))).map((e) => De(e, G[F.getId(e)])), [
298
+ ]), Z = N(() => We.filter((e) => !De.has(F.getId(e))).map((e) => Ne(e, Ie[F.getId(e)])), [
290
299
  F,
291
- G,
292
- je,
293
- Z
294
- ]), Ve = k(() => {
295
- let e = t ? Q : Oe(Q, F, I, L, R);
296
- return t ? e : ke(e, F, B);
300
+ Ie,
301
+ De,
302
+ We
303
+ ]), Ge = N(() => {
304
+ let e = t ? Z : Pe(Z, F, R, se, B);
305
+ return t ? e : Fe(e, F, V);
297
306
  }, [
298
307
  F,
299
- R,
300
- t,
301
- Q,
302
- I,
303
308
  B,
304
- L
305
- ]), He = he ?? Q.length, Ue = Ve.length, We = k(() => Q.filter((e) => Y.has(F.getId(e))), [
309
+ t,
310
+ Z,
311
+ R,
312
+ V,
313
+ se
314
+ ]), Ke = _e ?? Z.length, qe = Ge.length, Je = N(() => Z.filter((e) => J.has(F.getId(e))), [
306
315
  F,
307
- Q,
308
- Y
309
- ]), Ge = !!I.trim() || L !== "all" || R !== "all", $ = D((e) => {
310
- Re || fe(e);
311
- let t = new Set(e), n = Q.filter((e) => t.has(F.getId(e)));
316
+ Z,
317
+ J
318
+ ]), Q = !!R.trim() || se !== "all" || B !== "all", $ = M((e) => {
319
+ He || me(e);
320
+ let t = new Set(e), n = Z.filter((e) => t.has(F.getId(e)));
312
321
  o?.(e, n);
313
322
  }, [
314
323
  F,
315
- Re,
324
+ He,
316
325
  o,
317
- Q
318
- ]), Ke = D((e) => {
319
- let t = new Set(r === "single" ? [] : Y);
320
- Y.has(e) && r !== "single" ? t.delete(e) : t.add(e), $(Array.from(t));
326
+ Z
327
+ ]), Ye = M((e) => {
328
+ let t = new Set(r === "single" ? [] : J);
329
+ J.has(e) && r !== "single" ? t.delete(e) : t.add(e), $(Array.from(t));
321
330
  }, [
322
331
  $,
323
- Y,
332
+ J,
324
333
  r
325
- ]), qe = D(() => $([]), [$]), Je = D(() => {
326
- oe(""), se("all"), z("all");
334
+ ]), Xe = M(() => $([]), [$]), [Ze, Qe] = U(te, j, ne), $e = Ze || q.length > 0, et = M((e) => {
335
+ Qe(e), !e && q.length > 0 && $([]);
327
336
  }, [
337
+ $,
338
+ q.length,
339
+ Qe
340
+ ]), tt = M(() => {
341
+ z(""), ce("all"), le("all");
342
+ }, [
343
+ le,
328
344
  z,
329
- oe,
330
- se
331
- ]), Ye = D((e) => {
332
- q((t) => [...t, ...e.map((e, t) => {
333
- let n = we(e);
334
- return n && ze.current.add(n), {
345
+ ce
346
+ ]), nt = M((e) => {
347
+ W((t) => [...t, ...e.map((e, t) => {
348
+ let n = Ae(e);
349
+ return n && Ue.current.add(n), {
335
350
  id: `staged-${Date.now()}-${t}`,
336
351
  file: e,
337
352
  name: e.name,
338
353
  size: e.size,
339
- type: Ce(e),
354
+ type: ke(e),
340
355
  src: n,
341
356
  progress: 0,
342
357
  status: "staged"
343
358
  };
344
359
  })]);
345
- }, []), Xe = D((e) => {
346
- q((t) => {
360
+ }, []), rt = M((e) => {
361
+ W((t) => {
347
362
  let n = t.find((t) => t.id === e);
348
- return n?.src && (Te(n.src), ze.current.delete(n.src)), t.filter((t) => t.id !== e);
363
+ return n?.src && (je(n.src), Ue.current.delete(n.src)), t.filter((t) => t.id !== e);
349
364
  });
350
- }, []), Ze = D(() => {
351
- q((e) => {
352
- for (let t of e) t.src && (Te(t.src), ze.current.delete(t.src));
365
+ }, []), it = M(() => {
366
+ W((e) => {
367
+ for (let t of e) t.src && (je(t.src), Ue.current.delete(t.src));
353
368
  return [];
354
369
  });
355
- }, []), Qe = D((e) => {
356
- Le((t) => ({
370
+ }, []), at = M((e) => {
371
+ K((t) => ({
357
372
  ...t,
358
373
  ...e
359
374
  }));
360
- }, [Le]), $e = D((e, t) => {
361
- q((n) => n.map((n) => n.id === e ? {
375
+ }, [K]), ot = M((e, t) => {
376
+ W((n) => n.map((n) => n.id === e ? {
362
377
  ...n,
363
378
  ...t
364
379
  } : n));
365
380
  }, []);
366
381
  return {
367
- tab: ne,
368
- setTab: re,
369
- view: ie,
370
- setView: ae,
371
- query: I,
372
- setQuery: oe,
373
- type: L,
374
- setType: se,
375
- collection: R,
376
- setCollection: z,
377
- sort: B,
378
- setSort: ce,
379
- detailId: le,
380
- setDetailId: ue,
381
- items: Q,
382
- visibleItems: Ve,
383
- selectedIds: J,
384
- selectedItems: We,
385
- selectedSet: Y,
386
- toggleSelection: Ke,
387
- clearSelection: qe,
388
- clearFilters: Je,
389
- loading: V,
382
+ tab: I,
383
+ setTab: L,
384
+ view: ae,
385
+ setView: oe,
386
+ query: R,
387
+ setQuery: z,
388
+ type: se,
389
+ setType: ce,
390
+ collection: B,
391
+ setCollection: le,
392
+ sort: V,
393
+ setSort: ue,
394
+ detailId: de,
395
+ setDetailId: fe,
396
+ items: Z,
397
+ visibleItems: Ge,
398
+ selectedIds: q,
399
+ selectedItems: Je,
400
+ selectedSet: J,
401
+ toggleSelection: Ye,
402
+ clearSelection: Xe,
403
+ selecting: $e,
404
+ setSelecting: et,
405
+ clearFilters: tt,
406
+ loading: ye,
390
407
  error: xe,
391
- hasFilters: Ge,
392
- totalCount: He,
393
- filteredCount: Ue,
394
- stagedFiles: K,
395
- addFiles: Ye,
396
- removeStagedFile: Xe,
397
- clearStagedFiles: Ze,
398
- updateUploadOptions: Qe,
399
- uploadOptions: Ie,
400
- uploading: Ne,
401
- startUpload: D(async () => {
402
- if (Ne || K.length === 0) return;
408
+ hasFilters: Q,
409
+ totalCount: Ke,
410
+ filteredCount: qe,
411
+ stagedFiles: Re,
412
+ addFiles: nt,
413
+ removeStagedFile: rt,
414
+ clearStagedFiles: it,
415
+ updateUploadOptions: at,
416
+ uploadOptions: G,
417
+ uploading: ze,
418
+ startUpload: M(async () => {
419
+ if (ze || Re.length === 0) return;
403
420
  let e = new AbortController();
404
- X.current?.abort(), X.current = e, U(null), Pe(!0), q((e) => e.map((e) => ({
421
+ Y.current?.abort(), Y.current = e, H(null), Be(!0), W((e) => e.map((e) => ({
405
422
  ...e,
406
423
  status: "uploading",
407
424
  progress: 0
@@ -409,65 +426,65 @@ function Ae({ items: e = ve, fetcher: t, accessors: n, selectionMode: r = "multi
409
426
  let t = {
410
427
  signal: e.signal,
411
428
  setProgress: (t, n) => {
412
- e.signal.aborted || $e(t, { progress: Math.max(0, Math.min(100, n)) });
429
+ e.signal.aborted || ot(t, { progress: Math.max(0, Math.min(100, n)) });
413
430
  },
414
431
  setFileStatus: (t, n, r) => {
415
- e.signal.aborted || $e(t, {
432
+ e.signal.aborted || ot(t, {
416
433
  status: n,
417
434
  error: r
418
435
  });
419
436
  }
420
437
  };
421
438
  try {
422
- let n = K.map((e) => e.file), i = await l?.(n, Ie, t);
439
+ let n = Re.map((e) => e.file), i = await l?.(n, G, t);
423
440
  if (e.signal.aborted) return;
424
- if (q((e) => e.map((e) => ({
441
+ if (W((e) => e.map((e) => ({
425
442
  ...e,
426
443
  status: "done",
427
444
  progress: 100
428
445
  }))), i?.length) {
429
- Ae((e) => [...i, ...e]);
446
+ Ee((e) => [...i, ...e]);
430
447
  let e = i.map((e) => F.getId(e));
431
- $(r === "single" ? e.slice(0, 1) : Array.from(/* @__PURE__ */ new Set([...e, ...J])));
448
+ $(r === "single" ? e.slice(0, 1) : Array.from(/* @__PURE__ */ new Set([...e, ...q])));
432
449
  }
433
- Ze(), re("library");
450
+ it(), L("library");
434
451
  } catch (t) {
435
452
  if (e.signal.aborted) return;
436
- U(t), q((e) => e.map((e) => e.status === "uploading" ? {
453
+ H(t), W((e) => e.map((e) => e.status === "uploading" ? {
437
454
  ...e,
438
455
  status: "error",
439
456
  error: "Upload failed"
440
457
  } : e)), u?.(t);
441
458
  } finally {
442
- X.current === e && (X.current = null, Pe(!1));
459
+ Y.current === e && (Y.current = null, Be(!1));
443
460
  }
444
461
  }, [
445
462
  F,
446
463
  $,
447
- Ze,
464
+ it,
448
465
  u,
449
466
  l,
450
- J,
467
+ q,
451
468
  r,
452
- re,
453
- $e,
454
- K,
455
- Ie,
456
- Ne
469
+ L,
470
+ ot,
471
+ Re,
472
+ G,
473
+ ze
457
474
  ]),
458
- cancelUpload: D(() => {
459
- X.current?.abort(), X.current = null, Pe(!1), q((e) => e.map((e) => e.status === "uploading" ? {
475
+ cancelUpload: M(() => {
476
+ Y.current?.abort(), Y.current = null, Be(!1), W((e) => e.map((e) => e.status === "uploading" ? {
460
477
  ...e,
461
478
  status: "staged",
462
479
  progress: 0,
463
480
  error: void 0
464
481
  } : e));
465
482
  }, []),
466
- updateItem: D(async (e, t) => {
467
- let n = F.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) => ({
483
+ updateItem: M(async (e, t) => {
484
+ let n = F.getId(e), r = `update:${n}`, i = (X.current.get(r) ?? 0) + 1;
485
+ X.current.set(r, i);
486
+ let a = Ie[n];
487
+ H(null), Le((e) => ({
471
488
  ...e,
472
489
  [n]: {
473
490
  ...e[n],
@@ -477,69 +494,69 @@ function Ae({ items: e = ve, fetcher: t, accessors: n, selectionMode: r = "multi
477
494
  try {
478
495
  return await s?.(e, t), !0;
479
496
  } catch (e) {
480
- return Be.current.get(r) === i && Me((e) => {
497
+ return X.current.get(r) === i && Le((e) => {
481
498
  let t = { ...e };
482
499
  return a ? t[n] = a : delete t[n], t;
483
- }), U(e), u?.(e), !1;
500
+ }), H(e), u?.(e), !1;
484
501
  }
485
502
  }, [
486
503
  F,
487
- G,
504
+ Ie,
488
505
  u,
489
506
  s
490
507
  ]),
491
- removeItem: D(async (e) => {
492
- let t = F.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));
508
+ removeItem: M(async (e) => {
509
+ let t = F.getId(e), n = `delete:${t}`, r = (X.current.get(n) ?? 0) + 1;
510
+ X.current.set(n, r);
511
+ let i = De.has(t);
512
+ H(null), Oe((e) => new Set(e).add(t));
496
513
  try {
497
- return await c?.(e), Y.has(t) && $(J.filter((e) => e !== t)), !0;
514
+ return await c?.(e), J.has(t) && $(q.filter((e) => e !== t)), !0;
498
515
  } catch (e) {
499
- return !i && Be.current.get(n) === r && W((e) => {
516
+ return !i && X.current.get(n) === r && Oe((e) => {
500
517
  let n = new Set(e);
501
518
  return n.delete(t), n;
502
- }), U(e), u?.(e), !1;
519
+ }), H(e), u?.(e), !1;
503
520
  }
504
521
  }, [
505
522
  F,
506
523
  $,
507
524
  u,
508
525
  c,
509
- je,
510
- J,
511
- Y
526
+ De,
527
+ q,
528
+ J
512
529
  ]),
513
530
  accessors: F
514
531
  };
515
532
  }
516
533
  //#endregion
517
534
  //#region src/components/features/media-library/partials/media-library-partials.tsx
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";
519
- function W(e, t) {
520
- return N(e === "image" ? I : e === "video" ? pe : ie, { className: t ?? "size-icon" });
535
+ var Le = `${h.nativeButtonReset} absolute inset-0 z-10 block h-full w-full cursor-pointer outline-none ${s.inset}`, Re = "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 p-0 text-transparent shadow-xs", W = "border-primary bg-primary text-primary-foreground opacity-100";
536
+ function ze(e, t) {
537
+ return I(e === "image" ? ce : e === "video" ? ve : z, { className: t ?? "size-icon" });
521
538
  }
522
- function G(e, t) {
539
+ function Be(e, t) {
523
540
  return e === "image" ? t.typeImage : e === "video" ? t.typeVideo : t.typeFile;
524
541
  }
525
- function Me(e, t) {
526
- return e ? V(t.usedIn, { count: e }) : t.notUsed;
542
+ function Ve(e, t) {
543
+ return e ? H(t.usedIn, { count: e }) : t.notUsed;
527
544
  }
528
- function K({ children: e, tint: t, className: n }) {
529
- return /* @__PURE__ */ N("div", {
545
+ function G({ children: e, tint: t, className: n }) {
546
+ return /* @__PURE__ */ I("div", {
530
547
  className: r("media-library-preview relative overflow-hidden bg-muted", n),
531
548
  style: t ? { background: t } : void 0,
532
549
  children: e
533
550
  });
534
551
  }
535
- function q({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
536
- let [a, o] = j(!1);
537
- return O(() => {
552
+ function K({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
553
+ let [a, o] = P(!1);
554
+ return re(() => {
538
555
  o(!1);
539
- }, [e]), !e || a ? /* @__PURE__ */ N("div", {
556
+ }, [e]), !e || a ? /* @__PURE__ */ I("div", {
540
557
  className: "media-library-preview--fallback flex size-full items-center justify-center text-muted-foreground",
541
- children: W(n, "size-6")
542
- }) : /* @__PURE__ */ N("img", {
558
+ children: ze(n, "size-6")
559
+ }) : /* @__PURE__ */ I("img", {
543
560
  src: e,
544
561
  alt: t,
545
562
  loading: i,
@@ -547,23 +564,23 @@ function q({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
547
564
  onError: () => o(!0)
548
565
  });
549
566
  }
550
- function Ne({ icon: e, title: t, description: n, action: i, className: a }) {
551
- return /* @__PURE__ */ N(T, {
567
+ function He({ icon: e, title: t, description: n, action: i, className: a }) {
568
+ return /* @__PURE__ */ I(te, {
552
569
  title: t,
553
570
  description: n ?? !1,
554
571
  actions: i,
555
- media: e ?? /* @__PURE__ */ N(I, {
572
+ media: e ?? /* @__PURE__ */ I(ce, {
556
573
  className: "size-icon",
557
574
  "aria-hidden": "true"
558
575
  }),
559
576
  mediaVariant: "icon-soft",
560
577
  padding: "md",
561
578
  border: !0,
562
- className: r("media-library-empty-state--component min-h-64 bg-muted/20", a)
579
+ className: r("media-library-empty-state--component min-h-64 bg-muted/30", a)
563
580
  });
564
581
  }
565
- function Pe({ query: n, type: i, typeFilters: s, collection: l, sort: u, view: d, collections: f = [], strings: p, onQueryChange: m, onTypeChange: h, onCollectionChange: g, onSortChange: _, onViewChange: b, onClearFilters: S, toolbarEnd: ee }) {
566
- let { defaultScale: T } = t(), E = e(void 0, T), D = [
582
+ function q({ query: n, type: o, typeFilters: s, collection: c, sort: u, view: d, collections: f = [], strings: p, onQueryChange: m, onTypeChange: g, onCollectionChange: _, onSortChange: v, onViewChange: y, onClearFilters: b, toolbarEnd: S, selecting: w = !1, onSelectingChange: T }) {
583
+ let { defaultScale: k } = e(), A = t(void 0, k), ee = [
567
584
  {
568
585
  value: "all",
569
586
  label: p.allTypes,
@@ -572,17 +589,17 @@ function Pe({ query: n, type: i, typeFilters: s, collection: l, sort: u, view: d
572
589
  {
573
590
  value: "image",
574
591
  label: p.images,
575
- icon: I
592
+ icon: ce
576
593
  },
577
594
  {
578
595
  value: "video",
579
596
  label: p.videos,
580
- icon: pe
597
+ icon: ve
581
598
  },
582
599
  {
583
600
  value: "file",
584
601
  label: p.files,
585
- icon: ie
602
+ icon: z
586
603
  }
587
604
  ].filter((e) => (s ?? [
588
605
  "all",
@@ -594,7 +611,7 @@ function Pe({ query: n, type: i, typeFilters: s, collection: l, sort: u, view: d
594
611
  }, ...f.map((e) => ({
595
612
  value: e.value,
596
613
  label: String(e.label)
597
- }))], O = [
614
+ }))], j = [
598
615
  {
599
616
  value: "newest",
600
617
  label: p.sortNewest
@@ -611,65 +628,65 @@ function Pe({ query: n, type: i, typeFilters: s, collection: l, sort: u, view: d
611
628
  value: "usage",
612
629
  label: p.sortUsage
613
630
  }
614
- ], k = n.trim(), A = k.length > 0, j = A || i !== "all" || l !== "all";
615
- return /* @__PURE__ */ P(c, {
631
+ ], M = n.trim(), ne = M.length > 0, re = ne || o !== "all" || c !== "all";
632
+ return /* @__PURE__ */ L(l, {
616
633
  direction: "horizontal",
617
634
  wrap: !0,
618
635
  align: "start",
619
636
  gap: "md",
620
637
  className: "media-library-toolbar--component",
621
638
  children: [
622
- /* @__PURE__ */ P(c, {
639
+ /* @__PURE__ */ L(l, {
623
640
  gap: "xs",
624
641
  className: "media-library-toolbar--search min-w-52 flex-1",
625
- children: [/* @__PURE__ */ N(y, {
642
+ children: [/* @__PURE__ */ I(C, {
626
643
  value: n,
627
644
  onChange: (e) => m(e.target.value),
628
645
  placeholder: p.searchPlaceholder,
629
- startIcon: le,
646
+ startIcon: me,
630
647
  clearable: !0,
631
648
  onClear: () => m(""),
632
649
  strings: { clear: p.clearSearch },
633
650
  className: "bg-background"
634
- }), !!A && /* @__PURE__ */ N(c, {
651
+ }), !!ne && /* @__PURE__ */ I(l, {
635
652
  direction: "horizontal",
636
653
  gap: "xs",
637
654
  wrap: !1,
638
655
  className: "media-library-toolbar--search-value px-space-xs",
639
- children: /* @__PURE__ */ P(v, {
656
+ children: /* @__PURE__ */ L(x, {
640
657
  tone: "secondary",
641
658
  className: "max-w-full",
642
- children: [/* @__PURE__ */ N(a, {
659
+ children: [/* @__PURE__ */ I(a, {
643
660
  tag: "span",
644
661
  size: "inherit",
645
662
  className: "text-current",
646
663
  children: p.activeSearchLabel
647
- }), /* @__PURE__ */ N(a, {
664
+ }), /* @__PURE__ */ I(a, {
648
665
  tag: "span",
649
666
  size: "inherit",
650
667
  weight: "normal",
651
668
  className: "min-w-0 truncate text-current",
652
- children: k
669
+ children: M
653
670
  })]
654
671
  })
655
672
  })]
656
673
  }),
657
- /* @__PURE__ */ N("div", {
658
- className: r("media-library-toolbar--type-toggle", C.frame, w[E]),
674
+ /* @__PURE__ */ I("div", {
675
+ className: r("media-library-toolbar--type-toggle", D.frame, O[A]),
659
676
  role: "tablist",
660
677
  "aria-label": p.typeFilterLabel,
661
- children: D.map((e) => {
662
- let t = e.icon, n = i === e.value;
663
- return /* @__PURE__ */ P(o, {
678
+ children: ee.map((e) => {
679
+ let t = e.icon, n = o === e.value;
680
+ return /* @__PURE__ */ L(i, {
664
681
  type: "button",
665
682
  role: "tab",
666
683
  "aria-selected": n,
667
684
  tone: "secondary",
668
685
  buttonStyle: "ghost",
669
686
  size: "sm",
670
- className: r(C.item, "shadow-none", n ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
671
- onClick: () => h(e.value),
672
- children: [t && /* @__PURE__ */ N(t, { className: "size-icon-md" }), /* @__PURE__ */ N(a, {
687
+ className: r(D.item, "shadow-none", n ? `${h.segmentActive} hover:bg-card` : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
688
+ onClick: () => g(e.value),
689
+ children: [t && /* @__PURE__ */ I(t, { className: "size-icon-md" }), /* @__PURE__ */ I(a, {
673
690
  tag: "span",
674
691
  size: "xs",
675
692
  weight: "medium",
@@ -679,147 +696,167 @@ function Pe({ query: n, type: i, typeFilters: s, collection: l, sort: u, view: d
679
696
  }, e.value);
680
697
  })
681
698
  }),
682
- /* @__PURE__ */ N("div", {
699
+ /* @__PURE__ */ I("div", {
683
700
  className: "min-w-40",
684
- children: /* @__PURE__ */ N(x, {
685
- value: l,
701
+ children: /* @__PURE__ */ I(E, {
702
+ value: c,
686
703
  options: te,
687
- onValueChange: (e) => g(e ?? "all"),
704
+ onValueChange: (e) => _(e ?? "all"),
688
705
  placeholder: p.collectionFilterLabel,
689
706
  "aria-label": p.collectionFilterLabel,
690
707
  className: "bg-background"
691
708
  })
692
709
  }),
693
- /* @__PURE__ */ N("div", {
710
+ /* @__PURE__ */ I("div", {
694
711
  className: "min-w-32",
695
- children: /* @__PURE__ */ N(x, {
712
+ children: /* @__PURE__ */ I(E, {
696
713
  value: u,
697
- options: O,
698
- onValueChange: (e) => _(e ?? "newest"),
714
+ options: j,
715
+ onValueChange: (e) => v(e ?? "newest"),
699
716
  placeholder: p.sortLabel,
700
717
  "aria-label": p.sortLabel,
701
718
  className: "bg-background"
702
719
  })
703
720
  }),
704
- /* @__PURE__ */ P("div", {
705
- className: r("media-library-toolbar--view-toggle ml-auto", C.frame, w[E]),
706
- children: [/* @__PURE__ */ N(o, {
721
+ /* @__PURE__ */ L("div", {
722
+ className: r("media-library-toolbar--view-toggle ml-auto", D.frame, O[A]),
723
+ children: [/* @__PURE__ */ I(i, {
707
724
  type: "button",
708
725
  tone: d === "grid" ? "neutral" : "secondary",
709
726
  buttonStyle: d === "grid" ? "solid" : "ghost",
710
727
  size: "sm",
711
728
  iconOnly: !0,
712
- className: r(C.item, d === "grid" && "bg-background text-foreground shadow-xs hover:bg-background"),
729
+ className: r(D.item, d === "grid" && `${h.segmentActive} hover:bg-card`),
713
730
  "aria-label": p.gridView,
714
- onClick: () => b("grid"),
715
- children: /* @__PURE__ */ N(ae, { className: "size-icon-md" })
716
- }), /* @__PURE__ */ N(o, {
731
+ onClick: () => y("grid"),
732
+ children: /* @__PURE__ */ I(se, { className: "size-icon-md" })
733
+ }), /* @__PURE__ */ I(i, {
717
734
  type: "button",
718
735
  tone: d === "table" ? "neutral" : "secondary",
719
736
  buttonStyle: d === "table" ? "solid" : "ghost",
720
737
  size: "sm",
721
738
  iconOnly: !0,
722
- className: r(C.item, d === "table" && "bg-background text-foreground shadow-xs hover:bg-background"),
739
+ className: r(D.item, d === "table" && `${h.segmentActive} hover:bg-card`),
723
740
  "aria-label": p.tableView,
724
- onClick: () => b("table"),
725
- children: /* @__PURE__ */ N(R, { className: "size-icon-md" })
741
+ onClick: () => y("table"),
742
+ children: /* @__PURE__ */ I(ue, { className: "size-icon-md" })
726
743
  })]
727
744
  }),
728
- !!j && /* @__PURE__ */ N(o, {
745
+ !!re && /* @__PURE__ */ I(i, {
729
746
  type: "button",
730
747
  tone: "secondary",
731
748
  buttonStyle: "ghost",
732
- onClick: S,
749
+ onClick: b,
733
750
  children: p.clearFilters
734
751
  }),
735
- ee
752
+ !!T && /* @__PURE__ */ I(i, {
753
+ type: "button",
754
+ "aria-pressed": w,
755
+ tone: "secondary",
756
+ buttonStyle: "outline",
757
+ className: r("media-library-toolbar--select", w && h.togglePressed),
758
+ onClick: () => T(!w),
759
+ children: p.selectMode
760
+ }),
761
+ S
736
762
  ]
737
763
  });
738
764
  }
739
- function Fe({ item: e, selected: t = !1, density: n = "comfortable", showMeta: i = !0, accessors: l, strings: u, onToggle: d, onDetails: f, className: p }) {
740
- 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);
741
- return /* @__PURE__ */ P("div", {
765
+ function J({ item: e, selected: t = !1, density: n = "comfortable", showMeta: o = !0, accessors: u, strings: d, onToggle: f, onDetails: p, onOpen: m, selecting: g = !1, className: v }) {
766
+ let y = u.getType(e), b = u.getName(e), S = u.getSrc(e), C = u.getAlt(e) || b, w = u.getSize(e), T = u.getUsageCount(e), E = u.getPublic(e) === !1, D = u.getDuration(e), O = !!m && !g, k = O ? m : f;
767
+ return /* @__PURE__ */ L("div", {
742
768
  "data-selected": t || void 0,
769
+ "data-selecting": g || void 0,
743
770
  "data-gallery-density": n,
744
- 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),
745
- onClick: d,
771
+ className: r("media-library-card--component relative group/card overflow-hidden rounded-radius border border-border bg-card text-card-foreground text-left shadow-xs transition-all", `${h.tileHover} hover:shadow-sm`, t && "media-library-card--selected border-primary ring-1 ring-primary", v),
772
+ onClick: k,
746
773
  children: [
747
- !!d && /* @__PURE__ */ N("button", {
774
+ !!k && /* @__PURE__ */ I("button", {
748
775
  type: "button",
749
- "aria-label": g,
750
- "aria-pressed": t,
751
- className: r("media-library-card--select rounded-radius", je),
776
+ "aria-label": b,
777
+ "aria-pressed": O ? void 0 : t,
778
+ className: r("media-library-card--select rounded-radius", Le),
752
779
  onClick: (e) => {
753
- e.stopPropagation(), d();
780
+ e.stopPropagation(), k();
754
781
  }
755
782
  }),
756
- /* @__PURE__ */ P(K, {
757
- tint: l.getTint(e),
783
+ /* @__PURE__ */ L(G, {
784
+ tint: u.getTint(e),
758
785
  className: r(n === "compact" ? "aspect-square" : "aspect-[4/3]"),
759
786
  children: [
760
- /* @__PURE__ */ N(q, {
761
- src: _,
762
- alt: y,
763
- type: h,
787
+ /* @__PURE__ */ I(K, {
788
+ src: S,
789
+ alt: C,
790
+ type: y,
764
791
  className: "size-full object-cover"
765
792
  }),
766
- /* @__PURE__ */ N("span", {
767
- 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 text-transparent opacity-0 shadow-xs transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100", t && "bg-primary text-primary-foreground opacity-100"),
793
+ O && f ? /* @__PURE__ */ I("button", {
794
+ type: "button",
795
+ "aria-label": H(d.selectItem, { name: b }),
796
+ "aria-pressed": t,
797
+ className: r(Re, `z-10 cursor-pointer opacity-0 transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100 pointer-coarse:opacity-100 ${s.frame}`, t && W),
798
+ onClick: (e) => {
799
+ e.stopPropagation(), f();
800
+ },
801
+ children: /* @__PURE__ */ I(R, { className: "size-icon-sm" })
802
+ }) : /* @__PURE__ */ I("span", {
803
+ className: r(Re, "transition-opacity", g ? "opacity-100" : "opacity-0 group-hover/card:opacity-100 group-focus-within/card:opacity-100", t && W),
768
804
  "aria-hidden": "true",
769
- children: /* @__PURE__ */ N(re, { className: "size-icon-sm" })
805
+ children: /* @__PURE__ */ I(R, { className: "size-icon-sm" })
770
806
  }),
771
- !!f && /* @__PURE__ */ N(o, {
807
+ !!p && /* @__PURE__ */ I(i, {
772
808
  type: "button",
773
809
  tone: "secondary",
774
810
  buttonStyle: "solid",
775
811
  size: "sm",
776
812
  iconOnly: !0,
777
- 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",
778
- "aria-label": V(u.cardDetails, { name: g }),
813
+ className: "media-library-card--details absolute z-10 right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100 pointer-coarse:opacity-100",
814
+ "aria-label": H(d.cardDetails, { name: b }),
779
815
  onClick: (e) => {
780
- e.stopPropagation(), f();
816
+ e.stopPropagation(), p();
781
817
  },
782
- children: /* @__PURE__ */ N(L, { className: "size-icon-md" })
818
+ children: /* @__PURE__ */ I(le, { className: "size-icon-md" })
783
819
  }),
784
- h === "video" && !!C && /* @__PURE__ */ P(v, {
820
+ y === "video" && !!D && /* @__PURE__ */ L(x, {
785
821
  tone: "secondary",
786
822
  className: "media-library-card--duration absolute bottom-2 left-2 bg-inverse-background text-inverse-foreground",
787
- children: [/* @__PURE__ */ N(B, { className: "size-icon-sm fill-current" }), C]
823
+ children: [/* @__PURE__ */ I(fe, { className: "size-icon-sm fill-current" }), D]
788
824
  }),
789
- S && /* @__PURE__ */ N(v, {
825
+ E && /* @__PURE__ */ I(x, {
790
826
  tone: "secondary",
791
827
  className: "media-library-card--private absolute bottom-2 right-2 bg-card text-card-foreground",
792
- children: /* @__PURE__ */ N(z, { className: "size-icon-sm" })
828
+ children: /* @__PURE__ */ I(de, { className: "size-icon-sm" })
793
829
  })
794
830
  ]
795
831
  }),
796
- /* @__PURE__ */ N("div", {
832
+ /* @__PURE__ */ I("div", {
797
833
  className: r("media-library-card--body", n === "compact" ? "p-surface-xs" : "p-surface"),
798
- children: /* @__PURE__ */ P(s, {
834
+ children: /* @__PURE__ */ L(c, {
799
835
  columns: 1,
800
836
  gap: "xs",
801
- children: [/* @__PURE__ */ N(a, {
837
+ children: [/* @__PURE__ */ I(a, {
802
838
  tag: "div",
839
+ type: "inherit",
803
840
  weight: "semibold",
804
841
  className: "truncate",
805
- children: g
806
- }), i && /* @__PURE__ */ P(c, {
842
+ children: b
843
+ }), o && /* @__PURE__ */ L(l, {
807
844
  direction: "horizontal",
808
845
  align: "center",
809
846
  justify: "between",
810
847
  gap: "md",
811
848
  className: "min-w-0",
812
- children: [/* @__PURE__ */ N(m, {
813
- value: b,
849
+ children: [/* @__PURE__ */ I(_, {
850
+ value: w,
814
851
  size: "xs",
815
852
  className: "truncate",
816
- emptyLabel: u.unknownSize
817
- }), !!x && /* @__PURE__ */ P(a, {
853
+ emptyLabel: d.unknownSize
854
+ }), !!T && /* @__PURE__ */ L(a, {
818
855
  tag: "span",
819
856
  size: "xs",
820
857
  type: "secondary",
821
858
  className: "inline-flex items-center gap-space-xs",
822
- children: [/* @__PURE__ */ N(se, { className: "size-icon-sm" }), x]
859
+ children: [/* @__PURE__ */ I(V, { className: "size-icon-sm" }), T]
823
860
  })]
824
861
  })]
825
862
  })
@@ -827,253 +864,266 @@ function Fe({ item: e, selected: t = !1, density: n = "comfortable", showMeta: i
827
864
  ]
828
865
  });
829
866
  }
830
- function Ie({ items: e, selectedSet: t, accessors: n, strings: s, onToggle: c, onDetails: l }) {
831
- return /* @__PURE__ */ P("div", {
867
+ function Ue({ items: e, selectedSet: t, accessors: n, strings: c, onToggle: l, onDetails: u, onOpen: d, selecting: f = !1 }) {
868
+ let p = !!d && !f;
869
+ return /* @__PURE__ */ L("div", {
832
870
  className: "media-library-list--component min-w-180",
833
- children: [/* @__PURE__ */ P("div", {
871
+ children: [/* @__PURE__ */ L("div", {
834
872
  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",
835
873
  children: [
836
- /* @__PURE__ */ N("span", {}),
837
- /* @__PURE__ */ N("span", {}),
838
- /* @__PURE__ */ N(i, { children: s.table.name }),
839
- /* @__PURE__ */ N(i, { children: s.table.type }),
840
- /* @__PURE__ */ N(i, { children: s.table.size }),
841
- /* @__PURE__ */ N(i, { children: s.table.collection }),
842
- /* @__PURE__ */ N(i, { children: s.table.used }),
843
- /* @__PURE__ */ N("span", {})
874
+ /* @__PURE__ */ I("span", {}),
875
+ /* @__PURE__ */ I("span", {}),
876
+ /* @__PURE__ */ I(o, { children: c.table.name }),
877
+ /* @__PURE__ */ I(o, { children: c.table.type }),
878
+ /* @__PURE__ */ I(o, { children: c.table.size }),
879
+ /* @__PURE__ */ I(o, { children: c.table.collection }),
880
+ /* @__PURE__ */ I(o, { children: c.table.used }),
881
+ /* @__PURE__ */ I("span", {})
844
882
  ]
845
883
  }), e.map((e) => {
846
- let i = n.getId(e), u = t.has(i), d = n.getType(e), f = n.getName(e), p = n.getSrc(e), h = n.getPublic(e) === !1;
847
- return /* @__PURE__ */ P("div", {
848
- "data-selected": u || void 0,
849
- 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"),
850
- onClick: () => c(i),
884
+ let o = n.getId(e), f = t.has(o), m = n.getType(e), g = n.getName(e), v = n.getSrc(e), y = n.getPublic(e) === !1;
885
+ return /* @__PURE__ */ L("div", {
886
+ "data-selected": f || void 0,
887
+ 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 ${h.rowHover}`, f && h.rowSelected),
888
+ onClick: () => p && d ? d(o) : l(o),
851
889
  children: [
852
- /* @__PURE__ */ N("button", {
890
+ /* @__PURE__ */ I("button", {
853
891
  type: "button",
854
- "aria-label": f,
855
- "aria-pressed": u,
856
- className: r("media-library-list--select rounded-inner", je),
892
+ "aria-label": g,
893
+ "aria-pressed": p ? void 0 : f,
894
+ className: r("media-library-list--select rounded-inner", Le),
857
895
  onClick: (e) => {
858
- e.stopPropagation(), c(i);
896
+ e.stopPropagation(), p && d ? d(o) : l(o);
859
897
  }
860
898
  }),
861
- /* @__PURE__ */ N("span", {
862
- 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"),
899
+ p ? /* @__PURE__ */ I("button", {
900
+ type: "button",
901
+ "aria-label": H(c.selectItem, { name: g }),
902
+ "aria-pressed": f,
903
+ className: r(`relative z-10 inline-flex size-icon-lg cursor-pointer items-center justify-center rounded-radius border border-input bg-background p-0 text-transparent ${s.frame}`, f && "border-primary bg-primary text-primary-foreground"),
904
+ onClick: (e) => {
905
+ e.stopPropagation(), l(o);
906
+ },
907
+ children: /* @__PURE__ */ I(R, { className: "size-icon-sm" })
908
+ }) : /* @__PURE__ */ I("span", {
909
+ className: r("inline-flex size-icon-lg items-center justify-center rounded-radius border border-border text-transparent", f && "border-primary bg-primary text-primary-foreground"),
863
910
  "aria-hidden": "true",
864
- children: /* @__PURE__ */ N(re, { className: "size-icon-sm" })
911
+ children: /* @__PURE__ */ I(R, { className: "size-icon-sm" })
865
912
  }),
866
- /* @__PURE__ */ N(K, {
913
+ /* @__PURE__ */ I(G, {
867
914
  tint: n.getTint(e),
868
915
  className: "size-9 rounded-inner",
869
- children: p ? /* @__PURE__ */ N("img", {
870
- src: p,
916
+ children: v ? /* @__PURE__ */ I("img", {
917
+ src: v,
871
918
  alt: "",
872
919
  loading: "lazy",
873
920
  className: "size-full object-cover"
874
- }) : /* @__PURE__ */ N("div", {
921
+ }) : /* @__PURE__ */ I("div", {
875
922
  className: "flex size-full items-center justify-center text-muted-foreground",
876
- children: W(d, "size-icon")
923
+ children: ze(m, "size-icon")
877
924
  })
878
925
  }),
879
- /* @__PURE__ */ P(a, {
926
+ /* @__PURE__ */ L(a, {
880
927
  tag: "div",
928
+ type: "inherit",
881
929
  weight: "semibold",
882
930
  className: "flex min-w-0 items-center gap-space-xs truncate",
883
- children: [f, h && /* @__PURE__ */ N(z, { className: "size-icon-sm shrink-0 text-muted-foreground" })]
931
+ children: [g, y && /* @__PURE__ */ I(de, { className: "size-icon-sm shrink-0 text-muted-foreground" })]
884
932
  }),
885
- /* @__PURE__ */ N(v, {
933
+ /* @__PURE__ */ I(x, {
886
934
  tone: "secondary",
887
- children: G(d, s)
935
+ children: Be(m, c)
888
936
  }),
889
- /* @__PURE__ */ N(m, {
937
+ /* @__PURE__ */ I(_, {
890
938
  value: n.getSize(e),
891
939
  size: "xs",
892
- emptyLabel: s.unknownSize
940
+ emptyLabel: c.unknownSize
893
941
  }),
894
- /* @__PURE__ */ N(a, {
942
+ /* @__PURE__ */ I(a, {
895
943
  size: "xs",
896
944
  type: "secondary",
897
945
  className: "truncate",
898
946
  children: n.getCollection(e) || "—"
899
947
  }),
900
- /* @__PURE__ */ N(a, {
948
+ /* @__PURE__ */ I(a, {
901
949
  size: "xs",
902
950
  type: "secondary",
903
951
  children: n.getUsageCount(e) ? n.getUsageCount(e) : "—"
904
952
  }),
905
- /* @__PURE__ */ N(o, {
953
+ /* @__PURE__ */ I(i, {
906
954
  type: "button",
907
955
  tone: "secondary",
908
956
  buttonStyle: "ghost",
909
957
  size: "sm",
910
958
  iconOnly: !0,
911
- className: "relative z-20",
912
- "aria-label": V(s.cardDetails, { name: f }),
959
+ className: "relative z-10",
960
+ "aria-label": H(c.cardDetails, { name: g }),
913
961
  onClick: (e) => {
914
- e.stopPropagation(), l(i);
962
+ e.stopPropagation(), u(o);
915
963
  },
916
- children: /* @__PURE__ */ N(L, { className: "size-icon-md" })
964
+ children: /* @__PURE__ */ I(le, { className: "size-icon-md" })
917
965
  })
918
966
  ]
919
- }, i);
967
+ }, o);
920
968
  })]
921
969
  });
922
970
  }
923
- function Le({ item: e, collections: t = [], accessors: n, strings: r, onClose: i, onUpdate: l, onRemove: u, onReplace: d, renderDetail: f }) {
971
+ function Y({ item: e, collections: t = [], accessors: n, strings: r, onClose: o, onUpdate: s, onRemove: c, onReplace: u, renderDetail: d }) {
924
972
  if (!e) return null;
925
- let p = n.getName(e), g = n.getType(e), _ = n.getSrc(e), C = n.getCollection(e) ?? t[0]?.value ?? "", w = n.getTags(e), ee = n.getPublic(e) ?? !0, T = f?.(e, {
973
+ let f = n.getName(e), p = n.getType(e), m = n.getSrc(e), h = n.getCollection(e) ?? t[0]?.value ?? "", g = n.getTags(e), y = n.getPublic(e) ?? !0, b = d?.(e, {
926
974
  accessors: n,
927
- update: l,
928
- remove: u,
929
- replace: d,
930
- close: i
975
+ update: s,
976
+ remove: c,
977
+ replace: u,
978
+ close: o
931
979
  });
932
- return T ? /* @__PURE__ */ N(M, { children: T }) : /* @__PURE__ */ P("aside", {
933
- 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",
934
- children: [/* @__PURE__ */ N("div", {
980
+ return b ? /* @__PURE__ */ I(F, { children: b }) : /* @__PURE__ */ L("aside", {
981
+ className: "media-library-detail-panel--component flex min-h-0 w-full flex-col border-l border-border bg-background text-foreground @2xl/media-library:w-72",
982
+ children: [/* @__PURE__ */ I("div", {
935
983
  className: "media-library-detail-panel--header border-b border-border p-surface",
936
- children: /* @__PURE__ */ P(c, {
984
+ children: /* @__PURE__ */ L(l, {
937
985
  direction: "horizontal",
938
986
  align: "center",
939
987
  gap: "md",
940
- children: [/* @__PURE__ */ N(o, {
988
+ children: [/* @__PURE__ */ I(i, {
941
989
  type: "button",
942
990
  tone: "secondary",
943
991
  buttonStyle: "ghost",
944
992
  size: "sm",
945
993
  iconOnly: !0,
946
994
  "aria-label": r.detail.close,
947
- onClick: i,
948
- children: /* @__PURE__ */ N(F, { className: "size-icon-md" })
949
- }), /* @__PURE__ */ N(a, {
995
+ "data-media-detail-close": "",
996
+ onClick: o,
997
+ children: /* @__PURE__ */ I(ae, { className: "size-icon-md" })
998
+ }), /* @__PURE__ */ I(a, {
950
999
  weight: "semibold",
951
1000
  children: r.detail.title
952
1001
  })]
953
1002
  })
954
- }), /* @__PURE__ */ P("div", {
955
- className: "media-library-detail-panel--body grid min-h-0 gap-space-xl overflow-y-auto p-surface",
1003
+ }), /* @__PURE__ */ L("div", {
1004
+ className: "media-library-detail-panel--body grid min-h-0 auto-rows-max gap-space-xl overflow-y-auto p-surface",
956
1005
  children: [
957
- /* @__PURE__ */ P(K, {
1006
+ /* @__PURE__ */ L(G, {
958
1007
  tint: n.getTint(e),
959
1008
  className: "aspect-[4/3] rounded-radius border border-border",
960
- children: [/* @__PURE__ */ N(q, {
961
- src: _,
962
- alt: n.getAlt(e) || p,
963
- type: g,
1009
+ children: [/* @__PURE__ */ I(K, {
1010
+ src: m,
1011
+ alt: n.getAlt(e) || f,
1012
+ type: p,
964
1013
  className: "size-full object-cover"
965
- }), g === "video" && !!n.getDuration(e) && /* @__PURE__ */ P(v, {
1014
+ }), p === "video" && !!n.getDuration(e) && /* @__PURE__ */ L(x, {
966
1015
  className: "absolute bottom-2 right-2 bg-inverse-background text-inverse-foreground",
967
- children: [/* @__PURE__ */ N(B, { className: "size-icon-sm fill-current" }), n.getDuration(e)]
1016
+ children: [/* @__PURE__ */ I(fe, { className: "size-icon-sm fill-current" }), n.getDuration(e)]
968
1017
  })]
969
1018
  }),
970
- /* @__PURE__ */ N(a, {
1019
+ /* @__PURE__ */ I(a, {
971
1020
  tag: "div",
972
1021
  weight: "semibold",
973
1022
  className: "break-words",
974
- children: p
1023
+ children: f
975
1024
  }),
976
- /* @__PURE__ */ N(s, {
977
- render: /* @__PURE__ */ N("dl", {}),
978
- columns: 1,
979
- gap: "md",
1025
+ /* @__PURE__ */ I(A, {
1026
+ layout: "rows",
1027
+ valueAlign: "end",
1028
+ density: "compact",
980
1029
  className: "media-library-detail-panel--facts",
981
- children: [
982
- [r.detail.type, G(g, r)],
983
- [r.detail.size, /* @__PURE__ */ N(m, {
984
- value: n.getSize(e),
985
- weight: "medium",
986
- emptyLabel: r.unknownSize
987
- })],
988
- [r.detail.dimensions, /* @__PURE__ */ N(h, {
989
- width: n.getWidth(e),
990
- height: n.getHeight(e),
991
- weight: "medium",
992
- emptyLabel: r.unknownSize
993
- })],
994
- [r.detail.uploaded, String(n.getUploadedAt(e) ?? "—")],
995
- [r.detail.usedIn, Me(n.getUsageCount(e), r)]
996
- ].map(([e, t]) => /* @__PURE__ */ P(c, {
997
- direction: "horizontal",
998
- justify: "between",
999
- gap: "xl",
1000
- children: [/* @__PURE__ */ N("dt", { children: /* @__PURE__ */ N(a, {
1001
- tag: "span",
1002
- size: "xs",
1003
- type: "secondary",
1004
- children: e
1005
- }) }), /* @__PURE__ */ N("dd", {
1006
- className: "m-0 text-right",
1007
- children: typeof t == "string" ? /* @__PURE__ */ N(a, {
1008
- tag: "span",
1009
- weight: "medium",
1010
- children: t
1011
- }) : t
1012
- })]
1013
- }, e))
1030
+ items: [
1031
+ {
1032
+ id: "type",
1033
+ label: r.detail.type,
1034
+ value: Be(p, r)
1035
+ },
1036
+ {
1037
+ id: "size",
1038
+ label: r.detail.size,
1039
+ value: /* @__PURE__ */ I(_, {
1040
+ value: n.getSize(e),
1041
+ emptyLabel: r.unknownSize
1042
+ })
1043
+ },
1044
+ {
1045
+ id: "dimensions",
1046
+ label: r.detail.dimensions,
1047
+ value: /* @__PURE__ */ I(v, {
1048
+ width: n.getWidth(e),
1049
+ height: n.getHeight(e),
1050
+ emptyLabel: r.unknownSize
1051
+ })
1052
+ },
1053
+ {
1054
+ id: "uploaded",
1055
+ label: r.detail.uploaded,
1056
+ value: String(n.getUploadedAt(e) ?? "—")
1057
+ },
1058
+ {
1059
+ id: "used-in",
1060
+ label: r.detail.usedIn,
1061
+ value: Ve(n.getUsageCount(e), r)
1062
+ }
1063
+ ]
1014
1064
  }),
1015
- /* @__PURE__ */ N(b, {
1065
+ /* @__PURE__ */ I(w, {
1016
1066
  label: r.detail.altText,
1017
- children: /* @__PURE__ */ N(y, {
1067
+ children: /* @__PURE__ */ I(C, {
1018
1068
  value: n.getAlt(e) ?? "",
1019
1069
  placeholder: r.detail.altPlaceholder,
1020
- onChange: (e) => l({ alt: e.target.value })
1070
+ onChange: (e) => s({ alt: e.target.value })
1021
1071
  })
1022
1072
  }),
1023
- /* @__PURE__ */ N(b, {
1073
+ /* @__PURE__ */ I(w, {
1024
1074
  label: r.detail.collection,
1025
- children: /* @__PURE__ */ N(x, {
1026
- value: C,
1075
+ children: /* @__PURE__ */ I(E, {
1076
+ value: h,
1027
1077
  options: t.map((e) => ({
1028
1078
  value: e.value,
1029
1079
  label: String(e.label)
1030
1080
  })),
1031
1081
  "aria-label": r.detail.collection,
1032
- onValueChange: (e) => l({ collection: e })
1082
+ onValueChange: (e) => s({ collection: e })
1033
1083
  })
1034
1084
  }),
1035
- /* @__PURE__ */ N(b, {
1085
+ /* @__PURE__ */ I(w, {
1036
1086
  label: r.detail.tags,
1037
- children: /* @__PURE__ */ N(y, {
1038
- value: w.join(", "),
1087
+ children: /* @__PURE__ */ I(C, {
1088
+ value: g.join(", "),
1039
1089
  placeholder: r.detail.tagsPlaceholder,
1040
- onChange: (e) => l({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
1090
+ onChange: (e) => s({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
1041
1091
  })
1042
1092
  }),
1043
- /* @__PURE__ */ N("div", {
1093
+ /* @__PURE__ */ I("div", {
1044
1094
  className: "media-library-detail-panel--public",
1045
- children: /* @__PURE__ */ P(c, {
1095
+ children: /* @__PURE__ */ L(l, {
1046
1096
  direction: "horizontal",
1047
1097
  align: "center",
1048
1098
  justify: "between",
1049
1099
  gap: "xl",
1050
- children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N(a, {
1100
+ children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I(a, {
1051
1101
  weight: "semibold",
1052
1102
  children: r.detail.public
1053
- }), /* @__PURE__ */ N(a, {
1103
+ }), /* @__PURE__ */ I(a, {
1054
1104
  size: "xs",
1055
1105
  type: "secondary",
1056
- children: ee ? r.detail.publicHint : r.detail.privateHint
1057
- })] }), /* @__PURE__ */ N(S, {
1106
+ children: y ? r.detail.publicHint : r.detail.privateHint
1107
+ })] }), /* @__PURE__ */ I(T, {
1058
1108
  "aria-label": r.detail.public,
1059
- checked: ee,
1060
- onValueChange: (e) => l({ public: e })
1109
+ checked: y,
1110
+ onValueChange: (e) => s({ public: e })
1061
1111
  })]
1062
1112
  })
1063
1113
  }),
1064
- /* @__PURE__ */ P("div", {
1114
+ /* @__PURE__ */ L("div", {
1065
1115
  className: "media-library-detail-panel--actions flex flex-wrap gap-space-md",
1066
- children: [d && /* @__PURE__ */ N(o, {
1116
+ children: [u && /* @__PURE__ */ I(i, {
1067
1117
  type: "button",
1068
1118
  tone: "secondary",
1069
1119
  buttonStyle: "outline",
1070
- onClick: d,
1120
+ onClick: u,
1071
1121
  children: r.detail.replace
1072
- }), /* @__PURE__ */ N(o, {
1122
+ }), /* @__PURE__ */ I(i, {
1073
1123
  type: "button",
1074
1124
  tone: "destructive",
1075
1125
  buttonStyle: "ghost",
1076
- onClick: u,
1126
+ onClick: c,
1077
1127
  children: r.detail.delete
1078
1128
  })]
1079
1129
  })
@@ -1081,128 +1131,128 @@ function Le({ item: e, collections: t = [], accessors: n, strings: r, onClose: i
1081
1131
  })]
1082
1132
  });
1083
1133
  }
1084
- function Re({ stagedFiles: e, uploadOptions: t, collections: n = [], uploading: r = !1, strings: i, onFiles: s, onRemoveFile: l, onOptionsChange: u, empty: d }) {
1085
- return /* @__PURE__ */ N("div", {
1134
+ function X({ stagedFiles: e, uploadOptions: t, collections: n = [], uploading: r = !1, strings: o, onFiles: s, onRemoveFile: c, onOptionsChange: u, empty: d }) {
1135
+ return /* @__PURE__ */ I("div", {
1086
1136
  className: "media-library-upload-panel--component p-surface",
1087
- children: /* @__PURE__ */ P(c, {
1137
+ children: /* @__PURE__ */ L(l, {
1088
1138
  gap: "xl",
1089
1139
  children: [
1090
- /* @__PURE__ */ N(ee, {
1140
+ /* @__PURE__ */ I(ee, {
1091
1141
  onDrop: s,
1092
1142
  accept: "image/*,video/*",
1093
1143
  multiple: !0,
1094
1144
  size: "md",
1095
1145
  strings: {
1096
- instruction: i.upload.dropTitle,
1097
- helper: i.upload.dropHint,
1098
- dragOver: i.upload.dragOver
1146
+ instruction: o.upload.dropTitle,
1147
+ helper: o.upload.dropHint,
1148
+ dragOver: o.upload.dragOver
1099
1149
  }
1100
1150
  }),
1101
- e.length > 0 ? /* @__PURE__ */ N(c, {
1151
+ e.length > 0 ? /* @__PURE__ */ I(l, {
1102
1152
  gap: "md",
1103
1153
  className: "media-library-upload-panel--staged",
1104
- children: e.map((e) => /* @__PURE__ */ P("div", {
1105
- 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",
1154
+ children: e.map((e) => /* @__PURE__ */ L("div", {
1155
+ className: "media-library-upload-panel--staged-file flex items-center gap-space-lg rounded-radius border border-border bg-card text-card-foreground px-row-x py-row-y",
1106
1156
  children: [
1107
- /* @__PURE__ */ N(K, {
1157
+ /* @__PURE__ */ I(G, {
1108
1158
  className: "size-10 rounded-inner",
1109
- children: e.src ? /* @__PURE__ */ N("img", {
1159
+ children: e.src ? /* @__PURE__ */ I("img", {
1110
1160
  src: e.src,
1111
1161
  alt: e.name,
1112
1162
  className: "size-full object-cover"
1113
- }) : /* @__PURE__ */ N("div", {
1163
+ }) : /* @__PURE__ */ I("div", {
1114
1164
  className: "flex size-full items-center justify-center text-muted-foreground",
1115
- children: W(e.type, "size-icon")
1165
+ children: ze(e.type, "size-icon")
1116
1166
  })
1117
1167
  }),
1118
- /* @__PURE__ */ P("div", {
1168
+ /* @__PURE__ */ L(l, {
1169
+ gap: "md",
1119
1170
  className: "min-w-0 flex-1",
1120
1171
  children: [
1121
- /* @__PURE__ */ P("div", {
1172
+ /* @__PURE__ */ L("div", {
1122
1173
  className: "flex items-baseline gap-space-lg",
1123
- children: [/* @__PURE__ */ N(a, {
1174
+ children: [/* @__PURE__ */ I(a, {
1175
+ type: "inherit",
1124
1176
  weight: "semibold",
1125
1177
  className: "truncate",
1126
1178
  children: e.name
1127
- }), /* @__PURE__ */ N(m, {
1179
+ }), /* @__PURE__ */ I(_, {
1128
1180
  value: e.size,
1129
1181
  size: "xs",
1130
1182
  className: "ml-auto shrink-0"
1131
1183
  })]
1132
1184
  }),
1133
- (e.status === "uploading" || e.status === "done") && /* @__PURE__ */ N("div", {
1134
- className: "mt-space-md h-1 overflow-hidden rounded-full bg-muted",
1135
- children: /* @__PURE__ */ N("div", {
1136
- className: "h-full rounded-full bg-primary transition-[width]",
1137
- style: { width: `${e.progress}%` }
1138
- })
1185
+ (e.status === "uploading" || e.status === "done") && /* @__PURE__ */ I(p, {
1186
+ value: e.progress,
1187
+ size: "sm",
1188
+ "aria-label": e.name
1139
1189
  }),
1140
- e.status === "error" && /* @__PURE__ */ N(a, {
1190
+ e.status === "error" && /* @__PURE__ */ I(a, {
1141
1191
  type: "error",
1142
1192
  children: e.error
1143
1193
  })
1144
1194
  ]
1145
1195
  }),
1146
- e.status === "done" ? /* @__PURE__ */ N(v, {
1196
+ e.status === "done" ? /* @__PURE__ */ I(x, {
1147
1197
  tone: "success",
1148
- children: i.upload.done
1149
- }) : e.status === "uploading" ? /* @__PURE__ */ N(g, {
1198
+ children: o.upload.done
1199
+ }) : e.status === "uploading" ? /* @__PURE__ */ I(y, {
1150
1200
  value: Math.round(e.progress),
1151
1201
  scaled: !0,
1152
1202
  size: "xs",
1153
1203
  type: "secondary"
1154
- }) : /* @__PURE__ */ N(o, {
1204
+ }) : /* @__PURE__ */ I(i, {
1155
1205
  type: "button",
1156
1206
  tone: "secondary",
1157
1207
  buttonStyle: "ghost",
1158
1208
  size: "sm",
1159
1209
  iconOnly: !0,
1160
1210
  disabled: r,
1161
- "aria-label": V(i.upload.removeFile, { name: e.name }),
1162
- onClick: () => l(e.id),
1163
- children: /* @__PURE__ */ N(me, { className: "size-icon-md" })
1211
+ "aria-label": H(o.upload.removeFile, { name: e.name }),
1212
+ onClick: () => c(e.id),
1213
+ children: /* @__PURE__ */ I(ye, { className: "size-icon-md" })
1164
1214
  })
1165
1215
  ]
1166
1216
  }, e.id))
1167
1217
  }) : d,
1168
- /* @__PURE__ */ P("div", {
1218
+ /* @__PURE__ */ L("div", {
1169
1219
  className: "media-library-upload-panel--options grid gap-space-lg @2xl/media-library:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]",
1170
1220
  children: [
1171
- /* @__PURE__ */ N(b, {
1172
- label: i.upload.collection,
1173
- children: /* @__PURE__ */ N(x, {
1221
+ /* @__PURE__ */ I(w, {
1222
+ label: o.upload.collection,
1223
+ children: /* @__PURE__ */ I(E, {
1174
1224
  value: t.collection ?? n[0]?.value,
1175
1225
  options: n.map((e) => ({
1176
1226
  value: e.value,
1177
1227
  label: String(e.label)
1178
1228
  })),
1179
- "aria-label": i.upload.collection,
1229
+ "aria-label": o.upload.collection,
1180
1230
  onValueChange: (e) => u({ collection: e })
1181
1231
  })
1182
1232
  }),
1183
- /* @__PURE__ */ N(b, {
1184
- label: i.upload.tags,
1185
- children: /* @__PURE__ */ N(y, {
1233
+ /* @__PURE__ */ I(w, {
1234
+ label: o.upload.tags,
1235
+ children: /* @__PURE__ */ I(C, {
1186
1236
  value: t.tags.join(", "),
1187
- placeholder: i.upload.tagsPlaceholder,
1237
+ placeholder: o.upload.tagsPlaceholder,
1188
1238
  onChange: (e) => u({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
1189
1239
  })
1190
1240
  }),
1191
- /* @__PURE__ */ P(c, {
1241
+ /* @__PURE__ */ L(l, {
1192
1242
  direction: "horizontal",
1193
1243
  align: "center",
1194
1244
  justify: "between",
1195
1245
  gap: "xl",
1196
1246
  className: "@2xl/media-library:self-end",
1197
- children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N(a, {
1247
+ children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I(a, {
1198
1248
  weight: "semibold",
1199
- children: i.upload.public
1200
- }), /* @__PURE__ */ N(a, {
1249
+ children: o.upload.public
1250
+ }), /* @__PURE__ */ I(a, {
1201
1251
  size: "xs",
1202
1252
  type: "secondary",
1203
- children: i.upload.publicHint
1204
- })] }), /* @__PURE__ */ N(S, {
1205
- "aria-label": i.upload.public,
1253
+ children: o.upload.publicHint
1254
+ })] }), /* @__PURE__ */ I(T, {
1255
+ "aria-label": o.upload.public,
1206
1256
  checked: t.public,
1207
1257
  onValueChange: (e) => u({ public: e })
1208
1258
  })]
@@ -1213,35 +1263,35 @@ function Re({ stagedFiles: e, uploadOptions: t, collections: n = [], uploading:
1213
1263
  })
1214
1264
  });
1215
1265
  }
1216
- function J({ tab: e, selectedIds: t, selectionMode: n, stagedFiles: i, strings: s, onClearSelection: c, className: l }) {
1217
- let u = t.length, d = i.reduce((e, t) => e + t.size, 0), f = i.length, m = r("media-library-footer-summary--component flex min-w-0 items-center gap-space-lg", l);
1218
- return e === "upload" ? /* @__PURE__ */ N("div", {
1219
- className: m,
1266
+ function We({ tab: e, selectedIds: t, selectionMode: n, stagedFiles: o, strings: s, onClearSelection: c, className: l }) {
1267
+ let u = t.length, d = o.reduce((e, t) => e + t.size, 0), f = o.length, p = r("media-library-footer-summary--component flex min-w-0 items-center gap-space-lg", l);
1268
+ return e === "upload" ? /* @__PURE__ */ I("div", {
1269
+ className: p,
1220
1270
  "aria-live": "polite",
1221
- children: /* @__PURE__ */ N(a, {
1271
+ children: /* @__PURE__ */ I(a, {
1222
1272
  size: "xs",
1223
1273
  type: "secondary",
1224
1274
  className: "truncate",
1225
- children: f === 0 ? s.footer.noFiles : V(s.footer.stagedSummary, {
1275
+ children: f === 0 ? s.footer.noFiles : H(s.footer.stagedSummary, {
1226
1276
  count: f,
1227
- size: p(d) ?? s.unknownSize
1277
+ size: g(d) ?? s.unknownSize
1228
1278
  })
1229
1279
  })
1230
- }) : /* @__PURE__ */ N("div", {
1231
- className: m,
1280
+ }) : /* @__PURE__ */ I("div", {
1281
+ className: p,
1232
1282
  "aria-live": "polite",
1233
- children: u > 0 ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(a, {
1283
+ children: u > 0 ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(a, {
1234
1284
  weight: "semibold",
1235
1285
  className: "whitespace-nowrap",
1236
- children: V(s.footer.selectedCount, { count: u })
1237
- }), /* @__PURE__ */ N(o, {
1286
+ children: H(s.footer.selectedCount, { count: u })
1287
+ }), /* @__PURE__ */ I(i, {
1238
1288
  type: "button",
1239
1289
  tone: "secondary",
1240
1290
  buttonStyle: "ghost",
1241
1291
  size: "sm",
1242
1292
  onClick: c,
1243
1293
  children: s.footer.clear
1244
- })] }) : /* @__PURE__ */ N(a, {
1294
+ })] }) : /* @__PURE__ */ I(a, {
1245
1295
  size: "xs",
1246
1296
  type: "secondary",
1247
1297
  className: "truncate",
@@ -1249,56 +1299,56 @@ function J({ tab: e, selectedIds: t, selectionMode: n, stagedFiles: i, strings:
1249
1299
  })
1250
1300
  });
1251
1301
  }
1252
- 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 }) {
1253
- let h = n.length, g = i.length;
1254
- return e === "upload" ? /* @__PURE__ */ P("div", {
1302
+ function Z({ tab: e, selectedItems: t, selectedIds: n, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onUpload: f, onCancelUpload: p, className: m }) {
1303
+ let h = n.length, g = a.length;
1304
+ return e === "upload" ? /* @__PURE__ */ L("div", {
1255
1305
  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),
1256
- children: [/* @__PURE__ */ N(o, {
1306
+ children: [/* @__PURE__ */ I(i, {
1257
1307
  type: "button",
1258
1308
  tone: "secondary",
1259
1309
  buttonStyle: "ghost",
1260
- disabled: a,
1310
+ disabled: o,
1261
1311
  onClick: p,
1262
1312
  children: l ?? s.footer.cancel
1263
- }), /* @__PURE__ */ N(o, {
1313
+ }), /* @__PURE__ */ I(i, {
1264
1314
  tone: "primary",
1265
1315
  type: "button",
1266
- disabled: g === 0 || a,
1316
+ disabled: g === 0 || o,
1267
1317
  onClick: f,
1268
- loading: a,
1318
+ loading: o,
1269
1319
  strings: { loading: s.footer.uploading },
1270
- children: g <= 1 ? s.footer.upload : V(s.footer.uploadMany, { count: g })
1320
+ children: g <= 1 ? s.footer.upload : H(s.footer.uploadMany, { count: g })
1271
1321
  })]
1272
- }) : /* @__PURE__ */ P("div", {
1322
+ }) : /* @__PURE__ */ L("div", {
1273
1323
  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),
1274
- children: [/* @__PURE__ */ N(o, {
1324
+ children: [/* @__PURE__ */ I(i, {
1275
1325
  type: "button",
1276
1326
  tone: "secondary",
1277
1327
  buttonStyle: "ghost",
1278
1328
  onClick: u,
1279
1329
  children: l ?? s.footer.cancel
1280
- }), /* @__PURE__ */ N(o, {
1330
+ }), /* @__PURE__ */ I(i, {
1281
1331
  tone: "primary",
1282
1332
  type: "button",
1283
1333
  disabled: h === 0,
1284
1334
  onClick: d,
1285
- children: c ?? (h === 0 ? s.footer.confirmEmpty : t.length === 1 ? s.footer.confirmOne : V(s.footer.confirmMany, { count: h }))
1335
+ children: c ?? (h === 0 ? s.footer.confirmEmpty : t.length === 1 ? s.footer.confirmOne : H(s.footer.confirmMany, { count: h }))
1286
1336
  })]
1287
1337
  });
1288
1338
  }
1289
- 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 }) {
1290
- return /* @__PURE__ */ N("footer", {
1291
- className: r("media-library-footer--component", h === "section" && "border-t border-border bg-background p-surface", g),
1292
- children: /* @__PURE__ */ P("div", {
1339
+ function Ge({ 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 }) {
1340
+ return /* @__PURE__ */ I("footer", {
1341
+ className: r("media-library-footer--component", h === "section" && "border-t border-border bg-background text-foreground p-surface", g),
1342
+ children: /* @__PURE__ */ L("div", {
1293
1343
  className: "flex min-w-0 flex-col gap-space-lg @md/media-library:flex-row @md/media-library:justify-between",
1294
- children: [/* @__PURE__ */ N(J, {
1344
+ children: [/* @__PURE__ */ I(We, {
1295
1345
  tab: e,
1296
1346
  selectedIds: n,
1297
1347
  selectionMode: i,
1298
1348
  stagedFiles: a,
1299
1349
  strings: s,
1300
1350
  onClearSelection: f
1301
- }), /* @__PURE__ */ N(Y, {
1351
+ }), /* @__PURE__ */ I(Z, {
1302
1352
  tab: e,
1303
1353
  selectedItems: t,
1304
1354
  selectedIds: n,
@@ -1317,9 +1367,9 @@ function ze({ tab: e, selectedItems: t, selectedIds: n, selectionMode: i, staged
1317
1367
  }
1318
1368
  //#endregion
1319
1369
  //#region src/components/features/media-library/media-library.tsx
1320
- var X = E(null);
1321
- function Be(e, t, n) {
1322
- return k(() => {
1370
+ var Ke = j(null);
1371
+ function qe(e, t, n) {
1372
+ return N(() => {
1323
1373
  if (e) return e;
1324
1374
  let r = /* @__PURE__ */ new Set();
1325
1375
  for (let e of t) {
@@ -1336,301 +1386,356 @@ function Be(e, t, n) {
1336
1386
  t
1337
1387
  ]);
1338
1388
  }
1339
- function Z({ title: i, 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: ee, onClose: T, strings: E, slots: D, heightClassName: O, className: k, items: A, fetcher: j, accessors: M, collections: F, value: ne, defaultValue: re, onValueChange: ie, onItemUpdate: ae, onItemDelete: oe, onItemReplace: L, onUpload: se, onError: R, tab: z, 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 }) {
1340
- let { defaultScale: ke } = t(), je = e(void 0, ke), W = n(ge, E), G = Ae({
1341
- items: A,
1342
- fetcher: j,
1343
- accessors: M,
1344
- collections: F,
1345
- selectionMode: h,
1346
- value: ne,
1347
- defaultValue: re,
1348
- onValueChange: ie,
1349
- onItemUpdate: ae,
1350
- onItemDelete: oe,
1351
- onUpload: se,
1352
- onError: R,
1353
- tab: z,
1354
- defaultTab: B,
1355
- onTabChange: ce,
1356
- view: le,
1357
- defaultView: ue,
1358
- onViewChange: de,
1359
- query: pe,
1360
- defaultQuery: me,
1361
- onQueryChange: _e,
1362
- type: ve,
1363
- defaultType: H,
1364
- onTypeChange: ye,
1365
- collection: be,
1366
- defaultCollection: xe,
1367
- onCollectionChange: U,
1368
- sort: Se,
1369
- defaultSort: Ce,
1370
- onSortChange: we,
1371
- uploadOptions: Te,
1372
- defaultUploadOptions: Ee,
1373
- onUploadOptionsChange: De
1374
- }), Me = Be(F, 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 = te(X), Q = !D?.footer, Ve = Z && Q ? /* @__PURE__ */ N(J, {
1375
- tab: K,
1376
- selectedIds: G.selectedIds,
1377
- selectionMode: h,
1378
- stagedFiles: G.stagedFiles,
1379
- strings: W,
1380
- onClearSelection: G.clearSelection,
1389
+ function Je({ title: o, titleSuffix: c, description: p, confirmLabel: m, cancelLabel: g, selectionMode: _ = "multiple", density: v = "comfortable", showMeta: y = !0, allowUpload: C = !0, typeFilters: w, confirmOnSelect: T = !1, onConfirm: E, onCancel: k, onClose: A, bulkActions: ee, strings: te, slots: j, heightClassName: M, className: N, items: P, fetcher: F, accessors: ae, collections: oe, value: R, defaultValue: z, onValueChange: se, onItemUpdate: B, onItemDelete: le, onItemReplace: V, onItemOpen: ue, onUpload: de, onError: fe, selecting: pe, defaultSelecting: me, onSelectingChange: he, tab: ge, defaultTab: ve, onTabChange: ye, view: Se, defaultView: Ce, onViewChange: U, query: we, defaultQuery: Te, onQueryChange: Ee, type: De, defaultType: Oe, onTypeChange: ke, collection: Ae, defaultCollection: je, onCollectionChange: Me, sort: Ne, defaultSort: Pe, onSortChange: Fe, uploadOptions: Le, defaultUploadOptions: Re, onUploadOptionsChange: W, ...ze }) {
1390
+ let { defaultScale: Be } = e(), Ve = t(void 0, Be), G = n(xe, te), K = Ie({
1391
+ items: P,
1392
+ fetcher: F,
1393
+ accessors: ae,
1394
+ collections: oe,
1395
+ selectionMode: _,
1396
+ value: R,
1397
+ defaultValue: z,
1398
+ onValueChange: se,
1399
+ onItemUpdate: B,
1400
+ onItemDelete: le,
1401
+ onUpload: de,
1402
+ onError: fe,
1403
+ tab: ge,
1404
+ defaultTab: ve,
1405
+ onTabChange: ye,
1406
+ view: Se,
1407
+ defaultView: Ce,
1408
+ onViewChange: U,
1409
+ query: we,
1410
+ defaultQuery: Te,
1411
+ onQueryChange: Ee,
1412
+ type: De,
1413
+ defaultType: Oe,
1414
+ onTypeChange: ke,
1415
+ collection: Ae,
1416
+ defaultCollection: je,
1417
+ onCollectionChange: Me,
1418
+ sort: Ne,
1419
+ defaultSort: Pe,
1420
+ onSortChange: Fe,
1421
+ uploadOptions: Le,
1422
+ defaultUploadOptions: Re,
1423
+ onUploadOptionsChange: W,
1424
+ selecting: pe,
1425
+ defaultSelecting: me ?? T,
1426
+ onSelectingChange: he
1427
+ }), Je = qe(oe, K.items, K.accessors.getCollection), Q = C ? K.tab : "library", $ = K.detailId ? K.items.find((e) => K.accessors.getId(e) === K.detailId) ?? null : null, Ye = ne(Ke), Xe = !j?.footer, Ze = Ye && Xe ? /* @__PURE__ */ I(We, {
1428
+ tab: Q,
1429
+ selectedIds: K.selectedIds,
1430
+ selectionMode: _,
1431
+ stagedFiles: K.stagedFiles,
1432
+ strings: G,
1433
+ onClearSelection: K.clearSelection,
1381
1434
  className: "media-library-dialog--selection-summary shrink-0 justify-end"
1382
- }) : null, He = !!(i || s || f || D?.headerStart), Ue = !!(y || D?.headerEnd || Ve), We = He || Ue, Ge = () => {
1383
- S?.(G.selectedItems, G.selectedIds), T?.();
1384
- }, $ = () => {
1385
- ee?.(), T?.();
1386
- }, Ke = (e) => {
1387
- let t = G.accessors.getId(e);
1388
- G.toggleSelection(t), x && (S?.([e], [t]), T?.());
1389
- }, qe = G.query.trim(), Je = qe.length > 0 ? V(W.countSearch, {
1390
- count: G.filteredCount,
1391
- total: G.totalCount,
1392
- query: qe
1393
- }) : G.filteredCount === G.totalCount ? V(W.countAll, { count: G.totalCount }) : V(W.countFiltered, {
1394
- count: G.filteredCount,
1395
- total: G.totalCount
1396
- }), Ye = D?.footer ?? (Z ? /* @__PURE__ */ N(Y, {
1397
- tab: K,
1398
- selectedItems: G.selectedItems,
1399
- selectedIds: G.selectedIds,
1400
- stagedFiles: G.stagedFiles,
1401
- uploading: G.uploading,
1402
- strings: W,
1403
- confirmLabel: p,
1404
- cancelLabel: m,
1405
- onCancel: $,
1406
- onConfirm: Ge,
1407
- onUpload: G.startUpload,
1435
+ }) : null, Qe = !!(o || c || p || j?.headerStart), $e = !!(C || j?.headerEnd || Ze), et = Qe || $e, tt = () => {
1436
+ E?.(K.selectedItems, K.selectedIds), A?.();
1437
+ }, nt = () => {
1438
+ k?.(), A?.();
1439
+ }, rt = (e) => {
1440
+ let t = K.accessors.getId(e);
1441
+ K.toggleSelection(t), T && (E?.([e], [t]), A?.());
1442
+ }, it = ie(null), at = ie(null), ot = (e) => {
1443
+ at.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, K.setDetailId(e);
1444
+ }, st = (e) => {
1445
+ ue ? ue(e) : ot(K.accessors.getId(e));
1446
+ };
1447
+ re(() => {
1448
+ if (K.detailId !== null) {
1449
+ at.current && it.current?.querySelector("[data-media-detail-close]")?.focus();
1450
+ return;
1451
+ }
1452
+ let e = at.current;
1453
+ at.current = null, e?.isConnected && e.focus();
1454
+ }, [K.detailId]);
1455
+ let ct = K.query.trim(), lt = ct.length > 0 ? H(G.countSearch, {
1456
+ count: K.filteredCount,
1457
+ total: K.totalCount,
1458
+ query: ct
1459
+ }) : K.filteredCount === K.totalCount ? H(G.countAll, { count: K.totalCount }) : H(G.countFiltered, {
1460
+ count: K.filteredCount,
1461
+ total: K.totalCount
1462
+ }), ut = !!ee && !(Ye || E && !T), dt = ie(null), ft = Q === "library" ? K.selectedIds.length : 0, pt = j?.footer ?? (ut && Q === "library" ? null : Ye ? /* @__PURE__ */ I(Z, {
1463
+ tab: Q,
1464
+ selectedItems: K.selectedItems,
1465
+ selectedIds: K.selectedIds,
1466
+ stagedFiles: K.stagedFiles,
1467
+ uploading: K.uploading,
1468
+ strings: G,
1469
+ confirmLabel: m,
1470
+ cancelLabel: g,
1471
+ onCancel: nt,
1472
+ onConfirm: tt,
1473
+ onUpload: K.startUpload,
1408
1474
  onCancelUpload: () => {
1409
- G.cancelUpload(), G.clearStagedFiles(), G.setTab("library");
1475
+ K.cancelUpload(), K.clearStagedFiles(), K.setTab("library");
1410
1476
  },
1411
1477
  className: "ml-auto"
1412
- }) : /* @__PURE__ */ N(ze, {
1413
- tab: K,
1414
- selectedItems: G.selectedItems,
1415
- selectedIds: G.selectedIds,
1416
- selectionMode: h,
1417
- stagedFiles: G.stagedFiles,
1418
- uploading: G.uploading,
1419
- strings: W,
1420
- confirmLabel: p,
1421
- cancelLabel: m,
1422
- onCancel: $,
1423
- onConfirm: Ge,
1424
- onClearSelection: G.clearSelection,
1425
- onUpload: G.startUpload,
1478
+ }) : /* @__PURE__ */ I(Ge, {
1479
+ tab: Q,
1480
+ selectedItems: K.selectedItems,
1481
+ selectedIds: K.selectedIds,
1482
+ selectionMode: _,
1483
+ stagedFiles: K.stagedFiles,
1484
+ uploading: K.uploading,
1485
+ strings: G,
1486
+ confirmLabel: m,
1487
+ cancelLabel: g,
1488
+ onCancel: nt,
1489
+ onConfirm: tt,
1490
+ onClearSelection: K.clearSelection,
1491
+ onUpload: K.startUpload,
1426
1492
  onCancelUpload: () => {
1427
- G.cancelUpload(), G.clearStagedFiles(), G.setTab("library");
1493
+ K.cancelUpload(), K.clearStagedFiles(), K.setTab("library");
1428
1494
  }
1429
1495
  }));
1430
- return /* @__PURE__ */ P("section", {
1431
- className: r("media-library--component @container/media-library flex min-h-0 flex-col overflow-hidden rounded-radius border border-border bg-background", O ?? "h-190 max-h-[calc(100vh-7rem)]", k),
1432
- ...Oe,
1496
+ return /* @__PURE__ */ L("section", {
1497
+ ref: it,
1498
+ className: r("media-library--component @container/media-library box-border flex min-h-0 flex-col overflow-hidden rounded-radius border border-border bg-background text-foreground", M ?? "h-190 max-h-[calc(100vh-7rem)]", N),
1499
+ ...ze,
1433
1500
  children: [
1434
- We && /* @__PURE__ */ P("header", {
1501
+ et && /* @__PURE__ */ L("header", {
1435
1502
  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",
1436
- children: [He && /* @__PURE__ */ P(c, {
1503
+ children: [Qe && /* @__PURE__ */ L(l, {
1437
1504
  direction: "horizontal",
1438
1505
  align: "start",
1439
1506
  gap: "lg",
1440
1507
  className: "min-w-0",
1441
- children: [D?.headerStart, (i || s || f) && /* @__PURE__ */ P(c, {
1508
+ children: [j?.headerStart, (o || c || p) && /* @__PURE__ */ L(l, {
1442
1509
  gap: "normal",
1443
1510
  className: "min-w-0",
1444
- children: [!!(i || s) && /* @__PURE__ */ N(l, {
1445
- title: i,
1446
- suffix: s,
1511
+ children: [!!(o || c) && /* @__PURE__ */ I(u, {
1512
+ title: o,
1513
+ suffix: c,
1447
1514
  className: "media-library--title"
1448
- }), !!f && /* @__PURE__ */ N(a, {
1515
+ }), !!p && /* @__PURE__ */ I(a, {
1449
1516
  type: "secondary",
1450
- children: f
1517
+ children: p
1451
1518
  })]
1452
1519
  })]
1453
- }), Ue && /* @__PURE__ */ P("div", {
1454
- 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"),
1455
- children: [/* @__PURE__ */ P(c, {
1520
+ }), $e && /* @__PURE__ */ L("div", {
1521
+ className: r("media-library--header-controls flex min-w-0 flex-wrap items-center gap-space-md", Ze ? "flex-1 justify-between" : "@2xl/media-library:justify-end"),
1522
+ children: [/* @__PURE__ */ L(l, {
1456
1523
  direction: "horizontal",
1457
1524
  wrap: !0,
1458
1525
  align: "center",
1459
1526
  gap: "md",
1460
1527
  className: "min-w-0",
1461
- children: [y && /* @__PURE__ */ P("div", {
1462
- className: r("media-library--tabs", C.frame, w[je]),
1528
+ children: [C && /* @__PURE__ */ L("div", {
1529
+ className: r("media-library--tabs", D.frame, O[Ve]),
1463
1530
  role: "tablist",
1464
- children: [/* @__PURE__ */ P(o, {
1531
+ children: [/* @__PURE__ */ L(i, {
1465
1532
  type: "button",
1466
1533
  role: "tab",
1467
- "aria-selected": K === "library",
1534
+ "aria-selected": Q === "library",
1468
1535
  tone: "secondary",
1469
1536
  buttonStyle: "ghost",
1470
1537
  size: "sm",
1471
- className: r(C.item, "shadow-none", K === "library" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1472
- onClick: () => G.setTab("library"),
1473
- children: [/* @__PURE__ */ N(I, { className: "size-icon-md" }), W.tabs.library]
1474
- }), /* @__PURE__ */ P(o, {
1538
+ className: r(D.item, "shadow-none", Q === "library" ? `${h.segmentActive} hover:bg-card` : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1539
+ onClick: () => K.setTab("library"),
1540
+ children: [/* @__PURE__ */ I(ce, { className: "size-icon-md" }), G.tabs.library]
1541
+ }), /* @__PURE__ */ L(i, {
1475
1542
  type: "button",
1476
1543
  role: "tab",
1477
- "aria-selected": K === "upload",
1544
+ "aria-selected": Q === "upload",
1478
1545
  tone: "secondary",
1479
1546
  buttonStyle: "ghost",
1480
1547
  size: "sm",
1481
- className: r(C.item, "shadow-none", K === "upload" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1482
- onClick: () => G.setTab("upload"),
1548
+ className: r(D.item, "shadow-none", Q === "upload" ? `${h.segmentActive} hover:bg-card` : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
1549
+ onClick: () => K.setTab("upload"),
1483
1550
  children: [
1484
- /* @__PURE__ */ N(fe, { className: "size-icon-md" }),
1485
- W.tabs.upload,
1486
- G.stagedFiles.length > 0 && /* @__PURE__ */ N(_, {
1487
- value: G.stagedFiles.length,
1488
- size: "xs",
1489
- align: "center",
1490
- className: "rounded-full bg-background/20 px-1.5"
1551
+ /* @__PURE__ */ I(_e, { className: "size-icon-md" }),
1552
+ G.tabs.upload,
1553
+ K.stagedFiles.length > 0 && /* @__PURE__ */ I(x, {
1554
+ size: "sm",
1555
+ tone: "secondary",
1556
+ className: "media-library--staged-count",
1557
+ children: /* @__PURE__ */ I(b, {
1558
+ value: K.stagedFiles.length,
1559
+ size: "inherit",
1560
+ weight: "inherit",
1561
+ type: "inherit",
1562
+ align: "center"
1563
+ })
1491
1564
  })
1492
1565
  ]
1493
1566
  })]
1494
- }), D?.headerEnd]
1495
- }), Ve]
1567
+ }), j?.headerEnd]
1568
+ }), Ze]
1496
1569
  })]
1497
1570
  }),
1498
- /* @__PURE__ */ P("div", {
1571
+ /* @__PURE__ */ L("div", {
1499
1572
  className: "media-library--body flex min-h-0 flex-1",
1500
- children: [K === "upload" ? /* @__PURE__ */ N("div", {
1573
+ children: [Q === "upload" ? /* @__PURE__ */ I("div", {
1501
1574
  className: "min-w-0 flex-1 overflow-y-auto",
1502
- children: /* @__PURE__ */ N(Re, {
1503
- stagedFiles: G.stagedFiles,
1504
- uploadOptions: G.uploadOptions,
1505
- collections: Me,
1506
- uploading: G.uploading,
1507
- strings: W,
1508
- onFiles: G.addFiles,
1509
- onRemoveFile: G.removeStagedFile,
1510
- onOptionsChange: G.updateUploadOptions,
1511
- empty: D?.uploadEmpty
1575
+ children: /* @__PURE__ */ I(X, {
1576
+ stagedFiles: K.stagedFiles,
1577
+ uploadOptions: K.uploadOptions,
1578
+ collections: Je,
1579
+ uploading: K.uploading,
1580
+ strings: G,
1581
+ onFiles: K.addFiles,
1582
+ onRemoveFile: K.removeStagedFile,
1583
+ onOptionsChange: K.updateUploadOptions,
1584
+ empty: j?.uploadEmpty
1512
1585
  })
1513
- }) : /* @__PURE__ */ P("div", {
1514
- className: r("media-library--library min-w-0 flex-1 flex-col", q ? "hidden @2xl/media-library:flex" : "flex"),
1515
- children: [/* @__PURE__ */ P(c, {
1586
+ }) : /* @__PURE__ */ L("div", {
1587
+ className: r("media-library--library min-w-0 flex-1 flex-col", $ ? "hidden @2xl/media-library:flex" : "flex"),
1588
+ children: [/* @__PURE__ */ L(l, {
1516
1589
  gap: "md",
1517
- className: "media-library--toolbar border-b border-border/70 p-surface",
1518
- children: [/* @__PURE__ */ N(Pe, {
1519
- query: G.query,
1520
- type: G.type,
1521
- typeFilters: b,
1522
- collection: G.collection,
1523
- sort: G.sort,
1524
- view: G.view,
1525
- collections: Me,
1526
- strings: W,
1527
- onQueryChange: G.setQuery,
1528
- onTypeChange: G.setType,
1529
- onCollectionChange: G.setCollection,
1530
- onSortChange: G.setSort,
1531
- onViewChange: G.setView,
1532
- onClearFilters: G.clearFilters,
1533
- toolbarEnd: D?.toolbarEnd
1534
- }), /* @__PURE__ */ N(a, {
1590
+ className: "media-library--toolbar border-b border-border/60 p-surface",
1591
+ children: [/* @__PURE__ */ I(q, {
1592
+ query: K.query,
1593
+ type: K.type,
1594
+ typeFilters: w,
1595
+ collection: K.collection,
1596
+ sort: K.sort,
1597
+ view: K.view,
1598
+ collections: Je,
1599
+ strings: G,
1600
+ onQueryChange: K.setQuery,
1601
+ onTypeChange: K.setType,
1602
+ onCollectionChange: K.setCollection,
1603
+ onSortChange: K.setSort,
1604
+ onViewChange: K.setView,
1605
+ onClearFilters: K.clearFilters,
1606
+ toolbarEnd: j?.toolbarEnd,
1607
+ selecting: K.selecting,
1608
+ onSelectingChange: K.setSelecting
1609
+ }), /* @__PURE__ */ I(a, {
1535
1610
  size: "xs",
1536
1611
  type: "secondary",
1537
1612
  "aria-live": "polite",
1538
- children: Je
1613
+ children: lt
1539
1614
  })]
1540
- }), /* @__PURE__ */ N("div", {
1615
+ }), /* @__PURE__ */ I("div", {
1616
+ ref: dt,
1541
1617
  role: "region",
1542
- "aria-label": W.resultsLabel,
1618
+ "aria-label": G.resultsLabel,
1543
1619
  tabIndex: 0,
1544
- 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",
1545
- children: G.loading ? D?.loading ?? /* @__PURE__ */ N(u, {
1620
+ className: `media-library--results min-h-0 flex-1 overflow-y-auto p-surface focus-visible:outline-none ${s.inset}`,
1621
+ children: K.loading ? j?.loading ?? /* @__PURE__ */ I(d, {
1546
1622
  className: "min-h-64",
1547
- label: W.loading
1548
- }) : G.error ? D?.error ?? /* @__PURE__ */ N(d, {
1549
- title: W.errorTitle,
1550
- description: W.errorDescription
1551
- }) : G.visibleItems.length === 0 ? D?.empty ?? /* @__PURE__ */ N(Ne, {
1552
- title: G.hasFilters ? W.emptyFilteredTitle : W.emptyLibraryTitle,
1553
- description: G.hasFilters ? W.emptyFilteredDescription : W.emptyLibraryDescription,
1554
- action: G.hasFilters ? /* @__PURE__ */ N(o, {
1623
+ label: G.loading
1624
+ }) : K.error ? j?.error ?? /* @__PURE__ */ I(f, {
1625
+ title: G.errorTitle,
1626
+ description: G.errorDescription
1627
+ }) : K.visibleItems.length === 0 ? j?.empty ?? /* @__PURE__ */ I(He, {
1628
+ title: K.hasFilters ? G.emptyFilteredTitle : G.emptyLibraryTitle,
1629
+ description: K.hasFilters ? G.emptyFilteredDescription : G.emptyLibraryDescription,
1630
+ action: K.hasFilters ? /* @__PURE__ */ I(i, {
1555
1631
  type: "button",
1556
1632
  tone: "secondary",
1557
1633
  buttonStyle: "outline",
1558
- onClick: G.clearFilters,
1559
- children: W.clearFilters
1560
- }) : y ? /* @__PURE__ */ N(o, {
1634
+ onClick: K.clearFilters,
1635
+ children: G.clearFilters
1636
+ }) : C ? /* @__PURE__ */ I(i, {
1561
1637
  tone: "primary",
1562
1638
  type: "button",
1563
- onClick: () => G.setTab("upload"),
1564
- children: W.uploadMedia
1639
+ onClick: () => K.setTab("upload"),
1640
+ children: G.uploadMedia
1565
1641
  }) : void 0
1566
- }) : G.view === "table" ? /* @__PURE__ */ N("div", {
1642
+ }) : K.view === "table" ? /* @__PURE__ */ I("div", {
1567
1643
  className: "overflow-x-auto",
1568
- children: /* @__PURE__ */ N(Ie, {
1569
- items: G.visibleItems,
1570
- selectedSet: G.selectedSet,
1571
- selectionMode: h,
1572
- accessors: G.accessors,
1573
- strings: W,
1644
+ children: /* @__PURE__ */ I(Ue, {
1645
+ items: K.visibleItems,
1646
+ selectedSet: K.selectedSet,
1647
+ selectionMode: _,
1648
+ accessors: K.accessors,
1649
+ strings: G,
1574
1650
  onToggle: (e) => {
1575
- let t = G.items.find((t) => G.accessors.getId(t) === e);
1576
- t && Ke(t);
1651
+ let t = K.items.find((t) => K.accessors.getId(t) === e);
1652
+ t && rt(t);
1577
1653
  },
1578
- onDetails: G.setDetailId
1654
+ onDetails: ot,
1655
+ selecting: K.selecting,
1656
+ onOpen: (e) => {
1657
+ let t = K.items.find((t) => K.accessors.getId(t) === e);
1658
+ t && st(t);
1659
+ }
1579
1660
  })
1580
- }) : /* @__PURE__ */ N("div", {
1581
- 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))]"),
1582
- children: G.visibleItems.map((e) => {
1583
- let t = G.accessors.getId(e), n = {
1661
+ }) : /* @__PURE__ */ I("div", {
1662
+ className: r("media-library--grid grid min-w-0 gap-space-lg", v === "compact" ? "grid-cols-[repeat(auto-fill,minmax(136px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(168px,1fr))]"),
1663
+ children: K.visibleItems.map((e) => {
1664
+ let t = K.accessors.getId(e), n = {
1584
1665
  id: t,
1585
- selected: G.selectedSet.has(t),
1586
- selectionMode: h,
1587
- accessors: G.accessors,
1588
- toggle: () => Ke(e),
1589
- openDetails: () => G.setDetailId(t)
1590
- }, r = D?.renderItem?.(e, n);
1591
- return r ? /* @__PURE__ */ N("div", { children: r }, t) : /* @__PURE__ */ N(Fe, {
1666
+ selected: K.selectedSet.has(t),
1667
+ selectionMode: _,
1668
+ selecting: K.selecting,
1669
+ accessors: K.accessors,
1670
+ toggle: () => rt(e),
1671
+ openDetails: () => ot(t),
1672
+ open: () => st(e)
1673
+ }, r = j?.renderItem?.(e, n);
1674
+ return r ? /* @__PURE__ */ I("div", { children: r }, t) : /* @__PURE__ */ I(J, {
1592
1675
  item: e,
1593
1676
  selected: n.selected,
1594
- density: g,
1595
- showMeta: v,
1596
- selectionMode: h,
1597
- accessors: G.accessors,
1598
- strings: W,
1677
+ density: v,
1678
+ showMeta: y,
1679
+ selectionMode: _,
1680
+ accessors: K.accessors,
1681
+ strings: G,
1599
1682
  onToggle: n.toggle,
1600
- onDetails: n.openDetails
1683
+ onDetails: n.openDetails,
1684
+ onOpen: n.open,
1685
+ selecting: n.selecting
1601
1686
  }, t);
1602
1687
  })
1603
1688
  })
1604
1689
  })]
1605
- }), K === "library" && /* @__PURE__ */ N(Le, {
1606
- item: q,
1607
- collections: Me,
1608
- accessors: G.accessors,
1609
- strings: W,
1610
- onClose: () => G.setDetailId(null),
1611
- onUpdate: (e) => q ? G.updateItem(q, e) : Promise.resolve(!1),
1612
- onReplace: L && q ? () => L(q) : void 0,
1690
+ }), Q === "library" && /* @__PURE__ */ I(Y, {
1691
+ item: $,
1692
+ collections: Je,
1693
+ accessors: K.accessors,
1694
+ strings: G,
1695
+ onClose: () => K.setDetailId(null),
1696
+ onUpdate: (e) => $ ? K.updateItem($, e) : Promise.resolve(!1),
1697
+ onReplace: V && $ ? () => V($) : void 0,
1613
1698
  onRemove: async () => {
1614
- if (!q) return !1;
1615
- let e = await G.removeItem(q);
1616
- return e && G.setDetailId(null), e;
1699
+ if (!$) return !1;
1700
+ let e = await K.removeItem($);
1701
+ return e && K.setDetailId(null), e;
1617
1702
  },
1618
- renderDetail: D?.renderDetail
1703
+ renderDetail: j?.renderDetail
1619
1704
  })]
1620
1705
  }),
1621
- Z ? Z.element ? he(Ye, Z.element) : null : Ye
1706
+ Ye ? Ye.element ? be(pt, Ye.element) : null : pt,
1707
+ ut && /* @__PURE__ */ I(S, {
1708
+ selectedCount: ft,
1709
+ totalCount: K.totalCount,
1710
+ onClear: K.clearSelection,
1711
+ returnFocusRef: dt,
1712
+ className: "media-library--bulk-actions",
1713
+ strings: {
1714
+ label: G.batchActionsLabel,
1715
+ summary: (e) => H(G.footer.selectedCount, { count: e }),
1716
+ clear: G.footer.clear
1717
+ },
1718
+ children: ft > 0 && ee?.({
1719
+ selectedItems: K.selectedItems,
1720
+ selectedIds: K.selectedIds,
1721
+ selectedCount: K.selectedIds.length,
1722
+ visibleCount: K.filteredCount,
1723
+ totalCount: K.totalCount,
1724
+ clearSelection: K.clearSelection
1725
+ })
1726
+ })
1622
1727
  ]
1623
1728
  });
1624
1729
  }
1625
- 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 }) {
1626
- let h = n(ge, m.strings), [g, _] = j(!1), [v, y] = j(null), b = e !== void 0, x = b ? e : g, S = (e) => {
1730
+ function Q({ open: e, onOpenChange: t, trigger: i, dialogTitle: a, dialogDescription: o, onClose: s, className: c, dialogClassName: l, contentClassName: u, closeOnEscape: d = !0, closeOnBackdropClick: f = !0, ...p }) {
1731
+ let h = n(xe, p.strings), [g, _] = P(!1), [v, y] = P(null), b = e !== void 0, x = b ? e : g, S = (e) => {
1627
1732
  b || _(e), t?.(e);
1628
1733
  }, C = () => {
1629
1734
  S(!1), s?.();
1630
1735
  };
1631
- return /* @__PURE__ */ N(X.Provider, {
1736
+ return /* @__PURE__ */ I(Ke.Provider, {
1632
1737
  value: { element: v },
1633
- children: /* @__PURE__ */ N(f, {
1738
+ children: /* @__PURE__ */ I(m, {
1634
1739
  open: x,
1635
1740
  onOpenChange: S,
1636
1741
  onClose: s,
@@ -1640,65 +1745,66 @@ function Q({ open: e, onOpenChange: t, trigger: i, dialogTitle: a, dialogDescrip
1640
1745
  size: "full",
1641
1746
  showCancel: !1,
1642
1747
  showConfirm: !1,
1643
- footer: /* @__PURE__ */ N("div", {
1748
+ footer: /* @__PURE__ */ I("div", {
1644
1749
  ref: y,
1645
1750
  className: "media-library-dialog--footer @container/media-library w-full"
1646
1751
  }),
1647
1752
  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),
1648
1753
  contentClassName: r("media-library-dialog--body flex min-h-0 flex-col overflow-hidden p-0", u),
1649
- closeOnBackdropClick: p,
1754
+ closeOnBackdropClick: f,
1650
1755
  closeOnEscape: d,
1651
- children: /* @__PURE__ */ N(Z, {
1652
- ...m,
1756
+ children: /* @__PURE__ */ I(Je, {
1757
+ ...p,
1758
+ defaultSelecting: p.defaultSelecting ?? !0,
1653
1759
  onClose: C,
1654
1760
  className: r("media-library-dialog--library rounded-none border-0", c),
1655
- heightClassName: m.heightClassName ?? "min-h-0 flex-1",
1656
- strings: m.strings
1761
+ heightClassName: p.heightClassName ?? "min-h-0 flex-1",
1762
+ strings: p.strings
1657
1763
  })
1658
1764
  })
1659
1765
  });
1660
1766
  }
1661
1767
  //#endregion
1662
1768
  //#region src/components/features/media-library/media-resource-gallery.tsx
1663
- function Ve(e, t, n) {
1769
+ function $(e, t, n) {
1664
1770
  let r = e.slice(), [i] = r.splice(t, 1);
1665
1771
  return i === void 0 || r.splice(n, 0, i), r;
1666
1772
  }
1667
- function He({ items: e, accessors: t, title: i, 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, ...ee }) {
1668
- let T = n(ge, C), E = be(t), D = e.length, te = l ?? (D > 0 ? E.getId(e[0]) : void 0), O = !y && !!p && (h === void 0 || D < h), k = O && (g === "field" || D > 0) ? /* @__PURE__ */ N(o, {
1773
+ function Ye({ items: e, accessors: t, title: o, description: s, primaryId: c, onPrimaryChange: u, onRemove: d, onReorder: f, onAdd: p, maxItems: m, layout: g = "field", density: v = "comfortable", readOnly: y = !1, empty: b, action: S, renderItem: C, strings: w, className: T, ...E }) {
1774
+ let D = n(xe, w), O = Te(t), A = e.length, ee = c ?? (A > 0 ? O.getId(e[0]) : void 0), te = !y && !!p && (m === void 0 || A < m), j = te && (g === "field" || A > 0) ? /* @__PURE__ */ I(i, {
1669
1775
  type: "button",
1670
1776
  tone: "secondary",
1671
1777
  buttonStyle: "outline",
1672
- icon: ce,
1778
+ icon: pe,
1673
1779
  onClick: p,
1674
- children: T.gallery.add
1675
- }) : h !== void 0 && D >= h ? /* @__PURE__ */ N(v, {
1780
+ children: D.gallery.add
1781
+ }) : m !== void 0 && A >= m ? /* @__PURE__ */ I(x, {
1676
1782
  tone: "secondary",
1677
- children: T.gallery.maxReached
1678
- }) : null, A = (t, n) => {
1679
- if (n < 0 || n >= D || t === n) return;
1680
- let r = Ve(e, t, n);
1681
- f?.(r.map((e) => E.getId(e)), r);
1682
- }, j = !!(i || s || x || k), M = D === 0 && g !== "field", re = () => !O || g !== "field" ? null : /* @__PURE__ */ P("button", {
1783
+ children: D.gallery.maxReached
1784
+ }) : null, M = (t, n) => {
1785
+ if (n < 0 || n >= A || t === n) return;
1786
+ let r = $(e, t, n);
1787
+ f?.(r.map((e) => O.getId(e)), r);
1788
+ }, ne = !!(o || s || S || j), re = A === 0 && g !== "field", N = () => !te || g !== "field" ? null : /* @__PURE__ */ L("button", {
1683
1789
  type: "button",
1684
- 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"),
1685
- "aria-label": T.gallery.addTile,
1790
+ 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 ${k.hover}`),
1791
+ "aria-label": D.gallery.addTile,
1686
1792
  onClick: p,
1687
- children: [/* @__PURE__ */ N(ce, { className: "size-icon" }), /* @__PURE__ */ N(a, {
1793
+ children: [/* @__PURE__ */ I(pe, { className: "size-icon" }), /* @__PURE__ */ I(a, {
1688
1794
  tag: "span",
1689
1795
  size: "inherit",
1690
1796
  className: "sr-only",
1691
- children: T.gallery.addTile
1797
+ children: D.gallery.addTile
1692
1798
  })]
1693
1799
  });
1694
- return /* @__PURE__ */ P("section", {
1695
- className: r("media-resource-gallery--component @container/media-resource-gallery rounded-radius border border-border bg-card shadow-xs", w),
1800
+ return /* @__PURE__ */ L("section", {
1801
+ className: r("media-resource-gallery--component @container/media-resource-gallery rounded-radius border border-border bg-card text-card-foreground shadow-xs", T),
1696
1802
  "data-layout": g,
1697
- "data-gallery-density": _,
1698
- ...ee,
1699
- children: [j && /* @__PURE__ */ N("header", {
1803
+ "data-gallery-density": v,
1804
+ ...E,
1805
+ children: [ne && /* @__PURE__ */ I("header", {
1700
1806
  className: "media-resource-gallery--header p-surface",
1701
- children: /* @__PURE__ */ P(c, {
1807
+ children: /* @__PURE__ */ L(l, {
1702
1808
  direction: {
1703
1809
  base: "vertical",
1704
1810
  md: "horizontal"
@@ -1706,300 +1812,301 @@ function He({ items: e, accessors: t, title: i, description: s, primaryId: l, on
1706
1812
  gap: "lg",
1707
1813
  align: { md: "start" },
1708
1814
  justify: { md: "between" },
1709
- children: [/* @__PURE__ */ P(c, {
1815
+ children: [/* @__PURE__ */ L(l, {
1710
1816
  gap: "normal",
1711
1817
  className: "min-w-0",
1712
- children: [!!i && /* @__PURE__ */ N(a, {
1818
+ children: [!!o && /* @__PURE__ */ I(a, {
1713
1819
  tag: "div",
1820
+ type: "inherit",
1714
1821
  weight: "semibold",
1715
- children: i
1716
- }), !!s && /* @__PURE__ */ N(a, {
1822
+ children: o
1823
+ }), !!s && /* @__PURE__ */ I(a, {
1717
1824
  type: "secondary",
1718
1825
  children: s
1719
1826
  })]
1720
- }), /* @__PURE__ */ N(c, {
1827
+ }), /* @__PURE__ */ I(l, {
1721
1828
  direction: "horizontal",
1722
1829
  wrap: !0,
1723
1830
  align: "center",
1724
1831
  gap: "md",
1725
1832
  className: "media-resource-gallery--actions",
1726
- children: x ?? k
1833
+ children: S ?? j
1727
1834
  })]
1728
1835
  })
1729
- }), M ? /* @__PURE__ */ N("div", {
1836
+ }), re ? /* @__PURE__ */ I("div", {
1730
1837
  className: "media-resource-gallery--empty px-surface pb-surface",
1731
- children: b ?? /* @__PURE__ */ N(Ne, {
1732
- title: T.gallery.emptyTitle,
1733
- description: T.gallery.emptyDescription,
1734
- action: O ? /* @__PURE__ */ N(o, {
1838
+ children: b ?? /* @__PURE__ */ I(He, {
1839
+ title: D.gallery.emptyTitle,
1840
+ description: D.gallery.emptyDescription,
1841
+ action: te ? /* @__PURE__ */ I(i, {
1735
1842
  tone: "primary",
1736
1843
  type: "button",
1737
- icon: oe,
1844
+ icon: B,
1738
1845
  onClick: p,
1739
- children: T.gallery.add
1846
+ children: D.gallery.add
1740
1847
  }) : void 0
1741
1848
  })
1742
- }) : /* @__PURE__ */ P("div", {
1743
- className: r("grid min-w-0 grid-cols-1", g === "list" ? "gap-space-md" : "gap-space-lg", "media-resource-gallery--items p-surface", j && "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))]"),
1849
+ }) : /* @__PURE__ */ L("div", {
1850
+ className: r("grid min-w-0 grid-cols-1", g === "list" ? "gap-space-md" : "gap-space-lg", "media-resource-gallery--items p-surface", ne && "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))]" : v === "compact" ? "grid-cols-[repeat(auto-fill,minmax(132px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(164px,1fr))]"),
1744
1851
  children: [e.map((e, t) => {
1745
- let n = E.getId(e), i = E.getName(e), s = E.getType(e), l = E.getSrc(e), f = E.getAlt(e) || i, p = n === te, h = E.getPublic(e) === !1, b = E.getDuration(e), x = t > 0, C = t < D - 1, w = S?.(e, {
1852
+ let n = O.getId(e), o = O.getName(e), s = O.getType(e), c = O.getSrc(e), f = O.getAlt(e) || o, p = n === ee, m = O.getPublic(e) === !1, b = O.getDuration(e), S = t > 0, w = t < A - 1, T = C?.(e, {
1746
1853
  id: n,
1747
1854
  index: t,
1748
- total: D,
1855
+ total: A,
1749
1856
  primary: p,
1750
- accessors: E,
1751
- canMovePrevious: x,
1752
- canMoveNext: C,
1857
+ accessors: O,
1858
+ canMovePrevious: S,
1859
+ canMoveNext: w,
1753
1860
  setPrimary: () => u?.(n, e),
1754
1861
  remove: () => d?.(n, e),
1755
- movePrevious: () => A(t, t - 1),
1756
- moveNext: () => A(t, t + 1)
1862
+ movePrevious: () => M(t, t - 1),
1863
+ moveNext: () => M(t, t + 1)
1757
1864
  });
1758
- return w ? /* @__PURE__ */ N("div", { children: w }, n) : g === "field" ? /* @__PURE__ */ P("div", {
1759
- 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"),
1865
+ return T ? /* @__PURE__ */ I("div", { children: T }, n) : g === "field" ? /* @__PURE__ */ L("div", {
1866
+ className: r("media-resource-gallery--item group/gallery relative aspect-square overflow-hidden rounded-radius border border-border bg-background text-foreground shadow-xs", `transition-colors ${h.tileHover}`, p && "col-span-2 row-span-2 min-h-52"),
1760
1867
  "data-primary": p || void 0,
1761
1868
  children: [
1762
- l ? /* @__PURE__ */ N("img", {
1763
- src: l,
1869
+ c ? /* @__PURE__ */ I("img", {
1870
+ src: c,
1764
1871
  alt: f,
1765
1872
  loading: "lazy",
1766
1873
  className: "size-full object-cover"
1767
- }) : /* @__PURE__ */ N("div", {
1874
+ }) : /* @__PURE__ */ I("div", {
1768
1875
  className: "flex size-full items-center justify-center bg-muted text-muted-foreground",
1769
- children: /* @__PURE__ */ N(ie, { className: p ? "size-7" : "size-icon-lg" })
1876
+ children: /* @__PURE__ */ I(z, { className: p ? "size-7" : "size-icon-lg" })
1770
1877
  }),
1771
- p && /* @__PURE__ */ N(v, {
1878
+ p && /* @__PURE__ */ I(x, {
1772
1879
  tone: "secondary",
1773
- className: "absolute left-2 top-2 bg-background/90 shadow-xs",
1774
- children: T.gallery.cover
1880
+ className: "absolute left-2 top-2 bg-background shadow-xs",
1881
+ children: D.gallery.cover
1775
1882
  }),
1776
- s === "video" && !!b && /* @__PURE__ */ P(v, {
1883
+ s === "video" && !!b && /* @__PURE__ */ L(x, {
1777
1884
  tone: "secondary",
1778
1885
  className: "absolute bottom-2 left-2 bg-foreground text-background",
1779
- children: [/* @__PURE__ */ N(B, { className: "size-icon-sm fill-current" }), b]
1886
+ children: [/* @__PURE__ */ I(fe, { className: "size-icon-sm fill-current" }), b]
1780
1887
  }),
1781
- h && /* @__PURE__ */ N("span", {
1782
- 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",
1783
- children: /* @__PURE__ */ N(z, { className: "size-icon-sm" })
1888
+ m && /* @__PURE__ */ I("span", {
1889
+ className: "absolute bottom-2 right-2 inline-flex size-6 items-center justify-center rounded-full border border-border bg-background text-muted-foreground shadow-xs",
1890
+ children: /* @__PURE__ */ I(de, { className: "size-icon-sm" })
1784
1891
  }),
1785
- !y && /* @__PURE__ */ N(o, {
1892
+ !y && /* @__PURE__ */ I(i, {
1786
1893
  type: "button",
1787
1894
  tone: "secondary",
1788
1895
  buttonStyle: "solid",
1789
1896
  size: "sm",
1790
1897
  iconOnly: !0,
1791
1898
  className: "absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/gallery:opacity-100 group-focus-within/gallery:opacity-100",
1792
- "aria-label": T.gallery.remove,
1899
+ "aria-label": D.gallery.remove,
1793
1900
  onClick: () => d?.(n, e),
1794
- children: /* @__PURE__ */ N(me, { className: "size-icon-md" })
1901
+ children: /* @__PURE__ */ I(ye, { className: "size-icon-md" })
1795
1902
  })
1796
1903
  ]
1797
- }, n) : g === "list" ? /* @__PURE__ */ P(c, {
1904
+ }, n) : g === "list" ? /* @__PURE__ */ L(l, {
1798
1905
  direction: "horizontal",
1799
1906
  wrap: !0,
1800
1907
  align: "center",
1801
1908
  gap: "lg",
1802
- 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"),
1909
+ className: r("media-resource-gallery--item min-w-0 rounded-radius border border-border bg-background text-foreground px-row-x", v === "compact" ? "py-row-y-sm" : "py-row-y"),
1803
1910
  "data-primary": p || void 0,
1804
1911
  children: [
1805
- /* @__PURE__ */ N("div", {
1912
+ /* @__PURE__ */ I("div", {
1806
1913
  className: "relative size-12 shrink-0 overflow-hidden rounded-inner bg-muted",
1807
- children: l ? /* @__PURE__ */ N("img", {
1808
- src: l,
1914
+ children: c ? /* @__PURE__ */ I("img", {
1915
+ src: c,
1809
1916
  alt: f,
1810
1917
  loading: "lazy",
1811
1918
  className: "size-full object-cover"
1812
- }) : /* @__PURE__ */ N("div", {
1919
+ }) : /* @__PURE__ */ I("div", {
1813
1920
  className: "flex size-full items-center justify-center text-muted-foreground",
1814
- children: /* @__PURE__ */ N(ie, { className: "size-icon" })
1921
+ children: /* @__PURE__ */ I(z, { className: "size-icon" })
1815
1922
  })
1816
1923
  }),
1817
- /* @__PURE__ */ P("div", {
1924
+ /* @__PURE__ */ L("div", {
1818
1925
  className: "min-w-0 flex-1",
1819
- children: [/* @__PURE__ */ P(c, {
1926
+ children: [/* @__PURE__ */ L(l, {
1820
1927
  direction: "horizontal",
1821
1928
  wrap: !0,
1822
1929
  align: "center",
1823
1930
  gap: "md",
1824
1931
  className: "min-w-0",
1825
- children: [/* @__PURE__ */ N(a, {
1932
+ children: [/* @__PURE__ */ I(a, {
1826
1933
  tag: "div",
1827
1934
  weight: "semibold",
1828
1935
  className: "min-w-0 break-all",
1829
- children: i
1830
- }), p && /* @__PURE__ */ N(v, {
1936
+ children: o
1937
+ }), p && /* @__PURE__ */ I(x, {
1831
1938
  tone: "secondary",
1832
- children: T.gallery.primary
1939
+ children: D.gallery.primary
1833
1940
  })]
1834
- }), /* @__PURE__ */ P(a, {
1941
+ }), /* @__PURE__ */ L(a, {
1835
1942
  size: "xs",
1836
1943
  type: "secondary",
1837
1944
  children: [
1838
- V(T.gallery.itemPosition, {
1945
+ H(D.gallery.itemPosition, {
1839
1946
  index: t + 1,
1840
- total: D
1947
+ total: A
1841
1948
  }),
1842
1949
  " · ",
1843
- /* @__PURE__ */ N(m, {
1844
- value: E.getSize(e),
1950
+ /* @__PURE__ */ I(_, {
1951
+ value: O.getSize(e),
1845
1952
  size: "xs",
1846
1953
  align: "left",
1847
- emptyLabel: T.unknownSize
1954
+ emptyLabel: D.unknownSize
1848
1955
  })
1849
1956
  ]
1850
1957
  })]
1851
1958
  }),
1852
- !y && /* @__PURE__ */ P("div", {
1959
+ !y && /* @__PURE__ */ L("div", {
1853
1960
  className: "media-resource-gallery--item-actions flex basis-full flex-wrap items-center justify-end gap-space-xs @sm/media-resource-gallery:basis-auto",
1854
1961
  children: [
1855
- /* @__PURE__ */ N(o, {
1962
+ /* @__PURE__ */ I(i, {
1856
1963
  type: "button",
1857
1964
  tone: "secondary",
1858
1965
  buttonStyle: "ghost",
1859
1966
  size: "sm",
1860
1967
  iconOnly: !0,
1861
1968
  disabled: p,
1862
- "aria-label": T.gallery.setPrimary,
1969
+ "aria-label": D.gallery.setPrimary,
1863
1970
  onClick: () => u?.(n, e),
1864
- children: /* @__PURE__ */ N(ue, { className: "size-icon-md" })
1971
+ children: /* @__PURE__ */ I(he, { className: "size-icon-md" })
1865
1972
  }),
1866
- /* @__PURE__ */ N(o, {
1973
+ /* @__PURE__ */ I(i, {
1867
1974
  type: "button",
1868
1975
  tone: "secondary",
1869
1976
  buttonStyle: "ghost",
1870
1977
  size: "sm",
1871
1978
  iconOnly: !0,
1872
- disabled: !x,
1873
- "aria-label": T.gallery.movePrevious,
1874
- onClick: () => A(t, t - 1),
1875
- children: /* @__PURE__ */ N(F, { className: "size-icon-md" })
1979
+ disabled: !S,
1980
+ "aria-label": D.gallery.movePrevious,
1981
+ onClick: () => M(t, t - 1),
1982
+ children: /* @__PURE__ */ I(ae, { className: "size-icon-md" })
1876
1983
  }),
1877
- /* @__PURE__ */ N(o, {
1984
+ /* @__PURE__ */ I(i, {
1878
1985
  type: "button",
1879
1986
  tone: "secondary",
1880
1987
  buttonStyle: "ghost",
1881
1988
  size: "sm",
1882
1989
  iconOnly: !0,
1883
- disabled: !C,
1884
- "aria-label": T.gallery.moveNext,
1885
- onClick: () => A(t, t + 1),
1886
- children: /* @__PURE__ */ N(ne, { className: "size-icon-md" })
1990
+ disabled: !w,
1991
+ "aria-label": D.gallery.moveNext,
1992
+ onClick: () => M(t, t + 1),
1993
+ children: /* @__PURE__ */ I(oe, { className: "size-icon-md" })
1887
1994
  }),
1888
- /* @__PURE__ */ N(o, {
1995
+ /* @__PURE__ */ I(i, {
1889
1996
  type: "button",
1890
1997
  tone: "destructive",
1891
1998
  buttonStyle: "ghost",
1892
1999
  size: "sm",
1893
2000
  iconOnly: !0,
1894
- "aria-label": T.gallery.remove,
2001
+ "aria-label": D.gallery.remove,
1895
2002
  onClick: () => d?.(n, e),
1896
- children: /* @__PURE__ */ N(de, { className: "size-icon-md" })
2003
+ children: /* @__PURE__ */ I(ge, { className: "size-icon-md" })
1897
2004
  })
1898
2005
  ]
1899
2006
  })
1900
2007
  ]
1901
- }, n) : /* @__PURE__ */ P("div", {
1902
- className: "media-resource-gallery--item group/gallery overflow-hidden rounded-radius border border-border bg-background shadow-xs transition-colors hover:border-primary/40",
2008
+ }, n) : /* @__PURE__ */ L("div", {
2009
+ className: `media-resource-gallery--item group/gallery overflow-hidden rounded-radius border border-border bg-background text-foreground shadow-xs transition-colors ${h.tileHover}`,
1903
2010
  "data-primary": p || void 0,
1904
- children: [/* @__PURE__ */ P("div", {
2011
+ children: [/* @__PURE__ */ L("div", {
1905
2012
  className: "relative aspect-[4/3] bg-muted",
1906
- children: [l ? /* @__PURE__ */ N("img", {
1907
- src: l,
2013
+ children: [c ? /* @__PURE__ */ I("img", {
2014
+ src: c,
1908
2015
  alt: f,
1909
2016
  loading: "lazy",
1910
2017
  className: "size-full object-cover"
1911
- }) : /* @__PURE__ */ N("div", {
2018
+ }) : /* @__PURE__ */ I("div", {
1912
2019
  className: "flex size-full items-center justify-center text-muted-foreground",
1913
- children: /* @__PURE__ */ N(ie, { className: "size-6" })
1914
- }), /* @__PURE__ */ P("div", {
2020
+ children: /* @__PURE__ */ I(z, { className: "size-6" })
2021
+ }), /* @__PURE__ */ L("div", {
1915
2022
  className: "absolute left-2 top-2 flex flex-wrap gap-space-xs",
1916
- children: [p && /* @__PURE__ */ N(v, {
2023
+ children: [p && /* @__PURE__ */ I(x, {
1917
2024
  tone: "secondary",
1918
2025
  className: "bg-card text-card-foreground",
1919
- children: T.gallery.primary
1920
- }), /* @__PURE__ */ N(v, {
2026
+ children: D.gallery.primary
2027
+ }), /* @__PURE__ */ I(x, {
1921
2028
  tone: "secondary",
1922
2029
  className: "bg-card text-card-foreground",
1923
- children: V(T.gallery.itemPosition, {
2030
+ children: H(D.gallery.itemPosition, {
1924
2031
  index: t + 1,
1925
- total: D
2032
+ total: A
1926
2033
  })
1927
2034
  })]
1928
2035
  })]
1929
- }), /* @__PURE__ */ N("div", {
1930
- className: r("media-resource-gallery--item-body", _ === "compact" ? "p-surface-xs" : "p-surface"),
1931
- children: /* @__PURE__ */ P(c, {
2036
+ }), /* @__PURE__ */ I("div", {
2037
+ className: r("media-resource-gallery--item-body", v === "compact" ? "p-surface-xs" : "p-surface"),
2038
+ children: /* @__PURE__ */ L(l, {
1932
2039
  gap: "md",
1933
- children: [/* @__PURE__ */ P("div", {
2040
+ children: [/* @__PURE__ */ L("div", {
1934
2041
  className: "min-w-0",
1935
- children: [/* @__PURE__ */ N(a, {
2042
+ children: [/* @__PURE__ */ I(a, {
1936
2043
  tag: "div",
1937
2044
  weight: "semibold",
1938
2045
  className: "truncate",
1939
- children: i
1940
- }), /* @__PURE__ */ N(m, {
1941
- value: E.getSize(e),
2046
+ children: o
2047
+ }), /* @__PURE__ */ I(_, {
2048
+ value: O.getSize(e),
1942
2049
  size: "xs",
1943
2050
  align: "left",
1944
- emptyLabel: T.unknownSize
2051
+ emptyLabel: D.unknownSize
1945
2052
  })]
1946
- }), !y && /* @__PURE__ */ P("div", {
2053
+ }), !y && /* @__PURE__ */ L("div", {
1947
2054
  className: "flex items-center gap-space-xs",
1948
2055
  children: [
1949
- /* @__PURE__ */ N(o, {
2056
+ /* @__PURE__ */ I(i, {
1950
2057
  type: "button",
1951
2058
  tone: "secondary",
1952
2059
  buttonStyle: "ghost",
1953
2060
  size: "sm",
1954
2061
  iconOnly: !0,
1955
2062
  disabled: p,
1956
- "aria-label": T.gallery.setPrimary,
2063
+ "aria-label": D.gallery.setPrimary,
1957
2064
  onClick: () => u?.(n, e),
1958
- children: /* @__PURE__ */ N(ue, { className: "size-icon-md" })
2065
+ children: /* @__PURE__ */ I(he, { className: "size-icon-md" })
1959
2066
  }),
1960
- /* @__PURE__ */ N(o, {
2067
+ /* @__PURE__ */ I(i, {
1961
2068
  type: "button",
1962
2069
  tone: "secondary",
1963
2070
  buttonStyle: "ghost",
1964
2071
  size: "sm",
1965
2072
  iconOnly: !0,
1966
- disabled: !x,
1967
- "aria-label": T.gallery.movePrevious,
1968
- onClick: () => A(t, t - 1),
1969
- children: /* @__PURE__ */ N(F, { className: "size-icon-md" })
2073
+ disabled: !S,
2074
+ "aria-label": D.gallery.movePrevious,
2075
+ onClick: () => M(t, t - 1),
2076
+ children: /* @__PURE__ */ I(ae, { className: "size-icon-md" })
1970
2077
  }),
1971
- /* @__PURE__ */ N(o, {
2078
+ /* @__PURE__ */ I(i, {
1972
2079
  type: "button",
1973
2080
  tone: "secondary",
1974
2081
  buttonStyle: "ghost",
1975
2082
  size: "sm",
1976
2083
  iconOnly: !0,
1977
- disabled: !C,
1978
- "aria-label": T.gallery.moveNext,
1979
- onClick: () => A(t, t + 1),
1980
- children: /* @__PURE__ */ N(ne, { className: "size-icon-md" })
2084
+ disabled: !w,
2085
+ "aria-label": D.gallery.moveNext,
2086
+ onClick: () => M(t, t + 1),
2087
+ children: /* @__PURE__ */ I(oe, { className: "size-icon-md" })
1981
2088
  }),
1982
- /* @__PURE__ */ N(o, {
2089
+ /* @__PURE__ */ I(i, {
1983
2090
  type: "button",
1984
2091
  tone: "destructive",
1985
2092
  buttonStyle: "ghost",
1986
2093
  size: "sm",
1987
2094
  iconOnly: !0,
1988
2095
  className: "ml-auto",
1989
- "aria-label": T.gallery.remove,
2096
+ "aria-label": D.gallery.remove,
1990
2097
  onClick: () => d?.(n, e),
1991
- children: /* @__PURE__ */ N(de, { className: "size-icon-md" })
2098
+ children: /* @__PURE__ */ I(ge, { className: "size-icon-md" })
1992
2099
  })
1993
2100
  ]
1994
2101
  })]
1995
2102
  })
1996
2103
  })]
1997
2104
  }, n);
1998
- }), re()]
2105
+ }), N()]
1999
2106
  })]
2000
2107
  });
2001
2108
  }
2002
2109
  //#endregion
2003
- 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 };
2110
+ export { Je as MediaLibrary, J as MediaLibraryCard, Y as MediaLibraryDetailPanel, Q as MediaLibraryDialog, He as MediaLibraryEmptyState, Ge as MediaLibraryFooter, Ue as MediaLibraryList, q as MediaLibraryToolbar, X as MediaLibraryUploadPanel, Ye as MediaResourceGallery, xe as defaultMediaLibraryStrings, Ee as formatMediaLibrarySize, H as formatMediaLibraryString, De as getMediaLibraryDimensions, Te as resolveMediaLibraryAccessors, Ie as useMediaLibrary };
2004
2111
 
2005
2112
  //# sourceMappingURL=media-library.js.map