@omnitron-dev/prism 0.1.3 → 0.3.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 (839) hide show
  1. package/dist/accessibility/index.d.ts +7 -151
  2. package/dist/accessibility/index.d.ts.map +1 -0
  3. package/dist/accessibility/index.js +0 -1
  4. package/dist/accessibility/index.js.map +1 -1
  5. package/dist/accessibility/vision-mode.d.ts +154 -0
  6. package/dist/accessibility/vision-mode.d.ts.map +1 -0
  7. package/dist/blocks/auth-block/auth-block.d.ts +107 -0
  8. package/dist/blocks/auth-block/auth-block.d.ts.map +1 -0
  9. package/dist/blocks/auth-block/guards.d.ts +262 -0
  10. package/dist/blocks/auth-block/guards.d.ts.map +1 -0
  11. package/dist/blocks/auth-block/index.d.ts +13 -0
  12. package/dist/blocks/auth-block/index.d.ts.map +1 -0
  13. package/dist/blocks/auth-block/types.d.ts +232 -0
  14. package/dist/blocks/auth-block/types.d.ts.map +1 -0
  15. package/dist/blocks/dashboard-block/dashboard-block.d.ts +53 -0
  16. package/dist/blocks/dashboard-block/dashboard-block.d.ts.map +1 -0
  17. package/dist/blocks/dashboard-block/index.d.ts +12 -0
  18. package/dist/blocks/dashboard-block/index.d.ts.map +1 -0
  19. package/dist/blocks/dashboard-block/types.d.ts +182 -0
  20. package/dist/blocks/dashboard-block/types.d.ts.map +1 -0
  21. package/dist/blocks/dashboard-block/use-dashboard-block.d.ts +95 -0
  22. package/dist/blocks/dashboard-block/use-dashboard-block.d.ts.map +1 -0
  23. package/dist/blocks/data-grid-block/data-grid-block.d.ts +81 -0
  24. package/dist/blocks/data-grid-block/data-grid-block.d.ts.map +1 -0
  25. package/dist/blocks/data-grid-block/index.d.ts +11 -0
  26. package/dist/blocks/data-grid-block/index.d.ts.map +1 -0
  27. package/dist/blocks/data-grid-block/types.d.ts +304 -0
  28. package/dist/blocks/data-grid-block/types.d.ts.map +1 -0
  29. package/dist/blocks/index.d.ts +10 -1235
  30. package/dist/blocks/index.d.ts.map +1 -0
  31. package/dist/blocks/index.js +187 -50
  32. package/dist/blocks/index.js.map +1 -1
  33. package/dist/{chunk-UR6X3W5I.js → chunk-6AHI4GSV.js} +3 -3
  34. package/dist/chunk-6AHI4GSV.js.map +1 -0
  35. package/dist/{chunk-JDTC2SBY.js → chunk-AD4W7HYC.js} +2 -2
  36. package/dist/chunk-AD4W7HYC.js.map +1 -0
  37. package/dist/{chunk-BTIT7WYH.js → chunk-ADG4HZEP.js} +3 -3
  38. package/dist/chunk-ADG4HZEP.js.map +1 -0
  39. package/dist/{chunk-JNU4QHJK.js → chunk-AYYFMTMI.js} +5 -4
  40. package/dist/{chunk-JNU4QHJK.js.map → chunk-AYYFMTMI.js.map} +1 -1
  41. package/dist/{chunk-HO2GKTWJ.js → chunk-BRDWQVRT.js} +2 -2
  42. package/dist/chunk-BRDWQVRT.js.map +1 -0
  43. package/dist/{chunk-WC2WM2JD.js → chunk-BZOL7GMU.js} +36 -18
  44. package/dist/chunk-BZOL7GMU.js.map +1 -0
  45. package/dist/chunk-DRFNMZLG.js +192 -0
  46. package/dist/chunk-DRFNMZLG.js.map +1 -0
  47. package/dist/{chunk-BV32OJ2A.js → chunk-GUFHFEPZ.js} +2 -2
  48. package/dist/chunk-GUFHFEPZ.js.map +1 -0
  49. package/dist/{chunk-LAEY5USO.js → chunk-OBJ244BO.js} +608 -95
  50. package/dist/chunk-OBJ244BO.js.map +1 -0
  51. package/dist/{chunk-E3XANPTO.js → chunk-S6SEGBX6.js} +32 -209
  52. package/dist/chunk-S6SEGBX6.js.map +1 -0
  53. package/dist/chunk-SNZK5X6F.js +594 -0
  54. package/dist/chunk-SNZK5X6F.js.map +1 -0
  55. package/dist/chunk-WFD54GQQ.js +1940 -0
  56. package/dist/chunk-WFD54GQQ.js.map +1 -0
  57. package/dist/{chunk-DDY7TLUI.js → chunk-XIXSSI3B.js} +28 -2
  58. package/dist/chunk-XIXSSI3B.js.map +1 -0
  59. package/dist/chunk-YQW43BDH.js +11978 -0
  60. package/dist/chunk-YQW43BDH.js.map +1 -0
  61. package/dist/{chunk-XWL6J6IO.js → chunk-YSIG2XYH.js} +2 -2
  62. package/dist/chunk-YSIG2XYH.js.map +1 -0
  63. package/dist/chunk-Z5OSPAOC.js +1576 -0
  64. package/dist/chunk-Z5OSPAOC.js.map +1 -0
  65. package/dist/{chunk-DXXZ3ITR.js → chunk-ZTATTUH7.js} +851 -500
  66. package/dist/chunk-ZTATTUH7.js.map +1 -0
  67. package/dist/cli/commands/add.d.ts +22 -0
  68. package/dist/cli/commands/add.d.ts.map +1 -0
  69. package/dist/cli/commands/diff.d.ts +13 -0
  70. package/dist/cli/commands/diff.d.ts.map +1 -0
  71. package/dist/cli/commands/doctor.d.ts +13 -0
  72. package/dist/cli/commands/doctor.d.ts.map +1 -0
  73. package/dist/cli/commands/init.d.ts +13 -0
  74. package/dist/cli/commands/init.d.ts.map +1 -0
  75. package/dist/cli/commands/list.d.ts +13 -0
  76. package/dist/cli/commands/list.d.ts.map +1 -0
  77. package/dist/cli/commands/remove.d.ts +13 -0
  78. package/dist/cli/commands/remove.d.ts.map +1 -0
  79. package/dist/cli/commands/update.d.ts +13 -0
  80. package/dist/cli/commands/update.d.ts.map +1 -0
  81. package/dist/cli/config.d.ts +73 -0
  82. package/dist/cli/config.d.ts.map +1 -0
  83. package/dist/cli/constants.d.ts +60 -0
  84. package/dist/cli/constants.d.ts.map +1 -0
  85. package/dist/cli/index.d.ts +27 -0
  86. package/dist/cli/index.d.ts.map +1 -0
  87. package/dist/cli/index.js +35 -41
  88. package/dist/cli/index.js.map +1 -1
  89. package/dist/components/accordion/accordion.d.ts +149 -0
  90. package/dist/components/accordion/accordion.d.ts.map +1 -0
  91. package/dist/components/accordion/index.d.ts +7 -0
  92. package/dist/components/accordion/index.d.ts.map +1 -0
  93. package/dist/components/admin-filters/admin-data-table.d.ts +185 -0
  94. package/dist/components/admin-filters/admin-data-table.d.ts.map +1 -0
  95. package/dist/components/admin-filters/amount-cell.d.ts +39 -0
  96. package/dist/components/admin-filters/amount-cell.d.ts.map +1 -0
  97. package/dist/components/admin-filters/filter-toolbar.d.ts +99 -0
  98. package/dist/components/admin-filters/filter-toolbar.d.ts.map +1 -0
  99. package/dist/components/admin-filters/index.d.ts +13 -0
  100. package/dist/components/admin-filters/index.d.ts.map +1 -0
  101. package/dist/components/admin-filters/status-chip.d.ts +55 -0
  102. package/dist/components/admin-filters/status-chip.d.ts.map +1 -0
  103. package/dist/components/alert/alert.d.ts +159 -0
  104. package/dist/components/alert/alert.d.ts.map +1 -0
  105. package/dist/components/alert/index.d.ts +7 -0
  106. package/dist/components/alert/index.d.ts.map +1 -0
  107. package/dist/components/animate/animate-border.d.ts +33 -0
  108. package/dist/components/animate/animate-border.d.ts.map +1 -0
  109. package/dist/components/animate/index.d.ts +3 -0
  110. package/dist/components/animate/index.d.ts.map +1 -0
  111. package/dist/components/animate/motion-lazy.d.ts +5 -0
  112. package/dist/components/animate/motion-lazy.d.ts.map +1 -0
  113. package/dist/components/avatar/avatar.d.ts +78 -0
  114. package/dist/components/avatar/avatar.d.ts.map +1 -0
  115. package/dist/components/avatar/index.d.ts +7 -0
  116. package/dist/components/avatar/index.d.ts.map +1 -0
  117. package/dist/components/badge/badge.d.ts +102 -0
  118. package/dist/components/badge/badge.d.ts.map +1 -0
  119. package/dist/components/badge/index.d.ts +7 -0
  120. package/dist/components/badge/index.d.ts.map +1 -0
  121. package/dist/components/breadcrumbs/breadcrumbs.d.ts +100 -0
  122. package/dist/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  123. package/dist/components/breadcrumbs/index.d.ts +7 -0
  124. package/dist/components/breadcrumbs/index.d.ts.map +1 -0
  125. package/dist/components/card/card.d.ts +127 -0
  126. package/dist/components/card/card.d.ts.map +1 -0
  127. package/dist/components/card/index.d.ts +7 -0
  128. package/dist/components/card/index.d.ts.map +1 -0
  129. package/dist/components/carousel/carousel.d.ts +35 -0
  130. package/dist/components/carousel/carousel.d.ts.map +1 -0
  131. package/dist/components/carousel/classes.d.ts +35 -0
  132. package/dist/components/carousel/classes.d.ts.map +1 -0
  133. package/dist/components/carousel/index.d.ts +10 -0
  134. package/dist/components/carousel/index.d.ts.map +1 -0
  135. package/dist/components/carousel/types.d.ts +167 -0
  136. package/dist/components/carousel/types.d.ts.map +1 -0
  137. package/dist/components/carousel/use-carousel.d.ts +51 -0
  138. package/dist/components/carousel/use-carousel.d.ts.map +1 -0
  139. package/dist/components/changelog/changelog-entry.d.ts +10 -0
  140. package/dist/components/changelog/changelog-entry.d.ts.map +1 -0
  141. package/dist/components/changelog/changelog-timeline.d.ts +9 -0
  142. package/dist/components/changelog/changelog-timeline.d.ts.map +1 -0
  143. package/dist/components/changelog/index.d.ts +3 -0
  144. package/dist/components/changelog/index.d.ts.map +1 -0
  145. package/dist/components/chart/chart.d.ts +39 -0
  146. package/dist/components/chart/chart.d.ts.map +1 -0
  147. package/dist/components/chart/classes.d.ts +24 -0
  148. package/dist/components/chart/classes.d.ts.map +1 -0
  149. package/dist/components/chart/components/chart-legends.d.ts +24 -0
  150. package/dist/components/chart/components/chart-legends.d.ts.map +1 -0
  151. package/dist/components/chart/components/chart-loading.d.ts +21 -0
  152. package/dist/components/chart/components/chart-loading.d.ts.map +1 -0
  153. package/dist/components/chart/components/index.d.ts +8 -0
  154. package/dist/components/chart/components/index.d.ts.map +1 -0
  155. package/dist/components/chart/index.d.ts +14 -0
  156. package/dist/components/chart/index.d.ts.map +1 -0
  157. package/dist/components/chart/types.d.ts +264 -0
  158. package/dist/components/chart/types.d.ts.map +1 -0
  159. package/dist/components/chart/use-chart.d.ts +34 -0
  160. package/dist/components/chart/use-chart.d.ts.map +1 -0
  161. package/dist/components/command-palette/command-palette.d.ts +73 -0
  162. package/dist/components/command-palette/command-palette.d.ts.map +1 -0
  163. package/dist/components/command-palette/index.d.ts +7 -0
  164. package/dist/components/command-palette/index.d.ts.map +1 -0
  165. package/dist/components/confirm-dialog/confirm-dialog.d.ts +89 -0
  166. package/dist/components/confirm-dialog/confirm-dialog.d.ts.map +1 -0
  167. package/dist/components/confirm-dialog/index.d.ts +7 -0
  168. package/dist/components/confirm-dialog/index.d.ts.map +1 -0
  169. package/dist/components/content-renderer/classes.d.ts +33 -0
  170. package/dist/components/content-renderer/classes.d.ts.map +1 -0
  171. package/dist/components/content-renderer/content-renderer.d.ts +37 -0
  172. package/dist/components/content-renderer/content-renderer.d.ts.map +1 -0
  173. package/dist/components/content-renderer/html-tags.d.ts +6 -0
  174. package/dist/components/content-renderer/html-tags.d.ts.map +1 -0
  175. package/dist/components/content-renderer/html-to-markdown.d.ts +7 -0
  176. package/dist/components/content-renderer/html-to-markdown.d.ts.map +1 -0
  177. package/dist/components/content-renderer/index.d.ts +7 -0
  178. package/dist/components/content-renderer/index.d.ts.map +1 -0
  179. package/dist/components/content-renderer/markdown.d.ts +23 -0
  180. package/dist/components/content-renderer/markdown.d.ts.map +1 -0
  181. package/dist/components/content-renderer/remark-spoiler.d.ts +9 -0
  182. package/dist/components/content-renderer/remark-spoiler.d.ts.map +1 -0
  183. package/dist/components/content-renderer/styles.d.ts +2 -0
  184. package/dist/components/content-renderer/styles.d.ts.map +1 -0
  185. package/dist/components/country-select/country-select.d.ts +101 -0
  186. package/dist/components/country-select/country-select.d.ts.map +1 -0
  187. package/dist/components/country-select/flag-icon.d.ts +36 -0
  188. package/dist/components/country-select/flag-icon.d.ts.map +1 -0
  189. package/dist/components/country-select/index.d.ts +5 -0
  190. package/dist/components/country-select/index.d.ts.map +1 -0
  191. package/dist/components/date-range-picker/date-range-input.d.ts +48 -0
  192. package/dist/components/date-range-picker/date-range-input.d.ts.map +1 -0
  193. package/dist/components/date-range-picker/date-range-picker.d.ts +39 -0
  194. package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -0
  195. package/dist/components/date-range-picker/index.d.ts +7 -0
  196. package/dist/components/date-range-picker/index.d.ts.map +1 -0
  197. package/dist/components/date-range-picker/use-date-range-picker.d.ts +28 -0
  198. package/dist/components/date-range-picker/use-date-range-picker.d.ts.map +1 -0
  199. package/dist/components/deadline-chip/deadline-chip.d.ts +41 -0
  200. package/dist/components/deadline-chip/deadline-chip.d.ts.map +1 -0
  201. package/dist/components/deadline-chip/index.d.ts +7 -0
  202. package/dist/components/deadline-chip/index.d.ts.map +1 -0
  203. package/dist/components/doc-layout/doc-layout.d.ts +17 -0
  204. package/dist/components/doc-layout/doc-layout.d.ts.map +1 -0
  205. package/dist/components/doc-layout/doc-section-nav.d.ts +16 -0
  206. package/dist/components/doc-layout/doc-section-nav.d.ts.map +1 -0
  207. package/dist/components/doc-layout/doc-sidebar.d.ts +15 -0
  208. package/dist/components/doc-layout/doc-sidebar.d.ts.map +1 -0
  209. package/dist/components/doc-layout/index.d.ts +4 -0
  210. package/dist/components/doc-layout/index.d.ts.map +1 -0
  211. package/dist/components/drawer/drawer.d.ts +65 -0
  212. package/dist/components/drawer/drawer.d.ts.map +1 -0
  213. package/dist/components/drawer/index.d.ts +7 -0
  214. package/dist/components/drawer/index.d.ts.map +1 -0
  215. package/dist/components/duration-picker/duration-picker.d.ts +24 -0
  216. package/dist/components/duration-picker/duration-picker.d.ts.map +1 -0
  217. package/dist/components/duration-picker/index.d.ts +2 -0
  218. package/dist/components/duration-picker/index.d.ts.map +1 -0
  219. package/dist/components/editor/classes.d.ts +52 -0
  220. package/dist/components/editor/classes.d.ts.map +1 -0
  221. package/dist/components/editor/editor.d.ts +15 -0
  222. package/dist/components/editor/editor.d.ts.map +1 -0
  223. package/dist/components/editor/extensions/clear-format.d.ts +3 -0
  224. package/dist/components/editor/extensions/clear-format.d.ts.map +1 -0
  225. package/dist/components/editor/extensions/index.d.ts +3 -0
  226. package/dist/components/editor/extensions/index.d.ts.map +1 -0
  227. package/dist/components/editor/extensions/text-transform.d.ts +20 -0
  228. package/dist/components/editor/extensions/text-transform.d.ts.map +1 -0
  229. package/dist/components/editor/icons/index.d.ts +42 -0
  230. package/dist/components/editor/icons/index.d.ts.map +1 -0
  231. package/dist/components/editor/index.d.ts +44 -0
  232. package/dist/components/editor/index.d.ts.map +1 -0
  233. package/dist/components/editor/index.js +3 -0
  234. package/dist/components/editor/index.js.map +1 -0
  235. package/dist/components/editor/presets.d.ts +3 -0
  236. package/dist/components/editor/presets.d.ts.map +1 -0
  237. package/dist/components/editor/styles.d.ts +2 -0
  238. package/dist/components/editor/styles.d.ts.map +1 -0
  239. package/dist/components/editor/toolbar/bubble-toolbar.d.ts +9 -0
  240. package/dist/components/editor/toolbar/bubble-toolbar.d.ts.map +1 -0
  241. package/dist/components/editor/toolbar/code-highlight-block.d.ts +3 -0
  242. package/dist/components/editor/toolbar/code-highlight-block.d.ts.map +1 -0
  243. package/dist/components/editor/toolbar/heading-block.d.ts +11 -0
  244. package/dist/components/editor/toolbar/heading-block.d.ts.map +1 -0
  245. package/dist/components/editor/toolbar/image-block.d.ts +11 -0
  246. package/dist/components/editor/toolbar/image-block.d.ts.map +1 -0
  247. package/dist/components/editor/toolbar/link-block.d.ts +13 -0
  248. package/dist/components/editor/toolbar/link-block.d.ts.map +1 -0
  249. package/dist/components/editor/toolbar/toolbar-item.d.ts +3 -0
  250. package/dist/components/editor/toolbar/toolbar-item.d.ts.map +1 -0
  251. package/dist/components/editor/toolbar/toolbar.d.ts +3 -0
  252. package/dist/components/editor/toolbar/toolbar.d.ts.map +1 -0
  253. package/dist/components/editor/toolbar/use-toolbar-state.d.ts +24 -0
  254. package/dist/components/editor/toolbar/use-toolbar-state.d.ts.map +1 -0
  255. package/dist/components/editor/types.d.ts +130 -0
  256. package/dist/components/editor/types.d.ts.map +1 -0
  257. package/dist/components/emoji-picker/emoji-picker.d.ts +24 -0
  258. package/dist/components/emoji-picker/emoji-picker.d.ts.map +1 -0
  259. package/dist/components/emoji-picker/emoji-search.d.ts +22 -0
  260. package/dist/components/emoji-picker/emoji-search.d.ts.map +1 -0
  261. package/dist/components/emoji-picker/emoji.d.ts +19 -0
  262. package/dist/components/emoji-picker/emoji.d.ts.map +1 -0
  263. package/dist/components/emoji-picker/index.d.ts +14 -0
  264. package/dist/components/emoji-picker/index.d.ts.map +1 -0
  265. package/dist/components/emoji-picker/index.js +3 -0
  266. package/dist/components/emoji-picker/index.js.map +1 -0
  267. package/dist/components/emoji-picker/twemoji-url.d.ts +26 -0
  268. package/dist/components/emoji-picker/twemoji-url.d.ts.map +1 -0
  269. package/dist/components/emoji-picker/types.d.ts +96 -0
  270. package/dist/components/emoji-picker/types.d.ts.map +1 -0
  271. package/dist/components/emoji-picker/use-emoji-data.d.ts +26 -0
  272. package/dist/components/emoji-picker/use-emoji-data.d.ts.map +1 -0
  273. package/dist/components/emoji-picker/use-recent-emojis.d.ts +16 -0
  274. package/dist/components/emoji-picker/use-recent-emojis.d.ts.map +1 -0
  275. package/dist/components/empty-content/empty-content.d.ts +92 -0
  276. package/dist/components/empty-content/empty-content.d.ts.map +1 -0
  277. package/dist/components/empty-content/index.d.ts +7 -0
  278. package/dist/components/empty-content/index.d.ts.map +1 -0
  279. package/dist/components/error-boundary/error-boundary.d.ts +162 -0
  280. package/dist/components/error-boundary/error-boundary.d.ts.map +1 -0
  281. package/dist/components/error-boundary/index.d.ts +7 -0
  282. package/dist/components/error-boundary/index.d.ts.map +1 -0
  283. package/dist/components/field/field-autocomplete.d.ts +74 -0
  284. package/dist/components/field/field-autocomplete.d.ts.map +1 -0
  285. package/dist/components/field/field-checkbox.d.ts +42 -0
  286. package/dist/components/field/field-checkbox.d.ts.map +1 -0
  287. package/dist/components/field/field-code.d.ts +80 -0
  288. package/dist/components/field/field-code.d.ts.map +1 -0
  289. package/dist/components/field/field-country-select.d.ts +84 -0
  290. package/dist/components/field/field-country-select.d.ts.map +1 -0
  291. package/dist/components/field/field-date-picker.d.ts +58 -0
  292. package/dist/components/field/field-date-picker.d.ts.map +1 -0
  293. package/dist/components/field/field-datetime-picker.d.ts +96 -0
  294. package/dist/components/field/field-datetime-picker.d.ts.map +1 -0
  295. package/dist/components/field/field-editor.d.ts +218 -0
  296. package/dist/components/field/field-editor.d.ts.map +1 -0
  297. package/dist/components/field/field-multi-checkbox.d.ts +91 -0
  298. package/dist/components/field/field-multi-checkbox.d.ts.map +1 -0
  299. package/dist/components/field/field-multi-select.d.ts +85 -0
  300. package/dist/components/field/field-multi-select.d.ts.map +1 -0
  301. package/dist/components/field/field-multi-switch.d.ts +93 -0
  302. package/dist/components/field/field-multi-switch.d.ts.map +1 -0
  303. package/dist/components/field/field-number.d.ts +50 -0
  304. package/dist/components/field/field-number.d.ts.map +1 -0
  305. package/dist/components/field/field-phone.d.ts +82 -0
  306. package/dist/components/field/field-phone.d.ts.map +1 -0
  307. package/dist/components/field/field-radio.d.ts +64 -0
  308. package/dist/components/field/field-radio.d.ts.map +1 -0
  309. package/dist/components/field/field-rating.d.ts +43 -0
  310. package/dist/components/field/field-rating.d.ts.map +1 -0
  311. package/dist/components/field/field-select.d.ts +50 -0
  312. package/dist/components/field/field-select.d.ts.map +1 -0
  313. package/dist/components/field/field-slider.d.ts +56 -0
  314. package/dist/components/field/field-slider.d.ts.map +1 -0
  315. package/dist/components/field/field-switch.d.ts +44 -0
  316. package/dist/components/field/field-switch.d.ts.map +1 -0
  317. package/dist/components/field/field-text.d.ts +38 -0
  318. package/dist/components/field/field-text.d.ts.map +1 -0
  319. package/dist/components/field/field-time-picker.d.ts +79 -0
  320. package/dist/components/field/field-time-picker.d.ts.map +1 -0
  321. package/dist/components/field/field-upload.d.ts +120 -0
  322. package/dist/components/field/field-upload.d.ts.map +1 -0
  323. package/dist/components/field/index.d.ts +149 -0
  324. package/dist/components/field/index.d.ts.map +1 -0
  325. package/dist/components/image/image.d.ts +79 -0
  326. package/dist/components/image/image.d.ts.map +1 -0
  327. package/dist/components/image/index.d.ts +7 -0
  328. package/dist/components/image/index.d.ts.map +1 -0
  329. package/dist/components/index.css +131 -0
  330. package/dist/components/index.css.map +1 -0
  331. package/dist/components/index.d.ts +61 -0
  332. package/dist/components/index.d.ts.map +1 -0
  333. package/dist/components/index.js +13 -0
  334. package/dist/components/index.js.map +1 -0
  335. package/dist/components/label/index.d.ts +7 -0
  336. package/dist/components/label/index.d.ts.map +1 -0
  337. package/dist/components/label/label.d.ts +71 -0
  338. package/dist/components/label/label.d.ts.map +1 -0
  339. package/dist/components/lightbox/classes.d.ts +34 -0
  340. package/dist/components/lightbox/classes.d.ts.map +1 -0
  341. package/dist/components/lightbox/index.d.ts +11 -0
  342. package/dist/components/lightbox/index.d.ts.map +1 -0
  343. package/dist/components/lightbox/lightbox.d.ts +42 -0
  344. package/dist/components/lightbox/lightbox.d.ts.map +1 -0
  345. package/dist/components/lightbox/types.d.ts +233 -0
  346. package/dist/components/lightbox/types.d.ts.map +1 -0
  347. package/dist/components/lightbox/use-lightbox.d.ts +42 -0
  348. package/dist/components/lightbox/use-lightbox.d.ts.map +1 -0
  349. package/dist/components/loading-screen/index.d.ts +8 -0
  350. package/dist/components/loading-screen/index.d.ts.map +1 -0
  351. package/dist/components/loading-screen/loading-screen.d.ts +37 -0
  352. package/dist/components/loading-screen/loading-screen.d.ts.map +1 -0
  353. package/dist/components/loading-screen/splash-screen.d.ts +80 -0
  354. package/dist/components/loading-screen/splash-screen.d.ts.map +1 -0
  355. package/dist/components/map/Map.d.ts +63 -0
  356. package/dist/components/map/Map.d.ts.map +1 -0
  357. package/dist/components/map/MapCoverageLayer.d.ts +25 -0
  358. package/dist/components/map/MapCoverageLayer.d.ts.map +1 -0
  359. package/dist/components/map/MapMarker.d.ts +17 -0
  360. package/dist/components/map/MapMarker.d.ts.map +1 -0
  361. package/dist/components/map/MapPointPicker.d.ts +26 -0
  362. package/dist/components/map/MapPointPicker.d.ts.map +1 -0
  363. package/dist/components/map/index.d.ts +14 -0
  364. package/dist/components/map/index.d.ts.map +1 -0
  365. package/dist/components/mega-menu/index.d.ts +12 -0
  366. package/dist/components/mega-menu/index.d.ts.map +1 -0
  367. package/dist/components/mega-menu/mega-menu-horizontal.d.ts +41 -0
  368. package/dist/components/mega-menu/mega-menu-horizontal.d.ts.map +1 -0
  369. package/dist/components/mega-menu/mega-menu-mobile.d.ts +28 -0
  370. package/dist/components/mega-menu/mega-menu-mobile.d.ts.map +1 -0
  371. package/dist/components/mega-menu/mega-menu-vertical.d.ts +28 -0
  372. package/dist/components/mega-menu/mega-menu-vertical.d.ts.map +1 -0
  373. package/dist/components/mega-menu/styles.d.ts +18 -0
  374. package/dist/components/mega-menu/styles.d.ts.map +1 -0
  375. package/dist/components/mega-menu/types.d.ts +200 -0
  376. package/dist/components/mega-menu/types.d.ts.map +1 -0
  377. package/dist/components/menu/index.d.ts +7 -0
  378. package/dist/components/menu/index.d.ts.map +1 -0
  379. package/dist/components/menu/menu.d.ts +144 -0
  380. package/dist/components/menu/menu.d.ts.map +1 -0
  381. package/dist/components/nav-card/index.d.ts +8 -0
  382. package/dist/components/nav-card/index.d.ts.map +1 -0
  383. package/dist/components/nav-card/nav-card-grid.d.ts +57 -0
  384. package/dist/components/nav-card/nav-card-grid.d.ts.map +1 -0
  385. package/dist/components/nav-card/nav-card.d.ts +69 -0
  386. package/dist/components/nav-card/nav-card.d.ts.map +1 -0
  387. package/dist/components/nav-section/components.d.ts +143 -0
  388. package/dist/components/nav-section/components.d.ts.map +1 -0
  389. package/dist/components/nav-section/index.d.ts +15 -0
  390. package/dist/components/nav-section/index.d.ts.map +1 -0
  391. package/dist/components/nav-section/nav-context.d.ts +80 -0
  392. package/dist/components/nav-section/nav-context.d.ts.map +1 -0
  393. package/dist/components/nav-section/nav-item.d.ts +20 -0
  394. package/dist/components/nav-section/nav-item.d.ts.map +1 -0
  395. package/dist/components/nav-section/nav-list.d.ts +25 -0
  396. package/dist/components/nav-section/nav-list.d.ts.map +1 -0
  397. package/dist/components/nav-section/nav-section-horizontal.d.ts +29 -0
  398. package/dist/components/nav-section/nav-section-horizontal.d.ts.map +1 -0
  399. package/dist/components/nav-section/nav-section-mini.d.ts +30 -0
  400. package/dist/components/nav-section/nav-section-mini.d.ts.map +1 -0
  401. package/dist/components/nav-section/nav-section-vertical.d.ts +37 -0
  402. package/dist/components/nav-section/nav-section-vertical.d.ts.map +1 -0
  403. package/dist/components/nav-section/styles.d.ts +35 -0
  404. package/dist/components/nav-section/styles.d.ts.map +1 -0
  405. package/dist/components/nav-section/types.d.ts +178 -0
  406. package/dist/components/nav-section/types.d.ts.map +1 -0
  407. package/dist/components/navigation-progress/index.d.ts +7 -0
  408. package/dist/components/navigation-progress/index.d.ts.map +1 -0
  409. package/dist/components/navigation-progress/navigation-progress.d.ts +36 -0
  410. package/dist/components/navigation-progress/navigation-progress.d.ts.map +1 -0
  411. package/dist/components/page-content/index.d.ts +7 -0
  412. package/dist/components/page-content/index.d.ts.map +1 -0
  413. package/dist/components/page-content/page-content.d.ts +55 -0
  414. package/dist/components/page-content/page-content.d.ts.map +1 -0
  415. package/dist/components/popover/index.d.ts +7 -0
  416. package/dist/components/popover/index.d.ts.map +1 -0
  417. package/dist/components/popover/popover.d.ts +124 -0
  418. package/dist/components/popover/popover.d.ts.map +1 -0
  419. package/dist/components/progress/countdown-ring.d.ts +60 -0
  420. package/dist/components/progress/countdown-ring.d.ts.map +1 -0
  421. package/dist/components/progress/index.d.ts +8 -0
  422. package/dist/components/progress/index.d.ts.map +1 -0
  423. package/dist/components/progress/progress.d.ts +106 -0
  424. package/dist/components/progress/progress.d.ts.map +1 -0
  425. package/dist/components/rail/index.d.ts +7 -0
  426. package/dist/components/rail/index.d.ts.map +1 -0
  427. package/dist/components/rail/rail.d.ts +39 -0
  428. package/dist/components/rail/rail.d.ts.map +1 -0
  429. package/dist/components/scroll-spy/index.d.ts +3 -0
  430. package/dist/components/scroll-spy/index.d.ts.map +1 -0
  431. package/dist/components/scroll-spy/scroll-spy-provider.d.ts +26 -0
  432. package/dist/components/scroll-spy/scroll-spy-provider.d.ts.map +1 -0
  433. package/dist/components/scroll-spy/scroll-spy-section.d.ts +10 -0
  434. package/dist/components/scroll-spy/scroll-spy-section.d.ts.map +1 -0
  435. package/dist/components/scroll-to-top/index.d.ts +7 -0
  436. package/dist/components/scroll-to-top/index.d.ts.map +1 -0
  437. package/dist/components/scroll-to-top/scroll-to-top.d.ts +25 -0
  438. package/dist/components/scroll-to-top/scroll-to-top.d.ts.map +1 -0
  439. package/dist/components/scrollbar/index.d.ts +7 -0
  440. package/dist/components/scrollbar/index.d.ts.map +1 -0
  441. package/dist/components/scrollbar/scrollbar.d.ts +59 -0
  442. package/dist/components/scrollbar/scrollbar.d.ts.map +1 -0
  443. package/dist/components/search-input/index.d.ts +2 -0
  444. package/dist/components/search-input/index.d.ts.map +1 -0
  445. package/dist/components/search-input/search-input.d.ts +46 -0
  446. package/dist/components/search-input/search-input.d.ts.map +1 -0
  447. package/dist/components/settings/index.d.ts +10 -0
  448. package/dist/components/settings/index.d.ts.map +1 -0
  449. package/dist/components/settings/settings-drawer.d.ts +39 -0
  450. package/dist/components/settings/settings-drawer.d.ts.map +1 -0
  451. package/dist/components/settings/settings-provider.d.ts +106 -0
  452. package/dist/components/settings/settings-provider.d.ts.map +1 -0
  453. package/dist/components/skeleton/index.d.ts +7 -0
  454. package/dist/components/skeleton/index.d.ts.map +1 -0
  455. package/dist/components/skeleton/skeleton.d.ts +77 -0
  456. package/dist/components/skeleton/skeleton.d.ts.map +1 -0
  457. package/dist/components/snackbar/index.d.ts +7 -0
  458. package/dist/components/snackbar/index.d.ts.map +1 -0
  459. package/dist/components/snackbar/snackbar.d.ts +120 -0
  460. package/dist/components/snackbar/snackbar.d.ts.map +1 -0
  461. package/dist/components/sponsored-slot/index.d.ts +3 -0
  462. package/dist/components/sponsored-slot/index.d.ts.map +1 -0
  463. package/dist/components/sponsored-slot/sponsored-slot.d.ts +16 -0
  464. package/dist/components/sponsored-slot/sponsored-slot.d.ts.map +1 -0
  465. package/dist/components/sponsored-slot/types.d.ts +45 -0
  466. package/dist/components/sponsored-slot/types.d.ts.map +1 -0
  467. package/dist/components/stepper/index.d.ts +7 -0
  468. package/dist/components/stepper/index.d.ts.map +1 -0
  469. package/dist/components/stepper/stepper.d.ts +145 -0
  470. package/dist/components/stepper/stepper.d.ts.map +1 -0
  471. package/dist/components/svg-color/index.d.ts +7 -0
  472. package/dist/components/svg-color/index.d.ts.map +1 -0
  473. package/dist/components/svg-color/svg-color.d.ts +80 -0
  474. package/dist/components/svg-color/svg-color.d.ts.map +1 -0
  475. package/dist/components/table/index.d.ts +7 -0
  476. package/dist/components/table/index.d.ts.map +1 -0
  477. package/dist/components/table/table.d.ts +184 -0
  478. package/dist/components/table/table.d.ts.map +1 -0
  479. package/dist/components/tabs/index.d.ts +7 -0
  480. package/dist/components/tabs/index.d.ts.map +1 -0
  481. package/dist/components/tabs/tabs.d.ts +146 -0
  482. package/dist/components/tabs/tabs.d.ts.map +1 -0
  483. package/dist/components/tag-cloud/index.d.ts +7 -0
  484. package/dist/components/tag-cloud/index.d.ts.map +1 -0
  485. package/dist/components/tag-cloud/tag-cloud.d.ts +58 -0
  486. package/dist/components/tag-cloud/tag-cloud.d.ts.map +1 -0
  487. package/dist/components/tiptap-renderer/index.d.ts +2 -0
  488. package/dist/components/tiptap-renderer/index.d.ts.map +1 -0
  489. package/dist/components/tiptap-renderer/tiptap-renderer.d.ts +45 -0
  490. package/dist/components/tiptap-renderer/tiptap-renderer.d.ts.map +1 -0
  491. package/dist/components/tooltip/index.d.ts +7 -0
  492. package/dist/components/tooltip/index.d.ts.map +1 -0
  493. package/dist/components/tooltip/tooltip.d.ts +38 -0
  494. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  495. package/dist/components/virtual-list/index.d.ts +7 -0
  496. package/dist/components/virtual-list/index.d.ts.map +1 -0
  497. package/dist/components/virtual-list/virtual-list.d.ts +64 -0
  498. package/dist/components/virtual-list/virtual-list.d.ts.map +1 -0
  499. package/dist/core/accessibility/index.d.ts +96 -0
  500. package/dist/core/accessibility/index.d.ts.map +1 -0
  501. package/dist/core/accessibility/skip-link.d.ts +31 -0
  502. package/dist/core/accessibility/skip-link.d.ts.map +1 -0
  503. package/dist/core/context.d.ts +99 -0
  504. package/dist/core/context.d.ts.map +1 -0
  505. package/dist/core/hooks/use-boolean.d.ts +54 -0
  506. package/dist/core/hooks/use-boolean.d.ts.map +1 -0
  507. package/dist/core/hooks/use-breakpoints.d.ts +87 -0
  508. package/dist/core/hooks/use-breakpoints.d.ts.map +1 -0
  509. package/dist/core/hooks/use-click-outside.d.ts +26 -0
  510. package/dist/core/hooks/use-click-outside.d.ts.map +1 -0
  511. package/dist/core/hooks/use-copy-to-clipboard.d.ts +66 -0
  512. package/dist/core/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  513. package/dist/core/hooks/use-countdown.d.ts +105 -0
  514. package/dist/core/hooks/use-countdown.d.ts.map +1 -0
  515. package/dist/core/hooks/use-debounce.d.ts +64 -0
  516. package/dist/core/hooks/use-debounce.d.ts.map +1 -0
  517. package/dist/core/hooks/use-event-listener.d.ts +37 -0
  518. package/dist/core/hooks/use-event-listener.d.ts.map +1 -0
  519. package/dist/core/hooks/use-interval.d.ts +30 -0
  520. package/dist/core/hooks/use-interval.d.ts.map +1 -0
  521. package/dist/core/hooks/use-is-client.d.ts +24 -0
  522. package/dist/core/hooks/use-is-client.d.ts.map +1 -0
  523. package/dist/core/hooks/use-local-storage.d.ts +61 -0
  524. package/dist/core/hooks/use-local-storage.d.ts.map +1 -0
  525. package/dist/core/hooks/use-media-query.d.ts +107 -0
  526. package/dist/core/hooks/use-media-query.d.ts.map +1 -0
  527. package/dist/core/hooks/use-mounted.d.ts +33 -0
  528. package/dist/core/hooks/use-mounted.d.ts.map +1 -0
  529. package/dist/core/hooks/use-multi-select.d.ts +113 -0
  530. package/dist/core/hooks/use-multi-select.d.ts.map +1 -0
  531. package/dist/core/hooks/use-previous.d.ts +23 -0
  532. package/dist/core/hooks/use-previous.d.ts.map +1 -0
  533. package/dist/core/hooks/use-set-state.d.ts +56 -0
  534. package/dist/core/hooks/use-set-state.d.ts.map +1 -0
  535. package/dist/core/hooks/use-tabs.d.ts +74 -0
  536. package/dist/core/hooks/use-tabs.d.ts.map +1 -0
  537. package/dist/core/hooks/use-timeout.d.ts +37 -0
  538. package/dist/core/hooks/use-timeout.d.ts.map +1 -0
  539. package/dist/core/index.d.ts +36 -453
  540. package/dist/core/index.d.ts.map +1 -0
  541. package/dist/core/index.js +6 -7
  542. package/dist/core/provider-stack.d.ts +181 -0
  543. package/dist/core/provider-stack.d.ts.map +1 -0
  544. package/dist/core/provider.d.ts +67 -0
  545. package/dist/core/provider.d.ts.map +1 -0
  546. package/dist/forms/index.d.ts +6 -557
  547. package/dist/forms/index.d.ts.map +1 -0
  548. package/dist/forms/index.js +0 -1
  549. package/dist/forms/index.js.map +1 -1
  550. package/dist/forms/schema-provider.d.ts +282 -0
  551. package/dist/forms/schema-provider.d.ts.map +1 -0
  552. package/dist/forms/schema-utils.d.ts +286 -0
  553. package/dist/forms/schema-utils.d.ts.map +1 -0
  554. package/dist/hooks/index.d.ts +38 -7
  555. package/dist/hooks/index.d.ts.map +1 -0
  556. package/dist/hooks/index.js +8 -8
  557. package/dist/hooks/use-array.d.ts +126 -0
  558. package/dist/hooks/use-array.d.ts.map +1 -0
  559. package/dist/hooks/use-async.d.ts +88 -0
  560. package/dist/hooks/use-async.d.ts.map +1 -0
  561. package/dist/hooks/use-back-to-top.d.ts +57 -0
  562. package/dist/hooks/use-back-to-top.d.ts.map +1 -0
  563. package/dist/hooks/use-client-rect.d.ts +67 -0
  564. package/dist/hooks/use-client-rect.d.ts.map +1 -0
  565. package/dist/hooks/use-config-from-query.d.ts +98 -0
  566. package/dist/hooks/use-config-from-query.d.ts.map +1 -0
  567. package/dist/hooks/use-cookies.d.ts +62 -0
  568. package/dist/hooks/use-cookies.d.ts.map +1 -0
  569. package/dist/hooks/use-countdown-date.d.ts +47 -0
  570. package/dist/hooks/use-countdown-date.d.ts.map +1 -0
  571. package/dist/hooks/use-countdown-seconds.d.ts +83 -0
  572. package/dist/hooks/use-countdown-seconds.d.ts.map +1 -0
  573. package/dist/hooks/use-double-click.d.ts +67 -0
  574. package/dist/hooks/use-double-click.d.ts.map +1 -0
  575. package/dist/hooks/use-focus-trap.d.ts +66 -0
  576. package/dist/hooks/use-focus-trap.d.ts.map +1 -0
  577. package/dist/hooks/use-image-dimensions.d.ts +124 -0
  578. package/dist/hooks/use-image-dimensions.d.ts.map +1 -0
  579. package/dist/hooks/use-infinite-scroll.d.ts +204 -0
  580. package/dist/hooks/use-infinite-scroll.d.ts.map +1 -0
  581. package/dist/hooks/use-intersection-observer.d.ts +93 -0
  582. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  583. package/dist/hooks/use-isomorphic-layout-effect.d.ts +34 -0
  584. package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +1 -0
  585. package/dist/hooks/use-keyboard-shortcut.d.ts +112 -0
  586. package/dist/hooks/use-keyboard-shortcut.d.ts.map +1 -0
  587. package/dist/hooks/use-lazy-query.d.ts +132 -0
  588. package/dist/hooks/use-lazy-query.d.ts.map +1 -0
  589. package/dist/hooks/use-mutation.d.ts +141 -0
  590. package/dist/hooks/use-mutation.d.ts.map +1 -0
  591. package/dist/hooks/use-online-status.d.ts +56 -0
  592. package/dist/hooks/use-online-status.d.ts.map +1 -0
  593. package/dist/hooks/use-password-visibility.d.ts +83 -0
  594. package/dist/hooks/use-password-visibility.d.ts.map +1 -0
  595. package/dist/hooks/use-popover-hover.d.ts +78 -0
  596. package/dist/hooks/use-popover-hover.d.ts.map +1 -0
  597. package/dist/hooks/use-scroll-offset-top.d.ts +69 -0
  598. package/dist/hooks/use-scroll-offset-top.d.ts.map +1 -0
  599. package/dist/hooks/use-scroll-position.d.ts +96 -0
  600. package/dist/hooks/use-scroll-position.d.ts.map +1 -0
  601. package/dist/hooks/use-session-storage.d.ts +66 -0
  602. package/dist/hooks/use-session-storage.d.ts.map +1 -0
  603. package/dist/hooks/use-throttle.d.ts +67 -0
  604. package/dist/hooks/use-throttle.d.ts.map +1 -0
  605. package/dist/hooks/use-update-effect.d.ts +53 -0
  606. package/dist/hooks/use-update-effect.d.ts.map +1 -0
  607. package/dist/hooks/use-window-size.d.ts +132 -0
  608. package/dist/hooks/use-window-size.d.ts.map +1 -0
  609. package/dist/http/client.d.ts +74 -0
  610. package/dist/http/client.d.ts.map +1 -0
  611. package/dist/http/index.d.ts +6 -229
  612. package/dist/http/index.d.ts.map +1 -0
  613. package/dist/http/index.js +0 -2
  614. package/dist/http/index.js.map +1 -1
  615. package/dist/http/types.d.ts +158 -0
  616. package/dist/http/types.d.ts.map +1 -0
  617. package/dist/index.d.ts +19 -9108
  618. package/dist/index.d.ts.map +1 -0
  619. package/dist/index.js +107 -11678
  620. package/dist/index.js.map +1 -1
  621. package/dist/layouts/auth/centered.d.ts +49 -0
  622. package/dist/layouts/auth/centered.d.ts.map +1 -0
  623. package/dist/layouts/auth/index.d.ts +12 -0
  624. package/dist/layouts/auth/index.d.ts.map +1 -0
  625. package/dist/layouts/auth/simple.d.ts +58 -0
  626. package/dist/layouts/auth/simple.d.ts.map +1 -0
  627. package/dist/layouts/auth/split.d.ts +81 -0
  628. package/dist/layouts/auth/split.d.ts.map +1 -0
  629. package/dist/layouts/core/context.d.ts +102 -0
  630. package/dist/layouts/core/context.d.ts.map +1 -0
  631. package/dist/layouts/core/css-vars.d.ts +43 -0
  632. package/dist/layouts/core/css-vars.d.ts.map +1 -0
  633. package/dist/layouts/core/header-section.d.ts +79 -0
  634. package/dist/layouts/core/header-section.d.ts.map +1 -0
  635. package/dist/layouts/core/index.d.ts +18 -0
  636. package/dist/layouts/core/index.d.ts.map +1 -0
  637. package/dist/layouts/core/layout-section.d.ts +64 -0
  638. package/dist/layouts/core/layout-section.d.ts.map +1 -0
  639. package/dist/layouts/core/user-menu.d.ts +88 -0
  640. package/dist/layouts/core/user-menu.d.ts.map +1 -0
  641. package/dist/layouts/dashboard/index.d.ts +10 -0
  642. package/dist/layouts/dashboard/index.d.ts.map +1 -0
  643. package/dist/layouts/dashboard/layout.d.ts +90 -0
  644. package/dist/layouts/dashboard/layout.d.ts.map +1 -0
  645. package/dist/layouts/dashboard/sidenav.d.ts +58 -0
  646. package/dist/layouts/dashboard/sidenav.d.ts.map +1 -0
  647. package/dist/layouts/dashboard/topnav.d.ts +41 -0
  648. package/dist/layouts/dashboard/topnav.d.ts.map +1 -0
  649. package/dist/layouts/index.d.ts +27 -850
  650. package/dist/layouts/index.d.ts.map +1 -0
  651. package/dist/layouts/index.js +3 -4
  652. package/dist/layouts/types.d.ts +317 -0
  653. package/dist/layouts/types.d.ts.map +1 -0
  654. package/dist/netron/context.d.ts +18 -0
  655. package/dist/netron/context.d.ts.map +1 -0
  656. package/dist/netron/hooks.d.ts +10 -0
  657. package/dist/netron/hooks.d.ts.map +1 -0
  658. package/dist/netron/index.d.ts +47 -4
  659. package/dist/netron/index.d.ts.map +1 -0
  660. package/dist/netron/index.js +1 -2
  661. package/dist/netron/types.d.ts +12 -0
  662. package/dist/netron/types.d.ts.map +1 -0
  663. package/dist/registry/index.d.ts +8 -341
  664. package/dist/registry/index.d.ts.map +1 -0
  665. package/dist/registry/index.js +1 -2
  666. package/dist/registry/installer.d.ts +137 -0
  667. package/dist/registry/installer.d.ts.map +1 -0
  668. package/dist/registry/manager.d.ts +196 -0
  669. package/dist/registry/manager.d.ts.map +1 -0
  670. package/dist/state/create-store.d.ts +164 -0
  671. package/dist/state/create-store.d.ts.map +1 -0
  672. package/dist/state/index.d.ts +12 -969
  673. package/dist/state/index.d.ts.map +1 -0
  674. package/dist/state/index.js +2 -3
  675. package/dist/state/settings-version.d.ts +255 -0
  676. package/dist/state/settings-version.d.ts.map +1 -0
  677. package/dist/state/stores/auth.d.ts +155 -0
  678. package/dist/state/stores/auth.d.ts.map +1 -0
  679. package/dist/state/stores/index.d.ts +10 -0
  680. package/dist/state/stores/index.d.ts.map +1 -0
  681. package/dist/state/stores/settings.d.ts +151 -0
  682. package/dist/state/stores/settings.d.ts.map +1 -0
  683. package/dist/state/stores/theme.d.ts +87 -0
  684. package/dist/state/stores/theme.d.ts.map +1 -0
  685. package/dist/state/stores/ui.d.ts +204 -0
  686. package/dist/state/stores/ui.d.ts.map +1 -0
  687. package/dist/theme/colors/base.d.ts +61 -0
  688. package/dist/theme/colors/base.d.ts.map +1 -0
  689. package/dist/theme/colors/index.d.ts +10 -0
  690. package/dist/theme/colors/index.d.ts.map +1 -0
  691. package/dist/theme/colors/luxury.d.ts +49 -0
  692. package/dist/theme/colors/luxury.d.ts.map +1 -0
  693. package/dist/theme/components/Autocomplete.d.ts +9 -0
  694. package/dist/theme/components/Autocomplete.d.ts.map +1 -0
  695. package/dist/theme/components/Button.d.ts +33 -0
  696. package/dist/theme/components/Button.d.ts.map +1 -0
  697. package/dist/theme/components/Card.d.ts +20 -0
  698. package/dist/theme/components/Card.d.ts.map +1 -0
  699. package/dist/theme/components/Chip.d.ts +29 -0
  700. package/dist/theme/components/Chip.d.ts.map +1 -0
  701. package/dist/theme/components/DataGrid.d.ts +15 -0
  702. package/dist/theme/components/DataGrid.d.ts.map +1 -0
  703. package/dist/theme/components/DatePicker.d.ts +19 -0
  704. package/dist/theme/components/DatePicker.d.ts.map +1 -0
  705. package/dist/theme/components/Dialog.d.ts +23 -0
  706. package/dist/theme/components/Dialog.d.ts.map +1 -0
  707. package/dist/theme/components/FormControls.d.ts +53 -0
  708. package/dist/theme/components/FormControls.d.ts.map +1 -0
  709. package/dist/theme/components/Tabs.d.ts +21 -0
  710. package/dist/theme/components/Tabs.d.ts.map +1 -0
  711. package/dist/theme/components/TextField.d.ts +87 -0
  712. package/dist/theme/components/TextField.d.ts.map +1 -0
  713. package/dist/theme/components/index.d.ts +27 -0
  714. package/dist/theme/components/index.d.ts.map +1 -0
  715. package/dist/theme/components/theme-utils.d.ts +42 -0
  716. package/dist/theme/components/theme-utils.d.ts.map +1 -0
  717. package/dist/theme/create-theme.d.ts +131 -0
  718. package/dist/theme/create-theme.d.ts.map +1 -0
  719. package/dist/theme/css-variables.d.ts +42 -0
  720. package/dist/theme/css-variables.d.ts.map +1 -0
  721. package/dist/theme/custom-shadows.d.ts +58 -0
  722. package/dist/theme/custom-shadows.d.ts.map +1 -0
  723. package/dist/theme/index.d.ts +23 -1045
  724. package/dist/theme/index.d.ts.map +1 -0
  725. package/dist/theme/index.js +2 -3
  726. package/dist/theme/mixins.d.ts +332 -0
  727. package/dist/theme/mixins.d.ts.map +1 -0
  728. package/dist/theme/opacity.d.ts +51 -0
  729. package/dist/theme/opacity.d.ts.map +1 -0
  730. package/dist/theme/palette/builder.d.ts +138 -0
  731. package/dist/theme/palette/builder.d.ts.map +1 -0
  732. package/dist/theme/palette/index.d.ts +7 -0
  733. package/dist/theme/palette/index.d.ts.map +1 -0
  734. package/dist/theme/palette.d.ts +43 -0
  735. package/dist/theme/palette.d.ts.map +1 -0
  736. package/dist/theme/presets/arctic.d.ts +13 -0
  737. package/dist/theme/presets/arctic.d.ts.map +1 -0
  738. package/dist/theme/presets/default.d.ts +13 -0
  739. package/dist/theme/presets/default.d.ts.map +1 -0
  740. package/dist/theme/presets/dracula.d.ts +27 -0
  741. package/dist/theme/presets/dracula.d.ts.map +1 -0
  742. package/dist/theme/presets/ember.d.ts +23 -0
  743. package/dist/theme/presets/ember.d.ts.map +1 -0
  744. package/dist/theme/presets/index.d.ts +39 -0
  745. package/dist/theme/presets/index.d.ts.map +1 -0
  746. package/dist/theme/presets/luxury.d.ts +13 -0
  747. package/dist/theme/presets/luxury.d.ts.map +1 -0
  748. package/dist/theme/presets/midnight.d.ts +23 -0
  749. package/dist/theme/presets/midnight.d.ts.map +1 -0
  750. package/dist/theme/presets/minimal.d.ts +23 -0
  751. package/dist/theme/presets/minimal.d.ts.map +1 -0
  752. package/dist/theme/presets/nature.d.ts +14 -0
  753. package/dist/theme/presets/nature.d.ts.map +1 -0
  754. package/dist/theme/presets/retro.d.ts +23 -0
  755. package/dist/theme/presets/retro.d.ts.map +1 -0
  756. package/dist/theme/shadows.d.ts +61 -0
  757. package/dist/theme/shadows.d.ts.map +1 -0
  758. package/dist/theme/typography.d.ts +24 -0
  759. package/dist/theme/typography.d.ts.map +1 -0
  760. package/dist/theme/utils/color.d.ts +295 -0
  761. package/dist/theme/utils/color.d.ts.map +1 -0
  762. package/dist/theme/utils/index.d.ts +7 -0
  763. package/dist/theme/utils/index.d.ts.map +1 -0
  764. package/dist/{registry-BrDNftd5.d.ts → types/blocks.d.ts} +30 -191
  765. package/dist/types/blocks.d.ts.map +1 -0
  766. package/dist/types/components.d.ts +139 -0
  767. package/dist/types/components.d.ts.map +1 -0
  768. package/dist/{config-BA6IeTq9.d.ts → types/config.d.ts} +14 -16
  769. package/dist/types/config.d.ts.map +1 -0
  770. package/dist/types/index.d.ts +11 -144
  771. package/dist/types/index.d.ts.map +1 -0
  772. package/dist/types/index.js +1 -2
  773. package/dist/types/registry.d.ts +158 -0
  774. package/dist/types/registry.d.ts.map +1 -0
  775. package/dist/{theme-CrXLfP1c.d.ts → types/theme.d.ts} +31 -34
  776. package/dist/types/theme.d.ts.map +1 -0
  777. package/dist/utils/async-lock.d.ts +169 -0
  778. package/dist/utils/async-lock.d.ts.map +1 -0
  779. package/dist/utils/cn.d.ts +80 -0
  780. package/dist/utils/cn.d.ts.map +1 -0
  781. package/dist/utils/cookies.d.ts +68 -0
  782. package/dist/utils/cookies.d.ts.map +1 -0
  783. package/dist/utils/create-classes.d.ts +90 -0
  784. package/dist/utils/create-classes.d.ts.map +1 -0
  785. package/dist/utils/errors.d.ts +201 -0
  786. package/dist/utils/errors.d.ts.map +1 -0
  787. package/dist/utils/fetch-interceptor.d.ts +230 -0
  788. package/dist/utils/fetch-interceptor.d.ts.map +1 -0
  789. package/dist/utils/font.d.ts +65 -0
  790. package/dist/utils/font.d.ts.map +1 -0
  791. package/dist/utils/format-crypto.d.ts +312 -0
  792. package/dist/utils/format-crypto.d.ts.map +1 -0
  793. package/dist/utils/format-date.d.ts +240 -0
  794. package/dist/utils/format-date.d.ts.map +1 -0
  795. package/dist/utils/format-number.d.ts +245 -0
  796. package/dist/utils/format-number.d.ts.map +1 -0
  797. package/dist/utils/i18n-text.d.ts +68 -0
  798. package/dist/utils/i18n-text.d.ts.map +1 -0
  799. package/dist/utils/index.d.ts +30 -0
  800. package/dist/utils/index.d.ts.map +1 -0
  801. package/dist/utils/jwt.d.ts +227 -0
  802. package/dist/utils/jwt.d.ts.map +1 -0
  803. package/dist/utils/object.d.ts +96 -0
  804. package/dist/utils/object.d.ts.map +1 -0
  805. package/dist/utils/refs.d.ts +60 -0
  806. package/dist/utils/refs.d.ts.map +1 -0
  807. package/dist/utils/rtl.d.ts +75 -0
  808. package/dist/utils/rtl.d.ts.map +1 -0
  809. package/dist/utils/storage.d.ts +190 -0
  810. package/dist/utils/storage.d.ts.map +1 -0
  811. package/dist/utils/string.d.ts +216 -0
  812. package/dist/utils/string.d.ts.map +1 -0
  813. package/dist/utils/template-resolver.d.ts +12 -0
  814. package/dist/utils/template-resolver.d.ts.map +1 -0
  815. package/dist/utils/toast.d.ts +25 -0
  816. package/dist/utils/toast.d.ts.map +1 -0
  817. package/dist/utils/transform-number.d.ts +108 -0
  818. package/dist/utils/transform-number.d.ts.map +1 -0
  819. package/dist/utils/url.d.ts +198 -0
  820. package/dist/utils/url.d.ts.map +1 -0
  821. package/package.json +77 -61
  822. package/dist/chunk-77KIJLPP.js +0 -37
  823. package/dist/chunk-77KIJLPP.js.map +0 -1
  824. package/dist/chunk-BTIT7WYH.js.map +0 -1
  825. package/dist/chunk-BV32OJ2A.js.map +0 -1
  826. package/dist/chunk-DDY7TLUI.js.map +0 -1
  827. package/dist/chunk-DXXZ3ITR.js.map +0 -1
  828. package/dist/chunk-E3XANPTO.js.map +0 -1
  829. package/dist/chunk-GYDT5EKX.js +0 -16505
  830. package/dist/chunk-GYDT5EKX.js.map +0 -1
  831. package/dist/chunk-HO2GKTWJ.js.map +0 -1
  832. package/dist/chunk-JDTC2SBY.js.map +0 -1
  833. package/dist/chunk-LAEY5USO.js.map +0 -1
  834. package/dist/chunk-UR6X3W5I.js.map +0 -1
  835. package/dist/chunk-WC2WM2JD.js.map +0 -1
  836. package/dist/chunk-XWL6J6IO.js.map +0 -1
  837. package/dist/index-odhPSv9I.d.ts +0 -2491
  838. package/dist/settings-plpR26Xk.d.ts +0 -455
  839. package/dist/use-timeout-D7U3EAtH.d.ts +0 -808
