themelia-ui 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/.agents/skills/themelia-ui/references/components/INDEX.json +1 -2
  2. package/.agents/skills/themelia-ui/references/components/base--qr-code.md +2 -2
  3. package/.agents/skills/themelia-ui/references/components/base--typography.md +1 -1
  4. package/.agents/skills/themelia-ui/references/components/features--schema-form.md +1 -1
  5. package/.agents/skills/themelia-ui/references/components/features--theme-tweaker.md +3 -2
  6. package/.agents/skills/themelia-ui/references/components/theming.md +3 -2
  7. package/.agents/skills/themelia-ui/references/components/ui-provider.md +1 -0
  8. package/.agents/skills/themelia-ui/references/migration.md +16 -1
  9. package/.agents/skills/themelia-ui/references/theming.md +1 -1
  10. package/CHANGELOG.md +52 -0
  11. package/README.md +1 -1
  12. package/dist/{accordion-DLW9FGTP.js → accordion-B4zNzH7s.js} +3 -4
  13. package/dist/accordion-VazE3cHZ.cjs +1 -0
  14. package/dist/{action-menu-DqQX1_H8.js → action-menu-BrMchcyt.js} +4 -4
  15. package/dist/{action-menu-BFDQbOMx.cjs → action-menu-CO6DZ2xa.cjs} +1 -1
  16. package/dist/admin/patterns/access.cjs +1 -1
  17. package/dist/admin/patterns/access.js +9 -9
  18. package/dist/admin/patterns/commerce.cjs +1 -1
  19. package/dist/admin/patterns/commerce.js +20 -19
  20. package/dist/{alert-dialog-BPePUOHx.cjs → alert-dialog-ByJw3YGj.cjs} +1 -1
  21. package/dist/{alert-dialog-DzqaOiE5.js → alert-dialog-ZHkE0QEz.js} +1 -1
  22. package/dist/{avatar-2v-o_zEv.js → avatar-C30TNJoy.js} +1 -1
  23. package/dist/{avatar-Cdw0zuGn.cjs → avatar-b2IaEzda.cjs} +1 -1
  24. package/dist/base/accordion.cjs +1 -1
  25. package/dist/base/accordion.js +1 -1
  26. package/dist/base/action-menu.cjs +1 -1
  27. package/dist/base/action-menu.js +1 -1
  28. package/dist/base/alert-dialog.cjs +1 -1
  29. package/dist/base/alert-dialog.js +1 -1
  30. package/dist/base/avatar.cjs +1 -1
  31. package/dist/base/avatar.js +1 -1
  32. package/dist/base/batch-action-bar.cjs +1 -1
  33. package/dist/base/batch-action-bar.js +1 -1
  34. package/dist/base/buttons.cjs +1 -1
  35. package/dist/base/buttons.js +1 -1
  36. package/dist/base/cards.cjs +1 -1
  37. package/dist/base/cards.js +1 -1
  38. package/dist/base/carousel.cjs +1 -1
  39. package/dist/base/carousel.js +1 -1
  40. package/dist/base/choice-inputs.cjs +1 -1
  41. package/dist/base/choice-inputs.js +1 -1
  42. package/dist/base/combobox.cjs +1 -1
  43. package/dist/base/combobox.js +1 -1
  44. package/dist/base/command.cjs +1 -1
  45. package/dist/base/command.js +1 -1
  46. package/dist/base/context-menu.cjs +1 -1
  47. package/dist/base/context-menu.js +2 -2
  48. package/dist/base/copyable.cjs +1 -1
  49. package/dist/base/copyable.js +1 -1
  50. package/dist/base/date-pickers.cjs +1 -1
  51. package/dist/base/date-pickers.js +1 -1
  52. package/dist/base/dialog.cjs +1 -1
  53. package/dist/base/dialog.js +1 -1
  54. package/dist/base/display.cjs +1 -1
  55. package/dist/base/display.js +1 -1
  56. package/dist/base/dropdown-menu.cjs +1 -1
  57. package/dist/base/dropdown-menu.js +1 -1
  58. package/dist/base/feedback.cjs +1 -1
  59. package/dist/base/feedback.js +1 -1
  60. package/dist/base/forms-numeric.cjs +1 -1
  61. package/dist/base/forms-numeric.js +1 -1
  62. package/dist/base/forms.cjs +1 -1
  63. package/dist/base/forms.js +1 -1
  64. package/dist/base/hover-card.cjs +1 -1
  65. package/dist/base/hover-card.js +1 -1
  66. package/dist/base/input-group.cjs +1 -1
  67. package/dist/base/input-group.js +1 -1
  68. package/dist/base/item.cjs +1 -1
  69. package/dist/base/item.js +1 -1
  70. package/dist/base/label.cjs +1 -1
  71. package/dist/base/label.js +1 -1
  72. package/dist/base/navigation-menu.cjs +1 -1
  73. package/dist/base/navigation-menu.js +1 -1
  74. package/dist/base/navigation.cjs +1 -1
  75. package/dist/base/navigation.js +1 -1
  76. package/dist/base/otp-input.cjs +1 -1
  77. package/dist/base/otp-input.js +1 -1
  78. package/dist/base/overlay.cjs +1 -1
  79. package/dist/base/overlay.js +1 -1
  80. package/dist/base/popover-menu.cjs +1 -1
  81. package/dist/base/popover-menu.js +1 -1
  82. package/dist/base/popover.cjs +1 -1
  83. package/dist/base/popover.js +1 -1
  84. package/dist/base/qr-code.cjs +1 -1
  85. package/dist/base/qr-code.js +47 -43
  86. package/dist/base/repeaters.cjs +1 -1
  87. package/dist/base/repeaters.js +1 -1
  88. package/dist/base/sheet.cjs +1 -1
  89. package/dist/base/sheet.js +1 -1
  90. package/dist/base/sidebar.cjs +1 -1
  91. package/dist/base/sidebar.js +1 -1
  92. package/dist/base/skeleton.cjs +1 -1
  93. package/dist/base/skeleton.js +1 -1
  94. package/dist/base/table.cjs +1 -1
  95. package/dist/base/table.js +1 -1
  96. package/dist/base/timeline.cjs +1 -1
  97. package/dist/base/timeline.js +1 -1
  98. package/dist/base/toaster.cjs +1 -1
  99. package/dist/base/toaster.js +1 -1
  100. package/dist/base/toolbar.cjs +1 -1
  101. package/dist/base/toolbar.js +1 -1
  102. package/dist/base/tooltip.cjs +1 -1
  103. package/dist/base/tooltip.js +1 -1
  104. package/dist/base/typography.cjs +1 -1
  105. package/dist/base/typography.js +1 -1
  106. package/dist/base/upload.cjs +1 -1
  107. package/dist/base/upload.js +1 -1
  108. package/dist/base/value-inputs.cjs +1 -1
  109. package/dist/base/value-inputs.js +1 -1
  110. package/dist/{batch-action-bar-Cvnz248b.cjs → batch-action-bar-BMIiHBU8.cjs} +1 -1
  111. package/dist/{batch-action-bar-BRCopWlT.js → batch-action-bar-CAIjntVw.js} +2 -2
  112. package/dist/{buttons-CMsvnL6-.cjs → buttons-Dwl42fIr.cjs} +1 -1
  113. package/dist/{buttons-Corm-KHK.js → buttons-riLAPVQV.js} +4 -3
  114. package/dist/{cards-CEtNjl6A.js → cards-CcwLsQQS.js} +8 -9
  115. package/dist/cards-DQPevRTY.cjs +1 -0
  116. package/dist/{choice-inputs-Ca9PoQwa.js → choice-inputs-BjZYCdzk.js} +7 -7
  117. package/dist/{choice-inputs-CySnLjfA.cjs → choice-inputs-C8LMAkh8.cjs} +1 -1
  118. package/dist/combobox-bDQg27j0.cjs +1 -0
  119. package/dist/{combobox-Dl1xWnR7.js → combobox-exdUS4qj.js} +8 -9
  120. package/dist/{command-DWZf3CPI.js → command-Dv84KSRv.js} +3 -3
  121. package/dist/{command-BSvB58XI.cjs → command-Geb5eIzu.cjs} +1 -1
  122. package/dist/{comments-CVD4jB9V.cjs → comments-CV9tvSAi.cjs} +1 -1
  123. package/dist/{comments-CIZ1L-DR.js → comments-CqdhAH1O.js} +485 -491
  124. package/dist/components/base/buttons/button.d.cts +1 -1
  125. package/dist/components/base/buttons/button.d.ts +1 -1
  126. package/dist/components/base/qr-code/qr-code.d.cts +2 -2
  127. package/dist/components/base/qr-code/qr-code.d.ts +2 -2
  128. package/dist/components/base/typography/rich-text/rich-text.d.cts +1 -0
  129. package/dist/components/base/typography/rich-text/rich-text.d.ts +1 -0
  130. package/dist/{copyable-Bbd_Tsxc.cjs → copyable-CMhsv_91.cjs} +1 -1
  131. package/dist/{copyable-CRdTLtmK.js → copyable-uzkCHMzl.js} +3 -3
  132. package/dist/core.css +1 -1
  133. package/dist/css/access.css +1 -1
  134. package/dist/css/accordion.css +1 -1
  135. package/dist/css/action-menu.css +1 -1
  136. package/dist/css/activities.css +1 -1
  137. package/dist/css/ai-chat.css +1 -1
  138. package/dist/css/analytics.css +1 -1
  139. package/dist/css/app-shell.css +1 -1
  140. package/dist/css/async-preview.css +1 -1
  141. package/dist/css/auth.css +1 -1
  142. package/dist/css/avatar.css +1 -1
  143. package/dist/css/badge.css +1 -1
  144. package/dist/css/batch-action-bar.css +1 -1
  145. package/dist/css/buttons.css +1 -1
  146. package/dist/css/cards.css +1 -1
  147. package/dist/css/carousel.css +1 -1
  148. package/dist/css/chart.css +1 -1
  149. package/dist/css/choice-inputs.css +1 -1
  150. package/dist/css/combobox.css +1 -1
  151. package/dist/css/combobox2.css +1 -1
  152. package/dist/css/command.css +1 -1
  153. package/dist/css/comments.css +1 -1
  154. package/dist/css/commerce.css +1 -1
  155. package/dist/css/copyable.css +1 -1
  156. package/dist/css/data-view.css +1 -1
  157. package/dist/css/date-pickers.css +1 -1
  158. package/dist/css/display.css +1 -1
  159. package/dist/css/dropdown-menu.css +1 -1
  160. package/dist/css/event-calendar.css +1 -1
  161. package/dist/css/feedback.css +1 -1
  162. package/dist/css/filters.css +1 -1
  163. package/dist/css/forms.css +1 -1
  164. package/dist/css/global-search.css +1 -1
  165. package/dist/css/header.css +1 -1
  166. package/dist/css/hover-card.css +1 -1
  167. package/dist/css/input-group.css +1 -1
  168. package/dist/css/item.css +1 -1
  169. package/dist/css/kanban.css +1 -1
  170. package/dist/css/label.css +1 -1
  171. package/dist/css/map.css +1 -1
  172. package/dist/css/media-library.css +1 -1
  173. package/dist/css/mentions.css +1 -1
  174. package/dist/css/navigation-menu.css +1 -1
  175. package/dist/css/navigation.css +1 -1
  176. package/dist/css/navigation2.css +1 -1
  177. package/dist/css/overlay.css +1 -1
  178. package/dist/css/popover-menu.css +1 -1
  179. package/dist/css/popover.css +1 -1
  180. package/dist/css/products.css +1 -1
  181. package/dist/css/qr-code.css +1 -1
  182. package/dist/css/repeaters.css +1 -1
  183. package/dist/css/resource-assignment.css +1 -1
  184. package/dist/css/resource.css +1 -1
  185. package/dist/css/rich-text-editor.css +1 -1
  186. package/dist/css/schema-form.css +1 -1
  187. package/dist/css/sidebar2.css +1 -1
  188. package/dist/css/skeleton.css +1 -1
  189. package/dist/css/styles.css +1 -1
  190. package/dist/css/sync.css +1 -1
  191. package/dist/css/table.css +1 -1
  192. package/dist/css/table2.css +1 -1
  193. package/dist/css/text-inputs.css +1 -1
  194. package/dist/css/theme-tweaker.css +1 -1
  195. package/dist/css/timeline.css +1 -1
  196. package/dist/css/toaster.css +1 -1
  197. package/dist/css/toggle.css +1 -1
  198. package/dist/css/toolbar.css +1 -1
  199. package/dist/css/tooltip.css +1 -1
  200. package/dist/css/typography.css +1 -1
  201. package/dist/css/upload.css +1 -1
  202. package/dist/css/value-inputs.css +1 -1
  203. package/dist/css/workspace.css +1 -1
  204. package/dist/{date-pickers-Dy9BVNnb.js → date-pickers-1_Ah7qWO.js} +5 -5
  205. package/dist/{date-pickers-C6rE7fLo.cjs → date-pickers-DejXe5oe.cjs} +1 -1
  206. package/dist/{dialog-CLwUz8Gb.js → dialog-CXugTX8t.js} +1 -1
  207. package/dist/{dialog-Bf7tBRkZ.cjs → dialog-DZ9_m_qc.cjs} +1 -1
  208. package/dist/display-CFj87iEn.cjs +1 -0
  209. package/dist/{display-DVhYS75K.js → display-Dehpw83R.js} +6 -5
  210. package/dist/{dropdown-menu-CIXxWTpw.js → dropdown-menu-BdgB__AC.js} +1 -1
  211. package/dist/{dropdown-menu-0OW7zJto.cjs → dropdown-menu-DCf_EqVG.cjs} +1 -1
  212. package/dist/features/actions.cjs +1 -1
  213. package/dist/features/actions.js +1 -1
  214. package/dist/features/activities.cjs +1 -1
  215. package/dist/features/activities.js +361 -363
  216. package/dist/features/ai-chat.cjs +2 -2
  217. package/dist/features/ai-chat.js +11 -10
  218. package/dist/features/async-preview.cjs +1 -1
  219. package/dist/features/async-preview.js +4 -4
  220. package/dist/features/combobox.cjs +1 -1
  221. package/dist/features/combobox.js +5 -5
  222. package/dist/features/comments.cjs +1 -1
  223. package/dist/features/comments.js +1 -1
  224. package/dist/features/data-view.cjs +1 -1
  225. package/dist/features/data-view.js +6 -6
  226. package/dist/features/event-calendar.cjs +1 -1
  227. package/dist/features/event-calendar.js +10 -10
  228. package/dist/features/filters.cjs +1 -1
  229. package/dist/features/filters.js +1 -1
  230. package/dist/features/global-search.cjs +1 -1
  231. package/dist/features/global-search.js +8 -8
  232. package/dist/features/kanban.cjs +1 -1
  233. package/dist/features/kanban.js +4 -5
  234. package/dist/features/map.cjs +1 -1
  235. package/dist/features/map.js +318 -317
  236. package/dist/features/media-library.cjs +1 -1
  237. package/dist/features/media-library.js +751 -771
  238. package/dist/features/mentions.cjs +1 -1
  239. package/dist/features/mentions.js +1 -1
  240. package/dist/features/overlays.cjs +1 -1
  241. package/dist/features/overlays.js +1 -1
  242. package/dist/features/products.cjs +1 -1
  243. package/dist/features/products.js +15 -15
  244. package/dist/features/resource-assignment.cjs +1 -1
  245. package/dist/features/resource-assignment.js +6 -6
  246. package/dist/features/resource.cjs +1 -1
  247. package/dist/features/resource.js +6 -6
  248. package/dist/features/rich-text-editor.cjs +1 -1
  249. package/dist/features/rich-text-editor.js +1 -1
  250. package/dist/features/schema-form.cjs +1 -1
  251. package/dist/features/schema-form.css +1 -1
  252. package/dist/features/schema-form.js +207 -223
  253. package/dist/features/sync.cjs +1 -1
  254. package/dist/features/sync.js +3 -3
  255. package/dist/features/table.cjs +1 -1
  256. package/dist/features/table.js +1 -1
  257. package/dist/features/theme-tweaker.cjs +2 -2
  258. package/dist/features/theme-tweaker.js +105 -124
  259. package/dist/{feedback-BmquisO3.js → feedback-C8QtkdHc.js} +3 -3
  260. package/dist/feedback-IpUFKqgv.cjs +1 -0
  261. package/dist/{filters-BD0zRwCE.js → filters-BMKZHnBA.js} +22 -17
  262. package/dist/filters-Ct07D74Q.cjs +1 -0
  263. package/dist/{forms-zF9SP3Ai.js → forms-C-d0-GML.js} +5 -7
  264. package/dist/forms-mJ0fjWEl.cjs +1 -0
  265. package/dist/{forms-numeric-B1cqc9Vn.cjs → forms-numeric-B7TRpwvH.cjs} +1 -1
  266. package/dist/{forms-numeric-DzxBaEg1.js → forms-numeric-MKOgf5BF.js} +1 -1
  267. package/dist/index.cjs +1 -1
  268. package/dist/index.js +2 -2
  269. package/dist/{input-group-Bnc24cRI.cjs → input-group-HplgNyti.cjs} +1 -1
  270. package/dist/{input-group-CTSiVEGd.js → input-group-xFaO6qrB.js} +2 -2
  271. package/dist/{item-Cye3hJmr.cjs → item-BxPJsxh2.cjs} +1 -1
  272. package/dist/{item-OVu-oGxQ.js → item-C7Wfarcx.js} +2 -2
  273. package/dist/{label-Cr4NpRvn.cjs → label-B8WTGCTZ.cjs} +1 -1
  274. package/dist/{label-DYJT1uER.js → label-DumoMDm6.js} +1 -1
  275. package/dist/layout/app-shell.cjs +1 -1
  276. package/dist/layout/app-shell.js +1 -1
  277. package/dist/layout/auth.cjs +1 -1
  278. package/dist/layout/auth.js +4 -2
  279. package/dist/layout/header.cjs +1 -1
  280. package/dist/layout/header.js +10 -10
  281. package/dist/layout/navigation.cjs +1 -1
  282. package/dist/layout/navigation.js +1 -1
  283. package/dist/layout/page.cjs +1 -1
  284. package/dist/layout/page.js +4 -4
  285. package/dist/layout/settings.cjs +1 -1
  286. package/dist/layout/settings.js +2 -2
  287. package/dist/layout/sidebar.cjs +1 -1
  288. package/dist/layout/sidebar.js +7 -7
  289. package/dist/layout/workspace.cjs +1 -1
  290. package/dist/layout/workspace.js +6 -7
  291. package/dist/lib/theming/recipes.d.cts +5 -2
  292. package/dist/lib/theming/recipes.d.ts +5 -2
  293. package/dist/lib/ui-provider/types.d.cts +4 -1
  294. package/dist/lib/ui-provider/types.d.ts +4 -1
  295. package/dist/{mentions-DbQAE-Ug.cjs → mentions-Ckm9Ct-r.cjs} +1 -1
  296. package/dist/{mentions-BU1sDupC.js → mentions-D_b-yVXN.js} +5 -5
  297. package/dist/{navigation-D00jGH59.js → navigation-COnv0B1H.js} +6 -5
  298. package/dist/navigation-D_hEWZYv.cjs +1 -0
  299. package/dist/{navigation-BRv9Xerv.js → navigation-DwNUlszz.js} +17 -15
  300. package/dist/navigation-UfUJU2LC.cjs +1 -0
  301. package/dist/{overlay-Bdri8Z7E.js → overlay-A5bE-8n5.js} +2 -2
  302. package/dist/{overlay-D1wEvshK.cjs → overlay-BtQz_AN3.cjs} +1 -1
  303. package/dist/{overlays-CaBkEKRc.js → overlays-DX9ux-XL.js} +7 -7
  304. package/dist/{overlays-BnWOasE6.cjs → overlays-MmLNLV9f.cjs} +1 -1
  305. package/dist/patterns/analytics.cjs +1 -1
  306. package/dist/patterns/analytics.js +41 -44
  307. package/dist/patterns/onboarding.cjs +1 -1
  308. package/dist/patterns/onboarding.js +4 -4
  309. package/dist/patterns/timelines.cjs +1 -1
  310. package/dist/patterns/timelines.js +1 -1
  311. package/dist/{popover-Dt8IXXKy.js → popover-CM1nxkAM.js} +2 -2
  312. package/dist/{popover-menu-BeNyDDo1.js → popover-menu-BCs5CLkw.js} +4 -4
  313. package/dist/{popover-menu-Cm10om_m.cjs → popover-menu-DcDdf9H2.cjs} +1 -1
  314. package/dist/{popover-BUebuMJK.cjs → popover-rLMSEj5V.cjs} +1 -1
  315. package/dist/{primitives-B2aeaudR.js → primitives-BnXNg-Kr.js} +2 -2
  316. package/dist/{primitives-BP7kGVYZ.cjs → primitives-kywiHMJE.cjs} +1 -1
  317. package/dist/primitives.cjs +1 -1
  318. package/dist/primitives.js +1 -1
  319. package/dist/{repeaters-BIvKI1CQ.cjs → repeaters-B4dnWxUE.cjs} +1 -1
  320. package/dist/{repeaters-C43GWEE_.js → repeaters-B4oohPvd.js} +4 -4
  321. package/dist/{rich-text-editor-CqqHeJDp.cjs → rich-text-editor-7GYD-4Qq.cjs} +1 -1
  322. package/dist/{rich-text-editor-CVo4FB26.js → rich-text-editor-CgsfAGMo.js} +3 -3
  323. package/dist/{sheet-BP2BmI-Z.js → sheet-3sbsGFus.js} +2 -2
  324. package/dist/{sheet-FA8TfP1E.cjs → sheet-B4_LNS7m.cjs} +1 -1
  325. package/dist/{sidebar-C-TSBDj5.cjs → sidebar--uZUOGHE.cjs} +1 -1
  326. package/dist/{sidebar-DOmsOhCp.js → sidebar-BMgoyRxy.js} +10 -9
  327. package/dist/{skeleton-vN_fsg7X.js → skeleton-Bxqw8kwa.js} +1 -1
  328. package/dist/{skeleton-3RdcmQ7K.cjs → skeleton-DeuQS4AK.cjs} +1 -1
  329. package/dist/style.css +1 -1
  330. package/dist/styles/SCOPES.md +28 -9
  331. package/dist/styles/TOKENS.md +165 -9
  332. package/dist/styles/index.css +0 -1
  333. package/dist/styles/map.css +14 -8
  334. package/dist/styles/mentions.css +37 -44
  335. package/dist/styles/tailwind.css +2 -1
  336. package/dist/styles/themes/default.css +16 -14
  337. package/dist/styles/theming/colors.css +28 -22
  338. package/dist/styles/theming/feedback.css +0 -1
  339. package/dist/styles/theming/focus.css +15 -8
  340. package/dist/styles/theming/motion.css +8 -5
  341. package/dist/styles/theming/overlay.css +7 -0
  342. package/dist/styles/theming/sizing.css +8 -4
  343. package/dist/styles/theming/text.css +3 -1
  344. package/dist/styles/theming/typography.css +3 -0
  345. package/dist/styles/tokens/components.css +1 -1
  346. package/dist/styles/tokens/states.css +4 -4
  347. package/dist/{table-B9zwmrtt.cjs → table-3abrkeib.cjs} +1 -1
  348. package/dist/{table-CzsDKBR2.js → table-BXL7IP5P.js} +1 -1
  349. package/dist/{table-CaFQyjTz.cjs → table-CXRnlkV5.cjs} +1 -1
  350. package/dist/{table-CtUahid0.js → table-DszexXEh.js} +14 -14
  351. package/dist/tailwind.css +2 -1
  352. package/dist/{theming-B52zPV1p.cjs → theming-8U04chn7.cjs} +1 -1
  353. package/dist/{theming-y5FKH_La.js → theming-D6KRU7hO.js} +9 -9
  354. package/dist/theming.cjs +1 -1
  355. package/dist/theming.js +1 -1
  356. package/dist/{timeline-B3f7rEXh.cjs → timeline-CzAIDLzd.cjs} +1 -1
  357. package/dist/{timeline-DskNs3lw.js → timeline-ptWoY2GY.js} +2 -2
  358. package/dist/{timelines-wlcL01Rf.js → timelines-BquC31uF.js} +4 -4
  359. package/dist/{timelines-DJdBmWPj.cjs → timelines-DLsQhK72.cjs} +1 -1
  360. package/dist/{toaster-D3Fsaf3I.cjs → toaster-BVTOrAb5.cjs} +1 -1
  361. package/dist/{toaster-CaTwpule.js → toaster-DOBJDiXt.js} +1 -1
  362. package/dist/tokens.json +8 -7
  363. package/dist/{toolbar-CvUhAFhi.js → toolbar-3GLSD7Fi.js} +1 -1
  364. package/dist/{toolbar-Bap7y244.cjs → toolbar-aZKjtFDt.cjs} +1 -1
  365. package/dist/{tooltip-Dewu4Ynm.cjs → tooltip-CEcUVmor.cjs} +1 -1
  366. package/dist/{tooltip-B82dN7Oy.js → tooltip-DksScngC.js} +1 -1
  367. package/dist/{typography-B8Iurhy1.js → typography-BkxEiwQ1.js} +1 -1
  368. package/dist/{typography-LMez-POJ.cjs → typography-Cf5zEv4y.cjs} +1 -1
  369. package/dist/ui-provider-DI1VxMDT.cjs +1 -0
  370. package/dist/{ui-provider-BzyJxcKH.js → ui-provider-gNDv-ZRY.js} +4 -1
  371. package/dist/ui-provider.cjs +1 -1
  372. package/dist/ui-provider.js +1 -1
  373. package/dist/{upload-5tzkI0NC.cjs → upload-Bg8tyH5a.cjs} +1 -1
  374. package/dist/{upload-BL8HIPbS.js → upload-wTBh4QQx.js} +4 -4
  375. package/dist/{value-inputs-DzErolfh.cjs → value-inputs-B6ZURTUl.cjs} +1 -1
  376. package/dist/{value-inputs-DQGHd7k8.js → value-inputs-DnQKmVqW.js} +4 -4
  377. package/docs/generated/component-index.json +1 -2
  378. package/docs/generated/components/base--qr-code.md +2 -2
  379. package/docs/generated/components/base--typography.md +1 -1
  380. package/docs/generated/components/features--schema-form.md +1 -1
  381. package/docs/generated/components/features--theme-tweaker.md +3 -2
  382. package/docs/generated/components/theming.md +3 -2
  383. package/docs/generated/components/ui-provider.md +1 -0
  384. package/docs/generated/migration-codemod.json +28 -3
  385. package/docs/generated/migration.md +72 -3
  386. package/docs/generated/profiles.md +1 -1
  387. package/docs/learn/migration.md +16 -1
  388. package/docs/learn/theming.md +1 -1
  389. package/package.json +1 -1
  390. package/src/styles/SCOPES.md +28 -9
  391. package/src/styles/TOKENS.md +165 -9
  392. package/dist/accordion-BH9vNfdb.cjs +0 -1
  393. package/dist/cards-CO5LHALb.cjs +0 -1
  394. package/dist/combobox-CTUFSblt.cjs +0 -1
  395. package/dist/display-BUiiuPS9.cjs +0 -1
  396. package/dist/feedback-Da53xAUT.cjs +0 -1
  397. package/dist/filters-B8dkhzan.cjs +0 -1
  398. package/dist/forms-BEQN1X5A.cjs +0 -1
  399. package/dist/navigation-BaIANCwE.cjs +0 -1
  400. package/dist/navigation-BmZabEfZ.cjs +0 -1
  401. package/dist/styles/theming/mentions.css +0 -33
  402. package/dist/ui-provider-B3v22pQY.cjs +0 -1
