reactjs-tiptap-editor-pro 0.2.31 → 0.2.33
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/ColorPicker-MEAh4MhG.js +28181 -0
- package/lib/ColorPicker-ZncOwjAP.cjs +142 -0
- package/lib/extension-bundle.cjs +133 -0
- package/lib/extension-bundle.d.cts +947 -0
- package/lib/extension-bundle.d.ts +947 -0
- package/lib/extension-bundle.js +23921 -0
- package/lib/index.cjs +140 -0
- package/lib/index.d.cts +513 -0
- package/lib/index.d.ts +513 -0
- package/lib/index.js +3700 -0
- package/lib/locale-bundle-DiqW5jwb.cjs +1 -0
- package/lib/locale-bundle-DxCAtRDI.js +1487 -0
- package/lib/locale-bundle.cjs +1 -0
- package/lib/locale-bundle.d.cts +1140 -0
- package/lib/locale-bundle.d.ts +1140 -0
- package/lib/locale-bundle.js +9 -0
- package/lib/lucide-react-BFZtMawV.js +30462 -0
- package/lib/lucide-react-CMPhLW1m.cjs +7851 -0
- package/lib/style.css +1 -0
- package/package.json +58 -5
- package/src/components/ActionButton.tsx +0 -103
- package/src/components/ActionMenuButton.tsx +0 -76
- package/src/components/BubbleMenu.tsx +0 -93
- package/src/components/CharactorCount.tsx +0 -50
- package/src/components/ColorPicker.tsx +0 -272
- package/src/components/RichTextEditor.tsx +0 -212
- package/src/components/SizeSetter/SizeSetter.tsx +0 -102
- package/src/components/Toolbar.tsx +0 -108
- package/src/components/icons/Activity.tsx +0 -19
- package/src/components/icons/Animas.tsx +0 -24
- package/src/components/icons/AspectRatio.tsx +0 -13
- package/src/components/icons/Blockquote.tsx +0 -17
- package/src/components/icons/ColumnAddLeft.tsx +0 -7
- package/src/components/icons/ColumnAddRight.tsx +0 -7
- package/src/components/icons/DeleteColumn.tsx +0 -26
- package/src/components/icons/DeleteRow.tsx +0 -26
- package/src/components/icons/Direction.tsx +0 -7
- package/src/components/icons/Excalidraw.tsx +0 -7
- package/src/components/icons/ExportPdf.tsx +0 -8
- package/src/components/icons/ExportWord.tsx +0 -24
- package/src/components/icons/FileWordOutline.tsx +0 -13
- package/src/components/icons/Flag.tsx +0 -19
- package/src/components/icons/Food.tsx +0 -20
- package/src/components/icons/GIfIcon.tsx +0 -10
- package/src/components/icons/Icon.tsx +0 -30
- package/src/components/icons/ImportWord.tsx +0 -23
- package/src/components/icons/LeftToRight.tsx +0 -7
- package/src/components/icons/LineHeight.tsx +0 -13
- package/src/components/icons/MenuDown.tsx +0 -24
- package/src/components/icons/Mermaid.tsx +0 -13
- package/src/components/icons/NoFill.tsx +0 -7
- package/src/components/icons/Object.tsx +0 -24
- package/src/components/icons/RightToLeft.tsx +0 -7
- package/src/components/icons/SizeL.tsx +0 -9
- package/src/components/icons/SizeM.tsx +0 -13
- package/src/components/icons/SizeS.tsx +0 -13
- package/src/components/icons/Symbol.tsx +0 -19
- package/src/components/icons/Travel.tsx +0 -24
- package/src/components/icons/Twitter.tsx +0 -7
- package/src/components/icons/icons.ts +0 -212
- package/src/components/icons/index.ts +0 -12
- package/src/components/index.ts +0 -9
- package/src/components/menus/bubble.ts +0 -395
- package/src/components/menus/components/BubbleMenuContent.tsx +0 -15
- package/src/components/menus/components/BubbleMenuDrawer.tsx +0 -128
- package/src/components/menus/components/BubbleMenuExcalidraw.tsx +0 -91
- package/src/components/menus/components/BubbleMenuIframe.tsx +0 -143
- package/src/components/menus/components/BubbleMenuKatex.tsx +0 -136
- package/src/components/menus/components/BubbleMenuLink.tsx +0 -99
- package/src/components/menus/components/BubbleMenuMedia.tsx +0 -235
- package/src/components/menus/components/BubbleMenuMermaid.tsx +0 -128
- package/src/components/menus/components/BubbleMenuText.tsx +0 -102
- package/src/components/menus/components/BubbleMenuTwitter.tsx +0 -91
- package/src/components/menus/components/ColumnsBubbleMenu.tsx +0 -59
- package/src/components/menus/components/ContentMenu.tsx +0 -396
- package/src/components/menus/components/TableBubbleMenu.tsx +0 -362
- package/src/components/menus/index.ts +0 -7
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/checkbox.tsx +0 -30
- package/src/components/ui/dialog.tsx +0 -128
- package/src/components/ui/dropdown-menu.tsx +0 -203
- package/src/components/ui/emoji-picker.tsx +0 -166
- package/src/components/ui/index.ts +0 -14
- package/src/components/ui/input.tsx +0 -25
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/popover.tsx +0 -31
- package/src/components/ui/select.tsx +0 -162
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/switch.tsx +0 -29
- package/src/components/ui/tabs.tsx +0 -55
- package/src/components/ui/textarea.tsx +0 -24
- package/src/components/ui/toast.tsx +0 -129
- package/src/components/ui/toaster.tsx +0 -44
- package/src/components/ui/toggle.tsx +0 -45
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/components/ui/use-toast.ts +0 -197
- package/src/constants/index.ts +0 -223
- package/src/constants/resetCSS.ts +0 -139
- package/src/extension-bundle.ts +0 -2
- package/src/extensions/Attachment/Attachment.ts +0 -144
- package/src/extensions/Attachment/components/NodeViewAttachment/FileIcon.tsx +0 -69
- package/src/extensions/Attachment/components/NodeViewAttachment/FileIconString.ts +0 -28
- package/src/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.tsx +0 -155
- package/src/extensions/Attachment/components/NodeViewAttachment/index.module.scss +0 -23
- package/src/extensions/Attachment/index.ts +0 -1
- package/src/extensions/BaseKit.ts +0 -253
- package/src/extensions/Blockquote/Blockquote.ts +0 -31
- package/src/extensions/Blockquote/index.ts +0 -1
- package/src/extensions/Bold/Bold.ts +0 -26
- package/src/extensions/Bold/index.ts +0 -1
- package/src/extensions/BulletList/BulletList.ts +0 -28
- package/src/extensions/BulletList/index.ts +0 -1
- package/src/extensions/Clear/Clear.ts +0 -24
- package/src/extensions/Clear/index.ts +0 -1
- package/src/extensions/Code/Code.ts +0 -26
- package/src/extensions/Code/index.ts +0 -1
- package/src/extensions/CodeBlock/CodeBlock.ts +0 -54
- package/src/extensions/CodeBlock/components/CodeBlockActiveButton.tsx +0 -66
- package/src/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.tsx +0 -89
- package/src/extensions/CodeBlock/components/NodeViewCodeBlock/index.module.scss +0 -81
- package/src/extensions/CodeBlock/highlighter.ts +0 -132
- package/src/extensions/CodeBlock/index.ts +0 -1
- package/src/extensions/CodeBlock/shiki-plugin.ts +0 -213
- package/src/extensions/Color/Color.ts +0 -52
- package/src/extensions/Color/components/ColorActionButton.tsx +0 -104
- package/src/extensions/Color/index.ts +0 -1
- package/src/extensions/Document/Document.ts +0 -8
- package/src/extensions/Document/index.ts +0 -1
- package/src/extensions/Drawer/Drawer.ts +0 -177
- package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.module.scss +0 -85
- package/src/extensions/Drawer/components/ControlDrawer/ControlDrawer.tsx +0 -598
- package/src/extensions/Drawer/components/ControlDrawer/icon.tsx +0 -500
- package/src/extensions/Drawer/components/DrawerActiveButton.tsx +0 -239
- package/src/extensions/Drawer/components/EditDrawerBlock.tsx +0 -238
- package/src/extensions/Drawer/components/NodeViewDrawer/NodeViewDrawer.tsx +0 -260
- package/src/extensions/Drawer/index.ts +0 -1
- package/src/extensions/Emoji/Emoji.ts +0 -146
- package/src/extensions/Emoji/components/EmojiList/EmojiList.tsx +0 -103
- package/src/extensions/Emoji/components/EmojiList/emojis.ts +0 -1858
- package/src/extensions/Emoji/components/EmojiPicker/EmojiPicker.tsx +0 -61
- package/src/extensions/Emoji/index.ts +0 -1
- package/src/extensions/Excalidraw/Excalidraw.ts +0 -123
- package/src/extensions/Excalidraw/components/ExcalidrawActiveButton.tsx +0 -138
- package/src/extensions/Excalidraw/components/NodeViewExcalidraw/NodeViewExcalidraw.tsx +0 -178
- package/src/extensions/Excalidraw/components/NodeViewExcalidraw/index.module.scss +0 -43
- package/src/extensions/Excalidraw/index.ts +0 -1
- package/src/extensions/ExportPdf/ExportPdf.ts +0 -25
- package/src/extensions/ExportPdf/index.ts +0 -1
- package/src/extensions/ExportWord/ExportWord.ts +0 -87
- package/src/extensions/ExportWord/index.ts +0 -1
- package/src/extensions/FontFamily/FontFamily.ts +0 -64
- package/src/extensions/FontFamily/components/FontFamilyButton.tsx +0 -97
- package/src/extensions/FontFamily/index.ts +0 -1
- package/src/extensions/FontSize/FontSize.ts +0 -119
- package/src/extensions/FontSize/components/FontSizeMenuButton.tsx +0 -84
- package/src/extensions/FontSize/index.ts +0 -1
- package/src/extensions/FormatPainter/FormatPainter.ts +0 -121
- package/src/extensions/FormatPainter/index.ts +0 -1
- package/src/extensions/Heading/Heading.ts +0 -57
- package/src/extensions/Heading/components/HeadingButton.tsx +0 -96
- package/src/extensions/Heading/index.ts +0 -1
- package/src/extensions/Highlight/Highlight.ts +0 -36
- package/src/extensions/Highlight/components/HighlightActionButton.tsx +0 -108
- package/src/extensions/Highlight/index.ts +0 -1
- package/src/extensions/History/History.ts +0 -39
- package/src/extensions/History/components/HistoryActionButton.tsx +0 -74
- package/src/extensions/History/index.ts +0 -1
- package/src/extensions/HorizontalRule/HorizontalRule.ts +0 -42
- package/src/extensions/HorizontalRule/index.ts +0 -1
- package/src/extensions/Iframe/Iframe.ts +0 -140
- package/src/extensions/Iframe/components/IframeNodeView.tsx +0 -92
- package/src/extensions/Iframe/components/index.module.scss +0 -40
- package/src/extensions/Iframe/embed.ts +0 -487
- package/src/extensions/Iframe/index.ts +0 -1
- package/src/extensions/Image/Image.ts +0 -303
- package/src/extensions/Image/components/ActionImageButton.tsx +0 -186
- package/src/extensions/Image/components/ImageCropper.tsx +0 -198
- package/src/extensions/Image/components/ImageView.tsx +0 -271
- package/src/extensions/Image/index.ts +0 -1
- package/src/extensions/Image/store.ts +0 -15
- package/src/extensions/ImageGif/ImageGif.ts +0 -176
- package/src/extensions/ImageGif/components/ImageGifActionButton.tsx +0 -138
- package/src/extensions/ImageGif/components/ImageGifView.tsx +0 -260
- package/src/extensions/ImageGif/index.ts +0 -1
- package/src/extensions/ImportWord/ImportWord.ts +0 -52
- package/src/extensions/ImportWord/components/ImportWordButton.tsx +0 -151
- package/src/extensions/ImportWord/index.ts +0 -1
- package/src/extensions/Indent/Indent.ts +0 -110
- package/src/extensions/Indent/index.ts +0 -1
- package/src/extensions/Italic/Italic.ts +0 -29
- package/src/extensions/Italic/index.ts +0 -1
- package/src/extensions/Katex/Katex.ts +0 -109
- package/src/extensions/Katex/components/KatexActiveButton.tsx +0 -117
- package/src/extensions/Katex/components/KatexWrapper.tsx +0 -53
- package/src/extensions/Katex/index.ts +0 -1
- package/src/extensions/LineHeight/LineHeight.ts +0 -76
- package/src/extensions/LineHeight/components/LineHeightDropdown.tsx +0 -93
- package/src/extensions/LineHeight/index.ts +0 -1
- package/src/extensions/Link/Link.ts +0 -92
- package/src/extensions/Link/components/LinkEditBlock.tsx +0 -110
- package/src/extensions/Link/components/LinkEditPopover.tsx +0 -46
- package/src/extensions/Link/components/LinkViewBlock.tsx +0 -54
- package/src/extensions/Link/index.ts +0 -1
- package/src/extensions/ListItem/ListItem.ts +0 -1
- package/src/extensions/ListItem/index.ts +0 -1
- package/src/extensions/Mention/Mention.ts +0 -100
- package/src/extensions/Mention/components/NodeViewMentionList/NodeViewMentionList.tsx +0 -94
- package/src/extensions/Mention/components/NodeViewMentionList/index.module.scss +0 -38
- package/src/extensions/Mention/index.ts +0 -1
- package/src/extensions/Mermaid/Mermaid.ts +0 -177
- package/src/extensions/Mermaid/components/EditMermaidBlock.tsx +0 -155
- package/src/extensions/Mermaid/components/MermaidActiveButton.tsx +0 -151
- package/src/extensions/Mermaid/components/NodeViewMermaid/NodeViewMermaid.tsx +0 -260
- package/src/extensions/Mermaid/index.ts +0 -1
- package/src/extensions/MoreMark/MoreMark.ts +0 -102
- package/src/extensions/MoreMark/components/ActionMoreButton.tsx +0 -97
- package/src/extensions/MoreMark/index.ts +0 -1
- package/src/extensions/MultiColumn/Column.ts +0 -36
- package/src/extensions/MultiColumn/MultiColumn.ts +0 -111
- package/src/extensions/MultiColumn/components/ColumnActionButton.ts +0 -22
- package/src/extensions/MultiColumn/index.ts +0 -3
- package/src/extensions/OrderedList/OrderedList.ts +0 -28
- package/src/extensions/OrderedList/index.ts +0 -1
- package/src/extensions/SearchAndReplace/SearchAndReplace.ts +0 -395
- package/src/extensions/SearchAndReplace/components/SearchAndReplaceButton.tsx +0 -190
- package/src/extensions/SearchAndReplace/index.ts +0 -1
- package/src/extensions/Selection/Selection.ts +0 -32
- package/src/extensions/Selection/index.ts +0 -1
- package/src/extensions/SlashCommand/SlashCommand.ts +0 -255
- package/src/extensions/SlashCommand/components/CommandsList.tsx +0 -180
- package/src/extensions/SlashCommand/groups.ts +0 -183
- package/src/extensions/SlashCommand/index.ts +0 -1
- package/src/extensions/SlashCommand/types.ts +0 -24
- package/src/extensions/Strike/Strike.ts +0 -26
- package/src/extensions/Strike/index.ts +0 -1
- package/src/extensions/Subscript/Subscript.ts +0 -88
- package/src/extensions/Subscript/index.ts +0 -1
- package/src/extensions/Table/Cell.ts +0 -131
- package/src/extensions/Table/Header.ts +0 -93
- package/src/extensions/Table/Row.ts +0 -8
- package/src/extensions/Table/Table.ts +0 -60
- package/src/extensions/Table/cell-background.ts +0 -112
- package/src/extensions/Table/components/CreateTablePopover.tsx +0 -132
- package/src/extensions/Table/components/TableActionButton.tsx +0 -42
- package/src/extensions/Table/index.ts +0 -6
- package/src/extensions/Table/utils.ts +0 -352
- package/src/extensions/TableOfContent/TableOfContent.ts +0 -124
- package/src/extensions/TableOfContent/components/NodeViewTableOfContent.tsx +0 -116
- package/src/extensions/TableOfContent/components/TableOfContentActionButton.tsx +0 -27
- package/src/extensions/TableOfContent/components/index.module.scss +0 -40
- package/src/extensions/TableOfContent/index.ts +0 -1
- package/src/extensions/TaskList/TaskList.ts +0 -46
- package/src/extensions/TaskList/index.ts +0 -1
- package/src/extensions/TextAlign/TextAlign.ts +0 -68
- package/src/extensions/TextAlign/components/TextAlignMenuButton.tsx +0 -103
- package/src/extensions/TextAlign/index.ts +0 -1
- package/src/extensions/TextBubble/TextBubble.ts +0 -22
- package/src/extensions/TextBubble/components/TextDropdown.tsx +0 -146
- package/src/extensions/TextBubble/index.ts +0 -1
- package/src/extensions/TextDirection/TextDirection.ts +0 -97
- package/src/extensions/TextDirection/components/TextDirectionButton.tsx +0 -103
- package/src/extensions/TextDirection/index.ts +0 -1
- package/src/extensions/TrailingNode/TrailingNode.ts +0 -71
- package/src/extensions/TrailingNode/index.ts +0 -1
- package/src/extensions/Twitter/Twitter.ts +0 -161
- package/src/extensions/Twitter/components/FormEditLinkTwitter.tsx +0 -68
- package/src/extensions/Twitter/components/NodeViewTweet.tsx +0 -30
- package/src/extensions/Twitter/components/TwitterActiveButton.tsx +0 -41
- package/src/extensions/Twitter/index.ts +0 -1
- package/src/extensions/UnderLine/Underline.ts +0 -30
- package/src/extensions/UnderLine/index.ts +0 -1
- package/src/extensions/Video/Video.ts +0 -204
- package/src/extensions/Video/components/ActiveVideoButton.tsx +0 -191
- package/src/extensions/Video/index.ts +0 -1
- package/src/extensions/Video/store.ts +0 -15
- package/src/extensions/index.ts +0 -122
- package/src/hooks/useActive.tsx +0 -24
- package/src/hooks/useAttributes.tsx +0 -45
- package/src/hooks/useCopy.tsx +0 -20
- package/src/hooks/useEditorState.tsx +0 -23
- package/src/hooks/useExtension.tsx +0 -29
- package/src/index.ts +0 -8
- package/src/lib/utils.ts +0 -7
- package/src/locale-bundle.ts +0 -3
- package/src/locales/en.ts +0 -173
- package/src/locales/hu.ts +0 -173
- package/src/locales/index.tsx +0 -163
- package/src/locales/pt-br.ts +0 -173
- package/src/locales/vi.ts +0 -173
- package/src/locales/zh-cn.ts +0 -173
- package/src/plugins/DragHandle/index.ts +0 -375
- package/src/plugins/DragHandle/range.ts +0 -114
- package/src/plugins/DragHandle/utils.ts +0 -80
- package/src/plugins/image-upload.ts +0 -160
- package/src/store/ProviderRichText.tsx +0 -53
- package/src/store/editableEditor.ts +0 -15
- package/src/store/fast-context.tsx +0 -70
- package/src/store/store.ts +0 -35
- package/src/styles/ProseMirror.scss +0 -176
- package/src/styles/columns.scss +0 -23
- package/src/styles/editor.scss +0 -411
- package/src/styles/global.scss +0 -87
- package/src/styles/index.scss +0 -5
- package/src/styles/mention.scss +0 -6
- package/src/theme/theme.ts +0 -15
- package/src/types.ts +0 -271
- package/src/utils/_event.ts +0 -55
- package/src/utils/color.ts +0 -67
- package/src/utils/columns.ts +0 -142
- package/src/utils/customEvents/customEvents.ts +0 -18
- package/src/utils/customEvents/events.constant.ts +0 -11
- package/src/utils/delete-node.ts +0 -46
- package/src/utils/dom-dataset.ts +0 -121
- package/src/utils/download.ts +0 -17
- package/src/utils/dynamicCSS.ts +0 -192
- package/src/utils/editor-container-size.ts +0 -28
- package/src/utils/file.ts +0 -112
- package/src/utils/getRenderContainer.ts +0 -41
- package/src/utils/indent.ts +0 -99
- package/src/utils/is-mobile.ts +0 -57
- package/src/utils/json.ts +0 -18
- package/src/utils/line-height.ts +0 -109
- package/src/utils/lru-cache.ts +0 -145
- package/src/utils/mitt.ts +0 -114
- package/src/utils/node.ts +0 -92
- package/src/utils/pdf.ts +0 -72
- package/src/utils/plateform.ts +0 -49
- package/src/utils/shortId.ts +0 -5
- package/src/utils/storage.ts +0 -18
- package/src/utils/utils.ts +0 -71
- package/src/vite-env.d.ts +0 -3
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
5
|
-
|
|
6
|
-
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
7
|
-
|
|
8
|
-
const Tabs = TabsPrimitive.Root;
|
|
9
|
-
|
|
10
|
-
const TabsList = React.forwardRef<
|
|
11
|
-
React.ElementRef<typeof TabsPrimitive.List>,
|
|
12
|
-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
13
|
-
>(({ className, ...props }, ref) => (
|
|
14
|
-
<TabsPrimitive.List
|
|
15
|
-
ref={ref}
|
|
16
|
-
className={cn(
|
|
17
|
-
'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
));
|
|
23
|
-
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
24
|
-
|
|
25
|
-
const TabsTrigger = React.forwardRef<
|
|
26
|
-
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
27
|
-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
28
|
-
>(({ className, ...props }, ref) => (
|
|
29
|
-
<TabsPrimitive.Trigger
|
|
30
|
-
ref={ref}
|
|
31
|
-
className={cn(
|
|
32
|
-
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
));
|
|
38
|
-
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
39
|
-
|
|
40
|
-
const TabsContent = React.forwardRef<
|
|
41
|
-
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
42
|
-
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
43
|
-
>(({ className, ...props }, ref) => (
|
|
44
|
-
<TabsPrimitive.Content
|
|
45
|
-
ref={ref}
|
|
46
|
-
className={cn(
|
|
47
|
-
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
48
|
-
className,
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
));
|
|
53
|
-
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
54
|
-
|
|
55
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
4
|
-
|
|
5
|
-
export interface TextareaProps
|
|
6
|
-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
7
|
-
|
|
8
|
-
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
9
|
-
({ className, ...props }, ref) => {
|
|
10
|
-
return (
|
|
11
|
-
<textarea
|
|
12
|
-
className={cn(
|
|
13
|
-
'flex min-h-[80px] w-full rounded-md !border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
16
|
-
ref={ref}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
);
|
|
22
|
-
Textarea.displayName = 'Textarea';
|
|
23
|
-
|
|
24
|
-
export { Textarea };
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
5
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
6
|
-
import { X } from 'lucide-react';
|
|
7
|
-
|
|
8
|
-
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
9
|
-
|
|
10
|
-
const ToastProvider = ToastPrimitives.Provider;
|
|
11
|
-
|
|
12
|
-
const ToastViewport = React.forwardRef<
|
|
13
|
-
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
14
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
|
|
15
|
-
>(({ className, ...props }, ref) => (
|
|
16
|
-
<ToastPrimitives.Viewport
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={cn(
|
|
19
|
-
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',
|
|
20
|
-
className,
|
|
21
|
-
)}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
));
|
|
25
|
-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
26
|
-
|
|
27
|
-
const toastVariants = cva(
|
|
28
|
-
'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md !border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',
|
|
29
|
-
{
|
|
30
|
-
variants: {
|
|
31
|
-
variant: {
|
|
32
|
-
default: 'border bg-background text-foreground',
|
|
33
|
-
destructive:
|
|
34
|
-
'destructive group border-destructive bg-destructive text-destructive-foreground',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
defaultVariants: {
|
|
38
|
-
variant: 'default',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
const Toast = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof ToastPrimitives.Root>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
|
|
46
|
-
VariantProps<typeof toastVariants>
|
|
47
|
-
>(({ className, variant, ...props }, ref) => {
|
|
48
|
-
return (
|
|
49
|
-
<ToastPrimitives.Root
|
|
50
|
-
ref={ref}
|
|
51
|
-
className={cn(toastVariants({ variant }), className)}
|
|
52
|
-
{...props}
|
|
53
|
-
/>
|
|
54
|
-
);
|
|
55
|
-
});
|
|
56
|
-
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
57
|
-
|
|
58
|
-
const ToastAction = React.forwardRef<
|
|
59
|
-
React.ElementRef<typeof ToastPrimitives.Action>,
|
|
60
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
|
|
61
|
-
>(({ className, ...props }, ref) => (
|
|
62
|
-
<ToastPrimitives.Action
|
|
63
|
-
ref={ref}
|
|
64
|
-
className={cn(
|
|
65
|
-
'inline-flex h-8 shrink-0 items-center justify-center rounded-md !border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',
|
|
66
|
-
className,
|
|
67
|
-
)}
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
));
|
|
71
|
-
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
72
|
-
|
|
73
|
-
const ToastClose = React.forwardRef<
|
|
74
|
-
React.ElementRef<typeof ToastPrimitives.Close>,
|
|
75
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
|
|
76
|
-
>(({ className, ...props }, ref) => (
|
|
77
|
-
<ToastPrimitives.Close
|
|
78
|
-
ref={ref}
|
|
79
|
-
className={cn(
|
|
80
|
-
'absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
|
|
81
|
-
className,
|
|
82
|
-
)}
|
|
83
|
-
toast-close=""
|
|
84
|
-
{...props}
|
|
85
|
-
>
|
|
86
|
-
<X className="h-4 w-4" />
|
|
87
|
-
</ToastPrimitives.Close>
|
|
88
|
-
));
|
|
89
|
-
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
90
|
-
|
|
91
|
-
const ToastTitle = React.forwardRef<
|
|
92
|
-
React.ElementRef<typeof ToastPrimitives.Title>,
|
|
93
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
|
|
94
|
-
>(({ className, ...props }, ref) => (
|
|
95
|
-
<ToastPrimitives.Title
|
|
96
|
-
ref={ref}
|
|
97
|
-
className={cn('text-sm font-semibold', className)}
|
|
98
|
-
{...props}
|
|
99
|
-
/>
|
|
100
|
-
));
|
|
101
|
-
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
102
|
-
|
|
103
|
-
const ToastDescription = React.forwardRef<
|
|
104
|
-
React.ElementRef<typeof ToastPrimitives.Description>,
|
|
105
|
-
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
|
|
106
|
-
>(({ className, ...props }, ref) => (
|
|
107
|
-
<ToastPrimitives.Description
|
|
108
|
-
ref={ref}
|
|
109
|
-
className={cn('text-sm opacity-90', className)}
|
|
110
|
-
{...props}
|
|
111
|
-
/>
|
|
112
|
-
));
|
|
113
|
-
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
114
|
-
|
|
115
|
-
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
116
|
-
|
|
117
|
-
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
118
|
-
|
|
119
|
-
export {
|
|
120
|
-
type ToastProps,
|
|
121
|
-
type ToastActionElement,
|
|
122
|
-
ToastProvider,
|
|
123
|
-
ToastViewport,
|
|
124
|
-
Toast,
|
|
125
|
-
ToastTitle,
|
|
126
|
-
ToastDescription,
|
|
127
|
-
ToastClose,
|
|
128
|
-
ToastAction,
|
|
129
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Toast,
|
|
5
|
-
ToastClose,
|
|
6
|
-
ToastDescription,
|
|
7
|
-
ToastProvider,
|
|
8
|
-
ToastTitle,
|
|
9
|
-
ToastViewport,
|
|
10
|
-
} from 'reactjs-tiptap-editor-pro/components/ui/toast';
|
|
11
|
-
import { useToast } from 'reactjs-tiptap-editor-pro/components/ui/use-toast';
|
|
12
|
-
|
|
13
|
-
export function Toaster() {
|
|
14
|
-
const { toasts } = useToast();
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<ToastProvider>
|
|
18
|
-
{toasts.map(({ id, title, description, action, ...props }) => {
|
|
19
|
-
return (
|
|
20
|
-
<Toast key={id}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
<div className="grid gap-1">
|
|
24
|
-
{title && <ToastTitle>
|
|
25
|
-
{title}
|
|
26
|
-
</ToastTitle>}
|
|
27
|
-
|
|
28
|
-
{description && (
|
|
29
|
-
<ToastDescription>
|
|
30
|
-
{description}
|
|
31
|
-
</ToastDescription>
|
|
32
|
-
)}
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
{action}
|
|
36
|
-
<ToastClose />
|
|
37
|
-
</Toast>
|
|
38
|
-
);
|
|
39
|
-
})}
|
|
40
|
-
|
|
41
|
-
<ToastViewport />
|
|
42
|
-
</ToastProvider>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
5
|
-
import { type VariantProps, cva } from 'class-variance-authority';
|
|
6
|
-
|
|
7
|
-
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
8
|
-
|
|
9
|
-
const toggleVariants = cva(
|
|
10
|
-
'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
|
|
11
|
-
{
|
|
12
|
-
variants: {
|
|
13
|
-
variant: {
|
|
14
|
-
default: 'bg-transparent',
|
|
15
|
-
outline:
|
|
16
|
-
'border border-input bg-transparent hover:bg-accent hover:text-accent-foreground',
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
default: 'h-10 px-3',
|
|
20
|
-
sm: 'h-9 px-2',
|
|
21
|
-
lg: 'h-11 px-5',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
variant: 'default',
|
|
26
|
-
size: 'default',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const Toggle = React.forwardRef<
|
|
32
|
-
React.ElementRef<typeof TogglePrimitive.Root>,
|
|
33
|
-
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
|
|
34
|
-
VariantProps<typeof toggleVariants>
|
|
35
|
-
>(({ className, variant, size, ...props }, ref) => (
|
|
36
|
-
<TogglePrimitive.Root
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn(toggleVariants({ variant, size, className }))}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
));
|
|
42
|
-
|
|
43
|
-
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
44
|
-
|
|
45
|
-
export { Toggle, toggleVariants };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
5
|
-
|
|
6
|
-
import { cn } from 'reactjs-tiptap-editor-pro/lib/utils';
|
|
7
|
-
|
|
8
|
-
const TooltipProvider = TooltipPrimitive.Provider;
|
|
9
|
-
|
|
10
|
-
const Tooltip = TooltipPrimitive.Root;
|
|
11
|
-
|
|
12
|
-
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
13
|
-
|
|
14
|
-
const TooltipContent = React.forwardRef<
|
|
15
|
-
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
-
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
-
<TooltipPrimitive.Content
|
|
19
|
-
ref={ref}
|
|
20
|
-
sideOffset={sideOffset}
|
|
21
|
-
className={cn(
|
|
22
|
-
'z-50 overflow-hidden rounded-md !border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
23
|
-
className,
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
));
|
|
28
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
29
|
-
|
|
30
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/* eslint-disable unused-imports/no-unused-vars */
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
// Inspired by react-hot-toast library
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
|
|
7
|
-
import type {
|
|
8
|
-
ToastActionElement,
|
|
9
|
-
ToastProps,
|
|
10
|
-
} from 'reactjs-tiptap-editor-pro/components/ui/toast';
|
|
11
|
-
|
|
12
|
-
const TOAST_LIMIT = 1;
|
|
13
|
-
const TOAST_REMOVE_DELAY = 1000000;
|
|
14
|
-
|
|
15
|
-
type ToasterToast = ToastProps & {
|
|
16
|
-
id: string
|
|
17
|
-
title?: React.ReactNode
|
|
18
|
-
description?: React.ReactNode
|
|
19
|
-
action?: ToastActionElement
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
const actionTypes = {
|
|
24
|
-
ADD_TOAST: 'ADD_TOAST',
|
|
25
|
-
UPDATE_TOAST: 'UPDATE_TOAST',
|
|
26
|
-
DISMISS_TOAST: 'DISMISS_TOAST',
|
|
27
|
-
REMOVE_TOAST: 'REMOVE_TOAST',
|
|
28
|
-
} as const;
|
|
29
|
-
|
|
30
|
-
let count = 0;
|
|
31
|
-
|
|
32
|
-
function genId() {
|
|
33
|
-
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
34
|
-
return count.toString();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
type ActionType = typeof actionTypes;
|
|
38
|
-
|
|
39
|
-
type Action =
|
|
40
|
-
| {
|
|
41
|
-
type: ActionType['ADD_TOAST']
|
|
42
|
-
toast: ToasterToast
|
|
43
|
-
}
|
|
44
|
-
| {
|
|
45
|
-
type: ActionType['UPDATE_TOAST']
|
|
46
|
-
toast: Partial<ToasterToast>
|
|
47
|
-
}
|
|
48
|
-
| {
|
|
49
|
-
type: ActionType['DISMISS_TOAST']
|
|
50
|
-
toastId?: ToasterToast['id']
|
|
51
|
-
}
|
|
52
|
-
| {
|
|
53
|
-
type: ActionType['REMOVE_TOAST']
|
|
54
|
-
toastId?: ToasterToast['id']
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
interface State {
|
|
58
|
-
toasts: ToasterToast[]
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();
|
|
62
|
-
|
|
63
|
-
function addToRemoveQueue(toastId: string) {
|
|
64
|
-
if (toastTimeouts.has(toastId)) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const timeout = setTimeout(() => {
|
|
69
|
-
toastTimeouts.delete(toastId);
|
|
70
|
-
dispatch({
|
|
71
|
-
type: 'REMOVE_TOAST',
|
|
72
|
-
toastId,
|
|
73
|
-
});
|
|
74
|
-
}, TOAST_REMOVE_DELAY);
|
|
75
|
-
|
|
76
|
-
toastTimeouts.set(toastId, timeout);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function reducer(state: State, action: Action): State {
|
|
80
|
-
switch (action.type) {
|
|
81
|
-
case 'ADD_TOAST':
|
|
82
|
-
return {
|
|
83
|
-
...state,
|
|
84
|
-
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
case 'UPDATE_TOAST':
|
|
88
|
-
return {
|
|
89
|
-
...state,
|
|
90
|
-
toasts: state.toasts.map(t =>
|
|
91
|
-
t.id === action.toast.id ? { ...t, ...action.toast } : t,
|
|
92
|
-
),
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
case 'DISMISS_TOAST': {
|
|
96
|
-
const { toastId } = action;
|
|
97
|
-
|
|
98
|
-
// ! Side effects ! - This could be extracted into a dismissToast() action,
|
|
99
|
-
// but I'll keep it here for simplicity
|
|
100
|
-
if (toastId) {
|
|
101
|
-
addToRemoveQueue(toastId);
|
|
102
|
-
} else {
|
|
103
|
-
state.toasts.forEach((toast) => {
|
|
104
|
-
addToRemoveQueue(toast.id);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return {
|
|
109
|
-
...state,
|
|
110
|
-
toasts: state.toasts.map(t =>
|
|
111
|
-
t.id === toastId || toastId === undefined
|
|
112
|
-
? {
|
|
113
|
-
...t,
|
|
114
|
-
open: false,
|
|
115
|
-
}
|
|
116
|
-
: t,
|
|
117
|
-
),
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
case 'REMOVE_TOAST':
|
|
121
|
-
if (action.toastId === undefined) {
|
|
122
|
-
return {
|
|
123
|
-
...state,
|
|
124
|
-
toasts: [],
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
return {
|
|
128
|
-
...state,
|
|
129
|
-
toasts: state.toasts.filter(t => t.id !== action.toastId),
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const listeners: Array<(state: State) => void> = [];
|
|
135
|
-
|
|
136
|
-
let memoryState: State = { toasts: [] };
|
|
137
|
-
|
|
138
|
-
function dispatch(action: Action) {
|
|
139
|
-
memoryState = reducer(memoryState, action);
|
|
140
|
-
listeners.forEach((listener) => {
|
|
141
|
-
listener(memoryState);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
type Toast = Omit<ToasterToast, 'id'>;
|
|
146
|
-
|
|
147
|
-
function toast({ ...props }: Toast) {
|
|
148
|
-
const id = genId();
|
|
149
|
-
|
|
150
|
-
const update = (props: ToasterToast) =>
|
|
151
|
-
dispatch({
|
|
152
|
-
type: 'UPDATE_TOAST',
|
|
153
|
-
toast: { ...props, id },
|
|
154
|
-
});
|
|
155
|
-
const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id });
|
|
156
|
-
|
|
157
|
-
dispatch({
|
|
158
|
-
type: 'ADD_TOAST',
|
|
159
|
-
toast: {
|
|
160
|
-
...props,
|
|
161
|
-
id,
|
|
162
|
-
open: true,
|
|
163
|
-
onOpenChange: (open) => {
|
|
164
|
-
if (!open)
|
|
165
|
-
dismiss();
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
return {
|
|
171
|
-
id,
|
|
172
|
-
dismiss,
|
|
173
|
-
update,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function useToast() {
|
|
178
|
-
const [state, setState] = React.useState<State>(memoryState);
|
|
179
|
-
|
|
180
|
-
React.useEffect(() => {
|
|
181
|
-
listeners.push(setState);
|
|
182
|
-
return () => {
|
|
183
|
-
const index = listeners.indexOf(setState);
|
|
184
|
-
if (index > -1) {
|
|
185
|
-
listeners.splice(index, 1);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
}, [state]);
|
|
189
|
-
|
|
190
|
-
return {
|
|
191
|
-
...state,
|
|
192
|
-
toast,
|
|
193
|
-
dismiss: (toastId?: string) => dispatch({ type: 'DISMISS_TOAST', toastId }),
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export { useToast, toast };
|