reactjs-tiptap-editor 0.3.10 → 0.3.12

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 (222) hide show
  1. package/lib/{ActionMenuButton-ZOYNohaO.js → ActionMenuButton-BQ2ojtpo.js} +1 -1
  2. package/lib/{ActionMenuButton-D96eTByd.cjs → ActionMenuButton-OfnmanTP.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +12 -12
  5. package/lib/Attachment.d.ts +12 -12
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +12 -12
  9. package/lib/Blockquote.d.ts +12 -12
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +12 -12
  13. package/lib/Bold.d.ts +12 -12
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +12 -12
  17. package/lib/BulletList.d.ts +12 -12
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +12 -12
  21. package/lib/Clear.d.ts +12 -12
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +12 -12
  25. package/lib/Code.d.ts +12 -12
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +12 -12
  29. package/lib/CodeBlock.d.ts +12 -12
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +12 -12
  33. package/lib/CodeView.d.ts +12 -12
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +12 -12
  37. package/lib/Color.d.ts +12 -12
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +12 -12
  40. package/lib/Document.d.ts +12 -12
  41. package/lib/{Drawer-D7VC0bqz.js → Drawer-9QMJnenp.js} +1 -1
  42. package/lib/{Drawer-hzhjTRvj.cjs → Drawer-BN8H4Zb2.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +12 -12
  45. package/lib/Drawer.d.ts +12 -12
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +12 -12
  49. package/lib/Emoji.d.ts +12 -12
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-DuV1h_du.js → Excalidraw-B95hkXm5.js} +1 -1
  52. package/lib/{Excalidraw-Bj3dtbC4.cjs → Excalidraw-iG1WleD5.cjs} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +12 -12
  55. package/lib/Excalidraw.d.ts +12 -12
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +12 -12
  59. package/lib/ExportPdf.d.ts +12 -12
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +12 -12
  63. package/lib/ExportWord.d.ts +12 -12
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +12 -12
  67. package/lib/FontFamily.d.ts +12 -12
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +12 -12
  71. package/lib/FontSize.d.ts +12 -12
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +12 -12
  75. package/lib/FormatPainter.d.ts +12 -12
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +12 -12
  79. package/lib/Heading.d.ts +12 -12
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +12 -12
  83. package/lib/Highlight.d.ts +12 -12
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +12 -12
  87. package/lib/History.d.ts +12 -12
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +12 -12
  91. package/lib/HorizontalRule.d.ts +12 -12
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +12 -12
  95. package/lib/Iframe.d.ts +12 -12
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +12 -12
  99. package/lib/Image.d.ts +12 -12
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +12 -12
  103. package/lib/ImageGif.d.ts +12 -12
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +12 -12
  107. package/lib/ImportWord.d.ts +12 -12
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +12 -12
  111. package/lib/Indent.d.ts +12 -12
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +12 -12
  115. package/lib/Italic.d.ts +12 -12
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +12 -12
  119. package/lib/Katex.d.ts +12 -12
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +12 -12
  123. package/lib/LineHeight.d.ts +12 -12
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +2 -2
  126. package/lib/Link.d.cts +12 -12
  127. package/lib/Link.d.ts +12 -12
  128. package/lib/Link.js +6 -4
  129. package/lib/ListItem.d.cts +12 -12
  130. package/lib/ListItem.d.ts +12 -12
  131. package/lib/Mention.d.cts +12 -12
  132. package/lib/Mention.d.ts +12 -12
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +12 -12
  135. package/lib/Mermaid.d.ts +12 -12
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +12 -12
  139. package/lib/MoreMark.d.ts +12 -12
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +12 -12
  143. package/lib/MultiColumn.d.ts +12 -12
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +12 -12
  147. package/lib/OrderedList.d.ts +12 -12
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-CRDKX-F8.js → RichTextEditor-CFwUKN9i.js} +2 -1
  150. package/lib/{RichTextEditor-ymQlnG9m.cjs → RichTextEditor-COwI-b24.cjs} +1 -1
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +12 -12
  153. package/lib/SearchAndReplace.d.ts +12 -12
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +12 -12
  156. package/lib/Selection.d.ts +12 -12
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +12 -12
  159. package/lib/SlashCommand.d.ts +12 -12
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +12 -12
  163. package/lib/Strike.d.ts +12 -12
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +12 -12
  167. package/lib/SubAndSuperScript.d.ts +12 -12
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +12 -12
  171. package/lib/Table.d.ts +12 -12
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +12 -12
  175. package/lib/TableOfContent.d.ts +12 -12
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +12 -12
  179. package/lib/TaskList.d.ts +12 -12
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +12 -12
  183. package/lib/TextAlign.d.ts +12 -12
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +12 -12
  187. package/lib/TextBubble.d.ts +12 -12
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +12 -12
  191. package/lib/TextDirection.d.ts +12 -12
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +12 -12
  195. package/lib/TextUnderline.d.ts +12 -12
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +12 -12
  198. package/lib/TrailingNode.d.ts +12 -12
  199. package/lib/{Twitter-CjAodXzu.js → Twitter-ChRmdJB0.js} +1 -1
  200. package/lib/{Twitter-CMr6GpHp.cjs → Twitter-DbokWMq-.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +12 -12
  203. package/lib/Twitter.d.ts +12 -12
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +12 -12
  207. package/lib/Video.d.ts +12 -12
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +12 -12
  211. package/lib/bubble-extra.d.ts +12 -12
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +12 -12
  215. package/lib/index.d.ts +12 -12
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +12 -12
  218. package/lib/locale-bundle.d.ts +12 -12
  219. package/lib/style.css +1 -1
  220. package/lib/{textarea-Ci1tHD6V.cjs → textarea-BfhvC1nW.cjs} +1 -1
  221. package/lib/{textarea-CtL8w6IS.js → textarea-D5VHsW3K.js} +1 -1
  222. package/package.json +1 -1
package/lib/Link.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { M as ve, c as Ne, m as Ft, P as Nt, a as Yt, q as Ie, r as He, s as we, u as xe, v as Me, x as De, T as Ue } from "./index-CXIIg9Sq.js";
2
2
  import { jsxs as je, jsx as F } from "react/jsx-runtime";
3
3
  import { useState as Be } from "react";
4
- import { P as ze, m as We, A as Fe, k as Ke, n as Ge, R as Qe } from "./RichTextEditor-CRDKX-F8.js";
4
+ import { P as ze, m as We, A as Fe, k as Ke, n as Ge, R as Qe } from "./RichTextEditor-CFwUKN9i.js";
5
5
  const _e = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", $e = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", B = (t, n) => {
6
6
  for (const e in n)
7
7
  t[e] = n[e];
@@ -1003,7 +1003,7 @@ const Tn = /* @__PURE__ */ gn.extend({
1003
1003
  componentProps: {
1004
1004
  editor: n,
1005
1005
  action: (o) => {
1006
- const { link: s, text: i, openInNewTab: a } = o;
1006
+ const { link: s, text: i, openInNewTab: a } = o, { state: l } = n, { from: h } = l.selection, c = i.length, f = h + c;
1007
1007
  n.chain().extendMarkRange("link").insertContent({
1008
1008
  type: "text",
1009
1009
  text: i,
@@ -1016,7 +1016,7 @@ const Tn = /* @__PURE__ */ gn.extend({
1016
1016
  }
1017
1017
  }
1018
1018
  ]
1019
- }).setLink({ href: s }).focus().run();
1019
+ }).setLink({ href: s }).setTextSelection({ from: h, to: f }).focus().run();
1020
1020
  },
1021
1021
  id: "linkk",
1022
1022
  isActive: () => n.isActive("link") || !1,
@@ -1035,7 +1035,9 @@ const Tn = /* @__PURE__ */ gn.extend({
1035
1035
  const { schema: e, doc: o, tr: s } = t.state, i = De(o.resolve(n), e.marks.link);
1036
1036
  if (!i)
1037
1037
  return !1;
1038
- const a = o.resolve(i.from), l = o.resolve(i.to), h = s.setSelection(new Ue(a, l));
1038
+ const a = o.resolve(i.from), l = o.resolve(i.to), h = s.setSelection(
1039
+ new Ue(a, l)
1040
+ );
1039
1041
  t.dispatch(h);
1040
1042
  }
1041
1043
  }
@@ -118,19 +118,19 @@ declare module '@tiptap/core' {
118
118
 
119
119
  declare module '@tiptap/core' {
120
120
  interface Commands<ReturnType> {
121
- imageGifUpload: {
121
+ imageUpload: {
122
122
  /**
123
- * Add an image gif
123
+ * Add an image
124
124
  */
125
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
125
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
126
126
  /**
127
- * Update an image gif
127
+ * Update an image
128
128
  */
129
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
129
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
130
  /**
131
131
  * Set image alignment
132
132
  */
133
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
133
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
134
134
  };
135
135
  }
136
136
  }
@@ -138,19 +138,19 @@ declare module '@tiptap/core' {
138
138
 
139
139
  declare module '@tiptap/core' {
140
140
  interface Commands<ReturnType> {
141
- imageUpload: {
141
+ imageGifUpload: {
142
142
  /**
143
- * Add an image
143
+ * Add an image gif
144
144
  */
145
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
145
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
146
  /**
147
- * Update an image
147
+ * Update an image gif
148
148
  */
149
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
149
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
150
  /**
151
151
  * Set image alignment
152
152
  */
153
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
153
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
154
154
  };
155
155
  }
156
156
  }
package/lib/ListItem.d.ts CHANGED
@@ -118,19 +118,19 @@ declare module '@tiptap/core' {
118
118
 
119
119
  declare module '@tiptap/core' {
120
120
  interface Commands<ReturnType> {
121
- imageGifUpload: {
121
+ imageUpload: {
122
122
  /**
123
- * Add an image gif
123
+ * Add an image
124
124
  */
125
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
125
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
126
126
  /**
127
- * Update an image gif
127
+ * Update an image
128
128
  */
129
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
129
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
130
130
  /**
131
131
  * Set image alignment
132
132
  */
133
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
133
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
134
134
  };
135
135
  }
136
136
  }
@@ -138,19 +138,19 @@ declare module '@tiptap/core' {
138
138
 
139
139
  declare module '@tiptap/core' {
140
140
  interface Commands<ReturnType> {
141
- imageUpload: {
141
+ imageGifUpload: {
142
142
  /**
143
- * Add an image
143
+ * Add an image gif
144
144
  */
145
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
145
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
146
146
  /**
147
- * Update an image
147
+ * Update an image gif
148
148
  */
149
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
149
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
150
150
  /**
151
151
  * Set image alignment
152
152
  */
153
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
153
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
154
154
  };
155
155
  }
156
156
  }
package/lib/Mention.d.cts CHANGED
@@ -121,19 +121,19 @@ declare module '@tiptap/core' {
121
121
 
122
122
  declare module '@tiptap/core' {
123
123
  interface Commands<ReturnType> {
124
- imageGifUpload: {
124
+ imageUpload: {
125
125
  /**
126
- * Add an image gif
126
+ * Add an image
127
127
  */
128
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
128
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
129
129
  /**
130
- * Update an image gif
130
+ * Update an image
131
131
  */
132
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
132
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
133
133
  /**
134
134
  * Set image alignment
135
135
  */
136
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
136
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
137
137
  };
138
138
  }
139
139
  }
@@ -141,19 +141,19 @@ declare module '@tiptap/core' {
141
141
 
142
142
  declare module '@tiptap/core' {
143
143
  interface Commands<ReturnType> {
144
- imageUpload: {
144
+ imageGifUpload: {
145
145
  /**
146
- * Add an image
146
+ * Add an image gif
147
147
  */
148
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
148
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
149
149
  /**
150
- * Update an image
150
+ * Update an image gif
151
151
  */
152
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
152
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
153
153
  /**
154
154
  * Set image alignment
155
155
  */
156
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
156
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
157
157
  };
158
158
  }
159
159
  }
package/lib/Mention.d.ts CHANGED
@@ -121,19 +121,19 @@ declare module '@tiptap/core' {
121
121
 
122
122
  declare module '@tiptap/core' {
123
123
  interface Commands<ReturnType> {
124
- imageGifUpload: {
124
+ imageUpload: {
125
125
  /**
126
- * Add an image gif
126
+ * Add an image
127
127
  */
128
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
128
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
129
129
  /**
130
- * Update an image gif
130
+ * Update an image
131
131
  */
132
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
132
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
133
133
  /**
134
134
  * Set image alignment
135
135
  */
136
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
136
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
137
137
  };
138
138
  }
139
139
  }
@@ -141,19 +141,19 @@ declare module '@tiptap/core' {
141
141
 
142
142
  declare module '@tiptap/core' {
143
143
  interface Commands<ReturnType> {
144
- imageUpload: {
144
+ imageGifUpload: {
145
145
  /**
146
- * Add an image
146
+ * Add an image gif
147
147
  */
148
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
148
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
149
149
  /**
150
- * Update an image
150
+ * Update an image gif
151
151
  */
152
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
152
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
153
153
  /**
154
154
  * Set image alignment
155
155
  */
156
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
156
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
157
157
  };
158
158
  }
159
159
  }
package/lib/Mermaid.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-CSvnpArE.cjs"),u=require("./RichTextEditor-ymQlnG9m.cjs"),F=require("./dom-dataset-Cuy-pIfj.cjs"),o=require("react/jsx-runtime"),s=require("react"),P=require("./shortId-Bfj8TyNr.cjs"),Q=require("./textarea-Ci1tHD6V.cjs"),S=require("./index-Dz3YxLE7.cjs"),$=`graph TB
1
+ "use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-CSvnpArE.cjs"),u=require("./RichTextEditor-COwI-b24.cjs"),F=require("./dom-dataset-Cuy-pIfj.cjs"),o=require("react/jsx-runtime"),s=require("react"),P=require("./shortId-Bfj8TyNr.cjs"),Q=require("./textarea-BfhvC1nW.cjs"),S=require("./index-Dz3YxLE7.cjs"),$=`graph TB
2
2
  a-->b`,ee=({editor:t,upload:e})=>{const[r,a]=s.useState($),[l,v]=s.useState(""),[T,y]=s.useState(!1),A=s.useRef(null),[d,h]=s.useState(null),E=s.useCallback(c=>{c&&import("mermaid").then(x=>{h(x.default)})},[]),I=async c=>{try{const{svg:x}=await d.render("mermaid-svg",c);v(x)}catch{v("")}},L=()=>{d.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"}),I(r)};s.useEffect(()=>{d&&T&&L()},[d,T]),s.useEffect(()=>{d&&T&&I(r)},[d&&r]);const R=async()=>{if(r!==""){if(r){const c=A.current.querySelector("svg"),{width:x,height:j}=c.getBoundingClientRect(),_=`mermaid-${P.shortId()}.svg`;let M=P.i(c.outerHTML);if(e){console.log({src:M});const H=u.dataURLtoFile(M,_);M=await e(H)}t==null||t.chain().focus().setMermaid({type:"mermaid",src:M,alt:encodeURIComponent(r),width:x,height:j},!!r).run()}y(!1)}};return o.jsxs(u.Dialog,{onOpenChange:y,open:T,children:[o.jsx(u.DialogTrigger,{asChild:!0,children:o.jsx(u.ActionButton,{action:()=>y(!0),icon:"Mermaid",tooltip:"Mermaid"})}),o.jsxs(u.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[o.jsx(u.DialogTitle,{children:"Mermaid"}),o.jsx("div",{ref:E,style:{height:"100%",border:"1px solid hsl(var(--border))"},children:o.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[o.jsx(Q.Textarea,{autoFocus:!0,className:"richtext-flex-1",defaultValue:$,onChange:c=>a(c.target.value),placeholder:"Text",required:!0,rows:10,value:r,style:{color:"hsl(var(--richtext-foreground))"}}),o.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:l},ref:A,style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),o.jsx(u.DialogFooter,{children:o.jsx(u.Button,{onClick:R,type:"button",children:"Save changes"})})]})]})},O={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function te({editor:t,node:e,updateAttributes:r,getPos:a,selected:l}){const[v,T]=s.useState({width:S.IMAGE_MAX_SIZE,height:S.IMAGE_MAX_SIZE}),[y,A]=s.useState({width:0,height:0}),[d]=s.useState([O.TOP_LEFT,O.TOP_RIGHT,O.BOTTOM_LEFT,O.BOTTOM_RIGHT]),[h,E]=s.useState(!1),[I,L]=s.useState({x:0,y:0,w:0,h:0,dir:""}),{align:R}=e==null?void 0:e.attrs,c=s.useMemo(()=>{const{src:i,alt:m,width:f,height:b}=e==null?void 0:e.attrs,w=q.isNumber(f)?`${f}px`:f,n=q.isNumber(b)?`${b}px`:b;return{src:i||void 0,alt:m||void 0,style:{width:w||void 0,height:n||void 0}}},[e==null?void 0:e.attrs]),x=s.useMemo(()=>{const{style:{width:i}}=c;return{width:i==="100%"?i:void 0}},[c]);function j(i){A({width:i.target.width,height:i.target.height})}function _(){t.commands.setNodeSelection(a())}const M=s.useCallback(u.throttle(()=>{const{width:i}=getComputedStyle(t.view.dom);T(m=>({...m,width:Number.parseInt(i,10)}))},S.IMAGE_THROTTLE_WAIT_TIME),[t]);function H(i,m){i.preventDefault(),i.stopPropagation();const f=y.width,b=y.height,w=f/b;let n=Number(e.attrs.width),p=Number(e.attrs.height);const g=v.width;n&&!p?(n=n>g?g:n,p=Math.round(n/w)):p&&!n?(n=Math.round(p*w),n=n>g?g:n):!n&&!p?(n=f>g?g:f,p=Math.round(n/w)):n=n>g?g:n,E(!0),L({x:i.clientX,y:i.clientY,w:n,h:p,dir:m})}const N=s.useCallback(u.throttle(i=>{if(i.preventDefault(),i.stopPropagation(),!h)return;const{x:m,w:f,dir:b}=I,w=(i.clientX-m)*(/l/.test(b)?-1:1),{width:n,height:p}=e==null?void 0:e.attrs,g=n/p,B=u.clamp(f+w,S.IMAGE_MIN_SIZE,v.width),V=Math.round(B/g);r({width:B,height:V})},S.IMAGE_THROTTLE_WAIT_TIME),[h,I,v,r,e==null?void 0:e.attrs]),C=s.useCallback(i=>{i.preventDefault(),i.stopPropagation(),h&&(L({x:0,y:0,w:0,h:0,dir:""}),E(!1),_())},[h,_]),D=s.useCallback(()=>{document==null||document.addEventListener("mousemove",N,!0),document==null||document.addEventListener("mouseup",C,!0)},[N,C]),z=s.useCallback(()=>{document==null||document.removeEventListener("mousemove",N,!0),document==null||document.removeEventListener("mouseup",C,!0)},[N,C]);s.useEffect(()=>(h?D():z(),()=>{z()}),[h,D,z]);const k=s.useMemo(()=>new ResizeObserver(()=>M()),[M]);return s.useEffect(()=>(k.observe(t.view.dom),()=>{k.disconnect()}),[t.view.dom,k]),o.jsx(F.NodeViewWrapper,{className:"image-view",style:{...x,width:"100%",textAlign:R},children:o.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:{...x,background:"#fff"},className:`image-view__body ${l?"image-view__body--focused":""} ${h?"image-view__body--resizing":""}`,children:[o.jsx("img",{alt:c.alt,className:"image-view__body__image block",height:"auto",onClick:_,onLoad:j,src:c.src,style:c.style}),t.view.editable&&(l||h)&&o.jsx("div",{className:"image-resizer",children:d==null?void 0:d.map(i=>o.jsx("span",{className:`image-resizer__handler image-resizer__handler--${i}`,onMouseDown:m=>H(m,i)},`image-dir-${i}`))})]})})}const re=u.Image.extend({name:"mermaid",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"mermaid"},button:({editor:e,t:r,extension:a})=>{var l;return{component:ee,componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,editor:e,icon:"Mermaid",tooltip:r("editor.mermaid.tooltip"),upload:(l=a==null?void 0:a.options)==null?void 0:l.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("width");return a?Number.parseInt(a,10):320},renderHTML:e=>({width:e.width})},height:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("height");return a?Number.parseInt(a,10):212},renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})}}},addNodeView(){return F.ReactNodeViewRenderer(te)},addCommands(){return{setMermaid:(t,e)=>({commands:r,editor:a})=>e?r.insertContent({type:this.name,attrs:t}):r.insertContentAt(a.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageMermaid:t=>({commands:e})=>e.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:e}=t;return["div",{style:e?`text-align: ${e};`:"",class:"imageMermaid"},["img",q.mergeAttributes(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageMermaid]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width"),a=e==null?void 0:e.getAttribute("height");return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),width:r?Number.parseInt(r,10):null,height:a?Number.parseInt(a,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null}}}]}});exports.Mermaid=re;
package/lib/Mermaid.d.cts CHANGED
@@ -193,19 +193,19 @@ declare module '@tiptap/core' {
193
193
 
194
194
  declare module '@tiptap/core' {
195
195
  interface Commands<ReturnType> {
196
- imageGifUpload: {
196
+ imageUpload: {
197
197
  /**
198
- * Add an image gif
198
+ * Add an image
199
199
  */
200
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
200
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
201
201
  /**
202
- * Update an image gif
202
+ * Update an image
203
203
  */
204
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
204
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
205
205
  /**
206
206
  * Set image alignment
207
207
  */
208
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
208
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
209
209
  };
210
210
  }
211
211
  }
@@ -213,19 +213,19 @@ declare module '@tiptap/core' {
213
213
 
214
214
  declare module '@tiptap/core' {
215
215
  interface Commands<ReturnType> {
216
- imageUpload: {
216
+ imageGifUpload: {
217
217
  /**
218
- * Add an image
218
+ * Add an image gif
219
219
  */
220
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
220
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
221
221
  /**
222
- * Update an image
222
+ * Update an image gif
223
223
  */
224
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
224
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
225
225
  /**
226
226
  * Set image alignment
227
227
  */
228
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
228
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
229
229
  };
230
230
  }
231
231
  }
package/lib/Mermaid.d.ts CHANGED
@@ -193,19 +193,19 @@ declare module '@tiptap/core' {
193
193
 
194
194
  declare module '@tiptap/core' {
195
195
  interface Commands<ReturnType> {
196
- imageGifUpload: {
196
+ imageUpload: {
197
197
  /**
198
- * Add an image gif
198
+ * Add an image
199
199
  */
200
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
200
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
201
201
  /**
202
- * Update an image gif
202
+ * Update an image
203
203
  */
204
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
204
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
205
205
  /**
206
206
  * Set image alignment
207
207
  */
208
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
208
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
209
209
  };
210
210
  }
211
211
  }
@@ -213,19 +213,19 @@ declare module '@tiptap/core' {
213
213
 
214
214
  declare module '@tiptap/core' {
215
215
  interface Commands<ReturnType> {
216
- imageUpload: {
216
+ imageGifUpload: {
217
217
  /**
218
- * Add an image
218
+ * Add an image gif
219
219
  */
220
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
220
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
221
221
  /**
222
- * Update an image
222
+ * Update an image gif
223
223
  */
224
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
224
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
225
225
  /**
226
226
  * Set image alignment
227
227
  */
228
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
228
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
229
229
  };
230
230
  }
231
231
  }
package/lib/Mermaid.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { h as $, m as X } from "./index-CXIIg9Sq.js";
2
- import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-CRDKX-F8.js";
2
+ import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-CFwUKN9i.js";
3
3
  import { N as st, R as nt } from "./dom-dataset-2RXYq9wp.js";
4
4
  import { jsxs as C, jsx as o } from "react/jsx-runtime";
5
5
  import { useState as g, useRef as ot, useCallback as y, useEffect as E, useMemo as k } from "react";
6
6
  import { s as lt, i as ct } from "./shortId-WJVkrvml.js";
7
- import { T as ht } from "./textarea-CtL8w6IS.js";
7
+ import { T as ht } from "./textarea-D5VHsW3K.js";
8
8
  import { I as q, h as dt, i as W } from "./index-D-DR0FPY.js";
9
9
  const j = `graph TB
10
10
  a-->b`, ut = ({ editor: r, upload: t }) => {
package/lib/MoreMark.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-CSvnpArE.cjs"),l=require("./index-h9_SDuwc.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-ymQlnG9m.cjs");function b(t){var n;const i=x.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(u=>u.isActive());return e&&!e.default?{...e,icon:e!=null&&e.icon?e==null?void 0:e.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return c.jsxs(s.DropdownMenu,{children:[c.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:c.jsx(s.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:c.jsx(s.MenuDown,{className:"richtext-size-3 richtext-text-gray-500"})})}),c.jsx(s.DropdownMenuContent,{className:"w-full",children:(n=t==null?void 0:t.items)==null?void 0:n.map((e,o)=>c.jsxs(s.DropdownMenuCheckboxItem,{checked:i.title===e.title,className:"richtext-flex richtext-items-center richtext-gap-3",onClick:e.action,children:[c.jsx(s.IconComponent,{name:e==null?void 0:e.icon}),c.jsx("span",{className:"richtext-ml-1",children:e.title}),!!(e!=null&&e.shortcutKeys)&&c.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:s.getShortcutKeys(e.shortcutKeys)})]},`more-mark-${o}`))})]})}const m=h.Extension.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,extension:n,t:e}){const o=n.options.subscript,r=n.options.superscript,u={action:()=>i.commands.toggleSubscript(),isActive:()=>i.isActive("subscript")||!1,disabled:!i.can().toggleSubscript(),icon:"Subscript",title:e("editor.subscript.tooltip"),shortcutKeys:["mod","."]},d={action:()=>i.commands.toggleSuperscript(),isActive:()=>i.isActive("superscript")||!1,disabled:!i.can().toggleSuperscript(),icon:"Superscript",title:e("editor.superscript.tooltip"),shortcutKeys:["mod",","]},a=[];return o!==!1&&a.push(u),r!==!1&&a.push(d),{component:b,componentProps:{icon:"Type",tooltip:e("editor.moremark"),disabled:!i.isEditable,items:a}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(l.Subscript.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(l.Superscript.configure(this.options.superscript)),t}});exports.MoreMark=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-CSvnpArE.cjs"),l=require("./index-h9_SDuwc.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-COwI-b24.cjs");function b(t){var n;const i=x.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(u=>u.isActive());return e&&!e.default?{...e,icon:e!=null&&e.icon?e==null?void 0:e.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return c.jsxs(s.DropdownMenu,{children:[c.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:c.jsx(s.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:c.jsx(s.MenuDown,{className:"richtext-size-3 richtext-text-gray-500"})})}),c.jsx(s.DropdownMenuContent,{className:"w-full",children:(n=t==null?void 0:t.items)==null?void 0:n.map((e,o)=>c.jsxs(s.DropdownMenuCheckboxItem,{checked:i.title===e.title,className:"richtext-flex richtext-items-center richtext-gap-3",onClick:e.action,children:[c.jsx(s.IconComponent,{name:e==null?void 0:e.icon}),c.jsx("span",{className:"richtext-ml-1",children:e.title}),!!(e!=null&&e.shortcutKeys)&&c.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:s.getShortcutKeys(e.shortcutKeys)})]},`more-mark-${o}`))})]})}const m=h.Extension.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,extension:n,t:e}){const o=n.options.subscript,r=n.options.superscript,u={action:()=>i.commands.toggleSubscript(),isActive:()=>i.isActive("subscript")||!1,disabled:!i.can().toggleSubscript(),icon:"Subscript",title:e("editor.subscript.tooltip"),shortcutKeys:["mod","."]},d={action:()=>i.commands.toggleSuperscript(),isActive:()=>i.isActive("superscript")||!1,disabled:!i.can().toggleSuperscript(),icon:"Superscript",title:e("editor.superscript.tooltip"),shortcutKeys:["mod",","]},a=[];return o!==!1&&a.push(u),r!==!1&&a.push(d),{component:b,componentProps:{icon:"Type",tooltip:e("editor.moremark"),disabled:!i.isEditable,items:a}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(l.Subscript.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(l.Superscript.configure(this.options.superscript)),t}});exports.MoreMark=m;
@@ -204,19 +204,19 @@ declare module '@tiptap/core' {
204
204
 
205
205
  declare module '@tiptap/core' {
206
206
  interface Commands<ReturnType> {
207
- imageGifUpload: {
207
+ imageUpload: {
208
208
  /**
209
- * Add an image gif
209
+ * Add an image
210
210
  */
211
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
211
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
212
212
  /**
213
- * Update an image gif
213
+ * Update an image
214
214
  */
215
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
215
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
216
216
  /**
217
217
  * Set image alignment
218
218
  */
219
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
219
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
220
220
  };
221
221
  }
222
222
  }
@@ -224,19 +224,19 @@ declare module '@tiptap/core' {
224
224
 
225
225
  declare module '@tiptap/core' {
226
226
  interface Commands<ReturnType> {
227
- imageUpload: {
227
+ imageGifUpload: {
228
228
  /**
229
- * Add an image
229
+ * Add an image gif
230
230
  */
231
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
231
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
232
232
  /**
233
- * Update an image
233
+ * Update an image gif
234
234
  */
235
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
235
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
236
236
  /**
237
237
  * Set image alignment
238
238
  */
239
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
239
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
240
240
  };
241
241
  }
242
242
  }
package/lib/MoreMark.d.ts CHANGED
@@ -204,19 +204,19 @@ declare module '@tiptap/core' {
204
204
 
205
205
  declare module '@tiptap/core' {
206
206
  interface Commands<ReturnType> {
207
- imageGifUpload: {
207
+ imageUpload: {
208
208
  /**
209
- * Add an image gif
209
+ * Add an image
210
210
  */
211
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
211
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
212
212
  /**
213
- * Update an image gif
213
+ * Update an image
214
214
  */
215
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
215
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
216
216
  /**
217
217
  * Set image alignment
218
218
  */
219
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
219
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
220
220
  };
221
221
  }
222
222
  }
@@ -224,19 +224,19 @@ declare module '@tiptap/core' {
224
224
 
225
225
  declare module '@tiptap/core' {
226
226
  interface Commands<ReturnType> {
227
- imageUpload: {
227
+ imageGifUpload: {
228
228
  /**
229
- * Add an image
229
+ * Add an image gif
230
230
  */
231
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
231
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
232
232
  /**
233
- * Update an image
233
+ * Update an image gif
234
234
  */
235
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
235
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
236
236
  /**
237
237
  * Set image alignment
238
238
  */
239
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
239
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
240
240
  };
241
241
  }
242
242
  }
package/lib/MoreMark.js CHANGED
@@ -2,7 +2,7 @@ import { E as h } from "./index-CXIIg9Sq.js";
2
2
  import { S as d, a as m } from "./index-BGwJ0NfQ.js";
3
3
  import { jsxs as u, jsx as c } from "react/jsx-runtime";
4
4
  import { useMemo as f } from "react";
5
- import { D as x, e as b, A as g, M, f as S, h as k, k as A, g as w } from "./RichTextEditor-CRDKX-F8.js";
5
+ import { D as x, e as b, A as g, M, f as S, h as k, k as A, g as w } from "./RichTextEditor-CFwUKN9i.js";
6
6
  function y(t) {
7
7
  var s;
8
8
  const i = f(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CSvnpArE.cjs");const o=require("./RichTextEditor-ymQlnG9m.cjs");exports.Column=o.Column;exports.ColumnActionButton=o.ColumnActionButton;exports.EXTENSION_PRIORITY_HIGHEST=o.EXTENSION_PRIORITY_HIGHEST;exports.MultiColumn=o.MultiColumn;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CSvnpArE.cjs");const o=require("./RichTextEditor-COwI-b24.cjs");exports.Column=o.Column;exports.ColumnActionButton=o.ColumnActionButton;exports.EXTENSION_PRIORITY_HIGHEST=o.EXTENSION_PRIORITY_HIGHEST;exports.MultiColumn=o.MultiColumn;
@@ -126,19 +126,19 @@ declare module '@tiptap/core' {
126
126
 
127
127
  declare module '@tiptap/core' {
128
128
  interface Commands<ReturnType> {
129
- imageGifUpload: {
129
+ imageUpload: {
130
130
  /**
131
- * Add an image gif
131
+ * Add an image
132
132
  */
133
- setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
133
+ setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
134
134
  /**
135
- * Update an image gif
135
+ * Update an image
136
136
  */
137
- updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
137
+ updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
138
138
  /**
139
139
  * Set image alignment
140
140
  */
141
- setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
141
+ setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
142
142
  };
143
143
  }
144
144
  }
@@ -146,19 +146,19 @@ declare module '@tiptap/core' {
146
146
 
147
147
  declare module '@tiptap/core' {
148
148
  interface Commands<ReturnType> {
149
- imageUpload: {
149
+ imageGifUpload: {
150
150
  /**
151
- * Add an image
151
+ * Add an image gif
152
152
  */
153
- setImageInline: (options: Partial<SetImageAttrsOptions>) => ReturnType;
153
+ setImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
154
154
  /**
155
- * Update an image
155
+ * Update an image gif
156
156
  */
157
- updateImage: (options: Partial<SetImageAttrsOptions>) => ReturnType;
157
+ updateImageGif: (options: Partial<SetImageAttrsOptions>) => ReturnType;
158
158
  /**
159
159
  * Set image alignment
160
160
  */
161
- setAlignImage: (align: 'left' | 'center' | 'right') => ReturnType;
161
+ setAlignImageGif: (align: 'left' | 'center' | 'right') => ReturnType;
162
162
  };
163
163
  }
164
164
  }