@blocknote/core 0.15.5 → 0.15.7
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/blocknote.js +2037 -1944
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +6 -6
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +2 -2
- package/src/api/exporters/copyExtension.ts +25 -21
- package/src/api/exporters/html/externalHTMLExporter.ts +15 -6
- package/src/api/exporters/html/htmlConversion.test.ts +8 -3
- package/src/api/exporters/html/util/simplifyBlocksRehypePlugin.ts +11 -3
- package/src/api/exporters/markdown/markdownExporter.ts +25 -12
- package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +12 -2
- package/src/api/parsers/handleFileInsertion.ts +65 -14
- package/src/api/parsers/html/util/nestedLists.test.ts +8 -8
- package/src/api/parsers/markdown/parseMarkdown.ts +11 -12
- package/src/blocks/AudioBlockContent/AudioBlockContent.ts +1 -1
- package/src/blocks/ImageBlockContent/ImageBlockContent.ts +1 -1
- package/src/blocks/VideoBlockContent/VideoBlockContent.ts +1 -1
- package/src/editor/BlockNoteEditor.ts +34 -10
- package/src/extensions/SideMenu/SideMenuPlugin.ts +3 -1
- package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +16 -7
- package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +6 -1
- package/src/index.ts +7 -6
- package/src/schema/blocks/types.ts +1 -1
- package/src/util/esmDependencies.ts +51 -0
- package/types/src/api/exporters/markdown/markdownExporter.d.ts +1 -1
- package/types/src/api/testUtil/cases/customBlocks.d.ts +6 -6
- package/types/src/api/testUtil/cases/customInlineContent.d.ts +6 -6
- package/types/src/api/testUtil/cases/customStyles.d.ts +6 -6
- package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +3 -3
- package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +3 -3
- package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +3 -3
- package/types/src/blocks/defaultBlocks.d.ts +12 -12
- package/types/src/editor/BlockNoteEditor.d.ts +5 -2
- package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +1 -0
- package/types/src/index.d.ts +7 -6
- package/types/src/schema/blocks/types.d.ts +1 -1
- package/types/src/util/esmDependencies.d.ts +24 -0
|
@@ -150,7 +150,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
|
|
|
150
150
|
readonly resolveFileUrl: (url: string) => Promise<string>;
|
|
151
151
|
get pmSchema(): Schema<any, any>;
|
|
152
152
|
static create<BSchema extends BlockSchema = DefaultBlockSchema, ISchema extends InlineContentSchema = DefaultInlineContentSchema, SSchema extends StyleSchema = DefaultStyleSchema>(options?: Partial<BlockNoteEditorOptions<BSchema, ISchema, SSchema>>): BlockNoteEditor<BSchema, ISchema, SSchema>;
|
|
153
|
-
|
|
153
|
+
protected constructor(options: Partial<BlockNoteEditorOptions<any, any, any>>);
|
|
154
154
|
dispatch(tr: Transaction): void;
|
|
155
155
|
/**
|
|
156
156
|
* Mount the editor to a parent DOM element. Call mount(undefined) to clean up
|
|
@@ -369,5 +369,8 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
|
|
|
369
369
|
* @returns A function to remove the callback.
|
|
370
370
|
*/
|
|
371
371
|
onSelectionChange(callback: (editor: BlockNoteEditor<BSchema, ISchema, SSchema>) => void): (() => void) | undefined;
|
|
372
|
-
|
|
372
|
+
openSuggestionMenu(triggerCharacter: string, pluginState?: {
|
|
373
|
+
deleteTriggerCharacter?: boolean;
|
|
374
|
+
ignoreQueryLength?: boolean;
|
|
375
|
+
}): void;
|
|
373
376
|
}
|
|
@@ -5,6 +5,7 @@ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../schema";
|
|
|
5
5
|
import { EventEmitter } from "../../util/EventEmitter";
|
|
6
6
|
export type SuggestionMenuState = UiElementPosition & {
|
|
7
7
|
query: string;
|
|
8
|
+
ignoreQueryLength?: boolean;
|
|
8
9
|
};
|
|
9
10
|
/**
|
|
10
11
|
* A ProseMirror plugin for suggestions, designed to make '/'-commands possible as well as mentions.
|
package/types/src/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as locales from "./i18n/locales";
|
|
2
2
|
export * from "./api/exporters/html/externalHTMLExporter";
|
|
3
3
|
export * from "./api/exporters/html/internalHTMLSerializer";
|
|
4
|
-
export * from "./api/testUtil";
|
|
5
4
|
export * from "./api/getCurrentBlockContentType";
|
|
6
|
-
export * from "./
|
|
5
|
+
export * from "./api/testUtil";
|
|
7
6
|
export * from "./blocks/AudioBlockContent/AudioBlockContent";
|
|
8
7
|
export * from "./blocks/FileBlockContent/FileBlockContent";
|
|
9
|
-
export * from "./blocks/ImageBlockContent/ImageBlockContent";
|
|
10
|
-
export * from "./blocks/VideoBlockContent/VideoBlockContent";
|
|
11
8
|
export * from "./blocks/FileBlockContent/fileBlockHelpers";
|
|
12
9
|
export * from "./blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY";
|
|
10
|
+
export * from "./blocks/ImageBlockContent/ImageBlockContent";
|
|
13
11
|
export { parseImageElement } from "./blocks/ImageBlockContent/imageBlockHelpers";
|
|
12
|
+
export * from "./blocks/VideoBlockContent/VideoBlockContent";
|
|
13
|
+
export * from "./blocks/defaultBlockHelpers";
|
|
14
14
|
export * from "./blocks/defaultBlockTypeGuards";
|
|
15
15
|
export * from "./blocks/defaultBlocks";
|
|
16
16
|
export * from "./blocks/defaultProps";
|
|
@@ -23,15 +23,16 @@ export * from "./extensions/FilePanel/FilePanelPlugin";
|
|
|
23
23
|
export * from "./extensions/FormattingToolbar/FormattingToolbarPlugin";
|
|
24
24
|
export * from "./extensions/LinkToolbar/LinkToolbarPlugin";
|
|
25
25
|
export * from "./extensions/SideMenu/SideMenuPlugin";
|
|
26
|
-
export * from "./extensions/SuggestionMenu/DefaultSuggestionItem";
|
|
27
26
|
export * from "./extensions/SuggestionMenu/DefaultGridSuggestionItem";
|
|
27
|
+
export * from "./extensions/SuggestionMenu/DefaultSuggestionItem";
|
|
28
28
|
export * from "./extensions/SuggestionMenu/SuggestionPlugin";
|
|
29
|
-
export * from "./extensions/SuggestionMenu/getDefaultSlashMenuItems";
|
|
30
29
|
export * from "./extensions/SuggestionMenu/getDefaultEmojiPickerItems";
|
|
30
|
+
export * from "./extensions/SuggestionMenu/getDefaultSlashMenuItems";
|
|
31
31
|
export * from "./extensions/TableHandles/TableHandlesPlugin";
|
|
32
32
|
export * from "./i18n/dictionary";
|
|
33
33
|
export * from "./schema";
|
|
34
34
|
export * from "./util/browser";
|
|
35
|
+
export * from "./util/esmDependencies";
|
|
35
36
|
export * from "./util/string";
|
|
36
37
|
export * from "./util/typescript";
|
|
37
38
|
export { UnreachableCaseError, assertEmpty } from "./util/typescript";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare let esmDependencies: undefined | {
|
|
2
|
+
rehypeParse: typeof import("rehype-parse");
|
|
3
|
+
rehypeStringify: typeof import("rehype-stringify");
|
|
4
|
+
unified: typeof import("unified");
|
|
5
|
+
hastUtilFromDom: typeof import("hast-util-from-dom");
|
|
6
|
+
rehypeRemark: typeof import("rehype-remark");
|
|
7
|
+
remarkGfm: typeof import("remark-gfm");
|
|
8
|
+
remarkStringify: typeof import("remark-stringify");
|
|
9
|
+
remarkParse: typeof import("remark-parse");
|
|
10
|
+
remarkRehype: typeof import("remark-rehype");
|
|
11
|
+
rehypeFormat: typeof import("rehype-format");
|
|
12
|
+
};
|
|
13
|
+
export declare function initializeESMDependencies(): Promise<{
|
|
14
|
+
rehypeParse: typeof import("rehype-parse");
|
|
15
|
+
rehypeStringify: typeof import("rehype-stringify");
|
|
16
|
+
unified: typeof import("unified");
|
|
17
|
+
hastUtilFromDom: typeof import("hast-util-from-dom");
|
|
18
|
+
rehypeRemark: typeof import("rehype-remark");
|
|
19
|
+
remarkGfm: typeof import("remark-gfm");
|
|
20
|
+
remarkStringify: typeof import("remark-stringify");
|
|
21
|
+
remarkParse: typeof import("remark-parse");
|
|
22
|
+
remarkRehype: typeof import("remark-rehype");
|
|
23
|
+
rehypeFormat: typeof import("rehype-format");
|
|
24
|
+
}>;
|