@devalok/shilp-sutra 0.17.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/dist/_chunks/avatar.js +21 -19
  2. package/dist/_chunks/button-group.js +27 -0
  3. package/dist/_chunks/button.js +53 -35
  4. package/dist/_chunks/card.js +50 -0
  5. package/dist/_chunks/checkbox.js +11 -9
  6. package/dist/_chunks/date-utils.js +13 -0
  7. package/dist/_chunks/form.js +20 -20
  8. package/dist/_chunks/link-context.js +19 -0
  9. package/dist/_chunks/motion.js +1376 -0
  10. package/dist/_chunks/motion2.js +35 -0
  11. package/dist/_chunks/primitives.js +3499 -3920
  12. package/dist/_chunks/sidebar.js +225 -211
  13. package/dist/_chunks/spinner.js +58 -28
  14. package/dist/_chunks/tiptap.js +1 -1
  15. package/dist/_chunks/tooltip.js +27 -10
  16. package/dist/_chunks/tree-view.js +180 -178
  17. package/dist/_chunks/use-calendar.js +531 -515
  18. package/dist/_chunks/utils.js +3 -3
  19. package/dist/_chunks/vendor-client.js +1792 -1049
  20. package/dist/_chunks/vendor-utils.js +5123 -1169
  21. package/dist/composed/activity-feed.d.ts.map +1 -1
  22. package/dist/composed/activity-feed.js +71 -74
  23. package/dist/composed/avatar-group.js +36 -36
  24. package/dist/composed/command-palette.d.ts +1 -1
  25. package/dist/composed/command-palette.d.ts.map +1 -1
  26. package/dist/composed/command-palette.js +207 -158
  27. package/dist/composed/confirm-dialog.d.ts +3 -5
  28. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  29. package/dist/composed/confirm-dialog.js +46 -41
  30. package/dist/composed/content-card.d.ts +1 -1
  31. package/dist/composed/content-card.js +29 -29
  32. package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
  33. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  34. package/dist/composed/date-picker/date-picker.d.ts +1 -1
  35. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  36. package/dist/composed/date-picker/date-range-picker.d.ts +1 -1
  37. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  38. package/dist/composed/date-picker/date-time-picker.d.ts +1 -1
  39. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  40. package/dist/composed/date-picker/month-picker.d.ts +1 -1
  41. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  42. package/dist/composed/date-picker/presets.d.ts +1 -1
  43. package/dist/composed/date-picker/presets.d.ts.map +1 -1
  44. package/dist/composed/date-picker/time-picker.d.ts +1 -1
  45. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  46. package/dist/composed/date-picker/year-picker.d.ts +1 -1
  47. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  48. package/dist/composed/empty-state.d.ts +1 -0
  49. package/dist/composed/empty-state.d.ts.map +1 -1
  50. package/dist/composed/empty-state.js +51 -47
  51. package/dist/composed/error-boundary.d.ts +1 -1
  52. package/dist/composed/error-boundary.d.ts.map +1 -1
  53. package/dist/composed/error-boundary.js +48 -48
  54. package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
  55. package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
  56. package/dist/composed/global-loading.d.ts +1 -1
  57. package/dist/composed/global-loading.d.ts.map +1 -1
  58. package/dist/composed/global-loading.js +23 -20
  59. package/dist/composed/index.d.ts +2 -4
  60. package/dist/composed/index.d.ts.map +1 -1
  61. package/dist/composed/index.js +26 -29
  62. package/dist/composed/loading-skeleton.d.ts +1 -1
  63. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  64. package/dist/composed/loading-skeleton.js +92 -87
  65. package/dist/composed/member-picker.d.ts +1 -1
  66. package/dist/composed/member-picker.d.ts.map +1 -1
  67. package/dist/composed/member-picker.js +47 -43
  68. package/dist/composed/page-header.js +36 -36
  69. package/dist/composed/page-skeletons.d.ts +9 -3
  70. package/dist/composed/page-skeletons.d.ts.map +1 -1
  71. package/dist/composed/page-skeletons.js +58 -58
  72. package/dist/composed/priority-indicator.js +19 -19
  73. package/dist/composed/rich-text-editor.d.ts +3 -3
  74. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  75. package/dist/composed/rich-text-editor.js +316 -309
  76. package/dist/composed/schedule-view.js +88 -88
  77. package/dist/composed/simple-tooltip.d.ts +2 -5
  78. package/dist/composed/simple-tooltip.d.ts.map +1 -1
  79. package/dist/composed/simple-tooltip.js +19 -14
  80. package/dist/composed/status-badge.d.ts +2 -1
  81. package/dist/composed/status-badge.d.ts.map +1 -1
  82. package/dist/composed/status-badge.js +76 -63
  83. package/dist/hooks/index.d.ts +2 -1
  84. package/dist/hooks/index.d.ts.map +1 -1
  85. package/dist/hooks/index.js +3 -4
  86. package/dist/hooks/use-toast.d.ts +15 -45
  87. package/dist/hooks/use-toast.d.ts.map +1 -1
  88. package/dist/hooks/use-toast.js +2 -95
  89. package/dist/motion/index.d.ts +4 -0
  90. package/dist/motion/index.d.ts.map +1 -0
  91. package/dist/motion/index.js +10 -0
  92. package/dist/motion/motion-provider.d.ts +18 -0
  93. package/dist/motion/motion-provider.d.ts.map +1 -0
  94. package/dist/motion/motion-provider.js +24 -0
  95. package/dist/motion/primitives-index.d.ts +3 -0
  96. package/dist/motion/primitives-index.d.ts.map +1 -0
  97. package/dist/motion/primitives-index.js +11 -0
  98. package/dist/motion/primitives.d.ts +38 -0
  99. package/dist/motion/primitives.d.ts.map +1 -0
  100. package/dist/motion/primitives.js +187 -0
  101. package/dist/shell/app-command-palette.d.ts +14 -5
  102. package/dist/shell/app-command-palette.d.ts.map +1 -1
  103. package/dist/shell/app-command-palette.js +152 -130
  104. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  105. package/dist/shell/bottom-navbar.js +90 -92
  106. package/dist/shell/command-registry.d.ts +23 -0
  107. package/dist/shell/command-registry.d.ts.map +1 -0
  108. package/dist/shell/command-registry.js +18 -0
  109. package/dist/shell/index.d.ts +2 -1
  110. package/dist/shell/index.d.ts.map +1 -1
  111. package/dist/shell/index.js +14 -11
  112. package/dist/shell/link-context.d.ts +6 -10
  113. package/dist/shell/link-context.d.ts.map +1 -1
  114. package/dist/shell/link-context.js +3 -16
  115. package/dist/shell/notification-center.d.ts.map +1 -1
  116. package/dist/shell/notification-center.js +137 -132
  117. package/dist/shell/notification-preferences.d.ts +10 -5
  118. package/dist/shell/notification-preferences.d.ts.map +1 -1
  119. package/dist/shell/notification-preferences.js +168 -165
  120. package/dist/shell/sidebar.js +119 -119
  121. package/dist/shell/top-bar.js +65 -65
  122. package/dist/tailwind/index.cjs +118 -297
  123. package/dist/tailwind/preset.d.ts.map +1 -1
  124. package/dist/tailwind/preset.js +118 -297
  125. package/dist/tokens/generate-scale.d.ts +86 -0
  126. package/dist/tokens/generate-scale.d.ts.map +1 -0
  127. package/dist/tokens/primitives.css +415 -187
  128. package/dist/tokens/semantic.css +244 -270
  129. package/dist/tokens/typography.css +6 -6
  130. package/dist/ui/accordion.d.ts.map +1 -1
  131. package/dist/ui/accordion.js +32 -22
  132. package/dist/ui/alert-dialog.d.ts +4 -1
  133. package/dist/ui/alert-dialog.d.ts.map +1 -1
  134. package/dist/ui/alert-dialog.js +114 -73
  135. package/dist/ui/alert.d.ts +6 -1
  136. package/dist/ui/alert.d.ts.map +1 -1
  137. package/dist/ui/alert.js +64 -49
  138. package/dist/ui/aspect-ratio.d.ts +2 -1
  139. package/dist/ui/aspect-ratio.d.ts.map +1 -1
  140. package/dist/ui/aspect-ratio.js +14 -4
  141. package/dist/ui/autocomplete.d.ts +11 -2
  142. package/dist/ui/autocomplete.d.ts.map +1 -1
  143. package/dist/ui/autocomplete.js +82 -57
  144. package/dist/ui/avatar.d.ts.map +1 -1
  145. package/dist/ui/avatar.js +45 -34
  146. package/dist/ui/badge.d.ts +1 -1
  147. package/dist/ui/badge.d.ts.map +1 -1
  148. package/dist/ui/badge.js +70 -65
  149. package/dist/ui/banner.d.ts.map +1 -1
  150. package/dist/ui/banner.js +53 -39
  151. package/dist/ui/breadcrumb.d.ts +2 -0
  152. package/dist/ui/breadcrumb.d.ts.map +1 -1
  153. package/dist/ui/breadcrumb.js +21 -21
  154. package/dist/ui/button.d.ts +10 -1
  155. package/dist/ui/button.d.ts.map +1 -1
  156. package/dist/ui/button.js +103 -67
  157. package/dist/ui/card.d.ts +2 -2
  158. package/dist/ui/card.d.ts.map +1 -1
  159. package/dist/ui/card.js +61 -53
  160. package/dist/ui/charts/_internal/animation.d.ts +1 -1
  161. package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
  162. package/dist/ui/charts/area-chart.d.ts +3 -5
  163. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  164. package/dist/ui/charts/bar-chart.d.ts +3 -5
  165. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  166. package/dist/ui/charts/chart-container.d.ts +2 -5
  167. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  168. package/dist/ui/charts/gauge-chart.d.ts +3 -5
  169. package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
  170. package/dist/ui/charts/index.js +1204 -1095
  171. package/dist/ui/charts/line-chart.d.ts +3 -5
  172. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  173. package/dist/ui/charts/pie-chart.d.ts +2 -5
  174. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  175. package/dist/ui/charts/radar-chart.d.ts +3 -5
  176. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  177. package/dist/ui/charts/sparkline.d.ts +5 -5
  178. package/dist/ui/charts/sparkline.d.ts.map +1 -1
  179. package/dist/ui/checkbox.d.ts.map +1 -1
  180. package/dist/ui/checkbox.js +31 -19
  181. package/dist/ui/chip.d.ts +3 -2
  182. package/dist/ui/chip.d.ts.map +1 -1
  183. package/dist/ui/chip.js +62 -54
  184. package/dist/ui/code.js +16 -16
  185. package/dist/ui/collapsible.d.ts.map +1 -1
  186. package/dist/ui/collapsible.js +23 -15
  187. package/dist/ui/color-input.d.ts +1 -1
  188. package/dist/ui/color-input.d.ts.map +1 -1
  189. package/dist/ui/color-input.js +27 -27
  190. package/dist/ui/combobox.d.ts +2 -0
  191. package/dist/ui/combobox.d.ts.map +1 -1
  192. package/dist/ui/combobox.js +177 -166
  193. package/dist/ui/context-menu.d.ts +4 -2
  194. package/dist/ui/context-menu.d.ts.map +1 -1
  195. package/dist/ui/context-menu.js +146 -86
  196. package/dist/ui/data-table-toolbar.d.ts +3 -2
  197. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  198. package/dist/ui/data-table-toolbar.js +61 -59
  199. package/dist/ui/data-table.d.ts.map +1 -1
  200. package/dist/ui/data-table.js +289 -254
  201. package/dist/ui/dialog.d.ts +3 -1
  202. package/dist/ui/dialog.d.ts.map +1 -1
  203. package/dist/ui/dialog.js +114 -74
  204. package/dist/ui/dropdown-menu.d.ts +5 -3
  205. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  206. package/dist/ui/dropdown-menu.js +150 -89
  207. package/dist/ui/file-upload.d.ts.map +1 -1
  208. package/dist/ui/file-upload.js +169 -127
  209. package/dist/ui/form.d.ts.map +1 -1
  210. package/dist/ui/form.js +29 -26
  211. package/dist/ui/hover-card.d.ts +1 -1
  212. package/dist/ui/hover-card.d.ts.map +1 -1
  213. package/dist/ui/hover-card.js +53 -21
  214. package/dist/ui/index.d.ts +18 -18
  215. package/dist/ui/index.d.ts.map +1 -1
  216. package/dist/ui/index.js +432 -449
  217. package/dist/ui/input-otp.d.ts +2 -0
  218. package/dist/ui/input-otp.d.ts.map +1 -1
  219. package/dist/ui/input-otp.js +7 -7
  220. package/dist/ui/input.d.ts.map +1 -1
  221. package/dist/ui/input.js +36 -34
  222. package/dist/ui/label.js +12 -12
  223. package/dist/ui/lib/date-utils.d.ts +6 -0
  224. package/dist/ui/lib/date-utils.d.ts.map +1 -0
  225. package/dist/ui/lib/index.d.ts +7 -0
  226. package/dist/ui/lib/index.d.ts.map +1 -0
  227. package/dist/ui/lib/link-context.d.ts +13 -0
  228. package/dist/ui/lib/link-context.d.ts.map +1 -0
  229. package/dist/ui/lib/motion.d.ts +44 -9
  230. package/dist/ui/lib/motion.d.ts.map +1 -1
  231. package/dist/ui/lib/use-ripple.d.ts.map +1 -1
  232. package/dist/ui/lib/utils.js +1 -1
  233. package/dist/ui/link.js +11 -11
  234. package/dist/ui/menubar.d.ts +4 -2
  235. package/dist/ui/menubar.d.ts.map +1 -1
  236. package/dist/ui/menubar.js +141 -97
  237. package/dist/ui/navigation-menu.d.ts +2 -0
  238. package/dist/ui/navigation-menu.d.ts.map +1 -1
  239. package/dist/ui/navigation-menu.js +176 -73
  240. package/dist/ui/number-input.d.ts.map +1 -1
  241. package/dist/ui/number-input.js +56 -49
  242. package/dist/ui/pagination.js +22 -22
  243. package/dist/ui/popover.d.ts +2 -1
  244. package/dist/ui/popover.d.ts.map +1 -1
  245. package/dist/ui/popover.js +54 -22
  246. package/dist/ui/progress.d.ts.map +1 -1
  247. package/dist/ui/progress.js +58 -42
  248. package/dist/ui/radio.js +19 -19
  249. package/dist/ui/search-input.d.ts.map +1 -1
  250. package/dist/ui/search-input.js +28 -33
  251. package/dist/ui/segmented-control.d.ts +2 -2
  252. package/dist/ui/segmented-control.d.ts.map +1 -1
  253. package/dist/ui/segmented-control.js +143 -124
  254. package/dist/ui/select.d.ts.map +1 -1
  255. package/dist/ui/select.js +72 -61
  256. package/dist/ui/separator.js +11 -11
  257. package/dist/ui/sheet.d.ts +1 -1
  258. package/dist/ui/sheet.d.ts.map +1 -1
  259. package/dist/ui/sheet.js +111 -75
  260. package/dist/ui/sidebar.d.ts +6 -1
  261. package/dist/ui/sidebar.d.ts.map +1 -1
  262. package/dist/ui/sidebar.js +27 -25
  263. package/dist/ui/skeleton.js +1 -1
  264. package/dist/ui/slider.d.ts +9 -0
  265. package/dist/ui/slider.d.ts.map +1 -1
  266. package/dist/ui/slider.js +33 -27
  267. package/dist/ui/spinner.d.ts +32 -25
  268. package/dist/ui/spinner.d.ts.map +1 -1
  269. package/dist/ui/spinner.js +199 -40
  270. package/dist/ui/stat-card.d.ts.map +1 -1
  271. package/dist/ui/stat-card.js +183 -116
  272. package/dist/ui/stepper.d.ts +22 -1
  273. package/dist/ui/stepper.d.ts.map +1 -1
  274. package/dist/ui/stepper.js +121 -43
  275. package/dist/ui/switch.d.ts.map +1 -1
  276. package/dist/ui/switch.js +39 -26
  277. package/dist/ui/table.d.ts +3 -0
  278. package/dist/ui/table.d.ts.map +1 -1
  279. package/dist/ui/table.js +47 -47
  280. package/dist/ui/tabs.d.ts +4 -1
  281. package/dist/ui/tabs.d.ts.map +1 -1
  282. package/dist/ui/tabs.js +94 -44
  283. package/dist/ui/text.d.ts +3 -3
  284. package/dist/ui/text.js +1 -1
  285. package/dist/ui/textarea.d.ts.map +1 -1
  286. package/dist/ui/textarea.js +29 -27
  287. package/dist/ui/toast-types.d.ts +43 -0
  288. package/dist/ui/toast-types.d.ts.map +1 -0
  289. package/dist/ui/toast-types.js +2 -0
  290. package/dist/ui/toast.d.ts +60 -26
  291. package/dist/ui/toast.d.ts.map +1 -1
  292. package/dist/ui/toast.js +535 -89
  293. package/dist/ui/toaster.d.ts +19 -23
  294. package/dist/ui/toaster.d.ts.map +1 -1
  295. package/dist/ui/toaster.js +31 -21
  296. package/dist/ui/toggle-group.d.ts +2 -2
  297. package/dist/ui/toggle-group.d.ts.map +1 -1
  298. package/dist/ui/toggle-group.js +29 -26
  299. package/dist/ui/toggle.d.ts +2 -2
  300. package/dist/ui/toggle.d.ts.map +1 -1
  301. package/dist/ui/toggle.js +21 -17
  302. package/dist/ui/tooltip.d.ts +2 -1
  303. package/dist/ui/tooltip.d.ts.map +1 -1
  304. package/dist/ui/tooltip.js +58 -21
  305. package/dist/ui/tree-view/tree-view.d.ts +1 -1
  306. package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
  307. package/llms-full.txt +221 -102
  308. package/llms.txt +65 -12
  309. package/package.json +26 -8
  310. package/dist/_chunks/switch.js +0 -10
  311. package/dist/composed/upload-progress.d.ts +0 -33
  312. package/dist/composed/upload-progress.d.ts.map +0 -1
  313. package/dist/composed/upload-progress.js +0 -386
  314. package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
  315. package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
  316. package/dist/ui/transitions.d.ts +0 -17
  317. package/dist/ui/transitions.d.ts.map +0 -1
  318. package/dist/ui/transitions.js +0 -111
