themelia-ui 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (746) hide show
  1. package/.agents/skills/themelia-ui/SKILL.md +60 -33
  2. package/.agents/skills/themelia-ui/manifest.json +23 -0
  3. package/.agents/skills/themelia-ui/references/api-compatibility.md +5 -4
  4. package/.agents/skills/themelia-ui/references/blocks.md +123 -0
  5. package/.agents/skills/themelia-ui/references/composition-ladder.md +8 -8
  6. package/.agents/skills/themelia-ui/references/composition.md +100 -19
  7. package/.agents/skills/themelia-ui/references/forms.md +23 -3
  8. package/.agents/skills/themelia-ui/references/framework-wiring.md +41 -13
  9. package/.agents/skills/themelia-ui/references/i18n.md +4 -2
  10. package/.agents/skills/themelia-ui/references/imports.md +104 -104
  11. package/.agents/skills/themelia-ui/references/installation.md +60 -31
  12. package/.agents/skills/themelia-ui/references/migration.md +156 -5
  13. package/.agents/skills/themelia-ui/references/provider-and-scoping.md +37 -25
  14. package/.agents/skills/themelia-ui/references/reference-workflows.md +43 -0
  15. package/.agents/skills/themelia-ui/references/structure-and-spacing.md +147 -0
  16. package/.agents/skills/themelia-ui/references/theming.md +174 -131
  17. package/.agents/skills/themelia-ui/references/troubleshooting.md +88 -30
  18. package/.agents/skills/themelia-ui/references/verification.md +60 -5
  19. package/CHANGELOG.md +212 -0
  20. package/README.md +48 -60
  21. package/dist/accordion-CHuzMmWL.js +143 -0
  22. package/dist/{action-menu-BNLURfMK.js → action-menu-BwiL_F6I.js} +35 -33
  23. package/dist/{alert-dialog-BMVo6Z-8.js → alert-dialog-Cg2HhuBe.js} +1 -1
  24. package/dist/avatar-Dc_BNYfB.js +93 -0
  25. package/dist/badge-VlJVZjdm.js +45 -0
  26. package/dist/base/accordion.js +1 -1
  27. package/dist/base/action-menu.js +1 -1
  28. package/dist/base/alert-dialog.js +1 -1
  29. package/dist/base/aspect-ratio.js +3 -1
  30. package/dist/base/avatar.js +1 -1
  31. package/dist/base/badge.js +2 -2
  32. package/dist/base/batch-action-bar.js +1 -1
  33. package/dist/base/buttons.js +1 -1
  34. package/dist/base/cards.js +1 -1
  35. package/dist/base/carousel.js +6 -4
  36. package/dist/base/chart.js +1 -1
  37. package/dist/base/choice-inputs.js +1 -1
  38. package/dist/base/combobox.js +1 -1
  39. package/dist/base/command.js +1 -1
  40. package/dist/base/context-menu.js +22 -21
  41. package/dist/base/copyable.js +1 -1
  42. package/dist/base/date-pickers.js +1 -1
  43. package/dist/base/dialog.js +1 -1
  44. package/dist/base/display.js +1 -1
  45. package/dist/base/dropdown-menu.js +1 -1
  46. package/dist/base/feedback.js +1 -1
  47. package/dist/base/forms-numeric.js +1 -1
  48. package/dist/base/forms.js +1 -1
  49. package/dist/base/hover-card.js +26 -23
  50. package/dist/base/input-group.js +1 -1
  51. package/dist/base/item.js +1 -1
  52. package/dist/base/label.js +1 -1
  53. package/dist/base/menubar.js +20 -14
  54. package/dist/base/navigation-menu.js +47 -38
  55. package/dist/base/navigation.js +1 -1
  56. package/dist/base/otp-input.js +36 -30
  57. package/dist/base/overlay.js +1 -1
  58. package/dist/base/popover-menu.js +1 -1
  59. package/dist/base/popover.js +1 -1
  60. package/dist/base/qr-code.js +51 -47
  61. package/dist/base/repeaters.js +1 -1
  62. package/dist/base/resizable.js +2 -0
  63. package/dist/base/sheet.js +1 -1
  64. package/dist/base/sidebar.js +1 -1
  65. package/dist/base/skeleton.js +1 -1
  66. package/dist/base/spinner.js +1 -1
  67. package/dist/base/structure.js +1 -1
  68. package/dist/base/table.js +1 -1
  69. package/dist/base/text-inputs.js +1 -1
  70. package/dist/base/timeline.js +1 -1
  71. package/dist/base/toaster.js +1 -1
  72. package/dist/base/toggle.js +21 -15
  73. package/dist/base/toolbar.js +1 -1
  74. package/dist/base/tooltip.js +1 -1
  75. package/dist/base/typography.js +2 -2
  76. package/dist/base/upload.js +1 -1
  77. package/dist/base/value-inputs.js +1 -1
  78. package/dist/{batch-action-bar-BZYNKXdV.js → batch-action-bar-DZVMVW83.js} +11 -8
  79. package/dist/{admin/patterns → blocks/admin}/access.js +79 -76
  80. package/dist/blocks/admin/commerce.js +2493 -0
  81. package/dist/{patterns → blocks}/analytics.js +312 -303
  82. package/dist/{patterns → blocks}/onboarding.js +27 -23
  83. package/dist/{patterns → blocks}/timelines.js +1 -1
  84. package/dist/buttons-BX2JfL5X.js +173 -0
  85. package/dist/cards-Ddhz43Bz.js +279 -0
  86. package/dist/chart-BkK3Xm10.js +201 -0
  87. package/dist/choice-inputs-NwRxvmZN.js +694 -0
  88. package/dist/combobox-519ubijc.js +292 -0
  89. package/dist/command-JjApYFds.js +156 -0
  90. package/dist/comments-CCQ2QRaU.js +1443 -0
  91. package/dist/components/base/action-menu/action-menu.d.ts +1 -1
  92. package/dist/components/base/action-menu/action-menu.types.d.ts +2 -2
  93. package/dist/components/base/avatar/avatar.d.ts +5 -2
  94. package/dist/components/base/badge/badge.d.ts +10 -10
  95. package/dist/components/base/badge/badge.variants.d.ts +1 -2
  96. package/dist/components/base/badge/index.d.ts +1 -2
  97. package/dist/components/base/buttons/button.d.ts +9 -8
  98. package/dist/components/base/buttons/button.types.d.ts +2 -2
  99. package/dist/components/base/buttons/index.d.ts +1 -1
  100. package/dist/components/base/buttons/text-button.d.ts +1 -1
  101. package/dist/components/base/cards/card-actions.d.ts +1 -1
  102. package/dist/components/base/cards/card.d.ts +3 -1
  103. package/dist/components/base/cards/partials/card-header.d.ts +2 -1
  104. package/dist/components/base/choice-inputs/choice.types.d.ts +2 -2
  105. package/dist/components/base/choice-inputs/partials/choice-parts.d.ts +3 -3
  106. package/dist/components/base/command/command.d.ts +5 -2
  107. package/dist/components/base/display/icon-badge.d.ts +5 -3
  108. package/dist/components/base/display/index.d.ts +1 -1
  109. package/dist/components/base/display/metadata-list.d.ts +6 -6
  110. package/dist/components/base/display/metadata-value.d.ts +1 -1
  111. package/dist/components/base/display/separator.d.ts +2 -2
  112. package/dist/components/base/feedback/alert.d.ts +3 -2
  113. package/dist/components/base/feedback/empty.d.ts +5 -4
  114. package/dist/components/base/feedback/progress-circle.d.ts +2 -2
  115. package/dist/components/base/feedback/progress.d.ts +3 -1
  116. package/dist/components/base/forms/form-field.d.ts +2 -2
  117. package/dist/components/base/input-group/input-group.d.ts +8 -10
  118. package/dist/components/base/item/item.d.ts +2 -2
  119. package/dist/components/base/overlay/index.d.ts +1 -1
  120. package/dist/components/base/overlay/overlay.types.d.ts +7 -5
  121. package/dist/components/base/qr-code/qr-code.d.ts +4 -4
  122. package/dist/components/base/sheet/sheet.d.ts +1 -1
  123. package/dist/components/base/sidebar/sidebar.d.ts +9 -13
  124. package/dist/components/base/spinner/spinner.d.ts +2 -2
  125. package/dist/components/base/structure/adaptive-grid.d.ts +3 -3
  126. package/dist/components/base/structure/bleed.d.ts +4 -2
  127. package/dist/components/base/structure/grid.d.ts +10 -4
  128. package/dist/components/base/structure/index.d.ts +1 -1
  129. package/dist/components/base/structure/split.d.ts +4 -3
  130. package/dist/components/base/structure/stack.d.ts +5 -5
  131. package/dist/components/base/structure/structure.maps.d.ts +2 -1
  132. package/dist/components/base/structure/structure.types.d.ts +10 -4
  133. package/dist/components/base/toggle/toggle.d.ts +2 -2
  134. package/dist/components/base/toolbar/toolbar.d.ts +3 -3
  135. package/dist/components/base/typography/index.d.ts +2 -0
  136. package/dist/components/base/typography/rich-text/rich-text.variants.d.ts +9 -0
  137. package/dist/components/base/typography/text/index.d.ts +1 -0
  138. package/dist/components/base/typography/text/text.d.ts +15 -8
  139. package/dist/components/base/typography/text/text.variants.d.ts +41 -0
  140. package/dist/components/base/value-inputs/color-input.d.ts +1 -7
  141. package/dist/components/base/value-inputs/slider.d.ts +2 -7
  142. package/dist/components/{admin/patterns → blocks/admin}/commerce/vendor-profile.d.ts +2 -1
  143. package/dist/components/{patterns → blocks}/analytics/analytics.strings.d.ts +2 -5
  144. package/dist/components/features/actions/action-adapters.d.ts +3 -3
  145. package/dist/components/features/actions/actions.types.d.ts +3 -5
  146. package/dist/components/features/actions/index.d.ts +1 -1
  147. package/dist/components/features/activities/activities-feed.d.ts +1 -1
  148. package/dist/components/features/activities/activities.types.d.ts +4 -4
  149. package/dist/components/features/activities/activity-parts.d.ts +3 -3
  150. package/dist/components/features/activities/activity-row.d.ts +4 -4
  151. package/dist/components/features/activities/index.d.ts +1 -1
  152. package/dist/components/features/ai-chat/ai-chat.types.d.ts +10 -3
  153. package/dist/components/features/ai-chat/ai-message-surfaces.d.ts +1 -1
  154. package/dist/components/features/ai-chat/ai-work-surfaces.d.ts +1 -1
  155. package/dist/components/features/combobox/combobox.strings.d.ts +2 -2
  156. package/dist/components/features/combobox/fetching-combobox.d.ts +2 -1
  157. package/dist/components/features/combobox/resource-combobox.d.ts +3 -0
  158. package/dist/components/features/combobox/use-suggestions.d.ts +7 -0
  159. package/dist/components/features/event-calendar/event-calendar.types.d.ts +3 -0
  160. package/dist/components/features/media-library/index.d.ts +1 -1
  161. package/dist/components/features/media-library/media-library-parts.d.ts +4 -3
  162. package/dist/components/features/media-library/media-library-views.d.ts +4 -3
  163. package/dist/components/features/media-library/media-library.d.ts +1 -1
  164. package/dist/components/features/media-library/media-library.strings.d.ts +12 -13
  165. package/dist/components/features/media-library/media-library.types.d.ts +11 -9
  166. package/dist/components/features/media-library/media-resource-gallery.d.ts +1 -1
  167. package/dist/components/features/media-library/use-media-library.d.ts +1 -4
  168. package/dist/components/features/overlays/action-overlay-frame.d.ts +1 -1
  169. package/dist/components/features/overlays/index.d.ts +1 -1
  170. package/dist/components/features/overlays/overlay-parts.d.ts +3 -3
  171. package/dist/components/features/overlays/overlays.types.d.ts +8 -7
  172. package/dist/components/features/rich-text-editor/index.d.ts +0 -1
  173. package/dist/components/features/table/data-table-body.d.ts +1 -1
  174. package/dist/components/features/table/data-table-expanded-row.d.ts +27 -0
  175. package/dist/components/features/table/data-table-header.d.ts +1 -1
  176. package/dist/components/features/table/data-table-size.d.ts +1 -1
  177. package/dist/components/features/table/data-table.d.ts +1 -1
  178. package/dist/components/features/table/index.d.ts +1 -1
  179. package/dist/components/features/table/table-helpers.d.ts +9 -3
  180. package/dist/components/features/table/table.strings.d.ts +11 -0
  181. package/dist/components/features/table/table.types.d.ts +60 -2
  182. package/dist/components/features/theme-tweaker/index.d.ts +1 -1
  183. package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +1 -1
  184. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +6 -10
  185. package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +22 -6
  186. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  187. package/dist/components/layout/auth/auth.d.ts +1 -1
  188. package/dist/components/layout/auth/auth.types.d.ts +1 -1
  189. package/dist/components/primitives/value.d.ts +3 -1
  190. package/dist/containers-B8d8U9GS.js +2 -0
  191. package/dist/{copyable-H1TUEY-H.js → copyable-D9Okb1w6.js} +12 -11
  192. package/dist/core.css +2 -2
  193. package/dist/css/access.css +2 -1
  194. package/dist/css/accordion.css +2 -1
  195. package/dist/css/action-menu.css +2 -1
  196. package/dist/css/activities.css +2 -1
  197. package/dist/css/ai-chat.css +2 -1
  198. package/dist/css/analytics.css +2 -1
  199. package/dist/css/app-shell.css +2 -1
  200. package/dist/css/aspect-ratio.css +2 -1
  201. package/dist/css/async-preview.css +2 -1
  202. package/dist/css/auth.css +2 -1
  203. package/dist/css/avatar.css +2 -1
  204. package/dist/css/badge.css +2 -1
  205. package/dist/css/batch-action-bar.css +2 -1
  206. package/dist/css/buttons.css +2 -1
  207. package/dist/css/cards.css +2 -1
  208. package/dist/css/carousel.css +2 -1
  209. package/dist/css/chart.css +2 -1
  210. package/dist/css/choice-inputs.css +2 -1
  211. package/dist/css/combobox.css +2 -1
  212. package/dist/css/combobox2.css +2 -1
  213. package/dist/css/command.css +2 -1
  214. package/dist/css/comments.css +2 -1
  215. package/dist/css/commerce.css +2 -1
  216. package/dist/css/containers.css +2 -1
  217. package/dist/css/copyable.css +2 -1
  218. package/dist/css/data-view.css +2 -1
  219. package/dist/css/date-pickers.css +2 -1
  220. package/dist/css/display.css +2 -1
  221. package/dist/css/dropdown-menu.css +2 -1
  222. package/dist/css/event-calendar.css +2 -1
  223. package/dist/css/feedback.css +2 -1
  224. package/dist/css/filters.css +2 -1
  225. package/dist/css/forms-numeric.css +2 -1
  226. package/dist/css/forms.css +2 -1
  227. package/dist/css/global-search.css +2 -1
  228. package/dist/css/header.css +2 -1
  229. package/dist/css/hover-card.css +2 -1
  230. package/dist/css/input-group.css +2 -1
  231. package/dist/css/item.css +2 -1
  232. package/dist/css/kanban.css +2 -1
  233. package/dist/css/label.css +2 -1
  234. package/dist/css/map.css +2 -1
  235. package/dist/css/media-library.css +2 -1
  236. package/dist/css/mentions.css +2 -1
  237. package/dist/css/menubar.css +2 -1
  238. package/dist/css/navigation-menu.css +2 -1
  239. package/dist/css/navigation.css +2 -1
  240. package/dist/css/navigation2.css +2 -1
  241. package/dist/css/onboarding.css +2 -1
  242. package/dist/css/otp-input.css +2 -1
  243. package/dist/css/overlay.css +2 -1
  244. package/dist/css/overlays.css +2 -1
  245. package/dist/css/page.css +2 -1
  246. package/dist/css/popover-menu.css +2 -1
  247. package/dist/css/popover.css +2 -1
  248. package/dist/css/primitives.css +2 -1
  249. package/dist/css/products.css +2 -1
  250. package/dist/css/qr-code.css +2 -1
  251. package/dist/css/repeaters.css +2 -1
  252. package/dist/css/resizable.css +2 -1
  253. package/dist/css/resource-assignment.css +2 -1
  254. package/dist/css/resource.css +2 -1
  255. package/dist/css/rich-text-editor.css +2 -1
  256. package/dist/css/schema-form.css +2 -1
  257. package/dist/css/sidebar.css +2 -1
  258. package/dist/css/sidebar2.css +2 -1
  259. package/dist/css/skeleton.css +2 -1
  260. package/dist/css/spinner.css +2 -1
  261. package/dist/css/structure.css +2 -1
  262. package/dist/css/sync.css +2 -1
  263. package/dist/css/table.css +2 -1
  264. package/dist/css/table2.css +2 -1
  265. package/dist/css/text-inputs.css +2 -1
  266. package/dist/css/theme-tweaker.css +2 -1
  267. package/dist/css/timeline.css +2 -1
  268. package/dist/css/timelines.css +2 -1
  269. package/dist/css/toaster.css +2 -1
  270. package/dist/css/toggle.css +2 -1
  271. package/dist/css/toolbar.css +2 -1
  272. package/dist/css/tooltip.css +2 -1
  273. package/dist/css/typography.css +2 -1
  274. package/dist/css/upload.css +2 -1
  275. package/dist/css/value-inputs.css +2 -1
  276. package/dist/css/workspace.css +2 -1
  277. package/dist/css-graph.json +1027 -0
  278. package/dist/date-pickers-BwCwKIVM.js +685 -0
  279. package/dist/{dialog-CtFCuTUF.js → dialog-CAnwRNrm.js} +1 -1
  280. package/dist/display-a7AoX_u7.js +664 -0
  281. package/dist/dropdown-menu-Br8kvjrF.js +235 -0
  282. package/dist/empty.js +0 -0
  283. package/dist/features/actions.js +6 -6
  284. package/dist/features/activities.js +219 -216
  285. package/dist/features/ai-chat.js +593 -565
  286. package/dist/features/async-preview.js +105 -286
  287. package/dist/features/combobox.js +328 -314
  288. package/dist/features/comments.js +1 -1
  289. package/dist/features/data-view.js +56 -55
  290. package/dist/features/event-calendar.js +189 -185
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +259 -260
  293. package/dist/features/kanban.js +39 -37
  294. package/dist/features/map.js +357 -354
  295. package/dist/features/media-library.js +931 -931
  296. package/dist/features/mentions.js +1 -1
  297. package/dist/features/overlays.js +1 -1
  298. package/dist/features/products.js +950 -942
  299. package/dist/features/resource-assignment.js +39 -37
  300. package/dist/features/resource.js +70 -71
  301. package/dist/features/rich-text-editor.js +2 -2
  302. package/dist/features/schema-form.js +342 -338
  303. package/dist/features/sync.js +14 -12
  304. package/dist/features/table.js +1 -1
  305. package/dist/features/theme-tweaker.js +1002 -962
  306. package/dist/feedback-D4qVsKlD.js +430 -0
  307. package/dist/{filters-DOLKRSmb.js → filters-BhsTkWpZ.js} +386 -383
  308. package/dist/forms-C0WeNPFF.js +250 -0
  309. package/dist/forms-numeric-IwQ1ltNf.js +582 -0
  310. package/dist/hooks/use-native-dialog.d.ts +1 -1
  311. package/dist/index.js +2 -2
  312. package/dist/input-group-HS_Z0Ei_.js +119 -0
  313. package/dist/item-M2pmpWXh.js +150 -0
  314. package/dist/{label-DumoMDm6.js → label-HOBXAscw.js} +7 -5
  315. package/dist/layout/app-shell.js +4 -2
  316. package/dist/layout/auth.js +102 -100
  317. package/dist/layout/header.js +190 -180
  318. package/dist/layout/navigation.js +1 -1
  319. package/dist/layout/page.js +18 -16
  320. package/dist/layout/settings.js +2 -2
  321. package/dist/layout/sidebar.js +50 -46
  322. package/dist/layout/workspace.js +71 -69
  323. package/dist/lib/action-presentation.d.ts +3 -3
  324. package/dist/lib/component-vocabulary.d.ts +2 -2
  325. package/dist/lib/css-length.d.ts +2 -0
  326. package/dist/lib/responsive.d.ts +1 -1
  327. package/dist/lib/theming/index.d.ts +1 -0
  328. package/dist/lib/theming/recipes.d.ts +2 -2
  329. package/dist/lib/theming/themes/dense.d.ts +3 -0
  330. package/dist/lib/theming/themes/editorial.d.ts +3 -0
  331. package/dist/lib/theming/themes/index.d.ts +8 -0
  332. package/dist/lib/theming/themes/pair.d.ts +7 -0
  333. package/dist/lib/theming/themes/sharp.d.ts +3 -0
  334. package/dist/lib/theming/themes/soft.d.ts +3 -0
  335. package/dist/lib/theming/themes/types.d.ts +12 -0
  336. package/dist/lib/ui-provider/index.d.ts +1 -1
  337. package/dist/lib/ui-provider/scope.d.ts +5 -8
  338. package/dist/lib/ui-provider/tokens.d.ts +11 -3
  339. package/dist/lib/ui-provider/tokens.generated.d.ts +6 -4
  340. package/dist/lib/ui-provider/types.d.ts +17 -19
  341. package/dist/lib/ui-provider/ui-scope.d.ts +1 -1
  342. package/dist/{mentions-BbsEHlcH.js → mentions-BOxbigwp.js} +113 -111
  343. package/dist/navigation-Bgu7Vc0M.js +622 -0
  344. package/dist/navigation-DiYACqpE.js +216 -0
  345. package/dist/overlay-BuQOl8aP.js +356 -0
  346. package/dist/{overlays-DvVoS3td.js → overlays-1sULyytH.js} +77 -75
  347. package/dist/popover-CA7SP_iz.js +127 -0
  348. package/dist/popover-menu-QXgQeWeG.js +192 -0
  349. package/dist/{primitives-D0bdDozz.js → primitives-BskKlf35.js} +181 -178
  350. package/dist/primitives.js +1 -1
  351. package/dist/profiles/admin.json +6 -36
  352. package/dist/profiles/general.json +6 -96
  353. package/dist/repeaters-CeH20dvr.js +445 -0
  354. package/dist/rich-text-editor-D_Ppm8yh.js +491 -0
  355. package/dist/{sheet-CKcmRbJ9.js → sheet-CJ1-OAla.js} +3 -3
  356. package/dist/sidebar-D8uGqxio.js +421 -0
  357. package/dist/skeleton-BTKNKTdj.js +173 -0
  358. package/dist/spinner-Tc1QCnxM.js +30 -0
  359. package/dist/{structure-D0WGQAP3.js → structure-CynEZ-OY.js} +15 -23
  360. package/dist/style.css +1 -1
  361. package/dist/styles/TOKENS.md +116 -275
  362. package/dist/styles/animation.css +114 -0
  363. package/dist/styles/base.css +7 -6
  364. package/dist/styles/fields.css +45 -63
  365. package/dist/styles/focus.css +12 -0
  366. package/dist/styles/forced-colors.css +11 -10
  367. package/dist/styles/index.css +23 -30
  368. package/dist/styles/map.css +45 -34
  369. package/dist/styles/mentions.css +14 -52
  370. package/dist/styles/overlays.css +7 -7
  371. package/dist/styles/tailwind.css +76 -127
  372. package/dist/styles/targets.css +3 -3
  373. package/dist/styles/theme/colour.css +86 -0
  374. package/dist/styles/theme/density.css +31 -0
  375. package/dist/styles/theme/elevation.css +9 -0
  376. package/dist/styles/theme/layout.css +18 -0
  377. package/dist/styles/theme/motion.css +18 -0
  378. package/dist/styles/theme/shape.css +12 -0
  379. package/dist/styles/theme/size.css +10 -0
  380. package/dist/styles/theme/spacing.css +11 -0
  381. package/dist/styles/theme/typography.css +20 -0
  382. package/dist/styles/tone.css +61 -0
  383. package/dist/table-B7dtIFUx.js +1262 -0
  384. package/dist/table-Ds_eO9av.js +191 -0
  385. package/dist/tailwind.css +76 -127
  386. package/dist/text-inputs-BboE77nZ.js +395 -0
  387. package/dist/theming-C5ygF5uf.js +292 -0
  388. package/dist/theming.js +2 -2
  389. package/dist/{timeline-BdaGRyj-.js → timeline-BR_jNgvz.js} +57 -49
  390. package/dist/{timelines-BB7550mz.js → timelines-DXG1BfIN.js} +69 -67
  391. package/dist/{toaster-bBMgXm8z.js → toaster-CXL8L7Mm.js} +106 -99
  392. package/dist/tokens.json +1027 -636
  393. package/dist/toolbar-DBK-c4yy.js +74 -0
  394. package/dist/tooltip-BPYP-jUm.js +76 -0
  395. package/dist/{typography-BkxEiwQ1.js → typography-DmeR05Er.js} +87 -53
  396. package/dist/{ui-provider-Cmoq6i_D.js → ui-provider-DpzLUD12.js} +117 -69
  397. package/dist/ui-provider.js +1 -1
  398. package/dist/upload-CYuoJykZ.js +968 -0
  399. package/dist/use-async-preview-BFwf9ElY.js +188 -0
  400. package/dist/value-inputs-ng8aVJJZ.js +728 -0
  401. package/docs/README.md +13 -3
  402. package/docs/build/browser-composition-fixture.ts +28 -0
  403. package/docs/build/recipes.md +11484 -10723
  404. package/docs/generated/component-index.json +9809 -9169
  405. package/docs/generated/components/INDEX.md +5 -5
  406. package/docs/generated/components/base--accordion.md +51 -2
  407. package/docs/generated/components/base--action-menu.md +14 -15
  408. package/docs/generated/components/base--alert-dialog.md +3 -4
  409. package/docs/generated/components/base--aspect-ratio.md +3 -4
  410. package/docs/generated/components/base--avatar.md +7 -7
  411. package/docs/generated/components/base--badge.md +159 -27
  412. package/docs/generated/components/base--batch-action-bar.md +6 -7
  413. package/docs/generated/components/base--buttons.md +151 -47
  414. package/docs/generated/components/base--cards.md +107 -14
  415. package/docs/generated/components/base--carousel.md +1 -2
  416. package/docs/generated/components/base--chart.md +44 -8
  417. package/docs/generated/components/base--choice-inputs.md +10 -11
  418. package/docs/generated/components/base--combobox.md +3 -4
  419. package/docs/generated/components/base--command.md +6 -6
  420. package/docs/generated/components/base--context-menu.md +1 -2
  421. package/docs/generated/components/base--copyable.md +6 -7
  422. package/docs/generated/components/base--date-pickers.md +6 -7
  423. package/docs/generated/components/base--dialog.md +6 -7
  424. package/docs/generated/components/base--direction.md +1 -1
  425. package/docs/generated/components/base--display.md +234 -54
  426. package/docs/generated/components/base--dropdown-menu.md +6 -7
  427. package/docs/generated/components/base--feedback.md +71 -18
  428. package/docs/generated/components/base--forms-numeric.md +6 -7
  429. package/docs/generated/components/base--forms.md +84 -14
  430. package/docs/generated/components/base--hover-card.md +3 -4
  431. package/docs/generated/components/base--input-group.md +27 -30
  432. package/docs/generated/components/base--item.md +8 -9
  433. package/docs/generated/components/base--label.md +2 -3
  434. package/docs/generated/components/base--menubar.md +2 -4
  435. package/docs/generated/components/base--navigation-menu.md +2 -3
  436. package/docs/generated/components/base--navigation.md +2 -3
  437. package/docs/generated/components/base--otp-input.md +3 -4
  438. package/docs/generated/components/base--overlay.md +56 -47
  439. package/docs/generated/components/base--popover-menu.md +7 -8
  440. package/docs/generated/components/base--popover.md +9 -10
  441. package/docs/generated/components/base--qr-code.md +7 -8
  442. package/docs/generated/components/base--repeaters.md +6 -7
  443. package/docs/generated/components/base--resizable.md +2 -3
  444. package/docs/generated/components/base--sheet.md +12 -13
  445. package/docs/generated/components/base--sidebar.md +9 -11
  446. package/docs/generated/components/base--skeleton.md +6 -7
  447. package/docs/generated/components/base--slot.md +1 -1
  448. package/docs/generated/components/base--spinner.md +5 -7
  449. package/docs/generated/components/base--structure.md +320 -70
  450. package/docs/generated/components/base--table.md +61 -3
  451. package/docs/generated/components/base--text-inputs.md +17 -18
  452. package/docs/generated/components/base--timeline.md +45 -4
  453. package/docs/generated/components/base--toaster.md +43 -12
  454. package/docs/generated/components/base--toggle.md +11 -12
  455. package/docs/generated/components/base--toolbar.md +7 -8
  456. package/docs/generated/components/base--tooltip.md +5 -6
  457. package/docs/generated/components/base--typography.md +317 -32
  458. package/docs/generated/components/base--upload.md +8 -9
  459. package/docs/generated/components/base--value-inputs.md +9 -38
  460. package/docs/generated/components/{admin--patterns--access.md → blocks--admin--access.md} +15 -6
  461. package/docs/generated/components/{admin--patterns--commerce.md → blocks--admin--commerce.md} +40 -41
  462. package/docs/generated/components/{patterns--analytics.md → blocks--analytics.md} +57 -14
  463. package/docs/generated/components/{patterns--onboarding.md → blocks--onboarding.md} +6 -7
  464. package/docs/generated/components/{patterns--timelines.md → blocks--timelines.md} +6 -7
  465. package/docs/generated/components/features--actions.md +8 -18
  466. package/docs/generated/components/features--activities.md +31 -32
  467. package/docs/generated/components/features--ai-chat.md +15 -15
  468. package/docs/generated/components/features--async-preview.md +5 -6
  469. package/docs/generated/components/features--combobox.md +71 -5
  470. package/docs/generated/components/features--comments.md +0 -1
  471. package/docs/generated/components/features--data-view.md +63 -8
  472. package/docs/generated/components/features--event-calendar.md +1 -2
  473. package/docs/generated/components/features--filters.md +11 -2
  474. package/docs/generated/components/features--global-search.md +1 -2
  475. package/docs/generated/components/features--kanban.md +1 -2
  476. package/docs/generated/components/features--map.md +1 -2
  477. package/docs/generated/components/features--media-library.md +105 -38
  478. package/docs/generated/components/features--mentions.md +7 -7
  479. package/docs/generated/components/features--overlays.md +75 -22
  480. package/docs/generated/components/features--products.md +10 -11
  481. package/docs/generated/components/features--resource-assignment.md +2 -3
  482. package/docs/generated/components/features--resource.md +3 -4
  483. package/docs/generated/components/features--rich-text-editor.md +42 -13
  484. package/docs/generated/components/features--schema-form.md +1 -2
  485. package/docs/generated/components/features--sync.md +2 -3
  486. package/docs/generated/components/features--table.md +162 -12
  487. package/docs/generated/components/features--theme-tweaker.md +30 -15
  488. package/docs/generated/components/forms.md +2 -2
  489. package/docs/generated/components/layout--app-shell.md +41 -11
  490. package/docs/generated/components/layout--auth.md +8 -9
  491. package/docs/generated/components/layout--containers.md +40 -1
  492. package/docs/generated/components/layout--header.md +2 -3
  493. package/docs/generated/components/layout--navigation.md +0 -1
  494. package/docs/generated/components/layout--page.md +33 -5
  495. package/docs/generated/components/layout--settings.md +0 -1
  496. package/docs/generated/components/layout--sidebar.md +47 -7
  497. package/docs/generated/components/layout--workspace.md +3 -4
  498. package/docs/generated/components/primitives.md +128 -17
  499. package/docs/generated/components/theming.md +147 -4
  500. package/docs/generated/components/ui-provider.md +96 -78
  501. package/docs/generated/composition-ladder.md +8 -8
  502. package/docs/generated/consumer-contract.json +5736 -0
  503. package/docs/generated/imports.md +104 -104
  504. package/docs/generated/migration-broad-imports.json +267 -90
  505. package/docs/generated/migration-broad-imports.md +266 -101
  506. package/docs/generated/migration-codemod.json +365 -70
  507. package/docs/generated/migration.md +665 -95
  508. package/docs/generated/profiles.md +27 -27
  509. package/docs/generated/public-api.md +104 -102
  510. package/docs/generated/recipes.json +755 -810
  511. package/docs/generated/workflows/communications-overview/analytics/communications-reference.tsx +19 -0
  512. package/docs/generated/workflows/index.json +691 -0
  513. package/docs/generated/workflows/media-picking/media-library/media-picking-reference.tsx +63 -0
  514. package/docs/generated/workflows/media-picking/media-library/reference-data.ts +3 -0
  515. package/docs/generated/workflows/multi-section-form/form-workflow/multi-section-reference.tsx +46 -0
  516. package/docs/generated/workflows/nested-action-flow/action-overlays/nested-action-reference.tsx +39 -0
  517. package/docs/generated/workflows/record-detail/page-layout/record-detail-reference.tsx +24 -0
  518. package/docs/generated/workflows/resource-index/data-view/resource-index-reference.tsx +51 -0
  519. package/docs/generated/workflows/scoped-resource-selection/combobox/scoped-resource-reference.tsx +50 -0
  520. package/docs/generated/workflows/website-content-editor/media-library/reference-data.ts +3 -0
  521. package/docs/generated/workflows/website-content-editor/rich-text-editor/website-content-reference.tsx +33 -0
  522. package/docs/generated/workflows/workspace-navigation/app-shell/workspace-navigation-reference.tsx +26 -0
  523. package/docs/learn/api-compatibility.md +5 -4
  524. package/docs/learn/blocks.md +123 -0
  525. package/docs/learn/composition.md +100 -19
  526. package/docs/learn/forms.md +23 -3
  527. package/docs/learn/framework-wiring.md +41 -13
  528. package/docs/learn/i18n.md +4 -2
  529. package/docs/learn/installation.md +60 -31
  530. package/docs/learn/migration.md +156 -5
  531. package/docs/learn/provider-and-scoping.md +37 -25
  532. package/docs/learn/reference-workflows.md +43 -0
  533. package/docs/learn/structure-and-spacing.md +147 -0
  534. package/docs/learn/theming.md +174 -131
  535. package/docs/learn/troubleshooting.md +88 -30
  536. package/docs/learn/verification.md +60 -5
  537. package/package.json +42 -473
  538. package/scripts/consumer/codemod.mjs +50 -32
  539. package/scripts/consumer/contract-reader.mjs +42 -0
  540. package/scripts/consumer/css-scan.mjs +51 -0
  541. package/scripts/consumer/diagnose.mjs +136 -0
  542. package/scripts/consumer/find-component.mjs +30 -17
  543. package/scripts/consumer/install-skill.mjs +93 -11
  544. package/src/styles/TOKENS.md +116 -275
  545. package/dist/accordion-6YPJ9XRO.js +0 -135
  546. package/dist/admin/patterns/access.css +0 -15
  547. package/dist/admin/patterns/commerce.css +0 -29
  548. package/dist/admin/patterns/commerce.js +0 -2493
  549. package/dist/avatar-CS7zow2q.js +0 -85
  550. package/dist/badge-CxOuTfVr.js +0 -63
  551. package/dist/base/accordion.css +0 -3
  552. package/dist/base/action-menu.css +0 -6
  553. package/dist/base/alert-dialog.css +0 -4
  554. package/dist/base/aspect-ratio.css +0 -2
  555. package/dist/base/avatar.css +0 -4
  556. package/dist/base/badge.css +0 -2
  557. package/dist/base/batch-action-bar.css +0 -5
  558. package/dist/base/buttons.css +0 -4
  559. package/dist/base/cards.css +0 -13
  560. package/dist/base/carousel.css +0 -5
  561. package/dist/base/chart.css +0 -2
  562. package/dist/base/choice-inputs.css +0 -10
  563. package/dist/base/combobox.css +0 -3
  564. package/dist/base/command.css +0 -9
  565. package/dist/base/context-menu.css +0 -2
  566. package/dist/base/copyable.css +0 -6
  567. package/dist/base/date-pickers.css +0 -11
  568. package/dist/base/dialog.css +0 -4
  569. package/dist/base/display.css +0 -8
  570. package/dist/base/dropdown-menu.css +0 -2
  571. package/dist/base/feedback.css +0 -5
  572. package/dist/base/forms-numeric.css +0 -12
  573. package/dist/base/forms.css +0 -14
  574. package/dist/base/hover-card.css +0 -2
  575. package/dist/base/input-group.css +0 -6
  576. package/dist/base/item.css +0 -9
  577. package/dist/base/label.css +0 -3
  578. package/dist/base/menubar.css +0 -2
  579. package/dist/base/navigation-menu.css +0 -2
  580. package/dist/base/navigation.css +0 -12
  581. package/dist/base/otp-input.css +0 -9
  582. package/dist/base/overlay.css +0 -4
  583. package/dist/base/popover-menu.css +0 -11
  584. package/dist/base/popover.css +0 -3
  585. package/dist/base/qr-code.css +0 -2
  586. package/dist/base/repeaters.css +0 -18
  587. package/dist/base/resizable.css +0 -2
  588. package/dist/base/sheet.css +0 -4
  589. package/dist/base/sidebar.css +0 -12
  590. package/dist/base/skeleton.css +0 -9
  591. package/dist/base/spinner.css +0 -2
  592. package/dist/base/structure.css +0 -2
  593. package/dist/base/table.css +0 -3
  594. package/dist/base/text-inputs.css +0 -2
  595. package/dist/base/timeline.css +0 -9
  596. package/dist/base/toaster.css +0 -2
  597. package/dist/base/toggle.css +0 -2
  598. package/dist/base/toolbar.css +0 -5
  599. package/dist/base/tooltip.css +0 -2
  600. package/dist/base/typography.css +0 -2
  601. package/dist/base/upload.css +0 -10
  602. package/dist/base/value-inputs.css +0 -14
  603. package/dist/buttons-CqXKWty3.js +0 -179
  604. package/dist/cards-C6Ulbkw7.js +0 -271
  605. package/dist/chart-nomhJ87z.js +0 -193
  606. package/dist/choice-inputs-OUDn0kQw.js +0 -680
  607. package/dist/combobox-C8oP92bT.js +0 -266
  608. package/dist/command-Bp3B6pUu.js +0 -143
  609. package/dist/comments-CAnDlyXO.js +0 -1438
  610. package/dist/components/admin/patterns/index.d.ts +0 -2
  611. package/dist/components/features/rich-text-editor/exec-command-engine.d.ts +0 -2
  612. package/dist/components/patterns/index.d.ts +0 -3
  613. package/dist/css/styles.css +0 -1
  614. package/dist/date-pickers-DOwIT-Nk.js +0 -661
  615. package/dist/display-B3Q17h5z.js +0 -645
  616. package/dist/dropdown-menu-TyNLCLML.js +0 -223
  617. package/dist/features/actions.css +0 -11
  618. package/dist/features/activities.css +0 -25
  619. package/dist/features/ai-chat.css +0 -14
  620. package/dist/features/async-preview.css +0 -10
  621. package/dist/features/combobox.css +0 -12
  622. package/dist/features/comments.css +0 -24
  623. package/dist/features/data-view.css +0 -31
  624. package/dist/features/event-calendar.css +0 -17
  625. package/dist/features/filters.css +0 -24
  626. package/dist/features/global-search.css +0 -19
  627. package/dist/features/kanban.css +0 -7
  628. package/dist/features/map.css +0 -15
  629. package/dist/features/media-library.css +0 -27
  630. package/dist/features/mentions.css +0 -17
  631. package/dist/features/overlays.css +0 -11
  632. package/dist/features/products.css +0 -29
  633. package/dist/features/resource-assignment.css +0 -14
  634. package/dist/features/resource.css +0 -15
  635. package/dist/features/rich-text-editor.css +0 -8
  636. package/dist/features/schema-form.css +0 -22
  637. package/dist/features/sync.css +0 -11
  638. package/dist/features/table.css +0 -20
  639. package/dist/features/theme-tweaker.css +0 -27
  640. package/dist/feedback-DRerHGuV.js +0 -469
  641. package/dist/forms-CPrGGif_.js +0 -242
  642. package/dist/forms-numeric-CPVsL7Vf.js +0 -569
  643. package/dist/index.css +0 -3
  644. package/dist/input-group-BYe0rhoB.js +0 -126
  645. package/dist/item-B3yQ26as.js +0 -146
  646. package/dist/layout/app-shell.css +0 -13
  647. package/dist/layout/auth.css +0 -14
  648. package/dist/layout/containers.css +0 -2
  649. package/dist/layout/header.css +0 -20
  650. package/dist/layout/navigation.css +0 -11
  651. package/dist/layout/page.css +0 -15
  652. package/dist/layout/settings.css +0 -16
  653. package/dist/layout/sidebar.css +0 -16
  654. package/dist/layout/workspace.css +0 -15
  655. package/dist/navigation-CsqTA16F.js +0 -614
  656. package/dist/navigation-DzxzPuwg.js +0 -202
  657. package/dist/overlay-WQOsLd69.js +0 -345
  658. package/dist/patterns/analytics.css +0 -15
  659. package/dist/patterns/onboarding.css +0 -11
  660. package/dist/patterns/timelines.css +0 -11
  661. package/dist/popover-DriLnIFc.js +0 -123
  662. package/dist/popover-menu-C2UCMAe7.js +0 -189
  663. package/dist/primitives.css +0 -3
  664. package/dist/repeaters-DuP1N0nw.js +0 -438
  665. package/dist/rich-text-editor-BQXFe9oN.js +0 -595
  666. package/dist/sidebar-D0N6ckJL.js +0 -412
  667. package/dist/skeleton-DGR9df28.js +0 -172
  668. package/dist/spinner-CUAVFecI.js +0 -52
  669. package/dist/styles/FACTORS.md +0 -36
  670. package/dist/styles/SCOPES.md +0 -86
  671. package/dist/styles/themes/default.css +0 -164
  672. package/dist/styles/theming/animation.css +0 -143
  673. package/dist/styles/theming/colors.css +0 -97
  674. package/dist/styles/theming/feedback.css +0 -17
  675. package/dist/styles/theming/field.css +0 -21
  676. package/dist/styles/theming/focus.css +0 -88
  677. package/dist/styles/theming/layers.css +0 -13
  678. package/dist/styles/theming/layout.css +0 -21
  679. package/dist/styles/theming/motion.css +0 -42
  680. package/dist/styles/theming/overlay.css +0 -52
  681. package/dist/styles/theming/sizing.css +0 -118
  682. package/dist/styles/theming/text.css +0 -30
  683. package/dist/styles/theming/typography.css +0 -26
  684. package/dist/styles/tokens/components.css +0 -22
  685. package/dist/styles/tokens/foundation.css +0 -80
  686. package/dist/styles/tokens/layout.css +0 -19
  687. package/dist/styles/tokens/palette.css +0 -88
  688. package/dist/styles/tokens/primitives.css +0 -18
  689. package/dist/styles/tokens/states.css +0 -77
  690. package/dist/table-BC4qqsUb.js +0 -180
  691. package/dist/table-BHDpjajL.js +0 -982
  692. package/dist/text-inputs-DF_lD7pA.js +0 -385
  693. package/dist/theming-D6KRU7hO.js +0 -104
  694. package/dist/toolbar-DWRywF0R.js +0 -68
  695. package/dist/tooltip-t1VQQ2tZ.js +0 -73
  696. package/dist/upload-B38YZeFJ.js +0 -938
  697. package/dist/value-inputs-Q4ymjXlV.js +0 -716
  698. package/src/styles/FACTORS.md +0 -36
  699. package/src/styles/SCOPES.md +0 -86
  700. /package/dist/components/{admin/patterns → blocks/admin}/access/admin.strings.d.ts +0 -0
  701. /package/dist/components/{admin/patterns → blocks/admin}/access/credential-list.d.ts +0 -0
  702. /package/dist/components/{admin/patterns → blocks/admin}/access/index.d.ts +0 -0
  703. /package/dist/components/{admin/patterns → blocks/admin}/access/role-permissions.d.ts +0 -0
  704. /package/dist/components/{admin/patterns → blocks/admin}/access/sensitive-action.d.ts +0 -0
  705. /package/dist/components/{admin/patterns → blocks/admin}/commerce/account.d.ts +0 -0
  706. /package/dist/components/{admin/patterns → blocks/admin}/commerce/address-lines.d.ts +0 -0
  707. /package/dist/components/{admin/patterns → blocks/admin}/commerce/booking.d.ts +0 -0
  708. /package/dist/components/{admin/patterns → blocks/admin}/commerce/cart.d.ts +0 -0
  709. /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.strings.d.ts +0 -0
  710. /package/dist/components/{admin/patterns → blocks/admin}/commerce/commerce.types.d.ts +0 -0
  711. /package/dist/components/{admin/patterns → blocks/admin}/commerce/format-amount.d.ts +0 -0
  712. /package/dist/components/{admin/patterns → blocks/admin}/commerce/index.d.ts +0 -0
  713. /package/dist/components/{admin/patterns → blocks/admin}/commerce/inventory-section.d.ts +0 -0
  714. /package/dist/components/{admin/patterns → blocks/admin}/commerce/invoice.d.ts +0 -0
  715. /package/dist/components/{admin/patterns → blocks/admin}/commerce/loyalty.d.ts +0 -0
  716. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-customer.d.ts +0 -0
  717. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-detail.d.ts +0 -0
  718. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-line-item.d.ts +0 -0
  719. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order-transactions.d.ts +0 -0
  720. /package/dist/components/{admin/patterns → blocks/admin}/commerce/order.d.ts +0 -0
  721. /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-listing.d.ts +0 -0
  722. /package/dist/components/{admin/patterns → blocks/admin}/commerce/seo-score.d.ts +0 -0
  723. /package/dist/components/{admin/patterns → blocks/admin}/commerce/summary-panel.d.ts +0 -0
  724. /package/dist/components/{patterns → blocks}/analytics/activity-heatmap.d.ts +0 -0
  725. /package/dist/components/{patterns → blocks}/analytics/analytics.types.d.ts +0 -0
  726. /package/dist/components/{patterns → blocks}/analytics/chart-card.d.ts +0 -0
  727. /package/dist/components/{patterns → blocks}/analytics/format-metric-value.d.ts +0 -0
  728. /package/dist/components/{patterns → blocks}/analytics/index.d.ts +0 -0
  729. /package/dist/components/{patterns → blocks}/analytics/metric-bar.d.ts +0 -0
  730. /package/dist/components/{patterns → blocks}/analytics/metric-comparison.d.ts +0 -0
  731. /package/dist/components/{patterns → blocks}/analytics/metric-gradient.d.ts +0 -0
  732. /package/dist/components/{patterns → blocks}/analytics/metric-grid.d.ts +0 -0
  733. /package/dist/components/{patterns → blocks}/analytics/metric-micro-grid.d.ts +0 -0
  734. /package/dist/components/{patterns → blocks}/analytics/metric-skeleton.d.ts +0 -0
  735. /package/dist/components/{patterns → blocks}/analytics/metric-trend-chip.d.ts +0 -0
  736. /package/dist/components/{patterns → blocks}/analytics/metric.d.ts +0 -0
  737. /package/dist/components/{patterns → blocks}/analytics/time-ruler.d.ts +0 -0
  738. /package/dist/components/{patterns → blocks}/onboarding/checklist.d.ts +0 -0
  739. /package/dist/components/{patterns → blocks}/onboarding/index.d.ts +0 -0
  740. /package/dist/components/{patterns → blocks}/onboarding/onboarding.strings.d.ts +0 -0
  741. /package/dist/components/{patterns → blocks}/timelines/changelog-timeline.d.ts +0 -0
  742. /package/dist/components/{patterns → blocks}/timelines/index.d.ts +0 -0
  743. /package/dist/components/{patterns → blocks}/timelines/milestones-timeline.d.ts +0 -0
  744. /package/dist/components/{patterns → blocks}/timelines/steps.d.ts +0 -0
  745. /package/dist/components/{patterns → blocks}/timelines/timelines.strings.d.ts +0 -0
  746. /package/dist/styles/{theming/breakpoints.css → breakpoints.css} +0 -0
