reactjs-tiptap-editor 0.4.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ActionMenuButton-BKOg7hkq.js +38 -0
- package/lib/ActionMenuButton-DLQyd_gx.cjs +1 -0
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +27 -39
- package/lib/Attachment.d.ts +27 -39
- package/lib/Attachment.js +129 -99
- package/lib/Blockquote.cjs +3 -3
- package/lib/Blockquote.d.cts +27 -39
- package/lib/Blockquote.d.ts +27 -39
- package/lib/Blockquote.js +50 -22
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +27 -39
- package/lib/Bold.d.ts +27 -39
- package/lib/Bold.js +48 -20
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +27 -39
- package/lib/BulletList.d.ts +27 -39
- package/lib/BulletList.js +38 -9
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +27 -39
- package/lib/Clear.d.ts +27 -39
- package/lib/Clear.js +32 -6
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +27 -39
- package/lib/Code.d.ts +27 -39
- package/lib/Code.js +53 -25
- package/lib/CodeBlock.cjs +35 -35
- package/lib/CodeBlock.d.cts +27 -39
- package/lib/CodeBlock.d.ts +27 -39
- package/lib/CodeBlock.js +605 -590
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +28 -40
- package/lib/CodeView.d.ts +28 -40
- package/lib/CodeView.js +49 -21
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +31 -39
- package/lib/Color.d.ts +31 -39
- package/lib/Color.js +123 -79
- package/lib/Column.cjs +1 -0
- package/lib/{Document.d.cts → Column.d.cts} +33 -42
- package/lib/{Document.d.ts → Column.d.ts} +33 -42
- package/lib/Column.js +217 -0
- package/lib/{Drawer-CaAfmqNo.js → Drawer-DZ5jvmrX.js} +404 -394
- package/lib/Drawer-SRhwOc6T.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +27 -39
- package/lib/Drawer.d.ts +27 -39
- package/lib/Drawer.js +6 -5
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +27 -44
- package/lib/Emoji.d.ts +27 -44
- package/lib/Emoji.js +377 -392
- package/lib/Excalidraw-DwBRXEtC.js +345 -0
- package/lib/Excalidraw-ZN3DQvDC.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +27 -39
- package/lib/Excalidraw.d.ts +27 -39
- package/lib/Excalidraw.js +6 -4
- package/lib/ExportPdf.cjs +5 -5
- package/lib/ExportPdf.d.cts +27 -39
- package/lib/ExportPdf.d.ts +27 -39
- package/lib/ExportPdf.js +60 -32
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +28 -40
- package/lib/ExportWord.d.ts +28 -40
- package/lib/ExportWord.js +84 -21
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +41 -42
- package/lib/FontFamily.d.ts +41 -42
- package/lib/FontFamily.js +72 -74
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +38 -42
- package/lib/FontSize.d.ts +38 -42
- package/lib/FontSize.js +72 -64
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +41 -39
- package/lib/Heading.d.ts +41 -39
- package/lib/Heading.js +91 -73
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +31 -39
- package/lib/Highlight.d.ts +31 -39
- package/lib/Highlight.js +150 -19
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +29 -39
- package/lib/History.d.ts +29 -39
- package/lib/History.js +976 -53
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +27 -39
- package/lib/HorizontalRule.d.ts +27 -39
- package/lib/HorizontalRule.js +97 -17
- package/lib/Icon-DUpv2cI6.cjs +1 -0
- package/lib/Icon-jKs8Hr6p.js +11 -0
- package/lib/Iframe-CmXkEqOd.js +431 -0
- package/lib/Iframe-Cvca2G7X.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +26 -45
- package/lib/Iframe.d.ts +26 -45
- package/lib/Iframe.js +6 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +27 -40
- package/lib/Image.d.ts +27 -40
- package/lib/Image.js +848 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +28 -42
- package/lib/ImageGif.d.ts +28 -42
- package/lib/ImageGif.js +424 -5
- package/lib/ImportWord.cjs +48 -48
- package/lib/ImportWord.d.cts +28 -40
- package/lib/ImportWord.d.ts +28 -40
- package/lib/ImportWord.js +2759 -2751
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +27 -39
- package/lib/Indent.d.ts +27 -39
- package/lib/Indent.js +97 -27
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +27 -39
- package/lib/Italic.d.ts +27 -39
- package/lib/Italic.js +47 -19
- package/lib/Katex-DsYXsjSS.js +2740 -0
- package/lib/Katex-XfrNne6U.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +27 -39
- package/lib/Katex.d.ts +27 -39
- package/lib/Katex.js +5 -196
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +29 -45
- package/lib/LineHeight.d.ts +29 -45
- package/lib/LineHeight.js +71 -112
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +28 -42
- package/lib/Link.d.ts +28 -42
- package/lib/Link.js +3 -3
- package/lib/LinkEditBlock-BZenZq-Z.cjs +5 -0
- package/lib/LinkEditBlock-CB8yIffE.js +1241 -0
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +24 -39
- package/lib/Mention.d.ts +24 -39
- package/lib/Mention.js +112 -124
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +27 -39
- package/lib/Mermaid.d.ts +27 -39
- package/lib/Mermaid.js +177 -165
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +42 -41
- package/lib/MoreMark.d.ts +42 -41
- package/lib/MoreMark.js +125 -55
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +27 -39
- package/lib/OrderedList.d.ts +27 -39
- package/lib/OrderedList.js +37 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +27 -42
- package/lib/SearchAndReplace.d.ts +27 -42
- package/lib/SearchAndReplace.js +221 -197
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +39 -46
- package/lib/SlashCommand.d.ts +39 -46
- package/lib/SlashCommand.js +235 -249
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +27 -39
- package/lib/Strike.d.ts +27 -39
- package/lib/Strike.js +39 -11
- package/lib/Table-B1j1Ebmh.cjs +9 -0
- package/lib/Table-Db8TcQX8.js +1984 -0
- package/lib/Table.cjs +1 -9
- package/lib/Table.d.cts +28 -42
- package/lib/Table.d.ts +28 -42
- package/lib/Table.js +3 -558
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +27 -39
- package/lib/TaskList.d.ts +27 -39
- package/lib/TaskList.js +38 -10
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +40 -39
- package/lib/TextAlign.d.ts +40 -39
- package/lib/TextAlign.js +108 -101
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +56 -39
- package/lib/TextDirection.d.ts +56 -39
- package/lib/TextDirection.js +105 -112
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +27 -39
- package/lib/TextUnderline.d.ts +27 -39
- package/lib/TextUnderline.js +46 -18
- package/lib/{Twitter-BFULyqdR.js → Twitter-CXmmjz9R.js} +536 -498
- package/lib/Twitter-CtVTIWJW.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +27 -39
- package/lib/Twitter.d.ts +27 -39
- package/lib/Twitter.js +5 -4
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +27 -39
- package/lib/Video.d.ts +27 -39
- package/lib/Video.js +261 -4
- package/lib/_commonjsHelpers-BItOPCY9.js +28 -0
- package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
- package/lib/bubble.cjs +2 -0
- package/lib/{bubble-extra.d.cts → bubble.d.cts} +53 -54
- package/lib/{bubble-extra.d.ts → bubble.d.ts} +53 -54
- package/lib/bubble.js +1925 -0
- package/lib/button-B12K7BJ4.cjs +1 -0
- package/lib/button-DXMsXUEn.js +43 -0
- package/lib/clsx-C11secjj.cjs +1 -0
- package/lib/clsx-OuTLNxxd.js +16 -0
- package/lib/delete-node-CosiBes5.cjs +1 -0
- package/lib/delete-node-IyVmiRbI.js +22 -0
- package/lib/dialog-CaCS-W5S.cjs +1 -0
- package/lib/dialog-PtQivpHS.js +100 -0
- package/lib/dom-dataset-BqoJhJXt.cjs +1 -0
- package/lib/dom-dataset-CIEeltF6.js +47 -0
- package/lib/dropdown-menu-BPp2Z_U-.js +136 -0
- package/lib/dropdown-menu-CdSm4emp.cjs +1 -0
- package/lib/file-BLas99n7.js +43 -0
- package/lib/file-i7e4nQY2.cjs +1 -0
- package/lib/floating-ui.dom-U1vPFQ5f.js +1151 -0
- package/lib/floating-ui.dom-VCrc58uF.cjs +1 -0
- package/lib/icons-Cllpys39.js +362 -0
- package/lib/icons-CqHjeW5T.cjs +1 -0
- package/lib/index-BH4bc3jN.cjs +33 -0
- package/lib/index-BPfVXs5_.js +2380 -0
- package/lib/index-Bnmd0WvY.js +1631 -0
- package/lib/{index-Ch6dBBad.js → index-CBce_TWY.js} +40 -42
- package/lib/{index-5iBZLua9.cjs → index-D-5U8dY8.cjs} +8 -8
- package/lib/{index-ByurDDMv.js → index-D2TUfKkC.js} +2 -2
- package/lib/index-DV5kbgRU.cjs +1 -0
- package/lib/{index-LmrOdnen.js → index-DYkucCoF.js} +396 -495
- package/lib/index-Dfmm6FTT.cjs +1 -0
- package/lib/index-DnWWK9F_.js +6374 -0
- package/lib/index-DzcKxutn.js +632 -0
- package/lib/index-DzvuNTxo.cjs +4 -0
- package/lib/{index-BeCTd5v2.cjs → index-N--9MohJ.cjs} +1 -1
- package/lib/index-RfTlOzIr.cjs +22 -0
- package/lib/index.cjs +132 -1
- package/lib/index.d.cts +29 -280
- package/lib/index.d.ts +29 -280
- package/lib/index.js +243 -2
- package/lib/input-_ECRfn3Y.cjs +1 -0
- package/lib/input-wJ9PDEzZ.js +21 -0
- package/lib/isNumber-ClPupm7P.cjs +1 -0
- package/lib/isNumber-fpLGS0AZ.js +15 -0
- package/lib/label-BkgAe7IY.cjs +1 -0
- package/lib/label-CGdLYWv7.js +19 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +5405 -57
- package/lib/locale-bundle.d.ts +5405 -57
- package/lib/locale-bundle.js +9 -7
- package/lib/popover-BgmUNMHj.cjs +1 -0
- package/lib/popover-CAuEW0Mr.js +23 -0
- package/lib/separator-CuBW_w98.js +328 -0
- package/lib/separator-DRIrVZ2N.cjs +1 -0
- package/lib/store-DX599H5W.js +10 -0
- package/lib/store-WStcMOiW.cjs +1 -0
- package/lib/style.css +1 -1
- package/lib/switch-CnLJ7Y-b.cjs +1 -0
- package/lib/switch-Coix_FA1.js +27 -0
- package/lib/tabs-B5mVSN1I.js +46 -0
- package/lib/tabs-BoLCMcCI.cjs +1 -0
- package/lib/textarea-B-6zTKQz.cjs +1 -0
- package/lib/{textarea-aPtytkDx.js → textarea-DUUM1jZd.js} +1 -1
- package/lib/theme-B7aAsK_T.js +15 -0
- package/lib/theme-D8_cxGqB.cjs +1 -0
- package/lib/throttle-CdwDrFpn.js +249 -0
- package/lib/throttle-qX7Yjtsg.cjs +1 -0
- package/lib/toggle-Cdp4IT2U.js +85 -0
- package/lib/toggle-D41PzQLJ.cjs +1 -0
- package/lib/tooltip-BuEiE96N.cjs +1 -0
- package/lib/tooltip-CopwsU8q.js +23 -0
- package/lib/updatePosition-8Sdem5jb.cjs +1 -0
- package/lib/updatePosition-BPmcE0YD.js +215 -0
- package/lib/use-toast-Bz3QCOtE.cjs +1 -0
- package/lib/use-toast-Crf7-q5H.js +98 -0
- package/lib/useButtonProps-BsEd4zYM.js +141 -0
- package/lib/useButtonProps-C6Vpn190.cjs +1 -0
- package/package.json +22 -105
- package/lib/ActionMenuButton-CYdM1xx5.cjs +0 -1
- package/lib/ActionMenuButton-DKRF6oa0.js +0 -33
- package/lib/BaseKit.cjs +0 -3
- package/lib/BaseKit.d.cts +0 -481
- package/lib/BaseKit.d.ts +0 -481
- package/lib/BaseKit.js +0 -132
- package/lib/Document.cjs +0 -1
- package/lib/Document.js +0 -9
- package/lib/Drawer-CdvCMSzN.cjs +0 -1
- package/lib/Excalidraw-BbMQhNvs.cjs +0 -1
- package/lib/Excalidraw-CVWz2Vyn.js +0 -290
- package/lib/FormatPainter.cjs +0 -1
- package/lib/FormatPainter.d.cts +0 -372
- package/lib/FormatPainter.d.ts +0 -372
- package/lib/FormatPainter.js +0 -76
- package/lib/ListItem.cjs +0 -1
- package/lib/ListItem.d.cts +0 -290
- package/lib/ListItem.d.ts +0 -290
- package/lib/ListItem.js +0 -7
- package/lib/MultiColumn.cjs +0 -1
- package/lib/MultiColumn.d.cts +0 -294
- package/lib/MultiColumn.d.ts +0 -294
- package/lib/MultiColumn.js +0 -8
- package/lib/RichTextEditor-CxvwGvQG.cjs +0 -142
- package/lib/RichTextEditor-DGcKEUGr.js +0 -22166
- package/lib/Selection.cjs +0 -1
- package/lib/Selection.d.cts +0 -289
- package/lib/Selection.d.ts +0 -289
- package/lib/Selection.js +0 -25
- package/lib/SubAndSuperScript.cjs +0 -1
- package/lib/SubAndSuperScript.d.cts +0 -377
- package/lib/SubAndSuperScript.d.ts +0 -377
- package/lib/SubAndSuperScript.js +0 -43
- package/lib/TableOfContent.cjs +0 -1
- package/lib/TableOfContent.d.cts +0 -291
- package/lib/TableOfContent.d.ts +0 -291
- package/lib/TableOfContent.js +0 -185
- package/lib/TextBubble.cjs +0 -1
- package/lib/TextBubble.d.cts +0 -362
- package/lib/TextBubble.d.ts +0 -362
- package/lib/TextBubble.js +0 -133
- package/lib/TrailingNode.cjs +0 -1
- package/lib/TrailingNode.d.cts +0 -297
- package/lib/TrailingNode.d.ts +0 -297
- package/lib/TrailingNode.js +0 -41
- package/lib/Twitter-Cutpkh3h.cjs +0 -1
- package/lib/bubble-extra.cjs +0 -2
- package/lib/bubble-extra.js +0 -631
- package/lib/dom-dataset-_6-diIRQ.cjs +0 -33
- package/lib/dom-dataset-lYeH6gfI.js +0 -2361
- package/lib/index-6D1J-A-o.cjs +0 -1
- package/lib/index-B96Cclrj.cjs +0 -3
- package/lib/index-BBz7Nmv9.js +0 -55
- package/lib/index-CUogRI7j.cjs +0 -1
- package/lib/index-DF2Lp4HZ.cjs +0 -100
- package/lib/index-D_L6n8O8.js +0 -76
- package/lib/index-Dbvi-Bvh.cjs +0 -1
- package/lib/index-DpCrt7xs.cjs +0 -1
- package/lib/index-DsAX1Vq8.cjs +0 -1
- package/lib/index-Dy4DlW9o.js +0 -12
- package/lib/index-J3jHHZ4d.js +0 -200
- package/lib/index-VvXaaKe3.js +0 -898
- package/lib/index-kbO3iWqL.js +0 -13432
- package/lib/textarea-DFo_aXnj.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("react/jsx-runtime"),x=require("react"),a=require("@radix-ui/react-slot"),u=require("./useButtonProps-C6Vpn190.cjs"),d=require("./index-DV5kbgRU.cjs");function f(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const l=f(x),g=u.cva("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",{variants:{variant:{default:"!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",destructive:"richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",outline:"richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",secondary:"richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",ghost:"hover:richtext-bg-accent hover:richtext-text-accent-foreground",link:"richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"},size:{default:"richtext-h-10 richtext-px-4 richtext-py-2",sm:"richtext-h-9 richtext-rounded-md richtext-px-3",lg:"richtext-h-11 richtext-rounded-md richtext-px-8",icon:"richtext-h-10 richtext-w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=l.forwardRef(({className:t,variant:r,size:e,asChild:i=!1,...n},o)=>{const s=i?a.Slot:"button";return h.jsx(s,{className:d.cn(g({variant:r,size:e,className:t})),ref:o,...n})});c.displayName="Button";exports.Button=c;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import { Slot as x } from "@radix-ui/react-slot";
|
|
4
|
+
import { c as a } from "./useButtonProps-BsEd4zYM.js";
|
|
5
|
+
import { c as s } from "./index-BPfVXs5_.js";
|
|
6
|
+
const d = a(
|
|
7
|
+
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",
|
|
12
|
+
destructive: "richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",
|
|
13
|
+
outline: "richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",
|
|
14
|
+
secondary: "richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",
|
|
15
|
+
ghost: "hover:richtext-bg-accent hover:richtext-text-accent-foreground",
|
|
16
|
+
link: "richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "richtext-h-10 richtext-px-4 richtext-py-2",
|
|
20
|
+
sm: "richtext-h-9 richtext-rounded-md richtext-px-3",
|
|
21
|
+
lg: "richtext-h-11 richtext-rounded-md richtext-px-8",
|
|
22
|
+
icon: "richtext-h-10 richtext-w-10"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default",
|
|
27
|
+
size: "default"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
), u = h.forwardRef(
|
|
31
|
+
({ className: t, variant: e, size: r, asChild: i = !1, ...c }, o) => /* @__PURE__ */ n(
|
|
32
|
+
i ? x : "button",
|
|
33
|
+
{
|
|
34
|
+
className: s(d({ variant: e, size: r, className: t })),
|
|
35
|
+
ref: o,
|
|
36
|
+
...c
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
);
|
|
40
|
+
u.displayName = "Button";
|
|
41
|
+
export {
|
|
42
|
+
u as B
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(r){var f,n,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(f=0;f<s;f++)r[f]&&(n=i(r[f]))&&(t&&(t+=" "),t+=n)}else for(n in r)r[n]&&(t&&(t+=" "),t+=n);return t}function o(){for(var r,f,n=0,t="",s=arguments.length;n<s;n++)(r=arguments[n])&&(f=i(r))&&(t&&(t+=" "),t+=f);return t}exports.clsx=o;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var f, n, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
|
|
7
|
+
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as c
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(a,t){const{state:o}=t,n=o.selection.$anchor;let s=!1;if(n.depth)for(let e=n.depth;e>0;e--)n.node(e).type.name===a&&(t.dispatchTransaction&&t.dispatchTransaction(o.tr.delete(n.before(e),n.after(e)).scrollIntoView()),s=!0);else{const e=o.selection.node;e&&e.type.name===a&&(t.chain().deleteSelection().run(),s=!0)}if(!s){const e=n.pos;if(e){const c=o.tr.doc.nodeAt(e);c&&c.type.name===a&&(t.dispatchTransaction&&t.dispatchTransaction(o.tr.delete(e,e+c.nodeSize)),s=!0)}}return s}exports.deleteNode=i;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function i(a, t) {
|
|
2
|
+
const { state: o } = t, n = o.selection.$anchor;
|
|
3
|
+
let s = !1;
|
|
4
|
+
if (n.depth)
|
|
5
|
+
for (let e = n.depth; e > 0; e--)
|
|
6
|
+
n.node(e).type.name === a && (t.dispatchTransaction && t.dispatchTransaction(o.tr.delete(n.before(e), n.after(e)).scrollIntoView()), s = !0);
|
|
7
|
+
else {
|
|
8
|
+
const e = o.selection.node;
|
|
9
|
+
e && e.type.name === a && (t.chain().deleteSelection().run(), s = !0);
|
|
10
|
+
}
|
|
11
|
+
if (!s) {
|
|
12
|
+
const e = n.pos;
|
|
13
|
+
if (e) {
|
|
14
|
+
const c = o.tr.doc.nodeAt(e);
|
|
15
|
+
c && c.type.name === a && (t.dispatchTransaction && t.dispatchTransaction(o.tr.delete(e, e + c.nodeSize)), s = !0);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return s;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
i as d
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),f=require("react"),m=require("@radix-ui/react-dialog"),u=require("lucide-react"),c=require("./index-DV5kbgRU.cjs");function n(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const s=n(f),a=n(m),p=a.Root,D=a.Trigger,y=a.Portal,l=s.forwardRef(({className:t,...e},i)=>r.jsx(a.Overlay,{ref:i,className:c.cn("richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",t),...e}));l.displayName=a.Overlay.displayName;const x=s.forwardRef(({className:t,children:e,...i},o)=>r.jsxs(y,{children:[r.jsx(l,{}),r.jsxs(a.Content,{ref:o,className:c.cn("richtext-dialog-content richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",t),...i,children:[e,r.jsxs(a.Close,{className:"richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground",children:[r.jsx(u.X,{className:"richtext-h-4 richtext-w-4"}),r.jsx("span",{className:"richtext-sr-only",children:"Close"})]})]})]}));x.displayName=a.Content.displayName;function d({className:t,...e}){return r.jsx("div",{className:c.cn("richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",t),...e})}d.displayName="DialogHeader";function h({className:t,...e}){return r.jsx("div",{className:c.cn("richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",t),...e})}h.displayName="DialogFooter";const g=s.forwardRef(({className:t,...e},i)=>r.jsx(a.Title,{ref:i,className:c.cn("richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",t),...e}));g.displayName=a.Title.displayName;const N=s.forwardRef(({className:t,...e},i)=>r.jsx(a.Description,{ref:i,className:c.cn("richtext-text-sm richtext-text-muted-foreground",t),...e}));N.displayName=a.Description.displayName;exports.Dialog=p;exports.DialogContent=x;exports.DialogFooter=h;exports.DialogHeader=d;exports.DialogTitle=g;exports.DialogTrigger=D;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-dialog";
|
|
4
|
+
import { X as n } from "lucide-react";
|
|
5
|
+
import { c } from "./index-BPfVXs5_.js";
|
|
6
|
+
const D = t.Root, b = t.Trigger, h = t.Portal, x = o.forwardRef(({ className: e, ...i }, r) => /* @__PURE__ */ a(
|
|
7
|
+
t.Overlay,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: c(
|
|
11
|
+
"richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
...i
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
x.displayName = t.Overlay.displayName;
|
|
18
|
+
const d = o.forwardRef(({ className: e, children: i, ...r }, l) => /* @__PURE__ */ s(h, { children: [
|
|
19
|
+
/* @__PURE__ */ a(x, {}),
|
|
20
|
+
/* @__PURE__ */ s(
|
|
21
|
+
t.Content,
|
|
22
|
+
{
|
|
23
|
+
ref: l,
|
|
24
|
+
className: c(
|
|
25
|
+
"richtext-dialog-content richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
|
|
26
|
+
e
|
|
27
|
+
),
|
|
28
|
+
...r,
|
|
29
|
+
children: [
|
|
30
|
+
i,
|
|
31
|
+
/* @__PURE__ */ s(t.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
|
|
32
|
+
/* @__PURE__ */ a(n, { className: "richtext-h-4 richtext-w-4" }),
|
|
33
|
+
/* @__PURE__ */ a("span", { className: "richtext-sr-only", children: "Close" })
|
|
34
|
+
] })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] }));
|
|
39
|
+
d.displayName = t.Content.displayName;
|
|
40
|
+
function m({
|
|
41
|
+
className: e,
|
|
42
|
+
...i
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ a(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: c(
|
|
48
|
+
"richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
|
|
49
|
+
e
|
|
50
|
+
),
|
|
51
|
+
...i
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
m.displayName = "DialogHeader";
|
|
56
|
+
function f({
|
|
57
|
+
className: e,
|
|
58
|
+
...i
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ a(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: c(
|
|
64
|
+
"richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
|
|
65
|
+
e
|
|
66
|
+
),
|
|
67
|
+
...i
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
f.displayName = "DialogFooter";
|
|
72
|
+
const p = o.forwardRef(({ className: e, ...i }, r) => /* @__PURE__ */ a(
|
|
73
|
+
t.Title,
|
|
74
|
+
{
|
|
75
|
+
ref: r,
|
|
76
|
+
className: c(
|
|
77
|
+
"richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight",
|
|
78
|
+
e
|
|
79
|
+
),
|
|
80
|
+
...i
|
|
81
|
+
}
|
|
82
|
+
));
|
|
83
|
+
p.displayName = t.Title.displayName;
|
|
84
|
+
const g = o.forwardRef(({ className: e, ...i }, r) => /* @__PURE__ */ a(
|
|
85
|
+
t.Description,
|
|
86
|
+
{
|
|
87
|
+
ref: r,
|
|
88
|
+
className: c("richtext-text-sm richtext-text-muted-foreground", e),
|
|
89
|
+
...i
|
|
90
|
+
}
|
|
91
|
+
));
|
|
92
|
+
g.displayName = t.Description.displayName;
|
|
93
|
+
export {
|
|
94
|
+
D,
|
|
95
|
+
b as a,
|
|
96
|
+
d as b,
|
|
97
|
+
p as c,
|
|
98
|
+
f as d,
|
|
99
|
+
m as e
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function d(e){try{return JSON.stringify(e)}catch{return JSON.stringify({})}}function g(e,n=!1){return r=>{const o=e.startsWith("data-")?e:`data-${e}`;let t=decodeURIComponent(r.getAttribute(o));if(t==null||typeof t=="string"&&t==="null")try{const c=r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);c&&c.length>0&&(t=(c.map(a=>a.trim()).reduce((a,u)=>{const i=u.indexOf("="),f=[u.slice(0,i),u.slice(i+1).slice(1,-1)];return a[f[0]]=f[1],a},{})[e.toLowerCase()]||"").replaceAll(""",'"'))}catch(l){console.error("Error getDatasetAttribute ",l.message,r)}if(n)try{return JSON.parse(t)}catch{return{}}if(t.includes("%")||t.includes("auto"))return t;const s=Number.parseInt(t);return s!==s?t:s}}function p(e){const{attrs:n}=e;return Object.keys(n).reduce((r,o)=>{const t=n[o];if(t==null)return r;let s="";return typeof t=="object"?s=d(t):s=t,r[o]=s,r},Object.create(null))}exports.getDatasetAttribute=g;exports.nodeAttrsToDataset=p;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function d(e) {
|
|
2
|
+
try {
|
|
3
|
+
return JSON.stringify(e);
|
|
4
|
+
} catch {
|
|
5
|
+
return JSON.stringify({});
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function p(e, s = !1) {
|
|
9
|
+
return (r) => {
|
|
10
|
+
const o = e.startsWith("data-") ? e : `data-${e}`;
|
|
11
|
+
let t = decodeURIComponent(r.getAttribute(o));
|
|
12
|
+
if (t == null || typeof t == "string" && t === "null")
|
|
13
|
+
try {
|
|
14
|
+
const c = r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);
|
|
15
|
+
c && c.length > 0 && (t = (c.map((a) => a.trim()).reduce((a, u) => {
|
|
16
|
+
const i = u.indexOf("="), f = [u.slice(0, i), u.slice(i + 1).slice(1, -1)];
|
|
17
|
+
return a[f[0]] = f[1], a;
|
|
18
|
+
}, {})[e.toLowerCase()] || "").replaceAll(""", '"'));
|
|
19
|
+
} catch (l) {
|
|
20
|
+
console.error("Error getDatasetAttribute ", l.message, r);
|
|
21
|
+
}
|
|
22
|
+
if (s)
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(t);
|
|
25
|
+
} catch {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
if (t.includes("%") || t.includes("auto"))
|
|
29
|
+
return t;
|
|
30
|
+
const n = Number.parseInt(t);
|
|
31
|
+
return n !== n ? t : n;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function h(e) {
|
|
35
|
+
const { attrs: s } = e;
|
|
36
|
+
return Object.keys(s).reduce((r, o) => {
|
|
37
|
+
const t = s[o];
|
|
38
|
+
if (t == null)
|
|
39
|
+
return r;
|
|
40
|
+
let n = "";
|
|
41
|
+
return typeof t == "object" ? n = d(t) : n = t, r[o] = n, r;
|
|
42
|
+
}, /* @__PURE__ */ Object.create(null));
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
p as g,
|
|
46
|
+
h as n
|
|
47
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as c, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { Check as s, ChevronRight as d, Circle as l } from "lucide-react";
|
|
5
|
+
import { c as o } from "./index-BPfVXs5_.js";
|
|
6
|
+
const I = t.Root, M = t.Trigger, m = h.forwardRef(({ className: e, inset: r, children: i, ...a }, n) => /* @__PURE__ */ x(
|
|
7
|
+
t.SubTrigger,
|
|
8
|
+
{
|
|
9
|
+
ref: n,
|
|
10
|
+
className: o(
|
|
11
|
+
"richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",
|
|
12
|
+
r && "richtext-pl-8",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...a,
|
|
16
|
+
children: [
|
|
17
|
+
i,
|
|
18
|
+
/* @__PURE__ */ c(d, { className: "richtext-ml-auto richtext-h-4 richtext-w-4" })
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
m.displayName = t.SubTrigger.displayName;
|
|
23
|
+
const p = h.forwardRef(({ className: e, ...r }, i) => /* @__PURE__ */ c(
|
|
24
|
+
t.SubContent,
|
|
25
|
+
{
|
|
26
|
+
ref: i,
|
|
27
|
+
className: o(
|
|
28
|
+
"richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
29
|
+
e
|
|
30
|
+
),
|
|
31
|
+
...r
|
|
32
|
+
}
|
|
33
|
+
));
|
|
34
|
+
p.displayName = t.SubContent.displayName;
|
|
35
|
+
const f = h.forwardRef(({ className: e, sideOffset: r = 4, ...i }, a) => /* @__PURE__ */ c(t.Portal, { children: /* @__PURE__ */ c(
|
|
36
|
+
t.Content,
|
|
37
|
+
{
|
|
38
|
+
ref: a,
|
|
39
|
+
sideOffset: r,
|
|
40
|
+
className: o(
|
|
41
|
+
"richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
42
|
+
e
|
|
43
|
+
),
|
|
44
|
+
...i
|
|
45
|
+
}
|
|
46
|
+
) }));
|
|
47
|
+
f.displayName = t.Content.displayName;
|
|
48
|
+
const u = h.forwardRef(({ className: e, inset: r, ...i }, a) => /* @__PURE__ */ c(
|
|
49
|
+
t.Item,
|
|
50
|
+
{
|
|
51
|
+
ref: a,
|
|
52
|
+
className: o(
|
|
53
|
+
"richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
54
|
+
r && "richtext-pl-8",
|
|
55
|
+
e
|
|
56
|
+
),
|
|
57
|
+
...i
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
u.displayName = t.Item.displayName;
|
|
61
|
+
const b = h.forwardRef(({ className: e, children: r, checked: i, ...a }, n) => /* @__PURE__ */ x(
|
|
62
|
+
t.CheckboxItem,
|
|
63
|
+
{
|
|
64
|
+
ref: n,
|
|
65
|
+
className: o(
|
|
66
|
+
"richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
67
|
+
e
|
|
68
|
+
),
|
|
69
|
+
checked: i,
|
|
70
|
+
...a,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ c("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ c(t.ItemIndicator, { children: /* @__PURE__ */ c(s, { className: "richtext-h-4 richtext-w-4" }) }) }),
|
|
73
|
+
r
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
));
|
|
77
|
+
b.displayName = t.CheckboxItem.displayName;
|
|
78
|
+
const w = h.forwardRef(({ className: e, children: r, ...i }, a) => /* @__PURE__ */ x(
|
|
79
|
+
t.RadioItem,
|
|
80
|
+
{
|
|
81
|
+
ref: a,
|
|
82
|
+
className: o(
|
|
83
|
+
"richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
84
|
+
e
|
|
85
|
+
),
|
|
86
|
+
...i,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ c("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ c(t.ItemIndicator, { children: /* @__PURE__ */ c(l, { className: "richtext-h-2 richtext-w-2 richtext-fill-current" }) }) }),
|
|
89
|
+
r
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
));
|
|
93
|
+
w.displayName = t.RadioItem.displayName;
|
|
94
|
+
const N = h.forwardRef(({ className: e, inset: r, ...i }, a) => /* @__PURE__ */ c(
|
|
95
|
+
t.Label,
|
|
96
|
+
{
|
|
97
|
+
ref: a,
|
|
98
|
+
className: o(
|
|
99
|
+
"richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",
|
|
100
|
+
r && "richtext-pl-8",
|
|
101
|
+
e
|
|
102
|
+
),
|
|
103
|
+
...i
|
|
104
|
+
}
|
|
105
|
+
));
|
|
106
|
+
N.displayName = t.Label.displayName;
|
|
107
|
+
const g = h.forwardRef(({ className: e, ...r }, i) => /* @__PURE__ */ c(
|
|
108
|
+
t.Separator,
|
|
109
|
+
{
|
|
110
|
+
ref: i,
|
|
111
|
+
className: o("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", e),
|
|
112
|
+
...r
|
|
113
|
+
}
|
|
114
|
+
));
|
|
115
|
+
g.displayName = t.Separator.displayName;
|
|
116
|
+
function y({
|
|
117
|
+
className: e,
|
|
118
|
+
...r
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ c(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
className: o("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60", e),
|
|
124
|
+
...r
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
y.displayName = "DropdownMenuShortcut";
|
|
129
|
+
export {
|
|
130
|
+
I as D,
|
|
131
|
+
M as a,
|
|
132
|
+
f as b,
|
|
133
|
+
b as c,
|
|
134
|
+
g as d,
|
|
135
|
+
y as e
|
|
136
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),u=require("react"),f=require("@radix-ui/react-dropdown-menu"),x=require("lucide-react"),a=require("./index-DV5kbgRU.cjs");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const n=d(u),r=d(f),b=r.Root,w=r.Trigger,g=n.forwardRef(({className:t,inset:e,children:i,...o},s)=>c.jsxs(r.SubTrigger,{ref:s,className:a.cn("richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",e&&"richtext-pl-8",t),...o,children:[i,c.jsx(x.ChevronRight,{className:"richtext-ml-auto richtext-h-4 richtext-w-4"})]}));g.displayName=r.SubTrigger.displayName;const y=n.forwardRef(({className:t,...e},i)=>c.jsx(r.SubContent,{ref:i,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...e}));y.displayName=r.SubContent.displayName;const h=n.forwardRef(({className:t,sideOffset:e=4,...i},o)=>c.jsx(r.Portal,{children:c.jsx(r.Content,{ref:o,sideOffset:e,className:a.cn("richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...i})}));h.displayName=r.Content.displayName;const N=n.forwardRef(({className:t,inset:e,...i},o)=>c.jsx(r.Item,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",e&&"richtext-pl-8",t),...i}));N.displayName=r.Item.displayName;const l=n.forwardRef(({className:t,children:e,checked:i,...o},s)=>c.jsxs(r.CheckboxItem,{ref:s,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),checked:i,...o,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(r.ItemIndicator,{children:c.jsx(x.Check,{className:"richtext-h-4 richtext-w-4"})})}),e]}));l.displayName=r.CheckboxItem.displayName;const j=n.forwardRef(({className:t,children:e,...i},o)=>c.jsxs(r.RadioItem,{ref:o,className:a.cn("richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",t),...i,children:[c.jsx("span",{className:"richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center",children:c.jsx(r.ItemIndicator,{children:c.jsx(x.Circle,{className:"richtext-h-2 richtext-w-2 richtext-fill-current"})})}),e]}));j.displayName=r.RadioItem.displayName;const D=n.forwardRef(({className:t,inset:e,...i},o)=>c.jsx(r.Label,{ref:o,className:a.cn("richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",e&&"richtext-pl-8",t),...i}));D.displayName=r.Label.displayName;const m=n.forwardRef(({className:t,...e},i)=>c.jsx(r.Separator,{ref:i,className:a.cn("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted",t),...e}));m.displayName=r.Separator.displayName;function p({className:t,...e}){return c.jsx("span",{className:a.cn("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",t),...e})}p.displayName="DropdownMenuShortcut";exports.DropdownMenu=b;exports.DropdownMenuCheckboxItem=l;exports.DropdownMenuContent=h;exports.DropdownMenuSeparator=m;exports.DropdownMenuShortcut=p;exports.DropdownMenuTrigger=w;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function o(t) {
|
|
2
|
+
return t.replace(/^.*\/|\..+$/g, "");
|
|
3
|
+
}
|
|
4
|
+
function u(t) {
|
|
5
|
+
return t.split(".").pop();
|
|
6
|
+
}
|
|
7
|
+
function c(t) {
|
|
8
|
+
return t < 1024 ? `${t} Byte` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / 1024 / 1024).toFixed(2)} MB`;
|
|
9
|
+
}
|
|
10
|
+
function d(t) {
|
|
11
|
+
return t ? t === "application/pdf" ? "pdf" : t.startsWith("application/") && [".document", "word"].some((r) => t.includes(r)) ? "word" : t.startsWith("application/") && ["presentation"].some((r) => t.includes(r)) ? "excel" : t.startsWith("application/") && ["sheet"].some((r) => t.includes(r)) ? "ppt" : t.startsWith("image") ? "image" : t.startsWith("audio") ? "audio" : t.startsWith("video") ? "video" : "file" : "file";
|
|
12
|
+
}
|
|
13
|
+
function l(t) {
|
|
14
|
+
return new Promise((r) => {
|
|
15
|
+
const n = new FileReader();
|
|
16
|
+
n.addEventListener(
|
|
17
|
+
"load",
|
|
18
|
+
() => {
|
|
19
|
+
r({
|
|
20
|
+
alt: t.name,
|
|
21
|
+
src: n.result
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
!1
|
|
25
|
+
), n.readAsDataURL(t);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function m(t, r) {
|
|
29
|
+
const n = t.split(","), s = n[0].match(/:(.*?);/)[1], a = atob(n[n.length - 1]);
|
|
30
|
+
let e = a.length;
|
|
31
|
+
const i = new Uint8Array(e);
|
|
32
|
+
for (; e--; )
|
|
33
|
+
i[e] = a.charCodeAt(e);
|
|
34
|
+
return new File([i], r, { type: s });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
o as a,
|
|
38
|
+
c as b,
|
|
39
|
+
m as d,
|
|
40
|
+
u as e,
|
|
41
|
+
d as n,
|
|
42
|
+
l as r
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(t){return t.replace(/^.*\/|\..+$/g,"")}function u(t){return t.split(".").pop()}function c(t){return t<1024?`${t} Byte`:t<1024*1024?`${(t/1024).toFixed(2)} KB`:`${(t/1024/1024).toFixed(2)} MB`}function l(t){return t?t==="application/pdf"?"pdf":t.startsWith("application/")&&[".document","word"].some(e=>t.includes(e))?"word":t.startsWith("application/")&&["presentation"].some(e=>t.includes(e))?"excel":t.startsWith("application/")&&["sheet"].some(e=>t.includes(e))?"ppt":t.startsWith("image")?"image":t.startsWith("audio")?"audio":t.startsWith("video")?"video":"file":"file"}function d(t){return new Promise(e=>{const r=new FileReader;r.addEventListener("load",()=>{e({alt:t.name,src:r.result})},!1),r.readAsDataURL(t)})}function m(t,e){const r=t.split(","),o=r[0].match(/:(.*?);/)[1],i=atob(r[r.length-1]);let n=i.length;const a=new Uint8Array(n);for(;n--;)a[n]=i.charCodeAt(n);return new File([a],e,{type:o})}exports.dataURLtoFile=m;exports.extractFileExtension=u;exports.extractFilename=s;exports.normalizeFileSize=c;exports.normalizeFileType=l;exports.readImageAsBase64=d;
|