@@ -1,38 +1,38 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as g } from "react/jsx-runtime";
3
- import * as c from "react";
4
- import { N as Q, R as X, m as Y, a as Z, E as ee, S as te, u as M, U as D, T as B, b as P, P as ne, H as z, c as U, d as K, L as $, I as O, M as V, e as q } from "../_chunks/tiptap.js";
5
- import { IconFile as ie, IconDownload as re, IconBold as se, IconItalic as le, IconUnderline as oe, IconStrikethrough as ae, IconHighlight as ce, IconH2 as de, IconH3 as ue, IconBlockquote as me, IconList as fe, IconListNumbers as he, IconListCheck as ge, IconCode as be, IconPhoto as pe, IconPaperclip as xe, IconLineDashed as ke, IconAlignLeft as ve, IconAlignCenter as we, IconAlignRight as ye, IconMoodSmile as Ae, IconArrowBackUp as _e, IconArrowForwardUp as Ne, IconLink as Ie } from "@tabler/icons-react";
6
- import { createRoot as F } from "react-dom/client";
2
+ import { jsx as t, jsxs as b } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { N as Y, R as Z, m as ee, a as te, E as se, S as re, u as B, U as P, T as z, b as U, P as ne, H as K, c as $, d as M, L as q, I as O, M as V, e as F } from "../_chunks/tiptap.js";
5
+ import { IconFile as ie, IconDownload as ce, IconBold as ae, IconItalic as le, IconUnderline as oe, IconStrikethrough as ue, IconHighlight as de, IconH2 as fe, IconH3 as me, IconBlockquote as he, IconList as ge, IconListNumbers as be, IconListCheck as pe, IconCode as ke, IconPhoto as xe, IconPaperclip as we, IconLineDashed as ve, IconAlignLeft as ye, IconAlignCenter as Ae, IconAlignRight as _e, IconMoodSmile as Ne, IconArrowBackUp as Ie, IconArrowForwardUp as Le, IconLink as Ce } from "@tabler/icons-react";
6
+ import { createRoot as W } from "react-dom/client";
7
7
  import { c as p } from "../_chunks/utils.js";
