@blocknote/core 0.10.0 → 0.11.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 (81) hide show
  1. package/README.md +1 -1
  2. package/dist/blocknote.js +1536 -1458
  3. package/dist/blocknote.js.map +1 -1
  4. package/dist/blocknote.umd.cjs +6 -6
  5. package/dist/blocknote.umd.cjs.map +1 -1
  6. package/dist/style.css +1 -1
  7. package/dist/webpack-stats.json +1 -1
  8. package/package.json +5 -3
  9. package/src/api/blockManipulation/blockManipulation.ts +144 -30
  10. package/src/api/exporters/copyExtension.ts +97 -24
  11. package/src/api/exporters/html/__snapshots__/image/basic/internal.html +1 -1
  12. package/src/api/exporters/html/__snapshots__/image/button/internal.html +1 -1
  13. package/src/api/exporters/html/__snapshots__/image/nested/internal.html +1 -1
  14. package/src/api/exporters/html/__snapshots__/simpleImage/basic/external.html +1 -1
  15. package/src/api/exporters/html/__snapshots__/simpleImage/basic/internal.html +1 -1
  16. package/src/api/exporters/html/__snapshots__/simpleImage/button/external.html +1 -1
  17. package/src/api/exporters/html/__snapshots__/simpleImage/button/internal.html +1 -1
  18. package/src/api/exporters/html/__snapshots__/simpleImage/nested/external.html +1 -1
  19. package/src/api/exporters/html/__snapshots__/simpleImage/nested/internal.html +1 -1
  20. package/src/api/exporters/html/util/sharedHTMLConversion.ts +1 -0
  21. package/src/api/exporters/markdown/__snapshots__/simpleImage/button/markdown.md +0 -1
  22. package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +9 -0
  23. package/src/api/parsers/pasteExtension.ts +0 -1
  24. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +19 -19
  25. package/src/editor/Block.css +19 -14
  26. package/src/editor/BlockNoteEditor.ts +11 -12
  27. package/src/editor/editor.css +1 -0
  28. package/src/extensions/NonEditableBlocks/NonEditableBlockPlugin.ts +12 -1
  29. package/src/extensions/SideMenu/SideMenuPlugin.ts +2 -2
  30. package/src/extensions/TableHandles/TableHandlesPlugin.ts +3 -1
  31. package/src/pm-nodes/BlockContainer.ts +1 -1
  32. package/types/src/api/blockManipulation/blockManipulation.d.ts +8 -6
  33. package/types/src/editor/BlockNoteEditor.d.ts +9 -7
  34. package/types/src/BlockNoteEditor.d.ts +0 -300
  35. package/types/src/BlockNoteEditor.test.d.ts +0 -1
  36. package/types/src/BlockNoteExtensions.d.ts +0 -26
  37. package/types/src/api/nodeConversions/testUtil.d.ts +0 -7
  38. package/types/src/api/testCases/cases/customBlocks.d.ts +0 -345
  39. package/types/src/api/testCases/cases/customInlineContent.d.ts +0 -29
  40. package/types/src/api/testCases/cases/customStyles.d.ts +0 -64
  41. package/types/src/api/testCases/cases/defaultSchema.d.ts +0 -3
  42. package/types/src/api/testCases/index.d.ts +0 -12
  43. package/types/src/api/util/nodeUtil.d.ts +0 -8
  44. package/types/src/extensions/Blocks/NonEditableBlockPlugin.d.ts +0 -2
  45. package/types/src/extensions/Blocks/PreviousBlockTypePlugin.d.ts +0 -14
  46. package/types/src/extensions/Blocks/api/blocks/createSpec.d.ts +0 -35
  47. package/types/src/extensions/Blocks/api/blocks/internal.d.ts +0 -45
  48. package/types/src/extensions/Blocks/api/blocks/types.d.ts +0 -114
  49. package/types/src/extensions/Blocks/api/cursorPositionTypes.d.ts +0 -8
  50. package/types/src/extensions/Blocks/api/defaultBlocks.d.ts +0 -577
  51. package/types/src/extensions/Blocks/api/defaultProps.d.ts +0 -15
  52. package/types/src/extensions/Blocks/api/inlineContent/createSpec.d.ts +0 -21
  53. package/types/src/extensions/Blocks/api/inlineContent/internal.d.ts +0 -25
  54. package/types/src/extensions/Blocks/api/inlineContent/types.d.ts +0 -62
  55. package/types/src/extensions/Blocks/api/selectionTypes.d.ts +0 -6
  56. package/types/src/extensions/Blocks/api/styles/createSpec.d.ts +0 -13
  57. package/types/src/extensions/Blocks/api/styles/internal.d.ts +0 -22
  58. package/types/src/extensions/Blocks/api/styles/types.d.ts +0 -21
  59. package/types/src/extensions/Blocks/helpers/findBlock.d.ts +0 -6
  60. package/types/src/extensions/Blocks/helpers/getBlockInfoFromPos.d.ts +0 -27
  61. package/types/src/extensions/Blocks/index.d.ts +0 -4
  62. package/types/src/extensions/Blocks/nodes/BlockAttributes.d.ts +0 -2
  63. package/types/src/extensions/Blocks/nodes/BlockContainer.d.ts +0 -30
  64. package/types/src/extensions/Blocks/nodes/BlockContent/HeadingBlockContent/HeadingBlockContent.d.ts +0 -58
  65. package/types/src/extensions/Blocks/nodes/BlockContent/ImageBlockContent/ImageBlockContent.d.ts +0 -95
  66. package/types/src/extensions/Blocks/nodes/BlockContent/ImageBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -1
  67. package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +0 -46
  68. package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/ListItemKeyboardShortcuts.d.ts +0 -2
  69. package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.d.ts +0 -2
  70. package/types/src/extensions/Blocks/nodes/BlockContent/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +0 -46
  71. package/types/src/extensions/Blocks/nodes/BlockContent/ParagraphBlockContent/ParagraphBlockContent.d.ts +0 -52
  72. package/types/src/extensions/Blocks/nodes/BlockContent/TableBlockContent/TableBlockContent.d.ts +0 -53
  73. package/types/src/extensions/Blocks/nodes/BlockContent/TableBlockContent/TableExtension.d.ts +0 -2
  74. package/types/src/extensions/Blocks/nodes/BlockContent/defaultBlockHelpers.d.ts +0 -12
  75. package/types/src/extensions/Blocks/nodes/BlockGroup.d.ts +0 -10
  76. package/types/src/shared/BaseUiElementTypes.d.ts +0 -7
  77. package/types/src/shared/EditorElement.d.ts +0 -0
  78. package/types/src/shared/EventEmitter.d.ts +0 -11
  79. package/types/src/shared/plugins/suggestion/SuggestionItem.d.ts +0 -3
  80. package/types/src/shared/plugins/suggestion/SuggestionPlugin.d.ts +0 -37
  81. package/types/src/shared/utils.d.ts +0 -6
