themelia-react-ui 1.0.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (748) hide show
  1. package/CHANGELOG.md +632 -1
  2. package/README.md +31 -13
  3. package/dist/accordion-B6a3vVgA.js +207 -0
  4. package/dist/accordion-B6a3vVgA.js.map +1 -0
  5. package/dist/action-menu-TzCoSlwL.js +280 -0
  6. package/dist/action-menu-TzCoSlwL.js.map +1 -0
  7. package/dist/{affordance-geometry.generated-CL84ZN9A.js → affordance-geometry.generated-B5iu-Mkr.js} +9 -3
  8. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +1 -0
  9. package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-BMJdv-6q.js} +389 -391
  10. package/dist/ai-artifact-BMJdv-6q.js.map +1 -0
  11. package/dist/{app-shell-C_fKpljx.js → app-shell-ZK5RWdo6.js} +4 -4
  12. package/dist/{app-shell-C_fKpljx.js.map → app-shell-ZK5RWdo6.js.map} +1 -1
  13. package/dist/attachment-BtfhGm8i.js +245 -0
  14. package/dist/attachment-BtfhGm8i.js.map +1 -0
  15. package/dist/{auth-CAQcasMV.js → auth-CYxKfo69.js} +239 -237
  16. package/dist/auth-CYxKfo69.js.map +1 -0
  17. package/dist/{avatar-Bu2HhitA.js → avatar-BBnEJIx8.js} +71 -68
  18. package/dist/avatar-BBnEJIx8.js.map +1 -0
  19. package/dist/badge-MrKVNzW9.js +93 -0
  20. package/dist/badge-MrKVNzW9.js.map +1 -0
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/batch-action-bar.js +3 -0
  27. package/dist/base/buttons.js +2 -3
  28. package/dist/base/cards.js +2 -2
  29. package/dist/base/carousel.js +19 -19
  30. package/dist/base/carousel.js.map +1 -1
  31. package/dist/base/cascader.js +234 -224
  32. package/dist/base/cascader.js.map +1 -1
  33. package/dist/base/chart.js +1 -1
  34. package/dist/base/choice-inputs.js +3 -3
  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 +3 -3
  42. package/dist/base/forms-numeric.js +1 -1
  43. package/dist/base/forms.js +2 -2
  44. package/dist/base/inline-edit.js +81 -76
  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 +1 -1
  48. package/dist/base/metadata-list.js +3 -0
  49. package/dist/base/navigation.js +7 -7
  50. package/dist/base/popover-menu.js +1 -1
  51. package/dist/base/popover.js +1 -1
  52. package/dist/base/qr-code.js +7 -4
  53. package/dist/base/qr-code.js.map +1 -1
  54. package/dist/base/repeaters.js +175 -174
  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 +148 -138
  59. package/dist/base/signature-pad.js.map +1 -1
  60. package/dist/base/skeleton.js +1 -1
  61. package/dist/base/spinner.js +1 -1
  62. package/dist/base/structure.js +1 -1
  63. package/dist/base/table.js +1 -1
  64. package/dist/base/text-inputs.js +2 -2
  65. package/dist/base/toaster.js +4 -4
  66. package/dist/base/toaster.js.map +1 -1
  67. package/dist/base/tree.js +1 -1
  68. package/dist/base/upload-queue.js +1 -1
  69. package/dist/base/upload.js +3 -3
  70. package/dist/base/value-inputs.js +2 -2
  71. package/dist/batch-action-bar-BZGDG-Si.js +104 -0
  72. package/dist/batch-action-bar-BZGDG-Si.js.map +1 -0
  73. package/dist/blocks/admin.js +264 -253
  74. package/dist/blocks/admin.js.map +1 -1
  75. package/dist/blocks/ai.js +293 -323
  76. package/dist/blocks/ai.js.map +1 -1
  77. package/dist/blocks/analytics/usage-card.js +1 -1
  78. package/dist/blocks/analytics.js +596 -587
  79. package/dist/blocks/analytics.js.map +1 -1
  80. package/dist/blocks/collaboration.js +1 -1
  81. package/dist/blocks/commerce/receipt.js +1 -1
  82. package/dist/blocks/commerce.js +2246 -1693
  83. package/dist/blocks/commerce.js.map +1 -1
  84. package/dist/blocks/data-display.js +3 -2
  85. package/dist/blocks/onboarding.js +50 -49
  86. package/dist/blocks/onboarding.js.map +1 -1
  87. package/dist/blocks/planning.js +82 -91
  88. package/dist/blocks/planning.js.map +1 -1
  89. package/dist/blocks/timelines.js +1 -1
  90. package/dist/breadcrumbs-D5t7I023.js +129 -0
  91. package/dist/breadcrumbs-D5t7I023.js.map +1 -0
  92. package/dist/{button-BZyfTvwm.js → button-QYwiyhD2.js} +15 -14
  93. package/dist/button-QYwiyhD2.js.map +1 -0
  94. package/dist/buttons-SbIcm1HJ.js +661 -0
  95. package/dist/buttons-SbIcm1HJ.js.map +1 -0
  96. package/dist/{cards-qGSErLw_.js → cards-CiiHpKYd.js} +8 -8
  97. package/dist/cards-CiiHpKYd.js.map +1 -0
  98. package/dist/{chart-Bsc5BICK.js → chart-QfrARkXl.js} +17 -15
  99. package/dist/chart-QfrARkXl.js.map +1 -0
  100. package/dist/checkbox-DhB6K0bK.js +36 -0
  101. package/dist/checkbox-DhB6K0bK.js.map +1 -0
  102. package/dist/choice-inputs-t6w3ATNz.js +766 -0
  103. package/dist/choice-inputs-t6w3ATNz.js.map +1 -0
  104. package/dist/code-block-Dgbu-CU3.js +185 -0
  105. package/dist/code-block-Dgbu-CU3.js.map +1 -0
  106. package/dist/{collapsible-ClvC7Bj3.js → collapsible-D8AEGU1-.js} +4 -4
  107. package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-D8AEGU1-.js.map} +1 -1
  108. package/dist/{collection-content-D6S8cv_n.js → collection-content-uK16Grv0.js} +3 -3
  109. package/dist/{collection-content-D6S8cv_n.js.map → collection-content-uK16Grv0.js.map} +1 -1
  110. package/dist/{combobox-BFnbJJp3.js → combobox-2Ic8N9bL.js} +103 -98
  111. package/dist/combobox-2Ic8N9bL.js.map +1 -0
  112. package/dist/combobox-DLl0bfiq.js +867 -0
  113. package/dist/combobox-DLl0bfiq.js.map +1 -0
  114. package/dist/{command-BnmSchli.js → command-kNR20o7x.js} +34 -30
  115. package/dist/command-kNR20o7x.js.map +1 -0
  116. package/dist/{comments-u5L0OGip.js → comments-BpDuCUUu.js} +304 -301
  117. package/dist/comments-BpDuCUUu.js.map +1 -0
  118. package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
  119. package/dist/components/base/action-menu/action-menu.d.ts +27 -5
  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/avatar/stacked-avatars.d.ts +5 -4
  123. package/dist/components/base/badge/badge.d.ts +1 -1
  124. package/dist/components/base/badge/badge.recipes.d.ts +6 -6
  125. package/dist/components/base/batch-action-bar/batch-action-bar.d.ts +50 -0
  126. package/dist/components/base/batch-action-bar/batch-action-bar.strings.d.ts +20 -0
  127. package/dist/components/base/batch-action-bar/index.d.ts +8 -0
  128. package/dist/components/base/buttons/base-button.d.ts +7 -0
  129. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  130. package/dist/components/base/buttons/button.recipes.d.ts +2 -2
  131. package/dist/components/base/buttons/button.variants.d.ts +1 -0
  132. package/dist/components/base/buttons/loader-button.d.ts +3 -1
  133. package/dist/components/base/buttons/text-button.d.ts +2 -2
  134. package/dist/components/base/carousel/carousel.d.ts +3 -1
  135. package/dist/components/base/chart/chart.d.ts +7 -7
  136. package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
  137. package/dist/components/base/choice-inputs/choice-types.d.ts +24 -3
  138. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
  139. package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
  140. package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
  141. package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
  142. package/dist/components/base/date-pickers/datepicker.types.d.ts +13 -3
  143. package/dist/components/base/display/alert-dialog.d.ts +10 -3
  144. package/dist/components/base/display/content-block.d.ts +4 -2
  145. package/dist/components/base/display/date-block.d.ts +1 -1
  146. package/dist/components/base/display/dialog.d.ts +8 -5
  147. package/dist/components/base/display/icon-badge/icon-badge.d.ts +1 -1
  148. package/dist/components/base/display/surface-title.d.ts +6 -1
  149. package/dist/components/base/feedback/alert.d.ts +1 -1
  150. package/dist/components/base/feedback/state-display.d.ts +5 -4
  151. package/dist/components/base/forms/form-sizing.d.ts +43 -8
  152. package/dist/components/base/forms/workflow.d.ts +2 -0
  153. package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
  154. package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
  155. package/dist/components/base/metadata-list/index.d.ts +12 -0
  156. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.d.ts +28 -25
  157. package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-value.d.ts +2 -2
  158. package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
  159. package/dist/components/base/navigation/index.d.ts +1 -1
  160. package/dist/components/base/navigation/language-switcher.d.ts +4 -1
  161. package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
  162. package/dist/components/base/navigation/page-header/index.d.ts +1 -0
  163. package/dist/components/base/navigation/page-header/page-header-commands.d.ts +73 -0
  164. package/dist/components/base/navigation/page-header/page-header.d.ts +30 -4
  165. package/dist/components/base/qr-code/qr-code.d.ts +2 -0
  166. package/dist/components/base/sheet/index.d.ts +29 -1
  167. package/dist/components/base/sheet/sheet.d.ts +10 -5
  168. package/dist/components/base/signature-pad/signature-pad.types.d.ts +5 -1
  169. package/dist/components/base/signature-pad/signature-pad.utils.d.ts +11 -3
  170. package/dist/components/base/spinner/spinner.d.ts +3 -2
  171. package/dist/components/base/structure/structure.types.d.ts +1 -1
  172. package/dist/components/base/text-inputs/field-clear-button.d.ts +6 -0
  173. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  174. package/dist/components/base/upload/upload.recipes.d.ts +33 -0
  175. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
  176. package/dist/components/base/value-inputs/index.d.ts +5 -5
  177. package/dist/components/base/value-inputs/tags-input.d.ts +38 -12
  178. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
  179. package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
  180. package/dist/components/blocks/analytics/index.d.ts +1 -1
  181. package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
  182. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  183. package/dist/components/blocks/commerce/address-card/types.d.ts +4 -1
  184. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
  185. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
  186. package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +3 -1
  187. package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
  188. package/dist/components/blocks/commerce/cart-summary/types.d.ts +6 -1
  189. package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +3 -1
  190. package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
  191. package/dist/components/blocks/commerce/discount-stack/types.d.ts +16 -4
  192. package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +5 -0
  193. package/dist/components/blocks/commerce/fulfillment-group/index.d.ts +2 -0
  194. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +43 -0
  195. package/dist/components/blocks/commerce/index.d.ts +13 -5
  196. package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
  197. package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
  198. package/dist/components/blocks/commerce/invoice-header/types.d.ts +4 -2
  199. package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +1 -1
  200. package/dist/components/blocks/commerce/invoice-mini/types.d.ts +2 -1
  201. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
  202. package/dist/components/blocks/commerce/order-customer/index.d.ts +2 -0
  203. package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +5 -0
  204. package/dist/components/blocks/commerce/order-customer/types.d.ts +48 -0
  205. package/dist/components/blocks/commerce/order-header/index.d.ts +2 -0
  206. package/dist/components/blocks/commerce/order-header/order-header.d.ts +5 -0
  207. package/dist/components/blocks/commerce/order-header/types.d.ts +37 -0
  208. package/dist/components/blocks/commerce/order-line-item/index.d.ts +2 -0
  209. package/dist/components/blocks/commerce/order-line-item/order-line-item.d.ts +5 -0
  210. package/dist/components/blocks/commerce/order-line-item/types.d.ts +46 -0
  211. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  212. package/dist/components/blocks/commerce/order-summary/index.d.ts +2 -0
  213. package/dist/components/blocks/commerce/order-summary/order-summary.d.ts +5 -0
  214. package/dist/components/blocks/commerce/order-summary/types.d.ts +42 -0
  215. package/dist/components/blocks/commerce/order-transactions/index.d.ts +2 -0
  216. package/dist/components/blocks/commerce/order-transactions/order-transactions.d.ts +5 -0
  217. package/dist/components/blocks/commerce/order-transactions/types.d.ts +46 -0
  218. package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
  219. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +9 -1
  220. package/dist/components/blocks/commerce/payment-method/types.d.ts +14 -1
  221. package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
  222. package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +3 -1
  223. package/dist/components/blocks/commerce/refund-status/types.d.ts +6 -3
  224. package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
  225. package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
  226. package/dist/components/blocks/commerce/shared/address-lines.d.ts +21 -0
  227. package/dist/components/blocks/commerce/shared/line-thumbnail.d.ts +9 -0
  228. package/dist/components/blocks/commerce/shared/order-status.d.ts +51 -0
  229. package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
  230. package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +27 -6
  231. package/dist/components/blocks/commerce/summary-panel/amount-row.d.ts +2 -0
  232. package/dist/components/blocks/commerce/summary-panel/index.d.ts +3 -0
  233. package/dist/components/blocks/commerce/summary-panel/summary-panel.d.ts +2 -0
  234. package/dist/components/blocks/commerce/summary-panel/types.d.ts +26 -0
  235. package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
  236. package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +2 -1
  237. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
  238. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
  239. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
  240. package/dist/components/blocks/data-display/metadata/index.d.ts +30 -4
  241. package/dist/components/features/activities/partials/activity-row.d.ts +6 -2
  242. package/dist/components/features/activities/partials/tone-tokens.d.ts +0 -6
  243. package/dist/components/features/global-search/partials/global-search-group-heading.d.ts +15 -0
  244. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
  245. package/dist/components/features/global-search/partials/tone-palettes.d.ts +0 -5
  246. package/dist/components/features/kanban/kanban.d.ts +1 -1
  247. package/dist/components/features/kanban/kanban.strings.d.ts +1 -1
  248. package/dist/components/features/kanban/kanban.types.d.ts +2 -2
  249. package/dist/components/features/media-library/hooks/use-media-library.d.ts +1 -1
  250. package/dist/components/features/media-library/index.d.ts +1 -1
  251. package/dist/components/features/media-library/media-library.d.ts +1 -1
  252. package/dist/components/features/media-library/media-library.strings.d.ts +4 -0
  253. package/dist/components/features/media-library/media-library.types.d.ts +74 -1
  254. package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
  255. package/dist/components/features/mentions/partials/mention-kind-toggles.d.ts +16 -0
  256. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  257. package/dist/components/features/overlays/dialog.d.ts +1 -1
  258. package/dist/components/features/overlays/drawer.d.ts +1 -1
  259. package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
  260. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
  261. package/dist/components/features/overlays/index.d.ts +1 -1
  262. package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
  263. package/dist/components/features/overlays/overlays.types.d.ts +62 -19
  264. package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
  265. package/dist/components/features/products/components/product-details-card.d.ts +5 -0
  266. package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
  267. package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
  268. package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
  269. package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
  270. package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
  271. package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
  272. package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
  273. package/dist/components/features/products/components/product-variant-action-menu.d.ts +23 -1
  274. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  275. package/dist/components/features/products/partials/index.d.ts +1 -1
  276. package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
  277. package/dist/components/features/products/partials/product-tone.d.ts +11 -1
  278. package/dist/components/features/products/products.types.d.ts +11 -3
  279. package/dist/components/features/resource/index.d.ts +1 -1
  280. package/dist/components/features/resource/resource.d.ts +1 -1
  281. package/dist/components/features/resource/resource.types.d.ts +34 -6
  282. package/dist/components/features/rich-text-editor/index.d.ts +2 -1
  283. package/dist/components/features/rich-text-editor/partials/image-nodes.d.ts +13 -0
  284. package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +66 -0
  285. package/dist/components/features/rich-text-editor/partials/inline-reference-node.d.ts +19 -0
  286. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
  287. package/dist/components/features/rich-text-editor/rich-text-editor.strings.d.ts +14 -0
  288. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +45 -0
  289. package/dist/components/features/rich-text-editor/use-rich-text-images.d.ts +18 -0
  290. package/dist/components/features/sync/index.d.ts +26 -3
  291. package/dist/components/features/table/data-table.d.ts +1 -1
  292. package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
  293. package/dist/components/features/table/table.types.d.ts +32 -7
  294. package/dist/components/layout/page/index.d.ts +1 -1
  295. package/dist/components/layout/page/page.types.d.ts +51 -4
  296. package/dist/components/layout/page/partials/page-actions.d.ts +1 -0
  297. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  298. package/dist/components/layout/settings/settings.d.ts +16 -2
  299. package/dist/components/layout/workspace/workspace.types.d.ts +21 -4
  300. package/dist/components/primitives/date.d.ts +16 -3
  301. package/dist/components/primitives/dimensions.d.ts +6 -0
  302. package/dist/components/primitives/duration.d.ts +6 -0
  303. package/dist/components/primitives/file-size.d.ts +6 -0
  304. package/dist/components/primitives/index.d.ts +1 -1
  305. package/dist/components/primitives/initials.d.ts +11 -2
  306. package/dist/components/primitives/link.d.ts +7 -0
  307. package/dist/components/primitives/money.d.ts +29 -7
  308. package/dist/components/primitives/number.d.ts +17 -0
  309. package/dist/components/primitives/value-typography.d.ts +54 -0
  310. package/dist/components/primitives/value.d.ts +31 -6
  311. package/dist/components/typography/heading.d.ts +9 -1
  312. package/dist/components/typography/label.d.ts +3 -0
  313. package/dist/components/typography/rich-text/index.d.ts +1 -1
  314. package/dist/components/typography/rich-text/rich-text-tree.d.ts +19 -0
  315. package/dist/components/typography/rich-text/rich-text.d.ts +16 -0
  316. package/dist/components/typography/running-text.d.ts +12 -0
  317. package/dist/components/typography/text-link.d.ts +24 -1
  318. package/dist/components/typography/text.d.ts +12 -0
  319. package/dist/components/typography/text.styles.d.ts +35 -13
  320. package/dist/components/ui/button.d.ts +1 -1
  321. package/dist/components/ui/checkbox.d.ts +6 -0
  322. package/dist/components/ui/overlay.recipes.d.ts +6 -2
  323. package/dist/components/ui/select.d.ts +3 -1
  324. package/dist/components/ui/switch.d.ts +5 -0
  325. package/dist/{containers-DqB-bSYE.js → containers-DmWiJa2I.js} +36 -35
  326. package/dist/containers-DmWiJa2I.js.map +1 -0
  327. package/dist/{copyable-BTSByfmq.js → copyable-B3Gwgdqc.js} +6 -6
  328. package/dist/{copyable-BTSByfmq.js.map → copyable-B3Gwgdqc.js.map} +1 -1
  329. package/dist/data-display-DafIvCl5.js +960 -0
  330. package/dist/data-display-DafIvCl5.js.map +1 -0
  331. package/dist/date-BgK3bTdo.js +144 -0
  332. package/dist/date-BgK3bTdo.js.map +1 -0
  333. package/dist/date-picker-CF-DtUpF.js +1529 -0
  334. package/dist/date-picker-CF-DtUpF.js.map +1 -0
  335. package/dist/date-pickers-BmzxJl5l.js +174 -0
  336. package/dist/date-pickers-BmzxJl5l.js.map +1 -0
  337. package/dist/{display-CS6Hbk18.js → display-DsQTVzMz.js} +88 -87
  338. package/dist/display-DsQTVzMz.js.map +1 -0
  339. package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-E2qmdC7o.js} +23 -16
  340. package/dist/dropdown-menu-E2qmdC7o.js.map +1 -0
  341. package/dist/features/activities.js +437 -521
  342. package/dist/features/activities.js.map +1 -1
  343. package/dist/features/ai-chat.js +174 -172
  344. package/dist/features/ai-chat.js.map +1 -1
  345. package/dist/features/async-preview.js +8 -8
  346. package/dist/features/async-preview.js.map +1 -1
  347. package/dist/features/combobox.js +1 -1
  348. package/dist/features/comments.js +1 -1
  349. package/dist/features/data-view.js +139 -138
  350. package/dist/features/data-view.js.map +1 -1
  351. package/dist/features/email-composer/engine.js +1 -1
  352. package/dist/features/email-composer.js +353 -352
  353. package/dist/features/email-composer.js.map +1 -1
  354. package/dist/features/event-calendar.js +262 -269
  355. package/dist/features/event-calendar.js.map +1 -1
  356. package/dist/features/filters.js +1 -1
  357. package/dist/features/global-search.js +307 -310
  358. package/dist/features/global-search.js.map +1 -1
  359. package/dist/features/kanban.js +95 -97
  360. package/dist/features/kanban.js.map +1 -1
  361. package/dist/features/map.js +56 -57
  362. package/dist/features/map.js.map +1 -1
  363. package/dist/features/media-library.js +914 -824
  364. package/dist/features/media-library.js.map +1 -1
  365. package/dist/features/mentions.js +1 -1
  366. package/dist/features/overlays.js +1 -1
  367. package/dist/features/products.js +1272 -1311
  368. package/dist/features/products.js.map +1 -1
  369. package/dist/features/questionnaire.js +204 -194
  370. package/dist/features/questionnaire.js.map +1 -1
  371. package/dist/features/resource-assignment.js +103 -95
  372. package/dist/features/resource-assignment.js.map +1 -1
  373. package/dist/features/resource.js +77 -69
  374. package/dist/features/resource.js.map +1 -1
  375. package/dist/features/rich-text-editor.js +30 -11
  376. package/dist/features/rich-text-editor.js.map +1 -1
  377. package/dist/features/schema-form.js +193 -189
  378. package/dist/features/schema-form.js.map +1 -1
  379. package/dist/features/suggestions.js +3 -3
  380. package/dist/features/sync.js +7 -7
  381. package/dist/features/sync.js.map +1 -1
  382. package/dist/features/table.js +1 -1
  383. package/dist/features/theme-tweaker.js +455 -455
  384. package/dist/features/theme-tweaker.js.map +1 -1
  385. package/dist/feedback-qNuMBtRH.js +233 -0
  386. package/dist/feedback-qNuMBtRH.js.map +1 -0
  387. package/dist/field-affordance-recipes-qQeIf4lG.js +48 -0
  388. package/dist/field-affordance-recipes-qQeIf4lG.js.map +1 -0
  389. package/dist/field-state-recipes-BVA2CWHo.js +12 -0
  390. package/dist/field-state-recipes-BVA2CWHo.js.map +1 -0
  391. package/dist/{filters-D6FF8L6s.js → filters-BkHH53uv.js} +414 -412
  392. package/dist/filters-BkHH53uv.js.map +1 -0
  393. package/dist/focus-recipes-B653VaLq.js +12 -0
  394. package/dist/focus-recipes-B653VaLq.js.map +1 -0
  395. package/dist/{form-field-CZwrkP7m.js → form-field-DUt4UxSV.js} +7 -7
  396. package/dist/{form-field-CZwrkP7m.js.map → form-field-DUt4UxSV.js.map} +1 -1
  397. package/dist/form-sizing-By94KzXE.js +130 -0
  398. package/dist/form-sizing-By94KzXE.js.map +1 -0
  399. package/dist/{forms-B5NCbkSC.js → forms-Bzha-Y3B.js} +25 -25
  400. package/dist/forms-Bzha-Y3B.js.map +1 -0
  401. package/dist/forms-numeric-C0bvjRPZ.js +906 -0
  402. package/dist/forms-numeric-C0bvjRPZ.js.map +1 -0
  403. package/dist/{header-kxruN3RM.js → header-BOefOKd1.js} +38 -41
  404. package/dist/header-BOefOKd1.js.map +1 -0
  405. package/dist/{hooks-BrlnCwQd.js → hooks-9k_TtmKh.js} +2 -2
  406. package/dist/{hooks-BrlnCwQd.js.map → hooks-9k_TtmKh.js.map} +1 -1
  407. package/dist/{http-CdEIHyQf.js → http-D_6rOnzU.js} +2 -2
  408. package/dist/{http-CdEIHyQf.js.map → http-D_6rOnzU.js.map} +1 -1
  409. package/dist/icon-badge-CAuKupo9.js +55 -0
  410. package/dist/icon-badge-CAuKupo9.js.map +1 -0
  411. package/dist/index.js +7 -7
  412. package/dist/input-DWhBBBww.js +262 -0
  413. package/dist/input-DWhBBBww.js.map +1 -0
  414. package/dist/{input-vxcaNCYC.js → input-Ddi_LSYv.js} +3 -3
  415. package/dist/{input-vxcaNCYC.js.map → input-Ddi_LSYv.js.map} +1 -1
  416. package/dist/interaction-recipes-CHr0dJUs.js +24 -0
  417. package/dist/interaction-recipes-CHr0dJUs.js.map +1 -0
  418. package/dist/item-DEmDiTlD.js +265 -0
  419. package/dist/item-DEmDiTlD.js.map +1 -0
  420. package/dist/layer-recipes-CCpklYME.js +13 -0
  421. package/dist/layer-recipes-CCpklYME.js.map +1 -0
  422. package/dist/layout/app-shell.js +1 -1
  423. package/dist/layout/auth.js +1 -1
  424. package/dist/layout/containers.js +1 -1
  425. package/dist/layout/header.js +1 -1
  426. package/dist/layout/hooks.js +1 -1
  427. package/dist/layout/navigation.js +1 -1
  428. package/dist/layout/page.js +1 -1
  429. package/dist/layout/settings.js +1 -1
  430. package/dist/layout/sidebar.js +2 -2
  431. package/dist/layout/workspace.js +1 -1
  432. package/dist/layout.js +10 -10
  433. package/dist/lib/affordance-geometry.generated.d.ts +7 -1
  434. package/dist/lib/field-affordance-recipes.d.ts +41 -1
  435. package/dist/lib/field-state-recipes.d.ts +9 -6
  436. package/dist/lib/focus-recipes.d.ts +24 -0
  437. package/dist/lib/format.d.ts +9 -0
  438. package/dist/lib/interaction-recipes.d.ts +35 -0
  439. package/dist/lib/layer-recipes.d.ts +19 -0
  440. package/dist/lib/money-format.d.ts +30 -0
  441. package/dist/lib/motion-recipes.d.ts +1 -0
  442. package/dist/lib/overlay-anatomy-recipes.d.ts +2 -1
  443. package/dist/lib/safe-image-src.d.ts +10 -0
  444. package/dist/lib/sanitize-html.d.ts +15 -3
  445. package/dist/lib/surface-recipes.d.ts +48 -6
  446. package/dist/lib/token-merge.generated.d.ts +17 -14
  447. package/dist/lib/tone-recipes.d.ts +79 -0
  448. package/dist/lib/track-recipes.d.ts +1 -1
  449. package/dist/lib/ui-provider/hooks.d.ts +2 -1
  450. package/dist/lib/ui-provider/index.d.ts +2 -2
  451. package/dist/lib/ui-provider/provider.d.ts +7 -2
  452. package/dist/lib/ui-provider/store.d.ts +6 -2
  453. package/dist/lib/ui-provider/types.d.ts +14 -2
  454. package/dist/lib/utils.js +1 -1
  455. package/dist/media-gallery-DcTtAaeC.js +203 -0
  456. package/dist/media-gallery-DcTtAaeC.js.map +1 -0
  457. package/dist/mentions-D-uyCh01.js +568 -0
  458. package/dist/mentions-D-uyCh01.js.map +1 -0
  459. package/dist/{message-SZUNB1eX.js → message-CdHgIWKf.js} +5 -5
  460. package/dist/{message-SZUNB1eX.js.map → message-CdHgIWKf.js.map} +1 -1
  461. package/dist/metadata-list-X5rYAKSB.js +394 -0
  462. package/dist/metadata-list-X5rYAKSB.js.map +1 -0
  463. package/dist/{motion-recipes-B6jKXEcN.js → motion-recipes-ChBg4HBq.js} +3 -2
  464. package/dist/{motion-recipes-B6jKXEcN.js.map → motion-recipes-ChBg4HBq.js.map} +1 -1
  465. package/dist/navigation-D3KwXmaq.js +145 -0
  466. package/dist/navigation-D3KwXmaq.js.map +1 -0
  467. package/dist/navigation-HJf5zxlH.js +268 -0
  468. package/dist/navigation-HJf5zxlH.js.map +1 -0
  469. package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-BVowojQw.js} +2 -2
  470. package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-BVowojQw.js.map} +1 -1
  471. package/dist/number-DMhe-Vsk.js +352 -0
  472. package/dist/number-DMhe-Vsk.js.map +1 -0
  473. package/dist/overflow-tab-bar-sQHXLlwQ.js +280 -0
  474. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +1 -0
  475. package/dist/overlay.recipes-8GHqmlb4.js +6 -0
  476. package/dist/overlay.recipes-8GHqmlb4.js.map +1 -0
  477. package/dist/overlays-I0axtYA6.js +999 -0
  478. package/dist/overlays-I0axtYA6.js.map +1 -0
  479. package/dist/{page-hGmT4nWK.js → page-B5dTH9gE.js} +79 -68
  480. package/dist/page-B5dTH9gE.js.map +1 -0
  481. package/dist/page-header-commands-DjzFEq3E.js +126 -0
  482. package/dist/page-header-commands-DjzFEq3E.js.map +1 -0
  483. package/dist/{pagination-NLGqRirf.js → pagination-3bPA_a6K.js} +19 -19
  484. package/dist/{pagination-NLGqRirf.js.map → pagination-3bPA_a6K.js.map} +1 -1
  485. package/dist/{popover-CghIYdQf.js → popover-Di55PyAI.js} +8 -8
  486. package/dist/popover-Di55PyAI.js.map +1 -0
  487. package/dist/{popover-menu-B4PoWhRl.js → popover-menu-B71Tn2Qz.js} +6 -6
  488. package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-B71Tn2Qz.js.map} +1 -1
  489. package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-Bdyhj2db.js} +2 -2
  490. package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-Bdyhj2db.js.map} +1 -1
  491. package/dist/primitives-B-CkiEMU.js +379 -0
  492. package/dist/primitives-B-CkiEMU.js.map +1 -0
  493. package/dist/primitives.js +5 -5
  494. package/dist/{progress-BroqrAyV.js → progress-rnS8-uAW.js} +11 -11
  495. package/dist/progress-rnS8-uAW.js.map +1 -0
  496. package/dist/{receipt-BuJynLgf.js → receipt-D0oswZ0p.js} +6 -6
  497. package/dist/{receipt-BuJynLgf.js.map → receipt-D0oswZ0p.js.map} +1 -1
  498. package/dist/rich-text-DvGulsNJ.js +78 -0
  499. package/dist/rich-text-DvGulsNJ.js.map +1 -0
  500. package/dist/rich-text-editor-sMU_Scqm.js +1204 -0
  501. package/dist/rich-text-editor-sMU_Scqm.js.map +1 -0
  502. package/dist/rich-text-editor.recipes-CadiF_Uu.js +88 -0
  503. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +1 -0
  504. package/dist/rich-text-editor.strings-CB59ekH2.js +38 -0
  505. package/dist/rich-text-editor.strings-CB59ekH2.js.map +1 -0
  506. package/dist/safe-image-src-C6kQSMBZ.js +17 -0
  507. package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
  508. package/dist/sanitize-html-DsQmI48u.js +92 -0
  509. package/dist/sanitize-html-DsQmI48u.js.map +1 -0
  510. package/dist/scroll-area-Bt_vXY2b.js +48 -0
  511. package/dist/scroll-area-Bt_vXY2b.js.map +1 -0
  512. package/dist/{separator-BNIgG3au.js → separator-C8DlRGwF.js} +4 -4
  513. package/dist/separator-C8DlRGwF.js.map +1 -0
  514. package/dist/{separator-BhtFyo4x.js → separator-CYHnjsAb.js} +2 -2
  515. package/dist/{separator-BhtFyo4x.js.map → separator-CYHnjsAb.js.map} +1 -1
  516. package/dist/services/actions/action-adapters.d.ts +22 -0
  517. package/dist/services/actions/index.d.ts +1 -1
  518. package/dist/services/actions.js +23 -6
  519. package/dist/services/actions.js.map +1 -1
  520. package/dist/settings-CQW3b-Cu.js +170 -0
  521. package/dist/settings-CQW3b-Cu.js.map +1 -0
  522. package/dist/sheet-4SEvVYzA.js +210 -0
  523. package/dist/sheet-4SEvVYzA.js.map +1 -0
  524. package/dist/{sidebar-CyR4XKwR.js → sidebar-C7WWR29L.js} +181 -180
  525. package/dist/sidebar-C7WWR29L.js.map +1 -0
  526. package/dist/sidebar-d7Dg80ln.js +511 -0
  527. package/dist/sidebar-d7Dg80ln.js.map +1 -0
  528. package/dist/{skeleton-3F0uhYn3.js → skeleton-Cz890JZF.js} +10 -10
  529. package/dist/skeleton-Cz890JZF.js.map +1 -0
  530. package/dist/smart-card-lFKxn5Hu.js +595 -0
  531. package/dist/smart-card-lFKxn5Hu.js.map +1 -0
  532. package/dist/{spinner-Cpf7oRkF.js → spinner-fa3h1Aif.js} +10 -8
  533. package/dist/spinner-fa3h1Aif.js.map +1 -0
  534. package/dist/{structure-CRdqVawd.js → structure-DC2dygdA.js} +3 -3
  535. package/dist/{structure-CRdqVawd.js.map → structure-DC2dygdA.js.map} +1 -1
  536. package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
  537. package/dist/structure.recipes-EPz60cU8.js.map +1 -0
  538. package/dist/style.css +1 -1
  539. package/dist/surface-recipes-BKRVW8Os.js +43 -0
  540. package/dist/surface-recipes-BKRVW8Os.js.map +1 -0
  541. package/dist/table-CIKyLUsy.js +163 -0
  542. package/dist/table-CIKyLUsy.js.map +1 -0
  543. package/dist/{table-CcRDZiLP.js → table-CrcLN9Io.js} +544 -530
  544. package/dist/table-CrcLN9Io.js.map +1 -0
  545. package/dist/tabs-DwBJfjxX.js +190 -0
  546. package/dist/tabs-DwBJfjxX.js.map +1 -0
  547. package/dist/{text-inputs-DsR56TR-.js → text-inputs-aaK9wcDT.js} +151 -155
  548. package/dist/text-inputs-aaK9wcDT.js.map +1 -0
  549. package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
  550. package/dist/text.styles-g4He6UIW.js.map +1 -0
  551. package/dist/theme.css +16 -12
  552. package/dist/themes/green.css +24 -0
  553. package/dist/{timelines-D1pkt3se.js → timelines-C_SBwHNP.js} +154 -164
  554. package/dist/timelines-C_SBwHNP.js.map +1 -0
  555. package/dist/tone-recipes-CPoExcTE.js +70 -0
  556. package/dist/tone-recipes-CPoExcTE.js.map +1 -0
  557. package/dist/tooltip-CsfgrfS7.js +111 -0
  558. package/dist/tooltip-CsfgrfS7.js.map +1 -0
  559. package/dist/track-recipes-CDcKmndW.js +10 -0
  560. package/dist/track-recipes-CDcKmndW.js.map +1 -0
  561. package/dist/{tree-BtmYyMZV.js → tree-BiKhg8AY.js} +72 -70
  562. package/dist/tree-BiKhg8AY.js.map +1 -0
  563. package/dist/typography/rich-text.js +1 -1
  564. package/dist/typography-DTRkE9zL.js +117 -0
  565. package/dist/typography-DTRkE9zL.js.map +1 -0
  566. package/dist/typography.js +2 -2
  567. package/dist/{ui-provider-DRPn3qNl.js → ui-provider-1D_NSYzO.js} +30 -23
  568. package/dist/ui-provider-1D_NSYzO.js.map +1 -0
  569. package/dist/ui-provider.js +3 -3
  570. package/dist/{upload-CDbYw1WN.js → upload-BO8-CLN6.js} +294 -293
  571. package/dist/upload-BO8-CLN6.js.map +1 -0
  572. package/dist/{upload-queue-CNd_hH_a.js → upload-queue-EOC8g1gf.js} +133 -138
  573. package/dist/upload-queue-EOC8g1gf.js.map +1 -0
  574. package/dist/upload.recipes-BbxTqrCT.js +61 -0
  575. package/dist/upload.recipes-BbxTqrCT.js.map +1 -0
  576. package/dist/{usage-card-VyJLUwRr.js → usage-card-obRaBskq.js} +42 -43
  577. package/dist/{usage-card-VyJLUwRr.js.map → usage-card-obRaBskq.js.map} +1 -1
  578. package/dist/{utils-BvH9PSmq.js → utils-l5LpDw2z.js} +264 -62
  579. package/dist/utils-l5LpDw2z.js.map +1 -0
  580. package/dist/value-inputs-TAYMX111.js +947 -0
  581. package/dist/value-inputs-TAYMX111.js.map +1 -0
  582. package/dist/value-typography-b8wpz1eX.js +116 -0
  583. package/dist/value-typography-b8wpz1eX.js.map +1 -0
  584. package/dist/workspace-DH0v0KcB.js +407 -0
  585. package/dist/workspace-DH0v0KcB.js.map +1 -0
  586. package/docs/consumer-skill/SKILL.md +62 -50
  587. package/docs/consumer-skill/examples/app-layout.tsx +3 -5
  588. package/docs/consumer-skill/examples/composition.tsx +3 -3
  589. package/docs/consumer-skill/examples/detail.tsx +59 -13
  590. package/docs/consumer-skill/examples/edit.tsx +2 -2
  591. package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
  592. package/docs/consumer-skill/examples/manifest.json +28 -6
  593. package/docs/consumer-skill/examples/receipt.tsx +2 -2
  594. package/docs/consumer-skill/examples/scoped-directory.tsx +3 -3
  595. package/docs/consumer-skill/examples/website.tsx +1 -1
  596. package/docs/consumer-skill/references/agents-md.md +33 -0
  597. package/docs/consumer-skill/references/analytics.md +1 -1
  598. package/docs/consumer-skill/references/composition.md +139 -24
  599. package/docs/consumer-skill/references/design-contract.md +12 -3
  600. package/docs/consumer-skill/references/discovery.md +4 -0
  601. package/docs/consumer-skill/references/installation.md +33 -1
  602. package/docs/consumer-skill/references/integration.md +32 -1
  603. package/docs/consumer-skill/references/public-api.json +1051 -610
  604. package/docs/consumer-skill/references/review.md +44 -8
  605. package/docs/consumer-skill/references/theming.md +14 -4
  606. package/docs/consumer-skill/references/tokens.json +5 -2
  607. package/docs/consumer-skill/references/workflows.md +30 -9
  608. package/docs/consumer-skill/scripts/composition-policy.mjs +127 -6
  609. package/docs/consumer-skill/scripts/discovery.mjs +11 -3
  610. package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
  611. package/docs/consumer-skill/scripts/surface-policy.mjs +139 -5
  612. package/package.json +13 -3
  613. package/dist/accordion-BRTcsp8J.js +0 -205
  614. package/dist/accordion-BRTcsp8J.js.map +0 -1
  615. package/dist/action-menu-Drxw_vJk.js +0 -265
  616. package/dist/action-menu-Drxw_vJk.js.map +0 -1
  617. package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
  618. package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
  619. package/dist/attachment-DbjUWsP0.js +0 -244
  620. package/dist/attachment-DbjUWsP0.js.map +0 -1
  621. package/dist/auth-CAQcasMV.js.map +0 -1
  622. package/dist/avatar-Bu2HhitA.js.map +0 -1
  623. package/dist/badge-CzId1Wlm.js +0 -92
  624. package/dist/badge-CzId1Wlm.js.map +0 -1
  625. package/dist/breadcrumbs-BuYz5SDU.js +0 -128
  626. package/dist/breadcrumbs-BuYz5SDU.js.map +0 -1
  627. package/dist/button-BZDasD04.js +0 -651
  628. package/dist/button-BZDasD04.js.map +0 -1
  629. package/dist/button-BZyfTvwm.js.map +0 -1
  630. package/dist/buttons-D_6KJvEE.js +0 -99
  631. package/dist/buttons-D_6KJvEE.js.map +0 -1
  632. package/dist/cards-qGSErLw_.js.map +0 -1
  633. package/dist/chart-Bsc5BICK.js.map +0 -1
  634. package/dist/checkbox-BQNDjUCh.js +0 -34
  635. package/dist/checkbox-BQNDjUCh.js.map +0 -1
  636. package/dist/choice-inputs-Mk3iWbhr.js +0 -725
  637. package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
  638. package/dist/code-block-DzHKRybS.js +0 -183
  639. package/dist/code-block-DzHKRybS.js.map +0 -1
  640. package/dist/combobox-BFnbJJp3.js.map +0 -1
  641. package/dist/combobox-hozNwUcc.js +0 -847
  642. package/dist/combobox-hozNwUcc.js.map +0 -1
  643. package/dist/command-BnmSchli.js.map +0 -1
  644. package/dist/comments-u5L0OGip.js.map +0 -1
  645. package/dist/containers-DqB-bSYE.js.map +0 -1
  646. package/dist/data-display-Bihs9Ven.js +0 -1342
  647. package/dist/data-display-Bihs9Ven.js.map +0 -1
  648. package/dist/date-DOKhJPu7.js +0 -140
  649. package/dist/date-DOKhJPu7.js.map +0 -1
  650. package/dist/date-picker-DzP5HQq7.js +0 -1541
  651. package/dist/date-picker-DzP5HQq7.js.map +0 -1
  652. package/dist/date-pickers-BpgGz7S-.js +0 -196
  653. package/dist/date-pickers-BpgGz7S-.js.map +0 -1
  654. package/dist/display-CS6Hbk18.js.map +0 -1
  655. package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
  656. package/dist/feedback-CJkUAapr.js +0 -233
  657. package/dist/feedback-CJkUAapr.js.map +0 -1
  658. package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
  659. package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
  660. package/dist/field-state-recipes-DQQpiLWC.js +0 -11
  661. package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
  662. package/dist/filters-D6FF8L6s.js.map +0 -1
  663. package/dist/form-sizing-QP8aIRaW.js +0 -103
  664. package/dist/form-sizing-QP8aIRaW.js.map +0 -1
  665. package/dist/format-iamDSqs2.js +0 -110
  666. package/dist/format-iamDSqs2.js.map +0 -1
  667. package/dist/forms-B5NCbkSC.js.map +0 -1
  668. package/dist/forms-numeric-Crrm80Lm.js +0 -867
  669. package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
  670. package/dist/header-kxruN3RM.js.map +0 -1
  671. package/dist/icon-badge-Btc6pQrp.js +0 -53
  672. package/dist/icon-badge-Btc6pQrp.js.map +0 -1
  673. package/dist/input-SX9V0AL3.js +0 -255
  674. package/dist/input-SX9V0AL3.js.map +0 -1
  675. package/dist/item-DE4YnuJx.js +0 -258
  676. package/dist/item-DE4YnuJx.js.map +0 -1
  677. package/dist/media-gallery-DLp3HAz0.js +0 -201
  678. package/dist/media-gallery-DLp3HAz0.js.map +0 -1
  679. package/dist/mentions-Cl0Kt_Pd.js +0 -565
  680. package/dist/mentions-Cl0Kt_Pd.js.map +0 -1
  681. package/dist/navigation-DnQSNMT0.js +0 -276
  682. package/dist/navigation-DnQSNMT0.js.map +0 -1
  683. package/dist/navigation-DyytsLRB.js +0 -265
  684. package/dist/navigation-DyytsLRB.js.map +0 -1
  685. package/dist/number-DasMFWEG.js +0 -269
  686. package/dist/number-DasMFWEG.js.map +0 -1
  687. package/dist/overlay.recipes-BxW5FIfK.js +0 -6
  688. package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
  689. package/dist/overlays-DUbs1KEi.js +0 -1011
  690. package/dist/overlays-DUbs1KEi.js.map +0 -1
  691. package/dist/page-hGmT4nWK.js.map +0 -1
  692. package/dist/page-header-D8nERkn5.js +0 -112
  693. package/dist/page-header-D8nERkn5.js.map +0 -1
  694. package/dist/popover-CghIYdQf.js.map +0 -1
  695. package/dist/primitives-C7ff0QaI.js +0 -337
  696. package/dist/primitives-C7ff0QaI.js.map +0 -1
  697. package/dist/progress-BroqrAyV.js.map +0 -1
  698. package/dist/rich-text-DlxDOtf4.js +0 -32
  699. package/dist/rich-text-DlxDOtf4.js.map +0 -1
  700. package/dist/rich-text-editor-BKyG7rWz.js +0 -574
  701. package/dist/rich-text-editor-BKyG7rWz.js.map +0 -1
  702. package/dist/rich-text-editor.recipes-B72Nfuze.js +0 -81
  703. package/dist/rich-text-editor.recipes-B72Nfuze.js.map +0 -1
  704. package/dist/rich-text-editor.strings-BpnIQgMl.js +0 -25
  705. package/dist/rich-text-editor.strings-BpnIQgMl.js.map +0 -1
  706. package/dist/sanitize-html-BG9FGe-j.js +0 -64
  707. package/dist/sanitize-html-BG9FGe-j.js.map +0 -1
  708. package/dist/scroll-area-D-pIhEKl.js +0 -47
  709. package/dist/scroll-area-D-pIhEKl.js.map +0 -1
  710. package/dist/separator-BNIgG3au.js.map +0 -1
  711. package/dist/settings-DOTOzeZ2.js +0 -161
  712. package/dist/settings-DOTOzeZ2.js.map +0 -1
  713. package/dist/sheet-BFhrNehm.js +0 -205
  714. package/dist/sheet-BFhrNehm.js.map +0 -1
  715. package/dist/sidebar-CyR4XKwR.js.map +0 -1
  716. package/dist/sidebar-SvGJ0Zwi.js +0 -506
  717. package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
  718. package/dist/skeleton-3F0uhYn3.js.map +0 -1
  719. package/dist/smart-card-DjGVV2xr.js +0 -584
  720. package/dist/smart-card-DjGVV2xr.js.map +0 -1
  721. package/dist/spinner-Cpf7oRkF.js.map +0 -1
  722. package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
  723. package/dist/surface-recipes-Dd__PD-w.js +0 -28
  724. package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
  725. package/dist/table-CLtJTxoR.js +0 -147
  726. package/dist/table-CLtJTxoR.js.map +0 -1
  727. package/dist/table-CcRDZiLP.js.map +0 -1
  728. package/dist/tabs-BNgu7g0u.js +0 -188
  729. package/dist/tabs-BNgu7g0u.js.map +0 -1
  730. package/dist/text-inputs-DsR56TR-.js.map +0 -1
  731. package/dist/text.styles-Q4sGAIgA.js.map +0 -1
  732. package/dist/timelines-D1pkt3se.js.map +0 -1
  733. package/dist/track-recipes-LLPNVwFg.js +0 -10
  734. package/dist/track-recipes-LLPNVwFg.js.map +0 -1
  735. package/dist/tree-BtmYyMZV.js.map +0 -1
  736. package/dist/typography-BxQgiZyw.js +0 -96
  737. package/dist/typography-BxQgiZyw.js.map +0 -1
  738. package/dist/ui-provider-DRPn3qNl.js.map +0 -1
  739. package/dist/upload-CDbYw1WN.js.map +0 -1
  740. package/dist/upload-queue-CNd_hH_a.js.map +0 -1
  741. package/dist/use-file-drop-target-BX7GnhoQ.js +0 -39
  742. package/dist/use-file-drop-target-BX7GnhoQ.js.map +0 -1
  743. package/dist/utils-BvH9PSmq.js.map +0 -1
  744. package/dist/value-inputs-D0KCrfVC.js +0 -840
  745. package/dist/value-inputs-D0KCrfVC.js.map +0 -1
  746. package/dist/workspace-CcR8r-Nt.js +0 -395
  747. package/dist/workspace-CcR8r-Nt.js.map +0 -1
  748. /package/dist/components/{blocks/data-display/metadata → base/metadata-list}/metadata-list.strings.d.ts +0 -0
