themelia-react-ui 2.0.5 → 2.0.6

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 (489) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/MIGRATION.md +119 -0
  3. package/README.md +13 -6
  4. package/dist/{accordion-B9MHG0cT.js → accordion-0tQUZ20r.js} +7 -7
  5. package/dist/accordion-0tQUZ20r.js.map +1 -0
  6. package/dist/{action-menu-Dr8K-ghE.js → action-menu-C0gjzLyE.js} +7 -7
  7. package/dist/{action-menu-Dr8K-ghE.js.map → action-menu-C0gjzLyE.js.map} +1 -1
  8. package/dist/{ai-artifact-C58tQcBy.js → ai-artifact-CGGpQryR.js} +172 -157
  9. package/dist/ai-artifact-CGGpQryR.js.map +1 -0
  10. package/dist/{app-shell-B_IuNWOo.js → app-shell-EHuuRDGy.js} +5 -5
  11. package/dist/{app-shell-B_IuNWOo.js.map → app-shell-EHuuRDGy.js.map} +1 -1
  12. package/dist/{attachment-Dg_69lPS.js → attachment-BCpA4e7i.js} +8 -8
  13. package/dist/{attachment-Dg_69lPS.js.map → attachment-BCpA4e7i.js.map} +1 -1
  14. package/dist/{auth-DTkkshS8.js → auth-B0girIk_.js} +15 -15
  15. package/dist/auth-B0girIk_.js.map +1 -0
  16. package/dist/{avatar-CeZaFmNH.js → avatar-B9Jnp-T-.js} +3 -3
  17. package/dist/{avatar-CeZaFmNH.js.map → avatar-B9Jnp-T-.js.map} +1 -1
  18. package/dist/{badge-xIiV_E7f.js → badge-wWauMgAt.js} +3 -3
  19. package/dist/{badge-xIiV_E7f.js.map → badge-wWauMgAt.js.map} +1 -1
  20. package/dist/base/accordion.js +1 -1
  21. package/dist/base/action-menu.js +1 -1
  22. package/dist/base/attachment.js +1 -1
  23. package/dist/base/avatar.js +1 -1
  24. package/dist/base/badge.js +1 -1
  25. package/dist/base/batch-action-bar.js +1 -1
  26. package/dist/base/buttons.js +1 -1
  27. package/dist/base/cards.js +2 -2
  28. package/dist/base/carousel.js +3 -3
  29. package/dist/base/cascader.js +1 -1
  30. package/dist/base/chart.js +1 -1
  31. package/dist/base/choice-inputs.js +2 -2
  32. package/dist/base/code-block.js +1 -1
  33. package/dist/base/combobox.js +1 -1
  34. package/dist/base/command.js +1 -1
  35. package/dist/base/copyable.js +1 -1
  36. package/dist/base/date-pickers.js +2 -2
  37. package/dist/base/display.js +6 -6
  38. package/dist/base/feedback.js +4 -4
  39. package/dist/base/forms-numeric.js +1 -1
  40. package/dist/base/forms.js +2 -2
  41. package/dist/base/inline-edit.js +8 -8
  42. package/dist/base/item.js +1 -1
  43. package/dist/base/media-gallery.js +1 -1
  44. package/dist/base/metadata-list.js +1 -1
  45. package/dist/base/navigation.js +6 -6
  46. package/dist/base/popover-menu.js +1 -1
  47. package/dist/base/popover.js +1 -1
  48. package/dist/base/qr-code.js +1 -1
  49. package/dist/base/repeaters.js +195 -188
  50. package/dist/base/repeaters.js.map +1 -1
  51. package/dist/base/sheet.js +1 -1
  52. package/dist/base/sidebar.js +2 -2
  53. package/dist/base/signature-pad.js +7 -7
  54. package/dist/base/skeleton.js +1 -1
  55. package/dist/base/spinner.js +5 -5
  56. package/dist/base/spinner.js.map +1 -1
  57. package/dist/base/structure.js +1 -1
  58. package/dist/base/table.js +1 -1
  59. package/dist/base/text-inputs.js +2 -2
  60. package/dist/base/toaster.js +1 -1
  61. package/dist/base/tree.js +1 -1
  62. package/dist/base/upload-queue.js +1 -1
  63. package/dist/base/upload.js +3 -3
  64. package/dist/base/value-inputs.js +1 -1
  65. package/dist/{batch-action-bar-Cb8cuvyy.js → batch-action-bar-BoqWIIpV.js} +5 -5
  66. package/dist/{batch-action-bar-Cb8cuvyy.js.map → batch-action-bar-BoqWIIpV.js.map} +1 -1
  67. package/dist/blocks/admin.js +17 -17
  68. package/dist/blocks/ai.js +227 -221
  69. package/dist/blocks/ai.js.map +1 -1
  70. package/dist/blocks/analytics/usage-card.js +1 -1
  71. package/dist/blocks/analytics.js +424 -449
  72. package/dist/blocks/analytics.js.map +1 -1
  73. package/dist/blocks/collaboration.js +1 -1
  74. package/dist/blocks/commerce/receipt.js +1 -1
  75. package/dist/blocks/commerce.js +225 -220
  76. package/dist/blocks/commerce.js.map +1 -1
  77. package/dist/blocks/data-display.js +2 -2
  78. package/dist/blocks/onboarding.js +5 -5
  79. package/dist/blocks/planning.js +11 -11
  80. package/dist/blocks/timelines.js +1 -1
  81. package/dist/{breadcrumbs-J-K2kl4c.js → breadcrumbs-Bp9Ke7kd.js} +4 -4
  82. package/dist/breadcrumbs-Bp9Ke7kd.js.map +1 -0
  83. package/dist/{button-S2Cubiiz.js → button-ChBovTx0.js} +2 -2
  84. package/dist/{button-S2Cubiiz.js.map → button-ChBovTx0.js.map} +1 -1
  85. package/dist/{buttons-BedGfygC.js → buttons-DeW0bQeK.js} +6 -6
  86. package/dist/{buttons-BedGfygC.js.map → buttons-DeW0bQeK.js.map} +1 -1
  87. package/dist/{cards-rNX1M4Xn.js → cards-CNXnmvV5.js} +8 -8
  88. package/dist/{cards-rNX1M4Xn.js.map → cards-CNXnmvV5.js.map} +1 -1
  89. package/dist/{cascader-B1MiqkBq.js → cascader-CrAl9zD5.js} +15 -15
  90. package/dist/{cascader-B1MiqkBq.js.map → cascader-CrAl9zD5.js.map} +1 -1
  91. package/dist/{chart-Darg_0Kv.js → chart-I7ROnsl8.js} +5 -5
  92. package/dist/{chart-Darg_0Kv.js.map → chart-I7ROnsl8.js.map} +1 -1
  93. package/dist/{checkbox-fflqmODR.js → checkbox-MoyHIAPs.js} +3 -3
  94. package/dist/{checkbox-fflqmODR.js.map → checkbox-MoyHIAPs.js.map} +1 -1
  95. package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-DHGtx0QV.js} +122 -110
  96. package/dist/choice-inputs-DHGtx0QV.js.map +1 -0
  97. package/dist/{code-block-BzmM9Eig.js → code-block-BSJyq9e-.js} +7 -7
  98. package/dist/{code-block-BzmM9Eig.js.map → code-block-BSJyq9e-.js.map} +1 -1
  99. package/dist/{collapsible-BkAI_XD4.js → collapsible-BzJ91LUG.js} +3 -3
  100. package/dist/{collapsible-BkAI_XD4.js.map → collapsible-BzJ91LUG.js.map} +1 -1
  101. package/dist/{collection-content-gDh1v6O4.js → collection-content-CSnwtOTH.js} +3 -3
  102. package/dist/{collection-content-gDh1v6O4.js.map → collection-content-CSnwtOTH.js.map} +1 -1
  103. package/dist/{combobox-BEx0vJgF.js → combobox-Bcvu5J8O.js} +11 -10
  104. package/dist/{combobox-BEx0vJgF.js.map → combobox-Bcvu5J8O.js.map} +1 -1
  105. package/dist/combobox-C2JiSQPc.js +915 -0
  106. package/dist/combobox-C2JiSQPc.js.map +1 -0
  107. package/dist/{command-CrlPIL6m.js → command-9e52NPgK.js} +6 -6
  108. package/dist/{command-CrlPIL6m.js.map → command-9e52NPgK.js.map} +1 -1
  109. package/dist/{comments-Dmpp0YIc.js → comments-BsgErEqd.js} +33 -28
  110. package/dist/comments-BsgErEqd.js.map +1 -0
  111. package/dist/components/base/choice-inputs/choice-types.d.ts +4 -0
  112. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
  113. package/dist/components/base/combobox/combobox-field.d.ts +2 -2
  114. package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
  115. package/dist/components/base/date-pickers/datepicker.types.d.ts +10 -4
  116. package/dist/components/base/date-pickers/time-picker.d.ts +17 -3
  117. package/dist/components/base/feedback/state-display.d.ts +5 -1
  118. package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
  119. package/dist/components/base/forms/form-field.d.ts +7 -2
  120. package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
  121. package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
  122. package/dist/components/base/forms-numeric/dimensions-input.d.ts +4 -1
  123. package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
  124. package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
  125. package/dist/components/base/navigation/language-switcher.d.ts +12 -4
  126. package/dist/components/base/repeaters/key-value-editor.d.ts +2 -1
  127. package/dist/components/base/sidebar/sidebar.d.ts +2 -0
  128. package/dist/components/base/upload/avatar-upload.d.ts +2 -1
  129. package/dist/components/base/upload/image-upload.d.ts +2 -1
  130. package/dist/components/blocks/ai/ai-citation/types.d.ts +2 -0
  131. package/dist/components/blocks/ai/ai-reasoning/types.d.ts +2 -0
  132. package/dist/components/blocks/ai/ai-sources/types.d.ts +2 -0
  133. package/dist/components/blocks/ai/ai-tool-call/types.d.ts +2 -0
  134. package/dist/components/blocks/analytics/metric/metric.d.ts +4 -0
  135. package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
  136. package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
  137. package/dist/components/blocks/analytics/types.d.ts +2 -2
  138. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  139. package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +4 -3
  140. package/dist/components/features/activities/activities.types.d.ts +18 -11
  141. package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
  142. package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +1 -1
  143. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
  144. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +4 -2
  145. package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
  146. package/dist/components/features/combobox/combobox.d.ts +2 -2
  147. package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -1
  148. package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
  149. package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
  150. package/dist/components/features/combobox/types.d.ts +37 -8
  151. package/dist/components/features/email-composer/types.d.ts +3 -1
  152. package/dist/components/features/filters/facets/date-facet.d.ts +4 -2
  153. package/dist/components/features/filters/facets/range-facet.d.ts +12 -0
  154. package/dist/components/features/filters/filters.types.d.ts +3 -3
  155. package/dist/components/features/filters/partials/date-filter-content.d.ts +3 -2
  156. package/dist/components/features/filters/partials/filter-popover-content.d.ts +4 -2
  157. package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
  158. package/dist/components/features/filters/utils/filter-utils.d.ts +5 -1
  159. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  160. package/dist/components/features/media-library/media-library.d.ts +1 -1
  161. package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
  162. package/dist/components/features/media-library/media-library.types.d.ts +36 -8
  163. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  164. package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
  165. package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +5 -1
  166. package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +1 -7
  167. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +2 -2
  168. package/dist/components/features/products/products.types.d.ts +2 -2
  169. package/dist/components/features/questionnaire/questionnaire.types.d.ts +3 -0
  170. package/dist/components/features/resource/resource.d.ts +1 -1
  171. package/dist/components/features/resource/resource.types.d.ts +2 -0
  172. package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +1 -1
  173. package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +1 -1
  174. package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
  175. package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +3 -1
  176. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
  177. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +17 -3
  178. package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -1
  179. package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
  180. package/dist/components/features/schema-form/schema-form.utils.d.ts +1 -1
  181. package/dist/components/features/suggestions/suggestions.types.d.ts +1 -1
  182. package/dist/components/features/table/data-table.d.ts +1 -1
  183. package/dist/components/features/table/index.d.ts +1 -0
  184. package/dist/components/features/table/table-body.d.ts +1 -1
  185. package/dist/components/features/table/table-helpers.d.ts +6 -3
  186. package/dist/components/features/table/table.strings.d.ts +3 -0
  187. package/dist/components/features/table/table.types.d.ts +17 -1
  188. package/dist/components/layout/header/header.types.d.ts +3 -2
  189. package/dist/components/layout/layout.types.d.ts +5 -3
  190. package/dist/components/layout/navigation/side-nav.d.ts +3 -2
  191. package/dist/components/layout/normalize-layout-path.d.ts +1 -0
  192. package/dist/components/layout/settings/settings.d.ts +1 -1
  193. package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
  194. package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +3 -1
  195. package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
  196. package/dist/components/layout/sidebar/sidebar.types.d.ts +2 -0
  197. package/dist/components/primitives/link.d.ts +3 -2
  198. package/dist/components/primitives/money.d.ts +1 -1
  199. package/dist/components/primitives/number.d.ts +1 -1
  200. package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
  201. package/dist/{containers-CIxwbZt5.js → containers-CSdc32h9.js} +2 -2
  202. package/dist/{containers-CIxwbZt5.js.map → containers-CSdc32h9.js.map} +1 -1
  203. package/dist/{copyable-DIznBqiT.js → copyable-3fdHfMR3.js} +4 -4
  204. package/dist/{copyable-DIznBqiT.js.map → copyable-3fdHfMR3.js.map} +1 -1
  205. package/dist/{data-display-BdgCAw8T.js → data-display-Cmj-xZYl.js} +16 -15
  206. package/dist/data-display-Cmj-xZYl.js.map +1 -0
  207. package/dist/{date-Cq8ioE4o.js → date-Br0FicVv.js} +4 -4
  208. package/dist/{date-Cq8ioE4o.js.map → date-Br0FicVv.js.map} +1 -1
  209. package/dist/date-picker-CyQlFYsP.js +1617 -0
  210. package/dist/date-picker-CyQlFYsP.js.map +1 -0
  211. package/dist/date-pickers-tj2MXmXd.js +185 -0
  212. package/dist/date-pickers-tj2MXmXd.js.map +1 -0
  213. package/dist/{display-KsZLw9Ov.js → display-CT_N2a3w.js} +7 -7
  214. package/dist/{display-KsZLw9Ov.js.map → display-CT_N2a3w.js.map} +1 -1
  215. package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-C08iIugv.js} +6 -6
  216. package/dist/{dropdown-menu-CLs8Lihj.js.map → dropdown-menu-C08iIugv.js.map} +1 -1
  217. package/dist/features/activities.js +283 -270
  218. package/dist/features/activities.js.map +1 -1
  219. package/dist/features/ai-chat.js +40 -27
  220. package/dist/features/ai-chat.js.map +1 -1
  221. package/dist/features/appointment-calendar.js +126 -126
  222. package/dist/features/appointment-calendar.js.map +1 -1
  223. package/dist/features/async-preview.js +9 -9
  224. package/dist/features/combobox.js +1 -1
  225. package/dist/features/comments.js +1 -1
  226. package/dist/features/data-view.js +10 -10
  227. package/dist/features/email-composer.js +24 -19
  228. package/dist/features/email-composer.js.map +1 -1
  229. package/dist/features/event-calendar.js +129 -125
  230. package/dist/features/event-calendar.js.map +1 -1
  231. package/dist/features/filters.js +2 -2
  232. package/dist/features/global-search.js +16 -20
  233. package/dist/features/global-search.js.map +1 -1
  234. package/dist/features/kanban.js +18 -28
  235. package/dist/features/kanban.js.map +1 -1
  236. package/dist/features/map/style.css +15 -0
  237. package/dist/features/map.js +331 -314
  238. package/dist/features/map.js.map +1 -1
  239. package/dist/features/media-library.js +1044 -866
  240. package/dist/features/media-library.js.map +1 -1
  241. package/dist/features/mentions.js +2 -2
  242. package/dist/features/overlays.js +1 -1
  243. package/dist/features/products.js +978 -964
  244. package/dist/features/products.js.map +1 -1
  245. package/dist/features/questionnaire.js +159 -152
  246. package/dist/features/questionnaire.js.map +1 -1
  247. package/dist/features/resource-assignment.js +8 -8
  248. package/dist/features/resource.js +74 -71
  249. package/dist/features/resource.js.map +1 -1
  250. package/dist/features/rich-text-editor.js +28 -19
  251. package/dist/features/rich-text-editor.js.map +1 -1
  252. package/dist/features/schema-form.js +297 -256
  253. package/dist/features/schema-form.js.map +1 -1
  254. package/dist/features/suggestions.js +57 -50
  255. package/dist/features/suggestions.js.map +1 -1
  256. package/dist/features/sync.js +3 -3
  257. package/dist/features/table.js +1 -1
  258. package/dist/features/theme-tweaker.js +400 -399
  259. package/dist/features/theme-tweaker.js.map +1 -1
  260. package/dist/feedback-Dzo1xtAU.js +246 -0
  261. package/dist/feedback-Dzo1xtAU.js.map +1 -0
  262. package/dist/{field-affordance-recipes-DWcNcOjh.js → field-affordance-recipes-D6H7tVJi.js} +2 -2
  263. package/dist/{field-affordance-recipes-DWcNcOjh.js.map → field-affordance-recipes-D6H7tVJi.js.map} +1 -1
  264. package/dist/field-control-attributes-B6i335wr.js +18 -0
  265. package/dist/field-control-attributes-B6i335wr.js.map +1 -0
  266. package/dist/{field-state-recipes-BVA2CWHo.js → field-state-recipes-7sza8QbC.js} +4 -2
  267. package/dist/{field-state-recipes-BVA2CWHo.js.map → field-state-recipes-7sza8QbC.js.map} +1 -1
  268. package/dist/{filters-DzgSJpMK.js → filters-Dl80yYtN.js} +763 -605
  269. package/dist/filters-Dl80yYtN.js.map +1 -0
  270. package/dist/form-field-CAPdwdnZ.js +74 -0
  271. package/dist/form-field-CAPdwdnZ.js.map +1 -0
  272. package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-CgcrUbLU.js} +2 -2
  273. package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-CgcrUbLU.js.map} +1 -1
  274. package/dist/{forms-C0RGnJTe.js → forms-B3W8CH7-.js} +8 -8
  275. package/dist/{forms-C0RGnJTe.js.map → forms-B3W8CH7-.js.map} +1 -1
  276. package/dist/forms-numeric-CwjQJe-O.js +991 -0
  277. package/dist/forms-numeric-CwjQJe-O.js.map +1 -0
  278. package/dist/{header-DMMxG__r.js → header-ZIIsRKxP.js} +113 -113
  279. package/dist/header-ZIIsRKxP.js.map +1 -0
  280. package/dist/hooks/use-files.d.ts +2 -0
  281. package/dist/{hooks-DB6CJ4MR.js → hooks-BitHSh-Y.js} +3 -3
  282. package/dist/{hooks-DB6CJ4MR.js.map → hooks-BitHSh-Y.js.map} +1 -1
  283. package/dist/{icon-badge-DZF-YjQp.js → icon-badge-npxF1SLX.js} +2 -2
  284. package/dist/{icon-badge-DZF-YjQp.js.map → icon-badge-npxF1SLX.js.map} +1 -1
  285. package/dist/index.js +1 -1
  286. package/dist/{input-CvyDQlY7.js → input-7KAc7XQL.js} +6 -6
  287. package/dist/{input-CvyDQlY7.js.map → input-7KAc7XQL.js.map} +1 -1
  288. package/dist/{input-DMBwAZmr.js → input-DIREVYHs.js} +3 -3
  289. package/dist/{input-DMBwAZmr.js.map → input-DIREVYHs.js.map} +1 -1
  290. package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-4wZ2tvfb.js} +2 -2
  291. package/dist/{interaction-recipes-XR9ZpVYL.js.map → interaction-recipes-4wZ2tvfb.js.map} +1 -1
  292. package/dist/{item-DjCcM18E.js → item-FfWnaYST.js} +99 -98
  293. package/dist/item-FfWnaYST.js.map +1 -0
  294. package/dist/layout/app-shell.js +1 -1
  295. package/dist/layout/auth.js +1 -1
  296. package/dist/layout/containers.js +1 -1
  297. package/dist/layout/header.js +1 -1
  298. package/dist/layout/hooks.js +1 -1
  299. package/dist/layout/navigation.js +1 -1
  300. package/dist/layout/page.js +1 -1
  301. package/dist/layout/settings.js +1 -1
  302. package/dist/layout/sidebar.js +2 -2
  303. package/dist/layout/workspace.js +1 -1
  304. package/dist/layout.js +11 -11
  305. package/dist/layout.types-E_GAApzO.js +30 -0
  306. package/dist/layout.types-E_GAApzO.js.map +1 -0
  307. package/dist/lib/field-control-attributes.d.ts +11 -0
  308. package/dist/lib/field-state-recipes.d.ts +2 -0
  309. package/dist/lib/format.d.ts +1 -0
  310. package/dist/lib/surface-recipes.d.ts +1 -1
  311. package/dist/lib/token-merge.generated.d.ts +6 -6
  312. package/dist/lib/utils.js +1 -1
  313. package/dist/{media-gallery-C-vChPmE.js → media-gallery-C81DAnKI.js} +6 -6
  314. package/dist/{media-gallery-C-vChPmE.js.map → media-gallery-C81DAnKI.js.map} +1 -1
  315. package/dist/{mentions-0_4nWuI-.js → mentions-qOnedSt4.js} +236 -167
  316. package/dist/mentions-qOnedSt4.js.map +1 -0
  317. package/dist/message-BJHnn43M.js +135 -0
  318. package/dist/message-BJHnn43M.js.map +1 -0
  319. package/dist/{metadata-list-C3MkU-Om.js → metadata-list-XkqZ_UXH.js} +11 -11
  320. package/dist/{metadata-list-C3MkU-Om.js.map → metadata-list-XkqZ_UXH.js.map} +1 -1
  321. package/dist/{navigation-DaRjthVk.js → navigation-BgtPJAhi.js} +119 -119
  322. package/dist/navigation-BgtPJAhi.js.map +1 -0
  323. package/dist/{navigation-C90-oQFq.js → navigation-Bt-v7rWP.js} +52 -46
  324. package/dist/navigation-Bt-v7rWP.js.map +1 -0
  325. package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
  326. package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
  327. package/dist/{number-CRU3kGuk.js → number-CYqBcrSj.js} +78 -86
  328. package/dist/number-CYqBcrSj.js.map +1 -0
  329. package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-BQCA2Zn2.js} +7 -7
  330. package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-BQCA2Zn2.js.map} +1 -1
  331. package/dist/{overlays-BSgCtM2v.js → overlays-CC8zI3Du.js} +264 -260
  332. package/dist/overlays-CC8zI3Du.js.map +1 -0
  333. package/dist/{page-DUUKDAjo.js → page-BoQ1VaFJ.js} +13 -13
  334. package/dist/{page-DUUKDAjo.js.map → page-BoQ1VaFJ.js.map} +1 -1
  335. package/dist/{page-header-commands-7P3sfE9u.js → page-header-commands-DIKspJfx.js} +4 -4
  336. package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-DIKspJfx.js.map} +1 -1
  337. package/dist/{pagination-CgCjElfu.js → pagination-Br8TdV9A.js} +4 -4
  338. package/dist/{pagination-CgCjElfu.js.map → pagination-Br8TdV9A.js.map} +1 -1
  339. package/dist/{popover-B85RenIl.js → popover-k8TdUcAt.js} +10 -10
  340. package/dist/popover-k8TdUcAt.js.map +1 -0
  341. package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-yn-o0kyA.js} +7 -7
  342. package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-yn-o0kyA.js.map} +1 -1
  343. package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-DJ0AkUan.js} +2 -2
  344. package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-DJ0AkUan.js.map} +1 -1
  345. package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-DyUXqUtD.js} +2 -2
  346. package/dist/{portal-recipes-BpsV_iRw.js.map → portal-recipes-DyUXqUtD.js.map} +1 -1
  347. package/dist/{primitives-ByWgGUgt.js → primitives-BkkQjYl7.js} +22 -17
  348. package/dist/primitives-BkkQjYl7.js.map +1 -0
  349. package/dist/primitives.js +4 -4
  350. package/dist/{progress-BJhQP9WX.js → progress-DZFXXzPs.js} +4 -4
  351. package/dist/{progress-BJhQP9WX.js.map → progress-DZFXXzPs.js.map} +1 -1
  352. package/dist/{receipt-tOc7B3hw.js → receipt-C7LhOg7Q.js} +6 -6
  353. package/dist/{receipt-tOc7B3hw.js.map → receipt-C7LhOg7Q.js.map} +1 -1
  354. package/dist/rich-text-BnTzZjIo.js +45 -0
  355. package/dist/rich-text-BnTzZjIo.js.map +1 -0
  356. package/dist/rich-text-editor-CAurDwT5.js +1273 -0
  357. package/dist/rich-text-editor-CAurDwT5.js.map +1 -0
  358. package/dist/{rich-text-editor-toolbar-laT3tpBT.js → rich-text-editor-toolbar-DbXig7Jk.js} +36 -35
  359. package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +1 -0
  360. package/dist/rich-text-tree-BqyQ_7-R.js +66 -0
  361. package/dist/rich-text-tree-BqyQ_7-R.js.map +1 -0
  362. package/dist/{sanitize-html-DsQmI48u.js → sanitize-html-BWkH4dLM.js} +29 -16
  363. package/dist/sanitize-html-BWkH4dLM.js.map +1 -0
  364. package/dist/{scroll-area-B0dB2cBi.js → scroll-area-Bj6CRUif.js} +2 -2
  365. package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-Bj6CRUif.js.map} +1 -1
  366. package/dist/{separator-Bb17I4pu.js → separator-B9ewiCGO.js} +2 -2
  367. package/dist/{separator-Bb17I4pu.js.map → separator-B9ewiCGO.js.map} +1 -1
  368. package/dist/{separator-Ct_WSWTJ.js → separator-DM6gs2vu.js} +3 -3
  369. package/dist/{separator-Ct_WSWTJ.js.map → separator-DM6gs2vu.js.map} +1 -1
  370. package/dist/services/actions.js +1 -1
  371. package/dist/settings-DZPHgpx4.js +155 -0
  372. package/dist/settings-DZPHgpx4.js.map +1 -0
  373. package/dist/{sheet-BGPERY55.js → sheet-C4DHsgLk.js} +6 -6
  374. package/dist/{sheet-BGPERY55.js.map → sheet-C4DHsgLk.js.map} +1 -1
  375. package/dist/sidebar-C8BnDwTH.js +709 -0
  376. package/dist/sidebar-C8BnDwTH.js.map +1 -0
  377. package/dist/{sidebar-f9gRWXIR.js → sidebar-CmD6a-HK.js} +16 -13
  378. package/dist/sidebar-CmD6a-HK.js.map +1 -0
  379. package/dist/{skeleton-BapcJd9C.js → skeleton-DDgdhmu9.js} +5 -5
  380. package/dist/{skeleton-BapcJd9C.js.map → skeleton-DDgdhmu9.js.map} +1 -1
  381. package/dist/{smart-card-CW0hjetE.js → smart-card-B6vLxqa_.js} +8 -8
  382. package/dist/{smart-card-CW0hjetE.js.map → smart-card-B6vLxqa_.js.map} +1 -1
  383. package/dist/{structure-DuxKl954.js → structure-DZJ2wbAU.js} +2 -2
  384. package/dist/{structure-DuxKl954.js.map → structure-DZJ2wbAU.js.map} +1 -1
  385. package/dist/style.css +1 -1
  386. package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-C8mNycaY.js} +2 -2
  387. package/dist/{surface-recipes-BKRVW8Os.js.map → surface-recipes-C8mNycaY.js.map} +1 -1
  388. package/dist/{table-CFOWY9pQ.js → table-CBonSdTp.js} +534 -486
  389. package/dist/table-CBonSdTp.js.map +1 -0
  390. package/dist/{table-B4TE7iOV.js → table-CXSPHH25.js} +75 -71
  391. package/dist/table-CXSPHH25.js.map +1 -0
  392. package/dist/{tabs-e7ko9S2o.js → tabs-C4Kr_hCr.js} +50 -49
  393. package/dist/tabs-C4Kr_hCr.js.map +1 -0
  394. package/dist/{text-inputs-B1culiSK.js → text-inputs-jdkS3ReG.js} +9 -9
  395. package/dist/{text-inputs-B1culiSK.js.map → text-inputs-jdkS3ReG.js.map} +1 -1
  396. package/dist/{timelines-D3Sl9ueq.js → timelines-CoPwdJP0.js} +10 -10
  397. package/dist/{timelines-D3Sl9ueq.js.map → timelines-CoPwdJP0.js.map} +1 -1
  398. package/dist/{tooltip-8wz5S_Zr.js → tooltip-31NwIpTo.js} +4 -4
  399. package/dist/{tooltip-8wz5S_Zr.js.map → tooltip-31NwIpTo.js.map} +1 -1
  400. package/dist/{tree-CzUJHnFs.js → tree-CeYVzdFE.js} +6 -6
  401. package/dist/{tree-CzUJHnFs.js.map → tree-CeYVzdFE.js.map} +1 -1
  402. package/dist/typography/rich-text.js +1 -1
  403. package/dist/{typography-BQnine1k.js → typography-C7-YMW1S.js} +2 -2
  404. package/dist/{typography-BQnine1k.js.map → typography-C7-YMW1S.js.map} +1 -1
  405. package/dist/typography.js +1 -1
  406. package/dist/{upload-BOW6U2tI.js → upload-Hdm5gObf.js} +303 -291
  407. package/dist/upload-Hdm5gObf.js.map +1 -0
  408. package/dist/{upload-queue-qUXn1ykN.js → upload-queue-D0sYPuqo.js} +8 -8
  409. package/dist/{upload-queue-qUXn1ykN.js.map → upload-queue-D0sYPuqo.js.map} +1 -1
  410. package/dist/{usage-card-BeSLY0i0.js → usage-card-9s8hLDfn.js} +9 -9
  411. package/dist/{usage-card-BeSLY0i0.js.map → usage-card-9s8hLDfn.js.map} +1 -1
  412. package/dist/{utils-B6kKb8jB.js → utils-DhuoqFy4.js} +31 -37
  413. package/dist/utils-DhuoqFy4.js.map +1 -0
  414. package/dist/{value-inputs-skdVB2zh.js → value-inputs-D3aPgq9H.js} +15 -15
  415. package/dist/{value-inputs-skdVB2zh.js.map → value-inputs-D3aPgq9H.js.map} +1 -1
  416. package/dist/{value-typography-uAmWUAL1.js → value-typography-uSzzG9Gf.js} +32 -26
  417. package/dist/value-typography-uSzzG9Gf.js.map +1 -0
  418. package/dist/{workspace-DHeHv0qw.js → workspace-CC8Vchiu.js} +12 -12
  419. package/dist/{workspace-DHeHv0qw.js.map → workspace-CC8Vchiu.js.map} +1 -1
  420. package/docs/consumer-skill/examples/edit.tsx +3 -3
  421. package/docs/consumer-skill/references/agents-md.md +19 -19
  422. package/docs/consumer-skill/references/analytics.md +15 -0
  423. package/docs/consumer-skill/references/component-contracts.json +14724 -13057
  424. package/docs/consumer-skill/references/composition.md +21 -4
  425. package/docs/consumer-skill/references/design-contract.md +1 -0
  426. package/docs/consumer-skill/references/installation.md +51 -8
  427. package/docs/consumer-skill/references/integration.md +24 -1
  428. package/docs/consumer-skill/references/public-api.json +172 -34
  429. package/docs/consumer-skill/references/review.md +51 -11
  430. package/docs/consumer-skill/references/rhf-workflows.md +72 -0
  431. package/docs/consumer-skill/references/theming.md +7 -2
  432. package/docs/consumer-skill/references/tokens.json +1 -1
  433. package/docs/consumer-skill/scripts/composition-policy.mjs +144 -30
  434. package/docs/consumer-skill/scripts/setup-skills.mjs +46 -9
  435. package/package.json +4 -2
  436. package/templates/admin-shell-template.tsx +1 -2
  437. package/templates/customers-template.tsx +18 -16
  438. package/dist/accordion-B9MHG0cT.js.map +0 -1
  439. package/dist/ai-artifact-C58tQcBy.js.map +0 -1
  440. package/dist/auth-DTkkshS8.js.map +0 -1
  441. package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
  442. package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
  443. package/dist/combobox-BwzoXFSG.js +0 -884
  444. package/dist/combobox-BwzoXFSG.js.map +0 -1
  445. package/dist/comments-Dmpp0YIc.js.map +0 -1
  446. package/dist/data-display-BdgCAw8T.js.map +0 -1
  447. package/dist/date-picker-RlIzKom_.js +0 -1551
  448. package/dist/date-picker-RlIzKom_.js.map +0 -1
  449. package/dist/date-pickers-DY-CpXS1.js +0 -179
  450. package/dist/date-pickers-DY-CpXS1.js.map +0 -1
  451. package/dist/feedback-Dm4izqFn.js +0 -240
  452. package/dist/feedback-Dm4izqFn.js.map +0 -1
  453. package/dist/filters-DzgSJpMK.js.map +0 -1
  454. package/dist/form-field-BriWAXyg.js +0 -63
  455. package/dist/form-field-BriWAXyg.js.map +0 -1
  456. package/dist/forms-numeric-DIhghX1Q.js +0 -910
  457. package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
  458. package/dist/header-DMMxG__r.js.map +0 -1
  459. package/dist/item-DjCcM18E.js.map +0 -1
  460. package/dist/layout.types-Cn7aUzJp.js +0 -20
  461. package/dist/layout.types-Cn7aUzJp.js.map +0 -1
  462. package/dist/mentions-0_4nWuI-.js.map +0 -1
  463. package/dist/message-g8p7eVtN.js +0 -128
  464. package/dist/message-g8p7eVtN.js.map +0 -1
  465. package/dist/navigation-C90-oQFq.js.map +0 -1
  466. package/dist/navigation-DaRjthVk.js.map +0 -1
  467. package/dist/number-CRU3kGuk.js.map +0 -1
  468. package/dist/overlays-BSgCtM2v.js.map +0 -1
  469. package/dist/popover-B85RenIl.js.map +0 -1
  470. package/dist/primitives-ByWgGUgt.js.map +0 -1
  471. package/dist/rich-text-Dth5E882.js +0 -78
  472. package/dist/rich-text-Dth5E882.js.map +0 -1
  473. package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
  474. package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
  475. package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
  476. package/dist/safe-image-src-C6kQSMBZ.js +0 -17
  477. package/dist/safe-image-src-C6kQSMBZ.js.map +0 -1
  478. package/dist/sanitize-html-DsQmI48u.js.map +0 -1
  479. package/dist/settings-Bar5wiSo.js +0 -167
  480. package/dist/settings-Bar5wiSo.js.map +0 -1
  481. package/dist/sidebar-D-JYMMbY.js +0 -686
  482. package/dist/sidebar-D-JYMMbY.js.map +0 -1
  483. package/dist/sidebar-f9gRWXIR.js.map +0 -1
  484. package/dist/table-B4TE7iOV.js.map +0 -1
  485. package/dist/table-CFOWY9pQ.js.map +0 -1
  486. package/dist/tabs-e7ko9S2o.js.map +0 -1
  487. package/dist/upload-BOW6U2tI.js.map +0 -1
  488. package/dist/utils-B6kKb8jB.js.map +0 -1
  489. package/dist/value-typography-uAmWUAL1.js.map +0 -1