@@ -0,0 +1,1940 @@
1
+ import { useState, useCallback, useMemo, useEffect } from 'react';
2
+ import { createLowlight, common } from 'lowlight';
3
+ import StarterKitExtension from '@tiptap/starter-kit';
4
+ import UnderlineExtension from '@tiptap/extension-underline';
5
+ import TextAlignExtension from '@tiptap/extension-text-align';
6
+ import ImageExtension from '@tiptap/extension-image';
7
+ import LinkExtension from '@tiptap/extension-link';
8
+ import PlaceholderExtension from '@tiptap/extension-placeholder';
9
+ import TaskListExtension from '@tiptap/extension-task-list';
10
+ import TaskItemExtension from '@tiptap/extension-task-item';
11
+ import CodeBlockLowlightExtension from '@tiptap/extension-code-block-lowlight';
12
+ import { useEditorState, NodeViewWrapper, NodeViewContent, ReactNodeViewRenderer, useEditor, EditorContent } from '@tiptap/react';
13
+ import Box from '@mui/material/Box';
14
+ import Portal from '@mui/material/Portal';
15
+ import Backdrop from '@mui/material/Backdrop';
16
+ import FormHelperText from '@mui/material/FormHelperText';
17
+ import { styled, alpha } from '@mui/material/styles';
18
+ import Divider from '@mui/material/Divider';
19
+ import SvgIcon2 from '@mui/material/SvgIcon';
20
+ import Tooltip from '@mui/material/Tooltip';
21
+ import ButtonBase, { buttonBaseClasses } from '@mui/material/ButtonBase';
22
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
23
+ import Menu from '@mui/material/Menu';
24
+ import { listClasses } from '@mui/material/List';
25
+ import Button from '@mui/material/Button';
26
+ import Popover from '@mui/material/Popover';
27
+ import TextField2 from '@mui/material/TextField';
28
+ import Typography from '@mui/material/Typography';
29
+ import { BubbleMenu } from '@tiptap/react/menus';
30
+ import { Extension, Mark } from '@tiptap/core';
31
+
32
+ // src/components/editor/types.ts
33
+ var DEFAULT_EDITOR_LABELS = {
34
+ bold: "Bold (\u2318B)",
35
+ italic: "Italic (\u2318I)",
36
+ underline: "Underline (\u2318U)",
37
+ strike: "Strikethrough",
38
+ inlineCode: "Inline code (\u2318E)",
39
+ clearFormat: "Clear format (\u2318\u21E7X)",
40
+ headingMenu: "Heading menu",
41
+ bulletList: "Bullet list",
42
+ orderedList: "Ordered list",
43
+ taskList: "Task list",
44
+ alignLeft: "Align left",
45
+ alignCenter: "Align center",
46
+ alignRight: "Align right",
47
+ alignJustify: "Align justify",
48
+ blockquote: "Blockquote",
49
+ codeBlock: "Code block",
50
+ horizontalRule: "Horizontal rule",
51
+ insertLink: "Insert link",
52
+ removeLink: "Remove link",
53
+ insertImage: "Insert image",
54
+ hardBreak: "Hard break",
55
+ undo: "Undo (\u2318Z)",
56
+ redo: "Redo (\u2318\u21E7Z)",
57
+ fullscreen: "Fullscreen",
58
+ exitFullscreen: "Exit fullscreen",
59
+ linkUrlField: "Link URL",
60
+ linkApply: "Apply",
61
+ imagePopoverTitle: "Add image",
62
+ imageUrlField: "Image URL",
63
+ imageAltField: "Alt text",
64
+ imageApply: "Apply",
65
+ codeLanguageAuto: "auto"
66
+ };
67
+
68
+ // src/components/editor/classes.ts
69
+ var cls = (name) => `prism-editor-${name}`;
70
+ var editorClasses = {
71
+ root: cls("root"),
72
+ toolbar: {
73
+ root: cls("toolbar"),
74
+ hr: cls("toolbar-hr"),
75
+ bold: cls("toolbar-bold"),
76
+ italic: cls("toolbar-italic"),
77
+ underline: cls("toolbar-underline"),
78
+ strike: cls("toolbar-strike"),
79
+ code: cls("toolbar-code"),
80
+ codeBlock: cls("toolbar-code-block"),
81
+ link: cls("toolbar-link"),
82
+ unlink: cls("toolbar-unlink"),
83
+ image: cls("toolbar-image"),
84
+ alignLeft: cls("toolbar-align-left"),
85
+ alignCenter: cls("toolbar-align-center"),
86
+ alignRight: cls("toolbar-align-right"),
87
+ alignJustify: cls("toolbar-align-justify"),
88
+ bulletList: cls("toolbar-bullet-list"),
89
+ orderedList: cls("toolbar-ordered-list"),
90
+ taskList: cls("toolbar-task-list"),
91
+ blockquote: cls("toolbar-blockquote"),
92
+ hardBreak: cls("toolbar-hard-break"),
93
+ clear: cls("toolbar-clear"),
94
+ undo: cls("toolbar-undo"),
95
+ redo: cls("toolbar-redo"),
96
+ fullscreen: cls("toolbar-fullscreen")
97
+ },
98
+ content: {
99
+ root: cls("content"),
100
+ hr: cls("content-hr"),
101
+ link: cls("content-link"),
102
+ image: cls("content-image"),
103
+ heading: cls("content-heading"),
104
+ codeInline: cls("content-code-inline"),
105
+ codeBlock: cls("content-code-block"),
106
+ langSelect: cls("content-lang-select"),
107
+ blockquote: cls("content-blockquote"),
108
+ bulletList: cls("content-bullet-list"),
109
+ orderedList: cls("content-ordered-list"),
110
+ listItem: cls("content-list-item"),
111
+ taskList: cls("content-task-list"),
112
+ taskItem: cls("content-task-item"),
113
+ placeholder: cls("content-placeholder")
114
+ },
115
+ state: {
116
+ error: cls("state-error"),
117
+ disabled: cls("state-disabled"),
118
+ fullscreen: cls("state-fullscreen")
119
+ }
120
+ };
121
+ var MARGIN = "0.75em";
122
+ var EditorRoot = styled("div")(({ theme }) => ({
123
+ minHeight: 240,
124
+ display: "flex",
125
+ flexDirection: "column",
126
+ borderRadius: Number(theme.shape.borderRadius) * 1.5,
127
+ border: `solid 1px ${alpha(theme.palette.grey[500], 0.2)}`,
128
+ transition: theme.transitions.create(["border-color", "box-shadow"], {
129
+ duration: theme.transitions.duration.short
130
+ }),
131
+ "&:focus-within": {
132
+ borderColor: theme.palette.primary.main,
133
+ boxShadow: `0 0 0 1px ${alpha(theme.palette.primary.main, 0.2)}`
134
+ },
135
+ // ---------------------------------------------------------------------------
136
+ // State: error
137
+ // ---------------------------------------------------------------------------
138
+ [`&.${editorClasses.state.error}`]: {
139
+ borderColor: theme.palette.error.main,
140
+ [`& .${editorClasses.content.root}`]: {
141
+ backgroundColor: alpha(theme.palette.error.main, 0.04)
142
+ }
143
+ },
144
+ // ---------------------------------------------------------------------------
145
+ // State: disabled
146
+ // ---------------------------------------------------------------------------
147
+ [`&.${editorClasses.state.disabled}`]: {
148
+ opacity: 0.48,
149
+ pointerEvents: "none"
150
+ },
151
+ // ---------------------------------------------------------------------------
152
+ // State: fullscreen
153
+ // ---------------------------------------------------------------------------
154
+ [`&.${editorClasses.state.fullscreen}`]: {
155
+ top: 16,
156
+ left: 16,
157
+ position: "fixed",
158
+ maxHeight: "unset",
159
+ width: "calc(100% - 32px)",
160
+ height: "calc(100% - 32px)",
161
+ zIndex: theme.zIndex.modal,
162
+ borderRadius: Number(theme.shape.borderRadius) * 2,
163
+ backgroundColor: theme.palette.background.default,
164
+ boxShadow: theme.shadows[24]
165
+ },
166
+ // ---------------------------------------------------------------------------
167
+ // Placeholder
168
+ // ---------------------------------------------------------------------------
169
+ [`& .${editorClasses.content.placeholder}`]: {
170
+ // `:first-child::before` — placeholder is rendered as the first
171
+ // element of the editable content area when the editor is empty.
172
+ // The previous of-type form fired only when the placeholder was
173
+ // the first sibling of its tag, which is fragile if the editor
174
+ // wrapper changes tag (the placeholder might be the SECOND child
175
+ // of its tag but still the first child overall — both intents
176
+ // converge on the first-child variant).
177
+ "&:first-child::before": {
178
+ ...theme.typography.body2,
179
+ height: 0,
180
+ float: "left",
181
+ pointerEvents: "none",
182
+ content: "attr(data-placeholder)",
183
+ color: theme.palette.text.disabled
184
+ }
185
+ },
186
+ // ---------------------------------------------------------------------------
187
+ // Content area
188
+ // ---------------------------------------------------------------------------
189
+ [`& .${editorClasses.content.root}`]: {
190
+ display: "flex",
191
+ flex: "1 1 auto",
192
+ overflowY: "auto",
193
+ flexDirection: "column",
194
+ borderBottomLeftRadius: "inherit",
195
+ borderBottomRightRadius: "inherit",
196
+ backgroundColor: alpha(theme.palette.grey[500], 0.04),
197
+ "& .tiptap": {
198
+ "> * + *": { marginTop: 0, marginBottom: MARGIN },
199
+ "&.ProseMirror": {
200
+ flex: "1 1 auto",
201
+ outline: "none",
202
+ padding: theme.spacing(0, 2)
203
+ },
204
+ // Headings
205
+ h1: { ...theme.typography.h1, marginTop: 40, marginBottom: 8 },
206
+ h2: { ...theme.typography.h2, marginTop: 40, marginBottom: 8 },
207
+ h3: { ...theme.typography.h3, marginTop: 24, marginBottom: 8 },
208
+ h4: { ...theme.typography.h4, marginTop: 24, marginBottom: 8 },
209
+ h5: { ...theme.typography.h5, marginTop: 24, marginBottom: 8 },
210
+ h6: { ...theme.typography.h6, marginTop: 24, marginBottom: 8 },
211
+ p: { ...theme.typography.body1, marginBottom: "1.25rem" },
212
+ // Link
213
+ [`& .${editorClasses.content.link}`]: {
214
+ color: theme.palette.primary.main,
215
+ textDecoration: "none",
216
+ "&:hover": { textDecoration: "underline" }
217
+ },
218
+ // Horizontal rule
219
+ [`& .${editorClasses.content.hr}`]: {
220
+ flexShrink: 0,
221
+ borderWidth: 0,
222
+ margin: "2em 0",
223
+ borderStyle: "solid",
224
+ borderBottomWidth: "thin",
225
+ borderColor: theme.palette.divider
226
+ },
227
+ // Image
228
+ [`& .${editorClasses.content.image}`]: {
229
+ width: "100%",
230
+ height: "auto",
231
+ maxWidth: "100%",
232
+ borderRadius: theme.shape.borderRadius,
233
+ margin: "auto auto 1.25em",
234
+ "&.ProseMirror-selectednode": {
235
+ outline: `2px solid ${theme.palette.primary.main}`,
236
+ outlineOffset: 2
237
+ }
238
+ },
239
+ // Lists
240
+ [`& .${editorClasses.content.bulletList}`]: {
241
+ paddingLeft: 16,
242
+ listStyleType: "disc"
243
+ },
244
+ [`& .${editorClasses.content.orderedList}`]: {
245
+ paddingLeft: 16
246
+ },
247
+ [`& .${editorClasses.content.listItem}`]: {
248
+ lineHeight: 2,
249
+ "& > p": { margin: 0 }
250
+ },
251
+ // Task list
252
+ [`& .${editorClasses.content.taskList}`]: {
253
+ listStyle: "none",
254
+ padding: 0,
255
+ "& li": {
256
+ display: "flex",
257
+ alignItems: "flex-start",
258
+ gap: theme.spacing(1),
259
+ "& > label": {
260
+ marginTop: 4,
261
+ flexShrink: 0
262
+ },
263
+ "& > div": { flex: 1 }
264
+ }
265
+ },
266
+ // Blockquote
267
+ [`& .${editorClasses.content.blockquote}`]: {
268
+ lineHeight: 1.5,
269
+ fontSize: "1.5em",
270
+ margin: "24px auto",
271
+ position: "relative",
272
+ fontFamily: "Georgia, serif",
273
+ padding: theme.spacing(3, 3, 3, 8),
274
+ color: theme.palette.text.secondary,
275
+ borderLeft: `solid 8px ${alpha(theme.palette.grey[500], 0.08)}`,
276
+ [theme.breakpoints.up("md")]: { width: "100%", maxWidth: 640 },
277
+ "& p": { margin: 0, fontSize: "inherit", fontFamily: "inherit" },
278
+ "&::before": {
279
+ left: 16,
280
+ top: -8,
281
+ display: "block",
282
+ fontSize: "3em",
283
+ content: '"\\201C"',
284
+ position: "absolute",
285
+ color: theme.palette.text.disabled
286
+ }
287
+ },
288
+ // Inline code
289
+ [`& .${editorClasses.content.codeInline}`]: {
290
+ padding: theme.spacing(0.25, 0.5),
291
+ color: theme.palette.text.secondary,
292
+ fontSize: theme.typography.body2.fontSize,
293
+ borderRadius: Number(theme.shape.borderRadius) / 2,
294
+ backgroundColor: alpha(theme.palette.grey[500], 0.16),
295
+ fontFamily: "'JetBrains Mono', 'Fira Code', monospace"
296
+ },
297
+ // Code block
298
+ [`& .${editorClasses.content.codeBlock}`]: {
299
+ position: "relative",
300
+ "& pre": {
301
+ overflowX: "auto",
302
+ color: theme.palette.common.white,
303
+ padding: theme.spacing(5, 3, 3, 3),
304
+ borderRadius: theme.shape.borderRadius,
305
+ backgroundColor: theme.palette.grey[900],
306
+ fontFamily: "'JetBrains Mono', 'Fira Code', monospace",
307
+ "& code": { fontSize: theme.typography.body2.fontSize }
308
+ },
309
+ [`& .${editorClasses.content.langSelect}`]: {
310
+ top: 8,
311
+ right: 8,
312
+ zIndex: 1,
313
+ padding: 4,
314
+ outline: "none",
315
+ borderRadius: 4,
316
+ position: "absolute",
317
+ color: theme.palette.common.white,
318
+ fontWeight: theme.typography.fontWeightMedium,
319
+ borderColor: alpha(theme.palette.grey[500], 0.08),
320
+ backgroundColor: alpha(theme.palette.grey[500], 0.08)
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }));
326
+
327
+ // src/components/editor/presets.ts
328
+ var PRESET_ITEMS = {
329
+ /**
330
+ * Full — CMS pages, blog articles, documentation.
331
+ * Everything enabled including headings, alignment, code blocks, images.
332
+ */
333
+ full: [
334
+ "heading",
335
+ "bold",
336
+ "italic",
337
+ "underline",
338
+ "strike",
339
+ "code",
340
+ "bulletList",
341
+ "orderedList",
342
+ "taskList",
343
+ "alignLeft",
344
+ "alignCenter",
345
+ "alignRight",
346
+ "alignJustify",
347
+ "blockquote",
348
+ "codeBlock",
349
+ "horizontalRule",
350
+ "link",
351
+ "image",
352
+ "hardBreak",
353
+ "clearFormat",
354
+ "undo",
355
+ "redo",
356
+ "fullscreen"
357
+ ],
358
+ /**
359
+ * Standard — blog posts, forum discussions, product descriptions.
360
+ * Most formatting without advanced alignment and task lists.
361
+ */
362
+ standard: [
363
+ "heading",
364
+ "bold",
365
+ "italic",
366
+ "underline",
367
+ "strike",
368
+ "bulletList",
369
+ "orderedList",
370
+ "blockquote",
371
+ "codeBlock",
372
+ "link",
373
+ "image",
374
+ "hardBreak",
375
+ "clearFormat",
376
+ "undo",
377
+ "redo",
378
+ "fullscreen"
379
+ ],
380
+ /**
381
+ * Compact — comments, forum replies.
382
+ * Basic formatting, links, code, no images/headings.
383
+ */
384
+ compact: [
385
+ "bold",
386
+ "italic",
387
+ "underline",
388
+ "strike",
389
+ "code",
390
+ "bulletList",
391
+ "orderedList",
392
+ "blockquote",
393
+ "link",
394
+ "clearFormat"
395
+ ],
396
+ /**
397
+ * Minimal — quick feedback, short messages.
398
+ * Only essential inline formatting.
399
+ */
400
+ minimal: ["bold", "italic", "code", "link"],
401
+ /**
402
+ * Chat — messaging system.
403
+ * Lightweight formatting, optimized for speed.
404
+ */
405
+ chat: ["bold", "italic", "strike", "code", "link", "bulletList", "orderedList", "codeBlock"],
406
+ /**
407
+ * Inline — single-line fields (titles, captions).
408
+ * No toolbar, no block-level elements.
409
+ */
410
+ inline: []
411
+ };
412
+ var PRESET_BUBBLE_MENU = {
413
+ full: true,
414
+ standard: true,
415
+ compact: true,
416
+ minimal: false,
417
+ chat: false,
418
+ inline: false
419
+ };
420
+ function resolveToolbar(config) {
421
+ if (!config) {
422
+ return resolveToolbar("standard");
423
+ }
424
+ if (typeof config === "string") {
425
+ return {
426
+ items: new Set(PRESET_ITEMS[config]),
427
+ bubbleMenu: PRESET_BUBBLE_MENU[config]
428
+ };
429
+ }
430
+ return {
431
+ items: new Set(config.items),
432
+ bubbleMenu: config.bubbleMenu ?? false
433
+ };
434
+ }
435
+ function ToolbarItem({ sx, icon, label, active, disabled, ...other }) {
436
+ const ariaLabel = other["aria-label"];
437
+ const renderItem = () => /* @__PURE__ */ jsxs(ItemRoot, { disableRipple: true, disableTouchRipple: true, disabled, active, sx, ...other, children: [
438
+ icon && /* @__PURE__ */ jsx(SvgIcon2, { sx: { fontSize: 18 }, children: icon }),
439
+ label && label
440
+ ] });
441
+ if (ariaLabel) {
442
+ return /* @__PURE__ */ jsx(Tooltip, { title: ariaLabel, children: renderItem() });
443
+ }
444
+ return renderItem();
445
+ }
446
+ var ItemRoot = styled(ButtonBase, {
447
+ shouldForwardProp: (prop) => !["active", "disabled", "sx"].includes(prop)
448
+ })(({ theme }) => ({
449
+ ...theme.typography.body2,
450
+ width: 28,
451
+ height: 28,
452
+ padding: theme.spacing(0, 0.75),
453
+ borderRadius: Number(theme.shape.borderRadius) * 0.75,
454
+ "&:hover": {
455
+ backgroundColor: theme.palette.action.hover
456
+ },
457
+ variants: [
458
+ {
459
+ props: (props) => !!props.active,
460
+ style: {
461
+ backgroundColor: theme.palette.action.selected,
462
+ border: `solid 1px ${theme.palette.action.hover}`
463
+ }
464
+ },
465
+ {
466
+ props: (props) => !!props.disabled,
467
+ style: {
468
+ opacity: 0.48,
469
+ cursor: "default",
470
+ pointerEvents: "none"
471
+ }
472
+ }
473
+ ]
474
+ }));
475
+ var BoldIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
476
+ /* @__PURE__ */ jsx(
477
+ "path",
478
+ {
479
+ fill: "none",
480
+ stroke: "currentColor",
481
+ strokeWidth: "1.5",
482
+ strokeLinecap: "round",
483
+ strokeLinejoin: "round",
484
+ fillRule: "evenodd",
485
+ clipRule: "evenodd",
486
+ d: "M5 6C5 4.58579 5 3.87868 5.43934 3.43934C5.87868 3 6.58579 3 8 3H12.5789C15.0206 3 17 5.01472 17 7.5C17 9.98528 15.0206 12 12.5789 12H5V6Z"
487
+ }
488
+ ),
489
+ /* @__PURE__ */ jsx(
490
+ "path",
491
+ {
492
+ fill: "none",
493
+ stroke: "currentColor",
494
+ strokeWidth: "1.5",
495
+ strokeLinecap: "round",
496
+ strokeLinejoin: "round",
497
+ d: "M12.4286 12H13.6667C16.0599 12 18 14.0147 18 16.5C18 18.9853 16.0599 21 13.6667 21H8C6.58579 21 5.87868 21 5.43934 20.5607C5 20.1213 5 19.4142 5 18V12"
498
+ }
499
+ )
500
+ ] });
501
+ var ItalicIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
502
+ /* @__PURE__ */ jsx("path", { d: "M12 4H19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
503
+ /* @__PURE__ */ jsx("path", { d: "M8 20L16 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
504
+ /* @__PURE__ */ jsx("path", { d: "M5 20H12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
505
+ ] });
506
+ var UnderlineIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
507
+ /* @__PURE__ */ jsx(
508
+ "path",
509
+ {
510
+ fill: "none",
511
+ stroke: "currentColor",
512
+ strokeWidth: "1.5",
513
+ strokeLinecap: "round",
514
+ strokeLinejoin: "round",
515
+ d: "M5.5 3V11.5C5.5 15.0899 8.41015 18 12 18C15.5899 18 18.5 15.0899 18.5 11.5V3"
516
+ }
517
+ ),
518
+ /* @__PURE__ */ jsx("path", { d: "M3 21H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
519
+ ] });
520
+ var StrikeIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
521
+ /* @__PURE__ */ jsx("path", { d: "M4 12H20", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
522
+ /* @__PURE__ */ jsx(
523
+ "path",
524
+ {
525
+ fill: "none",
526
+ stroke: "currentColor",
527
+ strokeWidth: "1.5",
528
+ strokeLinecap: "round",
529
+ d: "M17.5 7.66667C17.5 5.08934 15.0376 3 12 3C8.96243 3 6.5 5.08934 6.5 7.66667C6.5 8.15279 6.55336 8.59783 6.6668 9M6 16.3333C6 18.9107 8.68629 21 12 21C15.3137 21 18 19.6667 18 16.3333C18 13.9404 16.9693 12.5782 14.9079 12"
530
+ }
531
+ )
532
+ ] });
533
+ var InlineCodeIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
534
+ /* @__PURE__ */ jsx(
535
+ "path",
536
+ {
537
+ fill: "none",
538
+ stroke: "currentColor",
539
+ strokeWidth: "1.5",
540
+ strokeLinecap: "round",
541
+ strokeLinejoin: "round",
542
+ d: "M17 8L18.8398 9.85008C19.6133 10.6279 20 11.0168 20 11.5C20 11.9832 19.6133 12.3721 18.8398 13.1499L17 15"
543
+ }
544
+ ),
545
+ /* @__PURE__ */ jsx(
546
+ "path",
547
+ {
548
+ fill: "none",
549
+ stroke: "currentColor",
550
+ strokeWidth: "1.5",
551
+ strokeLinecap: "round",
552
+ strokeLinejoin: "round",
553
+ d: "M7 8L5.16019 9.85008C4.38673 10.6279 4 11.0168 4 11.5C4 11.9832 4.38673 12.3721 5.16019 13.1499L7 15"
554
+ }
555
+ ),
556
+ /* @__PURE__ */ jsx("path", { d: "M14.5 4L9.5 20", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
557
+ ] });
558
+ var CodeBlockIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
559
+ /* @__PURE__ */ jsx(
560
+ "path",
561
+ {
562
+ stroke: "currentColor",
563
+ strokeWidth: "1.5",
564
+ strokeLinecap: "round",
565
+ strokeLinejoin: "round",
566
+ d: "M16 10L17.2265 11.0572C17.7422 11.5016 18 11.7239 18 12C18 12.2761 17.7422 12.4984 17.2265 12.9428L16 14"
567
+ }
568
+ ),
569
+ /* @__PURE__ */ jsx(
570
+ "path",
571
+ {
572
+ stroke: "currentColor",
573
+ strokeWidth: "1.5",
574
+ strokeLinecap: "round",
575
+ strokeLinejoin: "round",
576
+ d: "M8 10L6.77346 11.0572C6.25782 11.5016 6 11.7239 6 12C6 12.2761 6.25782 12.4984 6.77346 12.9428L8 14"
577
+ }
578
+ ),
579
+ /* @__PURE__ */ jsx("path", { d: "M13 9L11 15", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
580
+ /* @__PURE__ */ jsx(
581
+ "path",
582
+ {
583
+ fill: "none",
584
+ stroke: "currentColor",
585
+ strokeWidth: "1.5",
586
+ d: "M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z"
587
+ }
588
+ )
589
+ ] });
590
+ var H1Icon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
591
+ /* @__PURE__ */ jsx("path", { d: "M4 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
592
+ /* @__PURE__ */ jsx("path", { d: "M14 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
593
+ /* @__PURE__ */ jsx(
594
+ "path",
595
+ {
596
+ d: "M17 19H18.5M20 19H18.5M18.5 19V11L17 12",
597
+ stroke: "currentColor",
598
+ strokeWidth: "1.5",
599
+ strokeLinecap: "round",
600
+ strokeLinejoin: "round"
601
+ }
602
+ ),
603
+ /* @__PURE__ */ jsx("path", { d: "M4 12L14 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
604
+ ] });
605
+ var H2Icon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
606
+ /* @__PURE__ */ jsx("path", { d: "M3.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
607
+ /* @__PURE__ */ jsx("path", { d: "M13.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
608
+ /* @__PURE__ */ jsx(
609
+ "path",
610
+ {
611
+ fill: "none",
612
+ stroke: "currentColor",
613
+ strokeWidth: "1.5",
614
+ strokeLinecap: "round",
615
+ strokeLinejoin: "round",
616
+ d: "M20.5 19H16.5V18.6907C16.5 18.2521 16.5 18.0327 16.5865 17.8385C16.673 17.6443 16.836 17.4976 17.1621 17.2041L19.7671 14.8596C20.2336 14.4397 20.5 13.8416 20.5 13.214V13C20.5 11.8954 19.6046 11 18.5 11C17.3954 11 16.5 11.8954 16.5 13V13.4"
617
+ }
618
+ ),
619
+ /* @__PURE__ */ jsx("path", { d: "M3.5 12L13.5 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
620
+ ] });
621
+ var H3Icon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
622
+ /* @__PURE__ */ jsx("path", { d: "M3.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
623
+ /* @__PURE__ */ jsx("path", { d: "M13.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
624
+ /* @__PURE__ */ jsx(
625
+ "path",
626
+ {
627
+ fill: "none",
628
+ stroke: "currentColor",
629
+ strokeWidth: "1.5",
630
+ strokeLinecap: "round",
631
+ strokeLinejoin: "round",
632
+ d: "M16.5 17C16.5 18.1046 17.3954 19 18.5 19C19.6046 19 20.5 18.1046 20.5 17C20.5 15.8954 19.6046 15 18.5 15C19.6046 15 20.5 14.1046 20.5 13C20.5 11.8954 19.6046 11 18.5 11C17.3954 11 16.5 11.8954 16.5 13"
633
+ }
634
+ ),
635
+ /* @__PURE__ */ jsx("path", { d: "M3.5 12L13.5 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
636
+ ] });
637
+ var H4Icon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
638
+ /* @__PURE__ */ jsx("path", { d: "M3.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
639
+ /* @__PURE__ */ jsx("path", { d: "M13.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
640
+ /* @__PURE__ */ jsx(
641
+ "path",
642
+ {
643
+ fill: "none",
644
+ d: "M16.5 11V15H20.5M20.5 15V19M20.5 15V11",
645
+ stroke: "currentColor",
646
+ strokeWidth: "1.5",
647
+ strokeLinecap: "round",
648
+ strokeLinejoin: "round"
649
+ }
650
+ ),
651
+ /* @__PURE__ */ jsx("path", { d: "M3.5 12L13.5 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
652
+ ] });
653
+ var H5Icon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
654
+ /* @__PURE__ */ jsx("path", { d: "M3.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
655
+ /* @__PURE__ */ jsx("path", { d: "M13.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
656
+ /* @__PURE__ */ jsx(
657
+ "path",
658
+ {
659
+ fill: "none",
660
+ d: "M16.5 16.5V17C16.5 18.1046 17.3954 19 18.5 19C19.6046 19 20.5 18.1046 20.5 17V16.5C20.5 15.1193 19.3807 14 18 14H16.5V11H20.5",
661
+ stroke: "currentColor",
662
+ strokeWidth: "1.5",
663
+ strokeLinecap: "round",
664
+ strokeLinejoin: "round"
665
+ }
666
+ ),
667
+ /* @__PURE__ */ jsx("path", { d: "M3.5 12L13.5 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
668
+ ] });
669
+ var H6Icon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
670
+ /* @__PURE__ */ jsx("path", { d: "M3.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
671
+ /* @__PURE__ */ jsx("path", { d: "M13.5 5V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
672
+ /* @__PURE__ */ jsx(
673
+ "path",
674
+ {
675
+ fill: "none",
676
+ d: "M16.5 17C16.5 18.1046 17.3954 19 18.5 19C19.6046 19 20.5 18.1046 20.5 17C20.5 15.8954 19.6046 15 18.5 15C17.3954 15 16.5 15.8954 16.5 17ZM16.5 17V13C16.5 11.8954 17.3954 11 18.5 11C19.6046 11 20.5 11.8954 20.5 13",
677
+ stroke: "currentColor",
678
+ strokeWidth: "1.5",
679
+ strokeLinecap: "round",
680
+ strokeLinejoin: "round"
681
+ }
682
+ ),
683
+ /* @__PURE__ */ jsx("path", { d: "M3.5 12L13.5 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
684
+ ] });
685
+ var ParagraphIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
686
+ /* @__PURE__ */ jsx("path", { stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", d: "M15 21.001H9" }),
687
+ /* @__PURE__ */ jsx(
688
+ "path",
689
+ {
690
+ stroke: "currentColor",
691
+ strokeWidth: "1.5",
692
+ strokeLinecap: "round",
693
+ d: "M12 3.00001V21.0008M12 3.00001C13.3874 3.00001 15.1695 3.03055 16.5884 3.17649C17.1885 3.2382 17.4886 3.26906 17.7541 3.37791C18.3066 3.60429 18.7518 4.10063 18.9194 4.67681C19 4.95382 19 5.26992 19 5.90215M12 3.00001C10.6126 3.00001 8.83047 3.03055 7.41161 3.17649C6.8115 3.2382 6.51144 3.26906 6.24586 3.37791C5.69344 3.60429 5.24816 4.10063 5.08057 4.67681C5 4.95382 5 5.26992 5 5.90215"
694
+ }
695
+ )
696
+ ] });
697
+ var AlignLeftIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
698
+ /* @__PURE__ */ jsx("path", { d: "M3 3H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
699
+ /* @__PURE__ */ jsx("path", { d: "M3 9H11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
700
+ /* @__PURE__ */ jsx("path", { d: "M3 15H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
701
+ /* @__PURE__ */ jsx("path", { d: "M3 21H11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
702
+ ] });
703
+ var AlignCenterIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
704
+ /* @__PURE__ */ jsx("path", { d: "M3 3H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
705
+ /* @__PURE__ */ jsx("path", { d: "M8 9H16", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
706
+ /* @__PURE__ */ jsx("path", { d: "M3 15H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
707
+ /* @__PURE__ */ jsx("path", { d: "M8 21H16", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
708
+ ] });
709
+ var AlignRightIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
710
+ /* @__PURE__ */ jsx("path", { d: "M3 3H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
711
+ /* @__PURE__ */ jsx("path", { d: "M13 9H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
712
+ /* @__PURE__ */ jsx("path", { d: "M3 15H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
713
+ /* @__PURE__ */ jsx("path", { d: "M13 21H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
714
+ ] });
715
+ var AlignJustifyIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
716
+ /* @__PURE__ */ jsx("path", { d: "M3 3H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
717
+ /* @__PURE__ */ jsx("path", { d: "M3 9H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
718
+ /* @__PURE__ */ jsx("path", { d: "M3 15H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
719
+ /* @__PURE__ */ jsx("path", { d: "M3 21H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
720
+ ] });
721
+ var BulletListIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
722
+ /* @__PURE__ */ jsx("path", { d: "M11 5.5L21 5.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
723
+ /* @__PURE__ */ jsx(
724
+ "path",
725
+ {
726
+ fill: "none",
727
+ stroke: "currentColor",
728
+ strokeWidth: "1.5",
729
+ strokeLinecap: "round",
730
+ d: "M5.4 16.8926C6.46667 17.607 7 17.9642 7 18.5C7 19.0358 6.46667 19.393 5.4 20.1074C4.33333 20.8218 3.8 21.1789 3.4 20.9111C3 20.6432 3 19.9288 3 18.5C3 17.0712 3 16.3568 3.4 16.0889C3.8 15.8211 4.33333 16.1782 5.4 16.8926Z"
731
+ }
732
+ ),
733
+ /* @__PURE__ */ jsx(
734
+ "path",
735
+ {
736
+ fill: "none",
737
+ stroke: "currentColor",
738
+ strokeWidth: "1.5",
739
+ strokeLinecap: "round",
740
+ d: "M5.4 3.89263C6.46667 4.60702 7 4.96421 7 5.5C7 6.03579 6.46667 6.39298 5.4 7.10737C4.33333 7.82176 3.8 8.17895 3.4 7.91105C3 7.64316 3 6.92877 3 5.5C3 4.07123 3 3.35684 3.4 3.08895C3.8 2.82105 4.33333 3.17824 5.4 3.89263Z"
741
+ }
742
+ ),
743
+ /* @__PURE__ */ jsx("path", { d: "M11 12L21 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
744
+ /* @__PURE__ */ jsx("path", { d: "M11 18.5L21 18.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
745
+ ] });
746
+ var OrderedListIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
747
+ /* @__PURE__ */ jsx("path", { d: "M11 6L21 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
748
+ /* @__PURE__ */ jsx("path", { d: "M11 12L21 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
749
+ /* @__PURE__ */ jsx("path", { d: "M11 18L21 18", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
750
+ /* @__PURE__ */ jsx(
751
+ "path",
752
+ {
753
+ fill: "none",
754
+ stroke: "currentColor",
755
+ strokeWidth: "1.5",
756
+ strokeLinecap: "round",
757
+ strokeLinejoin: "round",
758
+ d: "M3 15H4.5C4.77879 15 4.91819 15 5.03411 15.0231C5.51014 15.1177 5.88225 15.4899 5.97694 15.9659C6 16.0818 6 16.2212 6 16.5C6 16.7788 6 16.9182 5.97694 17.0341C5.88225 17.5101 5.51014 17.8823 5.03411 17.9769C4.91819 18 4.77879 18 4.5 18C4.22121 18 4.08181 18 3.96589 18.0231C3.48986 18.1177 3.11775 18.4899 3.02306 18.9659C3 19.0818 3 19.2212 3 19.5V20.4C3 20.6828 3 20.8243 3.08787 20.9121C3.17574 21 3.31716 21 3.6 21H6"
759
+ }
760
+ ),
761
+ /* @__PURE__ */ jsx(
762
+ "path",
763
+ {
764
+ d: "M3 3H4.2C4.36569 3 4.5 3.13431 4.5 3.3V9M4.5 9H3M4.5 9H6",
765
+ stroke: "currentColor",
766
+ strokeWidth: "1.5",
767
+ strokeLinecap: "round",
768
+ strokeLinejoin: "round"
769
+ }
770
+ )
771
+ ] });
772
+ var CheckListIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
773
+ /* @__PURE__ */ jsx("path", { d: "M11 6L21 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
774
+ /* @__PURE__ */ jsx("path", { d: "M11 12L21 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
775
+ /* @__PURE__ */ jsx("path", { d: "M11 18L21 18", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
776
+ /* @__PURE__ */ jsx(
777
+ "path",
778
+ {
779
+ stroke: "currentColor",
780
+ strokeWidth: "1.5",
781
+ strokeLinecap: "round",
782
+ strokeLinejoin: "round",
783
+ d: "M3 7.39286C3 7.39286 4 8.04466 4.5 9C4.5 9 6 5.25 8 4"
784
+ }
785
+ ),
786
+ /* @__PURE__ */ jsx(
787
+ "path",
788
+ {
789
+ stroke: "currentColor",
790
+ strokeWidth: "1.5",
791
+ strokeLinecap: "round",
792
+ strokeLinejoin: "round",
793
+ d: "M3 18.3929C3 18.3929 4 19.0447 4.5 20C4.5 20 6 16.25 8 15"
794
+ }
795
+ )
796
+ ] });
797
+ var QuoteIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
798
+ /* @__PURE__ */ jsx(
799
+ "path",
800
+ {
801
+ fill: "none",
802
+ stroke: "currentColor",
803
+ strokeWidth: "1.5",
804
+ d: "M14 16C14 14.1144 14 13.1716 14.5858 12.5858C15.1716 12 16.1144 12 18 12C19.8856 12 20.8284 12 21.4142 12.5858C22 13.1716 22 14.1144 22 16C22 17.8856 22 18.8284 21.4142 19.4142C20.8284 20 19.8856 20 18 20C16.1144 20 15.1716 20 14.5858 19.4142C14 18.8284 14 17.8856 14 16Z"
805
+ }
806
+ ),
807
+ /* @__PURE__ */ jsx(
808
+ "path",
809
+ {
810
+ fill: "none",
811
+ d: "M14 16V11.8626C14 8.19569 16.5157 5.08584 20 4",
812
+ stroke: "currentColor",
813
+ strokeWidth: "1.5",
814
+ strokeLinecap: "round"
815
+ }
816
+ ),
817
+ /* @__PURE__ */ jsx(
818
+ "path",
819
+ {
820
+ fill: "none",
821
+ stroke: "currentColor",
822
+ strokeWidth: "1.5",
823
+ d: "M2 16C2 14.1144 2 13.1716 2.58579 12.5858C3.17157 12 4.11438 12 6 12C7.88562 12 8.82843 12 9.41421 12.5858C10 13.1716 10 14.1144 10 16C10 17.8856 10 18.8284 9.41421 19.4142C8.82843 20 7.88562 20 6 20C4.11438 20 3.17157 20 2.58579 19.4142C2 18.8284 2 17.8856 2 16Z"
824
+ }
825
+ ),
826
+ /* @__PURE__ */ jsx(
827
+ "path",
828
+ {
829
+ fill: "none",
830
+ d: "M2 16V11.8626C2 8.19569 4.51571 5.08584 8 4",
831
+ stroke: "currentColor",
832
+ strokeWidth: "1.5",
833
+ strokeLinecap: "round"
834
+ }
835
+ )
836
+ ] });
837
+ var HorizontalRuleIcon = (props) => /* @__PURE__ */ jsx(SvgIcon2, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M2.5 12L21.5002 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
838
+ var TableIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
839
+ /* @__PURE__ */ jsx(
840
+ "path",
841
+ {
842
+ fill: "none",
843
+ stroke: "currentColor",
844
+ strokeWidth: "1.5",
845
+ strokeLinecap: "round",
846
+ strokeLinejoin: "round",
847
+ d: "M3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088Z"
848
+ }
849
+ ),
850
+ /* @__PURE__ */ jsx("path", { d: "M2.5 9L21.5 9", stroke: "currentColor", strokeWidth: "1.5" }),
851
+ /* @__PURE__ */ jsx("path", { d: "M2.5 13L21.5 13", stroke: "currentColor", strokeWidth: "1.5" }),
852
+ /* @__PURE__ */ jsx("path", { d: "M2.5 17L21.5 17", stroke: "currentColor", strokeWidth: "1.5" }),
853
+ /* @__PURE__ */ jsx("path", { d: "M12 21.5L12 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
854
+ ] });
855
+ var LinkIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
856
+ /* @__PURE__ */ jsx("path", { d: "M9.5 14.5L14.5 9.49995", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
857
+ /* @__PURE__ */ jsx(
858
+ "path",
859
+ {
860
+ fill: "none",
861
+ stroke: "currentColor",
862
+ strokeWidth: "1.5",
863
+ strokeLinecap: "round",
864
+ d: "M16.8463 14.6095L19.4558 12C21.5147 9.94108 21.5147 6.60298 19.4558 4.54411C17.397 2.48524 14.0589 2.48524 12 4.54411L9.39045 7.15366M14.6095 16.8463L12 19.4558C9.94113 21.5147 6.60303 21.5147 4.54416 19.4558C2.48528 17.3969 2.48528 14.0588 4.54416 12L7.1537 9.39041"
865
+ }
866
+ )
867
+ ] });
868
+ var UnlinkIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
869
+ /* @__PURE__ */ jsx(
870
+ "path",
871
+ {
872
+ fill: "none",
873
+ d: "M16.8463 14.6095L19.4558 12C21.5147 9.94113 21.5147 6.60303 19.4558 4.54416C17.397 2.48528 14.0589 2.48528 12 4.54416L9.39045 7.1537M14.6095 16.8463L12 19.4558C9.94113 21.5147 6.60303 21.5147 4.54416 19.4558C2.48528 17.397 2.48528 14.0589 4.54416 12L7.1537 9.39045",
874
+ stroke: "currentColor",
875
+ strokeWidth: "1.5",
876
+ strokeLinecap: "round"
877
+ }
878
+ ),
879
+ /* @__PURE__ */ jsx(
880
+ "path",
881
+ {
882
+ d: "M22 17H19.9211M17 22L17 19.9211",
883
+ stroke: "currentColor",
884
+ strokeWidth: "1.5",
885
+ strokeLinecap: "round",
886
+ strokeLinejoin: "round"
887
+ }
888
+ ),
889
+ /* @__PURE__ */ jsx(
890
+ "path",
891
+ {
892
+ d: "M2 7H4.07889M7 2L7 4.07889",
893
+ stroke: "currentColor",
894
+ strokeWidth: "1.5",
895
+ strokeLinecap: "round",
896
+ strokeLinejoin: "round"
897
+ }
898
+ )
899
+ ] });
900
+ var ImageIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
901
+ /* @__PURE__ */ jsx(
902
+ "circle",
903
+ {
904
+ fill: "none",
905
+ cx: "7.5",
906
+ cy: "7.5",
907
+ r: "1.5",
908
+ stroke: "currentColor",
909
+ strokeWidth: "1.5",
910
+ strokeLinecap: "round",
911
+ strokeLinejoin: "round"
912
+ }
913
+ ),
914
+ /* @__PURE__ */ jsx(
915
+ "path",
916
+ {
917
+ fill: "none",
918
+ stroke: "currentColor",
919
+ strokeWidth: "1.5",
920
+ d: "M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z"
921
+ }
922
+ ),
923
+ /* @__PURE__ */ jsx(
924
+ "path",
925
+ {
926
+ fill: "none",
927
+ stroke: "currentColor",
928
+ strokeWidth: "1.5",
929
+ d: "M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424"
930
+ }
931
+ )
932
+ ] });
933
+ var ClearMarksIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
934
+ /* @__PURE__ */ jsx("path", { d: "M11 20.001H5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
935
+ /* @__PURE__ */ jsx("path", { d: "M3 3L21 21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
936
+ /* @__PURE__ */ jsx(
937
+ "path",
938
+ {
939
+ fill: "none",
940
+ stroke: "currentColor",
941
+ strokeWidth: "1.5",
942
+ strokeLinecap: "round",
943
+ d: "M19 7C19 6.36778 19 5.95381 18.9194 5.6768C18.7518 5.10062 18.3066 4.60428 17.7541 4.37789C17.4886 4.26905 17.1885 4.23819 16.5884 4.17648C15.1695 4.03054 13.3874 4 12 4H8"
944
+ }
945
+ ),
946
+ /* @__PURE__ */ jsx(
947
+ "path",
948
+ {
949
+ d: "M12 4L11.2 7.20003M8 20.0008L10.4001 10.4001",
950
+ stroke: "currentColor",
951
+ strokeWidth: "1.5",
952
+ strokeLinecap: "round",
953
+ strokeLinejoin: "round"
954
+ }
955
+ )
956
+ ] });
957
+ var UndoIcon = (props) => /* @__PURE__ */ jsx(SvgIcon2, { ...props, children: /* @__PURE__ */ jsx(
958
+ "path",
959
+ {
960
+ fill: "none",
961
+ d: "M3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C8.79275 3 5.97733 4.67765 4.38341 7.20327M3.29339 3.00076L3.46556 5.05452C3.58958 6.53384 3.65159 7.27349 4.13359 7.68914C4.61559 8.10479 5.32673 8.03185 6.74899 7.88595L8.79339 7.67625",
962
+ stroke: "currentColor",
963
+ strokeWidth: "1.5",
964
+ strokeLinecap: "round",
965
+ strokeLinejoin: "round"
966
+ }
967
+ ) });
968
+ var RedoIcon = (props) => /* @__PURE__ */ jsx(SvgIcon2, { ...props, children: /* @__PURE__ */ jsx(
969
+ "path",
970
+ {
971
+ fill: "none",
972
+ stroke: "currentColor",
973
+ strokeWidth: "1.5",
974
+ strokeLinecap: "round",
975
+ strokeLinejoin: "round",
976
+ d: "M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C15.2073 3 18.0227 4.67765 19.6166 7.20327M20.7066 3.00076L20.5344 5.05452C20.4104 6.53384 20.3484 7.27349 19.8664 7.68914C19.3844 8.10479 18.6733 8.03185 17.251 7.88595L15.2066 7.67625"
977
+ }
978
+ ) });
979
+ var HardBreakIcon = (props) => /* @__PURE__ */ jsxs(SvgIcon2, { ...props, children: [
980
+ /* @__PURE__ */ jsx(
981
+ "path",
982
+ {
983
+ fill: "none",
984
+ stroke: "currentColor",
985
+ strokeWidth: "1.5",
986
+ strokeLinecap: "round",
987
+ strokeLinejoin: "round",
988
+ d: "M13 6H8.5C6.01472 6 4 8.01472 4 10.5C4 12.9853 6.01472 15 8.5 15H20"
989
+ }
990
+ ),
991
+ /* @__PURE__ */ jsx(
992
+ "path",
993
+ {
994
+ fill: "none",
995
+ stroke: "currentColor",
996
+ strokeWidth: "1.5",
997
+ strokeLinecap: "round",
998
+ strokeLinejoin: "round",
999
+ d: "M17 12C17 12 20 14.2095 20 15C20 15.7906 17 18 17 18"
1000
+ }
1001
+ )
1002
+ ] });
1003
+ var FullscreenIcon = (props) => /* @__PURE__ */ jsx(SvgIcon2, { ...props, children: /* @__PURE__ */ jsx(
1004
+ "path",
1005
+ {
1006
+ fill: "none",
1007
+ stroke: "currentColor",
1008
+ strokeWidth: "1.5",
1009
+ strokeLinecap: "round",
1010
+ strokeLinejoin: "round",
1011
+ d: "M15.5 21C16.8956 21 17.5933 21 18.1611 20.8278C19.4395 20.44 20.44 19.4395 20.8278 18.1611C21 17.5933 21 16.8956 21 15.5M21 8.5C21 7.10444 21 6.40666 20.8278 5.83886C20.44 4.56046 19.4395 3.56004 18.1611 3.17224C17.5933 3 16.8956 3 15.5 3M8.5 21C7.10444 21 6.40666 21 5.83886 20.8278C4.56046 20.44 3.56004 19.4395 3.17224 18.1611C3 17.5933 3 16.8956 3 15.5M3 8.5C3 7.10444 3 6.40666 3.17224 5.83886C3.56004 4.56046 4.56046 3.56004 5.83886 3.17224C6.40666 3 7.10444 3 8.5 3"
1012
+ }
1013
+ ) });
1014
+ var ExitFullscreenIcon = (props) => /* @__PURE__ */ jsx(SvgIcon2, { ...props, children: /* @__PURE__ */ jsx(
1015
+ "path",
1016
+ {
1017
+ fill: "none",
1018
+ stroke: "currentColor",
1019
+ strokeWidth: "1.5",
1020
+ strokeLinecap: "round",
1021
+ strokeLinejoin: "round",
1022
+ d: "M15.5 9.5L21 4M15.5 9.5V5M15.5 9.5H20M8.5 14.5L3 20M8.5 14.5V19M8.5 14.5H4"
1023
+ }
1024
+ ) });
1025
+ var HEADING_OPTIONS = [
1026
+ { key: "Paragraph", level: null, icon: /* @__PURE__ */ jsx(ParagraphIcon, { sx: { fontSize: 18 } }) },
1027
+ { key: "Heading 1", level: 1, icon: /* @__PURE__ */ jsx(H1Icon, { sx: { fontSize: 18 } }) },
1028
+ { key: "Heading 2", level: 2, icon: /* @__PURE__ */ jsx(H2Icon, { sx: { fontSize: 18 } }) },
1029
+ { key: "Heading 3", level: 3, icon: /* @__PURE__ */ jsx(H3Icon, { sx: { fontSize: 18 } }) },
1030
+ { key: "Heading 4", level: 4, icon: /* @__PURE__ */ jsx(H4Icon, { sx: { fontSize: 18 } }) },
1031
+ { key: "Heading 5", level: 5, icon: /* @__PURE__ */ jsx(H5Icon, { sx: { fontSize: 18 } }) },
1032
+ { key: "Heading 6", level: 6, icon: /* @__PURE__ */ jsx(H6Icon, { sx: { fontSize: 18 } }) }
1033
+ ];
1034
+ function HeadingBlock({ editor, isActive, labels }) {
1035
+ const [anchorEl, setAnchorEl] = useState(null);
1036
+ const open = Boolean(anchorEl);
1037
+ const handleOpen = useCallback((event) => {
1038
+ setAnchorEl(event.currentTarget);
1039
+ }, []);
1040
+ const handleClose = useCallback(() => {
1041
+ setAnchorEl(null);
1042
+ }, []);
1043
+ const handleSelect = useCallback(
1044
+ (value) => {
1045
+ handleClose();
1046
+ if (value) {
1047
+ editor.chain().focus().toggleHeading({ level: value }).run();
1048
+ } else {
1049
+ editor.chain().focus().setParagraph().run();
1050
+ }
1051
+ },
1052
+ [editor, handleClose]
1053
+ );
1054
+ const activeIcon = editor.isActive("heading", { level: 1 }) && /* @__PURE__ */ jsx(H1Icon, { sx: { fontSize: 18 } }) || editor.isActive("heading", { level: 2 }) && /* @__PURE__ */ jsx(H2Icon, { sx: { fontSize: 18 } }) || editor.isActive("heading", { level: 3 }) && /* @__PURE__ */ jsx(H3Icon, { sx: { fontSize: 18 } }) || editor.isActive("heading", { level: 4 }) && /* @__PURE__ */ jsx(H4Icon, { sx: { fontSize: 18 } }) || editor.isActive("heading", { level: 5 }) && /* @__PURE__ */ jsx(H5Icon, { sx: { fontSize: 18 } }) || editor.isActive("heading", { level: 6 }) && /* @__PURE__ */ jsx(H6Icon, { sx: { fontSize: 18 } }) || /* @__PURE__ */ jsx(ParagraphIcon, { sx: { fontSize: 18 } });
1055
+ const buttonId = "heading-menu-button";
1056
+ const menuId = "heading-menu";
1057
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1058
+ /* @__PURE__ */ jsx(
1059
+ HeadingButton,
1060
+ {
1061
+ id: buttonId,
1062
+ "aria-label": labels.headingMenu,
1063
+ "aria-controls": open ? menuId : void 0,
1064
+ "aria-haspopup": "true",
1065
+ "aria-expanded": open ? "true" : void 0,
1066
+ onClick: handleOpen,
1067
+ children: activeIcon
1068
+ }
1069
+ ),
1070
+ /* @__PURE__ */ jsx(
1071
+ Menu,
1072
+ {
1073
+ id: menuId,
1074
+ anchorEl,
1075
+ open,
1076
+ onClose: handleClose,
1077
+ slotProps: {
1078
+ list: { "aria-labelledby": buttonId },
1079
+ paper: {
1080
+ sx: {
1081
+ width: 42,
1082
+ [`& .${listClasses.root}`]: { gap: 0.5, display: "flex", flexDirection: "column" },
1083
+ [`& .${buttonBaseClasses.root}`]: {
1084
+ px: 1,
1085
+ width: 1,
1086
+ height: 34,
1087
+ borderRadius: 0.75,
1088
+ justifyContent: "flex-start",
1089
+ "&:hover": { backgroundColor: "action.hover" }
1090
+ }
1091
+ }
1092
+ }
1093
+ },
1094
+ children: HEADING_OPTIONS.map((option) => /* @__PURE__ */ jsx(
1095
+ ToolbarItem,
1096
+ {
1097
+ component: "li",
1098
+ "aria-label": option.key,
1099
+ icon: option.icon,
1100
+ active: isActive(option.level),
1101
+ onClick: () => handleSelect(option.level)
1102
+ },
1103
+ option.key
1104
+ ))
1105
+ }
1106
+ )
1107
+ ] });
1108
+ }
1109
+ var HeadingButton = styled(ButtonBase)(({ theme }) => ({
1110
+ width: 28,
1111
+ height: 28,
1112
+ borderRadius: Number(theme.shape.borderRadius) * 0.75,
1113
+ justifyContent: "center",
1114
+ "&:hover": {
1115
+ backgroundColor: theme.palette.action.hover
1116
+ }
1117
+ }));
1118
+ function LinkBlock({ editor, linkIcon, unlinkIcon, active, labels }) {
1119
+ const [linkUrl, setLinkUrl] = useState("");
1120
+ const [anchorEl, setAnchorEl] = useState(null);
1121
+ const open = Boolean(anchorEl);
1122
+ const handleOpen = useCallback(
1123
+ (event) => {
1124
+ const currentUrl = editor.getAttributes("link").href ?? "";
1125
+ setAnchorEl(event.currentTarget);
1126
+ setLinkUrl(currentUrl);
1127
+ },
1128
+ [editor]
1129
+ );
1130
+ const handleClose = useCallback(() => {
1131
+ setAnchorEl(null);
1132
+ }, []);
1133
+ const handleApply = useCallback(() => {
1134
+ handleClose();
1135
+ const chain = () => editor.chain().focus().extendMarkRange("link");
1136
+ if (linkUrl) {
1137
+ chain().setLink({ href: linkUrl }).run();
1138
+ } else {
1139
+ chain().unsetLink().run();
1140
+ }
1141
+ }, [editor, linkUrl, handleClose]);
1142
+ const popoverId = open ? "link-popover" : void 0;
1143
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1144
+ /* @__PURE__ */ jsx(
1145
+ ToolbarItem,
1146
+ {
1147
+ "aria-describedby": popoverId,
1148
+ "aria-label": labels.insertLink,
1149
+ active,
1150
+ className: editorClasses.toolbar.link,
1151
+ onClick: handleOpen,
1152
+ icon: linkIcon
1153
+ }
1154
+ ),
1155
+ /* @__PURE__ */ jsx(
1156
+ ToolbarItem,
1157
+ {
1158
+ "aria-label": labels.removeLink,
1159
+ disabled: !active,
1160
+ className: editorClasses.toolbar.unlink,
1161
+ onClick: () => editor.chain().focus().unsetLink().run(),
1162
+ icon: unlinkIcon
1163
+ }
1164
+ ),
1165
+ /* @__PURE__ */ jsx(
1166
+ Popover,
1167
+ {
1168
+ id: popoverId,
1169
+ open,
1170
+ anchorEl,
1171
+ onClose: handleClose,
1172
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
1173
+ slotProps: {
1174
+ paper: {
1175
+ sx: { p: 2.5, gap: 1.25, width: 1, maxWidth: 320, display: "flex", flexDirection: "column" }
1176
+ }
1177
+ },
1178
+ children: /* @__PURE__ */ jsxs(Box, { sx: { gap: 1, display: "flex", alignItems: "center" }, children: [
1179
+ /* @__PURE__ */ jsx(
1180
+ TextField2,
1181
+ {
1182
+ fullWidth: true,
1183
+ size: "small",
1184
+ label: labels.linkUrlField,
1185
+ placeholder: "https://",
1186
+ value: linkUrl,
1187
+ onChange: (e) => setLinkUrl(e.target.value),
1188
+ onKeyDown: (e) => {
1189
+ if (e.key === "Enter") handleApply();
1190
+ }
1191
+ }
1192
+ ),
1193
+ /* @__PURE__ */ jsx(Button, { variant: "contained", disabled: !linkUrl, onClick: handleApply, children: labels.linkApply })
1194
+ ] })
1195
+ }
1196
+ )
1197
+ ] });
1198
+ }
1199
+ function ImageBlock({ editor, icon, labels }) {
1200
+ const [anchorEl, setAnchorEl] = useState(null);
1201
+ const open = Boolean(anchorEl);
1202
+ const [state, setState] = useState({ imageUrl: "", altText: "" });
1203
+ const handleOpen = useCallback((event) => {
1204
+ setAnchorEl(event.currentTarget);
1205
+ }, []);
1206
+ const handleClose = useCallback(() => {
1207
+ setAnchorEl(null);
1208
+ }, []);
1209
+ const handleApply = useCallback(() => {
1210
+ handleClose();
1211
+ setState({ imageUrl: "", altText: "" });
1212
+ editor.chain().focus().setImage({ src: state.imageUrl, alt: state.altText }).run();
1213
+ }, [editor, handleClose, state]);
1214
+ const popoverId = open ? "image-popover" : void 0;
1215
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1216
+ /* @__PURE__ */ jsx(
1217
+ ToolbarItem,
1218
+ {
1219
+ "aria-describedby": popoverId,
1220
+ "aria-label": labels.insertImage,
1221
+ className: editorClasses.toolbar.image,
1222
+ onClick: handleOpen,
1223
+ icon
1224
+ }
1225
+ ),
1226
+ /* @__PURE__ */ jsxs(
1227
+ Popover,
1228
+ {
1229
+ id: popoverId,
1230
+ open,
1231
+ anchorEl,
1232
+ onClose: handleClose,
1233
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
1234
+ slotProps: {
1235
+ paper: {
1236
+ sx: { p: 2.5, gap: 1.25, width: 1, maxWidth: 320, display: "flex", flexDirection: "column" }
1237
+ }
1238
+ },
1239
+ children: [
1240
+ /* @__PURE__ */ jsx(Typography, { variant: "subtitle2", children: labels.imagePopoverTitle }),
1241
+ /* @__PURE__ */ jsx(
1242
+ TextField2,
1243
+ {
1244
+ fullWidth: true,
1245
+ size: "small",
1246
+ label: labels.imageUrlField,
1247
+ placeholder: "https://",
1248
+ value: state.imageUrl,
1249
+ onChange: (e) => setState((prev) => ({ ...prev, imageUrl: e.target.value }))
1250
+ }
1251
+ ),
1252
+ /* @__PURE__ */ jsx(
1253
+ TextField2,
1254
+ {
1255
+ fullWidth: true,
1256
+ size: "small",
1257
+ label: labels.imageAltField,
1258
+ value: state.altText,
1259
+ onChange: (e) => setState((prev) => ({ ...prev, altText: e.target.value }))
1260
+ }
1261
+ ),
1262
+ /* @__PURE__ */ jsx(Button, { variant: "contained", disabled: !state.imageUrl, onClick: handleApply, sx: { alignSelf: "flex-end" }, children: labels.imageApply })
1263
+ ]
1264
+ }
1265
+ )
1266
+ ] });
1267
+ }
1268
+ function useToolbarState(editor) {
1269
+ return useEditorState({
1270
+ editor,
1271
+ selector: (ctx) => {
1272
+ const canRun = ctx.editor.can().chain().focus();
1273
+ return {
1274
+ isBold: ctx.editor.isActive("bold"),
1275
+ isCode: ctx.editor.isActive("code"),
1276
+ isLink: ctx.editor.isActive("link"),
1277
+ isItalic: ctx.editor.isActive("italic"),
1278
+ isStrike: ctx.editor.isActive("strike"),
1279
+ isUnderline: ctx.editor.isActive("underline"),
1280
+ isCodeBlock: ctx.editor.isActive("codeBlock"),
1281
+ isBulletList: ctx.editor.isActive("bulletList"),
1282
+ isBlockquote: ctx.editor.isActive("blockquote"),
1283
+ isOrderedList: ctx.editor.isActive("orderedList"),
1284
+ isTaskList: ctx.editor.isActive("taskList"),
1285
+ isAlign: (value) => ctx.editor.isActive({ textAlign: value }),
1286
+ isTextTransform: (value) => ctx.editor.isActive("textTransform", { textTransform: value }),
1287
+ isTextLevel: (value) => value ? ctx.editor.isActive("heading", { level: value }) : ctx.editor.isActive("paragraph"),
1288
+ canUndo: canRun.undo().run(),
1289
+ canRedo: canRun.redo().run()
1290
+ };
1291
+ }
1292
+ });
1293
+ }
1294
+ function Toolbar({ editor, toolbar, fullscreen, onToggleFullscreen, labels }) {
1295
+ const state = useToolbarState(editor);
1296
+ const has = (item) => toolbar.items.has(item);
1297
+ const chain = () => editor.chain().focus();
1298
+ const hasAnyInGroup = (...items) => items.some(has);
1299
+ return /* @__PURE__ */ jsxs(ToolbarRoot, { className: editorClasses.toolbar.root, children: [
1300
+ has("heading") && /* @__PURE__ */ jsxs(Fragment, { children: [
1301
+ /* @__PURE__ */ jsx(HeadingBlock, { labels, editor, isActive: state.isTextLevel }),
1302
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1303
+ ] }),
1304
+ hasAnyInGroup("bold", "italic", "underline", "strike", "code") && /* @__PURE__ */ jsxs(Fragment, { children: [
1305
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1306
+ has("bold") && /* @__PURE__ */ jsx(
1307
+ ToolbarItem,
1308
+ {
1309
+ "aria-label": labels.bold,
1310
+ active: state.isBold,
1311
+ className: editorClasses.toolbar.bold,
1312
+ onClick: () => chain().toggleBold().run(),
1313
+ icon: /* @__PURE__ */ jsx(BoldIcon, {})
1314
+ }
1315
+ ),
1316
+ has("italic") && /* @__PURE__ */ jsx(
1317
+ ToolbarItem,
1318
+ {
1319
+ "aria-label": labels.italic,
1320
+ active: state.isItalic,
1321
+ className: editorClasses.toolbar.italic,
1322
+ onClick: () => chain().toggleItalic().run(),
1323
+ icon: /* @__PURE__ */ jsx(ItalicIcon, {})
1324
+ }
1325
+ ),
1326
+ has("underline") && /* @__PURE__ */ jsx(
1327
+ ToolbarItem,
1328
+ {
1329
+ "aria-label": labels.underline,
1330
+ active: state.isUnderline,
1331
+ className: editorClasses.toolbar.underline,
1332
+ onClick: () => chain().toggleUnderline().run(),
1333
+ icon: /* @__PURE__ */ jsx(UnderlineIcon, {})
1334
+ }
1335
+ ),
1336
+ has("strike") && /* @__PURE__ */ jsx(
1337
+ ToolbarItem,
1338
+ {
1339
+ "aria-label": labels.strike,
1340
+ active: state.isStrike,
1341
+ className: editorClasses.toolbar.strike,
1342
+ onClick: () => chain().toggleStrike().run(),
1343
+ icon: /* @__PURE__ */ jsx(StrikeIcon, {})
1344
+ }
1345
+ ),
1346
+ has("code") && /* @__PURE__ */ jsx(
1347
+ ToolbarItem,
1348
+ {
1349
+ "aria-label": labels.inlineCode,
1350
+ active: state.isCode,
1351
+ className: editorClasses.toolbar.code,
1352
+ onClick: () => chain().toggleCode().run(),
1353
+ icon: /* @__PURE__ */ jsx(InlineCodeIcon, {})
1354
+ }
1355
+ )
1356
+ ] }),
1357
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1358
+ ] }),
1359
+ hasAnyInGroup("bulletList", "orderedList", "taskList") && /* @__PURE__ */ jsxs(Fragment, { children: [
1360
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1361
+ has("bulletList") && /* @__PURE__ */ jsx(
1362
+ ToolbarItem,
1363
+ {
1364
+ "aria-label": labels.bulletList,
1365
+ active: state.isBulletList,
1366
+ className: editorClasses.toolbar.bulletList,
1367
+ onClick: () => chain().toggleBulletList().run(),
1368
+ icon: /* @__PURE__ */ jsx(BulletListIcon, {})
1369
+ }
1370
+ ),
1371
+ has("orderedList") && /* @__PURE__ */ jsx(
1372
+ ToolbarItem,
1373
+ {
1374
+ "aria-label": labels.orderedList,
1375
+ active: state.isOrderedList,
1376
+ className: editorClasses.toolbar.orderedList,
1377
+ onClick: () => chain().toggleOrderedList().run(),
1378
+ icon: /* @__PURE__ */ jsx(OrderedListIcon, {})
1379
+ }
1380
+ ),
1381
+ has("taskList") && /* @__PURE__ */ jsx(
1382
+ ToolbarItem,
1383
+ {
1384
+ "aria-label": labels.taskList,
1385
+ active: state.isTaskList,
1386
+ className: editorClasses.toolbar.taskList,
1387
+ onClick: () => chain().toggleTaskList().run(),
1388
+ icon: /* @__PURE__ */ jsx(CheckListIcon, {})
1389
+ }
1390
+ )
1391
+ ] }),
1392
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1393
+ ] }),
1394
+ hasAnyInGroup("alignLeft", "alignCenter", "alignRight", "alignJustify") && /* @__PURE__ */ jsxs(Fragment, { children: [
1395
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1396
+ has("alignLeft") && /* @__PURE__ */ jsx(
1397
+ ToolbarItem,
1398
+ {
1399
+ "aria-label": labels.alignLeft,
1400
+ active: state.isAlign("left"),
1401
+ className: editorClasses.toolbar.alignLeft,
1402
+ onClick: () => chain().setTextAlign("left").run(),
1403
+ icon: /* @__PURE__ */ jsx(AlignLeftIcon, {})
1404
+ }
1405
+ ),
1406
+ has("alignCenter") && /* @__PURE__ */ jsx(
1407
+ ToolbarItem,
1408
+ {
1409
+ "aria-label": labels.alignCenter,
1410
+ active: state.isAlign("center"),
1411
+ className: editorClasses.toolbar.alignCenter,
1412
+ onClick: () => chain().setTextAlign("center").run(),
1413
+ icon: /* @__PURE__ */ jsx(AlignCenterIcon, {})
1414
+ }
1415
+ ),
1416
+ has("alignRight") && /* @__PURE__ */ jsx(
1417
+ ToolbarItem,
1418
+ {
1419
+ "aria-label": labels.alignRight,
1420
+ active: state.isAlign("right"),
1421
+ className: editorClasses.toolbar.alignRight,
1422
+ onClick: () => chain().setTextAlign("right").run(),
1423
+ icon: /* @__PURE__ */ jsx(AlignRightIcon, {})
1424
+ }
1425
+ ),
1426
+ has("alignJustify") && /* @__PURE__ */ jsx(
1427
+ ToolbarItem,
1428
+ {
1429
+ "aria-label": labels.alignJustify,
1430
+ active: state.isAlign("justify"),
1431
+ className: editorClasses.toolbar.alignJustify,
1432
+ onClick: () => chain().setTextAlign("justify").run(),
1433
+ icon: /* @__PURE__ */ jsx(AlignJustifyIcon, {})
1434
+ }
1435
+ )
1436
+ ] }),
1437
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1438
+ ] }),
1439
+ hasAnyInGroup("blockquote", "codeBlock", "horizontalRule") && /* @__PURE__ */ jsxs(Fragment, { children: [
1440
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1441
+ has("blockquote") && /* @__PURE__ */ jsx(
1442
+ ToolbarItem,
1443
+ {
1444
+ "aria-label": labels.blockquote,
1445
+ active: state.isBlockquote,
1446
+ className: editorClasses.toolbar.blockquote,
1447
+ onClick: () => chain().toggleBlockquote().run(),
1448
+ icon: /* @__PURE__ */ jsx(QuoteIcon, {})
1449
+ }
1450
+ ),
1451
+ has("codeBlock") && /* @__PURE__ */ jsx(
1452
+ ToolbarItem,
1453
+ {
1454
+ "aria-label": labels.codeBlock,
1455
+ active: state.isCodeBlock,
1456
+ className: editorClasses.toolbar.codeBlock,
1457
+ onClick: () => chain().toggleCodeBlock().run(),
1458
+ icon: /* @__PURE__ */ jsx(CodeBlockIcon, {})
1459
+ }
1460
+ ),
1461
+ has("horizontalRule") && /* @__PURE__ */ jsx(
1462
+ ToolbarItem,
1463
+ {
1464
+ "aria-label": labels.horizontalRule,
1465
+ className: editorClasses.toolbar.hr,
1466
+ onClick: () => chain().setHorizontalRule().run(),
1467
+ icon: /* @__PURE__ */ jsx(HorizontalRuleIcon, {})
1468
+ }
1469
+ )
1470
+ ] }),
1471
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1472
+ ] }),
1473
+ hasAnyInGroup("link", "image") && /* @__PURE__ */ jsxs(Fragment, { children: [
1474
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1475
+ has("link") && /* @__PURE__ */ jsx(LinkBlock, { labels, editor, active: state.isLink, linkIcon: /* @__PURE__ */ jsx(LinkIcon, {}), unlinkIcon: /* @__PURE__ */ jsx(UnlinkIcon, {}) }),
1476
+ has("image") && /* @__PURE__ */ jsx(ImageBlock, { labels, editor, icon: /* @__PURE__ */ jsx(ImageIcon, {}) })
1477
+ ] }),
1478
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1479
+ ] }),
1480
+ hasAnyInGroup("hardBreak", "clearFormat") && /* @__PURE__ */ jsxs(Fragment, { children: [
1481
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1482
+ has("hardBreak") && /* @__PURE__ */ jsx(
1483
+ ToolbarItem,
1484
+ {
1485
+ "aria-label": labels.hardBreak,
1486
+ className: editorClasses.toolbar.hardBreak,
1487
+ onClick: () => chain().setHardBreak().run(),
1488
+ icon: /* @__PURE__ */ jsx(HardBreakIcon, {})
1489
+ }
1490
+ ),
1491
+ has("clearFormat") && /* @__PURE__ */ jsx(
1492
+ ToolbarItem,
1493
+ {
1494
+ "aria-label": labels.clearFormat,
1495
+ className: editorClasses.toolbar.clear,
1496
+ onClick: () => chain().clearNodes().unsetAllMarks().run(),
1497
+ icon: /* @__PURE__ */ jsx(ClearMarksIcon, {})
1498
+ }
1499
+ )
1500
+ ] }),
1501
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1502
+ ] }),
1503
+ hasAnyInGroup("undo", "redo") && /* @__PURE__ */ jsxs(Fragment, { children: [
1504
+ /* @__PURE__ */ jsxs(ToolbarBlock, { children: [
1505
+ has("undo") && /* @__PURE__ */ jsx(
1506
+ ToolbarItem,
1507
+ {
1508
+ "aria-label": labels.undo,
1509
+ disabled: !state.canUndo,
1510
+ className: editorClasses.toolbar.undo,
1511
+ onClick: () => chain().undo().run(),
1512
+ icon: /* @__PURE__ */ jsx(UndoIcon, {})
1513
+ }
1514
+ ),
1515
+ has("redo") && /* @__PURE__ */ jsx(
1516
+ ToolbarItem,
1517
+ {
1518
+ "aria-label": labels.redo,
1519
+ disabled: !state.canRedo,
1520
+ className: editorClasses.toolbar.redo,
1521
+ onClick: () => chain().redo().run(),
1522
+ icon: /* @__PURE__ */ jsx(RedoIcon, {})
1523
+ }
1524
+ )
1525
+ ] }),
1526
+ /* @__PURE__ */ jsx(ToolbarDivider, {})
1527
+ ] }),
1528
+ has("fullscreen") && /* @__PURE__ */ jsx(ToolbarBlock, { children: /* @__PURE__ */ jsx(
1529
+ ToolbarItem,
1530
+ {
1531
+ "aria-label": fullscreen ? labels.exitFullscreen : labels.fullscreen,
1532
+ active: fullscreen,
1533
+ className: editorClasses.toolbar.fullscreen,
1534
+ onClick: onToggleFullscreen,
1535
+ icon: fullscreen ? /* @__PURE__ */ jsx(ExitFullscreenIcon, {}) : /* @__PURE__ */ jsx(FullscreenIcon, {})
1536
+ }
1537
+ ) })
1538
+ ] });
1539
+ }
1540
+ var ToolbarRoot = styled("div")(({ theme }) => ({
1541
+ flexWrap: "wrap",
1542
+ display: "flex",
1543
+ flexDirection: "row",
1544
+ alignItems: "center",
1545
+ gap: theme.spacing(1),
1546
+ padding: theme.spacing(1.25),
1547
+ borderTopLeftRadius: "inherit",
1548
+ borderTopRightRadius: "inherit",
1549
+ backgroundColor: theme.palette.background.paper,
1550
+ borderBottom: `solid 1px ${alpha(theme.palette.grey[500], 0.2)}`
1551
+ }));
1552
+ var ToolbarBlock = styled("div")(({ theme }) => ({
1553
+ display: "flex",
1554
+ alignItems: "center",
1555
+ gap: theme.spacing(0.5)
1556
+ }));
1557
+ function ToolbarDivider() {
1558
+ return /* @__PURE__ */ jsx(Divider, { orientation: "vertical", flexItem: true, sx: { height: 16, my: "auto" } });
1559
+ }
1560
+ function BubbleToolbar({ editor, labels }) {
1561
+ const state = useToolbarState(editor);
1562
+ const chain = () => editor.chain().focus();
1563
+ return /* @__PURE__ */ jsx(BubbleMenu, { editor, children: /* @__PURE__ */ jsxs(BubbleRoot, { children: [
1564
+ /* @__PURE__ */ jsx(
1565
+ ToolbarItem,
1566
+ {
1567
+ "aria-label": labels.bold,
1568
+ active: state.isBold,
1569
+ className: editorClasses.toolbar.bold,
1570
+ onClick: () => chain().toggleBold().run(),
1571
+ icon: /* @__PURE__ */ jsx(BoldIcon, {})
1572
+ }
1573
+ ),
1574
+ /* @__PURE__ */ jsx(
1575
+ ToolbarItem,
1576
+ {
1577
+ "aria-label": labels.italic,
1578
+ active: state.isItalic,
1579
+ className: editorClasses.toolbar.italic,
1580
+ onClick: () => chain().toggleItalic().run(),
1581
+ icon: /* @__PURE__ */ jsx(ItalicIcon, {})
1582
+ }
1583
+ ),
1584
+ /* @__PURE__ */ jsx(
1585
+ ToolbarItem,
1586
+ {
1587
+ "aria-label": labels.underline,
1588
+ active: state.isUnderline,
1589
+ className: editorClasses.toolbar.underline,
1590
+ onClick: () => chain().toggleUnderline().run(),
1591
+ icon: /* @__PURE__ */ jsx(UnderlineIcon, {})
1592
+ }
1593
+ ),
1594
+ /* @__PURE__ */ jsx(
1595
+ ToolbarItem,
1596
+ {
1597
+ "aria-label": labels.strike,
1598
+ active: state.isStrike,
1599
+ className: editorClasses.toolbar.strike,
1600
+ onClick: () => chain().toggleStrike().run(),
1601
+ icon: /* @__PURE__ */ jsx(StrikeIcon, {})
1602
+ }
1603
+ ),
1604
+ /* @__PURE__ */ jsx(LinkBlock, { labels, editor, active: state.isLink, linkIcon: /* @__PURE__ */ jsx(LinkIcon, {}), unlinkIcon: /* @__PURE__ */ jsx(UnlinkIcon, {}) }),
1605
+ /* @__PURE__ */ jsx(Divider, { orientation: "vertical", flexItem: true, sx: { height: 16, my: "auto" } }),
1606
+ /* @__PURE__ */ jsx(
1607
+ ToolbarItem,
1608
+ {
1609
+ "aria-label": labels.clearFormat,
1610
+ className: editorClasses.toolbar.clear,
1611
+ onClick: () => chain().clearNodes().unsetAllMarks().run(),
1612
+ icon: /* @__PURE__ */ jsx(ClearMarksIcon, {})
1613
+ }
1614
+ )
1615
+ ] }) });
1616
+ }
1617
+ var BubbleRoot = styled("div")(({ theme }) => ({
1618
+ display: "flex",
1619
+ gap: theme.spacing(0.5),
1620
+ padding: theme.spacing(0.5),
1621
+ borderRadius: theme.shape.borderRadius,
1622
+ boxShadow: theme.shadows[8],
1623
+ backgroundColor: theme.palette.background.paper,
1624
+ border: `1px solid ${alpha(theme.palette.grey[500], 0.16)}`
1625
+ }));
1626
+ function CodeHighlightBlock(props) {
1627
+ const { node, extension, updateAttributes } = props;
1628
+ const language = node.attrs.language;
1629
+ const lowlight = extension.options.lowlight;
1630
+ const autoLabel = extension.options.autoLanguageLabel ?? DEFAULT_EDITOR_LABELS.codeLanguageAuto;
1631
+ const handleChangeLanguage = useCallback(
1632
+ (event) => {
1633
+ updateAttributes({ language: event.target.value });
1634
+ },
1635
+ [updateAttributes]
1636
+ );
1637
+ return /* @__PURE__ */ jsxs(NodeViewWrapper, { className: editorClasses.content.codeBlock, children: [
1638
+ /* @__PURE__ */ jsxs(
1639
+ "select",
1640
+ {
1641
+ name: "language",
1642
+ contentEditable: false,
1643
+ value: language || "null",
1644
+ onChange: handleChangeLanguage,
1645
+ className: editorClasses.content.langSelect,
1646
+ children: [
1647
+ /* @__PURE__ */ jsx("option", { value: "null", children: autoLabel }),
1648
+ /* @__PURE__ */ jsx("option", { disabled: true, children: "\u2014" }),
1649
+ lowlight.listLanguages().map((lang) => /* @__PURE__ */ jsx("option", { value: lang, children: lang }, lang))
1650
+ ]
1651
+ }
1652
+ ),
1653
+ /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx(NodeViewContent, { as: "code" }) })
1654
+ ] });
1655
+ }
1656
+ var ClearFormat = Extension.create({
1657
+ name: "clearFormat",
1658
+ addKeyboardShortcuts() {
1659
+ return {
1660
+ "Mod-Shift-X": ({ editor }) => editor.chain().focus().clearNodes().unsetAllMarks().run()
1661
+ };
1662
+ }
1663
+ });
1664
+ var isHTMLElement = (node) => node instanceof HTMLElement;
1665
+ var isValidTextTransform = (value, allowed) => typeof value === "string" && allowed.includes(value);
1666
+ var TextTransform = Mark.create({
1667
+ name: "textTransform",
1668
+ addOptions() {
1669
+ return {
1670
+ allowedValues: ["uppercase", "lowercase", "capitalize"],
1671
+ defaultValue: void 0
1672
+ };
1673
+ },
1674
+ addAttributes() {
1675
+ return {
1676
+ textTransform: {
1677
+ default: this.options.defaultValue,
1678
+ parseHTML: (element) => {
1679
+ if (!isHTMLElement(element)) return void 0;
1680
+ const rawValue = element.style.textTransform || element.getAttribute("style")?.match(/text-transform:\s*(\w+)/)?.[1];
1681
+ return isValidTextTransform(rawValue, this.options.allowedValues) ? rawValue : void 0;
1682
+ },
1683
+ renderHTML: (attributes) => {
1684
+ if (!attributes.textTransform) return {};
1685
+ return { style: `text-transform: ${attributes.textTransform}` };
1686
+ }
1687
+ }
1688
+ };
1689
+ },
1690
+ parseHTML() {
1691
+ return [
1692
+ {
1693
+ tag: "span[style]",
1694
+ getAttrs: (node) => {
1695
+ if (!isHTMLElement(node)) return null;
1696
+ const styleValue = node.style.textTransform;
1697
+ return isValidTextTransform(styleValue, this.options.allowedValues) ? {} : false;
1698
+ }
1699
+ }
1700
+ ];
1701
+ },
1702
+ renderHTML({ HTMLAttributes }) {
1703
+ return ["span", HTMLAttributes, 0];
1704
+ },
1705
+ addCommands() {
1706
+ return {
1707
+ setTextTransform: (value) => ({ commands }) => {
1708
+ if (!isValidTextTransform(value, this.options.allowedValues)) return false;
1709
+ return commands.setMark(this.name, { textTransform: value });
1710
+ },
1711
+ unsetTextTransform: () => ({ commands }) => commands.unsetMark(this.name),
1712
+ toggleTextTransform: (value) => ({ editor, commands }) => {
1713
+ if (!isValidTextTransform(value, this.options.allowedValues)) return false;
1714
+ const isActive = editor.isActive(this.name, { textTransform: value });
1715
+ return isActive ? commands.unsetTextTransform() : commands.setTextTransform(value);
1716
+ }
1717
+ };
1718
+ }
1719
+ });
1720
+ function Editor({
1721
+ sx,
1722
+ error,
1723
+ onChange,
1724
+ slotProps,
1725
+ helperText,
1726
+ resetValue,
1727
+ className,
1728
+ toolbar: toolbarConfig,
1729
+ bubbleMenu: bubbleMenuProp,
1730
+ format = "json",
1731
+ minHeight = 160,
1732
+ maxHeight,
1733
+ editable = true,
1734
+ extraExtensions,
1735
+ placeholder = "Write something...",
1736
+ labels: labelOverrides,
1737
+ ref: contentRef,
1738
+ value: initialContent = "",
1739
+ ...other
1740
+ }) {
1741
+ const [fullscreen, setFullscreen] = useState(false);
1742
+ const [rerenderKey, setRerenderKey] = useState(0);
1743
+ const resolvedToolbar = useMemo(() => resolveToolbar(toolbarConfig), [toolbarConfig]);
1744
+ const showBubbleMenu = bubbleMenuProp ?? resolvedToolbar.bubbleMenu;
1745
+ const showToolbar = resolvedToolbar.items.size > 0;
1746
+ const lowlight = useMemo(() => createLowlight(common), []);
1747
+ const labels = useMemo(
1748
+ () => ({ ...DEFAULT_EDITOR_LABELS, ...labelOverrides }),
1749
+ [labelOverrides]
1750
+ );
1751
+ const parsedContent = useMemo(() => {
1752
+ if (!initialContent) return "";
1753
+ if (format === "json" && initialContent.startsWith("{")) {
1754
+ try {
1755
+ return JSON.parse(initialContent);
1756
+ } catch {
1757
+ return initialContent;
1758
+ }
1759
+ }
1760
+ return initialContent;
1761
+ }, [initialContent, format]);
1762
+ const debouncedOnChange = useMemo(() => {
1763
+ let timer;
1764
+ return (editor2) => {
1765
+ clearTimeout(timer);
1766
+ timer = setTimeout(() => {
1767
+ if (format === "json") {
1768
+ onChange?.(JSON.stringify(editor2.getJSON()));
1769
+ } else {
1770
+ onChange?.(editor2.getHTML());
1771
+ }
1772
+ }, 200);
1773
+ };
1774
+ }, [onChange, format]);
1775
+ const extensions = useMemo(() => {
1776
+ const has = (item) => resolvedToolbar.items.has(item);
1777
+ const exts = [
1778
+ StarterKitExtension.configure({
1779
+ codeBlock: false,
1780
+ // Underline and Link are registered separately (below) to allow per-preset control
1781
+ underline: false,
1782
+ link: false,
1783
+ code: has("code") ? { HTMLAttributes: { class: editorClasses.content.codeInline } } : false,
1784
+ heading: has("heading") ? { HTMLAttributes: { class: editorClasses.content.heading } } : false,
1785
+ horizontalRule: has("horizontalRule") ? { HTMLAttributes: { class: editorClasses.content.hr } } : false,
1786
+ listItem: { HTMLAttributes: { class: editorClasses.content.listItem } },
1787
+ blockquote: has("blockquote") ? { HTMLAttributes: { class: editorClasses.content.blockquote } } : false,
1788
+ bulletList: has("bulletList") ? { HTMLAttributes: { class: editorClasses.content.bulletList } } : false,
1789
+ orderedList: has("orderedList") ? { HTMLAttributes: { class: editorClasses.content.orderedList } } : false
1790
+ }),
1791
+ PlaceholderExtension.configure({
1792
+ placeholder,
1793
+ emptyEditorClass: editorClasses.content.placeholder
1794
+ }),
1795
+ ClearFormat,
1796
+ TextTransform
1797
+ ];
1798
+ if (has("underline")) {
1799
+ exts.push(UnderlineExtension);
1800
+ }
1801
+ if (has("alignLeft") || has("alignCenter") || has("alignRight") || has("alignJustify")) {
1802
+ exts.push(TextAlignExtension.configure({ types: ["heading", "paragraph"] }));
1803
+ }
1804
+ if (has("image")) {
1805
+ exts.push(ImageExtension.configure({ HTMLAttributes: { class: editorClasses.content.image } }));
1806
+ }
1807
+ if (has("link")) {
1808
+ exts.push(
1809
+ LinkExtension.configure({
1810
+ openOnClick: false,
1811
+ HTMLAttributes: { class: editorClasses.content.link }
1812
+ })
1813
+ );
1814
+ }
1815
+ if (has("codeBlock")) {
1816
+ exts.push(
1817
+ CodeBlockLowlightExtension.extend({
1818
+ addOptions() {
1819
+ const inherited = this.parent?.();
1820
+ return { ...inherited, autoLanguageLabel: DEFAULT_EDITOR_LABELS.codeLanguageAuto };
1821
+ },
1822
+ addNodeView: () => ReactNodeViewRenderer(CodeHighlightBlock)
1823
+ }).configure({ lowlight, autoLanguageLabel: labels.codeLanguageAuto })
1824
+ );
1825
+ }
1826
+ if (has("taskList")) {
1827
+ exts.push(
1828
+ TaskListExtension.configure({ HTMLAttributes: { class: editorClasses.content.taskList } }),
1829
+ TaskItemExtension.configure({
1830
+ nested: true,
1831
+ HTMLAttributes: { class: editorClasses.content.taskItem }
1832
+ })
1833
+ );
1834
+ }
1835
+ if (extraExtensions) {
1836
+ exts.push(...extraExtensions);
1837
+ }
1838
+ return exts;
1839
+ }, [resolvedToolbar, placeholder, lowlight, extraExtensions, labels]);
1840
+ const editor = useEditor({
1841
+ editable,
1842
+ immediatelyRender: false,
1843
+ content: parsedContent,
1844
+ shouldRerenderOnTransaction: !!rerenderKey,
1845
+ onUpdate: (ctx) => {
1846
+ debouncedOnChange(ctx.editor);
1847
+ },
1848
+ extensions,
1849
+ ...other
1850
+ });
1851
+ const handleToggleFullscreen = useCallback(() => {
1852
+ editor?.unmount();
1853
+ setFullscreen((prev) => !prev);
1854
+ setRerenderKey((prev) => prev + 1);
1855
+ }, [editor]);
1856
+ const handleExitFullscreen = useCallback(
1857
+ (event) => {
1858
+ if (event.key === "Escape") {
1859
+ editor?.unmount();
1860
+ setFullscreen(false);
1861
+ setRerenderKey((prev) => prev + 1);
1862
+ }
1863
+ },
1864
+ [editor]
1865
+ );
1866
+ useEffect(() => {
1867
+ const timer = setTimeout(() => {
1868
+ if (!editor?.isDestroyed && editor?.isEmpty && parsedContent && parsedContent !== "<p></p>") {
1869
+ editor?.commands.setContent(parsedContent);
1870
+ }
1871
+ }, 200);
1872
+ return () => clearTimeout(timer);
1873
+ }, [parsedContent, editor]);
1874
+ useEffect(() => {
1875
+ if (resetValue && !initialContent) {
1876
+ editor?.commands.clearContent();
1877
+ }
1878
+ }, [initialContent, resetValue, editor]);
1879
+ useEffect(() => {
1880
+ if (!fullscreen) return void 0;
1881
+ document.body.style.overflow = "hidden";
1882
+ window.addEventListener("keydown", handleExitFullscreen);
1883
+ return () => {
1884
+ document.body.style.overflow = "";
1885
+ window.removeEventListener("keydown", handleExitFullscreen);
1886
+ };
1887
+ }, [fullscreen, handleExitFullscreen]);
1888
+ const rootClassName = [
1889
+ editorClasses.root,
1890
+ className,
1891
+ error && editorClasses.state.error,
1892
+ !editable && editorClasses.state.disabled,
1893
+ fullscreen && editorClasses.state.fullscreen
1894
+ ].filter(Boolean).join(" ");
1895
+ return /* @__PURE__ */ jsxs(Portal, { disablePortal: !fullscreen, children: [
1896
+ fullscreen && /* @__PURE__ */ jsx(Backdrop, { open: true, sx: (theme) => ({ zIndex: theme.zIndex.modal - 1 }) }),
1897
+ /* @__PURE__ */ jsxs(
1898
+ Box,
1899
+ {
1900
+ ...slotProps?.wrapper,
1901
+ sx: [
1902
+ { display: "flex", flexDirection: "column" },
1903
+ ...Array.isArray(slotProps?.wrapper?.sx) ? slotProps.wrapper.sx : [slotProps?.wrapper?.sx]
1904
+ ],
1905
+ children: [
1906
+ /* @__PURE__ */ jsx(EditorRoot, { className: rootClassName, sx: [{ minHeight }, ...Array.isArray(sx) ? sx : [sx]], children: editor && !editor.isDestroyed && /* @__PURE__ */ jsxs(Fragment, { children: [
1907
+ showToolbar && /* @__PURE__ */ jsx(
1908
+ Toolbar,
1909
+ {
1910
+ labels,
1911
+ editor,
1912
+ toolbar: resolvedToolbar,
1913
+ fullscreen,
1914
+ onToggleFullscreen: handleToggleFullscreen
1915
+ }
1916
+ ),
1917
+ showBubbleMenu && /* @__PURE__ */ jsx(BubbleToolbar, { editor, labels }),
1918
+ /* @__PURE__ */ jsx(
1919
+ EditorContent,
1920
+ {
1921
+ ref: contentRef,
1922
+ spellCheck: false,
1923
+ autoComplete: "off",
1924
+ autoCapitalize: "off",
1925
+ editor,
1926
+ className: editorClasses.content.root,
1927
+ style: maxHeight ? { maxHeight, overflowY: "auto" } : void 0
1928
+ }
1929
+ )
1930
+ ] }) }),
1931
+ helperText && /* @__PURE__ */ jsx(FormHelperText, { error: !!error, children: helperText })
1932
+ ]
1933
+ }
1934
+ )
1935
+ ] });
1936
+ }
1937
+
1938
+ export { AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, BoldIcon, BubbleToolbar, BulletListIcon, CheckListIcon, ClearFormat, ClearMarksIcon, CodeBlockIcon, CodeHighlightBlock, DEFAULT_EDITOR_LABELS, Editor, ExitFullscreenIcon, FullscreenIcon, H1Icon, H2Icon, H3Icon, H4Icon, H5Icon, H6Icon, HardBreakIcon, HeadingBlock, HorizontalRuleIcon, ImageBlock, ImageIcon, InlineCodeIcon, ItalicIcon, LinkBlock, LinkIcon, OrderedListIcon, ParagraphIcon, QuoteIcon, RedoIcon, StrikeIcon, TableIcon, TextTransform, Toolbar, ToolbarItem, UnderlineIcon, UndoIcon, UnlinkIcon, editorClasses, resolveToolbar, useToolbarState };
1939
+ //# sourceMappingURL=chunk-WFD54GQQ.js.map
1940
+ //# sourceMappingURL=chunk-WFD54GQQ.js.map