8
- import { useColorMode as Le } from "../hooks/use-color-mode.js";
9
- function Ce(e) {
8
+ import { useColorMode as Ee } from "../hooks/use-color-mode.js";
9
+ function Re(e) {
10
10
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
11
11
  }
12
- function Ee({ node: e }) {
13
- const n = /^https?:\/\//.test(e.attrs.url) ? e.attrs.url : "#";
14
- return /* @__PURE__ */ t(Z, { className: "my-ds-02", children: /* @__PURE__ */ g(
12
+ function Te({ node: e }) {
13
+ const s = /^https?:\/\//.test(e.attrs.url) ? e.attrs.url : "#";
14
+ return /* @__PURE__ */ t(te, { className: "my-ds-02", children: /* @__PURE__ */ b(
15
15
  "a",
16
16
  {
17
- href: n,
17
+ href: s,
18
18
  target: "_blank",
19
19
  rel: "noopener noreferrer",
20
- className: "inline-flex items-center gap-ds-03 rounded-ds-md border border-border bg-layer-02 px-ds-04 py-ds-03 text-ds-sm text-text-primary transition-colors hover:border-border-strong hover:bg-layer-03",
20
+ className: "inline-flex items-center gap-ds-03 rounded-ds-md border border-surface-border-strong bg-surface-2 px-ds-04 py-ds-03 text-ds-sm text-surface-fg transition-colors hover:border-surface-border-strong hover:bg-surface-3",
21
21
  contentEditable: !1,
22
22
  children: [
23
- /* @__PURE__ */ t(ie, { className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder" }),
23
+ /* @__PURE__ */ t(ie, { className: "h-ico-sm w-ico-sm shrink-0 text-surface-fg-subtle" }),
24
24
  /* @__PURE__ */ t("span", { className: "truncate", children: e.attrs.name }),
25
- /* @__PURE__ */ g("span", { className: "shrink-0 text-text-placeholder", children: [
25
+ /* @__PURE__ */ b("span", { className: "shrink-0 text-surface-fg-subtle", children: [
26
26
  "(",
27
- Ce(e.attrs.size),
27
+ Re(e.attrs.size),
28
28
  ")"
29
29
  ] }),
30
- /* @__PURE__ */ t(re, { className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder" })
30
+ /* @__PURE__ */ t(ce, { className: "h-ico-sm w-ico-sm shrink-0 text-surface-fg-subtle" })
31
31
  ]
32
32
  }
33
33
  ) });
34
34
  }
35
- const W = Q.create({
35
+ const G = Y.create({
36
36
  name: "fileAttachment",
37
37
  group: "block",
38
38
  atom: !0,
@@ -47,377 +47,382 @@ const W = Q.create({
47
47
  return [{ tag: "div[data-file-attachment]" }];
48
48
  },
49
49
  renderHTML({ HTMLAttributes: e }) {
50
- return ["div", Y({ "data-file-attachment": "" }, e)];
50
+ return ["div", ee({ "data-file-attachment": "" }, e)];
51
51
  },
52
52
  addNodeView() {
53
- return X(Ee);
53
+ return Z(Te);
54
54
  }
55
- }), R = c.forwardRef(
56
- ({ items: e, command: n }, s) => {
57
- const [i, l] = c.useState(0);
58
- return c.useEffect(() => l(0), [e]), c.useImperativeHandle(s, () => ({
59
- onKeyDown: ({ event: r }) => r.key === "ArrowUp" ? (l((o) => (o + e.length - 1) % e.length), !0) : r.key === "ArrowDown" ? (l((o) => (o + 1) % e.length), !0) : r.key === "Enter" ? (e[i] && n(e[i]), !0) : !1
60
- })), e.length ? /* @__PURE__ */ t("div", { role: "listbox", "aria-label": "Mention suggestions", className: "z-popover overflow-hidden rounded-ds-md border border-border bg-layer-01 shadow-02", children: e.map((r, o) => /* @__PURE__ */ g(
55
+ }), T = o.forwardRef(
56
+ ({ items: e, command: s }, r) => {
57
+ const [n, c] = o.useState(0);
58
+ return o.useEffect(() => c(0), [e]), o.useImperativeHandle(r, () => ({
59
+ onKeyDown: ({ event: i }) => i.key === "ArrowUp" ? (c((l) => (l + e.length - 1) % e.length), !0) : i.key === "ArrowDown" ? (c((l) => (l + 1) % e.length), !0) : i.key === "Enter" ? (e[n] && s(e[n]), !0) : !1
60
+ })), e.length ? /* @__PURE__ */ t("div", { role: "listbox", "aria-label": "Mention suggestions", className: "z-popover overflow-hidden rounded-ds-md border border-surface-border-strong bg-surface-1 shadow-02", children: e.map((i, l) => /* @__PURE__ */ b(
61
61
  "button",
62
62
  {
63
63
  type: "button",
64
64
  role: "option",
65
- "aria-selected": o === i,
66
- onClick: () => n(r),
65
+ "aria-selected": l === n,
66
+ onClick: () => s(i),
67
67
  className: p(
68
68
  "flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
69
- o === i ? "bg-layer-02 text-text-primary" : "text-text-secondary hover:bg-layer-02"
69
+ l === n ? "bg-surface-2 text-surface-fg" : "text-surface-fg-muted hover:bg-surface-2"
70
70
  ),
71
71
  children: [
72
- r.avatar ? /* @__PURE__ */ t("img", { src: r.avatar, alt: "", className: "h-ico-md w-ico-md rounded-ds-full object-cover" }) : /* @__PURE__ */ t("span", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-interactive/10 text-[10px] font-semibold text-interactive", children: r.label.charAt(0).toUpperCase() }),
73
- /* @__PURE__ */ t("span", { children: r.label })
72
+ i.avatar ? /* @__PURE__ */ t("img", { src: i.avatar, alt: "", className: "h-ico-md w-ico-md rounded-ds-full object-cover" }) : /* @__PURE__ */ t("span", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-accent-2 text-[10px] font-semibold text-accent-11", children: i.label.charAt(0).toUpperCase() }),
73
+ /* @__PURE__ */ t("span", { children: i.label })
74
74
  ]
75
75
  },
76
- r.id
76
+ i.id
77
77
  )) }) : null;
78
78
  }
79
79
  );
80
- R.displayName = "MentionList";
81
- function Re() {
80
+ T.displayName = "MentionList";
81
+ function He(e) {
82
82
  return () => {
83
- let e = null, n = null, s = null;
83
+ let s = null, r = null, n = null;
84
84
  return {
85
- onStart: (i) => {
86
- var r;
87
- n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
88
- const l = (r = i.clientRect) == null ? void 0 : r.call(i);
89
- l && (n.style.left = `${l.left}px`, n.style.top = `${l.bottom + 4}px`), document.body.appendChild(n), e = F(n), e.render(
85
+ onStart: (c) => {
86
+ var l;
87
+ r = document.createElement("div"), r.style.position = "absolute", r.style.zIndex = "1400";
88
+ const i = (l = c.clientRect) == null ? void 0 : l.call(c);
89
+ i && (r.style.left = `${i.left}px`, r.style.top = `${i.bottom + 4}px`), document.body.appendChild(r), s = W(r), s.render(
90
90
  /* @__PURE__ */ t(
91
- R,
91
+ T,
92
92
  {
93
- ref: (o) => {
94
- s = o;
93
+ ref: (m) => {
94
+ n = m;
95
95
  },
96
- items: i.items,
97
- command: (o) => i.command({ id: o.id, label: o.label })
96
+ items: c.items,
97
+ command: (m) => {
98
+ c.command({ id: m.id, label: m.label }), e == null || e(m);
99
+ }
98
100
  }
99
101
  )
100
102
  );
101
103
  },
102
- onUpdate: (i) => {
103
- var r;
104
- if (!e || !n) return;
105
- const l = (r = i.clientRect) == null ? void 0 : r.call(i);
106
- l && (n.style.left = `${l.left}px`, n.style.top = `${l.bottom + 4}px`), e.render(
104
+ onUpdate: (c) => {
105
+ var l;
106
+ if (!s || !r) return;
107
+ const i = (l = c.clientRect) == null ? void 0 : l.call(c);
108
+ i && (r.style.left = `${i.left}px`, r.style.top = `${i.bottom + 4}px`), s.render(
107
109
  /* @__PURE__ */ t(
108
- R,
110
+ T,
109
111
  {
110
- ref: (o) => {
111
- s = o;
112
+ ref: (m) => {
113
+ n = m;
112
114
  },
113
- items: i.items,
114
- command: (o) => i.command({ id: o.id, label: o.label })
115
+ items: c.items,
116
+ command: (m) => {
117
+ c.command({ id: m.id, label: m.label }), e == null || e(m);
118
+ }
115
119
  }
116
120
  )
117
121
  );
118
122
  },
119
- onKeyDown: (i) => i.event.key === "Escape" ? (n && (e == null || e.unmount(), n.remove(), n = null, e = null), !0) : (s == null ? void 0 : s.onKeyDown(i)) ?? !1,
123
+ onKeyDown: (c) => c.event.key === "Escape" ? (r && (s == null || s.unmount(), r.remove(), r = null, s = null), !0) : (n == null ? void 0 : n.onKeyDown(c)) ?? !1,
120
124
  onExit: () => {
121
- n && (e == null || e.unmount(), n.remove(), n = null, e = null);
125
+ r && (s == null || s.unmount(), r.remove(), r = null, s = null);
122
126
  }
123
127
  };
124
128
  };
125
129
  }
126
- let A = null;
130
+ let _ = null;
127
131
  async function Se() {
128
- if (A) return A;
129
- const e = await import("@emoji-mart/data"), n = e.default ?? e;
130
- return A = Object.values(n.emojis).map((s) => {
131
- var i;
132
+ if (_) return _;
133
+ const e = await import("@emoji-mart/data"), s = e.default ?? e;
134
+ return _ = Object.values(s.emojis).map((r) => {
135
+ var n;
132
136
  return {
133
- id: s.id,
134
- name: s.name,
135
- native: ((i = s.skins[0]) == null ? void 0 : i.native) ?? ""
137
+ id: r.id,
138
+ name: r.name,
139
+ native: ((n = r.skins[0]) == null ? void 0 : n.native) ?? ""
136
140
  };
137
- }), A;
141
+ }), _;
138
142
  }
139
- const S = c.forwardRef(
140
- ({ items: e, command: n }, s) => {
141
- const [i, l] = c.useState(0);
142
- return c.useEffect(() => l(0), [e]), c.useImperativeHandle(s, () => ({
143
- onKeyDown: ({ event: r }) => r.key === "ArrowUp" ? (l((o) => (o + e.length - 1) % e.length), !0) : r.key === "ArrowDown" ? (l((o) => (o + 1) % e.length), !0) : r.key === "Enter" ? (e[i] && n(e[i]), !0) : !1
144
- })), e.length ? /* @__PURE__ */ t("div", { role: "listbox", "aria-label": "Emoji suggestions", className: "z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-ds-md border border-border bg-layer-01 shadow-02", children: e.map((r, o) => /* @__PURE__ */ g(
143
+ const H = o.forwardRef(
144
+ ({ items: e, command: s }, r) => {
145
+ const [n, c] = o.useState(0);
146
+ return o.useEffect(() => c(0), [e]), o.useImperativeHandle(r, () => ({
147
+ onKeyDown: ({ event: i }) => i.key === "ArrowUp" ? (c((l) => (l + e.length - 1) % e.length), !0) : i.key === "ArrowDown" ? (c((l) => (l + 1) % e.length), !0) : i.key === "Enter" ? (e[n] && s(e[n]), !0) : !1
148
+ })), e.length ? /* @__PURE__ */ t("div", { role: "listbox", "aria-label": "Emoji suggestions", className: "z-popover max-h-[200px] overflow-x-hidden overflow-y-auto rounded-ds-md border border-surface-border-strong bg-surface-1 shadow-02", children: e.map((i, l) => /* @__PURE__ */ b(
145
149
  "button",
146
150
  {
147
151
  type: "button",
148
152
  role: "option",
149
- "aria-selected": o === i,
150
- onClick: () => n(r),
153
+ "aria-selected": l === n,
154
+ onClick: () => s(i),
151
155
  className: p(
152
156
  "flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
153
- o === i ? "bg-layer-02 text-text-primary" : "text-text-secondary hover:bg-layer-02"
157
+ l === n ? "bg-surface-2 text-surface-fg" : "text-surface-fg-muted hover:bg-surface-2"
154
158
  ),
155
159
  children: [
156
- /* @__PURE__ */ t("span", { className: "text-ds-base", children: r.native }),
157
- /* @__PURE__ */ g("span", { className: "truncate", children: [
160
+ /* @__PURE__ */ t("span", { className: "text-ds-base", children: i.native }),
161
+ /* @__PURE__ */ b("span", { className: "truncate", children: [
158
162
  ":",
159
- r.id,
163
+ i.id,
160
164
  ":"
161
165
  ] })
162
166
  ]
163
167
  },
164
- r.id
168
+ i.id
165
169
  )) }) : null;
166
170
  }
167
171
  );
168
- S.displayName = "EmojiList";
169
- function Te() {
172
+ H.displayName = "EmojiList";
173
+ function je() {
170
174
  return () => {
171
- let e = null, n = null, s = null;
175
+ let e = null, s = null, r = null;
172
176
  return {
173
- onStart: (i) => {
174
- var r;
175
- n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
176
- const l = (r = i.clientRect) == null ? void 0 : r.call(i);
177
- l && (n.style.left = `${l.left}px`, n.style.top = `${l.bottom + 4}px`), document.body.appendChild(n), e = F(n), e.render(
177
+ onStart: (n) => {
178
+ var i;
179
+ s = document.createElement("div"), s.style.position = "absolute", s.style.zIndex = "1400";
180
+ const c = (i = n.clientRect) == null ? void 0 : i.call(n);
181
+ c && (s.style.left = `${c.left}px`, s.style.top = `${c.bottom + 4}px`), document.body.appendChild(s), e = W(s), e.render(
178
182
  /* @__PURE__ */ t(
179
- S,
183
+ H,
180
184
  {
181
- ref: (o) => {
182
- s = o;
185
+ ref: (l) => {
186
+ r = l;
183
187
  },
184
- items: i.items,
185
- command: (o) => i.command(o)
188
+ items: n.items,
189
+ command: (l) => n.command(l)
186
190
  }
187
191
  )
188
192
  );
189
193
  },
190
- onUpdate: (i) => {
191
- var r;
192
- if (!e || !n) return;
193
- const l = (r = i.clientRect) == null ? void 0 : r.call(i);
194
- l && (n.style.left = `${l.left}px`, n.style.top = `${l.bottom + 4}px`), e.render(
194
+ onUpdate: (n) => {
195
+ var i;
196
+ if (!e || !s) return;
197
+ const c = (i = n.clientRect) == null ? void 0 : i.call(n);
198
+ c && (s.style.left = `${c.left}px`, s.style.top = `${c.bottom + 4}px`), e.render(
195
199
  /* @__PURE__ */ t(
196
- S,
200
+ H,
197
201
  {
198
- ref: (o) => {
199
- s = o;
202
+ ref: (l) => {
203
+ r = l;
200
204
  },
201
- items: i.items,
202
- command: (o) => i.command(o)
205
+ items: n.items,
206
+ command: (l) => n.command(l)
203
207
  }
204
208
  )
205
209
  );
206
210
  },
207
- onKeyDown: (i) => i.event.key === "Escape" ? (n && (e == null || e.unmount(), n.remove(), n = null, e = null), !0) : (s == null ? void 0 : s.onKeyDown(i)) ?? !1,
211
+ onKeyDown: (n) => n.event.key === "Escape" ? (s && (e == null || e.unmount(), s.remove(), s = null, e = null), !0) : (r == null ? void 0 : r.onKeyDown(n)) ?? !1,
208
212
  onExit: () => {
209
- n && (e == null || e.unmount(), n.remove(), n = null, e = null);
213
+ s && (e == null || e.unmount(), s.remove(), s = null, e = null);
210
214
  }
211
215
  };
212
216
  };
213
217
  }
214
- const He = ee.create({
218
+ const De = se.create({
215
219
  name: "emojiSuggestion",
216
220
  addProseMirrorPlugins() {
217
221
  return [
218
- te({
222
+ re({
219
223
  editor: this.editor,
220
224
  char: ":",
221
225
  items: async ({ query: e }) => {
222
- const n = await Se();
223
- return e ? n.filter(
224
- (s) => s.id.includes(e.toLowerCase()) || s.name.toLowerCase().includes(e.toLowerCase())
225
- ).slice(0, 8) : n.slice(0, 8);
226
+ const s = await Se();
227
+ return e ? s.filter(
228
+ (r) => r.id.includes(e.toLowerCase()) || r.name.toLowerCase().includes(e.toLowerCase())
229
+ ).slice(0, 8) : s.slice(0, 8);
226
230
  },
227
- command: ({ editor: e, range: n, props: s }) => {
228
- e.chain().focus().deleteRange(n).insertContent(s.native).run();
231
+ command: ({ editor: e, range: s, props: r }) => {
232
+ e.chain().focus().deleteRange(s).insertContent(r.native).run();
229
233
  },
230
- render: Te()
234
+ render: je()
231
235
  })
232
236
  ];
233
237
  }
234
- }), G = [
238
+ }), J = [
235
239
  "prose prose-sm max-w-none",
236
- "font-body text-ds-md leading-relaxed text-text-primary",
237
- "[&_h2]:text-ds-xl [&_h2]:mb-ds-03 [&_h2]:mt-ds-05 [&_h2]:text-text-primary",
238
- "[&_h3]:text-ds-base [&_h3]:font-semibold [&_h3]:mb-ds-02b [&_h3]:mt-ds-04 [&_h3]:text-text-primary",
239
- "[&_p]:mb-ds-02b [&_p]:text-text-secondary",
240
+ "font-body text-ds-md leading-relaxed text-surface-fg",
241
+ "[&_h2]:text-ds-xl [&_h2]:mb-ds-03 [&_h2]:mt-ds-05 [&_h2]:text-surface-fg",
242
+ "[&_h3]:text-ds-base [&_h3]:font-semibold [&_h3]:mb-ds-02b [&_h3]:mt-ds-04 [&_h3]:text-surface-fg",
243
+ "[&_p]:mb-ds-02b [&_p]:text-surface-fg-muted",
240
244
  "[&_ul]:ml-ds-05 [&_ul]:list-disc [&_ol]:ml-ds-05 [&_ol]:list-decimal",
241
- "[&_li]:text-text-secondary",
242
- "[&_code]:rounded [&_code]:bg-layer-02 [&_code]:px-ds-02b [&_code]:py-ds-01 [&_code]:text-ds-md [&_code]:text-interactive",
243
- "[&_pre]:rounded-ds-lg [&_pre]:bg-layer-02 [&_pre]:p-ds-04",
244
- "[&_strong]:font-semibold [&_strong]:text-text-primary",
245
- "[&_blockquote]:border-l-[3px] [&_blockquote]:border-interactive/30 [&_blockquote]:pl-ds-04 [&_blockquote]:italic [&_blockquote]:text-text-placeholder",
246
- "[&_mark]:rounded-sm [&_mark]:bg-warning/20 [&_mark]:px-[2px]",
245
+ "[&_li]:text-surface-fg-muted",
246
+ "[&_code]:rounded [&_code]:bg-surface-2 [&_code]:px-ds-02b [&_code]:py-ds-01 [&_code]:text-ds-md [&_code]:text-accent-11",
247
+ "[&_pre]:rounded-ds-lg [&_pre]:bg-surface-2 [&_pre]:p-ds-04",
248
+ "[&_strong]:font-semibold [&_strong]:text-surface-fg",
249
+ "[&_blockquote]:border-l-[3px] [&_blockquote]:border-accent-6 [&_blockquote]:pl-ds-04 [&_blockquote]:italic [&_blockquote]:text-surface-fg-subtle",
250
+ "[&_mark]:rounded-sm [&_mark]:bg-warning-3 [&_mark]:px-[2px]",
247
251
  '[&_ul[data-type="taskList"]]:ml-0 [&_ul[data-type="taskList"]]:list-none [&_li[data-type="taskItem"]]:flex [&_li[data-type="taskItem"]]:items-start [&_li[data-type="taskItem"]]:gap-ds-02',
248
- "[&_hr]:my-ds-04 [&_hr]:border-border",
249
- "[&_a]:text-interactive [&_a]:underline [&_a]:decoration-interactive/40 hover:[&_a]:decoration-interactive",
252
+ "[&_hr]:my-ds-04 [&_hr]:border-surface-border-strong",
253
+ "[&_a]:text-accent-11 [&_a]:underline [&_a]:decoration-accent-6 hover:[&_a]:decoration-accent-11",
250
254
  "[&_img]:max-w-full [&_img]:rounded-ds-md [&_img]:my-ds-03",
251
- "[&_.mention]:rounded-ds-sm [&_.mention]:bg-interactive/10 [&_.mention]:px-ds-02 [&_.mention]:py-[1px] [&_.mention]:font-medium [&_.mention]:text-interactive"
255
+ "[&_.mention]:rounded-ds-sm [&_.mention]:bg-accent-2 [&_.mention]:px-ds-02 [&_.mention]:py-[1px] [&_.mention]:font-medium [&_.mention]:text-accent-11"
252
256
  ];
253
- function u({
257
+ function d({
254
258
  onClick: e,
255
- isActive: n = !1,
256
- disabled: s = !1,
257
- title: i,
258
- children: l
259
+ isActive: s = !1,
260
+ disabled: r = !1,
261
+ title: n,
262
+ children: c
259
263
  }) {
260
264
  return /* @__PURE__ */ t(
261
265
  "button",
262
266
  {
263
267
  type: "button",
264
268
  onClick: e,
265
- disabled: s,
266
- title: i,
267
- "aria-pressed": n,
269
+ disabled: r,
270
+ title: n,
271
+ "aria-pressed": s,
268
272
  className: p(
269
273
  "inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors",
270
- "hover:bg-field",
271
- "disabled:pointer-events-none disabled:opacity-[0.38]",
272
- n ? "bg-field text-interactive" : "text-text-placeholder"
274
+ "hover:bg-surface-3",
275
+ "disabled:pointer-events-none disabled:opacity-action-disabled",
276
+ s ? "bg-surface-3 text-accent-11" : "text-surface-fg-subtle"
273
277
  ),
274
- children: l
278
+ children: c
275
279
  }
276
280
  );
277
281
  }
278
- function je({ editor: e }) {
279
- const [n, s] = c.useState(!1), [i, l] = c.useState(""), r = c.useRef(null), o = () => {
282
+ function Be({ editor: e }) {
283
+ const [s, r] = o.useState(!1), [n, c] = o.useState(""), i = o.useRef(null), l = () => {
280
284
  if (e.isActive("link")) {
281
285
  e.chain().focus().unsetLink().run();
282
286
  return;
283
287
  }
284
- const f = e.getAttributes("link").href || "";
285
- l(f), s(!0), setTimeout(() => {
286
- var _;
287
- return (_ = r.current) == null ? void 0 : _.focus();
288
+ const h = e.getAttributes("link").href || "";
289
+ c(h), r(!0), setTimeout(() => {
290
+ var w;
291
+ return (w = i.current) == null ? void 0 : w.focus();
288
292
  }, 0);
289
- }, b = (f) => {
290
- f.preventDefault(), i.trim() && e.chain().focus().setLink({ href: i.trim() }).run(), s(!1), l("");
291
- }, x = (f) => {
292
- f.key === "Escape" && (s(!1), l(""), e.commands.focus());
293
+ }, m = (h) => {
294
+ h.preventDefault(), n.trim() && e.chain().focus().setLink({ href: n.trim() }).run(), r(!1), c("");
295
+ }, k = (h) => {
296
+ h.key === "Escape" && (r(!1), c(""), e.commands.focus());
293
297
  };
294
- return /* @__PURE__ */ g("div", { className: "relative", children: [
295
- /* @__PURE__ */ t(u, { onClick: o, isActive: e.isActive("link"), title: "Link", children: /* @__PURE__ */ t(Ie, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
296
- n && /* @__PURE__ */ g(
298
+ return /* @__PURE__ */ b("div", { className: "relative", children: [
299
+ /* @__PURE__ */ t(d, { onClick: l, isActive: e.isActive("link"), title: "Link", children: /* @__PURE__ */ t(Ce, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
300
+ s && /* @__PURE__ */ b(
297
301
  "form",
298
302
  {
299
- onSubmit: b,
303
+ onSubmit: m,
300
304
  "aria-label": "Edit link URL",
301
- className: "absolute left-0 top-full z-popover mt-ds-01 flex items-center gap-ds-02 rounded-ds-md border border-border bg-layer-01 p-ds-02 shadow-02",
305
+ className: "absolute left-0 top-full z-popover mt-ds-01 flex items-center gap-ds-02 rounded-ds-md border border-surface-border-strong bg-surface-1 p-ds-02 shadow-02",
302
306
  children: [
303
307
  /* @__PURE__ */ t(
304
308
  "input",
305
309
  {
306
- ref: r,
310
+ ref: i,
307
311
  type: "url",
308
- value: i,
309
- onChange: (f) => l(f.target.value),
310
- onKeyDown: x,
312
+ value: n,
313
+ onChange: (h) => c(h.target.value),
314
+ onKeyDown: k,
311
315
  placeholder: "https://...",
312
- className: "h-ds-sm w-[240px] rounded-ds-sm border border-border bg-layer-01 px-ds-03 text-ds-sm text-text-primary focus:border-interactive focus:outline-none"
316
+ className: "h-ds-sm w-[240px] rounded-ds-sm border border-surface-border-strong bg-surface-1 px-ds-03 text-ds-sm text-surface-fg focus:border-accent-7 focus:outline-none"
313
317
  }
314
318
  ),
315
- /* @__PURE__ */ t("button", { type: "submit", className: "h-ds-sm rounded-ds-sm bg-interactive px-ds-03 text-ds-sm text-text-on-color hover:bg-interactive/90", children: "Apply" })
319
+ /* @__PURE__ */ t("button", { type: "submit", className: "h-ds-sm rounded-ds-sm bg-accent-9 px-ds-03 text-ds-sm text-accent-fg hover:bg-accent-10", children: "Apply" })
316
320
  ]
317
321
  }
318
322
  )
319
323
  ] });
320
324
  }
321
- function k() {
322
- return /* @__PURE__ */ t("div", { className: "mx-ds-02 h-[16px] w-px bg-border" });
325
+ function x() {
326
+ return /* @__PURE__ */ t("div", { className: "mx-ds-02 h-[16px] w-px bg-surface-border" });
323
327
  }
324
- function Me({ editor: e, onImageClick: n, onFileClick: s, onEmojiClick: i }) {
325
- return /* @__PURE__ */ g("div", { className: "flex flex-wrap items-center gap-ds-01 border-b border-border px-ds-04 py-ds-02b", children: [
326
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleBold().run(), isActive: e.isActive("bold"), title: "Bold", children: /* @__PURE__ */ t(se, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
327
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleItalic().run(), isActive: e.isActive("italic"), title: "Italic", children: /* @__PURE__ */ t(le, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
328
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleUnderline().run(), isActive: e.isActive("underline"), title: "Underline", children: /* @__PURE__ */ t(oe, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
329
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleStrike().run(), isActive: e.isActive("strike"), title: "Strikethrough", children: /* @__PURE__ */ t(ae, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
330
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleHighlight().run(), isActive: e.isActive("highlight"), title: "Highlight", children: /* @__PURE__ */ t(ce, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
331
- /* @__PURE__ */ t(k, {}),
332
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleHeading({ level: 2 }).run(), isActive: e.isActive("heading", { level: 2 }), title: "Heading 2", children: /* @__PURE__ */ t(de, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
333
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleHeading({ level: 3 }).run(), isActive: e.isActive("heading", { level: 3 }), title: "Heading 3", children: /* @__PURE__ */ t(ue, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
334
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleBlockquote().run(), isActive: e.isActive("blockquote"), title: "Blockquote", children: /* @__PURE__ */ t(me, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
335
- /* @__PURE__ */ t(k, {}),
336
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleBulletList().run(), isActive: e.isActive("bulletList"), title: "Bullet list", children: /* @__PURE__ */ t(fe, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
337
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleOrderedList().run(), isActive: e.isActive("orderedList"), title: "Ordered list", children: /* @__PURE__ */ t(he, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
338
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleTaskList().run(), isActive: e.isActive("taskList"), title: "Task list", children: /* @__PURE__ */ t(ge, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
339
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().toggleCodeBlock().run(), isActive: e.isActive("codeBlock"), title: "Code block", children: /* @__PURE__ */ t(be, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
340
- /* @__PURE__ */ t(k, {}),
341
- /* @__PURE__ */ t(je, { editor: e }),
342
- n && /* @__PURE__ */ t(u, { onClick: n, title: "Insert image", children: /* @__PURE__ */ t(pe, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
343
- s && /* @__PURE__ */ t(u, { onClick: s, title: "Attach file", children: /* @__PURE__ */ t(xe, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
344
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().setHorizontalRule().run(), title: "Horizontal rule", children: /* @__PURE__ */ t(ke, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
345
- /* @__PURE__ */ t(k, {}),
346
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().setTextAlign("left").run(), isActive: e.isActive({ textAlign: "left" }), title: "Align left", children: /* @__PURE__ */ t(ve, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
347
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().setTextAlign("center").run(), isActive: e.isActive({ textAlign: "center" }), title: "Align center", children: /* @__PURE__ */ t(we, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
348
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().setTextAlign("right").run(), isActive: e.isActive({ textAlign: "right" }), title: "Align right", children: /* @__PURE__ */ t(ye, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
349
- /* @__PURE__ */ t(k, {}),
350
- i && /* @__PURE__ */ t(u, { onClick: i, title: "Emoji", children: /* @__PURE__ */ t(Ae, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
351
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().undo().run(), disabled: !e.can().undo(), title: "Undo", children: /* @__PURE__ */ t(_e, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
352
- /* @__PURE__ */ t(u, { onClick: () => e.chain().focus().redo().run(), disabled: !e.can().redo(), title: "Redo", children: /* @__PURE__ */ t(Ne, { className: "h-ico-sm w-ico-sm", stroke: 2 }) })
328
+ function Pe({ editor: e, onImageClick: s, onFileClick: r, onEmojiClick: n }) {
329
+ return /* @__PURE__ */ b("div", { className: "flex flex-wrap items-center gap-ds-01 border-b border-surface-border-strong px-ds-04 py-ds-02b", children: [
330
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleBold().run(), isActive: e.isActive("bold"), title: "Bold", children: /* @__PURE__ */ t(ae, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
331
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleItalic().run(), isActive: e.isActive("italic"), title: "Italic", children: /* @__PURE__ */ t(le, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
332
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleUnderline().run(), isActive: e.isActive("underline"), title: "Underline", children: /* @__PURE__ */ t(oe, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
333
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleStrike().run(), isActive: e.isActive("strike"), title: "Strikethrough", children: /* @__PURE__ */ t(ue, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
334
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleHighlight().run(), isActive: e.isActive("highlight"), title: "Highlight", children: /* @__PURE__ */ t(de, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
335
+ /* @__PURE__ */ t(x, {}),
336
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleHeading({ level: 2 }).run(), isActive: e.isActive("heading", { level: 2 }), title: "Heading 2", children: /* @__PURE__ */ t(fe, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
337
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleHeading({ level: 3 }).run(), isActive: e.isActive("heading", { level: 3 }), title: "Heading 3", children: /* @__PURE__ */ t(me, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
338
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleBlockquote().run(), isActive: e.isActive("blockquote"), title: "Blockquote", children: /* @__PURE__ */ t(he, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
339
+ /* @__PURE__ */ t(x, {}),
340
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleBulletList().run(), isActive: e.isActive("bulletList"), title: "Bullet list", children: /* @__PURE__ */ t(ge, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
341
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleOrderedList().run(), isActive: e.isActive("orderedList"), title: "Ordered list", children: /* @__PURE__ */ t(be, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
342
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleTaskList().run(), isActive: e.isActive("taskList"), title: "Task list", children: /* @__PURE__ */ t(pe, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
343
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().toggleCodeBlock().run(), isActive: e.isActive("codeBlock"), title: "Code block", children: /* @__PURE__ */ t(ke, { className: "h-ico-sm w-ico-sm", stroke: 2.5 }) }),
344
+ /* @__PURE__ */ t(x, {}),
345
+ /* @__PURE__ */ t(Be, { editor: e }),
346
+ s && /* @__PURE__ */ t(d, { onClick: s, title: "Insert image", children: /* @__PURE__ */ t(xe, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
347
+ r && /* @__PURE__ */ t(d, { onClick: r, title: "Attach file", children: /* @__PURE__ */ t(we, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
348
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().setHorizontalRule().run(), title: "Horizontal rule", children: /* @__PURE__ */ t(ve, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
349
+ /* @__PURE__ */ t(x, {}),
350
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().setTextAlign("left").run(), isActive: e.isActive({ textAlign: "left" }), title: "Align left", children: /* @__PURE__ */ t(ye, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
351
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().setTextAlign("center").run(), isActive: e.isActive({ textAlign: "center" }), title: "Align center", children: /* @__PURE__ */ t(Ae, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
352
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().setTextAlign("right").run(), isActive: e.isActive({ textAlign: "right" }), title: "Align right", children: /* @__PURE__ */ t(_e, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
353
+ /* @__PURE__ */ t(x, {}),
354
+ n && /* @__PURE__ */ t(d, { onClick: n, title: "Emoji", children: /* @__PURE__ */ t(Ne, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
355
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().undo().run(), disabled: !e.can().undo(), title: "Undo", children: /* @__PURE__ */ t(Ie, { className: "h-ico-sm w-ico-sm", stroke: 2 }) }),
356
+ /* @__PURE__ */ t(d, { onClick: () => e.chain().focus().redo().run(), disabled: !e.can().redo(), title: "Redo", children: /* @__PURE__ */ t(Le, { className: "h-ico-sm w-ico-sm", stroke: 2 }) })
353
357
  ] });
354
358
  }
355
- const De = c.lazy(() => import("@emoji-mart/react"));
356
- function Be({ onSelect: e }) {
357
- const [n, s] = c.useState(null), { colorMode: i } = Le();
358
- c.useEffect(() => {
359
- import("@emoji-mart/data").then((r) => s(r.default));
359
+ const ze = o.lazy(() => import("@emoji-mart/react"));
360
+ function Ue({ onSelect: e }) {
361
+ const [s, r] = o.useState(null), { colorMode: n } = Ee();
362
+ o.useEffect(() => {
363
+ import("@emoji-mart/data").then((i) => r(i.default));
360
364
  }, []);
361
- const l = /* @__PURE__ */ t("div", { className: "flex h-[350px] w-[352px] items-center justify-center rounded-ds-lg border border-border bg-layer-01 shadow-02", children: /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-placeholder", children: "Loading..." }) });
362
- return n ? /* @__PURE__ */ t(c.Suspense, { fallback: l, children: /* @__PURE__ */ t(
363
- De,
365
+ const c = /* @__PURE__ */ t("div", { className: "flex h-[350px] w-[352px] items-center justify-center rounded-ds-lg border border-surface-border-strong bg-surface-1 shadow-02", children: /* @__PURE__ */ t("span", { className: "text-ds-sm text-surface-fg-subtle", children: "Loading..." }) });
366
+ return s ? /* @__PURE__ */ t(o.Suspense, { fallback: c, children: /* @__PURE__ */ t(
367
+ ze,
364
368
  {
365
- data: n,
366
- onEmojiSelect: (r) => e(r.native),
367
- theme: i === "dark" ? "dark" : "light",
369
+ data: s,
370
+ onEmojiSelect: (i) => e(i.native),
371
+ theme: n === "dark" ? "dark" : "light",
368
372
  previewPosition: "none",
369
373
  skinTonePosition: "none"
370
374
  }
371
- ) }) : l;
375
+ ) }) : c;
372
376
  }
373
- const Pe = c.forwardRef(
377
+ const Ke = o.forwardRef(
374
378
  function({
375
- content: n = "",
376
- placeholder: s = "Start writing...",
377
- onChange: i,
378
- className: l,
379
- editable: r = !0,
380
- onImageUpload: o,
381
- onFileUpload: b,
382
- mentions: x,
383
- onMentionSearch: f,
384
- onMentionSelect: _
385
- }, J) {
386
- const N = c.useRef(null), [I, v] = c.useState(!1), L = c.useRef(null), T = c.useRef(null), H = c.useRef(null), C = async (a) => {
387
- const m = N.current;
388
- if (m)
389
- if (o) {
390
- const d = await o(a);
391
- d && /^https?:\/\//i.test(d) && m.chain().focus().setImage({ src: d }).run();
379
+ content: s = "",
380
+ placeholder: r = "Start writing...",
381
+ onChange: n,
382
+ className: c,
383
+ editable: i = !0,
384
+ onImageUpload: l,
385
+ onFileUpload: m,
386
+ mentions: k,
387
+ onMentionSearch: h,
388
+ onMentionSelect: w,
389
+ ...Q
390
+ }, X) {
391
+ const N = o.useRef(null), I = o.useRef(!1), [L, v] = o.useState(!1), C = o.useRef(null), S = o.useRef(null), j = o.useRef(null), E = async (a) => {
392
+ const f = N.current;
393
+ if (f)
394
+ if (l) {
395
+ const u = await l(a);
396
+ u && /^https?:\/\//i.test(u) && f.chain().focus().setImage({ src: u }).run();
392
397
  } else {
393
- const d = new FileReader();
394
- d.onload = () => {
395
- m.chain().focus().setImage({ src: d.result }).run();
396
- }, d.readAsDataURL(a);
398
+ const u = new FileReader();
399
+ u.onload = () => {
400
+ f.chain().focus().setImage({ src: u.result }).run();
401
+ }, u.readAsDataURL(a);
397
402
  }
398
- }, E = async (a) => {
399
- const m = N.current;
400
- if (!m || !b) return;
401
- const d = await b(a);
402
- m.chain().focus().insertContent({
403
+ }, R = async (a) => {
404
+ const f = N.current;
405
+ if (!f || !m) return;
406
+ const u = await m(a);
407
+ f.chain().focus().insertContent({
403
408
  type: "fileAttachment",
404
- attrs: { url: d.url, name: d.name, size: d.size }
409
+ attrs: { url: u.url, name: u.name, size: u.size }
405
410
  }).run();
406
- }, h = M({
411
+ }, g = B({
407
412
  extensions: [
408
- P.configure({
413
+ U.configure({
409
414
  heading: { levels: [2, 3] }
410
415
  }),
411
416
  ne.configure({
412
- placeholder: s,
413
- emptyEditorClass: "before:content-[attr(data-placeholder)] before:text-text-placeholder before:float-left before:h-0 before:pointer-events-none"
417
+ placeholder: r,
418
+ emptyEditorClass: "before:content-[attr(data-placeholder)] before:text-surface-fg-subtle before:float-left before:h-0 before:pointer-events-none"
414
419
  }),
415
- D,
416
- z.configure({ multicolor: !1 }),
417
- B,
418
- U.configure({ nested: !0 }),
419
- K.configure({ types: ["heading", "paragraph"] }),
420
- $.configure({
420
+ P,
421
+ K.configure({ multicolor: !1 }),
422
+ z,
423
+ $.configure({ nested: !0 }),
424
+ M.configure({ types: ["heading", "paragraph"] }),
425
+ q.configure({
421
426
  openOnClick: !1,
422
427
  protocols: ["http", "https", "mailto"],
423
428
  validate: (a) => /^(https?:\/\/|mailto:)/i.test(a),
@@ -432,149 +437,151 @@ const Pe = c.forwardRef(
432
437
  class: "max-w-full rounded-ds-md"
433
438
  }
434
439
  }),
435
- W,
436
- ...x || f ? [
440
+ G,
441
+ ...k || h ? [
437
442
  V.configure({
438
443
  HTMLAttributes: { class: "mention" },
439
444
  suggestion: {
440
- items: async ({ query: a }) => f ? await f(a) : x ? x.filter((m) => m.label.toLowerCase().includes(a.toLowerCase())).slice(0, 8) : [],
441
- render: Re()
445
+ items: async ({ query: a }) => h ? await h(a) : k ? k.filter((f) => f.label.toLowerCase().includes(a.toLowerCase())).slice(0, 8) : [],
446
+ render: He(w)
442
447
  }
443
448
  })
444
449
  ] : [],
445
- He
450
+ De
446
451
  ],
447
- content: n,
448
- editable: r,
452
+ content: s,
453
+ editable: i,
449
454
  editorProps: {
450
- handleDrop: (a, m, d, w) => {
451
- var j;
452
- if (w || !((j = m.dataTransfer) != null && j.files.length)) return !1;
453
- const y = m.dataTransfer.files[0];
454
- return y ? y.type.startsWith("image/") ? (C(y), !0) : b ? (E(y), !0) : !1 : !1;
455
+ handleDrop: (a, f, u, y) => {
456
+ var D;
457
+ if (y || !((D = f.dataTransfer) != null && D.files.length)) return !1;
458
+ const A = f.dataTransfer.files[0];
459
+ return A ? A.type.startsWith("image/") ? (E(A), !0) : m ? (R(A), !0) : !1 : !1;
455
460
  },
456
- handlePaste: (a, m) => {
457
- var w;
458
- const d = (w = m.clipboardData) == null ? void 0 : w.files[0];
459
- return d ? d.type.startsWith("image/") ? (C(d), !0) : b ? (E(d), !0) : !1 : !1;
461
+ handlePaste: (a, f) => {
462
+ var y;
463
+ const u = (y = f.clipboardData) == null ? void 0 : y.files[0];
464
+ return u ? u.type.startsWith("image/") ? (E(u), !0) : m ? (R(u), !0) : !1 : !1;
460
465
  },
461
466
  attributes: {
462
467
  class: p(
463
- ...G,
468
+ ...J,
464
469
  "focus:outline-none",
465
470
  "min-h-[120px] px-ds-04 py-ds-04"
466
471
  )
467
472
  }
468
473
  },
469
474
  onUpdate: ({ editor: a }) => {
470
- i == null || i(a.getHTML());
475
+ I.current = !0, n == null || n(a.getHTML()), queueMicrotask(() => {
476
+ I.current = !1;
477
+ });
471
478
  }
472
479
  });
473
- return c.useEffect(() => {
474
- N.current = h;
475
- }, [h]), c.useEffect(() => {
476
- if (!I) return;
477
- const a = (m) => {
478
- L.current && !L.current.contains(m.target) && v(!1);
480
+ return o.useEffect(() => {
481
+ N.current = g;
482
+ }, [g]), o.useEffect(() => {
483
+ if (!L) return;
484
+ const a = (f) => {
485
+ C.current && !C.current.contains(f.target) && v(!1);
479
486
  };
480
487
  return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
481
- }, [I]), c.useEffect(() => {
482
- h && n !== h.getHTML() && h.commands.setContent(n, !1);
483
- }, [h, n]), h ? /* @__PURE__ */ g("div", { ref: J, className: p("relative", l), children: [
484
- I && /* @__PURE__ */ t(
488
+ }, [L]), o.useEffect(() => {
489
+ I.current || g && s !== g.getHTML() && g.commands.setContent(s, !1);
490
+ }, [g, s]), g ? /* @__PURE__ */ b("div", { ref: X, ...Q, className: p("relative", c), children: [
491
+ L && /* @__PURE__ */ t(
485
492
  "div",
486
493
  {
487
- ref: L,
494
+ ref: C,
488
495
  className: "absolute bottom-full right-0 z-popover mb-ds-02",
489
496
  onKeyDown: (a) => {
490
497
  a.key === "Escape" && (a.stopPropagation(), v(!1));
491
498
  },
492
499
  children: /* @__PURE__ */ t(
493
- Be,
500
+ Ue,
494
501
  {
495
502
  onSelect: (a) => {
496
- h.chain().focus().insertContent(a).run(), v(!1);
503
+ g.chain().focus().insertContent(a).run(), v(!1);
497
504
  }
498
505
  }
499
506
  )
500
507
  }
501
508
  ),
502
- /* @__PURE__ */ g(
509
+ /* @__PURE__ */ b(
503
510
  "div",
504
511
  {
505
512
  className: p(
506
- "overflow-hidden rounded-ds-lg border border-border bg-layer-01",
507
- "transition-colors focus-within:border-border-strong"
513
+ "overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-1",
514
+ "transition-colors focus-within:border-surface-border-strong"
508
515
  ),
509
516
  children: [
510
517
  /* @__PURE__ */ t(
511
518
  "input",
512
519
  {
513
- ref: T,
520
+ ref: S,
514
521
  type: "file",
515
522
  accept: "image/*",
516
523
  "aria-label": "Upload image",
517
524
  className: "hidden",
518
525
  onChange: (a) => {
519
- var d;
520
- const m = (d = a.target.files) == null ? void 0 : d[0];
521
- m && C(m), a.target.value = "";
526
+ var u;
527
+ const f = (u = a.target.files) == null ? void 0 : u[0];
528
+ f && E(f), a.target.value = "";
522
529
  }
523
530
  }
524
531
  ),
525
- b && /* @__PURE__ */ t(
532
+ m && /* @__PURE__ */ t(
526
533
  "input",
527
534
  {
528
- ref: H,
535
+ ref: j,
529
536
  type: "file",
530
537
  "aria-label": "Upload file",
531
538
  className: "hidden",
532
539
  onChange: (a) => {
533
- var d;
534
- const m = (d = a.target.files) == null ? void 0 : d[0];
535
- m && E(m), a.target.value = "";
540
+ var u;
541
+ const f = (u = a.target.files) == null ? void 0 : u[0];
542
+ f && R(f), a.target.value = "";
536
543
  }
537
544
  }
538
545
  ),
539
- r && /* @__PURE__ */ t(
540
- Me,
546
+ i && /* @__PURE__ */ t(
547
+ Pe,
541
548
  {
542
- editor: h,
549
+ editor: g,
543
550
  onImageClick: () => {
544
551
  var a;
545
- return (a = T.current) == null ? void 0 : a.click();
552
+ return (a = S.current) == null ? void 0 : a.click();
546
553
  },
547
- onFileClick: b ? () => {
554
+ onFileClick: m ? () => {
548
555
  var a;
549
- return (a = H.current) == null ? void 0 : a.click();
556
+ return (a = j.current) == null ? void 0 : a.click();
550
557
  } : void 0,
551
558
  onEmojiClick: () => v((a) => !a)
552
559
  }
553
560
  ),
554
- /* @__PURE__ */ t(q, { editor: h })
561
+ /* @__PURE__ */ t(F, { editor: g })
555
562
  ]
556
563
  }
557
564
  )
558
565
  ] }) : null;
559
566
  }
560
567
  );
561
- Pe.displayName = "RichTextEditor";
562
- const ze = c.forwardRef(
563
- function({ content: n, className: s }, i) {
564
- const l = M({
568
+ Ke.displayName = "RichTextEditor";
569
+ const $e = o.forwardRef(
570
+ function({ content: s, className: r, ...n }, c) {
571
+ const i = B({
565
572
  extensions: [
566
- P.configure({
573
+ U.configure({
567
574
  heading: { levels: [2, 3] }
568
575
  }),
569
- D,
570
- z.configure({ multicolor: !1 }),
571
- B,
572
- U.configure({ nested: !0 }),
573
- K.configure({ types: ["heading", "paragraph"] }),
574
- $.configure({
576
+ P,
577
+ K.configure({ multicolor: !1 }),
578
+ z,
579
+ $.configure({ nested: !0 }),
580
+ M.configure({ types: ["heading", "paragraph"] }),
581
+ q.configure({
575
582
  openOnClick: !0,
576
583
  protocols: ["http", "https", "mailto"],
577
- validate: (r) => /^(https?:\/\/|mailto:)/i.test(r),
584
+ validate: (l) => /^(https?:\/\/|mailto:)/i.test(l),
578
585
  HTMLAttributes: {
579
586
  rel: "noopener noreferrer",
580
587
  target: "_blank"
@@ -586,24 +593,24 @@ const ze = c.forwardRef(
586
593
  class: "max-w-full rounded-ds-md"
587
594
  }
588
595
  }),
589
- W,
596
+ G,
590
597
  V.configure({
591
598
  HTMLAttributes: { class: "mention" }
592
599
  })
593
600
  ],
594
- content: n,
601
+ content: s,
595
602
  editable: !1,
596
603
  editorProps: {
597
604
  attributes: {
598
- class: p(...G)
605
+ class: p(...J)
599
606
  }
600
607
  }
601
608
  });
602
- return l ? /* @__PURE__ */ t("div", { ref: i, className: s, children: /* @__PURE__ */ t(q, { editor: l }) }) : null;
609
+ return i ? /* @__PURE__ */ t("div", { ref: c, ...n, className: r, children: /* @__PURE__ */ t(F, { editor: i }) }) : null;
603
610
  }
604
611
  );
605
- ze.displayName = "RichTextViewer";
612
+ $e.displayName = "RichTextViewer";
606
613
  export {
607
- Pe as RichTextEditor,
608
- ze as RichTextViewer
614
+ Ke as RichTextEditor,
615
+ $e as RichTextViewer
609
616
  };