antdv-next-tiptap 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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +282 -0
  3. package/dist/favicon.ico +0 -0
  4. package/dist/index.css +2 -0
  5. package/dist/index.mjs +9132 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/dist/types/index.d.ts +3 -0
  8. package/dist/types/src/commands/colorButton.vue.d.ts +15 -0
  9. package/dist/types/src/commands/fontFamilySelect.vue.d.ts +7 -0
  10. package/dist/types/src/commands/fontSizeSelect.vue.d.ts +7 -0
  11. package/dist/types/src/commands/fullscreenButton.vue.d.ts +7 -0
  12. package/dist/types/src/commands/headingSelect.vue.d.ts +7 -0
  13. package/dist/types/src/commands/imageButton.vue.d.ts +7 -0
  14. package/dist/types/src/commands/imageModal.vue.d.ts +23 -0
  15. package/dist/types/src/commands/imageView.vue.d.ts +93 -0
  16. package/dist/types/src/commands/linkButton.vue.d.ts +7 -0
  17. package/dist/types/src/commands/listSelect.vue.d.ts +7 -0
  18. package/dist/types/src/commands/tableButton.vue.d.ts +7 -0
  19. package/dist/types/src/commands/tableToolbar.vue.d.ts +7 -0
  20. package/dist/types/src/commands/taskItemView.vue.d.ts +4 -0
  21. package/dist/types/src/commands/textBubbleMenu.vue.d.ts +7 -0
  22. package/dist/types/src/commands/videoButton.vue.d.ts +7 -0
  23. package/dist/types/src/commands/videoModal.vue.d.ts +21 -0
  24. package/dist/types/src/commands/videoView.vue.d.ts +93 -0
  25. package/dist/types/src/extensions/base.d.ts +2 -0
  26. package/dist/types/src/extensions/blockquote.d.ts +6 -0
  27. package/dist/types/src/extensions/bold.d.ts +2 -0
  28. package/dist/types/src/extensions/bulletList.d.ts +2 -0
  29. package/dist/types/src/extensions/clearFormat.d.ts +7 -0
  30. package/dist/types/src/extensions/code.d.ts +6 -0
  31. package/dist/types/src/extensions/codeBlock.d.ts +6 -0
  32. package/dist/types/src/extensions/color.d.ts +2 -0
  33. package/dist/types/src/extensions/fontFamily.d.ts +6 -0
  34. package/dist/types/src/extensions/fontSize.d.ts +6 -0
  35. package/dist/types/src/extensions/fullscreen.d.ts +2 -0
  36. package/dist/types/src/extensions/heading.d.ts +2 -0
  37. package/dist/types/src/extensions/highlight.d.ts +7 -0
  38. package/dist/types/src/extensions/horizontalRule.d.ts +6 -0
  39. package/dist/types/src/extensions/image.d.ts +2 -0
  40. package/dist/types/src/extensions/index.d.ts +3 -0
  41. package/dist/types/src/extensions/italic.d.ts +2 -0
  42. package/dist/types/src/extensions/link.d.ts +6 -0
  43. package/dist/types/src/extensions/orderedList.d.ts +2 -0
  44. package/dist/types/src/extensions/print.d.ts +2 -0
  45. package/dist/types/src/extensions/strike.d.ts +6 -0
  46. package/dist/types/src/extensions/table.d.ts +2 -0
  47. package/dist/types/src/extensions/taskList.d.ts +2 -0
  48. package/dist/types/src/extensions/textAlign.d.ts +2 -0
  49. package/dist/types/src/extensions/textStyle.d.ts +7 -0
  50. package/dist/types/src/extensions/types.d.ts +31 -0
  51. package/dist/types/src/extensions/underline.d.ts +6 -0
  52. package/dist/types/src/extensions/undoRedo.d.ts +6 -0
  53. package/dist/types/src/extensions/video.d.ts +2 -0
  54. package/dist/types/src/extensions/videoNode.d.ts +27 -0
  55. package/dist/types/src/injectionKeys.d.ts +5 -0
  56. package/dist/types/src/tiptap.vue.d.ts +30 -0
  57. package/dist/types/src/tiptapProps.d.ts +39 -0
  58. package/dist/types/src/toolbarItem.vue.d.ts +9 -0
  59. package/package.json +112 -0
