themelia-react-ui 1.0.1 → 2.0.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 (640) hide show
  1. package/CHANGELOG.md +417 -0
  2. package/README.md +67 -16
  3. package/dist/{accordion-B-5Focs8.js → accordion-CQXVcd7Q.js} +15 -15
  4. package/dist/accordion-CQXVcd7Q.js.map +1 -0
  5. package/dist/action-menu-BTpyPWJ2.js +264 -0
  6. package/dist/action-menu-BTpyPWJ2.js.map +1 -0
  7. package/dist/affordance-geometry.generated-CCIXb2A1.js +68 -0
  8. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
  9. package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-2PQ2fItc.js} +206 -215
  10. package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
  11. package/dist/{app-shell-at8Kt4l_.js → app-shell-BE_j8-AT.js} +11 -10
  12. package/dist/app-shell-BE_j8-AT.js.map +1 -0
  13. package/dist/{attachment-BO2R47wn.js → attachment-q69dlt5Y.js} +14 -14
  14. package/dist/attachment-q69dlt5Y.js.map +1 -0
  15. package/dist/auth-M3vGMgDR.js +723 -0
  16. package/dist/auth-M3vGMgDR.js.map +1 -0
  17. package/dist/{avatar-Bpzty83c.js → avatar-djdaaQ_s.js} +15 -13
  18. package/dist/avatar-djdaaQ_s.js.map +1 -0
  19. package/dist/{badge-BZXZT9wd.js → badge-0tATj-tW.js} +9 -9
  20. package/dist/badge-0tATj-tW.js.map +1 -0
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +3 -2
  27. package/dist/base/cards.js +3 -3
  28. package/dist/base/carousel.js +33 -35
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +246 -222
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +3 -3
  39. package/dist/base/display.js +7 -7
  40. package/dist/base/feedback.js +4 -4
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +94 -92
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +7 -4
  51. package/dist/base/qr-code.js.map +1 -1
  52. package/dist/base/repeaters.js +53 -53
  53. package/dist/base/repeaters.js.map +1 -1
  54. package/dist/base/sheet.js +1 -1
  55. package/dist/base/sidebar.js +1 -1
  56. package/dist/base/signature-pad.js +84 -82
  57. package/dist/base/signature-pad.js.map +1 -1
  58. package/dist/base/skeleton.js +1 -1
  59. package/dist/base/spinner.js +1 -1
  60. package/dist/base/structure.js +1 -1
  61. package/dist/base/table.js +1 -1
  62. package/dist/base/text-inputs.js +2 -2
  63. package/dist/base/toaster.js +7 -7
  64. package/dist/base/toaster.js.map +1 -1
  65. package/dist/base/tree.js +1 -1
  66. package/dist/base/upload-queue.js +1 -1
  67. package/dist/base/upload.js +3 -3
  68. package/dist/base/value-inputs.js +1 -1
  69. package/dist/blocks/admin.js +228 -219
  70. package/dist/blocks/admin.js.map +1 -1
  71. package/dist/blocks/ai.js +182 -212
  72. package/dist/blocks/ai.js.map +1 -1
  73. package/dist/blocks/analytics/usage-card.js +1 -1
  74. package/dist/blocks/analytics.js +665 -620
  75. package/dist/blocks/analytics.js.map +1 -1
  76. package/dist/blocks/collaboration.js +2 -2
  77. package/dist/blocks/commerce/receipt.js +1 -1
  78. package/dist/blocks/commerce.js +1439 -1553
  79. package/dist/blocks/commerce.js.map +1 -1
  80. package/dist/blocks/data-display.js +1 -1
  81. package/dist/blocks/onboarding.js +6 -6
  82. package/dist/blocks/onboarding.js.map +1 -1
  83. package/dist/blocks/planning.js +88 -97
  84. package/dist/blocks/planning.js.map +1 -1
  85. package/dist/blocks/timelines.js +1 -1
  86. package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BG_FfMK4.js} +10 -9
  87. package/dist/breadcrumbs-BG_FfMK4.js.map +1 -0
  88. package/dist/button-BS3KDg00.js +674 -0
  89. package/dist/button-BS3KDg00.js.map +1 -0
  90. package/dist/{button-BS6l5JUw.js → button-R9CCoH7A.js} +3 -3
  91. package/dist/button-R9CCoH7A.js.map +1 -0
  92. package/dist/buttons-DS0ZIwJ_.js +99 -0
  93. package/dist/buttons-DS0ZIwJ_.js.map +1 -0
  94. package/dist/{cards-Cum56XOF.js → cards-QoJ4syG9.js} +12 -12
  95. package/dist/{cards-Cum56XOF.js.map → cards-QoJ4syG9.js.map} +1 -1
  96. package/dist/chart-DwYRKKc-.js +152 -0
  97. package/dist/chart-DwYRKKc-.js.map +1 -0
  98. package/dist/checkbox-B7ygNTYp.js +35 -0
  99. package/dist/checkbox-B7ygNTYp.js.map +1 -0
  100. package/dist/choice-inputs-DrJ17tpL.js +752 -0
  101. package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
  102. package/dist/{code-block-xHKbAJDj.js → code-block-CD0B7M93.js} +27 -27
  103. package/dist/code-block-CD0B7M93.js.map +1 -0
  104. package/dist/{collapsible-DsnktFNv.js → collapsible-oMUGM4tr.js} +3 -3
  105. package/dist/{collapsible-DsnktFNv.js.map → collapsible-oMUGM4tr.js.map} +1 -1
  106. package/dist/{collection-content-C4fthJV_.js → collection-content-Ys-OZOkY.js} +3 -3
  107. package/dist/{collection-content-C4fthJV_.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
  108. package/dist/combobox-6dvVny2q.js +272 -0
  109. package/dist/combobox-6dvVny2q.js.map +1 -0
  110. package/dist/combobox-CB7039j7.js +865 -0
  111. package/dist/combobox-CB7039j7.js.map +1 -0
  112. package/dist/{command-C0xe7u9B.js → command-kPMPjIxJ.js} +35 -31
  113. package/dist/command-kPMPjIxJ.js.map +1 -0
  114. package/dist/{comments-DviPLnwy.js → comments-You0Bzbr.js} +434 -409
  115. package/dist/comments-You0Bzbr.js.map +1 -0
  116. package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
  117. package/dist/components/base/action-menu/action-menu.d.ts +7 -2
  118. package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
  119. package/dist/components/base/badge/badge.d.ts +1 -1
  120. package/dist/components/base/badge/badge.recipes.d.ts +4 -4
  121. package/dist/components/base/buttons/base-button.d.ts +7 -0
  122. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  123. package/dist/components/base/buttons/button.recipes.d.ts +10 -19
  124. package/dist/components/base/buttons/button.variants.d.ts +1 -0
  125. package/dist/components/base/buttons/loader-button.d.ts +3 -1
  126. package/dist/components/base/buttons/text-button.d.ts +2 -2
  127. package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
  128. package/dist/components/base/cards/card.recipes.d.ts +13 -5
  129. package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
  130. package/dist/components/base/cards/smart-card.types.d.ts +1 -1
  131. package/dist/components/base/carousel/carousel.d.ts +3 -1
  132. package/dist/components/base/chart/chart.d.ts +7 -7
  133. package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
  134. package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
  135. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
  136. package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
  137. package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
  138. package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
  139. package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
  140. package/dist/components/base/date-pickers/datepicker.types.d.ts +16 -3
  141. package/dist/components/base/display/alert-dialog.d.ts +8 -2
  142. package/dist/components/base/display/content-block.d.ts +4 -2
  143. package/dist/components/base/display/date-block.d.ts +1 -1
  144. package/dist/components/base/display/dialog.d.ts +12 -5
  145. package/dist/components/base/display/surface-title.d.ts +6 -1
  146. package/dist/components/base/feedback/alert.d.ts +1 -1
  147. package/dist/components/base/feedback/state-display.d.ts +5 -4
  148. package/dist/components/base/forms/form-field.d.ts +1 -0
  149. package/dist/components/base/forms/form-sizing.d.ts +35 -3
  150. package/dist/components/base/forms/workflow.d.ts +2 -0
  151. package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
  152. package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
  153. package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
  154. package/dist/components/base/navigation/language-switcher.d.ts +4 -1
  155. package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
  156. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
  157. package/dist/components/base/navigation/tabs.d.ts +3 -5
  158. package/dist/components/base/popover/popover.recipes.d.ts +3 -3
  159. package/dist/components/base/qr-code/qr-code.d.ts +2 -0
  160. package/dist/components/base/sheet/index.d.ts +29 -1
  161. package/dist/components/base/sheet/sheet.d.ts +14 -5
  162. package/dist/components/base/spinner/spinner.d.ts +3 -2
  163. package/dist/components/base/structure/structure.types.d.ts +1 -1
  164. package/dist/components/base/table/index.d.ts +1 -1
  165. package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
  166. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  167. package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
  168. package/dist/components/base/upload/upload.recipes.d.ts +11 -0
  169. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
  170. package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
  171. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
  172. package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
  173. package/dist/components/blocks/analytics/index.d.ts +1 -1
  174. package/dist/components/blocks/analytics/types.d.ts +1 -1
  175. package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
  176. package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
  177. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  178. package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
  179. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
  180. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
  181. package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
  182. package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
  183. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
  184. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  185. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
  186. package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
  187. package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
  188. package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
  189. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
  190. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
  191. package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
  192. package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
  193. package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
  194. package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
  195. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
  196. package/dist/components/features/combobox/components/error-message.d.ts +1 -1
  197. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
  198. package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
  199. package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
  200. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
  201. package/dist/components/features/media-library/media-library.d.ts +1 -1
  202. package/dist/components/features/media-library/media-library.types.d.ts +9 -1
  203. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  204. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  205. package/dist/components/features/overlays/drawer.d.ts +1 -1
  206. package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
  207. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
  208. package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
  209. package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
  210. package/dist/components/features/overlays/overlays.types.d.ts +46 -22
  211. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  212. package/dist/components/features/products/partials/index.d.ts +1 -1
  213. package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
  214. package/dist/components/features/products/partials/product-tone.d.ts +11 -1
  215. package/dist/components/features/products/products.types.d.ts +2 -1
  216. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
  217. package/dist/components/features/table/data-table.d.ts +1 -1
  218. package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
  219. package/dist/components/features/table/table.types.d.ts +1 -1
  220. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
  221. package/dist/components/layout/auth/auth.types.d.ts +1 -0
  222. package/dist/components/layout/page/index.d.ts +1 -1
  223. package/dist/components/layout/page/page.d.ts +0 -1
  224. package/dist/components/layout/page/page.types.d.ts +62 -6
  225. package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
  226. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  227. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
  228. package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
  229. package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
  230. package/dist/components/primitives/date.d.ts +16 -3
  231. package/dist/components/primitives/dimensions.d.ts +6 -0
  232. package/dist/components/primitives/duration.d.ts +6 -0
  233. package/dist/components/primitives/file-size.d.ts +6 -0
  234. package/dist/components/primitives/index.d.ts +1 -1
  235. package/dist/components/primitives/initials.d.ts +11 -2
  236. package/dist/components/primitives/link.d.ts +7 -0
  237. package/dist/components/primitives/money.d.ts +29 -7
  238. package/dist/components/primitives/number.d.ts +17 -0
  239. package/dist/components/primitives/value-typography.d.ts +54 -0
  240. package/dist/components/primitives/value.d.ts +31 -6
  241. package/dist/components/typography/heading.d.ts +13 -2
  242. package/dist/components/typography/index.d.ts +1 -1
  243. package/dist/components/typography/label.d.ts +3 -0
  244. package/dist/components/typography/running-text.d.ts +12 -0
  245. package/dist/components/typography/text-link.d.ts +23 -1
  246. package/dist/components/typography/text.d.ts +12 -0
  247. package/dist/components/typography/text.styles.d.ts +37 -5
  248. package/dist/components/ui/button.d.ts +1 -1
  249. package/dist/components/ui/checkbox.d.ts +5 -0
  250. package/dist/components/ui/overlay.recipes.d.ts +15 -2
  251. package/dist/components/ui/popover.d.ts +1 -1
  252. package/dist/components/ui/select.d.ts +3 -1
  253. package/dist/components/ui/sidebar.d.ts +1 -1
  254. package/dist/components/ui/switch.d.ts +5 -0
  255. package/dist/components/ui/table.d.ts +2 -1
  256. package/dist/container.recipes-D9t8MHR3.js +27 -0
  257. package/dist/container.recipes-D9t8MHR3.js.map +1 -0
  258. package/dist/{containers-6s-ucRQQ.js → containers-D_L4mTVb.js} +34 -57
  259. package/dist/containers-D_L4mTVb.js.map +1 -0
  260. package/dist/control-group-recipes-DBXmfh2E.js +21 -0
  261. package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
  262. package/dist/{copyable-B7SBXJMr.js → copyable-DDjTeW_j.js} +6 -6
  263. package/dist/{copyable-B7SBXJMr.js.map → copyable-DDjTeW_j.js.map} +1 -1
  264. package/dist/data-display-3xWQUnMA.js +1335 -0
  265. package/dist/data-display-3xWQUnMA.js.map +1 -0
  266. package/dist/date-picker-DrDFj8Lo.js +1527 -0
  267. package/dist/date-picker-DrDFj8Lo.js.map +1 -0
  268. package/dist/date-pickers-CnFCb0n2.js +174 -0
  269. package/dist/date-pickers-CnFCb0n2.js.map +1 -0
  270. package/dist/date-uf3z37Nm.js +144 -0
  271. package/dist/date-uf3z37Nm.js.map +1 -0
  272. package/dist/{display-CFM5myut.js → display-DrdvPwF0.js} +25 -25
  273. package/dist/display-DrdvPwF0.js.map +1 -0
  274. package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-CURh59jb.js} +22 -15
  275. package/dist/dropdown-menu-CURh59jb.js.map +1 -0
  276. package/dist/features/activities.js +177 -163
  277. package/dist/features/activities.js.map +1 -1
  278. package/dist/features/ai-chat.js +187 -183
  279. package/dist/features/ai-chat.js.map +1 -1
  280. package/dist/features/async-preview.js +9 -9
  281. package/dist/features/async-preview.js.map +1 -1
  282. package/dist/features/combobox.js +1 -1
  283. package/dist/features/comments.js +1 -1
  284. package/dist/features/data-view.js +25 -23
  285. package/dist/features/data-view.js.map +1 -1
  286. package/dist/features/email-composer/engine.js +1 -1
  287. package/dist/features/email-composer.js +353 -355
  288. package/dist/features/email-composer.js.map +1 -1
  289. package/dist/features/event-calendar.js +346 -354
  290. package/dist/features/event-calendar.js.map +1 -1
  291. package/dist/features/filters.js +1 -1
  292. package/dist/features/global-search.js +225 -227
  293. package/dist/features/global-search.js.map +1 -1
  294. package/dist/features/kanban.js +29 -29
  295. package/dist/features/kanban.js.map +1 -1
  296. package/dist/features/map.js +59 -58
  297. package/dist/features/map.js.map +1 -1
  298. package/dist/features/media-library.js +898 -900
  299. package/dist/features/media-library.js.map +1 -1
  300. package/dist/features/mentions.js +1 -1
  301. package/dist/features/overlays.js +1 -1
  302. package/dist/features/products.js +1412 -1444
  303. package/dist/features/products.js.map +1 -1
  304. package/dist/features/questionnaire.js +51 -49
  305. package/dist/features/questionnaire.js.map +1 -1
  306. package/dist/features/resource-assignment.js +103 -97
  307. package/dist/features/resource-assignment.js.map +1 -1
  308. package/dist/features/resource.js +13 -13
  309. package/dist/features/resource.js.map +1 -1
  310. package/dist/features/rich-text-editor.js +2 -2
  311. package/dist/features/schema-form.js +187 -183
  312. package/dist/features/schema-form.js.map +1 -1
  313. package/dist/features/suggestions.js +3 -3
  314. package/dist/features/sync.js +7 -7
  315. package/dist/features/sync.js.map +1 -1
  316. package/dist/features/table.js +1 -1
  317. package/dist/features/theme-tweaker.js +508 -503
  318. package/dist/features/theme-tweaker.js.map +1 -1
  319. package/dist/{feedback-DWUkgEjR.js → feedback-C7nR0UtT.js} +30 -31
  320. package/dist/feedback-C7nR0UtT.js.map +1 -0
  321. package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
  322. package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
  323. package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-C-MFBX_8.js} +5 -5
  324. package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
  325. package/dist/{filters-BhsUtsxW.js → filters-Da-gNPsE.js} +760 -765
  326. package/dist/filters-Da-gNPsE.js.map +1 -0
  327. package/dist/{form-field-Bn7ZH1rA.js → form-field-VZRULhUK.js} +20 -12
  328. package/dist/form-field-VZRULhUK.js.map +1 -0
  329. package/dist/form-sizing-uWP4lzVh.js +126 -0
  330. package/dist/form-sizing-uWP4lzVh.js.map +1 -0
  331. package/dist/{forms-B7pzS25o.js → forms-DDeEnXSY.js} +38 -38
  332. package/dist/forms-DDeEnXSY.js.map +1 -0
  333. package/dist/forms-numeric-D3CO60IF.js +905 -0
  334. package/dist/forms-numeric-D3CO60IF.js.map +1 -0
  335. package/dist/{header-C59QZyxV.js → header-2ycNqGOR.js} +42 -37
  336. package/dist/header-2ycNqGOR.js.map +1 -0
  337. package/dist/{hooks-CM1Vp9Pe.js → hooks-DQ5SPwZw.js} +2 -2
  338. package/dist/{hooks-CM1Vp9Pe.js.map → hooks-DQ5SPwZw.js.map} +1 -1
  339. package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
  340. package/dist/http-CdEIHyQf.js.map +1 -0
  341. package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-DKlaKXoo.js} +4 -4
  342. package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
  343. package/dist/index.js +2 -2
  344. package/dist/input-BoLm9Hks.js +20 -0
  345. package/dist/input-BoLm9Hks.js.map +1 -0
  346. package/dist/input-DhQdBnV3.js +255 -0
  347. package/dist/input-DhQdBnV3.js.map +1 -0
  348. package/dist/item-xzh8Df65.js +264 -0
  349. package/dist/item-xzh8Df65.js.map +1 -0
  350. package/dist/layout/app-shell.js +1 -1
  351. package/dist/layout/auth.js +1 -1
  352. package/dist/layout/containers.js +1 -1
  353. package/dist/layout/header.js +1 -1
  354. package/dist/layout/hooks.js +1 -1
  355. package/dist/layout/navigation.js +1 -1
  356. package/dist/layout/page.js +1 -1
  357. package/dist/layout/settings.js +1 -1
  358. package/dist/layout/sidebar.js +2 -2
  359. package/dist/layout/workspace.js +1 -1
  360. package/dist/layout.js +10 -10
  361. package/dist/lib/affordance-geometry.generated.d.ts +46 -10
  362. package/dist/lib/control-group-recipes.d.ts +22 -0
  363. package/dist/lib/field-affordance-recipes.d.ts +70 -2
  364. package/dist/lib/field-state-recipes.d.ts +6 -4
  365. package/dist/lib/format.d.ts +9 -0
  366. package/dist/lib/money-format.d.ts +30 -0
  367. package/dist/lib/navigation-row-recipes.d.ts +3 -2
  368. package/dist/lib/overlay-anatomy-recipes.d.ts +2 -2
  369. package/dist/lib/surface-recipes.d.ts +13 -8
  370. package/dist/lib/token-merge.generated.d.ts +144 -2
  371. package/dist/lib/track-recipes.d.ts +1 -1
  372. package/dist/lib/ui-provider/provider.d.ts +7 -2
  373. package/dist/lib/ui-provider/store.d.ts +6 -2
  374. package/dist/lib/ui-provider/types.d.ts +9 -4
  375. package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
  376. package/dist/lib/utils.js +1 -1
  377. package/dist/media-gallery-DQUQ0m3O.js +201 -0
  378. package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
  379. package/dist/{mentions-B8Ko-fhS.js → mentions-DwnO1hh4.js} +40 -39
  380. package/dist/{mentions-B8Ko-fhS.js.map → mentions-DwnO1hh4.js.map} +1 -1
  381. package/dist/message-YfFmbXNP.js +127 -0
  382. package/dist/message-YfFmbXNP.js.map +1 -0
  383. package/dist/{navigation-BUIn2Qxx.js → navigation-Cbp5V8gG.js} +27 -28
  384. package/dist/navigation-Cbp5V8gG.js.map +1 -0
  385. package/dist/navigation-Cs1npsPm.js +300 -0
  386. package/dist/navigation-Cs1npsPm.js.map +1 -0
  387. package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DlU-4QYO.js} +3 -3
  388. package/dist/navigation-row-recipes-DlU-4QYO.js.map +1 -0
  389. package/dist/number-CKRBYmZK.js +352 -0
  390. package/dist/number-CKRBYmZK.js.map +1 -0
  391. package/dist/overlay.recipes-CNO2S9V6.js +34 -0
  392. package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
  393. package/dist/overlays-DhZO7N-I.js +994 -0
  394. package/dist/overlays-DhZO7N-I.js.map +1 -0
  395. package/dist/page-C6R_8jFt.js +325 -0
  396. package/dist/page-C6R_8jFt.js.map +1 -0
  397. package/dist/{page-header-DQRa0jug.js → page-header-hUTzcRZX.js} +12 -12
  398. package/dist/page-header-hUTzcRZX.js.map +1 -0
  399. package/dist/{pagination-C29vvt3I.js → pagination-Cm0jqa3I.js} +21 -21
  400. package/dist/pagination-Cm0jqa3I.js.map +1 -0
  401. package/dist/{popover-CoLDEg19.js → popover-Dcv_9jxr.js} +23 -22
  402. package/dist/popover-Dcv_9jxr.js.map +1 -0
  403. package/dist/{popover-menu-GLIQTJTx.js → popover-menu-DnRFKnHP.js} +6 -6
  404. package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
  405. package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-wmbvL8Ah.js} +5 -5
  406. package/dist/popover.recipes-wmbvL8Ah.js.map +1 -0
  407. package/dist/primitives-BHrwQXFC.js +379 -0
  408. package/dist/primitives-BHrwQXFC.js.map +1 -0
  409. package/dist/primitives.js +5 -5
  410. package/dist/{progress-BOe8l_FZ.js → progress-Br9WTFya.js} +12 -11
  411. package/dist/progress-Br9WTFya.js.map +1 -0
  412. package/dist/{receipt-BM8xsGFy.js → receipt-CV89q1fs.js} +8 -8
  413. package/dist/{receipt-BM8xsGFy.js.map → receipt-CV89q1fs.js.map} +1 -1
  414. package/dist/rich-text-editor-CF8QYt5p.js +574 -0
  415. package/dist/rich-text-editor-CF8QYt5p.js.map +1 -0
  416. package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-CnrbmTS1.js} +35 -26
  417. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +1 -0
  418. package/dist/{rich-text-B7sBAdDG.js → rich-text-j-FGAeZW.js} +4 -4
  419. package/dist/{rich-text-B7sBAdDG.js.map → rich-text-j-FGAeZW.js.map} +1 -1
  420. package/dist/{scroll-area-BheMQ270.js → scroll-area-DRdr16Pt.js} +3 -3
  421. package/dist/scroll-area-DRdr16Pt.js.map +1 -0
  422. package/dist/{separator-DO0EbCEm.js → separator-BMEvwnSX.js} +2 -2
  423. package/dist/{separator-DO0EbCEm.js.map → separator-BMEvwnSX.js.map} +1 -1
  424. package/dist/{separator-Gk_WXH-l.js → separator-Do5GWDYi.js} +4 -4
  425. package/dist/separator-Do5GWDYi.js.map +1 -0
  426. package/dist/services/actions/action-adapters.d.ts +4 -0
  427. package/dist/services/actions.js +8 -3
  428. package/dist/services/actions.js.map +1 -1
  429. package/dist/{settings-BnCyyPOJ.js → settings-DHk0L2MF.js} +20 -19
  430. package/dist/settings-DHk0L2MF.js.map +1 -0
  431. package/dist/sheet-DRFNY1_D.js +207 -0
  432. package/dist/sheet-DRFNY1_D.js.map +1 -0
  433. package/dist/sidebar-Cb8WzOvE.js +511 -0
  434. package/dist/sidebar-Cb8WzOvE.js.map +1 -0
  435. package/dist/{sidebar-DPR7fmqN.js → sidebar-Crc9M9JV.js} +220 -201
  436. package/dist/sidebar-Crc9M9JV.js.map +1 -0
  437. package/dist/{skeleton-CmT1ppqb.js → skeleton-DVMXr15h.js} +5 -5
  438. package/dist/{skeleton-CmT1ppqb.js.map → skeleton-DVMXr15h.js.map} +1 -1
  439. package/dist/smart-card-Bek-TwUp.js +599 -0
  440. package/dist/smart-card-Bek-TwUp.js.map +1 -0
  441. package/dist/{spinner-BY9HbUEh.js → spinner-CmTAbEp0.js} +8 -6
  442. package/dist/spinner-CmTAbEp0.js.map +1 -0
  443. package/dist/{structure-MvKVq-oL.js → structure-hzCW-XsV.js} +3 -3
  444. package/dist/{structure-MvKVq-oL.js.map → structure-hzCW-XsV.js.map} +1 -1
  445. package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
  446. package/dist/structure.recipes-EPz60cU8.js.map +1 -0
  447. package/dist/style.css +1 -1
  448. package/dist/surface-recipes-DOdoBXGm.js +28 -0
  449. package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
  450. package/dist/table-D6zKeYQX.js +162 -0
  451. package/dist/table-D6zKeYQX.js.map +1 -0
  452. package/dist/table-Dn4XSrSB.js +1444 -0
  453. package/dist/table-Dn4XSrSB.js.map +1 -0
  454. package/dist/tabs-Dk8E_knt.js +189 -0
  455. package/dist/tabs-Dk8E_knt.js.map +1 -0
  456. package/dist/text-inputs-BFpku0Qd.js +331 -0
  457. package/dist/text-inputs-BFpku0Qd.js.map +1 -0
  458. package/dist/{text.styles-BwB7vAF2.js → text.styles-g4He6UIW.js} +26 -15
  459. package/dist/text.styles-g4He6UIW.js.map +1 -0
  460. package/dist/theme.css +90 -124
  461. package/dist/themes/green.css +24 -0
  462. package/dist/{timelines-B9ICkQcV.js → timelines-CxuAFIc2.js} +97 -104
  463. package/dist/timelines-CxuAFIc2.js.map +1 -0
  464. package/dist/track-recipes-CDcKmndW.js +10 -0
  465. package/dist/track-recipes-CDcKmndW.js.map +1 -0
  466. package/dist/{tree-BdWSaoFT.js → tree-BotPlyiD.js} +13 -13
  467. package/dist/{tree-BdWSaoFT.js.map → tree-BotPlyiD.js.map} +1 -1
  468. package/dist/typography/rich-text.js +1 -1
  469. package/dist/typography-CAr3dQhX.js +116 -0
  470. package/dist/typography-CAr3dQhX.js.map +1 -0
  471. package/dist/typography.js +2 -2
  472. package/dist/{ui-provider-CftIB6TY.js → ui-provider-D2_TeLqw.js} +22 -22
  473. package/dist/ui-provider-D2_TeLqw.js.map +1 -0
  474. package/dist/ui-provider.js +1 -1
  475. package/dist/{upload-D8Za5x_c.js → upload-B0WHW7ak.js} +278 -274
  476. package/dist/upload-B0WHW7ak.js.map +1 -0
  477. package/dist/{upload-queue-hIIYBLS7.js → upload-queue-BHZ_wBfd.js} +72 -75
  478. package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
  479. package/dist/{usage-card-DnmnJ58D.js → usage-card-U0YBLTNT.js} +31 -33
  480. package/dist/usage-card-U0YBLTNT.js.map +1 -0
  481. package/dist/utils-Cospvlj1.js +4445 -0
  482. package/dist/utils-Cospvlj1.js.map +1 -0
  483. package/dist/value-inputs-CjfzGMsN.js +854 -0
  484. package/dist/value-inputs-CjfzGMsN.js.map +1 -0
  485. package/dist/value-typography-Deb3yQZg.js +116 -0
  486. package/dist/value-typography-Deb3yQZg.js.map +1 -0
  487. package/dist/{workspace-C1PZmk8L.js → workspace-YoFjXi6i.js} +97 -105
  488. package/dist/workspace-YoFjXi6i.js.map +1 -0
  489. package/docs/consumer-skill/SKILL.md +123 -119
  490. package/docs/consumer-skill/examples/analytics.tsx +34 -0
  491. package/docs/consumer-skill/examples/app-layout.tsx +42 -14
  492. package/docs/consumer-skill/examples/detail.tsx +20 -5
  493. package/docs/consumer-skill/examples/edit.tsx +1 -1
  494. package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
  495. package/docs/consumer-skill/examples/manifest.json +37 -3
  496. package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
  497. package/docs/consumer-skill/examples/website.tsx +56 -0
  498. package/docs/consumer-skill/references/analytics.md +70 -0
  499. package/docs/consumer-skill/references/composition.md +195 -9
  500. package/docs/consumer-skill/references/design-contract.md +33 -7
  501. package/docs/consumer-skill/references/discovery.md +80 -5
  502. package/docs/consumer-skill/references/installation.md +22 -0
  503. package/docs/consumer-skill/references/integration.md +46 -1
  504. package/docs/consumer-skill/references/public-api.json +2083 -237
  505. package/docs/consumer-skill/references/review.md +74 -6
  506. package/docs/consumer-skill/references/theming.md +59 -8
  507. package/docs/consumer-skill/references/tokens.json +180 -9
  508. package/docs/consumer-skill/references/workflows.md +34 -0
  509. package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
  510. package/docs/consumer-skill/scripts/composition-policy.mjs +271 -18
  511. package/docs/consumer-skill/scripts/discovery.mjs +69 -9
  512. package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
  513. package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
  514. package/package.json +11 -6
  515. package/dist/accordion-B-5Focs8.js.map +0 -1
  516. package/dist/action-menu-Cx3SdfbN.js +0 -265
  517. package/dist/action-menu-Cx3SdfbN.js.map +0 -1
  518. package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
  519. package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
  520. package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
  521. package/dist/app-shell-at8Kt4l_.js.map +0 -1
  522. package/dist/attachment-BO2R47wn.js.map +0 -1
  523. package/dist/auth-OFwWSAap.js +0 -704
  524. package/dist/auth-OFwWSAap.js.map +0 -1
  525. package/dist/avatar-Bpzty83c.js.map +0 -1
  526. package/dist/badge-BZXZT9wd.js.map +0 -1
  527. package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
  528. package/dist/button-BS6l5JUw.js.map +0 -1
  529. package/dist/buttons-Co6GavvM.js +0 -674
  530. package/dist/buttons-Co6GavvM.js.map +0 -1
  531. package/dist/chart-DVfcwQu6.js +0 -149
  532. package/dist/chart-DVfcwQu6.js.map +0 -1
  533. package/dist/checkbox-BavDRjF7.js +0 -34
  534. package/dist/checkbox-BavDRjF7.js.map +0 -1
  535. package/dist/choice-inputs-CC7XqPQO.js +0 -619
  536. package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
  537. package/dist/code-block-xHKbAJDj.js.map +0 -1
  538. package/dist/combobox-DEbdr-3u.js +0 -273
  539. package/dist/combobox-DEbdr-3u.js.map +0 -1
  540. package/dist/combobox-xv3yJbzl.js +0 -850
  541. package/dist/combobox-xv3yJbzl.js.map +0 -1
  542. package/dist/command-C0xe7u9B.js.map +0 -1
  543. package/dist/comments-DviPLnwy.js.map +0 -1
  544. package/dist/containers-6s-ucRQQ.js.map +0 -1
  545. package/dist/data-display-cWIRdeaf.js +0 -1129
  546. package/dist/data-display-cWIRdeaf.js.map +0 -1
  547. package/dist/date-BFNMnrS5.js +0 -140
  548. package/dist/date-BFNMnrS5.js.map +0 -1
  549. package/dist/date-picker-CA6ogMQB.js +0 -1521
  550. package/dist/date-picker-CA6ogMQB.js.map +0 -1
  551. package/dist/date-pickers-BPIKLdsD.js +0 -224
  552. package/dist/date-pickers-BPIKLdsD.js.map +0 -1
  553. package/dist/display-CFM5myut.js.map +0 -1
  554. package/dist/dropdown-menu-BlnyHr-9.js.map +0 -1
  555. package/dist/feedback-DWUkgEjR.js.map +0 -1
  556. package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
  557. package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
  558. package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
  559. package/dist/filters-BhsUtsxW.js.map +0 -1
  560. package/dist/form-field-Bn7ZH1rA.js.map +0 -1
  561. package/dist/form-sizing-BWs70_a2.js +0 -100
  562. package/dist/form-sizing-BWs70_a2.js.map +0 -1
  563. package/dist/format-iamDSqs2.js +0 -110
  564. package/dist/format-iamDSqs2.js.map +0 -1
  565. package/dist/forms-B7pzS25o.js.map +0 -1
  566. package/dist/forms-numeric-BUBxELBv.js +0 -867
  567. package/dist/forms-numeric-BUBxELBv.js.map +0 -1
  568. package/dist/header-C59QZyxV.js.map +0 -1
  569. package/dist/http-CLTVJc5I.js.map +0 -1
  570. package/dist/input-WwYQZJzG.js +0 -202
  571. package/dist/input-WwYQZJzG.js.map +0 -1
  572. package/dist/input-ci9fIgFH.js +0 -20
  573. package/dist/input-ci9fIgFH.js.map +0 -1
  574. package/dist/item-pJ0GsOiJ.js +0 -257
  575. package/dist/item-pJ0GsOiJ.js.map +0 -1
  576. package/dist/media-gallery-DhDRgnVZ.js +0 -200
  577. package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
  578. package/dist/message-COsdEvXT.js +0 -108
  579. package/dist/message-COsdEvXT.js.map +0 -1
  580. package/dist/navigation-BUIn2Qxx.js.map +0 -1
  581. package/dist/navigation-DBEu4POU.js +0 -267
  582. package/dist/navigation-DBEu4POU.js.map +0 -1
  583. package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
  584. package/dist/number-BNT_BIzJ.js +0 -269
  585. package/dist/number-BNT_BIzJ.js.map +0 -1
  586. package/dist/overlay.recipes-BxW5FIfK.js +0 -6
  587. package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
  588. package/dist/overlays-B11wZka6.js +0 -982
  589. package/dist/overlays-B11wZka6.js.map +0 -1
  590. package/dist/page-BV6ioQg3.js +0 -202
  591. package/dist/page-BV6ioQg3.js.map +0 -1
  592. package/dist/page-header-DQRa0jug.js.map +0 -1
  593. package/dist/pagination-C29vvt3I.js.map +0 -1
  594. package/dist/popover-CoLDEg19.js.map +0 -1
  595. package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
  596. package/dist/primitives-DKPOGVpj.js +0 -330
  597. package/dist/primitives-DKPOGVpj.js.map +0 -1
  598. package/dist/progress-BOe8l_FZ.js.map +0 -1
  599. package/dist/rich-text-editor-CoVrTiSv.js +0 -575
  600. package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
  601. package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
  602. package/dist/scroll-area-BheMQ270.js.map +0 -1
  603. package/dist/select-B2mb-qN2.js +0 -108
  604. package/dist/select-B2mb-qN2.js.map +0 -1
  605. package/dist/separator-Gk_WXH-l.js.map +0 -1
  606. package/dist/settings-BnCyyPOJ.js.map +0 -1
  607. package/dist/sheet-B-q914Ad.js +0 -205
  608. package/dist/sheet-B-q914Ad.js.map +0 -1
  609. package/dist/sidebar-C_2p3Tfj.js +0 -501
  610. package/dist/sidebar-C_2p3Tfj.js.map +0 -1
  611. package/dist/sidebar-DPR7fmqN.js.map +0 -1
  612. package/dist/smart-card-CYLn46e6.js +0 -578
  613. package/dist/smart-card-CYLn46e6.js.map +0 -1
  614. package/dist/spinner-BY9HbUEh.js.map +0 -1
  615. package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
  616. package/dist/surface-recipes-CQfRr-VL.js +0 -27
  617. package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
  618. package/dist/table-BS39xnlq.js +0 -1424
  619. package/dist/table-BS39xnlq.js.map +0 -1
  620. package/dist/table-DnlAJ-xR.js +0 -146
  621. package/dist/table-DnlAJ-xR.js.map +0 -1
  622. package/dist/tabs-B5cNMWiP.js +0 -187
  623. package/dist/tabs-B5cNMWiP.js.map +0 -1
  624. package/dist/text-inputs-Dh9XGyiS.js +0 -331
  625. package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
  626. package/dist/text.styles-BwB7vAF2.js.map +0 -1
  627. package/dist/timelines-B9ICkQcV.js.map +0 -1
  628. package/dist/track-recipes-LLPNVwFg.js +0 -10
  629. package/dist/track-recipes-LLPNVwFg.js.map +0 -1
  630. package/dist/typography-Cv8MT-82.js +0 -96
  631. package/dist/typography-Cv8MT-82.js.map +0 -1
  632. package/dist/ui-provider-CftIB6TY.js.map +0 -1
  633. package/dist/upload-D8Za5x_c.js.map +0 -1
  634. package/dist/upload-queue-hIIYBLS7.js.map +0 -1
  635. package/dist/usage-card-DnmnJ58D.js.map +0 -1
  636. package/dist/utils-C2EKeIw3.js +0 -72
  637. package/dist/utils-C2EKeIw3.js.map +0 -1
  638. package/dist/value-inputs-DX2dbxjj.js +0 -824
  639. package/dist/value-inputs-DX2dbxjj.js.map +0 -1
  640. package/dist/workspace-C1PZmk8L.js.map +0 -1