@@ -1,28 +1,30 @@
1
1
  "use client";
2
- import { t as e } from "../cx--CBrhWH0.js";
3
- import { i as t, o as n } from "../typography-BkxEiwQ1.js";
4
- import { _ as r, g as i, h as a, n as o, p as s, s as c, t as l } from "../feedback-DRerHGuV.js";
5
- import { c as u } from "../buttons-CqXKWty3.js";
6
- import { l as d, n as f } from "../display-B3Q17h5z.js";
7
- import { o as p } from "../structure-D0WGQAP3.js";
8
- import { C as m, S as h, f as g, w as _, z as v } from "../primitives-D0bdDozz.js";
9
- import { t as y } from "../badge-CxOuTfVr.js";
10
- import { l as ee } from "../upload-B38YZeFJ.js";
11
- import { u as b } from "../forms-CPrGGif_.js";
12
- import { t as te } from "../strings-Co9_qArR.js";
13
- import { c as x, l as ne } from "../text-inputs-DF_lD7pA.js";
14
- import { c as S, i as C, l as w, n as T, s as E, t as D } from "../table-BC4qqsUb.js";
15
- import { d as re, f as ie, p as O, u as ae } from "../navigation-CsqTA16F.js";
16
- import { n as oe, s as se, x as ce } from "../choice-inputs-OUDn0kQw.js";
17
- import { s as k } from "../value-inputs-Q4ymjXlV.js";
18
- import { t as le } from "../batch-action-bar-BZYNKXdV.js";
19
- import { r as ue } from "../overlays-DvVoS3td.js";
20
- import { t as de } from "../use-synced-state-DnZ4lW4g.js";
21
- import { CheckIcon as A, ChevronLeftIcon as fe, ChevronRightIcon as pe, FileIcon as me, FilmIcon as he, ImageIcon as ge, LayoutGridIcon as _e, ListIcon as ve, MoreHorizontalIcon as ye, PlusIcon as be, SearchIcon as xe, StarIcon as Se, Table2Icon as Ce, Trash2Icon as we, XIcon as Te } from "lucide-react";
22
- import { useCallback as j, useEffect as Ee, useMemo as M, useRef as N, useState as P } from "react";
23
- import { Fragment as De, jsx as F, jsxs as I } from "react/jsx-runtime";
2
+ import "#core.css";
3
+ import { a as e, s as t } from "../typography-DmeR05Er.js";
4
+ import { t as n } from "../cx--CBrhWH0.js";
5
+ import { c as r } from "../buttons-BX2JfL5X.js";
6
+ import { o as i } from "../structure-CynEZ-OY.js";
7
+ import { t as a } from "../strings-Co9_qArR.js";
8
+ import { C as o, S as s, f as c, w as l, z as u } from "../primitives-BskKlf35.js";
9
+ import { t as d } from "../badge-VlJVZjdm.js";
10
+ import { t as f } from "../batch-action-bar-DZVMVW83.js";
11
+ import { _ as p, g as m, h, n as g, p as _, s as v, t as y } from "../feedback-D4qVsKlD.js";
12
+ import { l as ee, n as b } from "../display-a7AoX_u7.js";
13
+ import { n as x, s as te, x as S } from "../choice-inputs-NwRxvmZN.js";
14
+ import { c as ne, l as C } from "../text-inputs-BboE77nZ.js";
15
+ import { u as w } from "../forms-C0WeNPFF.js";
16
+ import { d as re, f as T, p as E, u as D } from "../navigation-Bgu7Vc0M.js";
17
+ import { l as O } from "../upload-CYuoJykZ.js";
18
+ import { c as k, i as A, l as ie, n as ae, s as j, t as M } from "../table-Ds_eO9av.js";
19
+ import { s as oe } from "../value-inputs-ng8aVJJZ.js";
20
+ import { r as se } from "../overlays-1sULyytH.js";
21
+ import { t as ce } from "../use-synced-state-DnZ4lW4g.js";
22
+ import { CheckIcon as N, ChevronLeftIcon as le, ChevronRightIcon as ue, FileIcon as de, FilmIcon as fe, ImageIcon as pe, LayoutGridIcon as me, ListIcon as he, MoreHorizontalIcon as ge, PlusIcon as _e, SearchIcon as ve, StarIcon as ye, Table2Icon as be, Trash2Icon as xe, XIcon as Se } from "lucide-react";
23
+ import { useCallback as P, useEffect as F, useMemo as I, useRef as L, useState as R } from "react";
24
+ import { Fragment as Ce, jsx as z, jsxs as B } from "react/jsx-runtime";
25
+ import "#css/media-library.css";
24
26
  //#region src/components/features/media-library/media-library.strings.ts
