@vibe-tiptap/shadcn-ui 0.0.0-stage → 1.1.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/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 vibe-tiptap contributors
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,159 @@
1
- # Temporary Holding Version
1
+ # @vibe-tiptap/shadcn-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React 编辑器与 Naive UI 版共用 Tiptap schema、编辑命令和文档格式。默认输出 HTML,启用工具栏、斜杠菜单和字数统计。
4
+
5
+ ```tsx
6
+ import { useVibeTiptap, VibeTiptap, VibeTiptapProvider } from '@vibe-tiptap/shadcn-ui'
7
+ import '@vibe-tiptap/shadcn-ui/style.css'
8
+ import { shadcnTiptapComponents } from './shadcn-tiptap-components'
9
+
10
+ export function DocumentEditor() {
11
+ const editor = useVibeTiptap({ initialContent: '<p>正文</p>' })
12
+ return <VibeTiptap editor={editor} />
13
+ }
14
+
15
+ export function App() {
16
+ return (
17
+ <VibeTiptapProvider
18
+ components={shadcnTiptapComponents}
19
+ ui={{ toolbar: { className: 'gap-2' } }}
20
+ showWordCount={false}
21
+ >
22
+ <DocumentEditor />
23
+ </VibeTiptapProvider>
24
+ )
25
+ }
26
+ ```
27
+
28
+ `useVibeTiptap` 接收 `UseVibeTiptapOptions`。`initialContent` 支持 HTML 或 JSON,与扩展、语言、输出格式、placeholder 和斜杠菜单配置一起在初始化时读取。需要重建实例时,将 `key` 放在调用 hook 的组件上。
29
+
30
+ `editor.context` 在客户端挂载后可用,可调用 `setContent()`、`getContent()` 和 `editor.commands.focus()`(`editor` 为上下文中的 Tiptap 实例)。使用 `onUpdate` 监听编辑器内部变化,`output: 'json'` 使读取和更新回调返回 JSON。将 `onImagePreview` 传给 hook,回调会收到按文档顺序排列的图片 URL 和当前索引。
31
+
32
+ 每个 hook 实例可挂载一个 `VibeTiptap` 视图。卸载视图后仍可通过上下文读写文档,调用 hook 的组件卸载时销毁实例。工具栏、字数统计、色板和样式由 `VibeTiptap` 配置。
33
+
34
+ `VibeTiptapProvider` 为其子树中的编辑器和独立工具栏提供 `components`、`ui`、`toolbar`、`toolbarOptions`、`colors`、`highlights`、`markdownOptions` 和 `printOptions` 的默认值,也可通过 `showWordCount` 配置编辑器的字数统计。组件可以直接接收 `components`,也可以从 Provider 继承。嵌套 Provider 继承外层默认值,各组件可通过自身 props 覆盖。每个 prop 按整体覆盖,例如传入 `ui` 会替换整个默认 `ui` 对象。
35
+
36
+ ## 宿主组件
37
+
38
+ 使用宿主的 shadcn/ui 控件建立完整映射,并用 `satisfies ShadcnTiptapComponents` 检查类型。以下名称对应宿主适配后的组件。[Playground 完整适配源码](../../apps/playground/src/components/shadcn-tiptap-components.tsx)
39
+
40
+ ```tsx
41
+ import type { ShadcnTiptapComponents } from '@vibe-tiptap/shadcn-ui'
42
+
43
+ export const shadcnTiptapComponents = {
44
+ Button,
45
+ Input,
46
+ InputGroup: { Root: InputGroup, Input: InputGroupInput, Addon: InputGroupAddon },
47
+ Checkbox,
48
+ Tabs: { Root: Tabs, List: TabsList, Trigger: TabsTrigger, Content: TabsContent },
49
+ Select: {
50
+ Root: Select, Trigger: SelectTrigger, Value: SelectValue,
51
+ Content: SelectContent, Item: SelectItem,
52
+ },
53
+ Tooltip: {
54
+ Provider: TooltipProvider, Root: Tooltip, Trigger: TooltipTrigger, Content: TooltipContent,
55
+ },
56
+ Popover: {
57
+ Root: Popover, Trigger: PopoverTrigger, Anchor: PopoverAnchor, Content: PopoverContent,
58
+ },
59
+ DropdownMenu: {
60
+ Root: DropdownMenu, Trigger: DropdownMenuTrigger,
61
+ Content: DropdownMenuContent, Item: DropdownMenuItem,
62
+ },
63
+ Dialog: { Root: Dialog, Content: DialogContent, Title: DialogTitle, Close: DialogClose },
64
+ } satisfies ShadcnTiptapComponents
65
+ ```
66
+
67
+ - 控件转发原生属性、事件、`className` 和 DOM ref,并使用宿主的样式。工具栏的纯图标按钮通过 `size="icon"` 请求图标尺寸。React 18 宿主可用 `forwardRef` 实现转发。触发器通过 `asChild` 将属性和 ref 合并到单个子控件。
68
+ - 查找和替换框使用 `InputGroup`,通过 `Addon` 的 `align="inline-start"` 放置输入框图标,并用 `align="inline-end"` 放置区分大小写按钮。
69
+ - 带提示的编辑器按钮默认请求 `size="icon"` 和 `variant="ghost"`,显式传入的值优先。查找栏用 `size="icon-sm"`,白板保存按钮用 `variant="default"`。
70
+ - 图片预览的下载链接通过 `Button` 的 `asChild` 使用宿主按钮样式。
71
+ - 色盘底部的按钮通过 `size="sm"` 请求小号尺寸。
72
+ - 斜杠菜单使用带 `role="option"` 的原生按钮。编辑器负责列表定位、键盘导航和当前选项的高亮。
73
+ - Select、Tooltip、Popover、DropdownMenu 和 Dialog 的 `Content` 将浮层 Portal 到传入的 `container`。Select 宿主也提供选项文本和 Viewport。Popover 的 `Anchor` 支持通过 `virtualRef` 读取选区坐标。
74
+ - 浮层转发组件类型中定义的 Escape、外部交互和自动聚焦回调,保留事件的 `preventDefault()` 行为。宿主提供浮层面板外观和 Dialog 遮罩颜色。Dialog 将 `overlayClassName` 用于遮罩、将 `className` 转发给面板,以应用编辑器的全屏布局。
75
+ - 分别组合工具栏、内容区和状态栏时,将三者置于带 `vibe-shadcn-tiptap` 类的容器中。独立的 `ShadcnTiptapToolbar` 同时接收 `components` 和 `context`,可通过 `overlayTarget` 指定当前主题容器内的浮层挂载点。内容区和状态栏接收 `context`。
76
+ ## Tailwind CSS v4
77
+
78
+ 在应用入口导入包样式,并在宿主的 Tailwind 样式表中用 `@source` 扫描包的构建产物,以生成工具栏、气泡菜单和表单使用的工具类。路径以该样式表所在目录为基准。
79
+
80
+ ```css
81
+ @import "tailwindcss";
82
+ @source "../node_modules/@vibe-tiptap/shadcn-ui/dist";
83
+ ```
84
+
85
+ 工作区直接引用源码时,可以像 Playground 一样将 `@source` 指向包的 `src`。
86
+
87
+ ## 覆盖界面样式
88
+
89
+ `VibeTiptap` 和独立的 `ShadcnTiptapToolbar` 都接收 `ui`。配置作用于对应区域,`className` 会与默认工具类合并,冲突时宿主提供的类优先。
90
+
91
+ ```tsx
92
+ <VibeTiptap
93
+ editor={editor}
94
+ components={shadcnTiptapComponents}
95
+ ui={{
96
+ toolbar: {
97
+ className: 'gap-2 p-2',
98
+ button: { size: 'icon-sm', variant: 'outline', className: 'rounded-full' },
99
+ heading: {
100
+ button: { size: 'sm', className: 'rounded-md' },
101
+ valueClassName: 'gap-1',
102
+ contentClassName: 'min-w-40',
103
+ itemClassName: 'text-base',
104
+ },
105
+ },
106
+ bubble: { button: { variant: 'ghost', className: 'rounded-sm' } },
107
+ colorPicker: {
108
+ className: 'p-2',
109
+ gridClassName: 'gap-2',
110
+ footerClassName: 'pt-2',
111
+ swatchClassName: 'size-6 rounded-full',
112
+ swatch: { variant: 'outline' },
113
+ button: { variant: 'outline' },
114
+ },
115
+ findReplace: {
116
+ input: { className: 'text-sm' },
117
+ inputGroupClassName: 'h-10',
118
+ button: { size: 'icon-sm' },
119
+ },
120
+ insertionPopover: {
121
+ className: 'w-80',
122
+ input: { variant: 'ghost', className: 'h-10 px-2' },
123
+ button: { size: 'sm' },
124
+ checkbox: { className: 'size-5 rounded-md' },
125
+ uploadClassName: 'border-primary bg-accent',
126
+ tabs: {
127
+ className: 'space-y-2',
128
+ listClassName: 'h-10 gap-2',
129
+ trigger: { className: 'rounded-full' },
130
+ contentClassName: 'pt-1',
131
+ },
132
+ },
133
+ imagePreview: {
134
+ iconButton: { size: 'icon-sm' },
135
+ button: { size: 'sm', variant: 'outline' },
136
+ },
137
+ }}
138
+ />
139
+ ```
140
+
141
+ 查找替换的 `input.variant` 控制输入组外框,`input.className` 作用于输入框。查找替换用 `inputGroupClassName` 调整输入组高度,插入浮层用 `input.className` 调整输入框高度。工具栏分组可通过 `toolbar.groupClassName` 自定义。宿主组件需合并收到的 `className`,并应用收到的按钮 `size` 和 `variant`。
142
+
143
+ `toolbar.heading` 控制正文/标题选择器。`button` 支持 `size`、`variant` 和 `className`,逐项覆盖 `toolbar.button`。`valueClassName` 控制按钮内的图标和文字布局,`contentClassName` 和 `itemClassName` 分别作用于下拉面板和每个选项。
144
+
145
+ `colorPicker` 同时适用于工具栏和气泡菜单中的文字颜色与高亮色盘。`button` 作用于色盘触发、复制和清除按钮,并优先于所在区域的按钮配置。`swatchClassName` 用于色块的尺寸、边框和选中轮廓,色块背景取自候选颜色。
146
+
147
+ 通过各区域的 `button` 属性设置 `size`、`variant` 和 `className`。其他支持按钮配置的区域包括 `tableGrips`、`whiteboard` 和 `imagePreview`。插入浮层的按钮选项也作用于 Tabs 和复选框。`colorPicker.swatch` 用于单独覆盖色块按钮,优先于 `colorPicker.button`。
148
+
149
+ 斜杠菜单和表格尺寸网格使用原生按钮,通过 `slashMenu.button.className` 和 `tablePicker.button.className` 覆盖尺寸和外观。
150
+
151
+ 媒体插入浮层的 `insertionPopover.tabs` 支持通过 `className`、`listClassName` 和 `contentClassName` 分别设置 Tabs 容器、页签列表和内容区。`trigger` 支持 `size`、`variant` 和 `className`,优先于浮层的 `button` 配置。
152
+
153
+ 链接浮层的 `insertionPopover.checkbox` 控制「在新窗口打开」复选框,支持 `size`、`variant` 和 `className`,优先于浮层的 `button` 配置。
154
+
155
+ 图片预览的 `iconButton` 控制翻页、放大缩小、旋转和关闭按钮。`button` 控制缩放率和下载按钮。两项各自支持 `size`、`variant` 和 `className`。
156
+
157
+ 编辑器和宿主控件可以共用 `--background`、`--foreground`、`--muted`、`--muted-foreground`、`--primary`、`--accent`、`--border`、`--input` 和 `--ring` 等主题变量。可在单个编辑器或其祖先覆盖这些变量。主组件的浮层挂在该编辑器内,在局部主题和浏览器全屏下仍可显示。
158
+
159
+ `colors` 与 `highlights` 配置工具栏和气泡中的候选色。已保存的文字与高亮颜色来自文档。
@@ -0,0 +1,15 @@
1
+ import type { ReactEditorContext } from '@vibe-tiptap/react-adapter';
2
+ import type { ShadcnTiptapUiOptions } from './types.js';
3
+ interface ColorPickerProps {
4
+ appearance?: ShadcnTiptapUiOptions['colorPicker'];
5
+ context: ReactEditorContext;
6
+ colors: string[];
7
+ kind: 'color' | 'highlight';
8
+ overlayTarget?: HTMLElement;
9
+ disabled: boolean;
10
+ bubble?: boolean;
11
+ open?: boolean;
12
+ onOpenChange?: (open: boolean) => void;
13
+ }
14
+ export declare function ColorPicker({ appearance, context, colors, kind, overlayTarget, disabled, bubble, open, onOpenChange, }: ColorPickerProps): import("react").JSX.Element;
15
+ export {};
@@ -0,0 +1,133 @@
1
+ import type { ComponentPropsWithRef, ComponentType, ReactNode, RefObject } from 'react';
2
+ type ButtonProps = ComponentPropsWithRef<'button'> & {
3
+ asChild?: boolean;
4
+ size?: 'icon' | 'sm';
5
+ };
6
+ type DivProps = ComponentPropsWithRef<'div'>;
7
+ type OpenProps = {
8
+ children?: ReactNode;
9
+ open?: boolean;
10
+ onOpenChange?: (open: boolean) => void;
11
+ };
12
+ type ValueProps = {
13
+ value: string;
14
+ onValueChange: (value: string) => void;
15
+ };
16
+ type PortalProps = DivProps & {
17
+ container: HTMLElement;
18
+ };
19
+ type PositionedProps = PortalProps & {
20
+ align?: 'start' | 'center' | 'end';
21
+ side?: 'top' | 'right' | 'bottom' | 'left';
22
+ sideOffset?: number;
23
+ collisionPadding?: number;
24
+ };
25
+ type DismissProps = {
26
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
27
+ onPointerDownOutside?: (event: Event) => void;
28
+ };
29
+ type FocusProps = DismissProps & {
30
+ onCloseAutoFocus?: (event: Event) => void;
31
+ };
32
+ type LayerProps = FocusProps & {
33
+ onOpenAutoFocus?: (event: Event) => void;
34
+ onFocusOutside?: (event: Event) => void;
35
+ onInteractOutside?: (event: Event) => void;
36
+ };
37
+ type VirtualAnchor = {
38
+ contextElement?: Element;
39
+ getBoundingClientRect: () => DOMRect;
40
+ };
41
+ export interface ShadcnTiptapComponents {
42
+ Button: ComponentType<Omit<ButtonProps, 'size'> & {
43
+ size?: 'default' | 'sm' | 'icon' | 'icon-sm';
44
+ variant?: 'default' | 'outline' | 'ghost';
45
+ }>;
46
+ Input: ComponentType<ComponentPropsWithRef<'input'>>;
47
+ InputGroup: {
48
+ Root: ComponentType<DivProps>;
49
+ Input: ComponentType<ComponentPropsWithRef<'input'>>;
50
+ Addon: ComponentType<DivProps & {
51
+ align: 'inline-start' | 'inline-end';
52
+ }>;
53
+ };
54
+ Checkbox: ComponentType<ButtonProps & {
55
+ checked: boolean;
56
+ onCheckedChange: (checked: boolean | 'indeterminate') => void;
57
+ }>;
58
+ Tabs: {
59
+ Root: ComponentType<Omit<DivProps, 'defaultValue' | 'dir'> & ValueProps & {
60
+ dir?: 'ltr' | 'rtl';
61
+ }>;
62
+ List: ComponentType<DivProps>;
63
+ Trigger: ComponentType<ButtonProps & {
64
+ value: string;
65
+ }>;
66
+ Content: ComponentType<DivProps & {
67
+ value: string;
68
+ }>;
69
+ };
70
+ Select: {
71
+ Root: ComponentType<OpenProps & ValueProps & {
72
+ disabled?: boolean;
73
+ }>;
74
+ Trigger: ComponentType<ButtonProps>;
75
+ Value: ComponentType<ComponentPropsWithRef<'span'> & {
76
+ placeholder?: ReactNode;
77
+ }>;
78
+ Content: ComponentType<PositionedProps & FocusProps & {
79
+ position?: 'item-aligned' | 'popper';
80
+ }>;
81
+ Item: ComponentType<Omit<DivProps, 'onSelect'> & {
82
+ value: string;
83
+ disabled?: boolean;
84
+ }>;
85
+ };
86
+ Tooltip: {
87
+ Provider: ComponentType<{
88
+ children: ReactNode;
89
+ delayDuration?: number;
90
+ skipDelayDuration?: number;
91
+ }>;
92
+ Root: ComponentType<OpenProps & {
93
+ disableHoverableContent?: boolean;
94
+ }>;
95
+ Trigger: ComponentType<ButtonProps>;
96
+ Content: ComponentType<PositionedProps & Pick<DismissProps, 'onEscapeKeyDown'>>;
97
+ };
98
+ Popover: {
99
+ Root: ComponentType<OpenProps & {
100
+ modal?: boolean;
101
+ }>;
102
+ Trigger: ComponentType<ButtonProps>;
103
+ Anchor: ComponentType<DivProps & {
104
+ asChild?: boolean;
105
+ virtualRef?: RefObject<VirtualAnchor>;
106
+ }>;
107
+ Content: ComponentType<PositionedProps & LayerProps>;
108
+ };
109
+ DropdownMenu: {
110
+ Root: ComponentType<OpenProps & {
111
+ modal?: boolean;
112
+ }>;
113
+ Trigger: ComponentType<ButtonProps>;
114
+ Content: ComponentType<PositionedProps & Omit<LayerProps, 'onOpenAutoFocus'>>;
115
+ Item: ComponentType<Omit<DivProps, 'onSelect'> & {
116
+ disabled?: boolean;
117
+ onSelect?: (event: Event) => void;
118
+ }>;
119
+ };
120
+ Dialog: {
121
+ Root: ComponentType<OpenProps & {
122
+ modal?: boolean;
123
+ }>;
124
+ Content: ComponentType<PortalProps & LayerProps & {
125
+ overlayClassName?: string;
126
+ }>;
127
+ Title: ComponentType<ComponentPropsWithRef<'h2'>>;
128
+ Close: ComponentType<ButtonProps>;
129
+ };
130
+ }
131
+ export declare const ShadcnTiptapComponentsProvider: import("react").Provider<ShadcnTiptapComponents | undefined>;
132
+ export declare function useShadcnTiptapComponents(): ShadcnTiptapComponents;
133
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { EditorBehaviorOptions, ReactEditorContext, UploadAsset } from '@vibe-tiptap/react-adapter';
2
+ import type { InsertionRequest } from './insertion-popover.js';
3
+ import type { ShadcnTiptapEditorProps } from './types.js';
4
+ interface EditorBubbleProps {
5
+ ui?: ShadcnTiptapEditorProps['ui'];
6
+ context: ReactEditorContext;
7
+ overlayTarget: HTMLElement;
8
+ colors?: ShadcnTiptapEditorProps['colors'];
9
+ highlights?: ShadcnTiptapEditorProps['highlights'];
10
+ uploadAsset?: UploadAsset;
11
+ behaviorOptions?: EditorBehaviorOptions;
12
+ onLink: (request: InsertionRequest) => void;
13
+ onWhiteboardEdit: () => void;
14
+ onPaletteOpenChange: (open: boolean) => void;
15
+ }
16
+ export declare function EditorBubble({ ui, context, overlayTarget, colors, highlights, uploadAsset, behaviorOptions, onLink, onWhiteboardEdit, onPaletteOpenChange, }: EditorBubbleProps): import("react").JSX.Element | null;
17
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { ComponentPropsWithoutRef, ReactElement } from 'react';
2
+ import type { ShadcnTiptapComponents } from './components.js';
3
+ import type { ShadcnTiptapButtonAppearance } from './types.js';
4
+ type EditorButtonProps = ComponentPropsWithoutRef<ShadcnTiptapComponents['Button']> & {
5
+ appearance?: ShadcnTiptapButtonAppearance;
6
+ defaultSizeClassName?: string;
7
+ };
8
+ export declare const ButtonAppearanceProvider: import("react").Provider<ShadcnTiptapButtonAppearance | undefined>;
9
+ export declare function useButtonAppearance(override?: ShadcnTiptapButtonAppearance): {
10
+ size: "icon" | "sm" | "default" | "icon-sm" | undefined;
11
+ variant: "default" | "outline" | "ghost" | undefined;
12
+ className: string;
13
+ };
14
+ export declare const EditorButton: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
15
+ asChild?: boolean;
16
+ size?: "icon" | "sm";
17
+ }, "size"> & {
18
+ size?: "default" | "sm" | "icon" | "icon-sm";
19
+ variant?: "default" | "outline" | "ghost";
20
+ }, "ref"> & {
21
+ appearance?: ShadcnTiptapButtonAppearance;
22
+ defaultSizeClassName?: string;
23
+ } & import("react").RefAttributes<HTMLButtonElement>>;
24
+ export declare function EditorButtonChild({ appearance, children, }: {
25
+ appearance?: ShadcnTiptapButtonAppearance;
26
+ children: ReactElement<{
27
+ className?: string;
28
+ }>;
29
+ }): import("react").JSX.Element;
30
+ interface EditorTooltipButtonProps extends EditorButtonProps {
31
+ label: string;
32
+ overlayTarget?: HTMLElement;
33
+ }
34
+ export declare const EditorTooltipButton: import("react").ForwardRefExoticComponent<EditorTooltipButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
35
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ShadcnTiptapContentProps, ShadcnTiptapStatusBarProps } from './types.js';
2
+ export declare function ShadcnTiptapContent({ context, className, ...props }: ShadcnTiptapContentProps): import("react").JSX.Element;
3
+ export declare function ShadcnTiptapStatusBar({ context }: ShadcnTiptapStatusBarProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ReactEditorContext } from '@vibe-tiptap/react-adapter';
2
+ import type { ShadcnTiptapUiOptions } from './types.js';
3
+ interface FindReplaceProps {
4
+ appearance?: ShadcnTiptapUiOptions['findReplace'];
5
+ context: ReactEditorContext;
6
+ editable: boolean;
7
+ overlayTarget?: HTMLElement;
8
+ }
9
+ export declare function FindReplace({ appearance, context, editable, overlayTarget }: FindReplaceProps): import("react").JSX.Element | null;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ImagePreviewEvent, ReactEditorContext } from '@vibe-tiptap/react-adapter';
2
+ import type { ShadcnTiptapUiOptions } from './types.js';
3
+ interface ImagePreviewDialogProps {
4
+ appearance?: ShadcnTiptapUiOptions['imagePreview'];
5
+ context: ReactEditorContext;
6
+ overlayTarget: HTMLElement;
7
+ imagePreview: ImagePreviewEvent;
8
+ onClose: () => void;
9
+ }
10
+ export declare function ImagePreviewDialog({ appearance, context: { editor, t }, overlayTarget, imagePreview, onClose, }: ImagePreviewDialogProps): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,17 @@
1
+ export { PRESET_HIGHLIGHT_COLORS, PRESET_TEXT_COLORS, TOOLBAR_HEADING_PREVIEW_STYLES, } from '@vibe-tiptap/editor-ui/editor-theme';
2
+ export type { CopyMarkdownOptions, ExportMarkdownOptions, MarkdownActionContext, MarkdownFileOptions, ResolvedMarkdownFileOptions, ToolbarMarkdownAction, ToolbarMarkdownOption, } from '@vibe-tiptap/editor-ui/markdown-file';
3
+ export { copyMarkdown, exportMarkdownFile, importMarkdownFile, TOOLBAR_MARKDOWN_IMPORT_ACCEPT, TOOLBAR_MARKDOWN_OPTIONS, } from '@vibe-tiptap/editor-ui/markdown-file';
4
+ export type { PrintActionOptions, PrintOptions, } from '@vibe-tiptap/editor-ui/print-editor-content';
5
+ export { printEditorContent } from '@vibe-tiptap/editor-ui/print-editor-content';
6
+ export type { CodeBlockLanguageOption, HorizontalRuleOption, ResolvedToolbarMenuOptions, ResolvedToolbarTableGridOptions, ToolbarAlignOption, ToolbarHeadingLevel, ToolbarHeadingOption, ToolbarOptions as ToolbarMenuOptions, ToolbarTableGridOptions, ToolbarTextAlign, } from '@vibe-tiptap/editor-ui/toolbar-config';
7
+ export { DEFAULT_CODE_BLOCK_LANGUAGES, DEFAULT_HORIZONTAL_RULES, NAIVE_UI_DEFAULT_TOOLBAR as SHADCN_UI_DEFAULT_TOOLBAR, normalizeToolbarConfig, TOOLBAR_ALIGN_OPTIONS, TOOLBAR_HEADING_OPTIONS, TOOLBAR_TABLE_GRID, } from '@vibe-tiptap/editor-ui/toolbar-config';
8
+ export type { ImagePreviewEvent, MentionClickEvent, MentionItem, MentionOptions, MentionTarget, ReactEditorContext, } from '@vibe-tiptap/react-adapter';
9
+ export type { ShadcnTiptapComponents } from './components.js';
10
+ export { ShadcnTiptapContent, ShadcnTiptapStatusBar } from './editor-content.js';
11
+ export { ShadcnTiptapEditor, ShadcnTiptapEditor as VibeTiptap } from './shadcn-tiptap-editor.js';
12
+ export { ShadcnTiptapToolbar } from './shadcn-tiptap-toolbar.js';
13
+ export type { ShadcnTiptapButtonAppearance, ShadcnTiptapContentProps, ShadcnTiptapEditorProps, ShadcnTiptapInputAppearance, ShadcnTiptapStatusBarProps, ShadcnTiptapToolbarBuiltinKey, ShadcnTiptapToolbarConfig, ShadcnTiptapToolbarProp, ShadcnTiptapToolbarProps, ShadcnTiptapUiOptions, } from './types.js';
14
+ export type { UseVibeTiptapOptions } from './use-vibe-tiptap.js';
15
+ export { useVibeTiptap } from './use-vibe-tiptap.js';
16
+ export type { VibeTiptapProviderProps } from './vibe-tiptap-provider.js';
17
+ export { VibeTiptapProvider } from './vibe-tiptap-provider.js';