themelia-react-ui 2.0.0 → 2.0.2

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 (707) hide show
  1. package/CHANGELOG.md +527 -0
  2. package/README.md +47 -14
  3. package/THIRD_PARTY_NOTICES.md +13 -0
  4. package/dist/accordion-Cjb6sx0G.js +208 -0
  5. package/dist/accordion-Cjb6sx0G.js.map +1 -0
  6. package/dist/action-menu-CllU52Mm.js +280 -0
  7. package/dist/action-menu-CllU52Mm.js.map +1 -0
  8. package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
  9. package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
  10. package/dist/ai-artifact-DvTwDVyL.js +1148 -0
  11. package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
  12. package/dist/{app-shell-BE_j8-AT.js → app-shell-C4FhvCqF.js} +5 -5
  13. package/dist/{app-shell-BE_j8-AT.js.map → app-shell-C4FhvCqF.js.map} +1 -1
  14. package/dist/attachment-BxDfL2mw.js +246 -0
  15. package/dist/attachment-BxDfL2mw.js.map +1 -0
  16. package/dist/{auth-M3vGMgDR.js → auth-ax2BqjrI.js} +241 -235
  17. package/dist/auth-ax2BqjrI.js.map +1 -0
  18. package/dist/{avatar-djdaaQ_s.js → avatar-DAPlDvhJ.js} +67 -66
  19. package/dist/avatar-DAPlDvhJ.js.map +1 -0
  20. package/dist/badge-HpFqoqSY.js +93 -0
  21. package/dist/badge-HpFqoqSY.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 +3 -0
  28. package/dist/base/buttons.js +2 -3
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +50 -46
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +69 -81
  33. package/dist/base/cascader.js.map +1 -1
  34. package/dist/base/chart.js +1 -1
  35. package/dist/base/choice-inputs.js +3 -3
  36. package/dist/base/code-block.js +1 -1
  37. package/dist/base/combobox.js +2 -2
  38. package/dist/base/command.js +1 -1
  39. package/dist/base/copyable.js +1 -1
  40. package/dist/base/date-pickers.js +2 -2
  41. package/dist/base/display.js +7 -7
  42. package/dist/base/feedback.js +3 -3
  43. package/dist/base/forms-numeric.js +1 -1
  44. package/dist/base/forms.js +2 -2
  45. package/dist/base/inline-edit.js +20 -20
  46. package/dist/base/inline-edit.js.map +1 -1
  47. package/dist/base/item.js +1 -1
  48. package/dist/base/media-gallery.js +1 -1
  49. package/dist/base/metadata-list.js +3 -0
  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 +1 -1
  54. package/dist/base/repeaters.js +216 -220
  55. package/dist/base/repeaters.js.map +1 -1
  56. package/dist/base/sheet.js +1 -1
  57. package/dist/base/sidebar.js +1 -1
  58. package/dist/base/signature-pad.js +147 -137
  59. package/dist/base/signature-pad.js.map +1 -1
  60. package/dist/base/skeleton.js +1 -1
  61. package/dist/base/spinner.js +79 -2
  62. package/dist/base/spinner.js.map +1 -0
  63. package/dist/base/structure.js +1 -1
  64. package/dist/base/table.js +1 -1
  65. package/dist/base/text-inputs.js +2 -2
  66. package/dist/base/toaster.js +46 -45
  67. package/dist/base/toaster.js.map +1 -1
  68. package/dist/base/tree.js +1 -1
  69. package/dist/base/upload-queue.js +1 -1
  70. package/dist/base/upload.js +3 -3
  71. package/dist/base/value-inputs.js +2 -2
  72. package/dist/batch-action-bar-DnUJ21NQ.js +105 -0
  73. package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
  74. package/dist/blocks/admin.js +171 -169
  75. package/dist/blocks/admin.js.map +1 -1
  76. package/dist/blocks/ai.js +308 -285
  77. package/dist/blocks/ai.js.map +1 -1
  78. package/dist/blocks/analytics/usage-card.js +1 -1
  79. package/dist/blocks/analytics.js +626 -589
  80. package/dist/blocks/analytics.js.map +1 -1
  81. package/dist/blocks/collaboration.js +1 -1
  82. package/dist/blocks/commerce/receipt.js +1 -1
  83. package/dist/blocks/commerce.js +2051 -1329
  84. package/dist/blocks/commerce.js.map +1 -1
  85. package/dist/blocks/data-display.js +3 -2
  86. package/dist/blocks/onboarding.js +68 -58
  87. package/dist/blocks/onboarding.js.map +1 -1
  88. package/dist/blocks/planning.js +27 -26
  89. package/dist/blocks/planning.js.map +1 -1
  90. package/dist/blocks/timelines.js +1 -1
  91. package/dist/breadcrumbs-C-oqs1sQ.js +129 -0
  92. package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
  93. package/dist/{button-R9CCoH7A.js → button-DVzspB_G.js} +15 -14
  94. package/dist/button-DVzspB_G.js.map +1 -0
  95. package/dist/{button-BS3KDg00.js → buttons-DPZekJFu.js} +208 -216
  96. package/dist/buttons-DPZekJFu.js.map +1 -0
  97. package/dist/cards-BaBZR-AU.js +68 -0
  98. package/dist/cards-BaBZR-AU.js.map +1 -0
  99. package/dist/{chart-DwYRKKc-.js → chart-ZOYyK2xG.js} +58 -55
  100. package/dist/chart-ZOYyK2xG.js.map +1 -0
  101. package/dist/checkbox-AWIhNhmo.js +36 -0
  102. package/dist/checkbox-AWIhNhmo.js.map +1 -0
  103. package/dist/choice-inputs-CNHvARCJ.js +770 -0
  104. package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
  105. package/dist/code-block-DeneBJR_.js +185 -0
  106. package/dist/code-block-DeneBJR_.js.map +1 -0
  107. package/dist/{collapsible-oMUGM4tr.js → collapsible-C-_l4hpy.js} +4 -4
  108. package/dist/{collapsible-oMUGM4tr.js.map → collapsible-C-_l4hpy.js.map} +1 -1
  109. package/dist/{collection-content-Ys-OZOkY.js → collection-content-By56pLog.js} +3 -3
  110. package/dist/{collection-content-Ys-OZOkY.js.map → collection-content-By56pLog.js.map} +1 -1
  111. package/dist/combobox-C0EQW6dr.js +875 -0
  112. package/dist/combobox-C0EQW6dr.js.map +1 -0
  113. package/dist/combobox-xCQ2RMNE.js +309 -0
  114. package/dist/combobox-xCQ2RMNE.js.map +1 -0
  115. package/dist/{command-kPMPjIxJ.js → command-C25VMRII.js} +7 -7
  116. package/dist/{command-kPMPjIxJ.js.map → command-C25VMRII.js.map} +1 -1
  117. package/dist/{comments-You0Bzbr.js → comments-BYYlTA8E.js} +390 -379
  118. package/dist/comments-BYYlTA8E.js.map +1 -0
  119. package/dist/components/base/action-menu/action-menu.d.ts +21 -4
  120. package/dist/components/base/action-menu/action-menu.recipes.d.ts +21 -0
  121. package/dist/components/base/action-menu/index.d.ts +1 -0
  122. package/dist/components/base/badge/badge.recipes.d.ts +5 -5
  123. package/dist/components/base/batch-action-bar/batch-action-bar.d.ts +50 -0
  124. package/dist/components/base/batch-action-bar/batch-action-bar.strings.d.ts +20 -0
  125. package/dist/components/base/batch-action-bar/index.d.ts +8 -0
  126. package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
  127. package/dist/components/base/buttons/button.recipes.d.ts +2 -2
  128. package/dist/components/base/buttons/loader-button.d.ts +2 -1
  129. package/dist/components/base/cards/card.recipes.d.ts +2 -3
  130. package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
  131. package/dist/components/base/cards/smart-card.types.d.ts +11 -4
  132. package/dist/components/base/chart/chart.d.ts +2 -5
  133. package/dist/components/base/choice-inputs/checkbox.d.ts +2 -2
  134. package/dist/components/base/choice-inputs/choice-types.d.ts +18 -6
  135. package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
  136. package/dist/components/base/combobox/index.d.ts +30 -4
  137. package/dist/components/base/display/alert-dialog.d.ts +6 -5
  138. package/dist/components/base/display/dialog.d.ts +4 -8
  139. package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
  140. package/dist/components/base/forms/form-sizing.d.ts +26 -15
  141. package/dist/components/base/metadata-list/index.d.ts +12 -0
  142. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.d.ts +28 -25
  143. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-value.d.ts +2 -2
  144. package/dist/components/base/navigation/index.d.ts +1 -1
  145. package/dist/components/base/navigation/page-header/index.d.ts +1 -0
  146. package/dist/components/base/navigation/page-header/page-header-commands.d.ts +73 -0
  147. package/dist/components/base/navigation/page-header/page-header.d.ts +26 -3
  148. package/dist/components/base/navigation/pagination.d.ts +5 -2
  149. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  150. package/dist/components/base/sheet/sheet.d.ts +4 -8
  151. package/dist/components/base/signature-pad/signature-pad.types.d.ts +5 -1
  152. package/dist/components/base/signature-pad/signature-pad.utils.d.ts +11 -3
  153. package/dist/components/base/table/index.d.ts +9 -2
  154. package/dist/components/base/text-inputs/field-clear-button.d.ts +6 -0
  155. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  156. package/dist/components/base/upload/upload.recipes.d.ts +25 -3
  157. package/dist/components/base/value-inputs/index.d.ts +5 -5
  158. package/dist/components/base/value-inputs/tags-input.d.ts +36 -12
  159. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  160. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  161. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  162. package/dist/components/blocks/commerce/address-card/types.d.ts +2 -1
  163. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +3 -1
  164. package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
  165. package/dist/components/blocks/commerce/cart-summary/types.d.ts +6 -1
  166. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +3 -1
  167. package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
  168. package/dist/components/blocks/commerce/discount-stack/types.d.ts +16 -4
  169. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +5 -0
  170. package/dist/components/blocks/commerce/fulfillment-group/index.d.ts +2 -0
  171. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +45 -0
  172. package/dist/components/blocks/commerce/index.d.ts +13 -5
  173. package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
  174. package/dist/components/blocks/commerce/invoice-header/types.d.ts +4 -2
  175. package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +1 -1
  176. package/dist/components/blocks/commerce/invoice-mini/types.d.ts +2 -1
  177. package/dist/components/blocks/commerce/order-customer/index.d.ts +2 -0
  178. package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +5 -0
  179. package/dist/components/blocks/commerce/order-customer/types.d.ts +48 -0
  180. package/dist/components/blocks/commerce/order-header/index.d.ts +2 -0
  181. package/dist/components/blocks/commerce/order-header/order-header.d.ts +5 -0
  182. package/dist/components/blocks/commerce/order-header/types.d.ts +37 -0
  183. package/dist/components/blocks/commerce/order-line-item/index.d.ts +2 -0
  184. package/dist/components/blocks/commerce/order-line-item/order-line-item.d.ts +5 -0
  185. package/dist/components/blocks/commerce/order-line-item/types.d.ts +46 -0
  186. package/dist/components/blocks/commerce/order-summary/index.d.ts +2 -0
  187. package/dist/components/blocks/commerce/order-summary/order-summary.d.ts +5 -0
  188. package/dist/components/blocks/commerce/order-summary/types.d.ts +42 -0
  189. package/dist/components/blocks/commerce/order-transactions/index.d.ts +2 -0
  190. package/dist/components/blocks/commerce/order-transactions/order-transactions.d.ts +5 -0
  191. package/dist/components/blocks/commerce/order-transactions/types.d.ts +46 -0
  192. package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
  193. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +9 -1
  194. package/dist/components/blocks/commerce/payment-method/types.d.ts +12 -1
  195. package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
  196. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +3 -1
  197. package/dist/components/blocks/commerce/refund-status/types.d.ts +6 -3
  198. package/dist/components/blocks/commerce/shared/address-lines.d.ts +21 -0
  199. package/dist/components/blocks/commerce/shared/line-thumbnail.d.ts +9 -0
  200. package/dist/components/blocks/commerce/shared/order-status.d.ts +51 -0
  201. package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
  202. package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +27 -6
  203. package/dist/components/blocks/commerce/summary-panel/amount-row.d.ts +2 -0
  204. package/dist/components/blocks/commerce/summary-panel/index.d.ts +3 -0
  205. package/dist/components/blocks/commerce/summary-panel/summary-panel.d.ts +2 -0
  206. package/dist/components/blocks/commerce/summary-panel/types.d.ts +26 -0
  207. package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
  208. package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +2 -1
  209. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  210. package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
  211. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  212. package/dist/components/features/activities/partials/activity-row.d.ts +6 -2
  213. package/dist/components/features/activities/partials/tone-tokens.d.ts +0 -6
  214. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  215. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  216. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  217. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  218. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  219. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  220. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  221. package/dist/components/features/combobox/types.d.ts +4 -0
  222. package/dist/components/features/global-search/partials/global-search-group-heading.d.ts +15 -0
  223. package/dist/components/features/global-search/partials/tone-palettes.d.ts +0 -5
  224. package/dist/components/features/kanban/kanban.d.ts +1 -1
  225. package/dist/components/features/kanban/kanban.strings.d.ts +1 -1
  226. package/dist/components/features/kanban/kanban.types.d.ts +2 -2
  227. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  228. package/dist/components/features/media-library/index.d.ts +1 -1
  229. package/dist/components/features/media-library/media-library.d.ts +1 -1
  230. package/dist/components/features/media-library/media-library.strings.d.ts +6 -0
  231. package/dist/components/features/media-library/media-library.types.d.ts +74 -1
  232. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  233. package/dist/components/features/mentions/partials/mention-kind-toggles.d.ts +16 -0
  234. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  235. package/dist/components/features/overlays/dialog.d.ts +1 -1
  236. package/dist/components/features/overlays/index.d.ts +1 -1
  237. package/dist/components/features/overlays/overlay-tone-icon.d.ts +3 -3
  238. package/dist/components/features/overlays/overlays.types.d.ts +20 -0
  239. package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
  240. package/dist/components/features/products/components/product-details-card.d.ts +5 -0
  241. package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
  242. package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
  243. package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
  244. package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
  245. package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
  246. package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
  247. package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
  248. package/dist/components/features/products/components/product-variant-action-menu.d.ts +23 -1
  249. package/dist/components/features/products/products.types.d.ts +9 -2
  250. package/dist/components/features/resource/index.d.ts +1 -1
  251. package/dist/components/features/resource/resource.d.ts +1 -1
  252. package/dist/components/features/resource/resource.types.d.ts +34 -6
  253. package/dist/components/features/rich-text-editor/index.d.ts +2 -1
  254. package/dist/components/features/rich-text-editor/partials/image-nodes.d.ts +13 -0
  255. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +66 -0
  256. package/dist/components/features/rich-text-editor/partials/inline-reference-node.d.ts +19 -0
  257. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +7 -1
  258. package/dist/components/features/rich-text-editor/rich-text-editor.strings.d.ts +14 -0
  259. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +54 -1
  260. package/dist/components/features/rich-text-editor/use-rich-text-images.d.ts +18 -0
  261. package/dist/components/features/sync/index.d.ts +26 -3
  262. package/dist/components/features/table/data-table.d.ts +1 -1
  263. package/dist/components/features/table/table-header.d.ts +1 -1
  264. package/dist/components/features/table/table.strings.d.ts +55 -1
  265. package/dist/components/features/table/table.types.d.ts +49 -11
  266. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  267. package/dist/components/layout/page/index.d.ts +1 -1
  268. package/dist/components/layout/page/page.types.d.ts +33 -36
  269. package/dist/components/layout/page/partials/page-actions.d.ts +1 -0
  270. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  271. package/dist/components/layout/settings/settings.d.ts +16 -2
  272. package/dist/components/layout/workspace/workspace.types.d.ts +21 -4
  273. package/dist/components/primitives/number.d.ts +4 -2
  274. package/dist/components/primitives/value.d.ts +3 -1
  275. package/dist/components/typography/rich-text/index.d.ts +1 -1
  276. package/dist/components/typography/rich-text/rich-text-tree.d.ts +19 -0
  277. package/dist/components/typography/rich-text/rich-text.d.ts +16 -0
  278. package/dist/components/typography/text-link.d.ts +8 -3
  279. package/dist/components/ui/checkbox.d.ts +4 -3
  280. package/dist/components/ui/combobox.d.ts +6 -2
  281. package/dist/components/ui/item.d.ts +8 -8
  282. package/dist/components/ui/overlay.recipes.d.ts +0 -9
  283. package/dist/components/ui/switch.d.ts +2 -2
  284. package/dist/components/ui/tabs.d.ts +1 -1
  285. package/dist/{containers-D_L4mTVb.js → containers-Mu1LMGV1.js} +36 -35
  286. package/dist/containers-Mu1LMGV1.js.map +1 -0
  287. package/dist/{copyable-DDjTeW_j.js → copyable-ClBuk_UK.js} +6 -6
  288. package/dist/{copyable-DDjTeW_j.js.map → copyable-ClBuk_UK.js.map} +1 -1
  289. package/dist/data-display-DT_khPl_.js +971 -0
  290. package/dist/data-display-DT_khPl_.js.map +1 -0
  291. package/dist/{date-uf3z37Nm.js → date-DCrsDTZc.js} +5 -5
  292. package/dist/{date-uf3z37Nm.js.map → date-DCrsDTZc.js.map} +1 -1
  293. package/dist/date-picker-ay0Pha_a.js +1530 -0
  294. package/dist/date-picker-ay0Pha_a.js.map +1 -0
  295. package/dist/date-pickers-Ccw8DL2b.js +175 -0
  296. package/dist/date-pickers-Ccw8DL2b.js.map +1 -0
  297. package/dist/display-hAc1HjpI.js +344 -0
  298. package/dist/display-hAc1HjpI.js.map +1 -0
  299. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  300. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  301. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  302. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  303. package/dist/features/activities.js +478 -542
  304. package/dist/features/activities.js.map +1 -1
  305. package/dist/features/ai-chat.js +209 -199
  306. package/dist/features/ai-chat.js.map +1 -1
  307. package/dist/features/appointment-calendar.js +683 -0
  308. package/dist/features/appointment-calendar.js.map +1 -0
  309. package/dist/features/async-preview.js +109 -107
  310. package/dist/features/async-preview.js.map +1 -1
  311. package/dist/features/combobox.js +1 -1
  312. package/dist/features/comments.js +1 -1
  313. package/dist/features/data-view.js +30 -29
  314. package/dist/features/data-view.js.map +1 -1
  315. package/dist/features/email-composer/engine.js +1 -1
  316. package/dist/features/email-composer.js +285 -283
  317. package/dist/features/email-composer.js.map +1 -1
  318. package/dist/features/event-calendar.js +282 -273
  319. package/dist/features/event-calendar.js.map +1 -1
  320. package/dist/features/filters.js +1 -1
  321. package/dist/features/global-search.js +318 -318
  322. package/dist/features/global-search.js.map +1 -1
  323. package/dist/features/kanban.js +146 -147
  324. package/dist/features/kanban.js.map +1 -1
  325. package/dist/features/map.js +269 -268
  326. package/dist/features/map.js.map +1 -1
  327. package/dist/features/media-library.js +970 -863
  328. package/dist/features/media-library.js.map +1 -1
  329. package/dist/features/mentions.js +1 -1
  330. package/dist/features/overlays.js +1 -1
  331. package/dist/features/products.js +1137 -1124
  332. package/dist/features/products.js.map +1 -1
  333. package/dist/features/questionnaire.js +206 -194
  334. package/dist/features/questionnaire.js.map +1 -1
  335. package/dist/features/resource-assignment.js +24 -21
  336. package/dist/features/resource-assignment.js.map +1 -1
  337. package/dist/features/resource.js +77 -69
  338. package/dist/features/resource.js.map +1 -1
  339. package/dist/features/rich-text-editor.js +30 -11
  340. package/dist/features/rich-text-editor.js.map +1 -1
  341. package/dist/features/schema-form.js +35 -33
  342. package/dist/features/schema-form.js.map +1 -1
  343. package/dist/features/suggestions.js +3 -3
  344. package/dist/features/sync.js +11 -5
  345. package/dist/features/sync.js.map +1 -1
  346. package/dist/features/table.js +1 -1
  347. package/dist/features/theme-tweaker.js +501 -496
  348. package/dist/features/theme-tweaker.js.map +1 -1
  349. package/dist/feedback-BYIhtitP.js +239 -0
  350. package/dist/feedback-BYIhtitP.js.map +1 -0
  351. package/dist/field-affordance-recipes-DZhnIL_Y.js +41 -0
  352. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  353. package/dist/field-state-recipes-BVA2CWHo.js +12 -0
  354. package/dist/field-state-recipes-BVA2CWHo.js.map +1 -0
  355. package/dist/{filters-Da-gNPsE.js → filters-BGfvjP4d.js} +483 -472
  356. package/dist/filters-BGfvjP4d.js.map +1 -0
  357. package/dist/focus-recipes-B653VaLq.js +12 -0
  358. package/dist/focus-recipes-B653VaLq.js.map +1 -0
  359. package/dist/{form-field-VZRULhUK.js → form-field-CwH9y77i.js} +6 -5
  360. package/dist/form-field-CwH9y77i.js.map +1 -0
  361. package/dist/{form-sizing-uWP4lzVh.js → form-sizing-BdP_Mf5p.js} +45 -46
  362. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  363. package/dist/{forms-DDeEnXSY.js → forms-B9G_xwzi.js} +22 -22
  364. package/dist/{forms-DDeEnXSY.js.map → forms-B9G_xwzi.js.map} +1 -1
  365. package/dist/forms-numeric-B_jraJaQ.js +906 -0
  366. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  367. package/dist/{header-2ycNqGOR.js → header-CGXuhcRm.js} +164 -161
  368. package/dist/header-CGXuhcRm.js.map +1 -0
  369. package/dist/{hooks-DQ5SPwZw.js → hooks-Dkz0K2WT.js} +2 -2
  370. package/dist/{hooks-DQ5SPwZw.js.map → hooks-Dkz0K2WT.js.map} +1 -1
  371. package/dist/{http-CdEIHyQf.js → http-D_6rOnzU.js} +2 -2
  372. package/dist/{http-CdEIHyQf.js.map → http-D_6rOnzU.js.map} +1 -1
  373. package/dist/icon-badge-DYKIwvOV.js +55 -0
  374. package/dist/icon-badge-DYKIwvOV.js.map +1 -0
  375. package/dist/index.js +7 -7
  376. package/dist/input-CZw8iU99.js +21 -0
  377. package/dist/input-CZw8iU99.js.map +1 -0
  378. package/dist/input-DQdEd0YD.js +263 -0
  379. package/dist/input-DQdEd0YD.js.map +1 -0
  380. package/dist/interaction-recipes-XR9ZpVYL.js +25 -0
  381. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  382. package/dist/item-K5_ghvze.js +275 -0
  383. package/dist/item-K5_ghvze.js.map +1 -0
  384. package/dist/layer-recipes-CCpklYME.js +13 -0
  385. package/dist/layer-recipes-CCpklYME.js.map +1 -0
  386. package/dist/layout/app-shell.js +1 -1
  387. package/dist/layout/auth.js +1 -1
  388. package/dist/layout/containers.js +1 -1
  389. package/dist/layout/header.js +1 -1
  390. package/dist/layout/hooks.js +1 -1
  391. package/dist/layout/navigation.js +1 -1
  392. package/dist/layout/page.js +1 -1
  393. package/dist/layout/settings.js +1 -1
  394. package/dist/layout/sidebar.js +2 -2
  395. package/dist/layout/workspace.js +1 -1
  396. package/dist/layout.js +10 -10
  397. package/dist/lib/affordance-geometry.generated.d.ts +72 -0
  398. package/dist/lib/editable-text-recipe.d.ts +4 -4
  399. package/dist/lib/field-affordance-recipes.d.ts +8 -3
  400. package/dist/lib/field-state-recipes.d.ts +9 -8
  401. package/dist/lib/focus-recipes.d.ts +24 -0
  402. package/dist/lib/interaction-recipes.d.ts +40 -0
  403. package/dist/lib/layer-recipes.d.ts +19 -0
  404. package/dist/lib/motion-recipes.d.ts +1 -0
  405. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -0
  406. package/dist/lib/safe-image-src.d.ts +10 -0
  407. package/dist/lib/sanitize-html.d.ts +15 -3
  408. package/dist/lib/surface-recipes.d.ts +47 -7
  409. package/dist/lib/theme-mode-css.d.ts +7 -0
  410. package/dist/lib/token-merge.generated.d.ts +9 -6
  411. package/dist/lib/tone-recipes.d.ts +87 -0
  412. package/dist/lib/ui-provider/hooks.d.ts +2 -1
  413. package/dist/lib/ui-provider/index.d.ts +2 -2
  414. package/dist/lib/ui-provider/types.d.ts +11 -2
  415. package/dist/lib/utils.js +1 -1
  416. package/dist/media-gallery-3zIVLMWH.js +203 -0
  417. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  418. package/dist/mentions-utuUvH1K.js +570 -0
  419. package/dist/mentions-utuUvH1K.js.map +1 -0
  420. package/dist/{message-YfFmbXNP.js → message-DZ_ruyUV.js} +7 -6
  421. package/dist/message-DZ_ruyUV.js.map +1 -0
  422. package/dist/metadata-list-8N16ZMW_.js +405 -0
  423. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  424. package/dist/{motion-recipes-B6jKXEcN.js → motion-recipes-ChBg4HBq.js} +3 -2
  425. package/dist/{motion-recipes-B6jKXEcN.js.map → motion-recipes-ChBg4HBq.js.map} +1 -1
  426. package/dist/navigation-Bnotn4AQ.js +145 -0
  427. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  428. package/dist/navigation-BzhHI3lo.js +269 -0
  429. package/dist/navigation-BzhHI3lo.js.map +1 -0
  430. package/dist/{navigation-row-recipes-DlU-4QYO.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  431. package/dist/{navigation-row-recipes-DlU-4QYO.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  432. package/dist/{number-CKRBYmZK.js → number-DbV1Dija.js} +36 -34
  433. package/dist/{number-CKRBYmZK.js.map → number-DbV1Dija.js.map} +1 -1
  434. package/dist/overflow-tab-bar-CWY7Nogn.js +282 -0
  435. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  436. package/dist/overlay.recipes-8GHqmlb4.js +6 -0
  437. package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
  438. package/dist/overlays-DNWmZrJ4.js +1001 -0
  439. package/dist/overlays-DNWmZrJ4.js.map +1 -0
  440. package/dist/page-Bgl1F560.js +224 -0
  441. package/dist/page-Bgl1F560.js.map +1 -0
  442. package/dist/page-header-commands-DOb6WsfD.js +126 -0
  443. package/dist/page-header-commands-DOb6WsfD.js.map +1 -0
  444. package/dist/pagination-BL25hu2s.js +158 -0
  445. package/dist/pagination-BL25hu2s.js.map +1 -0
  446. package/dist/{popover-Dcv_9jxr.js → popover-7_m66eYW.js} +11 -10
  447. package/dist/popover-7_m66eYW.js.map +1 -0
  448. package/dist/popover-menu-B9WWygpa.js +100 -0
  449. package/dist/popover-menu-B9WWygpa.js.map +1 -0
  450. package/dist/{popover.recipes-wmbvL8Ah.js → popover.recipes-D3j8R8Yp.js} +18 -11
  451. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  452. package/dist/{primitives-BHrwQXFC.js → primitives-BFK08r9M.js} +45 -44
  453. package/dist/primitives-BFK08r9M.js.map +1 -0
  454. package/dist/primitives.js +4 -4
  455. package/dist/{progress-Br9WTFya.js → progress-B1VnCT0K.js} +9 -9
  456. package/dist/{progress-Br9WTFya.js.map → progress-B1VnCT0K.js.map} +1 -1
  457. package/dist/{receipt-CV89q1fs.js → receipt-BVSOH3Xo.js} +9 -6
  458. package/dist/{receipt-CV89q1fs.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  459. package/dist/rich-text-GOUyKQ-s.js +78 -0
  460. package/dist/rich-text-GOUyKQ-s.js.map +1 -0
  461. package/dist/rich-text-editor-cRLC-eBK.js +1196 -0
  462. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  463. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  464. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  465. package/dist/rich-text-editor.strings-CB59ekH2.js +38 -0
  466. package/dist/rich-text-editor.strings-CB59ekH2.js.map +1 -0
  467. package/dist/safe-image-src-C6kQSMBZ.js +17 -0
  468. package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
  469. package/dist/sanitize-html-DsQmI48u.js +92 -0
  470. package/dist/sanitize-html-DsQmI48u.js.map +1 -0
  471. package/dist/scroll-area-DcI-M1UT.js +48 -0
  472. package/dist/scroll-area-DcI-M1UT.js.map +1 -0
  473. package/dist/{separator-Do5GWDYi.js → separator-BDV-Y648.js} +3 -3
  474. package/dist/{separator-Do5GWDYi.js.map → separator-BDV-Y648.js.map} +1 -1
  475. package/dist/{separator-BMEvwnSX.js → separator-Bom7NsGO.js} +2 -2
  476. package/dist/{separator-BMEvwnSX.js.map → separator-Bom7NsGO.js.map} +1 -1
  477. package/dist/services/actions/action-adapters.d.ts +18 -0
  478. package/dist/services/actions/index.d.ts +1 -1
  479. package/dist/services/actions.js +16 -4
  480. package/dist/services/actions.js.map +1 -1
  481. package/dist/settings-ybnjVwbd.js +171 -0
  482. package/dist/settings-ybnjVwbd.js.map +1 -0
  483. package/dist/sheet-CGpB3omz.js +211 -0
  484. package/dist/sheet-CGpB3omz.js.map +1 -0
  485. package/dist/{sidebar-Cb8WzOvE.js → sidebar-A0ElHINE.js} +17 -16
  486. package/dist/sidebar-A0ElHINE.js.map +1 -0
  487. package/dist/{sidebar-Crc9M9JV.js → sidebar-CPx_7YBa.js} +205 -203
  488. package/dist/sidebar-CPx_7YBa.js.map +1 -0
  489. package/dist/{skeleton-DVMXr15h.js → skeleton-Byjnt7qr.js} +9 -9
  490. package/dist/{skeleton-DVMXr15h.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  491. package/dist/smart-card-DiC5aac3.js +604 -0
  492. package/dist/smart-card-DiC5aac3.js.map +1 -0
  493. package/dist/{structure-hzCW-XsV.js → structure-BmisBK-3.js} +2 -2
  494. package/dist/{structure-hzCW-XsV.js.map → structure-BmisBK-3.js.map} +1 -1
  495. package/dist/style.css +1 -1
  496. package/dist/surface-recipes-BKRVW8Os.js +43 -0
  497. package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
  498. package/dist/table-BweFy_P9.js +1530 -0
  499. package/dist/table-BweFy_P9.js.map +1 -0
  500. package/dist/table-DsfzoUia.js +175 -0
  501. package/dist/table-DsfzoUia.js.map +1 -0
  502. package/dist/tabs-CDocW5D1.js +191 -0
  503. package/dist/tabs-CDocW5D1.js.map +1 -0
  504. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  505. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  506. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  507. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  508. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  509. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  510. package/dist/theme.css +285 -228
  511. package/dist/themes/green.css +16 -12
  512. package/dist/timelines-CwM_9IhD.js +457 -0
  513. package/dist/timelines-CwM_9IhD.js.map +1 -0
  514. package/dist/tone-recipes-BPsRAvhu.js +73 -0
  515. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  516. package/dist/tooltip-yiRJUFjp.js +111 -0
  517. package/dist/tooltip-yiRJUFjp.js.map +1 -0
  518. package/dist/{tree-BotPlyiD.js → tree-WnKQzwbq.js} +69 -67
  519. package/dist/tree-WnKQzwbq.js.map +1 -0
  520. package/dist/typography/rich-text.js +1 -1
  521. package/dist/typography-UTnveOEy.js +117 -0
  522. package/dist/typography-UTnveOEy.js.map +1 -0
  523. package/dist/typography.js +2 -2
  524. package/dist/{ui-provider-D2_TeLqw.js → ui-provider-C_U0Xma4.js} +13 -5
  525. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  526. package/dist/ui-provider.js +3 -3
  527. package/dist/{upload-B0WHW7ak.js → upload-CXyxmQBP.js} +210 -209
  528. package/dist/upload-CXyxmQBP.js.map +1 -0
  529. package/dist/{upload-queue-BHZ_wBfd.js → upload-queue-Boscubn9.js} +111 -111
  530. package/dist/upload-queue-Boscubn9.js.map +1 -0
  531. package/dist/upload.recipes-BbxTqrCT.js +61 -0
  532. package/dist/upload.recipes-BbxTqrCT.js.map +1 -0
  533. package/dist/{usage-card-U0YBLTNT.js → usage-card-BhO5eqkX.js} +45 -29
  534. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  535. package/dist/{utils-Cospvlj1.js → utils-BRhFDwuU.js} +114 -67
  536. package/dist/utils-BRhFDwuU.js.map +1 -0
  537. package/dist/value-inputs-DXPDjvBU.js +963 -0
  538. package/dist/value-inputs-DXPDjvBU.js.map +1 -0
  539. package/dist/{value-typography-Deb3yQZg.js → value-typography-BP8OG6h5.js} +2 -2
  540. package/dist/{value-typography-Deb3yQZg.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  541. package/dist/workspace-Cdrg7k9f.js +408 -0
  542. package/dist/workspace-Cdrg7k9f.js.map +1 -0
  543. package/docs/consumer-skill/SKILL.md +21 -22
  544. package/docs/consumer-skill/examples/app-layout.tsx +1 -1
  545. package/docs/consumer-skill/examples/composition.tsx +3 -3
  546. package/docs/consumer-skill/examples/detail.tsx +59 -12
  547. package/docs/consumer-skill/examples/edit.tsx +1 -1
  548. package/docs/consumer-skill/examples/receipt.tsx +2 -2
  549. package/docs/consumer-skill/examples/scoped-directory.tsx +1 -1
  550. package/docs/consumer-skill/examples/website.tsx +1 -1
  551. package/docs/consumer-skill/references/agents-md.md +33 -0
  552. package/docs/consumer-skill/references/analytics.md +1 -1
  553. package/docs/consumer-skill/references/composition.md +58 -13
  554. package/docs/consumer-skill/references/design-contract.md +12 -3
  555. package/docs/consumer-skill/references/installation.md +11 -1
  556. package/docs/consumer-skill/references/integration.md +4 -3
  557. package/docs/consumer-skill/references/public-api.json +956 -453
  558. package/docs/consumer-skill/references/review.md +32 -5
  559. package/docs/consumer-skill/references/theming.md +78 -9
  560. package/docs/consumer-skill/references/tokens.json +1 -1
  561. package/docs/consumer-skill/references/workflows.md +54 -10
  562. package/docs/consumer-skill/scripts/composition-policy.mjs +42 -11
  563. package/docs/consumer-skill/scripts/surface-policy.mjs +150 -5
  564. package/package.json +17 -5
  565. package/dist/accordion-CQXVcd7Q.js +0 -205
  566. package/dist/accordion-CQXVcd7Q.js.map +0 -1
  567. package/dist/action-menu-BTpyPWJ2.js +0 -264
  568. package/dist/action-menu-BTpyPWJ2.js.map +0 -1
  569. package/dist/affordance-geometry.generated-CCIXb2A1.js +0 -68
  570. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +0 -1
  571. package/dist/ai-artifact-2PQ2fItc.js +0 -1112
  572. package/dist/ai-artifact-2PQ2fItc.js.map +0 -1
  573. package/dist/attachment-q69dlt5Y.js +0 -244
  574. package/dist/attachment-q69dlt5Y.js.map +0 -1
  575. package/dist/auth-M3vGMgDR.js.map +0 -1
  576. package/dist/avatar-djdaaQ_s.js.map +0 -1
  577. package/dist/badge-0tATj-tW.js +0 -92
  578. package/dist/badge-0tATj-tW.js.map +0 -1
  579. package/dist/breadcrumbs-BG_FfMK4.js +0 -128
  580. package/dist/breadcrumbs-BG_FfMK4.js.map +0 -1
  581. package/dist/button-BS3KDg00.js.map +0 -1
  582. package/dist/button-R9CCoH7A.js.map +0 -1
  583. package/dist/buttons-DS0ZIwJ_.js +0 -99
  584. package/dist/buttons-DS0ZIwJ_.js.map +0 -1
  585. package/dist/cards-QoJ4syG9.js +0 -66
  586. package/dist/cards-QoJ4syG9.js.map +0 -1
  587. package/dist/chart-DwYRKKc-.js.map +0 -1
  588. package/dist/checkbox-B7ygNTYp.js +0 -35
  589. package/dist/checkbox-B7ygNTYp.js.map +0 -1
  590. package/dist/choice-inputs-DrJ17tpL.js +0 -752
  591. package/dist/choice-inputs-DrJ17tpL.js.map +0 -1
  592. package/dist/code-block-CD0B7M93.js +0 -183
  593. package/dist/code-block-CD0B7M93.js.map +0 -1
  594. package/dist/combobox-6dvVny2q.js +0 -272
  595. package/dist/combobox-6dvVny2q.js.map +0 -1
  596. package/dist/combobox-CB7039j7.js +0 -865
  597. package/dist/combobox-CB7039j7.js.map +0 -1
  598. package/dist/comments-You0Bzbr.js.map +0 -1
  599. package/dist/components/layout/page/partials/page-header-commands.d.ts +0 -13
  600. package/dist/containers-D_L4mTVb.js.map +0 -1
  601. package/dist/data-display-3xWQUnMA.js +0 -1335
  602. package/dist/data-display-3xWQUnMA.js.map +0 -1
  603. package/dist/date-picker-DrDFj8Lo.js +0 -1527
  604. package/dist/date-picker-DrDFj8Lo.js.map +0 -1
  605. package/dist/date-pickers-CnFCb0n2.js +0 -174
  606. package/dist/date-pickers-CnFCb0n2.js.map +0 -1
  607. package/dist/display-DrdvPwF0.js +0 -343
  608. package/dist/display-DrdvPwF0.js.map +0 -1
  609. package/dist/dropdown-menu-CURh59jb.js +0 -193
  610. package/dist/dropdown-menu-CURh59jb.js.map +0 -1
  611. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  612. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  613. package/dist/feedback-C7nR0UtT.js +0 -232
  614. package/dist/feedback-C7nR0UtT.js.map +0 -1
  615. package/dist/field-affordance-recipes-CkOCdE2y.js +0 -46
  616. package/dist/field-affordance-recipes-CkOCdE2y.js.map +0 -1
  617. package/dist/field-state-recipes-C-MFBX_8.js +0 -11
  618. package/dist/field-state-recipes-C-MFBX_8.js.map +0 -1
  619. package/dist/filters-Da-gNPsE.js.map +0 -1
  620. package/dist/form-field-VZRULhUK.js.map +0 -1
  621. package/dist/form-sizing-uWP4lzVh.js.map +0 -1
  622. package/dist/forms-numeric-D3CO60IF.js +0 -905
  623. package/dist/forms-numeric-D3CO60IF.js.map +0 -1
  624. package/dist/header-2ycNqGOR.js.map +0 -1
  625. package/dist/icon-badge-DKlaKXoo.js +0 -53
  626. package/dist/icon-badge-DKlaKXoo.js.map +0 -1
  627. package/dist/input-BoLm9Hks.js +0 -20
  628. package/dist/input-BoLm9Hks.js.map +0 -1
  629. package/dist/input-DhQdBnV3.js +0 -255
  630. package/dist/input-DhQdBnV3.js.map +0 -1
  631. package/dist/item-xzh8Df65.js +0 -264
  632. package/dist/item-xzh8Df65.js.map +0 -1
  633. package/dist/media-gallery-DQUQ0m3O.js +0 -201
  634. package/dist/media-gallery-DQUQ0m3O.js.map +0 -1
  635. package/dist/mentions-DwnO1hh4.js +0 -564
  636. package/dist/mentions-DwnO1hh4.js.map +0 -1
  637. package/dist/message-YfFmbXNP.js.map +0 -1
  638. package/dist/navigation-Cbp5V8gG.js +0 -264
  639. package/dist/navigation-Cbp5V8gG.js.map +0 -1
  640. package/dist/navigation-Cs1npsPm.js +0 -300
  641. package/dist/navigation-Cs1npsPm.js.map +0 -1
  642. package/dist/overlay.recipes-CNO2S9V6.js +0 -34
  643. package/dist/overlay.recipes-CNO2S9V6.js.map +0 -1
  644. package/dist/overlays-DhZO7N-I.js +0 -994
  645. package/dist/overlays-DhZO7N-I.js.map +0 -1
  646. package/dist/page-C6R_8jFt.js +0 -325
  647. package/dist/page-C6R_8jFt.js.map +0 -1
  648. package/dist/page-header-hUTzcRZX.js +0 -112
  649. package/dist/page-header-hUTzcRZX.js.map +0 -1
  650. package/dist/pagination-Cm0jqa3I.js +0 -149
  651. package/dist/pagination-Cm0jqa3I.js.map +0 -1
  652. package/dist/popover-Dcv_9jxr.js.map +0 -1
  653. package/dist/popover-menu-DnRFKnHP.js +0 -99
  654. package/dist/popover-menu-DnRFKnHP.js.map +0 -1
  655. package/dist/popover.recipes-wmbvL8Ah.js.map +0 -1
  656. package/dist/primitives-BHrwQXFC.js.map +0 -1
  657. package/dist/rich-text-editor-CF8QYt5p.js +0 -574
  658. package/dist/rich-text-editor-CF8QYt5p.js.map +0 -1
  659. package/dist/rich-text-editor.recipes-CnrbmTS1.js +0 -81
  660. package/dist/rich-text-editor.recipes-CnrbmTS1.js.map +0 -1
  661. package/dist/rich-text-editor.strings-BpnIQgMl.js +0 -25
  662. package/dist/rich-text-editor.strings-BpnIQgMl.js.map +0 -1
  663. package/dist/rich-text-j-FGAeZW.js +0 -32
  664. package/dist/rich-text-j-FGAeZW.js.map +0 -1
  665. package/dist/sanitize-html-BG9FGe-j.js +0 -64
  666. package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
  667. package/dist/scroll-area-DRdr16Pt.js +0 -47
  668. package/dist/scroll-area-DRdr16Pt.js.map +0 -1
  669. package/dist/settings-DHk0L2MF.js +0 -161
  670. package/dist/settings-DHk0L2MF.js.map +0 -1
  671. package/dist/sheet-DRFNY1_D.js +0 -207
  672. package/dist/sheet-DRFNY1_D.js.map +0 -1
  673. package/dist/sidebar-Cb8WzOvE.js.map +0 -1
  674. package/dist/sidebar-Crc9M9JV.js.map +0 -1
  675. package/dist/smart-card-Bek-TwUp.js +0 -599
  676. package/dist/smart-card-Bek-TwUp.js.map +0 -1
  677. package/dist/spinner-CmTAbEp0.js +0 -80
  678. package/dist/spinner-CmTAbEp0.js.map +0 -1
  679. package/dist/surface-recipes-DOdoBXGm.js +0 -28
  680. package/dist/surface-recipes-DOdoBXGm.js.map +0 -1
  681. package/dist/table-D6zKeYQX.js +0 -162
  682. package/dist/table-D6zKeYQX.js.map +0 -1
  683. package/dist/table-Dn4XSrSB.js +0 -1444
  684. package/dist/table-Dn4XSrSB.js.map +0 -1
  685. package/dist/tabs-Dk8E_knt.js +0 -189
  686. package/dist/tabs-Dk8E_knt.js.map +0 -1
  687. package/dist/text-inputs-BFpku0Qd.js +0 -331
  688. package/dist/text-inputs-BFpku0Qd.js.map +0 -1
  689. package/dist/theme-scope-kStaAer0.js +0 -39
  690. package/dist/theme-scope-kStaAer0.js.map +0 -1
  691. package/dist/timelines-CxuAFIc2.js +0 -439
  692. package/dist/timelines-CxuAFIc2.js.map +0 -1
  693. package/dist/tree-BotPlyiD.js.map +0 -1
  694. package/dist/typography-CAr3dQhX.js +0 -116
  695. package/dist/typography-CAr3dQhX.js.map +0 -1
  696. package/dist/ui-provider-D2_TeLqw.js.map +0 -1
  697. package/dist/upload-B0WHW7ak.js.map +0 -1
  698. package/dist/upload-queue-BHZ_wBfd.js.map +0 -1
  699. package/dist/usage-card-U0YBLTNT.js.map +0 -1
  700. package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
  701. package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
  702. package/dist/utils-Cospvlj1.js.map +0 -1
  703. package/dist/value-inputs-CjfzGMsN.js +0 -854
  704. package/dist/value-inputs-CjfzGMsN.js.map +0 -1
  705. package/dist/workspace-YoFjXi6i.js +0 -394
  706. package/dist/workspace-YoFjXi6i.js.map +0 -1
  707. /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
@@ -0,0 +1,1196 @@
1
+ "use client";
2
+ import { interpolateString as e, useStrings as t } from "./lib/strings.js";
3
+ import { t as n } from "./utils-BRhFDwuU.js";
4
+ import { n as r } from "./buttons-DPZekJFu.js";
5
+ import { c as i } from "./typography-UTnveOEy.js";
6
+ import { t as a } from "./structure-BmisBK-3.js";
7
+ import { n as o } from "./safe-image-src-C6kQSMBZ.js";
8
+ import { n as s } from "./content-typography-CnwgMJ37.js";
9
+ import { g as c } from "./primitives-BFK08r9M.js";
10
+ import { t as l } from "./number-DbV1Dija.js";
11
+ import { t as u } from "./input-DQdEd0YD.js";
12
+ import { t as d } from "./form-field-CwH9y77i.js";
13
+ import { n as f, t as ee } from "./rich-text-editor-toolbar-DfXg0-VC.js";
14
+ import { t as te } from "./rich-text-editor.strings-CB59ekH2.js";
15
+ import { forwardRef as p, useCallback as m, useEffect as h, useId as ne, useImperativeHandle as re, useMemo as g, useRef as _, useState as v } from "react";
16
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
17
+ import { AlertCircle as ie, Bold as ae, ImagePlus as S, Italic as oe, List as se, ListOrdered as ce, Loader2 as le, Quote as ue, Redo2 as de, Strikethrough as fe, Undo2 as pe } from "lucide-react";
18
+ import * as C from "@tiptap/react";
19
+ import * as me from "@tiptap/starter-kit";
20
+ import { createPortal as he } from "react-dom";
21
+ //#region src/components/features/rich-text-editor/partials/caret-helpers.ts
22
+ function ge() {
23
+ if (typeof window > "u") return null;
24
+ let e = window.getSelection();
25
+ if (!e || e.rangeCount === 0) return null;
26
+ let t = e.getRangeAt(0);
27
+ if (!t.collapsed) return null;
28
+ let n = t.startContainer, r = t.startOffset, i = n;
29
+ for (; i && i.nodeType !== Node.ELEMENT_NODE;) i = i.parentNode;
30
+ if (!i) return null;
31
+ let a = i.closest("[contenteditable=\"true\"]") ?? i.closest(".ProseMirror");
32
+ if (!a) return null;
33
+ let o = "";
34
+ n.nodeType === Node.TEXT_NODE && (o = (n.textContent ?? "").slice(0, r));
35
+ let s = n;
36
+ for (; s && s !== a && s !== i;) {
37
+ let e = s.previousSibling;
38
+ for (; e;) o = (e.textContent ?? "") + o, e = e.previousSibling;
39
+ if (s = s.parentNode, s && s.matches?.("p, li, h1, h2, h3, h4, h5, h6, blockquote")) break;
40
+ }
41
+ let c, l = t.getBoundingClientRect();
42
+ return l && (l.top || l.left || l.right || l.bottom) && (c = {
43
+ top: l.top,
44
+ left: l.left,
45
+ bottom: l.bottom,
46
+ right: l.right
47
+ }), {
48
+ textBefore: o,
49
+ rect: c
50
+ };
51
+ }
52
+ function _e(e, t, n, r) {
53
+ if (typeof window > "u") return;
54
+ if (e) {
55
+ let { selection: i } = e.state;
56
+ if (!i.empty) return;
57
+ let a = i.from - Math.min(t, i.$from.parentOffset);
58
+ e.chain().focus().insertContentAt({
59
+ from: a,
60
+ to: i.from
61
+ }, n).run(), r(e.getHTML());
62
+ return;
63
+ }
64
+ let i = window.getSelection();
65
+ if (!i || i.rangeCount === 0) return;
66
+ let a = i.getRangeAt(0);
67
+ if (!a.collapsed) return;
68
+ let o = t, s = a.startContainer, c = a.startOffset;
69
+ for (; o > 0;) {
70
+ if (s.nodeType === Node.TEXT_NODE) {
71
+ let e = Math.min(c, o);
72
+ if (c -= e, o -= e, o === 0) break;
73
+ }
74
+ let e = w(s);
75
+ if (!e) break;
76
+ s = e, c = e.textContent?.length ?? 0;
77
+ }
78
+ let l = document.createRange();
79
+ l.setStart(s, c), l.setEnd(a.endContainer, a.endOffset), i.removeAllRanges(), i.addRange(l), l.deleteContents();
80
+ let u = document.createRange().createContextualFragment(n);
81
+ l.insertNode(u), i.collapseToEnd();
82
+ let d = s?.parentElement?.closest?.("[contenteditable=\"true\"]") ?? null;
83
+ d && r(d.innerHTML);
84
+ }
85
+ function ve(e, t) {
86
+ if (typeof window > "u" || !e) return;
87
+ e.focus();
88
+ let n = window.getSelection();
89
+ if (!n || n.rangeCount === 0) {
90
+ e.insertAdjacentHTML("beforeend", t);
91
+ return;
92
+ }
93
+ let r = n.getRangeAt(0);
94
+ if (!e.contains(r.commonAncestorContainer)) {
95
+ e.insertAdjacentHTML("beforeend", t);
96
+ return;
97
+ }
98
+ r.deleteContents();
99
+ let i = document.createRange().createContextualFragment(t);
100
+ r.insertNode(i), r.collapse(!1), n.removeAllRanges(), n.addRange(r);
101
+ }
102
+ function w(e) {
103
+ let t = e;
104
+ for (; t;) {
105
+ if (t.previousSibling) {
106
+ for (t = t.previousSibling; t && t.lastChild;) t = t.lastChild;
107
+ if (t && t.nodeType === Node.TEXT_NODE) return t;
108
+ continue;
109
+ }
110
+ if (t = t.parentNode, !t || t.matches?.("p, li, h1, h2, h3, h4, h5, h6, blockquote, [contenteditable=\"true\"]")) return null;
111
+ }
112
+ return null;
113
+ }
114
+ //#endregion
115
+ //#region src/components/features/rich-text-editor/partials/counts-footer.tsx
116
+ function T({ text: e, maxLength: t, strings: r, className: a }) {
117
+ let o = e.length, s = e.trim().length > 0 ? e.trim().split(/\s+/).length : 0, u = typeof t == "number" && o > t;
118
+ return /* @__PURE__ */ x("div", {
119
+ className: n("counts-footer-text--component border-border flex items-center justify-end gap-space-lg border-t px-control py-space-sm", a),
120
+ children: [/* @__PURE__ */ x(i, {
121
+ tag: "span",
122
+ size: "xs",
123
+ type: u ? "error" : "secondary",
124
+ weight: u ? "medium" : "regular",
125
+ className: n("tabular-nums"),
126
+ children: [
127
+ /* @__PURE__ */ b(l, {
128
+ value: o,
129
+ size: "xs",
130
+ type: u ? "error" : "secondary",
131
+ align: "left"
132
+ }),
133
+ typeof t == "number" && /* @__PURE__ */ x(y, { children: [" / ", /* @__PURE__ */ b(l, {
134
+ value: t,
135
+ size: "xs",
136
+ type: u ? "error" : "secondary",
137
+ align: "left"
138
+ })] }),
139
+ " ",
140
+ r.counts.characters
141
+ ]
142
+ }), /* @__PURE__ */ x(c, {
143
+ size: "xs",
144
+ className: "tabular-nums",
145
+ children: [
146
+ /* @__PURE__ */ b(l, {
147
+ value: s,
148
+ size: "xs",
149
+ type: "secondary",
150
+ align: "left"
151
+ }),
152
+ " ",
153
+ r.counts.words
154
+ ]
155
+ })]
156
+ });
157
+ }
158
+ T.displayName = "CountsFooterText";
159
+ function E({ editor: e, sourceMode: t, sourceValue: n, maxLength: r, strings: i }) {
160
+ let a = t ? n.replace(/<[^>]*>/g, "") : e?.getText() ?? "";
161
+ return /* @__PURE__ */ b(T, {
162
+ text: a,
163
+ maxLength: r,
164
+ strings: i
165
+ });
166
+ }
167
+ E.displayName = "CountsFooter";
168
+ //#endregion
169
+ //#region src/components/features/rich-text-editor/partials/html-helpers.ts
170
+ function D(e) {
171
+ let t = e.trim();
172
+ return t === "" || t === "<p></p>" || t === "<p><br></p>" ? "" : t;
173
+ }
174
+ function O(e) {
175
+ let t = D(e);
176
+ return t === "" ? "<p></p>" : t;
177
+ }
178
+ //#endregion
179
+ //#region src/components/features/rich-text-editor/partials/inline-reference-node.ts
180
+ var k = "rsc-mention inline-reference--chip", A = "inlineReference";
181
+ function j(e) {
182
+ return ({ editor: t }) => t.commands.command(({ tr: t, state: n }) => {
183
+ let { selection: r } = n;
184
+ if (!r.empty) return !1;
185
+ let { $from: i } = r, a = e === "backward" ? i.nodeBefore : i.nodeAfter;
186
+ if (a?.type.name !== A) return !1;
187
+ let o = e === "backward" ? i.pos - a.nodeSize : i.pos;
188
+ return t.delete(o, o + a.nodeSize), !0;
189
+ });
190
+ }
191
+ var M = null;
192
+ function N() {
193
+ return M ??= C.Node.create({
194
+ name: A,
195
+ group: "inline",
196
+ inline: !0,
197
+ atom: !0,
198
+ selectable: !0,
199
+ draggable: !1,
200
+ addAttributes() {
201
+ return {
202
+ id: {
203
+ default: null,
204
+ parseHTML: (e) => e.getAttribute("data-ref-id"),
205
+ renderHTML: (e) => ({ "data-ref-id": e.id })
206
+ },
207
+ kind: {
208
+ default: null,
209
+ parseHTML: (e) => e.getAttribute("data-ref-kind"),
210
+ renderHTML: (e) => e.kind ? { "data-ref-kind": e.kind } : {}
211
+ },
212
+ tone: {
213
+ default: null,
214
+ parseHTML: (e) => e.getAttribute("data-ref-tone"),
215
+ renderHTML: (e) => e.tone ? { "data-ref-tone": e.tone } : {}
216
+ },
217
+ label: {
218
+ default: "",
219
+ parseHTML: (e) => e.textContent ?? "",
220
+ renderHTML: () => ({})
221
+ }
222
+ };
223
+ },
224
+ parseHTML() {
225
+ return [{ tag: "span[data-ref-id]" }];
226
+ },
227
+ renderHTML({ node: e, HTMLAttributes: t }) {
228
+ return [
229
+ "span",
230
+ C.mergeAttributes({
231
+ class: "rsc-mention",
232
+ contenteditable: "false"
233
+ }, t),
234
+ e.attrs.label
235
+ ];
236
+ },
237
+ renderText({ node: e }) {
238
+ return e.attrs.label;
239
+ },
240
+ addNodeView() {
241
+ return ({ node: e }) => {
242
+ let t = document.createElement("span");
243
+ return t.className = k, t.setAttribute("contenteditable", "false"), t.setAttribute("data-ref-id", String(e.attrs.id ?? "")), e.attrs.kind && t.setAttribute("data-ref-kind", String(e.attrs.kind)), e.attrs.tone && t.setAttribute("data-ref-tone", String(e.attrs.tone)), t.textContent = String(e.attrs.label ?? ""), { dom: t };
244
+ };
245
+ },
246
+ addKeyboardShortcuts() {
247
+ return {
248
+ Backspace: j("backward"),
249
+ Delete: j("forward")
250
+ };
251
+ }
252
+ }), M;
253
+ }
254
+ var P = "data-rte-upload", ye = "rich-text-editor--upload my-space-xs flex min-h-control items-center rounded-inner border border-dashed border-input bg-muted/30 px-row-x py-row-y", F = RegExp(`<span[^>]*\\b${P}="[^"]*"[^>]*>[\\s\\S]*?</span>`, "g");
255
+ function be(e) {
256
+ return e.includes("data-rte-upload") ? e.replace(F, "") : e;
257
+ }
258
+ function I(e, t) {
259
+ let n = e.type.toLowerCase(), r = e.name.toLowerCase();
260
+ return t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean).some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
261
+ }
262
+ function L(e) {
263
+ return e.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").trim();
264
+ }
265
+ function xe(e) {
266
+ return Array.from(e?.files ?? []).filter((e) => e.type.startsWith("image/"));
267
+ }
268
+ var R = 0;
269
+ function Se(t, n, r) {
270
+ let [i, a] = v([]), [s, c] = v(null), l = _(/* @__PURE__ */ new Map());
271
+ h(() => () => {
272
+ for (let e of l.current.values()) e.controller?.abort();
273
+ }, []);
274
+ let u = m((e) => {
275
+ l.current.get(e)?.controller?.abort(), l.current.delete(e), a((t) => t.filter((t) => t.id !== e));
276
+ }, []), d = m(async (e) => {
277
+ let r = l.current.get(e);
278
+ if (!r || !t) return;
279
+ r.controller?.abort();
280
+ let i = new AbortController();
281
+ r.controller = i;
282
+ let s = {
283
+ id: e,
284
+ name: r.file.name,
285
+ status: "uploading"
286
+ };
287
+ a((t) => t.some((t) => t.id === e) ? t.map((t) => t.id === e ? s : t) : [...t, s]);
288
+ try {
289
+ let a = await t.upload(r.file, { signal: i.signal });
290
+ if (i.signal.aborted) return;
291
+ let s = o(a?.src);
292
+ if (!s) throw Error(`The uploaded image source for ${r.file.name} is not an allowed URL.`);
293
+ let c = n.current?.findPlaceholder(e);
294
+ u(e), c && n.current?.resolvePlaceholder(e, {
295
+ src: s,
296
+ alt: a.alt ?? L(r.file.name),
297
+ width: a.width,
298
+ height: a.height
299
+ });
300
+ } catch (n) {
301
+ if (i.signal.aborted) return;
302
+ t.onError?.(n, r.file), a((t) => t.map((t) => t.id === e ? {
303
+ ...t,
304
+ status: "error"
305
+ } : t));
306
+ }
307
+ }, [
308
+ n,
309
+ u,
310
+ t
311
+ ]);
312
+ return {
313
+ uploads: i,
314
+ notice: s,
315
+ dismissNotice: () => c(null),
316
+ addFiles: m((i) => {
317
+ if (!t) return;
318
+ let a = t.accept ?? "image/png,image/jpeg,image/gif,image/webp", o = [];
319
+ for (let s of i) {
320
+ let i = I(s, a) ? t.maxSize && s.size > t.maxSize ? r.tooLarge : null : r.unsupported;
321
+ if (i) {
322
+ let n = e(i, { name: s.name });
323
+ o.push(n), t.onError?.(Error(n), s);
324
+ continue;
325
+ }
326
+ R += 1;
327
+ let c = `upload-${R}`;
328
+ l.current.set(c, { file: s }), n.current?.insertPlaceholder(c), d(c);
329
+ }
330
+ c(o.length > 0 ? o.join(" ") : null);
331
+ }, [
332
+ n,
333
+ t,
334
+ d,
335
+ r.tooLarge,
336
+ r.unsupported
337
+ ]),
338
+ retry: m((e) => {
339
+ d(e);
340
+ }, [d]),
341
+ remove: m((e) => {
342
+ u(e), n.current?.removePlaceholder(e);
343
+ }, [n, u]),
344
+ prune: m(() => {
345
+ for (let e of Array.from(l.current.keys())) n.current?.findPlaceholder(e) || u(e);
346
+ }, [n, u])
347
+ };
348
+ }
349
+ function z({ upload: t, strings: n, onRetry: o, onRemove: s }) {
350
+ let c = t.status === "error";
351
+ return /* @__PURE__ */ x(a, {
352
+ direction: "horizontal",
353
+ align: "center",
354
+ gap: "sm",
355
+ wrap: !0,
356
+ className: "rich-text-editor--upload-status w-full min-w-0",
357
+ "data-status": t.status,
358
+ children: [
359
+ c ? /* @__PURE__ */ b(ie, {
360
+ className: "size-icon shrink-0 text-destructive",
361
+ "aria-hidden": "true"
362
+ }) : /* @__PURE__ */ b(le, {
363
+ className: "size-icon shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none",
364
+ "aria-hidden": "true"
365
+ }),
366
+ /* @__PURE__ */ b(i, {
367
+ tag: "span",
368
+ size: "xs",
369
+ type: c ? "error" : "secondary",
370
+ role: c ? "alert" : "status",
371
+ className: "min-w-0 flex-1 basis-40 break-words",
372
+ children: e(c ? n.failed : n.uploading, { name: t.name })
373
+ }),
374
+ c && /* @__PURE__ */ b(r, {
375
+ type: "button",
376
+ size: "sm",
377
+ onClick: o,
378
+ children: n.retry
379
+ }),
380
+ /* @__PURE__ */ b(r, {
381
+ type: "button",
382
+ size: "sm",
383
+ buttonStyle: "ghost",
384
+ onClick: s,
385
+ children: c ? n.remove : n.cancel
386
+ })
387
+ ]
388
+ });
389
+ }
390
+ function Ce({ queue: e, adapterRef: t, strings: n }) {
391
+ return /* @__PURE__ */ b(y, { children: e.uploads.map((r) => {
392
+ let i = t.current?.findPlaceholder(r.id);
393
+ return i ? he(/* @__PURE__ */ b(z, {
394
+ upload: r,
395
+ strings: n,
396
+ onRetry: () => e.retry(r.id),
397
+ onRemove: () => e.remove(r.id)
398
+ }), i, r.id) : null;
399
+ }) });
400
+ }
401
+ function we(e, t, n, r) {
402
+ let i = _(null), a = _(r);
403
+ a.current = r;
404
+ let o = !!e;
405
+ return {
406
+ item: g(() => o ? {
407
+ id: "insert-image",
408
+ icon: S,
409
+ label: t.insert,
410
+ toggle: !1,
411
+ onClick: () => {
412
+ a.current?.(), i.current?.click();
413
+ }
414
+ } : null, [o, t.insert]),
415
+ input: e ? /* @__PURE__ */ b("input", {
416
+ ref: i,
417
+ type: "file",
418
+ accept: e.accept ?? "image/png,image/jpeg,image/gif,image/webp",
419
+ multiple: !0,
420
+ hidden: !0,
421
+ tabIndex: -1,
422
+ "aria-hidden": "true",
423
+ onChange: (e) => {
424
+ let t = Array.from(e.target.files ?? []);
425
+ e.target.value = "", t.length > 0 && n(t);
426
+ }
427
+ }) : null
428
+ };
429
+ }
430
+ function Te({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s, strings: c }) {
431
+ let l = ne();
432
+ return e === null && !o ? null : /* @__PURE__ */ x(a, {
433
+ gap: "sm",
434
+ className: "rich-text-editor--image-details border-t border-border/60 px-control py-space-sm",
435
+ children: [!!o && /* @__PURE__ */ x(a, {
436
+ direction: "horizontal",
437
+ align: "center",
438
+ gap: "sm",
439
+ children: [/* @__PURE__ */ b(i, {
440
+ tag: "span",
441
+ size: "xs",
442
+ type: "error",
443
+ role: "alert",
444
+ className: "min-w-0 flex-1",
445
+ children: o
446
+ }), /* @__PURE__ */ b(r, {
447
+ type: "button",
448
+ size: "sm",
449
+ buttonStyle: "ghost",
450
+ onClick: s,
451
+ children: c.remove
452
+ })]
453
+ }), e !== null && /* @__PURE__ */ b(d, {
454
+ label: c.descriptionLabel,
455
+ hint: c.descriptionHint,
456
+ htmlFor: l,
457
+ children: /* @__PURE__ */ b(y, { children: /* @__PURE__ */ x(a, {
458
+ direction: "horizontal",
459
+ align: "center",
460
+ gap: "sm",
461
+ wrap: !1,
462
+ children: [/* @__PURE__ */ b(u, {
463
+ id: l,
464
+ value: e,
465
+ className: "min-w-0 flex-1",
466
+ onChange: (e) => t(e.target.value)
467
+ }), /* @__PURE__ */ b(r, {
468
+ type: "button",
469
+ buttonStyle: "outline",
470
+ onClick: n,
471
+ children: c.removeImage
472
+ })]
473
+ }) })
474
+ })]
475
+ });
476
+ }
477
+ //#endregion
478
+ //#region src/components/features/rich-text-editor/partials/image-nodes.ts
479
+ function B(e) {
480
+ let t = Number(e);
481
+ return Number.isFinite(t) && t > 0 ? t : null;
482
+ }
483
+ var V = null, H = null;
484
+ function U() {
485
+ return V ??= C.Node.create({
486
+ name: "image",
487
+ group: "inline",
488
+ inline: !0,
489
+ atom: !0,
490
+ selectable: !0,
491
+ draggable: !0,
492
+ addAttributes() {
493
+ return {
494
+ src: {
495
+ default: null,
496
+ parseHTML: (e) => o(e.getAttribute("src")) ?? null
497
+ },
498
+ alt: {
499
+ default: "",
500
+ parseHTML: (e) => e.getAttribute("alt") ?? ""
501
+ },
502
+ title: { default: null },
503
+ width: {
504
+ default: null,
505
+ parseHTML: (e) => B(e.getAttribute("width"))
506
+ },
507
+ height: {
508
+ default: null,
509
+ parseHTML: (e) => B(e.getAttribute("height"))
510
+ }
511
+ };
512
+ },
513
+ parseHTML() {
514
+ return [{
515
+ tag: "img[src]",
516
+ getAttrs: (e) => o(e.getAttribute("src")) ? null : !1
517
+ }];
518
+ },
519
+ renderHTML({ HTMLAttributes: e }) {
520
+ let t = o(e.src);
521
+ return ["img", C.mergeAttributes(e, { src: t ?? null })];
522
+ }
523
+ }), V;
524
+ }
525
+ function W() {
526
+ return H ??= C.Node.create({
527
+ name: "imageUpload",
528
+ group: "inline",
529
+ inline: !0,
530
+ atom: !0,
531
+ selectable: !1,
532
+ addAttributes() {
533
+ return { id: { default: null } };
534
+ },
535
+ parseHTML() {
536
+ return [];
537
+ },
538
+ renderHTML({ node: e }) {
539
+ return ["span", { [P]: e.attrs.id }];
540
+ },
541
+ addNodeView() {
542
+ return ({ node: e }) => {
543
+ let t = document.createElement("span");
544
+ return t.setAttribute(P, String(e.attrs.id)), t.setAttribute("contenteditable", "false"), t.className = ye, {
545
+ dom: t,
546
+ ignoreMutation: () => !0,
547
+ stopEvent: () => !0
548
+ };
549
+ };
550
+ }
551
+ }), H;
552
+ }
553
+ //#endregion
554
+ //#region src/components/features/rich-text-editor/partials/rich-text-editor-tiptap.tsx
555
+ function G(e) {
556
+ return D(be(e?.getHTML() ?? ""));
557
+ }
558
+ var K = C.EditorContent, q = C.useEditor, J = "default" in me ? me.default : me, Y = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, bodyHeight: c, minHeight: l, maxHeight: u, disabled: d = !1, showCounts: p = !1, maxLength: ne, extraToolbarItems: y, toolbarTrailing: ie, footerSlot: S, hideSourceToggle: le = !1, autoFocus: C = !1, className: me, onCaretChange: he, strings: ve, images: w }, T) {
559
+ let k = t(te, ve), A = !!w, j = _(null), M = _(null), [P, ye] = v(!1), [F, be] = v(!1), [I, L] = v(""), R = _(!1), z = _(D(e)), B = _(he);
560
+ B.current = he;
561
+ let V = q({
562
+ extensions: g(() => [
563
+ J,
564
+ N(),
565
+ ...A ? [U(), W()] : []
566
+ ], [A]),
567
+ content: O(e),
568
+ editable: !d,
569
+ immediatelyRender: !1,
570
+ autofocus: C ? "end" : !1,
571
+ onFocus: () => {
572
+ R.current = !0, ye(!0);
573
+ },
574
+ onBlur: () => {
575
+ R.current = !1, ye(!1);
576
+ },
577
+ onUpdate: ({ editor: e }) => {
578
+ j.current?.prune();
579
+ let t = G(e);
580
+ R.current && (t !== z.current && (z.current = t, r(t)), B.current?.());
581
+ },
582
+ editorProps: {
583
+ handlePaste: (e, t) => {
584
+ let n = xe(t.clipboardData);
585
+ return !j.current || !H.current || n.length === 0 ? !1 : (j.current.addFiles(n), !0);
586
+ },
587
+ handleDrop: (e, t, n, r) => {
588
+ let i = xe(t.dataTransfer);
589
+ if (r || !j.current || !H.current || i.length === 0) return !1;
590
+ let a = e.posAtCoords({
591
+ left: t.clientX,
592
+ top: t.clientY
593
+ });
594
+ return a && M.current?.commands.setTextSelection(a.pos), j.current.addFiles(i), !0;
595
+ },
596
+ attributes: {
597
+ role: "textbox",
598
+ "aria-label": k.editorLabel,
599
+ "aria-multiline": "true",
600
+ class: s
601
+ }
602
+ }
603
+ }, [A]);
604
+ h(() => {
605
+ if (!V) return;
606
+ let t = G(V), n = D(e);
607
+ z.current = n, t !== n && V.commands.setContent(O(n), { emitUpdate: !1 });
608
+ }, [V, e]), h(() => {
609
+ V && V.setEditable(!d);
610
+ }, [d, V]), h(() => {
611
+ if (typeof document > "u") return;
612
+ let e = () => {
613
+ R.current && B.current?.();
614
+ };
615
+ return document.addEventListener("selectionchange", e), () => document.removeEventListener("selectionchange", e);
616
+ }, []), re(T, () => ({
617
+ focus: () => {
618
+ V?.chain().focus().run();
619
+ },
620
+ getHTML: () => G(V),
621
+ setHTML: (e) => {
622
+ let t = D(e);
623
+ z.current = t, V?.commands.setContent(O(t), { emitUpdate: !1 }), r(t);
624
+ },
625
+ insertHTML: (e) => {
626
+ V && V.chain().focus().insertContent(e).run();
627
+ },
628
+ isEmpty: () => G(V) === "",
629
+ clear: () => {
630
+ z.current = "", V?.commands.setContent("<p></p>", { emitUpdate: !1 }), r("");
631
+ },
632
+ getCaretContext: () => ge(),
633
+ replaceBeforeCaret: (e, t) => {
634
+ _e(V, e, t, (e) => {
635
+ z.current = D(e), r(z.current);
636
+ });
637
+ }
638
+ }), [V, r]), M.current = V ?? null;
639
+ let H = _(w);
640
+ H.current = w;
641
+ let Y = m(() => {
642
+ if (!V) return;
643
+ let e = G(V);
644
+ e !== z.current && (z.current = e, r(e));
645
+ }, [V, r]), Ee = m((e) => {
646
+ let t = null;
647
+ return V?.state.doc.descendants((n, r) => (!t && e(n) && (t = {
648
+ pos: r,
649
+ node: n
650
+ }), !t)), t;
651
+ }, [V]), X = _(null);
652
+ X.current = V ? {
653
+ insertPlaceholder: (e) => {
654
+ V.chain().focus().insertContent({
655
+ type: "imageUpload",
656
+ attrs: { id: e }
657
+ }).run();
658
+ },
659
+ findPlaceholder: (e) => V.view.dom.querySelector(`[data-rte-upload="${e}"]`),
660
+ resolvePlaceholder: (e, t) => {
661
+ let n = Ee((t) => t.type.name === "imageUpload" && t.attrs.id === e);
662
+ if (!n) return;
663
+ let r = V.schema.nodes.image.create({
664
+ src: t.src,
665
+ alt: t.alt ?? "",
666
+ width: t.width ?? null,
667
+ height: t.height ?? null
668
+ });
669
+ V.view.dispatch(V.state.tr.replaceWith(n.pos, n.pos + n.node.nodeSize, r)), Y();
670
+ },
671
+ removePlaceholder: (e) => {
672
+ let t = Ee((t) => t.type.name === "imageUpload" && t.attrs.id === e);
673
+ t && (V.view.dispatch(V.state.tr.delete(t.pos, t.pos + t.node.nodeSize)), Y());
674
+ }
675
+ } : null;
676
+ let Z = Se(w, X, k.images);
677
+ j.current = A ? Z : null;
678
+ let De = we(w, k.images, Z.addFiles), Oe = g(() => De.item ? [De.item, ...y ?? []] : y, [y, De.item]), [Q, $] = v(null);
679
+ h(() => {
680
+ if (!V || !A) return;
681
+ let e = () => {
682
+ let e = V.state.selection, t = null;
683
+ if (e.node?.type.name === "image") t = {
684
+ pos: e.from,
685
+ alt: String(e.node.attrs.alt ?? "")
686
+ };
687
+ else if (e.empty) {
688
+ let { nodeBefore: n, nodeAfter: r } = e.$from;
689
+ n?.type.name === "image" ? t = {
690
+ pos: e.from - n.nodeSize,
691
+ alt: String(n.attrs.alt ?? "")
692
+ } : r?.type.name === "image" && (t = {
693
+ pos: e.from,
694
+ alt: String(r.attrs.alt ?? "")
695
+ });
696
+ }
697
+ $(t);
698
+ };
699
+ return V.on("selectionUpdate", e), V.on("update", e), () => {
700
+ V.off("selectionUpdate", e), V.off("update", e);
701
+ };
702
+ }, [V, A]);
703
+ let ke = f.bodyMinHeight[c ?? (o ? "control" : "document")], Ae = g(() => ({
704
+ ...l ? { minHeight: l } : {},
705
+ ...u ? {
706
+ maxHeight: u,
707
+ overflowY: "auto"
708
+ } : {}
709
+ }), [u, l]), je = m(() => {
710
+ if (V) {
711
+ if (F) {
712
+ let e = O(I);
713
+ V.commands.setContent(e, { emitUpdate: !1 });
714
+ let t = D(I);
715
+ z.current = t, r(t), be(!1);
716
+ } else L(V.getHTML()), be(!0);
717
+ }
718
+ }, [
719
+ V,
720
+ r,
721
+ F,
722
+ I
723
+ ]), Me = m((e) => {
724
+ let t = e.target.value;
725
+ L(t);
726
+ let n = D(t);
727
+ z.current = n, r(n);
728
+ }, [r]), Ne = g(() => [
729
+ {
730
+ id: "bold",
731
+ icon: ae,
732
+ label: k.toolbar.bold,
733
+ isActive: () => !!V?.isActive("bold"),
734
+ toggle: !0,
735
+ run: () => V?.chain().focus().toggleBold().run()
736
+ },
737
+ {
738
+ id: "italic",
739
+ icon: oe,
740
+ label: k.toolbar.italic,
741
+ isActive: () => !!V?.isActive("italic"),
742
+ toggle: !0,
743
+ run: () => V?.chain().focus().toggleItalic().run()
744
+ },
745
+ {
746
+ id: "strike",
747
+ icon: fe,
748
+ label: k.toolbar.strike,
749
+ isActive: () => !!V?.isActive("strike"),
750
+ toggle: !0,
751
+ run: () => V?.chain().focus().toggleStrike().run()
752
+ },
753
+ {
754
+ id: "bullet-list",
755
+ icon: se,
756
+ label: k.toolbar.bulletList,
757
+ isActive: () => !!V?.isActive("bulletList"),
758
+ toggle: !0,
759
+ run: () => V?.chain().focus().toggleBulletList().run()
760
+ },
761
+ {
762
+ id: "ordered-list",
763
+ icon: ce,
764
+ label: k.toolbar.orderedList,
765
+ isActive: () => !!V?.isActive("orderedList"),
766
+ toggle: !0,
767
+ run: () => V?.chain().focus().toggleOrderedList().run()
768
+ },
769
+ {
770
+ id: "blockquote",
771
+ icon: ue,
772
+ label: k.toolbar.blockquote,
773
+ isActive: () => !!V?.isActive("blockquote"),
774
+ toggle: !0,
775
+ run: () => V?.chain().focus().toggleBlockquote().run()
776
+ },
777
+ {
778
+ id: "undo",
779
+ icon: pe,
780
+ label: k.toolbar.undo,
781
+ isActive: () => !1,
782
+ run: () => V?.chain().focus().undo().run(),
783
+ disabled: !V?.can().chain().focus().undo().run()
784
+ },
785
+ {
786
+ id: "redo",
787
+ icon: de,
788
+ label: k.toolbar.redo,
789
+ isActive: () => !1,
790
+ run: () => V?.chain().focus().redo().run(),
791
+ disabled: !V?.can().chain().focus().redo().run()
792
+ }
793
+ ], [V, k]), Pe = p && V ? /* @__PURE__ */ b(E, {
794
+ editor: V,
795
+ sourceMode: F,
796
+ sourceValue: I,
797
+ maxLength: ne,
798
+ strings: k
799
+ }) : null, Fe = typeof a == "string" ? a : "", Ie = Fe.length > 0 && !P && V?.isEmpty ? /* @__PURE__ */ b(i, {
800
+ tag: "span",
801
+ size: "sm",
802
+ type: "secondary",
803
+ className: "pointer-events-none absolute inset-0 px-control py-control-y-offset",
804
+ children: Fe
805
+ }) : null;
806
+ return /* @__PURE__ */ x("div", {
807
+ className: n(f.frame, d && f.disabled, me),
808
+ children: [
809
+ /* @__PURE__ */ b(ee, {
810
+ buttons: Ne,
811
+ extraToolbarItems: Oe,
812
+ hideSourceToggle: le,
813
+ sourceMode: F,
814
+ toggleSourceMode: je,
815
+ disabled: d,
816
+ hasEditor: !!V,
817
+ toolbarTrailing: ie,
818
+ strings: k
819
+ }),
820
+ F ? /* @__PURE__ */ b("textarea", {
821
+ "aria-label": k.sourceLabel,
822
+ value: I,
823
+ onChange: Me,
824
+ disabled: d,
825
+ spellCheck: !1,
826
+ className: n(f.source, ke, d && "cursor-not-allowed"),
827
+ style: Ae
828
+ }) : /* @__PURE__ */ x("div", {
829
+ className: n("relative", ke),
830
+ style: Ae,
831
+ children: [Ie, /* @__PURE__ */ b(K, {
832
+ editor: V,
833
+ className: f.content
834
+ })]
835
+ }),
836
+ A && /* @__PURE__ */ b(Te, {
837
+ alt: Q ? Q.alt : null,
838
+ onAltChange: (e) => {
839
+ if (!V || !Q) return;
840
+ let t = V.state.doc.nodeAt(Q.pos);
841
+ t?.type.name === "image" && (V.view.dispatch(V.state.tr.setNodeMarkup(Q.pos, void 0, {
842
+ ...t.attrs,
843
+ alt: e
844
+ })), $({
845
+ ...Q,
846
+ alt: e
847
+ }), Y());
848
+ },
849
+ onRemove: () => {
850
+ if (!V || !Q) return;
851
+ let e = V.state.doc.nodeAt(Q.pos);
852
+ e?.type.name === "image" && (V.view.dispatch(V.state.tr.delete(Q.pos, Q.pos + e.nodeSize)), $(null), Y(), V.commands.focus());
853
+ },
854
+ notice: Z.notice,
855
+ onDismissNotice: Z.dismissNotice,
856
+ strings: k.images
857
+ }),
858
+ !!S && /* @__PURE__ */ b("div", {
859
+ className: "px-control pb-space-md pt-space-xs",
860
+ children: S
861
+ }),
862
+ Pe,
863
+ De.input,
864
+ A && /* @__PURE__ */ b(Ce, {
865
+ queue: Z,
866
+ adapterRef: X,
867
+ strings: k.images
868
+ })
869
+ ]
870
+ });
871
+ });
872
+ Y.displayName = "TiptapRichTextEditor";
873
+ var Ee = ((e) => typeof e == "function" || typeof e == "object" && !!e && "$$typeof" in e)(K) && typeof q == "function" && typeof J == "object" && !!J;
874
+ //#endregion
875
+ //#region src/components/features/rich-text-editor/partials/rich-text-editor-fallback.tsx
876
+ function X(e) {
877
+ if (!e) return "";
878
+ if (!e.querySelector("[data-rte-upload]")) return e.innerHTML;
879
+ let t = e.cloneNode(!0);
880
+ for (let e of Array.from(t.querySelectorAll(`[${P}]`))) e.remove();
881
+ return t.innerHTML;
882
+ }
883
+ function Z(e) {
884
+ for (let t of Array.from(e.querySelectorAll("img"))) o(t.getAttribute("src")) || t.remove();
885
+ }
886
+ function De(e) {
887
+ let t = window.getSelection();
888
+ if (!t || t.rangeCount === 0) return null;
889
+ let n = t.getRangeAt(0);
890
+ if (!e.contains(n.commonAncestorContainer)) return null;
891
+ for (let t of Array.from(e.querySelectorAll("img"))) if (n.intersectsNode(t) && !n.collapsed) return t;
892
+ if (!n.collapsed) return null;
893
+ let { startContainer: r, startOffset: i } = n;
894
+ return (r.nodeType === Node.TEXT_NODE ? [i === 0 ? r.previousSibling : null, i === (r.textContent?.length ?? 0) ? r.nextSibling : null] : [r.childNodes[i - 1] ?? null, r.childNodes[i] ?? null]).find((e) => e instanceof HTMLImageElement) ?? null;
895
+ }
896
+ function Oe(e, t) {
897
+ let n = document, r = n.caretRangeFromPoint?.(e, t) ?? null;
898
+ if (!r) {
899
+ let i = n.caretPositionFromPoint?.(e, t);
900
+ i && (r = document.createRange(), r.setStart(i.offsetNode, i.offset));
901
+ }
902
+ if (!r) return;
903
+ r.collapse(!0);
904
+ let i = window.getSelection();
905
+ i?.removeAllRanges(), i?.addRange(r);
906
+ }
907
+ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, bodyHeight: c, minHeight: l, maxHeight: u, disabled: d = !1, showCounts: p = !1, maxLength: ne, extraToolbarItems: y, toolbarTrailing: ie, footerSlot: S, hideSourceToggle: le = !1, autoFocus: C = !1, className: me, onCaretChange: he, strings: w, images: E }, k) {
908
+ let A = t(te, w), j = _(null), M = _(null), [N, F] = v(null), [be, I] = v(""), [L, R] = v(!1), [z, B] = v(!1), [V, H] = v(""), U = _(D(e)), W = _(he);
909
+ W.current = he;
910
+ let G = m((e) => {
911
+ j.current = e, e && e.innerHTML === "" && (e.innerHTML = O(U.current));
912
+ }, []);
913
+ h(() => {
914
+ let t = j.current;
915
+ if (!t || L) return;
916
+ let n = O(e);
917
+ D(X(t)) !== D(n) && (t.innerHTML = n), U.current = D(e);
918
+ }, [L, e]), h(() => {
919
+ C && j.current?.focus();
920
+ }, [C]);
921
+ let K = m(() => {
922
+ let e = j.current, t = D(X(e));
923
+ U.current = t, r(t), W.current?.();
924
+ }, [r]), q = _(null);
925
+ q.current = {
926
+ insertPlaceholder: (e) => {
927
+ let t = j.current;
928
+ if (!t) return;
929
+ let n = M.current;
930
+ if (n && t.contains(n.commonAncestorContainer) && !t.contains(document.activeElement)) {
931
+ t.focus();
932
+ let e = window.getSelection();
933
+ e?.removeAllRanges(), e?.addRange(n);
934
+ }
935
+ ve(t, `<span ${P}="${e}" contenteditable="false" class="${ye}"></span>`);
936
+ },
937
+ findPlaceholder: (e) => j.current?.querySelector(`[data-rte-upload="${e}"]`) ?? null,
938
+ resolvePlaceholder: (e, t) => {
939
+ let n = j.current?.querySelector(`[${P}="${e}"]`);
940
+ if (!n) return;
941
+ let r = document.createElement("img");
942
+ r.setAttribute("src", t.src), r.setAttribute("alt", t.alt ?? ""), t.width && r.setAttribute("width", String(t.width)), t.height && r.setAttribute("height", String(t.height)), n.replaceWith(r), K();
943
+ },
944
+ removePlaceholder: (e) => {
945
+ j.current?.querySelector(`[${P}="${e}"]`)?.remove(), K();
946
+ }
947
+ };
948
+ let J = Se(E, q, A.images), Y = we(E, A.images, J.addFiles, () => {
949
+ let e = window.getSelection(), t = e && e.rangeCount > 0 ? e.getRangeAt(0) : null;
950
+ M.current = t && j.current?.contains(t.commonAncestorContainer) ? t.cloneRange() : null;
951
+ }), Ee = g(() => Y.item ? [Y.item, ...y ?? []] : y, [y, Y.item]), Q = m(() => {
952
+ let e = j.current;
953
+ if (!E || !e) return;
954
+ let t = window.getSelection();
955
+ if (t && t.rangeCount > 0 && !e.contains(t.getRangeAt(0).commonAncestorContainer)) return;
956
+ let n = De(e);
957
+ F(n), I(n?.getAttribute("alt") ?? "");
958
+ }, [E]);
959
+ h(() => {
960
+ if (E && typeof document < "u") return document.addEventListener("selectionchange", Q), () => document.removeEventListener("selectionchange", Q);
961
+ }, [E, Q]);
962
+ let $ = m(() => {
963
+ let e = j.current;
964
+ E && e && (Z(e), J.prune(), N && !N.isConnected && F(null)), K();
965
+ }, [
966
+ N,
967
+ K,
968
+ E,
969
+ J
970
+ ]);
971
+ re(k, () => ({
972
+ focus: () => j.current?.focus(),
973
+ getHTML: () => D(X(j.current)),
974
+ setHTML: (e) => {
975
+ let t = D(e);
976
+ U.current = t, j.current && (j.current.innerHTML = O(t)), r(t);
977
+ },
978
+ insertHTML: (e) => {
979
+ ve(j.current, e), K();
980
+ },
981
+ isEmpty: () => D(X(j.current)) === "",
982
+ clear: () => {
983
+ U.current = "", j.current && (j.current.innerHTML = "<p></p>"), r("");
984
+ },
985
+ getCaretContext: () => ge(),
986
+ replaceBeforeCaret: (e, t) => {
987
+ _e(null, e, t, () => K());
988
+ }
989
+ }), [K, r]);
990
+ let ke = f.bodyMinHeight[c ?? (o ? "control" : "document")], Ae = g(() => ({
991
+ ...l ? { minHeight: l } : {},
992
+ ...u ? {
993
+ maxHeight: u,
994
+ overflowY: "auto"
995
+ } : {}
996
+ }), [u, l]), je = m(() => {
997
+ if (z) {
998
+ let e = D(V);
999
+ U.current = e, j.current && (j.current.innerHTML = O(e)), r(e), B(!1);
1000
+ return;
1001
+ }
1002
+ H(j.current?.innerHTML ?? O(e)), B(!0);
1003
+ }, [
1004
+ r,
1005
+ z,
1006
+ V,
1007
+ e
1008
+ ]), Me = m((e) => {
1009
+ let t = e.target.value;
1010
+ H(t);
1011
+ let n = D(t);
1012
+ U.current = n, r(n);
1013
+ }, [r]), Ne = typeof a == "string" ? a : "", Pe = D(U.current) === "" && J.uploads.length === 0, Fe = Ne.length > 0 && !L && Pe ? /* @__PURE__ */ b(i, {
1014
+ tag: "span",
1015
+ size: "sm",
1016
+ type: "secondary",
1017
+ className: "pointer-events-none absolute inset-0 px-control py-control-y-offset",
1018
+ children: Ne
1019
+ }) : null, Ie = g(() => [
1020
+ {
1021
+ id: "bold",
1022
+ toggle: !0,
1023
+ icon: ae,
1024
+ label: A.toolbar.bold,
1025
+ isActive: () => !1,
1026
+ run: () => void 0,
1027
+ disabled: !0
1028
+ },
1029
+ {
1030
+ id: "italic",
1031
+ toggle: !0,
1032
+ icon: oe,
1033
+ label: A.toolbar.italic,
1034
+ isActive: () => !1,
1035
+ run: () => void 0,
1036
+ disabled: !0
1037
+ },
1038
+ {
1039
+ id: "strike",
1040
+ toggle: !0,
1041
+ icon: fe,
1042
+ label: A.toolbar.strike,
1043
+ isActive: () => !1,
1044
+ run: () => void 0,
1045
+ disabled: !0
1046
+ },
1047
+ {
1048
+ id: "bullet-list",
1049
+ toggle: !0,
1050
+ icon: se,
1051
+ label: A.toolbar.bulletList,
1052
+ isActive: () => !1,
1053
+ run: () => void 0,
1054
+ disabled: !0
1055
+ },
1056
+ {
1057
+ id: "ordered-list",
1058
+ toggle: !0,
1059
+ icon: ce,
1060
+ label: A.toolbar.orderedList,
1061
+ isActive: () => !1,
1062
+ run: () => void 0,
1063
+ disabled: !0
1064
+ },
1065
+ {
1066
+ id: "blockquote",
1067
+ toggle: !0,
1068
+ icon: ue,
1069
+ label: A.toolbar.blockquote,
1070
+ isActive: () => !1,
1071
+ run: () => void 0,
1072
+ disabled: !0
1073
+ },
1074
+ {
1075
+ id: "undo",
1076
+ icon: pe,
1077
+ label: A.toolbar.undo,
1078
+ isActive: () => !1,
1079
+ run: () => void 0,
1080
+ disabled: !0
1081
+ },
1082
+ {
1083
+ id: "redo",
1084
+ icon: de,
1085
+ label: A.toolbar.redo,
1086
+ isActive: () => !1,
1087
+ run: () => void 0,
1088
+ disabled: !0
1089
+ }
1090
+ ], [A]), Le = z ? V.replace(/<[^>]*>/g, "") : j.current?.innerText ?? D(e).replace(/<[^>]*>/g, ""), Re = p ? /* @__PURE__ */ b(T, {
1091
+ text: Le,
1092
+ maxLength: ne,
1093
+ strings: A
1094
+ }) : null;
1095
+ return /* @__PURE__ */ x("div", {
1096
+ className: n(f.frame, d && f.disabled, me),
1097
+ children: [
1098
+ /* @__PURE__ */ b(ee, {
1099
+ buttons: Ie,
1100
+ extraToolbarItems: Ee,
1101
+ hideSourceToggle: le,
1102
+ sourceMode: z,
1103
+ toggleSourceMode: je,
1104
+ disabled: d,
1105
+ hasEditor: !0,
1106
+ toolbarTrailing: ie,
1107
+ strings: A
1108
+ }),
1109
+ z ? /* @__PURE__ */ b("textarea", {
1110
+ "aria-label": A.sourceLabel,
1111
+ value: V,
1112
+ onChange: Me,
1113
+ disabled: d,
1114
+ spellCheck: !1,
1115
+ className: n(f.source, ke, d && "cursor-not-allowed"),
1116
+ style: Ae
1117
+ }) : /* @__PURE__ */ x("div", {
1118
+ className: n("relative", ke),
1119
+ style: Ae,
1120
+ children: [Fe, /* @__PURE__ */ b("div", {
1121
+ ref: G,
1122
+ role: "textbox",
1123
+ "aria-label": A.editorLabel,
1124
+ "aria-multiline": "true",
1125
+ contentEditable: !d,
1126
+ suppressContentEditableWarning: !0,
1127
+ onInput: $,
1128
+ onKeyUp: () => W.current?.(),
1129
+ onMouseUp: () => W.current?.(),
1130
+ onClick: E ? (e) => {
1131
+ if (!(e.target instanceof HTMLImageElement)) return;
1132
+ let t = document.createRange();
1133
+ t.selectNode(e.target);
1134
+ let n = window.getSelection();
1135
+ n?.removeAllRanges(), n?.addRange(t);
1136
+ } : void 0,
1137
+ onPaste: E ? (e) => {
1138
+ let t = xe(e.clipboardData);
1139
+ t.length !== 0 && (e.preventDefault(), J.addFiles(t));
1140
+ } : void 0,
1141
+ onDragOver: E ? (e) => {
1142
+ Array.from(e.dataTransfer.types).includes("Files") && e.preventDefault();
1143
+ } : void 0,
1144
+ onDrop: E ? (e) => {
1145
+ let t = xe(e.dataTransfer);
1146
+ t.length !== 0 && (e.preventDefault(), j.current?.focus(), Oe(e.clientX, e.clientY), J.addFiles(t));
1147
+ } : void 0,
1148
+ onFocus: () => R(!0),
1149
+ onBlur: () => R(!1),
1150
+ className: n(s, "h-full min-h-full", d && "cursor-not-allowed")
1151
+ })]
1152
+ }),
1153
+ !!E && /* @__PURE__ */ b(Te, {
1154
+ alt: N ? be : null,
1155
+ onAltChange: (e) => {
1156
+ I(e), N?.setAttribute("alt", e), K();
1157
+ },
1158
+ onRemove: () => {
1159
+ N?.remove(), F(null), K(), j.current?.focus();
1160
+ },
1161
+ notice: J.notice,
1162
+ onDismissNotice: J.dismissNotice,
1163
+ strings: A.images
1164
+ }),
1165
+ !!S && /* @__PURE__ */ b("div", {
1166
+ className: "px-control pb-space-md pt-space-xs",
1167
+ children: S
1168
+ }),
1169
+ Re,
1170
+ Y.input,
1171
+ /* @__PURE__ */ b(Ce, {
1172
+ queue: J,
1173
+ adapterRef: q,
1174
+ strings: A.images
1175
+ })
1176
+ ]
1177
+ });
1178
+ });
1179
+ Q.displayName = "FallbackRichTextEditor";
1180
+ //#endregion
1181
+ //#region src/components/features/rich-text-editor/rich-text-editor.tsx
1182
+ var $ = p(function(e, t) {
1183
+ return Ee ? /* @__PURE__ */ b(Y, {
1184
+ ...e,
1185
+ ref: t
1186
+ }) : /* @__PURE__ */ b(Q, {
1187
+ className: "rich-text-editor--component",
1188
+ ...e,
1189
+ ref: t
1190
+ });
1191
+ });
1192
+ $.displayName = "RichTextEditor";
1193
+ //#endregion
1194
+ export { T as n, $ as t };
1195
+
1196
+ //# sourceMappingURL=rich-text-editor-cRLC-eBK.js.map