25
- var L = {
27
+ var V = {
26
28
  title: "Media library",
27
29
  description: "Browse, upload, and pick assets.",
28
30
  tabs: {
@@ -140,14 +142,14 @@ var L = {
140
142
  emptyDescription: "Add an asset to show it here.",
141
143
  limitReached: (e) => `${e} is the maximum.`
142
144
  }
143
- }, Oe = {
145
+ }, we = {
144
146
  collection: void 0,
145
147
  tags: [],
146
148
  public: !0
147
- }, ke = [];
148
- function Ae(e, t, n) {
149
- let [r, i] = P(t), a = e ?? r;
150
- return [a, j((t) => {
149
+ }, Te = [];
150
+ function Ee(e, t, n) {
151
+ let [r, i] = R(t), a = e ?? r;
152
+ return [a, P((t) => {
151
153
  let r = typeof t == "function" ? t(a) : t;
152
154
  e === void 0 && i(r), n?.(r);
153
155
  }, [
@@ -156,7 +158,7 @@ function Ae(e, t, n) {
156
158
  a
157
159
  ])];
158
160
  }
159
- var je = {
161
+ var De = {
160
162
  getId: (e) => e.id,
161
163
  getName: (e) => e.name,
162
164
  getType: (e) => e.type,
@@ -174,47 +176,47 @@ var je = {
174
176
  getTint: (e) => e.tint,
175
177
  getMimeType: (e) => e.mimeType
176
178
  };
177
- function Me(e) {
179
+ function Oe(e) {
178
180
  return {
179
- ...je,
181
+ ...De,
180
182
  ...e ?? {}
181
183
  };
182
184
  }
183
- function R(e) {
184
- return e === void 0 ? "" : m(e);
185
+ function H(e) {
186
+ return e === void 0 ? "" : o(e);
185
187
  }
186
- function z(e, t) {
188
+ function ke(e, t) {
187
189
  let n = t.getWidth(e), r = t.getHeight(e);
188
190
  return !n || !r ? "" : `${n} × ${r}`;
189
191
  }
190
- function Ne(e, t) {
192
+ function Ae(e, t) {
191
193
  let n = t.getUploadedAt(e);
192
194
  if (!n) return 0;
193
195
  let r = (n instanceof Date ? n : new Date(n)).getTime();
194
196
  return Number.isFinite(r) ? r : 0;
195
197
  }
196
- function Pe(e) {
198
+ function je(e) {
197
199
  return e.type.startsWith("image/") ? "image" : e.type.startsWith("video/") ? "video" : "file";
198
200
  }
199
- function Fe(e) {
201
+ function Me(e) {
200
202
  if (e.type.startsWith("image/") && !(typeof URL > "u" || typeof URL.createObjectURL != "function")) return URL.createObjectURL(e);
201
203
  }
202
- function Ie(e) {
204
+ function Ne(e) {
203
205
  !e || typeof URL > "u" || typeof URL.revokeObjectURL != "function" || URL.revokeObjectURL(e);
204
206
  }
205
- function Le(e) {
207
+ function Pe(e) {
206
208
  return Array.isArray(e) ? {
207
209
  items: e,
208
210
  total: e.length
209
211
  } : e;
210
212
  }
211
- function Re(e, t) {
213
+ function Fe(e, t) {
212
214
  return t && typeof e == "object" && e ? {
213
215
  ...e,
214
216
  ...t
215
217
  } : e;
216
218
  }
217
- function ze(e, t, n, r, i) {
219
+ function Ie(e, t, n, r, i) {
218
220
  let a = n.trim().toLowerCase();
219
221
  return e.filter((e) => r !== "all" && t.getType(e) !== r || i !== "all" && t.getCollection(e) !== i ? !1 : !a || [
220
222
  t.getName(e),
@@ -223,211 +225,211 @@ function ze(e, t, n, r, i) {
223
225
  ...t.getTags(e)
224
226
  ].filter(Boolean).join(" ").toLowerCase().includes(a));
225
227
  }
226
- function Be(e, t, n) {
228
+ function Le(e, t, n) {
227
229
  let r = [...e];
228
230
  switch (n) {
229
231
  case "name": return r.sort((e, n) => t.getName(e).localeCompare(t.getName(n)));
230
232
  case "size": return r.sort((e, n) => (t.getSize(n) ?? 0) - (t.getSize(e) ?? 0));
231
233
  case "usage": return r.sort((e, n) => (t.getUsageCount(n) ?? 0) - (t.getUsageCount(e) ?? 0));
232
- default: return r.sort((e, n) => Ne(n, t) - Ne(e, t));
234
+ default: return r.sort((e, n) => Ae(n, t) - Ae(e, t));
233
235
  }
234
236
  }
235
- function Ve({ items: e = ke, fetcher: t, accessors: n, selectionMode: r = "multiple", value: i, defaultValue: a, onValueChange: o, onItemUpdate: s, applyItemPatch: c = Re, onItemDelete: l, onUpload: u, onError: d, tab: f, defaultTab: p = "library", onTabChange: m, view: h, defaultView: g = "grid", onViewChange: _, query: v, defaultQuery: y = "", onQueryChange: ee, type: b, defaultType: te = "all", onTypeChange: x, collection: ne, defaultCollection: S = "all", onCollectionChange: C, sort: w, defaultSort: T = "newest", onSortChange: E, uploadOptions: D, defaultUploadOptions: re, onUploadOptionsChange: ie }) {
236
- let O = M(() => Me(n), [n]), [ae, oe] = Ae(f, p, m), [se, ce] = Ae(h, g, _), [k, le] = Ae(v, y, ee), [ue, de] = Ae(b, te, x), [A, fe] = Ae(ne, S, C), [pe, me] = Ae(w, T, E), [he, ge] = P(null), [_e, ve] = P(() => [...a ?? []]), [ye, be] = P([]), [xe, Se] = P(), [Ce, we] = P(!1), [Te, De] = P(null), F = j((e, t = "mutation") => {
237
- De(e == null ? null : {
237
+ function Re({ items: e = Te, fetcher: t, accessors: n, selectionMode: r = "multiple", value: i, defaultValue: a, onValueChange: o, onItemUpdate: s, applyItemPatch: c = Fe, onItemDelete: l, onUpload: u, onError: d, tab: f, defaultTab: p = "library", onTabChange: m, view: h, defaultView: g = "grid", onViewChange: _, query: v, defaultQuery: y = "", onQueryChange: ee, type: b, defaultType: x = "all", onTypeChange: te, collection: S, defaultCollection: ne = "all", onCollectionChange: C, sort: w, defaultSort: re = "newest", onSortChange: T, uploadOptions: E, defaultUploadOptions: D, onUploadOptionsChange: O }) {
238
+ let k = I(() => Oe(n), [n]), [A, ie] = Ee(f, p, m), [ae, j] = Ee(h, g, _), [M, oe] = Ee(v, y, ee), [se, ce] = Ee(b, x, te), [N, le] = Ee(S, ne, C), [ue, de] = Ee(w, re, T), [fe, pe] = R(null), [me, he] = R(() => [...a ?? []]), [ge, _e] = R([]), [ve, ye] = R(), [be, xe] = R(!1), [Se, Ce] = R(null), z = P((e, t = "mutation") => {
239
+ Ce(e == null ? null : {
238
240
  error: e,
239
241
  source: t
240
242
  });
241
- }, []), I = Te?.source === "fetch" && !t ? null : Te?.error ?? null, L = Te?.source === "fetch" && t ? Te.error : null, [je, R] = P(0), z = j(() => R((e) => e + 1), []), Ne = N(O);
242
- Ee(() => {
243
- Ne.current = O;
244
- }, [O]);
245
- let Ve = N(d);
246
- Ee(() => {
247
- Ve.current = d;
243
+ }, []), B = Se?.source === "fetch" && !t ? null : Se?.error ?? null, V = Se?.source === "fetch" && t ? Se.error : null, [De, H] = R(0), ke = P(() => H((e) => e + 1), []), Ae = L(k);
244
+ F(() => {
245
+ Ae.current = k;
246
+ }, [k]);
247
+ let Re = L(d);
248
+ F(() => {
249
+ Re.current = d;
248
250
  }, [d]);
249
- let [B, He] = P([]), [V, Ue] = P(() => /* @__PURE__ */ new Set()), [We, Ge] = P({}), [H, U] = P([]), [Ke, qe] = P(!1), Je = M(() => ({
250
- ...Oe,
251
- ...re,
252
- tags: re?.tags ?? Oe.tags
253
- }), [re]), [W, G] = Ae(M(() => D ? {
254
- ...Oe,
251
+ let [U, ze] = R([]), [Be, Ve] = R(() => /* @__PURE__ */ new Set()), [He, Ue] = R({}), [We, W] = R([]), [Ge, Ke] = R(!1), qe = I(() => ({
252
+ ...we,
255
253
  ...D,
256
- tags: D.tags ?? Oe.tags
257
- } : void 0, [D]), Je, ie), Ye = i !== void 0, K = M(() => {
258
- let e = [...new Set(Ye ? i ?? [] : _e)];
254
+ tags: D?.tags ?? we.tags
255
+ }), [D]), [G, K] = Ee(I(() => E ? {
256
+ ...we,
257
+ ...E,
258
+ tags: E.tags ?? we.tags
259
+ } : void 0, [E]), qe, O), Je = i !== void 0, q = I(() => {
260
+ let e = [...new Set(Je ? i ?? [] : me)];
259
261
  return r === "single" ? e.slice(0, 1) : e;
260
262
  }, [
261
- _e,
262
- Ye,
263
+ me,
264
+ Je,
263
265
  r,
264
266
  i
265
- ]), Xe = M(() => new Set(K), [K]), Ze = N(/* @__PURE__ */ new Set()), q = N(null), Qe = N(/* @__PURE__ */ new Map()), J = N(/* @__PURE__ */ new Map()), [$e, et] = P(/* @__PURE__ */ new Map()), Y = N(K);
266
- Ee(() => {
267
- Y.current = K;
268
- }, [K]);
269
- let tt = N(0);
270
- Ee(() => {
267
+ ]), Ye = I(() => new Set(q), [q]), Xe = L(/* @__PURE__ */ new Set()), J = L(null), Ze = L(/* @__PURE__ */ new Map()), Y = L(/* @__PURE__ */ new Map()), [Qe, $e] = R(/* @__PURE__ */ new Map()), X = L(q);
268
+ F(() => {
269
+ X.current = q;
270
+ }, [q]);
271
+ let et = L(0);
272
+ F(() => {
271
273
  if (!t) return;
272
274
  let e = new AbortController();
273
- return we(!0), F(null), (async () => t({
274
- query: k,
275
- type: ue,
276
- collection: A === "all" ? void 0 : A,
277
- sort: pe,
275
+ return xe(!0), z(null), (async () => t({
276
+ query: M,
277
+ type: se,
278
+ collection: N === "all" ? void 0 : N,
279
+ sort: ue,
278
280
  signal: e.signal
279
281
  }))().then((t) => {
280
282
  if (e.signal.aborted) return;
281
- let n = Le(t);
282
- et((e) => {
283
- let t = new Set(Y.current);
284
- return new Map([...e, ...n.items.map((e) => [Ne.current.getId(e), e])].filter(([e]) => t.has(e)));
285
- }), be(n.items), Se(n.total);
283
+ let n = Pe(t);
284
+ $e((e) => {
285
+ let t = new Set(X.current);
286
+ return new Map([...e, ...n.items.map((e) => [Ae.current.getId(e), e])].filter(([e]) => t.has(e)));
287
+ }), _e(n.items), ye(n.total);
286
288
  }).catch((t) => {
287
- e.signal.aborted || (F(t, "fetch"), Ve.current?.(t));
289
+ e.signal.aborted || (z(t, "fetch"), Re.current?.(t));
288
290
  }).finally(() => {
289
- e.signal.aborted || we(!1);
291
+ e.signal.aborted || xe(!1);
290
292
  }), () => e.abort();
291
293
  }, [
292
- A,
294
+ N,
293
295
  t,
294
- je,
295
- k,
296
- F,
297
- pe,
298
- ue
299
- ]), Ee(() => {
300
- let e = Ze.current;
296
+ De,
297
+ M,
298
+ z,
299
+ ue,
300
+ se
301
+ ]), F(() => {
302
+ let e = Xe.current;
301
303
  return () => {
302
- q.current?.abort();
303
- for (let t of e) Ie(t);
304
+ J.current?.abort();
305
+ for (let t of e) Ne(t);
304
306
  e.clear();
305
307
  };
306
308
  }, []);
307
- let nt = M(() => t ? ye : [...B, ...e], [
308
- B,
309
- ye,
309
+ let tt = I(() => t ? ge : [...U, ...e], [
310
+ U,
311
+ ge,
310
312
  t,
311
313
  e
312
- ]), X = M(() => [...new Map(nt.map((e) => [O.getId(e), e])).values()].filter((e) => !V.has(O.getId(e))).map((e) => We[O.getId(e)] ? c(e, We[O.getId(e)]) : e), [
313
- O,
314
+ ]), Z = I(() => [...new Map(tt.map((e) => [k.getId(e), e])).values()].filter((e) => !Be.has(k.getId(e))).map((e) => He[k.getId(e)] ? c(e, He[k.getId(e)]) : e), [
315
+ k,
314
316
  c,
315
- We,
316
- V,
317
- nt
318
- ]), Z = M(() => t ? X : Be(ze(X, O, k, ue, A), O, pe), [
319
- O,
320
- A,
321
- t,
322
- X,
317
+ He,
318
+ Be,
319
+ tt
320
+ ]), nt = I(() => t ? Z : Le(Ie(Z, k, M, se, N), k, ue), [
323
321
  k,
324
- pe,
325
- ue
326
- ]), Q = M(() => new Map(X.map((e) => [O.getId(e), e])), [O, X]), rt = K.flatMap((e) => {
327
- let t = Q.get(e) ?? $e.get(e);
322
+ N,
323
+ t,
324
+ Z,
325
+ M,
326
+ ue,
327
+ se
328
+ ]), Q = I(() => new Map(Z.map((e) => [k.getId(e), e])), [k, Z]), rt = q.flatMap((e) => {
329
+ let t = Q.get(e) ?? Qe.get(e);
328
330
  return t === void 0 ? [] : [t];
329
331
  });
330
- Ee(() => {
331
- for (let e of J.current.keys()) Xe.has(e) || J.current.delete(e);
332
- for (let e of K) {
332
+ F(() => {
333
+ for (let e of Y.current.keys()) Ye.has(e) || Y.current.delete(e);
334
+ for (let e of q) {
333
335
  let t = Q.get(e);
334
- t !== void 0 && J.current.set(e, t);
336
+ t !== void 0 && Y.current.set(e, t);
335
337
  }
336
338
  }, [
337
339
  Q,
338
- K,
339
- Xe
340
+ q,
341
+ Ye
340
342
  ]);
341
- let $ = j((e) => {
343
+ let $ = P((e) => {
342
344
  let t = [...new Set(e)], n = r === "single" ? t.slice(0, 1) : t;
343
- Y.current = n, Ye || ve(n);
345
+ X.current = n, Je || he(n);
344
346
  let i = n.flatMap((e) => {
345
- let t = Q.get(e) ?? J.current.get(e);
346
- return t === void 0 ? [] : (J.current.set(e, t), [t]);
347
+ let t = Q.get(e) ?? Y.current.get(e);
348
+ return t === void 0 ? [] : (Y.current.set(e, t), [t]);
347
349
  });
348
- et(new Map(i.map((e) => [O.getId(e), e]))), o?.(n, i);
350
+ $e(new Map(i.map((e) => [k.getId(e), e]))), o?.(n, i);
349
351
  }, [
350
- O,
351
- Ye,
352
+ k,
353
+ Je,
352
354
  o,
353
355
  Q,
354
356
  r
355
- ]), it = j((e) => {
356
- if (!Q.has(e) && !J.current.has(e)) return;
357
+ ]), it = P((e) => {
358
+ if (!Q.has(e) && !Y.current.has(e)) return;
357
359
  if (r === "single") {
358
360
  $([e]);
359
361
  return;
360
362
  }
361
- let t = new Set(Y.current);
363
+ let t = new Set(X.current);
362
364
  t.has(e) ? t.delete(e) : t.add(e), $([...t]);
363
365
  }, [
364
366
  $,
365
367
  Q,
366
368
  r
367
- ]), at = j(() => $([]), [$]), ot = j(() => $([...Y.current, ...Z.map(O.getId)]), [
368
- O,
369
+ ]), at = P(() => $([]), [$]), ot = P(() => $([...X.current, ...nt.map(k.getId)]), [
370
+ k,
369
371
  $,
370
- Z
371
- ]), st = j(() => {
372
- let e = new Set(Z.map(O.getId));
373
- $(Y.current.filter((t) => !e.has(t)));
372
+ nt
373
+ ]), st = P(() => {
374
+ let e = new Set(nt.map(k.getId));
375
+ $(X.current.filter((t) => !e.has(t)));
374
376
  }, [
375
- O,
377
+ k,
376
378
  $,
377
- Z
378
- ]), ct = j(() => {
379
- le(""), de("all"), fe("all");
379
+ nt
380
+ ]), ct = P(() => {
381
+ oe(""), ce("all"), le("all");
380
382
  }, [
381
- fe,
382
383
  le,
383
- de
384
- ]), lt = j((e) => {
385
- if (q.current) return;
384
+ oe,
385
+ ce
386
+ ]), lt = P((e) => {
387
+ if (J.current) return;
386
388
  let t = e.map((e) => {
387
- let t = Fe(e);
388
- return t && Ze.current.add(t), {
389
- id: `staged-${++tt.current}`,
389
+ let t = Me(e);
390
+ return t && Xe.current.add(t), {
391
+ id: `staged-${++et.current}`,
390
392
  file: e,
391
393
  name: e.name,
392
394
  size: e.size,
393
- type: Pe(e),
395
+ type: je(e),
394
396
  src: t,
395
397
  progress: 0,
396
398
  status: "staged"
397
399
  };
398
400
  });
399
- U((e) => [...e, ...t]);
400
- }, []), ut = j((e) => {
401
- q.current || U((t) => {
401
+ W((e) => [...e, ...t]);
402
+ }, []), ut = P((e) => {
403
+ J.current || W((t) => {
402
404
  let n = t.find((t) => t.id === e);
403
- return n?.src && (Ie(n.src), Ze.current.delete(n.src)), t.filter((t) => t.id !== e);
405
+ return n?.src && (Ne(n.src), Xe.current.delete(n.src)), t.filter((t) => t.id !== e);
404
406
  });
405
- }, []), dt = j(() => {
406
- q.current || U((e) => {
407
- for (let t of e) t.src && (Ie(t.src), Ze.current.delete(t.src));
407
+ }, []), dt = P(() => {
408
+ J.current || W((e) => {
409
+ for (let t of e) t.src && (Ne(t.src), Xe.current.delete(t.src));
408
410
  return [];
409
411
  });
410
- }, []), ft = j((e) => {
411
- G((t) => ({
412
+ }, []), ft = P((e) => {
413
+ K((t) => ({
412
414
  ...t,
413
415
  ...e
414
416
  }));
415
- }, [G]), pt = j((e, t) => {
416
- U((n) => n.map((n) => n.id === e ? {
417
+ }, [K]), pt = P((e, t) => {
418
+ W((n) => n.map((n) => n.id === e ? {
417
419
  ...n,
418
420
  ...t
419
421
  } : n));
420
- }, []), mt = j(async () => {
421
- if (!u || q.current || H.length === 0) return;
422
+ }, []), mt = P(async () => {
423
+ if (!u || J.current || We.length === 0) return;
422
424
  let e = new AbortController();
423
- q.current = e, F(null), qe(!0), U((e) => e.map((e) => ({
425
+ J.current = e, z(null), Ke(!0), W((e) => e.map((e) => ({
424
426
  ...e,
425
427
  status: "uploading",
426
428
  progress: 0,
427
429
  error: void 0
428
430
  })));
429
- let n = /* @__PURE__ */ new Set(), i = new Set(H.map((e) => e.id)), a = () => !e.signal.aborted && q.current === e, o = {
430
- files: H,
431
+ let n = /* @__PURE__ */ new Set(), i = new Set(We.map((e) => e.id)), a = () => !e.signal.aborted && J.current === e, o = {
432
+ files: We,
431
433
  signal: e.signal,
432
434
  setProgress: (e, t) => {
433
435
  !a() || !i.has(e) || pt(e, { progress: Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0 });
@@ -440,50 +442,50 @@ function Ve({ items: e = ke, fetcher: t, accessors: n, selectionMode: r = "multi
440
442
  }
441
443
  };
442
444
  try {
443
- let a = await u(H.map((e) => e.file), W, o);
445
+ let a = await u(We.map((e) => e.file), G, o);
444
446
  if (e.signal.aborted) return;
445
447
  if (a?.length) {
446
- He((e) => [...a, ...e]);
447
- for (let e of a) J.current.set(O.getId(e), e);
448
- let e = a.map((e) => O.getId(e));
449
- $(r === "single" ? e.slice(0, 1) : [.../* @__PURE__ */ new Set([...e, ...Y.current])]);
448
+ ze((e) => [...a, ...e]);
449
+ for (let e of a) Y.current.set(k.getId(e), e);
450
+ let e = a.map((e) => k.getId(e));
451
+ $(r === "single" ? e.slice(0, 1) : [.../* @__PURE__ */ new Set([...e, ...X.current])]);
450
452
  }
451
- for (let e of H) !n.has(e.id) && e.src && (Ie(e.src), Ze.current.delete(e.src));
452
- U((e) => e.filter((e) => !i.has(e.id) || n.has(e.id))), t && z(), n.size === 0 && oe("library");
453
+ for (let e of We) !n.has(e.id) && e.src && (Ne(e.src), Xe.current.delete(e.src));
454
+ W((e) => e.filter((e) => !i.has(e.id) || n.has(e.id))), t && ke(), n.size === 0 && ie("library");
453
455
  } catch (t) {
454
456
  if (e.signal.aborted) return;
455
- F(t), U((e) => e.map((e) => e.status === "uploading" ? {
457
+ z(t), W((e) => e.map((e) => e.status === "uploading" ? {
456
458
  ...e,
457
459
  status: "error"
458
460
  } : e)), d?.(t);
459
461
  } finally {
460
- q.current === e && (q.current = null, qe(!1));
462
+ J.current === e && (J.current = null, Ke(!1));
461
463
  }
462
464
  }, [
463
- O,
465
+ k,
464
466
  $,
465
467
  d,
466
468
  u,
467
469
  pt,
468
470
  t,
469
- z,
471
+ ke,
470
472
  r,
471
- F,
472
- oe,
473
- H,
474
- W
475
- ]), ht = j(() => {
476
- q.current?.abort(), q.current = null, qe(!1), U((e) => e.map((e) => e.status === "uploading" ? {
473
+ z,
474
+ ie,
475
+ We,
476
+ G
477
+ ]), ht = P(() => {
478
+ J.current?.abort(), J.current = null, Ke(!1), W((e) => e.map((e) => e.status === "uploading" ? {
477
479
  ...e,
478
480
  status: "staged",
479
481
  progress: 0,
480
482
  error: void 0
481
483
  } : e));
482
- }, []), gt = j(async (e, t) => {
483
- let n = O.getId(e), r = `update:${n}`, i = (Qe.current.get(r) ?? 0) + 1;
484
- Qe.current.set(r, i);
485
- let a = We[n];
486
- F(null), Ge((e) => ({
484
+ }, []), gt = P(async (e, t) => {
485
+ let n = k.getId(e), r = `update:${n}`, i = (Ze.current.get(r) ?? 0) + 1;
486
+ Ze.current.set(r, i);
487
+ let a = He[n];
488
+ z(null), Ue((e) => ({
487
489
  ...e,
488
490
  [n]: {
489
491
  ...e[n],
@@ -493,79 +495,79 @@ function Ve({ items: e = ke, fetcher: t, accessors: n, selectionMode: r = "multi
493
495
  try {
494
496
  return await s?.(e, t), !0;
495
497
  } catch (e) {
496
- return Qe.current.get(r) === i && Ge((e) => {
498
+ return Ze.current.get(r) === i && Ue((e) => {
497
499
  let t = { ...e };
498
500
  return a ? t[n] = a : delete t[n], t;
499
- }), F(e), d?.(e), !1;
501
+ }), z(e), d?.(e), !1;
500
502
  }
501
503
  }, [
502
- O,
503
- We,
504
+ k,
505
+ He,
504
506
  d,
505
507
  s,
506
- F
507
- ]), _t = j(async (e) => {
508
- let t = O.getId(e);
509
- F(null);
508
+ z
509
+ ]), _t = P(async (e) => {
510
+ let t = k.getId(e);
511
+ z(null);
510
512
  try {
511
- return await l?.(e), Ue((e) => new Set(e).add(t)), Y.current.includes(t) && $(Y.current.filter((e) => e !== t)), !0;
513
+ return await l?.(e), Ve((e) => new Set(e).add(t)), X.current.includes(t) && $(X.current.filter((e) => e !== t)), !0;
512
514
  } catch (e) {
513
- return F(e), d?.(e), !1;
515
+ return z(e), d?.(e), !1;
514
516
  }
515
517
  }, [
516
- O,
518
+ k,
517
519
  $,
518
520
  d,
519
521
  l,
520
- F
522
+ z
521
523
  ]);
522
524
  return {
523
- tab: ae,
524
- setTab: oe,
525
- view: se,
526
- setView: ce,
527
- query: k,
528
- setQuery: le,
529
- type: ue,
530
- setType: de,
531
- collection: A,
532
- setCollection: fe,
533
- sort: pe,
534
- setSort: me,
535
- detailId: he,
536
- setDetailId: ge,
537
- items: X,
538
- visibleItems: Z,
539
- selectedIds: K,
525
+ tab: A,
526
+ setTab: ie,
527
+ view: ae,
528
+ setView: j,
529
+ query: M,
530
+ setQuery: oe,
531
+ type: se,
532
+ setType: ce,
533
+ collection: N,
534
+ setCollection: le,
535
+ sort: ue,
536
+ setSort: de,
537
+ detailId: fe,
538
+ setDetailId: pe,
539
+ items: Z,
540
+ visibleItems: nt,
541
+ selectedIds: q,
540
542
  selectedItems: rt,
541
- selectedSet: Xe,
543
+ selectedSet: Ye,
542
544
  toggleSelection: it,
543
545
  clearSelection: at,
544
546
  selectVisible: ot,
545
547
  deselectVisible: st,
546
548
  clearFilters: ct,
547
- loading: !!t && Ce,
548
- error: I,
549
- fetchError: L,
550
- refetch: z,
551
- hasFilters: !!k.trim() || ue !== "all" || A !== "all",
552
- totalCount: t ? xe ?? X.length : X.length,
553
- filteredCount: Z.length,
554
- stagedFiles: H,
549
+ loading: !!t && be,
550
+ error: B,
551
+ fetchError: V,
552
+ refetch: ke,
553
+ hasFilters: !!M.trim() || se !== "all" || N !== "all",
554
+ totalCount: t ? ve ?? Z.length : Z.length,
555
+ filteredCount: nt.length,
556
+ stagedFiles: We,
555
557
  addFiles: lt,
556
558
  removeStagedFile: ut,
557
559
  clearStagedFiles: dt,
558
- uploadOptions: W,
560
+ uploadOptions: G,
559
561
  updateUploadOptions: ft,
560
- uploading: Ke,
562
+ uploading: Ge,
561
563
  startUpload: mt,
562
564
  cancelUpload: ht,
563
565
  updateItem: gt,
564
566
  removeItem: _t,
565
- accessors: O
567
+ accessors: k
566
568
  };
567
569
  }
568
- var B = {
570
+ var U = {
569
571
  root: "media-library__root___dutrH",
570
572
  header: "media-library__header___xOECc",
571
573
  libraryTabs: "media-library__libraryTabs___7wt0y",
@@ -629,125 +631,125 @@ var B = {
629
631
  table: "media-library__table___6E5Zv",
630
632
  tableName: "media-library__tableName___Zk76p",
631
633
  selectionBar: "media-library__selectionBar___uoA0t"
632
- }, He = {
633
- image: /* @__PURE__ */ F(ge, {}),
634
- video: /* @__PURE__ */ F(he, {}),
635
- file: /* @__PURE__ */ F(me, {})
634
+ }, ze = {
635
+ image: /* @__PURE__ */ z(pe, {}),
636
+ video: /* @__PURE__ */ z(fe, {}),
637
+ file: /* @__PURE__ */ z(de, {})
636
638
  };
637
639
  //#endregion
638
640
  //#region src/components/features/media-library/media-preview.tsx
639
- function V({ item: t, accessors: n, className: r }) {
640
- let i = n.getSrc(t), a = n.getType(t), o = n.getTint(t), [s, c] = P(!1), [l, u] = de(i);
641
- return i !== l && (u(i), c(!1)), i && a === "image" && !s ? /* @__PURE__ */ F("img", {
641
+ function Be({ item: e, accessors: t, className: r }) {
642
+ let i = t.getSrc(e), a = t.getType(e), o = t.getTint(e), [s, c] = R(!1), [l, u] = ce(i);
643
+ return i !== l && (u(i), c(!1)), i && a === "image" && !s ? /* @__PURE__ */ z("img", {
642
644
  src: i,
643
- alt: n.getAlt(t) ?? "",
645
+ alt: t.getAlt(e) ?? "",
644
646
  loading: "lazy",
645
- className: e("media-preview--component", B.preview, r),
647
+ className: n("media-preview--component", U.preview, r),
646
648
  onError: () => c(!0)
647
- }) : /* @__PURE__ */ F("span", {
649
+ }) : /* @__PURE__ */ z("span", {
648
650
  "data-tinted": o ? "" : void 0,
649
- className: e("media-preview--component", B.preview, B.previewFallback, r),
650
- style: o ? { "--media-tint": o } : void 0,
651
- children: He[a]
651
+ className: n("media-preview--component", U.preview, U.previewFallback, r),
652
+ style: o ? { "--_media-tint": o } : void 0,
653
+ children: ze[a]
652
654
  });
653
655
  }
654
656
  //#endregion
655
657
  //#region src/components/features/media-library/media-library-detail.tsx
656
- function Ue({ item: t, collections: i = [], accessors: o, strings: s, onClose: c, onUpdate: l, onRemove: d, renderDetail: p }) {
657
- let m = te(L, s), g = () => ({
658
- alt: t ? o.getAlt(t) ?? "" : "",
659
- collection: t ? o.getCollection(t) ?? "" : "",
660
- tags: t ? o.getTags(t) : [],
661
- public: t ? o.getPublic(t) ?? !1 : !1
662
- }), _ = t ? o.getId(t) : null, [v, y] = P(g), [ee, ne] = P(_), [S, C] = P(null), [w, T] = P(null), E = N(!0), D = N(null), re = N(null);
663
- if (Ee(() => {
658
+ function Ve({ item: e, collections: i = [], accessors: o, strings: c, onClose: l, onUpdate: u, onRemove: d, renderDetail: f }) {
659
+ let m = a(V, c), g = () => ({
660
+ alt: e ? o.getAlt(e) ?? "" : "",
661
+ collection: e ? o.getCollection(e) ?? "" : "",
662
+ tags: e ? o.getTags(e) : [],
663
+ public: e ? o.getPublic(e) ?? !1 : !1
664
+ }), _ = e ? o.getId(e) : null, [v, y] = R(g), [ee, S] = R(_), [C, re] = R(null), [T, E] = R(null), D = L(!0), O = L(null), k = L(null);
665
+ if (F(() => {
664
666
  let e = document.activeElement;
665
- return re.current?.focus({ preventScroll: !0 }), re.current?.scrollIntoView?.({
667
+ return k.current?.focus({ preventScroll: !0 }), k.current?.scrollIntoView?.({
666
668
  block: "start",
667
669
  behavior: "instant"
668
670
  }), () => {
669
671
  e instanceof HTMLElement && e.isConnected && e.focus();
670
672
  };
671
- }, [_]), Ee(() => (E.current = !0, () => {
672
- E.current = !1, D.current = null;
673
- }), [_]), _ !== ee && (ne(_), y(g()), C(null), T(null)), !t) return null;
674
- let ie = g(), O = JSON.stringify(ie) !== JSON.stringify(v), ae = (e) => {
673
+ }, [_]), F(() => (D.current = !0, () => {
674
+ D.current = !1, O.current = null;
675
+ }), [_]), _ !== ee && (S(_), y(g()), re(null), E(null)), !e) return null;
676
+ let A = g(), ie = JSON.stringify(A) !== JSON.stringify(v), ae = (e) => {
675
677
  y((t) => ({
676
678
  ...t,
677
679
  ...e
678
- })), T(null);
679
- }, ce = async (e) => {
680
- if (D.current) return;
680
+ })), E(null);
681
+ }, j = async (e) => {
682
+ if (O.current) return;
681
683
  let t = Symbol(e);
682
- D.current = t, C(e), T(null);
684
+ O.current = t, re(e), E(null);
683
685
  try {
684
- let n = e === "save" ? await l({
686
+ let n = e === "save" ? await u({
685
687
  ...v,
686
688
  collection: v.collection || void 0
687
689
  }) : await d();
688
- if (!E.current || D.current !== t) return;
689
- n ? e === "delete" ? c() : T("saved") : T(e === "save" ? "saveFailed" : "deleteFailed");
690
+ if (!D.current || O.current !== t) return;
691
+ n ? e === "delete" ? l() : E("saved") : E(e === "save" ? "saveFailed" : "deleteFailed");
690
692
  } catch {
691
- E.current && D.current === t && T(e === "save" ? "saveFailed" : "deleteFailed");
693
+ D.current && O.current === t && E(e === "save" ? "saveFailed" : "deleteFailed");
692
694
  } finally {
693
- E.current && D.current === t && (D.current = null, C(null));
695
+ D.current && O.current === t && (O.current = null, re(null));
694
696
  }
695
- }, le = o.getName(t);
696
- return /* @__PURE__ */ F("aside", {
697
- ref: re,
697
+ }, M = o.getName(e);
698
+ return /* @__PURE__ */ z("aside", {
699
+ ref: k,
698
700
  tabIndex: -1,
699
701
  onKeyDown: (e) => {
700
- e.key === "Escape" && !e.defaultPrevented && (e.stopPropagation(), c());
702
+ e.key === "Escape" && !e.defaultPrevented && (e.stopPropagation(), l());
701
703
  },
702
- "aria-label": le,
704
+ "aria-label": M,
703
705
  "data-slot": "media-library-detail",
704
- className: e("media-library-detail-panel--component", "media-library-detail--component", B.detail),
705
- children: p ? p(t, {
706
+ className: n("media-library-detail-panel--component", "media-library-detail--component", U.detail),
707
+ children: f ? f(e, {
706
708
  accessors: o,
707
- update: l,
709
+ update: u,
708
710
  remove: d,
709
- close: c
710
- }) : /* @__PURE__ */ I(De, { children: [
711
- /* @__PURE__ */ I("div", {
712
- className: B.detailHeader,
713
- children: [/* @__PURE__ */ F(n, {
711
+ close: l
712
+ }) : /* @__PURE__ */ B(Ce, { children: [
713
+ /* @__PURE__ */ B("div", {
714
+ className: U.detailHeader,
715
+ children: [/* @__PURE__ */ z(t, {
714
716
  weight: "semibold",
715
717
  truncate: !0,
716
- title: le,
717
- children: le
718
- }), /* @__PURE__ */ F(u, {
718
+ title: M,
719
+ children: M
720
+ }), /* @__PURE__ */ z(r, {
719
721
  tone: "neutral",
720
- buttonStyle: "ghost",
722
+ appearance: "ghost",
721
723
  iconOnly: !0,
722
724
  "aria-label": m.close,
723
- onClick: c,
724
- children: /* @__PURE__ */ F(Te, {})
725
+ onClick: l,
726
+ children: /* @__PURE__ */ z(Se, {})
725
727
  })]
726
728
  }),
727
- /* @__PURE__ */ I("div", {
728
- className: B.detailBody,
729
+ /* @__PURE__ */ B("div", {
730
+ className: U.detailBody,
729
731
  children: [
730
- /* @__PURE__ */ F(V, {
731
- item: t,
732
+ /* @__PURE__ */ z(Be, {
733
+ item: e,
732
734
  accessors: o,
733
- className: B.detailPreview
735
+ className: U.detailPreview
734
736
  }),
735
- /* @__PURE__ */ F(f, {
737
+ /* @__PURE__ */ z(b, {
736
738
  layout: "rows",
737
739
  columns: 1,
738
740
  items: [
739
741
  {
740
742
  id: "type",
741
743
  label: m.detail.type,
742
- value: m.types[o.getType(t)]
744
+ value: m.types[o.getType(e)]
743
745
  },
744
746
  {
745
747
  id: "size",
746
748
  label: m.detail.size,
747
- value: o.getSize(t) === void 0 ? void 0 : {
748
- value: o.getSize(t),
749
- display: /* @__PURE__ */ F(h, {
750
- value: o.getSize(t),
749
+ value: o.getSize(e) === void 0 ? void 0 : {
750
+ value: o.getSize(e),
751
+ display: /* @__PURE__ */ z(s, {
752
+ value: o.getSize(e),
751
753
  size: "inherit",
752
754
  type: "inherit"
753
755
  })
@@ -756,38 +758,38 @@ function Ue({ item: t, collections: i = [], accessors: o, strings: s, onClose: c
756
758
  {
757
759
  id: "dimensions",
758
760
  label: m.detail.dimensions,
759
- value: z(t, o) || void 0
761
+ value: ke(e, o) || void 0
760
762
  },
761
763
  {
762
764
  id: "uploaded",
763
765
  label: m.detail.uploaded,
764
- value: o.getUploadedAt(t) === void 0 ? void 0 : {
766
+ value: o.getUploadedAt(e) === void 0 ? void 0 : {
765
767
  kind: "date",
766
- value: o.getUploadedAt(t)
768
+ value: o.getUploadedAt(e)
767
769
  }
768
770
  },
769
771
  {
770
772
  id: "usage",
771
773
  label: m.table.usage,
772
- value: o.getUsageCount(t)
774
+ value: o.getUsageCount(e)
773
775
  }
774
776
  ]
775
777
  }),
776
- o.getType(t) === "image" && /* @__PURE__ */ F(b, {
778
+ o.getType(e) === "image" && /* @__PURE__ */ z(w, {
777
779
  label: m.detail.altLabel,
778
- children: /* @__PURE__ */ F(x, {
780
+ children: /* @__PURE__ */ z(ne, {
779
781
  value: v.alt,
780
782
  rows: 2,
781
- disabled: !!S,
783
+ disabled: !!C,
782
784
  placeholder: m.detail.altPlaceholder,
783
785
  onChange: (e) => ae({ alt: e.target.value })
784
786
  })
785
787
  }),
786
- i.length > 0 && /* @__PURE__ */ F(b, {
788
+ i.length > 0 && /* @__PURE__ */ z(w, {
787
789
  label: m.detail.collectionLabel,
788
- children: /* @__PURE__ */ F(se, {
790
+ children: /* @__PURE__ */ z(te, {
789
791
  value: v.collection,
790
- disabled: !!S,
792
+ disabled: !!C,
791
793
  options: i.map((e) => ({
792
794
  value: e.value,
793
795
  label: typeof e.label == "string" ? e.label : e.value
@@ -795,58 +797,58 @@ function Ue({ item: t, collections: i = [], accessors: o, strings: s, onClose: c
795
797
  onValueChange: (e) => ae({ collection: e ?? "" })
796
798
  })
797
799
  }),
798
- /* @__PURE__ */ F(b, {
800
+ /* @__PURE__ */ z(w, {
799
801
  label: m.detail.tagsLabel,
800
- children: /* @__PURE__ */ F(k, {
802
+ children: /* @__PURE__ */ z(oe, {
801
803
  value: v.tags,
802
- disabled: !!S,
804
+ disabled: !!C,
803
805
  onValueChange: (e) => ae({ tags: e }),
804
806
  placeholder: m.detail.tagsPlaceholder
805
807
  })
806
808
  }),
807
- /* @__PURE__ */ F(oe, {
809
+ /* @__PURE__ */ z(x, {
808
810
  label: m.detail.publicLabel,
809
811
  description: m.detail.publicDescription,
810
- disabled: !!S,
812
+ disabled: !!C,
811
813
  value: v.public,
812
814
  onValueChange: (e) => ae({ public: e })
813
815
  }),
814
- w === "saveFailed" || w === "deleteFailed" ? /* @__PURE__ */ F(a, {
816
+ T === "saveFailed" || T === "deleteFailed" ? /* @__PURE__ */ z(h, {
815
817
  tone: "destructive",
816
818
  role: "alert",
817
- children: /* @__PURE__ */ F(r, { children: m.detail[w] })
818
- }) : /* @__PURE__ */ F(n, {
819
+ children: /* @__PURE__ */ z(p, { children: m.detail[T] })
820
+ }) : /* @__PURE__ */ z(t, {
819
821
  size: "xs",
820
822
  type: "secondary",
821
823
  role: "status",
822
- children: S ? S === "save" ? m.detail.saving : m.detail.deleting : w === "saved" ? m.detail.saved : O ? m.detail.unsaved : null
824
+ children: C ? C === "save" ? m.detail.saving : m.detail.deleting : T === "saved" ? m.detail.saved : ie ? m.detail.unsaved : null
823
825
  })
824
826
  ]
825
827
  }),
826
- /* @__PURE__ */ I("div", {
827
- className: B.detailFooter,
828
+ /* @__PURE__ */ B("div", {
829
+ className: U.detailFooter,
828
830
  children: [
829
- /* @__PURE__ */ I(u, {
831
+ /* @__PURE__ */ B(r, {
830
832
  tone: "destructive",
831
- buttonStyle: "ghost",
832
- loading: S === "delete",
833
- disabled: !!S,
834
- onClick: () => void ce("delete"),
835
- children: [/* @__PURE__ */ F(we, {}), m.detail.delete]
833
+ appearance: "ghost",
834
+ loading: C === "delete",
835
+ disabled: !!C,
836
+ onClick: () => void j("delete"),
837
+ children: [/* @__PURE__ */ z(xe, {}), m.detail.delete]
836
838
  }),
837
- O && /* @__PURE__ */ F(u, {
839
+ ie && /* @__PURE__ */ z(r, {
838
840
  tone: "neutral",
839
- buttonStyle: "ghost",
840
- disabled: !!S,
841
+ appearance: "ghost",
842
+ disabled: !!C,
841
843
  onClick: () => {
842
- y(ie), T(null);
844
+ y(A), E(null);
843
845
  },
844
846
  children: m.detail.reset
845
847
  }),
846
- /* @__PURE__ */ F(u, {
847
- loading: S === "save",
848
- disabled: !!S,
849
- onClick: () => void ce("save"),
848
+ /* @__PURE__ */ z(r, {
849
+ loading: C === "save",
850
+ disabled: !!C,
851
+ onClick: () => void j("save"),
850
852
  children: m.detail.save
851
853
  })
852
854
  ]
@@ -856,166 +858,165 @@ function Ue({ item: t, collections: i = [], accessors: o, strings: s, onClose: c
856
858
  }
857
859
  //#endregion
858
860
  //#region src/components/features/media-library/media-library-parts.tsx
859
- function We(e, t) {
861
+ function He(e, t) {
860
862
  return t.types[e];
861
863
  }
862
- function Ge({ label: t, options: n, value: r, onValueChange: i, role: a = "group", className: o }) {
863
- return /* @__PURE__ */ F("div", {
864
- role: a,
865
- "aria-label": t,
866
- className: e(B.segmented, o),
867
- children: n.map((e) => {
868
- let t = e.value === r;
869
- return /* @__PURE__ */ I(u, {
864
+ function Ue({ label: e, options: t, value: i, onValueChange: a, role: o = "group", className: s }) {
865
+ return /* @__PURE__ */ z("div", {
866
+ role: o,
867
+ "aria-label": e,
868
+ className: n(U.segmented, s),
869
+ children: t.map((e) => {
870
+ let t = e.value === i;
871
+ return /* @__PURE__ */ B(r, {
870
872
  type: "button",
871
873
  tone: "neutral",
872
- buttonStyle: "ghost",
874
+ appearance: "ghost",
873
875
  iconOnly: e.iconOnly,
874
- role: a === "tablist" ? "tab" : void 0,
875
- "aria-selected": a === "tablist" ? t : void 0,
876
- "aria-pressed": a === "group" ? t : void 0,
876
+ role: o === "tablist" ? "tab" : void 0,
877
+ "aria-selected": o === "tablist" ? t : void 0,
878
+ "aria-pressed": o === "group" ? t : void 0,
877
879
  "aria-label": e.iconOnly ? String(e.label) : void 0,
878
880
  "data-active": t || void 0,
879
- className: B.segment,
880
- onClick: () => i(e.value),
881
+ className: U.segment,
882
+ onClick: () => a(e.value),
881
883
  children: [e.icon, !e.iconOnly && e.label]
882
884
  }, e.value);
883
885
  })
884
886
  });
885
887
  }
886
- function H({ title: t, description: n, icon: r, action: i, className: a }) {
887
- return /* @__PURE__ */ F(s, {
888
- title: t,
889
- description: n ?? !1,
890
- media: r ?? /* @__PURE__ */ F(ge, {}),
888
+ function We({ title: e, description: t, icon: r, action: i, className: a }) {
889
+ return /* @__PURE__ */ z(_, {
890
+ title: e,
891
+ description: t ?? !1,
892
+ media: r ?? /* @__PURE__ */ z(pe, {}),
891
893
  mediaVariant: "icon-soft",
892
- padding: "md",
893
894
  border: !0,
894
895
  action: i,
895
- className: e("media-library-empty-state--component", B.emptyState, a)
896
+ className: n("media-library-empty-state--component", U.emptyState, a)
896
897
  });
897
898
  }
898
- function U({ query: t, onQueryChange: r, type: i, onTypeChange: a, typeFilters: o, collection: s, onCollectionChange: c, collections: l, sort: d, onSortChange: f, view: p, onViewChange: m, hasFilters: h, onClearFilters: g, strings: _, end: v, className: ee }) {
899
- let b = t.trim(), x = te(L, _);
900
- return /* @__PURE__ */ I("div", {
901
- className: e("media-library-toolbar--component", B.toolbar, ee),
902
- children: [/* @__PURE__ */ I("div", {
903
- className: B.toolbarPrimary,
904
- children: [/* @__PURE__ */ I("div", {
905
- className: B.toolbarSearch,
906
- children: [/* @__PURE__ */ F(ne, {
907
- value: t,
908
- onChange: (e) => r(e.target.value),
909
- placeholder: _.searchPlaceholder,
910
- "aria-label": _.searchPlaceholder,
911
- startIcon: xe,
899
+ function W({ query: e, onQueryChange: i, type: o, onTypeChange: s, typeFilters: c, collection: l, onCollectionChange: u, collections: f, sort: p, onSortChange: m, view: h, onViewChange: g, hasFilters: _, onClearFilters: v, strings: y, end: ee, className: b }) {
900
+ let x = e.trim(), S = a(V, y);
901
+ return /* @__PURE__ */ B("div", {
902
+ className: n("media-library-toolbar--component", U.toolbar, b),
903
+ children: [/* @__PURE__ */ B("div", {
904
+ className: U.toolbarPrimary,
905
+ children: [/* @__PURE__ */ B("div", {
906
+ className: U.toolbarSearch,
907
+ children: [/* @__PURE__ */ z(C, {
908
+ value: e,
909
+ onChange: (e) => i(e.target.value),
910
+ placeholder: y.searchPlaceholder,
911
+ "aria-label": y.searchPlaceholder,
912
+ startIcon: ve,
912
913
  clearable: !0,
913
- onClear: () => r(""),
914
- strings: { clear: _.clearSearch },
915
- "data-active": b ? !0 : void 0,
916
- className: B.toolbarField
917
- }), !!b && /* @__PURE__ */ F("div", {
918
- className: B.toolbarQuery,
919
- children: /* @__PURE__ */ I(y, {
914
+ onClear: () => i(""),
915
+ strings: { clear: y.clearSearch },
916
+ "data-active": x ? !0 : void 0,
917
+ className: U.toolbarField
918
+ }), !!x && /* @__PURE__ */ z("div", {
919
+ className: U.toolbarQuery,
920
+ children: /* @__PURE__ */ B(d, {
920
921
  tone: "primary",
921
922
  children: [
922
- /* @__PURE__ */ F(xe, { "aria-hidden": !0 }),
923
- _.activeSearchLabel,
924
- /* @__PURE__ */ F(n, {
923
+ /* @__PURE__ */ z(ve, { "aria-hidden": !0 }),
924
+ y.activeSearchLabel,
925
+ /* @__PURE__ */ z(t, {
925
926
  size: "inherit",
926
927
  type: "inherit",
927
928
  weight: "normal",
928
- className: B.queryTerm,
929
- children: b
929
+ className: U.queryTerm,
930
+ children: x
930
931
  })
931
932
  ]
932
933
  })
933
934
  })]
934
- }), o.length > 1 && /* @__PURE__ */ F(Ge, {
935
+ }), c.length > 1 && /* @__PURE__ */ z(Ue, {
935
936
  role: "tablist",
936
- label: _.typeLabel,
937
- value: i,
938
- onValueChange: (e) => a(e),
939
- options: o.map((e) => ({
937
+ label: y.typeLabel,
938
+ value: o,
939
+ onValueChange: (e) => s(e),
940
+ options: c.map((e) => ({
940
941
  value: e,
941
- label: e === "all" ? _.types.all : We(e, _),
942
- icon: e === "all" ? void 0 : He[e]
942
+ label: e === "all" ? y.types.all : He(e, y),
943
+ icon: e === "all" ? void 0 : ze[e]
943
944
  })),
944
- className: B.toolbarTypes
945
+ className: U.toolbarTypes
945
946
  })]
946
- }), /* @__PURE__ */ I("div", {
947
- className: B.toolbarSecondary,
948
- children: [/* @__PURE__ */ I("div", {
949
- className: B.toolbarFilters,
947
+ }), /* @__PURE__ */ B("div", {
948
+ className: U.toolbarSecondary,
949
+ children: [/* @__PURE__ */ B("div", {
950
+ className: U.toolbarFilters,
950
951
  children: [
951
- l.length > 0 && /* @__PURE__ */ F(se, {
952
- "aria-label": _.collectionLabel,
953
- value: s,
952
+ f.length > 0 && /* @__PURE__ */ z(te, {
953
+ "aria-label": y.collectionLabel,
954
+ value: l,
954
955
  options: [{
955
956
  value: "all",
956
- label: _.collectionAll
957
- }, ...l.map((e) => ({
957
+ label: y.collectionAll
958
+ }, ...f.map((e) => ({
958
959
  value: e.value,
959
960
  label: typeof e.label == "string" ? e.label : e.value
960
961
  }))],
961
- onValueChange: (e) => e && c(e),
962
- className: B.toolbarSelect
962
+ onValueChange: (e) => e && u(e),
963
+ className: U.toolbarSelect
963
964
  }),
964
- /* @__PURE__ */ F(se, {
965
- "aria-label": _.sortLabel,
966
- value: d,
965
+ /* @__PURE__ */ z(te, {
966
+ "aria-label": y.sortLabel,
967
+ value: p,
967
968
  options: [
968
969
  {
969
970
  value: "newest",
970
- label: _.sorts.newest
971
+ label: y.sorts.newest
971
972
  },
972
973
  {
973
974
  value: "name",
974
- label: _.sorts.name
975
+ label: y.sorts.name
975
976
  },
976
977
  {
977
978
  value: "size",
978
- label: _.sorts.size
979
+ label: y.sorts.size
979
980
  },
980
981
  {
981
982
  value: "usage",
982
- label: _.sorts.usage
983
+ label: y.sorts.usage
983
984
  }
984
985
  ],
985
- onValueChange: (e) => e && f(e),
986
- className: B.toolbarSelect
986
+ onValueChange: (e) => e && m(e),
987
+ className: U.toolbarSelect
987
988
  }),
988
- h && /* @__PURE__ */ F(u, {
989
+ _ && /* @__PURE__ */ z(r, {
989
990
  type: "button",
990
991
  tone: "neutral",
991
- buttonStyle: "ghost",
992
- onClick: g,
993
- children: _.clearFilters
992
+ appearance: "ghost",
993
+ onClick: v,
994
+ children: y.clearFilters
994
995
  })
995
996
  ]
996
- }), /* @__PURE__ */ I("div", {
997
- className: B.toolbarEnd,
998
- children: [v, /* @__PURE__ */ F(Ge, {
999
- label: _.viewLabel,
1000
- value: p,
1001
- onValueChange: (e) => m(e),
997
+ }), /* @__PURE__ */ B("div", {
998
+ className: U.toolbarEnd,
999
+ children: [ee, /* @__PURE__ */ z(Ue, {
1000
+ label: y.viewLabel,
1001
+ value: h,
1002
+ onValueChange: (e) => g(e),
1002
1003
  options: [
1003
1004
  {
1004
1005
  value: "grid",
1005
- label: _.views.grid,
1006
- icon: /* @__PURE__ */ F(_e, {}),
1006
+ label: y.views.grid,
1007
+ icon: /* @__PURE__ */ z(me, {}),
1007
1008
  iconOnly: !0
1008
1009
  },
1009
1010
  {
1010
1011
  value: "list",
1011
- label: x.views.list,
1012
- icon: /* @__PURE__ */ F(ve, {}),
1012
+ label: S.views.list,
1013
+ icon: /* @__PURE__ */ z(he, {}),
1013
1014
  iconOnly: !0
1014
1015
  },
1015
1016
  {
1016
1017
  value: "table",
1017
- label: _.views.table,
1018
- icon: /* @__PURE__ */ F(Ce, {}),
1018
+ label: y.views.table,
1019
+ icon: /* @__PURE__ */ z(be, {}),
1019
1020
  iconOnly: !0
1020
1021
  }
1021
1022
  ]
@@ -1024,320 +1025,319 @@ function U({ query: t, onQueryChange: r, type: i, onTypeChange: a, typeFilters:
1024
1025
  })]
1025
1026
  });
1026
1027
  }
1027
- function Ke({ item: t, selected: r = !1, density: i = "comfortable", showMeta: a = !0, accessors: o, strings: s, onToggle: c, onDetails: l, className: d }) {
1028
- let f = o.getName(t), p = o.getSize(t), m = z(t, o);
1029
- return /* @__PURE__ */ I("div", {
1030
- "data-selected": r || void 0,
1031
- "data-media-density": i,
1032
- className: e("media-library-card--component", B.card, d),
1028
+ function Ge({ item: e, selected: i = !1, size: a = "default", showMeta: o = !0, accessors: s, strings: c, onToggle: l, onDetails: u, className: d }) {
1029
+ let f = s.getName(e), p = s.getSize(e), m = ke(e, s);
1030
+ return /* @__PURE__ */ B("div", {
1031
+ "data-selected": i || void 0,
1032
+ "data-size": a,
1033
+ className: n("media-library-card--component", U.card, d),
1033
1034
  children: [
1034
- /* @__PURE__ */ I("span", {
1035
- className: B.cardTileWrap,
1036
- children: [/* @__PURE__ */ F("button", {
1035
+ /* @__PURE__ */ B("span", {
1036
+ className: U.cardTileWrap,
1037
+ children: [/* @__PURE__ */ z("button", {
1037
1038
  type: "button",
1038
- className: B.cardTile,
1039
- "aria-pressed": r,
1040
- "aria-label": (s.assetAction ?? L.assetAction)(r ? s.deselect : s.select, f),
1041
- onClick: c,
1042
- children: /* @__PURE__ */ F(V, {
1043
- item: t,
1044
- accessors: o
1039
+ className: U.cardTile,
1040
+ "aria-pressed": i,
1041
+ "aria-label": (c.assetAction ?? V.assetAction)(i ? c.deselect : c.select, f),
1042
+ onClick: l,
1043
+ children: /* @__PURE__ */ z(Be, {
1044
+ item: e,
1045
+ accessors: s
1045
1046
  })
1046
- }), /* @__PURE__ */ F("span", {
1047
+ }), /* @__PURE__ */ z("span", {
1047
1048
  "aria-hidden": !0,
1048
- "data-selected": r || void 0,
1049
- className: B.cardCheck,
1050
- children: r && /* @__PURE__ */ F(A, {})
1049
+ "data-selected": i || void 0,
1050
+ className: U.cardCheck,
1051
+ children: i && /* @__PURE__ */ z(N, {})
1051
1052
  })]
1052
1053
  }),
1053
- /* @__PURE__ */ I("div", {
1054
- className: B.cardBody,
1055
- children: [/* @__PURE__ */ F(n, {
1054
+ /* @__PURE__ */ B("div", {
1055
+ className: U.cardBody,
1056
+ children: [/* @__PURE__ */ z(t, {
1056
1057
  tag: "span",
1057
1058
  weight: "medium",
1058
1059
  truncate: !0,
1059
1060
  title: f,
1060
1061
  children: f
1061
- }), a && /* @__PURE__ */ F(n, {
1062
+ }), o && /* @__PURE__ */ z(t, {
1062
1063
  tag: "span",
1063
1064
  size: "xs",
1064
1065
  type: "secondary",
1065
1066
  truncate: !0,
1066
- children: [m, p === void 0 ? "" : R(p)].filter(Boolean).join(" · ")
1067
+ children: [m, p === void 0 ? "" : H(p)].filter(Boolean).join(" · ")
1067
1068
  })]
1068
1069
  }),
1069
- !!l && /* @__PURE__ */ F(u, {
1070
+ !!u && /* @__PURE__ */ z(r, {
1070
1071
  type: "button",
1071
1072
  tone: "neutral",
1072
- buttonStyle: "ghost",
1073
+ appearance: "ghost",
1073
1074
  iconOnly: !0,
1074
1075
  onClick: (e) => {
1075
- e.currentTarget.focus(), l();
1076
+ e.currentTarget.focus(), u();
1076
1077
  },
1077
- "aria-label": (s.assetAction ?? L.assetAction)(s.details, f),
1078
- className: B.cardDetails,
1079
- children: /* @__PURE__ */ F(ye, {})
1078
+ "aria-label": (c.assetAction ?? V.assetAction)(c.details, f),
1079
+ className: U.cardDetails,
1080
+ children: /* @__PURE__ */ z(ge, {})
1080
1081
  })
1081
1082
  ]
1082
1083
  });
1083
1084
  }
1084
- function qe({ items: t, selectedSet: r, accessors: i, strings: a, onToggle: o, onDetails: s }) {
1085
- return /* @__PURE__ */ F("ul", {
1086
- className: e("media-library-list--component", B.list),
1087
- children: t.map((e) => {
1088
- let t = i.getId(e), c = i.getName(e), l = r.has(t);
1089
- return /* @__PURE__ */ F("li", { children: /* @__PURE__ */ I("div", {
1090
- "data-selected": l || void 0,
1091
- className: B.row,
1085
+ function Ke({ items: e, selectedSet: i, accessors: a, strings: o, onToggle: c, onDetails: l }) {
1086
+ return /* @__PURE__ */ z("ul", {
1087
+ className: n("media-library-list--component", U.list),
1088
+ children: e.map((e) => {
1089
+ let n = a.getId(e), u = a.getName(e), d = i.has(n);
1090
+ return /* @__PURE__ */ z("li", { children: /* @__PURE__ */ B("div", {
1091
+ "data-selected": d || void 0,
1092
+ className: U.row,
1092
1093
  children: [
1093
- /* @__PURE__ */ F(ce, {
1094
- checked: l,
1095
- "aria-label": (a.assetAction ?? L.assetAction)(l ? a.deselect : a.select, c),
1096
- onChange: () => o(t)
1094
+ /* @__PURE__ */ z(S, {
1095
+ checked: d,
1096
+ "aria-label": (o.assetAction ?? V.assetAction)(d ? o.deselect : o.select, u),
1097
+ onChange: () => c(n)
1097
1098
  }),
1098
- /* @__PURE__ */ I("button", {
1099
+ /* @__PURE__ */ B("button", {
1099
1100
  type: "button",
1100
- className: B.rowMain,
1101
- "aria-label": (a.assetAction ?? L.assetAction)(a.details, c),
1101
+ className: U.rowMain,
1102
+ "aria-label": (o.assetAction ?? V.assetAction)(o.details, u),
1102
1103
  onClick: (e) => {
1103
- e.currentTarget.focus(), s(t);
1104
+ e.currentTarget.focus(), l(n);
1104
1105
  },
1105
- children: [/* @__PURE__ */ F(V, {
1106
+ children: [/* @__PURE__ */ z(Be, {
1106
1107
  item: e,
1107
- accessors: i,
1108
- className: B.rowPreview
1109
- }), /* @__PURE__ */ I("span", {
1110
- className: B.rowBody,
1111
- children: [/* @__PURE__ */ F(n, {
1108
+ accessors: a,
1109
+ className: U.rowPreview
1110
+ }), /* @__PURE__ */ B("span", {
1111
+ className: U.rowBody,
1112
+ children: [/* @__PURE__ */ z(t, {
1112
1113
  tag: "span",
1113
1114
  weight: "medium",
1114
1115
  truncate: !0,
1115
- children: c
1116
- }), /* @__PURE__ */ F(n, {
1116
+ children: u
1117
+ }), /* @__PURE__ */ z(t, {
1117
1118
  tag: "span",
1118
1119
  size: "xs",
1119
1120
  type: "secondary",
1120
1121
  children: [
1121
- We(i.getType(e), a),
1122
- z(e, i),
1123
- i.getCollection(e)
1122
+ He(a.getType(e), o),
1123
+ ke(e, a),
1124
+ a.getCollection(e)
1124
1125
  ].filter(Boolean).join(" · ")
1125
1126
  })]
1126
1127
  })]
1127
1128
  }),
1128
- /* @__PURE__ */ F("span", {
1129
- className: B.rowSize,
1130
- children: /* @__PURE__ */ F(h, {
1131
- value: i.getSize(e),
1129
+ /* @__PURE__ */ z("span", {
1130
+ className: U.rowSize,
1131
+ children: /* @__PURE__ */ z(s, {
1132
+ value: a.getSize(e),
1132
1133
  size: "xs",
1133
1134
  type: "secondary"
1134
1135
  })
1135
1136
  }),
1136
- /* @__PURE__ */ F(u, {
1137
+ /* @__PURE__ */ z(r, {
1137
1138
  type: "button",
1138
1139
  tone: "neutral",
1139
- buttonStyle: "ghost",
1140
+ appearance: "ghost",
1140
1141
  onClick: (e) => {
1141
- e.currentTarget.focus(), s(t);
1142
+ e.currentTarget.focus(), l(n);
1142
1143
  },
1143
- children: a.details
1144
+ children: o.details
1144
1145
  })
1145
1146
  ]
1146
- }) }, t);
1147
+ }) }, n);
1147
1148
  })
1148
1149
  });
1149
1150
  }
1150
- function Je({ stagedFiles: r, uploading: i, uploadOptions: a, collections: o = [], strings: l, onAddFiles: d, onRemoveFile: f, onClear: m, onOptionsChange: g, onStart: _, onCancel: v, empty: y, showActions: te = !0 }) {
1151
- return /* @__PURE__ */ I("div", {
1152
- className: e("media-library-upload--component", B.upload),
1151
+ function qe({ stagedFiles: a, uploading: o, uploadOptions: c, collections: l = [], strings: u, onAddFiles: d, onRemoveFile: f, onClear: p, onOptionsChange: m, onStart: h, onCancel: g, empty: y, showActions: ee = !0 }) {
1152
+ return /* @__PURE__ */ B("div", {
1153
+ className: n("media-library-upload--component", U.upload),
1153
1154
  children: [
1154
- /* @__PURE__ */ F(ee, {
1155
+ /* @__PURE__ */ z(O, {
1155
1156
  multiple: !0,
1156
- disabled: i,
1157
+ disabled: o,
1157
1158
  onDrop: d,
1158
1159
  strings: {
1159
- instructionMultiple: l.upload.dropTitle,
1160
- helper: l.upload.dropDescription
1160
+ instructionMultiple: u.upload.dropTitle,
1161
+ helper: u.upload.dropDescription
1161
1162
  }
1162
1163
  }),
1163
- /* @__PURE__ */ I("section", {
1164
- className: B.uploadOptions,
1165
- children: [/* @__PURE__ */ F(t, { children: l.upload.optionsTitle }), /* @__PURE__ */ I("div", {
1166
- className: B.uploadOptionsGrid,
1164
+ /* @__PURE__ */ B("section", {
1165
+ className: U.uploadOptions,
1166
+ children: [/* @__PURE__ */ z(e, { children: u.upload.optionsTitle }), /* @__PURE__ */ B("div", {
1167
+ className: U.uploadOptionsGrid,
1167
1168
  children: [
1168
- o.length > 0 && /* @__PURE__ */ F(b, {
1169
- label: l.detail.collectionLabel,
1170
- children: /* @__PURE__ */ F(se, {
1171
- disabled: i,
1172
- value: a.collection ?? "",
1173
- options: o.map((e) => ({
1169
+ l.length > 0 && /* @__PURE__ */ z(w, {
1170
+ label: u.detail.collectionLabel,
1171
+ children: /* @__PURE__ */ z(te, {
1172
+ disabled: o,
1173
+ value: c.collection ?? "",
1174
+ options: l.map((e) => ({
1174
1175
  value: e.value,
1175
1176
  label: typeof e.label == "string" ? e.label : e.value
1176
1177
  })),
1177
- onValueChange: (e) => g({ collection: e || void 0 })
1178
+ onValueChange: (e) => m({ collection: e || void 0 })
1178
1179
  })
1179
1180
  }),
1180
- /* @__PURE__ */ F(b, {
1181
- label: l.detail.tagsLabel,
1182
- children: /* @__PURE__ */ F(k, {
1183
- disabled: i,
1184
- value: a.tags,
1185
- onValueChange: (e) => g({ tags: e }),
1186
- placeholder: l.detail.tagsPlaceholder
1181
+ /* @__PURE__ */ z(w, {
1182
+ label: u.detail.tagsLabel,
1183
+ children: /* @__PURE__ */ z(oe, {
1184
+ disabled: o,
1185
+ value: c.tags,
1186
+ onValueChange: (e) => m({ tags: e }),
1187
+ placeholder: u.detail.tagsPlaceholder
1187
1188
  })
1188
1189
  }),
1189
- /* @__PURE__ */ F(oe, {
1190
- disabled: i,
1191
- label: l.detail.publicLabel,
1192
- description: l.detail.publicDescription,
1193
- value: a.public,
1194
- onValueChange: (e) => g({ public: e })
1190
+ /* @__PURE__ */ z(x, {
1191
+ disabled: o,
1192
+ label: u.detail.publicLabel,
1193
+ description: u.detail.publicDescription,
1194
+ value: c.public,
1195
+ onValueChange: (e) => m({ public: e })
1195
1196
  })
1196
1197
  ]
1197
1198
  })]
1198
1199
  }),
1199
- r.length === 0 ? y ?? /* @__PURE__ */ F(s, {
1200
- title: l.upload.emptyTitle,
1201
- description: l.upload.emptyDescription,
1202
- padding: "md"
1203
- }) : /* @__PURE__ */ I(De, { children: [/* @__PURE__ */ F("ul", {
1204
- className: B.stagedList,
1205
- children: r.map((e) => /* @__PURE__ */ I("li", {
1206
- className: B.staged,
1200
+ a.length === 0 ? y ?? /* @__PURE__ */ z(_, {
1201
+ title: u.upload.emptyTitle,
1202
+ description: u.upload.emptyDescription
1203
+ }) : /* @__PURE__ */ B(Ce, { children: [/* @__PURE__ */ z("ul", {
1204
+ className: U.stagedList,
1205
+ children: a.map((e) => /* @__PURE__ */ B("li", {
1206
+ className: U.staged,
1207
1207
  children: [
1208
- /* @__PURE__ */ F("span", {
1209
- className: B.stagedIcon,
1210
- children: He[e.type]
1208
+ /* @__PURE__ */ z("span", {
1209
+ className: U.stagedIcon,
1210
+ children: ze[e.type]
1211
1211
  }),
1212
- /* @__PURE__ */ I("span", {
1213
- className: B.stagedBody,
1214
- children: [/* @__PURE__ */ F(n, {
1212
+ /* @__PURE__ */ B("span", {
1213
+ className: U.stagedBody,
1214
+ children: [/* @__PURE__ */ z(t, {
1215
1215
  tag: "span",
1216
1216
  weight: "medium",
1217
1217
  truncate: !0,
1218
1218
  children: e.name
1219
- }), e.status === "error" ? /* @__PURE__ */ F(n, {
1219
+ }), e.status === "error" ? /* @__PURE__ */ z(t, {
1220
1220
  tag: "span",
1221
1221
  size: "xs",
1222
1222
  type: "error",
1223
- children: e.error ?? l.upload.failed
1224
- }) : e.status === "uploading" ? /* @__PURE__ */ F(c, {
1223
+ children: e.error ?? u.upload.failed
1224
+ }) : e.status === "uploading" ? /* @__PURE__ */ z(v, {
1225
1225
  value: e.progress,
1226
1226
  "aria-label": e.name
1227
- }) : /* @__PURE__ */ F(h, {
1227
+ }) : /* @__PURE__ */ z(s, {
1228
1228
  value: e.size,
1229
1229
  size: "xs",
1230
1230
  type: "secondary"
1231
1231
  })]
1232
1232
  }),
1233
- /* @__PURE__ */ F(u, {
1233
+ /* @__PURE__ */ z(r, {
1234
1234
  type: "button",
1235
1235
  tone: "neutral",
1236
- buttonStyle: "ghost",
1236
+ appearance: "ghost",
1237
1237
  iconOnly: !0,
1238
- "aria-label": `${l.upload.remove}: ${e.name}`,
1239
- disabled: i,
1238
+ "aria-label": `${u.upload.remove}: ${e.name}`,
1239
+ disabled: o,
1240
1240
  onClick: () => f(e.id),
1241
- children: /* @__PURE__ */ F(Te, {})
1241
+ children: /* @__PURE__ */ z(Se, {})
1242
1242
  })
1243
1243
  ]
1244
1244
  }, e.id))
1245
- }), te && /* @__PURE__ */ I("div", {
1246
- className: B.uploadActions,
1247
- children: [/* @__PURE__ */ F(n, {
1245
+ }), ee && /* @__PURE__ */ B("div", {
1246
+ className: U.uploadActions,
1247
+ children: [/* @__PURE__ */ z(t, {
1248
1248
  type: "secondary",
1249
- children: l.upload.staged(r.length)
1250
- }), /* @__PURE__ */ I(p, {
1249
+ children: u.upload.staged(a.length)
1250
+ }), /* @__PURE__ */ B(i, {
1251
1251
  direction: "horizontal",
1252
- gap: "md",
1253
- children: [i ? /* @__PURE__ */ F(u, {
1252
+ gap: "sm",
1253
+ children: [o ? /* @__PURE__ */ z(r, {
1254
1254
  type: "button",
1255
1255
  tone: "neutral",
1256
- buttonStyle: "outline",
1257
- onClick: v,
1258
- children: l.upload.cancel
1259
- }) : /* @__PURE__ */ F(u, {
1256
+ appearance: "outline",
1257
+ onClick: g,
1258
+ children: u.upload.cancel
1259
+ }) : /* @__PURE__ */ z(r, {
1260
1260
  type: "button",
1261
1261
  tone: "neutral",
1262
- buttonStyle: "ghost",
1263
- onClick: m,
1264
- children: l.upload.clear
1265
- }), /* @__PURE__ */ F(u, {
1262
+ appearance: "ghost",
1263
+ onClick: p,
1264
+ children: u.upload.clear
1265
+ }), /* @__PURE__ */ z(r, {
1266
1266
  type: "button",
1267
- loading: i,
1268
- onClick: _,
1269
- children: i ? l.upload.uploading : l.upload.start
1267
+ loading: o,
1268
+ onClick: h,
1269
+ children: o ? u.upload.uploading : u.upload.start
1270
1270
  })]
1271
1271
  })]
1272
1272
  })] })
1273
1273
  ]
1274
1274
  });
1275
1275
  }
1276
- function W({ tab: t, selectedIds: r, selectionMode: i, stagedFiles: a, strings: o, visibleCount: s, totalCount: c, onClearSelection: l, className: d }) {
1277
- let f = t === "upload" ? /* @__PURE__ */ F(n, {
1276
+ function G({ tab: e, selectedIds: i, selectionMode: a, stagedFiles: o, strings: s, visibleCount: c, totalCount: l, onClearSelection: u, className: d }) {
1277
+ let f = e === "upload" ? /* @__PURE__ */ z(t, {
1278
1278
  size: "xs",
1279
1279
  type: "secondary",
1280
- children: a.length === 0 ? o.footer.noFiles : o.footer.stagedSummary(a.length, R(a.reduce((e, t) => e + t.size, 0)))
1281
- }) : r.length > 0 ? /* @__PURE__ */ I(De, { children: [/* @__PURE__ */ F(n, { children: o.selectedCount(r.length) }), !!l && /* @__PURE__ */ F(u, {
1280
+ children: o.length === 0 ? s.footer.noFiles : s.footer.stagedSummary(o.length, H(o.reduce((e, t) => e + t.size, 0)))
1281
+ }) : i.length > 0 ? /* @__PURE__ */ B(Ce, { children: [/* @__PURE__ */ z(t, { children: s.selectedCount(i.length) }), !!u && /* @__PURE__ */ z(r, {
1282
1282
  type: "button",
1283
1283
  tone: "neutral",
1284
- buttonStyle: "ghost",
1285
- onClick: l,
1286
- children: o.clearSelection
1287
- })] }) : s !== void 0 && c !== void 0 && s !== c ? /* @__PURE__ */ F(n, {
1284
+ appearance: "ghost",
1285
+ onClick: u,
1286
+ children: s.clearSelection
1287
+ })] }) : c !== void 0 && l !== void 0 && c !== l ? /* @__PURE__ */ z(t, {
1288
1288
  size: "xs",
1289
1289
  type: "secondary",
1290
- children: o.showingCount(s, c)
1291
- }) : /* @__PURE__ */ F(n, {
1290
+ children: s.showingCount(c, l)
1291
+ }) : /* @__PURE__ */ z(t, {
1292
1292
  size: "xs",
1293
1293
  type: "secondary",
1294
- children: i === "single" ? o.footer.pickOne : o.footer.pickMany
1294
+ children: a === "single" ? s.footer.pickOne : s.footer.pickMany
1295
1295
  });
1296
- return /* @__PURE__ */ F("div", {
1296
+ return /* @__PURE__ */ z("div", {
1297
1297
  "aria-live": "polite",
1298
- className: e("media-library-footer-summary--component", B.footerSummary, d),
1298
+ className: n("media-library-footer-summary--component", U.footerSummary, d),
1299
1299
  children: f
1300
1300
  });
1301
1301
  }
1302
- function G({ tab: t, selectedIds: n, selectedItems: r, stagedFiles: i, uploading: a = !1, strings: o, confirmLabel: s, cancelLabel: c, onCancel: l, onConfirm: d, onUpload: f, onCancelUpload: p, className: m }) {
1303
- let h = e("media-library-footer-actions--component", B.footerActions, m);
1304
- return t === "upload" ? /* @__PURE__ */ I("div", {
1302
+ function K({ tab: e, selectedIds: t, selectedItems: i, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onUpload: f, onCancelUpload: p, className: m }) {
1303
+ let h = n("media-library-footer-actions--component", U.footerActions, m);
1304
+ return e === "upload" ? /* @__PURE__ */ B("div", {
1305
1305
  className: h,
1306
- children: [/* @__PURE__ */ F(u, {
1306
+ children: [/* @__PURE__ */ z(r, {
1307
1307
  type: "button",
1308
1308
  tone: "neutral",
1309
- buttonStyle: "ghost",
1309
+ appearance: "ghost",
1310
1310
  onClick: p,
1311
- children: a ? o.upload.cancel : c ?? o.cancel
1312
- }), /* @__PURE__ */ F(u, {
1311
+ children: o ? s.upload.cancel : l ?? s.cancel
1312
+ }), /* @__PURE__ */ z(r, {
1313
1313
  type: "button",
1314
- disabled: i.length === 0 || a,
1315
- loading: a,
1314
+ disabled: a.length === 0 || o,
1315
+ loading: o,
1316
1316
  onClick: f,
1317
- children: o.footer.uploadStaged(i.length)
1317
+ children: s.footer.uploadStaged(a.length)
1318
1318
  })]
1319
- }) : /* @__PURE__ */ I("div", {
1319
+ }) : /* @__PURE__ */ B("div", {
1320
1320
  className: h,
1321
- children: [/* @__PURE__ */ F(u, {
1321
+ children: [/* @__PURE__ */ z(r, {
1322
1322
  type: "button",
1323
1323
  tone: "neutral",
1324
- buttonStyle: "outline",
1325
- onClick: l,
1326
- children: a ? o.upload.cancel : c ?? o.cancel
1327
- }), /* @__PURE__ */ F(u, {
1324
+ appearance: "outline",
1325
+ onClick: u,
1326
+ children: o ? s.upload.cancel : l ?? s.cancel
1327
+ }), /* @__PURE__ */ z(r, {
1328
1328
  type: "button",
1329
- disabled: n.length === 0 || r.length !== n.length,
1329
+ disabled: t.length === 0 || i.length !== t.length,
1330
1330
  onClick: d,
1331
- children: s ?? o.confirm
1331
+ children: c ?? s.confirm
1332
1332
  })]
1333
1333
  });
1334
1334
  }
1335
- function Ye({ tab: t, selectedItems: n, selectedIds: r, selectionMode: i, stagedFiles: a, uploading: o, strings: s, visibleCount: c, totalCount: l, confirmLabel: u, cancelLabel: d, onCancel: f, onConfirm: p, onClearSelection: m, onUpload: h, onCancelUpload: g, chrome: _ = "section", className: v }) {
1336
- return /* @__PURE__ */ I("footer", {
1335
+ function Je({ tab: e, selectedItems: t, selectedIds: r, selectionMode: i, stagedFiles: a, uploading: o, strings: s, visibleCount: c, totalCount: l, confirmLabel: u, cancelLabel: d, onCancel: f, onConfirm: p, onClearSelection: m, onUpload: h, onCancelUpload: g, chrome: _ = "section", className: v }) {
1336
+ return /* @__PURE__ */ B("footer", {
1337
1337
  "data-chrome": _,
1338
- className: e("media-library-footer--component", B.footer, v),
1339
- children: [/* @__PURE__ */ F(W, {
1340
- tab: t,
1338
+ className: n("media-library-footer--component", U.footer, v),
1339
+ children: [/* @__PURE__ */ z(G, {
1340
+ tab: e,
1341
1341
  selectedIds: r,
1342
1342
  selectionMode: i,
1343
1343
  stagedFiles: a,
@@ -1345,9 +1345,9 @@ function Ye({ tab: t, selectedItems: n, selectedIds: r, selectionMode: i, staged
1345
1345
  visibleCount: c,
1346
1346
  totalCount: l,
1347
1347
  onClearSelection: m
1348
- }), /* @__PURE__ */ F(G, {
1349
- tab: t,
1350
- selectedItems: n,
1348
+ }), /* @__PURE__ */ z(K, {
1349
+ tab: e,
1350
+ selectedItems: t,
1351
1351
  selectedIds: r,
1352
1352
  stagedFiles: a,
1353
1353
  uploading: o,
@@ -1363,542 +1363,542 @@ function Ye({ tab: t, selectedItems: n, selectedIds: r, selectionMode: i, staged
1363
1363
  }
1364
1364
  //#endregion
1365
1365
  //#region src/components/features/media-library/media-library-table.tsx
1366
- function K({ items: t, selectedSet: r, accessors: i, strings: a, onToggle: o, onDetails: s, className: c, collections: l = [] }) {
1367
- let d = te(L, a);
1368
- return /* @__PURE__ */ I(D, {
1369
- "aria-label": d.title,
1370
- containerClassName: e("media-library-table--component", B.table, c),
1371
- children: [/* @__PURE__ */ F(S, { children: /* @__PURE__ */ I(w, { children: [
1372
- /* @__PURE__ */ F(E, { children: /* @__PURE__ */ F(n, {
1366
+ function q({ items: e, selectedSet: i, accessors: o, strings: d, onToggle: f, onDetails: p, className: m, collections: h = [] }) {
1367
+ let g = a(V, d);
1368
+ return /* @__PURE__ */ B(M, {
1369
+ "aria-label": g.title,
1370
+ containerClassName: n("media-library-table--component", U.table, m),
1371
+ children: [/* @__PURE__ */ z(k, { children: /* @__PURE__ */ B(ie, { children: [
1372
+ /* @__PURE__ */ z(j, { children: /* @__PURE__ */ z(t, {
1373
1373
  tag: "span",
1374
1374
  className: "sr-only",
1375
- children: d.select
1375
+ children: g.select
1376
1376
  }) }),
1377
- /* @__PURE__ */ F(E, { children: d.table.name }),
1378
- /* @__PURE__ */ F(E, { children: d.detail.type }),
1379
- /* @__PURE__ */ F(E, { children: d.table.collection }),
1380
- /* @__PURE__ */ F(E, {
1377
+ /* @__PURE__ */ z(j, { children: g.table.name }),
1378
+ /* @__PURE__ */ z(j, { children: g.detail.type }),
1379
+ /* @__PURE__ */ z(j, { children: g.table.collection }),
1380
+ /* @__PURE__ */ z(j, {
1381
1381
  align: "end",
1382
- children: d.table.size
1382
+ children: g.table.size
1383
1383
  }),
1384
- /* @__PURE__ */ F(E, { children: d.table.uploaded }),
1385
- /* @__PURE__ */ F(E, {
1384
+ /* @__PURE__ */ z(j, { children: g.table.uploaded }),
1385
+ /* @__PURE__ */ z(j, {
1386
1386
  align: "end",
1387
- children: d.table.usage
1387
+ children: g.table.usage
1388
1388
  }),
1389
- /* @__PURE__ */ F(E, { children: /* @__PURE__ */ F(n, {
1389
+ /* @__PURE__ */ z(j, { children: /* @__PURE__ */ z(t, {
1390
1390
  tag: "span",
1391
1391
  className: "sr-only",
1392
- children: d.table.actions
1392
+ children: g.table.actions
1393
1393
  }) })
1394
- ] }) }), /* @__PURE__ */ F(T, { children: t.map((e) => {
1395
- let t = i.getId(e), a = i.getName(e), c = r.has(t);
1396
- return /* @__PURE__ */ I(w, {
1397
- "data-state": c ? "selected" : void 0,
1398
- "data-selected": c || void 0,
1394
+ ] }) }), /* @__PURE__ */ z(ae, { children: e.map((e) => {
1395
+ let n = o.getId(e), a = o.getName(e), d = i.has(n);
1396
+ return /* @__PURE__ */ B(ie, {
1397
+ "data-state": d ? "selected" : void 0,
1398
+ "data-selected": d || void 0,
1399
1399
  children: [
1400
- /* @__PURE__ */ F(C, { children: /* @__PURE__ */ F(ce, {
1401
- checked: c,
1402
- "aria-label": d.assetAction(c ? d.deselect : d.select, a),
1403
- onChange: () => o(t)
1400
+ /* @__PURE__ */ z(A, { children: /* @__PURE__ */ z(S, {
1401
+ checked: d,
1402
+ "aria-label": g.assetAction(d ? g.deselect : g.select, a),
1403
+ onChange: () => f(n)
1404
1404
  }) }),
1405
- /* @__PURE__ */ F(C, { children: /* @__PURE__ */ I(u, {
1405
+ /* @__PURE__ */ z(A, { children: /* @__PURE__ */ B(r, {
1406
1406
  tone: "neutral",
1407
- buttonStyle: "ghost",
1407
+ appearance: "ghost",
1408
1408
  onClick: (e) => {
1409
- e.currentTarget.focus(), s(t);
1409
+ e.currentTarget.focus(), p(n);
1410
1410
  },
1411
- className: B.tableName,
1412
- children: [/* @__PURE__ */ F(V, {
1411
+ className: U.tableName,
1412
+ children: [/* @__PURE__ */ z(Be, {
1413
1413
  item: e,
1414
- accessors: i,
1415
- className: B.rowPreview
1416
- }), /* @__PURE__ */ F(n, {
1414
+ accessors: o,
1415
+ className: U.rowPreview
1416
+ }), /* @__PURE__ */ z(t, {
1417
1417
  tag: "span",
1418
1418
  truncate: !0,
1419
1419
  title: a,
1420
1420
  children: a
1421
1421
  })]
1422
1422
  }) }),
1423
- /* @__PURE__ */ F(C, { children: /* @__PURE__ */ F(n, {
1423
+ /* @__PURE__ */ z(A, { children: /* @__PURE__ */ z(t, {
1424
1424
  type: "secondary",
1425
- children: d.types[i.getType(e)]
1425
+ children: g.types[o.getType(e)]
1426
1426
  }) }),
1427
- /* @__PURE__ */ F(C, { children: /* @__PURE__ */ F(n, { children: l.find((t) => t.value === i.getCollection(e))?.label ?? (i.getCollection(e) || /* @__PURE__ */ F(v, {})) }) }),
1428
- /* @__PURE__ */ F(C, {
1427
+ /* @__PURE__ */ z(A, { children: /* @__PURE__ */ z(t, { children: h.find((t) => t.value === o.getCollection(e))?.label ?? (o.getCollection(e) || /* @__PURE__ */ z(u, {})) }) }),
1428
+ /* @__PURE__ */ z(A, {
1429
1429
  align: "end",
1430
- children: /* @__PURE__ */ F(h, { value: i.getSize(e) })
1430
+ children: /* @__PURE__ */ z(s, { value: o.getSize(e) })
1431
1431
  }),
1432
- /* @__PURE__ */ F(C, { children: /* @__PURE__ */ F(g, { value: i.getUploadedAt(e) }) }),
1433
- /* @__PURE__ */ F(C, {
1432
+ /* @__PURE__ */ z(A, { children: /* @__PURE__ */ z(c, { value: o.getUploadedAt(e) }) }),
1433
+ /* @__PURE__ */ z(A, {
1434
1434
  align: "end",
1435
- children: /* @__PURE__ */ F(_, { value: i.getUsageCount(e) })
1435
+ children: /* @__PURE__ */ z(l, { value: o.getUsageCount(e) })
1436
1436
  }),
1437
- /* @__PURE__ */ F(C, { children: /* @__PURE__ */ F(u, {
1437
+ /* @__PURE__ */ z(A, { children: /* @__PURE__ */ z(r, {
1438
1438
  tone: "neutral",
1439
- buttonStyle: "ghost",
1440
- "aria-label": d.assetAction(d.details, a),
1439
+ appearance: "ghost",
1440
+ "aria-label": g.assetAction(g.details, a),
1441
1441
  onClick: (e) => {
1442
- e.currentTarget.focus(), s(t);
1442
+ e.currentTarget.focus(), p(n);
1443
1443
  },
1444
- children: d.details
1444
+ children: g.details
1445
1445
  }) })
1446
1446
  ]
1447
- }, t);
1447
+ }, n);
1448
1448
  }) })]
1449
1449
  });
1450
1450
  }
1451
1451
  //#endregion
1452
1452
  //#region src/components/features/media-library/media-library-views.tsx
1453
- function Xe({ items: t, selectedSet: n, accessors: r, strings: i, onToggle: a, onDetails: o, density: s = "comfortable", selectionMode: c = "multiple", showMeta: l = !0, renderItem: u, className: d }) {
1454
- return /* @__PURE__ */ F("div", {
1455
- "data-media-density": s,
1456
- className: e("media-library-grid--component", B.grid, d),
1457
- children: t.map((e) => {
1458
- let t = r.getId(e), d = n.has(t), f = () => a(t), p = () => o(t);
1459
- return u ? /* @__PURE__ */ F("div", { children: u(e, {
1460
- id: t,
1453
+ function Ye({ items: e, selectedSet: t, accessors: r, strings: i, onToggle: a, onDetails: o, size: s = "default", selectionMode: c = "multiple", showMeta: l = !0, renderItem: u, className: d }) {
1454
+ return /* @__PURE__ */ z("div", {
1455
+ "data-size": s,
1456
+ className: n("media-library-grid--component", U.grid, d),
1457
+ children: e.map((e) => {
1458
+ let n = r.getId(e), d = t.has(n), f = () => a(n), p = () => o(n);
1459
+ return u ? /* @__PURE__ */ z("div", { children: u(e, {
1460
+ id: n,
1461
1461
  selected: d,
1462
1462
  accessors: r,
1463
1463
  selectionMode: c,
1464
1464
  toggle: f,
1465
1465
  openDetails: p
1466
- }) }, t) : /* @__PURE__ */ F(Ke, {
1466
+ }) }, n) : /* @__PURE__ */ z(Ge, {
1467
1467
  item: e,
1468
1468
  selected: d,
1469
- density: s,
1469
+ size: s,
1470
1470
  selectionMode: c,
1471
1471
  showMeta: l,
1472
1472
  accessors: r,
1473
1473
  strings: i,
1474
1474
  onToggle: f,
1475
1475
  onDetails: p
1476
- }, t);
1476
+ }, n);
1477
1477
  })
1478
1478
  });
1479
1479
  }
1480
- function Ze({ visibleCount: t, totalCount: r, selectedVisibleCount: i, onSelectVisible: a, onDeselectVisible: o, status: s, disabled: c, strings: l, className: u }) {
1481
- let d = te(L, l), f = t > 0 && i === t;
1482
- return /* @__PURE__ */ I("div", {
1483
- className: e("media-library-selection-bar--component", B.selectionBar, u),
1484
- children: [/* @__PURE__ */ F(n, {
1480
+ function Xe({ visibleCount: e, totalCount: r, selectedVisibleCount: i, onSelectVisible: o, onDeselectVisible: s, status: c, disabled: l, strings: u, className: d }) {
1481
+ let f = a(V, u), p = e > 0 && i === e;
1482
+ return /* @__PURE__ */ B("div", {
1483
+ className: n("media-library-selection-bar--component", U.selectionBar, d),
1484
+ children: [/* @__PURE__ */ z(t, {
1485
1485
  size: "xs",
1486
1486
  type: "secondary",
1487
1487
  role: "status",
1488
1488
  "aria-live": "polite",
1489
1489
  "aria-atomic": "true",
1490
- children: s ?? d.showingCount(t, r)
1491
- }), a && o && /* @__PURE__ */ F(ce, {
1492
- checked: f,
1493
- indeterminate: !f && i > 0,
1494
- disabled: c || t === 0,
1495
- label: f ? d.deselectVisible : d.selectVisible,
1496
- onChange: () => f ? o() : a()
1490
+ children: c ?? f.showingCount(e, r)
1491
+ }), o && s && /* @__PURE__ */ z(S, {
1492
+ checked: p,
1493
+ indeterminate: !p && i > 0,
1494
+ disabled: l || e === 0,
1495
+ label: p ? f.deselectVisible : f.selectVisible,
1496
+ onChange: () => p ? s() : o()
1497
1497
  })]
1498
1498
  });
1499
1499
  }
1500
1500
  //#endregion
1501
1501
  //#region src/components/features/media-library/media-library.tsx
1502
- var q = [
1502
+ var J = [
1503
1503
  "all",
1504
1504
  "image",
1505
1505
  "video",
1506
1506
  "file"
1507
1507
  ];
1508
- function Qe({ title: t, description: n, confirmLabel: s, cancelLabel: c, density: f = "comfortable", showMeta: p = !0, allowUpload: m = !0, typeFilters: h = q, confirmOnSelect: g = !1, onConfirm: _, onCancel: v, onClose: y, bulkActions: ee, strings: b, slots: x, className: ne, collections: S = [], selectionMode: C = "multiple", ...w }) {
1509
- let T = M(() => te(L, b), [b]), { items: E, fetcher: D, accessors: oe, value: se, defaultValue: ce, onValueChange: k, onItemUpdate: ue, applyItemPatch: de, onItemDelete: A, onUpload: fe, onError: pe, tab: me, defaultTab: he, onTabChange: ge, view: _e, defaultView: ve, onViewChange: ye, query: be, defaultQuery: xe, onQueryChange: Se, type: Ce, defaultType: we, onTypeChange: Te, collection: j, defaultCollection: Ee, onCollectionChange: N, sort: P, defaultSort: De, onSortChange: Oe, uploadOptions: ke, defaultUploadOptions: Ae, onUploadOptionsChange: je, ...Me } = w, R = Ve({
1510
- items: E,
1511
- fetcher: D,
1512
- accessors: oe,
1513
- value: se,
1514
- defaultValue: ce,
1515
- onValueChange: k,
1516
- onItemUpdate: ue,
1517
- applyItemPatch: de,
1518
- onItemDelete: A,
1519
- onUpload: fe,
1520
- onError: pe,
1521
- tab: me,
1522
- defaultTab: he,
1523
- onTabChange: ge,
1524
- view: _e,
1525
- defaultView: ve,
1526
- onViewChange: ye,
1527
- query: be,
1528
- defaultQuery: xe,
1529
- onQueryChange: Se,
1530
- type: Ce,
1531
- defaultType: we,
1532
- onTypeChange: Te,
1533
- collection: j,
1534
- defaultCollection: Ee,
1535
- onCollectionChange: N,
1536
- sort: P,
1537
- defaultSort: De,
1538
- onSortChange: Oe,
1539
- uploadOptions: ke,
1540
- defaultUploadOptions: Ae,
1541
- onUploadOptionsChange: je,
1542
- collections: S,
1543
- selectionMode: C
1544
- }), { tab: z, setTab: Ne, view: Pe, setView: Fe, query: Ie, setQuery: Le, type: Re, setType: ze, collection: Be, setCollection: He, sort: V, setSort: We, detailId: Ge, setDetailId: Ke, visibleItems: W, selectedIds: G, selectedItems: Qe, selectedSet: J, toggleSelection: $e, clearSelection: et, clearFilters: Y, loading: tt, hasFilters: nt, totalCount: X, filteredCount: Z, accessors: Q, fetchError: rt, refetch: $ } = R, it = M(() => R.items.find((e) => Q.getId(e) === Ge) ?? null, [
1508
+ function Ze({ title: e, description: t, confirmLabel: i, cancelLabel: o, size: s = "default", showMeta: c = !0, allowUpload: l = !0, typeFilters: u = J, confirmOnSelect: d = !1, onConfirm: _, onCancel: v, onClose: b, bulkActions: x, strings: te, slots: S, className: ne, collections: C = [], selectionMode: w = "multiple", ...O }) {
1509
+ let k = I(() => a(V, te), [te]), { items: A, fetcher: ie, accessors: ae, value: j, defaultValue: M, onValueChange: oe, onItemUpdate: se, applyItemPatch: ce, onItemDelete: N, onUpload: le, onError: ue, tab: de, defaultTab: fe, onTabChange: pe, view: me, defaultView: he, onViewChange: ge, query: _e, defaultQuery: ve, onQueryChange: ye, type: be, defaultType: xe, onTypeChange: Se, collection: P, defaultCollection: F, onCollectionChange: L, sort: R, defaultSort: Ce, onSortChange: we, uploadOptions: Te, defaultUploadOptions: Ee, onUploadOptionsChange: De, ...Oe } = O, H = Re({
1510
+ items: A,
1511
+ fetcher: ie,
1512
+ accessors: ae,
1513
+ value: j,
1514
+ defaultValue: M,
1515
+ onValueChange: oe,
1516
+ onItemUpdate: se,
1517
+ applyItemPatch: ce,
1518
+ onItemDelete: N,
1519
+ onUpload: le,
1520
+ onError: ue,
1521
+ tab: de,
1522
+ defaultTab: fe,
1523
+ onTabChange: pe,
1524
+ view: me,
1525
+ defaultView: he,
1526
+ onViewChange: ge,
1527
+ query: _e,
1528
+ defaultQuery: ve,
1529
+ onQueryChange: ye,
1530
+ type: be,
1531
+ defaultType: xe,
1532
+ onTypeChange: Se,
1533
+ collection: P,
1534
+ defaultCollection: F,
1535
+ onCollectionChange: L,
1536
+ sort: R,
1537
+ defaultSort: Ce,
1538
+ onSortChange: we,
1539
+ uploadOptions: Te,
1540
+ defaultUploadOptions: Ee,
1541
+ onUploadOptionsChange: De,
1542
+ collections: C,
1543
+ selectionMode: w
1544
+ }), { tab: ke, setTab: Ae, view: je, setView: Me, query: Ne, setQuery: Pe, type: Fe, setType: Ie, collection: Le, setCollection: ze, sort: Be, setSort: He, detailId: Ue, setDetailId: Ge, visibleItems: G, selectedIds: K, selectedItems: Ze, selectedSet: Y, toggleSelection: Qe, clearSelection: $e, clearFilters: X, loading: et, hasFilters: tt, totalCount: Z, filteredCount: nt, accessors: Q, fetchError: rt, refetch: $ } = H, it = I(() => H.items.find((e) => Q.getId(e) === Ue) ?? null, [
1545
1545
  Q,
1546
- Ge,
1547
- R.items
1548
- ]), at = !g && !!_, ot = (e) => {
1549
- if ($e(e), !g) return;
1550
- let t = R.items.find((t) => Q.getId(t) === e);
1551
- t && _?.([t], [e]), y?.();
1552
- }, st = tt && W.length === 0 ? x?.loading ?? /* @__PURE__ */ F(o, {
1553
- label: T.loading,
1546
+ Ue,
1547
+ H.items
1548
+ ]), at = !d && !!_, ot = (e) => {
1549
+ if (Qe(e), !d) return;
1550
+ let t = H.items.find((t) => Q.getId(t) === e);
1551
+ t && _?.([t], [e]), b?.();
1552
+ }, st = et && G.length === 0 ? S?.loading ?? /* @__PURE__ */ z(g, {
1553
+ label: k.loading,
1554
1554
  "aria-hidden": "true",
1555
1555
  "aria-live": "off",
1556
- className: B.emptyState
1557
- }) : rt && W.length === 0 ? x?.error ?? /* @__PURE__ */ F(l, {
1558
- title: T.error,
1556
+ className: U.emptyState
1557
+ }) : rt && G.length === 0 ? S?.error ?? /* @__PURE__ */ z(y, {
1558
+ title: k.error,
1559
1559
  description: !1,
1560
- className: B.emptyState,
1560
+ className: U.emptyState,
1561
1561
  onRetry: rt ? $ : void 0,
1562
- strings: { retry: T.retry }
1563
- }) : W.length === 0 ? x?.empty ?? /* @__PURE__ */ F(H, {
1564
- title: nt ? T.emptyFilteredTitle : T.emptyTitle,
1565
- description: nt ? T.emptyFilteredDescription : T.emptyDescription,
1566
- action: nt ? /* @__PURE__ */ F(u, {
1562
+ strings: { retry: k.retry }
1563
+ }) : G.length === 0 ? S?.empty ?? /* @__PURE__ */ z(We, {
1564
+ title: tt ? k.emptyFilteredTitle : k.emptyTitle,
1565
+ description: tt ? k.emptyFilteredDescription : k.emptyDescription,
1566
+ action: tt ? /* @__PURE__ */ z(r, {
1567
1567
  type: "button",
1568
1568
  tone: "neutral",
1569
- buttonStyle: "outline",
1570
- onClick: Y,
1571
- children: T.clearFilters
1569
+ appearance: "outline",
1570
+ onClick: X,
1571
+ children: k.clearFilters
1572
1572
  }) : void 0
1573
- }) : Pe === "table" || Pe === "list" ? /* @__PURE__ */ F(Pe === "table" ? K : qe, {
1574
- collections: S,
1575
- items: W,
1576
- selectedSet: J,
1577
- selectionMode: C,
1573
+ }) : je === "table" || je === "list" ? /* @__PURE__ */ z(je === "table" ? q : Ke, {
1574
+ collections: C,
1575
+ items: G,
1576
+ selectedSet: Y,
1577
+ selectionMode: w,
1578
1578
  accessors: Q,
1579
- strings: T,
1579
+ strings: k,
1580
1580
  onToggle: ot,
1581
- onDetails: Ke
1582
- }) : /* @__PURE__ */ F(Xe, {
1583
- items: W,
1584
- selectedSet: J,
1585
- selectionMode: C,
1581
+ onDetails: Ge
1582
+ }) : /* @__PURE__ */ z(Ye, {
1583
+ items: G,
1584
+ selectedSet: Y,
1585
+ selectionMode: w,
1586
1586
  accessors: Q,
1587
- strings: T,
1587
+ strings: k,
1588
1588
  onToggle: ot,
1589
- onDetails: Ke,
1590
- density: f,
1591
- showMeta: p,
1592
- renderItem: x?.renderItem
1593
- }), ct = /* @__PURE__ */ I("div", {
1594
- className: B.browse,
1589
+ onDetails: Ge,
1590
+ size: s,
1591
+ showMeta: c,
1592
+ renderItem: S?.renderItem
1593
+ }), ct = /* @__PURE__ */ B("div", {
1594
+ className: U.browse,
1595
1595
  children: [
1596
- /* @__PURE__ */ F(U, {
1597
- query: Ie,
1598
- onQueryChange: Le,
1599
- type: Re,
1600
- onTypeChange: ze,
1601
- typeFilters: h,
1602
- collection: Be,
1603
- onCollectionChange: He,
1604
- collections: S,
1605
- sort: V,
1606
- onSortChange: We,
1607
- view: Pe,
1608
- onViewChange: Fe,
1609
- hasFilters: nt,
1610
- onClearFilters: Y,
1611
- strings: T,
1612
- end: x?.toolbarEnd
1596
+ /* @__PURE__ */ z(W, {
1597
+ query: Ne,
1598
+ onQueryChange: Pe,
1599
+ type: Fe,
1600
+ onTypeChange: Ie,
1601
+ typeFilters: u,
1602
+ collection: Le,
1603
+ onCollectionChange: ze,
1604
+ collections: C,
1605
+ sort: Be,
1606
+ onSortChange: He,
1607
+ view: je,
1608
+ onViewChange: Me,
1609
+ hasFilters: tt,
1610
+ onClearFilters: X,
1611
+ strings: k,
1612
+ end: S?.toolbarEnd
1613
1613
  }),
1614
- /* @__PURE__ */ F(Ze, {
1615
- visibleCount: Z,
1616
- totalCount: X,
1617
- selectedVisibleCount: W.filter((e) => J.has(Q.getId(e))).length,
1618
- onSelectVisible: C === "multiple" ? R.selectVisible : void 0,
1619
- onDeselectVisible: C === "multiple" ? R.deselectVisible : void 0,
1620
- disabled: tt,
1621
- status: tt ? T.loading : void 0,
1622
- strings: T
1614
+ /* @__PURE__ */ z(Xe, {
1615
+ visibleCount: nt,
1616
+ totalCount: Z,
1617
+ selectedVisibleCount: G.filter((e) => Y.has(Q.getId(e))).length,
1618
+ onSelectVisible: w === "multiple" ? H.selectVisible : void 0,
1619
+ onDeselectVisible: w === "multiple" ? H.deselectVisible : void 0,
1620
+ disabled: et,
1621
+ status: et ? k.loading : void 0,
1622
+ strings: k
1623
1623
  }),
1624
- rt && W.length > 0 ? /* @__PURE__ */ I(a, {
1624
+ rt && G.length > 0 ? /* @__PURE__ */ B(h, {
1625
1625
  tone: "warning",
1626
1626
  role: "alert",
1627
- children: [/* @__PURE__ */ F(r, { children: T.refreshError }), /* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(u, {
1627
+ children: [/* @__PURE__ */ z(p, { children: k.refreshError }), /* @__PURE__ */ z(m, { children: /* @__PURE__ */ z(r, {
1628
1628
  tone: "neutral",
1629
- buttonStyle: "outline",
1629
+ appearance: "outline",
1630
1630
  onClick: $,
1631
- children: T.retry
1631
+ children: k.retry
1632
1632
  }) })]
1633
1633
  }) : null,
1634
- /* @__PURE__ */ I("div", {
1635
- className: B.workspace,
1634
+ /* @__PURE__ */ B("div", {
1635
+ className: U.workspace,
1636
1636
  "data-detail": it ? "" : void 0,
1637
- children: [/* @__PURE__ */ F("div", {
1638
- className: e("media-library--results", B.results),
1639
- "aria-busy": tt,
1637
+ children: [/* @__PURE__ */ z("div", {
1638
+ className: n("media-library--results", U.results),
1639
+ "aria-busy": et,
1640
1640
  children: st
1641
- }), !!it && /* @__PURE__ */ F(Ue, {
1641
+ }), !!it && /* @__PURE__ */ z(Ve, {
1642
1642
  item: it,
1643
- collections: S,
1643
+ collections: C,
1644
1644
  accessors: Q,
1645
- strings: T,
1646
- onClose: () => Ke(null),
1647
- onUpdate: (e) => R.updateItem(it, e),
1648
- onRemove: () => R.removeItem(it),
1649
- renderDetail: x?.renderDetail
1650
- }, Ge)]
1645
+ strings: k,
1646
+ onClose: () => Ge(null),
1647
+ onUpdate: (e) => H.updateItem(it, e),
1648
+ onRemove: () => H.removeItem(it),
1649
+ renderDetail: S?.renderDetail
1650
+ }, Ue)]
1651
1651
  })
1652
1652
  ]
1653
1653
  });
1654
- return /* @__PURE__ */ I("section", {
1655
- ...Me,
1654
+ return /* @__PURE__ */ B("section", {
1655
+ ...Oe,
1656
1656
  "data-slot": "media-library",
1657
- className: e("media-library--component", B.root, ne),
1657
+ className: n("media-library--component", U.root, ne),
1658
1658
  children: [
1659
- !!(t || n || x?.headerStart || x?.headerEnd) && /* @__PURE__ */ I("header", {
1660
- className: B.header,
1661
- children: [x?.headerStart, !!(t || n || x?.headerEnd) && /* @__PURE__ */ F(d, {
1659
+ !!(e || t || S?.headerStart || S?.headerEnd) && /* @__PURE__ */ B("header", {
1660
+ className: U.header,
1661
+ children: [S?.headerStart, !!(e || t || S?.headerEnd) && /* @__PURE__ */ z(ee, {
1662
1662
  surface: "plain",
1663
- title: t || void 0,
1664
- description: n || void 0,
1665
- headerEnd: x?.headerEnd
1663
+ title: e || void 0,
1664
+ description: t || void 0,
1665
+ headerEnd: S?.headerEnd
1666
1666
  })]
1667
1667
  }),
1668
- m && fe ? /* @__PURE__ */ I(O, {
1669
- value: z,
1670
- onValueChange: (e) => Ne(e),
1671
- className: B.libraryTabs,
1668
+ l && le ? /* @__PURE__ */ B(E, {
1669
+ value: ke,
1670
+ onValueChange: (e) => Ae(e),
1671
+ className: U.libraryTabs,
1672
1672
  children: [
1673
- /* @__PURE__ */ I(re, {
1674
- className: B.libraryTabList,
1675
- children: [/* @__PURE__ */ F(ae, {
1673
+ /* @__PURE__ */ B(re, {
1674
+ className: U.libraryTabList,
1675
+ children: [/* @__PURE__ */ z(D, {
1676
1676
  value: "library",
1677
- children: T.tabs.library
1678
- }), /* @__PURE__ */ F(ae, {
1677
+ children: k.tabs.library
1678
+ }), /* @__PURE__ */ z(D, {
1679
1679
  value: "upload",
1680
- children: T.tabs.upload
1680
+ children: k.tabs.upload
1681
1681
  })]
1682
1682
  }),
1683
- /* @__PURE__ */ F(ie, {
1683
+ /* @__PURE__ */ z(T, {
1684
1684
  value: "library",
1685
- className: B.libraryTabPanel,
1685
+ className: U.libraryTabPanel,
1686
1686
  children: ct
1687
1687
  }),
1688
- /* @__PURE__ */ F(ie, {
1688
+ /* @__PURE__ */ z(T, {
1689
1689
  value: "upload",
1690
- className: B.libraryTabPanel,
1691
- children: /* @__PURE__ */ F(Je, {
1692
- stagedFiles: R.stagedFiles,
1693
- uploading: R.uploading,
1694
- uploadOptions: R.uploadOptions,
1695
- collections: S,
1696
- strings: T,
1697
- onAddFiles: R.addFiles,
1698
- onRemoveFile: R.removeStagedFile,
1699
- onClear: R.clearStagedFiles,
1700
- onOptionsChange: R.updateUploadOptions,
1701
- onStart: () => void R.startUpload(),
1702
- onCancel: R.cancelUpload,
1703
- empty: x?.uploadEmpty,
1690
+ className: U.libraryTabPanel,
1691
+ children: /* @__PURE__ */ z(qe, {
1692
+ stagedFiles: H.stagedFiles,
1693
+ uploading: H.uploading,
1694
+ uploadOptions: H.uploadOptions,
1695
+ collections: C,
1696
+ strings: k,
1697
+ onAddFiles: H.addFiles,
1698
+ onRemoveFile: H.removeStagedFile,
1699
+ onClear: H.clearStagedFiles,
1700
+ onOptionsChange: H.updateUploadOptions,
1701
+ onStart: () => void H.startUpload(),
1702
+ onCancel: H.cancelUpload,
1703
+ empty: S?.uploadEmpty,
1704
1704
  showActions: !at
1705
1705
  })
1706
1706
  })
1707
1707
  ]
1708
1708
  }) : ct,
1709
- x?.footer,
1710
- !!ee && !at && /* @__PURE__ */ F(le, {
1711
- selectedCount: G.length,
1712
- totalCount: X,
1713
- onClear: et,
1709
+ S?.footer,
1710
+ !!x && !at && /* @__PURE__ */ z(f, {
1711
+ selectedCount: K.length,
1712
+ totalCount: Z,
1713
+ onClear: $e,
1714
1714
  strings: {
1715
- summary: (e) => T.selectedCount(e),
1716
- clear: T.clearSelection
1715
+ summary: (e) => k.selectedCount(e),
1716
+ clear: k.clearSelection
1717
1717
  },
1718
- children: ee({
1719
- selectedItems: Qe,
1720
- selectedIds: G,
1721
- selectedCount: G.length,
1722
- visibleCount: Z,
1723
- totalCount: X,
1724
- clearSelection: et
1718
+ children: x({
1719
+ selectedItems: Ze,
1720
+ selectedIds: K,
1721
+ selectedCount: K.length,
1722
+ visibleCount: nt,
1723
+ totalCount: Z,
1724
+ clearSelection: $e
1725
1725
  })
1726
1726
  }),
1727
- at && /* @__PURE__ */ F(Ye, {
1728
- tab: z,
1729
- selectedItems: Qe,
1730
- selectedIds: G,
1731
- selectionMode: C,
1732
- stagedFiles: R.stagedFiles,
1733
- uploading: R.uploading,
1734
- strings: T,
1735
- visibleCount: Z,
1736
- totalCount: X,
1737
- confirmLabel: s,
1738
- cancelLabel: c,
1739
- onClearSelection: G.length > 0 ? et : void 0,
1727
+ at && /* @__PURE__ */ z(Je, {
1728
+ tab: ke,
1729
+ selectedItems: Ze,
1730
+ selectedIds: K,
1731
+ selectionMode: w,
1732
+ stagedFiles: H.stagedFiles,
1733
+ uploading: H.uploading,
1734
+ strings: k,
1735
+ visibleCount: nt,
1736
+ totalCount: Z,
1737
+ confirmLabel: i,
1738
+ cancelLabel: o,
1739
+ onClearSelection: K.length > 0 ? $e : void 0,
1740
1740
  onCancel: () => {
1741
- v?.(), y?.();
1741
+ v?.(), b?.();
1742
1742
  },
1743
1743
  onConfirm: () => {
1744
- _(Qe, G), y?.();
1744
+ _(Ze, K), b?.();
1745
1745
  },
1746
- onUpload: () => void R.startUpload(),
1746
+ onUpload: () => void H.startUpload(),
1747
1747
  onCancelUpload: () => {
1748
- R.uploading ? R.cancelUpload() : (v?.(), y?.());
1748
+ H.uploading ? H.cancelUpload() : (v?.(), b?.());
1749
1749
  }
1750
1750
  })
1751
1751
  ]
1752
1752
  });
1753
1753
  }
1754
- function J({ open: t, onOpenChange: n, trigger: r, dialogTitle: i, dialogDescription: a, dialogClassName: o, contentClassName: s, closeOnEscape: c, closeOnBackdropClick: l, onClose: u, strings: d, ...f }) {
1755
- let p = te(L, d);
1756
- return /* @__PURE__ */ F(ue, {
1757
- open: t,
1758
- onOpenChange: n,
1754
+ function Y({ open: e, onOpenChange: t, trigger: r, dialogTitle: i, dialogDescription: o, dialogClassName: s, contentClassName: c, closeOnEscape: l, closeOnBackdropClick: u, onClose: d, strings: f, ...p }) {
1755
+ let m = a(V, f);
1756
+ return /* @__PURE__ */ z(se, {
1757
+ open: e,
1758
+ onOpenChange: t,
1759
1759
  trigger: r,
1760
- title: i ?? p.title,
1761
- description: a ?? p.description,
1760
+ title: i ?? m.title,
1761
+ description: o ?? m.description,
1762
1762
  width: "xl",
1763
- closeOnEscape: c,
1764
- closeOnBackdropClick: l,
1763
+ closeOnEscape: l,
1764
+ closeOnBackdropClick: u,
1765
1765
  showCancel: !1,
1766
1766
  showConfirm: !1,
1767
- className: e("media-library-dialog--component", o),
1768
- contentClassName: s,
1769
- children: /* @__PURE__ */ F(Qe, {
1770
- ...f,
1771
- strings: d,
1767
+ className: n("media-library-dialog--component", s),
1768
+ contentClassName: c,
1769
+ children: /* @__PURE__ */ z(Ze, {
1770
+ ...p,
1771
+ strings: f,
1772
1772
  onClose: () => {
1773
- u?.(), n?.(!1);
1773
+ d?.(), t?.(!1);
1774
1774
  }
1775
1775
  })
1776
1776
  });
1777
1777
  }
1778
1778
  //#endregion
1779
1779
  //#region src/components/features/media-library/media-resource-gallery.tsx
1780
- function $e({ items: t, accessors: r, title: i, description: a, primaryId: o, onPrimaryChange: c, onRemove: l, onReorder: f, onAdd: p, maxItems: m, layout: h = "grid", density: g = "comfortable", readOnly: _ = !1, empty: v, action: ee, renderItem: b, strings: x, className: ne, ...S }) {
1781
- let C = te(L, x), w = Me(r), T = m !== void 0 && t.length >= m, E = !_ && !!p && !T, D = (e, n) => {
1782
- if (n < 0 || n >= t.length) return;
1783
- let r = [...t], [i] = r.splice(e, 1);
1780
+ function Qe({ items: e, accessors: i, title: o, description: s, primaryId: c, onPrimaryChange: l, onRemove: u, onReorder: f, onAdd: p, maxItems: m, layout: h = "grid", size: g = "default", readOnly: v = !1, empty: y, action: b, renderItem: x, strings: te, className: S, ...ne }) {
1781
+ let C = a(V, te), w = Oe(i), re = m !== void 0 && e.length >= m, T = !v && !!p && !re, E = (t, n) => {
1782
+ if (n < 0 || n >= e.length) return;
1783
+ let r = [...e], [i] = r.splice(t, 1);
1784
1784
  i && (r.splice(n, 0, i), f?.(r.map((e) => w.getId(e)), r));
1785
1785
  };
1786
- return /* @__PURE__ */ I("section", {
1786
+ return /* @__PURE__ */ B("section", {
1787
1787
  "data-slot": "media-resource-gallery",
1788
- className: e("media-resource-gallery--component", B.gallery, ne),
1789
- ...S,
1790
- children: [!!(i || a || ee || E) && /* @__PURE__ */ F(d, {
1791
- title: i || void 0,
1792
- description: a || void 0,
1793
- headerEnd: /* @__PURE__ */ I("div", {
1794
- className: B.galleryActions,
1788
+ className: n("media-resource-gallery--component", U.gallery, S),
1789
+ ...ne,
1790
+ children: [!!(o || s || b || T) && /* @__PURE__ */ z(ee, {
1791
+ title: o || void 0,
1792
+ description: s || void 0,
1793
+ headerEnd: /* @__PURE__ */ B("div", {
1794
+ className: U.galleryActions,
1795
1795
  children: [
1796
- ee,
1797
- E && /* @__PURE__ */ I(u, {
1796
+ b,
1797
+ T && /* @__PURE__ */ B(r, {
1798
1798
  type: "button",
1799
1799
  tone: "neutral",
1800
- buttonStyle: "outline",
1800
+ appearance: "outline",
1801
1801
  onClick: p,
1802
- children: [/* @__PURE__ */ F(be, {}), C.gallery.add]
1802
+ children: [/* @__PURE__ */ z(_e, {}), C.gallery.add]
1803
1803
  }),
1804
- T && m !== void 0 && /* @__PURE__ */ F(n, {
1804
+ re && m !== void 0 && /* @__PURE__ */ z(t, {
1805
1805
  size: "xs",
1806
1806
  type: "secondary",
1807
1807
  children: C.gallery.limitReached(m)
1808
1808
  })
1809
1809
  ]
1810
1810
  })
1811
- }), t.length === 0 ? v ?? /* @__PURE__ */ F(s, {
1811
+ }), e.length === 0 ? y ?? /* @__PURE__ */ z(_, {
1812
1812
  title: C.gallery.emptyTitle,
1813
1813
  description: C.gallery.emptyDescription,
1814
- padding: "md",
1815
1814
  border: !0,
1816
- action: E ? /* @__PURE__ */ F(u, {
1815
+ action: T ? /* @__PURE__ */ z(r, {
1817
1816
  type: "button",
1818
1817
  tone: "neutral",
1819
- buttonStyle: "outline",
1818
+ appearance: "outline",
1820
1819
  onClick: p,
1821
1820
  children: C.gallery.add
1822
1821
  }) : void 0
1823
- }) : /* @__PURE__ */ F("ul", {
1822
+ }) : /* @__PURE__ */ z("ul", {
1824
1823
  "data-layout": h,
1825
- "data-media-density": g,
1826
- className: B.galleryList,
1827
- children: t.map((e, n) => {
1828
- let r = w.getId(e), i = r === o, a = {
1829
- id: r,
1824
+ "data-size": g,
1825
+ className: U.galleryList,
1826
+ children: e.map((t, n) => {
1827
+ let i = w.getId(t), a = i === c, o = {
1828
+ id: i,
1830
1829
  index: n,
1831
- total: t.length,
1832
- primary: i,
1830
+ total: e.length,
1831
+ primary: a,
1833
1832
  accessors: w,
1834
1833
  canMovePrevious: n > 0,
1835
- canMoveNext: n < t.length - 1,
1836
- setPrimary: () => c?.(r, e),
1837
- remove: () => l?.(r, e),
1838
- movePrevious: () => D(n, n - 1),
1839
- moveNext: () => D(n, n + 1)
1834
+ canMoveNext: n < e.length - 1,
1835
+ setPrimary: () => l?.(i, t),
1836
+ remove: () => u?.(i, t),
1837
+ movePrevious: () => E(n, n - 1),
1838
+ moveNext: () => E(n, n + 1)
1840
1839
  };
1841
- return b ? /* @__PURE__ */ F("li", { children: b(e, a) }, r) : /* @__PURE__ */ I("li", {
1842
- "data-primary": i || void 0,
1843
- className: B.galleryItem,
1840
+ return x ? /* @__PURE__ */ z("li", { children: x(t, o) }, i) : /* @__PURE__ */ B("li", {
1841
+ "data-primary": a || void 0,
1842
+ className: U.galleryItem,
1844
1843
  children: [
1845
- /* @__PURE__ */ F(V, {
1846
- item: e,
1844
+ /* @__PURE__ */ z(Be, {
1845
+ item: t,
1847
1846
  accessors: w,
1848
- className: B.galleryPreview
1847
+ className: U.galleryPreview
1849
1848
  }),
1850
- i && /* @__PURE__ */ F(y, {
1849
+ a && /* @__PURE__ */ z(d, {
1851
1850
  tone: "primary",
1852
- className: B.galleryBadge,
1851
+ appearance: "solid",
1852
+ className: U.galleryBadge,
1853
1853
  children: C.gallery.primary
1854
1854
  }),
1855
- !_ && /* @__PURE__ */ I("div", {
1856
- className: B.galleryControls,
1855
+ !v && /* @__PURE__ */ B("div", {
1856
+ className: U.galleryControls,
1857
1857
  children: [
1858
- !!f && /* @__PURE__ */ I(De, { children: [/* @__PURE__ */ F(u, {
1858
+ !!f && /* @__PURE__ */ B(Ce, { children: [/* @__PURE__ */ z(r, {
1859
1859
  type: "button",
1860
1860
  tone: "neutral",
1861
- buttonStyle: "ghost",
1861
+ appearance: "ghost",
1862
1862
  iconOnly: !0,
1863
1863
  "aria-label": C.gallery.moveEarlier,
1864
- disabled: !a.canMovePrevious,
1865
- onClick: a.movePrevious,
1866
- children: /* @__PURE__ */ F(fe, {})
1867
- }), /* @__PURE__ */ F(u, {
1864
+ disabled: !o.canMovePrevious,
1865
+ onClick: o.movePrevious,
1866
+ children: /* @__PURE__ */ z(le, {})
1867
+ }), /* @__PURE__ */ z(r, {
1868
1868
  type: "button",
1869
1869
  tone: "neutral",
1870
- buttonStyle: "ghost",
1870
+ appearance: "ghost",
1871
1871
  iconOnly: !0,
1872
1872
  "aria-label": C.gallery.moveLater,
1873
- disabled: !a.canMoveNext,
1874
- onClick: a.moveNext,
1875
- children: /* @__PURE__ */ F(pe, {})
1873
+ disabled: !o.canMoveNext,
1874
+ onClick: o.moveNext,
1875
+ children: /* @__PURE__ */ z(ue, {})
1876
1876
  })] }),
1877
- !!c && !i && /* @__PURE__ */ F(u, {
1877
+ !!l && !a && /* @__PURE__ */ z(r, {
1878
1878
  type: "button",
1879
1879
  tone: "neutral",
1880
- buttonStyle: "ghost",
1880
+ appearance: "ghost",
1881
1881
  iconOnly: !0,
1882
1882
  "aria-label": C.gallery.makePrimary,
1883
- onClick: a.setPrimary,
1884
- children: /* @__PURE__ */ F(Se, {})
1883
+ onClick: o.setPrimary,
1884
+ children: /* @__PURE__ */ z(ye, {})
1885
1885
  }),
1886
- !!l && /* @__PURE__ */ F(u, {
1886
+ !!u && /* @__PURE__ */ z(r, {
1887
1887
  type: "button",
1888
1888
  tone: "neutral",
1889
- buttonStyle: "ghost",
1889
+ appearance: "ghost",
1890
1890
  iconOnly: !0,
1891
- "aria-label": `${C.gallery.remove}: ${w.getName(e)}`,
1892
- onClick: a.remove,
1893
- children: /* @__PURE__ */ F(Te, {})
1891
+ "aria-label": `${C.gallery.remove}: ${w.getName(t)}`,
1892
+ onClick: o.remove,
1893
+ children: /* @__PURE__ */ z(Se, {})
1894
1894
  })
1895
1895
  ]
1896
1896
  })
1897
1897
  ]
1898
- }, r);
1898
+ }, i);
1899
1899
  })
1900
1900
  })]
1901
1901
  });
1902
1902
  }
1903
1903
  //#endregion
1904
- export { Qe as MediaLibrary, Ke as MediaLibraryCard, Ue as MediaLibraryDetailPanel, J as MediaLibraryDialog, H as MediaLibraryEmptyState, Ye as MediaLibraryFooter, G as MediaLibraryFooterActions, W as MediaLibraryFooterSummary, Xe as MediaLibraryGrid, qe as MediaLibraryList, Ze as MediaLibrarySelectionBar, K as MediaLibraryTable, U as MediaLibraryToolbar, Je as MediaLibraryUploadPanel, V as MediaPreview, $e as MediaResourceGallery, L as defaultMediaLibraryStrings, R as formatMediaLibrarySize, z as getMediaLibraryDimensions, Me as resolveMediaLibraryAccessors, Ve as useMediaLibrary };
1904
+ export { Ze as MediaLibrary, Ge as MediaLibraryCard, Ve as MediaLibraryDetailPanel, Y as MediaLibraryDialog, We as MediaLibraryEmptyState, Je as MediaLibraryFooter, K as MediaLibraryFooterActions, G as MediaLibraryFooterSummary, Ye as MediaLibraryGrid, Ke as MediaLibraryList, Xe as MediaLibrarySelectionBar, q as MediaLibraryTable, W as MediaLibraryToolbar, qe as MediaLibraryUploadPanel, Be as MediaPreview, Qe as MediaResourceGallery, V as defaultMediaLibraryStrings, H as formatMediaLibrarySize, ke as getMediaLibraryDimensions, Oe as resolveMediaLibraryAccessors, Re as useMediaLibrary };