@@ -1,28 +1,31 @@
1
1
  "use client";
2
- import { a as e, o as t } from "./ui-provider-CftIB6TY.js";
2
+ import { a as e, o as t } from "./ui-provider-D2_TeLqw.js";
3
3
  import { interpolateString as n, useStrings as r } from "./lib/strings.js";
4
- import { t as i } from "./utils-C2EKeIw3.js";
5
- import { c as a, l as o, n as s, o as c, s as l } from "./buttons-Co6GavvM.js";
6
- import { a as u, r as d, t as f } from "./typography-Cv8MT-82.js";
7
- import { t as p } from "./structure-MvKVq-oL.js";
8
- import { i as m, t as h } from "./overlays-B11wZka6.js";
9
- import { t as g } from "./sanitize-html-BG9FGe-j.js";
10
- import { t as _ } from "./content-typography-CnwgMJ37.js";
11
- import { t as v } from "./rich-text-B7sBAdDG.js";
12
- import { g as y, i as b } from "./primitives-DKPOGVpj.js";
13
- import { n as x, t as S } from "./number-BNT_BIzJ.js";
14
- import { i as C } from "./date-BFNMnrS5.js";
15
- import { i as w, n as T, s as E } from "./avatar-Bpzty83c.js";
16
- import { t as D } from "./badge-BZXZT9wd.js";
17
- import { c as O, o as ee } from "./popover-CoLDEg19.js";
18
- import { l as k } from "./data-display-cWIRdeaf.js";
19
- import { t as te } from "./rich-text-editor-CoVrTiSv.js";
20
- import { l as A, n as ne, o as j, r as re, t as M } from "./mentions-B8Ko-fhS.js";
21
- import { Fragment as N, createElement as ie, forwardRef as P, memo as F, useCallback as I, useEffect as L, useImperativeHandle as ae, useMemo as R, useRef as z, useState as B } from "react";
4
+ import { t as i } from "./utils-Cospvlj1.js";
5
+ import { t as a } from "./buttons-DS0ZIwJ_.js";
6
+ import { a as o, s, t as c } from "./typography-CAr3dQhX.js";
7
+ import { a as l, c as u, o as d, s as f, t as p } from "./button-BS3KDg00.js";
8
+ import { t as m } from "./structure-hzCW-XsV.js";
9
+ import { t as h } from "./row-recipes-DL8n7t_b.js";
10
+ import { i as g, t as _ } from "./overlays-DhZO7N-I.js";
11
+ import { t as v } from "./sanitize-html-BG9FGe-j.js";
12
+ import { t as y } from "./content-typography-CnwgMJ37.js";
13
+ import { t as b } from "./rich-text-j-FGAeZW.js";
14
+ import { g as x, i as S } from "./primitives-BHrwQXFC.js";
15
+ import { n as C, t as w } from "./number-CKRBYmZK.js";
16
+ import { i as ee } from "./date-uf3z37Nm.js";
17
+ import { i as T, n as E, s as D } from "./avatar-djdaaQ_s.js";
18
+ import { t as O } from "./badge-0tATj-tW.js";
19
+ import { t as k } from "./field-affordance-recipes-CkOCdE2y.js";
20
+ import { c as te, o as ne } from "./popover-Dcv_9jxr.js";
21
+ import { l as re } from "./data-display-3xWQUnMA.js";
22
+ import { t as ie } from "./rich-text-editor-CF8QYt5p.js";
23
+ import { l as A, n as ae, o as j, r as oe, t as se } from "./mentions-DwnO1hh4.js";
24
+ import { Fragment as M, createElement as ce, forwardRef as N, memo as P, useCallback as F, useEffect as I, useImperativeHandle as L, useMemo as R, useRef as z, useState as B } from "react";
22
25
  import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