@@ -1,27 +1,27 @@
1
1
  import "./css/comments.css";
2
2
  import { t as e } from "./cx--CBrhWH0.js";
3
- import { a as t, o as n, r, t as i } from "./typography-B8Iurhy1.js";
4
- import { p as a } from "./feedback-BmquisO3.js";
5
- import { t as o } from "./ui-provider-BzyJxcKH.js";
6
- import { c as s } from "./buttons-Corm-KHK.js";
7
- import { i as c, n as l, t as u } from "./tooltip-B82dN7Oy.js";
8
- import { i as d, n as f } from "./action-menu-DqQX1_H8.js";
9
- import { d as p } from "./display-DVhYS75K.js";
10
- import { o as m } from "./structure-D0WGQAP3.js";
11
- import { H as h, I as g, S as _, T as v, h as y, s as b, v as x, w as S } from "./primitives-B2aeaudR.js";
12
- import { t as C } from "./badge-D34FkKLD.js";
13
- import { a as w, c as ee, r as T } from "./avatar-2v-o_zEv.js";
14
- import { c as E, r as D, t as O } from "./popover-Dt8IXXKy.js";
15
- import { t as k } from "./spinner-Bv-2R-7S.js";
16
- import { i as te, t as ne } from "./overlays-CaBkEKRc.js";
17
- import { f as A, i as j, o as M, s as re, t as N } from "./mentions-BU1sDupC.js";
18
- import { n as ie } from "./rich-text-editor-CVo4FB26.js";
19
- import { AtSignIcon as ae, FileIcon as oe, FileTextIcon as P, ImageIcon as F, MessageCircleIcon as I, MoreHorizontalIcon as se, PaperclipIcon as L, PencilIcon as R, PinIcon as ce, SendIcon as le, SmilePlusIcon as z, Trash2Icon as ue, XIcon as B } from "lucide-react";
20
- import { Fragment as de, cloneElement as fe, createContext as V, useCallback as H, useContext as pe, useEffect as U, useId as me, useImperativeHandle as he, useLayoutEffect as ge, useMemo as W, useRef as G, useState as K } from "react";
21
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
22
- import { format as _e } from "date-fns";
3
+ import { a as t, o as n, r, t as i } from "./typography-BkxEiwQ1.js";
4
+ import { p as a } from "./feedback-C8QtkdHc.js";
5
+ import { t as o } from "./ui-provider-gNDv-ZRY.js";
6
+ import { c as s } from "./buttons-riLAPVQV.js";
7
+ import { i as c, n as l, t as u } from "./tooltip-DksScngC.js";
8
+ import { i as d, n as f } from "./action-menu-BrMchcyt.js";
9
+ import { d as p, l as m } from "./display-Dehpw83R.js";
10
+ import { o as h } from "./structure-D0WGQAP3.js";
11
+ import { H as g, I as _, S as v, T as y, h as b, s as x, v as S, w as C } from "./primitives-BnXNg-Kr.js";
12
+ import { t as w } from "./badge-D34FkKLD.js";
13
+ import { a as ee, c as T, r as E } from "./avatar-C30TNJoy.js";
14
+ import { c as D, r as O, t as k } from "./popover-CM1nxkAM.js";
15
+ import { t as te } from "./spinner-Bv-2R-7S.js";
16
+ import { i as ne, t as re } from "./overlays-DX9ux-XL.js";
17
+ import { f as A, i as j, o as ie, s as M, t as ae } from "./mentions-D_b-yVXN.js";
18
+ import { n as oe } from "./rich-text-editor-CgsfAGMo.js";
19
+ import { AtSignIcon as se, FileIcon as N, FileTextIcon as P, ImageIcon as F, MessageCircleIcon as I, MoreHorizontalIcon as L, PaperclipIcon as ce, PencilIcon as le, PinIcon as ue, SendIcon as de, SmilePlusIcon as R, Trash2Icon as fe, XIcon as pe } from "lucide-react";
20
+ import { Fragment as me, cloneElement as he, createContext as z, useCallback as B, useContext as ge, useEffect as V, useId as _e, useImperativeHandle as ve, useLayoutEffect as ye, useMemo as H, useRef as U, useState as W } from "react";
21
+ import { Fragment as be, jsx as G, jsxs as K } from "react/jsx-runtime";
22
+ import { format as xe } from "date-fns";
23
23
  //#region src/components/features/comments/comments.strings.ts