@@ -1,62 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- import { PropSchema, Props } from "../blocks/types";
3
- import { StyleSchema, Styles } from "../styles/types";
4
- export type CustomInlineContentConfig = {
5
- type: string;
6
- content: "styled" | "none";
7
- readonly propSchema: PropSchema;
8
- };
9
- export type InlineContentConfig = CustomInlineContentConfig | "text" | "link";
10
- export type InlineContentImplementation<T extends InlineContentConfig> = T extends "link" | "text" ? undefined : {
11
- node: Node;
12
- };
13
- export type InlineContentSpec<T extends InlineContentConfig> = {
14
- config: T;
15
- implementation: InlineContentImplementation<T>;
16
- };
17
- export type InlineContentSchema = Record<string, InlineContentConfig>;
18
- export type InlineContentSpecs = {
19
- text: {
20
- config: "text";
21
- implementation: undefined;
22
- };
23
- link: {
24
- config: "link";
25
- implementation: undefined;
26
- };
27
- } & Record<string, InlineContentSpec<InlineContentConfig>>;
28
- export type InlineContentSchemaFromSpecs<T extends InlineContentSpecs> = {
29
- [K in keyof T]: T[K]["config"];
30
- };
31
- export type CustomInlineContentFromConfig<I extends CustomInlineContentConfig, S extends StyleSchema> = {
32
- type: I["type"];
33
- props: Props<I["propSchema"]>;
34
- content: I["content"] extends "styled" ? StyledText<S>[] : I["content"] extends "plain" ? string : I["content"] extends "none" ? undefined : never;
35
- };
36
- export type InlineContentFromConfig<I extends InlineContentConfig, S extends StyleSchema> = I extends "text" ? StyledText<S> : I extends "link" ? Link<S> : I extends CustomInlineContentConfig ? CustomInlineContentFromConfig<I, S> : never;
37
- export type PartialCustomInlineContentFromConfig<I extends CustomInlineContentConfig, S extends StyleSchema> = {
38
- type: I["type"];
39
- props?: Props<I["propSchema"]>;
40
- content: I["content"] extends "styled" ? StyledText<S>[] | string : I["content"] extends "plain" ? string : I["content"] extends "none" ? undefined : never;
41
- };
42
- export type PartialInlineContentFromConfig<I extends InlineContentConfig, S extends StyleSchema> = I extends "text" ? string | StyledText<S> : I extends "link" ? PartialLink<S> : I extends CustomInlineContentConfig ? PartialCustomInlineContentFromConfig<I, S> : never;
43
- export type StyledText<T extends StyleSchema> = {
44
- type: "text";
45
- text: string;
46
- styles: Styles<T>;
47
- };
48
- export type Link<T extends StyleSchema> = {
49
- type: "link";
50
- href: string;
51
- content: StyledText<T>[];
52
- };
53
- export type PartialLink<T extends StyleSchema> = Omit<Link<T>, "content"> & {
54
- content: string | Link<T>["content"];
55
- };
56
- export type InlineContent<I extends InlineContentSchema, T extends StyleSchema> = InlineContentFromConfig<I[keyof I], T>;
57
- type PartialInlineContentElement<I extends InlineContentSchema, T extends StyleSchema> = PartialInlineContentFromConfig<I[keyof I], T>;
58
- export type PartialInlineContent<I extends InlineContentSchema, T extends StyleSchema> = PartialInlineContentElement<I, T>[] | string;
59
- export declare function isLinkInlineContent<T extends StyleSchema>(content: InlineContent<any, T>): content is Link<T>;
60
- export declare function isPartialLinkInlineContent<T extends StyleSchema>(content: PartialInlineContentElement<any, T>): content is PartialLink<T>;
61
- export declare function isStyledTextInlineContent<T extends StyleSchema>(content: PartialInlineContentElement<any, T>): content is StyledText<T>;
62
- export {};
@@ -1,6 +0,0 @@
1
- import { Block, BlockSchema } from "./blocks/types";
2
- import { InlineContentSchema } from "./inlineContent/types";
3
- import { StyleSchema } from "./styles/types";
4
- export type Selection<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema> = {
5
- blocks: Block<BSchema, I, S>[];
6
- };
@@ -1,13 +0,0 @@
1
- import { ParseRule } from "@tiptap/pm/model";
2
- import { StyleConfig, StyleSpec } from "./types";
3
- export type CustomStyleImplementation<T extends StyleConfig> = {
4
- render: T["propSchema"] extends "boolean" ? () => {
5
- dom: HTMLElement;
6
- contentDOM?: HTMLElement;
7
- } : (value: string) => {
8
- dom: HTMLElement;
9
- contentDOM?: HTMLElement;
10
- };
11
- };
12
- export declare function getStyleParseRules(config: StyleConfig): ParseRule[];
13
- export declare function createStyleSpec<T extends StyleConfig>(styleConfig: T, styleImplementation: CustomStyleImplementation<T>): StyleSpec<T>;
@@ -1,22 +0,0 @@
1
- import { Attributes, Mark } from "@tiptap/core";
2
- import { StyleConfig, StyleImplementation, StylePropSchema, StyleSchemaFromSpecs, StyleSpecs } from "./types";
3
- export declare function stylePropsToAttributes(propSchema: StylePropSchema): Attributes;
4
- export declare function addStyleAttributes<SType extends string, PSchema extends StylePropSchema>(element: {
5
- dom: HTMLElement;
6
- contentDOM?: HTMLElement;
7
- }, styleType: SType, styleValue: PSchema extends "boolean" ? undefined : string, propSchema: PSchema): {
8
- dom: HTMLElement;
9
- contentDOM?: HTMLElement;
10
- };
11
- export declare function createInternalStyleSpec<T extends StyleConfig>(config: T, implementation: StyleImplementation): {
12
- config: T;
13
- implementation: StyleImplementation;
14
- };
15
- export declare function createStyleSpecFromTipTapMark<T extends Mark, P extends StylePropSchema>(mark: T, propSchema: P): {
16
- config: {
17
- type: T["name"];
18
- propSchema: P;
19
- };
20
- implementation: StyleImplementation;
21
- };
22
- export declare function getStyleSchemaFromSpecs<T extends StyleSpecs>(specs: T): StyleSchemaFromSpecs<T>;
@@ -1,21 +0,0 @@
1
- import { Mark } from "@tiptap/core";
2
- export type StylePropSchema = "boolean" | "string";
3
- export type StyleConfig = {
4
- type: string;
5
- readonly propSchema: StylePropSchema;
6
- };
7
- export type StyleImplementation = {
8
- mark: Mark;
9
- };
10
- export type StyleSpec<T extends StyleConfig> = {
11
- config: T;
12
- implementation: StyleImplementation;
13
- };
14
- export type StyleSchema = Record<string, StyleConfig>;
15
- export type StyleSpecs = Record<string, StyleSpec<StyleConfig>>;
16
- export type StyleSchemaFromSpecs<T extends StyleSpecs> = {
17
- [K in keyof T]: T[K]["config"];
18
- };
19
- export type Styles<T extends StyleSchema> = {
20
- [K in keyof T]?: T[K]["propSchema"] extends "boolean" ? boolean : T[K]["propSchema"] extends "string" ? string : never;
21
- };
@@ -1,6 +0,0 @@
1
- export declare const findBlock: (selection: import("prosemirror-state").Selection) => {
2
- pos: number;
3
- start: number;
4
- depth: number;
5
- node: import("prosemirror-model").Node;
6
- } | undefined;
@@ -1,27 +0,0 @@
1
- import { Node, NodeType } from "prosemirror-model";
2
- export type BlockInfoWithoutPositions = {
3
- id: string;
4
- node: Node;
5
- contentNode: Node;
6
- contentType: NodeType;
7
- numChildBlocks: number;
8
- };
9
- export type BlockInfo = BlockInfoWithoutPositions & {
10
- startPos: number;
11
- endPos: number;
12
- depth: number;
13
- };
14
- /**
15
- * Helper function for `getBlockInfoFromPos`, returns information regarding
16
- * provided blockContainer node.
17
- * @param blockContainer The blockContainer node to retrieve info for.
18
- */
19
- export declare function getBlockInfo(blockContainer: Node): BlockInfoWithoutPositions;
20
- /**
21
- * Retrieves information regarding the nearest blockContainer node in a
22
- * ProseMirror doc, relative to a position.
23
- * @param doc The ProseMirror doc.
24
- * @param pos An integer position.
25
- * @returns A BlockInfo object for the nearest blockContainer node.
26
- */
27
- export declare function getBlockInfoFromPos(doc: Node, pos: number): BlockInfo;
@@ -1,4 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- export { BlockContainer } from "./nodes/BlockContainer";
3
- export { BlockGroup } from "./nodes/BlockGroup";
4
- export declare const Doc: Node<any, any>;
@@ -1,2 +0,0 @@
1
- declare const BlockAttributes: Record<string, string>;
2
- export default BlockAttributes;
@@ -1,30 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- import { BlockNoteEditor } from "../../../BlockNoteEditor";
3
- import { BlockSchema, PartialBlock } from "../api/blocks/types";
4
- import { InlineContentSchema } from "../api/inlineContent/types";
5
- import { StyleSchema } from "../api/styles/types";
6
- declare module "@tiptap/core" {
7
- interface Commands<ReturnType> {
8
- block: {
9
- BNCreateBlock: (pos: number) => ReturnType;
10
- BNDeleteBlock: (posInBlock: number) => ReturnType;
11
- BNMergeBlocks: (posBetweenBlocks: number) => ReturnType;
12
- BNSplitBlock: (posInBlock: number, keepType: boolean) => ReturnType;
13
- BNUpdateBlock: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(posInBlock: number, block: PartialBlock<BSchema, I, S>) => ReturnType;
14
- BNCreateOrUpdateBlock: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(posInBlock: number, block: PartialBlock<BSchema, I, S>) => ReturnType;
15
- };
16
- }
17
- }
18
- /**
19
- * The main "Block node" documents consist of
20
- */
21
- export declare const BlockContainer: Node<{
22
- domAttributes?: Partial<{
23
- editor: Record<string, string>;
24
- blockContainer: Record<string, string>;
25
- blockGroup: Record<string, string>;
26
- blockContent: Record<string, string>;
27
- inlineContent: Record<string, string>;
28
- }> | undefined;
29
- editor: BlockNoteEditor<BlockSchema, InlineContentSchema, StyleSchema>;
30
- }, any>;
@@ -1,58 +0,0 @@
1
- export declare const headingPropSchema: {
2
- level: {
3
- default: number;
4
- values: readonly [1, 2, 3];
5
- };
6
- backgroundColor: {
7
- default: "default";
8
- };
9
- textColor: {
10
- default: "default";
11
- };
12
- textAlignment: {
13
- default: "left";
14
- values: readonly ["left", "center", "right", "justify"];
15
- };
16
- };
17
- export declare const Heading: {
18
- config: {
19
- type: "heading";
20
- content: "inline";
21
- propSchema: {
22
- level: {
23
- default: number;
24
- values: readonly [1, 2, 3];
25
- };
26
- backgroundColor: {
27
- default: "default";
28
- };
29
- textColor: {
30
- default: "default";
31
- };
32
- textAlignment: {
33
- default: "left";
34
- values: readonly ["left", "center", "right", "justify"];
35
- };
36
- };
37
- };
38
- implementation: import("../../../api/blocks/types").TiptapBlockImplementation<{
39
- type: "heading";
40
- content: "inline";
41
- propSchema: {
42
- level: {
43
- default: number;
44
- values: readonly [1, 2, 3];
45
- };
46
- backgroundColor: {
47
- default: "default";
48
- };
49
- textColor: {
50
- default: "default";
51
- };
52
- textAlignment: {
53
- default: "left";
54
- values: readonly ["left", "center", "right", "justify"];
55
- };
56
- };
57
- }, any, import("../../../../..").InlineContentSchema, import("../../../../..").StyleSchema>;
58
- };
@@ -1,95 +0,0 @@
1
- import { BlockNoteEditor } from "../../../../../BlockNoteEditor";
2
- import { BlockFromConfig, BlockSchemaWithBlock } from "../../../api/blocks/types";
3
- import { InlineContentSchema } from "../../../api/inlineContent/types";
4
- import { StyleSchema } from "../../../api/styles/types";
5
- export declare const imagePropSchema: {
6
- textAlignment: {
7
- default: "left";
8
- values: readonly ["left", "center", "right", "justify"];
9
- };
10
- backgroundColor: {
11
- default: "default";
12
- };
13
- url: {
14
- default: "";
15
- };
16
- caption: {
17
- default: "";
18
- };
19
- width: {
20
- default: 512;
21
- };
22
- };
23
- declare const blockConfig: {
24
- type: "image";
25
- propSchema: {
26
- textAlignment: {
27
- default: "left";
28
- values: readonly ["left", "center", "right", "justify"];
29
- };
30
- backgroundColor: {
31
- default: "default";
32
- };
33
- url: {
34
- default: "";
35
- };
36
- caption: {
37
- default: "";
38
- };
39
- width: {
40
- default: 512;
41
- };
42
- };
43
- content: "none";
44
- };
45
- export declare const renderImage: (block: BlockFromConfig<typeof blockConfig, InlineContentSchema, StyleSchema>, editor: BlockNoteEditor<BlockSchemaWithBlock<"image", typeof blockConfig>>) => {
46
- dom: HTMLDivElement;
47
- destroy: () => void;
48
- };
49
- export declare const Image: {
50
- config: {
51
- type: "image";
52
- propSchema: {
53
- textAlignment: {
54
- default: "left";
55
- values: readonly ["left", "center", "right", "justify"];
56
- };
57
- backgroundColor: {
58
- default: "default";
59
- };
60
- url: {
61
- default: "";
62
- };
63
- caption: {
64
- default: "";
65
- };
66
- width: {
67
- default: 512;
68
- };
69
- };
70
- content: "none";
71
- };
72
- implementation: import("../../../api/blocks/types").TiptapBlockImplementation<{
73
- type: "image";
74
- propSchema: {
75
- textAlignment: {
76
- default: "left";
77
- values: readonly ["left", "center", "right", "justify"];
78
- };
79
- backgroundColor: {
80
- default: "default";
81
- };
82
- url: {
83
- default: "";
84
- };
85
- caption: {
86
- default: "";
87
- };
88
- width: {
89
- default: 512;
90
- };
91
- };
92
- content: "none";
93
- }, any, InlineContentSchema, StyleSchema>;
94
- };
95
- export {};
@@ -1 +0,0 @@
1
- export declare const uploadToTmpFilesDotOrg_DEV_ONLY: (file: File) => Promise<any>;
@@ -1,46 +0,0 @@
1
- export declare const bulletListItemPropSchema: {
2
- backgroundColor: {
3
- default: "default";
4
- };
5
- textColor: {
6
- default: "default";
7
- };
8
- textAlignment: {
9
- default: "left";
10
- values: readonly ["left", "center", "right", "justify"];
11
- };
12
- };
13
- export declare const BulletListItem: {
14
- config: {
15
- type: "bulletListItem";
16
- content: "inline";
17
- propSchema: {
18
- backgroundColor: {
19
- default: "default";
20
- };
21
- textColor: {
22
- default: "default";
23
- };
24
- textAlignment: {
25
- default: "left";
26
- values: readonly ["left", "center", "right", "justify"];
27
- };
28
- };
29
- };
30
- implementation: import("../../../../api/blocks/types").TiptapBlockImplementation<{
31
- type: "bulletListItem";
32
- content: "inline";
33
- propSchema: {
34
- backgroundColor: {
35
- default: "default";
36
- };
37
- textColor: {
38
- default: "default";
39
- };
40
- textAlignment: {
41
- default: "left";
42
- values: readonly ["left", "center", "right", "justify"];
43
- };
44
- };
45
- }, any, import("../../../../../..").InlineContentSchema, import("../../../../../..").StyleSchema>;
46
- };
@@ -1,2 +0,0 @@
1
- import { Editor } from "@tiptap/core";
2
- export declare const handleEnter: (editor: Editor) => boolean;
@@ -1,2 +0,0 @@
1
- import { Plugin } from "prosemirror-state";
2
- export declare const NumberedListIndexingPlugin: () => Plugin<any>;
@@ -1,46 +0,0 @@
1
- export declare const numberedListItemPropSchema: {
2
- backgroundColor: {
3
- default: "default";
4
- };
5
- textColor: {
6
- default: "default";
7
- };
8
- textAlignment: {
9
- default: "left";
10
- values: readonly ["left", "center", "right", "justify"];
11
- };
12
- };
13
- export declare const NumberedListItem: {
14
- config: {
15
- type: "numberedListItem";
16
- content: "inline";
17
- propSchema: {
18
- backgroundColor: {
19
- default: "default";
20
- };
21
- textColor: {
22
- default: "default";
23
- };
24
- textAlignment: {
25
- default: "left";
26
- values: readonly ["left", "center", "right", "justify"];
27
- };
28
- };
29
- };
30
- implementation: import("../../../../api/blocks/types").TiptapBlockImplementation<{
31
- type: "numberedListItem";
32
- content: "inline";
33
- propSchema: {
34
- backgroundColor: {
35
- default: "default";
36
- };
37
- textColor: {
38
- default: "default";
39
- };
40
- textAlignment: {
41
- default: "left";
42
- values: readonly ["left", "center", "right", "justify"];
43
- };
44
- };
45
- }, any, import("../../../../../..").InlineContentSchema, import("../../../../../..").StyleSchema>;
46
- };
@@ -1,52 +0,0 @@
1
- export declare const paragraphPropSchema: {
2
- backgroundColor: {
3
- default: "default";
4
- };
5
- textColor: {
6
- default: "default";
7
- };
8
- textAlignment: {
9
- default: "left";
10
- values: readonly ["left", "center", "right", "justify"];
11
- };
12
- };
13
- export declare const ParagraphBlockContent: import("@tiptap/core").Node<any, any> & {
14
- name: "paragraph";
15
- config: {
16
- content: "inline*";
17
- };
18
- };
19
- export declare const Paragraph: {
20
- config: {
21
- type: "paragraph";
22
- content: "inline";
23
- propSchema: {
24
- backgroundColor: {
25
- default: "default";
26
- };
27
- textColor: {
28
- default: "default";
29
- };
30
- textAlignment: {
31
- default: "left";
32
- values: readonly ["left", "center", "right", "justify"];
33
- };
34
- };
35
- };
36
- implementation: import("../../../../..").TiptapBlockImplementation<{
37
- type: "paragraph";
38
- content: "inline";
39
- propSchema: {
40
- backgroundColor: {
41
- default: "default";
42
- };
43
- textColor: {
44
- default: "default";
45
- };
46
- textAlignment: {
47
- default: "left";
48
- values: readonly ["left", "center", "right", "justify"];
49
- };
50
- };
51
- }, any, import("../../../../..").InlineContentSchema, import("../../../../..").StyleSchema>;
52
- };
@@ -1,53 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- export declare const tablePropSchema: {
3
- backgroundColor: {
4
- default: "default";
5
- };
6
- textColor: {
7
- default: "default";
8
- };
9
- textAlignment: {
10
- default: "left";
11
- values: readonly ["left", "center", "right", "justify"];
12
- };
13
- };
14
- export declare const TableBlockContent: Node<any, any> & {
15
- name: "table";
16
- config: {
17
- content: "tableRow+";
18
- };
19
- };
20
- export declare const Table: {
21
- config: {
22
- type: "table";
23
- content: "table";
24
- propSchema: {
25
- backgroundColor: {
26
- default: "default";
27
- };
28
- textColor: {
29
- default: "default";
30
- };
31
- textAlignment: {
32
- default: "left";
33
- values: readonly ["left", "center", "right", "justify"];
34
- };
35
- };
36
- };
37
- implementation: import("../../../../..").TiptapBlockImplementation<{
38
- type: "table";
39
- content: "table";
40
- propSchema: {
41
- backgroundColor: {
42
- default: "default";
43
- };
44
- textColor: {
45
- default: "default";
46
- };
47
- textAlignment: {
48
- default: "left";
49
- values: readonly ["left", "center", "right", "justify"];
50
- };
51
- };
52
- }, any, import("../../../../..").InlineContentSchema, import("../../../../..").StyleSchema>;
53
- };
@@ -1,2 +0,0 @@
1
- import { Extension } from "@tiptap/core";
2
- export declare const TableExtension: Extension<any, any>;
@@ -1,12 +0,0 @@
1
- import { BlockNoteEditor } from "../../../../BlockNoteEditor";
2
- import { Block } from "../../api/blocks/types";
3
- import { InlineContentSchema } from "../../api/inlineContent/types";
4
- import { StyleSchema } from "../../api/styles/types";
5
- export declare function createDefaultBlockDOMOutputSpec(blockName: string, htmlTag: string, blockContentHTMLAttributes: Record<string, string>, inlineContentHTMLAttributes: Record<string, string>): {
6
- dom: HTMLDivElement;
7
- contentDOM: HTMLElement;
8
- };
9
- export declare const defaultBlockToHTML: <BSchema extends Record<string, import("../../api/blocks/types").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(block: Block<BSchema, I, S>, editor: BlockNoteEditor<BSchema, I, S>) => {
10
- dom: HTMLElement;
11
- contentDOM?: HTMLElement;
12
- };
@@ -1,10 +0,0 @@
1
- import { Node } from "@tiptap/core";
2
- export declare const BlockGroup: Node<{
3
- domAttributes?: Partial<{
4
- editor: Record<string, string>;
5
- blockContainer: Record<string, string>;
6
- blockGroup: Record<string, string>;
7
- blockContent: Record<string, string>;
8
- inlineContent: Record<string, string>;
9
- }> | undefined;
10
- }, any>;
@@ -1,7 +0,0 @@
1
- export type BaseUiElementCallbacks = {
2
- destroy: () => void;
3
- };
4
- export type BaseUiElementState = {
5
- show: boolean;
6
- referencePos: DOMRect;
7
- };
File without changes
@@ -1,11 +0,0 @@
1
- type StringKeyOf<T> = Extract<keyof T, string>;
2
- type CallbackType<T extends Record<string, any>, EventName extends StringKeyOf<T>> = T[EventName] extends any[] ? T[EventName] : [T[EventName]];
3
- type CallbackFunction<T extends Record<string, any>, EventName extends StringKeyOf<T>> = (...props: CallbackType<T, EventName>) => any;
4
- export declare class EventEmitter<T extends Record<string, any>> {
5
- private callbacks;
6
- on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): () => void;
7
- protected emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): void;
8
- off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): void;
9
- protected removeAllListeners(): void;
10
- }
11
- export {};
@@ -1,3 +0,0 @@
1
- export type SuggestionItem = {
2
- name: string;
3
- };