@@ -0,0 +1,3 @@
1
+ export { default as Tiptap } from './src/tiptap.vue';
2
+ export type { TiptapProps, OutputFormat, PluginName } from './src/tiptapProps';
3
+ export type { TiptapPlugin, ToolbarItem, ToolbarButton, ToolbarComponent } from './src/extensions';
@@ -0,0 +1,15 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ /** 图标 */
5
+ icon: string;
6
+ /** 标题 */
7
+ title: string;
8
+ /** 应用颜色的回调 */
9
+ apply: (color: string) => void;
10
+ /** 获取当前颜色 */
11
+ getColor?: () => string;
12
+ };
13
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export interface ImageFormData {
2
+ src: string;
3
+ alt: string;
4
+ width: number | null;
5
+ height: number | null;
6
+ }
7
+ type __VLS_Props = {
8
+ title: string;
9
+ initialValues?: Partial<ImageFormData>;
10
+ };
11
+ type __VLS_ModelProps = {
12
+ 'open': boolean;
13
+ };
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ "update:open": (value: boolean) => any;
17
+ confirm: (data: ImageFormData) => any;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
20
+ onConfirm?: ((data: ImageFormData) => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -0,0 +1,93 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ editor: {
3
+ type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
4
+ required: true;
5
+ };
6
+ node: {
7
+ type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
8
+ required: true;
9
+ };
10
+ decorations: {
11
+ type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
12
+ required: true;
13
+ };
14
+ selected: {
15
+ type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
16
+ required: true;
17
+ };
18
+ extension: {
19
+ type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
20
+ required: true;
21
+ };
22
+ getPos: {
23
+ type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
24
+ required: true;
25
+ };
26
+ updateAttributes: {
27
+ type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
28
+ required: true;
29
+ };
30
+ deleteNode: {
31
+ type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
32
+ required: true;
33
+ };
34
+ view: {
35
+ type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
36
+ required: true;
37
+ };
38
+ innerDecorations: {
39
+ type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
40
+ required: true;
41
+ };
42
+ HTMLAttributes: {
43
+ type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
44
+ required: true;
45
+ };
46
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
47
+ editor: {
48
+ type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
49
+ required: true;
50
+ };
51
+ node: {
52
+ type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
53
+ required: true;
54
+ };
55
+ decorations: {
56
+ type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
57
+ required: true;
58
+ };
59
+ selected: {
60
+ type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
61
+ required: true;
62
+ };
63
+ extension: {
64
+ type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
65
+ required: true;
66
+ };
67
+ getPos: {
68
+ type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
69
+ required: true;
70
+ };
71
+ updateAttributes: {
72
+ type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
73
+ required: true;
74
+ };
75
+ deleteNode: {
76
+ type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
77
+ required: true;
78
+ };
79
+ view: {
80
+ type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
81
+ required: true;
82
+ };
83
+ innerDecorations: {
84
+ type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
85
+ required: true;
86
+ };
87
+ HTMLAttributes: {
88
+ type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
89
+ required: true;
90
+ };
91
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
93
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { NodeViewProps } from '@tiptap/core';
2
+ declare const __VLS_export: import('vue').DefineComponent<NodeViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/vue-3';
2
+ type __VLS_Props = {
3
+ editor?: Editor;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,21 @@
1
+ import { VideoAttrs } from '../extensions/videoNode';
2
+ export type VideoFormData = Omit<VideoAttrs, 'src'> & {
3
+ src: string;
4
+ };
5
+ type __VLS_Props = {
6
+ title: string;
7
+ initialValues?: Partial<VideoFormData>;
8
+ };
9
+ type __VLS_ModelProps = {
10
+ 'open': boolean;
11
+ };
12
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
13
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ "update:open": (value: boolean) => any;
15
+ confirm: (data: VideoFormData) => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
18
+ onConfirm?: ((data: VideoFormData) => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
@@ -0,0 +1,93 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ editor: {
3
+ type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
4
+ required: true;
5
+ };
6
+ node: {
7
+ type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
8
+ required: true;
9
+ };
10
+ decorations: {
11
+ type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
12
+ required: true;
13
+ };
14
+ selected: {
15
+ type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
16
+ required: true;
17
+ };
18
+ extension: {
19
+ type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
20
+ required: true;
21
+ };
22
+ getPos: {
23
+ type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
24
+ required: true;
25
+ };
26
+ updateAttributes: {
27
+ type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
28
+ required: true;
29
+ };
30
+ deleteNode: {
31
+ type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
32
+ required: true;
33
+ };
34
+ view: {
35
+ type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
36
+ required: true;
37
+ };
38
+ innerDecorations: {
39
+ type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
40
+ required: true;
41
+ };
42
+ HTMLAttributes: {
43
+ type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
44
+ required: true;
45
+ };
46
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
47
+ editor: {
48
+ type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
49
+ required: true;
50
+ };
51
+ node: {
52
+ type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
53
+ required: true;
54
+ };
55
+ decorations: {
56
+ type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
57
+ required: true;
58
+ };
59
+ selected: {
60
+ type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
61
+ required: true;
62
+ };
63
+ extension: {
64
+ type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
65
+ required: true;
66
+ };
67
+ getPos: {
68
+ type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
69
+ required: true;
70
+ };
71
+ updateAttributes: {
72
+ type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
73
+ required: true;
74
+ };
75
+ deleteNode: {
76
+ type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
77
+ required: true;
78
+ };
79
+ view: {
80
+ type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
81
+ required: true;
82
+ };
83
+ innerDecorations: {
84
+ type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
85
+ required: true;
86
+ };
87
+ HTMLAttributes: {
88
+ type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
89
+ required: true;
90
+ };
91
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
92
+ declare const _default: typeof __VLS_export;
93
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const basePlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 引用块功能扩展
4
+ * 提供文本引用格式化和工具栏按钮
5
+ */
6
+ export declare const blockquotePlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const boldPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const bulletListPlugin: TiptapPlugin;
@@ -0,0 +1,7 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 清除格式功能扩展
4
+ * 提供清除所有文本格式化的功能
5
+ * 支持清除节点格式和标记格式
6
+ */
7
+ export declare const clearFormatPlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 行内代码功能扩展
4
+ * 提供单行代码格式化和工具栏按钮
5
+ */
6
+ export declare const codePlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 代码块功能扩展
4
+ * 使用 lowlight (highlight.js) 提供语法高亮
5
+ */
6
+ export declare const codeBlockPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const colorPlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 字体系列功能扩展
4
+ * 提供多种字体选择功能
5
+ */
6
+ export declare const fontFamilyPlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 字体大小功能扩展
4
+ * 提供多种字号选择功能
5
+ */
6
+ export declare const fontSizePlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const fullscreenPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const headingPlugin: TiptapPlugin;
@@ -0,0 +1,7 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 文本高亮功能扩展
4
+ * 提供文本背景高亮色选择功能
5
+ * 支持多色彩高亮显示
6
+ */
7
+ export declare const highlightPlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 分割线功能扩展
4
+ * 提供水平分割线插入功能
5
+ */
6
+ export declare const horizontalRulePlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const imagePlugin: TiptapPlugin;
@@ -0,0 +1,3 @@
1
+ import { TiptapPlugin } from './types';
2
+ export type { TiptapPlugin, ToolbarItem, ToolbarButton, ToolbarComponent } from './types';
3
+ export declare const defaultPlugins: TiptapPlugin[];
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const italicPlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 链接功能扩展
4
+ * 提供超链接插入、编辑和删除功能
5
+ */
6
+ export declare const linkPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const orderedListPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const printPlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 删除线功能扩展
4
+ * 提供文本删除线格式化和工具栏按钮
5
+ */
6
+ export declare const strikePlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const tablePlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const taskListPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const textAlignPlugin: TiptapPlugin;
@@ -0,0 +1,7 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 文本样式功能扩展
4
+ * 提供基础文本样式支持,为字体、颜色等功能提供底层支持
5
+ * 注意:此扩展无工具栏,作为其他样式扩展的基础
6
+ */
7
+ export declare const textStylePlugin: TiptapPlugin;
@@ -0,0 +1,31 @@
1
+ import { AnyExtension, Editor } from '@tiptap/vue-3';
2
+ import { VNode } from 'vue';
3
+ import { PluginName } from '../tiptapProps';
4
+ export interface ToolbarButton {
5
+ /** 图标 */
6
+ icon: string;
7
+ /** 标题 */
8
+ title: string;
9
+ /** 图标大小(默认16) */
10
+ size?: string | number;
11
+ /** 按钮执行的方法 */
12
+ action: (editor: Editor) => void;
13
+ /** 当前扩展是否被激活 */
14
+ isActive?: (editor: Editor) => boolean;
15
+ /** 是否禁用 */
16
+ isDisabled?: (editor: Editor) => boolean;
17
+ }
18
+ export interface ToolbarComponent {
19
+ type: 'component';
20
+ /** 自定义渲染 */
21
+ render: (editor: Editor) => VNode;
22
+ }
23
+ export type ToolbarItem = {
24
+ divider: true;
25
+ } | ToolbarButton | ToolbarComponent;
26
+ export interface TiptapPlugin {
27
+ /** 插件唯一标识,用于 disabledPlugins 过滤 */
28
+ name?: PluginName;
29
+ extensions: AnyExtension[];
30
+ toolbar?: ToolbarItem[];
31
+ }
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 下划线功能扩展
4
+ * 提供文本下划线格式化和工具栏按钮
5
+ */
6
+ export declare const underlinePlugin: TiptapPlugin;
@@ -0,0 +1,6 @@
1
+ import { TiptapPlugin } from './types';
2
+ /**
3
+ * 撤销重做功能扩展
4
+ * 提供撤销和重做操作功能
5
+ */
6
+ export declare const undoRedoPlugin: TiptapPlugin;
@@ -0,0 +1,2 @@
1
+ import { TiptapPlugin } from './types';
2
+ export declare const videoPlugin: TiptapPlugin;
@@ -0,0 +1,27 @@
1
+ import { Node } from '@tiptap/core';
2
+ export interface VideoAttrs {
3
+ src: string;
4
+ /** 宽度 */
5
+ width: string | null;
6
+ /** 高度 */
7
+ height: string | null;
8
+ /** 是否显示播放控件 */
9
+ controls: boolean;
10
+ /** 是否自动播放 */
11
+ autoplay: boolean;
12
+ /** 是否静音播放 */
13
+ muted: boolean;
14
+ /** 是否循环播放 */
15
+ loop: boolean;
16
+ }
17
+ declare module '@tiptap/core' {
18
+ interface Commands<ReturnType> {
19
+ nativeVideo: {
20
+ setNativeVideo: (options: {
21
+ src: string;
22
+ } & Partial<Omit<VideoAttrs, 'src'>>) => ReturnType;
23
+ };
24
+ }
25
+ }
26
+ /** 原生 <video> 节点,支持 controls / autoplay / muted / loop / width / height */
27
+ export declare const VideoNode: Node<any, any>;
@@ -0,0 +1,5 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ import { UploadFn } from './tiptapProps';
3
+ export declare const uploadImageKey: InjectionKey<UploadFn>;
4
+ export declare const uploadVideoKey: InjectionKey<UploadFn>;
5
+ export declare const editableKey: InjectionKey<Ref<boolean>>;
@@ -0,0 +1,30 @@
1
+ import { TiptapProps } from './tiptapProps';
2
+ type __VLS_Slots = {
3
+ 'word-count'(props: {
4
+ count: number;
5
+ limit: true | number;
6
+ }): unknown;
7
+ };
8
+ declare const modelValue: import('vue').ModelRef<string | undefined, string, string | undefined, string | undefined>;
9
+ type __VLS_Props = TiptapProps;
10
+ type __VLS_ModelProps = {
11
+ 'modelValue'?: typeof modelValue['value'];
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ blur: (value: string) => any;
16
+ change: (value: string) => any;
17
+ "update:modelValue": (value: string | undefined) => any;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ onBlur?: ((value: string) => any) | undefined;
20
+ onChange?: ((value: string) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };