@blocknote/core 0.53.0 → 0.54.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/BlockNoteExtension-BJCLnwrE.cjs +2 -0
- package/dist/BlockNoteExtension-BJCLnwrE.cjs.map +1 -0
- package/dist/BlockNoteExtension-CbvDA0F7.js +80 -0
- package/dist/BlockNoteExtension-CbvDA0F7.js.map +1 -0
- package/dist/{UserStore-QbbPFj0z.js → UserStore-C4TzkGEn.js} +3 -3
- package/dist/{UserStore-DCG6lsla.cjs.map → UserStore-C4TzkGEn.js.map} +1 -1
- package/dist/{UserStore-DCG6lsla.cjs → UserStore-mj3fXW4D.cjs} +2 -2
- package/dist/UserStore-mj3fXW4D.cjs.map +1 -0
- package/dist/blocknote.cjs +1 -1
- package/dist/blocknote.js +6 -6
- package/dist/{blocks-BEJW9OM_.js → blocks-CzQLehlc.js} +571 -568
- package/dist/blocks-CzQLehlc.js.map +1 -0
- package/dist/blocks-CzkqclGj.cjs +12 -0
- package/dist/blocks-CzkqclGj.cjs.map +1 -0
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.js +2 -2
- package/dist/comments.cjs +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js +7 -7
- package/dist/comments.js.map +1 -1
- package/dist/en-BuzSuuTq.cjs +2 -0
- package/dist/en-BuzSuuTq.cjs.map +1 -0
- package/dist/{en-CGKXfWma.js → en-uzHzj6eH.js} +10 -1
- package/dist/en-uzHzj6eH.js.map +1 -0
- package/dist/extensions-CSB9ZvuL.cjs +58 -0
- package/dist/extensions-CSB9ZvuL.cjs.map +1 -0
- package/dist/{extensions-BR5hkAio.js → extensions-DGuhtOgB.js} +662 -427
- package/dist/extensions-DGuhtOgB.js.map +1 -0
- package/dist/extensions.cjs +1 -1
- package/dist/extensions.js +4 -4
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +199 -1
- package/dist/locales.js.map +1 -1
- package/dist/{src-BUXut68d.js → src-BkfZVfaO.js} +967 -899
- package/dist/src-BkfZVfaO.js.map +1 -0
- package/dist/src-DM3syMdf.cjs +23 -0
- package/dist/src-DM3syMdf.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/dist/y.cjs +1 -1
- package/dist/y.cjs.map +1 -1
- package/dist/y.js +59 -56
- package/dist/y.js.map +1 -1
- package/dist/yjs.cjs +1 -1
- package/dist/yjs.cjs.map +1 -1
- package/dist/yjs.js +88 -76
- package/dist/yjs.js.map +1 -1
- package/package.json +17 -18
- package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +2505 -763
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +42 -0
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +16 -4
- package/src/api/exporters/markdown/htmlToMarkdown.ts +45 -10
- package/src/api/nodeConversions/blockToNode.ts +5 -1
- package/src/api/nodeConversions/nodeToBlock.ts +3 -0
- package/src/api/pmUtil.ts +16 -8
- package/src/blocks/Code/CodeBlockOptions.ts +83 -0
- package/src/blocks/Code/block.test.ts +1 -1
- package/src/blocks/Code/block.ts +29 -281
- package/src/blocks/Code/helpers/extensions/CodeKeyboardShortcutsExtension.ts +120 -0
- package/src/blocks/Code/helpers/parse/parsePreCode.ts +45 -0
- package/src/blocks/Code/helpers/render/createCodeBlock.ts +98 -0
- package/src/blocks/Code/helpers/toExternalHTML/createPreCode.ts +14 -0
- package/src/blocks/index.ts +3 -0
- package/src/comments/extension.ts +2 -4
- package/src/editor/Block.css +273 -2
- package/src/editor/BlockNoteEditor.ts +25 -4
- package/src/editor/BlockNoteExtension.ts +1 -1
- package/src/editor/managers/ExtensionManager/extensions.ts +6 -0
- package/src/exporter/ExportImage.ts +50 -0
- package/src/exporter/Exporter.test.ts +48 -0
- package/src/exporter/Exporter.ts +46 -12
- package/src/exporter/index.ts +1 -0
- package/src/exporter/mapping.ts +4 -1
- package/src/extensions/FormattingToolbar/FormattingToolbar.ts +10 -8
- package/src/extensions/InlineContentBoundaryEdit/InlineContentBoundaryEdit.ts +109 -0
- package/src/extensions/SourceBlockWithPreview/SourceBlockWithPreview.ts +192 -0
- package/src/extensions/SourceInlineContentWithPreview/SourceInlineContentWithPreview.ts +142 -0
- package/src/extensions/SyntaxHighlighting/SyntaxHighlighting.test.ts +120 -0
- package/src/extensions/SyntaxHighlighting/SyntaxHighlighting.ts +89 -0
- package/src/extensions/SyntaxHighlighting/inlineHighlight.test.ts +135 -0
- package/src/extensions/SyntaxHighlighting/shiki.ts +116 -0
- package/src/extensions/Versioning/inMemoryVersioning.ts +13 -3
- package/src/extensions/index.ts +4 -0
- package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.test.ts +51 -2
- package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +22 -2
- package/src/i18n/locales/ar.ts +9 -0
- package/src/i18n/locales/de.ts +9 -0
- package/src/i18n/locales/en.ts +9 -0
- package/src/i18n/locales/es.ts +9 -0
- package/src/i18n/locales/fa.ts +9 -0
- package/src/i18n/locales/fr.ts +9 -0
- package/src/i18n/locales/he.ts +9 -0
- package/src/i18n/locales/hr.ts +9 -0
- package/src/i18n/locales/is.ts +9 -0
- package/src/i18n/locales/it.ts +9 -0
- package/src/i18n/locales/ja.ts +9 -0
- package/src/i18n/locales/ko.ts +9 -0
- package/src/i18n/locales/nl.ts +9 -0
- package/src/i18n/locales/no.ts +9 -0
- package/src/i18n/locales/pl.ts +9 -0
- package/src/i18n/locales/pt.ts +9 -0
- package/src/i18n/locales/ru.ts +9 -0
- package/src/i18n/locales/sk.ts +9 -0
- package/src/i18n/locales/uk.ts +9 -0
- package/src/i18n/locales/uz.ts +9 -0
- package/src/i18n/locales/vi.ts +9 -0
- package/src/i18n/locales/zh-tw.ts +9 -0
- package/src/i18n/locales/zh.ts +9 -0
- package/src/index.ts +5 -1
- package/src/schema/blocks/createSpec.ts +2 -3
- package/src/schema/blocks/types.ts +53 -3
- package/src/schema/contentTypePropagation.test.ts +1 -1
- package/src/schema/inlineContent/createSpec.test.ts +161 -0
- package/src/schema/inlineContent/createSpec.ts +171 -12
- package/src/schema/inlineContent/internal.ts +21 -2
- package/src/schema/inlineContent/types.ts +35 -5
- package/src/user/UserStore.ts +1 -1
- package/src/util/Store.test.ts +132 -0
- package/src/util/Store.ts +135 -0
- package/src/y/extensions/AttributionExtension.test.ts +10 -0
- package/src/y/extensions/Versioning.test.ts +20 -7
- package/src/yjs/comments/RESTYjsThreadStore.test.ts +85 -0
- package/src/yjs/comments/RESTYjsThreadStore.ts +7 -1
- package/src/yjs/extensions/ForkYDoc.test.ts +37 -0
- package/src/yjs/extensions/ForkYDoc.ts +26 -1
- package/src/yjs/extensions/RelativePositionMapping.ts +8 -2
- package/src/yjs/extensions/Versioning.test.ts +17 -5
- package/types/src/api/pmUtil.d.ts +7 -7
- package/types/src/blocks/Code/CodeBlockOptions.d.ts +61 -0
- package/types/src/blocks/Code/block.d.ts +3 -53
- package/types/src/blocks/Code/helpers/extensions/CodeKeyboardShortcutsExtension.d.ts +35 -0
- package/types/src/blocks/Code/helpers/parse/parsePreCode.d.ts +8 -0
- package/types/src/blocks/Code/helpers/render/createCodeBlock.d.ts +18 -0
- package/types/src/blocks/Code/helpers/toExternalHTML/createPreCode.d.ts +5 -0
- package/types/src/blocks/index.d.ts +3 -0
- package/types/src/comments/extension.d.ts +1 -15
- package/types/src/editor/BlockNoteEditor.d.ts +3 -3
- package/types/src/editor/BlockNoteExtension.d.ts +1 -1
- package/types/src/exporter/ExportImage.d.ts +36 -0
- package/types/src/exporter/Exporter.d.ts +21 -0
- package/types/src/exporter/Exporter.test.d.ts +1 -0
- package/types/src/exporter/index.d.ts +1 -0
- package/types/src/exporter/mapping.d.ts +1 -1
- package/types/src/extensions/FilePanel/FilePanel.d.ts +1 -1
- package/types/src/extensions/FormattingToolbar/FormattingToolbar.d.ts +1 -1
- package/types/src/extensions/InlineContentBoundaryEdit/InlineContentBoundaryEdit.d.ts +5 -0
- package/types/src/extensions/ShowSelection/ShowSelection.d.ts +1 -5
- package/types/src/extensions/SideMenu/SideMenu.d.ts +1 -1
- package/types/src/extensions/SourceBlockWithPreview/SourceBlockWithPreview.d.ts +45 -0
- package/types/src/extensions/SourceInlineContentWithPreview/SourceInlineContentWithPreview.d.ts +49 -0
- package/types/src/extensions/SuggestionMenu/SuggestionMenu.d.ts +1 -11
- package/types/src/extensions/SyntaxHighlighting/SyntaxHighlighting.d.ts +44 -0
- package/types/src/extensions/SyntaxHighlighting/SyntaxHighlighting.test.d.ts +1 -0
- package/types/src/extensions/SyntaxHighlighting/inlineHighlight.test.d.ts +1 -0
- package/types/src/extensions/SyntaxHighlighting/shiki.d.ts +13 -0
- package/types/src/extensions/TableHandles/TableHandles.d.ts +1 -1
- package/types/src/extensions/Versioning/Versioning.d.ts +1 -35
- package/types/src/extensions/index.d.ts +4 -0
- package/types/src/i18n/locales/en.d.ts +9 -0
- package/types/src/i18n/locales/fa.d.ts +9 -0
- package/types/src/i18n/locales/sk.d.ts +9 -0
- package/types/src/index.d.ts +2 -1
- package/types/src/schema/blocks/types.d.ts +36 -3
- package/types/src/schema/inlineContent/createSpec.d.ts +35 -3
- package/types/src/schema/inlineContent/createSpec.test.d.ts +1 -0
- package/types/src/schema/inlineContent/internal.d.ts +3 -2
- package/types/src/schema/inlineContent/types.d.ts +22 -3
- package/types/src/user/UserStore.d.ts +1 -1
- package/types/src/util/Store.d.ts +45 -0
- package/types/src/util/Store.test.d.ts +1 -0
- package/types/src/y/extensions/AttributionExtension.d.ts +1 -1
- package/types/src/y/extensions/DiffVersioningExtension.d.ts +1 -1
- package/types/src/y/extensions/ForkYDoc.d.ts +1 -5
- package/types/src/y/extensions/index.d.ts +2 -10
- package/types/src/yjs/comments/RESTYjsThreadStore.test.d.ts +1 -0
- package/types/src/yjs/extensions/ForkYDoc.d.ts +1 -5
- package/types/src/yjs/extensions/index.d.ts +1 -5
- package/dist/BlockNoteExtension-B_IEJHS8.js +0 -38
- package/dist/BlockNoteExtension-B_IEJHS8.js.map +0 -1
- package/dist/BlockNoteExtension-M0znTzxP.cjs +0 -2
- package/dist/BlockNoteExtension-M0znTzxP.cjs.map +0 -1
- package/dist/UserStore-QbbPFj0z.js.map +0 -1
- package/dist/blocks-BEJW9OM_.js.map +0 -1
- package/dist/blocks-BPmJglFo.cjs +0 -12
- package/dist/blocks-BPmJglFo.cjs.map +0 -1
- package/dist/en-C5Z4Ag9_.cjs +0 -2
- package/dist/en-C5Z4Ag9_.cjs.map +0 -1
- package/dist/en-CGKXfWma.js.map +0 -1
- package/dist/extensions-AitWbYdJ.cjs +0 -52
- package/dist/extensions-AitWbYdJ.cjs.map +0 -1
- package/dist/extensions-BR5hkAio.js.map +0 -1
- package/dist/src-BHPuOo7W.cjs +0 -21
- package/dist/src-BHPuOo7W.cjs.map +0 -1
- package/dist/src-BUXut68d.js.map +0 -1
- package/src/blocks/Code/shiki.ts +0 -73
- package/types/src/blocks/Code/shiki.d.ts +0 -4
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
|
|
2
|
+
import type { BlockFromConfig } from "../../schema/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Renders a preview of a code block's content (e.g. rendered LaTeX). Takes the
|
|
5
|
+
* same parameters as a block's `render` function and returns the same type,
|
|
6
|
+
* minus `contentDOM` - as a preview never holds the block's editable content.
|
|
7
|
+
*
|
|
8
|
+
* A `renderPreview` function is only responsible for the preview itself. It has
|
|
9
|
+
* no opinion on when, where, or how the preview is displayed - that's up to the
|
|
10
|
+
* code block's `render` function.
|
|
11
|
+
*/
|
|
12
|
+
export type CodeBlockPreview = (block: BlockFromConfig<any, any, any>, editor: BlockNoteEditor<any>) => {
|
|
13
|
+
dom: HTMLElement | DocumentFragment;
|
|
14
|
+
error?: string | null;
|
|
15
|
+
};
|
|
16
|
+
export type CodeBlockOptions = {
|
|
17
|
+
/**
|
|
18
|
+
* Whether to indent lines with a tab when the user presses `Tab` in a code block.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
indentLineWithTab?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The default language to use for code blocks.
|
|
25
|
+
*
|
|
26
|
+
* @default "text"
|
|
27
|
+
*/
|
|
28
|
+
defaultLanguage?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The languages that are supported in the editor.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* {
|
|
34
|
+
* javascript: {
|
|
35
|
+
* name: "JavaScript",
|
|
36
|
+
* aliases: ["js"],
|
|
37
|
+
* },
|
|
38
|
+
* typescript: {
|
|
39
|
+
* name: "TypeScript",
|
|
40
|
+
* aliases: ["ts"],
|
|
41
|
+
* },
|
|
42
|
+
* }
|
|
43
|
+
*/
|
|
44
|
+
supportedLanguages?: Record<string, {
|
|
45
|
+
/**
|
|
46
|
+
* The display name of the language.
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
* Aliases for this language.
|
|
51
|
+
*/
|
|
52
|
+
aliases?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Renders a preview of the result of the code (e.g. rendered LaTeX). When
|
|
55
|
+
* defined, the code block displays this preview instead of the raw source
|
|
56
|
+
* by default, and shows the editable source in a popup when selected.
|
|
57
|
+
*/
|
|
58
|
+
createPreview?: CodeBlockPreview;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
export declare function getLanguageId(options: CodeBlockOptions, languageName: string): string | undefined;
|
|
@@ -1,70 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
export type CodeBlockOptions = {
|
|
3
|
-
/**
|
|
4
|
-
* Whether to indent lines with a tab when the user presses `Tab` in a code block.
|
|
5
|
-
*
|
|
6
|
-
* @default true
|
|
7
|
-
*/
|
|
8
|
-
indentLineWithTab?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* The default language to use for code blocks.
|
|
11
|
-
*
|
|
12
|
-
* @default "text"
|
|
13
|
-
*/
|
|
14
|
-
defaultLanguage?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The languages that are supported in the editor.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* {
|
|
20
|
-
* javascript: {
|
|
21
|
-
* name: "JavaScript",
|
|
22
|
-
* aliases: ["js"],
|
|
23
|
-
* },
|
|
24
|
-
* typescript: {
|
|
25
|
-
* name: "TypeScript",
|
|
26
|
-
* aliases: ["ts"],
|
|
27
|
-
* },
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
30
|
-
supportedLanguages?: Record<string, {
|
|
31
|
-
/**
|
|
32
|
-
* The display name of the language.
|
|
33
|
-
*/
|
|
34
|
-
name: string;
|
|
35
|
-
/**
|
|
36
|
-
* Aliases for this language.
|
|
37
|
-
*/
|
|
38
|
-
aliases?: string[];
|
|
39
|
-
}>;
|
|
40
|
-
/**
|
|
41
|
-
* The highlighter to use for code blocks.
|
|
42
|
-
*/
|
|
43
|
-
createHighlighter?: () => Promise<HighlighterGeneric<any, any>>;
|
|
44
|
-
};
|
|
45
|
-
export type CodeBlockConfig = ReturnType<typeof createCodeBlockConfig>;
|
|
1
|
+
import { CodeBlockOptions } from "./CodeBlockOptions.js";
|
|
46
2
|
export declare const createCodeBlockConfig: (options: CodeBlockOptions) => import("../../index.js").BlockConfig<"codeBlock", {
|
|
47
3
|
readonly language: {
|
|
48
4
|
readonly default: string;
|
|
49
5
|
};
|
|
50
6
|
}, "plain">;
|
|
7
|
+
export type CodeBlockConfig = ReturnType<typeof createCodeBlockConfig>;
|
|
51
8
|
export declare const createCodeBlockSpec: (options?: Partial<{
|
|
52
9
|
indentLineWithTab: boolean;
|
|
53
10
|
defaultLanguage: string;
|
|
54
11
|
supportedLanguages: Record<string, {
|
|
55
|
-
/**
|
|
56
|
-
* The display name of the language.
|
|
57
|
-
*/
|
|
58
12
|
name: string;
|
|
59
|
-
/**
|
|
60
|
-
* Aliases for this language.
|
|
61
|
-
*/
|
|
62
13
|
aliases?: string[];
|
|
14
|
+
createPreview?: import("./CodeBlockOptions.js").CodeBlockPreview;
|
|
63
15
|
}>;
|
|
64
|
-
createHighlighter: () => Promise<HighlighterGeneric<any, any>>;
|
|
65
16
|
}> | undefined) => import("../../index.js").BlockSpec<"codeBlock", {
|
|
66
17
|
readonly language: {
|
|
67
18
|
readonly default: string;
|
|
68
19
|
};
|
|
69
20
|
}, "plain">;
|
|
70
|
-
export declare function getLanguageId(options: CodeBlockOptions, languageName: string): string | undefined;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CodeBlockOptions } from "../../CodeBlockOptions.js";
|
|
2
|
+
export declare const CodeKeyboardShortcutsExtension: (options: CodeBlockOptions) => (key: string, blockType: string) => import("../../../../index.js").ExtensionFactoryInstance<{
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly keyboardShortcuts: {
|
|
5
|
+
readonly Delete: ({ editor }: {
|
|
6
|
+
editor: import("../../../../index.js").BlockNoteEditor<any, any, any>;
|
|
7
|
+
}) => boolean;
|
|
8
|
+
readonly Tab: ({ editor }: {
|
|
9
|
+
editor: import("../../../../index.js").BlockNoteEditor<any, any, any>;
|
|
10
|
+
}) => boolean;
|
|
11
|
+
readonly Enter: ({ editor }: {
|
|
12
|
+
editor: import("../../../../index.js").BlockNoteEditor<any, any, any>;
|
|
13
|
+
}) => boolean;
|
|
14
|
+
readonly "Shift-Enter": ({ editor }: {
|
|
15
|
+
editor: import("../../../../index.js").BlockNoteEditor<any, any, any>;
|
|
16
|
+
}) => boolean;
|
|
17
|
+
};
|
|
18
|
+
readonly inputRules: readonly [{
|
|
19
|
+
readonly find: RegExp;
|
|
20
|
+
readonly replace: ({ match }: {
|
|
21
|
+
match: RegExpMatchArray;
|
|
22
|
+
range: {
|
|
23
|
+
from: number;
|
|
24
|
+
to: number;
|
|
25
|
+
};
|
|
26
|
+
editor: import("../../../../index.js").BlockNoteEditor<any, any, any>;
|
|
27
|
+
}) => {
|
|
28
|
+
type: string;
|
|
29
|
+
props: {
|
|
30
|
+
language: string;
|
|
31
|
+
};
|
|
32
|
+
content: never[];
|
|
33
|
+
};
|
|
34
|
+
}];
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Schema } from "@tiptap/pm/model";
|
|
2
|
+
export declare const parsePreCode: (el: HTMLElement) => {
|
|
3
|
+
language: string | undefined;
|
|
4
|
+
} | undefined;
|
|
5
|
+
export declare const parsePreCodeContent: ({ el, schema, }: {
|
|
6
|
+
el: HTMLElement;
|
|
7
|
+
schema: Schema;
|
|
8
|
+
}, blockType: string) => import("prosemirror-model").Fragment;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../../../editor/BlockNoteEditor.js";
|
|
2
|
+
import type { BlockFromConfig } from "../../../../schema/index.js";
|
|
3
|
+
export declare const createLanguageSelect: (block: BlockFromConfig<any, any, any>, editor: BlockNoteEditor<any>, selectedLanguage: string, supportedLanguages: Record<string, {
|
|
4
|
+
name: string;
|
|
5
|
+
}>) => {
|
|
6
|
+
dom: HTMLDivElement;
|
|
7
|
+
destroy: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const createCodeBlock: (block: BlockFromConfig<any, any, any>, editor: BlockNoteEditor<any>, options?: {
|
|
10
|
+
selectedLanguage: string;
|
|
11
|
+
supportedLanguages: Record<string, {
|
|
12
|
+
name: string;
|
|
13
|
+
}>;
|
|
14
|
+
}) => {
|
|
15
|
+
dom: DocumentFragment;
|
|
16
|
+
contentDOM: HTMLElement;
|
|
17
|
+
destroy: () => void;
|
|
18
|
+
};
|
|
@@ -15,6 +15,9 @@ export * from "./Quote/block.js";
|
|
|
15
15
|
export * from "./Table/block.js";
|
|
16
16
|
export * from "./Video/block.js";
|
|
17
17
|
export { EMPTY_CELL_HEIGHT, EMPTY_CELL_WIDTH } from "./Table/TableExtension.js";
|
|
18
|
+
export * from "./Code/helpers/parse/parsePreCode.js";
|
|
19
|
+
export * from "./Code/helpers/render/createCodeBlock.js";
|
|
20
|
+
export * from "./Code/helpers/toExternalHTML/createPreCode.js";
|
|
18
21
|
export * from "./ToggleWrapper/createToggleWrapper.js";
|
|
19
22
|
export * from "./File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.js";
|
|
20
23
|
export * from "./PageBreak/getPageBreakSlashMenuItems.js";
|
|
@@ -40,21 +40,7 @@ export declare const CommentsExtension: (options: {
|
|
|
40
40
|
confirmBeforeDiscard?: boolean;
|
|
41
41
|
}) => import("../index.js").ExtensionFactoryInstance<{
|
|
42
42
|
readonly key: "comments";
|
|
43
|
-
readonly store: import("
|
|
44
|
-
pendingComment: boolean;
|
|
45
|
-
selectedThreadId: string | undefined;
|
|
46
|
-
threadPositions: Map<string, {
|
|
47
|
-
from: number;
|
|
48
|
-
to: number;
|
|
49
|
-
}>;
|
|
50
|
-
}, (cb: {
|
|
51
|
-
pendingComment: boolean;
|
|
52
|
-
selectedThreadId: string | undefined;
|
|
53
|
-
threadPositions: Map<string, {
|
|
54
|
-
from: number;
|
|
55
|
-
to: number;
|
|
56
|
-
}>;
|
|
57
|
-
}) => {
|
|
43
|
+
readonly store: import("../index.js").Store<{
|
|
58
44
|
pendingComment: boolean;
|
|
59
45
|
selectedThreadId: string | undefined;
|
|
60
46
|
threadPositions: Map<string, {
|
|
@@ -9,7 +9,7 @@ import type { BlockIdentifier, BlockNoteDOMAttributes, BlockSchema, BlockSpecs,
|
|
|
9
9
|
import "../style.css";
|
|
10
10
|
import { EventEmitter } from "../util/EventEmitter.js";
|
|
11
11
|
import type { NoInfer } from "../util/typescript.js";
|
|
12
|
-
import { ExtensionFactoryInstance } from "./BlockNoteExtension.js";
|
|
12
|
+
import { Extension, ExtensionFactory, ExtensionFactoryInstance } from "./BlockNoteExtension.js";
|
|
13
13
|
import type { TextCursorPosition } from "./cursorPositionTypes.js";
|
|
14
14
|
import { ExtensionManager } from "./managers/index.js";
|
|
15
15
|
import type { Selection } from "./selectionTypes.js";
|
|
@@ -320,7 +320,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
|
|
|
320
320
|
/**
|
|
321
321
|
* BlockNote extensions that are added to the editor, keyed by the extension key
|
|
322
322
|
*/
|
|
323
|
-
get extensions(): Map<string,
|
|
323
|
+
get extensions(): Map<string, Extension<any, string>>;
|
|
324
324
|
/**
|
|
325
325
|
* Execute a prosemirror command. This is mostly for backwards compatibility with older code.
|
|
326
326
|
*
|
|
@@ -388,7 +388,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
|
|
|
388
388
|
/**
|
|
389
389
|
* Get an extension from the editor
|
|
390
390
|
*/
|
|
391
|
-
getExtension:
|
|
391
|
+
getExtension: (<const Ext extends Extension | ExtensionFactory = Extension>(extension: string) => (Ext extends Extension ? Ext : Ext extends ExtensionFactory ? ReturnType<ReturnType<Ext>> : never) | undefined) & (<const T extends ExtensionFactory>(extension: T) => ReturnType<ReturnType<T>> | undefined);
|
|
392
392
|
/**
|
|
393
393
|
* Mount the editor to a DOM element.
|
|
394
394
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Store, StoreOptions } from "@tanstack/store";
|
|
2
1
|
import { type AnyExtension } from "@tiptap/core";
|
|
3
2
|
import type { Plugin as ProsemirrorPlugin } from "prosemirror-state";
|
|
4
3
|
import type { PartialBlockNoDefaults } from "../schema/index.js";
|
|
4
|
+
import { Store, StoreOptions } from "../util/Store.js";
|
|
5
5
|
import type { BlockNoteEditor } from "./BlockNoteEditor.js";
|
|
6
6
|
/**
|
|
7
7
|
* This function is called when the extension is destroyed.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An image generated during export (e.g. a rendered formula or diagram): the
|
|
3
|
+
* encoded image bytes plus the dimensions to display it at.
|
|
4
|
+
*
|
|
5
|
+
* The bytes (rather than e.g. a data URL string or a `Blob`) are the source
|
|
6
|
+
* of truth: they carry no encoding ambiguity, work in every environment, and
|
|
7
|
+
* are readable synchronously - each output format converts them at its own
|
|
8
|
+
* boundary (data URL for HTML-based targets, raw bytes for DOCX, base64 for
|
|
9
|
+
* email attachments).
|
|
10
|
+
*/
|
|
11
|
+
export type ExportImage = {
|
|
12
|
+
/** MIME type of `data`, e.g. `"image/png"` or `"image/svg+xml"`. */
|
|
13
|
+
mimeType: string;
|
|
14
|
+
/** The encoded image bytes. */
|
|
15
|
+
data: Uint8Array;
|
|
16
|
+
/**
|
|
17
|
+
* Dimensions to display the image at, in the target format's units (CSS
|
|
18
|
+
* pixels, points, ...). For raster images, `data`'s own pixel dimensions
|
|
19
|
+
* may be larger - images are often rendered at 2-4x for sharpness.
|
|
20
|
+
*/
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Encodes bytes as base64. This papers over a platform gap: until
|
|
26
|
+
* `Uint8Array.prototype.toBase64()` (ES2026) is available in every runtime
|
|
27
|
+
* BlockNote supports, the only universal built-in is `btoa`, which takes
|
|
28
|
+
* binary *strings*. Uses `toBase64` when the runtime has it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
31
|
+
/**
|
|
32
|
+
* Encodes an {@link ExportImage}'s bytes as a base64 data URL, for targets
|
|
33
|
+
* that take image sources as URLs (HTML `src` attributes, react-pdf image
|
|
34
|
+
* sources, ...).
|
|
35
|
+
*/
|
|
36
|
+
export declare function exportImageToDataURL(image: ExportImage): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BlockNoteSchema } from "../blocks/BlockNoteSchema.js";
|
|
2
2
|
import { COLORS_DEFAULT } from "../editor/defaultColors.js";
|
|
3
|
+
import type { Dictionary } from "../i18n/dictionary.js";
|
|
3
4
|
import { BlockFromConfig, BlockSchema, InlineContent, InlineContentSchema, StyleSchema, StyledText, Styles } from "../schema/index.js";
|
|
4
5
|
import type { BlockMapping, InlineContentMapping, StyleMapping } from "./mapping.js";
|
|
5
6
|
export type ExporterOptions = {
|
|
@@ -20,6 +21,20 @@ export type ExporterOptions = {
|
|
|
20
21
|
* Colors to use for background of blocks, font colors, and highlight colors
|
|
21
22
|
*/
|
|
22
23
|
colors: typeof COLORS_DEFAULT;
|
|
24
|
+
/**
|
|
25
|
+
* The strings an exporter renders into the produced document (file link
|
|
26
|
+
* texts, error placeholders). Accepts a locale from
|
|
27
|
+
* `@blocknote/core/locales` or an editor dictionary; block packages that
|
|
28
|
+
* ship their own exporter strings (e.g. math, diagram) read their sections
|
|
29
|
+
* from this same object, exactly as they do from an editor dictionary.
|
|
30
|
+
*
|
|
31
|
+
* @default the English strings
|
|
32
|
+
*/
|
|
33
|
+
dictionary?: {
|
|
34
|
+
exporter: Dictionary["exporter"];
|
|
35
|
+
} & {
|
|
36
|
+
[blockDictionary: string]: unknown;
|
|
37
|
+
};
|
|
23
38
|
};
|
|
24
39
|
export declare abstract class Exporter<B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema, RB, RI, RS, TS> {
|
|
25
40
|
protected readonly mappings: {
|
|
@@ -34,6 +49,12 @@ export declare abstract class Exporter<B extends BlockSchema, I extends InlineCo
|
|
|
34
49
|
inlineContentMapping: InlineContentMapping<I, S, RI, TS>;
|
|
35
50
|
styleMapping: StyleMapping<S, RS>;
|
|
36
51
|
}, options: ExporterOptions);
|
|
52
|
+
/**
|
|
53
|
+
* The strings this exporter renders into the produced document - the
|
|
54
|
+
* `exporter` section of the configured dictionary (the `dictionary`
|
|
55
|
+
* option of {@link ExporterOptions}), or the English defaults.
|
|
56
|
+
*/
|
|
57
|
+
get dictionary(): Dictionary["exporter"];
|
|
37
58
|
resolveFile(url: string): Promise<Blob>;
|
|
38
59
|
mapStyles(styles: Styles<S>): RS[];
|
|
39
60
|
mapInlineContent(inlineContent: InlineContent<I, S>): RI;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,7 +11,7 @@ export type BlockMapping<B extends BlockSchema, I extends InlineContentSchema, S
|
|
|
11
11
|
* Defines a mapping from all inline content types with a schema to a result type R.
|
|
12
12
|
*/
|
|
13
13
|
export type InlineContentMapping<I extends InlineContentSchema, S extends StyleSchema, RI, TS> = {
|
|
14
|
-
[K in keyof I]: (inlineContent: InlineContentFromConfig<I[K], S>, exporter: Exporter<any,
|
|
14
|
+
[K in keyof I]: (inlineContent: InlineContentFromConfig<I[K], S>, exporter: Exporter<any, any, any, any, RI, any, TS>) => RI;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
17
|
* Defines a mapping from all style types with a schema to a result type R.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const FilePanelExtension: (options?: any) => import("../../index.js").ExtensionFactoryInstance<{
|
|
2
2
|
readonly key: "filePanel";
|
|
3
|
-
readonly store: import("
|
|
3
|
+
readonly store: import("../../index.js").Store<string | undefined>;
|
|
4
4
|
readonly mount: ({ signal }: {
|
|
5
5
|
dom: HTMLElement;
|
|
6
6
|
root: Document | ShadowRoot;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const FormattingToolbarExtension: (options?: any) => import("../../index.js").ExtensionFactoryInstance<{
|
|
2
2
|
readonly key: "formattingToolbar";
|
|
3
|
-
readonly store: import("
|
|
3
|
+
readonly store: import("../../index.js").Store<boolean>;
|
|
4
4
|
readonly mount: ({ dom, signal }: {
|
|
5
5
|
dom: HTMLElement;
|
|
6
6
|
root: Document | ShadowRoot;
|
|
@@ -6,11 +6,7 @@ import { Plugin } from "prosemirror-state";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const ShowSelectionExtension: (options?: any) => import("../../index.js").ExtensionFactoryInstance<{
|
|
8
8
|
readonly key: "showSelection";
|
|
9
|
-
readonly store: import("
|
|
10
|
-
enabledSet: Set<string>;
|
|
11
|
-
}, (cb: {
|
|
12
|
-
enabledSet: Set<string>;
|
|
13
|
-
}) => {
|
|
9
|
+
readonly store: import("../../index.js").Store<{
|
|
14
10
|
enabledSet: Set<string>;
|
|
15
11
|
}>;
|
|
16
12
|
readonly prosemirrorPlugins: readonly [Plugin<any>];
|
|
@@ -100,7 +100,7 @@ export declare class SideMenuView<BSchema extends BlockSchema, I extends InlineC
|
|
|
100
100
|
export declare const sideMenuPluginKey: PluginKey<any>;
|
|
101
101
|
export declare const SideMenuExtension: (options?: any) => import("../../index.js").ExtensionFactoryInstance<{
|
|
102
102
|
readonly key: "sideMenu";
|
|
103
|
-
readonly store: import("
|
|
103
|
+
readonly store: import("../../index.js").Store<SideMenuState<any, any, any> | undefined>;
|
|
104
104
|
readonly prosemirrorPlugins: readonly [Plugin<any>];
|
|
105
105
|
/**
|
|
106
106
|
* Handles drag & drop events for blocks.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
2
|
+
/**
|
|
3
|
+
* A single editor-wide extension that drives the source popup for blocks that
|
|
4
|
+
* render a preview. Which blocks it activates on is decided by each spec's
|
|
5
|
+
* `meta.hasPreview` flag, so individual blocks opt in rather than the extension
|
|
6
|
+
* being configured with a block type.
|
|
7
|
+
*
|
|
8
|
+
* The extension is registered once (it's a default extension) and is a no-op
|
|
9
|
+
* when no block declares `meta.hasPreview`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SourceBlockWithPreviewExtension: () => import("../..").ExtensionFactoryInstance<{
|
|
12
|
+
key: string;
|
|
13
|
+
store: import("../..").Store<{
|
|
14
|
+
popupOpen: string | undefined;
|
|
15
|
+
selected: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
keyboardShortcuts: {
|
|
18
|
+
Enter: ({ editor }: {
|
|
19
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
20
|
+
}) => boolean;
|
|
21
|
+
Escape: ({ editor }: {
|
|
22
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
23
|
+
}) => boolean;
|
|
24
|
+
"Mod-a": ({ editor }: {
|
|
25
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
26
|
+
}) => boolean;
|
|
27
|
+
ArrowUp: ({ editor }: {
|
|
28
|
+
editor: BlockNoteEditor<any>;
|
|
29
|
+
}) => boolean;
|
|
30
|
+
ArrowLeft: ({ editor }: {
|
|
31
|
+
editor: BlockNoteEditor<any>;
|
|
32
|
+
}) => boolean;
|
|
33
|
+
ArrowDown: ({ editor }: {
|
|
34
|
+
editor: BlockNoteEditor<any>;
|
|
35
|
+
}) => boolean;
|
|
36
|
+
ArrowRight: ({ editor }: {
|
|
37
|
+
editor: BlockNoteEditor<any>;
|
|
38
|
+
}) => boolean;
|
|
39
|
+
};
|
|
40
|
+
mount: ({ dom, signal }: {
|
|
41
|
+
dom: HTMLElement;
|
|
42
|
+
root: Document | ShadowRoot;
|
|
43
|
+
signal: AbortSignal;
|
|
44
|
+
}) => void;
|
|
45
|
+
}>;
|
package/types/src/extensions/SourceInlineContentWithPreview/SourceInlineContentWithPreview.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BlockNoteEditor } from "../../editor/BlockNoteEditor";
|
|
2
|
+
/**
|
|
3
|
+
* Inline-content counterpart of {@link SourceBlockWithPreviewExtension}. A
|
|
4
|
+
* single editor-wide extension that drives the source popup for inline content
|
|
5
|
+
* that renders a preview. Which inline content it activates on is decided by
|
|
6
|
+
* each spec's `meta.hasPreview` flag, so individual inline content opts in
|
|
7
|
+
* rather than the extension being configured with a type.
|
|
8
|
+
*
|
|
9
|
+
* Unlike the block version, the popup isn't toggled with a separate state flag:
|
|
10
|
+
* it's open exactly when the selection is inside the inline content's source.
|
|
11
|
+
* The store therefore only tracks which inline content (by its position) holds
|
|
12
|
+
* the selection - moving the selection in opens its popup, moving it out closes
|
|
13
|
+
* it. Since the source popup is always laid out (just hidden via opacity), the
|
|
14
|
+
* cursor can navigate into and out of it with the arrow keys as usual.
|
|
15
|
+
*
|
|
16
|
+
* The extension is registered once (it's a default extension) and is a no-op
|
|
17
|
+
* when no inline content declares `meta.hasPreview`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SourceInlineContentWithPreviewExtension: () => import("../..").ExtensionFactoryInstance<{
|
|
20
|
+
key: string;
|
|
21
|
+
store: import("../..").Store<{
|
|
22
|
+
selected: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
keyboardShortcuts: {
|
|
25
|
+
Enter: ({ editor }: {
|
|
26
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
27
|
+
}) => boolean;
|
|
28
|
+
"Shift-Enter": ({ editor }: {
|
|
29
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
30
|
+
}) => boolean;
|
|
31
|
+
Escape: ({ editor }: {
|
|
32
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
33
|
+
}) => boolean;
|
|
34
|
+
ArrowUp: ({ editor }: {
|
|
35
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
36
|
+
}) => boolean;
|
|
37
|
+
ArrowDown: ({ editor }: {
|
|
38
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
39
|
+
}) => boolean;
|
|
40
|
+
"Mod-a": ({ editor }: {
|
|
41
|
+
editor: BlockNoteEditor<any, any, any>;
|
|
42
|
+
}) => boolean;
|
|
43
|
+
};
|
|
44
|
+
mount: ({ dom, signal }: {
|
|
45
|
+
dom: HTMLElement;
|
|
46
|
+
root: Document | ShadowRoot;
|
|
47
|
+
signal: AbortSignal;
|
|
48
|
+
}) => void;
|
|
49
|
+
}>;
|
|
@@ -39,17 +39,7 @@ export type SuggestionMenuOptions = {
|
|
|
39
39
|
*/
|
|
40
40
|
export declare const SuggestionMenu: (options?: any) => import("../../index.js").ExtensionFactoryInstance<{
|
|
41
41
|
readonly key: "suggestionMenu";
|
|
42
|
-
readonly store: import("
|
|
43
|
-
query: string;
|
|
44
|
-
ignoreQueryLength?: boolean;
|
|
45
|
-
} & {
|
|
46
|
-
triggerCharacter: string;
|
|
47
|
-
}) | undefined, (cb: (UiElementPosition & {
|
|
48
|
-
query: string;
|
|
49
|
-
ignoreQueryLength?: boolean;
|
|
50
|
-
} & {
|
|
51
|
-
triggerCharacter: string;
|
|
52
|
-
}) | undefined) => (UiElementPosition & {
|
|
42
|
+
readonly store: import("../../index.js").Store<(UiElementPosition & {
|
|
53
43
|
query: string;
|
|
54
44
|
ignoreQueryLength?: boolean;
|
|
55
45
|
} & {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { HighlighterGeneric } from "@shikijs/types";
|
|
2
|
+
export type SyntaxHighlightingOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Creates the Shiki highlighter used for syntax highlighting. Can be
|
|
5
|
+
* asynchronous, so the highlighter is only loaded once it's first needed.
|
|
6
|
+
*
|
|
7
|
+
* When omitted, content renders without syntax highlighting.
|
|
8
|
+
*/
|
|
9
|
+
createHighlighter: () => Promise<HighlighterGeneric<any, any>>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Collects the node type names that should be syntax-highlighted from a schema's
|
|
13
|
+
* block and inline-content specs.
|
|
14
|
+
*
|
|
15
|
+
* A spec is a candidate when it has a `meta.highlight` callback (which decides
|
|
16
|
+
* the language) AND the node actually holds editable text. Block and
|
|
17
|
+
* inline-content specs use different `content` value spaces, so "editable text"
|
|
18
|
+
* means `content === "plain"` for both blocks (code/math blocks) and inline
|
|
19
|
+
* content (inline math) - both hold plain text - hence the two are filtered
|
|
20
|
+
* separately.
|
|
21
|
+
*
|
|
22
|
+
* Inline content (e.g. inline math) is highlighted too: `prosemirror-highlight`
|
|
23
|
+
* collects nodes by `node.inlineContent` since v0.15.3
|
|
24
|
+
* (https://github.com/ocavue/prosemirror-highlight/pull/137), so inline nodes
|
|
25
|
+
* holding inline content are visited alongside text blocks.
|
|
26
|
+
*/
|
|
27
|
+
export declare function collectHighlightNodeTypes(schema: {
|
|
28
|
+
blockSpecs: Record<string, unknown>;
|
|
29
|
+
inlineContentSpecs: Record<string, unknown>;
|
|
30
|
+
}): string[];
|
|
31
|
+
/**
|
|
32
|
+
* A single editor-wide extension that syntax-highlights block and inline-content
|
|
33
|
+
* content. Which nodes get highlighted (and as which language) is decided by
|
|
34
|
+
* each spec's `meta.highlight` callback, so individual specs declare their own
|
|
35
|
+
* language rather than the extension configuring them.
|
|
36
|
+
*
|
|
37
|
+
* Highlighting is opt-in: the user adds this extension to the editor's
|
|
38
|
+
* `extensions` (configured with a `createHighlighter`) to enable it. When it's
|
|
39
|
+
* absent, content renders as plain text.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SyntaxHighlightingExtension: (options: SyntaxHighlightingOptions) => import("../../index.js").ExtensionFactoryInstance<{
|
|
42
|
+
key: string;
|
|
43
|
+
prosemirrorPlugins: import("prosemirror-state").Plugin<import("prosemirror-highlight").HighlightPluginState>[];
|
|
44
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SyntaxHighlightingOptions } from "./SyntaxHighlighting.js";
|
|
2
|
+
import { CustomBlockNoteSchema } from "../../schema/schema.js";
|
|
3
|
+
export declare const shikiParserSymbol: unique symbol;
|
|
4
|
+
export declare const shikiHighlighterPromiseSymbol: unique symbol;
|
|
5
|
+
/**
|
|
6
|
+
* Creates the syntax highlighting plugin for the given block types, lazily
|
|
7
|
+
* loading the highlighter on first use.
|
|
8
|
+
*
|
|
9
|
+
* Each spec's `meta.highlight` callback resolves a node to a language, which is
|
|
10
|
+
* passed straight to Shiki - it resolves aliases and loads the grammar from its
|
|
11
|
+
* bundle, so any language the provided highlighter bundles can be highlighted.
|
|
12
|
+
*/
|
|
13
|
+
export declare function lazyShikiPlugin(options: SyntaxHighlightingOptions, nodeTypes: string[], schema: CustomBlockNoteSchema<any, any, any>): import("prosemirror-state").Plugin<import("prosemirror-highlight").HighlightPluginState>;
|
|
@@ -43,7 +43,7 @@ export declare class TableHandlesView implements PluginView {
|
|
|
43
43
|
export declare const tableHandlesPluginKey: PluginKey<any>;
|
|
44
44
|
export declare const TableHandlesExtension: (options?: any) => import("../../index.js").ExtensionFactoryInstance<{
|
|
45
45
|
readonly key: "tableHandles";
|
|
46
|
-
readonly store: import("
|
|
46
|
+
readonly store: import("../../index.js").Store<TableHandlesState | undefined>;
|
|
47
47
|
readonly prosemirrorPlugins: readonly [Plugin<any>];
|
|
48
48
|
/**
|
|
49
49
|
* Callback that should be set on the `dragStart` event for whichever element
|