23
- import { AtSign as oe, CornerDownRight as se, File as ce, FileText as le, Image as ue, Loader2 as de, MessageCircle as W, Paperclip as fe, Pencil as G, Pin as K, Send as pe, Smile as me, Trash2 as he, X as q } from "lucide-react";
26
+ import { AtSign as le, CornerDownRight as ue, File as W, FileText as de, Image as G, Loader2 as fe, MessageCircle as K, Paperclip as pe, Pencil as q, Pin as J, Smile as me, Trash2 as he, X as Y } from "lucide-react";
24
27
  //#region src/components/features/comments/comments.strings.ts
25
- var J = {
28
+ var X = {
26
29
  title: "Comments",
27
30
  subtitle: "",
28
31
  empty: "No comments yet.",
@@ -70,10 +73,10 @@ var J = {
70
73
  };
71
74
  //#endregion
72
75
  //#region src/components/features/comments/comments-provider.tsx
73
- function Y(e) {
74
- return r(J, e);
75
- }
76
76
  function ge(e) {
77
+ return r(X, e);
78
+ }
79
+ function _e(e) {
77
80
  let n = t();
78
81
  return R(() => ({
79
82
  getMediaUrl: e?.getMediaUrl,
@@ -84,16 +87,16 @@ function ge(e) {
84
87
  }
85
88
  //#endregion
86
89
  //#region src/components/features/comments/hooks/use-comments.ts
87
- function X(e = {}) {
88
- let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a } = e, [o, s] = B({ kind: "idle" }), [c, l] = B(!1), u = z(!1), [d, f] = B({}), [p, m] = B(0), h = I((e) => {
90
+ function ve(e = {}) {
91
+ let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a } = e, [o, s] = B({ kind: "idle" }), [c, l] = B(!1), u = z(!1), [d, f] = B({}), [p, m] = B(0), h = F((e) => {
89
92
  u.current = e, l(e);
90
- }, []), g = I(() => {
93
+ }, []), g = F(() => {
91
94
  m((e) => e + 1), s({ kind: "idle" }), f({}), h(!1);
92
95
  }, [h]), _ = R(() => ({
93
96
  setErrors: f,
94
97
  reset: g,
95
98
  setSubmitting: h
96
- }), [g, h]), v = I((e) => {
99
+ }), [g, h]), v = F((e) => {
97
100
  try {
98
101
  a?.(e);
99
102
  } catch {}
@@ -103,23 +106,23 @@ function X(e = {}) {
103
106
  isSubmitting: c,
104
107
  formErrors: d,
105
108
  resetKey: p,
106
- startReply: I((e) => {
109
+ startReply: F((e) => {
107
110
  e.id && (f({}), s({
108
111
  kind: "replying",
109
112
  commentId: e.id,
110
113
  authorName: e.user?.name
111
114
  }));
112
115
  }, []),
113
- startEdit: I((e) => {
116
+ startEdit: F((e) => {
114
117
  e.id && (f({}), s({
115
118
  kind: "editing",
116
119
  comment: e
117
120
  }));
118
121
  }, []),
119
- cancelComposerMode: I(() => {
122
+ cancelComposerMode: F(() => {
120
123
  g();
121
124
  }, [g]),
122
- submit: I(async (e) => {
125
+ submit: F(async (e) => {
123
126
  if (o.kind === "editing" && o.comment.id) {
124
127
  if (!n || u.current) return;
125
128
  let t = {
@@ -158,7 +161,7 @@ function X(e = {}) {
158
161
  v,
159
162
  h
160
163
  ]),
161
- deleteComment: I(async (e) => {
164
+ deleteComment: F(async (e) => {
162
165
  if (r && e) try {
163
166
  await r(e), i?.("delete", { commentId: e });
164
167
  } catch (e) {
@@ -175,49 +178,49 @@ function X(e = {}) {
175
178
  }
176
179
  //#endregion
177
180
  //#region src/components/features/comments/partials/comment-attachment-chip.tsx
178
- function _e(e) {
179
- return e.mimeType?.startsWith("image/") ? ue : e.mimeType === "application/pdf" || e.mimeType?.startsWith("text/") ? le : e.mimeType ? ce : fe;
181
+ function ye(e) {
182
+ return e.mimeType?.startsWith("image/") ? G : e.mimeType === "application/pdf" || e.mimeType?.startsWith("text/") ? de : e.mimeType ? W : pe;
180
183
  }
181
- var ve = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: a, accessors: o, strings: c, compact: l = !1, className: d }) => {
182
- let p = r(J, c), m = o?.getMediaUrl?.(e) ?? e.url, h = o?.getMediaName?.(e) ?? e.name ?? p.attachmentFallback, g = _e(e), _ = e.status === "uploading", v = e.status === "failed", S = _ ? /* @__PURE__ */ U(y, {
184
+ var be = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: o, accessors: l, strings: u, compact: d = !1, className: f }) => {
185
+ let p = r(X, u), m = l?.getMediaUrl?.(e) ?? e.url, g = l?.getMediaName?.(e) ?? e.name ?? p.attachmentFallback, _ = ye(e), v = e.status === "uploading", y = e.status === "failed", b = v ? /* @__PURE__ */ U(x, {
183
186
  size: "xs",
184
187
  className: "shrink-0",
185
- children: [p.attachmentUploadingLabel, typeof e.progress == "number" ? /* @__PURE__ */ U(V, { children: [" ", /* @__PURE__ */ H(x, {
188
+ children: [p.attachmentUploadingLabel, typeof e.progress == "number" ? /* @__PURE__ */ U(V, { children: [" ", /* @__PURE__ */ H(C, {
186
189
  value: Math.round(e.progress),
187
190
  scaled: !0,
188
191
  size: "xs",
189
192
  align: "left",
190
193
  type: "secondary"
191
194
  })] }) : null]
192
- }) : v ? /* @__PURE__ */ H(y, {
195
+ }) : y ? /* @__PURE__ */ H(x, {
193
196
  size: "xs",
194
197
  className: "shrink-0",
195
198
  children: e.error ?? p.attachmentFailedLabel
196
- }) : typeof e.size == "number" ? /* @__PURE__ */ H(b, {
199
+ }) : typeof e.size == "number" ? /* @__PURE__ */ H(S, {
197
200
  value: e.size,
198
201
  size: "xs",
199
202
  className: "shrink-0"
200
- }) : null, C = i("comment-attachment-chip--component", "relative inline-flex min-w-0 max-w-[20rem] items-center gap-space-sm rounded-radius-md", "ring-1 ring-inset transition-colors", l ? "px-2 py-1 text-xs" : "px-2.5 py-1 text-xs", v ? "bg-destructive/[0.04] ring-destructive/30 hover:bg-destructive/[0.08]" : "bg-foreground/[0.03] ring-border/60 hover:bg-foreground/[0.06]", d), w = _ ? /* @__PURE__ */ H(de, {
203
+ }) : null, w = i("comment-attachment-chip--component", "relative inline-flex min-w-0 max-w-[20rem] items-center gap-space-sm rounded-radius", "ring-1 ring-inset transition-colors", d ? "px-control-xs" : "px-control-sm", h.compact, y ? "bg-destructive/[0.04] ring-destructive/30 hover:bg-destructive/[0.08]" : "bg-foreground/[0.03] ring-border/60 hover:bg-foreground/[0.06]", f), ee = v ? /* @__PURE__ */ H(fe, {
201
204
  className: i("shrink-0 animate-spin text-muted-foreground", "size-icon-md"),
202
205
  "aria-hidden": !0
203
- }) : /* @__PURE__ */ H(g, {
204
- className: i("shrink-0", "size-icon-md", v ? "text-destructive" : "text-muted-foreground"),
206
+ }) : /* @__PURE__ */ H(_, {
207
+ className: i("shrink-0", "size-icon-md", y ? "text-destructive" : "text-muted-foreground"),
205
208
  "aria-hidden": !0
206
209
  }), T = /* @__PURE__ */ U("span", {
207
210
  className: "inline-flex min-w-0 items-baseline gap-space-sm",
208
- children: [/* @__PURE__ */ H(u, {
211
+ children: [/* @__PURE__ */ H(s, {
209
212
  tag: "span",
210
213
  size: "xs",
211
214
  weight: "medium",
212
- className: i("truncate", v && "text-destructive"),
213
- children: h
214
- }), S]
215
+ className: i("truncate", y && "text-destructive"),
216
+ children: g
217
+ }), b]
215
218
  });
216
219
  return /* @__PURE__ */ U("div", {
217
- className: C,
220
+ className: w,
218
221
  children: [
219
- w,
220
- m && !_ && !v ? /* @__PURE__ */ H(f, {
222
+ ee,
223
+ m && !v && !y ? /* @__PURE__ */ H(c, {
221
224
  href: m,
222
225
  size: "inherit",
223
226
  underline: !1,
@@ -227,21 +230,19 @@ var ve = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: a, accessors:
227
230
  "aria-label": p.attachmentDownloadLabel,
228
231
  children: T
229
232
  }) : T,
230
- _ && typeof e.progress == "number" && /* @__PURE__ */ H("div", {
233
+ v && typeof e.progress == "number" && /* @__PURE__ */ H("div", {
231
234
  className: "bg-primary/15 absolute bottom-0 left-2 right-2 h-px overflow-hidden rounded-full",
232
235
  children: /* @__PURE__ */ H("div", {
233
236
  className: "bg-primary h-full transition-[width]",
234
237
  style: { width: `${Math.min(100, Math.max(0, e.progress))}%` }
235
238
  })
236
239
  }),
237
- v && a && /* @__PURE__ */ H(s, {
240
+ y && o && /* @__PURE__ */ H(a, {
238
241
  type: "button",
239
- tone: "destructive",
240
- buttonStyle: "ghost",
241
242
  size: "sm",
242
- onClick: () => a(e.id),
243
- className: "h-auto shrink-0 rounded px-1.5 py-px ring-1 ring-inset ring-destructive/30 hover:ring-destructive/60",
244
- children: /* @__PURE__ */ H(u, {
243
+ onClick: () => o(e.id),
244
+ className: "shrink-0 text-destructive decoration-destructive/30 hover:decoration-destructive/60",
245
+ children: /* @__PURE__ */ H(s, {
245
246
  tag: "span",
246
247
  size: "xs",
247
248
  weight: "medium",
@@ -249,287 +250,308 @@ var ve = ({ attachment: e, editable: t = !1, onRemove: n, onRetry: a, accessors:
249
250
  children: p.attachmentRetryLabel
250
251
  })
251
252
  }),
252
- t && n && /* @__PURE__ */ H(s, {
253
+ t && n && /* @__PURE__ */ H("button", {
253
254
  type: "button",
254
- tone: "secondary",
255
- buttonStyle: "ghost",
256
- size: "sm",
257
- iconOnly: !0,
258
255
  onClick: () => n(e.id),
259
- className: "-mr-0.5 size-icon shrink-0 rounded p-0 text-muted-foreground hover:bg-foreground/10 hover:text-foreground",
256
+ className: i(k.target, k.focus, k.toggle),
260
257
  "aria-label": p.attachmentRemoveLabel,
261
258
  title: p.attachmentRemoveLabel,
262
- children: /* @__PURE__ */ H(q, { className: "size-icon-sm" })
259
+ children: /* @__PURE__ */ H(Y, {
260
+ className: k.icon,
261
+ "aria-hidden": "true"
262
+ })
263
263
  })
264
264
  ]
265
265
  });
266
+ }, xe = {
267
+ attachmentTooLargeError: X.attachmentTooLargeError,
268
+ attachmentTooManyError: X.attachmentTooManyError,
269
+ attachmentFailedLabel: X.attachmentFailedLabel
266
270
  };
267
- //#endregion
268
- //#region src/components/features/comments/hooks/use-attachment-upload.ts
269
- function ye(e = {}) {
270
- let { onUpload: t, maxSize: n, maxFiles: r, disabled: i, initialAttachments: a, onValueChange: o, onError: s } = e, [c, l] = B(() => a ? [...a] : []), u = z(/* @__PURE__ */ new Map()), d = z(/* @__PURE__ */ new Map()), f = z(o);
271
- f.current = o;
272
- let p = I((e, t) => {
273
- l((n) => n.map((n) => n.id === e ? {
271
+ function Se(e = {}) {
272
+ let { onUpload: t, maxSize: n, maxFiles: i, disabled: a, initialAttachments: o, onValueChange: s, onError: c, strings: l } = e, u = r(xe, l), [d, f] = B(() => o ? [...o] : []), p = z(/* @__PURE__ */ new Map()), m = z(/* @__PURE__ */ new Map()), h = z(d), g = F((e) => {
273
+ let t = [...e];
274
+ h.current = t, f(t);
275
+ }, []), _ = z(s);
276
+ _.current = s;
277
+ let v = F((e, t) => {
278
+ g(h.current.map((n) => n.id === e ? {
274
279
  ...n,
275
280
  ...t
276
281
  } : n));
277
- }, []), m = I((e) => {
278
- l([...e]);
279
- }, []), h = I((e, n) => {
280
- if (!t) return;
282
+ }, [g]), y = F((e) => {
283
+ g(e);
284
+ }, [g]), b = F((e, n) => {
285
+ if (!t || !m.current.has(e)) return;
281
286
  let r = new AbortController();
282
- u.current.set(e, { controller: r }), p(e, {
287
+ p.current.set(e, { controller: r }), v(e, {
283
288
  status: "uploading",
284
289
  progress: 0,
285
290
  error: void 0
286
291
  }), t({
287
292
  file: n,
288
293
  onProgress: (t) => {
289
- p(e, { progress: t });
294
+ r.signal.aborted || v(e, { progress: t });
290
295
  },
291
296
  signal: r.signal
292
297
  }).then((t) => {
293
- u.current.delete(e), p(e, {
298
+ r.signal.aborted || (p.current.delete(e), v(e, {
294
299
  ...t,
295
300
  id: e,
296
301
  status: "uploaded",
297
302
  progress: 100,
298
303
  error: void 0
299
- });
304
+ }));
300
305
  }).catch((t) => {
301
- if (u.current.delete(e), r.signal.aborted) return;
302
- let n = t instanceof Error ? t.message : "Upload failed";
303
- p(e, {
306
+ if (p.current.delete(e), r.signal.aborted) return;
307
+ let n = t instanceof Error ? t.message : u.attachmentFailedLabel;
308
+ v(e, {
304
309
  status: "failed",
305
310
  error: n
306
- }), s?.(n);
311
+ }), c?.(n);
307
312
  });
308
313
  }, [
309
- s,
314
+ c,
310
315
  t,
311
- p
312
- ]), g = I((e) => {
313
- if (i || !t) return;
314
- let a = Array.from(e);
315
- a.length !== 0 && l((e) => {
316
- let t = [...e];
317
- for (let e of a) {
318
- if (typeof r == "number" && t.length >= r) {
319
- s?.("Too many attachments.");
320
- break;
321
- }
322
- if (typeof n == "number" && e.size > n) {
323
- s?.("File is too large.");
324
- continue;
325
- }
326
- let i = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `att-${Date.now()}-${Math.random().toString(36).slice(2)}`;
327
- d.current.set(i, e), t.push({
328
- id: i,
329
- name: e.name,
330
- size: e.size,
331
- mimeType: e.type,
332
- status: "uploading",
333
- progress: 0
334
- }), queueMicrotask(() => h(i, e));
316
+ u.attachmentFailedLabel,
317
+ v
318
+ ]), x = F((e) => {
319
+ if (a || !t) return;
320
+ let r = Array.from(e);
321
+ if (r.length === 0) return;
322
+ let o = [...h.current], s = [];
323
+ for (let e of r) {
324
+ if (typeof i == "number" && o.length >= i) {
325
+ c?.(u.attachmentTooManyError);
326
+ break;
335
327
  }
336
- return t;
337
- });
328
+ if (typeof n == "number" && e.size > n) {
329
+ c?.(u.attachmentTooLargeError);
330
+ continue;
331
+ }
332
+ let t = typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `att-${Date.now()}-${Math.random().toString(36).slice(2)}`;
333
+ m.current.set(t, e), o.push({
334
+ id: t,
335
+ name: e.name,
336
+ size: e.size,
337
+ mimeType: e.type,
338
+ status: "uploading",
339
+ progress: 0
340
+ }), s.push({
341
+ id: t,
342
+ file: e
343
+ });
344
+ }
345
+ g(o);
346
+ for (let { id: e, file: t } of s) queueMicrotask(() => b(e, t));
338
347
  }, [
339
- h,
348
+ b,
349
+ g,
350
+ a,
340
351
  i,
341
- r,
342
352
  n,
343
- s,
344
- t
345
- ]), _ = I((e) => {
346
- let t = u.current.get(e);
347
- t && (t.controller.abort(), u.current.delete(e)), d.current.delete(e), l((t) => t.filter((t) => t.id !== e));
348
- }, []), v = I((e) => {
349
- let t = d.current.get(e);
350
- t && h(e, t);
351
- }, [h]), y = I(() => {
352
- for (let e of u.current.values()) e.controller.abort();
353
- u.current.clear(), d.current.clear(), l([]);
354
- }, []);
355
- return L(() => {
356
- f.current?.(c);
357
- }, [c]), L(() => {
358
- let e = u.current;
353
+ c,
354
+ t,
355
+ u.attachmentTooLargeError,
356
+ u.attachmentTooManyError
357
+ ]), S = F((e) => {
358
+ let t = p.current.get(e);
359
+ t && (t.controller.abort(), p.current.delete(e)), m.current.delete(e), g(h.current.filter((t) => t.id !== e));
360
+ }, [g]), C = F((e) => {
361
+ let t = m.current.get(e);
362
+ t && b(e, t);
363
+ }, [b]), w = F(() => {
364
+ for (let e of p.current.values()) e.controller.abort();
365
+ p.current.clear(), m.current.clear(), g([]);
366
+ }, [g]);
367
+ return I(() => {
368
+ _.current?.(d);
369
+ }, [d]), I(() => {
370
+ let e = p.current, t = m.current;
359
371
  return () => {
360
372
  for (let t of e.values()) t.controller.abort();
373
+ t.clear();
361
374
  };
362
375
  }, []), {
363
- attachments: c,
364
- uploadedAttachments: R(() => c.filter((e) => e.status === "uploaded" || !e.status), [c]),
365
- isUploading: R(() => c.some((e) => e.status === "uploading"), [c]),
366
- addFiles: g,
367
- removeAttachment: _,
368
- retryAttachment: v,
369
- setAttachments: m,
370
- reset: y
376
+ attachments: d,
377
+ uploadedAttachments: R(() => d.filter((e) => e.status === "uploaded" || !e.status), [d]),
378
+ isUploading: R(() => d.some((e) => e.status === "uploading"), [d]),
379
+ addFiles: x,
380
+ removeAttachment: S,
381
+ retryAttachment: C,
382
+ setAttachments: y,
383
+ reset: w
371
384
  };
372
385
  }
373
386
  //#endregion
374
387
  //#region src/components/features/comments/partials/comment-composer.tsx
375
- function be(e) {
388
+ function Ce(e) {
376
389
  return !e || typeof e != "string" ? !1 : e.replace(/<[^>]*>/g, "").trim().length > 0;
377
390
  }
378
- var Z = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors: r, resetKey: i = 0, onSubmit: a, onCancel: o, editingComment: c, replyingTo: l, strings: d, resources: f, onResourceSearch: m, attachments: h, maxAttachments: g, allowAttachments: _, initialValues: v, autoFocus: y = !1, inlineSubmit: b = !0, placeholder: x }, S) {
379
- let C = Y(d), w = f, T = m, E = _ ?? !0, D = h?.maxFiles ?? g ?? 5, k = R(() => ({
391
+ var Z = N(function({ context: e, canComment: t = !0, submitting: n = !1, errors: r, resetKey: i = 0, onSubmit: a, onCancel: o, editingComment: c, replyingTo: l, strings: u, resources: d, onResourceSearch: f, attachments: h, maxAttachments: g, allowAttachments: _, initialValues: v, autoFocus: y = !1, inlineSubmit: b = !0, placeholder: x }, S) {
392
+ let C = ge(u), w = d, ee = f, T = _ ?? !0, E = h?.maxFiles ?? g ?? 5, D = R(() => ({
380
393
  ...h,
381
- maxFiles: D,
382
- disabled: h?.disabled === !0 || !E
394
+ maxFiles: E,
395
+ disabled: h?.disabled === !0 || !T
383
396
  }), [
384
- E,
397
+ T,
385
398
  h,
386
- D
387
- ]), j = z(null), [N, ie] = B(() => v?.content ?? c?.content ?? ""), [P, F] = B(null), I = A({
399
+ E
400
+ ]), O = z(null), [k, re] = B(() => v?.content ?? c?.content ?? ""), [j, M] = B(null), [ce, N] = B(null), P = A({
388
401
  resources: w,
389
- onResourceSearch: T,
390
- editorRef: j,
402
+ onResourceSearch: ee,
403
+ editorRef: O,
391
404
  initialMentions: v?.references ?? c?.references
392
- }), V = ye({
393
- ...k,
394
- initialAttachments: v?.attachments ?? void 0
395
- });
396
- ae(S, () => ({
397
- focus: () => j.current?.focus(),
405
+ }), F = Se({
406
+ ...D,
407
+ initialAttachments: v?.attachments ?? void 0,
408
+ strings: C,
409
+ onError: N
410
+ }), V = () => {
411
+ F.reset(), N(null), o?.();
412
+ };
413
+ L(S, () => ({
414
+ focus: () => O.current?.focus(),
398
415
  clear: () => {
399
- j.current?.clear(), I.reset(), V.reset(), F(null);
416
+ O.current?.clear(), P.reset(), F.reset(), M(null), N(null);
400
417
  },
401
418
  setBody: (e) => {
402
- j.current?.setHTML(e);
419
+ O.current?.setHTML(e);
403
420
  }
404
- }), [V, I]), L(() => {
405
- j.current?.setHTML(v?.content ?? ""), I.setMentions(v?.references ?? []), V.setAttachments(v?.attachments ?? []), F(null);
421
+ }), [F, P]), I(() => {
422
+ O.current?.setHTML(v?.content ?? ""), P.setMentions(v?.references ?? []), F.reset(), F.setAttachments(v?.attachments ?? []), M(null), N(null);
406
423
  }, [
407
424
  e.id,
408
425
  e.type,
409
426
  i
410
- ]), L(() => {
427
+ ]), I(() => {
411
428
  if (!c) return;
412
- j.current?.setHTML(c.content ?? ""), I.setMentions(c.references ?? []);
429
+ O.current?.setHTML(c.content ?? ""), P.setMentions(c.references ?? []);
413
430
  let e = (c.attachments ?? []).filter((e) => !!e);
414
- V.setAttachments(e);
415
- }, [c?.id]), L(() => {
416
- r?.content && F(r.content);
431
+ F.reset(), F.setAttachments(e), N(null);
432
+ }, [c?.id]), I(() => {
433
+ r?.content && M(r.content);
417
434
  }, [r]);
418
- let se = (t) => {
419
- if (t?.preventDefault(), n || V.isUploading) return;
420
- let r = j.current?.getHTML() ?? N;
421
- if (!be(r)) {
422
- F(C.invalidContent);
435
+ let ue = (t) => {
436
+ if (t?.preventDefault(), n || F.isUploading) return;
437
+ let r = O.current?.getHTML() ?? k;
438
+ if (!Ce(r)) {
439
+ M(C.invalidContent);
423
440
  return;
424
441
  }
425
- F(null), a({
442
+ M(null), a({
426
443
  content: r,
427
444
  commentableId: e.id,
428
445
  commentableType: e.type,
429
446
  moduleKey: e.moduleKey,
430
447
  contentType: "html",
431
- references: I.mentions,
432
- attachments: V.uploadedAttachments,
448
+ references: P.mentions,
449
+ attachments: F.uploadedAttachments,
433
450
  replyToId: l?.commentId ?? v?.replyToId,
434
451
  editingId: c?.id
435
452
  });
436
- }, ce = z(null), le = () => ce.current?.click(), ue = (e) => {
437
- e && V.addFiles(e);
438
- }, W = V.attachments.length > 0, G = !!c, K = !G && !!l, me = n ? C.composerSubmitting : G ? C.composerSave : C.composerSubmit, he = G ? /* @__PURE__ */ H(xe, {
453
+ }, W = z(null), de = () => W.current?.click(), G = (e) => {
454
+ e?.length && (N(null), F.addFiles(e));
455
+ }, K = F.attachments.length > 0, q = !!c, J = !q && !!l, me = n ? C.composerSubmitting : q ? C.composerSave : C.composerSubmit, he = q ? /* @__PURE__ */ H(we, {
439
456
  label: C.composerEditingEyebrow,
440
457
  closeLabel: C.composerCancel,
441
- onClose: o
442
- }) : K ? /* @__PURE__ */ H(xe, {
443
- label: Se(C.composerReplyingEyebrow, l.authorName),
458
+ onClose: o ? V : void 0
459
+ }) : J ? /* @__PURE__ */ H(we, {
460
+ label: Q(C.composerReplyingEyebrow, l.authorName),
444
461
  closeLabel: C.composerCancel,
445
- onClose: o
446
- }) : null, q = R(() => {
462
+ onClose: o ? V : void 0
463
+ }) : null, Y = R(() => {
447
464
  let e = [];
448
465
  return w && Object.keys(w).length > 0 && e.push({
449
466
  id: "reference",
450
- icon: oe,
467
+ icon: le,
451
468
  label: C.composerReferenceLabel,
452
- onClick: () => I.setPickerOpen(!0)
453
- }), k?.onUpload && !k.disabled && e.push({
469
+ onClick: () => P.setPickerOpen(!0)
470
+ }), D?.onUpload && !D.disabled && e.push({
454
471
  id: "attachment",
455
- icon: fe,
472
+ icon: pe,
456
473
  label: C.composerAttachmentLabel,
457
- onClick: le
474
+ onClick: de
458
475
  }), e;
459
476
  }, [
460
477
  w,
461
- k?.onUpload,
462
- k?.disabled,
478
+ D?.onUpload,
479
+ D?.disabled,
463
480
  C.composerReferenceLabel,
464
481
  C.composerAttachmentLabel
465
482
  ]);
466
483
  if (!t) return null;
467
- let J = /* @__PURE__ */ H(s, {
484
+ let X = /* @__PURE__ */ H(p, {
485
+ tone: "primary",
468
486
  type: "button",
469
- onClick: () => se(),
470
- disabled: n || V.isUploading,
471
- icon: n ? de : pe,
487
+ onClick: () => ue(),
488
+ disabled: n || F.isUploading,
489
+ icon: n ? fe : void 0,
472
490
  children: me
473
- }), ge = G || K || o ? /* @__PURE__ */ H(s, {
491
+ }), _e = q || J || o ? /* @__PURE__ */ H(p, {
474
492
  type: "button",
475
493
  tone: "secondary",
476
494
  buttonStyle: "ghost",
477
- onClick: o,
495
+ onClick: V,
478
496
  disabled: n,
479
497
  children: C.composerCancel
480
- }) : null, X = W ? /* @__PURE__ */ H(p, {
498
+ }) : null, ve = K ? /* @__PURE__ */ H(m, {
481
499
  direction: "horizontal",
482
500
  wrap: !0,
483
501
  align: "center",
484
502
  gap: "sm",
485
- children: V.attachments.map((e) => /* @__PURE__ */ H(ve, {
503
+ children: F.attachments.map((e) => /* @__PURE__ */ H(be, {
486
504
  attachment: e,
487
505
  editable: !0,
488
- onRemove: V.removeAttachment,
489
- onRetry: V.retryAttachment,
490
- strings: d
506
+ onRemove: (e) => {
507
+ N(null), F.removeAttachment(e);
508
+ },
509
+ onRetry: (e) => {
510
+ N(null), F.retryAttachment(e);
511
+ },
512
+ strings: u
491
513
  }, e.id))
492
- }) : null, _e = W ? X : null, Z = b !== !1 && !G && !K ? J : null, Q = b === !1 || G || K;
493
- return /* @__PURE__ */ U(p, {
514
+ }) : null, ye = K ? ve : null, xe = b !== !1 && !q && !J ? X : null, Z = b === !1 || q || J;
515
+ return /* @__PURE__ */ U(m, {
494
516
  render: /* @__PURE__ */ H("form", {}),
495
517
  gap: "md",
496
- onSubmit: se,
518
+ onSubmit: ue,
497
519
  className: "comment-composer--component",
498
520
  children: [
499
521
  he,
500
522
  /* @__PURE__ */ H("input", {
501
- ref: ce,
523
+ ref: W,
502
524
  type: "file",
503
525
  multiple: !0,
504
526
  hidden: !0,
505
- accept: k?.accept,
527
+ accept: D?.accept,
506
528
  onChange: (e) => {
507
- ue(e.target.files), e.target.value = "";
529
+ G(e.target.files), e.target.value = "";
508
530
  }
509
531
  }),
510
- !I.triggerActive && /* @__PURE__ */ U(ee, {
511
- open: I.pickerOpen,
512
- onOpenChange: I.setPickerOpen,
513
- children: [/* @__PURE__ */ H(O, { render: /* @__PURE__ */ H(s, {
532
+ !P.triggerActive && /* @__PURE__ */ U(ne, {
533
+ open: P.pickerOpen,
534
+ onOpenChange: P.setPickerOpen,
535
+ children: [/* @__PURE__ */ H(te, { render: /* @__PURE__ */ H(p, {
514
536
  type: "button",
515
537
  tone: "secondary",
516
538
  buttonStyle: "ghost",
517
539
  className: "sr-only",
518
540
  tabIndex: -1,
519
541
  children: C.composerReferenceLabel
520
- }) }), /* @__PURE__ */ H(re, {
521
- open: I.pickerOpen,
522
- activeKind: I.activeKind,
542
+ }) }), /* @__PURE__ */ H(oe, {
543
+ open: P.pickerOpen,
544
+ activeKind: P.activeKind,
523
545
  setActiveKind: (e) => {
524
- I.setActiveKind(e), I.setManualKindOverride(!0);
546
+ P.setActiveKind(e), P.setManualKindOverride(!0);
525
547
  },
526
- kinds: I.kinds,
548
+ kinds: P.kinds,
527
549
  resources: w,
528
- query: I.query,
529
- setQuery: I.setQuery,
530
- suggestions: I.suggestions,
531
- loading: I.isLoading,
532
- onSelect: I.pickSuggestion,
550
+ query: P.query,
551
+ setQuery: P.setQuery,
552
+ suggestions: P.suggestions,
553
+ loading: P.isLoading,
554
+ onSelect: P.pickSuggestion,
533
555
  strings: {
534
556
  title: C.composerReferenceMenuTitle,
535
557
  searchPlaceholder: C.composerReferenceSearchPlaceholder,
@@ -540,38 +562,38 @@ var Z = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors:
540
562
  }),
541
563
  /* @__PURE__ */ U("div", {
542
564
  className: "comment-composer--editor relative",
543
- children: [/* @__PURE__ */ H(te, {
544
- ref: j,
545
- value: N,
565
+ children: [/* @__PURE__ */ H(ie, {
566
+ ref: O,
567
+ value: k,
546
568
  onValueChange: (e) => {
547
- ie(e);
548
- let t = M(e), n = I.mentions;
569
+ re(e);
570
+ let t = se(e), n = P.mentions;
549
571
  if (n.map((e) => e.id).join("|") !== t.map((e) => e.id).join("|")) {
550
572
  let e = new Map(n.map((e) => [e.id, e])), r = t.map((t) => e.get(t.id) ?? t);
551
- I.setMentions(r);
573
+ P.setMentions(r);
552
574
  }
553
575
  },
554
576
  placeholder: x ?? C.composerPlaceholder,
555
577
  strings: { editorLabel: x ?? C.composerPlaceholder },
556
578
  minHeight: "3rem",
557
- autoFocus: y || G || K,
558
- extraToolbarItems: q,
559
- toolbarTrailing: Z,
560
- footerSlot: _e,
561
- onCaretChange: I.handleCaretChange
562
- }), /* @__PURE__ */ H(ne, {
563
- open: I.triggerActive && I.pickerOpen,
564
- activeKind: I.activeKind,
579
+ autoFocus: y || q || J,
580
+ extraToolbarItems: Y,
581
+ toolbarTrailing: xe,
582
+ footerSlot: ye,
583
+ onCaretChange: P.handleCaretChange
584
+ }), /* @__PURE__ */ H(ae, {
585
+ open: P.triggerActive && P.pickerOpen,
586
+ activeKind: P.activeKind,
565
587
  setActiveKind: (e) => {
566
- I.setActiveKind(e), I.setManualKindOverride(!0);
588
+ P.setActiveKind(e), P.setManualKindOverride(!0);
567
589
  },
568
- kinds: I.kinds,
590
+ kinds: P.kinds,
569
591
  resources: w,
570
- query: I.query,
571
- suggestions: I.suggestions,
572
- suggestionsByKind: I.suggestionsByKind,
573
- loading: I.isLoading,
574
- onSelect: I.pickSuggestion,
592
+ query: P.query,
593
+ suggestions: P.suggestions,
594
+ suggestionsByKind: P.suggestionsByKind,
595
+ loading: P.isLoading,
596
+ onSelect: P.pickSuggestion,
575
597
  strings: {
576
598
  title: C.composerReferenceMenuTitle,
577
599
  empty: C.composerReferenceEmpty,
@@ -579,49 +601,55 @@ var Z = P(function({ context: e, canComment: t = !0, submitting: n = !1, errors:
579
601
  }
580
602
  })]
581
603
  }),
582
- P && /* @__PURE__ */ H(u, {
604
+ ce && /* @__PURE__ */ H(s, {
605
+ role: "alert",
583
606
  size: "xs",
584
607
  type: "error",
585
- children: P
608
+ className: "comment-composer--attachment-error",
609
+ children: ce
586
610
  }),
587
- Q && /* @__PURE__ */ U(p, {
611
+ j && /* @__PURE__ */ H(s, {
612
+ size: "xs",
613
+ type: "error",
614
+ children: j
615
+ }),
616
+ Z && /* @__PURE__ */ U(m, {
588
617
  direction: "horizontal",
589
618
  align: "center",
590
619
  justify: "end",
591
620
  gap: "md",
592
621
  className: "comment-composer--footer-actions",
593
- children: [ge, J]
622
+ children: [_e, X]
594
623
  })
595
624
  ]
596
625
  });
597
626
  });
598
- function xe({ label: e, closeLabel: t, onClose: n }) {
627
+ function we({ label: e, closeLabel: t, onClose: n }) {
599
628
  return /* @__PURE__ */ U("div", {
600
- className: "bg-muted/40 ring-border/60 flex items-center justify-between rounded px-2.5 py-1.5 ring-1 ring-inset",
601
- children: [/* @__PURE__ */ H(d, { children: e }), n ? /* @__PURE__ */ H(s, {
629
+ className: i("comment-composer--eyebrow bg-muted/40 ring-border/60 flex min-w-0 items-center justify-between gap-space-sm rounded-radius px-row-x ring-1 ring-inset", h.compact),
630
+ children: [/* @__PURE__ */ H(o, { children: e }), n ? /* @__PURE__ */ H("button", {
602
631
  type: "button",
603
- tone: "secondary",
604
- buttonStyle: "ghost",
605
- size: "sm",
606
- iconOnly: !0,
607
632
  onClick: n,
608
- className: "size-icon rounded p-0 text-muted-foreground hover:text-foreground",
633
+ className: i(k.target, k.focus, k.toggle),
609
634
  "aria-label": t,
610
- children: /* @__PURE__ */ H(q, { className: "size-icon-sm" })
635
+ children: /* @__PURE__ */ H(Y, {
636
+ className: k.icon,
637
+ "aria-hidden": "true"
638
+ })
611
639
  }) : null]
612
640
  });
613
641
  }
614
- function Se(e, t) {
642
+ function Q(e, t) {
615
643
  return n(e, { name: t }, { missing: "empty" });
616
644
  }
617
645
  //#endregion
618
646
  //#region src/components/features/comments/partials/comment-empty.tsx
619
- var Q = ({ strings: e, icon: t, className: n }) => {
620
- let r = Y(e);
621
- return /* @__PURE__ */ H(k, {
647
+ var $ = ({ strings: e, icon: t, className: n }) => {
648
+ let r = ge(e);
649
+ return /* @__PURE__ */ H(re, {
622
650
  title: r.empty,
623
651
  description: r.emptyHint || !1,
624
- media: t ?? /* @__PURE__ */ H(W, {
652
+ media: t ?? /* @__PURE__ */ H(K, {
625
653
  className: "size-icon",
626
654
  "aria-hidden": "true"
627
655
  }),
@@ -632,10 +660,10 @@ var Q = ({ strings: e, icon: t, className: n }) => {
632
660
  };
633
661
  //#endregion
634
662
  //#region src/components/features/comments/partials/comment-content.tsx
635
- function Ce(e) {
663
+ function Te(e) {
636
664
  let { comment: t, resources: n, renderReference: r, sanitizer: i } = e, a = t.contentType ?? t.content_type ?? "text";
637
665
  if (a === "rich") {
638
- let e = we(t.content);
666
+ let e = Ee(t.content);
639
667
  return e ? /* @__PURE__ */ H("div", {
640
668
  className: "comment-content--component",
641
669
  children: e
@@ -651,48 +679,48 @@ function Ce(e) {
651
679
  sanitizer: i
652
680
  })
653
681
  });
654
- let o = Ee(t.content ?? "");
655
- return /* @__PURE__ */ H(u, {
682
+ let o = ke(t.content ?? "");
683
+ return /* @__PURE__ */ H(s, {
656
684
  className: "comment-content--component whitespace-pre-line",
657
685
  children: o
658
686
  });
659
687
  }
660
- function we(e) {
688
+ function Ee(e) {
661
689
  if (!e) return null;
662
690
  try {
663
691
  let t = JSON.parse(e);
664
- return !t || !Array.isArray(t.blocks) || t.blocks.length === 0 ? null : /* @__PURE__ */ H(u, {
692
+ return !t || !Array.isArray(t.blocks) || t.blocks.length === 0 ? null : /* @__PURE__ */ H(s, {
665
693
  tag: "div",
666
- className: _,
667
- children: t.blocks.map((e, t) => /* @__PURE__ */ H(N, { children: Te(e) }, e.id ?? `${e.type}-${t}`))
694
+ className: y,
695
+ children: t.blocks.map((e, t) => /* @__PURE__ */ H(M, { children: De(e) }, e.id ?? `${e.type}-${t}`))
668
696
  });
669
697
  } catch {
670
- let t = Ee(e);
671
- return /* @__PURE__ */ H(u, {
698
+ let t = ke(e);
699
+ return /* @__PURE__ */ H(s, {
672
700
  className: "whitespace-pre-line",
673
701
  children: t
674
702
  });
675
703
  }
676
704
  }
677
- function Te(e) {
705
+ function De(e) {
678
706
  let t = e.data ?? {};
679
707
  switch (e.type) {
680
708
  case "paragraph": {
681
709
  let e = String(t.text ?? "").trim();
682
710
  if (!e) return null;
683
- let n = g(e);
711
+ let n = v(e);
684
712
  return n ? /* @__PURE__ */ H("p", { dangerouslySetInnerHTML: { __html: n } }) : null;
685
713
  }
686
714
  case "header": {
687
- let e = $(String(t.text ?? "")), n = Number(t.level ?? 3);
688
- return e ? ie(`h${Math.min(Math.max(n, 1), 6)}`, null, e) : null;
715
+ let e = Oe(String(t.text ?? "")), n = Number(t.level ?? 3);
716
+ return e ? ce(`h${Math.min(Math.max(n, 1), 6)}`, null, e) : null;
689
717
  }
690
718
  case "list": {
691
- let e = (Array.isArray(t.items) ? t.items : []).map((e) => $(String(e ?? ""))).filter((e) => e.length > 0);
692
- return e.length === 0 ? null : t.style === "ordered" ? /* @__PURE__ */ H("ol", { children: e.map((e, t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(u, {
719
+ let e = (Array.isArray(t.items) ? t.items : []).map((e) => Oe(String(e ?? ""))).filter((e) => e.length > 0);
720
+ return e.length === 0 ? null : t.style === "ordered" ? /* @__PURE__ */ H("ol", { children: e.map((e, t) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(s, {
693
721
  tag: "span",
694
722
  children: e
695
- }) }, `${e}-${t}`)) }) : /* @__PURE__ */ H("ul", { children: e.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(u, {
723
+ }) }, `${e}-${t}`)) }) : /* @__PURE__ */ H("ul", { children: e.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ H(s, {
696
724
  tag: "span",
697
725
  children: e
698
726
  }) }, e)) });
@@ -700,16 +728,16 @@ function Te(e) {
700
728
  case "quote": {
701
729
  let e = String(t.text ?? "").trim();
702
730
  if (!e) return null;
703
- let n = $(String(t.caption ?? ""));
731
+ let n = Oe(String(t.caption ?? ""));
704
732
  return /* @__PURE__ */ U("blockquote", {
705
733
  className: "italic",
706
- children: [/* @__PURE__ */ H(v, {
734
+ children: [/* @__PURE__ */ H(b, {
707
735
  tag: "div",
708
736
  html: e,
709
737
  type: "secondary"
710
738
  }), n.length > 0 && /* @__PURE__ */ H("cite", {
711
739
  className: "mt-1 block not-italic",
712
- children: /* @__PURE__ */ U(u, {
740
+ children: /* @__PURE__ */ U(s, {
713
741
  tag: "span",
714
742
  size: "xs",
715
743
  type: "secondary",
@@ -724,7 +752,7 @@ function Te(e) {
724
752
  "aria-hidden": "true"
725
753
  });
726
754
  default: {
727
- let e = $(String(t.text ?? ""));
755
+ let e = Oe(String(t.text ?? ""));
728
756
  return e ? /* @__PURE__ */ H("p", {
729
757
  className: "whitespace-pre-line",
730
758
  children: e
@@ -732,10 +760,10 @@ function Te(e) {
732
760
  }
733
761
  }
734
762
  }
735
- function $(e) {
763
+ function Oe(e) {
736
764
  return e.replace(/<[^>]*>/g, "").trim();
737
765
  }
738
- function Ee(e) {
766
+ function ke(e) {
739
767
  if (typeof e != "string") return "";
740
768
  let t = e.trim();
741
769
  if (t === "") return "";
@@ -748,151 +776,148 @@ function Ee(e) {
748
776
  }
749
777
  //#endregion
750
778
  //#region src/components/features/comments/partials/comment-item.tsx
751
- var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "), je = F(function({ comment: e, canModerate: t, onDelete: r, onAttachmentRemove: d, onEdit: f, onPinToggle: g, onReact: _, onReply: v, allowReactions: y, allowReplies: b, sanitizer: x, strings: O, getMediaUrl: ee, getMediaName: k, getStatusLabel: te, formatRelativeTime: A, resources: ne, renderAttachment: j, renderReference: re }) {
752
- let M = Y(O), N = y ?? !0, ie = b ?? !0, P = ge({
753
- getMediaUrl: ee,
754
- getMediaName: k,
755
- getStatusLabel: te,
756
- formatRelativeTime: A
757
- }), F = P.getMediaUrl ?? Oe, L = P.getMediaName ?? ke, ae = P.getStatusLabel ?? Ae, z = P.formatRelativeTime, V = e.user?.name ?? M.fallbackAuthor, oe = e.user?.avatar ?? void 0, ce = R(() => {
758
- if (!V) return De;
759
- let e = V.trim();
760
- return e === "" ? De : e.charAt(0).toUpperCase();
761
- }, [V]), le = R(() => Array.isArray(e.tagsArray) ? e.tagsArray.filter((e) => typeof e == "string") : e.tagsArray && typeof e.tagsArray == "object" ? Object.values(e.tagsArray).filter((e) => typeof e == "string") : [], [e.tagsArray]), ue = R(() => (e.attachments ?? []).filter((e) => !!e && typeof e == "object"), [e.attachments]), de = N ? e.reactions ?? [] : [], W = e.isPinned === !0, fe = e.isEdited === !0, pe = e.status && e.status !== "active", q = pe && e.status ? ae(e.status) : null, X = e.canDelete === !0 || t === !0, _e = e.canEdit === !0 || t === !0, ye = !!ie && !!v && !!e.id, be = !!N && !!_ && !!e.id, Z = !!g && !!t, xe = !!_e && !!f && !!e.id, Se = !!X && !!r && !!e.id, Q = ye || be || Z || xe || Se, we = m(), [Te, $] = B(null), Ee = I((e) => {
762
- $(e), we.show();
763
- }, [we]), je = ue.length > 0;
779
+ var Ae = "?", je = (e) => e?.url, Me = (e) => e?.name, Ne = (e) => e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "), Pe = P(function({ comment: e, canModerate: t, onDelete: r, onAttachmentRemove: a, onEdit: o, onPinToggle: c, onReact: h, onReply: v, allowReactions: y, allowReplies: b, sanitizer: x, strings: S, getMediaUrl: C, getMediaName: te, getStatusLabel: ne, formatRelativeTime: re, resources: ie, renderAttachment: A, renderReference: ae }) {
780
+ let j = ge(S), oe = y ?? !0, se = b ?? !0, M = _e({
781
+ getMediaUrl: C,
782
+ getMediaName: te,
783
+ getStatusLabel: ne,
784
+ formatRelativeTime: re
785
+ }), ce = M.getMediaUrl ?? je, N = M.getMediaName ?? Me, P = M.getStatusLabel ?? Ne, I = M.formatRelativeTime, L = e.user?.name ?? j.fallbackAuthor, z = e.user?.avatar ?? void 0, V = R(() => {
786
+ if (!L) return Ae;
787
+ let e = L.trim();
788
+ return e === "" ? Ae : e.charAt(0).toUpperCase();
789
+ }, [L]), le = R(() => Array.isArray(e.tagsArray) ? e.tagsArray.filter((e) => typeof e == "string") : e.tagsArray && typeof e.tagsArray == "object" ? Object.values(e.tagsArray).filter((e) => typeof e == "string") : [], [e.tagsArray]), W = R(() => (e.attachments ?? []).filter((e) => !!e && typeof e == "object"), [e.attachments]), de = oe ? e.reactions ?? [] : [], G = e.isPinned === !0, fe = e.isEdited === !0, K = e.status && e.status !== "active", pe = K && e.status ? P(e.status) : null, Y = e.canDelete === !0 || t === !0, ve = e.canEdit === !0 || t === !0, ye = !!se && !!v && !!e.id, xe = !!oe && !!h && !!e.id, Se = !!c && !!t, Ce = !!ve && !!o && !!e.id, Z = !!Y && !!r && !!e.id, we = ye || xe || Se || Ce || Z, Q = g(), [$, Ee] = B(null), De = F((e) => {
790
+ Ee(e), Q.show();
791
+ }, [Q]), Oe = W.length > 0;
764
792
  return /* @__PURE__ */ U("article", {
765
- className: i("comment-item--component group relative overflow-hidden rounded-radius border transition-colors", "border-border/60 bg-card hover:bg-muted/30 px-3 py-2.5"),
793
+ className: i("comment-item--component group relative overflow-hidden rounded-radius border transition-colors", "border-border/60 bg-card hover:bg-muted/30 p-surface"),
766
794
  "data-comment-id": e.id,
767
- children: [/* @__PURE__ */ U(p, {
795
+ children: [/* @__PURE__ */ U(m, {
768
796
  direction: "horizontal",
769
797
  align: "start",
770
798
  gap: "lg",
771
799
  className: "min-w-0",
772
- children: [/* @__PURE__ */ U(T, {
800
+ children: [/* @__PURE__ */ U(E, {
773
801
  className: "mt-0.5 size-avatar shrink-0",
774
- children: [!!oe && /* @__PURE__ */ H(E, {
775
- src: oe,
776
- alt: V
777
- }), /* @__PURE__ */ H(w, {
802
+ children: [!!z && /* @__PURE__ */ H(D, {
803
+ src: z,
804
+ alt: L
805
+ }), /* @__PURE__ */ H(T, {
778
806
  className: "bg-muted text-muted-foreground text-xs font-medium",
779
- children: ce
807
+ children: V
780
808
  })]
781
809
  }), /* @__PURE__ */ U("div", {
782
810
  className: "comment-item--body min-w-0 flex-1",
783
811
  children: [
784
- /* @__PURE__ */ U(p, {
812
+ /* @__PURE__ */ U(m, {
785
813
  direction: "horizontal",
786
814
  align: "baseline",
787
815
  gap: "md",
788
816
  className: "min-w-0",
789
817
  children: [
790
- /* @__PURE__ */ H(u, {
818
+ /* @__PURE__ */ H(s, {
791
819
  tag: "span",
792
820
  weight: "semibold",
793
821
  className: "truncate",
794
- children: V
822
+ children: L
795
823
  }),
796
- !!W && /* @__PURE__ */ H(a, {
824
+ !!G && /* @__PURE__ */ H(f, {
797
825
  delayDuration: 0,
798
- children: /* @__PURE__ */ U(c, { children: [/* @__PURE__ */ H(o, {
826
+ children: /* @__PURE__ */ U(l, { children: [/* @__PURE__ */ H(u, {
799
827
  render: /* @__PURE__ */ H("span", { className: "inline-flex shrink-0 self-center" }),
800
- children: /* @__PURE__ */ H(K, {
801
- className: "text-warning size-icon-sm",
828
+ children: /* @__PURE__ */ H(J, {
829
+ className: "text-muted-foreground size-icon-sm",
802
830
  "aria-hidden": !0
803
831
  })
804
- }), /* @__PURE__ */ H(l, {
832
+ }), /* @__PURE__ */ H(d, {
805
833
  side: "top",
806
834
  className: "text-xs",
807
- children: M.pinned
835
+ children: j.pinned
808
836
  })] })
809
837
  }),
810
- /* @__PURE__ */ H(C, {
838
+ /* @__PURE__ */ H(ee, {
811
839
  value: e.createdAt,
812
- formatRelativeTime: z,
840
+ formatRelativeTime: I,
813
841
  size: "xs",
814
842
  className: "shrink-0 tabular-nums"
815
843
  }),
816
- !!fe && /* @__PURE__ */ H(u, {
844
+ !!fe && /* @__PURE__ */ H(s, {
817
845
  tag: "span",
818
846
  size: "xs",
819
847
  type: "secondary",
820
848
  className: "shrink-0",
821
- children: M.edited
849
+ children: j.edited
822
850
  }),
823
- !!pe && !!q && /* @__PURE__ */ H(D, {
851
+ !!K && !!pe && /* @__PURE__ */ H(O, {
824
852
  size: "sm",
825
853
  tone: "secondary",
826
854
  className: "self-center",
827
- children: q
855
+ children: pe
828
856
  })
829
857
  ]
830
858
  }),
831
859
  /* @__PURE__ */ H("div", {
832
860
  className: "mt-1 leading-relaxed",
833
- children: /* @__PURE__ */ H(Ce, {
861
+ children: /* @__PURE__ */ H(Te, {
834
862
  comment: e,
835
- resources: ne,
836
- renderReference: re,
863
+ resources: ie,
864
+ renderReference: ae,
837
865
  sanitizer: x
838
866
  })
839
867
  }),
840
868
  le.length > 0 && /* @__PURE__ */ H("div", {
841
869
  className: "mt-space-md flex flex-wrap gap-space-sm",
842
- children: le.map((e) => /* @__PURE__ */ H(D, {
870
+ children: le.map((e) => /* @__PURE__ */ H(O, {
843
871
  size: "sm",
844
872
  tone: "secondary",
845
873
  children: e
846
874
  }, e))
847
875
  }),
848
- je && /* @__PURE__ */ H("div", {
876
+ Oe && /* @__PURE__ */ H("div", {
849
877
  className: "mt-space-md flex flex-wrap gap-space-sm",
850
- children: ue.map((e) => {
851
- if (j) return /* @__PURE__ */ H("div", { children: j(e) }, e.id ?? e.name);
852
- let t = !!d && !!e.id && X;
853
- return /* @__PURE__ */ H(ve, {
878
+ children: W.map((e) => {
879
+ if (A) return /* @__PURE__ */ H("div", { children: A(e) }, e.id ?? e.name);
880
+ let t = !!a && !!e.id && Y;
881
+ return /* @__PURE__ */ H(be, {
854
882
  attachment: e,
855
883
  editable: t,
856
- onRemove: t ? () => Ee(e.id) : void 0,
884
+ onRemove: t ? () => De(e.id) : void 0,
857
885
  accessors: {
858
- getMediaUrl: F,
859
- getMediaName: L
886
+ getMediaUrl: ce,
887
+ getMediaName: N
860
888
  },
861
- strings: O
889
+ strings: S
862
890
  }, e.id ?? e.name);
863
891
  })
864
892
  }),
865
- de.length > 0 && /* @__PURE__ */ H(p, {
893
+ de.length > 0 && /* @__PURE__ */ H(m, {
866
894
  direction: "horizontal",
867
895
  wrap: !0,
868
896
  align: "center",
869
897
  gap: "xs",
870
898
  className: "mt-space-md",
871
- children: de.map((t) => /* @__PURE__ */ H(s, {
899
+ children: de.map((t) => /* @__PURE__ */ H("button", {
872
900
  type: "button",
873
- "aria-label": n(M.reactionLabel ?? J.reactionLabel, {
901
+ "aria-label": n(j.reactionLabel ?? X.reactionLabel, {
874
902
  emoji: t.emoji,
875
903
  count: t.count
876
904
  }),
877
905
  "aria-pressed": t.mine ?? !1,
878
- tone: "secondary",
879
- buttonStyle: "ghost",
880
- size: "sm",
881
- onClick: () => _ && e.id ? _(e.id, t.emoji) : void 0,
906
+ onClick: () => h && e.id ? h(e.id, t.emoji) : void 0,
882
907
  title: t.users?.join(", "),
883
- className: "h-auto rounded-full p-0",
884
- children: /* @__PURE__ */ U(D, {
908
+ className: i(k.inline, k.focus),
909
+ children: /* @__PURE__ */ U(O, {
885
910
  size: "sm",
886
- tone: t.mine ? "primary" : "secondary",
911
+ tone: t.mine ? "info" : "secondary",
887
912
  className: "cursor-pointer transition-colors hover:opacity-90",
888
- children: [/* @__PURE__ */ H(u, {
913
+ children: [/* @__PURE__ */ H(s, {
889
914
  tag: "span",
890
915
  size: "inherit",
891
916
  lineHeight: "none",
892
917
  className: "text-inherit",
893
918
  "aria-hidden": !0,
894
919
  children: t.emoji
895
- }), /* @__PURE__ */ H(S, {
920
+ }), /* @__PURE__ */ H(w, {
896
921
  value: t.count,
897
922
  size: "inherit",
898
923
  align: "left",
@@ -901,54 +926,54 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
901
926
  })
902
927
  }, t.emoji))
903
928
  }),
904
- Q && /* @__PURE__ */ U("div", {
905
- className: i("comment-item--actions relative mt-space-md ms-auto w-fit max-w-full flex-wrap opacity-100 transition-opacity", "group-hover:opacity-100 focus-within:opacity-100", "inline-flex items-center gap-space-2xs rounded-radius-md bg-card/95 shadow-sm ring-1 ring-border/70"),
929
+ we && /* @__PURE__ */ U("div", {
930
+ className: i("comment-item--actions relative mt-space-md ms-auto w-fit max-w-full flex-wrap opacity-100 transition-opacity", "group-hover:opacity-100 focus-within:opacity-100", "inline-flex items-center gap-space-2xs"),
906
931
  children: [
907
- ye && /* @__PURE__ */ H(s, {
932
+ ye && /* @__PURE__ */ H(p, {
908
933
  type: "button",
909
934
  size: "sm",
910
935
  iconOnly: !0,
911
936
  tone: "secondary",
912
937
  buttonStyle: "ghost",
913
938
  onClick: () => e.id && v(e.id),
914
- title: M.replyLabel,
915
- "aria-label": M.replyLabel,
916
- children: /* @__PURE__ */ H(se, { className: "size-icon-md" })
939
+ title: j.replyLabel,
940
+ "aria-label": j.replyLabel,
941
+ children: /* @__PURE__ */ H(ue, { className: "size-icon-md" })
917
942
  }),
918
- be && /* @__PURE__ */ H(s, {
943
+ xe && /* @__PURE__ */ H(p, {
919
944
  type: "button",
920
945
  size: "sm",
921
946
  iconOnly: !0,
922
947
  tone: "secondary",
923
948
  buttonStyle: "ghost",
924
- onClick: () => e.id && _(e.id, "👍"),
925
- title: M.addReactionLabel,
926
- "aria-label": M.addReactionLabel,
949
+ onClick: () => e.id && h(e.id, "👍"),
950
+ title: j.addReactionLabel,
951
+ "aria-label": j.addReactionLabel,
927
952
  children: /* @__PURE__ */ H(me, { className: "size-icon-md" })
928
953
  }),
929
- Z && /* @__PURE__ */ H(s, {
954
+ Se && /* @__PURE__ */ H(p, {
930
955
  type: "button",
931
956
  size: "sm",
932
957
  iconOnly: !0,
933
958
  tone: "secondary",
934
959
  buttonStyle: "ghost",
935
- onClick: () => g(e),
936
- title: W ? M.unpinLabel : M.pinLabel,
937
- "aria-label": W ? M.unpinLabel : M.pinLabel,
938
- children: /* @__PURE__ */ H(K, { className: i("size-icon-md", W && "text-warning") })
960
+ onClick: () => c(e),
961
+ title: G ? j.unpinLabel : j.pinLabel,
962
+ "aria-label": G ? j.unpinLabel : j.pinLabel,
963
+ children: /* @__PURE__ */ H(J, { className: i("size-icon-md", G && "text-foreground") })
939
964
  }),
940
- xe && /* @__PURE__ */ H(s, {
965
+ Ce && /* @__PURE__ */ H(p, {
941
966
  type: "button",
942
967
  size: "sm",
943
968
  iconOnly: !0,
944
969
  tone: "secondary",
945
970
  buttonStyle: "ghost",
946
- title: M.editLabel,
947
- "aria-label": M.editLabel,
948
- onClick: () => f(e),
949
- children: /* @__PURE__ */ H(G, { className: "size-icon-md" })
971
+ title: j.editLabel,
972
+ "aria-label": j.editLabel,
973
+ onClick: () => o(e),
974
+ children: /* @__PURE__ */ H(q, { className: "size-icon-md" })
950
975
  }),
951
- Se && /* @__PURE__ */ H(s, {
976
+ Z && /* @__PURE__ */ H(p, {
952
977
  type: "button",
953
978
  size: "sm",
954
979
  iconOnly: !0,
@@ -956,31 +981,31 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
956
981
  buttonStyle: "ghost",
957
982
  className: "hover:bg-destructive/10 hover:text-destructive",
958
983
  onClick: () => r(e.id),
959
- title: M.deleteLabel,
960
- "aria-label": M.deleteLabel,
984
+ title: j.deleteLabel,
985
+ "aria-label": j.deleteLabel,
961
986
  children: /* @__PURE__ */ H(he, { className: "size-icon-md" })
962
987
  })
963
988
  ]
964
989
  })
965
990
  ]
966
991
  })]
967
- }), !!d && /* @__PURE__ */ H(h, {
968
- ...we.overlayProps,
992
+ }), !!a && /* @__PURE__ */ H(_, {
993
+ ...Q.overlayProps,
969
994
  destructive: !0,
970
- title: M.confirmRemoveAttachmentTitle,
971
- description: M.confirmRemoveAttachmentDescription,
972
- strings: { confirm: M.attachmentRemoveLabel },
995
+ title: j.confirmRemoveAttachmentTitle,
996
+ description: j.confirmRemoveAttachmentDescription,
997
+ strings: { confirm: j.attachmentRemoveLabel },
973
998
  onConfirm: () => {
974
- Te && e.id && d(e.id, Te);
999
+ $ && e.id && a(e.id, $);
975
1000
  }
976
1001
  })]
977
1002
  });
978
- }), Me = function({ comments: e, canModerate: t, onDelete: n, onAttachmentRemove: r, onEdit: i, onPinToggle: a, onReact: o, onReply: s, allowReactions: c, allowReplies: l, sanitizer: u, strings: d, getMediaUrl: f, getMediaName: m, getStatusLabel: h, formatRelativeTime: g, resources: _, renderItem: v, renderAttachment: y, renderReference: b, emptySlot: x }) {
979
- return e.length ? /* @__PURE__ */ H(p, {
1003
+ }), Fe = function({ comments: e, canModerate: t, onDelete: n, onAttachmentRemove: r, onEdit: i, onPinToggle: a, onReact: o, onReply: s, allowReactions: c, allowReplies: l, sanitizer: u, strings: d, getMediaUrl: f, getMediaName: p, getStatusLabel: h, formatRelativeTime: g, resources: _, renderItem: v, renderAttachment: y, renderReference: b, emptySlot: x }) {
1004
+ return e.length ? /* @__PURE__ */ H(m, {
980
1005
  gap: "sm",
981
1006
  className: "comment-timeline--component",
982
- children: e.map((e, p) => {
983
- let x = /* @__PURE__ */ H(je, {
1007
+ children: e.map((e, m) => {
1008
+ let x = /* @__PURE__ */ H(Pe, {
984
1009
  comment: e,
985
1010
  canModerate: t,
986
1011
  onDelete: n,
@@ -994,7 +1019,7 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
994
1019
  sanitizer: u,
995
1020
  strings: d,
996
1021
  getMediaUrl: f,
997
- getMediaName: m,
1022
+ getMediaName: p,
998
1023
  getStatusLabel: h,
999
1024
  formatRelativeTime: g,
1000
1025
  resources: _,
@@ -1008,20 +1033,20 @@ var De = "?", Oe = (e) => e?.url, ke = (e) => e?.name, Ae = (e) => e.charAt(0).t
1008
1033
  onAttachmentRemove: r,
1009
1034
  onEdit: i,
1010
1035
  defaultItem: x
1011
- }) }, e.id ?? `comment-${p}`) : /* @__PURE__ */ H("div", { children: x }, e.id ?? `comment-${p}`);
1036
+ }) }, e.id ?? `comment-${m}`) : /* @__PURE__ */ H("div", { children: x }, e.id ?? `comment-${m}`);
1012
1037
  })
1013
- }) : /* @__PURE__ */ H(V, { children: x ?? /* @__PURE__ */ H(Q, { strings: d }) });
1038
+ }) : /* @__PURE__ */ H(V, { children: x ?? /* @__PURE__ */ H($, { strings: d }) });
1014
1039
  };
1015
1040
  //#endregion
1016
1041
  //#region src/components/features/comments/comments.tsx
1017
- function Ne(t) {
1018
- let n = e(), r = t.composerPosition ?? n.composerPosition ?? "top", a = t.maxAttachments ?? 5, o = t.allowAttachments ?? !0, s = t.allowReactions ?? !0, c = t.allowReplies ?? !0, l = t.canComment ?? !1, d = t.canModerate ?? !1, f = t.onPinToggle, g = t.resources, _ = t.attachments, v = Y(t.strings), y = t.title === void 0 ? v.title : t.title, b = t.confirmDelete ?? !0, x = m(), [S, C] = B(null), w = X({
1042
+ function Ie(t) {
1043
+ let n = e(), r = t.composerPosition ?? n.composerPosition ?? "top", a = t.maxAttachments ?? 5, o = t.allowAttachments ?? !0, c = t.allowReactions ?? !0, l = t.allowReplies ?? !0, u = t.canComment ?? !1, d = t.canModerate ?? !1, f = t.onPinToggle, p = t.resources, h = t.attachments, v = ge(t.strings), y = t.title === void 0 ? v.title : t.title, b = t.confirmDelete ?? !0, x = g(), [S, C] = B(null), w = ve({
1019
1044
  onSubmit: t.onSubmit,
1020
1045
  onUpdate: t.onUpdate,
1021
1046
  onDelete: t.onDelete,
1022
1047
  onAfterMutate: t.onAfterMutate,
1023
1048
  onError: t.onError
1024
- }), T = I((e) => {
1049
+ }), ee = F((e) => {
1025
1050
  if (!b) {
1026
1051
  w.deleteComment(e);
1027
1052
  return;
@@ -1031,19 +1056,19 @@ function Ne(t) {
1031
1056
  b,
1032
1057
  w,
1033
1058
  x
1034
- ]), E = w.startReply, D = t.comments, O = t.onReply, ee = I((e) => {
1035
- let t = D.find((t) => t.id === e);
1036
- t && E(t), O?.(e);
1059
+ ]), T = w.startReply, E = t.comments, D = t.onReply, O = F((e) => {
1060
+ let t = E.find((t) => t.id === e);
1061
+ t && T(t), D?.(e);
1037
1062
  }, [
1063
+ E,
1038
1064
  D,
1039
- O,
1040
- E
1065
+ T
1041
1066
  ]), k = w.composerMode.kind === "editing" ? w.composerMode.comment : void 0, te = w.composerMode.kind === "replying" ? {
1042
1067
  commentId: w.composerMode.commentId,
1043
1068
  authorName: w.composerMode.authorName
1044
- } : void 0, A = t.composerSlot ?? (l ? /* @__PURE__ */ H(Z, {
1069
+ } : void 0, ne = t.composerSlot ?? (u ? /* @__PURE__ */ H(Z, {
1045
1070
  context: t.context,
1046
- canComment: l,
1071
+ canComment: u,
1047
1072
  submitting: w.isSubmitting,
1048
1073
  errors: w.formErrors,
1049
1074
  resetKey: w.resetKey,
@@ -1052,67 +1077,67 @@ function Ne(t) {
1052
1077
  onCancel: w.composerMode.kind === "idle" ? void 0 : w.cancelComposerMode,
1053
1078
  onSubmit: w.submit,
1054
1079
  strings: t.strings,
1055
- resources: g,
1080
+ resources: p,
1056
1081
  onResourceSearch: t.onResourceSearch,
1057
- attachments: _,
1082
+ attachments: h,
1058
1083
  maxAttachments: a,
1059
1084
  allowAttachments: o
1060
- }) : null), ne = /* @__PURE__ */ H(Me, {
1085
+ }) : null), re = /* @__PURE__ */ H(Fe, {
1061
1086
  comments: t.comments,
1062
1087
  canModerate: d,
1063
- onDelete: t.onDelete ? T : void 0,
1088
+ onDelete: t.onDelete ? ee : void 0,
1064
1089
  onAttachmentRemove: t.onAttachmentRemove,
1065
- onEdit: l && t.onUpdate ? w.startEdit : void 0,
1090
+ onEdit: u && t.onUpdate ? w.startEdit : void 0,
1066
1091
  onPinToggle: f,
1067
1092
  onReact: t.onReact,
1068
- onReply: l && c ? ee : void 0,
1069
- allowReactions: s,
1070
- allowReplies: c,
1093
+ onReply: u && l ? O : void 0,
1094
+ allowReactions: c,
1095
+ allowReplies: l,
1071
1096
  sanitizer: t.sanitizer,
1072
1097
  strings: t.strings,
1073
1098
  getMediaUrl: t.getMediaUrl,
1074
1099
  getMediaName: t.getMediaName,
1075
1100
  getStatusLabel: t.getStatusLabel,
1076
1101
  formatRelativeTime: t.formatRelativeTime,
1077
- resources: g,
1102
+ resources: p,
1078
1103
  renderItem: t.renderItem,
1079
1104
  renderAttachment: t.renderAttachment,
1080
1105
  renderReference: t.renderReference,
1081
- emptySlot: t.emptySlot ?? /* @__PURE__ */ H(Q, { strings: t.strings })
1082
- }), j = A ? /* @__PURE__ */ H("div", { children: A }) : null, re = /* @__PURE__ */ U(p, {
1106
+ emptySlot: t.emptySlot ?? /* @__PURE__ */ H($, { strings: t.strings })
1107
+ }), ie = ne ? /* @__PURE__ */ H("div", { children: ne }) : null, A = /* @__PURE__ */ U(m, {
1083
1108
  gap: "xl",
1084
1109
  className: "comments--body",
1085
1110
  children: [
1086
1111
  t.headerSlot,
1087
- r === "top" && j,
1088
- ne,
1089
- r === "bottom" && j,
1112
+ r === "top" && ie,
1113
+ re,
1114
+ r === "bottom" && ie,
1090
1115
  t.footerSlot
1091
1116
  ]
1092
1117
  });
1093
- if (t.bare) return re;
1094
- let M = typeof y == "string" ? y : void 0;
1095
- return /* @__PURE__ */ U(p, {
1118
+ if (t.bare) return A;
1119
+ let ae = typeof y == "string" ? y : void 0;
1120
+ return /* @__PURE__ */ U(m, {
1096
1121
  render: /* @__PURE__ */ H("section", {}),
1097
1122
  gap: "lg",
1098
1123
  "data-component": "comments",
1099
1124
  "data-slot": "comments",
1100
1125
  className: i("comments--component", t.className),
1101
- "aria-label": M,
1126
+ "aria-label": ae,
1102
1127
  children: [
1103
- !(y === !1 || !y && !v.subtitle) && /* @__PURE__ */ U(p, {
1128
+ !(y === !1 || !y && !v.subtitle) && /* @__PURE__ */ U(m, {
1104
1129
  gap: "normal",
1105
1130
  className: "comments--header",
1106
- children: [!!y && /* @__PURE__ */ H(u, {
1131
+ children: [!!y && /* @__PURE__ */ H(s, {
1107
1132
  weight: "semibold",
1108
1133
  children: y
1109
- }), !!v.subtitle && /* @__PURE__ */ H(u, {
1134
+ }), !!v.subtitle && /* @__PURE__ */ H(s, {
1110
1135
  type: "secondary",
1111
1136
  children: v.subtitle
1112
1137
  })]
1113
1138
  }),
1114
- re,
1115
- !!(b && t.onDelete) && /* @__PURE__ */ H(h, {
1139
+ A,
1140
+ !!(b && t.onDelete) && /* @__PURE__ */ H(_, {
1116
1141
  ...x.overlayProps,
1117
1142
  destructive: !0,
1118
1143
  title: v.confirmDeleteTitle,
@@ -1127,6 +1152,6 @@ function Ne(t) {
1127
1152
  });
1128
1153
  }
1129
1154
  //#endregion
1130
- export { Q as a, ye as c, ge as d, Y as f, Ce as i, ve as l, Me as n, Z as o, J as p, je as r, Se as s, Ne as t, X as u };
1155
+ export { $ as a, Se as c, _e as d, ge as f, Te as i, be as l, Fe as n, Z as o, X as p, Pe as r, Q as s, Ie as t, ve as u };
1131
1156
 
1132
- //# sourceMappingURL=comments-DviPLnwy.js.map
1157
+ //# sourceMappingURL=comments-You0Bzbr.js.map