themelia-react-ui 2.0.6 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (912) hide show
  1. package/CHANGELOG.md +250 -0
  2. package/MIGRATION.md +746 -7
  3. package/README.md +27 -23
  4. package/dist/{accordion-0tQUZ20r.js → accordion-DNVqwEIC.js} +36 -36
  5. package/dist/accordion-DNVqwEIC.js.map +1 -0
  6. package/dist/action-menu-D5343RwT.js +286 -0
  7. package/dist/action-menu-D5343RwT.js.map +1 -0
  8. package/dist/ai-artifact-otrz9ZwS.js +1214 -0
  9. package/dist/ai-artifact-otrz9ZwS.js.map +1 -0
  10. package/dist/anchored-positioning-1U_eBFNx.js +9 -0
  11. package/dist/anchored-positioning-1U_eBFNx.js.map +1 -0
  12. package/dist/app-shell-CPN30Nb1.js +372 -0
  13. package/dist/app-shell-CPN30Nb1.js.map +1 -0
  14. package/dist/{attachment-BCpA4e7i.js → attachment-D2-fpfmv.js} +15 -15
  15. package/dist/{attachment-BCpA4e7i.js.map → attachment-D2-fpfmv.js.map} +1 -1
  16. package/dist/{auth-B0girIk_.js → auth-g_oUTDDC.js} +234 -241
  17. package/dist/auth-g_oUTDDC.js.map +1 -0
  18. package/dist/{avatar-B9Jnp-T-.js → avatar-Ca3Ihrq4.js} +4 -4
  19. package/dist/{avatar-B9Jnp-T-.js.map → avatar-Ca3Ihrq4.js.map} +1 -1
  20. package/dist/{badge-wWauMgAt.js → badge-oGiXblW7.js} +8 -9
  21. package/dist/badge-oGiXblW7.js.map +1 -0
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +2 -2
  29. package/dist/base/cards.js +3 -3
  30. package/dist/base/carousel.js +11 -11
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +1 -1
  33. package/dist/base/chart.js +1 -1
  34. package/dist/base/choice-inputs.js +2 -2
  35. package/dist/base/code-block.js +1 -1
  36. package/dist/base/combobox.js +1 -1
  37. package/dist/base/command.js +1 -1
  38. package/dist/base/copyable.js +1 -1
  39. package/dist/base/date-pickers.js +2 -2
  40. package/dist/base/display.js +7 -7
  41. package/dist/base/feedback.js +4 -4
  42. package/dist/base/forms-numeric.js +2 -2
  43. package/dist/base/forms.js +2 -2
  44. package/dist/base/inline-edit.js +13 -13
  45. package/dist/base/inline-edit.js.map +1 -1
  46. package/dist/base/item.js +1 -1
  47. package/dist/base/media-gallery.js +203 -2
  48. package/dist/base/media-gallery.js.map +1 -0
  49. package/dist/base/metadata-list.js +1 -1
  50. package/dist/base/navigation.js +7 -7
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +32 -22
  54. package/dist/base/qr-code.js.map +1 -1
  55. package/dist/base/repeaters.js +91 -88
  56. package/dist/base/repeaters.js.map +1 -1
  57. package/dist/base/sidebar.js +2 -2
  58. package/dist/base/signature-pad.js +14 -14
  59. package/dist/base/signature-pad.js.map +1 -1
  60. package/dist/base/skeleton.js +1 -1
  61. package/dist/base/spinner.js +6 -12
  62. package/dist/base/spinner.js.map +1 -1
  63. package/dist/base/structure.js +1 -1
  64. package/dist/base/table.js +1 -1
  65. package/dist/base/text-inputs.js +3 -3
  66. package/dist/base/toaster.js +2 -2
  67. package/dist/base/tree.js +2 -2
  68. package/dist/base/upload-queue.js +303 -2
  69. package/dist/base/upload-queue.js.map +1 -0
  70. package/dist/base/upload.js +3 -4
  71. package/dist/base/value-inputs.js +1 -1
  72. package/dist/{batch-action-bar-BoqWIIpV.js → batch-action-bar-D6MZQNnC.js} +10 -10
  73. package/dist/{batch-action-bar-BoqWIIpV.js.map → batch-action-bar-D6MZQNnC.js.map} +1 -1
  74. package/dist/blocks/admin.js +242 -228
  75. package/dist/blocks/admin.js.map +1 -1
  76. package/dist/blocks/ai.js +395 -357
  77. package/dist/blocks/ai.js.map +1 -1
  78. package/dist/blocks/analytics/charts.js +1022 -0
  79. package/dist/blocks/analytics/charts.js.map +1 -0
  80. package/dist/blocks/analytics/usage-card.js +1 -1
  81. package/dist/blocks/analytics.js +171 -1365
  82. package/dist/blocks/analytics.js.map +1 -1
  83. package/dist/blocks/collaboration.js +1 -1
  84. package/dist/blocks/commerce/receipt.js +1 -1
  85. package/dist/blocks/commerce.js +1487 -1358
  86. package/dist/blocks/commerce.js.map +1 -1
  87. package/dist/blocks/data-display.js +2 -3
  88. package/dist/blocks/onboarding.js +91 -82
  89. package/dist/blocks/onboarding.js.map +1 -1
  90. package/dist/blocks/planning.js +25 -25
  91. package/dist/blocks/planning.js.map +1 -1
  92. package/dist/blocks/timelines.js +2 -2
  93. package/dist/{breadcrumbs-Bp9Ke7kd.js → breadcrumbs-CQ9JSlez.js} +52 -45
  94. package/dist/breadcrumbs-CQ9JSlez.js.map +1 -0
  95. package/dist/{button-ChBovTx0.js → button-rd6FiHfQ.js} +12 -8
  96. package/dist/button-rd6FiHfQ.js.map +1 -0
  97. package/dist/{buttons-DeW0bQeK.js → buttons-pZVgPTZn.js} +230 -246
  98. package/dist/buttons-pZVgPTZn.js.map +1 -0
  99. package/dist/{cards-CNXnmvV5.js → cards-CgWyqvgZ.js} +25 -22
  100. package/dist/{cards-CNXnmvV5.js.map → cards-CgWyqvgZ.js.map} +1 -1
  101. package/dist/cascader-Cf05pwaq.js +444 -0
  102. package/dist/cascader-Cf05pwaq.js.map +1 -0
  103. package/dist/{chart-I7ROnsl8.js → chart-CygRCyIZ.js} +5 -5
  104. package/dist/{chart-I7ROnsl8.js.map → chart-CygRCyIZ.js.map} +1 -1
  105. package/dist/{checkbox-MoyHIAPs.js → checkbox-Dy5_XBMZ.js} +4 -4
  106. package/dist/{checkbox-MoyHIAPs.js.map → checkbox-Dy5_XBMZ.js.map} +1 -1
  107. package/dist/{choice-inputs-DHGtx0QV.js → choice-inputs-oJEsrb5Y.js} +113 -114
  108. package/dist/choice-inputs-oJEsrb5Y.js.map +1 -0
  109. package/dist/{code-block-BSJyq9e-.js → code-block-BrLD7mCi.js} +44 -60
  110. package/dist/code-block-BrLD7mCi.js.map +1 -0
  111. package/dist/collapsible-CRCCg_bO.js +80 -0
  112. package/dist/collapsible-CRCCg_bO.js.map +1 -0
  113. package/dist/{collection-content-CSnwtOTH.js → collection-content-D7SoDlYd.js} +3 -3
  114. package/dist/{collection-content-CSnwtOTH.js.map → collection-content-D7SoDlYd.js.map} +1 -1
  115. package/dist/combobox-Dl6f6kHz.js +362 -0
  116. package/dist/combobox-Dl6f6kHz.js.map +1 -0
  117. package/dist/combobox-DrDXtSSt.js +929 -0
  118. package/dist/combobox-DrDXtSSt.js.map +1 -0
  119. package/dist/command-CjZ2VzKC.js +432 -0
  120. package/dist/command-CjZ2VzKC.js.map +1 -0
  121. package/dist/comments-C2MZyRmh.js +1214 -0
  122. package/dist/comments-C2MZyRmh.js.map +1 -0
  123. package/dist/components/base/accordion/accordion.d.ts +11 -3
  124. package/dist/components/base/action-menu/action-menu.d.ts +11 -3
  125. package/dist/components/base/buttons/button.d.ts +2 -2
  126. package/dist/components/base/buttons/index.d.ts +1 -1
  127. package/dist/components/base/buttons/loader-button.d.ts +6 -15
  128. package/dist/components/base/cards/index.d.ts +1 -1
  129. package/dist/components/base/cards/partials/card-body-context.d.ts +6 -0
  130. package/dist/components/base/cards/smart-card.d.ts +0 -2
  131. package/dist/components/base/cards/smart-card.types.d.ts +12 -10
  132. package/dist/components/base/cascader/cascader.d.ts +8 -2
  133. package/dist/components/base/cascader/cascader.types.d.ts +24 -2
  134. package/dist/components/base/cascader/index.d.ts +1 -1
  135. package/dist/components/base/choice-inputs/switch.d.ts +1 -1
  136. package/dist/components/base/code-block/use-code-copy.d.ts +2 -6
  137. package/dist/components/base/command/command.d.ts +1 -1
  138. package/dist/components/base/date-pickers/datepicker.types.d.ts +1 -3
  139. package/dist/components/base/display/dialog.d.ts +3 -9
  140. package/dist/components/base/display/index.d.ts +2 -3
  141. package/dist/components/base/display/separator.d.ts +1 -1
  142. package/dist/components/base/feedback/alert.d.ts +2 -1
  143. package/dist/components/base/feedback/empty.d.ts +10 -2
  144. package/dist/components/base/forms/workflow.d.ts +2 -2
  145. package/dist/components/base/forms-numeric/dimensions-input.d.ts +9 -17
  146. package/dist/components/base/forms-numeric/index.d.ts +3 -3
  147. package/dist/components/base/item/item.types.d.ts +6 -2
  148. package/dist/components/base/metadata-list/index.d.ts +1 -3
  149. package/dist/components/base/metadata-list/metadata-list.d.ts +4 -1
  150. package/dist/components/base/navigation/index.d.ts +2 -2
  151. package/dist/components/base/navigation/language-switcher.d.ts +7 -6
  152. package/dist/components/base/navigation/navigation-tabs.d.ts +8 -1
  153. package/dist/components/base/navigation/page-header/index.d.ts +1 -1
  154. package/dist/components/base/navigation/page-header/page-header.d.ts +13 -17
  155. package/dist/components/base/navigation/pagination.d.ts +5 -5
  156. package/dist/components/base/popover/popover.recipes.d.ts +0 -1
  157. package/dist/components/base/qr-code/qr-code.d.ts +4 -0
  158. package/dist/components/base/repeaters/index.d.ts +1 -1
  159. package/dist/components/base/repeaters/key-value-editor.d.ts +4 -0
  160. package/dist/components/base/sheet/sheet.d.ts +6 -15
  161. package/dist/components/base/sidebar/index.d.ts +1 -6
  162. package/dist/components/base/sidebar/sidebar.d.ts +38 -10
  163. package/dist/components/base/skeleton/skeleton.d.ts +1 -1
  164. package/dist/components/base/structure/structure.types.d.ts +11 -2
  165. package/dist/components/base/text-inputs/index.d.ts +1 -1
  166. package/dist/components/base/tree/index.d.ts +1 -0
  167. package/dist/components/base/tree/tree.d.ts +2 -2
  168. package/dist/components/base/tree/tree.types.d.ts +7 -1
  169. package/dist/components/base/upload/file-upload.validation.d.ts +37 -1
  170. package/dist/components/base/upload/image-upload.d.ts +2 -0
  171. package/dist/components/base/upload/index.d.ts +3 -9
  172. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -0
  173. package/dist/components/base/value-inputs/slider.d.ts +5 -2
  174. package/dist/components/blocks/admin/action-surfaces/index.d.ts +17 -4
  175. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +9 -3
  176. package/dist/components/blocks/admin/index.d.ts +1 -1
  177. package/dist/components/blocks/ai/ai-artifact/ai-artifact.d.ts +1 -1
  178. package/dist/components/blocks/ai/ai-artifact/types.d.ts +9 -4
  179. package/dist/components/blocks/ai/ai-chain-of-thought/ai-chain-of-thought.d.ts +1 -1
  180. package/dist/components/blocks/ai/ai-chain-of-thought/types.d.ts +11 -1
  181. package/dist/components/blocks/ai/ai-citation/ai-citation.d.ts +1 -1
  182. package/dist/components/blocks/ai/ai-citation/types.d.ts +6 -0
  183. package/dist/components/blocks/ai/ai-confirmation/ai-confirmation.d.ts +1 -1
  184. package/dist/components/blocks/ai/ai-confirmation/types.d.ts +21 -5
  185. package/dist/components/blocks/ai/ai-feedback/types.d.ts +7 -2
  186. package/dist/components/blocks/ai/ai-inline-citation/types.d.ts +9 -3
  187. package/dist/components/blocks/ai/ai-package-info/ai-package-info.d.ts +1 -1
  188. package/dist/components/blocks/ai/ai-package-info/types.d.ts +6 -0
  189. package/dist/components/blocks/ai/ai-sources/ai-sources.d.ts +1 -1
  190. package/dist/components/blocks/ai/ai-sources/types.d.ts +8 -2
  191. package/dist/components/blocks/ai/ai-task/ai-task.d.ts +1 -1
  192. package/dist/components/blocks/ai/ai-task/types.d.ts +10 -1
  193. package/dist/components/blocks/ai/ai-tool-call/ai-tool-call.d.ts +1 -1
  194. package/dist/components/blocks/ai/ai-tool-call/types.d.ts +6 -0
  195. package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
  196. package/dist/components/blocks/analytics/activity-heatmap/types.d.ts +1 -1
  197. package/dist/components/blocks/analytics/analytics.strings.d.ts +2 -0
  198. package/dist/components/blocks/analytics/atoms/metric-trend-chip.d.ts +11 -1
  199. package/dist/components/blocks/analytics/chart-card/chart-card.d.ts +7 -5
  200. package/dist/components/blocks/analytics/charts/index.d.ts +27 -0
  201. package/dist/components/blocks/analytics/index.d.ts +17 -24
  202. package/dist/components/blocks/analytics/metric/metric.d.ts +5 -5
  203. package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +2 -2
  204. package/dist/components/blocks/analytics/types.d.ts +12 -3
  205. package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
  206. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  207. package/dist/components/blocks/commerce/address-card/types.d.ts +5 -16
  208. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +2 -2
  209. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +6 -4
  210. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +0 -2
  211. package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
  212. package/dist/components/blocks/commerce/cart-summary/types.d.ts +9 -11
  213. package/dist/components/blocks/commerce/coupon-input/coupon-input.d.ts +1 -1
  214. package/dist/components/blocks/commerce/coupon-input/types.d.ts +7 -3
  215. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +0 -2
  216. package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
  217. package/dist/components/blocks/commerce/discount-stack/types.d.ts +4 -6
  218. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
  219. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +2 -0
  220. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-balance.d.ts +18 -0
  221. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-compact.d.ts +1 -1
  222. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.d.ts +0 -1
  223. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-dark.d.ts +1 -1
  224. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-full.d.ts +1 -1
  225. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.d.ts +1 -1
  226. package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.d.ts +1 -1
  227. package/dist/components/blocks/commerce/giftcard-card/types.d.ts +16 -5
  228. package/dist/components/blocks/commerce/index.d.ts +8 -8
  229. package/dist/components/blocks/commerce/inventory-level/inventory-level.strings.d.ts +2 -0
  230. package/dist/components/blocks/commerce/inventory-level/types.d.ts +1 -1
  231. package/dist/components/blocks/commerce/inventory-section/types.d.ts +0 -5
  232. package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +6 -3
  233. package/dist/components/blocks/commerce/loyalty-points/loyalty-points.d.ts +1 -1
  234. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +11 -5
  235. package/dist/components/blocks/commerce/order-status/order-status.d.ts +1 -1
  236. package/dist/components/blocks/commerce/order-status/types.d.ts +8 -8
  237. package/dist/components/blocks/commerce/order-timeline/order-timeline.d.ts +1 -1
  238. package/dist/components/blocks/commerce/order-timeline/types.d.ts +3 -1
  239. package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
  240. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +0 -8
  241. package/dist/components/blocks/commerce/payment-method/types.d.ts +0 -2
  242. package/dist/components/blocks/commerce/receipt/index.d.ts +1 -1
  243. package/dist/components/blocks/commerce/receipt/receipt-items.d.ts +1 -1
  244. package/dist/components/blocks/commerce/receipt/types.d.ts +10 -0
  245. package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
  246. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +0 -2
  247. package/dist/components/blocks/commerce/refund-status/types.d.ts +0 -2
  248. package/dist/components/blocks/commerce/seo-listing/types.d.ts +7 -0
  249. package/dist/components/blocks/commerce/shared/code-entry.d.ts +39 -0
  250. package/dist/components/blocks/commerce/shared/order-status.d.ts +1 -1
  251. package/dist/components/blocks/commerce/subscription-summary/subscription-summary.d.ts +1 -1
  252. package/dist/components/blocks/commerce/subscription-summary/types.d.ts +10 -1
  253. package/dist/components/blocks/commerce/upcoming-booking/index.d.ts +2 -1
  254. package/dist/components/blocks/commerce/upcoming-booking/types.d.ts +8 -0
  255. package/dist/components/blocks/commerce/upcoming-booking/upcoming-booking.d.ts +2 -2
  256. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -5
  257. package/dist/components/blocks/commerce/voucher-entry/types.d.ts +6 -3
  258. package/dist/components/blocks/commerce/voucher-entry/voucher-entry.d.ts +1 -1
  259. package/dist/components/blocks/content-block-hooks.d.ts +22 -0
  260. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +5 -1
  261. package/dist/components/blocks/data-display/dense-info-card/helpers.d.ts +3 -1
  262. package/dist/components/blocks/data-display/dense-info-card/index.d.ts +1 -1
  263. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-classification.d.ts +1 -1
  264. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-dashboard.d.ts +1 -1
  265. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-financial.d.ts +1 -1
  266. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-project.d.ts +1 -1
  267. package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-score.d.ts +1 -1
  268. package/dist/components/blocks/data-display/dense-info-card/types.d.ts +12 -5
  269. package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +6 -0
  270. package/dist/components/blocks/data-display/index.d.ts +0 -1
  271. package/dist/components/blocks/data-display/relationship-card-frame.d.ts +1 -1
  272. package/dist/components/blocks/onboarding/checklist/checklist.types.d.ts +5 -3
  273. package/dist/components/blocks/planning/task-card.types.d.ts +7 -3
  274. package/dist/components/blocks/timelines/changelog/types.d.ts +2 -2
  275. package/dist/components/blocks/timelines/index.d.ts +2 -2
  276. package/dist/components/blocks/timelines/milestones/types.d.ts +2 -2
  277. package/dist/components/blocks/timelines/shared/timeline.d.ts +6 -0
  278. package/dist/components/blocks/timelines/steps-card/index.d.ts +2 -1
  279. package/dist/components/blocks/timelines/steps-card/steps-card.d.ts +2 -2
  280. package/dist/components/blocks/timelines/steps-card/types.d.ts +13 -1
  281. package/dist/components/features/activities/activities.strings.d.ts +5 -3
  282. package/dist/components/features/activities/activities.types.d.ts +28 -11
  283. package/dist/components/features/activities/hooks/use-activity-feed.d.ts +6 -0
  284. package/dist/components/features/activities/index.d.ts +1 -1
  285. package/dist/components/features/activities/partials/activity-headline.d.ts +5 -0
  286. package/dist/components/features/activities/partials/activity-row.d.ts +12 -13
  287. package/dist/components/features/activities/partials/row-layers.d.ts +7 -0
  288. package/dist/components/features/activities/relative-time.d.ts +18 -0
  289. package/dist/components/features/ai-chat/ai-chat.d.ts +6 -2
  290. package/dist/components/features/ai-chat/ai-chat.strings.d.ts +41 -2
  291. package/dist/components/features/ai-chat/ai-chat.types.d.ts +6 -0
  292. package/dist/components/features/ai-chat/partials/ai-chat-attachments-strip.d.ts +5 -1
  293. package/dist/components/features/ai-chat/partials/ai-chat-prompt-input.d.ts +2 -2
  294. package/dist/components/features/ai-chat/partials/ai-chat-queue.d.ts +3 -1
  295. package/dist/components/features/ai-chat/partials/ai-chat-suggestions-row.d.ts +6 -1
  296. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
  297. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +19 -5
  298. package/dist/components/features/appointment-calendar/index.d.ts +1 -1
  299. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +18 -10
  300. package/dist/components/features/async-preview/async-preview.d.ts +2 -2
  301. package/dist/components/features/async-preview/async-preview.types.d.ts +30 -1
  302. package/dist/components/features/async-preview/preview-trigger-cell.d.ts +7 -2
  303. package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
  304. package/dist/components/features/combobox/combobox.d.ts +12 -3
  305. package/dist/components/features/combobox/components/error-message.d.ts +3 -1
  306. package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -2
  307. package/dist/components/features/combobox/index.d.ts +1 -1
  308. package/dist/components/features/combobox/types.d.ts +47 -45
  309. package/dist/components/features/comments/comments.strings.d.ts +6 -5
  310. package/dist/components/features/comments/comments.types.d.ts +40 -26
  311. package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -1
  312. package/dist/components/features/comments/hooks/use-comments.d.ts +8 -1
  313. package/dist/components/features/data-view/data-view.strings.d.ts +9 -2
  314. package/dist/components/features/data-view/data-view.types.d.ts +15 -2
  315. package/dist/components/features/email-composer/email-html.d.ts +5 -0
  316. package/dist/components/features/email-composer/http.d.ts +2 -0
  317. package/dist/components/features/email-composer/strings.d.ts +17 -2
  318. package/dist/components/features/email-composer/types.d.ts +17 -2
  319. package/dist/components/features/email-composer/use-composer.d.ts +2 -78
  320. package/dist/components/features/event-calendar/event-calendar-day-cell.d.ts +1 -1
  321. package/dist/components/features/event-calendar/event-calendar-event-badge.d.ts +1 -1
  322. package/dist/components/features/event-calendar/event-calendar-header.d.ts +1 -1
  323. package/dist/components/features/event-calendar/event-calendar-legend.d.ts +2 -2
  324. package/dist/components/features/event-calendar/event-calendar.d.ts +1 -1
  325. package/dist/components/features/event-calendar/event-calendar.types.d.ts +126 -21
  326. package/dist/components/features/filters/facets/range-facet.d.ts +13 -8
  327. package/dist/components/features/filters/filter-context.d.ts +9 -0
  328. package/dist/components/features/filters/filters.strings.d.ts +36 -3
  329. package/dist/components/features/filters/filters.types.d.ts +72 -5
  330. package/dist/components/features/filters/hooks/use-filter-draft.d.ts +1 -0
  331. package/dist/components/features/filters/index.d.ts +2 -2
  332. package/dist/components/features/filters/operator-options.d.ts +25 -2
  333. package/dist/components/features/filters/partials/active-filter-item.d.ts +0 -13
  334. package/dist/components/features/filters/partials/async-options-status.d.ts +32 -0
  335. package/dist/components/features/filters/partials/filter-draft-footer.d.ts +11 -0
  336. package/dist/components/features/filters/partials/filter-operator-select.d.ts +4 -2
  337. package/dist/components/features/filters/partials/filter-pill.d.ts +5 -1
  338. package/dist/components/features/filters/partials/filter-tabs.d.ts +2 -1
  339. package/dist/components/features/filters/partials/regular-filter-content.d.ts +1 -1
  340. package/dist/components/features/filters/utils/filter-utils.d.ts +29 -4
  341. package/dist/components/features/global-search/global-search-dialog.d.ts +7 -1
  342. package/dist/components/features/global-search/global-search.d.ts +7 -1
  343. package/dist/components/features/global-search/global-search.strings.d.ts +19 -3
  344. package/dist/components/features/global-search/global-search.types.d.ts +30 -6
  345. package/dist/components/features/global-search/index.d.ts +1 -1
  346. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +6 -1
  347. package/dist/components/features/global-search/partials/global-search-input.d.ts +2 -0
  348. package/dist/components/features/kanban/index.d.ts +2 -2
  349. package/dist/components/features/kanban/kanban-context.d.ts +4 -0
  350. package/dist/components/features/kanban/kanban-keyboard.d.ts +7 -2
  351. package/dist/components/features/kanban/kanban.d.ts +10 -1
  352. package/dist/components/features/kanban/kanban.strings.d.ts +11 -2
  353. package/dist/components/features/kanban/kanban.types.d.ts +26 -0
  354. package/dist/components/features/map/map.d.ts +4 -0
  355. package/dist/components/features/map/place-autocomplete.d.ts +10 -1
  356. package/dist/components/features/media-library/hooks/use-media-library.d.ts +3 -1
  357. package/dist/components/features/media-library/media-library.d.ts +1 -1
  358. package/dist/components/features/media-library/media-library.strings.d.ts +33 -3
  359. package/dist/components/features/media-library/media-library.types.d.ts +47 -2
  360. package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
  361. package/dist/components/features/mentions/hooks/use-mentions-search.d.ts +7 -0
  362. package/dist/components/features/mentions/index.d.ts +1 -1
  363. package/dist/components/features/mentions/mentions.strings.d.ts +10 -2
  364. package/dist/components/features/mentions/partials/mention-chip.d.ts +1 -0
  365. package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +8 -1
  366. package/dist/components/features/mentions/partials/mention-picker.d.ts +8 -1
  367. package/dist/components/features/mentions/partials/mention-search-error.d.ts +6 -0
  368. package/dist/components/features/mentions/utils/index.d.ts +0 -1
  369. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  370. package/dist/components/features/overlays/dialog.d.ts +1 -1
  371. package/dist/components/features/overlays/drawer.d.ts +1 -1
  372. package/dist/components/features/overlays/index.d.ts +2 -2
  373. package/dist/components/features/overlays/overlays.strings.d.ts +2 -1
  374. package/dist/components/features/overlays/overlays.types.d.ts +27 -10
  375. package/dist/components/features/products/components/index.d.ts +0 -10
  376. package/dist/components/features/products/components/product-contract-overview.d.ts +1 -1
  377. package/dist/components/features/products/components/product-details-card.d.ts +1 -1
  378. package/dist/components/features/products/components/product-operations-card.d.ts +1 -1
  379. package/dist/components/features/products/components/product-option-action-menu.d.ts +1 -1
  380. package/dist/components/features/products/components/product-options-summary.d.ts +1 -1
  381. package/dist/components/features/products/components/product-policies-card.d.ts +1 -1
  382. package/dist/components/features/products/components/product-quote-preview-card.d.ts +1 -1
  383. package/dist/components/features/products/components/product-readiness-card.d.ts +1 -1
  384. package/dist/components/features/products/components/product-structure-card.d.ts +1 -1
  385. package/dist/components/features/products/components/product-variant-action-menu.d.ts +1 -1
  386. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  387. package/dist/components/features/products/components/product-variants-table.d.ts +1 -1
  388. package/dist/components/features/products/partials/product-surface.d.ts +15 -0
  389. package/dist/components/features/products/products.strings.d.ts +8 -0
  390. package/dist/components/features/products/products.types.d.ts +25 -7
  391. package/dist/components/features/questionnaire/questionnaire.types.d.ts +6 -4
  392. package/dist/components/features/resource/index.d.ts +2 -3
  393. package/dist/components/features/resource/resource.d.ts +2 -10
  394. package/dist/components/features/resource/resource.types.d.ts +7 -149
  395. package/dist/components/features/resource-assignment/partials/assignment-surface.d.ts +15 -0
  396. package/dist/components/features/resource-assignment/resource-assignment.strings.d.ts +6 -1
  397. package/dist/components/features/resource-assignment/resource-assignment.types.d.ts +6 -0
  398. package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +5 -7
  399. package/dist/components/features/rich-text-editor/partials/html-helpers.d.ts +2 -3
  400. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +6 -2
  401. package/dist/components/features/rich-text-editor/partials/index.d.ts +2 -3
  402. package/dist/components/features/rich-text-editor/partials/rich-text-editor-tiptap.d.ts +0 -1
  403. package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +2 -3
  404. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +13 -1
  405. package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -0
  406. package/dist/components/features/schema-form/schema-form.d.ts +1 -1
  407. package/dist/components/features/schema-form/schema-form.types.d.ts +13 -5
  408. package/dist/components/features/suggestions/suggestions.strings.d.ts +14 -0
  409. package/dist/components/features/suggestions/suggestions.types.d.ts +12 -4
  410. package/dist/components/features/table/data-table.d.ts +1 -1
  411. package/dist/components/features/table/filter-bar.d.ts +1 -1
  412. package/dist/components/features/table/pagination.d.ts +1 -1
  413. package/dist/components/features/table/partials/cell-value.d.ts +1 -1
  414. package/dist/components/features/table/table-body.d.ts +1 -1
  415. package/dist/components/features/table/table-header.d.ts +1 -1
  416. package/dist/components/features/table/table-helpers.d.ts +31 -9
  417. package/dist/components/features/table/table-region.recipes.d.ts +11 -0
  418. package/dist/components/features/table/table-toolbar.d.ts +1 -1
  419. package/dist/components/features/table/table.strings.d.ts +1 -0
  420. package/dist/components/features/table/table.types.d.ts +74 -48
  421. package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +4 -0
  422. package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +10 -7
  423. package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +17 -0
  424. package/dist/components/layout/app-shell/app-shell.types.d.ts +46 -49
  425. package/dist/components/layout/app-shell/index.d.ts +2 -2
  426. package/dist/components/layout/app-shell/shell-regions.d.ts +9 -0
  427. package/dist/components/layout/app-shell/shell-skip-link.d.ts +9 -0
  428. package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
  429. package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
  430. package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
  431. package/dist/components/layout/auth/auth-shell.d.ts +1 -1
  432. package/dist/components/layout/auth/auth.types.d.ts +0 -5
  433. package/dist/components/layout/containers/inline-gutter-context.d.ts +7 -0
  434. package/dist/components/layout/containers/main-landmark-context.d.ts +6 -0
  435. package/dist/components/layout/header/header.types.d.ts +16 -6
  436. package/dist/components/layout/header/partials/header-global-search-trigger.d.ts +1 -1
  437. package/dist/components/layout/header/partials/header-notifications.d.ts +1 -1
  438. package/dist/components/layout/header/partials/header-search.d.ts +1 -1
  439. package/dist/components/layout/hooks/use-command-shortcut.d.ts +10 -1
  440. package/dist/components/layout/layout.types.d.ts +2 -2
  441. package/dist/components/layout/navigation/breadcrumb-progress/breadcrumb-progress.d.ts +1 -1
  442. package/dist/components/layout/navigation/breadcrumb-progress/types.d.ts +9 -0
  443. package/dist/components/layout/navigation/section-nav/section-nav.d.ts +8 -1
  444. package/dist/components/layout/page/index.d.ts +2 -3
  445. package/dist/components/layout/page/page.strings.d.ts +12 -0
  446. package/dist/components/layout/page/page.types.d.ts +7 -110
  447. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  448. package/dist/components/layout/settings/index.d.ts +1 -1
  449. package/dist/components/layout/settings/settings.d.ts +3 -5
  450. package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
  451. package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
  452. package/dist/components/layout/sidebar/components/sidebar-navigation-footer.d.ts +1 -1
  453. package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
  454. package/dist/components/layout/sidebar/index.d.ts +1 -1
  455. package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +15 -7
  456. package/dist/components/layout/sidebar/sidebar.types.d.ts +10 -12
  457. package/dist/components/layout/sidebar/sidebar.utils.d.ts +4 -0
  458. package/dist/components/layout/workspace/workspace.strings.d.ts +2 -2
  459. package/dist/components/layout/workspace/workspace.types.d.ts +13 -7
  460. package/dist/components/primitives/date.d.ts +22 -3
  461. package/dist/components/primitives/file-size.d.ts +8 -2
  462. package/dist/components/primitives/index.d.ts +1 -1
  463. package/dist/components/primitives/initials.d.ts +3 -1
  464. package/dist/components/primitives/link.d.ts +8 -1
  465. package/dist/components/primitives/money.d.ts +1 -1
  466. package/dist/components/primitives/number.d.ts +2 -1
  467. package/dist/components/typography/heading.d.ts +9 -3
  468. package/dist/components/typography/index.d.ts +1 -1
  469. package/dist/components/typography/text-link.d.ts +10 -3
  470. package/dist/components/ui/badge.d.ts +2 -4
  471. package/dist/components/ui/breadcrumb.d.ts +2 -3
  472. package/dist/components/ui/button.d.ts +8 -2
  473. package/dist/components/ui/collapsible.d.ts +1 -4
  474. package/dist/components/ui/command.d.ts +20 -18
  475. package/dist/components/ui/dialog.d.ts +3 -9
  476. package/dist/components/ui/empty.d.ts +2 -2
  477. package/dist/components/ui/input-group.d.ts +3 -3
  478. package/dist/components/ui/item.d.ts +3 -3
  479. package/dist/components/ui/popover.d.ts +3 -7
  480. package/dist/components/ui/sheet.d.ts +4 -12
  481. package/dist/components/ui/sidebar-state.d.ts +6 -1
  482. package/dist/components/ui/sidebar.d.ts +7 -4
  483. package/dist/components/ui/tabs.d.ts +2 -2
  484. package/dist/components/ui/toggle-group.d.ts +3 -3
  485. package/dist/components/ui/toggle.d.ts +2 -2
  486. package/dist/components/ui/tooltip.d.ts +1 -3
  487. package/dist/{containers-CSdc32h9.js → containers-BdfLTP4w.js} +37 -32
  488. package/dist/containers-BdfLTP4w.js.map +1 -0
  489. package/dist/content-block-hooks-Z3iKjqd1.js +17 -0
  490. package/dist/content-block-hooks-Z3iKjqd1.js.map +1 -0
  491. package/dist/{copyable-3fdHfMR3.js → copyable-Bmr14W0d.js} +6 -6
  492. package/dist/{copyable-3fdHfMR3.js.map → copyable-Bmr14W0d.js.map} +1 -1
  493. package/dist/{data-display-Cmj-xZYl.js → data-display-CWe9SOYh.js} +264 -251
  494. package/dist/data-display-CWe9SOYh.js.map +1 -0
  495. package/dist/date-3qsCE1ID.js +209 -0
  496. package/dist/date-3qsCE1ID.js.map +1 -0
  497. package/dist/{date-picker-CyQlFYsP.js → date-picker-D1keJQIG.js} +129 -129
  498. package/dist/date-picker-D1keJQIG.js.map +1 -0
  499. package/dist/date-pickers-D8aJoeHc.js +185 -0
  500. package/dist/date-pickers-D8aJoeHc.js.map +1 -0
  501. package/dist/disclosure-panel-B0HFNZ9x.js.map +1 -1
  502. package/dist/{display-CT_N2a3w.js → display-VlmP1I0i.js} +23 -46
  503. package/dist/display-VlmP1I0i.js.map +1 -0
  504. package/dist/{dropdown-menu-C08iIugv.js → dropdown-menu-B8hjvbkS.js} +9 -9
  505. package/dist/{dropdown-menu-C08iIugv.js.map → dropdown-menu-B8hjvbkS.js.map} +1 -1
  506. package/dist/dropzone-CHBNK3de.js +116 -0
  507. package/dist/dropzone-CHBNK3de.js.map +1 -0
  508. package/dist/features/activities.js +682 -628
  509. package/dist/features/activities.js.map +1 -1
  510. package/dist/features/ai-chat.js +258 -226
  511. package/dist/features/ai-chat.js.map +1 -1
  512. package/dist/features/appointment-calendar.js +436 -340
  513. package/dist/features/appointment-calendar.js.map +1 -1
  514. package/dist/features/async-preview.js +351 -265
  515. package/dist/features/async-preview.js.map +1 -1
  516. package/dist/features/combobox.js +2 -2
  517. package/dist/features/comments.js +1 -1
  518. package/dist/features/data-view.js +212 -151
  519. package/dist/features/data-view.js.map +1 -1
  520. package/dist/features/email-composer/engine.js +1 -1
  521. package/dist/features/email-composer.js +344 -315
  522. package/dist/features/email-composer.js.map +1 -1
  523. package/dist/features/event-calendar.js +504 -355
  524. package/dist/features/event-calendar.js.map +1 -1
  525. package/dist/features/filters.js +2 -2
  526. package/dist/features/global-search.js +250 -206
  527. package/dist/features/global-search.js.map +1 -1
  528. package/dist/features/kanban.js +269 -189
  529. package/dist/features/kanban.js.map +1 -1
  530. package/dist/features/map.js +385 -371
  531. package/dist/features/map.js.map +1 -1
  532. package/dist/features/media-library.js +1571 -1199
  533. package/dist/features/media-library.js.map +1 -1
  534. package/dist/features/mentions.js +2 -2
  535. package/dist/features/overlays.js +2 -2
  536. package/dist/features/products.js +1780 -1691
  537. package/dist/features/products.js.map +1 -1
  538. package/dist/features/questionnaire.js +165 -152
  539. package/dist/features/questionnaire.js.map +1 -1
  540. package/dist/features/resource-assignment.js +223 -191
  541. package/dist/features/resource-assignment.js.map +1 -1
  542. package/dist/features/resource.js +55 -220
  543. package/dist/features/resource.js.map +1 -1
  544. package/dist/features/rich-text-editor.js +3 -3
  545. package/dist/features/schema-form.js +280 -228
  546. package/dist/features/schema-form.js.map +1 -1
  547. package/dist/features/suggestions.js +48 -39
  548. package/dist/features/suggestions.js.map +1 -1
  549. package/dist/features/table.js +2 -2
  550. package/dist/features/theme-tweaker.js +723 -633
  551. package/dist/features/theme-tweaker.js.map +1 -1
  552. package/dist/feedback-DmqmXKLn.js +254 -0
  553. package/dist/feedback-DmqmXKLn.js.map +1 -0
  554. package/dist/{field-affordance-recipes-D6H7tVJi.js → field-affordance-recipes-DfbMadot.js} +13 -9
  555. package/dist/field-affordance-recipes-DfbMadot.js.map +1 -0
  556. package/dist/{field-state-recipes-7sza8QbC.js → field-state-recipes-EtCxpEy3.js} +6 -2
  557. package/dist/field-state-recipes-EtCxpEy3.js.map +1 -0
  558. package/dist/filters-BviMRMLS.js +2692 -0
  559. package/dist/filters-BviMRMLS.js.map +1 -0
  560. package/dist/{focus-recipes-B653VaLq.js → focus-recipes-DSkiUvUp.js} +3 -3
  561. package/dist/focus-recipes-DSkiUvUp.js.map +1 -0
  562. package/dist/{form-field-CAPdwdnZ.js → form-field-BdfCwSoQ.js} +5 -5
  563. package/dist/{form-field-CAPdwdnZ.js.map → form-field-BdfCwSoQ.js.map} +1 -1
  564. package/dist/{form-sizing-CgcrUbLU.js → form-sizing-DE_dZw32.js} +3 -3
  565. package/dist/{form-sizing-CgcrUbLU.js.map → form-sizing-DE_dZw32.js.map} +1 -1
  566. package/dist/{forms-B3W8CH7-.js → forms-B8DzJnBN.js} +35 -35
  567. package/dist/forms-B8DzJnBN.js.map +1 -0
  568. package/dist/forms-numeric-DOBswjKj.js +992 -0
  569. package/dist/forms-numeric-DOBswjKj.js.map +1 -0
  570. package/dist/{header-ZIIsRKxP.js → header-Cq3G0ZRP.js} +100 -95
  571. package/dist/header-Cq3G0ZRP.js.map +1 -0
  572. package/dist/{hooks-BitHSh-Y.js → hooks-DHfeSMAO.js} +34 -14
  573. package/dist/hooks-DHfeSMAO.js.map +1 -0
  574. package/dist/{http-D_6rOnzU.js → http-Cu-GPpss.js} +61 -35
  575. package/dist/http-Cu-GPpss.js.map +1 -0
  576. package/dist/{icon-badge-npxF1SLX.js → icon-badge-B0Kq7wom.js} +3 -3
  577. package/dist/{icon-badge-npxF1SLX.js.map → icon-badge-B0Kq7wom.js.map} +1 -1
  578. package/dist/index.js +6 -6
  579. package/dist/inline-gutter-context-CSqmrMFZ.js +11 -0
  580. package/dist/inline-gutter-context-CSqmrMFZ.js.map +1 -0
  581. package/dist/{input-DIREVYHs.js → input-2YrgTUrz.js} +3 -3
  582. package/dist/{input-DIREVYHs.js.map → input-2YrgTUrz.js.map} +1 -1
  583. package/dist/{input-7KAc7XQL.js → input-DfJyrjoR.js} +6 -6
  584. package/dist/{input-7KAc7XQL.js.map → input-DfJyrjoR.js.map} +1 -1
  585. package/dist/{interaction-recipes-4wZ2tvfb.js → interaction-recipes-DmuS1ase.js} +2 -2
  586. package/dist/{interaction-recipes-4wZ2tvfb.js.map → interaction-recipes-DmuS1ase.js.map} +1 -1
  587. package/dist/item-GJ9mvCcg.js +279 -0
  588. package/dist/item-GJ9mvCcg.js.map +1 -0
  589. package/dist/layout/app-shell.js +1 -1
  590. package/dist/layout/auth.js +1 -1
  591. package/dist/layout/containers.js +1 -1
  592. package/dist/layout/header.js +1 -1
  593. package/dist/layout/hooks.js +1 -1
  594. package/dist/layout/navigation.js +1 -1
  595. package/dist/layout/page.js +2 -2
  596. package/dist/layout/settings.js +2 -2
  597. package/dist/layout/sidebar.js +3 -3
  598. package/dist/layout/workspace.js +1 -1
  599. package/dist/layout.js +12 -12
  600. package/dist/{layout.types-E_GAApzO.js → layout.types-DbtnyAtd.js} +11 -8
  601. package/dist/layout.types-DbtnyAtd.js.map +1 -0
  602. package/dist/lib/anchored-positioning.d.ts +11 -0
  603. package/dist/lib/field-affordance-recipes.d.ts +10 -0
  604. package/dist/lib/field-state-recipes.d.ts +6 -0
  605. package/dist/lib/focus-recipes.d.ts +7 -0
  606. package/dist/lib/format.d.ts +25 -0
  607. package/dist/lib/money-format.d.ts +6 -0
  608. package/dist/lib/motion-recipes.d.ts +6 -0
  609. package/dist/lib/surface-recipes.d.ts +32 -2
  610. package/dist/lib/theme-scope.d.ts +17 -1
  611. package/dist/lib/token-merge.generated.d.ts +13 -19
  612. package/dist/lib/ui-provider/index.d.ts +1 -1
  613. package/dist/lib/ui-provider/types.d.ts +5 -0
  614. package/dist/lib/use-controllable-state.d.ts +16 -0
  615. package/dist/lib/use-copy-feedback.d.ts +15 -0
  616. package/dist/lib/utils.js +1 -1
  617. package/dist/lib/variant-props.d.ts +9 -0
  618. package/dist/main-landmark-context-BAsyqp2I.js +11 -0
  619. package/dist/main-landmark-context-BAsyqp2I.js.map +1 -0
  620. package/dist/mentions-zz0ewNIq.js +670 -0
  621. package/dist/mentions-zz0ewNIq.js.map +1 -0
  622. package/dist/{message-BJHnn43M.js → message-BiiVrRrm.js} +10 -7
  623. package/dist/{message-BJHnn43M.js.map → message-BiiVrRrm.js.map} +1 -1
  624. package/dist/{metadata-list-XkqZ_UXH.js → metadata-list-G85roWjS.js} +13 -12
  625. package/dist/metadata-list-G85roWjS.js.map +1 -0
  626. package/dist/{motion-recipes-DitYv6P2.js → motion-recipes-CUc_aHuG.js} +7 -4
  627. package/dist/motion-recipes-CUc_aHuG.js.map +1 -0
  628. package/dist/navigation-C0Be5C3i.js +304 -0
  629. package/dist/navigation-C0Be5C3i.js.map +1 -0
  630. package/dist/{navigation-Bt-v7rWP.js → navigation-CmqaQR_G.js} +99 -103
  631. package/dist/navigation-CmqaQR_G.js.map +1 -0
  632. package/dist/number-NFWKIoiK.js +340 -0
  633. package/dist/number-NFWKIoiK.js.map +1 -0
  634. package/dist/{overflow-tab-bar-BQCA2Zn2.js → overflow-tab-bar-DV7HE_3t.js} +8 -8
  635. package/dist/{overflow-tab-bar-BQCA2Zn2.js.map → overflow-tab-bar-DV7HE_3t.js.map} +1 -1
  636. package/dist/overlays-D-gAIfPF.js +1018 -0
  637. package/dist/overlays-D-gAIfPF.js.map +1 -0
  638. package/dist/page-D4pQhgSq.js +216 -0
  639. package/dist/page-D4pQhgSq.js.map +1 -0
  640. package/dist/{page-header-commands-DIKspJfx.js → page-header-commands-elelNOfd.js} +29 -29
  641. package/dist/{page-header-commands-DIKspJfx.js.map → page-header-commands-elelNOfd.js.map} +1 -1
  642. package/dist/{pagination-Br8TdV9A.js → pagination-BuSWw1US.js} +22 -23
  643. package/dist/pagination-BuSWw1US.js.map +1 -0
  644. package/dist/{popover-k8TdUcAt.js → popover-BpMxbqEK.js} +73 -69
  645. package/dist/popover-BpMxbqEK.js.map +1 -0
  646. package/dist/{popover-menu-yn-o0kyA.js → popover-menu-CO-_iiuz.js} +7 -7
  647. package/dist/{popover-menu-yn-o0kyA.js.map → popover-menu-CO-_iiuz.js.map} +1 -1
  648. package/dist/{popover.recipes-DJ0AkUan.js → popover.recipes-BqkdvlZn.js} +3 -4
  649. package/dist/{popover.recipes-DJ0AkUan.js.map → popover.recipes-BqkdvlZn.js.map} +1 -1
  650. package/dist/{portal-recipes-DyUXqUtD.js → portal-recipes-BPeS4rGB.js} +2 -2
  651. package/dist/{portal-recipes-DyUXqUtD.js.map → portal-recipes-BPeS4rGB.js.map} +1 -1
  652. package/dist/primitives-BlC1lXBr.js +447 -0
  653. package/dist/primitives-BlC1lXBr.js.map +1 -0
  654. package/dist/primitives.js +4 -4
  655. package/dist/{progress-DZFXXzPs.js → progress-RARK8AjB.js} +5 -5
  656. package/dist/{progress-DZFXXzPs.js.map → progress-RARK8AjB.js.map} +1 -1
  657. package/dist/receipt-CUf2Vegp.js +114 -0
  658. package/dist/receipt-CUf2Vegp.js.map +1 -0
  659. package/dist/{rich-text-BnTzZjIo.js → rich-text-Cypm9__d.js} +7 -8
  660. package/dist/{rich-text-BnTzZjIo.js.map → rich-text-Cypm9__d.js.map} +1 -1
  661. package/dist/rich-text-editor-Z6cQepsA.js +919 -0
  662. package/dist/rich-text-editor-Z6cQepsA.js.map +1 -0
  663. package/dist/rich-text-editor-toolbar-DYbRJARB.js +100 -0
  664. package/dist/rich-text-editor-toolbar-DYbRJARB.js.map +1 -0
  665. package/dist/rich-text-tree-DdKHIJx4.js +154 -0
  666. package/dist/rich-text-tree-DdKHIJx4.js.map +1 -0
  667. package/dist/safe-image-src-C6kQSMBZ.js +17 -0
  668. package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
  669. package/dist/{scroll-area-Bj6CRUif.js → scroll-area-B9HKbji0.js} +3 -3
  670. package/dist/{scroll-area-Bj6CRUif.js.map → scroll-area-B9HKbji0.js.map} +1 -1
  671. package/dist/{separator-DM6gs2vu.js → separator-DaDe26sf.js} +3 -3
  672. package/dist/separator-DaDe26sf.js.map +1 -0
  673. package/dist/{separator-B9ewiCGO.js → separator-KGsNXt2J.js} +2 -2
  674. package/dist/{separator-B9ewiCGO.js.map → separator-KGsNXt2J.js.map} +1 -1
  675. package/dist/services/actions/action-adapters.d.ts +5 -2
  676. package/dist/services/actions/index.d.ts +1 -1
  677. package/dist/services/actions.js +2 -2
  678. package/dist/services/actions.js.map +1 -1
  679. package/dist/settings-D5j_RJvT.js +160 -0
  680. package/dist/settings-D5j_RJvT.js.map +1 -0
  681. package/dist/sheet-B6j_BE9O.js +241 -0
  682. package/dist/sheet-B6j_BE9O.js.map +1 -0
  683. package/dist/{sidebar-CmD6a-HK.js → sidebar-C-iQ_TJP.js} +377 -351
  684. package/dist/sidebar-C-iQ_TJP.js.map +1 -0
  685. package/dist/sidebar-D5VO2W8S.js +715 -0
  686. package/dist/sidebar-D5VO2W8S.js.map +1 -0
  687. package/dist/{skeleton-DDgdhmu9.js → skeleton-Cab_KgVo.js} +12 -12
  688. package/dist/skeleton-Cab_KgVo.js.map +1 -0
  689. package/dist/{smart-card-B6vLxqa_.js → smart-card-C59z6KFO.js} +217 -210
  690. package/dist/smart-card-C59z6KFO.js.map +1 -0
  691. package/dist/{structure-DZJ2wbAU.js → structure-DElaQwwN.js} +2 -2
  692. package/dist/{structure-DZJ2wbAU.js.map → structure-DElaQwwN.js.map} +1 -1
  693. package/dist/style.css +1 -1
  694. package/dist/{surface-recipes-C8mNycaY.js → surface-recipes-DV6rrOFq.js} +10 -2
  695. package/dist/surface-recipes-DV6rrOFq.js.map +1 -0
  696. package/dist/{table-CXSPHH25.js → table-CSRUgpdK.js} +62 -61
  697. package/dist/table-CSRUgpdK.js.map +1 -0
  698. package/dist/table-DdXDBsR_.js +1657 -0
  699. package/dist/table-DdXDBsR_.js.map +1 -0
  700. package/dist/{tabs-C4Kr_hCr.js → tabs-WnHfV2pM.js} +27 -27
  701. package/dist/tabs-WnHfV2pM.js.map +1 -0
  702. package/dist/{text-inputs-jdkS3ReG.js → text-inputs-ljyBYaCd.js} +112 -112
  703. package/dist/text-inputs-ljyBYaCd.js.map +1 -0
  704. package/dist/theme.css +21 -5
  705. package/dist/timelines-mOmS9Eh3.js +479 -0
  706. package/dist/timelines-mOmS9Eh3.js.map +1 -0
  707. package/dist/tooltip-yjX-Uv-p.js +112 -0
  708. package/dist/tooltip-yjX-Uv-p.js.map +1 -0
  709. package/dist/{tree-CeYVzdFE.js → tree-YpkxUG2Z.js} +80 -72
  710. package/dist/tree-YpkxUG2Z.js.map +1 -0
  711. package/dist/typography/rich-text.js +1 -1
  712. package/dist/{typography-C7-YMW1S.js → typography-C0dELqYV.js} +46 -40
  713. package/dist/typography-C0dELqYV.js.map +1 -0
  714. package/dist/typography.js +1 -1
  715. package/dist/{ui-provider-C-74NVLc.js → ui-provider-Bu1S-o96.js} +4 -3
  716. package/dist/ui-provider-Bu1S-o96.js.map +1 -0
  717. package/dist/ui-provider.js +2 -2
  718. package/dist/{upload-Hdm5gObf.js → upload-DMuMYJFT.js} +276 -268
  719. package/dist/upload-DMuMYJFT.js.map +1 -0
  720. package/dist/{usage-card-9s8hLDfn.js → usage-card-DDPki5P1.js} +57 -54
  721. package/dist/usage-card-DDPki5P1.js.map +1 -0
  722. package/dist/use-controllable-state-BlP8SyBI.js +13 -0
  723. package/dist/use-controllable-state-BlP8SyBI.js.map +1 -0
  724. package/dist/use-copy-feedback-CzcaqlLf.js +28 -0
  725. package/dist/use-copy-feedback-CzcaqlLf.js.map +1 -0
  726. package/dist/use-metric-format-options-Dk4rC1NO.js +251 -0
  727. package/dist/use-metric-format-options-Dk4rC1NO.js.map +1 -0
  728. package/dist/{utils-DhuoqFy4.js → utils-BVbAG2J6.js} +98 -76
  729. package/dist/utils-BVbAG2J6.js.map +1 -0
  730. package/dist/value-inputs-h5MwjGCo.js +982 -0
  731. package/dist/value-inputs-h5MwjGCo.js.map +1 -0
  732. package/dist/value-typography-D15uwfj-.js +154 -0
  733. package/dist/value-typography-D15uwfj-.js.map +1 -0
  734. package/dist/workspace-DIryPqBt.js +400 -0
  735. package/dist/workspace-DIryPqBt.js.map +1 -0
  736. package/docs/consumer-skill/SKILL.md +7 -0
  737. package/docs/consumer-skill/agents/themelia-ui-designer.md +11 -2
  738. package/docs/consumer-skill/examples/analytics.tsx +1 -1
  739. package/docs/consumer-skill/examples/app-layout.tsx +3 -3
  740. package/docs/consumer-skill/examples/commerce-lines.tsx +7 -5
  741. package/docs/consumer-skill/examples/detail.tsx +3 -2
  742. package/docs/consumer-skill/examples/email-composer.tsx +1 -1
  743. package/docs/consumer-skill/examples/index-table.tsx +2 -2
  744. package/docs/consumer-skill/examples/scoped-directory.tsx +7 -6
  745. package/docs/consumer-skill/references/agents-md.md +20 -16
  746. package/docs/consumer-skill/references/analytics.md +20 -6
  747. package/docs/consumer-skill/references/building-views.md +213 -0
  748. package/docs/consumer-skill/references/catalogue.md +617 -0
  749. package/docs/consumer-skill/references/component-contracts.json +10202 -18084
  750. package/docs/consumer-skill/references/composition.md +21 -17
  751. package/docs/consumer-skill/references/discovery.md +8 -5
  752. package/docs/consumer-skill/references/installation.md +10 -4
  753. package/docs/consumer-skill/references/integration.md +5 -5
  754. package/docs/consumer-skill/references/product-composition.md +2 -2
  755. package/docs/consumer-skill/references/public-api.json +580 -633
  756. package/docs/consumer-skill/references/review.md +6 -4
  757. package/docs/consumer-skill/references/screen-archetypes.md +2 -2
  758. package/docs/consumer-skill/references/theming.md +1 -1
  759. package/docs/consumer-skill/references/tokens.json +4 -4
  760. package/docs/consumer-skill/references/workflows.md +7 -7
  761. package/docs/consumer-skill/scripts/composition-policy.mjs +40 -20
  762. package/docs/consumer-skill/scripts/composition.mjs +4 -1
  763. package/docs/consumer-skill/scripts/discovery.mjs +3 -1
  764. package/docs/consumer-skill/scripts/setup-skills.mjs +31 -4
  765. package/docs/consumer-skills/themelia-components/SKILL.md +8 -4
  766. package/docs/consumer-skills/themelia-composition/SKILL.md +7 -3
  767. package/docs/consumer-skills/themelia-design/SKILL.md +7 -1
  768. package/docs/consumer-skills/themelia-tokenization/SKILL.md +1 -1
  769. package/package.json +9 -12
  770. package/templates/README.md +3 -2
  771. package/templates/admin-shell-template.tsx +49 -9
  772. package/templates/analytics-operations-template.tsx +20 -24
  773. package/templates/customers-template.tsx +12 -9
  774. package/templates/index.ts +2 -8
  775. package/templates/orders-template.tsx +28 -24
  776. package/templates/products-template.tsx +14 -4
  777. package/templates/user-permissions-template.tsx +11 -14
  778. package/dist/accordion-0tQUZ20r.js.map +0 -1
  779. package/dist/action-menu-C0gjzLyE.js +0 -284
  780. package/dist/action-menu-C0gjzLyE.js.map +0 -1
  781. package/dist/ai-artifact-CGGpQryR.js +0 -1200
  782. package/dist/ai-artifact-CGGpQryR.js.map +0 -1
  783. package/dist/anchored-positioning-DPnKTvNs.js +0 -6
  784. package/dist/anchored-positioning-DPnKTvNs.js.map +0 -1
  785. package/dist/app-shell-EHuuRDGy.js +0 -321
  786. package/dist/app-shell-EHuuRDGy.js.map +0 -1
  787. package/dist/auth-B0girIk_.js.map +0 -1
  788. package/dist/badge-wWauMgAt.js.map +0 -1
  789. package/dist/base/sheet.js +0 -3
  790. package/dist/breadcrumbs-Bp9Ke7kd.js.map +0 -1
  791. package/dist/button-ChBovTx0.js.map +0 -1
  792. package/dist/buttons-DeW0bQeK.js.map +0 -1
  793. package/dist/cascader-CrAl9zD5.js +0 -439
  794. package/dist/cascader-CrAl9zD5.js.map +0 -1
  795. package/dist/choice-inputs-DHGtx0QV.js.map +0 -1
  796. package/dist/code-block-BSJyq9e-.js.map +0 -1
  797. package/dist/collapsible-BzJ91LUG.js +0 -81
  798. package/dist/collapsible-BzJ91LUG.js.map +0 -1
  799. package/dist/combobox-Bcvu5J8O.js +0 -363
  800. package/dist/combobox-Bcvu5J8O.js.map +0 -1
  801. package/dist/combobox-C2JiSQPc.js +0 -915
  802. package/dist/combobox-C2JiSQPc.js.map +0 -1
  803. package/dist/command-9e52NPgK.js +0 -425
  804. package/dist/command-9e52NPgK.js.map +0 -1
  805. package/dist/comments-BsgErEqd.js +0 -1174
  806. package/dist/comments-BsgErEqd.js.map +0 -1
  807. package/dist/components/base/buttons/tooltip-button.d.ts +0 -7
  808. package/dist/components/base/display/content-block.d.ts +0 -75
  809. package/dist/components/base/display/content-block.strings.d.ts +0 -5
  810. package/dist/components/base/sheet/index.d.ts +0 -29
  811. package/dist/components/blocks/ai/use-copy-feedback.d.ts +0 -6
  812. package/dist/components/blocks/data-display/metadata/index.d.ts +0 -30
  813. package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +0 -10
  814. package/dist/components/features/resource/resource.strings.d.ts +0 -12
  815. package/dist/components/features/rich-text-editor/partials/rich-text-editor-fallback.d.ts +0 -8
  816. package/dist/components/features/sync/index.d.ts +0 -26
  817. package/dist/components/features/sync/sync-range-dialog-form.d.ts +0 -5
  818. package/dist/components/features/sync/sync.strings.d.ts +0 -18
  819. package/dist/components/features/sync/sync.types.d.ts +0 -44
  820. package/dist/components/layout/page/partials/page-actions.d.ts +0 -3
  821. package/dist/components/ui/slot.d.ts +0 -6
  822. package/dist/containers-CSdc32h9.js.map +0 -1
  823. package/dist/data-display-Cmj-xZYl.js.map +0 -1
  824. package/dist/date-Br0FicVv.js +0 -144
  825. package/dist/date-Br0FicVv.js.map +0 -1
  826. package/dist/date-picker-CyQlFYsP.js.map +0 -1
  827. package/dist/date-pickers-tj2MXmXd.js +0 -185
  828. package/dist/date-pickers-tj2MXmXd.js.map +0 -1
  829. package/dist/display-CT_N2a3w.js.map +0 -1
  830. package/dist/features/sync.js +0 -142
  831. package/dist/features/sync.js.map +0 -1
  832. package/dist/feedback-Dzo1xtAU.js +0 -246
  833. package/dist/feedback-Dzo1xtAU.js.map +0 -1
  834. package/dist/field-affordance-recipes-D6H7tVJi.js.map +0 -1
  835. package/dist/field-state-recipes-7sza8QbC.js.map +0 -1
  836. package/dist/filters-Dl80yYtN.js +0 -2415
  837. package/dist/filters-Dl80yYtN.js.map +0 -1
  838. package/dist/focus-recipes-B653VaLq.js.map +0 -1
  839. package/dist/forms-B3W8CH7-.js.map +0 -1
  840. package/dist/forms-numeric-CwjQJe-O.js +0 -991
  841. package/dist/forms-numeric-CwjQJe-O.js.map +0 -1
  842. package/dist/header-ZIIsRKxP.js.map +0 -1
  843. package/dist/hooks-BitHSh-Y.js.map +0 -1
  844. package/dist/http-D_6rOnzU.js.map +0 -1
  845. package/dist/item-FfWnaYST.js +0 -278
  846. package/dist/item-FfWnaYST.js.map +0 -1
  847. package/dist/layout.types-E_GAApzO.js.map +0 -1
  848. package/dist/media-gallery-C81DAnKI.js +0 -203
  849. package/dist/media-gallery-C81DAnKI.js.map +0 -1
  850. package/dist/mentions-qOnedSt4.js +0 -639
  851. package/dist/mentions-qOnedSt4.js.map +0 -1
  852. package/dist/metadata-list-XkqZ_UXH.js.map +0 -1
  853. package/dist/motion-recipes-DitYv6P2.js.map +0 -1
  854. package/dist/navigation-BgtPJAhi.js +0 -288
  855. package/dist/navigation-BgtPJAhi.js.map +0 -1
  856. package/dist/navigation-Bt-v7rWP.js.map +0 -1
  857. package/dist/number-CYqBcrSj.js +0 -346
  858. package/dist/number-CYqBcrSj.js.map +0 -1
  859. package/dist/overlays-CC8zI3Du.js +0 -1017
  860. package/dist/overlays-CC8zI3Du.js.map +0 -1
  861. package/dist/page-BoQ1VaFJ.js +0 -331
  862. package/dist/page-BoQ1VaFJ.js.map +0 -1
  863. package/dist/pagination-Br8TdV9A.js.map +0 -1
  864. package/dist/popover-k8TdUcAt.js.map +0 -1
  865. package/dist/primitives-BkkQjYl7.js +0 -385
  866. package/dist/primitives-BkkQjYl7.js.map +0 -1
  867. package/dist/receipt-C7LhOg7Q.js +0 -116
  868. package/dist/receipt-C7LhOg7Q.js.map +0 -1
  869. package/dist/rich-text-editor-CAurDwT5.js +0 -1273
  870. package/dist/rich-text-editor-CAurDwT5.js.map +0 -1
  871. package/dist/rich-text-editor-toolbar-DbXig7Jk.js +0 -99
  872. package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +0 -1
  873. package/dist/rich-text-tree-BqyQ_7-R.js +0 -66
  874. package/dist/rich-text-tree-BqyQ_7-R.js.map +0 -1
  875. package/dist/sanitize-html-BWkH4dLM.js +0 -105
  876. package/dist/sanitize-html-BWkH4dLM.js.map +0 -1
  877. package/dist/separator-DM6gs2vu.js.map +0 -1
  878. package/dist/settings-DZPHgpx4.js +0 -155
  879. package/dist/settings-DZPHgpx4.js.map +0 -1
  880. package/dist/sheet-C4DHsgLk.js +0 -250
  881. package/dist/sheet-C4DHsgLk.js.map +0 -1
  882. package/dist/sidebar-C8BnDwTH.js +0 -709
  883. package/dist/sidebar-C8BnDwTH.js.map +0 -1
  884. package/dist/sidebar-CmD6a-HK.js.map +0 -1
  885. package/dist/skeleton-DDgdhmu9.js.map +0 -1
  886. package/dist/slot-CLF9kLrS.js +0 -16
  887. package/dist/slot-CLF9kLrS.js.map +0 -1
  888. package/dist/smart-card-B6vLxqa_.js.map +0 -1
  889. package/dist/surface-recipes-C8mNycaY.js.map +0 -1
  890. package/dist/table-CBonSdTp.js +0 -1584
  891. package/dist/table-CBonSdTp.js.map +0 -1
  892. package/dist/table-CXSPHH25.js.map +0 -1
  893. package/dist/tabs-C4Kr_hCr.js.map +0 -1
  894. package/dist/text-inputs-jdkS3ReG.js.map +0 -1
  895. package/dist/timelines-CoPwdJP0.js +0 -458
  896. package/dist/timelines-CoPwdJP0.js.map +0 -1
  897. package/dist/tooltip-31NwIpTo.js +0 -113
  898. package/dist/tooltip-31NwIpTo.js.map +0 -1
  899. package/dist/tree-CeYVzdFE.js.map +0 -1
  900. package/dist/typography-C7-YMW1S.js.map +0 -1
  901. package/dist/ui-provider-C-74NVLc.js.map +0 -1
  902. package/dist/upload-Hdm5gObf.js.map +0 -1
  903. package/dist/upload-queue-D0sYPuqo.js +0 -409
  904. package/dist/upload-queue-D0sYPuqo.js.map +0 -1
  905. package/dist/usage-card-9s8hLDfn.js.map +0 -1
  906. package/dist/utils-DhuoqFy4.js.map +0 -1
  907. package/dist/value-inputs-D3aPgq9H.js +0 -980
  908. package/dist/value-inputs-D3aPgq9H.js.map +0 -1
  909. package/dist/value-typography-uSzzG9Gf.js +0 -122
  910. package/dist/value-typography-uSzzG9Gf.js.map +0 -1
  911. package/dist/workspace-CC8Vchiu.js +0 -411
  912. package/dist/workspace-CC8Vchiu.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-editor-Z6cQepsA.js","names":["NumberValue","_Fragment","_Fragment","EditorContent","StarterKit","_Fragment","cn","Text","Button","Stack","safeImageSrc","SecondaryValue","Number$1","Input","FormField","resolveFieldInvalid","richTextEditorRecipes","RichTextEditorToolbar","defaultRichTextEditorStrings","Fragment$1","TiptapReact","StarterKitModule","readCaretContext","sel","range","startNode","startOffset","block","editable","text","cursor","prev","rect","r","replaceBeforeCaret","editor","selection","from","length","html","CountsFooterText","chars","words","overLimit","maxLength","regionRecipes","className","strings","CountsFooter","sourceMode","sourceValue","editorFieldAria","listboxId","label","activeOptionId","normalizeHtml","trimmed","value","toEditorContent","normalized","inlineReferenceChipClassName","NODE_NAME","deleteAdjacentReference","state","node","direction","$from","tr","inlineReferenceNode","getInlineReferenceNode","element","attributes","HTMLAttributes","dom","UPLOAD_ATTRIBUTE","UPLOAD_PLACEHOLDER_CLASS","PLACEHOLDER_PATTERN","stripUploadPlaceholders","acceptsImageFile","type","file","name","accept","entry","altFromFileName","imageFilesFrom","data","uploadSequence","useImageUploadQueue","uploads","setUploads","useState","notice","setNotice","jobs","useRef","job","forget","useCallback","id","current","upload","run","images","controller","pending","result","src","placed","adapterRef","error","refused","files","reason","message","interpolateString","ImageUploadStatus","failed","AlertCircle","Loader2","onRetry","onRemove","ImageUploadPortals","queue","target","createPortal","useImageInsertControl","inputRef","beforeOpenRef","beforeOpen","enabled","useMemo","ImagePlus","event","onFiles","ImageDetailsBar","inputId","useId","alt","onDismissNotice","onAltChange","positiveNumber","number","imageNode","imageUploadNode","getImageNode","getImageUploadNode","valueHtml","EditorContent$1","useTiptapEditor","useTiptapEditorState","StarterKit$1","TiptapRichTextEditor","forwardRef","ariaLabel","ariaLabelledBy","ariaDescribedBy","ariaInvalidProp","stringsProp","useStrings","invalid","imagesEnabled","queueRef","editorInstanceRef","isFocused","setIsFocused","setSourceMode","sourceRef","setSourceValue","isFocusedRef","externalValueRef","valueRef","reportingRef","awaitingEchoRef","reportValue","nested","onValueChange","onCaretChangeRef","onCaretChange","keyHandler","disabled","onEditorKeyDown","keyHandlerRef","suggestionPopup","editorLabel","editorAttributes","fieldAttributes","ariaInvalid","autoFocus","currentEditor","imagesRef","moved","at","view","useLayoutEffect","useEffect","next","awaiting","echoed","handler","useImperativeHandle","ref","emitValue","findNode","found","match","created","image","uploadQueue","imageInsert","toolbarItems","extraToolbarItems","activeImage","setActiveImage","sync","nodeBefore","nodeAfter","bodyMinHeightClassName","bodyHeight","compact","contentStyle","minHeight","maxHeight","toggleSourceMode","toolbarState","item","toolbarButtons","Bold","Italic","Strikethrough","List","ListOrdered","Quote","Undo2","Redo2","countsFooter","showCounts","placeholderText","placeholder","placeholderNode","onBlur","footerSlot","RichTextEditor","props"],"sources":["../src/components/features/rich-text-editor/partials/caret-helpers.ts","../src/components/features/rich-text-editor/partials/counts-footer.tsx","../src/components/features/rich-text-editor/partials/editor-field-aria.ts","../src/components/features/rich-text-editor/partials/html-helpers.ts","../src/components/features/rich-text-editor/partials/inline-reference-node.ts","../src/components/features/rich-text-editor/partials/image-uploads.tsx","../src/components/features/rich-text-editor/partials/image-nodes.ts","../src/components/features/rich-text-editor/partials/rich-text-editor-tiptap.tsx","../src/components/features/rich-text-editor/rich-text-editor.tsx"],"sourcesContent":["/**\n * Caret-introspection helpers used by `<RichTextEditor>` to expose the\n * text before the caret and replace a leading run of characters with\n * inline HTML — the building blocks for `@`-mention chips and similar\n * inline triggers.\n */\nimport type { RichTextCaretContext, TiptapEditor } from '../rich-text-editor.types';\n\n/**\n * Read the current selection's caret context.\n *\n * Walks back from the caret through the current text node and any\n * preceding sibling text nodes inside the same block-level container\n * (paragraph / list-item / heading) collecting plain text. Returns the\n * accumulated text plus the caret's bounding rect when available.\n *\n * Returns `null` when there is no live selection or the selection isn't\n * a text caret inside a contenteditable.\n */\nexport function readCaretContext(): RichTextCaretContext | null {\n\tif (typeof window === 'undefined') return null;\n\tconst sel = window.getSelection();\n\tif (!sel || sel.rangeCount === 0) return null;\n\tconst range = sel.getRangeAt(0);\n\tif (!range.collapsed) return null;\n\n\tconst startNode = range.startContainer;\n\tconst startOffset = range.startOffset;\n\n\tlet block: Node | null = startNode;\n\twhile (block && block.nodeType !== Node.ELEMENT_NODE) {\n\t\tblock = block.parentNode;\n\t}\n\tif (!block) return null;\n\tconst editable =\n\t\t(block as Element).closest('[contenteditable=\"true\"]') ??\n\t\t(block as Element).closest('.ProseMirror');\n\tif (!editable) return null;\n\n\tlet text = '';\n\tif (startNode.nodeType === Node.TEXT_NODE) {\n\t\ttext = (startNode.textContent ?? '').slice(0, startOffset);\n\t}\n\n\tlet cursor: Node | null = startNode;\n\twhile (cursor && cursor !== editable && cursor !== block) {\n\t\tlet prev: Node | null = cursor.previousSibling;\n\t\twhile (prev) {\n\t\t\ttext = (prev.textContent ?? '') + text;\n\t\t\tprev = prev.previousSibling;\n\t\t}\n\t\tcursor = cursor.parentNode;\n\t\tif (cursor && (cursor as Element).matches?.('p, li, h1, h2, h3, h4, h5, h6, blockquote')) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tlet rect: RichTextCaretContext['rect'];\n\tconst r = range.getBoundingClientRect();\n\tif (r && (r.top || r.left || r.right || r.bottom)) {\n\t\trect = { top: r.top, left: r.left, bottom: r.bottom, right: r.right };\n\t}\n\n\treturn { textBefore: text, rect };\n}\n\n/**\n * Replace the `length` characters before the caret with `html`. ProseMirror\n * owns its selection, so the run is replaced in document positions inside the\n * caret's text block: the trigger text and the chip swap in one transaction,\n * and the editor reports the normalized value through its update.\n */\nexport function replaceBeforeCaret(editor: TiptapEditor, length: number, html: string): void {\n\tconst { selection } = editor.state;\n\tif (!selection.empty) return;\n\tconst from = selection.from - Math.min(length, selection.$from.parentOffset);\n\teditor.chain().focus().insertContentAt({ from, to: selection.from }, html).run();\n}\n","import { Number as NumberValue, SecondaryValue } from '../../../primitives';\nimport { Text } from '../../../typography';\nimport { cn } from '../../../../lib/utils';\n\nimport type { RichTextEditorStrings } from '../rich-text-editor.strings';\nimport type { TiptapEditor } from '../rich-text-editor.types';\nimport { regionRecipes } from '../../../../lib/surface-recipes';\n\nexport interface CountsFooterTextProps {\n\t/** Plain-text projection of the document, used for the character count. */\n\ttext: string;\n\t/** Character cap the count is measured against. */\n\tmaxLength?: number;\n\t/** Overrides this surface's own copy. */\n\tstrings: RichTextEditorStrings;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nexport function CountsFooterText({ text, maxLength, strings, className }: CountsFooterTextProps) {\n\tconst chars = text.length;\n\tconst words = text.trim().length > 0 ? text.trim().split(/\\s+/).length : 0;\n\tconst overLimit = typeof maxLength === 'number' && chars > maxLength;\n\n\treturn (\n\t\t<div className={cn('counts-footer-text--component flex items-center justify-end gap-space-lg px-surface-xs py-space-sm', regionRecipes.footer, className)}>\n\t\t\t<Text\n\t\t\t\ttag=\"span\"\n\t\t\t\tsize=\"xs\"\n\t\t\t\ttype={overLimit ? 'error' : 'secondary'}\n\t\t\t\tweight={overLimit ? 'medium' : 'regular'}\n\t\t\t\tclassName={cn('tabular-nums')}\n\t\t\t>\n\t\t\t\t<NumberValue value={chars} size=\"xs\" type={overLimit ? 'error' : 'secondary'} align=\"left\" />\n\t\t\t\t{typeof maxLength === 'number' && (\n\t\t\t\t\t<> / <NumberValue value={maxLength} size=\"xs\" type={overLimit ? 'error' : 'secondary'} align=\"left\" /></>\n\t\t\t\t)} {strings.counts.characters}\n\t\t\t</Text>\n\t\t\t<SecondaryValue size=\"xs\" className=\"tabular-nums\">\n\t\t\t\t<NumberValue value={words} size=\"xs\" type=\"secondary\" align=\"left\" /> {strings.counts.words}\n\t\t\t</SecondaryValue>\n\t\t</div>\n\t);\n}\n\nCountsFooterText.displayName = 'CountsFooterText';\n\nexport interface CountsFooterProps {\n\t/** The editor instance, for reading counts directly. */\n\teditor: TiptapEditor;\n\t/** Whether the editor is showing HTML source. */\n\tsourceMode: boolean;\n\t/** Raw HTML while in source mode. */\n\tsourceValue: string;\n\t/** Character cap the count is measured against. */\n\tmaxLength?: number;\n\t/** Overrides this surface's own copy. */\n\tstrings: RichTextEditorStrings;\n}\n\nexport function CountsFooter({\n\teditor,\n\tsourceMode,\n\tsourceValue,\n\tmaxLength,\n\tstrings,\n}: CountsFooterProps) {\n\tconst text = sourceMode\n\t\t? sourceValue.replace(/<[^>]*>/g, '')\n\t\t: (editor?.getText() ?? '');\n\n\treturn <CountsFooterText text={text} maxLength={maxLength} strings={strings} />;\n}\n\nCountsFooter.displayName = 'CountsFooter';\n","export function editorFieldAria(label: string, listboxId?: string, activeOptionId?: string) {\n\tif (!listboxId) {\n\t\treturn { role: 'textbox', 'aria-label': label, 'aria-multiline': 'true' } as const;\n\t}\n\n\treturn {\n\t\trole: 'combobox',\n\t\t'aria-label': label,\n\t\t'aria-expanded': 'true',\n\t\t'aria-haspopup': 'listbox',\n\t\t'aria-autocomplete': 'list',\n\t\t'aria-controls': listboxId,\n\t\t...(activeOptionId ? { 'aria-activedescendant': activeOptionId } : {}),\n\t} as const;\n}\n","/**\n * Plain HTML normalization for the editor. Keeping these out of the React\n * tree means the editor partials stay focused on rendering.\n */\n\nexport function normalizeHtml(value: string): string {\n\tconst trimmed = value.trim();\n\n\tif (trimmed === '' || trimmed === '<p></p>' || trimmed === '<p><br></p>') {\n\t\treturn '';\n\t}\n\n\treturn trimmed;\n}\n\nexport function toEditorContent(value: string): string {\n\tconst normalized = normalizeHtml(value);\n\treturn normalized === '' ? '<p></p>' : normalized;\n}\n","import * as TiptapReact from '@tiptap/react';\n\n/**\n * Inline references (`@person`, `#booking`) as one atomic editor token.\n *\n * The serialized HTML is the mentions contract written by `buildMentionHtml`\n * and read by `parseMentionsFromHtml`/`MentionContent`:\n *\n * <span class=\"rsc-mention\" data-ref-id=\"…\" data-ref-kind=\"…\" data-ref-tone=\"…\"\n * contenteditable=\"false\">@Label</span>\n *\n * Without this node the editor schema had no place for that span, so a picked\n * mention collapsed into plain text. Inside the editor the token keeps the\n * `.rsc-mention` hook, so mention-chip.css (the inline Badge utilities and\n * shared tone tints) draws it exactly as it draws serialized chips; it is\n * selectable as a unit, and Backspace/Delete remove it in one keystroke.\n */\n\nexport const inlineReferenceChipClassName = 'rsc-mention inline-reference--chip';\n\nconst NODE_NAME = 'inlineReference';\n\nfunction deleteAdjacentReference(direction: 'backward' | 'forward') {\n\treturn ({ editor }: { editor: TiptapReact.Editor }) => editor.commands.command(({ tr, state }) => {\n\t\tconst { selection } = state;\n\t\tif (!selection.empty) return false;\n\t\tconst { $from } = selection;\n\t\tconst node = direction === 'backward' ? $from.nodeBefore : $from.nodeAfter;\n\t\tif (node?.type.name !== NODE_NAME) return false;\n\t\tconst from = direction === 'backward' ? $from.pos - node.nodeSize : $from.pos;\n\t\ttr.delete(from, from + node.nodeSize);\n\t\treturn true;\n\t});\n}\n\nlet inlineReferenceNode: TiptapReact.Node | null = null;\n\n/** Created on first use, so the optional Tiptap runtime is only touched by the editor that needs it. */\nexport function getInlineReferenceNode(): TiptapReact.Node {\n\tinlineReferenceNode ??= TiptapReact.Node.create({\n\t\tname: NODE_NAME,\n\t\tgroup: 'inline',\n\t\tinline: true,\n\t\tatom: true,\n\t\tselectable: true,\n\t\tdraggable: false,\n\n\t\taddAttributes() {\n\t\t\treturn {\n\t\t\t\tid: { default: null, parseHTML: (element) => element.getAttribute('data-ref-id'), renderHTML: (attributes) => ({ 'data-ref-id': attributes.id }) },\n\t\t\t\tkind: { default: null, parseHTML: (element) => element.getAttribute('data-ref-kind'), renderHTML: (attributes) => (attributes.kind ? { 'data-ref-kind': attributes.kind } : {}) },\n\t\t\t\ttone: { default: null, parseHTML: (element) => element.getAttribute('data-ref-tone'), renderHTML: (attributes) => (attributes.tone ? { 'data-ref-tone': attributes.tone } : {}) },\n\t\t\t\tlabel: { default: '', parseHTML: (element) => element.textContent ?? '', renderHTML: () => ({}) },\n\t\t\t};\n\t\t},\n\n\t\tparseHTML() {\n\t\t\treturn [{ tag: 'span[data-ref-id]' }];\n\t\t},\n\n\t\trenderHTML({ node, HTMLAttributes }) {\n\t\t\treturn ['span', TiptapReact.mergeAttributes({ class: 'rsc-mention', contenteditable: 'false' }, HTMLAttributes), node.attrs.label as string];\n\t\t},\n\n\t\trenderText({ node }) {\n\t\t\treturn node.attrs.label as string;\n\t\t},\n\n\t\taddNodeView() {\n\t\t\treturn ({ node }) => {\n\t\t\t\tconst dom = document.createElement('span');\n\t\t\t\tdom.className = inlineReferenceChipClassName;\n\t\t\t\tdom.setAttribute('contenteditable', 'false');\n\t\t\t\tdom.setAttribute('data-ref-id', String(node.attrs.id ?? ''));\n\t\t\t\tif (node.attrs.kind) dom.setAttribute('data-ref-kind', String(node.attrs.kind));\n\t\t\t\tif (node.attrs.tone) dom.setAttribute('data-ref-tone', String(node.attrs.tone));\n\t\t\t\tdom.textContent = String(node.attrs.label ?? '');\n\t\t\t\treturn { dom };\n\t\t\t};\n\t\t},\n\n\t\taddKeyboardShortcuts() {\n\t\t\treturn {\n\t\t\t\tBackspace: deleteAdjacentReference('backward'),\n\t\t\t\tDelete: deleteAdjacentReference('forward'),\n\t\t\t};\n\t\t},\n\t});\n\treturn inlineReferenceNode;\n}\n","import { AlertCircle, ImagePlus, Loader2 } from 'lucide-react';\nimport { useCallback, useEffect, useId, useMemo, useRef, useState, type RefObject } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { Button } from '../../../base/buttons';\nimport { FormField } from '../../../base/forms';\nimport { Stack } from '../../../base/structure';\nimport { Input } from '../../../base/text-inputs';\nimport { Text } from '../../../typography';\nimport { safeImageSrc } from '../../../../lib/safe-image-src';\nimport { interpolateString } from '../../../../lib/strings';\n\nimport type { RichTextEditorStrings } from '../rich-text-editor.strings';\nimport type { RichTextEditorImages, RichTextEditorToolbarItem, RichTextImage } from '../rich-text-editor.types';\nimport { regionRecipes } from '../../../../lib/surface-recipes';\nimport { cn } from '../../../../lib/utils';\n\nexport const DEFAULT_IMAGE_ACCEPT = 'image/png,image/jpeg,image/gif,image/webp';\n\n/** Marks an upload placeholder in the editing surface; never part of the value. */\nexport const UPLOAD_ATTRIBUTE = 'data-rte-upload';\n\n/** The placeholder occupies a line of its own while its image uploads. */\nexport const UPLOAD_PLACEHOLDER_CLASS = 'rich-text-editor--upload my-space-xs flex min-h-control items-center rounded-radius border border-dashed border-input bg-muted/30 px-row-x py-row-y';\n\nconst PLACEHOLDER_PATTERN = new RegExp(`<span[^>]*\\\\b${UPLOAD_ATTRIBUTE}=\"[^\"]*\"[^>]*>[\\\\s\\\\S]*?</span>`, 'g');\n\n/** Removes upload placeholders from serialized editor HTML. */\nexport function stripUploadPlaceholders(html: string): string {\n\treturn html.includes(UPLOAD_ATTRIBUTE) ? html.replace(PLACEHOLDER_PATTERN, '') : html;\n}\n\nexport function acceptsImageFile(file: File, accept: string): boolean {\n\tconst type = file.type.toLowerCase();\n\tconst name = file.name.toLowerCase();\n\treturn accept.split(',').map((entry) => entry.trim().toLowerCase()).filter(Boolean).some((entry) => {\n\t\tif (entry.startsWith('.')) return name.endsWith(entry);\n\t\tif (entry.endsWith('/*')) return type.startsWith(entry.slice(0, -1));\n\t\treturn type === entry;\n\t});\n}\n\n/** A readable default description from the file name: `team-offsite_2026.jpg` → `team offsite 2026`. */\nexport function altFromFileName(name: string): string {\n\treturn name.replace(/\\.[^.]+$/, '').replace(/[-_]+/g, ' ').trim();\n}\n\n/** Image files carried by a paste or drop. */\nexport function imageFilesFrom(data: DataTransfer | null | undefined): File[] {\n\treturn Array.from(data?.files ?? []).filter((file) => file.type.startsWith('image/'));\n}\n\n/** How each editor engine puts placeholders and images into its document. */\nexport interface ImageUploadAdapter {\n\t/** Inserts an empty placeholder for `id` at the selection (or the drop point). */\n\tinsertPlaceholder: (id: string) => void;\n\t/** Swaps the placeholder for the uploaded image and reports the change. */\n\tresolvePlaceholder: (id: string, image: RichTextImage) => void;\n\t/** Removes the placeholder and reports the change. */\n\tremovePlaceholder: (id: string) => void;\n\t/** The placeholder's element, or null once the user has deleted it. */\n\tfindPlaceholder: (id: string) => HTMLElement | null;\n}\n\nexport interface PendingImageUpload {\n\tid: string;\n\tname: string;\n\tstatus: 'uploading' | 'error';\n}\n\nlet uploadSequence = 0;\n\n/**\n * The engine-agnostic upload lifecycle: validate, insert a placeholder, call\n * the consumer's `upload` with an abort signal, then swap in the image or keep\n * the placeholder in its error state for Retry or Remove.\n */\nexport function useImageUploadQueue(\n\timages: RichTextEditorImages | undefined,\n\tadapterRef: RefObject<ImageUploadAdapter | null>,\n\tstrings: RichTextEditorStrings['images'],\n) {\n\tconst [uploads, setUploads] = useState<PendingImageUpload[]>([]);\n\tconst [notice, setNotice] = useState<string | null>(null);\n\tconst jobs = useRef(new Map<string, { file: File; controller?: AbortController }>());\n\n\tuseEffect(() => () => {\n\t\tfor (const job of jobs.current.values()) job.controller?.abort();\n\t}, []);\n\n\tconst forget = useCallback((id: string) => {\n\t\tjobs.current.get(id)?.controller?.abort();\n\t\tjobs.current.delete(id);\n\t\tsetUploads((current) => current.filter((upload) => upload.id !== id));\n\t}, []);\n\n\tconst run = useCallback(async (id: string) => {\n\t\tconst job = jobs.current.get(id);\n\t\tif (!job || !images) return;\n\t\tjob.controller?.abort();\n\t\tconst controller = new AbortController();\n\t\tjob.controller = controller;\n\t\tconst pending: PendingImageUpload = { id, name: job.file.name, status: 'uploading' };\n\t\tsetUploads((current) => (current.some((upload) => upload.id === id) ? current.map((upload) => (upload.id === id ? pending : upload)) : [...current, pending]));\n\t\ttry {\n\t\t\tconst result = await images.upload(job.file, { signal: controller.signal });\n\t\t\tif (controller.signal.aborted) return;\n\t\t\tconst src = safeImageSrc(result?.src);\n\t\t\tif (!src) throw new Error(`The uploaded image source for ${job.file.name} is not an allowed URL.`);\n\t\t\tconst placed = adapterRef.current?.findPlaceholder(id);\n\t\t\tforget(id);\n\t\t\tif (placed) {\n\t\t\t\tadapterRef.current?.resolvePlaceholder(id, {\n\t\t\t\t\tsrc,\n\t\t\t\t\talt: result.alt ?? altFromFileName(job.file.name),\n\t\t\t\t\twidth: result.width,\n\t\t\t\t\theight: result.height,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (controller.signal.aborted) return;\n\t\t\timages.onError?.(error, job.file);\n\t\t\tsetUploads((current) => current.map((upload) => (upload.id === id ? { ...upload, status: 'error' } : upload)));\n\t\t}\n\t}, [adapterRef, forget, images]);\n\n\tconst addFiles = useCallback((files: readonly File[]) => {\n\t\tif (!images) return;\n\t\tconst accept = images.accept ?? DEFAULT_IMAGE_ACCEPT;\n\t\tconst refused: string[] = [];\n\t\tfor (const file of files) {\n\t\t\tconst reason = !acceptsImageFile(file, accept)\n\t\t\t\t? strings.unsupported\n\t\t\t\t: images.maxSize && file.size > images.maxSize ? strings.tooLarge : null;\n\t\t\tif (reason) {\n\t\t\t\tconst message = interpolateString(reason, { name: file.name });\n\t\t\t\trefused.push(message);\n\t\t\t\timages.onError?.(new Error(message), file);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tuploadSequence += 1;\n\t\t\tconst id = `upload-${uploadSequence}`;\n\t\t\tjobs.current.set(id, { file });\n\t\t\tadapterRef.current?.insertPlaceholder(id);\n\t\t\tvoid run(id);\n\t\t}\n\t\tsetNotice(refused.length > 0 ? refused.join(' ') : null);\n\t}, [adapterRef, images, run, strings.tooLarge, strings.unsupported]);\n\n\tconst retry = useCallback((id: string) => { void run(id); }, [run]);\n\n\tconst remove = useCallback((id: string) => {\n\t\tforget(id);\n\t\tadapterRef.current?.removePlaceholder(id);\n\t}, [adapterRef, forget]);\n\n\t/** Forgets uploads whose placeholder the user deleted while editing. */\n\tconst prune = useCallback(() => {\n\t\tfor (const id of Array.from(jobs.current.keys())) {\n\t\t\tif (!adapterRef.current?.findPlaceholder(id)) forget(id);\n\t\t}\n\t}, [adapterRef, forget]);\n\n\treturn { uploads, notice, dismissNotice: () => setNotice(null), addFiles, retry, remove, prune };\n}\n\nexport type ImageUploadQueue = ReturnType<typeof useImageUploadQueue>;\n\n/** Status inside a placeholder: uploading with Cancel, or the failure with Retry and Remove. */\nfunction ImageUploadStatus({ upload, strings, onRetry, onRemove, disabled }: {\n\tupload: PendingImageUpload;\n\tstrings: RichTextEditorStrings['images'];\n\tonRetry: () => void;\n\tonRemove: () => void;\n\tdisabled: boolean;\n}) {\n\tconst failed = upload.status === 'error';\n\treturn (\n\t\t// The message keeps a readable width; on a narrow editor the actions wrap below it.\n\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap className=\"rich-text-editor--upload-status w-full min-w-0\" data-status={upload.status}>\n\t\t\t{failed\n\t\t\t\t? <AlertCircle className=\"size-icon shrink-0 text-destructive\" aria-hidden=\"true\" />\n\t\t\t\t: <Loader2 className=\"size-icon shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none\" aria-hidden=\"true\" />}\n\t\t\t<Text tag=\"span\" size=\"xs\" type={failed ? 'error' : 'secondary'} role={failed ? 'alert' : 'status'} className=\"min-w-0 flex-1 basis-40 break-words\">\n\t\t\t\t{interpolateString(failed ? strings.failed : strings.uploading, { name: upload.name })}\n\t\t\t</Text>\n\t\t\t{failed && <Button type=\"button\" size=\"sm\" disabled={disabled} onClick={onRetry}>{strings.retry}</Button>}\n\t\t\t<Button type=\"button\" size=\"sm\" buttonStyle=\"ghost\" disabled={disabled} onClick={onRemove}>{failed ? strings.remove : strings.cancel}</Button>\n\t\t</Stack>\n\t);\n}\n\n/** Renders each pending upload's status into its placeholder in the editing surface. */\nexport function ImageUploadPortals({ queue, adapterRef, strings, disabled = false }: {\n\tqueue: ImageUploadQueue;\n\tadapterRef: RefObject<ImageUploadAdapter | null>;\n\tstrings: RichTextEditorStrings['images'];\n\t/** A disabled editor keeps its pending uploads but offers no way to change them. */\n\tdisabled?: boolean;\n}) {\n\treturn (\n\t\t<>\n\t\t\t{queue.uploads.map((upload) => {\n\t\t\t\tconst target = adapterRef.current?.findPlaceholder(upload.id);\n\t\t\t\treturn target ? createPortal(\n\t\t\t\t\t<ImageUploadStatus upload={upload} strings={strings} disabled={disabled} onRetry={() => queue.retry(upload.id)} onRemove={() => queue.remove(upload.id)} />,\n\t\t\t\t\ttarget,\n\t\t\t\t\tupload.id,\n\t\t\t\t) : null;\n\t\t\t})}\n\t\t</>\n\t);\n}\n\n/** The Insert image toolbar control and its hidden file input. */\nexport function useImageInsertControl(\n\timages: RichTextEditorImages | undefined,\n\tstrings: RichTextEditorStrings['images'],\n\tonFiles: (files: File[]) => void,\n\tbeforeOpen?: () => void,\n) {\n\tconst inputRef = useRef<HTMLInputElement>(null);\n\tconst beforeOpenRef = useRef(beforeOpen);\n\tbeforeOpenRef.current = beforeOpen;\n\tconst enabled = Boolean(images);\n\tconst item = useMemo<RichTextEditorToolbarItem | null>(() => (enabled ? {\n\t\tid: 'insert-image',\n\t\ticon: ImagePlus,\n\t\tlabel: strings.insert,\n\t\ttoggle: false,\n\t\tonClick: () => {\n\t\t\tbeforeOpenRef.current?.();\n\t\t\tinputRef.current?.click();\n\t\t},\n\t} : null), [enabled, strings.insert]);\n\tconst input = images ? (\n\t\t<input\n\t\t\tref={inputRef}\n\t\t\ttype=\"file\"\n\t\t\taccept={images.accept ?? DEFAULT_IMAGE_ACCEPT}\n\t\t\tmultiple\n\t\t\thidden\n\t\t\ttabIndex={-1}\n\t\t\taria-hidden=\"true\"\n\t\t\tonChange={(event) => {\n\t\t\t\tconst files = Array.from(event.target.files ?? []);\n\t\t\t\tevent.target.value = '';\n\t\t\t\tif (files.length > 0) onFiles(files);\n\t\t\t}}\n\t\t/>\n\t) : null;\n\treturn { item, input };\n}\n\n/** The description field for the image at the caret, and refused-file notices. */\nexport function ImageDetailsBar({ alt, onAltChange, onRemove, notice, onDismissNotice, strings, disabled = false }: {\n\talt: string | null;\n\tonAltChange: (alt: string) => void;\n\tonRemove: () => void;\n\t/** A disabled editor shows the description but does not let it, or the image, change. */\n\tdisabled?: boolean;\n\tnotice: string | null;\n\tonDismissNotice: () => void;\n\tstrings: RichTextEditorStrings['images'];\n}) {\n\tconst inputId = useId();\n\tif (alt === null && !notice) return null;\n\treturn (\n\t\t<Stack gap=\"sm\" className={cn('rich-text-editor--image-details px-surface-xs py-space-sm', regionRecipes.footer)}>\n\t\t\t{!!notice && (\n\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"sm\">\n\t\t\t\t\t<Text tag=\"span\" size=\"xs\" type=\"error\" role=\"alert\" className=\"min-w-0 flex-1\">{notice}</Text>\n\t\t\t\t\t<Button type=\"button\" size=\"sm\" buttonStyle=\"ghost\" onClick={onDismissNotice}>{strings.remove}</Button>\n\t\t\t\t</Stack>\n\t\t\t)}\n\t\t\t{alt !== null && (\n\t\t\t\t// The action sits on the field's own row, so it lines up with the input, not the hint.\n\t\t\t\t<FormField label={strings.descriptionLabel} hint={strings.descriptionHint} htmlFor={inputId}>\n\t\t\t\t\t{/* A compound field: the fragment keeps FormField from labelling the row itself. */}\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Stack direction=\"horizontal\" align=\"center\" gap=\"sm\" wrap={false}>\n\t\t\t\t\t\t\t<Input id={inputId} value={alt} disabled={disabled} className=\"min-w-0 flex-1\" onChange={(event) => onAltChange(event.target.value)} />\n\t\t\t\t\t\t\t<Button type=\"button\" buttonStyle=\"outline\" disabled={disabled} onClick={onRemove}>{strings.removeImage}</Button>\n\t\t\t\t\t\t</Stack>\n\t\t\t\t\t</>\n\t\t\t\t</FormField>\n\t\t\t)}\n\t\t</Stack>\n\t);\n}\n","import * as TiptapReact from '@tiptap/react';\n\nimport { safeImageSrc } from '../../../../lib/safe-image-src';\nimport { UPLOAD_ATTRIBUTE, UPLOAD_PLACEHOLDER_CLASS } from './image-uploads';\n\nfunction positiveNumber(value: string | null): number | null {\n\tconst number = Number(value);\n\treturn Number.isFinite(number) && number > 0 ? number : null;\n}\n\nlet imageNode: TiptapReact.Node | null = null;\nlet imageUploadNode: TiptapReact.Node | null = null;\n\n/**\n * An inline image whose source passes the package image policy; any other\n * `<img>` in loaded or pasted content is dropped. Serializes as a plain\n * `<img src alt width height>`, matching the contenteditable engine.\n */\nexport function getImageNode(): TiptapReact.Node {\n\timageNode ??= TiptapReact.Node.create({\n\t\tname: 'image',\n\t\tgroup: 'inline',\n\t\tinline: true,\n\t\tatom: true,\n\t\tselectable: true,\n\t\tdraggable: true,\n\n\t\taddAttributes() {\n\t\t\treturn {\n\t\t\t\tsrc: { default: null, parseHTML: (element) => safeImageSrc(element.getAttribute('src')) ?? null },\n\t\t\t\talt: { default: '', parseHTML: (element) => element.getAttribute('alt') ?? '' },\n\t\t\t\ttitle: { default: null },\n\t\t\t\twidth: { default: null, parseHTML: (element) => positiveNumber(element.getAttribute('width')) },\n\t\t\t\theight: { default: null, parseHTML: (element) => positiveNumber(element.getAttribute('height')) },\n\t\t\t};\n\t\t},\n\n\t\tparseHTML() {\n\t\t\treturn [{ tag: 'img[src]', getAttrs: (element) => (safeImageSrc((element as HTMLElement).getAttribute('src')) ? null : false) }];\n\t\t},\n\n\t\trenderHTML({ HTMLAttributes }) {\n\t\t\tconst src = safeImageSrc(HTMLAttributes.src);\n\t\t\treturn ['img', TiptapReact.mergeAttributes(HTMLAttributes, { src: src ?? null })];\n\t\t},\n\t});\n\treturn imageNode;\n}\n\n/**\n * The placeholder an image occupies while it uploads. It is never parsed from\n * HTML and the editor strips it from its value; the editor renders the\n * upload status into its node view.\n */\nexport function getImageUploadNode(): TiptapReact.Node {\n\timageUploadNode ??= TiptapReact.Node.create({\n\t\tname: 'imageUpload',\n\t\tgroup: 'inline',\n\t\tinline: true,\n\t\tatom: true,\n\t\tselectable: false,\n\n\t\taddAttributes() {\n\t\t\treturn { id: { default: null } };\n\t\t},\n\n\t\tparseHTML() {\n\t\t\treturn [];\n\t\t},\n\n\t\trenderHTML({ node }) {\n\t\t\treturn ['span', { [UPLOAD_ATTRIBUTE]: node.attrs.id as string }];\n\t\t},\n\n\t\taddNodeView() {\n\t\t\treturn ({ node }) => {\n\t\t\t\tconst dom = document.createElement('span');\n\t\t\t\tdom.setAttribute(UPLOAD_ATTRIBUTE, String(node.attrs.id));\n\t\t\t\tdom.setAttribute('contenteditable', 'false');\n\t\t\t\tdom.className = UPLOAD_PLACEHOLDER_CLASS;\n\t\t\t\t// The status UI is a React portal; keep ProseMirror out of it.\n\t\t\t\treturn { dom, ignoreMutation: () => true, stopEvent: () => true };\n\t\t\t};\n\t\t},\n\t});\n\treturn imageUploadNode;\n}\n","import {\n\tforwardRef,\n\tuseCallback,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport {\n\tBold,\n\tItalic,\n\tList,\n\tListOrdered,\n\tQuote,\n\tRedo2,\n\tStrikethrough,\n\tUndo2,\n} from 'lucide-react';\nimport * as TiptapReact from '@tiptap/react';\nimport * as StarterKitModule from '@tiptap/starter-kit';\n\nimport { richTextEditorRecipes } from '../rich-text-editor.recipes';\n\nimport { Text } from '../../../typography';\nimport { useStrings } from '../../../../lib/strings';\nimport { resolveFieldInvalid } from '../../../../lib/field-control-attributes';\nimport { cn } from '../../../../lib/utils';\n\nimport { defaultRichTextEditorStrings } from '../rich-text-editor.strings';\nimport type {\n\tRichTextEditorHandle,\n\tRichTextEditorProps,\n\tTiptapEditor,\n\tToolbarButtonConfig,\n} from '../rich-text-editor.types';\nimport { readCaretContext, replaceBeforeCaret } from './caret-helpers';\nimport { CountsFooter } from './counts-footer';\nimport { editorFieldAria } from './editor-field-aria';\nimport { normalizeHtml, toEditorContent } from './html-helpers';\nimport { RichTextEditorToolbar } from './rich-text-editor-toolbar';\nimport { getInlineReferenceNode } from './inline-reference-node';\nimport { getImageNode, getImageUploadNode } from './image-nodes';\nimport {\n\tImageDetailsBar,\n\tImageUploadPortals,\n\timageFilesFrom,\n\tstripUploadPlaceholders,\n\tuseImageInsertControl,\n\tuseImageUploadQueue,\n\ttype ImageUploadAdapter,\n\ttype ImageUploadQueue,\n} from './image-uploads';\n\ntype ProseNode = { type: { name: string }; attrs: Record<string, unknown>; nodeSize: number };\n\n/** Value HTML: the editor's HTML without upload placeholders. */\nfunction valueHtml(editor: { getHTML: () => string } | null | undefined): string {\n\treturn normalizeHtml(stripUploadPlaceholders(editor?.getHTML() ?? ''));\n}\n\nconst EditorContent = TiptapReact.EditorContent;\nconst useTiptapEditor = TiptapReact.useEditor;\nconst useTiptapEditorState = TiptapReact.useEditorState;\nconst StarterKit =\n\t'default' in StarterKitModule ? StarterKitModule.default : StarterKitModule;\n\nexport const TiptapRichTextEditor = forwardRef<RichTextEditorHandle, RichTextEditorProps>(function TiptapRichTextEditor(\n\t{\n\t\tvalue,\n\t\tonValueChange,\n\t\tplaceholder,\n\t\tcompact = false,\n\t\tbodyHeight,\n\t\tminHeight,\n\t\tmaxHeight,\n\t\tdisabled = false,\n\t\tinvalid,\n\t\tid,\n\t\tonBlur,\n\t\t'aria-label': ariaLabel,\n\t\t'aria-labelledby': ariaLabelledBy,\n\t\t'aria-describedby': ariaDescribedBy,\n\t\t'aria-invalid': ariaInvalidProp,\n\t\tshowCounts = false,\n\t\tmaxLength,\n\t\textraToolbarItems,\n\t\ttoolbarTrailing,\n\t\tfooterSlot,\n\t\thideSourceToggle = false,\n\t\tautoFocus = false,\n\t\tclassName,\n\t\tonCaretChange,\n\t\tonEditorKeyDown,\n\t\tsuggestionPopup,\n\t\tstrings: stringsProp,\n\t\timages,\n\t},\n\tref,\n) {\n\tconst strings = useStrings(defaultRichTextEditorStrings, stringsProp);\n\tconst { ariaInvalid } = resolveFieldInvalid(invalid, ariaInvalidProp);\n\tconst imagesEnabled = Boolean(images);\n\tconst queueRef = useRef<ImageUploadQueue | null>(null);\n\tconst editorInstanceRef = useRef<TiptapEditor | null>(null);\n\tconst [isFocused, setIsFocused] = useState(false);\n\tconst [sourceMode, setSourceMode] = useState(false);\n\tconst sourceRef = useRef<HTMLTextAreaElement>(null);\n\tconst [sourceValue, setSourceValue] = useState('');\n\tconst isFocusedRef = useRef(false);\n\tconst externalValueRef = useRef<string>(normalizeHtml(value));\n\tconst valueRef = useRef(value);\n\tuseLayoutEffect(() => {\n\t\tvalueRef.current = value;\n\t}, [value]);\n\t// True while the parent's `onValueChange` runs for a change the editor reported.\n\tconst reportingRef = useRef(false);\n\t// Values reported to the parent that it has not handed back yet, oldest first.\n\t// A parent that applies changes late returns them one render at a time; the\n\t// return of an earlier report must not replace what the user has typed since.\n\tconst awaitingEchoRef = useRef<string[]>([]);\n\tconst reportValue = useCallback((html: string) => {\n\t\texternalValueRef.current = html;\n\t\tawaitingEchoRef.current = [...awaitingEchoRef.current.slice(-31), html];\n\t\tconst nested = reportingRef.current;\n\t\treportingRef.current = true;\n\t\ttry {\n\t\t\tonValueChange(html);\n\t\t} finally {\n\t\t\treportingRef.current = nested;\n\t\t}\n\t}, [onValueChange]);\n\tconst onCaretChangeRef = useRef(onCaretChange);\n\tonCaretChangeRef.current = onCaretChange;\n\tconst keyHandler = disabled ? undefined : onEditorKeyDown;\n\tconst keyHandlerRef = useRef(keyHandler);\n\tuseLayoutEffect(() => {\n\t\tkeyHandlerRef.current = keyHandler;\n\t}, [keyHandler]);\n\tconst listboxId = suggestionPopup?.listboxId;\n\tconst activeOptionId = suggestionPopup?.activeOptionId;\n\tconst editorLabel = ariaLabel ?? strings.editorLabel;\n\tconst editorAttributes = useMemo(() => {\n\t\tconst attributes: Record<string, string> = {\n\t\t\t'data-slot': 'editor-field',\n\t\t\tclass: richTextEditorRecipes.editable,\n\t\t};\n\t\tconst fieldAttributes = {\n\t\t\t...editorFieldAria(editorLabel, listboxId, activeOptionId),\n\t\t\tid,\n\t\t\t'aria-labelledby': ariaLabelledBy,\n\t\t\t'aria-describedby': ariaDescribedBy,\n\t\t\t'aria-invalid': ariaInvalid,\n\t\t};\n\t\tfor (const [name, value] of Object.entries(fieldAttributes)) {\n\t\t\tif (value !== undefined) attributes[name] = String(value);\n\t\t}\n\t\treturn attributes;\n\t}, [activeOptionId, ariaDescribedBy, ariaInvalid, ariaLabelledBy, editorLabel, id, listboxId]);\n\n\tconst extensions = useMemo(\n\t\t() => [StarterKit, getInlineReferenceNode(), ...(imagesEnabled ? [getImageNode(), getImageUploadNode()] : [])],\n\t\t[imagesEnabled],\n\t);\n\tconst editor = useTiptapEditor({\n\t\textensions,\n\t\tcontent: toEditorContent(value),\n\t\teditable: !disabled,\n\t\timmediatelyRender: false,\n\t\tautofocus: autoFocus ? 'end' : false,\n\t\tonFocus: () => {\n\t\t\tisFocusedRef.current = true;\n\t\t\tsetIsFocused(true);\n\t\t},\n\t\tonBlur: () => {\n\t\t\tisFocusedRef.current = false;\n\t\t\tsetIsFocused(false);\n\t\t},\n\t\tonUpdate: ({ editor: currentEditor }: { editor: { getHTML: () => string } }) => {\n\t\t\tqueueRef.current?.prune();\n\t\t\tconst html = valueHtml(currentEditor);\n\n\t\t\tif (html !== externalValueRef.current) reportValue(html);\n\n\t\t\tif (isFocusedRef.current) onCaretChangeRef.current?.();\n\t\t},\n\t\teditorProps: {\n\t\t\thandleKeyDown: (_view, event) => {\n\t\t\t\tif (!keyHandlerRef.current?.(event)) return false;\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\t// Image files from the clipboard or a drop go through the upload lifecycle.\n\t\t\thandlePaste: (_view: unknown, event: ClipboardEvent) => {\n\t\t\t\tconst files = imageFilesFrom(event.clipboardData);\n\t\t\t\tif (!queueRef.current || !imagesRef.current || files.length === 0) return false;\n\t\t\t\tqueueRef.current.addFiles(files);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\thandleDrop: (view: { posAtCoords: (coords: { left: number; top: number }) => { pos: number } | null }, event: DragEvent, _slice: unknown, moved: boolean) => {\n\t\t\t\tconst files = imageFilesFrom(event.dataTransfer);\n\t\t\t\tif (moved || !queueRef.current || !imagesRef.current || files.length === 0) return false;\n\t\t\t\tconst at = view.posAtCoords({ left: event.clientX, top: event.clientY });\n\t\t\t\tif (at) editorInstanceRef.current?.commands.setTextSelection(at.pos);\n\t\t\t\tqueueRef.current.addFiles(files);\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tattributes: editorAttributes,\n\t\t},\n\t// Image nodes join the schema only when images are enabled, which needs a new editor.\n\t}, [imagesEnabled]);\n\n\tuseLayoutEffect(() => {\n\t\tif (editor && editor.options.editorProps.attributes !== editorAttributes) {\n\t\t\teditor.setOptions({ editorProps: { ...editor.options.editorProps, attributes: editorAttributes } });\n\t\t}\n\t}, [editor, editorAttributes]);\n\n\tuseEffect(() => {\n\t\tif (!editor) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst current = valueHtml(editor);\n\t\tconst next = normalizeHtml(value);\n\t\tconst awaiting = awaitingEchoRef.current;\n\t\tconst echoed = awaiting.lastIndexOf(next);\n\t\tif (echoed !== -1 && echoed < awaiting.length - 1) {\n\t\t\t// An earlier report coming back while later ones are still on their way.\n\t\t\tawaitingEchoRef.current = awaiting.slice(echoed + 1);\n\t\t\treturn;\n\t\t}\n\t\tawaitingEchoRef.current = [];\n\t\texternalValueRef.current = next;\n\n\t\t// Value-synchronised: a new `value` replaces the document. A `value` that\n\t\t// stays the same after a reported change leaves the user's edit alone.\n\t\tif (current !== next) {\n\t\t\teditor.chain()\n\t\t\t\t.setMeta('addToHistory', false)\n\t\t\t\t.setContent(toEditorContent(next), { emitUpdate: false })\n\t\t\t\t.run();\n\t\t}\n\t}, [editor, value]);\n\n\tuseEffect(() => {\n\t\tif (editor && sourceMode) setSourceValue(editor.getHTML());\n\t}, [editor, sourceMode, value]);\n\n\tuseEffect(() => {\n\t\tif (!editor) {\n\t\t\treturn;\n\t\t}\n\n\t\teditor.setEditable(!disabled, false);\n\t}, [disabled, editor]);\n\n\tuseEffect(() => {\n\t\tif (typeof document === 'undefined') return;\n\t\tconst handler = () => {\n\t\t\tif (!isFocusedRef.current) return;\n\t\t\tonCaretChangeRef.current?.();\n\t\t};\n\t\tdocument.addEventListener('selectionchange', handler);\n\t\treturn () => document.removeEventListener('selectionchange', handler);\n\t}, []);\n\n\tuseImperativeHandle(\n\t\tref,\n\t\t() => ({\n\t\t\tfocus: () => {\n\t\t\t\tif (sourceRef.current) sourceRef.current.focus();\n\t\t\t\telse editor?.chain().focus().run();\n\t\t\t},\n\t\t\tgetHTML: () => valueHtml(editor),\n\t\t\tsetHTML: (html: string) => {\n\t\t\t\tconst next = normalizeHtml(html);\n\t\t\t\teditor?.commands.setContent(toEditorContent(next), { emitUpdate: false });\n\t\t\t\t// A parent that answers a reported change by restoring the `value` it\n\t\t\t\t// holds has rejected that change; it already has this value.\n\t\t\t\tif (reportingRef.current && next === normalizeHtml(valueRef.current)) {\n\t\t\t\t\texternalValueRef.current = next;\n\t\t\t\t\tawaitingEchoRef.current = [];\n\t\t\t\t} else reportValue(next);\n\t\t\t},\n\t\t\tinsertHTML: (html: string) => {\n\t\t\t\tif (!editor) return;\n\t\t\t\teditor.chain().focus().insertContent(html).run();\n\t\t\t},\n\t\t\tisEmpty: () => valueHtml(editor) === '',\n\t\t\tclear: () => {\n\t\t\t\teditor?.commands.setContent('<p></p>', { emitUpdate: false });\n\t\t\t\treportValue('');\n\t\t\t},\n\t\t\tgetCaretContext: () => readCaretContext(),\n\t\t\treplaceBeforeCaret: (length: number, html: string) => {\n\t\t\t\tif (editor) replaceBeforeCaret(editor, length, html);\n\t\t\t},\n\t\t}),\n\t\t[editor, reportValue],\n\t);\n\n\teditorInstanceRef.current = editor ?? null;\n\tconst imagesRef = useRef(images);\n\timagesRef.current = images;\n\n\t/** Programmatic changes (an upload landing, a description edit) report the value themselves. */\n\tconst emitValue = useCallback(() => {\n\t\tif (!editor) return;\n\t\tconst html = valueHtml(editor);\n\t\tif (html !== externalValueRef.current) reportValue(html);\n\t}, [editor, reportValue]);\n\n\tconst findNode = useCallback((match: (node: ProseNode) => boolean) => {\n\t\tlet found: { pos: number; node: ProseNode } | null = null;\n\t\teditor?.state.doc.descendants((node: ProseNode, pos: number) => {\n\t\t\tif (!found && match(node)) found = { pos, node };\n\t\t\treturn !found;\n\t\t});\n\t\treturn found as { pos: number; node: ProseNode } | null;\n\t}, [editor]);\n\n\tconst adapterRef = useRef<ImageUploadAdapter | null>(null);\n\tadapterRef.current = editor ? {\n\t\t// A placeholder is editor chrome, not an edit: it stays out of undo history, so\n\t\t// undoing an uploaded image removes the image and never brings a placeholder back.\n\t\tinsertPlaceholder: (id) => {\n\t\t\teditor.chain().focus().setMeta('addToHistory', false).insertContent({ type: 'imageUpload', attrs: { id } }).run();\n\t\t},\n\t\tfindPlaceholder: (id) => editor.view.dom.querySelector<HTMLElement>(`[data-rte-upload=\"${id}\"]`),\n\t\tresolvePlaceholder: (id, image) => {\n\t\t\tconst at = findNode((node) => node.type.name === 'imageUpload' && node.attrs.id === id);\n\t\t\tif (!at) return;\n\t\t\tconst created = editor.schema.nodes.image.create({ src: image.src, alt: image.alt ?? '', width: image.width ?? null, height: image.height ?? null });\n\t\t\teditor.view.dispatch(editor.state.tr.delete(at.pos, at.pos + at.node.nodeSize).setMeta('addToHistory', false));\n\t\t\t// The image alone is the undoable step.\n\t\t\teditor.view.dispatch(editor.state.tr.insert(at.pos, created));\n\t\t\temitValue();\n\t\t},\n\t\tremovePlaceholder: (id) => {\n\t\t\tconst at = findNode((node) => node.type.name === 'imageUpload' && node.attrs.id === id);\n\t\t\tif (!at) return;\n\t\t\teditor.view.dispatch(editor.state.tr.delete(at.pos, at.pos + at.node.nodeSize).setMeta('addToHistory', false));\n\t\t\temitValue();\n\t\t},\n\t} : null;\n\tconst uploadQueue = useImageUploadQueue(images, adapterRef, strings.images);\n\tqueueRef.current = imagesEnabled ? uploadQueue : null;\n\tconst imageInsert = useImageInsertControl(images, strings.images, uploadQueue.addFiles);\n\tconst toolbarItems = useMemo(\n\t\t() => (imageInsert.item ? [imageInsert.item, ...(extraToolbarItems ?? [])] : extraToolbarItems),\n\t\t[extraToolbarItems, imageInsert.item],\n\t);\n\n\t// The image the selection holds, or that sits beside a collapsed caret.\n\tconst [activeImage, setActiveImage] = useState<{ pos: number; alt: string } | null>(null);\n\tuseEffect(() => {\n\t\tif (!editor || !imagesEnabled) return;\n\t\tconst sync = () => {\n\t\t\tconst selection = editor.state.selection as unknown as { node?: ProseNode; empty: boolean; from: number; $from: { nodeBefore: ProseNode | null; nodeAfter: ProseNode | null } };\n\t\t\tlet next: { pos: number; alt: string } | null = null;\n\t\t\tif (selection.node?.type.name === 'image') next = { pos: selection.from, alt: String(selection.node.attrs.alt ?? '') };\n\t\t\telse if (selection.empty) {\n\t\t\t\tconst { nodeBefore, nodeAfter } = selection.$from;\n\t\t\t\tif (nodeBefore?.type.name === 'image') next = { pos: selection.from - nodeBefore.nodeSize, alt: String(nodeBefore.attrs.alt ?? '') };\n\t\t\t\telse if (nodeAfter?.type.name === 'image') next = { pos: selection.from, alt: String(nodeAfter.attrs.alt ?? '') };\n\t\t\t}\n\t\t\tsetActiveImage(next);\n\t\t};\n\t\teditor.on('selectionUpdate', sync);\n\t\teditor.on('update', sync);\n\t\treturn () => {\n\t\t\teditor.off('selectionUpdate', sync);\n\t\t\teditor.off('update', sync);\n\t\t};\n\t}, [editor, imagesEnabled]);\n\n\t// The recipe owns the default body floor; inline style carries only the\n\t// consumer's explicit CSS lengths, which win over that class.\n\tconst bodyMinHeightClassName = richTextEditorRecipes.bodyMinHeight[bodyHeight ?? (compact ? 'control' : 'document')];\n\tconst contentStyle = useMemo(\n\t\t() => ({\n\t\t\t...(minHeight ? { minHeight } : {}),\n\t\t\t...(maxHeight ? { maxHeight, overflowY: 'auto' as const } : {}),\n\t\t}),\n\t\t[maxHeight, minHeight],\n\t);\n\n\tconst toggleSourceMode = useCallback(() => {\n\t\tif (!editor) return;\n\n\t\tif (sourceMode) {\n\t\t\tif (sourceValue !== editor.getHTML()) {\n\t\t\t\teditor.commands.setContent(toEditorContent(sourceValue), { emitUpdate: false });\n\t\t\t\temitValue();\n\t\t\t}\n\t\t\tsetSourceMode(false);\n\t\t} else {\n\t\t\tsetSourceValue(editor.getHTML());\n\t\t\tsetSourceMode(true);\n\t\t}\n\t}, [editor, emitValue, sourceMode, sourceValue]);\n\n\tconst toolbarState = useTiptapEditorState({\n\t\teditor,\n\t\tselector: ({ editor: current }) => ({\n\t\t\tbold: current?.isActive('bold') ?? false,\n\t\t\titalic: current?.isActive('italic') ?? false,\n\t\t\tstrike: current?.isActive('strike') ?? false,\n\t\t\tbulletList: current?.isActive('bulletList') ?? false,\n\t\t\torderedList: current?.isActive('orderedList') ?? false,\n\t\t\tblockquote: current?.isActive('blockquote') ?? false,\n\t\t\tcanUndo: current?.can().undo() ?? false,\n\t\t\tcanRedo: current?.can().redo() ?? false,\n\t\t\textraActive: toolbarItems?.map((item) => item.isActive?.() ?? false),\n\t\t}),\n\t});\n\n\tconst toolbarButtons = useMemo<ToolbarButtonConfig[]>(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: 'bold',\n\t\t\t\ticon: Bold,\n\t\t\t\tlabel: strings.toolbar.bold,\n\t\t\t\tisActive: () => toolbarState?.bold ?? false,\n\t\t\t\ttoggle: true,\n\t\t\t\trun: () => editor?.chain().focus().toggleBold().run(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'italic',\n\t\t\t\ticon: Italic,\n\t\t\t\tlabel: strings.toolbar.italic,\n\t\t\t\tisActive: () => toolbarState?.italic ?? false,\n\t\t\t\ttoggle: true,\n\t\t\t\trun: () => editor?.chain().focus().toggleItalic().run(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'strike',\n\t\t\t\ticon: Strikethrough,\n\t\t\t\tlabel: strings.toolbar.strike,\n\t\t\t\tisActive: () => toolbarState?.strike ?? false,\n\t\t\t\ttoggle: true,\n\t\t\t\trun: () => editor?.chain().focus().toggleStrike().run(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'bullet-list',\n\t\t\t\ticon: List,\n\t\t\t\tlabel: strings.toolbar.bulletList,\n\t\t\t\tisActive: () => toolbarState?.bulletList ?? false,\n\t\t\t\ttoggle: true,\n\t\t\t\trun: () => editor?.chain().focus().toggleBulletList().run(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'ordered-list',\n\t\t\t\ticon: ListOrdered,\n\t\t\t\tlabel: strings.toolbar.orderedList,\n\t\t\t\tisActive: () => toolbarState?.orderedList ?? false,\n\t\t\t\ttoggle: true,\n\t\t\t\trun: () => editor?.chain().focus().toggleOrderedList().run(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'blockquote',\n\t\t\t\ticon: Quote,\n\t\t\t\tlabel: strings.toolbar.blockquote,\n\t\t\t\tisActive: () => toolbarState?.blockquote ?? false,\n\t\t\t\ttoggle: true,\n\t\t\t\trun: () => editor?.chain().focus().toggleBlockquote().run(),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'undo',\n\t\t\t\ticon: Undo2,\n\t\t\t\tlabel: strings.toolbar.undo,\n\t\t\t\tisActive: () => false,\n\t\t\t\trun: () => editor?.chain().focus().undo().run(),\n\t\t\t\tdisabled: !toolbarState?.canUndo,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'redo',\n\t\t\t\ticon: Redo2,\n\t\t\t\tlabel: strings.toolbar.redo,\n\t\t\t\tisActive: () => false,\n\t\t\t\trun: () => editor?.chain().focus().redo().run(),\n\t\t\t\tdisabled: !toolbarState?.canRedo,\n\t\t\t},\n\t\t],\n\t\t[editor, strings, toolbarState],\n\t);\n\n\tconst countsFooter =\n\t\tshowCounts && editor ? (\n\t\t\t<CountsFooter\n\t\t\t\teditor={editor}\n\t\t\t\tsourceMode={sourceMode}\n\t\t\t\tsourceValue={sourceValue}\n\t\t\t\tmaxLength={maxLength}\n\t\t\t\tstrings={strings}\n\t\t\t/>\n\t\t) : null;\n\n\tconst placeholderText = typeof placeholder === 'string' ? placeholder : '';\n\tconst showPlaceholder =\n\t\tplaceholderText.length > 0 && !isFocused && Boolean(editor?.isEmpty);\n\tconst placeholderNode = showPlaceholder ? (\n\t\t<Text\n\t\t\ttag=\"span\"\n\t\t\tsize=\"sm\"\n\t\t\ttype=\"secondary\"\n\t\t\tclassName={richTextEditorRecipes.placeholder}\n\t\t>\n\t\t\t{placeholderText}\n\t\t</Text>\n\t) : null;\n\n\treturn (\n\t\t<div\n\t\t\tonBlur={onBlur && (event => {\n\t\t\t\tif (!event.currentTarget.contains(event.relatedTarget)) onBlur(event);\n\t\t\t})}\n\t\t\tclassName={cn(\n\t\t\t\trichTextEditorRecipes.frame,\n\t\t\t\tdisabled && richTextEditorRecipes.disabled,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<RichTextEditorToolbar\n\t\t\t\tbuttons={toolbarButtons}\n\t\t\t\textraToolbarItems={toolbarItems}\n\t\t\t\textraToolbarActive={toolbarState?.extraActive}\n\t\t\t\thideSourceToggle={hideSourceToggle}\n\t\t\t\tsourceMode={sourceMode}\n\t\t\t\ttoggleSourceMode={toggleSourceMode}\n\t\t\t\tdisabled={disabled}\n\t\t\t\thasEditor={Boolean(editor)}\n\t\t\t\ttoolbarTrailing={toolbarTrailing}\n\t\t\t\tstrings={strings}\n\t\t\t/>\n\n\t\t\t{sourceMode ? (\n\t\t\t\t<textarea\n\t\t\t\t\tref={sourceRef}\n\t\t\t\t\tid={id}\n\t\t\t\t\tdata-slot=\"editor-field\"\n\t\t\t\t\taria-label={ariaLabel ?? strings.sourceLabel}\n\t\t\t\t\taria-labelledby={ariaLabelledBy}\n\t\t\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\t\tvalue={sourceValue}\n\t\t\t\t\tonChange={(event) => setSourceValue(event.target.value)}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tspellCheck={false}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\trichTextEditorRecipes.source,\n\t\t\t\t\t\tbodyMinHeightClassName,\n\t\t\t\t\t\tdisabled && 'cursor-not-allowed',\n\t\t\t\t\t)}\n\t\t\t\t\tstyle={contentStyle}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className={cn('relative', bodyMinHeightClassName)} style={contentStyle}>\n\t\t\t\t\t{placeholderNode}\n\n\t\t\t\t\t<EditorContent\n\t\t\t\t\t\teditor={editor}\n\t\t\t\t\t\tclassName={richTextEditorRecipes.content}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{imagesEnabled && (\n\t\t\t\t<ImageDetailsBar\n\t\t\t\t\talt={activeImage ? activeImage.alt : null}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tonAltChange={(alt) => {\n\t\t\t\t\t\tif (disabled || !editor || !activeImage) return;\n\t\t\t\t\t\tconst node = editor.state.doc.nodeAt(activeImage.pos) as ProseNode | null;\n\t\t\t\t\t\tif (node?.type.name !== 'image') return;\n\t\t\t\t\t\teditor.view.dispatch(editor.state.tr.setNodeAttribute(activeImage.pos, 'alt', alt));\n\t\t\t\t\t\tsetActiveImage({ ...activeImage, alt });\n\t\t\t\t\t\temitValue();\n\t\t\t\t\t}}\n\t\t\t\t\tonRemove={() => {\n\t\t\t\t\t\tif (disabled || !editor || !activeImage) return;\n\t\t\t\t\t\tconst node = editor.state.doc.nodeAt(activeImage.pos) as ProseNode | null;\n\t\t\t\t\t\tif (node?.type.name !== 'image') return;\n\t\t\t\t\t\teditor.view.dispatch(editor.state.tr.delete(activeImage.pos, activeImage.pos + node.nodeSize));\n\t\t\t\t\t\tsetActiveImage(null);\n\t\t\t\t\t\temitValue();\n\t\t\t\t\t\teditor.commands.focus();\n\t\t\t\t\t}}\n\t\t\t\t\tnotice={uploadQueue.notice}\n\t\t\t\t\tonDismissNotice={uploadQueue.dismissNotice}\n\t\t\t\t\tstrings={strings.images}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{!!footerSlot && (\n\t\t\t\t<div className={cn(richTextEditorRecipes.regionX, 'pb-space-md pt-space-xs')}>{footerSlot}</div>\n\t\t\t)}\n\n\t\t\t{countsFooter}\n\t\t\t{imageInsert.input}\n\t\t\t{imagesEnabled && <ImageUploadPortals queue={uploadQueue} adapterRef={adapterRef} strings={strings.images} disabled={disabled} />}\n\t\t</div>\n\t);\n});\n\nTiptapRichTextEditor.displayName = 'TiptapRichTextEditor';\n","/**\n * Public `<RichTextEditor>` shell around the Tiptap-backed editor. The\n * `@tiptap/react` and `@tiptap/starter-kit` peers are imported statically, so\n * they must be installed.\n *\n * Heavy lifting lives in `partials/`:\n * - `partials/rich-text-editor-tiptap.tsx` — the editor\n * - `partials/rich-text-editor-toolbar.tsx` — toolbar\n * - `partials/counts-footer.tsx` — char/word counts\n * - `partials/caret-helpers.ts` — caret introspection\n * - `partials/html-helpers.ts` — HTML normalization\n */\nimport { forwardRef } from 'react';\n\nimport { TiptapRichTextEditor } from './partials';\nimport type {\n\tRichTextEditorHandle,\n\tRichTextEditorProps,\n} from './rich-text-editor.types';\n\nexport const RichTextEditor = forwardRef<RichTextEditorHandle, RichTextEditorProps>(function RichTextEditor(\n\t{ name, ...props },\n\tref,\n) {\n\treturn <>\n\t\t<TiptapRichTextEditor {...props} ref={ref} />\n\t\t{name && <input type=\"hidden\" name={name} value={props.value} disabled={props.disabled} />}\n\t</>;\n});\n\nRichTextEditor.displayName = 'RichTextEditor';\n\nexport type {\n\tRichTextEditorProps,\n\tRichTextEditorHandle,\n\tRichTextEditorToolbarItem,\n\tRichTextCaretContext,\n} from './rich-text-editor.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,SAAgBsB,KAAgD;CAC/D,IAAI,OAAO,SAAW,KAAa,OAAO;CAC1C,IAAMC,IAAM,OAAO,aAAa;CAChC,IAAI,CAACA,KAAOA,EAAI,eAAe,GAAG,OAAO;CACzC,IAAMC,IAAQD,EAAI,WAAW,CAAC;CAC9B,IAAI,CAACC,EAAM,WAAW,OAAO;CAE7B,IAAMC,IAAYD,EAAM,gBAClBE,IAAcF,EAAM,aAEtBG,IAAqBF;CACzB,OAAOE,KAASA,EAAM,aAAa,KAAK,eACvC,IAAQA,EAAM;CAEf,IAAI,CAACA,GAAO,OAAO;CACnB,IAAMC,IACJD,EAAkB,QAAQ,4BAA0B,KACpDA,EAAkB,QAAQ,cAAc;CAC1C,IAAI,CAACC,GAAU,OAAO;CAEtB,IAAIC,IAAO;CACX,AAAIJ,EAAU,aAAa,KAAK,cAC/B,KAAQA,EAAU,eAAe,GAAA,CAAI,MAAM,GAAGC,CAAW;CAG1D,IAAII,IAAsBL;CAC1B,OAAOK,KAAUA,MAAWF,KAAYE,MAAWH,IAAO;EACz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AO1E,CAAG,CAAC,GAClF2E,EAAe;MAAE,GAAGD;MAAa;KAAI,CAAC,GACtCV,EAAU;IACX;IACA,gBAAgB;KACf,IAAItB,KAAY,CAACjJ,KAAU,CAACiL,GAAa;KACzC,IAAMpJ,IAAO7B,EAAO,MAAM,IAAI,OAAOiL,EAAY,GAAG;KACpD,AAAIpJ,GAAM,KAAK,SAAS,YACxB7B,EAAO,KAAK,SAASA,EAAO,MAAM,GAAG,OAAOiL,EAAY,KAAKA,EAAY,MAAMpJ,EAAK,QAAQ,CAAC,GAC7FqJ,EAAe,IAAI,GACnBX,EAAU,GACVvK,EAAO,SAAS,MAAM;IACvB;IACA,QAAQ6K,EAAY;IACpB,iBAAiBA,EAAY;IAC7B,SAASjK,EAAQ;GACjB,CAAA;GAGD,CAAC,CAACkM,MACF,kBAAC,OAAD;IAAK,WAAW3O,EAAGU,EAAsB,SAAS,yBAAyB;IAAI,UAAAiO;GAAgB,CAAA;GAG/FN;GACA1B,EAAY;GACZhD,KAAiB,kBAACvC,IAAD;IAAoB,OAAOsF;IAAyB;IAAY,SAASjK,EAAQ;IAAkB;GAAW,CAAA;EAC5H;;AAEP,CAAC;AAED,GAAqB,cAAc;;;AC5kBnC,IAAamM,IAAiBzF,EAAsD,SACnF,EAAE,SAAM,GAAG0F,KACX,GACC;CACD,OAAO,kBAAA9O,GAAA,EAAA,UAAA,CACN,kBAACmJ,IAAD;EAAsB,GAAI2F;EAAY;CAAM,CAAA,GAC3ClK,KAAQ,kBAAC,SAAD;EAAO,MAAK;EAAe;EAAM,OAAOkK,EAAM;EAAO,UAAUA,EAAM;CAAW,CAAA,CACxF,EAAA,CAAA;AACH,CAAC;AAED,EAAe,cAAc"}
@@ -0,0 +1,100 @@
1
+ "use client";
2
+ import { t as e } from "./utils-BVbAG2J6.js";
3
+ import { i as t } from "./text.styles-B64My8RZ.js";
4
+ import { n } from "./buttons-pZVgPTZn.js";
5
+ import { o as r } from "./surface-recipes-DV6rrOFq.js";
6
+ import { t as i } from "./interaction-recipes-DmuS1ase.js";
7
+ import { n as a } from "./content-typography-CnwgMJ37.js";
8
+ import { t as o } from "./field-state-recipes-EtCxpEy3.js";
9
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
10
+ import { Code2 as u } from "lucide-react";
11
+ //#region src/components/features/rich-text-editor/rich-text-editor.recipes.ts
12
+ var d = {
13
+ source: e("rich-text-editor--source box-border m-0 block min-h-0 w-full resize-y rounded-none border-0 bg-transparent p-surface-xs outline-none disabled:cursor-not-allowed", t({
14
+ type: "main",
15
+ size: "xs",
16
+ weight: "regular",
17
+ align: "left",
18
+ lineHeight: "relaxed",
19
+ numeric: !0
20
+ })),
21
+ editable: e(a, "p-surface-xs"),
22
+ placeholder: "pointer-events-none absolute inset-0 p-surface-xs",
23
+ regionX: "px-surface-xs",
24
+ frame: e("min-w-0 overflow-hidden border-input rounded-radius border bg-transparent transition-[color,box-shadow]", o.editorFocus, o.editorInvalid),
25
+ disabled: "opacity-50",
26
+ disabledControl: "disabled:opacity-100 aria-disabled:opacity-100",
27
+ content: "h-full [&_.ProseMirror]:h-full [&_.ProseMirror]:min-h-full [&_.ProseMirror]:outline-none",
28
+ bodyMinHeight: {
29
+ control: "min-h-control-sm",
30
+ field: "min-h-textarea-sm",
31
+ document: "min-h-48"
32
+ }
33
+ };
34
+ //#endregion
35
+ //#region src/components/features/rich-text-editor/partials/rich-text-editor-toolbar.tsx
36
+ function f({ buttons: t, extraToolbarItems: a, extraToolbarActive: o, hideSourceToggle: f = !1, sourceMode: p, toggleSourceMode: m, disabled: h = !1, hasEditor: g = !0, toolbarTrailing: _, strings: v, className: y }) {
37
+ let b = (a?.length ?? 0) > 0;
38
+ return /* @__PURE__ */ l("div", {
39
+ className: e("rich-text-editor-toolbar--component flex flex-wrap items-center gap-space-xs p-surface-xs", r.header, y),
40
+ children: [
41
+ t.map((t) => {
42
+ let r = t.icon, a = t.isActive();
43
+ return /* @__PURE__ */ c(n, {
44
+ type: "button",
45
+ tone: "secondary",
46
+ buttonStyle: "ghost",
47
+ size: "sm",
48
+ iconOnly: !0,
49
+ className: e(a ? i.togglePressed : i.toggleHoverButton, h && d.disabledControl),
50
+ onClick: t.run,
51
+ disabled: h || !g || p || t.disabled,
52
+ "aria-pressed": t.toggle ? a : void 0,
53
+ "aria-label": t.label,
54
+ title: t.label,
55
+ children: /* @__PURE__ */ c(r, { className: "size-icon" })
56
+ }, t.id);
57
+ }),
58
+ !f && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", { className: "bg-border mx-space-xs size-icon w-px" }), /* @__PURE__ */ c(n, {
59
+ type: "button",
60
+ tone: "secondary",
61
+ buttonStyle: "ghost",
62
+ size: "sm",
63
+ iconOnly: !0,
64
+ className: e(p ? i.togglePressed : i.toggleHoverButton, h && d.disabledControl),
65
+ onClick: m,
66
+ disabled: h || !g,
67
+ "aria-pressed": p,
68
+ "aria-label": v.toolbar.sourceCode,
69
+ title: v.toolbar.sourceCode,
70
+ children: /* @__PURE__ */ c(u, { className: "size-icon" })
71
+ })] }),
72
+ b && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("div", { className: "bg-border mx-space-xs size-icon w-px" }), a?.map((t, r) => {
73
+ let a = t.icon, s = o?.[r] ?? t.isActive?.() ?? !1, l = t.toggle ?? t.isActive !== void 0;
74
+ return /* @__PURE__ */ c(n, {
75
+ type: "button",
76
+ tone: "secondary",
77
+ buttonStyle: "ghost",
78
+ size: "sm",
79
+ iconOnly: !0,
80
+ className: e(s ? i.togglePressed : i.toggleHoverButton, h && d.disabledControl),
81
+ onClick: t.onClick,
82
+ disabled: h || !g || p || t.disabled,
83
+ "aria-pressed": l ? s : void 0,
84
+ "aria-label": t.label,
85
+ title: t.label,
86
+ children: /* @__PURE__ */ c(a, { className: "size-icon" })
87
+ }, t.id);
88
+ })] }),
89
+ !!_ && /* @__PURE__ */ c("div", {
90
+ className: "ml-auto flex items-center gap-space-xs",
91
+ children: _
92
+ })
93
+ ]
94
+ });
95
+ }
96
+ f.displayName = "RichTextEditorToolbar";
97
+ //#endregion
98
+ export { d as n, f as t };
99
+
100
+ //# sourceMappingURL=rich-text-editor-toolbar-DYbRJARB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-editor-toolbar-DYbRJARB.js","names":["_Fragment","cn","resolveTextClassNames","regionRecipes","interactionRecipes","editableContentClassName","fieldStateRecipes","richTextEditorRecipes","RichTextEditorToolbar","hasExtras","extraToolbarItems","className","buttons","Icon","button","isActive","Button","disabled","hasEditor","sourceMode","hideSourceToggle","Fragment","toggleSourceMode","strings","Code2","item","extraToolbarActive","index","toggle","toolbarTrailing"],"sources":["../src/components/features/rich-text-editor/rich-text-editor.recipes.ts","../src/components/features/rich-text-editor/partials/rich-text-editor-toolbar.tsx"],"sourcesContent":["import { editableContentClassName } from '../../typography/content-typography';\nimport { resolveTextClassNames } from '../../typography/text.styles';\nimport { cn } from '../../../lib/utils';\nimport { fieldStateRecipes } from '../../../lib/field-state-recipes';\n\n/**\n * Shared field anatomy for rich editors, including specialized document schemas.\n * Every region takes the toolbar's `surface-xs` inset, on both axes for the body,\n * so the first line sits as far below the toolbar rule as text sits from the frame edge.\n */\nexport const richTextEditorRecipes = {\n source: cn('rich-text-editor--source box-border m-0 block min-h-0 w-full resize-y rounded-none border-0 bg-transparent p-surface-xs outline-none disabled:cursor-not-allowed', resolveTextClassNames({type: 'main', size: 'xs', weight: 'regular', align: 'left', lineHeight: 'relaxed', numeric: true})),\n /** Editable body: shared content typography inside the editor's surface inset. Every embedded editor uses it. */\n editable: cn(editableContentClassName, 'p-surface-xs'),\n /** Placeholder overlay, laid over the editable body at the same inset. */\n placeholder: 'pointer-events-none absolute inset-0 p-surface-xs',\n /** Inline inset for the regions under the body (image details, counts, footer slot). */\n regionX: 'px-surface-xs',\n frame: cn('min-w-0 overflow-hidden border-input rounded-radius border bg-transparent transition-[color,box-shadow]', fieldStateRecipes.editorFocus, fieldStateRecipes.editorInvalid),\n disabled: 'opacity-50',\n // The frame owns the whole-editor dim; individually unavailable commands\n // keep Button's ordinary disabled treatment while the editor is enabled.\n disabledControl: 'disabled:opacity-100 aria-disabled:opacity-100',\n content: 'h-full [&_.ProseMirror]:h-full [&_.ProseMirror]:min-h-full [&_.ProseMirror]:outline-none',\n // Body floor when the consumer sets no `minHeight`: one small control line, a\n // textarea-sized field (a composer), or a short page (as the email body does).\n bodyMinHeight: { control: 'min-h-control-sm', field: 'min-h-textarea-sm', document: 'min-h-48' },\n} as const;\n","import { Code2 } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { Button } from '../../../base/buttons/button';\nimport { interactionRecipes } from '../../../../lib/interaction-recipes';\nimport { cn } from '../../../../lib/utils';\n\nimport type { RichTextEditorStrings } from '../rich-text-editor.strings';\nimport { richTextEditorRecipes } from '../rich-text-editor.recipes';\nimport type {\n\tRichTextEditorToolbarItem,\n\tToolbarButtonConfig,\n} from '../rich-text-editor.types';\nimport { regionRecipes } from '../../../../lib/surface-recipes';\n\nexport interface RichTextEditorToolbarProps {\n\t/** Formatting controls to show, in order. */\n\tbuttons: ToolbarButtonConfig[];\n\t/** Additional controls appended to the toolbar. */\n\textraToolbarItems?: ReadonlyArray<RichTextEditorToolbarItem>;\n\t/** Active values read from the editor's transaction subscription. */\n\textraToolbarActive?: readonly boolean[];\n\t/** Hides the control that switches to HTML source. */\n\thideSourceToggle?: boolean;\n\t/** Whether the editor is currently showing HTML source. */\n\tsourceMode: boolean;\n\t/** Switches between rich text and HTML source. */\n\ttoggleSourceMode: () => void;\n\t/** Renders the entry as unselectable. */\n\tdisabled?: boolean;\n\t/**\n\t * Built-in buttons stay disabled until the editor instance is ready. This\n\t * flag lets callers force the disabled state without re-deriving it per button.\n\t */\n\thasEditor?: boolean;\n\t/** Content pinned to the end of the toolbar. */\n\ttoolbarTrailing?: ReactNode;\n\t/** Overrides this surface's own copy. */\n\tstrings: RichTextEditorStrings;\n\t/** Merged onto the outermost node. */\n\tclassName?: string;\n}\n\nexport function RichTextEditorToolbar({\n\tbuttons,\n\textraToolbarItems,\n\textraToolbarActive,\n\thideSourceToggle = false,\n\tsourceMode,\n\ttoggleSourceMode,\n\tdisabled = false,\n\thasEditor = true,\n\ttoolbarTrailing,\n\tstrings,\n\tclassName,\n}: RichTextEditorToolbarProps) {\n\tconst hasExtras = (extraToolbarItems?.length ?? 0) > 0;\n\n\treturn (\n\t\t<div className={cn('rich-text-editor-toolbar--component flex flex-wrap items-center gap-space-xs p-surface-xs', regionRecipes.header, className)}>\n\t\t\t{buttons.map((button) => {\n\t\t\t\tconst Icon = button.icon;\n\t\t\t\tconst isActive = button.isActive();\n\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={button.id}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t// A formatting toggle: pressed is the accent fill, hover the lighter muted one.\n\t\t\t\t\t\tclassName={cn(isActive ? interactionRecipes.togglePressed : interactionRecipes.toggleHoverButton, disabled && richTextEditorRecipes.disabledControl)}\n\t\t\t\t\t\tonClick={button.run}\n\t\t\t\t\t\tdisabled={disabled || !hasEditor || sourceMode || button.disabled}\n\t\t\t\t\t\taria-pressed={button.toggle ? isActive : undefined}\n\t\t\t\t\t\taria-label={button.label}\n\t\t\t\t\t\ttitle={button.label}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon className=\"size-icon\" />\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t})}\n\n\t\t\t{!hideSourceToggle && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"bg-border mx-space-xs size-icon w-px\" />\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t// Source view is a toggle like the formats: the same pressed fill and state.\n\t\t\t\t\t\tclassName={cn(sourceMode ? interactionRecipes.togglePressed : interactionRecipes.toggleHoverButton, disabled && richTextEditorRecipes.disabledControl)}\n\t\t\t\t\t\tonClick={toggleSourceMode}\n\t\t\t\t\t\tdisabled={disabled || !hasEditor}\n\t\t\t\t\t\taria-pressed={sourceMode}\n\t\t\t\t\t\taria-label={strings.toolbar.sourceCode}\n\t\t\t\t\t\ttitle={strings.toolbar.sourceCode}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Code2 className=\"size-icon\" />\n\t\t\t\t\t</Button>\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{hasExtras && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"bg-border mx-space-xs size-icon w-px\" />\n\t\t\t\t\t{extraToolbarItems?.map((item, index) => {\n\t\t\t\t\t\tconst Icon = item.icon;\n\t\t\t\t\t\tconst isActive = extraToolbarActive?.[index] ?? item.isActive?.() ?? false;\n\t\t\t\t\t\tconst toggle = item.toggle ?? item.isActive !== undefined;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\t\tbuttonStyle=\"ghost\"\n\t\t\t\t\t\t\t\tsize=\"sm\" iconOnly\n\t\t\t\t\t\t\t\tclassName={cn(isActive ? interactionRecipes.togglePressed : interactionRecipes.toggleHoverButton, disabled && richTextEditorRecipes.disabledControl)}\n\t\t\t\t\t\t\t\tonClick={item.onClick}\n\t\t\t\t\t\t\t\tdisabled={disabled || !hasEditor || sourceMode || item.disabled}\n\t\t\t\t\t\t\t\taria-pressed={toggle ? isActive : undefined}\n\t\t\t\t\t\t\t\taria-label={item.label}\n\t\t\t\t\t\t\t\ttitle={item.label}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon className=\"size-icon\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t{!!toolbarTrailing && (\n\t\t\t\t<div className=\"ml-auto flex items-center gap-space-xs\">{toolbarTrailing}</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nRichTextEditorToolbar.displayName = 'RichTextEditorToolbar';\n"],"mappings":";;;;;;;;;;;AAUA,IAAaO,IAAwB;CACpC,QAAQN,EAAG,oKAAoKC,EAAsB;EAAC,MAAM;EAAQ,MAAM;EAAM,QAAQ;EAAW,OAAO;EAAQ,YAAY;EAAW,SAAS;CAAI,CAAC,CAAC;CAExS,UAAUD,EAAGI,GAA0B,cAAc;CAErD,aAAa;CAEb,SAAS;CACT,OAAOJ,EAAG,2GAA2GK,EAAkB,aAAaA,EAAkB,aAAa;CACnL,UAAU;CAGV,iBAAiB;CACjB,SAAS;CAGT,eAAe;EAAE,SAAS;EAAoB,OAAO;EAAqB,UAAU;CAAW;AAChG;;;ACgBA,SAAgBE,EAAsB,EACrC,YACA,sBACA,uBACA,sBAAmB,IACnB,eACA,qBACA,cAAW,IACX,eAAY,IACZ,oBACA,YACA,gBAC8B;CAC9B,IAAMC,KAAaC,GAAmB,UAAU,KAAK;CAErD,OACC,kBAAC,OAAD;EAAK,WAAWT,EAAG,6FAA6FE,EAAc,QAAQQ,CAAS;EAA/I,UAAA;GACEC,EAAQ,KAAK,MAAW;IACxB,IAAMC,IAAOC,EAAO,MACdC,IAAWD,EAAO,SAAS;IAEjC,OACC,kBAACE,GAAD;KAEC,MAAK;KACL,MAAK;KACL,aAAY;KACZ,MAAK;KAAK,UAAA;KAEV,WAAWf,EAAGc,IAAWX,EAAmB,gBAAgBA,EAAmB,mBAAmBa,KAAYV,EAAsB,eAAe;KACnJ,SAASO,EAAO;KAChB,UAAUG,KAAY,CAACC,KAAaC,KAAcL,EAAO;KACzD,gBAAcA,EAAO,SAASC,IAAW,KAAA;KACzC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AAK,WAAU;IAA0C,UAAAA;GAAqB,CAAA;EAE3E;;AAEP;AAEA,EAAsB,cAAc"}
@@ -0,0 +1,154 @@
1
+ "use client";
2
+ import { n as e, t } from "./safe-image-src-C6kQSMBZ.js";
3
+ import { Fragment as n, createElement as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import { fromHtml as a } from "hast-util-from-html";
6
+ import { sanitize as o } from "hast-util-sanitize";
7
+ import { toHtml as s } from "hast-util-to-html";
8
+ import c from "style-to-js";
9
+ //#region src/lib/sanitize-html.ts
10
+ var l = /* @__PURE__ */ "a.b.blockquote.br.code.del.div.em.h1.h2.h3.h4.h5.h6.i.li.mark.ol.p.pre.s.span.strong.sub.sup.u.ul".split("."), u = {
11
+ allowComments: !1,
12
+ allowDoctypes: !1,
13
+ tagNames: [...l],
14
+ attributes: {
15
+ a: [
16
+ "href",
17
+ "title",
18
+ [
19
+ "target",
20
+ "_blank",
21
+ "_self",
22
+ "_parent",
23
+ "_top"
24
+ ],
25
+ "rel",
26
+ "dataRefId",
27
+ "dataRefKind",
28
+ "dataRefTone"
29
+ ],
30
+ span: [
31
+ "dataRefId",
32
+ "dataRefKind",
33
+ "dataRefTone"
34
+ ]
35
+ },
36
+ protocols: { href: [
37
+ "http",
38
+ "https",
39
+ "mailto",
40
+ "tel"
41
+ ] },
42
+ strip: [
43
+ "embed",
44
+ "iframe",
45
+ "math",
46
+ "noscript",
47
+ "object",
48
+ "script",
49
+ "style",
50
+ "svg",
51
+ "template"
52
+ ]
53
+ }, d = {
54
+ ...u,
55
+ tagNames: [...l, "img"],
56
+ attributes: {
57
+ ...u.attributes,
58
+ img: [
59
+ "src",
60
+ "alt",
61
+ "title",
62
+ "width",
63
+ "height"
64
+ ]
65
+ },
66
+ protocols: {
67
+ ...u.protocols,
68
+ src: [...t]
69
+ }
70
+ };
71
+ function f(t) {
72
+ if (t.type === "root" || t.type === "element") {
73
+ t.children = t.children.filter((t) => t.type !== "element" || t.tagName !== "img" || e(t.properties.src) !== void 0);
74
+ for (let e of t.children) f(e);
75
+ }
76
+ }
77
+ function p(e) {
78
+ if (e.type === "element") {
79
+ let t = e.properties.href;
80
+ typeof t == "string" && t.trimStart().startsWith("//") && delete e.properties.href;
81
+ }
82
+ if (e.type === "root" || e.type === "element") for (let t of e.children) p(t);
83
+ }
84
+ function m(e, t = {}) {
85
+ return e ? s(h(e, t)) : "";
86
+ }
87
+ function h(e, t = {}) {
88
+ let n = a(e ?? "", { fragment: !0 });
89
+ p(n);
90
+ let r = o(n, t.images ? d : u);
91
+ return t.images && f(r), r;
92
+ }
93
+ //#endregion
94
+ //#region src/components/typography/rich-text/rich-text-tree.tsx
95
+ var g = /* @__PURE__ */ new Set([
96
+ "area",
97
+ "base",
98
+ "br",
99
+ "col",
100
+ "embed",
101
+ "hr",
102
+ "img",
103
+ "input",
104
+ "link",
105
+ "meta",
106
+ "param",
107
+ "source",
108
+ "track",
109
+ "wbr"
110
+ ]);
111
+ function _(e) {
112
+ let t = typeof e == "number" ? e : Number(e);
113
+ return Number.isFinite(t) && t > 0 ? t : void 0;
114
+ }
115
+ function v(e, t) {
116
+ let n = { key: t };
117
+ for (let [t, r] of Object.entries(e.properties)) if (r != null && r !== !1) {
118
+ if (t === "className") n.className = Array.isArray(r) ? r.join(" ") : String(r);
119
+ else if (/^data[A-Z]/.test(t)) n[t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`)] = String(r);
120
+ else if (/^aria[A-Z]/.test(t)) n[`aria-${t.slice(4).toLowerCase()}`] = String(r);
121
+ else if (t === "style" && typeof r == "string") try {
122
+ n.style = c(r, { reactCompat: !0 });
123
+ } catch {}
124
+ else n[t] = Array.isArray(r) ? r.join(" ") : r;
125
+ }
126
+ return n;
127
+ }
128
+ function y(t, a, o, s) {
129
+ if (t.type === "text") return t.value;
130
+ if (t.type !== "element") return null;
131
+ let c = s?.(t);
132
+ if (c !== void 0) return /* @__PURE__ */ i(n, { children: c }, a);
133
+ if (t.tagName === "img" && o) {
134
+ let r = e(t.properties.src);
135
+ if (!r) return null;
136
+ let s = {
137
+ src: r,
138
+ alt: typeof t.properties.alt == "string" ? t.properties.alt : "",
139
+ title: typeof t.properties.title == "string" ? t.properties.title : void 0,
140
+ width: _(t.properties.width),
141
+ height: _(t.properties.height)
142
+ };
143
+ return /* @__PURE__ */ i(n, { children: o(s) }, a);
144
+ }
145
+ let l = v(t, a);
146
+ return g.has(t.tagName) ? r(t.tagName, l) : r(t.tagName, l, ...t.children.map((e, t) => y(e, t, o, s)));
147
+ }
148
+ function b(e, t, n) {
149
+ return e.children.map((e, r) => y(e, r, t, n));
150
+ }
151
+ //#endregion
152
+ export { m as n, h as r, b as t };
153
+
154
+ //# sourceMappingURL=rich-text-tree-DdKHIJx4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-text-tree-DdKHIJx4.js","names":["safeImageSrc","styleToJs","ALLOWED_TAGS","SANITIZE_SCHEMA","SANITIZE_SCHEMA_WITH_IMAGES","SAFE_IMAGE_SCHEMES","removeUnsafeImages","node","child","removeProtocolRelativeLinks","href","sanitizeHtml","input","toHtml","sanitizeHtmlTree","options","unsafeTree","fromHtml","tree","sanitize","VOID_ELEMENTS","toNumber","number","value","toReactProps","props","name","element","letter","renderNode","replacement","replaceElement","Fragment","key","renderImage","src","image","createElement","index","renderRichTextTree"],"sources":["../src/lib/sanitize-html.ts","../src/components/typography/rich-text/rich-text-tree.tsx"],"sourcesContent":["import { fromHtml } from 'hast-util-from-html';\nimport { sanitize, type Schema } from 'hast-util-sanitize';\nimport { toHtml } from 'hast-util-to-html';\nimport type { Root, RootContent } from 'hast';\n\nimport { SAFE_IMAGE_SCHEMES, safeImageSrc } from './safe-image-src';\n\nconst ALLOWED_TAGS = [\n\t'a',\n\t'b',\n\t'blockquote',\n\t'br',\n\t'code',\n\t'del',\n\t'div',\n\t'em',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'i',\n\t'li',\n\t'mark',\n\t'ol',\n\t'p',\n\t'pre',\n\t's',\n\t'span',\n\t'strong',\n\t'sub',\n\t'sup',\n\t'u',\n\t'ul',\n] as const;\n\nconst SANITIZE_SCHEMA = {\n\tallowComments: false,\n\tallowDoctypes: false,\n\ttagNames: [...ALLOWED_TAGS],\n\tattributes: {\n\t\ta: [\n\t\t\t'href',\n\t\t\t'title',\n\t\t\t['target', '_blank', '_self', '_parent', '_top'],\n\t\t\t'rel',\n\t\t\t'dataRefId',\n\t\t\t'dataRefKind',\n\t\t\t'dataRefTone',\n\t\t],\n\t\tspan: ['dataRefId', 'dataRefKind', 'dataRefTone'],\n\t},\n\tprotocols: {\n\t\thref: ['http', 'https', 'mailto', 'tel'],\n\t},\n\tstrip: [\n\t\t'embed',\n\t\t'iframe',\n\t\t'math',\n\t\t'noscript',\n\t\t'object',\n\t\t'script',\n\t\t'style',\n\t\t'svg',\n\t\t'template',\n\t],\n} satisfies Schema;\n\n/** The same vocabulary plus images whose source passes `safeImageSrc`. */\nconst SANITIZE_SCHEMA_WITH_IMAGES = {\n\t...SANITIZE_SCHEMA,\n\ttagNames: [...ALLOWED_TAGS, 'img'],\n\tattributes: {\n\t\t...SANITIZE_SCHEMA.attributes,\n\t\timg: ['src', 'alt', 'title', 'width', 'height'],\n\t},\n\tprotocols: {\n\t\t...SANITIZE_SCHEMA.protocols,\n\t\tsrc: [...SAFE_IMAGE_SCHEMES],\n\t},\n} satisfies Schema;\n\nexport interface SanitizeHtmlOptions {\n\t/**\n\t * Keeps `<img>` with `src`, `alt`, `title`, `width` and `height` when its\n\t * source passes `safeImageSrc`; an image without a safe source is removed.\n\t * Default: `false`, which removes every image.\n\t */\n\timages?: boolean;\n}\n\nfunction removeUnsafeImages(node: Root | RootContent): void {\n\tif (node.type !== 'root' && node.type !== 'element') return;\n\tnode.children = node.children.filter(\n\t\t(child) => child.type !== 'element' || child.tagName !== 'img' || safeImageSrc(child.properties.src) !== undefined,\n\t);\n\tfor (const child of node.children) removeUnsafeImages(child);\n}\n\nfunction removeProtocolRelativeLinks(node: Root | RootContent): void {\n\tif (node.type === 'element') {\n\t\tconst href = node.properties.href;\n\t\tif (typeof href === 'string' && href.trimStart().startsWith('//')) {\n\t\t\tdelete node.properties.href;\n\t\t}\n\t}\n\n\tif (node.type === 'root' || node.type === 'element') {\n\t\tfor (const child of node.children) {\n\t\t\tremoveProtocolRelativeLinks(child);\n\t\t}\n\t}\n}\n\n/**\n * Sanitize package-rendered rich text with an intentionally small HTML\n * vocabulary. Styling, event handlers, embedded media, and protocol-relative\n * URLs are excluded; images only with `options.images` and a safe source.\n * Mention identity attributes remain available so the Mentions feature can\n * replace serialized references with React components.\n */\nexport function sanitizeHtml(input: string, options: SanitizeHtmlOptions = {}): string {\n\tif (!input) return '';\n\treturn toHtml(sanitizeHtmlTree(input, options));\n}\n\n/** The sanitized tree behind `sanitizeHtml`, for renderers that substitute elements. */\nexport function sanitizeHtmlTree(input: string, options: SanitizeHtmlOptions = {}): Root {\n\tconst unsafeTree = fromHtml(input ?? '', { fragment: true });\n\tremoveProtocolRelativeLinks(unsafeTree);\n\tconst tree = sanitize(unsafeTree, options.images ? SANITIZE_SCHEMA_WITH_IMAGES : SANITIZE_SCHEMA) as Root;\n\tif (options.images) removeUnsafeImages(tree);\n\treturn tree;\n}\n\nexport default sanitizeHtml;\n","import { createElement, Fragment, type ReactNode } from 'react';\nimport type { Element, Root, RootContent } from 'hast';\nimport styleToJs from 'style-to-js';\n\nimport { safeImageSrc } from '../../../lib/safe-image-src';\n\n/** An image in sanitized rich text, as handed to `renderImage`. */\nexport interface RichTextImageAttributes {\n\t/** Source that passed the package image policy (http, https, blob or relative). */\n\tsrc: string;\n\t/** Text alternative; empty for a decorative image. */\n\talt: string;\n\ttitle?: string;\n\twidth?: number;\n\theight?: number;\n}\n\nexport type RenderRichTextImage = (image: RichTextImageAttributes) => ReactNode;\n\ntype ReplaceRichTextElement = (element: Element) => ReactNode;\n\nconst VOID_ELEMENTS = new Set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr']);\n\nfunction toNumber(value: unknown): number | undefined {\n\tconst number = typeof value === 'number' ? value : Number(value);\n\treturn Number.isFinite(number) && number > 0 ? number : undefined;\n}\n\n/** hast properties are camelCase (`dataRefId`); the DOM attribute is `data-ref-id`. */\nfunction toReactProps(element: Element, key: number) {\n\tconst props: Record<string, unknown> = { key };\n\tfor (const [name, value] of Object.entries(element.properties)) {\n\t\tif (value == null || value === false) continue;\n\t\tif (name === 'className') props.className = Array.isArray(value) ? value.join(' ') : String(value);\n\t\telse if (/^data[A-Z]/.test(name)) props[name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)] = String(value);\n\t\telse if (/^aria[A-Z]/.test(name)) props[`aria-${name.slice(4).toLowerCase()}`] = String(value);\n\t\telse if (name === 'style' && typeof value === 'string') {\n\t\t\ttry {\n\t\t\t\tprops.style = styleToJs(value, { reactCompat: true });\n\t\t\t} catch {\n\t\t\t\t// The package sanitizer strips styles. A custom sanitizer may\n\t\t\t\t// retain an invalid declaration, so keep the element and its text.\n\t\t\t}\n\t\t}\n\t\telse props[name] = Array.isArray(value) ? value.join(' ') : value;\n\t}\n\treturn props;\n}\n\nfunction renderNode(node: RootContent, key: number, renderImage?: RenderRichTextImage, replaceElement?: ReplaceRichTextElement): ReactNode {\n\tif (node.type === 'text') return node.value;\n\tif (node.type !== 'element') return null;\n\tconst replacement = replaceElement?.(node);\n\tif (replacement !== undefined) return <Fragment key={key}>{replacement}</Fragment>;\n\tif (node.tagName === 'img' && renderImage) {\n\t\tconst src = safeImageSrc(node.properties.src);\n\t\tif (!src) return null;\n\t\tconst image: RichTextImageAttributes = {\n\t\t\tsrc,\n\t\t\talt: typeof node.properties.alt === 'string' ? node.properties.alt : '',\n\t\t\ttitle: typeof node.properties.title === 'string' ? node.properties.title : undefined,\n\t\t\twidth: toNumber(node.properties.width),\n\t\t\theight: toNumber(node.properties.height),\n\t\t};\n\t\treturn <Fragment key={key}>{renderImage(image)}</Fragment>;\n\t}\n\tconst props = toReactProps(node, key);\n\tif (VOID_ELEMENTS.has(node.tagName)) return createElement(node.tagName, props);\n\treturn createElement(node.tagName, props, ...node.children.map((child, index) => renderNode(child, index, renderImage, replaceElement)));\n}\n\n/**\n * Renders an already sanitized tree as React elements. Individual images or\n * other elements can use React components without breaking the surrounding\n * markup. Server and client output match.\n */\nexport function renderRichTextTree(tree: Root, renderImage?: RenderRichTextImage, replaceElement?: ReplaceRichTextElement): ReactNode {\n\treturn tree.children.map((child, index) => renderNode(child, index, renderImage, replaceElement));\n}\n"],"mappings":";;;;;;;;;AAOA,IAAME,IAAe,6HA4BrB,GAEMC,IAAkB;CACvB,eAAe;CACf,eAAe;CACf,UAAU,CAAC,GAAGD,CAAY;CAC1B,YAAY;EACX,GAAG;GACF;GACA;GACA;IAAC;IAAU;IAAU;IAAS;IAAW;GAAM;GAC/C;GACA;GACA;GACA;EACD;EACA,MAAM;GAAC;GAAa;GAAe;EAAa;CACjD;CACA,WAAW,EACV,MAAM;EAAC;EAAQ;EAAS;EAAU;CAAK,EACxC;CACA,OAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACD;AACD,GAGME,IAA8B;CACnC,GAAGD;CACH,UAAU,CAAC,GAAGD,GAAc,KAAK;CACjC,YAAY;EACX,GAAGC,EAAgB;EACnB,KAAK;GAAC;GAAO;GAAO;GAAS;GAAS;EAAQ;CAC/C;CACA,WAAW;EACV,GAAGA,EAAgB;EACnB,KAAK,CAAC,GAAGE,CAAkB;CAC5B;AACD;AAWA,SAASC,EAAmB,GAAgC;CAC3D,IAAIC,EAAK,SAAS,UAAUA,EAAK,SAAS,WAC1C;IAAK,WAAWA,EAAK,SAAS,QAC5B,MAAUC,EAAM,SAAS,aAAaA,EAAM,YAAY,SAASR,EAAaQ,EAAM,WAAW,GAAG,MAAM,KAAA,CAC1G;EACA,KAAK,IAAMA,KAASD,EAAK,UAAU,EAAmB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O,IAAU8B,EAAc9B,EAAK,SAASkB,CAAK,IACtEY,EAAc9B,EAAK,SAASkB,GAAO,GAAGlB,EAAK,SAAS,KAAK,GAAO,MAAUsB,EAAWrB,GAAO8B,GAAOJ,GAAaH,CAAc,CAAC,CAAC;AACxI;AAOA,SAAgBQ,EAAmB,GAAY,GAAmC,GAAoD;CACrI,OAAOrB,EAAK,SAAS,KAAK,GAAO,MAAUW,EAAWrB,GAAO8B,GAAOJ,GAAaH,CAAc,CAAC;AACjG"}
@@ -0,0 +1,17 @@
1
+ //#region src/lib/safe-image-src.ts
2
+ var e = [
3
+ "http",
4
+ "https",
5
+ "blob"
6
+ ];
7
+ function t(t) {
8
+ if (typeof t != "string") return;
9
+ let n = t.trim();
10
+ if (!n || n.startsWith("//") || n.startsWith("\\\\")) return;
11
+ let r = n.replace(/[\u0000- \u007F]+/g, ""), i = /^([a-z][a-z0-9+.-]*):/i.exec(r)?.[1]?.toLowerCase();
12
+ return i ? e.includes(i) ? n : void 0 : n;
13
+ }
14
+ //#endregion
15
+ export { t as n, e as t };
16
+
17
+ //# sourceMappingURL=safe-image-src-C6kQSMBZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe-image-src-C6kQSMBZ.js","names":["SAFE_IMAGE_SCHEMES","safeImageSrc","value","src","compact","scheme"],"sources":["../src/lib/safe-image-src.ts"],"sourcesContent":["/** Schemes an image `src` may use: web URLs and same-document `blob:` previews. */\nexport const SAFE_IMAGE_SCHEMES = ['http', 'https', 'blob'] as const;\n\n/**\n * The one image-source policy shared by the editor and read-only rich text.\n * Returns the source when it is a web URL, a `blob:` preview or a relative\n * path, and `undefined` otherwise: script, `data:` and other schemes and\n * protocol-relative (`//host`) URLs are refused. Control characters and\n * whitespace inside a scheme are ignored, so `java\\tscript:` is still refused.\n */\nexport function safeImageSrc(value: unknown): string | undefined {\n\tif (typeof value !== 'string') return undefined;\n\tconst src = value.trim();\n\tif (!src || src.startsWith('//') || src.startsWith('\\\\\\\\')) return undefined;\n\t// eslint-disable-next-line no-control-regex\n\tconst compact = src.replace(/[\\u0000- \\u007F]+/g, '');\n\tconst scheme = /^([a-z][a-z0-9+.-]*):/i.exec(compact)?.[1]?.toLowerCase();\n\tif (!scheme) return src;\n\treturn (SAFE_IMAGE_SCHEMES as readonly string[]).includes(scheme) ? src : undefined;\n}\n"],"mappings":";AACA,IAAaA,IAAqB;CAAC;CAAQ;CAAS;AAAM;AAS1D,SAAgBC,EAAa,GAAoC;CAChE,IAAI,OAAOC,KAAU,UAAU;CAC/B,IAAMC,IAAMD,EAAM,KAAK;CACvB,IAAI,CAACC,KAAOA,EAAI,WAAW,IAAI,KAAKA,EAAI,WAAW,MAAM,GAAG;CAE5D,IAAMC,IAAUD,EAAI,QAAQ,sBAAsB,EAAE,GAC9CE,IAAS,yBAAyB,KAAKD,CAAO,CAAC,GAAG,EAAE,EAAE,YAAY;CAExE,OADKC,IACGL,EAAyC,SAASK,CAAM,IAAIF,IAAM,KAAA,IADtDA;AAErB"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "./utils-DhuoqFy4.js";
3
- import { t } from "./focus-recipes-B653VaLq.js";
2
+ import { t as e } from "./utils-BVbAG2J6.js";
3
+ import { t } from "./focus-recipes-DSkiUvUp.js";
4
4
  import "react";
5
5
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
6
  import { ScrollArea as i } from "@base-ui/react/scroll-area";
@@ -45,4 +45,4 @@ function o({ className: t, orientation: r = "vertical", ...a }) {
45
45
  //#endregion
46
46
  export { o as n, a as t };
47
47
 
48
- //# sourceMappingURL=scroll-area-Bj6CRUif.js.map
48
+ //# sourceMappingURL=scroll-area-B9HKbji0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area-Bj6CRUif.js","names":["ScrollArea","ScrollAreaPrimitive","cn","ScrollArea$1","props","ScrollArea","className","viewportRef","focusRecipes","viewportClassName","orientation","ScrollBar","scrollbarClassName"],"sources":["../src/components/base/display/scroll-area.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';\n\nimport { cn } from '../../../lib/utils';\nimport { focusRecipes } from '../../../lib/focus-recipes';\n\nexport type ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {\n\t/** Axes with custom scrollbar chrome. Defaults to vertical. */\n\torientation?: 'vertical' | 'horizontal' | 'both';\n\tviewportRef?: React.Ref<HTMLDivElement>;\n\tviewportClassName?: string;\n\tscrollbarClassName?: string;\n};\n\nfunction ScrollArea({\n\torientation = 'vertical',\n\tclassName,\n\tviewportClassName,\n\tscrollbarClassName,\n\tviewportRef,\n\tchildren,\n\t...props\n}: ScrollAreaProps) {\n\treturn (\n\t\t<ScrollAreaPrimitive.Root\n\t\t\tdata-slot=\"scroll-area\"\n\t\t\tclassName={cn('scroll-area--component group/scroll-area relative overflow-hidden', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.Viewport\n\t\t\t\tref={viewportRef}\n\t\t\t\tdata-slot=\"scroll-area-viewport\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'size-full rounded-[inherit] outline-none transition-[color,box-shadow]',\n\t\t\t\t\t// The root clips overflow, so the shared ring is drawn inside the viewport edge.\n\t\t\t\t\tfocusRecipes.inset,\n\t\t\t\t\tviewportClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</ScrollAreaPrimitive.Viewport>\n\t\t\t{orientation !== 'horizontal' && <ScrollBar className={scrollbarClassName} />}\n\t\t\t{orientation !== 'vertical' && <ScrollBar orientation=\"horizontal\" className={scrollbarClassName} />}\n\t\t\t<ScrollAreaPrimitive.Corner />\n\t\t</ScrollAreaPrimitive.Root>\n\t);\n}\n\nfunction ScrollBar({\n\tclassName,\n\torientation = 'vertical',\n\t...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n\treturn (\n\t\t<ScrollAreaPrimitive.Scrollbar\n\t\t\tdata-slot=\"scroll-area-scrollbar\"\n\t\t\tdata-orientation={orientation}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t{\n\t\t\t\t\t'h-2.5 flex-col border-t border-t-transparent': orientation === 'horizontal',\n\t\t\t\t\t'h-full w-2 border-l border-l-transparent': orientation === 'vertical',\n\t\t\t\t},\n\t\t\t\t// `rounded-full`, not a scale value: the track is 8-10px on its short\n\t\t\t\t// axis, so any radius past half of that already clamps to a pill.\n\t\t\t\t// Saying `rounded-full` states the intent and stops the value drifting\n\t\t\t\t// with the radius scale.\n\t\t\t\t'flex touch-none select-none rounded-full p-px opacity-0 transition-opacity',\n\t\t\t\t'data-hovering:opacity-100 data-scrolling:opacity-100 group-focus-within/scroll-area:opacity-100',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.Thumb\n\t\t\t\tdata-slot=\"scroll-area-thumb\"\n\t\t\t\tclassName=\"relative flex-1 rounded-full bg-border\"\n\t\t\t/>\n\t\t</ScrollAreaPrimitive.Scrollbar>\n\t);\n}\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;;AAcA,SAASA,EAAW,EACnB,iBAAc,YACd,cACA,sBACA,uBACA,gBACA,aACA,GAAGI,KACgB;CACnB,OACC,kBAACH,EAAoB,MAArB;EACC,aAAU;EACV,WAAWC,EAAG,qEAAqEI,CAAS;EAC5F,GAAIF;EAHL,UAAA;GAKC,kBAACH,EAAoB,UAArB;IACC,KAAKM;IACL,aAAU;IACV,WAAWL,EACV,0EAEAM,EAAa,OACbC,CACD;IAEC;GAC4B,CAAA;GAC7BC,MAAgB,gBAAgB,kBAACC,GAAD,EAAW,WAAWC,EAAqB,CAAA;GAC3EF,MAAgB,cAAc,kBAACC,GAAD;IAAW,aAAY;IAAa,WAAWC;GAAqB,CAAA;GACnG,kBAACX,EAAoB,QAArB,CAA6B,CAAA;EACJ;;AAE5B;AAEA,SAASU,EAAU,EAClB,cACA,iBAAc,YACd,GAAGP,KACoC;CACvC,OACC,kBAACH,EAAoB,WAArB;EACC,aAAU;EACV,oBAAkBS;EACL;EACb,WAAWR,EACV;GACC,gDAAgDQ,MAAgB;GAChE,4CAA4CA,MAAgB;EAC7D,GAKA,8EACA,mGACAJ,CACD;EACA,GAAIF;EAEJ,UAAA,kBAACH,EAAoB,OAArB;GACC,aAAU;GACV,WAAU;EACV,CAAA;CAC6B,CAAA;AAEjC"}
1
+ {"version":3,"file":"scroll-area-B9HKbji0.js","names":["ScrollArea","ScrollAreaPrimitive","cn","ScrollArea$1","props","ScrollArea","className","viewportRef","focusRecipes","viewportClassName","orientation","ScrollBar","scrollbarClassName"],"sources":["../src/components/base/display/scroll-area.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';\n\nimport { cn } from '../../../lib/utils';\nimport { focusRecipes } from '../../../lib/focus-recipes';\n\nexport type ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {\n\t/** Axes with custom scrollbar chrome. Defaults to vertical. */\n\torientation?: 'vertical' | 'horizontal' | 'both';\n\tviewportRef?: React.Ref<HTMLDivElement>;\n\tviewportClassName?: string;\n\tscrollbarClassName?: string;\n};\n\nfunction ScrollArea({\n\torientation = 'vertical',\n\tclassName,\n\tviewportClassName,\n\tscrollbarClassName,\n\tviewportRef,\n\tchildren,\n\t...props\n}: ScrollAreaProps) {\n\treturn (\n\t\t<ScrollAreaPrimitive.Root\n\t\t\tdata-slot=\"scroll-area\"\n\t\t\tclassName={cn('scroll-area--component group/scroll-area relative overflow-hidden', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.Viewport\n\t\t\t\tref={viewportRef}\n\t\t\t\tdata-slot=\"scroll-area-viewport\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'size-full rounded-[inherit] outline-none transition-[color,box-shadow]',\n\t\t\t\t\t// The root clips overflow, so the shared ring is drawn inside the viewport edge.\n\t\t\t\t\tfocusRecipes.inset,\n\t\t\t\t\tviewportClassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</ScrollAreaPrimitive.Viewport>\n\t\t\t{orientation !== 'horizontal' && <ScrollBar className={scrollbarClassName} />}\n\t\t\t{orientation !== 'vertical' && <ScrollBar orientation=\"horizontal\" className={scrollbarClassName} />}\n\t\t\t<ScrollAreaPrimitive.Corner />\n\t\t</ScrollAreaPrimitive.Root>\n\t);\n}\n\nfunction ScrollBar({\n\tclassName,\n\torientation = 'vertical',\n\t...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n\treturn (\n\t\t<ScrollAreaPrimitive.Scrollbar\n\t\t\tdata-slot=\"scroll-area-scrollbar\"\n\t\t\tdata-orientation={orientation}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t{\n\t\t\t\t\t'h-2.5 flex-col border-t border-t-transparent': orientation === 'horizontal',\n\t\t\t\t\t'h-full w-2 border-l border-l-transparent': orientation === 'vertical',\n\t\t\t\t},\n\t\t\t\t// `rounded-full`, not a scale value: the track is 8-10px on its short\n\t\t\t\t// axis, so any radius past half of that already clamps to a pill.\n\t\t\t\t// Saying `rounded-full` states the intent and stops the value drifting\n\t\t\t\t// with the radius scale.\n\t\t\t\t'flex touch-none select-none rounded-full p-px opacity-0 transition-opacity',\n\t\t\t\t'data-hovering:opacity-100 data-scrolling:opacity-100 group-focus-within/scroll-area:opacity-100',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.Thumb\n\t\t\t\tdata-slot=\"scroll-area-thumb\"\n\t\t\t\tclassName=\"relative flex-1 rounded-full bg-border\"\n\t\t\t/>\n\t\t</ScrollAreaPrimitive.Scrollbar>\n\t);\n}\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;;AAcA,SAASA,EAAW,EACnB,iBAAc,YACd,cACA,sBACA,uBACA,gBACA,aACA,GAAGI,KACgB;CACnB,OACC,kBAACH,EAAoB,MAArB;EACC,aAAU;EACV,WAAWC,EAAG,qEAAqEI,CAAS;EAC5F,GAAIF;EAHL,UAAA;GAKC,kBAACH,EAAoB,UAArB;IACC,KAAKM;IACL,aAAU;IACV,WAAWL,EACV,0EAEAM,EAAa,OACbC,CACD;IAEC;GAC4B,CAAA;GAC7BC,MAAgB,gBAAgB,kBAACC,GAAD,EAAW,WAAWC,EAAqB,CAAA;GAC3EF,MAAgB,cAAc,kBAACC,GAAD;IAAW,aAAY;IAAa,WAAWC;GAAqB,CAAA;GACnG,kBAACX,EAAoB,QAArB,CAA6B,CAAA;EACJ;;AAE5B;AAEA,SAASU,EAAU,EAClB,cACA,iBAAc,YACd,GAAGP,KACoC;CACvC,OACC,kBAACH,EAAoB,WAArB;EACC,aAAU;EACV,oBAAkBS;EACL;EACb,WAAWR,EACV;GACC,gDAAgDQ,MAAgB;GAChE,4CAA4CA,MAAgB;EAC7D,GAKA,8EACA,mGACAJ,CACD;EACA,GAAIF;EAEJ,UAAA,kBAACH,EAAoB,OAArB;GACC,aAAU;GACV,WAAU;EACV,CAAA;CAC6B,CAAA;AAEjC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { t as e } from "./utils-DhuoqFy4.js";
3
- import { t } from "./separator-B9ewiCGO.js";
2
+ import { t as e } from "./utils-BVbAG2J6.js";
3
+ import { t } from "./separator-KGsNXt2J.js";
4
4
  import "react";
5
5
  import { jsx as n } from "react/jsx-runtime";
6
6
  //#region src/components/base/display/separator.tsx
@@ -18,4 +18,4 @@ r.displayName = "Separator";
18
18
  //#endregion
19
19
  export { r as t };
20
20
 
21
- //# sourceMappingURL=separator-DM6gs2vu.js.map
21
+ //# sourceMappingURL=separator-DaDe26sf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator-DaDe26sf.js","names":["PrimitiveSeparator","cn","Separator","props","Separator$1","dashed","className"],"sources":["../src/components/base/display/separator.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Separator as PrimitiveSeparator } from '../../ui/separator';\nimport { cn } from '../../../lib/utils';\n\nexport interface SeparatorProps extends React.ComponentProps<typeof PrimitiveSeparator> {\n\t/** Render the rule as a dashed line instead of a solid border fill. */\n\tdashed?: boolean;\n}\n\nexport function Separator({\n\tclassName,\n\tdashed = false,\n\t...props\n}: SeparatorProps) {\n\treturn (\n\t\t<PrimitiveSeparator\n\t\t\tclassName={cn(\n\t\t\t\t'separator--component',\n\t\t\t\tdashed && [\n\t\t\t\t\t// `border-0` zeroes every side first: without preflight, a dashed\n\t\t\t\t\t// style would otherwise give the unset sides a 3px medium border.\n\t\t\t\t\t'bg-transparent border-0 border-border border-dashed',\n\t\t\t\t\t'data-[orientation=horizontal]:h-0 data-[orientation=horizontal]:border-t',\n\t\t\t\t\t'data-[orientation=vertical]:w-0 data-[orientation=vertical]:border-l',\n\t\t\t\t],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nSeparator.displayName = 'Separator';\n"],"mappings":";;;;;;AAUA,SAAgBE,EAAU,EACzB,cACA,YAAS,IACT,GAAGC,KACe;CAClB,OACC,kBAACH,GAAD;EACC,WAAWC,EACV,wBACAI,KAAU;GAGT;GACA;GACA;EACD,GACAC,CACD;EACA,GAAIH;CACJ,CAAA;AAEH;AAEA,EAAU,cAAc"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./utils-DhuoqFy4.js";
2
+ import { t as e } from "./utils-BVbAG2J6.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  import { Separator as n } from "@base-ui/react/separator";
5
5
  //#region src/components/ui/separator.tsx
@@ -14,4 +14,4 @@ function r({ className: r, orientation: i = "horizontal", ...a }) {
14
14
  //#endregion
15
15
  export { r as t };
16
16
 
17
- //# sourceMappingURL=separator-B9ewiCGO.js.map
17
+ //# sourceMappingURL=separator-KGsNXt2J.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"separator-B9ewiCGO.js","names":["Separator","SeparatorPrimitive","cn","Separator$1","props","Separator","className"],"sources":["../src/components/ui/separator.tsx"],"sourcesContent":["\"use client\"\n\nimport { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":";;;;;AAMA,SAASA,EAAU,EACjB,cACA,iBAAc,cACd,GAAGI,KACwB;CAC3B,OACE,kBAACH,GAAD;EACE,aAAU;EACG;EACb,WAAWC,EACT,wKACAI,CACF;EACA,GAAIF;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"separator-KGsNXt2J.js","names":["Separator","SeparatorPrimitive","cn","Separator$1","props","Separator","className"],"sources":["../src/components/ui/separator.tsx"],"sourcesContent":["\"use client\"\n\nimport { Separator as SeparatorPrimitive } from \"@base-ui/react/separator\"\n\nimport { cn } from \"../../lib/utils\"\n\nfunction Separator({\n className,\n orientation = \"horizontal\",\n ...props\n}: SeparatorPrimitive.Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n className={cn(\n \"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"mappings":";;;;;AAMA,SAASA,EAAU,EACjB,cACA,iBAAc,cACd,GAAGI,KACwB;CAC3B,OACE,kBAACH,GAAD;EACE,aAAU;EACG;EACb,WAAWC,EACT,wKACAI,CACF;EACA,GAAIF;CACL,CAAA;AAEL"}