themelia-react-ui 1.0.2 → 2.0.1

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