@henryx/pagely 0.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/dist/components/BlockMenu.vue.d.ts +27 -0
- package/dist/components/CodeBlockView.vue.d.ts +95 -0
- package/dist/components/ColAlignBadge.vue.d.ts +15 -0
- package/dist/components/ColorPanel.vue.d.ts +14 -0
- package/dist/components/CommentContentViewer.vue.d.ts +11 -0
- package/dist/components/CommentEditor.vue.d.ts +26 -0
- package/dist/components/DotFlowPadBlockView.vue.d.ts +146 -0
- package/dist/components/EmbedBlockShell.vue.d.ts +46 -0
- package/dist/components/EmbedFullscreenModal.vue.d.ts +29 -0
- package/dist/components/EmbedViewBlock.vue.d.ts +26 -0
- package/dist/components/EmbedViewToolbar.vue.d.ts +24 -0
- package/dist/components/ImageBlockView.vue.d.ts +7 -0
- package/dist/components/ImagePreviewDialog.vue.d.ts +13 -0
- package/dist/components/InsertLinkDialog.vue.d.ts +19 -0
- package/dist/components/InsertMenu.vue.d.ts +27 -0
- package/dist/components/LinkToolbar.vue.d.ts +15 -0
- package/dist/components/MathPopover.vue.d.ts +15 -0
- package/dist/components/MentionNode.vue.d.ts +92 -0
- package/dist/components/MermaidBlockView.vue.d.ts +104 -0
- package/dist/components/PagelyEditor.vue.d.ts +119 -0
- package/dist/components/PagelyViewer.vue.d.ts +15 -0
- package/dist/components/SelectionToolbar.vue.d.ts +23 -0
- package/dist/components/TableActionMenu.vue.d.ts +28 -0
- package/dist/components/TableSizePicker.vue.d.ts +19 -0
- package/dist/components/TableTools.vue.d.ts +45 -0
- package/dist/composables/useBlockButton.d.ts +21 -0
- package/dist/composables/useBlockConvert.d.ts +4 -0
- package/dist/composables/useBlockImageExport.d.ts +4 -0
- package/dist/composables/useBlockMenu.d.ts +19 -0
- package/dist/composables/useBlockOps.d.ts +3 -0
- package/dist/composables/useCodeMirror.d.ts +30 -0
- package/dist/composables/useCommentAnchors.d.ts +60 -0
- package/dist/composables/useCommentEditor.d.ts +24 -0
- package/dist/composables/useEditorCommands.d.ts +22 -0
- package/dist/composables/useEditorEvents.d.ts +22 -0
- package/dist/composables/useEmbedView.d.ts +28 -0
- package/dist/composables/useFileUpload.d.ts +28 -0
- package/dist/composables/useHeadingCollapse.d.ts +19 -0
- package/dist/composables/useHoverMenu.d.ts +7 -0
- package/dist/composables/useInsertButton.d.ts +7 -0
- package/dist/composables/useInsertMenu.d.ts +17 -0
- package/dist/composables/useLinkHover.d.ts +3 -0
- package/dist/composables/useLinkOps.d.ts +32 -0
- package/dist/composables/useMarkdownSync.d.ts +12 -0
- package/dist/composables/useMath.d.ts +38 -0
- package/dist/composables/useMention.d.ts +20 -0
- package/dist/composables/useMenuPosition.d.ts +13 -0
- package/dist/composables/useMenuSidePanel.d.ts +27 -0
- package/dist/composables/useNodeViewCommentAttrs.d.ts +12 -0
- package/dist/composables/usePagelyEditor.d.ts +17 -0
- package/dist/composables/useSelectionToolbar.d.ts +3 -0
- package/dist/composables/useTableCellOps.d.ts +21 -0
- package/dist/composables/useTableDots.d.ts +60 -0
- package/dist/composables/useTableTools.d.ts +72 -0
- package/dist/config/blockMenu/index.d.ts +39 -0
- package/dist/config/blockMenu/items.d.ts +26 -0
- package/dist/config/blockMenu/profiles.d.ts +13 -0
- package/dist/config/blockMenu/sections.d.ts +8 -0
- package/dist/config/blockMenu/tagMapping.d.ts +9 -0
- package/dist/config/blockTypeConfig.d.ts +1 -0
- package/dist/config/extensionProfiles.d.ts +3 -0
- package/dist/config/insertMenu/blockCommands.d.ts +2 -0
- package/dist/config/insertMenu/cellOps.d.ts +22 -0
- package/dist/config/insertMenu/commands.d.ts +16 -0
- package/dist/config/insertMenu/index.d.ts +10 -0
- package/dist/config/insertMenu/items.d.ts +11 -0
- package/dist/config/insertMenu/sections.d.ts +15 -0
- package/dist/config/selectionToolbarConfig.d.ts +25 -0
- package/dist/config/selectionToolbarRules.d.ts +5 -0
- package/dist/extensions/AutoLinkTitle.d.ts +2 -0
- package/dist/extensions/CodeBlockCM.d.ts +7 -0
- package/dist/extensions/CommentBlock.d.ts +3 -0
- package/dist/extensions/CommentMark.d.ts +5 -0
- package/dist/extensions/CommentableTableView.d.ts +7 -0
- package/dist/extensions/DotFlowPadBlock.d.ts +2 -0
- package/dist/extensions/EmbedView.d.ts +12 -0
- package/dist/extensions/Image.d.ts +15 -0
- package/dist/extensions/Mathematics.d.ts +3 -0
- package/dist/extensions/Mention.d.ts +13 -0
- package/dist/extensions/MermaidBlock.d.ts +2 -0
- package/dist/extensions/SlashInsert.d.ts +5 -0
- package/dist/extensions/SmartPaste.d.ts +14 -0
- package/dist/extensions/TableCellEnter.d.ts +2 -0
- package/dist/index.d.ts +41 -0
- package/dist/pagely.cjs +318 -0
- package/dist/pagely.js +24519 -0
- package/dist/stores/linkState.d.ts +21 -0
- package/dist/style.css +1 -0
- package/dist/types/menuCommands.d.ts +42 -0
- package/dist/utils/attachmentUpload.d.ts +15 -0
- package/dist/utils/commentIds.d.ts +1 -0
- package/dist/utils/embedView/attrs.d.ts +19 -0
- package/dist/utils/embedView/detect.d.ts +14 -0
- package/dist/utils/embedView/downgrade.d.ts +1 -0
- package/dist/utils/embedView/markdown.d.ts +6 -0
- package/dist/utils/embedView/metadata.d.ts +8 -0
- package/dist/utils/embedView/pagelyPreview.d.ts +1 -0
- package/dist/utils/embedView/url.d.ts +10 -0
- package/dist/utils/markdown-converter/shared.d.ts +15 -0
- package/dist/utils/markdown-converter/toHtml.d.ts +1 -0
- package/dist/utils/markdown-converter/toMarkdown.d.ts +7 -0
- package/dist/utils/markdown-converter.d.ts +4 -0
- package/dist/utils/paste/context.d.ts +4 -0
- package/dist/utils/paste/escape.d.ts +2 -0
- package/dist/utils/paste/handlers/codeBlock.d.ts +2 -0
- package/dist/utils/paste/handlers/dotFlowPad.d.ts +2 -0
- package/dist/utils/paste/handlers/jsonCode.d.ts +2 -0
- package/dist/utils/paste/handlers/latexBlock.d.ts +2 -0
- package/dist/utils/paste/handlers/markdown.d.ts +2 -0
- package/dist/utils/paste/handlers/mermaid.d.ts +2 -0
- package/dist/utils/paste/handlers/richHtml.d.ts +2 -0
- package/dist/utils/paste/handlers/tsv.d.ts +2 -0
- package/dist/utils/paste/index.d.ts +10 -0
- package/dist/utils/paste/parsers/json.d.ts +5 -0
- package/dist/utils/paste/parsers/tsv.d.ts +5 -0
- package/dist/utils/paste/richHtml.d.ts +1 -0
- package/dist/utils/paste/sanitize.d.ts +1 -0
- package/dist/utils/paste/types.d.ts +12 -0
- package/dist/utils/tableAlign.d.ts +2 -0
- package/package.json +99 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
editor: {
|
|
3
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["editor"]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
node: {
|
|
7
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["node"]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
decorations: {
|
|
11
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
selected: {
|
|
15
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["selected"]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
extension: {
|
|
19
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["extension"]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
getPos: {
|
|
23
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
updateAttributes: {
|
|
27
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
deleteNode: {
|
|
31
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
view: {
|
|
35
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["view"]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
innerDecorations: {
|
|
39
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
HTMLAttributes: {
|
|
43
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
47
|
+
editor: {
|
|
48
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["editor"]>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
node: {
|
|
52
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["node"]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
decorations: {
|
|
56
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
selected: {
|
|
60
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["selected"]>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
extension: {
|
|
64
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["extension"]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
getPos: {
|
|
68
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
|
|
69
|
+
required: true;
|
|
70
|
+
};
|
|
71
|
+
updateAttributes: {
|
|
72
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
deleteNode: {
|
|
76
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
|
|
77
|
+
required: true;
|
|
78
|
+
};
|
|
79
|
+
view: {
|
|
80
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["view"]>;
|
|
81
|
+
required: true;
|
|
82
|
+
};
|
|
83
|
+
innerDecorations: {
|
|
84
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
HTMLAttributes: {
|
|
88
|
+
type: import('vue').PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
|
|
89
|
+
required: true;
|
|
90
|
+
};
|
|
91
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
92
|
+
export default _default;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { NodeViewProps } from '@tiptap/vue-3';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
3
|
+
shellRef: ({
|
|
4
|
+
$: import('vue').ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: {
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly fullscreen?: boolean | undefined;
|
|
9
|
+
readonly beforeCloseFullscreen?: (() => void | Promise<void>) | undefined;
|
|
10
|
+
readonly canCopySource?: boolean | undefined;
|
|
11
|
+
readonly canCopyImage?: boolean | undefined;
|
|
12
|
+
readonly canFullscreen?: boolean | undefined;
|
|
13
|
+
readonly fullscreenCloseLabel?: string | undefined;
|
|
14
|
+
readonly "onUpdate:fullscreen"?: ((fullscreen: boolean) => any) | undefined;
|
|
15
|
+
readonly "onCopy-source"?: (() => any) | undefined;
|
|
16
|
+
readonly "onCopy-image"?: (() => any) | undefined;
|
|
17
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
18
|
+
$attrs: import('vue').Attrs;
|
|
19
|
+
$refs: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
$slots: Readonly<{
|
|
23
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
26
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
27
|
+
$host: Element | null;
|
|
28
|
+
$emit: ((event: "update:fullscreen", fullscreen: boolean) => void) & ((event: "copy-source") => void) & ((event: "copy-image") => void);
|
|
29
|
+
$el: HTMLDivElement;
|
|
30
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
31
|
+
label: string;
|
|
32
|
+
fullscreen?: boolean;
|
|
33
|
+
beforeCloseFullscreen?: () => void | Promise<void>;
|
|
34
|
+
canCopySource?: boolean;
|
|
35
|
+
canCopyImage?: boolean;
|
|
36
|
+
canFullscreen?: boolean;
|
|
37
|
+
fullscreenCloseLabel?: string;
|
|
38
|
+
}> & Readonly<{
|
|
39
|
+
"onUpdate:fullscreen"?: ((fullscreen: boolean) => any) | undefined;
|
|
40
|
+
"onCopy-source"?: (() => any) | undefined;
|
|
41
|
+
"onCopy-image"?: (() => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
showCopyTip: (kind: "source" | "image") => void;
|
|
44
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
+
"update:fullscreen": (fullscreen: boolean) => any;
|
|
46
|
+
"copy-source": () => any;
|
|
47
|
+
"copy-image": () => any;
|
|
48
|
+
}, string, {
|
|
49
|
+
fullscreen: boolean;
|
|
50
|
+
canCopySource: boolean;
|
|
51
|
+
canCopyImage: boolean;
|
|
52
|
+
canFullscreen: boolean;
|
|
53
|
+
fullscreenCloseLabel: string;
|
|
54
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
55
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
56
|
+
created?: (() => void) | (() => void)[];
|
|
57
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
58
|
+
mounted?: (() => void) | (() => void)[];
|
|
59
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
60
|
+
updated?: (() => void) | (() => void)[];
|
|
61
|
+
activated?: (() => void) | (() => void)[];
|
|
62
|
+
deactivated?: (() => void) | (() => void)[];
|
|
63
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
64
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
65
|
+
destroyed?: (() => void) | (() => void)[];
|
|
66
|
+
unmounted?: (() => void) | (() => void)[];
|
|
67
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
68
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
69
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
70
|
+
};
|
|
71
|
+
$forceUpdate: () => void;
|
|
72
|
+
$nextTick: typeof import('vue').nextTick;
|
|
73
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
74
|
+
} & Readonly<{
|
|
75
|
+
fullscreen: boolean;
|
|
76
|
+
canCopySource: boolean;
|
|
77
|
+
canCopyImage: boolean;
|
|
78
|
+
canFullscreen: boolean;
|
|
79
|
+
fullscreenCloseLabel: string;
|
|
80
|
+
}> & Omit<Readonly<{
|
|
81
|
+
label: string;
|
|
82
|
+
fullscreen?: boolean;
|
|
83
|
+
beforeCloseFullscreen?: () => void | Promise<void>;
|
|
84
|
+
canCopySource?: boolean;
|
|
85
|
+
canCopyImage?: boolean;
|
|
86
|
+
canFullscreen?: boolean;
|
|
87
|
+
fullscreenCloseLabel?: string;
|
|
88
|
+
}> & Readonly<{
|
|
89
|
+
"onUpdate:fullscreen"?: ((fullscreen: boolean) => any) | undefined;
|
|
90
|
+
"onCopy-source"?: (() => any) | undefined;
|
|
91
|
+
"onCopy-image"?: (() => any) | undefined;
|
|
92
|
+
}>, "showCopyTip" | ("fullscreen" | "canCopySource" | "canCopyImage" | "canFullscreen" | "fullscreenCloseLabel")> & import('vue').ShallowUnwrapRef<{
|
|
93
|
+
showCopyTip: (kind: "source" | "image") => void;
|
|
94
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
95
|
+
$slots: {
|
|
96
|
+
'toolbar-before-actions'?(_: {}): any;
|
|
97
|
+
'toolbar-extra'?(_: {}): any;
|
|
98
|
+
inline?(_: {}): any;
|
|
99
|
+
fullscreen?(_: {}): any;
|
|
100
|
+
};
|
|
101
|
+
}) | null;
|
|
102
|
+
previewWrap: HTMLDivElement;
|
|
103
|
+
}, any>;
|
|
104
|
+
export default _default;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
import { AnchorSpec, CommentAnchor, CommentClickPayload, CommentCreateSpec, CommentHoverPayload } from '../composables/useCommentAnchors';
|
|
3
|
+
import { MentionAnchor, MentionTriggerPayload } from '../composables/useMention';
|
|
4
|
+
import { MentionAttrs } from '../extensions/Mention';
|
|
5
|
+
import { FileUploadHandler } from '../composables/useFileUpload';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
initialContent?: string;
|
|
8
|
+
fileUploadHandler?: FileUploadHandler;
|
|
9
|
+
enableComment?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
12
|
+
getHtml: () => string;
|
|
13
|
+
getMarkdown: () => string;
|
|
14
|
+
setMarkdown: (md: string) => void;
|
|
15
|
+
setHtml: (html: string) => void;
|
|
16
|
+
getEditor: () => Editor | undefined;
|
|
17
|
+
getCommentAnchors: () => CommentAnchor[];
|
|
18
|
+
applyCommentAnchors: (anchors: CommentAnchor[]) => boolean;
|
|
19
|
+
addComment: (commentId: string, spec: AnchorSpec) => boolean;
|
|
20
|
+
removeCommentAnchor: (commentId: string) => boolean;
|
|
21
|
+
getMentions: () => MentionAnchor[];
|
|
22
|
+
applyMentions: (mentions: MentionAnchor[]) => boolean;
|
|
23
|
+
insertMention: (attrs: MentionAttrs) => boolean;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
"update:markdown": (md: string) => any;
|
|
26
|
+
"update:html": (html: string) => any;
|
|
27
|
+
"comment:create": (spec: CommentCreateSpec) => any;
|
|
28
|
+
"comment:click": (payload: CommentClickPayload) => any;
|
|
29
|
+
"comment:hover": (payload: CommentHoverPayload | null) => any;
|
|
30
|
+
"comment:orphaned": (payload: {
|
|
31
|
+
commentId: string;
|
|
32
|
+
}) => any;
|
|
33
|
+
"comment:anchor-drift": (payload: {
|
|
34
|
+
commentId: string;
|
|
35
|
+
}) => any;
|
|
36
|
+
"anchors-changed": (anchors: CommentAnchor[]) => any;
|
|
37
|
+
"mention:trigger": (payload: MentionTriggerPayload) => any;
|
|
38
|
+
"mention:cancel": () => any;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
|
+
"onUpdate:markdown"?: ((md: string) => any) | undefined;
|
|
41
|
+
"onUpdate:html"?: ((html: string) => any) | undefined;
|
|
42
|
+
"onComment:create"?: ((spec: CommentCreateSpec) => any) | undefined;
|
|
43
|
+
"onComment:click"?: ((payload: CommentClickPayload) => any) | undefined;
|
|
44
|
+
"onComment:hover"?: ((payload: CommentHoverPayload | null) => any) | undefined;
|
|
45
|
+
"onComment:orphaned"?: ((payload: {
|
|
46
|
+
commentId: string;
|
|
47
|
+
}) => any) | undefined;
|
|
48
|
+
"onComment:anchor-drift"?: ((payload: {
|
|
49
|
+
commentId: string;
|
|
50
|
+
}) => any) | undefined;
|
|
51
|
+
"onAnchors-changed"?: ((anchors: CommentAnchor[]) => any) | undefined;
|
|
52
|
+
"onMention:trigger"?: ((payload: MentionTriggerPayload) => any) | undefined;
|
|
53
|
+
"onMention:cancel"?: (() => any) | undefined;
|
|
54
|
+
}>, {
|
|
55
|
+
enableComment: boolean;
|
|
56
|
+
initialContent: string;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
58
|
+
wrapRef: HTMLDivElement;
|
|
59
|
+
insertBtnRef: HTMLButtonElement;
|
|
60
|
+
pillRef: HTMLDivElement;
|
|
61
|
+
linkToolbarRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
62
|
+
editor: Editor | undefined;
|
|
63
|
+
}> & Readonly<{}>, {
|
|
64
|
+
show: (url: string, text: string, anchorRect: DOMRect) => void;
|
|
65
|
+
hide: (immediate?: boolean) => void;
|
|
66
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
67
|
+
toolbarEl: HTMLDivElement;
|
|
68
|
+
viewWrapEl: HTMLDivElement;
|
|
69
|
+
editInputEl: HTMLInputElement;
|
|
70
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
71
|
+
P: {};
|
|
72
|
+
B: {};
|
|
73
|
+
D: {};
|
|
74
|
+
C: {};
|
|
75
|
+
M: {};
|
|
76
|
+
Defaults: {};
|
|
77
|
+
}, Readonly<{
|
|
78
|
+
editor: Editor | undefined;
|
|
79
|
+
}> & Readonly<{}>, {
|
|
80
|
+
show: (url: string, text: string, anchorRect: DOMRect) => void;
|
|
81
|
+
hide: (immediate?: boolean) => void;
|
|
82
|
+
}, {}, {}, {}, {}> | null;
|
|
83
|
+
selToolbarRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
84
|
+
editor: Editor | undefined;
|
|
85
|
+
enableComment?: boolean;
|
|
86
|
+
}> & Readonly<{
|
|
87
|
+
onComment?: (() => any) | undefined;
|
|
88
|
+
}>, {
|
|
89
|
+
show: (rect: DOMRect) => void;
|
|
90
|
+
hide: () => void;
|
|
91
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
92
|
+
comment: () => any;
|
|
93
|
+
}, import('vue').PublicProps, {
|
|
94
|
+
enableComment: boolean;
|
|
95
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
96
|
+
toolbarEl: HTMLDivElement;
|
|
97
|
+
linkInputEl: HTMLInputElement;
|
|
98
|
+
typeWrapEl: HTMLDivElement;
|
|
99
|
+
colorWrapEl: HTMLDivElement;
|
|
100
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
101
|
+
P: {};
|
|
102
|
+
B: {};
|
|
103
|
+
D: {};
|
|
104
|
+
C: {};
|
|
105
|
+
M: {};
|
|
106
|
+
Defaults: {};
|
|
107
|
+
}, Readonly<{
|
|
108
|
+
editor: Editor | undefined;
|
|
109
|
+
enableComment?: boolean;
|
|
110
|
+
}> & Readonly<{
|
|
111
|
+
onComment?: (() => any) | undefined;
|
|
112
|
+
}>, {
|
|
113
|
+
show: (rect: DOMRect) => void;
|
|
114
|
+
hide: () => void;
|
|
115
|
+
}, {}, {}, {}, {
|
|
116
|
+
enableComment: boolean;
|
|
117
|
+
}> | null;
|
|
118
|
+
}, HTMLDivElement>;
|
|
119
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
type ViewerFormat = 'html' | 'markdown';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
content: string;
|
|
5
|
+
format?: ViewerFormat;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
8
|
+
getHtml: () => string;
|
|
9
|
+
getMarkdown: () => string;
|
|
10
|
+
setContent: (content: string, format?: ViewerFormat) => void;
|
|
11
|
+
getEditor: () => Editor | undefined;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
format: ViewerFormat;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
editor: Editor | undefined;
|
|
4
|
+
enableComment?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function show(rect: DOMRect): void;
|
|
7
|
+
declare function hide(): void;
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
9
|
+
show: typeof show;
|
|
10
|
+
hide: typeof hide;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
comment: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onComment?: (() => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
enableComment: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
|
+
toolbarEl: HTMLDivElement;
|
|
19
|
+
linkInputEl: HTMLInputElement;
|
|
20
|
+
typeWrapEl: HTMLDivElement;
|
|
21
|
+
colorWrapEl: HTMLDivElement;
|
|
22
|
+
}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
tableBounds: {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
hasHeaderRow: boolean;
|
|
9
|
+
hasHeaderCol: boolean;
|
|
10
|
+
keepAlive: () => void;
|
|
11
|
+
scheduleHide: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
deleteTable: () => any;
|
|
15
|
+
toggleHeaderRow: () => any;
|
|
16
|
+
copyTable: () => any;
|
|
17
|
+
cutTable: () => any;
|
|
18
|
+
comment: (rect: DOMRect | null) => any;
|
|
19
|
+
toggleHeaderCol: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onDeleteTable?: (() => any) | undefined;
|
|
22
|
+
onToggleHeaderRow?: (() => any) | undefined;
|
|
23
|
+
onCopyTable?: (() => any) | undefined;
|
|
24
|
+
onCutTable?: (() => any) | undefined;
|
|
25
|
+
onComment?: ((rect: DOMRect | null) => any) | undefined;
|
|
26
|
+
onToggleHeaderCol?: (() => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
maxRows?: number;
|
|
3
|
+
maxCols?: number;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
pick: (payload: {
|
|
7
|
+
rows: number;
|
|
8
|
+
cols: number;
|
|
9
|
+
}) => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onPick?: ((payload: {
|
|
12
|
+
rows: number;
|
|
13
|
+
cols: number;
|
|
14
|
+
}) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
maxRows: number;
|
|
17
|
+
maxCols: number;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { InsertDot, ColAlignDot, CellBounds } from '../composables/useTableTools';
|
|
2
|
+
import { CellOpKind, InsertItemId } from '../config/insertMenu';
|
|
3
|
+
import { TableAlign } from '../utils/tableAlign';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
tableVisible: boolean;
|
|
6
|
+
tableBounds: {
|
|
7
|
+
top: number;
|
|
8
|
+
left: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
rowDots: InsertDot[];
|
|
13
|
+
colDots: InsertDot[];
|
|
14
|
+
colAlignDots: ColAlignDot[];
|
|
15
|
+
hoveredCellBounds: CellBounds | null;
|
|
16
|
+
hasHeaderRow: boolean;
|
|
17
|
+
hasHeaderCol: boolean;
|
|
18
|
+
keepAlive: () => void;
|
|
19
|
+
scheduleHide: () => void;
|
|
20
|
+
insertRowAt: (index: number) => void;
|
|
21
|
+
insertColAt: (index: number) => void;
|
|
22
|
+
setColumnAlign: (align: TableAlign, colIndex?: number) => void;
|
|
23
|
+
};
|
|
24
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
deleteTable: () => any;
|
|
26
|
+
toggleHeaderRow: () => any;
|
|
27
|
+
copyTable: () => any;
|
|
28
|
+
cutTable: () => any;
|
|
29
|
+
comment: (rect: DOMRect | null) => any;
|
|
30
|
+
toggleHeaderCol: () => any;
|
|
31
|
+
cellOp: (kind: CellOpKind) => any;
|
|
32
|
+
cellInsert: (id: InsertItemId) => any;
|
|
33
|
+
cellComment: (rect: DOMRect | null) => any;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
|
+
onDeleteTable?: (() => any) | undefined;
|
|
36
|
+
onToggleHeaderRow?: (() => any) | undefined;
|
|
37
|
+
onCopyTable?: (() => any) | undefined;
|
|
38
|
+
onCutTable?: (() => any) | undefined;
|
|
39
|
+
onComment?: ((rect: DOMRect | null) => any) | undefined;
|
|
40
|
+
onToggleHeaderCol?: (() => any) | undefined;
|
|
41
|
+
onCellOp?: ((kind: CellOpKind) => any) | undefined;
|
|
42
|
+
onCellInsert?: ((id: InsertItemId) => any) | undefined;
|
|
43
|
+
onCellComment?: ((rect: DOMRect | null) => any) | undefined;
|
|
44
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
export interface BlockInfo {
|
|
4
|
+
tag: string;
|
|
5
|
+
label: string;
|
|
6
|
+
currentTypeIds: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function useBlockButton(editorRef: Ref<HTMLElement | null>, _editor: Ref<Editor | undefined>): {
|
|
9
|
+
overlayVisible: Ref<boolean, boolean>;
|
|
10
|
+
overlayStyle: Record<string, string>;
|
|
11
|
+
blockInfo: {
|
|
12
|
+
tag: string;
|
|
13
|
+
label: string;
|
|
14
|
+
currentTypeIds: string[];
|
|
15
|
+
};
|
|
16
|
+
onMouseMove: (e: MouseEvent) => void;
|
|
17
|
+
onMouseLeave: () => void;
|
|
18
|
+
getCurrentBlockEl: () => Element | null;
|
|
19
|
+
getCurrentBlockPMPos: () => number | null;
|
|
20
|
+
getCurrentBlockRootPMPos: () => number | null;
|
|
21
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MenuChain } from '../types/menuCommands';
|
|
2
|
+
export type BlockConvertId = 'text' | 'blockquote' | 'pre' | 'listItem' | 'taskItem';
|
|
3
|
+
export declare function applyTextConvert(chain: MenuChain, id: string): void;
|
|
4
|
+
export declare const BLOCK_CONVERTS: Record<BlockConvertId, (chain: MenuChain, id: string) => void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
import { MenuPlacement } from './useMenuPosition';
|
|
4
|
+
export declare function useBlockMenu(editor: Ref<Editor | undefined>, getCurrentBlockPMPos: () => number | null, getAnchorRect: () => DOMRect | null, getCurrentBlockTag: () => string, beforeOpen: () => void): {
|
|
5
|
+
visible: Ref<boolean, boolean>;
|
|
6
|
+
top: Ref<number, number>;
|
|
7
|
+
left: Ref<number, number>;
|
|
8
|
+
placement: Ref<MenuPlacement, MenuPlacement>;
|
|
9
|
+
targetPos: Ref<number | null, number | null>;
|
|
10
|
+
sourceTag: Ref<string, string>;
|
|
11
|
+
open: () => void;
|
|
12
|
+
close: () => void;
|
|
13
|
+
focusTarget: () => void;
|
|
14
|
+
onPillEnter: () => void;
|
|
15
|
+
onPillLeave: (event?: MouseEvent) => void;
|
|
16
|
+
onMenuEnter: () => void;
|
|
17
|
+
onMenuLeave: () => void;
|
|
18
|
+
clearHideTimer: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { EditorView } from '@codemirror/view';
|
|
3
|
+
export interface UseCodeMirrorOptions {
|
|
4
|
+
container: Ref<HTMLElement | null>;
|
|
5
|
+
initialContent: string;
|
|
6
|
+
initialLanguage: string;
|
|
7
|
+
wordWrap: Ref<boolean>;
|
|
8
|
+
readOnly?: Ref<boolean>;
|
|
9
|
+
onContentChange: (content: string) => void;
|
|
10
|
+
onSelectionChange?: (selection: CodeMirrorSelectionPayload | null) => void;
|
|
11
|
+
commentRanges?: Ref<CodeMirrorCommentRange[]>;
|
|
12
|
+
}
|
|
13
|
+
export interface CodeMirrorSelectionPayload {
|
|
14
|
+
from: number;
|
|
15
|
+
to: number;
|
|
16
|
+
rect: DOMRect;
|
|
17
|
+
}
|
|
18
|
+
export interface CodeMirrorCommentRange {
|
|
19
|
+
from: number;
|
|
20
|
+
to: number;
|
|
21
|
+
commentIds: string[];
|
|
22
|
+
}
|
|
23
|
+
export declare function useCodeMirror(options: UseCodeMirrorOptions): {
|
|
24
|
+
initCM: (content: string, langId: string) => Promise<void>;
|
|
25
|
+
syncFromPM: (content: string) => void;
|
|
26
|
+
switchLanguage: (langId: string) => Promise<void>;
|
|
27
|
+
setWordWrap: (enabled: boolean) => void;
|
|
28
|
+
getCMView: () => EditorView | null;
|
|
29
|
+
destroy: () => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
export interface CommentRange {
|
|
4
|
+
from: number;
|
|
5
|
+
to: number;
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CommentAnchor {
|
|
9
|
+
id: string;
|
|
10
|
+
kind: 'inline' | 'block';
|
|
11
|
+
ranges?: CommentRange[];
|
|
12
|
+
nodePos?: number;
|
|
13
|
+
nodeType?: string;
|
|
14
|
+
text?: string;
|
|
15
|
+
fullText?: string;
|
|
16
|
+
}
|
|
17
|
+
export type AnchorSpec = {
|
|
18
|
+
kind: 'inline';
|
|
19
|
+
from: number;
|
|
20
|
+
to: number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'block';
|
|
23
|
+
nodePos: number;
|
|
24
|
+
};
|
|
25
|
+
export interface CommentCreateSpec {
|
|
26
|
+
kind: 'inline' | 'block';
|
|
27
|
+
from?: number;
|
|
28
|
+
to?: number;
|
|
29
|
+
nodePos?: number;
|
|
30
|
+
rect: DOMRect;
|
|
31
|
+
}
|
|
32
|
+
export interface CommentClickPayload {
|
|
33
|
+
commentIds: string[];
|
|
34
|
+
rect: DOMRect;
|
|
35
|
+
}
|
|
36
|
+
export interface CommentHoverPayload {
|
|
37
|
+
commentIds: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface UseCommentAnchorsOptions {
|
|
40
|
+
enabled?: Ref<boolean> | boolean;
|
|
41
|
+
onCreate?: (spec: CommentCreateSpec) => void;
|
|
42
|
+
onClick?: (payload: CommentClickPayload) => void;
|
|
43
|
+
onHover?: (payload: CommentHoverPayload | null) => void;
|
|
44
|
+
onOrphaned?: (payload: {
|
|
45
|
+
commentId: string;
|
|
46
|
+
}) => void;
|
|
47
|
+
onAnchorDrift?: (payload: {
|
|
48
|
+
commentId: string;
|
|
49
|
+
}) => void;
|
|
50
|
+
onAnchorsChanged?: (anchors: CommentAnchor[]) => void;
|
|
51
|
+
}
|
|
52
|
+
export declare function collectCommentAnchors(editor: Editor): CommentAnchor[];
|
|
53
|
+
export declare function useCommentAnchors(editorRef: Ref<Editor | undefined>, options?: UseCommentAnchorsOptions): {
|
|
54
|
+
getCommentAnchors: () => CommentAnchor[];
|
|
55
|
+
applyCommentAnchors: (anchors: CommentAnchor[]) => boolean;
|
|
56
|
+
addComment: (commentId: string, spec: AnchorSpec) => boolean;
|
|
57
|
+
removeCommentAnchor: (commentId: string) => boolean;
|
|
58
|
+
requestInlineComment: (rect?: DOMRect) => boolean;
|
|
59
|
+
requestBlockComment: (nodePos: number, rect?: DOMRect) => boolean;
|
|
60
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Content, JSONContent } from '@tiptap/core';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
import { MentionTriggerPayload } from './useMention';
|
|
4
|
+
import { MentionAttrs } from '../extensions/Mention';
|
|
5
|
+
export interface UseCommentEditorOptions {
|
|
6
|
+
initialContent?: Content;
|
|
7
|
+
editable?: boolean;
|
|
8
|
+
onSubmit?: (content: JSONContent) => void;
|
|
9
|
+
onMentionTrigger?: (payload: MentionTriggerPayload) => void;
|
|
10
|
+
onMentionCancel?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function useCommentEditor(options?: UseCommentEditorOptions): {
|
|
13
|
+
editor: import('vue').ShallowRef<Editor | undefined, Editor | undefined>;
|
|
14
|
+
isEmpty: import('vue').Ref<boolean, boolean>;
|
|
15
|
+
getContent: () => JSONContent;
|
|
16
|
+
setContent: (content: Content) => void;
|
|
17
|
+
clear: () => void;
|
|
18
|
+
focus: (position?: "start" | "end") => void;
|
|
19
|
+
submit: () => void;
|
|
20
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
21
|
+
insertMention: (attrs: MentionAttrs) => boolean;
|
|
22
|
+
getMentions: () => import('./useMention').MentionAnchor[];
|
|
23
|
+
applyMentions: (mentions: import('./useMention').MentionAnchor[]) => boolean;
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Editor } from '@tiptap/vue-3';
|
|
3
|
+
import { CellOpKind, InsertCtx, InsertItemId } from '../config/insertMenu';
|
|
4
|
+
export interface UseEditorCommandsOptions {
|
|
5
|
+
editor: Ref<Editor | undefined>;
|
|
6
|
+
insertTargetPos: Ref<number | null>;
|
|
7
|
+
blockTargetPos: Ref<number | null>;
|
|
8
|
+
blockSourceTag: Ref<string>;
|
|
9
|
+
focusBlockTarget: () => void;
|
|
10
|
+
focusHoveredCell: () => void;
|
|
11
|
+
cellOps: Record<CellOpKind, () => void>;
|
|
12
|
+
closeInsertMenu: () => void;
|
|
13
|
+
closeBlockMenu: () => void;
|
|
14
|
+
openMathPopoverForInsert: (insertPos: number, rect?: DOMRect | null, kind?: 'inline' | 'block') => void;
|
|
15
|
+
getMathRectAtPos: (pos: number) => DOMRect | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function useEditorCommands(options: UseEditorCommandsOptions): {
|
|
18
|
+
onInsert: (id: InsertItemId, ctx?: InsertCtx) => void;
|
|
19
|
+
onCellInsert: (id: InsertItemId) => void;
|
|
20
|
+
onCellOp: (kind: CellOpKind) => void;
|
|
21
|
+
onConvert: (id: string) => void;
|
|
22
|
+
};
|