reactjs-tiptap-editor 1.0.10 → 1.0.11
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.
- package/lib/{ActionMenuButton-BPdRqzDX.cjs → ActionMenuButton-BLlse5KO.cjs} +1 -1
- package/lib/{ActionMenuButton-CKTxYtl7.js → ActionMenuButton-DTXFBdGX.js} +2 -2
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +2 -2
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +2 -2
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +2 -2
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +2 -2
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +2 -2
- package/lib/CodeBlock.cjs +39 -39
- package/lib/CodeBlock.js +945 -837
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +4 -4
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +2 -2
- package/lib/{Drawer-Cfx115up.js → Drawer-D0yQ0wR7.js} +12 -12
- package/lib/{Drawer-hHj4Opkg.cjs → Drawer-kv6BU_6O.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +1 -1
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +11 -11
- package/lib/{Excalidraw-8pWJ17Ye.cjs → Excalidraw-B82ThkJA.cjs} +1 -1
- package/lib/{Excalidraw-CO93Tsmb.js → Excalidraw-CO4IRHmG.js} +17 -17
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +2 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +2 -2
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +4 -4
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +4 -4
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +12 -12
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +4 -4
- package/lib/History.cjs +1 -1
- package/lib/History.js +2 -2
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +2 -2
- package/lib/{Icon-D7GJZzoa.js → Icon-DRuJhcHK.js} +1 -1
- package/lib/{Icon-gtc3g-VK.cjs → Icon-DXePECFW.cjs} +1 -1
- package/lib/{Iframe-BmXO2c65.cjs → Iframe-03dn9wcM.cjs} +1 -1
- package/lib/{Iframe-DwhclppJ.js → Iframe-BEO28NPs.js} +10 -10
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +43 -43
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +6 -6
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.js +7 -7
- package/lib/{Indent-BOsymiZ7.js → Indent-CXurBbOr.js} +2 -2
- package/lib/{Indent-DPkMWfcv.cjs → Indent-Cqjdn3Jt.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +2 -2
- package/lib/{Katex-BYK-b9X2.js → Katex-Bvj469K1.js} +22 -22
- package/lib/{Katex-B1XbT8-X.cjs → Katex-DdWTV5NJ.cjs} +2 -2
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +11 -11
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-4-iRXH7m.cjs → LinkEditBlock-8ePAZ-G1.cjs} +2 -2
- package/lib/{LinkEditBlock-DgrLUMsJ.js → LinkEditBlock-DjXUEubR.js} +29 -29
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +18 -18
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +10 -10
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +2 -2
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +15 -15
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +2 -2
- package/lib/{SlashCommandNodeView-CQvMTXys.cjs → SlashCommandNodeView-Bl_gwZJB.cjs} +1 -1
- package/lib/{SlashCommandNodeView-BpNNU7Sm.js → SlashCommandNodeView-CcqL8ymb.js} +12 -12
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +2 -2
- package/lib/{Table-CT9R9Sdq.js → Table-9Y0Cg8Ab.js} +3 -3
- package/lib/{Table-LnWGm2m8.cjs → Table-DBGjezZK.cjs} +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +2 -2
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +9 -9
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +9 -9
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +2 -2
- package/lib/{Twitter-Bo4JkBTL.cjs → Twitter-Cnvt7GBg.cjs} +1 -1
- package/lib/{Twitter-mowilxRd.js → Twitter-DWwd0vHR.js} +16 -16
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +21 -21
- package/lib/bubble.cjs +4 -4
- package/lib/bubble.js +383 -389
- package/lib/{button-wt49IYwP.cjs → button-BW5bDPz_.cjs} +1 -1
- package/lib/{button-CBO-WDXK.js → button-RnHbJfd-.js} +1 -1
- package/lib/{checkbox-D1h32VWM.js → checkbox-CLSoR1Qj.js} +1 -1
- package/lib/{checkbox-DUcLSGZD.cjs → checkbox-CTEN0q4y.cjs} +1 -1
- package/lib/{dialog-DY868Uji.cjs → dialog-CMC9hsCo.cjs} +1 -1
- package/lib/{dialog-DSvgtlDI.js → dialog-D_HCtKvc.js} +1 -1
- package/lib/{dropdown-menu-B88Qn2KR.js → dropdown-menu-66q7Ofc5.js} +1 -1
- package/lib/{dropdown-menu-BripAeGB.cjs → dropdown-menu-DKSAS-w_.cjs} +1 -1
- package/lib/{index-BIqaogQg.js → index-C3zg3DPB.js} +669 -743
- package/lib/index-C838s-or.cjs +8 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/lib/{input-Bx4uo4gO.js → input-CvyMYMZG.js} +1 -1
- package/lib/{input-BeD5GdMv.cjs → input-D555880-.cjs} +1 -1
- package/lib/{label-uKG7RzFU.js → label-DsOYPjAo.js} +1 -1
- package/lib/{label--161UPH6.cjs → label-E6jF3Xud.cjs} +1 -1
- package/lib/{popover-BVX8otO9.js → popover-B7ec5-u2.js} +1 -1
- package/lib/{popover-Csk538NC.cjs → popover-BSzR_R01.cjs} +1 -1
- package/lib/{separator-DtrEdjAF.js → separator-JaTTqb3J.js} +18 -18
- package/lib/{separator-DLRVddHS.cjs → separator-PGnA-6Hr.cjs} +1 -1
- package/lib/{store-CsIFDUKR.js → store-Cf7tFiiI.js} +1 -1
- package/lib/{store-B8IkVz1J.cjs → store-oDk-lTPM.cjs} +1 -1
- package/lib/style.css +1 -1
- package/lib/{tabs-DOasUMDU.cjs → tabs-BTwiZkWd.cjs} +1 -1
- package/lib/{tabs-BKpr0QQB.js → tabs-CWr9HYaM.js} +1 -1
- package/lib/{textarea-Ba9OOzba.js → textarea-BdeLXbp8.js} +1 -1
- package/lib/{textarea-D9egO4qC.cjs → textarea-Yetl_PZi.cjs} +1 -1
- package/lib/{useButtonProps-DEtmDVPr.cjs → useButtonProps-DfnJiJLV.cjs} +1 -1
- package/lib/{useButtonProps-C_bqxmHi.js → useButtonProps-cMoicZgd.js} +1 -1
- package/package.json +1 -1
- package/lib/index-BvIJKpX1.cjs +0 -8
package/lib/Emoji.js
CHANGED
|
@@ -6,11 +6,11 @@ import { jsx as p, jsxs as h, Fragment as I } from "react/jsx-runtime";
|
|
|
6
6
|
import { forwardRef as K, useRef as V, useState as E, useMemo as $, useEffect as D, useImperativeHandle as U } from "react";
|
|
7
7
|
import W from "scroll-into-view-if-needed";
|
|
8
8
|
import { u as Z } from "./index-0OnGZkVF.js";
|
|
9
|
-
import { c as b, A as J } from "./index-
|
|
10
|
-
import { P as Y, a as X, b as Q } from "./popover-BVX8otO9.js";
|
|
9
|
+
import { c as b, A as J } from "./index-C3zg3DPB.js";
|
|
11
10
|
import { EmojiPicker as d } from "frimousse";
|
|
12
|
-
import { SearchIcon as
|
|
13
|
-
import { u as
|
|
11
|
+
import { SearchIcon as Y, LoaderIcon as X } from "lucide-react";
|
|
12
|
+
import { u as Q, b as ee } from "./useButtonProps-cMoicZgd.js";
|
|
13
|
+
import { P as ae, a as oe, b as se } from "./popover-B7ec5-u2.js";
|
|
14
14
|
const ne = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
15
15
|
var _ = /* @__PURE__ */ new Map();
|
|
16
16
|
function te(e) {
|
|
@@ -21544,7 +21544,7 @@ function _e({
|
|
|
21544
21544
|
className: b("!richtext-flex !richtext-h-9 !richtext-items-center !richtext-gap-2 !richtext-border-b richtext-border-border !richtext-px-3", e),
|
|
21545
21545
|
"data-slot": "emoji-picker-search-wrapper",
|
|
21546
21546
|
children: [
|
|
21547
|
-
/* @__PURE__ */ p(
|
|
21547
|
+
/* @__PURE__ */ p(Y, { className: "!richtext-size-4 !richtext-shrink-0 !richtext-opacity-50" }),
|
|
21548
21548
|
/* @__PURE__ */ p(
|
|
21549
21549
|
d.Search,
|
|
21550
21550
|
{
|
|
@@ -21616,7 +21616,7 @@ function ye({
|
|
|
21616
21616
|
{
|
|
21617
21617
|
className: "!richtext-absolute !richtext-inset-0 !richtext-flex !richtext-items-center !richtext-justify-center !richtext-text-muted-foreground",
|
|
21618
21618
|
"data-slot": "emoji-picker-loading",
|
|
21619
|
-
children: /* @__PURE__ */ p(
|
|
21619
|
+
children: /* @__PURE__ */ p(X, { className: "!richtext-size-4 !richtext-animate-spin" })
|
|
21620
21620
|
}
|
|
21621
21621
|
),
|
|
21622
21622
|
/* @__PURE__ */ p(
|
|
@@ -21666,15 +21666,15 @@ function we({
|
|
|
21666
21666
|
function Ie({ onSelectEmoji: e, children: a, disabled: o }) {
|
|
21667
21667
|
const [n, s] = E(!1);
|
|
21668
21668
|
return /* @__PURE__ */ h(
|
|
21669
|
-
|
|
21669
|
+
ae,
|
|
21670
21670
|
{
|
|
21671
21671
|
onOpenChange: (t) => {
|
|
21672
21672
|
o || s(t);
|
|
21673
21673
|
},
|
|
21674
21674
|
open: n,
|
|
21675
21675
|
children: [
|
|
21676
|
-
/* @__PURE__ */ p(
|
|
21677
|
-
/* @__PURE__ */ p(
|
|
21676
|
+
/* @__PURE__ */ p(oe, { asChild: !0, children: a }),
|
|
21677
|
+
/* @__PURE__ */ p(se, { className: "!richtext-w-fit !richtext-p-0", children: /* @__PURE__ */ h(
|
|
21678
21678
|
ve,
|
|
21679
21679
|
{
|
|
21680
21680
|
className: "!richtext-h-[342px]",
|
|
@@ -21693,12 +21693,12 @@ function Ie({ onSelectEmoji: e, children: a, disabled: o }) {
|
|
|
21693
21693
|
);
|
|
21694
21694
|
}
|
|
21695
21695
|
function Le() {
|
|
21696
|
-
const e =
|
|
21696
|
+
const e = Q(Ce.name), {
|
|
21697
21697
|
icon: a = void 0,
|
|
21698
21698
|
tooltip: o = void 0,
|
|
21699
21699
|
isActive: n = void 0,
|
|
21700
21700
|
action: s
|
|
21701
|
-
} = (e == null ? void 0 : e.componentProps) ?? {}, { disabled: i } =
|
|
21701
|
+
} = (e == null ? void 0 : e.componentProps) ?? {}, { disabled: i } = ee(n);
|
|
21702
21702
|
return e ? /* @__PURE__ */ p(
|
|
21703
21703
|
Ie,
|
|
21704
21704
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=Object.create;var H=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var F=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of V(t))!X.call(e,a)&&a!==r&&H(e,a,{get:()=>t[a],enumerable:!(n=$(t,a))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?B(U(e)):{},F(t||!e||!e.__esModule?H(r,"default",{value:e,enumerable:!0}):r,e));const E=require("./index-BBNITgNi.cjs"),s=require("react/jsx-runtime"),i=require("react"),L=require("./index-
|
|
1
|
+
"use strict";var B=Object.create;var H=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var F=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of V(t))!X.call(e,a)&&a!==r&&H(e,a,{get:()=>t[a],enumerable:!(n=$(t,a))||n.enumerable});return e};var k=(e,t,r)=>(r=e!=null?B(U(e)):{},F(t||!e||!e.__esModule?H(r,"default",{value:e,enumerable:!0}):r,e));const E=require("./index-BBNITgNi.cjs"),s=require("react/jsx-runtime"),i=require("react"),L=require("./index-C838s-or.cjs"),A=require("./dialog-CMC9hsCo.cjs"),T=require("./useButtonProps-DfnJiJLV.cjs"),G=require("re-resizable"),I=require("./dom-dataset-BqoJhJXt.cjs"),Y=require("./button-BW5bDPz_.cjs");function J(e){return e=e||new Map,{all:e,on(t,r){const n=e.get(t);n?n.push(r):e.set(t,[r])},off(t,r){const n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit(t,r){let n=e.get(t);n&&[...n].map(a=>{a(r)}),n=e.get("*"),n&&[...n].map(a=>{a(t,r)})}}}let C;function W(){try{return C||(C=J()),C}catch{throw new Error("Error EventEmitter")}}const R="OPEN_EXCALIDRAW_SETTING_MODAL";function K(e,t){W().on(e,t)}function Q(e,t){W().off(e,t)}function ee(e){W().emit(R,e)}function te(){const e=T.useEditorInstance(),t=T.useButtonProps(M.name),r=T.useExtension(M.name),{tooltipOptions:n={},isActive:a=void 0}=(t==null?void 0:t.componentProps)??{},{editorDisabled:f}=T.useToggleActive(a),u=i.useMemo(()=>(r==null?void 0:r.options)||{},[r]),[c,_]=i.useState(null),[x,y]=i.useState({}),[b,N]=i.useState({elements:[],appState:{isLoading:!1},files:null}),[d,h]=i.useState(!1),[v,j]=i.useState(!0),[m,O]=i.useState(null),o=i.useCallback(p=>{p&&import("@excalidraw/excalidraw").then(g=>{_(g.Excalidraw)}).catch(O).finally(()=>j(!1))},[j]),l=i.useCallback(p=>{setTimeout(()=>{p.refresh()})},[]),w=i.useCallback((p,g,z)=>{y({elements:p,appState:{isLoading:!1},files:z})},[]),D=i.useCallback(()=>{if(!c){h(!1);return}e.chain().focus().setExcalidraw({data:x}).run(),h(!1)},[c,e,x,h]);return i.useEffect(()=>{const p=g=>{(g==null?void 0:g.editor)===e&&(h(!0),g&&N(g.data))};return K(R,p),()=>{Q(R,p)}},[e,h]),i.useEffect(()=>{!v&&c&&d&&setTimeout(()=>{window.dispatchEvent(new Event("resize"))},400)},[v,c,d]),s.jsxs(A.Dialog,{onOpenChange:h,open:d,children:[s.jsx(A.DialogTrigger,{asChild:!0,children:s.jsx(L.ActionButton,{disabled:f,icon:"Excalidraw",tooltip:"Excalidraw",tooltipOptions:n,action:()=>{f||h(!0)}})}),s.jsxs(A.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[s.jsx(A.DialogTitle,{children:"Excalidraw"}),s.jsxs("div",{style:{height:"100%",borderWidth:1},children:[v&&s.jsx("p",{children:"Loading..."}),m&&s.jsx("p",{children:m&&m.message||"Error"}),s.jsx("div",{ref:o,style:{width:"100%",height:600},children:!v&&!m&&c?s.jsx(c,{initialData:b,langCode:"en",onChange:w,ref:l,...u.excalidrawProps}):null})]}),s.jsx(A.DialogFooter,{children:s.jsx(Y.Button,{disabled:!c,onClick:D,type:"button",children:"Save changes"})})]})]})}const re="_wrap_dra8y_1",ne="_renderWrap_dra8y_7",se="_handlerWrap_dra8y_30",ie="_disabled_dra8y_40",S={wrap:re,renderWrap:ne,handlerWrap:se,disabled:ie},ae=10,oe=200,q=15,P={width:"100%",height:"100%",maxWidth:"100%"};function ce({editor:e,node:t,updateAttributes:r}){const n=i.useRef(null),a=L.useEditableEditor(),f=e.isActive(M.name),{data:u,width:c,height:_}=t.attrs,[x,y]=i.useState(null),[b,N]=i.useState(!0),[d,h]=i.useState(null),[v,j]=i.useState(100),m=i.useCallback(o=>()=>{j(l=>T.clamp(o==="minus"?l-q:l+q,ae,oe))},[]);i.useEffect(()=>{let o=!1;return import("@excalidraw/excalidraw").then(l=>{o||(n.current=l.exportToSvg)}).catch(l=>!o&&h(l)).finally(()=>!o&&N(!1)),()=>{o=!0}},[u]),i.useEffect(()=>{let o=!1;return(async()=>{if(!n.current||o||b||d||!u)return;const w=await n.current(u);o||(w.setAttribute("width","100%"),w.setAttribute("height","100%"),w.setAttribute("display","block"),y(w))})(),()=>{o=!0}},[u,b,d]);const O=o=>{r({width:o.width,height:o.height})};return s.jsx(E.NodeViewWrapper,{className:E.clsx(S.wrap,{[S.active]:f,[S.disabled]:!a}),children:s.jsx(G.Resizable,{size:{width:Number.parseInt(c),height:Number.parseInt(_)},onResizeStop:(o,l,w,D)=>{O({width:Number.parseInt(c)+D.width,height:Number.parseInt(_)+D.height})},children:s.jsxs("div",{className:E.clsx(S.renderWrap,"render-wrapper"),style:{...P,overflow:"hidden"},children:[d&&s.jsx("div",{style:P,children:s.jsx("p",{children:d.message||d})}),b&&s.jsx("p",{children:"Loading..."}),!b&&!d&&x&&s.jsx("div",{dangerouslySetInnerHTML:{__html:(x==null?void 0:x.outerHTML)??""},style:{height:"100%",maxHeight:"100%",padding:24,overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",transform:`scale(${v/100})`,transition:"all ease-in-out .3s"}}),s.jsxs("div",{className:S.handlerWrap,children:[s.jsx(L.ActionButton,{action:m("minus"),disabled:!a,icon:"ZoomOut",tooltip:"Zoom Out"}),s.jsx(L.ActionButton,{action:m("plus"),disabled:!a,icon:"ZoomIn",tooltip:"Zoom In"})]})]})})})}const Z={elements:[]},M=E.Node3.create({name:"excalidraw",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addAttributes(){return{defaultShowPicker:{default:!1},createUser:{default:null},width:{default:"100%",parseHTML:I.getDatasetAttribute("width")},height:{default:240,parseHTML:I.getDatasetAttribute("height")},data:{default:Z,parseHTML:I.getDatasetAttribute("data",!0)}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),HTMLAttributes:{class:"excalidraw"},excalidrawProps:{},button:()=>({componentProps:{}})}},parseHTML(){return[{tag:"div[class=excalidraw]"}]},renderHTML({HTMLAttributes:e,node:t}){return["div",E.mergeAttributes(this.options.HTMLAttributes,e,I.nodeAttrsToDataset(t))]},addCommands(){return{setExcalidraw:e=>({tr:t,commands:r,chain:n})=>{var a,f,u;return e=e||{},e.data=e.data||Z,((u=(f=(a=t.selection)==null?void 0:a.node)==null?void 0:f.type)==null?void 0:u.name)==this.name?r.updateAttributes(this.name,e):n().insertContent({type:this.name,attrs:e}).run()}}},addNodeView(){return E.ReactNodeViewRenderer(ce)},addInputRules(){return[E.nodeInputRule({find:/^\$excalidraw\$$/,type:this.type,getAttributes:()=>({width:"100%"})})]}});exports.Excalidraw=M;exports.RichTextExcalidraw=te;exports.triggerOpenExcalidrawSettingModal=ee;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { q as V, C as Z, N as $, n as B, u as U, m as X } from "./index-sVScpCFG.js";
|
|
2
2
|
import { jsxs as T, jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as F, useState as l, useCallback as A, useEffect as N, useRef as G } from "react";
|
|
4
|
-
import { A as C, k as q } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { A as C, k as q } from "./index-C3zg3DPB.js";
|
|
5
|
+
import { D as Y, a as J, b as K, c as Q, d as ee } from "./dialog-D_HCtKvc.js";
|
|
6
|
+
import { c as te, u as re, d as ne, a as ie, f as ae } from "./useButtonProps-cMoicZgd.js";
|
|
7
|
+
import { Resizable as se } from "re-resizable";
|
|
8
|
+
import { n as oe, g as O } from "./dom-dataset-CIEeltF6.js";
|
|
9
|
+
import { B as de } from "./button-RnHbJfd-.js";
|
|
10
10
|
function ce(e) {
|
|
11
11
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
12
12
|
/**
|
|
@@ -75,10 +75,10 @@ function ye(e) {
|
|
|
75
75
|
H().emit(R, e);
|
|
76
76
|
}
|
|
77
77
|
function Me() {
|
|
78
|
-
const e =
|
|
78
|
+
const e = te(), t = re(W.name), n = ne(W.name), {
|
|
79
79
|
tooltipOptions: r = {},
|
|
80
80
|
isActive: s = void 0
|
|
81
|
-
} = (t == null ? void 0 : t.componentProps) ?? {}, { editorDisabled: f } =
|
|
81
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { editorDisabled: f } = ie(s), u = F(() => (n == null ? void 0 : n.options) || {}, [n]), [o, _] = l(null), [g, y] = l({}), [b, M] = l({ elements: [], appState: { isLoading: !1 }, files: null }), [d, h] = l(!1), [x, I] = l(!0), [w, D] = l(null), a = A(
|
|
82
82
|
(p) => {
|
|
83
83
|
p && import("@excalidraw/excalidraw").then((m) => {
|
|
84
84
|
_(m.Excalidraw);
|
|
@@ -114,12 +114,12 @@ function Me() {
|
|
|
114
114
|
window.dispatchEvent(new Event("resize"));
|
|
115
115
|
}, 400);
|
|
116
116
|
}, [x, o, d]), /* @__PURE__ */ T(
|
|
117
|
-
|
|
117
|
+
Y,
|
|
118
118
|
{
|
|
119
119
|
onOpenChange: h,
|
|
120
120
|
open: d,
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */ i(
|
|
122
|
+
/* @__PURE__ */ i(J, { asChild: !0, children: /* @__PURE__ */ i(
|
|
123
123
|
C,
|
|
124
124
|
{
|
|
125
125
|
disabled: f,
|
|
@@ -131,8 +131,8 @@ function Me() {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
) }),
|
|
134
|
-
/* @__PURE__ */ T(
|
|
135
|
-
/* @__PURE__ */ i(
|
|
134
|
+
/* @__PURE__ */ T(K, { className: "richtext-z-[99999] !richtext-max-w-[1300px]", children: [
|
|
135
|
+
/* @__PURE__ */ i(Q, { children: "Excalidraw" }),
|
|
136
136
|
/* @__PURE__ */ T("div", { style: { height: "100%", borderWidth: 1 }, children: [
|
|
137
137
|
x && /* @__PURE__ */ i("p", { children: "Loading..." }),
|
|
138
138
|
w && /* @__PURE__ */ i("p", { children: w && w.message || "Error" }),
|
|
@@ -154,8 +154,8 @@ function Me() {
|
|
|
154
154
|
}
|
|
155
155
|
)
|
|
156
156
|
] }),
|
|
157
|
-
/* @__PURE__ */ i(
|
|
158
|
-
|
|
157
|
+
/* @__PURE__ */ i(ee, { children: /* @__PURE__ */ i(
|
|
158
|
+
de,
|
|
159
159
|
{
|
|
160
160
|
disabled: !o,
|
|
161
161
|
onClick: L,
|
|
@@ -177,7 +177,7 @@ const he = "_wrap_dra8y_1", pe = "_renderWrap_dra8y_7", me = "_handlerWrap_dra8y
|
|
|
177
177
|
function Ee({ editor: e, node: t, updateAttributes: n }) {
|
|
178
178
|
const r = G(null), s = q(), f = e.isActive(W.name), { data: u, width: o, height: _ } = t.attrs, [g, y] = l(null), [b, M] = l(!0), [d, h] = l(null), [x, I] = l(100), w = A((a) => () => {
|
|
179
179
|
I(
|
|
180
|
-
(c) =>
|
|
180
|
+
(c) => ae(a === "minus" ? c - P : c + P, ge, we)
|
|
181
181
|
);
|
|
182
182
|
}, []);
|
|
183
183
|
N(() => {
|
|
@@ -209,7 +209,7 @@ function Ee({ editor: e, node: t, updateAttributes: n }) {
|
|
|
209
209
|
[v.disabled]: !s
|
|
210
210
|
}),
|
|
211
211
|
children: /* @__PURE__ */ i(
|
|
212
|
-
|
|
212
|
+
se,
|
|
213
213
|
{
|
|
214
214
|
size: { width: Number.parseInt(o), height: Number.parseInt(_) },
|
|
215
215
|
onResizeStop: (a, c, E, L) => {
|
|
@@ -321,7 +321,7 @@ const z = { elements: [] }, W = /* @__PURE__ */ $.create({
|
|
|
321
321
|
];
|
|
322
322
|
},
|
|
323
323
|
renderHTML({ HTMLAttributes: e, node: t }) {
|
|
324
|
-
return ["div", X(this.options.HTMLAttributes, e,
|
|
324
|
+
return ["div", X(this.options.HTMLAttributes, e, oe(t))];
|
|
325
325
|
},
|
|
326
326
|
addCommands() {
|
|
327
327
|
return {
|
package/lib/Excalidraw.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-BBNITgNi.cjs");const e=require("./Excalidraw-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-BBNITgNi.cjs");const e=require("./Excalidraw-B82ThkJA.cjs");require("./dom-dataset-BqoJhJXt.cjs");exports.Excalidraw=e.Excalidraw;exports.RichTextExcalidraw=e.RichTextExcalidraw;
|
package/lib/Excalidraw.js
CHANGED
package/lib/ExportPdf.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BBNITgNi.cjs"),l=require("react/jsx-runtime"),y=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BBNITgNi.cjs"),l=require("react/jsx-runtime"),y=require("./index-C838s-or.cjs");require("react");const h=require("./useButtonProps-DfnJiJLV.cjs");function P(e,n){var m;const t=document.createElement("iframe");t.setAttribute("style","position: absolute; width: 0; height: 0; top: 0; left: 0;"),document.body.appendChild(t);const o=t.contentDocument||((m=t.contentWindow)==null?void 0:m.document);if(!o)return;const{paperSize:s,title:i="React Tiptap Editor",margins:{top:d,right:c,bottom:r,left:a}}=n,p=`
|
|
2
2
|
<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
package/lib/ExportPdf.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { E as b } from "./index-sVScpCFG.js";
|
|
2
2
|
import { jsx as u, Fragment as v } from "react/jsx-runtime";
|
|
3
|
-
import { A as y } from "./index-
|
|
3
|
+
import { A as y } from "./index-C3zg3DPB.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { u as x, a as E } from "./useButtonProps-
|
|
5
|
+
import { u as x, a as E } from "./useButtonProps-cMoicZgd.js";
|
|
6
6
|
function P(o, i) {
|
|
7
7
|
var m;
|
|
8
8
|
const t = document.createElement("iframe");
|
package/lib/ExportWord.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-BBNITgNi.cjs"),u=require("docx"),n=require("prosemirror-docx"),i=require("react/jsx-runtime"),y=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-BBNITgNi.cjs"),u=require("docx"),n=require("prosemirror-docx"),i=require("react/jsx-runtime"),y=require("./index-C838s-or.cjs"),B=require("react"),l=require("./useButtonProps-DfnJiJLV.cjs"),v=typeof window<"u";function g(o,e){if(v){const r=window.URL.createObjectURL(o),t=document.createElement("a");return t.href=r,t.download=e,t.click(),window.URL.revokeObjectURL(r),Promise.resolve()}return console.error("Download is not supported in Node.js"),Promise.resolve()}function E(){const o=l.useButtonProps(p.name),[e,r]=B.useState(!1),{icon:t=void 0,tooltip:a=void 0,shortcutKeys:s=void 0,tooltipOptions:f={},action:c=void 0,isActive:x=void 0}=(o==null?void 0:o.componentProps)??{},{dataState:m,disabled:d,update:w}=l.useToggleActive(x),b=async()=>{d||e||c&&(r(!0),await c(),w(),r(!1))};return o?i.jsx(y.ActionButton,{action:b,dataState:m,disabled:d||e,icon:e?"Loader":t,shortcutKeys:s,tooltip:a,tooltipOptions:f}):i.jsx(i.Fragment,{})}const W={...n.defaultNodes,hardBreak:n.defaultNodes.hard_break,codeBlock:n.defaultNodes.code_block,orderedList:n.defaultNodes.ordered_list,listItem:n.defaultNodes.list_item,bulletList:n.defaultNodes.bullet_list,horizontalRule:n.defaultNodes.horizontal_rule,image(o,e){o.renderInline(e),o.closeBlock(e)},table(o,e){o.table(e,{tableOptions:{width:{size:100,type:u.WidthType.PERCENTAGE}}})}},R=new n.DocxSerializer(W,n.defaultMarks),p=h.Extension.create({name:"exportWord",addOptions(){var o;return{...(o=this.parent)==null?void 0:o.call(this),button:({editor:e,t:r})=>({componentProps:{icon:"ExportWord",action:()=>{var t;return e==null?void 0:e.commands.exportToWord((t=e==null?void 0:e.state)==null?void 0:t.doc)},tooltip:r("editor.exportWord.tooltip"),isActive:()=>!1,disabled:!1}})}},addCommands(){return{exportToWord:o=>async()=>{try{const e={getImageBuffer:async t=>{const s=await(await fetch(t)).arrayBuffer();return new Uint8Array(s)}},r=R.serialize(o,e);return u.Packer.toBlob(r).then(t=>g(new Blob([t]),"richtext-export-document.docx")),!0}catch(e){return console.error("Error exporting to Word:",e),!1}}}}});exports.ExportWord=p;exports.RichTextExportWord=E;
|
package/lib/ExportWord.js
CHANGED
|
@@ -2,9 +2,9 @@ import { E as w } from "./index-sVScpCFG.js";
|
|
|
2
2
|
import { Packer as x, WidthType as b } from "docx";
|
|
3
3
|
import { defaultNodes as n, DocxSerializer as h, defaultMarks as B } from "prosemirror-docx";
|
|
4
4
|
import { jsx as d, Fragment as v } from "react/jsx-runtime";
|
|
5
|
-
import { A as y } from "./index-
|
|
5
|
+
import { A as y } from "./index-C3zg3DPB.js";
|
|
6
6
|
import { useState as E } from "react";
|
|
7
|
-
import { u as g, a as k } from "./useButtonProps-
|
|
7
|
+
import { u as g, a as k } from "./useButtonProps-cMoicZgd.js";
|
|
8
8
|
const W = typeof window < "u";
|
|
9
9
|
function A(e, o) {
|
|
10
10
|
if (W) {
|
package/lib/FontFamily.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BZ6DfR2r.cjs"),F=require("./index-FSRjMsxW.cjs"),f=require("./useButtonProps-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BZ6DfR2r.cjs"),F=require("./index-FSRjMsxW.cjs"),f=require("./useButtonProps-DfnJiJLV.cjs"),e=require("react/jsx-runtime"),m=require("react");require("./index-C838s-or.cjs");const x=require("./ActionMenuButton-BLlse5KO.cjs"),d=require("./dropdown-menu-DKSAS-w_.cjs");function M(){const{t:l}=F.useLocale(),n=f.useButtonProps(p.name),{icon:u=void 0,tooltip:a=void 0,items:r=[],isActive:s=void 0}=(n==null?void 0:n.componentProps)??{},{disabled:c,dataState:t}=f.useActive(s),o=m.useMemo(()=>(t==null?void 0:t.font)||l("editor.fontFamily.default.tooltip"),[t]);return n?e.jsxs(d.DropdownMenu,{children:[e.jsx(d.DropdownMenuTrigger,{asChild:!0,disabled:c,children:e.jsx(x.ActionMenuButton,{disabled:c,icon:u,title:(o==null?void 0:o.length)>12?`${o==null?void 0:o.slice(0,12)}...`:o,tooltip:a})}),e.jsx(d.DropdownMenuContent,{className:"richtext-w-full",children:r==null?void 0:r.map((i,y)=>{const h=i.font===l("editor.fontFamily.default.tooltip")?{}:{fontFamily:i.font};return e.jsxs(m.Fragment,{children:[e.jsx(d.DropdownMenuCheckboxItem,{checked:o===i.font,onClick:i.action,children:e.jsx("div",{className:"richtext-ml-1 richtext-h-full",style:h,children:i.font})}),i.font===l("editor.fontFamily.default.tooltip")&&e.jsx(d.DropdownMenuSeparator,{})]},`font-family-${y}`)})})]}):e.jsx(e.Fragment,{})}const p=v.FontFamily.extend({addOptions(){var l;return{...(l=this.parent)==null?void 0:l.call(this),fontFamilyList:F.DEFAULT_FONT_FAMILY_LIST,button({editor:n,extension:u,t:a}){var c;const r=f.ensureNameValueOptions(((c=u==null?void 0:u.options)==null?void 0:c.fontFamilyList)||[]),s=r.map(t=>({action:()=>{if(t.value==="Default"){n.chain().focus().unsetFontFamily().run();return}n.chain().focus().setFontFamily(t.value).run()},isActive:()=>n.isActive("textStyle",{fontFamily:t.value})||!1,title:t.name,font:t.value,default:t.value==="Default"}));return{componentProps:{tooltip:a("editor.fontFamily.tooltip"),disabled:!1,items:s,isActive:()=>{const t=s==null?void 0:s.find(i=>i.isActive());return t&&!t.default?t:{title:a("editor.fontFamily.default.tooltip"),font:a("editor.fontFamily.default.tooltip"),isActive:()=>!1,disabled:!1}},icon:"MenuDown",fontFamilyList:r}}}}}});exports.FontFamily=p;exports.RichTextFontFamily=M;
|
package/lib/FontFamily.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { F as p } from "./index-DmPwbBqm.js";
|
|
2
2
|
import { u as F, D as y } from "./index-0OnGZkVF.js";
|
|
3
|
-
import { u as h, b as v, e as A } from "./useButtonProps-
|
|
3
|
+
import { u as h, b as v, e as A } from "./useButtonProps-cMoicZgd.js";
|
|
4
4
|
import { jsx as i, Fragment as D, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import { useMemo as M, Fragment as w } from "react";
|
|
6
|
-
import "./index-
|
|
7
|
-
import { A as L } from "./ActionMenuButton-
|
|
8
|
-
import { D as b, a as g, b as x, c as T, d as C } from "./dropdown-menu-
|
|
6
|
+
import "./index-C3zg3DPB.js";
|
|
7
|
+
import { A as L } from "./ActionMenuButton-DTXFBdGX.js";
|
|
8
|
+
import { D as b, a as g, b as x, c as T, d as C } from "./dropdown-menu-66q7Ofc5.js";
|
|
9
9
|
function S() {
|
|
10
10
|
const { t: a } = F(), n = h(N.name), {
|
|
11
11
|
icon: s = void 0,
|
package/lib/FontSize.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-BBNITgNi.cjs"),x=require("./index-FSRjMsxW.cjs"),S=require("./useButtonProps-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-BBNITgNi.cjs"),x=require("./index-FSRjMsxW.cjs"),S=require("./useButtonProps-DfnJiJLV.cjs"),o=require("react/jsx-runtime"),p=require("react");require("./index-C838s-or.cjs");const h=require("./ActionMenuButton-BLlse5KO.cjs"),l=require("./dropdown-menu-DKSAS-w_.cjs");function v(){const{t:e}=x.useLocale(),n=S.useButtonProps(z.name),{icon:d=void 0,tooltip:s=void 0,items:c=[],isActive:a=void 0}=(n==null?void 0:n.componentProps)??{},{disabled:u,dataState:t}=S.useActive(a),r=p.useMemo(()=>(t==null?void 0:t.title)||e("editor.fontSize.default.tooltip"),[t]);return n?o.jsxs(l.DropdownMenu,{children:[o.jsx(l.DropdownMenuTrigger,{asChild:!0,disabled:u,children:o.jsx(h.ActionMenuButton,{disabled:u,icon:d,title:r,tooltip:s})}),o.jsx(l.DropdownMenuContent,{className:"richtext-max-h-96 richtext-w-32 richtext-overflow-y-auto",children:c==null?void 0:c.map((i,f)=>o.jsxs(p.Fragment,{children:[o.jsx(l.DropdownMenuCheckboxItem,{checked:r===i.title,onClick:i.action,children:o.jsx("div",{className:"richtext-ml-1 richtext-h-full",children:i.title})}),i.title===e("editor.fontSize.default.tooltip")&&o.jsx(l.DropdownMenuSeparator,{})]},`font-size-${f}`))})]}):o.jsx(o.Fragment,{})}const z=m.Extension.create({name:"fontSize",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["textStyle"],fontSizes:x.DEFAULT_FONT_SIZE_LIST,button({editor:n,extension:d,t:s}){var u;const a=S.ensureNameValueOptions((u=d.options)==null?void 0:u.fontSizes).map(t=>({title:t.value==="Default"?s("editor.fontSize.default.tooltip"):String(t.name),isActive:()=>{const{fontSize:r}=n.getAttributes("textStyle"),i=t.value==="Default",f=r==null||r==="";return i&&f?!0:n.isActive({fontSize:String(t.value)})||!1},action:()=>{if(t.value==="Default"){n.commands.unsetFontSize();return}n.commands.setFontSize(String(t.value))},default:t.value==="Default"||!1}));return{componentProps:{editor:n,tooltip:s("editor.fontSize.tooltip"),disabled:!1,items:a,maxHeight:280,icon:"MenuDown",isActive:()=>{const t=(a||[]).find(i=>i.isActive());return t&&!t.default?t:{title:s("editor.fontSize.default.tooltip"),isActive:()=>!1}}}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replaceAll(/["']+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:n})=>n().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}});exports.FontSize=z;exports.RichTextFontSize=v;
|
package/lib/FontSize.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { E as m } from "./index-sVScpCFG.js";
|
|
2
2
|
import { u as p, h as S } from "./index-0OnGZkVF.js";
|
|
3
|
-
import { u as z, b as h, e as v } from "./useButtonProps-
|
|
3
|
+
import { u as z, b as h, e as v } from "./useButtonProps-cMoicZgd.js";
|
|
4
4
|
import { jsx as r, Fragment as x, jsxs as d } from "react/jsx-runtime";
|
|
5
5
|
import { useMemo as A, Fragment as D } from "react";
|
|
6
|
-
import "./index-
|
|
7
|
-
import { A as y } from "./ActionMenuButton-
|
|
8
|
-
import { D as F, a as M, b as g, c as b, d as w } from "./dropdown-menu-
|
|
6
|
+
import "./index-C3zg3DPB.js";
|
|
7
|
+
import { A as y } from "./ActionMenuButton-DTXFBdGX.js";
|
|
8
|
+
import { D as F, a as M, b as g, c as b, d as w } from "./dropdown-menu-66q7Ofc5.js";
|
|
9
9
|
function $() {
|
|
10
10
|
const { t: e } = p(), n = z(T.name), {
|
|
11
11
|
icon: c = void 0,
|
package/lib/Heading.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BBNITgNi.cjs"),A=require("./index-FSRjMsxW.cjs"),s=require("react/jsx-runtime"),f=require("react"),x=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-BBNITgNi.cjs"),A=require("./index-FSRjMsxW.cjs"),s=require("react/jsx-runtime"),f=require("react"),x=require("./index-C838s-or.cjs"),b=require("./ActionMenuButton-BLlse5KO.cjs"),M=require("./useButtonProps-DfnJiJLV.cjs"),h=require("./dropdown-menu-DKSAS-w_.cjs");var j=v.Node3.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,v.mergeAttributes(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var l;const i=(l=e.attrs)!=null&&l.level?parseInt(e.attrs.level,10):1,a="#".repeat(i);return e.content?`${a} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>v.textblockTypeInputRule({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});function m(){const{t:e}=A.useLocale(),t=M.useButtonProps(H.name),{icon:l=void 0,tooltip:i=void 0,isActive:a=void 0,items:o=[]}=(t==null?void 0:t.componentProps)??{},{disabled:p,dataState:d}=M.useActive(a),r=f.useMemo(()=>(d==null?void 0:d.title)||e("editor.paragraph.tooltip"),[d]);return t?s.jsxs(h.DropdownMenu,{children:[s.jsx(h.DropdownMenuTrigger,{asChild:!0,disabled:p,children:s.jsx(b.ActionMenuButton,{disabled:p,icon:l,title:r,tooltip:i})}),s.jsx(h.DropdownMenuContent,{className:"richtext-w-full",children:o==null?void 0:o.map((n,c)=>{var u,g;return s.jsxs(f.Fragment,{children:[s.jsxs(h.DropdownMenuCheckboxItem,{checked:r===n.title,onClick:n.action,children:[s.jsx("div",{className:x.cn("richtext-ml-1 richtext-h-full",{"":n.level==="Paragraph","heading-1":n.level===1,"heading-2":n.level===2,"heading-3":n.level===3,"heading-4":n.level===4,"heading-5":n.level===5,"heading-6":n.level===6}),children:n.title}),!!((u=n==null?void 0:n.shortcutKeys)!=null&&u.length)&&s.jsx(h.DropdownMenuShortcut,{className:"richtext-pl-4",children:(g=n==null?void 0:n.shortcutKeys)==null?void 0:g.map($=>x.getShortcutKey($)).join(" ")})]}),n.level==="Paragraph"&&s.jsx(h.DropdownMenuSeparator,{})]},`heading-k-${c}`)})})]}):s.jsx(s.Fragment,{})}const H=j.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),levels:A.HEADINGS,button({editor:t,extension:l,t:i}){var d;const a=((d=l.options)==null?void 0:d.levels)||[],o=a.map(r=>{var c;const n=r==="Paragraph";return{action:()=>{if(n){const u=a.find(g=>t.isActive("heading",{level:g}));u&&u!=="Paragraph"&&t.commands.toggleHeading({level:u});return}t.commands.toggleHeading({level:r})},isActive:()=>n?!1:t.isActive("heading",{level:r})||!1,disabled:!t.can().toggleHeading({level:r}),title:i(n?"editor.paragraph.tooltip":`editor.heading.h${r}.tooltip`),level:r,shortcutKeys:((c=l.options.shortcutKeys)==null?void 0:c[r])??["alt","mod",`${r}`],default:n}}),p=o.filter(r=>r.disabled).length===o.length;return{componentProps:{tooltip:i("editor.heading.tooltip"),disabled:p,items:o,icon:"MenuDown",isActive:()=>{const r=o==null?void 0:o.find(c=>c.isActive());return r&&!r.default?r:{title:i("editor.paragraph.tooltip"),level:0,isActive:()=>!1}},levels:a}}}}}});exports.Heading=H;exports.RichTextHeading=m;
|
package/lib/Heading.js
CHANGED
|
@@ -2,10 +2,10 @@ import { N as f, t as m, m as A } from "./index-sVScpCFG.js";
|
|
|
2
2
|
import { u as M, H } from "./index-0OnGZkVF.js";
|
|
3
3
|
import { jsx as d, Fragment as b, jsxs as g } from "react/jsx-runtime";
|
|
4
4
|
import { useMemo as $, Fragment as w } from "react";
|
|
5
|
-
import { c as x, h as D } from "./index-
|
|
6
|
-
import { A as y } from "./ActionMenuButton-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { c as x, h as D } from "./index-C3zg3DPB.js";
|
|
6
|
+
import { A as y } from "./ActionMenuButton-DTXFBdGX.js";
|
|
7
|
+
import { u as N, b as k } from "./useButtonProps-cMoicZgd.js";
|
|
8
|
+
import { D as L, a as C, b as T, c as I, e as K, d as P } from "./dropdown-menu-66q7Ofc5.js";
|
|
9
9
|
var R = f.create({
|
|
10
10
|
name: "heading",
|
|
11
11
|
addOptions() {
|
|
@@ -66,15 +66,15 @@ var R = f.create({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
function z() {
|
|
69
|
-
const { t: e } = M(), t =
|
|
69
|
+
const { t: e } = M(), t = N(S.name), {
|
|
70
70
|
icon: a = void 0,
|
|
71
71
|
tooltip: s = void 0,
|
|
72
72
|
isActive: i = void 0,
|
|
73
73
|
items: o = []
|
|
74
|
-
} = (t == null ? void 0 : t.componentProps) ?? {}, { disabled: h, dataState: l } =
|
|
75
|
-
return t ? /* @__PURE__ */ g(
|
|
74
|
+
} = (t == null ? void 0 : t.componentProps) ?? {}, { disabled: h, dataState: l } = k(i), r = $(() => (l == null ? void 0 : l.title) || e("editor.paragraph.tooltip"), [l]);
|
|
75
|
+
return t ? /* @__PURE__ */ g(L, { children: [
|
|
76
76
|
/* @__PURE__ */ d(
|
|
77
|
-
|
|
77
|
+
C,
|
|
78
78
|
{
|
|
79
79
|
asChild: !0,
|
|
80
80
|
disabled: h,
|
|
@@ -89,11 +89,11 @@ function z() {
|
|
|
89
89
|
)
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
/* @__PURE__ */ d(
|
|
92
|
+
/* @__PURE__ */ d(T, { className: "richtext-w-full", children: o == null ? void 0 : o.map((n, c) => {
|
|
93
93
|
var u, p;
|
|
94
94
|
return /* @__PURE__ */ g(w, { children: [
|
|
95
95
|
/* @__PURE__ */ g(
|
|
96
|
-
|
|
96
|
+
I,
|
|
97
97
|
{
|
|
98
98
|
checked: r === n.title,
|
|
99
99
|
onClick: n.action,
|
|
@@ -113,11 +113,11 @@ function z() {
|
|
|
113
113
|
children: n.title
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
|
-
!!((u = n == null ? void 0 : n.shortcutKeys) != null && u.length) && /* @__PURE__ */ d(
|
|
116
|
+
!!((u = n == null ? void 0 : n.shortcutKeys) != null && u.length) && /* @__PURE__ */ d(K, { className: "richtext-pl-4", children: (p = n == null ? void 0 : n.shortcutKeys) == null ? void 0 : p.map((v) => D(v)).join(" ") })
|
|
117
117
|
]
|
|
118
118
|
}
|
|
119
119
|
),
|
|
120
|
-
n.level === "Paragraph" && /* @__PURE__ */ d(
|
|
120
|
+
n.level === "Paragraph" && /* @__PURE__ */ d(P, {})
|
|
121
121
|
] }, `heading-k-${c}`);
|
|
122
122
|
}) })
|
|
123
123
|
] }) : /* @__PURE__ */ d(b, {});
|
package/lib/Highlight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-BBNITgNi.cjs"),e=require("react/jsx-runtime"),x=require("react"),C=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-BBNITgNi.cjs"),e=require("react/jsx-runtime"),x=require("react"),C=require("./index-C838s-or.cjs"),m=require("./separator-PGnA-6Hr.cjs"),a=require("./useButtonProps-DfnJiJLV.cjs"),L=require("./Icon-DXePECFW.cjs"),H=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,M=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,v=l.Mark.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",l.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:r})=>r.setMark(this.name,t),toggleHighlight:t=>({commands:r})=>r.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[l.markInputRule({find:H,type:this.type})]},addPasteRules(){return[l.markPasteRule({find:M,type:this.type})]}});function j({fill:t}){return e.jsx("svg",{height:"18px",version:"1.1",viewBox:"0 0 256 256",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:1,children:e.jsxs("g",{id:"icon/背景颜色",children:[e.jsx("g",{fill:"currentColor",children:e.jsxs("g",{transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)",children:[e.jsx("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z",fillRule:"nonzero"}),e.jsx("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z",fillRule:"evenodd"}),e.jsx("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z",fillRule:"nonzero"})]})}),e.jsx("path",{d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:typeof t=="string"?t:"none",id:"矩形"})]})})})}function y(){const t=a.useButtonProps(d.name),{tooltip:r=void 0,isActive:s=void 0,defaultColor:i=void 0,colors:o,action:n,shortcutKeys:g}=(t==null?void 0:t.componentProps)??{},{editorDisabled:h}=a.useActive(s),[u,f]=x.useState(i);function p(c){h||n&&(n==null||n(c),f(c))}return t?e.jsx(m.ColorPicker,{colors:o,disabled:h,highlight:!0,onChange:p,value:u,children:e.jsx(C.ActionButton,{disabled:h,tooltip:r,shortcutKeys:g,children:e.jsxs("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-gap-[4px] richtext-text-sm",children:[e.jsx(j,{fill:u}),e.jsx(L.IconComponent,{className:"!richtext-h-3 !richtext-w-3 richtext-text-zinc-500",name:"MenuDown"})]})})}):e.jsx(e.Fragment,{})}const d=v.extend({addStorage(){return{currentColor:this.options.defaultColor||void 0}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:r,t:s,extension:i})=>({componentProps:{action:o=>{if(typeof o=="string"){r.storage.highlight.currentColor=o,r.chain().focus().setHighlight({color:o}).run();return}r.chain().focus().unsetHighlight().run()},isActive:()=>r.isActive("highlight")||!1,disabled:!1,shortcutKeys:i.options.shortcutKeys??["⇧","mod","H"],tooltip:s("editor.highlight.tooltip"),defaultColor:i.options.defaultColor}})}},addKeyboardShortcuts(){var t;return{...(t=this.parent)==null?void 0:t.call(this),"Mod-Shift-h":()=>{const r=this.storage.currentColor||this.options.defaultColor;if(!r){const{color:i}=this.editor.getAttributes("highlight");return i?this.editor.chain().focus().unsetHighlight().run():!1}return this.editor.isActive("highlight",{color:r})?this.editor.chain().focus().unsetHighlight().run():this.editor.chain().focus().setHighlight({color:r}).run()}}}});exports.Highlight=d;exports.RichTextHighlight=y;
|
package/lib/Highlight.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { M as f, f as p, h as m, m as C } from "./index-sVScpCFG.js";
|
|
2
2
|
import { jsx as r, jsxs as h, Fragment as L } from "react/jsx-runtime";
|
|
3
3
|
import { useState as x } from "react";
|
|
4
|
-
import { A as H } from "./index-
|
|
5
|
-
import { C as M } from "./separator-
|
|
6
|
-
import { u as v, b as A } from "./useButtonProps-
|
|
7
|
-
import { I as y } from "./Icon-
|
|
4
|
+
import { A as H } from "./index-C3zg3DPB.js";
|
|
5
|
+
import { C as M } from "./separator-JaTTqb3J.js";
|
|
6
|
+
import { u as v, b as A } from "./useButtonProps-cMoicZgd.js";
|
|
7
|
+
import { I as y } from "./Icon-DRuJhcHK.js";
|
|
8
8
|
const b = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, k = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, R = f.create({
|
|
9
9
|
name: "highlight",
|
|
10
10
|
addOptions() {
|