reactjs-tiptap-editor 0.4.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +32 -44
- package/lib/Attachment.d.ts +32 -44
- package/lib/Attachment.js +129 -99
- package/lib/Blockquote.cjs +3 -3
- package/lib/Blockquote.d.cts +32 -44
- package/lib/Blockquote.d.ts +32 -44
- package/lib/Blockquote.js +50 -22
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +32 -44
- package/lib/Bold.d.ts +32 -44
- package/lib/Bold.js +48 -20
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +32 -44
- package/lib/BulletList.d.ts +32 -44
- package/lib/BulletList.js +38 -9
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +32 -44
- package/lib/Clear.d.ts +32 -44
- package/lib/Clear.js +32 -6
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +32 -44
- package/lib/Code.d.ts +32 -44
- package/lib/Code.js +53 -25
- package/lib/CodeBlock.cjs +35 -35
- package/lib/CodeBlock.d.cts +32 -44
- package/lib/CodeBlock.d.ts +32 -44
- package/lib/CodeBlock.js +605 -590
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +33 -45
- package/lib/CodeView.d.ts +33 -45
- package/lib/CodeView.js +49 -21
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +36 -44
- package/lib/Color.d.ts +36 -44
- package/lib/Color.js +123 -79
- package/lib/Column.cjs +1 -0
- package/lib/{Document.d.cts → Column.d.cts} +38 -47
- package/lib/{Document.d.ts → Column.d.ts} +38 -47
- 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 +32 -44
- package/lib/Drawer.d.ts +32 -44
- package/lib/Drawer.js +6 -5
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +32 -49
- package/lib/Emoji.d.ts +32 -49
- 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 +32 -44
- package/lib/Excalidraw.d.ts +32 -44
- package/lib/Excalidraw.js +6 -4
- package/lib/ExportPdf.cjs +5 -5
- package/lib/ExportPdf.d.cts +32 -44
- package/lib/ExportPdf.d.ts +32 -44
- package/lib/ExportPdf.js +60 -32
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +33 -45
- package/lib/ExportWord.d.ts +33 -45
- package/lib/ExportWord.js +84 -21
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +46 -47
- package/lib/FontFamily.d.ts +46 -47
- package/lib/FontFamily.js +72 -74
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +43 -47
- package/lib/FontSize.d.ts +43 -47
- package/lib/FontSize.js +72 -64
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +46 -44
- package/lib/Heading.d.ts +46 -44
- package/lib/Heading.js +91 -73
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +36 -44
- package/lib/Highlight.d.ts +36 -44
- package/lib/Highlight.js +152 -21
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +34 -44
- package/lib/History.d.ts +34 -44
- package/lib/History.js +976 -53
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +32 -44
- package/lib/HorizontalRule.d.ts +32 -44
- 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 +31 -50
- package/lib/Iframe.d.ts +31 -50
- package/lib/Iframe.js +6 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +32 -45
- package/lib/Image.d.ts +32 -45
- package/lib/Image.js +848 -5
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +33 -47
- package/lib/ImageGif.d.ts +33 -47
- package/lib/ImageGif.js +424 -5
- package/lib/ImportWord.cjs +48 -48
- package/lib/ImportWord.d.cts +33 -45
- package/lib/ImportWord.d.ts +33 -45
- package/lib/ImportWord.js +2596 -2588
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +32 -44
- package/lib/Indent.d.ts +32 -44
- package/lib/Indent.js +97 -27
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +32 -44
- package/lib/Italic.d.ts +32 -44
- 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 +32 -44
- package/lib/Katex.d.ts +32 -44
- package/lib/Katex.js +5 -196
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +34 -50
- package/lib/LineHeight.d.ts +34 -50
- package/lib/LineHeight.js +71 -112
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +33 -47
- package/lib/Link.d.ts +33 -47
- 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 +29 -44
- package/lib/Mention.d.ts +29 -44
- package/lib/Mention.js +112 -124
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +32 -44
- package/lib/Mermaid.d.ts +32 -44
- package/lib/Mermaid.js +177 -165
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +47 -46
- package/lib/MoreMark.d.ts +47 -46
- package/lib/MoreMark.js +125 -55
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +32 -44
- package/lib/OrderedList.d.ts +32 -44
- package/lib/OrderedList.js +37 -9
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +32 -47
- package/lib/SearchAndReplace.d.ts +32 -47
- package/lib/SearchAndReplace.js +221 -197
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +44 -51
- package/lib/SlashCommand.d.ts +44 -51
- package/lib/SlashCommand.js +235 -249
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +32 -44
- package/lib/Strike.d.ts +32 -44
- 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 +33 -47
- package/lib/Table.d.ts +33 -47
- package/lib/Table.js +3 -558
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +32 -44
- package/lib/TaskList.d.ts +32 -44
- package/lib/TaskList.js +38 -10
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +45 -44
- package/lib/TextAlign.d.ts +45 -44
- package/lib/TextAlign.js +108 -101
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +61 -44
- package/lib/TextDirection.d.ts +61 -44
- package/lib/TextDirection.js +105 -112
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +32 -44
- package/lib/TextUnderline.d.ts +32 -44
- 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 +32 -44
- package/lib/Twitter.d.ts +32 -44
- package/lib/Twitter.js +5 -4
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +32 -44
- package/lib/Video.d.ts +32 -44
- 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} +58 -59
- package/lib/{bubble-extra.d.ts → bubble.d.ts} +58 -59
- 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 +34 -285
- package/lib/index.d.ts +34 -285
- 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 +5410 -62
- package/lib/locale-bundle.d.ts +5410 -62
- 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
package/lib/index.d.ts
CHANGED
|
@@ -1,249 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Editor } from '@tiptap/react';
|
|
4
|
-
import { Editor as Editor_2 } from '@tiptap/core';
|
|
5
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
6
|
-
import { RefAttributes } from 'react';
|
|
7
|
-
import { TooltipContentProps } from '@radix-ui/react-tooltip';
|
|
8
|
-
import { UseEditorOptions } from '@tiptap/react';
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
9
3
|
|
|
10
|
-
declare interface
|
|
11
|
-
icon?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
tooltip?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
shortcutKeys?: string[];
|
|
16
|
-
customClass?: string;
|
|
17
|
-
loading?: boolean;
|
|
18
|
-
tooltipOptions?: TooltipContentProps;
|
|
19
|
-
color?: string;
|
|
20
|
-
action?: ButtonViewReturnComponentProps['action'];
|
|
21
|
-
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
22
|
-
children?: default_2.ReactNode;
|
|
23
|
-
asChild?: boolean;
|
|
24
|
-
upload?: boolean;
|
|
25
|
-
initialDisplayedColor?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Represents the BubbleMenuProps.
|
|
30
|
-
*/
|
|
31
|
-
declare interface BubbleMenuProps {
|
|
32
|
-
columnConfig?: {
|
|
33
|
-
/**
|
|
34
|
-
* @description Column menu hidden
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
hidden?: boolean;
|
|
38
|
-
};
|
|
39
|
-
tableConfig?: TableMenuConfig;
|
|
40
|
-
floatingMenuConfig?: {
|
|
41
|
-
/**
|
|
42
|
-
* @description Floating menu hidden
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
hidden?: boolean;
|
|
46
|
-
};
|
|
47
|
-
linkConfig?: {
|
|
48
|
-
/**
|
|
49
|
-
* @description Link menu hidden
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
|
-
hidden?: boolean;
|
|
53
|
-
};
|
|
54
|
-
textConfig?: {
|
|
55
|
-
/**
|
|
56
|
-
* @description Text menu hidden
|
|
57
|
-
* @default false
|
|
58
|
-
*/
|
|
59
|
-
hidden?: boolean;
|
|
60
|
-
};
|
|
61
|
-
imageConfig?: {
|
|
62
|
-
/**
|
|
63
|
-
* @description Image menu hidden
|
|
64
|
-
* @default false
|
|
65
|
-
*/
|
|
66
|
-
hidden?: boolean;
|
|
67
|
-
};
|
|
68
|
-
imageGifConfig?: {
|
|
69
|
-
/**
|
|
70
|
-
* @description Image menu hidden
|
|
71
|
-
* @default false
|
|
72
|
-
*/
|
|
73
|
-
hidden?: boolean;
|
|
74
|
-
};
|
|
75
|
-
videoConfig?: {
|
|
76
|
-
/**
|
|
77
|
-
* @description Video menu hidden
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
hidden?: boolean;
|
|
81
|
-
};
|
|
82
|
-
katexConfig?: {
|
|
83
|
-
/**
|
|
84
|
-
* @description katex menu hidden
|
|
85
|
-
* @default false
|
|
86
|
-
*/
|
|
87
|
-
hidden?: boolean;
|
|
88
|
-
};
|
|
89
|
-
excalidrawConfig?: {
|
|
90
|
-
/**
|
|
91
|
-
* @description excalidraw menu hidden
|
|
92
|
-
* @default false
|
|
93
|
-
*/
|
|
94
|
-
hidden?: boolean;
|
|
95
|
-
};
|
|
96
|
-
iframeConfig?: {
|
|
97
|
-
/**
|
|
98
|
-
* @description iframe menu hidden
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
hidden?: boolean;
|
|
102
|
-
};
|
|
103
|
-
mermaidConfig?: {
|
|
104
|
-
/**
|
|
105
|
-
* @description mermaid menu hidden
|
|
106
|
-
* @default false
|
|
107
|
-
*/
|
|
108
|
-
hidden?: boolean;
|
|
109
|
-
};
|
|
110
|
-
twitterConfig?: {
|
|
111
|
-
/**
|
|
112
|
-
* @description twitter menu hidden
|
|
113
|
-
* @default false
|
|
114
|
-
*/
|
|
115
|
-
hidden?: boolean;
|
|
116
|
-
};
|
|
117
|
-
drawerConfig?: {
|
|
118
|
-
/**
|
|
119
|
-
* @description twitter menu hidden
|
|
120
|
-
* @default false
|
|
121
|
-
*/
|
|
122
|
-
hidden?: boolean;
|
|
123
|
-
};
|
|
124
|
-
render?: (props: BubbleMenuRenderProps, dom: React.ReactNode) => React.ReactNode;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Represents the BubbleMenuRenderProps.
|
|
129
|
-
*/
|
|
130
|
-
declare interface BubbleMenuRenderProps {
|
|
4
|
+
declare interface IProviderRichTextProps {
|
|
131
5
|
editor: Editor;
|
|
132
|
-
|
|
133
|
-
bubbleMenu: BubbleMenuProps;
|
|
134
|
-
extensionsNames: string[];
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Represents the props for the ButtonView component.
|
|
139
|
-
*/
|
|
140
|
-
declare interface ButtonViewReturnComponentProps {
|
|
141
|
-
/** Method triggered when action is performed */
|
|
142
|
-
action?: (value?: any) => void;
|
|
143
|
-
/** Whether it is in the active state */
|
|
144
|
-
isActive?: () => boolean;
|
|
145
|
-
/** Button icon */
|
|
146
|
-
icon?: any;
|
|
147
|
-
/** Text displayed on hover */
|
|
148
|
-
tooltip?: string;
|
|
149
|
-
[x: string]: any;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
declare const _default: ForwardRefExoticComponent<RichTextEditorProps & RefAttributes< {
|
|
153
|
-
editor: Editor_2 | null;
|
|
154
|
-
}>>;
|
|
155
|
-
export default _default;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Interface for RichTextEditor component props
|
|
159
|
-
*/
|
|
160
|
-
declare interface RichTextEditorProps {
|
|
161
|
-
/** Content of the editor */
|
|
162
|
-
content: string;
|
|
163
|
-
/** Extensions for the editor */
|
|
164
|
-
extensions: AnyExtension[];
|
|
165
|
-
/** Output format */
|
|
166
|
-
output: 'html' | 'json' | 'text';
|
|
167
|
-
/** Model value */
|
|
168
|
-
modelValue?: string | object;
|
|
169
|
-
/** Dark mode flag */
|
|
6
|
+
children: React.ReactNode;
|
|
170
7
|
dark?: boolean;
|
|
171
|
-
/** Dense mode flag */
|
|
172
|
-
dense?: boolean;
|
|
173
|
-
/** Disabled flag */
|
|
174
|
-
disabled?: boolean;
|
|
175
|
-
/** Label for the editor */
|
|
176
|
-
label?: string;
|
|
177
|
-
/** Hide toolbar flag */
|
|
178
|
-
hideToolbar?: boolean;
|
|
179
|
-
/** Disable bubble menu flag */
|
|
180
|
-
disableBubble?: boolean;
|
|
181
|
-
/** Hide bubble menu flag */
|
|
182
|
-
hideBubble?: boolean;
|
|
183
|
-
/** Remove default wrapper flag */
|
|
184
|
-
removeDefaultWrapper?: boolean;
|
|
185
|
-
/** Maximum width */
|
|
186
|
-
maxWidth?: string | number;
|
|
187
|
-
/** Minimum height */
|
|
188
|
-
minHeight?: string | number;
|
|
189
|
-
/** Maximum height */
|
|
190
|
-
maxHeight?: string | number;
|
|
191
|
-
/** Content class */
|
|
192
|
-
contentClass?: string | string[] | Record<string, any>;
|
|
193
|
-
/** Content change callback */
|
|
194
|
-
onChangeContent?: (val: any) => void;
|
|
195
|
-
/** Bubble menu props */
|
|
196
|
-
bubbleMenu?: BubbleMenuProps;
|
|
197
|
-
/** Toolbar props */
|
|
198
|
-
toolbar?: ToolbarProps;
|
|
199
|
-
/** Use editor options */
|
|
200
|
-
useEditorOptions?: UseEditorOptions;
|
|
201
|
-
/** Use editor options */
|
|
202
|
-
resetCSS?: boolean;
|
|
203
|
-
/** This option gives us the control to enable the default behavior of rendering the editor immediately.*/
|
|
204
|
-
immediatelyRender?: boolean;
|
|
205
|
-
shouldRerenderOnTransaction?: boolean;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
declare interface TableMenuConfig {
|
|
209
|
-
/**
|
|
210
|
-
* @description Column menu hidden
|
|
211
|
-
* @default false
|
|
212
|
-
*/
|
|
213
|
-
hidden?: boolean;
|
|
214
|
-
/**
|
|
215
|
-
* custom menu actions
|
|
216
|
-
*/
|
|
217
|
-
actions?: ActionButtonProps[];
|
|
218
|
-
/**
|
|
219
|
-
* hidden default actions, if any
|
|
220
|
-
*/
|
|
221
|
-
hiddenActions?: string[];
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Represents the ToolbarItemProps.
|
|
226
|
-
*/
|
|
227
|
-
declare interface ToolbarItemProps {
|
|
228
|
-
button: {
|
|
229
|
-
component: React.ComponentType<any>;
|
|
230
|
-
componentProps: Record<string, any>;
|
|
231
|
-
};
|
|
232
|
-
divider: boolean;
|
|
233
|
-
spacer: boolean;
|
|
234
|
-
type: string;
|
|
235
|
-
name: string;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
declare interface ToolbarProps {
|
|
239
|
-
render?: (props: ToolbarRenderProps, toolbarItems: ToolbarItemProps[], dom: any[], containerDom: (innerContent: React.ReactNode) => React.ReactNode) => React.ReactNode;
|
|
240
|
-
tooltipSide?: 'top' | 'bottom';
|
|
241
8
|
}
|
|
242
9
|
|
|
243
|
-
declare
|
|
244
|
-
editor: Editor;
|
|
245
|
-
disabled: boolean;
|
|
246
|
-
}
|
|
10
|
+
export declare function RichTextProvider({ editor, children, dark }: IProviderRichTextProps): JSX.Element;
|
|
247
11
|
|
|
248
12
|
export { }
|
|
249
13
|
|
|
@@ -278,11 +42,22 @@ declare module '@tiptap/core' {
|
|
|
278
42
|
}
|
|
279
43
|
|
|
280
44
|
|
|
45
|
+
declare module '@tiptap/core' {
|
|
46
|
+
interface Storage {
|
|
47
|
+
color: ColorStorage;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
281
52
|
declare module '@tiptap/core' {
|
|
282
53
|
interface Commands<ReturnType> {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
54
|
+
columns: {
|
|
55
|
+
insertColumns: (attrs?: {
|
|
56
|
+
cols: number;
|
|
57
|
+
}) => ReturnType;
|
|
58
|
+
addColBefore: () => ReturnType;
|
|
59
|
+
addColAfter: () => ReturnType;
|
|
60
|
+
deleteCol: () => ReturnType;
|
|
286
61
|
};
|
|
287
62
|
}
|
|
288
63
|
}
|
|
@@ -290,8 +65,9 @@ declare module '@tiptap/core' {
|
|
|
290
65
|
|
|
291
66
|
declare module '@tiptap/core' {
|
|
292
67
|
interface Commands<ReturnType> {
|
|
293
|
-
|
|
294
|
-
|
|
68
|
+
drawer: {
|
|
69
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
70
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
295
71
|
};
|
|
296
72
|
}
|
|
297
73
|
}
|
|
@@ -309,7 +85,16 @@ declare module '@tiptap/core' {
|
|
|
309
85
|
declare module '@tiptap/core' {
|
|
310
86
|
interface Commands<ReturnType> {
|
|
311
87
|
exportWord: {
|
|
312
|
-
exportToWord: () => ReturnType;
|
|
88
|
+
exportToWord: (docState: any) => ReturnType;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
declare module '@tiptap/core' {
|
|
95
|
+
interface Commands<ReturnType> {
|
|
96
|
+
excalidraw: {
|
|
97
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
313
98
|
};
|
|
314
99
|
}
|
|
315
100
|
}
|
|
@@ -334,10 +119,8 @@ declare module '@tiptap/core' {
|
|
|
334
119
|
|
|
335
120
|
|
|
336
121
|
declare module '@tiptap/core' {
|
|
337
|
-
interface
|
|
338
|
-
|
|
339
|
-
setPainter: (marks: Mark[]) => ReturnType;
|
|
340
|
-
};
|
|
122
|
+
interface Storage {
|
|
123
|
+
highlight: HighlightStorage;
|
|
341
124
|
}
|
|
342
125
|
}
|
|
343
126
|
|
|
@@ -422,16 +205,6 @@ declare module '@tiptap/core' {
|
|
|
422
205
|
}
|
|
423
206
|
|
|
424
207
|
|
|
425
|
-
declare module '@tiptap/core' {
|
|
426
|
-
interface Commands<ReturnType> {
|
|
427
|
-
lineHeight: {
|
|
428
|
-
setLineHeight: (lineHeight: string) => ReturnType;
|
|
429
|
-
unsetLineHeight: () => ReturnType;
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
|
|
435
208
|
declare module '@tiptap/core' {
|
|
436
209
|
interface Commands<ReturnType> {
|
|
437
210
|
mermaid: {
|
|
@@ -442,20 +215,6 @@ declare module '@tiptap/core' {
|
|
|
442
215
|
}
|
|
443
216
|
|
|
444
217
|
|
|
445
|
-
declare module '@tiptap/core' {
|
|
446
|
-
interface Commands<ReturnType> {
|
|
447
|
-
columns: {
|
|
448
|
-
insertColumns: (attrs?: {
|
|
449
|
-
cols: number;
|
|
450
|
-
}) => ReturnType;
|
|
451
|
-
addColBefore: () => ReturnType;
|
|
452
|
-
addColAfter: () => ReturnType;
|
|
453
|
-
deleteCol: () => ReturnType;
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
|
|
459
218
|
declare module '@tiptap/core' {
|
|
460
219
|
interface Commands<ReturnType> {
|
|
461
220
|
search: {
|
|
@@ -479,16 +238,6 @@ declare module '@tiptap/core' {
|
|
|
479
238
|
}
|
|
480
239
|
|
|
481
240
|
|
|
482
|
-
declare module '@tiptap/core' {
|
|
483
|
-
interface Commands<ReturnType> {
|
|
484
|
-
tableOfContents: {
|
|
485
|
-
setTableOfContents: () => ReturnType;
|
|
486
|
-
removeTableOfContents: () => ReturnType;
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
|
|
492
241
|
declare module '@tiptap/core' {
|
|
493
242
|
interface Commands<ReturnType> {
|
|
494
243
|
twitter: {
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,245 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as c, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { useId as N, useEffect as u } from "react";
|
|
3
|
+
import { P as C, b as P, d as T } from "./index-BPfVXs5_.js";
|
|
4
|
+
import { t as A } from "./theme-B7aAsK_T.js";
|
|
5
|
+
import { c as M } from "./tooltip-CopwsU8q.js";
|
|
6
|
+
const g = "data-rc-order", m = "data-rc-priority", R = "rc-util-key", f = /* @__PURE__ */ new Map();
|
|
7
|
+
function L(e, r) {
|
|
8
|
+
if (!e)
|
|
9
|
+
return !1;
|
|
10
|
+
if (e.contains)
|
|
11
|
+
return e.contains(r);
|
|
12
|
+
let t = r;
|
|
13
|
+
for (; t; ) {
|
|
14
|
+
if (t === e)
|
|
15
|
+
return !0;
|
|
16
|
+
t = t.parentNode;
|
|
17
|
+
}
|
|
18
|
+
return !1;
|
|
19
|
+
}
|
|
20
|
+
function x({ mark: e } = {}) {
|
|
21
|
+
return e ? e.startsWith("data-") ? e : `data-${e}` : R;
|
|
22
|
+
}
|
|
23
|
+
function h(e) {
|
|
24
|
+
return e.attachTo ? e.attachTo : document.querySelector("head") || document.body;
|
|
25
|
+
}
|
|
26
|
+
function j(e) {
|
|
27
|
+
return e === "queue" ? "prependQueue" : e ? "prepend" : "append";
|
|
28
|
+
}
|
|
29
|
+
function v(e) {
|
|
30
|
+
return [...(f.get(e) || e).children].filter(
|
|
31
|
+
(r) => r.tagName === "STYLE"
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function y(e, r = {}) {
|
|
35
|
+
const { csp: t, prepend: n, priority: i = 0 } = r, s = j(n), d = s === "prependQueue", o = document.createElement("style");
|
|
36
|
+
o.setAttribute(g, s), d && i && o.setAttribute(m, `${i}`), t != null && t.nonce && (o.nonce = t == null ? void 0 : t.nonce), o.innerHTML = e;
|
|
37
|
+
const a = h(r), { firstChild: w } = a;
|
|
38
|
+
if (n) {
|
|
39
|
+
if (d) {
|
|
40
|
+
const p = v(a).filter((b) => {
|
|
41
|
+
if (!["prepend", "prependQueue"].includes(b.getAttribute(g)))
|
|
42
|
+
return !1;
|
|
43
|
+
const E = Number(b.getAttribute(m) || 0);
|
|
44
|
+
return i >= E;
|
|
45
|
+
});
|
|
46
|
+
if (p.length > 0)
|
|
47
|
+
return a.insertBefore(o, p.at(-1).nextSibling), o;
|
|
48
|
+
}
|
|
49
|
+
w.before(o);
|
|
50
|
+
} else
|
|
51
|
+
a.append(o);
|
|
52
|
+
return o;
|
|
53
|
+
}
|
|
54
|
+
function S(e, r = {}) {
|
|
55
|
+
const t = h(r);
|
|
56
|
+
return v(t).find((n) => n.getAttribute(x(r)) === e);
|
|
57
|
+
}
|
|
58
|
+
function z(e, r = {}) {
|
|
59
|
+
const t = S(e, r);
|
|
60
|
+
t && t.remove();
|
|
61
|
+
}
|
|
62
|
+
function I(e, r) {
|
|
63
|
+
const t = f.get(e);
|
|
64
|
+
if (!t || !L(document, t)) {
|
|
65
|
+
const n = y("", r), { parentNode: i } = n;
|
|
66
|
+
f.set(e, i), n.remove();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function D(e, r, t = {}) {
|
|
70
|
+
var d, o, a;
|
|
71
|
+
const n = h(t);
|
|
72
|
+
I(n, t);
|
|
73
|
+
const i = S(r, t);
|
|
74
|
+
if (i)
|
|
75
|
+
return (d = t.csp) != null && d.nonce && i.nonce !== ((o = t.csp) == null ? void 0 : o.nonce) && (i.nonce = (a = t.csp) == null ? void 0 : a.nonce), i.innerHTML !== e && (i.innerHTML = e), i;
|
|
76
|
+
const s = y(e, t);
|
|
77
|
+
return s.setAttribute(x(t), r), s;
|
|
78
|
+
}
|
|
79
|
+
const H = `
|
|
80
|
+
.reactjs-tiptap-editor,
|
|
81
|
+
.richtext-dialog-content {
|
|
82
|
+
color: hsl(var(--richtext-foreground));
|
|
83
|
+
|
|
84
|
+
button,
|
|
85
|
+
input:where([type=button]),
|
|
86
|
+
input:where([type=reset]),
|
|
87
|
+
input:where([type=submit]) {
|
|
88
|
+
-webkit-appearance: button;
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
background-image: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
input,
|
|
94
|
+
optgroup,
|
|
95
|
+
select {
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
font-feature-settings: inherit;
|
|
98
|
+
font-variation-settings: inherit;
|
|
99
|
+
font-size: 100%;
|
|
100
|
+
font-weight: inherit;
|
|
101
|
+
line-height: inherit;
|
|
102
|
+
letter-spacing: inherit;
|
|
103
|
+
color: inherit;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
button {
|
|
107
|
+
font-family: inherit;
|
|
108
|
+
font-feature-settings: inherit;
|
|
109
|
+
font-variation-settings: inherit;
|
|
110
|
+
font-size: 100%;
|
|
111
|
+
font-weight: inherit;
|
|
112
|
+
line-height: inherit;
|
|
113
|
+
letter-spacing: inherit;
|
|
114
|
+
color: inherit;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
*,
|
|
118
|
+
::before,
|
|
119
|
+
::after {
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
border-width: 0;
|
|
122
|
+
border-style: solid;
|
|
123
|
+
border-color: hsl(var(--richtext-border));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
hr {
|
|
128
|
+
height: 0;
|
|
129
|
+
color: inherit;
|
|
130
|
+
border-top-width: 1px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
a {
|
|
134
|
+
color: inherit;
|
|
135
|
+
text-decoration: inherit;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
b,
|
|
139
|
+
strong {
|
|
140
|
+
font-weight: bolder;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
code,
|
|
144
|
+
kbd,
|
|
145
|
+
samp,
|
|
146
|
+
pre {
|
|
147
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
|
|
148
|
+
font-feature-settings: normal;
|
|
149
|
+
font-variation-settings: normal;
|
|
150
|
+
font-size: 1em;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
table {
|
|
154
|
+
text-indent: 0;
|
|
155
|
+
border-color: inherit;
|
|
156
|
+
border-collapse: collapse;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
input {
|
|
160
|
+
border-width: 1px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
input::placeholder {
|
|
165
|
+
opacity: 1;
|
|
166
|
+
color: #9ca3af;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
button, input {
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
color: inherit;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
img,
|
|
175
|
+
svg,
|
|
176
|
+
video,
|
|
177
|
+
canvas,
|
|
178
|
+
audio,
|
|
179
|
+
iframe,
|
|
180
|
+
embed,
|
|
181
|
+
object {
|
|
182
|
+
display: block;
|
|
183
|
+
vertical-align: middle;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
img,
|
|
187
|
+
video {
|
|
188
|
+
max-width: 100%;
|
|
189
|
+
height: auto;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
div[data-radix-popper-content-wrapper] {
|
|
194
|
+
color: hsl(var(--richtext-foreground));
|
|
195
|
+
|
|
196
|
+
*,
|
|
197
|
+
::before,
|
|
198
|
+
::after {
|
|
199
|
+
box-sizing: border-box;
|
|
200
|
+
border-width: 0;
|
|
201
|
+
border-style: solid;
|
|
202
|
+
border-color: hsl(var(--richtext-border));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
button, input {
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
color: inherit;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
`;
|
|
211
|
+
function O({ editor: e, children: r }) {
|
|
212
|
+
const [t, n] = T((i) => i.editor);
|
|
213
|
+
return u(() => {
|
|
214
|
+
n({
|
|
215
|
+
editor: e
|
|
216
|
+
});
|
|
217
|
+
}, [e]), t ? /* @__PURE__ */ c(l, { children: r }) : /* @__PURE__ */ c(l, {});
|
|
218
|
+
}
|
|
219
|
+
function F({ editor: e, children: r, dark: t }) {
|
|
220
|
+
const n = N();
|
|
221
|
+
return u(() => {
|
|
222
|
+
document.documentElement.classList.toggle("dark", t), A.setTheme(n, t ? "dark" : "light");
|
|
223
|
+
}, [t]), u(() => (D(H, "react-tiptap-reset"), () => {
|
|
224
|
+
z("react-tiptap-reset");
|
|
225
|
+
}), []), u(() => {
|
|
226
|
+
e && (e.id = n);
|
|
227
|
+
}, [n, e]), e ? /* @__PURE__ */ c("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ c(C, { children: /* @__PURE__ */ c(
|
|
228
|
+
P,
|
|
229
|
+
{
|
|
230
|
+
editor: e,
|
|
231
|
+
id: n,
|
|
232
|
+
children: /* @__PURE__ */ c(
|
|
233
|
+
M,
|
|
234
|
+
{
|
|
235
|
+
delayDuration: 0,
|
|
236
|
+
disableHoverableContent: !0,
|
|
237
|
+
children: /* @__PURE__ */ c(O, { editor: e, children: r })
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
) }) }) : /* @__PURE__ */ c(l, {});
|
|
242
|
+
}
|
|
2
243
|
export {
|
|
3
|
-
|
|
244
|
+
F as RichTextProvider
|
|
4
245
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("react"),u=require("./index-DV5kbgRU.cjs");function a(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 s=a(o),c=s.forwardRef(({className:t,type:r,...e},i)=>n.jsx("input",{type:r,className:u.cn("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",t),ref:i,...e}));c.displayName="Input";exports.Input=c;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { c as x } from "./index-BPfVXs5_.js";
|
|
4
|
+
const h = o.forwardRef(
|
|
5
|
+
({ className: t, type: e, ...r }, i) => /* @__PURE__ */ c(
|
|
6
|
+
"input",
|
|
7
|
+
{
|
|
8
|
+
type: e,
|
|
9
|
+
className: x(
|
|
10
|
+
"richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
11
|
+
t
|
|
12
|
+
),
|
|
13
|
+
ref: i,
|
|
14
|
+
...r
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
h.displayName = "Input";
|
|
19
|
+
export {
|
|
20
|
+
h as I
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./throttle-qX7Yjtsg.cjs");function d(i,t,f){return i===i&&(f!==void 0&&(i=i<=f?i:f),t!==void 0&&(i=i>=t?i:t)),i}function c(i,t,f){return f===void 0&&(f=t,t=void 0),f!==void 0&&(f=n.toNumber(f),f=f===f?f:0),t!==void 0&&(t=n.toNumber(t),t=t===t?t:0),d(n.toNumber(i),t,f)}var s="[object Number]";function a(i){return typeof i=="number"||n.isObjectLike(i)&&n.baseGetTag(i)==s}exports.clamp=c;exports.isNumber=a;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t, i as d, b as a } from "./throttle-CdwDrFpn.js";
|
|
2
|
+
function s(i, f, n) {
|
|
3
|
+
return i === i && (n !== void 0 && (i = i <= n ? i : n), f !== void 0 && (i = i >= f ? i : f)), i;
|
|
4
|
+
}
|
|
5
|
+
function b(i, f, n) {
|
|
6
|
+
return n === void 0 && (n = f, f = void 0), n !== void 0 && (n = t(n), n = n === n ? n : 0), f !== void 0 && (f = t(f), f = f === f ? f : 0), s(t(i), f, n);
|
|
7
|
+
}
|
|
8
|
+
var c = "[object Number]";
|
|
9
|
+
function g(i) {
|
|
10
|
+
return typeof i == "number" || d(i) && a(i) == c;
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
b as c,
|
|
14
|
+
g as i
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),s=require("react"),l=require("@radix-ui/react-label"),u=require("./useButtonProps-C6Vpn190.cjs"),d=require("./index-DV5kbgRU.cjs");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const m=c(s),i=c(l),b=u.cva("richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),n=m.forwardRef(({className:e,...r},t)=>o.jsx(i.Root,{ref:t,className:d.cn(b(),e),...r}));n.displayName=i.Root.displayName;exports.Label=n;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-label";
|
|
4
|
+
import { c as m } from "./useButtonProps-BsEd4zYM.js";
|
|
5
|
+
import { c as s } from "./index-BPfVXs5_.js";
|
|
6
|
+
const c = m(
|
|
7
|
+
"richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
8
|
+
), l = i.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ r(
|
|
9
|
+
t.Root,
|
|
10
|
+
{
|
|
11
|
+
ref: o,
|
|
12
|
+
className: s(c(), e),
|
|
13
|
+
...a
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
l.displayName = t.Root.displayName;
|
|
17
|
+
export {
|
|
18
|
+
l as L
|
|
19
|
+
};
|
package/lib/locale-bundle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Dfmm6FTT.cjs");exports.atomLang=e.atomLang;exports.en=e.locale;exports.fi=e.locale$5;exports.hu_HU=e.locale$1;exports.localeActions=e.localeActions;exports.pt_BR=e.locale$4;exports.useLocale=e.useLocale;exports.vi=e.locale$2;exports.zh_CN=e.locale$3;
|