24
- function ve(e) {
24
+ function Se(e) {
25
25
  if (e < 1024) return `${e} B`;
26
26
  let t = [
27
27
  "KB",
@@ -31,7 +31,7 @@ function ve(e) {
31
31
  for (; n >= 1024 && r < t.length - 1;) n /= 1024, r += 1;
32
32
  return `${n >= 10 ? Math.round(n) : n.toFixed(1)} ${t[r]}`;
33
33
  }
34
- var ye = {
34
+ var q = {
35
35
  formatQuoteAttribution: (e) => `\u2014 ${e}`,
36
36
  title: "Comments",
37
37
  subtitle: "",
@@ -78,11 +78,11 @@ var ye = {
78
78
  attachmentDownloadLabel: "Download",
79
79
  formatShowMoreAttachments: (e) => `Show ${e} more`,
80
80
  showFewerAttachmentsLabel: "Show fewer",
81
- formatTooLarge: (e) => `Files must be under ${ve(e)}.`,
81
+ formatTooLarge: (e) => `Files must be under ${Se(e)}.`,
82
82
  formatTooMany: (e) => `You can attach at most ${e}.`,
83
83
  addReactionLabel: "Add reaction",
84
84
  reactionPickerLabel: "Choose a reaction"
85
- }, X = {
85
+ }, J = {
86
86
  root: "comments__root___nS80E",
87
87
  header: "comments__header___yeqdu",
88
88
  body: "comments__body___KBLx1",
@@ -122,8 +122,8 @@ var ye = {
122
122
  composerEditor: "comments__composerEditor___pLdab",
123
123
  eyebrow: "comments__eyebrow___4YXC8",
124
124
  chip: "comments__chip___Y_2YZ",
125
- chipIcon: "comments__chipIcon___6BLpd",
126
125
  chipLink: "comments__chipLink___XVe41",
126
+ chipIcon: "comments__chipIcon___6BLpd",
127
127
  chipLabel: "comments__chipLabel___jKkyE",
128
128
  chipMeta: "comments__chipMeta___vASR1",
129
129
  chipProgress: "comments__chipProgress___c7f2Z",
@@ -137,85 +137,85 @@ var ye = {
137
137
  richQuote: "comments__richQuote___1JvHv",
138
138
  richCite: "comments__richCite___z_LI2",
139
139
  richDelimiter: "comments__richDelimiter___QOyH7"
140
- }, be = {
140
+ }, Y = {
141
141
  image: F,
142
142
  document: P,
143
- file: oe,
144
- unknown: L
143
+ file: N,
144
+ unknown: ce
145
145
  };
146
- function xe(e) {
146
+ function Ce(e) {
147
147
  return e ? e.startsWith("image/") ? "image" : e === "application/pdf" || e.startsWith("text/") ? "document" : "file" : "unknown";
148
148
  }
149
- function Se({ mimeType: e, className: t }) {
150
- let n = be[xe(e)];
151
- return /* @__PURE__ */ J(n, { className: t });
149
+ function we({ mimeType: e, className: t }) {
150
+ let n = Y[Ce(e)];
151
+ return /* @__PURE__ */ G(n, { className: t });
152
152
  }
153
- function Ce({ attachment: t, editable: r = !1, onRemove: i, onRetry: a, accessors: o, strings: c, className: l }) {
153
+ function Te({ attachment: t, editable: r = !1, onRemove: i, onRetry: a, accessors: o, strings: c, className: l }) {
154
154
  let u = {
155
- ...ye,
155
+ ...q,
156
156
  ...c
157
- }, d = o?.getMediaUrl?.(t) ?? t.url, f = o?.getMediaName?.(t) ?? t.name ?? u.attachmentFallback, p = t.status === "uploading", m = t.status === "failed", g = p ? /* @__PURE__ */ Y(h, {
157
+ }, d = o?.getMediaUrl?.(t) ?? t.url, f = o?.getMediaName?.(t) ?? t.name ?? u.attachmentFallback, p = t.status === "uploading", m = t.status === "failed", h = p ? /* @__PURE__ */ K(g, {
158
158
  size: "xs",
159
- className: X.chipMeta,
160
- children: [u.attachmentUploadingLabel, typeof t.progress == "number" && /* @__PURE__ */ Y(q, { children: [" ", /* @__PURE__ */ J(v, {
159
+ className: J.chipMeta,
160
+ children: [u.attachmentUploadingLabel, typeof t.progress == "number" && /* @__PURE__ */ K(be, { children: [" ", /* @__PURE__ */ G(y, {
161
161
  value: Math.round(t.progress),
162
162
  scaled: !0,
163
163
  size: "xs",
164
164
  type: "secondary"
165
165
  })] })]
166
- }) : m ? /* @__PURE__ */ J(h, {
166
+ }) : m ? /* @__PURE__ */ G(g, {
167
167
  size: "xs",
168
- className: X.chipMeta,
168
+ className: J.chipMeta,
169
169
  children: t.error ?? u.attachmentFailedLabel
170
- }) : typeof t.size == "number" ? /* @__PURE__ */ J(_, {
170
+ }) : typeof t.size == "number" ? /* @__PURE__ */ G(v, {
171
171
  value: t.size,
172
172
  size: "xs",
173
173
  type: "secondary",
174
- className: X.chipMeta
175
- }) : null, y = /* @__PURE__ */ Y("span", {
176
- className: X.chipLabel,
177
- children: [/* @__PURE__ */ J(n, {
174
+ className: J.chipMeta
175
+ }) : null, _ = /* @__PURE__ */ K("span", {
176
+ className: J.chipLabel,
177
+ children: [/* @__PURE__ */ G(n, {
178
178
  tag: "span",
179
179
  size: "xs",
180
180
  weight: "medium",
181
181
  type: m ? "error" : "main",
182
182
  truncate: !0,
183
183
  children: f
184
- }), g]
184
+ }), h]
185
185
  }), b = !!d && !p && !m;
186
- return /* @__PURE__ */ Y("div", {
186
+ return /* @__PURE__ */ K("div", {
187
187
  "data-slot": "comment-attachment",
188
188
  "data-status": t.status,
189
- className: e("comment-attachment-chip--component", X.chip, l),
189
+ className: e("comment-attachment-chip--component", J.chip, l),
190
190
  children: [
191
- p ? /* @__PURE__ */ J(k, {}) : /* @__PURE__ */ J(Se, {
191
+ p ? /* @__PURE__ */ G(te, {}) : /* @__PURE__ */ G(we, {
192
192
  mimeType: t.mimeType,
193
- className: X.chipIcon
193
+ className: J.chipIcon
194
194
  }),
195
- b ? /* @__PURE__ */ J("a", {
195
+ b ? /* @__PURE__ */ G("a", {
196
196
  href: d,
197
197
  target: "_blank",
198
198
  rel: "noreferrer noopener",
199
199
  "aria-label": u.attachmentDownloadLabel,
200
- className: X.chipLink,
201
- children: y
202
- }) : y,
203
- p && typeof t.progress == "number" && /* @__PURE__ */ J("div", {
204
- className: X.chipProgress,
205
- children: /* @__PURE__ */ J("div", {
206
- className: X.chipProgressFill,
200
+ className: J.chipLink,
201
+ children: _
202
+ }) : _,
203
+ p && typeof t.progress == "number" && /* @__PURE__ */ G("div", {
204
+ className: J.chipProgress,
205
+ children: /* @__PURE__ */ G("div", {
206
+ className: J.chipProgressFill,
207
207
  style: { width: `${Math.min(100, Math.max(0, t.progress))}%` }
208
208
  })
209
209
  }),
210
- m && !!a && /* @__PURE__ */ J(s, {
210
+ m && !!a && /* @__PURE__ */ G(s, {
211
211
  type: "button",
212
212
  tone: "destructive",
213
213
  buttonStyle: "ghost",
214
214
  onClick: () => a(t.id),
215
- className: X.chipRetry,
215
+ className: J.chipRetry,
216
216
  children: u.attachmentRetryLabel
217
217
  }),
218
- r && !!i && /* @__PURE__ */ J(s, {
218
+ r && !!i && /* @__PURE__ */ G(s, {
219
219
  type: "button",
220
220
  tone: "neutral",
221
221
  buttonStyle: "ghost",
@@ -223,30 +223,30 @@ function Ce({ attachment: t, editable: r = !1, onRemove: i, onRetry: a, accessor
223
223
  onClick: () => i(t.id),
224
224
  "aria-label": u.attachmentRemoveLabel,
225
225
  title: u.attachmentRemoveLabel,
226
- className: X.chipRemove,
227
- children: /* @__PURE__ */ J(B, {})
226
+ className: J.chipRemove,
227
+ children: /* @__PURE__ */ G(pe, {})
228
228
  })
229
229
  ]
230
230
  });
231
231
  }
232
232
  //#endregion
233
233
  //#region src/components/features/comments/use-attachment-upload.ts
234
- function we() {
234
+ function Ee() {
235
235
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `attachment-${Date.now()}-${Math.random().toString(36).slice(2)}`;
236
236
  }
237
- function Te(e = {}) {
238
- let { onUpload: t, maxSize: n, maxFiles: r, disabled: i, initialAttachments: a, onValueChange: o, onReject: s } = e, [c, l] = K(() => a ? [...a] : []), u = G(c), d = G(/* @__PURE__ */ new Map()), f = G(/* @__PURE__ */ new Map()), p = G(o), m = G(s);
239
- U(() => {
237
+ function De(e = {}) {
238
+ let { onUpload: t, maxSize: n, maxFiles: r, disabled: i, initialAttachments: a, onValueChange: o, onReject: s } = e, [c, l] = W(() => a ? [...a] : []), u = U(c), d = U(/* @__PURE__ */ new Map()), f = U(/* @__PURE__ */ new Map()), p = U(o), m = U(s);
239
+ V(() => {
240
240
  p.current = o, m.current = s;
241
241
  });
242
- let h = H((e) => {
242
+ let h = B((e) => {
243
243
  u.current = e, l(e);
244
- }, []), g = H((e, t) => {
244
+ }, []), g = B((e, t) => {
245
245
  h(u.current.map((n) => n.id === e ? {
246
246
  ...n,
247
247
  ...t
248
248
  } : n));
249
- }, [h]), _ = H((e) => h([...e]), [h]), v = H((e, n) => {
249
+ }, [h]), _ = B((e) => h([...e]), [h]), v = B((e, n) => {
250
250
  if (!t || d.current.has(e)) return;
251
251
  let r = new AbortController();
252
252
  d.current.set(e, r), g(e, {
@@ -271,7 +271,7 @@ function Te(e = {}) {
271
271
  error: t instanceof Error ? t.message : void 0
272
272
  });
273
273
  });
274
- }, [t, g]), y = H((e) => {
274
+ }, [t, g]), y = B((e) => {
275
275
  if (i || !t) return;
276
276
  let a = Array.from(e);
277
277
  if (a.length === 0) return;
@@ -293,7 +293,7 @@ function Te(e = {}) {
293
293
  });
294
294
  continue;
295
295
  }
296
- let t = we();
296
+ let t = Ee();
297
297
  f.current.set(t, e), o.push({
298
298
  id: t,
299
299
  name: e.name,
@@ -311,33 +311,33 @@ function Te(e = {}) {
311
311
  t,
312
312
  h
313
313
  ]);
314
- U(() => {
314
+ V(() => {
315
315
  for (let e of c) {
316
316
  if (e.status !== "uploading" || d.current.has(e.id)) continue;
317
317
  let t = f.current.get(e.id);
318
318
  t && v(e.id, t);
319
319
  }
320
320
  }, [c, v]);
321
- let b = H((e) => {
321
+ let b = B((e) => {
322
322
  d.current.get(e)?.abort(), d.current.delete(e), f.current.delete(e), h(u.current.filter((t) => t.id !== e));
323
- }, [h]), x = H((e) => {
323
+ }, [h]), x = B((e) => {
324
324
  let t = f.current.get(e);
325
325
  t && v(e, t);
326
- }, [v]), S = H(() => {
326
+ }, [v]), S = B(() => {
327
327
  for (let e of d.current.values()) e.abort();
328
328
  d.current.clear(), f.current.clear(), h([]);
329
329
  }, [h]);
330
- return U(() => {
330
+ return V(() => {
331
331
  p.current?.(c);
332
- }, [c]), U(() => {
332
+ }, [c]), V(() => {
333
333
  let e = d.current;
334
334
  return () => {
335
335
  for (let t of e.values()) t.abort();
336
336
  };
337
337
  }, []), {
338
338
  attachments: c,
339
- uploadedAttachments: W(() => c.filter((e) => e.status === "uploaded" || !e.status), [c]),
340
- isUploading: W(() => c.some((e) => e.status === "uploading"), [c]),
339
+ uploadedAttachments: H(() => c.filter((e) => e.status === "uploaded" || !e.status), [c]),
340
+ isUploading: H(() => c.some((e) => e.status === "uploading"), [c]),
341
341
  addFiles: y,
342
342
  removeAttachment: b,
343
343
  retryAttachment: x,
@@ -347,13 +347,13 @@ function Te(e = {}) {
347
347
  }
348
348
  //#endregion
349
349
  //#region src/components/features/comments/comment-composer.tsx
350
- function Ee(e) {
350
+ function Oe(e) {
351
351
  return typeof e == "string" && e.replace(/<[^>]*>/g, "").trim().length > 0;
352
352
  }
353
- function De({ label: e }) {
354
- return /* @__PURE__ */ J("div", {
355
- className: X.eyebrow,
356
- children: /* @__PURE__ */ J(n, {
353
+ function X({ label: e }) {
354
+ return /* @__PURE__ */ G("div", {
355
+ className: J.eyebrow,
356
+ children: /* @__PURE__ */ G(n, {
357
357
  tag: "span",
358
358
  size: "xs",
359
359
  weight: "medium",
@@ -362,64 +362,64 @@ function De({ label: e }) {
362
362
  })
363
363
  });
364
364
  }
365
- function Z({ context: t, canComment: r = !0, submitting: i = !1, errors: a, resetKey: o = 0, onSubmit: c, onCancel: l, editingComment: u, replyingTo: d, strings: f, resources: h, onResourceSearch: g, attachments: _, maxAttachments: v, allowAttachments: y = !0, initialValues: b, autoFocus: x = !1, inlineSubmit: S = !1, placeholder: C, className: w, ref: ee }) {
365
+ function Z({ context: t, canComment: r = !0, submitting: i = !1, errors: a, resetKey: o = 0, onSubmit: c, onCancel: l, editingComment: u, replyingTo: d, strings: f, resources: m, onResourceSearch: g, attachments: _, maxAttachments: v, allowAttachments: y = !0, initialValues: b, autoFocus: x = !1, inlineSubmit: S = !1, placeholder: C, className: w, ref: ee }) {
366
366
  let T = {
367
- ...ye,
367
+ ...q,
368
368
  ...f
369
- }, D = G(null), te = G(null), [ne, A] = K(b?.content ?? ""), [oe, P] = K(null), F = N({
370
- resources: h,
369
+ }, E = U(null), O = U(null), [ne, re] = W(b?.content ?? ""), [A, N] = W(null), P = ae({
370
+ resources: m,
371
371
  onResourceSearch: g,
372
- editorRef: D
373
- }), [I, se] = K(null), R = Te({
372
+ editorRef: E
373
+ }), [F, I] = W(null), L = De({
374
374
  ..._,
375
375
  maxFiles: v ?? _?.maxFiles,
376
376
  initialAttachments: b?.attachments,
377
377
  onReject: (e) => {
378
- se(e), _?.onReject?.(e);
378
+ I(e), _?.onReject?.(e);
379
379
  }
380
- }), ce = !!u, z = !ce && !!d, ue = H(() => {
381
- D.current?.clear(), A(""), F.reset(), R.reset(), P(null), se(null);
380
+ }), le = !!u, ue = !le && !!d, R = B(() => {
381
+ E.current?.clear(), re(""), P.reset(), L.reset(), N(null), I(null);
382
382
  }, []);
383
- U(() => {
384
- ue();
383
+ V(() => {
384
+ R();
385
385
  }, [
386
386
  t.id,
387
387
  t.type,
388
388
  o
389
- ]), U(() => {
390
- u && (D.current?.setHTML(u.content ?? ""), A(u.content ?? ""), F.setMentions(u.references ?? []), R.setAttachments((u.attachments ?? []).filter((e) => !!e)));
391
- }, [u?.id]), U(() => {
392
- a?.content && P(a.content);
393
- }, [a]), he(ee, () => ({
394
- focus: () => D.current?.focus(),
395
- clear: ue,
389
+ ]), V(() => {
390
+ u && (E.current?.setHTML(u.content ?? ""), re(u.content ?? ""), P.setMentions(u.references ?? []), L.setAttachments((u.attachments ?? []).filter((e) => !!e)));
391
+ }, [u?.id]), V(() => {
392
+ a?.content && N(a.content);
393
+ }, [a]), ve(ee, () => ({
394
+ focus: () => E.current?.focus(),
395
+ clear: R,
396
396
  setBody: (e) => {
397
- D.current?.setHTML(e), A(e);
397
+ E.current?.setHTML(e), re(e);
398
398
  }
399
- }), [ue]);
400
- let B = H((e) => {
401
- A(e);
399
+ }), [R]);
400
+ let fe = B((e) => {
401
+ re(e);
402
402
  let t = j(e), n = t.map((e) => e.id).join("|");
403
- F.setMentions((e) => {
403
+ P.setMentions((e) => {
404
404
  if (e.map((e) => e.id).join("|") === n) return e;
405
405
  let r = new Map(e.map((e) => [e.id, e]));
406
406
  return t.map((e) => r.get(e.id) ?? e);
407
407
  });
408
- }, [F]), de = H((e) => {
409
- if (e?.preventDefault(), i || R.isUploading) return;
410
- let n = D.current?.getHTML() ?? ne;
411
- if (!Ee(n)) {
412
- P(T.invalidContent);
408
+ }, [P]), pe = B((e) => {
409
+ if (e?.preventDefault(), i || L.isUploading) return;
410
+ let n = E.current?.getHTML() ?? ne;
411
+ if (!Oe(n)) {
412
+ N(T.invalidContent);
413
413
  return;
414
414
  }
415
- P(null), c({
415
+ N(null), c({
416
416
  content: n,
417
417
  commentableId: t.id,
418
418
  commentableType: t.type,
419
419
  moduleKey: t.moduleKey,
420
420
  contentType: "html",
421
- references: F.mentions,
422
- attachments: R.uploadedAttachments,
421
+ references: P.mentions,
422
+ attachments: L.uploadedAttachments,
423
423
  replyToId: d?.commentId ?? b?.replyToId,
424
424
  editingId: u?.id
425
425
  });
@@ -429,24 +429,24 @@ function Z({ context: t, canComment: r = !0, submitting: i = !1, errors: a, rese
429
429
  T.invalidContent,
430
430
  u?.id,
431
431
  b?.replyToId,
432
- F.mentions,
432
+ P.mentions,
433
433
  c,
434
434
  d?.commentId,
435
435
  i,
436
- R.isUploading,
437
- R.uploadedAttachments
438
- ]), fe = W(() => {
436
+ L.isUploading,
437
+ L.uploadedAttachments
438
+ ]), me = H(() => {
439
439
  let e = [];
440
- return h && Object.keys(h).length > 0 && e.push({
440
+ return m && Object.keys(m).length > 0 && e.push({
441
441
  id: "reference",
442
- icon: ae,
442
+ icon: se,
443
443
  label: T.composerReferenceLabel,
444
- onClick: () => F.setPickerOpen(!0)
444
+ onClick: () => P.setPickerOpen(!0)
445
445
  }), y && _?.onUpload && !_.disabled && e.push({
446
446
  id: "attachment",
447
- icon: L,
447
+ icon: ce,
448
448
  label: T.composerAttachmentLabel,
449
- onClick: () => te.current?.click()
449
+ onClick: () => O.current?.click()
450
450
  }), e;
451
451
  }, [
452
452
  y,
@@ -454,128 +454,128 @@ function Z({ context: t, canComment: r = !0, submitting: i = !1, errors: a, rese
454
454
  _?.onUpload,
455
455
  T.composerAttachmentLabel,
456
456
  T.composerReferenceLabel,
457
- F,
458
- h
457
+ P,
458
+ m
459
459
  ]);
460
460
  if (!r) return null;
461
- let V = i ? T.composerSubmitting : ce ? T.composerSave : z ? T.composerReply : T.composerSubmit, pe = /* @__PURE__ */ Y(s, {
461
+ let he = i ? T.composerSubmitting : le ? T.composerSave : ue ? T.composerReply : T.composerSubmit, z = /* @__PURE__ */ K(s, {
462
462
  type: "button",
463
- onClick: () => de(),
464
- disabled: i || R.isUploading,
465
- children: [J(i ? k : le, {}), V]
466
- }), me = S === !1 || ce || z, ge = I ? I.code === "too-large" ? T.formatTooLarge(I.limit) : T.formatTooMany(I.limit) : null, q = ce ? /* @__PURE__ */ J(De, { label: T.composerEditingEyebrow }) : z ? /* @__PURE__ */ J(De, { label: T.formatReplyingEyebrow(d.authorName ?? T.fallbackAuthor) }) : null;
467
- return /* @__PURE__ */ Y("form", {
468
- onSubmit: de,
469
- className: e("comment-composer--component", X.composer, w),
463
+ onClick: () => pe(),
464
+ disabled: i || L.isUploading,
465
+ children: [G(i ? te : de, {}), he]
466
+ }), ge = S === !1 || le || ue, _e = F ? F.code === "too-large" ? T.formatTooLarge(F.limit) : T.formatTooMany(F.limit) : null, ye = le ? /* @__PURE__ */ G(X, { label: T.composerEditingEyebrow }) : ue ? /* @__PURE__ */ G(X, { label: T.formatReplyingEyebrow(d.authorName ?? T.fallbackAuthor) }) : null;
467
+ return /* @__PURE__ */ K("form", {
468
+ onSubmit: pe,
469
+ className: e("comment-composer--component", J.composer, w),
470
470
  children: [
471
- q,
472
- /* @__PURE__ */ J("input", {
473
- ref: te,
471
+ ye,
472
+ /* @__PURE__ */ G("input", {
473
+ ref: O,
474
474
  type: "file",
475
475
  multiple: !0,
476
476
  hidden: !0,
477
477
  accept: _?.accept,
478
478
  onChange: (e) => {
479
- e.target.files && R.addFiles(e.target.files), e.target.value = "";
479
+ e.target.files && L.addFiles(e.target.files), e.target.value = "";
480
480
  }
481
481
  }),
482
- !F.triggerActive && /* @__PURE__ */ Y(O, {
483
- open: F.pickerOpen,
484
- onOpenChange: F.setPickerOpen,
485
- children: [/* @__PURE__ */ J(E, { render: /* @__PURE__ */ J(p, { render: /* @__PURE__ */ J("button", {
482
+ !P.triggerActive && /* @__PURE__ */ K(k, {
483
+ open: P.pickerOpen,
484
+ onOpenChange: P.setPickerOpen,
485
+ children: [/* @__PURE__ */ G(D, { render: /* @__PURE__ */ G(p, { render: /* @__PURE__ */ G("button", {
486
486
  type: "button",
487
487
  tabIndex: -1,
488
488
  "aria-hidden": !0
489
- }) }) }), /* @__PURE__ */ J(re, {
490
- open: F.pickerOpen,
491
- activeKind: F.activeKind,
492
- setActiveKind: F.setActiveKind,
493
- kinds: F.kinds,
494
- resources: h,
495
- suggestionsByKind: F.suggestionsByKind,
496
- query: F.query,
497
- setQuery: F.setQuery,
498
- suggestions: F.suggestions,
499
- loading: F.isLoading,
500
- onSelect: F.pickSuggestion
489
+ }) }) }), /* @__PURE__ */ G(M, {
490
+ open: P.pickerOpen,
491
+ activeKind: P.activeKind,
492
+ setActiveKind: P.setActiveKind,
493
+ kinds: P.kinds,
494
+ resources: m,
495
+ suggestionsByKind: P.suggestionsByKind,
496
+ query: P.query,
497
+ setQuery: P.setQuery,
498
+ suggestions: P.suggestions,
499
+ loading: P.isLoading,
500
+ onSelect: P.pickSuggestion
501
501
  })]
502
502
  }),
503
- /* @__PURE__ */ Y("div", {
504
- className: X.composerEditor,
505
- children: [/* @__PURE__ */ J(ie, {
506
- ref: D,
503
+ /* @__PURE__ */ K("div", {
504
+ className: J.composerEditor,
505
+ children: [/* @__PURE__ */ G(oe, {
506
+ ref: E,
507
507
  compact: !0,
508
508
  value: ne,
509
- onValueChange: B,
509
+ onValueChange: fe,
510
510
  placeholder: C ?? T.composerPlaceholder,
511
511
  strings: { editorLabel: C ?? T.composerPlaceholder },
512
- autoFocus: x || ce || z,
512
+ autoFocus: x || le || ue,
513
513
  hideSourceToggle: !0,
514
- extraToolbarItems: fe,
515
- toolbarTrailing: me ? void 0 : pe,
516
- footerSlot: R.attachments.length > 0 ? /* @__PURE__ */ J(m, {
514
+ extraToolbarItems: me,
515
+ toolbarTrailing: ge ? void 0 : z,
516
+ footerSlot: L.attachments.length > 0 ? /* @__PURE__ */ G(h, {
517
517
  direction: "horizontal",
518
518
  wrap: !0,
519
519
  align: "center",
520
520
  gap: "sm",
521
- children: R.attachments.map((e) => /* @__PURE__ */ J(Ce, {
521
+ children: L.attachments.map((e) => /* @__PURE__ */ G(Te, {
522
522
  attachment: e,
523
523
  editable: !0,
524
- onRemove: R.removeAttachment,
525
- onRetry: R.retryAttachment,
524
+ onRemove: L.removeAttachment,
525
+ onRetry: L.retryAttachment,
526
526
  strings: f
527
527
  }, e.id))
528
528
  }) : void 0,
529
- onCaretChange: F.handleCaretChange
530
- }), /* @__PURE__ */ J(M, {
531
- onDismiss: () => F.setPickerOpen(!1),
532
- open: F.triggerActive && F.pickerOpen,
533
- activeKind: F.activeKind,
534
- setActiveKind: F.setActiveKind,
535
- onManualKindChange: () => F.setManualKindOverride(!0),
536
- kinds: F.kinds,
537
- resources: h,
538
- query: F.query,
539
- suggestions: F.suggestions,
540
- suggestionsByKind: F.suggestionsByKind,
541
- loading: F.isLoading,
542
- onSelect: F.pickSuggestion
529
+ onCaretChange: P.handleCaretChange
530
+ }), /* @__PURE__ */ G(ie, {
531
+ onDismiss: () => P.setPickerOpen(!1),
532
+ open: P.triggerActive && P.pickerOpen,
533
+ activeKind: P.activeKind,
534
+ setActiveKind: P.setActiveKind,
535
+ onManualKindChange: () => P.setManualKindOverride(!0),
536
+ kinds: P.kinds,
537
+ resources: m,
538
+ query: P.query,
539
+ suggestions: P.suggestions,
540
+ suggestionsByKind: P.suggestionsByKind,
541
+ loading: P.isLoading,
542
+ onSelect: P.pickSuggestion
543
543
  })]
544
544
  }),
545
- !!oe && /* @__PURE__ */ J(n, {
545
+ !!A && /* @__PURE__ */ G(n, {
546
546
  size: "xs",
547
547
  type: "error",
548
548
  role: "alert",
549
549
  "aria-live": "polite",
550
- children: oe
550
+ children: A
551
551
  }),
552
- !!ge && /* @__PURE__ */ J(n, {
552
+ !!_e && /* @__PURE__ */ G(n, {
553
553
  size: "xs",
554
554
  type: "error",
555
555
  role: "alert",
556
556
  "aria-live": "polite",
557
- children: ge
557
+ children: _e
558
558
  }),
559
- me && /* @__PURE__ */ Y(m, {
559
+ ge && /* @__PURE__ */ K(h, {
560
560
  direction: "horizontal",
561
561
  align: "center",
562
562
  justify: "end",
563
563
  gap: "md",
564
- children: [!!l && /* @__PURE__ */ J(s, {
564
+ children: [!!l && /* @__PURE__ */ G(s, {
565
565
  type: "button",
566
566
  tone: "neutral",
567
567
  buttonStyle: "ghost",
568
568
  onClick: l,
569
569
  disabled: i,
570
570
  children: T.composerCancel
571
- }), pe]
571
+ }), z]
572
572
  })
573
573
  ]
574
574
  });
575
575
  }
576
576
  //#endregion
577
577
  //#region src/components/features/comments/comment-thread-context.ts
578
- var Oe = V(/* @__PURE__ */ new Map()), ke = V(0), Ae = V({});
578
+ var ke = z(/* @__PURE__ */ new Map()), Ae = z(0), je = z({});
579
579
  //#endregion
580
580
  //#region src/components/features/comments/comment-content.tsx
581
581
  function Q(e) {
@@ -591,18 +591,18 @@ function $(e) {
591
591
  } catch {}
592
592
  return t.startsWith("\"") && t.endsWith("\"") ? t.slice(1, -1) : t;
593
593
  }
594
- function je({ block: r, copy: a }) {
594
+ function Me({ block: r, copy: a }) {
595
595
  let o = r.data ?? {};
596
596
  switch (r.type) {
597
597
  case "paragraph": {
598
598
  let e = String(o.text ?? "").trim();
599
- return e ? /* @__PURE__ */ J(i, { html: e }) : null;
599
+ return e ? /* @__PURE__ */ G(i, { html: e }) : null;
600
600
  }
601
601
  case "header": {
602
602
  let e = Q(String(o.text ?? ""));
603
603
  if (!e) return null;
604
604
  let n = Math.min(Math.max(Number(o.level ?? 3), 1), 6);
605
- return /* @__PURE__ */ J(t, {
605
+ return /* @__PURE__ */ G(t, {
606
606
  level: n,
607
607
  children: e
608
608
  });
@@ -611,9 +611,9 @@ function je({ block: r, copy: a }) {
611
611
  let t = (Array.isArray(o.items) ? o.items : []).map((e) => Q(String(e ?? ""))).filter((e) => e.length > 0);
612
612
  if (t.length === 0) return null;
613
613
  let r = o.style === "ordered";
614
- return /* @__PURE__ */ J(r ? "ol" : "ul", {
615
- className: e(X.richList, r && X.richListOrdered),
616
- children: t.map((e, t) => /* @__PURE__ */ J("li", { children: /* @__PURE__ */ J(n, {
614
+ return /* @__PURE__ */ G(r ? "ol" : "ul", {
615
+ className: e(J.richList, r && J.richListOrdered),
616
+ children: t.map((e, t) => /* @__PURE__ */ G("li", { children: /* @__PURE__ */ G(n, {
617
617
  tag: "span",
618
618
  children: e
619
619
  }) }, `${e}-${t}`))
@@ -623,14 +623,14 @@ function je({ block: r, copy: a }) {
623
623
  let e = String(o.text ?? "").trim();
624
624
  if (!e) return null;
625
625
  let t = Q(String(o.caption ?? ""));
626
- return /* @__PURE__ */ Y("blockquote", {
627
- className: X.richQuote,
628
- children: [/* @__PURE__ */ J(i, {
626
+ return /* @__PURE__ */ K("blockquote", {
627
+ className: J.richQuote,
628
+ children: [/* @__PURE__ */ G(i, {
629
629
  html: e,
630
630
  type: "secondary"
631
- }), t.length > 0 && /* @__PURE__ */ J("cite", {
632
- className: X.richCite,
633
- children: /* @__PURE__ */ J(n, {
631
+ }), t.length > 0 && /* @__PURE__ */ G("cite", {
632
+ className: J.richCite,
633
+ children: /* @__PURE__ */ G(n, {
634
634
  tag: "span",
635
635
  size: "xs",
636
636
  type: "secondary",
@@ -639,89 +639,89 @@ function je({ block: r, copy: a }) {
639
639
  })]
640
640
  });
641
641
  }
642
- case "delimiter": return /* @__PURE__ */ J("div", {
642
+ case "delimiter": return /* @__PURE__ */ G("div", {
643
643
  "aria-hidden": !0,
644
- className: X.richDelimiter
644
+ className: J.richDelimiter
645
645
  });
646
646
  default: {
647
647
  let e = Q(String(o.text ?? ""));
648
- return e ? /* @__PURE__ */ J(n, {
649
- className: X.plain,
648
+ return e ? /* @__PURE__ */ G(n, {
649
+ className: J.plain,
650
650
  children: e
651
651
  }) : null;
652
652
  }
653
653
  }
654
654
  }
655
- function Me({ raw: e, copy: t }) {
655
+ function Ne({ raw: e, copy: t }) {
656
656
  if (!e) return null;
657
657
  let r;
658
658
  try {
659
659
  let t = JSON.parse(e);
660
660
  r = Array.isArray(t?.blocks) ? t.blocks : [];
661
661
  } catch {
662
- return /* @__PURE__ */ J(n, {
663
- className: X.plain,
662
+ return /* @__PURE__ */ G(n, {
663
+ className: J.plain,
664
664
  children: $(e)
665
665
  });
666
666
  }
667
- return r.length === 0 ? null : /* @__PURE__ */ J("div", {
668
- className: X.richBlocks,
669
- children: r.map((e, n) => /* @__PURE__ */ J(de, { children: /* @__PURE__ */ J(je, {
667
+ return r.length === 0 ? null : /* @__PURE__ */ G("div", {
668
+ className: J.richBlocks,
669
+ children: r.map((e, n) => /* @__PURE__ */ G(me, { children: /* @__PURE__ */ G(Me, {
670
670
  block: e,
671
671
  copy: t
672
672
  }) }, e.id ?? `${e.type}-${n}`))
673
673
  });
674
674
  }
675
- function Ne({ comment: t, resources: r, renderReference: i, sanitizer: a, strings: o, className: s }) {
675
+ function Pe({ comment: t, resources: r, renderReference: i, sanitizer: a, strings: o, className: s }) {
676
676
  let c = {
677
- ...ye,
677
+ ...q,
678
678
  ...o
679
679
  }, l = e("comment-content--component", s), u = t.contentType ?? "text";
680
- return u === "rich" ? /* @__PURE__ */ J("div", {
680
+ return u === "rich" ? /* @__PURE__ */ G("div", {
681
681
  className: l,
682
- children: /* @__PURE__ */ J(Me, {
682
+ children: /* @__PURE__ */ G(Ne, {
683
683
  raw: t.content,
684
684
  copy: c
685
685
  })
686
- }) : u === "html" ? /* @__PURE__ */ J("div", {
686
+ }) : u === "html" ? /* @__PURE__ */ G("div", {
687
687
  className: l,
688
- children: /* @__PURE__ */ J(A, {
688
+ children: /* @__PURE__ */ G(A, {
689
689
  html: t.content ?? "",
690
690
  mentions: t.references,
691
691
  resources: r,
692
692
  renderMention: i,
693
693
  sanitizer: a
694
694
  })
695
- }) : /* @__PURE__ */ J(n, {
696
- className: e(l, X.plain),
695
+ }) : /* @__PURE__ */ G(n, {
696
+ className: e(l, J.plain),
697
697
  children: $(t.content)
698
698
  });
699
699
  }
700
700
  //#endregion
701
701
  //#region src/components/features/comments/comment-item.tsx
702
- var Pe = "active", Fe = 2, Ie = ["👍"];
703
- function Le(e) {
702
+ var Fe = "active", Ie = 2, Le = ["👍"];
703
+ function Re(e) {
704
704
  let t = e.replace(/_/g, " ");
705
705
  return t.charAt(0).toUpperCase() + t.slice(1);
706
706
  }
707
- function Re(e) {
708
- let { format: t, locale: n } = o(), r = x(e);
707
+ function ze(e) {
708
+ let { format: t, locale: n } = o(), r = S(e);
709
709
  return r ? {
710
710
  iso: r.toISOString(),
711
- label: _e(r, `${t} HH:mm`, { locale: n })
711
+ label: xe(r, `${t} HH:mm`, { locale: n })
712
712
  } : null;
713
713
  }
714
- function ze({ children: t, className: i, buttonRef: a, ...o }) {
715
- return /* @__PURE__ */ J(r, {
716
- render: /* @__PURE__ */ J("button", {
714
+ function Be({ children: t, className: i, buttonRef: a, ...o }) {
715
+ return /* @__PURE__ */ G(r, {
716
+ render: /* @__PURE__ */ G("button", {
717
717
  type: "button",
718
718
  ref: a
719
719
  }),
720
720
  variant: "subtle",
721
721
  "data-hit-area": !0,
722
- className: e(X.quietAction, i),
722
+ className: e(J.quietAction, i),
723
723
  ...o,
724
- children: /* @__PURE__ */ J(n, {
724
+ children: /* @__PURE__ */ G(n, {
725
725
  tag: "span",
726
726
  size: "xs",
727
727
  weight: "medium",
@@ -730,66 +730,66 @@ function ze({ children: t, className: i, buttonRef: a, ...o }) {
730
730
  })
731
731
  });
732
732
  }
733
- function Be({ choices: e, reactions: t, onPick: n, copy: r }) {
734
- let [i, a] = K(!1);
733
+ function Ve({ choices: e, reactions: t, onPick: n, copy: r }) {
734
+ let [i, a] = W(!1);
735
735
  if (e.length <= 1) {
736
- let [t = Ie[0]] = e;
737
- return /* @__PURE__ */ J("button", {
736
+ let [t = Le[0]] = e;
737
+ return /* @__PURE__ */ G("button", {
738
738
  type: "button",
739
739
  "aria-label": r.addReactionLabel,
740
740
  title: r.addReactionLabel,
741
741
  onClick: () => n(t),
742
- className: X.reactionAdd,
743
- children: /* @__PURE__ */ J(z, { "aria-hidden": !0 })
742
+ className: J.reactionAdd,
743
+ children: /* @__PURE__ */ G(R, { "aria-hidden": !0 })
744
744
  });
745
745
  }
746
- return /* @__PURE__ */ Y(O, {
746
+ return /* @__PURE__ */ K(k, {
747
747
  open: i,
748
748
  onOpenChange: a,
749
- children: [/* @__PURE__ */ J(E, {
750
- render: /* @__PURE__ */ J("button", {
749
+ children: [/* @__PURE__ */ G(D, {
750
+ render: /* @__PURE__ */ G("button", {
751
751
  type: "button",
752
752
  "aria-label": r.addReactionLabel,
753
753
  title: r.addReactionLabel,
754
- className: X.reactionAdd
754
+ className: J.reactionAdd
755
755
  }),
756
- children: /* @__PURE__ */ J(z, { "aria-hidden": !0 })
757
- }), /* @__PURE__ */ J(D, {
756
+ children: /* @__PURE__ */ G(R, { "aria-hidden": !0 })
757
+ }), /* @__PURE__ */ G(O, {
758
758
  width: "auto",
759
759
  side: "top",
760
760
  align: "start",
761
761
  inset: "flush",
762
762
  "aria-label": r.reactionPickerLabel,
763
- className: X.reactionPicker,
763
+ className: J.reactionPicker,
764
764
  children: e.map((e) => {
765
765
  let r = t.some((t) => t.emoji === e && t.mine);
766
- return /* @__PURE__ */ J("button", {
766
+ return /* @__PURE__ */ G("button", {
767
767
  type: "button",
768
768
  "aria-pressed": r,
769
769
  "data-mine": r || void 0,
770
770
  onClick: () => {
771
771
  n(e), a(!1);
772
772
  },
773
- className: X.reactionChoice,
773
+ className: J.reactionChoice,
774
774
  children: e
775
775
  }, e);
776
776
  })
777
777
  })]
778
778
  });
779
779
  }
780
- function Ve({ comment: t, replies: r, canModerate: i, onDelete: a, onAttachmentRemove: o, onEdit: s, onPinToggle: p, onReact: m, onReply: h, allowReactions: _ = !0, allowReplies: v = !0, commentActions: x, maxVisibleReplies: E = 3, clampLines: D = 6, maxVisibleAttachments: O = 3, reactionChoices: k = Ie, sanitizer: A, strings: j, getMediaUrl: M, getMediaName: re, getStatusLabel: N, resources: ie, renderAttachment: ae, renderReference: oe, className: P }) {
781
- let F = {
782
- ...ye,
783
- ...j
784
- }, I = pe(ke), L = pe(Ae), le = pe(Oe), z = v ? r ?? le.get(t.id ?? "") ?? [] : [], B = t.user?.name ?? F.fallbackAuthor, de = t.status && t.status !== Pe ? N?.(t.status) ?? Le(t.status) : null, V = Re(t.createdAt), he = Re(t.updatedAt), _e = t.canDelete ?? i === !0, ve = t.canEdit ?? i === !0, be = W(() => {
780
+ function He({ comment: t, replies: r, canModerate: i, onDelete: a, onAttachmentRemove: o, onEdit: s, onPinToggle: p, onReact: m, onReply: h, allowReactions: g = !0, allowReplies: v = !0, commentActions: y, maxVisibleReplies: S = 3, clampLines: D = 6, maxVisibleAttachments: O = 3, reactionChoices: k = Le, sanitizer: te, strings: A, getMediaUrl: j, getMediaName: ie, getStatusLabel: M, resources: ae, renderAttachment: oe, renderReference: se, className: N }) {
781
+ let P = {
782
+ ...q,
783
+ ...A
784
+ }, F = ge(Ae), I = ge(je), ce = ge(ke), de = v ? r ?? ce.get(t.id ?? "") ?? [] : [], R = t.user?.name ?? P.fallbackAuthor, pe = t.status && t.status !== Fe ? M?.(t.status) ?? Re(t.status) : null, me = ze(t.createdAt), z = ze(t.updatedAt), ve = t.canDelete ?? i === !0, xe = t.canEdit ?? i === !0, Se = H(() => {
785
785
  let e = t.tagsArray;
786
786
  return Array.isArray(e) ? e.filter((e) => typeof e == "string") : e && typeof e == "object" ? Object.values(e).filter((e) => typeof e == "string") : [];
787
- }, [t.tagsArray]), xe = W(() => (t.attachments ?? []).filter((e) => !!e && typeof e == "object"), [t.attachments]), Se = _ ? t.reactions ?? [] : [], we = te(), [Te, Ee] = K(null), De = H((e) => {
788
- Ee(e), we.show();
789
- }, [we]), Z = !!t.id && !!L.composer && L.replyingToId === t.id, Q = !!t.id && !!L.composer && L.editingId === t.id, $ = z.length, [je, Me] = K(!1), [He, Ue] = K(!1), [We, Ge] = K(Z);
790
- We !== Z && (Ge(Z), Z && $ > 0 && Me(!0));
791
- let Ke = je ? Math.max(0, $ - (E > 0 && !He ? E : $)) : 0, qe = je ? z.slice(Ke) : [], Je = me(), Ye = Z ? L.composer : null, Xe = Ye ? "composer" : qe.length > 0 ? "reply" : Ke > 0 ? "earlier" : "toggle", Ze = $ > 0 || !!Ye, Qe = G(null), $e = me(), [et, tt] = K(!1), [nt, rt] = K(!1), it = D > 0, at = it && nt && !et;
792
- ge(() => {
787
+ }, [t.tagsArray]), Y = H(() => (t.attachments ?? []).filter((e) => !!e && typeof e == "object"), [t.attachments]), Ce = g ? t.reactions ?? [] : [], we = ne(), [Ee, De] = W(null), Oe = B((e) => {
788
+ De(e), we.show();
789
+ }, [we]), X = !!t.id && !!I.composer && I.replyingToId === t.id, Z = !!t.id && !!I.composer && I.editingId === t.id, Q = de.length, [$, Me] = W(!1), [Ne, Ue] = W(!1), [We, Ge] = W(X);
790
+ We !== X && (Ge(X), X && Q > 0 && Me(!0));
791
+ let Ke = $ ? Math.max(0, Q - (S > 0 && !Ne ? S : Q)) : 0, qe = $ ? de.slice(Ke) : [], Je = _e(), Ye = X ? I.composer : null, Xe = Ye ? "composer" : qe.length > 0 ? "reply" : Ke > 0 ? "earlier" : "toggle", Ze = Q > 0 || !!Ye, Qe = U(null), $e = _e(), [et, tt] = W(!1), [nt, rt] = W(!1), it = D > 0, at = it && nt && !et;
792
+ ye(() => {
793
793
  let e = Qe.current;
794
794
  if (!e || !it) {
795
795
  rt(!1);
@@ -797,7 +797,7 @@ function Ve({ comment: t, replies: r, canModerate: i, onDelete: a, onAttachmentR
797
797
  }
798
798
  let t = () => {
799
799
  let t = getComputedStyle(e), n = parseFloat(t.lineHeight) || parseFloat(t.fontSize) * 1.5;
800
- n && rt(e.scrollHeight > (D + Fe) * n + 1);
800
+ n && rt(e.scrollHeight > (D + Ie) * n + 1);
801
801
  };
802
802
  if (t(), typeof ResizeObserver > "u") return;
803
803
  let n = new ResizeObserver(t);
@@ -806,38 +806,38 @@ function Ve({ comment: t, replies: r, canModerate: i, onDelete: a, onAttachmentR
806
806
  it,
807
807
  D,
808
808
  t.content,
809
- Q
809
+ Z
810
810
  ]);
811
- let [ot, st] = K(!1), ct = O > 0 && xe.length > O + 1, lt = ct && !ot ? xe.slice(0, O) : xe, ut = xe.length - lt.length, dt = G(null), ft = G(null), pt = G(!1), mt = G(!1);
812
- U(() => {
811
+ let [ot, st] = W(!1), ct = O > 0 && Y.length > O + 1, lt = ct && !ot ? Y.slice(0, O) : Y, ut = Y.length - lt.length, dt = U(null), ft = U(null), pt = U(!1), mt = U(!1);
812
+ V(() => {
813
813
  let e = !document.activeElement || document.activeElement === document.body;
814
- pt.current && !Z && e && dt.current?.focus(), mt.current && !Q && e && ft.current?.querySelector("button")?.focus(), pt.current = Z, mt.current = Q;
815
- }, [Q, Z]);
814
+ pt.current && !X && e && dt.current?.focus(), mt.current && !Z && e && ft.current?.querySelector("button")?.focus(), pt.current = X, mt.current = Z;
815
+ }, [Z, X]);
816
816
  let ht = [
817
817
  {
818
818
  id: "pin",
819
- label: t.isPinned ? F.unpinLabel : F.pinLabel,
820
- icon: ce,
819
+ label: t.isPinned ? P.unpinLabel : P.pinLabel,
820
+ icon: ue,
821
821
  visible: !!p && i === !0,
822
822
  onClick: () => p?.(t)
823
823
  },
824
824
  {
825
825
  id: "edit",
826
- label: F.editLabel,
827
- icon: R,
828
- visible: ve && !!s && !!t.id,
826
+ label: P.editLabel,
827
+ icon: le,
828
+ visible: xe && !!s && !!t.id,
829
829
  onClick: () => s?.(t)
830
830
  },
831
- ...d(x, t),
831
+ ...d(y, t),
832
832
  {
833
833
  id: "delete",
834
- label: F.deleteLabel,
835
- icon: ue,
834
+ label: P.deleteLabel,
835
+ icon: fe,
836
836
  tone: "destructive",
837
- visible: _e && !!a && !!t.id,
837
+ visible: ve && !!a && !!t.id,
838
838
  onClick: () => a?.(t.id)
839
839
  }
840
- ], gt = _ && !!m && !!t.id, _t = v && !!h && !!t.id, vt = Se.length > 0 || gt || _t, yt = {
840
+ ], gt = g && !!m && !!t.id, _t = v && !!h && !!t.id, vt = Ce.length > 0 || gt || _t, yt = {
841
841
  canModerate: i,
842
842
  onDelete: a,
843
843
  onAttachmentRemove: o,
@@ -845,281 +845,281 @@ function Ve({ comment: t, replies: r, canModerate: i, onDelete: a, onAttachmentR
845
845
  onPinToggle: p,
846
846
  onReact: m,
847
847
  onReply: h,
848
- allowReactions: _,
848
+ allowReactions: g,
849
849
  allowReplies: v,
850
- commentActions: x,
851
- maxVisibleReplies: E,
850
+ commentActions: y,
851
+ maxVisibleReplies: S,
852
852
  clampLines: D,
853
853
  maxVisibleAttachments: O,
854
854
  reactionChoices: k,
855
- sanitizer: A,
856
- strings: j,
857
- getMediaUrl: M,
858
- getMediaName: re,
859
- getStatusLabel: N,
860
- resources: ie,
861
- renderAttachment: ae,
862
- renderReference: oe
855
+ sanitizer: te,
856
+ strings: A,
857
+ getMediaUrl: j,
858
+ getMediaName: ie,
859
+ getStatusLabel: M,
860
+ resources: ae,
861
+ renderAttachment: oe,
862
+ renderReference: se
863
863
  }, bt = `${$e}-author`;
864
- return /* @__PURE__ */ Y("article", {
864
+ return /* @__PURE__ */ K("article", {
865
865
  "data-slot": "comment",
866
866
  "data-comment-id": t.id,
867
- "data-depth": I,
867
+ "data-depth": F,
868
868
  "data-pinned": t.isPinned || void 0,
869
- "data-status": de ? t.status : void 0,
869
+ "data-status": pe ? t.status : void 0,
870
870
  "data-thread": Ze || void 0,
871
- "data-editing": Q || void 0,
871
+ "data-editing": Z || void 0,
872
872
  "aria-labelledby": bt,
873
- className: e("comment-item--component", X.item, P),
873
+ className: e("comment-item--component", J.item, N),
874
874
  children: [
875
- t.isPinned && /* @__PURE__ */ Y("div", {
876
- className: X.itemContext,
877
- children: [/* @__PURE__ */ J(ce, {
875
+ t.isPinned && /* @__PURE__ */ K("div", {
876
+ className: J.itemContext,
877
+ children: [/* @__PURE__ */ G(ue, {
878
878
  "aria-hidden": !0,
879
- className: X.itemContextIcon
880
- }), /* @__PURE__ */ J(n, {
879
+ className: J.itemContextIcon
880
+ }), /* @__PURE__ */ G(n, {
881
881
  tag: "span",
882
882
  size: "xs",
883
883
  weight: "medium",
884
884
  type: "secondary",
885
- children: F.pinned
885
+ children: P.pinned
886
886
  })]
887
887
  }),
888
- /* @__PURE__ */ J("div", {
889
- className: X.itemGutter,
890
- children: /* @__PURE__ */ Y(T, {
888
+ /* @__PURE__ */ G("div", {
889
+ className: J.itemGutter,
890
+ children: /* @__PURE__ */ K(E, {
891
891
  "aria-hidden": !0,
892
- size: I > 0 ? "sm" : "default",
893
- children: [!!t.user?.avatar && /* @__PURE__ */ J(ee, {
892
+ size: F > 0 ? "sm" : "default",
893
+ children: [!!t.user?.avatar && /* @__PURE__ */ G(T, {
894
894
  src: t.user.avatar,
895
- alt: B
896
- }), /* @__PURE__ */ J(w, { children: g(B) })]
895
+ alt: R
896
+ }), /* @__PURE__ */ G(ee, { children: _(R) })]
897
897
  })
898
898
  }),
899
- /* @__PURE__ */ J("div", {
900
- className: X.itemMain,
901
- children: Q ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(n, {
899
+ /* @__PURE__ */ G("div", {
900
+ className: J.itemMain,
901
+ children: Z ? /* @__PURE__ */ K(be, { children: [/* @__PURE__ */ G(n, {
902
902
  tag: "span",
903
903
  id: bt,
904
904
  weight: "semibold",
905
- className: X.itemEditingAuthor,
906
- children: B
907
- }), L.composer] }) : /* @__PURE__ */ Y(q, { children: [
908
- /* @__PURE__ */ Y("div", {
909
- className: X.itemBubbleRow,
910
- children: [/* @__PURE__ */ Y("div", {
911
- className: X.itemBubble,
905
+ className: J.itemEditingAuthor,
906
+ children: R
907
+ }), I.composer] }) : /* @__PURE__ */ K(be, { children: [
908
+ /* @__PURE__ */ K("div", {
909
+ className: J.itemBubbleRow,
910
+ children: [/* @__PURE__ */ K("div", {
911
+ className: J.itemBubble,
912
912
  children: [
913
- /* @__PURE__ */ Y("div", {
914
- className: X.itemHeader,
913
+ /* @__PURE__ */ K("div", {
914
+ className: J.itemHeader,
915
915
  children: [
916
- /* @__PURE__ */ J(n, {
916
+ /* @__PURE__ */ G(n, {
917
917
  tag: "span",
918
918
  id: bt,
919
919
  weight: "semibold",
920
- className: X.itemAuthor,
921
- children: B
920
+ className: J.itemAuthor,
921
+ children: R
922
922
  }),
923
- !!de && /* @__PURE__ */ J(C, {
923
+ !!pe && /* @__PURE__ */ G(w, {
924
924
  tone: "neutral",
925
925
  variant: "outline",
926
- children: de
926
+ children: pe
927
927
  }),
928
- (V || t.isEdited) && /* @__PURE__ */ Y("span", {
929
- className: X.itemMeta,
930
- children: [V && /* @__PURE__ */ J("time", {
931
- dateTime: V.iso,
932
- className: X.itemTime,
933
- children: /* @__PURE__ */ J(y, {
928
+ (me || t.isEdited) && /* @__PURE__ */ K("span", {
929
+ className: J.itemMeta,
930
+ children: [me && /* @__PURE__ */ G("time", {
931
+ dateTime: me.iso,
932
+ className: J.itemTime,
933
+ children: /* @__PURE__ */ G(b, {
934
934
  value: t.createdAt,
935
935
  size: "xs",
936
936
  type: "secondary",
937
- title: V.label
937
+ title: me.label
938
938
  })
939
- }), t.isEdited && /* @__PURE__ */ J(n, {
939
+ }), t.isEdited && /* @__PURE__ */ G(n, {
940
940
  tag: "span",
941
941
  size: "xs",
942
942
  type: "secondary",
943
- title: he?.label,
944
- className: X.itemEdited,
945
- children: F.edited
943
+ title: z?.label,
944
+ className: J.itemEdited,
945
+ children: P.edited
946
946
  })]
947
947
  })
948
948
  ]
949
949
  }),
950
- /* @__PURE__ */ J("div", {
950
+ /* @__PURE__ */ G("div", {
951
951
  ref: Qe,
952
952
  id: $e,
953
953
  "data-clamped": at || void 0,
954
954
  style: at ? { maxHeight: `${D}lh` } : void 0,
955
- className: X.itemContent,
956
- children: /* @__PURE__ */ J(Ne, {
955
+ className: J.itemContent,
956
+ children: /* @__PURE__ */ G(Pe, {
957
957
  comment: t,
958
- resources: ie,
959
- renderReference: oe,
960
- sanitizer: A,
961
- strings: j
958
+ resources: ae,
959
+ renderReference: se,
960
+ sanitizer: te,
961
+ strings: A
962
962
  })
963
963
  }),
964
- it && nt && /* @__PURE__ */ J(ze, {
964
+ it && nt && /* @__PURE__ */ G(Be, {
965
965
  "aria-expanded": et,
966
966
  "aria-controls": $e,
967
967
  onClick: () => tt((e) => !e),
968
- className: X.itemMore,
969
- children: et ? F.seeLessLabel : F.seeMoreLabel
968
+ className: J.itemMore,
969
+ children: et ? P.seeLessLabel : P.seeMoreLabel
970
970
  })
971
971
  ]
972
- }), /* @__PURE__ */ J("div", {
972
+ }), /* @__PURE__ */ G("div", {
973
973
  ref: ft,
974
- className: X.itemMenu,
975
- children: /* @__PURE__ */ J(f, {
976
- icon: se,
977
- strings: { trigger: F.actionsLabel },
974
+ className: J.itemMenu,
975
+ children: /* @__PURE__ */ G(f, {
976
+ icon: L,
977
+ strings: { trigger: P.actionsLabel },
978
978
  actions: ht
979
979
  })
980
980
  })]
981
981
  }),
982
- (xe.length > 0 || be.length > 0) && /* @__PURE__ */ Y("div", {
983
- className: X.itemChips,
982
+ (Y.length > 0 || Se.length > 0) && /* @__PURE__ */ K("div", {
983
+ className: J.itemChips,
984
984
  children: [
985
985
  lt.map((e) => {
986
- if (ae) return /* @__PURE__ */ J("div", { children: ae(e) }, e.id ?? e.name);
987
- let t = !!o && !!e.id && _e;
988
- return /* @__PURE__ */ J(Ce, {
986
+ if (oe) return /* @__PURE__ */ G("div", { children: oe(e) }, e.id ?? e.name);
987
+ let t = !!o && !!e.id && ve;
988
+ return /* @__PURE__ */ G(Te, {
989
989
  attachment: e,
990
990
  editable: t,
991
- onRemove: t ? () => De(e.id) : void 0,
991
+ onRemove: t ? () => Oe(e.id) : void 0,
992
992
  accessors: {
993
- getMediaUrl: M,
994
- getMediaName: re
993
+ getMediaUrl: j,
994
+ getMediaName: ie
995
995
  },
996
- strings: j
996
+ strings: A
997
997
  }, e.id ?? e.name);
998
998
  }),
999
- be.map((e) => /* @__PURE__ */ J(C, {
999
+ Se.map((e) => /* @__PURE__ */ G(w, {
1000
1000
  tone: "neutral",
1001
1001
  variant: "outline",
1002
1002
  children: e
1003
1003
  }, e)),
1004
- ct && /* @__PURE__ */ J(ze, {
1004
+ ct && /* @__PURE__ */ G(Be, {
1005
1005
  "aria-expanded": ot,
1006
1006
  onClick: () => st((e) => !e),
1007
- children: ot ? F.showFewerAttachmentsLabel : F.formatShowMoreAttachments(ut)
1007
+ children: ot ? P.showFewerAttachmentsLabel : P.formatShowMoreAttachments(ut)
1008
1008
  })
1009
1009
  ]
1010
1010
  }),
1011
- vt && /* @__PURE__ */ Y("div", {
1012
- className: X.itemActions,
1011
+ vt && /* @__PURE__ */ K("div", {
1012
+ className: J.itemActions,
1013
1013
  children: [
1014
- Se.map((e) => {
1015
- let n = /* @__PURE__ */ J("button", {
1014
+ Ce.map((e) => {
1015
+ let n = /* @__PURE__ */ G("button", {
1016
1016
  type: "button",
1017
1017
  "data-mine": e.mine || void 0,
1018
1018
  disabled: !gt,
1019
1019
  "aria-pressed": e.mine === !0,
1020
1020
  onClick: () => t.id && m?.(t.id, e.emoji),
1021
1021
  title: gt ? void 0 : e.users?.join(", "),
1022
- className: X.reaction
1023
- }), r = /* @__PURE__ */ Y(q, { children: [
1024
- /* @__PURE__ */ J("span", {
1025
- className: X.reactionEmoji,
1022
+ className: J.reaction
1023
+ }), r = /* @__PURE__ */ K(be, { children: [
1024
+ /* @__PURE__ */ G("span", {
1025
+ className: J.reactionEmoji,
1026
1026
  children: e.emoji
1027
1027
  }),
1028
1028
  " ",
1029
- /* @__PURE__ */ J(S, {
1029
+ /* @__PURE__ */ G(C, {
1030
1030
  value: e.count,
1031
1031
  size: "xs",
1032
1032
  type: "inherit"
1033
1033
  })
1034
1034
  ] });
1035
- return gt && e.users?.length ? /* @__PURE__ */ Y(u, { children: [/* @__PURE__ */ J(c, {
1035
+ return gt && e.users?.length ? /* @__PURE__ */ K(u, { children: [/* @__PURE__ */ G(c, {
1036
1036
  render: n,
1037
1037
  children: r
1038
- }), /* @__PURE__ */ J(l, { children: /* @__PURE__ */ J(b, {
1038
+ }), /* @__PURE__ */ G(l, { children: /* @__PURE__ */ G(x, {
1039
1039
  items: e.users,
1040
1040
  max: 10,
1041
1041
  size: "xs",
1042
1042
  type: "inherit"
1043
- }) })] }, e.emoji) : fe(n, { key: e.emoji }, r);
1043
+ }) })] }, e.emoji) : he(n, { key: e.emoji }, r);
1044
1044
  }),
1045
- gt && /* @__PURE__ */ J(Be, {
1045
+ gt && /* @__PURE__ */ G(Ve, {
1046
1046
  choices: k,
1047
- reactions: Se,
1047
+ reactions: Ce,
1048
1048
  onPick: (e) => m(t.id, e),
1049
- copy: F
1049
+ copy: P
1050
1050
  }),
1051
- _t && /* @__PURE__ */ J(ze, {
1051
+ _t && /* @__PURE__ */ G(Be, {
1052
1052
  buttonRef: dt,
1053
1053
  onClick: () => h(t.id),
1054
- className: X.itemReply,
1055
- children: F.replyLabel
1054
+ className: J.itemReply,
1055
+ children: P.replyLabel
1056
1056
  })
1057
1057
  ]
1058
1058
  })
1059
1059
  ] })
1060
1060
  }),
1061
- Ze && /* @__PURE__ */ Y("div", {
1062
- className: X.itemThread,
1061
+ Ze && /* @__PURE__ */ K("div", {
1062
+ className: J.itemThread,
1063
1063
  children: [
1064
- $ > 0 && /* @__PURE__ */ J("div", {
1065
- className: X.threadEntry,
1064
+ Q > 0 && /* @__PURE__ */ G("div", {
1065
+ className: J.threadEntry,
1066
1066
  "data-entry": "toggle",
1067
1067
  "data-last": Xe === "toggle" || void 0,
1068
- children: /* @__PURE__ */ J(ze, {
1069
- "aria-expanded": je,
1070
- "aria-controls": je ? Je : void 0,
1068
+ children: /* @__PURE__ */ G(Be, {
1069
+ "aria-expanded": $,
1070
+ "aria-controls": $ ? Je : void 0,
1071
1071
  onClick: () => {
1072
1072
  Me((e) => !e), Ue(!1);
1073
1073
  },
1074
- className: X.repliesToggle,
1075
- children: je ? F.hideRepliesLabel : F.formatShowReplies($)
1074
+ className: J.repliesToggle,
1075
+ children: $ ? P.hideRepliesLabel : P.formatShowReplies(Q)
1076
1076
  })
1077
1077
  }),
1078
- Ke > 0 && /* @__PURE__ */ J("div", {
1079
- className: X.threadEntry,
1078
+ Ke > 0 && /* @__PURE__ */ G("div", {
1079
+ className: J.threadEntry,
1080
1080
  "data-entry": "toggle",
1081
1081
  "data-last": Xe === "earlier" || void 0,
1082
- children: /* @__PURE__ */ J(ze, {
1082
+ children: /* @__PURE__ */ G(Be, {
1083
1083
  "aria-controls": Je,
1084
1084
  onClick: () => Ue(!0),
1085
- className: X.repliesToggle,
1086
- children: F.formatShowEarlierReplies(Ke)
1085
+ className: J.repliesToggle,
1086
+ children: P.formatShowEarlierReplies(Ke)
1087
1087
  })
1088
1088
  }),
1089
- qe.length > 0 && /* @__PURE__ */ J("ul", {
1089
+ qe.length > 0 && /* @__PURE__ */ G("ul", {
1090
1090
  id: Je,
1091
1091
  role: "list",
1092
- "aria-label": F.formatRepliesLabel(B),
1093
- className: X.replies,
1094
- children: /* @__PURE__ */ J(ke.Provider, {
1095
- value: I + 1,
1096
- children: qe.map((e, t) => /* @__PURE__ */ J("li", {
1097
- className: X.threadEntry,
1092
+ "aria-label": P.formatRepliesLabel(R),
1093
+ className: J.replies,
1094
+ children: /* @__PURE__ */ G(Ae.Provider, {
1095
+ value: F + 1,
1096
+ children: qe.map((e, t) => /* @__PURE__ */ G("li", {
1097
+ className: J.threadEntry,
1098
1098
  "data-entry": "reply",
1099
1099
  "data-last": Xe === "reply" && t === qe.length - 1 || void 0,
1100
- children: /* @__PURE__ */ J(Ve, {
1100
+ children: /* @__PURE__ */ G(He, {
1101
1101
  comment: e,
1102
1102
  ...yt
1103
1103
  })
1104
1104
  }, e.id ?? `reply-${t}`))
1105
1105
  })
1106
1106
  }),
1107
- Ye && /* @__PURE__ */ J("div", {
1108
- className: X.threadEntry,
1107
+ Ye && /* @__PURE__ */ G("div", {
1108
+ className: J.threadEntry,
1109
1109
  "data-entry": "composer",
1110
1110
  "data-last": !0,
1111
1111
  children: Ye
1112
1112
  })
1113
1113
  ]
1114
1114
  }),
1115
- !!o && /* @__PURE__ */ J(ne, {
1115
+ !!o && /* @__PURE__ */ G(re, {
1116
1116
  ...we.overlayProps,
1117
1117
  destructive: !0,
1118
- title: F.confirmRemoveAttachmentTitle,
1119
- description: F.confirmRemoveAttachmentDescription,
1120
- strings: { confirm: F.attachmentRemoveLabel },
1118
+ title: P.confirmRemoveAttachmentTitle,
1119
+ description: P.confirmRemoveAttachmentDescription,
1120
+ strings: { confirm: P.attachmentRemoveLabel },
1121
1121
  onConfirm: () => {
1122
- Te && t.id && o(t.id, Te);
1122
+ Ee && t.id && o(t.id, Ee);
1123
1123
  }
1124
1124
  })
1125
1125
  ]
@@ -1127,11 +1127,11 @@ function Ve({ comment: t, replies: r, canModerate: i, onDelete: a, onAttachmentR
1127
1127
  }
1128
1128
  //#endregion
1129
1129
  //#region src/components/features/comments/comment-timeline.tsx
1130
- function He({ comments: t, canModerate: n, onDelete: r, onAttachmentRemove: i, onEdit: o, onPinToggle: s, onReact: c, onReply: l, allowReactions: u, allowReplies: d, commentActions: f, maxVisibleReplies: p, clampLines: m, maxVisibleAttachments: h, reactionChoices: g, sanitizer: _, strings: v, getMediaUrl: y, getMediaName: b, getStatusLabel: x, resources: S, renderItem: C, renderAttachment: w, renderReference: ee, emptySlot: T, className: E }) {
1130
+ function Ue({ comments: t, canModerate: n, onDelete: r, onAttachmentRemove: i, onEdit: o, onPinToggle: s, onReact: c, onReply: l, allowReactions: u, allowReplies: d, commentActions: f, maxVisibleReplies: p, clampLines: m, maxVisibleAttachments: h, reactionChoices: g, sanitizer: _, strings: v, getMediaUrl: y, getMediaName: b, getStatusLabel: x, resources: S, renderItem: C, renderAttachment: w, renderReference: ee, emptySlot: T, className: E }) {
1131
1131
  let D = {
1132
- ...ye,
1132
+ ...q,
1133
1133
  ...v
1134
- }, { roots: O, repliesByParent: k } = W(() => {
1134
+ }, { roots: O, repliesByParent: k } = H(() => {
1135
1135
  let e = new Set(t.map((e) => e.id).filter(Boolean)), n = /* @__PURE__ */ new Map(), r = [];
1136
1136
  for (let i of t) if (i.replyToId && e.has(i.replyToId)) {
1137
1137
  let e = n.get(i.replyToId) ?? [];
@@ -1142,20 +1142,20 @@ function He({ comments: t, canModerate: n, onDelete: r, onAttachmentRemove: i, o
1142
1142
  repliesByParent: n
1143
1143
  };
1144
1144
  }, [t]);
1145
- return t.length === 0 ? /* @__PURE__ */ J(q, { children: T ?? /* @__PURE__ */ J(a, {
1145
+ return t.length === 0 ? /* @__PURE__ */ G(be, { children: T ?? /* @__PURE__ */ G(a, {
1146
1146
  padding: "sm",
1147
- media: /* @__PURE__ */ J(I, {}),
1147
+ media: /* @__PURE__ */ G(I, {}),
1148
1148
  mediaVariant: "icon",
1149
1149
  title: D.empty,
1150
1150
  description: D.emptyHint
1151
- }) }) : /* @__PURE__ */ J(Oe.Provider, {
1151
+ }) }) : /* @__PURE__ */ G(ke.Provider, {
1152
1152
  value: k,
1153
- children: /* @__PURE__ */ J("ul", {
1153
+ children: /* @__PURE__ */ G("ul", {
1154
1154
  role: "list",
1155
1155
  "data-slot": "comment-timeline",
1156
- className: e("comment-timeline--component", X.timeline, E),
1156
+ className: e("comment-timeline--component", J.timeline, E),
1157
1157
  children: O.map((e, t) => {
1158
- let a = /* @__PURE__ */ J(Ve, {
1158
+ let a = /* @__PURE__ */ G(He, {
1159
1159
  comment: e,
1160
1160
  replies: d === !1 ? void 0 : k.get(e.id ?? ""),
1161
1161
  canModerate: n,
@@ -1181,8 +1181,8 @@ function He({ comments: t, canModerate: n, onDelete: r, onAttachmentRemove: i, o
1181
1181
  renderAttachment: w,
1182
1182
  renderReference: ee
1183
1183
  });
1184
- return /* @__PURE__ */ J("li", {
1185
- className: X.timelineEntry,
1184
+ return /* @__PURE__ */ G("li", {
1185
+ className: J.timelineEntry,
1186
1186
  children: C ? C({
1187
1187
  comment: e,
1188
1188
  canModerate: n ?? !1,
@@ -1198,20 +1198,20 @@ function He({ comments: t, canModerate: n, onDelete: r, onAttachmentRemove: i, o
1198
1198
  }
1199
1199
  //#endregion
1200
1200
  //#region src/components/features/comments/use-comments.ts
1201
- function Ue(e = {}) {
1202
- let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a, scopeKey: o } = e, [s, c] = K({ kind: "idle" }), [l, u] = K(!1), [d, f] = K({}), [p, m] = K(0), h = G(!1), g = G(o), _ = G(0), v = G(0), y = H((e) => {
1201
+ function We(e = {}) {
1202
+ let { onSubmit: t, onUpdate: n, onDelete: r, onAfterMutate: i, onError: a, scopeKey: o } = e, [s, c] = W({ kind: "idle" }), [l, u] = W(!1), [d, f] = W({}), [p, m] = W(0), h = U(!1), g = U(o), _ = U(0), v = U(0), y = B((e) => {
1203
1203
  h.current = e, u(e);
1204
- }, []), b = H(() => {
1204
+ }, []), b = B(() => {
1205
1205
  m((e) => e + 1), c({ kind: "idle" }), f({});
1206
- }, []), x = W(() => ({
1206
+ }, []), x = H(() => ({
1207
1207
  setErrors: f,
1208
1208
  reset: b,
1209
1209
  setSubmitting: y
1210
1210
  }), [b, y]);
1211
- U(() => {
1211
+ V(() => {
1212
1212
  g.current !== o && (g.current = o, _.current += 1, v.current += 1, h.current = !1, u(!1), b());
1213
1213
  }, [b, o]);
1214
- let S = H((e) => {
1214
+ let S = B((e) => {
1215
1215
  try {
1216
1216
  a?.(e);
1217
1217
  } catch {}
@@ -1221,21 +1221,21 @@ function Ue(e = {}) {
1221
1221
  isSubmitting: l,
1222
1222
  formErrors: d,
1223
1223
  resetKey: p,
1224
- startReply: H((e) => {
1224
+ startReply: B((e) => {
1225
1225
  e.id && (f({}), c({
1226
1226
  kind: "replying",
1227
1227
  commentId: e.id,
1228
1228
  authorName: e.user?.name
1229
1229
  }));
1230
1230
  }, []),
1231
- startEdit: H((e) => {
1231
+ startEdit: B((e) => {
1232
1232
  e.id && (f({}), c({
1233
1233
  kind: "editing",
1234
1234
  comment: e
1235
1235
  }));
1236
1236
  }, []),
1237
- cancelComposerMode: H(() => b(), [b]),
1238
- submit: H(async (e) => {
1237
+ cancelComposerMode: B(() => b(), [b]),
1238
+ submit: B(async (e) => {
1239
1239
  if (h.current) return;
1240
1240
  let r = _.current, a = v.current + 1;
1241
1241
  v.current = a;
@@ -1275,7 +1275,7 @@ function Ue(e = {}) {
1275
1275
  b,
1276
1276
  y
1277
1277
  ]),
1278
- deleteComment: H(async (e) => {
1278
+ deleteComment: B(async (e) => {
1279
1279
  if (!(!r || !e)) try {
1280
1280
  await r(e), i?.("delete", { commentId: e });
1281
1281
  } catch (e) {
@@ -1292,52 +1292,52 @@ function Ue(e = {}) {
1292
1292
  }
1293
1293
  //#endregion
1294
1294
  //#region src/components/features/comments/comments.tsx
1295
- function We(t) {
1296
- let { context: r, comments: i, canComment: a = !0, canModerate: o = !1, composerPosition: s = "top", maxAttachments: c, allowAttachments: l = !0, allowReactions: u = !0, allowReplies: d = !0, bare: f = !1, confirmDelete: p = !0, className: h, strings: g } = t, _ = {
1297
- ...ye,
1295
+ function Ge(t) {
1296
+ let { context: n, comments: r, canComment: i = !0, canModerate: a = !1, composerPosition: o = "top", maxAttachments: s, allowAttachments: c = !0, allowReactions: l = !0, allowReplies: u = !0, bare: d = !1, confirmDelete: f = !0, className: p, strings: g } = t, _ = {
1297
+ ...q,
1298
1298
  ...g
1299
- }, v = t.title ?? _.title, y = `${r.type}\u0000${r.id}\u0000${r.moduleKey ?? ""}`, b = G(y), x = {
1299
+ }, v = t.title ?? _.title, y = `${n.type}\u0000${n.id}\u0000${n.moduleKey ?? ""}`, b = U(y), x = {
1300
1300
  onSubmit: t.onSubmit,
1301
1301
  onUpdate: t.onUpdate,
1302
1302
  onDelete: t.onDelete,
1303
1303
  onAfterMutate: t.onAfterMutate,
1304
1304
  onError: t.onError,
1305
1305
  scopeKey: y
1306
- }, S = Ue(x), C = Ue(x), w = te(), [ee, T] = K(null);
1307
- U(() => {
1306
+ }, S = We(x), C = We(x), w = ne(), [ee, T] = W(null);
1307
+ V(() => {
1308
1308
  b.current !== y && (b.current = y, T(null), w.hide());
1309
1309
  }, [y, w]);
1310
- let E = H((e) => {
1311
- if (!p) {
1310
+ let E = B((e) => {
1311
+ if (!f) {
1312
1312
  S.deleteComment(e);
1313
1313
  return;
1314
1314
  }
1315
1315
  T(e), w.show();
1316
1316
  }, [
1317
- p,
1317
+ f,
1318
1318
  w,
1319
1319
  S
1320
- ]), { startReply: D, cancelComposerMode: O } = C, { onReply: k } = t, A = H((e) => {
1321
- let t = i.find((t) => t.id === e);
1320
+ ]), { startReply: D, cancelComposerMode: O } = C, { onReply: k } = t, te = B((e) => {
1321
+ let t = r.find((t) => t.id === e);
1322
1322
  t && D(t), k?.(e);
1323
1323
  }, [
1324
- i,
1324
+ r,
1325
1325
  k,
1326
1326
  D
1327
- ]), j = C.composerMode, M = j.kind === "editing" ? j.comment : void 0, re = j.kind === "replying" ? {
1328
- commentId: j.commentId,
1329
- authorName: j.authorName
1330
- } : void 0, N = M?.id ?? re?.commentId;
1331
- U(() => {
1332
- N && !i.some((e) => e.id === N) && O();
1327
+ ]), A = C.composerMode, j = A.kind === "editing" ? A.comment : void 0, ie = A.kind === "replying" ? {
1328
+ commentId: A.commentId,
1329
+ authorName: A.authorName
1330
+ } : void 0, M = j?.id ?? ie?.commentId;
1331
+ V(() => {
1332
+ M && !r.some((e) => e.id === M) && O();
1333
1333
  }, [
1334
1334
  O,
1335
- i,
1336
- N
1335
+ r,
1336
+ M
1337
1337
  ]);
1338
- let ie = t.composerSlot ?? (a ? /* @__PURE__ */ J(Z, {
1339
- context: r,
1340
- canComment: a,
1338
+ let ae = t.composerSlot ?? (i ? /* @__PURE__ */ G(Z, {
1339
+ context: n,
1340
+ canComment: i,
1341
1341
  submitting: S.isSubmitting,
1342
1342
  errors: S.formErrors,
1343
1343
  resetKey: S.resetKey,
@@ -1346,41 +1346,41 @@ function We(t) {
1346
1346
  resources: t.resources,
1347
1347
  onResourceSearch: t.onResourceSearch,
1348
1348
  attachments: t.attachments,
1349
- maxAttachments: c,
1350
- allowAttachments: l
1351
- }) : null), ae = {
1352
- composer: a && N ? /* @__PURE__ */ J(Z, {
1353
- context: r,
1354
- canComment: a,
1349
+ maxAttachments: s,
1350
+ allowAttachments: c
1351
+ }) : null), oe = {
1352
+ composer: i && M ? /* @__PURE__ */ G(Z, {
1353
+ context: n,
1354
+ canComment: i,
1355
1355
  submitting: C.isSubmitting,
1356
1356
  errors: C.formErrors,
1357
1357
  resetKey: C.resetKey,
1358
- editingComment: M,
1359
- replyingTo: re,
1358
+ editingComment: j,
1359
+ replyingTo: ie,
1360
1360
  onCancel: C.cancelComposerMode,
1361
1361
  onSubmit: C.submit,
1362
- placeholder: M ? _.editPlaceholder : _.replyPlaceholder,
1362
+ placeholder: j ? _.editPlaceholder : _.replyPlaceholder,
1363
1363
  strings: g,
1364
1364
  resources: t.resources,
1365
1365
  onResourceSearch: t.onResourceSearch,
1366
1366
  attachments: t.attachments,
1367
- maxAttachments: c,
1368
- allowAttachments: l,
1369
- className: X.inlineComposer
1370
- }, `${j.kind}:${N}`) : void 0,
1371
- editingId: M?.id,
1372
- replyingToId: re?.commentId
1373
- }, oe = /* @__PURE__ */ J(He, {
1374
- comments: i,
1375
- canModerate: o,
1367
+ maxAttachments: s,
1368
+ allowAttachments: c,
1369
+ className: J.inlineComposer
1370
+ }, `${A.kind}:${M}`) : void 0,
1371
+ editingId: j?.id,
1372
+ replyingToId: ie?.commentId
1373
+ }, se = /* @__PURE__ */ G(Ue, {
1374
+ comments: r,
1375
+ canModerate: a,
1376
1376
  onDelete: t.onDelete ? E : void 0,
1377
1377
  onAttachmentRemove: t.onAttachmentRemove,
1378
- onEdit: a && t.onUpdate ? C.startEdit : void 0,
1378
+ onEdit: i && t.onUpdate ? C.startEdit : void 0,
1379
1379
  onPinToggle: t.onPinToggle,
1380
1380
  onReact: t.onReact,
1381
- onReply: a && d ? A : void 0,
1382
- allowReactions: u,
1383
- allowReplies: d,
1381
+ onReply: i && u ? te : void 0,
1382
+ allowReactions: l,
1383
+ allowReplies: u,
1384
1384
  commentActions: t.commentActions,
1385
1385
  maxVisibleReplies: t.maxVisibleReplies,
1386
1386
  clampLines: t.clampLines,
@@ -1396,20 +1396,20 @@ function We(t) {
1396
1396
  renderAttachment: t.renderAttachment,
1397
1397
  renderReference: t.renderReference,
1398
1398
  emptySlot: t.emptySlot
1399
- }), P = /* @__PURE__ */ Y(m, {
1399
+ }), N = /* @__PURE__ */ K(h, {
1400
1400
  gap: "xl",
1401
- className: X.body,
1401
+ className: J.body,
1402
1402
  children: [
1403
1403
  t.headerSlot,
1404
- s === "top" && ie,
1405
- /* @__PURE__ */ J(Ae.Provider, {
1406
- value: ae,
1407
- children: oe
1404
+ o === "top" && ae,
1405
+ /* @__PURE__ */ G(je.Provider, {
1406
+ value: oe,
1407
+ children: se
1408
1408
  }),
1409
- s === "bottom" && ie,
1409
+ o === "bottom" && ae,
1410
1410
  t.footerSlot
1411
1411
  ]
1412
- }), F = !!(p && t.onDelete) && /* @__PURE__ */ J(ne, {
1412
+ }), P = !!(f && t.onDelete) && /* @__PURE__ */ G(re, {
1413
1413
  ...w.overlayProps,
1414
1414
  destructive: !0,
1415
1415
  title: _.confirmDeleteTitle,
@@ -1420,26 +1420,20 @@ function We(t) {
1420
1420
  },
1421
1421
  onError: t.onError
1422
1422
  });
1423
- return f ? /* @__PURE__ */ Y(q, { children: [P, F] }) : /* @__PURE__ */ Y("section", {
1423
+ return d ? /* @__PURE__ */ K(be, { children: [N, P] }) : /* @__PURE__ */ K("section", {
1424
1424
  "data-slot": "comments",
1425
1425
  "aria-label": typeof v == "string" ? v : void 0,
1426
- className: e("comments--component", X.root, h),
1426
+ className: e("comments--component", J.root, p),
1427
1427
  children: [
1428
- v !== !1 && !!(v || _.subtitle) && /* @__PURE__ */ Y(m, {
1429
- gap: "xs",
1430
- className: X.header,
1431
- children: [!!v && /* @__PURE__ */ J(n, {
1432
- weight: "semibold",
1433
- children: v
1434
- }), !!_.subtitle && /* @__PURE__ */ J(n, {
1435
- type: "secondary",
1436
- children: _.subtitle
1437
- })]
1428
+ v !== !1 && !!(v || _.subtitle) && /* @__PURE__ */ G(m, {
1429
+ title: v || void 0,
1430
+ description: _.subtitle || void 0,
1431
+ className: J.header
1438
1432
  }),
1439
- P,
1440
- F
1433
+ N,
1434
+ P
1441
1435
  ]
1442
1436
  });
1443
1437
  }
1444
1438
  //#endregion
1445
- export { Ne as a, Ce as c, Ve as i, ye as l, Ue as n, Z as o, He as r, Te as s, We as t };
1439
+ export { Pe as a, Te as c, He as i, q as l, We as n, Z as o, Ue as r, De as s, Ge as t };