themelia-react-ui 2.0.1 → 2.0.2

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