@@ -0,0 +1,1204 @@
1
+ "use client";
2
+ import { interpolateString as e, useStrings as t } from "./lib/strings.js";
3
+ import { t as n } from "./utils-l5LpDw2z.js";
4
+ import { n as r } from "./buttons-SbIcm1HJ.js";
5
+ import { s as i } from "./typography-DTRkE9zL.js";
6
+ import { t as a } from "./structure-DC2dygdA.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-B-CkiEMU.js";
10
+ import { t as l } from "./number-DMhe-Vsk.js";
11
+ import { t as u } from "./input-DWhBBBww.js";
12
+ import { t as d } from "./form-field-DUt4UxSV.js";
13
+ import { n as ee, t as f } from "./rich-text-editor.recipes-CadiF_Uu.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 g, useImperativeHandle as ne, useMemo as _, useRef as v, useState as y } from "react";
16
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
17
+ import { AlertCircle as C, Bold as re, ImagePlus as ie, Italic as ae, List as oe, ListOrdered as se, Loader2 as ce, Quote as le, Redo2 as ue, Strikethrough as de, Undo2 as fe } from "lucide-react";
18
+ import * as w from "@tiptap/react";
19
+ import * as T from "@tiptap/starter-kit";
20
+ import { createPortal as pe } from "react-dom";
21
+ //#region src/components/features/rich-text-editor/partials/caret-helpers.ts
22
+ function me() {
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 he(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 = D(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 E(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 D(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 O({ 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__ */ S("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__ */ S(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__ */ x(l, {
128
+ value: o,
129
+ size: "xs",
130
+ type: u ? "error" : "secondary",
131
+ align: "left"
132
+ }),
133
+ typeof t == "number" && /* @__PURE__ */ S(b, { children: [" / ", /* @__PURE__ */ x(l, {
134
+ value: t,
135
+ size: "xs",
136
+ type: u ? "error" : "secondary",
137
+ align: "left"
138
+ })] }),
139
+ " ",
140
+ r.counts.characters
141
+ ]
142
+ }), /* @__PURE__ */ S(c, {
143
+ size: "xs",
144
+ className: "tabular-nums",
145
+ children: [
146
+ /* @__PURE__ */ x(l, {
147
+ value: s,
148
+ size: "xs",
149
+ type: "secondary",
150
+ align: "left"
151
+ }),
152
+ " ",
153
+ r.counts.words
154
+ ]
155
+ })]
156
+ });
157
+ }
158
+ O.displayName = "CountsFooterText";
159
+ function ge({ editor: e, sourceMode: t, sourceValue: n, maxLength: r, strings: i }) {
160
+ let a = t ? n.replace(/<[^>]*>/g, "") : e?.getText() ?? "";
161
+ return /* @__PURE__ */ x(O, {
162
+ text: a,
163
+ maxLength: r,
164
+ strings: i
165
+ });
166
+ }
167
+ ge.displayName = "CountsFooter";
168
+ //#endregion
169
+ //#region src/components/features/rich-text-editor/partials/html-helpers.ts
170
+ function k(e) {
171
+ let t = e.trim();
172
+ return t === "" || t === "<p></p>" || t === "<p><br></p>" ? "" : t;
173
+ }
174
+ function A(e) {
175
+ let t = k(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 j = "rsc-mention inline-reference--chip", M = "inlineReference";
181
+ function N(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 !== M) 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 P = null;
192
+ function _e() {
193
+ return P ??= w.Node.create({
194
+ name: M,
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
+ w.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 = j, 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: N("backward"),
249
+ Delete: N("forward")
250
+ };
251
+ }
252
+ }), P;
253
+ }
254
+ var F = "data-rte-upload", I = "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", ve = RegExp(`<span[^>]*\\b${F}="[^"]*"[^>]*>[\\s\\S]*?</span>`, "g");
255
+ function L(e) {
256
+ return e.includes("data-rte-upload") ? e.replace(ve, "") : e;
257
+ }
258
+ function R(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 z(e) {
263
+ return e.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").trim();
264
+ }
265
+ function ye(e) {
266
+ return Array.from(e?.files ?? []).filter((e) => e.type.startsWith("image/"));
267
+ }
268
+ var B = 0;
269
+ function be(t, n, r) {
270
+ let [i, a] = y([]), [s, c] = y(null), l = v(/* @__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 ?? z(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 = R(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
+ B += 1;
327
+ let c = `upload-${B}`;
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 V({ upload: t, strings: n, onRetry: o, onRemove: s }) {
350
+ let c = t.status === "error";
351
+ return /* @__PURE__ */ S(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__ */ x(C, {
360
+ className: "size-icon shrink-0 text-destructive",
361
+ "aria-hidden": "true"
362
+ }) : /* @__PURE__ */ x(ce, {
363
+ className: "size-icon shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none",
364
+ "aria-hidden": "true"
365
+ }),
366
+ /* @__PURE__ */ x(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__ */ x(r, {
375
+ type: "button",
376
+ size: "sm",
377
+ onClick: o,
378
+ children: n.retry
379
+ }),
380
+ /* @__PURE__ */ x(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 xe({ queue: e, adapterRef: t, strings: n }) {
391
+ return /* @__PURE__ */ x(b, { children: e.uploads.map((r) => {
392
+ let i = t.current?.findPlaceholder(r.id);
393
+ return i ? pe(/* @__PURE__ */ x(V, {
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 Se(e, t, n, r) {
402
+ let i = v(null), a = v(r);
403
+ a.current = r;
404
+ let o = !!e;
405
+ return {
406
+ item: _(() => o ? {
407
+ id: "insert-image",
408
+ icon: ie,
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__ */ x("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 Ce({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s, strings: c }) {
431
+ let l = g();
432
+ return e === null && !o ? null : /* @__PURE__ */ S(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__ */ S(a, {
436
+ direction: "horizontal",
437
+ align: "center",
438
+ gap: "sm",
439
+ children: [/* @__PURE__ */ x(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__ */ x(r, {
447
+ type: "button",
448
+ size: "sm",
449
+ buttonStyle: "ghost",
450
+ onClick: s,
451
+ children: c.remove
452
+ })]
453
+ }), e !== null && /* @__PURE__ */ x(d, {
454
+ label: c.descriptionLabel,
455
+ hint: c.descriptionHint,
456
+ htmlFor: l,
457
+ children: /* @__PURE__ */ x(b, { children: /* @__PURE__ */ S(a, {
458
+ direction: "horizontal",
459
+ align: "center",
460
+ gap: "sm",
461
+ wrap: !1,
462
+ children: [/* @__PURE__ */ x(u, {
463
+ id: l,
464
+ value: e,
465
+ className: "min-w-0 flex-1",
466
+ onChange: (e) => t(e.target.value)
467
+ }), /* @__PURE__ */ x(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 H(e) {
480
+ let t = Number(e);
481
+ return Number.isFinite(t) && t > 0 ? t : null;
482
+ }
483
+ var U = null, W = null;
484
+ function G() {
485
+ return U ??= w.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) => H(e.getAttribute("width"))
506
+ },
507
+ height: {
508
+ default: null,
509
+ parseHTML: (e) => H(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", w.mergeAttributes(e, { src: t ?? null })];
522
+ }
523
+ }), U;
524
+ }
525
+ function we() {
526
+ return W ??= w.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", { [F]: e.attrs.id }];
540
+ },
541
+ addNodeView() {
542
+ return ({ node: e }) => {
543
+ let t = document.createElement("span");
544
+ return t.setAttribute(F, String(e.attrs.id)), t.setAttribute("contenteditable", "false"), t.className = I, {
545
+ dom: t,
546
+ ignoreMutation: () => !0,
547
+ stopEvent: () => !0
548
+ };
549
+ };
550
+ }
551
+ }), W;
552
+ }
553
+ //#endregion
554
+ //#region src/components/features/rich-text-editor/partials/rich-text-editor-tiptap.tsx
555
+ function K(e) {
556
+ return k(L(e?.getHTML() ?? ""));
557
+ }
558
+ var Te = w.EditorContent, q = w.useEditor, J = "default" in T ? T.default : T, Ee = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, minHeight: c, maxHeight: l, disabled: u = !1, showCounts: d = !1, maxLength: p, extraToolbarItems: g, toolbarTrailing: b, footerSlot: C, hideSourceToggle: ie = !1, autoFocus: ce = !1, className: w, onCaretChange: T, strings: pe, images: E }, D) {
559
+ let O = t(te, pe), j = !!E, M = v(null), N = v(null), [P, F] = y(!1), [I, ve] = y(!1), [L, R] = y(""), z = v(!1), B = v(k(e)), V = v(T);
560
+ V.current = T;
561
+ let H = q({
562
+ extensions: _(() => [
563
+ J,
564
+ _e(),
565
+ ...j ? [G(), we()] : []
566
+ ], [j]),
567
+ content: A(e),
568
+ editable: !u,
569
+ immediatelyRender: !1,
570
+ autofocus: ce ? "end" : !1,
571
+ onFocus: () => {
572
+ z.current = !0, F(!0);
573
+ },
574
+ onBlur: () => {
575
+ z.current = !1, F(!1);
576
+ },
577
+ onUpdate: ({ editor: e }) => {
578
+ M.current?.prune();
579
+ let t = K(e);
580
+ z.current && (t !== B.current && (B.current = t, r(t)), V.current?.());
581
+ },
582
+ editorProps: {
583
+ handlePaste: (e, t) => {
584
+ let n = ye(t.clipboardData);
585
+ return !M.current || !U.current || n.length === 0 ? !1 : (M.current.addFiles(n), !0);
586
+ },
587
+ handleDrop: (e, t, n, r) => {
588
+ let i = ye(t.dataTransfer);
589
+ if (r || !M.current || !U.current || i.length === 0) return !1;
590
+ let a = e.posAtCoords({
591
+ left: t.clientX,
592
+ top: t.clientY
593
+ });
594
+ return a && N.current?.commands.setTextSelection(a.pos), M.current.addFiles(i), !0;
595
+ },
596
+ attributes: {
597
+ role: "textbox",
598
+ "aria-label": O.editorLabel,
599
+ "aria-multiline": "true",
600
+ class: s
601
+ }
602
+ }
603
+ }, [j]);
604
+ h(() => {
605
+ if (!H) return;
606
+ let t = K(H), n = k(e);
607
+ B.current = n, t !== n && H.commands.setContent(A(n), { emitUpdate: !1 });
608
+ }, [H, e]), h(() => {
609
+ H && H.setEditable(!u);
610
+ }, [u, H]), h(() => {
611
+ if (typeof document > "u") return;
612
+ let e = () => {
613
+ z.current && V.current?.();
614
+ };
615
+ return document.addEventListener("selectionchange", e), () => document.removeEventListener("selectionchange", e);
616
+ }, []), ne(D, () => ({
617
+ focus: () => {
618
+ H?.chain().focus().run();
619
+ },
620
+ getHTML: () => K(H),
621
+ setHTML: (e) => {
622
+ let t = k(e);
623
+ B.current = t, H?.commands.setContent(A(t), { emitUpdate: !1 }), r(t);
624
+ },
625
+ insertHTML: (e) => {
626
+ H && H.chain().focus().insertContent(e).run();
627
+ },
628
+ isEmpty: () => K(H) === "",
629
+ clear: () => {
630
+ B.current = "", H?.commands.setContent("<p></p>", { emitUpdate: !1 }), r("");
631
+ },
632
+ getCaretContext: () => me(),
633
+ replaceBeforeCaret: (e, t) => {
634
+ he(H, e, t, (e) => {
635
+ B.current = k(e), r(B.current);
636
+ });
637
+ }
638
+ }), [H, r]), N.current = H ?? null;
639
+ let U = v(E);
640
+ U.current = E;
641
+ let W = m(() => {
642
+ if (!H) return;
643
+ let e = K(H);
644
+ e !== B.current && (B.current = e, r(e));
645
+ }, [H, r]), Ee = m((e) => {
646
+ let t = null;
647
+ return H?.state.doc.descendants((n, r) => (!t && e(n) && (t = {
648
+ pos: r,
649
+ node: n
650
+ }), !t)), t;
651
+ }, [H]), Y = v(null);
652
+ Y.current = H ? {
653
+ insertPlaceholder: (e) => {
654
+ H.chain().focus().insertContent({
655
+ type: "imageUpload",
656
+ attrs: { id: e }
657
+ }).run();
658
+ },
659
+ findPlaceholder: (e) => H.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 = H.schema.nodes.image.create({
664
+ src: t.src,
665
+ alt: t.alt ?? "",
666
+ width: t.width ?? null,
667
+ height: t.height ?? null
668
+ });
669
+ H.view.dispatch(H.state.tr.replaceWith(n.pos, n.pos + n.node.nodeSize, r)), W();
670
+ },
671
+ removePlaceholder: (e) => {
672
+ let t = Ee((t) => t.type.name === "imageUpload" && t.attrs.id === e);
673
+ t && (H.view.dispatch(H.state.tr.delete(t.pos, t.pos + t.node.nodeSize)), W());
674
+ }
675
+ } : null;
676
+ let X = be(E, Y, O.images);
677
+ M.current = j ? X : null;
678
+ let De = Se(E, O.images, X.addFiles), Oe = _(() => De.item ? [De.item, ...g ?? []] : g, [g, De.item]), [Z, Q] = y(null);
679
+ h(() => {
680
+ if (!H || !j) return;
681
+ let e = () => {
682
+ let e = H.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
+ Q(t);
698
+ };
699
+ return H.on("selectionUpdate", e), H.on("update", e), () => {
700
+ H.off("selectionUpdate", e), H.off("update", e);
701
+ };
702
+ }, [H, j]);
703
+ let $ = _(() => ({
704
+ minHeight: c ?? (o ? "2rem" : "12rem"),
705
+ ...l ? {
706
+ maxHeight: l,
707
+ overflowY: "auto"
708
+ } : {}
709
+ }), [
710
+ o,
711
+ l,
712
+ c
713
+ ]), ke = m(() => {
714
+ if (H) {
715
+ if (I) {
716
+ let e = A(L);
717
+ H.commands.setContent(e, { emitUpdate: !1 });
718
+ let t = k(L);
719
+ B.current = t, r(t), ve(!1);
720
+ } else R(H.getHTML()), ve(!0);
721
+ }
722
+ }, [
723
+ H,
724
+ r,
725
+ I,
726
+ L
727
+ ]), Ae = m((e) => {
728
+ let t = e.target.value;
729
+ R(t);
730
+ let n = k(t);
731
+ B.current = n, r(n);
732
+ }, [r]), je = _(() => [
733
+ {
734
+ id: "bold",
735
+ icon: re,
736
+ label: O.toolbar.bold,
737
+ isActive: () => !!H?.isActive("bold"),
738
+ toggle: !0,
739
+ run: () => H?.chain().focus().toggleBold().run()
740
+ },
741
+ {
742
+ id: "italic",
743
+ icon: ae,
744
+ label: O.toolbar.italic,
745
+ isActive: () => !!H?.isActive("italic"),
746
+ toggle: !0,
747
+ run: () => H?.chain().focus().toggleItalic().run()
748
+ },
749
+ {
750
+ id: "strike",
751
+ icon: de,
752
+ label: O.toolbar.strike,
753
+ isActive: () => !!H?.isActive("strike"),
754
+ toggle: !0,
755
+ run: () => H?.chain().focus().toggleStrike().run()
756
+ },
757
+ {
758
+ id: "bullet-list",
759
+ icon: oe,
760
+ label: O.toolbar.bulletList,
761
+ isActive: () => !!H?.isActive("bulletList"),
762
+ toggle: !0,
763
+ run: () => H?.chain().focus().toggleBulletList().run()
764
+ },
765
+ {
766
+ id: "ordered-list",
767
+ icon: se,
768
+ label: O.toolbar.orderedList,
769
+ isActive: () => !!H?.isActive("orderedList"),
770
+ toggle: !0,
771
+ run: () => H?.chain().focus().toggleOrderedList().run()
772
+ },
773
+ {
774
+ id: "blockquote",
775
+ icon: le,
776
+ label: O.toolbar.blockquote,
777
+ isActive: () => !!H?.isActive("blockquote"),
778
+ toggle: !0,
779
+ run: () => H?.chain().focus().toggleBlockquote().run()
780
+ },
781
+ {
782
+ id: "undo",
783
+ icon: fe,
784
+ label: O.toolbar.undo,
785
+ isActive: () => !1,
786
+ run: () => H?.chain().focus().undo().run(),
787
+ disabled: !H?.can().chain().focus().undo().run()
788
+ },
789
+ {
790
+ id: "redo",
791
+ icon: ue,
792
+ label: O.toolbar.redo,
793
+ isActive: () => !1,
794
+ run: () => H?.chain().focus().redo().run(),
795
+ disabled: !H?.can().chain().focus().redo().run()
796
+ }
797
+ ], [H, O]), Me = d && H ? /* @__PURE__ */ x(ge, {
798
+ editor: H,
799
+ sourceMode: I,
800
+ sourceValue: L,
801
+ maxLength: p,
802
+ strings: O
803
+ }) : null, Ne = typeof a == "string" ? a : "", Pe = Ne.length > 0 && !P && H?.isEmpty ? /* @__PURE__ */ x(i, {
804
+ tag: "span",
805
+ size: "sm",
806
+ type: "secondary",
807
+ className: "pointer-events-none absolute inset-0 px-control py-control-y-offset",
808
+ children: Ne
809
+ }) : null;
810
+ return /* @__PURE__ */ S("div", {
811
+ className: n(f.frame, u && f.disabled, w),
812
+ children: [
813
+ /* @__PURE__ */ x(ee, {
814
+ buttons: je,
815
+ extraToolbarItems: Oe,
816
+ hideSourceToggle: ie,
817
+ sourceMode: I,
818
+ toggleSourceMode: ke,
819
+ disabled: u,
820
+ hasEditor: !!H,
821
+ toolbarTrailing: b,
822
+ strings: O
823
+ }),
824
+ I ? /* @__PURE__ */ x("textarea", {
825
+ "aria-label": O.sourceLabel,
826
+ value: L,
827
+ onChange: Ae,
828
+ disabled: u,
829
+ spellCheck: !1,
830
+ className: n(f.source, u && "cursor-not-allowed"),
831
+ style: $
832
+ }) : /* @__PURE__ */ S("div", {
833
+ className: "relative",
834
+ style: $,
835
+ children: [Pe, /* @__PURE__ */ x(Te, {
836
+ editor: H,
837
+ className: f.content
838
+ })]
839
+ }),
840
+ j && /* @__PURE__ */ x(Ce, {
841
+ alt: Z ? Z.alt : null,
842
+ onAltChange: (e) => {
843
+ if (!H || !Z) return;
844
+ let t = H.state.doc.nodeAt(Z.pos);
845
+ t?.type.name === "image" && (H.view.dispatch(H.state.tr.setNodeMarkup(Z.pos, void 0, {
846
+ ...t.attrs,
847
+ alt: e
848
+ })), Q({
849
+ ...Z,
850
+ alt: e
851
+ }), W());
852
+ },
853
+ onRemove: () => {
854
+ if (!H || !Z) return;
855
+ let e = H.state.doc.nodeAt(Z.pos);
856
+ e?.type.name === "image" && (H.view.dispatch(H.state.tr.delete(Z.pos, Z.pos + e.nodeSize)), Q(null), W(), H.commands.focus());
857
+ },
858
+ notice: X.notice,
859
+ onDismissNotice: X.dismissNotice,
860
+ strings: O.images
861
+ }),
862
+ !!C && /* @__PURE__ */ x("div", {
863
+ className: "px-control pb-space-md pt-space-xs",
864
+ children: C
865
+ }),
866
+ Me,
867
+ De.input,
868
+ j && /* @__PURE__ */ x(xe, {
869
+ queue: X,
870
+ adapterRef: Y,
871
+ strings: O.images
872
+ })
873
+ ]
874
+ });
875
+ });
876
+ Ee.displayName = "TiptapRichTextEditor";
877
+ var Y = ((e) => typeof e == "function" || typeof e == "object" && !!e && "$$typeof" in e)(Te) && typeof q == "function" && typeof J == "object" && !!J;
878
+ //#endregion
879
+ //#region src/components/features/rich-text-editor/partials/rich-text-editor-fallback.tsx
880
+ function X(e) {
881
+ if (!e) return "";
882
+ if (!e.querySelector("[data-rte-upload]")) return e.innerHTML;
883
+ let t = e.cloneNode(!0);
884
+ for (let e of Array.from(t.querySelectorAll(`[${F}]`))) e.remove();
885
+ return t.innerHTML;
886
+ }
887
+ function De(e) {
888
+ for (let t of Array.from(e.querySelectorAll("img"))) o(t.getAttribute("src")) || t.remove();
889
+ }
890
+ function Oe(e) {
891
+ let t = window.getSelection();
892
+ if (!t || t.rangeCount === 0) return null;
893
+ let n = t.getRangeAt(0);
894
+ if (!e.contains(n.commonAncestorContainer)) return null;
895
+ for (let t of Array.from(e.querySelectorAll("img"))) if (n.intersectsNode(t) && !n.collapsed) return t;
896
+ if (!n.collapsed) return null;
897
+ let { startContainer: r, startOffset: i } = n;
898
+ 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;
899
+ }
900
+ function Z(e, t) {
901
+ let n = document, r = n.caretRangeFromPoint?.(e, t) ?? null;
902
+ if (!r) {
903
+ let i = n.caretPositionFromPoint?.(e, t);
904
+ i && (r = document.createRange(), r.setStart(i.offsetNode, i.offset));
905
+ }
906
+ if (!r) return;
907
+ r.collapse(!0);
908
+ let i = window.getSelection();
909
+ i?.removeAllRanges(), i?.addRange(r);
910
+ }
911
+ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, minHeight: c, maxHeight: l, disabled: u = !1, showCounts: d = !1, maxLength: p, extraToolbarItems: g, toolbarTrailing: b, footerSlot: C, hideSourceToggle: ie = !1, autoFocus: ce = !1, className: w, onCaretChange: T, strings: pe, images: D }, ge) {
912
+ let j = t(te, pe), M = v(null), N = v(null), [P, _e] = y(null), [ve, L] = y(""), [R, z] = y(!1), [B, V] = y(!1), [H, U] = y(""), W = v(k(e)), G = v(T);
913
+ G.current = T;
914
+ let we = m((e) => {
915
+ M.current = e, e && e.innerHTML === "" && (e.innerHTML = A(W.current));
916
+ }, []);
917
+ h(() => {
918
+ let t = M.current;
919
+ if (!t || R) return;
920
+ let n = A(e);
921
+ k(X(t)) !== k(n) && (t.innerHTML = n), W.current = k(e);
922
+ }, [R, e]), h(() => {
923
+ ce && M.current?.focus();
924
+ }, [ce]);
925
+ let K = m(() => {
926
+ let e = M.current, t = k(X(e));
927
+ W.current = t, r(t), G.current?.();
928
+ }, [r]), Te = v(null);
929
+ Te.current = {
930
+ insertPlaceholder: (e) => {
931
+ let t = M.current;
932
+ if (!t) return;
933
+ let n = N.current;
934
+ if (n && t.contains(n.commonAncestorContainer) && !t.contains(document.activeElement)) {
935
+ t.focus();
936
+ let e = window.getSelection();
937
+ e?.removeAllRanges(), e?.addRange(n);
938
+ }
939
+ E(t, `<span ${F}="${e}" contenteditable="false" class="${I}"></span>`);
940
+ },
941
+ findPlaceholder: (e) => M.current?.querySelector(`[data-rte-upload="${e}"]`) ?? null,
942
+ resolvePlaceholder: (e, t) => {
943
+ let n = M.current?.querySelector(`[${F}="${e}"]`);
944
+ if (!n) return;
945
+ let r = document.createElement("img");
946
+ 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();
947
+ },
948
+ removePlaceholder: (e) => {
949
+ M.current?.querySelector(`[${F}="${e}"]`)?.remove(), K();
950
+ }
951
+ };
952
+ let q = be(D, Te, j.images), J = Se(D, j.images, q.addFiles, () => {
953
+ let e = window.getSelection(), t = e && e.rangeCount > 0 ? e.getRangeAt(0) : null;
954
+ N.current = t && M.current?.contains(t.commonAncestorContainer) ? t.cloneRange() : null;
955
+ }), Ee = _(() => J.item ? [J.item, ...g ?? []] : g, [g, J.item]), Y = m(() => {
956
+ let e = M.current;
957
+ if (!D || !e) return;
958
+ let t = window.getSelection();
959
+ if (t && t.rangeCount > 0 && !e.contains(t.getRangeAt(0).commonAncestorContainer)) return;
960
+ let n = Oe(e);
961
+ _e(n), L(n?.getAttribute("alt") ?? "");
962
+ }, [D]);
963
+ h(() => {
964
+ if (D && typeof document < "u") return document.addEventListener("selectionchange", Y), () => document.removeEventListener("selectionchange", Y);
965
+ }, [D, Y]);
966
+ let Q = m(() => {
967
+ let e = M.current;
968
+ D && e && (De(e), q.prune(), P && !P.isConnected && _e(null)), K();
969
+ }, [
970
+ P,
971
+ K,
972
+ D,
973
+ q
974
+ ]);
975
+ ne(ge, () => ({
976
+ focus: () => M.current?.focus(),
977
+ getHTML: () => k(X(M.current)),
978
+ setHTML: (e) => {
979
+ let t = k(e);
980
+ W.current = t, M.current && (M.current.innerHTML = A(t)), r(t);
981
+ },
982
+ insertHTML: (e) => {
983
+ E(M.current, e), K();
984
+ },
985
+ isEmpty: () => k(X(M.current)) === "",
986
+ clear: () => {
987
+ W.current = "", M.current && (M.current.innerHTML = "<p></p>"), r("");
988
+ },
989
+ getCaretContext: () => me(),
990
+ replaceBeforeCaret: (e, t) => {
991
+ he(null, e, t, () => K());
992
+ }
993
+ }), [K, r]);
994
+ let $ = _(() => ({
995
+ minHeight: c ?? (o ? "2rem" : "12rem"),
996
+ ...l ? {
997
+ maxHeight: l,
998
+ overflowY: "auto"
999
+ } : {}
1000
+ }), [
1001
+ o,
1002
+ l,
1003
+ c
1004
+ ]), ke = m(() => {
1005
+ if (B) {
1006
+ let e = k(H);
1007
+ W.current = e, M.current && (M.current.innerHTML = A(e)), r(e), V(!1);
1008
+ return;
1009
+ }
1010
+ U(M.current?.innerHTML ?? A(e)), V(!0);
1011
+ }, [
1012
+ r,
1013
+ B,
1014
+ H,
1015
+ e
1016
+ ]), Ae = m((e) => {
1017
+ let t = e.target.value;
1018
+ U(t);
1019
+ let n = k(t);
1020
+ W.current = n, r(n);
1021
+ }, [r]), je = typeof a == "string" ? a : "", Me = k(W.current) === "" && q.uploads.length === 0, Ne = je.length > 0 && !R && Me ? /* @__PURE__ */ x(i, {
1022
+ tag: "span",
1023
+ size: "sm",
1024
+ type: "secondary",
1025
+ className: "pointer-events-none absolute inset-0 px-control py-control-y-offset",
1026
+ children: je
1027
+ }) : null, Pe = _(() => [
1028
+ {
1029
+ id: "bold",
1030
+ toggle: !0,
1031
+ icon: re,
1032
+ label: j.toolbar.bold,
1033
+ isActive: () => !1,
1034
+ run: () => void 0,
1035
+ disabled: !0
1036
+ },
1037
+ {
1038
+ id: "italic",
1039
+ toggle: !0,
1040
+ icon: ae,
1041
+ label: j.toolbar.italic,
1042
+ isActive: () => !1,
1043
+ run: () => void 0,
1044
+ disabled: !0
1045
+ },
1046
+ {
1047
+ id: "strike",
1048
+ toggle: !0,
1049
+ icon: de,
1050
+ label: j.toolbar.strike,
1051
+ isActive: () => !1,
1052
+ run: () => void 0,
1053
+ disabled: !0
1054
+ },
1055
+ {
1056
+ id: "bullet-list",
1057
+ toggle: !0,
1058
+ icon: oe,
1059
+ label: j.toolbar.bulletList,
1060
+ isActive: () => !1,
1061
+ run: () => void 0,
1062
+ disabled: !0
1063
+ },
1064
+ {
1065
+ id: "ordered-list",
1066
+ toggle: !0,
1067
+ icon: se,
1068
+ label: j.toolbar.orderedList,
1069
+ isActive: () => !1,
1070
+ run: () => void 0,
1071
+ disabled: !0
1072
+ },
1073
+ {
1074
+ id: "blockquote",
1075
+ toggle: !0,
1076
+ icon: le,
1077
+ label: j.toolbar.blockquote,
1078
+ isActive: () => !1,
1079
+ run: () => void 0,
1080
+ disabled: !0
1081
+ },
1082
+ {
1083
+ id: "undo",
1084
+ icon: fe,
1085
+ label: j.toolbar.undo,
1086
+ isActive: () => !1,
1087
+ run: () => void 0,
1088
+ disabled: !0
1089
+ },
1090
+ {
1091
+ id: "redo",
1092
+ icon: ue,
1093
+ label: j.toolbar.redo,
1094
+ isActive: () => !1,
1095
+ run: () => void 0,
1096
+ disabled: !0
1097
+ }
1098
+ ], [j]), Fe = B ? H.replace(/<[^>]*>/g, "") : M.current?.innerText ?? k(e).replace(/<[^>]*>/g, ""), Ie = d ? /* @__PURE__ */ x(O, {
1099
+ text: Fe,
1100
+ maxLength: p,
1101
+ strings: j
1102
+ }) : null;
1103
+ return /* @__PURE__ */ S("div", {
1104
+ className: n(f.frame, u && f.disabled, w),
1105
+ children: [
1106
+ /* @__PURE__ */ x(ee, {
1107
+ buttons: Pe,
1108
+ extraToolbarItems: Ee,
1109
+ hideSourceToggle: ie,
1110
+ sourceMode: B,
1111
+ toggleSourceMode: ke,
1112
+ disabled: u,
1113
+ hasEditor: !0,
1114
+ toolbarTrailing: b,
1115
+ strings: j
1116
+ }),
1117
+ B ? /* @__PURE__ */ x("textarea", {
1118
+ "aria-label": j.sourceLabel,
1119
+ value: H,
1120
+ onChange: Ae,
1121
+ disabled: u,
1122
+ spellCheck: !1,
1123
+ className: n(f.source, u && "cursor-not-allowed"),
1124
+ style: $
1125
+ }) : /* @__PURE__ */ S("div", {
1126
+ className: "relative",
1127
+ style: $,
1128
+ children: [Ne, /* @__PURE__ */ x("div", {
1129
+ ref: we,
1130
+ role: "textbox",
1131
+ "aria-label": j.editorLabel,
1132
+ "aria-multiline": "true",
1133
+ contentEditable: !u,
1134
+ suppressContentEditableWarning: !0,
1135
+ onInput: Q,
1136
+ onKeyUp: () => G.current?.(),
1137
+ onMouseUp: () => G.current?.(),
1138
+ onClick: D ? (e) => {
1139
+ if (!(e.target instanceof HTMLImageElement)) return;
1140
+ let t = document.createRange();
1141
+ t.selectNode(e.target);
1142
+ let n = window.getSelection();
1143
+ n?.removeAllRanges(), n?.addRange(t);
1144
+ } : void 0,
1145
+ onPaste: D ? (e) => {
1146
+ let t = ye(e.clipboardData);
1147
+ t.length !== 0 && (e.preventDefault(), q.addFiles(t));
1148
+ } : void 0,
1149
+ onDragOver: D ? (e) => {
1150
+ Array.from(e.dataTransfer.types).includes("Files") && e.preventDefault();
1151
+ } : void 0,
1152
+ onDrop: D ? (e) => {
1153
+ let t = ye(e.dataTransfer);
1154
+ t.length !== 0 && (e.preventDefault(), M.current?.focus(), Z(e.clientX, e.clientY), q.addFiles(t));
1155
+ } : void 0,
1156
+ onFocus: () => z(!0),
1157
+ onBlur: () => z(!1),
1158
+ className: n(s, "h-full min-h-full", u && "cursor-not-allowed")
1159
+ })]
1160
+ }),
1161
+ !!D && /* @__PURE__ */ x(Ce, {
1162
+ alt: P ? ve : null,
1163
+ onAltChange: (e) => {
1164
+ L(e), P?.setAttribute("alt", e), K();
1165
+ },
1166
+ onRemove: () => {
1167
+ P?.remove(), _e(null), K(), M.current?.focus();
1168
+ },
1169
+ notice: q.notice,
1170
+ onDismissNotice: q.dismissNotice,
1171
+ strings: j.images
1172
+ }),
1173
+ !!C && /* @__PURE__ */ x("div", {
1174
+ className: "px-control pb-space-md pt-space-xs",
1175
+ children: C
1176
+ }),
1177
+ Ie,
1178
+ J.input,
1179
+ /* @__PURE__ */ x(xe, {
1180
+ queue: q,
1181
+ adapterRef: Te,
1182
+ strings: j.images
1183
+ })
1184
+ ]
1185
+ });
1186
+ });
1187
+ Q.displayName = "FallbackRichTextEditor";
1188
+ //#endregion
1189
+ //#region src/components/features/rich-text-editor/rich-text-editor.tsx
1190
+ var $ = p(function(e, t) {
1191
+ return Y ? /* @__PURE__ */ x(Ee, {
1192
+ ...e,
1193
+ ref: t
1194
+ }) : /* @__PURE__ */ x(Q, {
1195
+ className: "rich-text-editor--component",
1196
+ ...e,
1197
+ ref: t
1198
+ });
1199
+ });
1200
+ $.displayName = "RichTextEditor";
1201
+ //#endregion
1202
+ export { O as n, $ as t };
1203
+
1204
+ //# sourceMappingURL=rich-text-editor-sMU_Scqm.js.map