@@ -1,36 +1,38 @@
1
1
  "use client";
2
2
  import { useStrings as e } from "./lib/strings.js";
3
- import { t } from "./utils-B6kKb8jB.js";
4
- import { n } from "./buttons-BedGfygC.js";
5
- import { c as r, o as i, t as a } from "./typography-BQnine1k.js";
3
+ import { t } from "./utils-DhuoqFy4.js";
4
+ import { n } from "./buttons-DeW0bQeK.js";
5
+ import { c as r, o as i, t as a } from "./typography-C7-YMW1S.js";
6
6
  import { t as o } from "./focus-recipes-B653VaLq.js";
7
- import { t as s } from "./structure-DuxKl954.js";
8
- import { a as c } from "./surface-recipes-BKRVW8Os.js";
9
- import { i as l, n as u, r as d, t as f } from "./popover.recipes-DdiEp0rd.js";
10
- import { t as p } from "./interaction-recipes-XR9ZpVYL.js";
11
- import { t as m } from "./sanitize-html-DsQmI48u.js";
7
+ import { t as s } from "./structure-DZJ2wbAU.js";
8
+ import { a as c } from "./surface-recipes-C8mNycaY.js";
9
+ import { i as l, n as u, r as d, t as f } from "./popover.recipes-DJ0AkUan.js";
10
+ import { t as p } from "./interaction-recipes-4wZ2tvfb.js";
11
+ import { n as m } from "./sanitize-html-BWkH4dLM.js";
12
12
  import { t as h } from "./content-typography-CnwgMJ37.js";
