@blocknote/core 0.23.0 → 0.23.2-hotfix.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/blocknote.js +2921 -2603
- package/dist/blocknote.js.map +1 -1
- package/dist/blocknote.umd.cjs +6 -6
- package/dist/blocknote.umd.cjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -3
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +4 -2
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +1 -0
- package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +3 -0
- package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +6 -2
- package/src/api/exporters/markdown/__snapshots__/codeBlock/contains-newlines/markdown.md +4 -0
- package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +27 -0
- package/src/api/nodeConversions/blockToNode.ts +35 -9
- package/src/api/testUtil/cases/defaultSchema.ts +9 -0
- package/src/editor/BlockNoteEditor.ts +20 -12
- package/src/editor/BlockNoteExtensions.ts +4 -128
- package/src/extensions/Collaboration/createCollaborationExtensions.ts +144 -0
- package/src/extensions/SideMenu/SideMenuPlugin.ts +89 -28
- package/src/i18n/locales/fr.ts +2 -2
- package/src/i18n/locales/index.ts +2 -1
- package/src/i18n/locales/uk.ts +289 -0
- package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
- package/types/src/api/nodeConversions/blockToNode.d.ts +1 -1
- package/types/src/editor/BlockNoteEditor.d.ts +3 -2
- package/types/src/editor/BlockNoteExtensions.d.ts +1 -1
- package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +17 -0
- package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +1 -5
- package/types/src/i18n/locales/index.d.ts +2 -1
- package/types/src/i18n/locales/uk.d.ts +2 -0
- package/types/src/pm-nodes/BlockContainer.d.ts +1 -1
- package/types/src/pm-nodes/BlockGroup.d.ts +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as Y from "yjs";
|
|
2
|
+
export declare const createCollaborationExtensions: (collaboration: {
|
|
3
|
+
fragment: Y.XmlFragment;
|
|
4
|
+
user: {
|
|
5
|
+
name: string;
|
|
6
|
+
color: string;
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
provider: any;
|
|
10
|
+
renderCursor?: (user: any) => HTMLElement;
|
|
11
|
+
showCursorLabels?: "always" | "activity";
|
|
12
|
+
}) => (import("@tiptap/core").Extension<import("@tiptap/extension-collaboration").CollaborationOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-collaboration-cursor").CollaborationCursorOptions, {
|
|
13
|
+
users: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
clientId: number;
|
|
16
|
+
}[];
|
|
17
|
+
}>)[];
|
|
@@ -24,11 +24,6 @@ export declare class SideMenuView<BSchema extends BlockSchema, I extends InlineC
|
|
|
24
24
|
constructor(editor: BlockNoteEditor<BSchema, I, S>, sideMenuDetection: "viewport" | "editor", pmView: EditorView, emitUpdate: (state: SideMenuState<BSchema, I, S>) => void);
|
|
25
25
|
updateState: (state: SideMenuState<BSchema, I, S>) => void;
|
|
26
26
|
updateStateFromMousePos: () => void;
|
|
27
|
-
/**
|
|
28
|
-
* If the event is outside the editor contents,
|
|
29
|
-
* we dispatch a fake event, so that we can still drop the content
|
|
30
|
-
* when dragging / dropping to the side of the editor
|
|
31
|
-
*/
|
|
32
27
|
onDrop: (event: DragEvent) => void;
|
|
33
28
|
/**
|
|
34
29
|
* If a block is being dragged, ProseMirror usually gets the context of what's
|
|
@@ -58,6 +53,7 @@ export declare class SideMenuView<BSchema extends BlockSchema, I extends InlineC
|
|
|
58
53
|
onKeyDown: (_event: KeyboardEvent) => void;
|
|
59
54
|
onMouseMove: (event: MouseEvent) => void;
|
|
60
55
|
private createSyntheticEvent;
|
|
56
|
+
onScroll: () => void;
|
|
61
57
|
update(_view: EditorView, prevState: EditorState): void;
|
|
62
58
|
destroy(): void;
|
|
63
59
|
}
|
|
@@ -5,12 +5,13 @@ export * from "./es.js";
|
|
|
5
5
|
export * from "./fr.js";
|
|
6
6
|
export * from "./hr.js";
|
|
7
7
|
export * from "./is.js";
|
|
8
|
+
export * from "./it.js";
|
|
8
9
|
export * from "./ja.js";
|
|
9
10
|
export * from "./ko.js";
|
|
10
11
|
export * from "./nl.js";
|
|
11
12
|
export * from "./pl.js";
|
|
12
13
|
export * from "./pt.js";
|
|
13
14
|
export * from "./ru.js";
|
|
15
|
+
export * from "./uk.js";
|
|
14
16
|
export * from "./vi.js";
|
|
15
17
|
export * from "./zh.js";
|
|
16
|
-
export * from "./it.js";
|
|
@@ -5,8 +5,8 @@ import type { BlockNoteEditor } from "../editor/BlockNoteEditor.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const BlockContainer: Node<{
|
|
7
7
|
domAttributes?: Partial<{
|
|
8
|
-
blockContent: Record<string, string>;
|
|
9
8
|
blockGroup: Record<string, string>;
|
|
9
|
+
blockContent: Record<string, string>;
|
|
10
10
|
editor: Record<string, string>;
|
|
11
11
|
block: Record<string, string>;
|
|
12
12
|
inlineContent: Record<string, string>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
2
|
export declare const BlockGroup: Node<{
|
|
3
3
|
domAttributes?: Partial<{
|
|
4
|
-
blockContent: Record<string, string>;
|
|
5
4
|
blockGroup: Record<string, string>;
|
|
5
|
+
blockContent: Record<string, string>;
|
|
6
6
|
editor: Record<string, string>;
|
|
7
7
|
block: Record<string, string>;
|
|
8
8
|
inlineContent: Record<string, string>;
|