13
- import { t as g } from "./badge-xIiV_E7f.js";
14
- import { a as _, i as v, n as y, o as b, r as x, t as S } from "./command-CrlPIL6m.js";
15
- import { i as C, t as w } from "./popover-B85RenIl.js";
16
- import { t as T } from "./use-debounced-callback-Cx1h-hdv.js";
17
- import { Fragment as E, useCallback as D, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
18
- import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
19
- import { Loader2 as F } from "lucide-react";
13
+ import { t as g } from "./rich-text-tree-BqyQ_7-R.js";
14
+ import { t as _ } from "./badge-wWauMgAt.js";
15
+ import { a as v, i as y, n as b, o as x, r as S, t as C } from "./command-9e52NPgK.js";
16
+ import { i as w, t as T } from "./popover-k8TdUcAt.js";
17
+ import { t as E } from "./use-debounced-callback-Cx1h-hdv.js";
18
+ import { useCallback as D, useEffect as O, useId as k, useMemo as A, useRef as j, useState as M } from "react";
19
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
20
+ import { Loader2 as I } from "lucide-react";
21
+ import { fromHtml as L } from "hast-util-from-html";
20
22
  //#region src/components/features/mentions/hooks/use-mentions-search.ts
21
- function I(e) {
23
+ function R(e) {
22
24
  return !!(e && e.name === "AbortError");
23
25
  }
24
- function L(e = {}) {
25
- let { resources: t, onResourceSearch: n, initialMentions: r, debounceMs: i = 300, onError: a } = e, o = JSON.stringify(Object.keys(t ?? {})), s = k(() => JSON.parse(o), [o]), [c, l] = j(() => s[0] ?? null), [u, d] = j(!1), [f, p] = j(""), [m, h] = j({}), [g, _] = j(!1), [v, y] = j(null), [b, x] = j({}), [S, C] = j(0), [w, E] = j(() => r ? [...r] : []), M = A(0), N = A(null), P = A(t), F = A(n), L = A(a);
26
- P.current = t, F.current = n, L.current = a, O(() => {
26
+ function z(e = {}) {
27
+ let { resources: t, onResourceSearch: n, initialMentions: r, debounceMs: i = 300, onError: a } = e, o = JSON.stringify(Object.keys(t ?? {})), s = A(() => JSON.parse(o), [o]), [c, l] = M(() => s[0] ?? null), [u, d] = M(!1), [f, p] = M(""), [m, h] = M({}), [g, _] = M(!1), [v, y] = M(null), [b, x] = M({}), [S, C] = M(0), [w, T] = M(() => r ? [...r] : []), k = j(0), N = j(null), P = j(t), F = j(n), I = j(a);
28
+ P.current = t, F.current = n, I.current = a, O(() => {
27
29
  if (s.length === 0) {
28
30
  l(null);
29
31
  return;
30
32
  }
31
33
  (!c || !s.includes(c)) && l(s[0]);
32
34
  }, [c, s]);
33
- let R = k(() => c && t ? t[c] ?? null : null, [c, t]), z = D(async (e, t, n) => {
35
+ let L = A(() => c && t ? t[c] ?? null : null, [c, t]), z = D(async (e, t, n) => {
34
36
  let r = P.current?.[e];
35
37
  if (r?.search) return (await r.search(t, {
36
38
  kind: e,
@@ -53,9 +55,8 @@ function L(e = {}) {
53
55
  ...t,
54
56
  kind: e
55
57
  })) : [];
56
- }, []), B = T((e, t, n, r) => {
58
+ }, []), B = E((e, t, n, r) => {
57
59
  (async () => {
58
- _(!0);
59
60
  try {
60
61
  let i = await Promise.all(e.map(async (e) => {
61
62
  try {
@@ -72,15 +73,15 @@ function L(e = {}) {
72
73
  };
73
74
  }
74
75
  }));
75
- if (n !== M.current || r.aborted) return;
76
+ if (n !== k.current || r.aborted) return;
76
77
  let a = {}, o = {}, s = null;
77
- for (let e of i) a[e.kind] = e.list, e.error !== null && !I(e.error) && (o[e.kind] = e.error, s ??= e.error, L.current?.(e.error, {
78
+ for (let e of i) a[e.kind] = e.list, e.error !== null && !R(e.error) && (o[e.kind] = e.error, s ??= e.error, I.current?.(e.error, {
78
79
  query: t,
79
80
  kind: e.kind
80
81
  }));
81
82
  h(a), x(o), y(s);
82
83
  } finally {
83
- n === M.current && !r.aborted && _(!1);
84
+ n === k.current && !r.aborted && _(!1);
84
85
  }
85
86
  })();
86
87
  }, i);
@@ -91,8 +92,8 @@ function L(e = {}) {
91
92
  e.abort(), N.current === e && (N.current = null);
92
93
  };
93
94
  if (s.length === 0) return h({}), _(!1), y(null), x({}), t;
94
- let n = ++M.current;
95
- return y(null), x({}), B(s, f, n, e.signal), () => {
95
+ let n = ++k.current;
96
+ return _(!0), y(null), x({}), B(s, f, n, e.signal), () => {
96
97
  B.cancel(), t();
97
98
  };
98
99
  }, [
@@ -119,13 +120,13 @@ function L(e = {}) {
119
120
  }, []), U = D((e) => {
120
121
  p(e);
121
122
  }, []), W = D((e) => {
122
- E((t) => t.some((t) => t.id === e.id) ? t : [...t, e]);
123
+ T((t) => t.some((t) => t.id === e.id) ? t : [...t, e]);
123
124
  }, []), G = D((e) => {
124
- E((t) => t.filter((t) => t.id !== e));
125
+ T((t) => t.filter((t) => t.id !== e));
125
126
  }, []), K = D((e) => {
126
- E([...e]);
127
+ T([...e]);
127
128
  }, []), q = D(() => {
128
- N.current?.abort(), E([]), p(""), d(!1), h({}), _(!1), y(null), x({}), M.current++;
129
+ N.current?.abort(), T([]), p(""), d(!1), h({}), _(!1), y(null), x({}), k.current++;
129
130
  }, []), J = D((e) => {
130
131
  let n = e.kind ?? c, r = `${n}:${e.id}`, i = t?.[n], a = e.href ?? i?.buildHref?.(e), o = {
131
132
  id: r,
@@ -144,10 +145,10 @@ function L(e = {}) {
144
145
  kinds: s,
145
146
  activeKind: c,
146
147
  setActiveKind: H,
147
- activeResource: R,
148
+ activeResource: L,
148
149
  query: f,
149
150
  setQuery: U,
150
- suggestions: k(() => c ? m[c] ?? [] : [], [c, m]),
151
+ suggestions: A(() => c ? m[c] ?? [] : [], [c, m]),
151
152
  suggestionsByKind: m,
152
153
  isLoading: g,
153
154
  error: v,
@@ -166,20 +167,20 @@ function L(e = {}) {
166
167
  }
167
168
  //#endregion
168
169
  //#region src/components/features/mentions/utils/build-mention-html.ts
169
- function R(e, t) {
170
+ function B(e, t) {
170
171
  let n = String(e.label ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), r = String(e.id).replace(/"/g, "&quot;"), i = String(e.kind).replace(/"/g, "&quot;"), a = t?.tone ? String(t.tone).replace(/"/g, "&quot;") : "", o = t?.triggerChar ?? (e.kind === "user" ? "@" : "");
171
172
  return `<span class="rsc-mention" data-ref-id="${r}" data-ref-kind="${i}"${a ? ` data-ref-tone="${a}"` : ""} contenteditable="false">${o}${n}</span>&nbsp;`;
172
173
  }
173
174
  //#endregion
174
175
  //#region src/components/features/mentions/hooks/use-mentions.ts
175
- function z(e = {}) {
176
- let t = e.resources, n = e.onResourceSearch, r = L({
176
+ function V(e = {}) {
177
+ let t = e.resources, n = e.onResourceSearch, r = z({
177
178
  ...e,
178
179
  resources: t,
179
180
  onResourceSearch: n
180
- }), [i, a] = j(!1), [o, s] = j(!1), c = A(null), l = A(null), u = D((e) => {
181
- a(e), e || (c.current = null, l.current = null, s(!1), r.setManualKindOverride(!1));
182
- }, [r]), d = e.editorRef, f = D(() => {
181
+ }), [i, a] = M(!1), [o, s] = M(!1), c = k(), [l, u] = M(null), d = j(null), f = j(null), p = j(null), m = D((e) => {
182
+ a(e), e || (d.current = null, p.current = null, s(!1), u(null), r.setManualKindOverride(!1));
183
+ }, [r]), h = e.editorRef, g = D(() => {
183
184
  if (!t) return;
184
185
  let e = {};
185
186
  for (let [n, r] of Object.entries(t)) {
@@ -187,60 +188,106 @@ function z(e = {}) {
187
188
  typeof t == "string" && t.length > 0 && (e[t] = n);
188
189
  }
189
190
  if (Object.keys(e).length === 0) return;
190
- let n = d?.current?.getCaretContext();
191
- if (!n) {
192
- c.current && (c.current = null, u(!1));
191
+ let n = h?.current?.getCaretContext();
192
+ if (n && f.current === n.textBefore) return;
193
+ if (f.current = null, !n) {
194
+ d.current && (d.current = null, m(!1));
193
195
  return;
194
196
  }
195
- let i = Object.keys(e).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(""), o = RegExp(`(?:^|\\s)([${i}])([\\p{L}\\p{N}_-]*)$`, "u"), f = n.textBefore.match(o);
196
- if (!f) {
197
- c.current && (c.current = null, u(!1));
197
+ let i = Object.keys(e).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(""), o = RegExp(`(?:^|\\s)([${i}])([\\p{L}\\p{N}_-]*)$`, "u"), c = n.textBefore.match(o);
198
+ if (!c) {
199
+ d.current && (d.current = null, m(!1));
198
200
  return;
199
201
  }
200
- let p = f[1], m = f[2] ?? "", h = e[p], g = p.length + m.length;
201
- c.current = {
202
- kind: h,
203
- triggerChar: p,
204
- consumedLength: g
205
- }, s(!0), l.current !== p && (r.activeKind !== h && r.setActiveKind(h), r.setManualKindOverride(!1), l.current = p), r.query !== m && r.setQuery(m), a(!0);
202
+ let l = c[1], u = c[2] ?? "", g = e[l], _ = l.length + u.length;
203
+ d.current = {
204
+ kind: g,
205
+ triggerChar: l,
206
+ consumedLength: _
207
+ }, s(!0), p.current !== l && (r.activeKind !== g && r.setActiveKind(g), r.setManualKindOverride(!1), p.current = l), r.query !== u && r.setQuery(u), a(!0);
206
208
  }, [
207
- d,
209
+ h,
208
210
  t,
209
211
  r,
210
- u
211
- ]), p = D((e) => {
212
- let n = r.selectSuggestion(e), i = c.current, a = t?.[n.kind]?.tone, o = R(n, {
212
+ m
213
+ ]), _ = D((e) => {
214
+ let n = r.selectSuggestion(e), i = d.current, a = t?.[n.kind]?.tone, o = B(n, {
213
215
  triggerChar: i?.triggerChar,
214
216
  tone: a
215
217
  });
216
- return i && i.consumedLength > 0 && d?.current ? (d.current.replaceBeforeCaret(i.consumedLength, o), c.current = null) : d?.current && d.current.insertHTML(o), u(!1), n;
218
+ return i && i.consumedLength > 0 && h?.current ? (h.current.replaceBeforeCaret(i.consumedLength, o), d.current = null) : h?.current && h.current.insertHTML(o), m(!1), n;
217
219
  }, [
218
- d,
220
+ h,
219
221
  t,
220
222
  r,
221
- u
223
+ m
224
+ ]), v = i && o, y = v && !r.isLoading && l && l.query === r.query && l.kind === r.activeKind ? r.suggestions.findIndex((e) => e.id === l.id) : -1, b = v && !r.isLoading && r.suggestions.length > 0 ? {
225
+ listboxId: c,
226
+ activeOptionId: y < 0 ? void 0 : `${c}-option-${y}`
227
+ } : void 0, x = D(() => {
228
+ f.current = h?.current?.getCaretContext()?.textBefore ?? null, m(!1);
229
+ }, [h, m]), S = D((e) => {
230
+ if (!v || e.defaultPrevented || e.isComposing || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return !1;
231
+ if (e.key === "Escape") x();
232
+ else if (!r.isLoading && r.suggestions.length > 0 && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
233
+ let t = r.suggestions.length, n = e.key === "ArrowDown" ? (y + 1) % t : y <= 0 ? t - 1 : y - 1, i = r.suggestions[n];
234
+ if (!i) return !1;
235
+ u({
236
+ id: i.id,
237
+ query: r.query,
238
+ kind: r.activeKind
239
+ });
240
+ } else if ((e.key === "Enter" || e.key === "Tab") && y >= 0) {
241
+ let e = r.suggestions[y];
242
+ if (!e) return !1;
243
+ _(e);
244
+ } else return !1;
245
+ return e.preventDefault(), e.stopPropagation(), !0;
246
+ }, [
247
+ y,
248
+ x,
249
+ v,
250
+ _,
251
+ r.activeKind,
252
+ r.isLoading,
253
+ r.query,
254
+ r.suggestions
255
+ ]), C = D((e) => {
256
+ if (!v) return;
257
+ let t = e.relatedTarget, n = e.currentTarget.ownerDocument.getElementById(`${c}-panel`);
258
+ t instanceof Element && e.currentTarget.contains(t) && (t.closest("[contenteditable=\"true\"]") || n?.contains(t)) || x();
259
+ }, [
260
+ x,
261
+ v,
262
+ c
222
263
  ]);
223
264
  return {
224
265
  ...r,
225
266
  pickerOpen: i,
226
- setPickerOpen: u,
267
+ setPickerOpen: m,
227
268
  triggerActive: o,
228
- handleCaretChange: f,
229
- pickSuggestion: p
269
+ handleCaretChange: g,
270
+ inlineOpen: v,
271
+ listboxId: c,
272
+ activeIndex: y,
273
+ suggestionPopup: b,
274
+ handleKeyDown: S,
275
+ handleBlur: C,
276
+ pickSuggestion: _
230
277
  };
231
278
  }
232
279
  //#endregion
233
280
  //#region src/components/features/mentions/partials/mention-chip.tsx
234
- var B = {
281
+ var H = {
235
282
  primary: "secondary",
236
283
  success: "success",
237
284
  warning: "warning",
238
285
  destructive: "destructive",
239
286
  info: "info",
240
287
  secondary: "secondary"
241
- }, V = ({ mention: e, resource: n, asLink: i = !0, onClick: o, trailing: s, className: c }) => {
242
- if (n?.renderChip) return /* @__PURE__ */ N(M, { children: n.renderChip(e) });
243
- let l = B[n?.tone ?? "secondary"] ?? B.secondary, u = n?.icon, d = /* @__PURE__ */ P(g, {
288
+ }, U = ({ mention: e, resource: n, asLink: i = !0, onClick: o, trailing: s, className: c }) => {
289
+ if (n?.renderChip) return /* @__PURE__ */ P(N, { children: n.renderChip(e) });
290
+ let l = H[n?.tone ?? "secondary"] ?? H.secondary, u = n?.icon, d = /* @__PURE__ */ F(_, {
244
291
  tone: l,
245
292
  size: "sm",
246
293
  inline: !0,
@@ -248,11 +295,11 @@ var B = {
248
295
  "data-ref-kind": e.kind,
249
296
  className: t("mention-chip--component", "align-[-0.15em] cursor-default whitespace-nowrap", c),
250
297
  children: [
251
- u ? /* @__PURE__ */ N(u, {
298
+ u ? /* @__PURE__ */ P(u, {
252
299
  className: "size-icon-sm shrink-0",
253
300
  "aria-hidden": !0
254
301
  }) : null,
255
- /* @__PURE__ */ N(r, {
302
+ /* @__PURE__ */ P(r, {
256
303
  tag: "span",
257
304
  size: "inherit",
258
305
  weight: "medium",
@@ -263,7 +310,7 @@ var B = {
263
310
  s
264
311
  ]
265
312
  });
266
- return i && e.href ? /* @__PURE__ */ N(a, {
313
+ return i && e.href ? /* @__PURE__ */ P(a, {
267
314
  href: e.href,
268
315
  size: "inherit",
269
316
  underline: !1,
@@ -272,69 +319,41 @@ var B = {
272
319
  onClick: o,
273
320
  className: "inline align-baseline no-underline",
274
321
  children: d
275
- }) : o ? /* @__PURE__ */ N("span", {
322
+ }) : o ? /* @__PURE__ */ P("span", {
276
323
  onClick: o,
277
324
  className: "inline align-baseline",
278
325
  children: d
279
326
  }) : d;
280
- }, H = /<(span|a)\b([^>]*?)data-ref-id\s*=\s*"([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi;
281
- function U(e) {
282
- if (!e) return [];
283
- let t = [], n = 0, r;
284
- for (H.lastIndex = 0; (r = H.exec(e)) !== null;) {
285
- let [i, , , a] = r, o = e.slice(n, r.index);
286
- o.length > 0 && t.push({
287
- kind: "html",
288
- value: o
289
- }), t.push({
290
- kind: "mention",
291
- refId: a,
292
- fallback: i
293
- }), n = r.index + i.length;
294
- }
295
- let i = e.slice(n);
296
- return i.length > 0 && t.push({
297
- kind: "html",
298
- value: i
299
- }), t;
300
- }
301
- //#endregion
302
- //#region src/components/features/mentions/partials/mention-content.tsx
303
- var W = h;
327
+ }, W = h;
304
328
  function G(e) {
305
- let { html: n, mentions: i, resources: a, renderMention: o, sanitizer: s, className: c, prose: l = !0 } = e, u = a, d = s ? s(n ?? "") : m(n ?? ""), f = /* @__PURE__ */ new Map();
329
+ let { html: n, mentions: i, resources: a, renderMention: o, sanitizer: s, className: c, prose: l = !0 } = e, u = a, d = s ? L(s(n ?? ""), { fragment: !0 }) : m(n ?? ""), f = /* @__PURE__ */ new Map();
306
330
  for (let e of i ?? []) f.set(e.id, e);
307
- let p = f.size > 0 ? U(d) : [{
308
- kind: "html",
309
- value: d
310
- }], h = (e) => {
331
+ let p = (e) => {
311
332
  if (o) return o(e);
312
333
  let t = u?.[e.kind];
313
- return /* @__PURE__ */ N(V, {
334
+ return /* @__PURE__ */ P(U, {
314
335
  mention: e,
315
336
  resource: t
316
337
  });
317
- }, g = p.map((e, t) => {
318
- if (e.kind === "mention") {
319
- let n = f.get(e.refId);
320
- return n ? /* @__PURE__ */ N(E, { children: h(n) }, `ref-${t}-${e.refId}`) : /* @__PURE__ */ N("span", { dangerouslySetInnerHTML: { __html: e.fallback } }, `fallback-${t}`);
321
- }
322
- return /* @__PURE__ */ N("span", { dangerouslySetInnerHTML: { __html: e.value } }, `html-${t}`);
338
+ }, h = g(d, void 0, (e) => {
339
+ if (e.tagName !== "span" && e.tagName !== "a") return;
340
+ let t = e.properties.dataRefId, n = typeof t == "string" ? f.get(t) : void 0;
341
+ return n ? /* @__PURE__ */ P(N, { children: p(n) }) : void 0;
323
342
  });
324
- return l ? /* @__PURE__ */ N(r, {
343
+ return l ? /* @__PURE__ */ P(r, {
325
344
  tag: "div",
326
345
  className: t("mention-content--component", W, c),
327
- children: g
328
- }) : /* @__PURE__ */ N(M, { children: g });
346
+ children: h
347
+ }) : /* @__PURE__ */ P(N, { children: h });
329
348
  }
330
349
  //#endregion
331
350
  //#region src/components/features/mentions/partials/mention-kind-toggles.tsx
332
351
  function K({ kinds: e, activeKind: t, resources: i, counts: a, onKindChange: o }) {
333
- return /* @__PURE__ */ N("div", {
352
+ return /* @__PURE__ */ P("div", {
334
353
  className: "mention-kind-toggles--component flex flex-wrap gap-space-xs",
335
354
  children: e.map((e) => {
336
355
  let s = i?.[e], c = s?.icon, l = e === t, u = a?.[e]?.length ?? 0;
337
- return /* @__PURE__ */ P(n, {
356
+ return /* @__PURE__ */ F(n, {
338
357
  type: "button",
339
358
  "aria-pressed": l,
340
359
  tone: "secondary",
@@ -343,15 +362,15 @@ function K({ kinds: e, activeKind: t, resources: i, counts: a, onKindChange: o }
343
362
  className: l ? p.togglePressed : p.toggleHoverButton,
344
363
  onClick: () => o(e),
345
364
  children: [
346
- c ? /* @__PURE__ */ N(c, { className: "size-icon-sm" }) : null,
347
- /* @__PURE__ */ N(r, {
365
+ c ? /* @__PURE__ */ P(c, { className: "size-icon-sm" }) : null,
366
+ /* @__PURE__ */ P(r, {
348
367
  tag: "span",
349
368
  size: "inherit",
350
369
  weight: "medium",
351
370
  className: "text-inherit",
352
371
  children: s?.label ?? String(e)
353
372
  }),
354
- u > 0 && /* @__PURE__ */ N(r, {
373
+ u > 0 && /* @__PURE__ */ P(r, {
355
374
  tag: "span",
356
375
  size: "xs",
357
376
  type: "secondary",
@@ -377,61 +396,61 @@ var q = {
377
396
  };
378
397
  //#endregion
379
398
  //#region src/components/features/mentions/partials/mention-picker.tsx
380
- function Y({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: u, query: d, setQuery: f, suggestions: p, loading: m, onSelect: h, strings: g, className: T }) {
399
+ function Y({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: u, query: d, setQuery: f, suggestions: p, loading: m, onSelect: h, strings: g, className: _ }) {
381
400
  let E = e(q, g);
382
- return n ? /* @__PURE__ */ P(w, {
401
+ return n ? /* @__PURE__ */ F(T, {
383
402
  align: "start",
384
403
  inset: "flush",
385
404
  type: "menu",
386
- className: t("mention-picker--component", l.md, "gap-0 overflow-hidden", T),
387
- children: [/* @__PURE__ */ N(C, { children: /* @__PURE__ */ P(s, {
405
+ className: t("mention-picker--component", l.md, "gap-0 overflow-hidden", _),
406
+ children: [/* @__PURE__ */ P(w, { children: /* @__PURE__ */ F(s, {
388
407
  gap: "sm",
389
- children: [/* @__PURE__ */ N(i, { children: E.title }), c.length > 1 && /* @__PURE__ */ N(K, {
408
+ children: [/* @__PURE__ */ P(i, { children: E.title }), c.length > 1 && /* @__PURE__ */ P(K, {
390
409
  kinds: c,
391
410
  activeKind: a,
392
411
  resources: u,
393
412
  onKindChange: o
394
413
  })]
395
- }) }), /* @__PURE__ */ P(S, {
414
+ }) }), /* @__PURE__ */ F(C, {
396
415
  shouldFilter: !1,
397
416
  inset: "flush",
398
417
  className: "rounded-none",
399
- children: [/* @__PURE__ */ N(v, {
418
+ children: [/* @__PURE__ */ P(y, {
400
419
  placeholder: E.searchPlaceholder,
401
420
  value: d,
402
421
  onValueChange: f
403
- }), /* @__PURE__ */ P(b, { children: [
404
- m ? /* @__PURE__ */ P(s, {
422
+ }), /* @__PURE__ */ F(x, { children: [
423
+ m ? /* @__PURE__ */ F(s, {
405
424
  direction: "horizontal",
406
425
  align: "center",
407
426
  gap: "sm",
408
427
  className: "px-row-x py-row-y text-muted-foreground",
409
- children: [/* @__PURE__ */ N(F, {
428
+ children: [/* @__PURE__ */ P(I, {
410
429
  className: "size-icon-sm animate-spin",
411
430
  "aria-hidden": !0
412
- }), /* @__PURE__ */ N(r, {
431
+ }), /* @__PURE__ */ P(r, {
413
432
  tag: "span",
414
433
  size: "xs",
415
434
  type: "secondary",
416
435
  children: E.loading
417
436
  })]
418
437
  }) : null,
419
- /* @__PURE__ */ N(y, { children: E.empty }),
420
- /* @__PURE__ */ N(x, { children: p.map((e) => {
438
+ /* @__PURE__ */ P(b, { children: E.empty }),
439
+ /* @__PURE__ */ P(S, { children: p.map((e) => {
421
440
  let t = e.kind ?? a ?? "";
422
- return /* @__PURE__ */ N(_, {
441
+ return /* @__PURE__ */ P(v, {
423
442
  value: `${t}:${e.id}`,
424
443
  onSelect: () => h(e),
425
- children: /* @__PURE__ */ P(s, {
444
+ children: /* @__PURE__ */ F(s, {
426
445
  gap: "dense",
427
446
  className: "flex min-w-0 flex-1 flex-col leading-tight",
428
- children: [/* @__PURE__ */ N(r, {
447
+ children: [/* @__PURE__ */ P(r, {
429
448
  tag: "span",
430
449
  type: "inherit",
431
450
  weight: "medium",
432
451
  className: "truncate",
433
452
  children: e.label
434
- }), e.description ? /* @__PURE__ */ N(r, {
453
+ }), e.description ? /* @__PURE__ */ P(r, {
435
454
  tag: "span",
436
455
  size: "xs",
437
456
  type: "secondary",
@@ -447,90 +466,104 @@ function Y({ open: n, activeKind: a, setActiveKind: o, kinds: c, resources: u, q
447
466
  }
448
467
  //#endregion
449
468
  //#region src/components/features/mentions/partials/mention-inline-suggestions.tsx
450
- function X({ open: n, activeKind: a, setActiveKind: m, kinds: h, resources: g, suggestionsByKind: _, suggestions: v, loading: y, query: b, onManualKindChange: x, onSelect: S, strings: C, className: w }) {
451
- let T = e(J, C);
452
- return n ? /* @__PURE__ */ P("div", {
469
+ function X({ open: n, activeKind: a, setActiveKind: m, kinds: h, resources: g, suggestionsByKind: _, suggestions: v, listboxId: y, activeIndex: b = -1, loading: x, query: S, onManualKindChange: C, onSelect: w, strings: T, className: E }) {
470
+ let D = e(J, T), k = j(null), A = y && x ? [] : v;
471
+ return O(() => {
472
+ k.current?.scrollIntoView?.({ block: "nearest" });
473
+ }, [
474
+ b,
475
+ n,
476
+ v
477
+ ]), n ? /* @__PURE__ */ F("div", {
478
+ id: y ? `${y}-panel` : void 0,
453
479
  onMouseDown: (e) => e.preventDefault(),
454
- className: t("mention-inline-suggestions--component", d.surface, "absolute left-0 top-full z-50 mt-space-xs max-w-full", l.lg, "overflow-hidden", w),
455
- children: [/* @__PURE__ */ N("div", {
480
+ className: t("mention-inline-suggestions--component", d.surface, "absolute left-0 top-full z-50 mt-space-xs max-w-full", l.lg, "overflow-hidden", E),
481
+ children: [/* @__PURE__ */ P("div", {
456
482
  className: t("mention-inline-suggestions--header", d.menuRegion, c.anchored.header),
457
- children: /* @__PURE__ */ P(s, {
483
+ children: /* @__PURE__ */ F(s, {
458
484
  gap: "sm",
459
485
  className: d.menuCopyInset,
460
- children: [/* @__PURE__ */ P(s, {
486
+ children: [/* @__PURE__ */ F(s, {
461
487
  direction: "horizontal",
462
488
  align: "baseline",
463
489
  justify: "between",
464
490
  gap: "md",
465
- children: [/* @__PURE__ */ N(i, { children: T.title }), b ? /* @__PURE__ */ P(r, {
491
+ children: [/* @__PURE__ */ P(i, { children: D.title }), S ? /* @__PURE__ */ F(r, {
466
492
  tag: "span",
467
493
  size: "xs",
468
494
  type: "secondary",
469
495
  className: "truncate font-mono",
470
496
  children: [
471
497
  "“",
472
- b,
498
+ S,
473
499
  "”"
474
500
  ]
475
501
  }) : null]
476
- }), h.length > 1 && /* @__PURE__ */ N(K, {
502
+ }), h.length > 1 && /* @__PURE__ */ P(K, {
477
503
  kinds: h,
478
504
  activeKind: a,
479
505
  resources: g,
480
506
  counts: _,
481
507
  onKindChange: (e) => {
482
- m(e), x?.();
508
+ m(e), C?.();
483
509
  }
484
510
  })]
485
511
  })
486
- }), /* @__PURE__ */ P("div", {
512
+ }), /* @__PURE__ */ F("div", {
513
+ id: y,
487
514
  className: t("mention-inline-suggestions--list max-h-72 overflow-y-auto", d.menu),
488
- ...v.length > 0 ? {
515
+ ...A.length > 0 ? {
489
516
  role: "listbox",
490
- "aria-label": T.title
517
+ "aria-label": D.title
491
518
  } : {},
492
519
  children: [
493
- y ? /* @__PURE__ */ P(s, {
520
+ x ? /* @__PURE__ */ F(s, {
494
521
  direction: "horizontal",
495
522
  align: "center",
496
523
  gap: "sm",
497
524
  className: "px-row-x py-row-y text-muted-foreground",
498
- children: [/* @__PURE__ */ N(F, {
525
+ children: [/* @__PURE__ */ P(I, {
499
526
  className: "size-icon-sm animate-spin",
500
527
  "aria-hidden": !0
501
- }), /* @__PURE__ */ N(r, {
528
+ }), /* @__PURE__ */ P(r, {
502
529
  tag: "span",
503
530
  size: "xs",
504
531
  type: "secondary",
505
- children: T.loading
532
+ role: "status",
533
+ children: D.loading
506
534
  })]
507
535
  }) : null,
508
- !y && v.length === 0 ? /* @__PURE__ */ N(r, {
536
+ !x && v.length === 0 ? /* @__PURE__ */ P(r, {
509
537
  tag: "div",
510
538
  size: "xs",
511
539
  type: "secondary",
512
540
  className: "px-row-x py-row-y",
513
- children: T.empty
541
+ role: "status",
542
+ children: D.empty
514
543
  }) : null,
515
- v.map((e) => {
516
- let n = e.kind ?? a ?? "";
517
- return /* @__PURE__ */ N("button", {
544
+ A.map((e, n) => {
545
+ let i = e.kind ?? a ?? "", c = n === b;
546
+ return /* @__PURE__ */ P("button", {
518
547
  type: "button",
519
548
  role: "option",
520
- "aria-selected": !1,
521
- "data-ref-id": `${n}:${e.id}`,
522
- onClick: () => S(e),
523
- className: t("mention-inline-suggestions--option w-full min-w-0 text-inherit text-left", p.nativeButtonReset, u("compact"), f.interactive, p.rowHover, o.inset),
524
- children: /* @__PURE__ */ P(s, {
549
+ id: y ? `${y}-option-${n}` : void 0,
550
+ tabIndex: y ? -1 : void 0,
551
+ ref: c ? k : void 0,
552
+ "aria-selected": c,
553
+ "data-highlighted": c || void 0,
554
+ "data-ref-id": `${i}:${e.id}`,
555
+ onClick: () => w(e),
556
+ className: t("mention-inline-suggestions--option w-full min-w-0 text-inherit text-left", p.nativeButtonReset, u("compact"), f.interactive, f.highlighted, p.rowHover, o.inset),
557
+ children: /* @__PURE__ */ F(s, {
525
558
  gap: "dense",
526
559
  className: "min-w-0 flex-1",
527
- children: [/* @__PURE__ */ N(r, {
560
+ children: [/* @__PURE__ */ P(r, {
528
561
  tag: "span",
529
562
  type: "inherit",
530
563
  weight: "medium",
531
564
  className: "truncate",
532
565
  children: e.label
533
- }), e.description ? /* @__PURE__ */ N(r, {
566
+ }), e.description ? /* @__PURE__ */ P(r, {
534
567
  tag: "span",
535
568
  size: "xs",
536
569
  type: "secondary",
@@ -538,24 +571,60 @@ function X({ open: n, activeKind: a, setActiveKind: m, kinds: h, resources: g, s
538
571
  children: e.description
539
572
  }) : null]
540
573
  })
541
- }, `${n}:${e.id}`);
574
+ }, `${i}:${e.id}`);
542
575
  })
543
576
  ]
544
577
  })]
545
578
  }) : null;
546
579
  }
547
580
  //#endregion
581
+ //#region src/components/features/mentions/utils/split-html-by-mentions.ts
582
+ function Z(e) {
583
+ if (!e) return [];
584
+ let t = [];
585
+ function n(e) {
586
+ for (let r of e) {
587
+ if (r.type !== "element") continue;
588
+ let e = r.properties.dataRefId, i = r.position?.start.offset, a = r.position?.end.offset;
589
+ (r.tagName === "span" || r.tagName === "a") && typeof e == "string" && e && i !== void 0 && a !== void 0 ? t.push({
590
+ refId: e,
591
+ start: i,
592
+ end: a
593
+ }) : n(r.children);
594
+ }
595
+ }
596
+ n(L(e, { fragment: !0 }).children);
597
+ let r = [], i = 0;
598
+ for (let { refId: n, start: a, end: o } of t.sort((e, t) => e.start - t.start)) {
599
+ if (a < i) continue;
600
+ let t = e.slice(i, a);
601
+ t.length > 0 && r.push({
602
+ kind: "html",
603
+ value: t
604
+ }), r.push({
605
+ kind: "mention",
606
+ refId: n,
607
+ fallback: e.slice(a, o)
608
+ }), i = o;
609
+ }
610
+ let a = e.slice(i);
611
+ return a.length > 0 && r.push({
612
+ kind: "html",
613
+ value: a
614
+ }), r;
615
+ }
616
+ //#endregion
548
617
  //#region src/components/features/mentions/utils/parse-mentions-from-html.ts
549
- var Z = /<(?:span|a)\b[^>]*?data-ref-id\s*=\s*"([^"]+)"[^>]*?>([\s\S]*?)<\/(?:span|a)>/gi, Q = /data-ref-kind\s*=\s*"([^"]+)"/i;
550
- function $(e) {
618
+ var Q = /<(?:span|a)\b[^>]*?data-ref-id\s*=\s*"([^"]+)"[^>]*?>([\s\S]*?)<\/(?:span|a)>/gi, $ = /data-ref-kind\s*=\s*"([^"]+)"/i;
619
+ function ee(e) {
551
620
  let t = [];
552
621
  if (!e) return t;
553
622
  let n = /* @__PURE__ */ new Set(), r;
554
- for (Z.lastIndex = 0; (r = Z.exec(e)) !== null;) {
623
+ for (Q.lastIndex = 0; (r = Q.exec(e)) !== null;) {
555
624
  let [e, i, a] = r;
556
625
  if (n.has(i)) continue;
557
626
  n.add(i);
558
- let o = e.match(Q)?.[1] ?? i.split(":")[0] ?? "", s = (a ?? "").replace(/<[^>]*>/g, "").replace(/&nbsp;/g, " ").replace(/^[@#$&%!~]\s*/, "").trim();
627
+ let o = e.match($)?.[1] ?? i.split(":")[0] ?? "", s = (a ?? "").replace(/<[^>]*>/g, "").replace(/&nbsp;/g, " ").replace(/^[@#$&%!~]\s*/, "").trim();
559
628
  t.push({
560
629
  id: i,
561
630
  kind: o,
@@ -565,6 +634,6 @@ function $(e) {
565
634
  return t;
566
635
  }
567
636
  //#endregion
568
- export { q as a, V as c, L as d, J as i, z as l, X as n, G as o, Y as r, U as s, $ as t, R as u };
637
+ export { J as a, U as c, z as d, Y as i, V as l, Z as n, q as o, X as r, G as s, ee as t, B as u };
569
638
 
570
- //# sourceMappingURL=mentions-0_4nWuI-.js.map
639
+ //# sourceMappingURL=mentions-qOnedSt4.js.map