@blocknote/core 0.38.0 → 0.39.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 (225) hide show
  1. package/dist/BlockNoteSchema-DmZ6UQfY.cjs +11 -0
  2. package/dist/BlockNoteSchema-DmZ6UQfY.cjs.map +1 -0
  3. package/dist/BlockNoteSchema-oR047ACf.js +4275 -0
  4. package/dist/BlockNoteSchema-oR047ACf.js.map +1 -0
  5. package/dist/blocknote.cjs +4 -12
  6. package/dist/blocknote.cjs.map +1 -1
  7. package/dist/blocknote.js +3296 -7187
  8. package/dist/blocknote.js.map +1 -1
  9. package/dist/blocks.cjs +2 -0
  10. package/dist/blocks.cjs.map +1 -0
  11. package/dist/blocks.js +71 -0
  12. package/dist/blocks.js.map +1 -0
  13. package/dist/style.css +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/dist/webpack-stats.json +1 -1
  16. package/package.json +19 -16
  17. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +1 -1
  18. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +2 -2
  19. package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +34 -25
  20. package/src/api/blockManipulation/setupTestEnv.ts +0 -1
  21. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +4 -8
  22. package/src/api/clipboard/toClipboard/copyExtension.ts +1 -1
  23. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +128 -28
  24. package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +101 -41
  25. package/src/api/pmUtil.ts +1 -1
  26. package/src/api/positionMapping.test.ts +58 -15
  27. package/src/api/positionMapping.ts +2 -4
  28. package/src/blocks/Audio/block.ts +174 -0
  29. package/src/blocks/BlockNoteSchema.ts +59 -0
  30. package/src/blocks/Code/block.ts +303 -0
  31. package/src/blocks/Code/shiki.ts +73 -0
  32. package/src/blocks/File/block.ts +98 -0
  33. package/src/blocks/{FileBlockContent → File}/helpers/render/createAddFileButton.ts +5 -2
  34. package/src/blocks/{FileBlockContent → File}/helpers/render/createFileBlockWrapper.ts +15 -6
  35. package/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.ts +15 -2
  36. package/src/blocks/{FileBlockContent → File}/helpers/render/createResizableFileBlockWrapper.ts +21 -2
  37. package/src/blocks/Heading/block.ts +138 -0
  38. package/src/blocks/Image/block.ts +190 -0
  39. package/src/blocks/ListItem/BulletListItem/block.ts +116 -0
  40. package/src/blocks/ListItem/CheckListItem/block.ts +175 -0
  41. package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +173 -0
  42. package/src/blocks/ListItem/NumberedListItem/block.ts +133 -0
  43. package/src/blocks/ListItem/ToggleListItem/block.ts +78 -0
  44. package/src/blocks/PageBreak/block.ts +72 -0
  45. package/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.ts +9 -7
  46. package/src/blocks/Paragraph/block.ts +80 -0
  47. package/src/blocks/Quote/block.ts +90 -0
  48. package/src/blocks/{TableBlockContent/TableBlockContent.ts → Table/block.ts} +169 -51
  49. package/src/blocks/ToggleWrapper/createToggleWrapper.ts +1 -1
  50. package/src/blocks/Video/block.ts +143 -0
  51. package/src/blocks/defaultBlockHelpers.ts +2 -2
  52. package/src/blocks/defaultBlockTypeGuards.ts +143 -174
  53. package/src/blocks/defaultBlocks.ts +107 -35
  54. package/src/blocks/defaultProps.ts +145 -4
  55. package/src/blocks/index.ts +26 -0
  56. package/src/blocks/utils/listItemEnterHandler.ts +42 -0
  57. package/src/editor/Block.css +54 -18
  58. package/src/editor/BlockNoteEditor.ts +251 -210
  59. package/src/editor/BlockNoteExtension.ts +92 -0
  60. package/src/editor/BlockNoteExtensions.ts +18 -17
  61. package/src/editor/defaultColors.ts +2 -2
  62. package/src/exporter/Exporter.ts +1 -1
  63. package/src/exporter/mapping.ts +1 -1
  64. package/src/extensions/BackgroundColor/BackgroundColorExtension.ts +3 -20
  65. package/src/extensions/BackgroundColor/BackgroundColorMark.ts +6 -8
  66. package/src/extensions/BlockChange/BlockChangePlugin.ts +2 -1
  67. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +2 -2
  68. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +2 -2
  69. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -1
  70. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -1
  71. package/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.ts +52 -0
  72. package/src/extensions/Collaboration/schemaMigration/migrationRules/index.ts +4 -0
  73. package/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.ts +4 -0
  74. package/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.ts +78 -0
  75. package/src/extensions/Comments/CommentsPlugin.ts +1 -1
  76. package/src/extensions/FilePanel/FilePanelPlugin.ts +5 -10
  77. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +1 -1
  78. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +4 -3
  79. package/src/extensions/Placeholder/PlaceholderPlugin.ts +2 -2
  80. package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +1 -23
  81. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +0 -5
  82. package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +6 -2
  83. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +24 -17
  84. package/src/extensions/TableHandles/TableHandlesPlugin.ts +2 -2
  85. package/src/extensions/TextAlignment/TextAlignmentExtension.ts +5 -11
  86. package/src/extensions/TextColor/TextColorExtension.ts +3 -17
  87. package/src/extensions/TextColor/TextColorMark.ts +4 -9
  88. package/src/extensions/UniqueID/UniqueID.ts +6 -13
  89. package/src/index.ts +2 -28
  90. package/src/schema/blocks/createSpec.ts +342 -169
  91. package/src/schema/blocks/internal.ts +77 -138
  92. package/src/schema/blocks/types.ts +264 -94
  93. package/src/schema/index.ts +1 -0
  94. package/src/schema/inlineContent/createSpec.ts +99 -21
  95. package/src/schema/inlineContent/internal.ts +16 -7
  96. package/src/schema/inlineContent/types.ts +24 -2
  97. package/src/schema/propTypes.ts +15 -9
  98. package/src/schema/schema.ts +209 -0
  99. package/src/schema/styles/createSpec.ts +79 -31
  100. package/src/schema/styles/internal.ts +61 -2
  101. package/src/schema/styles/types.ts +17 -3
  102. package/src/util/topo-sort.test.ts +125 -0
  103. package/src/util/topo-sort.ts +160 -0
  104. package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.d.ts +2 -1
  105. package/types/src/api/blockManipulation/selections/selection.d.ts +1 -1
  106. package/types/src/api/blockManipulation/setupTestEnv.d.ts +29 -543
  107. package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
  108. package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
  109. package/types/src/api/pmUtil.d.ts +1 -1
  110. package/types/src/blocks/Audio/block.d.ts +58 -0
  111. package/types/src/blocks/BlockNoteSchema.d.ts +18 -0
  112. package/types/src/blocks/{CodeBlockContent/CodeBlockContent.d.ts → Code/block.d.ts} +25 -26
  113. package/types/src/blocks/Code/shiki.d.ts +4 -0
  114. package/types/src/blocks/File/block.d.ts +37 -0
  115. package/types/src/blocks/File/helpers/render/createAddFileButton.d.ts +6 -0
  116. package/types/src/blocks/File/helpers/render/createFileBlockWrapper.d.ts +25 -0
  117. package/types/src/blocks/{FileBlockContent → File}/helpers/render/createFileNameWithIcon.d.ts +6 -2
  118. package/types/src/blocks/File/helpers/render/createResizableFileBlockWrapper.d.ts +31 -0
  119. package/types/src/blocks/Heading/block.d.ts +71 -0
  120. package/types/src/blocks/Image/block.d.ts +102 -0
  121. package/types/src/blocks/ListItem/BulletListItem/block.d.ts +25 -0
  122. package/types/src/blocks/ListItem/CheckListItem/block.d.ts +33 -0
  123. package/types/src/blocks/ListItem/NumberedListItem/IndexingPlugin.d.ts +8 -0
  124. package/types/src/blocks/ListItem/NumberedListItem/block.d.ts +33 -0
  125. package/types/src/blocks/ListItem/ToggleListItem/block.d.ts +25 -0
  126. package/types/src/blocks/PageBreak/block.d.ts +11 -0
  127. package/types/src/blocks/{PageBreakBlockContent → PageBreak}/getPageBreakSlashMenuItems.d.ts +4 -2
  128. package/types/src/blocks/Paragraph/block.d.ts +25 -0
  129. package/types/src/blocks/Quote/block.d.ts +17 -0
  130. package/types/src/blocks/Table/block.d.ts +21 -0
  131. package/types/src/blocks/Video/block.d.ts +67 -0
  132. package/types/src/blocks/defaultBlockHelpers.d.ts +1 -1
  133. package/types/src/blocks/defaultBlockTypeGuards.d.ts +15 -36
  134. package/types/src/blocks/defaultBlocks.d.ts +221 -1060
  135. package/types/src/blocks/defaultProps.d.ts +17 -1
  136. package/types/src/blocks/index.d.ts +24 -0
  137. package/types/src/blocks/utils/listItemEnterHandler.d.ts +2 -0
  138. package/types/src/editor/BlockNoteEditor.d.ts +33 -66
  139. package/types/src/editor/BlockNoteExtension.d.ts +67 -0
  140. package/types/src/editor/BlockNoteExtensions.d.ts +1 -1
  141. package/types/src/editor/defaultColors.d.ts +8 -76
  142. package/types/src/exporter/Exporter.d.ts +1 -1
  143. package/types/src/exporter/mapping.d.ts +1 -1
  144. package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +4 -1
  145. package/types/src/extensions/Collaboration/schemaMigration/SchemaMigrationPlugin.d.ts +7 -0
  146. package/types/src/extensions/Collaboration/schemaMigration/migrationRules/index.d.ts +3 -0
  147. package/types/src/extensions/Collaboration/schemaMigration/migrationRules/migrationRule.d.ts +3 -0
  148. package/types/src/extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.d.ts +2 -0
  149. package/types/src/extensions/Comments/CommentsPlugin.d.ts +1 -1
  150. package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +4 -4
  151. package/types/src/extensions/TextColor/TextColorMark.d.ts +4 -1
  152. package/types/src/index.d.ts +2 -25
  153. package/types/src/schema/blocks/createSpec.d.ts +16 -36
  154. package/types/src/schema/blocks/internal.d.ts +11 -33
  155. package/types/src/schema/blocks/types.d.ts +181 -57
  156. package/types/src/schema/index.d.ts +1 -0
  157. package/types/src/schema/inlineContent/createSpec.d.ts +36 -2
  158. package/types/src/schema/inlineContent/internal.d.ts +7 -15
  159. package/types/src/schema/inlineContent/types.d.ts +15 -1
  160. package/types/src/schema/propTypes.d.ts +4 -4
  161. package/types/src/schema/schema.d.ts +40 -0
  162. package/types/src/schema/styles/createSpec.d.ts +6 -4
  163. package/types/src/schema/styles/internal.d.ts +6 -3
  164. package/types/src/schema/styles/types.d.ts +11 -2
  165. package/types/src/util/topo-sort.d.ts +18 -0
  166. package/types/src/util/topo-sort.test.d.ts +1 -0
  167. package/src/blocks/AudioBlockContent/AudioBlockContent.ts +0 -144
  168. package/src/blocks/CodeBlockContent/CodeBlockContent.ts +0 -445
  169. package/src/blocks/FileBlockContent/FileBlockContent.ts +0 -100
  170. package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +0 -159
  171. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +0 -159
  172. package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +0 -134
  173. package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +0 -299
  174. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +0 -86
  175. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +0 -172
  176. package/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.ts +0 -104
  177. package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +0 -49
  178. package/src/blocks/PageBreakBlockContent/schema.ts +0 -40
  179. package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +0 -78
  180. package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +0 -121
  181. package/src/blocks/VideoBlockContent/VideoBlockContent.ts +0 -158
  182. package/src/editor/BlockNoteSchema.ts +0 -107
  183. package/src/editor/BlockNoteTipTapEditor.ts +0 -335
  184. package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +0 -99
  185. package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +0 -90
  186. package/types/src/blocks/FileBlockContent/helpers/render/createAddFileButton.d.ts +0 -6
  187. package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +0 -9
  188. package/types/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.d.ts +0 -9
  189. package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +0 -67
  190. package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +0 -131
  191. package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +0 -46
  192. package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +0 -55
  193. package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.d.ts +0 -2
  194. package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +0 -58
  195. package/types/src/blocks/ListItemBlockContent/ToggleListItemBlockContent/ToggleListItemBlockContent.d.ts +0 -46
  196. package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +0 -31
  197. package/types/src/blocks/PageBreakBlockContent/schema.d.ts +0 -86
  198. package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +0 -52
  199. package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +0 -52
  200. package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +0 -39
  201. package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +0 -131
  202. package/types/src/editor/BlockNoteSchema.d.ts +0 -34
  203. package/types/src/editor/BlockNoteTipTapEditor.d.ts +0 -43
  204. /package/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.ts +0 -0
  205. /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.ts +0 -0
  206. /package/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.ts +0 -0
  207. /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.ts +0 -0
  208. /package/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.ts +0 -0
  209. /package/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.ts +0 -0
  210. /package/src/blocks/{ImageBlockContent → Image}/parseImageElement.ts +0 -0
  211. /package/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.ts +0 -0
  212. /package/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.ts +0 -0
  213. /package/src/blocks/{TableBlockContent → Table}/TableExtension.ts +0 -0
  214. /package/src/blocks/{VideoBlockContent → Video}/parseVideoElement.ts +0 -0
  215. /package/types/src/blocks/{AudioBlockContent → Audio}/parseAudioElement.d.ts +0 -0
  216. /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseEmbedElement.d.ts +0 -0
  217. /package/types/src/blocks/{FileBlockContent → File}/helpers/parse/parseFigureElement.d.ts +0 -0
  218. /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createFigureWithCaption.d.ts +0 -0
  219. /package/types/src/blocks/{FileBlockContent → File}/helpers/toExternalHTML/createLinkWithCaption.d.ts +0 -0
  220. /package/types/src/blocks/{FileBlockContent → File/helpers}/uploadToTmpFilesDotOrg_DEV_ONLY.d.ts +0 -0
  221. /package/types/src/blocks/{ImageBlockContent → Image}/parseImageElement.d.ts +0 -0
  222. /package/types/src/blocks/{ListItemBlockContent → ListItem}/ListItemKeyboardShortcuts.d.ts +0 -0
  223. /package/types/src/blocks/{ListItemBlockContent → ListItem}/getListItemContent.d.ts +0 -0
  224. /package/types/src/blocks/{TableBlockContent → Table}/TableExtension.d.ts +0 -0
  225. /package/types/src/blocks/{VideoBlockContent → Video}/parseVideoElement.d.ts +0 -0
@@ -1,3 +1,4 @@
1
+ import { Attribute } from "@tiptap/core";
1
2
  import type { Props } from "../schema/index.js";
2
3
  export declare const defaultProps: {
3
4
  backgroundColor: {
@@ -12,4 +13,19 @@ export declare const defaultProps: {
12
13
  };
13
14
  };
14
15
  export type DefaultProps = Props<typeof defaultProps>;
15
- export declare const inheritedProps: string[];
16
+ export declare const parseDefaultProps: (element: HTMLElement) => Partial<Props<{
17
+ backgroundColor: {
18
+ default: "default";
19
+ };
20
+ textColor: {
21
+ default: "default";
22
+ };
23
+ textAlignment: {
24
+ default: "left";
25
+ values: readonly ["left", "center", "right", "justify"];
26
+ };
27
+ }>>;
28
+ export declare const addDefaultPropsExternalHTML: (props: Partial<DefaultProps>, element: HTMLElement) => void;
29
+ export declare const getBackgroundColorAttribute: (attributeName?: string) => Attribute;
30
+ export declare const getTextColorAttribute: (attributeName?: string) => Attribute;
31
+ export declare const getTextAlignmentAttribute: (attributeName?: string) => Attribute;
@@ -0,0 +1,24 @@
1
+ export * from "./Audio/block.js";
2
+ export * from "./Audio/parseAudioElement.js";
3
+ export * from "./Code/block.js";
4
+ export * from "./File/block.js";
5
+ export * from "./Heading/block.js";
6
+ export * from "./Image/block.js";
7
+ export * from "./ListItem/BulletListItem/block.js";
8
+ export * from "./ListItem/CheckListItem/block.js";
9
+ export * from "./ListItem/NumberedListItem/block.js";
10
+ export * from "./ListItem/ToggleListItem/block.js";
11
+ export * from "./PageBreak/block.js";
12
+ export * from "./Paragraph/block.js";
13
+ export * from "./Quote/block.js";
14
+ export * from "./Table/block.js";
15
+ export * from "./Video/block.js";
16
+ export { EMPTY_CELL_HEIGHT, EMPTY_CELL_WIDTH } from "./Table/TableExtension.js";
17
+ export * from "./ToggleWrapper/createToggleWrapper.js";
18
+ export * from "./File/helpers/uploadToTmpFilesDotOrg_DEV_ONLY.js";
19
+ export * from "./PageBreak/getPageBreakSlashMenuItems.js";
20
+ export * from "./BlockNoteSchema.js";
21
+ export * from "./defaultBlockHelpers.js";
22
+ export * from "./defaultBlocks.js";
23
+ export * from "./defaultBlockTypeGuards.js";
24
+ export * from "./defaultProps.js";
@@ -0,0 +1,2 @@
1
+ import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
2
+ export declare const handleEnter: (editor: BlockNoteEditor<any, any, any>, listItemType: string) => boolean;
@@ -1,7 +1,10 @@
1
- import { AnyExtension, EditorOptions } from "@tiptap/core";
1
+ import { AnyExtension, EditorOptions, Editor as TiptapEditor } from "@tiptap/core";
2
+ import { type Command, type Plugin, type Transaction } from "@tiptap/pm/state";
2
3
  import { Node, Schema } from "prosemirror-model";
3
4
  import * as Y from "yjs";
4
- import { Block, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from "../blocks/defaultBlocks.js";
5
+ import { BlocksChanged } from "../api/getBlocksChangedByTransaction.js";
6
+ import type { ThreadStore, User } from "../comments/index.js";
7
+ import type { ForkYDocPlugin } from "../extensions/Collaboration/ForkYDocPlugin.js";
5
8
  import type { CommentsPlugin } from "../extensions/Comments/CommentsPlugin.js";
6
9
  import { FilePanelProsemirrorPlugin } from "../extensions/FilePanel/FilePanelPlugin.js";
7
10
  import { FormattingToolbarProsemirrorPlugin } from "../extensions/FormattingToolbar/FormattingToolbarPlugin.js";
@@ -9,21 +12,15 @@ import { LinkToolbarProsemirrorPlugin } from "../extensions/LinkToolbar/LinkTool
9
12
  import { SideMenuProsemirrorPlugin } from "../extensions/SideMenu/SideMenuPlugin.js";
10
13
  import { SuggestionMenuProseMirrorPlugin } from "../extensions/SuggestionMenu/SuggestionPlugin.js";
11
14
  import { TableHandlesProsemirrorPlugin } from "../extensions/TableHandles/TableHandlesPlugin.js";
12
- import { BlockIdentifier, BlockNoteDOMAttributes, BlockSchema, BlockSpecs, InlineContentSchema, InlineContentSpecs, PartialInlineContent, Styles, StyleSchema, StyleSpecs } from "../schema/index.js";
13
- import { NoInfer } from "../util/typescript.js";
14
- import { TextCursorPosition } from "./cursorPositionTypes.js";
15
- import { Selection } from "./selectionTypes.js";
16
- import { BlockNoteSchema } from "./BlockNoteSchema.js";
17
- import { BlockNoteTipTapEditor } from "./BlockNoteTipTapEditor.js";
18
15
  import { Dictionary } from "../i18n/dictionary.js";
19
- import { type Command, type Plugin, type Transaction } from "@tiptap/pm/state";
20
- import { EditorView } from "prosemirror-view";
21
- import { BlocksChanged } from "../api/getBlocksChangedByTransaction.js";
22
- import { CodeBlockOptions } from "../blocks/CodeBlockContent/CodeBlockContent.js";
23
- import type { ThreadStore, User } from "../comments/index.js";
24
- import type { ForkYDocPlugin } from "../extensions/Collaboration/ForkYDocPlugin.js";
16
+ import { BlockIdentifier, BlockNoteDOMAttributes, BlockSchema, BlockSpecs, CustomBlockNoteSchema, InlineContentSchema, InlineContentSpecs, PartialInlineContent, Styles, StyleSchema, StyleSpecs } from "../schema/index.js";
17
+ import "../style.css";
25
18
  import { EventEmitter } from "../util/EventEmitter.js";
19
+ import { NoInfer } from "../util/typescript.js";
26
20
  import { BlockNoteExtension } from "./BlockNoteExtension.js";
21
+ import { TextCursorPosition } from "./cursorPositionTypes.js";
22
+ import { Selection } from "./selectionTypes.js";
23
+ import { Block, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from "../blocks/index.js";
27
24
  import "../style.css";
28
25
  /**
29
26
  * A factory function that returns a BlockNoteExtension
@@ -77,10 +74,6 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
77
74
  */
78
75
  showCursorLabels?: "always" | "activity";
79
76
  };
80
- /**
81
- * Options for code blocks.
82
- */
83
- codeBlock?: CodeBlockOptions;
84
77
  /**
85
78
  * Configuration for the comments feature, requires a `threadStore`.
86
79
  *
@@ -130,17 +123,6 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
130
123
  width?: number;
131
124
  class?: string;
132
125
  }) => Plugin;
133
- /**
134
- * Configuration for headings
135
- */
136
- heading?: {
137
- /**
138
- * The levels of headings that should be available in the editor.
139
- * @note Configurable up to 6 levels of headings.
140
- * @default [1, 2, 3]
141
- */
142
- levels?: (1 | 2 | 3 | 4 | 5 | 6)[];
143
- };
144
126
  /**
145
127
  * The content that should be in the editor when it's created, represented as an array of {@link PartialBlock} objects.
146
128
  *
@@ -171,7 +153,7 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
171
153
  */
172
154
  pasteHandler?: (context: {
173
155
  event: ClipboardEvent;
174
- editor: BlockNoteEditor<BSchema, ISchema, SSchema>;
156
+ editor: BlockNoteEditor<NoInfer<BSchema>, NoInfer<ISchema>, NoInfer<SSchema>>;
175
157
  /**
176
158
  * The default paste handler
177
159
  * @param context The context object
@@ -208,7 +190,7 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
208
190
  * See [Custom Schemas](https://www.blocknotejs.org/docs/custom-schemas) for more info.
209
191
  * @remarks `BlockNoteSchema`
210
192
  */
211
- schema: BlockNoteSchema<BSchema, ISchema, SSchema>;
193
+ schema: CustomBlockNoteSchema<BSchema, ISchema, SSchema>;
212
194
  /**
213
195
  * A flag indicating whether to set an HTML ID for every block
214
196
  *
@@ -299,20 +281,11 @@ export type BlockNoteEditorOptions<BSchema extends BlockSchema, ISchema extends
299
281
  * @internal
300
282
  */
301
283
  extensions?: Array<BlockNoteExtension | BlockNoteExtensionFactory>;
302
- /**
303
- * Boolean indicating whether the editor is in headless mode.
304
- * Headless mode means we can use features like importing / exporting blocks,
305
- * but there's no underlying editor (UI) instantiated.
306
- *
307
- * You probably don't need to set this manually, but use the `server-util` package instead that uses this option internally
308
- * @internal
309
- */
310
- _headless?: boolean;
311
284
  };
312
285
  export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockSchema, ISchema extends InlineContentSchema = DefaultInlineContentSchema, SSchema extends StyleSchema = DefaultStyleSchema> extends EventEmitter<{
313
286
  create: void;
314
287
  }> {
315
- protected readonly options: Partial<BlockNoteEditorOptions<any, any, any>>;
288
+ protected readonly options: Partial<BlockNoteEditorOptions<BSchema, ISchema, SSchema>>;
316
289
  /**
317
290
  * The underlying prosemirror schema
318
291
  */
@@ -321,16 +294,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
321
294
  * extensions that are added to the editor, can be tiptap extensions or prosemirror plugins
322
295
  */
323
296
  extensions: Record<string, SupportedExtension>;
324
- /**
325
- * Boolean indicating whether the editor is in headless mode.
326
- * Headless mode means we can use features like importing / exporting blocks,
327
- * but there's no underlying editor (UI) instantiated.
328
- *
329
- * You probably don't need to set this manually, but use the `server-util` package instead that uses this option internally
330
- */
331
- readonly headless: boolean;
332
- readonly _tiptapEditor: Omit<BlockNoteTipTapEditor, "view"> & {
333
- view: EditorView | undefined;
297
+ readonly _tiptapEditor: TiptapEditor & {
334
298
  contentComponent: any;
335
299
  };
336
300
  /**
@@ -351,7 +315,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
351
315
  /**
352
316
  * The schema of the editor. The schema defines which Blocks, InlineContent, and Styles are available in the editor.
353
317
  */
354
- readonly schema: BlockNoteSchema<BSchema, ISchema, SSchema>;
318
+ readonly schema: CustomBlockNoteSchema<BSchema, ISchema, SSchema>;
355
319
  readonly blockImplementations: BlockSpecs;
356
320
  readonly inlineContentImplementations: InlineContentSpecs;
357
321
  readonly styleImplementations: StyleSpecs;
@@ -391,13 +355,11 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
391
355
  cellTextColor: boolean;
392
356
  headers: boolean;
393
357
  };
394
- codeBlock: CodeBlockOptions;
395
- heading: {
396
- levels: (1 | 2 | 3 | 4 | 5 | 6)[];
397
- };
398
358
  };
399
- static create<BSchema extends BlockSchema = DefaultBlockSchema, ISchema extends InlineContentSchema = DefaultInlineContentSchema, SSchema extends StyleSchema = DefaultStyleSchema>(options?: Partial<BlockNoteEditorOptions<BSchema, ISchema, SSchema>>): BlockNoteEditor<BSchema, ISchema, SSchema>;
400
- protected constructor(options: Partial<BlockNoteEditorOptions<any, any, any>>);
359
+ static create<Options extends Partial<BlockNoteEditorOptions<any, any, any>> | undefined>(options?: Options): Options extends {
360
+ schema: CustomBlockNoteSchema<infer BSchema, infer ISchema, infer SSchema>;
361
+ } ? BlockNoteEditor<BSchema, ISchema, SSchema> : BlockNoteEditor<DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema>;
362
+ protected constructor(options: Partial<BlockNoteEditorOptions<BSchema, ISchema, SSchema>>);
401
363
  /**
402
364
  * Stores the currently active transaction, which is the accumulated transaction from all {@link dispatch} calls during a {@link transact} calls
403
365
  */
@@ -465,11 +427,15 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
465
427
  new (...args: any[]): T;
466
428
  } & typeof BlockNoteExtension, key?: string): T;
467
429
  /**
468
- * Mount the editor to a parent DOM element. Call mount(undefined) to clean up
430
+ * Mount the editor to a DOM element.
469
431
  *
470
432
  * @warning Not needed to call manually when using React, use BlockNoteView to take care of mounting
471
433
  */
472
- mount: (parentElement?: HTMLElement | null, contentComponent?: any) => void;
434
+ mount: (element: HTMLElement) => void;
435
+ /**
436
+ * Unmount the editor from the DOM element it is bound to
437
+ */
438
+ unmount: () => void;
473
439
  /**
474
440
  * Get the underlying prosemirror state
475
441
  * @note Prefer using `editor.transact` to read the current editor state, as that will ensure the state is up to date
@@ -480,9 +446,10 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
480
446
  * Get the underlying prosemirror view
481
447
  * @see https://prosemirror.net/docs/ref/#view.EditorView
482
448
  */
483
- get prosemirrorView(): EditorView | undefined;
449
+ get prosemirrorView(): import("prosemirror-view").EditorView;
484
450
  get domElement(): HTMLDivElement | undefined;
485
451
  isFocused(): boolean;
452
+ get headless(): boolean;
486
453
  focus(): void;
487
454
  onUploadStart(callback: (blockId?: string) => void): () => void;
488
455
  onUploadEnd(callback: (blockId?: string) => void): () => void;
@@ -577,7 +544,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
577
544
  * only the part of the block that is included in the selection.
578
545
  */
579
546
  getSelectionCutBlocks(): {
580
- blocks: Block<Record<string, import("../index.js").BlockConfig>, InlineContentSchema, StyleSchema>[];
547
+ blocks: Block<Record<string, import("../index.js").BlockConfig<string, import("../index.js").PropSchema, "inline" | "none" | "table">>, InlineContentSchema, StyleSchema>[];
581
548
  blockCutAtStart: string | undefined;
582
549
  blockCutAtEnd: string | undefined;
583
550
  _meta: {
@@ -622,7 +589,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
622
589
  * Removes existing blocks from the editor. Throws an error if any of the blocks could not be found.
623
590
  * @param blocksToRemove An array of identifiers for existing blocks that should be removed.
624
591
  */
625
- removeBlocks(blocksToRemove: BlockIdentifier[]): Block<Record<string, import("../index.js").BlockConfig>, InlineContentSchema, StyleSchema>[];
592
+ removeBlocks(blocksToRemove: BlockIdentifier[]): Block<Record<string, import("../index.js").BlockConfig<string, import("../index.js").PropSchema, "inline" | "none" | "table">>, InlineContentSchema, StyleSchema>[];
626
593
  /**
627
594
  * Replaces existing blocks in the editor with new blocks. If the blocks that should be removed are not adjacent or
628
595
  * are at different nesting levels, `blocksToInsert` will be inserted at the position of the first block in
@@ -781,14 +748,14 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
781
748
  * Returns the blocks that were inserted, updated, or deleted by the change that occurred.
782
749
  */
783
750
  getChanges(): BlocksChanged<BSchema, ISchema, SSchema>;
784
- }) => void): (() => void) | undefined;
751
+ }) => void): () => void;
785
752
  /**
786
753
  * A callback function that runs whenever the text cursor position or selection changes.
787
754
  *
788
755
  * @param callback The callback to execute.
789
756
  * @returns A function to remove the callback.
790
757
  */
791
- onSelectionChange(callback: (editor: BlockNoteEditor<BSchema, ISchema, SSchema>) => void, includeSelectionChangedByRemote?: boolean): (() => void) | undefined;
758
+ onSelectionChange(callback: (editor: BlockNoteEditor<BSchema, ISchema, SSchema>) => void, includeSelectionChangedByRemote?: boolean): () => void;
792
759
  /**
793
760
  * A callback function that runs when the editor has been initialized.
794
761
  *
@@ -813,7 +780,7 @@ export declare class BlockNoteEditor<BSchema extends BlockSchema = DefaultBlockS
813
780
  * Paste text into the editor. Defaults to interpreting text as markdown.
814
781
  * @param text The text to paste.
815
782
  */
816
- pasteText(text: string): boolean | undefined;
783
+ pasteText(text: string): boolean;
817
784
  /**
818
785
  * Paste markdown into the editor.
819
786
  * @param markdown The markdown to paste.
@@ -1,9 +1,76 @@
1
1
  import { Plugin } from "prosemirror-state";
2
2
  import { EventEmitter } from "../util/EventEmitter.js";
3
+ import { AnyExtension } from "@tiptap/core";
4
+ import { BlockSchema, InlineContentSchema, PartialBlockNoDefaults, StyleSchema } from "../schema/index.js";
5
+ import { BlockNoteEditor } from "./BlockNoteEditor.js";
3
6
  export declare abstract class BlockNoteExtension<TEvent extends Record<string, any> = any> extends EventEmitter<TEvent> {
4
7
  static key(): string;
5
8
  protected addProsemirrorPlugin(plugin: Plugin): void;
6
9
  readonly plugins: Plugin[];
7
10
  get priority(): number | undefined;
8
11
  constructor(..._args: any[]);
12
+ /**
13
+ * Input rules for the block
14
+ */
15
+ inputRules?: InputRule[];
16
+ /**
17
+ * A mapping of a keyboard shortcut to a function that will be called when the shortcut is pressed
18
+ *
19
+ * The keys are in the format:
20
+ * - Key names may be strings like `Shift-Ctrl-Enter`—a key identifier prefixed with zero or more modifiers
21
+ * - Key identifiers are based on the strings that can appear in KeyEvent.key
22
+ * - Use lowercase letters to refer to letter keys (or uppercase letters if you want shift to be held)
23
+ * - You may use `Space` as an alias for the " " name
24
+ * - Modifiers can be given in any order: `Shift-` (or `s-`), `Alt-` (or `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or `Meta-`)
25
+ * - For characters that are created by holding shift, the Shift- prefix is implied, and should not be added explicitly
26
+ * - You can use Mod- as a shorthand for Cmd- on Mac and Ctrl- on other platforms
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * keyboardShortcuts: {
31
+ * "Mod-Enter": (ctx) => { return true; },
32
+ * "Shift-Ctrl-Space": (ctx) => { return true; },
33
+ * "a": (ctx) => { return true; },
34
+ * "Space": (ctx) => { return true; }
35
+ * }
36
+ * ```
37
+ */
38
+ keyboardShortcuts?: Record<string, (ctx: {
39
+ editor: BlockNoteEditor<BlockSchema, InlineContentSchema, StyleSchema>;
40
+ }) => boolean>;
41
+ tiptapExtensions?: AnyExtension[];
9
42
  }
43
+ export type InputRule = {
44
+ /**
45
+ * The regex to match when to trigger the input rule
46
+ */
47
+ find: RegExp;
48
+ /**
49
+ * The function to call when the input rule is matched
50
+ * @returns undefined if the input rule should not be triggered, or an object with the type and props to update the block
51
+ */
52
+ replace: (props: {
53
+ /**
54
+ * The result of the regex match
55
+ */
56
+ match: RegExpMatchArray;
57
+ /**
58
+ * The range of the text that was matched
59
+ */
60
+ range: {
61
+ from: number;
62
+ to: number;
63
+ };
64
+ /**
65
+ * The editor instance
66
+ */
67
+ editor: BlockNoteEditor<any, any, any>;
68
+ }) => undefined | PartialBlockNoDefaults<any, any, any>;
69
+ };
70
+ /**
71
+ * This creates an instance of a BlockNoteExtension that can be used to add to a schema.
72
+ * It is a bit of a hack, but it works.
73
+ */
74
+ export declare function createBlockNoteExtension(options: Partial<Pick<BlockNoteExtension, "inputRules" | "keyboardShortcuts" | "plugins" | "tiptapExtensions">> & {
75
+ key: string;
76
+ }): BlockNoteExtension;
@@ -3,7 +3,7 @@ import * as Y from "yjs";
3
3
  import type { ThreadStore } from "../comments/index.js";
4
4
  import { BlockNoteDOMAttributes, BlockSchema, BlockSpecs, InlineContentSchema, InlineContentSpecs, StyleSchema, StyleSpecs } from "../schema/index.js";
5
5
  import type { BlockNoteEditor, BlockNoteEditorOptions, SupportedExtension } from "./BlockNoteEditor.js";
6
- import { BlockNoteSchema } from "./BlockNoteSchema.js";
6
+ import { BlockNoteSchema } from "../blocks/BlockNoteSchema.js";
7
7
  type ExtensionOptions<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema> = {
8
8
  editor: BlockNoteEditor<BSchema, I, S>;
9
9
  domAttributes: Partial<BlockNoteDOMAttributes>;
@@ -1,76 +1,8 @@
1
- export declare const COLORS_DEFAULT: {
2
- gray: {
3
- text: string;
4
- background: string;
5
- };
6
- brown: {
7
- text: string;
8
- background: string;
9
- };
10
- red: {
11
- text: string;
12
- background: string;
13
- };
14
- orange: {
15
- text: string;
16
- background: string;
17
- };
18
- yellow: {
19
- text: string;
20
- background: string;
21
- };
22
- green: {
23
- text: string;
24
- background: string;
25
- };
26
- blue: {
27
- text: string;
28
- background: string;
29
- };
30
- purple: {
31
- text: string;
32
- background: string;
33
- };
34
- pink: {
35
- text: string;
36
- background: string;
37
- };
38
- };
39
- export declare const COLORS_DARK_MODE_DEFAULT: {
40
- gray: {
41
- text: string;
42
- background: string;
43
- };
44
- brown: {
45
- text: string;
46
- background: string;
47
- };
48
- red: {
49
- text: string;
50
- background: string;
51
- };
52
- orange: {
53
- text: string;
54
- background: string;
55
- };
56
- yellow: {
57
- text: string;
58
- background: string;
59
- };
60
- green: {
61
- text: string;
62
- background: string;
63
- };
64
- blue: {
65
- text: string;
66
- background: string;
67
- };
68
- purple: {
69
- text: string;
70
- background: string;
71
- };
72
- pink: {
73
- text: string;
74
- background: string;
75
- };
76
- };
1
+ export declare const COLORS_DEFAULT: Record<string, {
2
+ text: string;
3
+ background: string;
4
+ }>;
5
+ export declare const COLORS_DARK_MODE_DEFAULT: Record<string, {
6
+ text: string;
7
+ background: string;
8
+ }>;
@@ -1,4 +1,4 @@
1
- import { BlockNoteSchema } from "../editor/BlockNoteSchema.js";
1
+ import { BlockNoteSchema } from "../blocks/BlockNoteSchema.js";
2
2
  import { COLORS_DEFAULT } from "../editor/defaultColors.js";
3
3
  import { BlockFromConfig, BlockSchema, InlineContent, InlineContentSchema, StyleSchema, StyledText, Styles } from "../schema/index.js";
4
4
  import type { BlockMapping, InlineContentMapping, StyleMapping } from "./mapping.js";
@@ -1,4 +1,4 @@
1
- import { BlockNoteSchema } from "../editor/BlockNoteSchema.js";
1
+ import { BlockNoteSchema } from "../blocks/BlockNoteSchema.js";
2
2
  import { BlockFromConfigNoChildren, BlockSchema, InlineContentFromConfig, InlineContentSchema, StyleSchema, Styles } from "../schema/index.js";
3
3
  import type { Exporter } from "./Exporter.js";
4
4
  /**
@@ -3,5 +3,8 @@ export declare const BackgroundColor: {
3
3
  type: string;
4
4
  propSchema: "string";
5
5
  };
6
- implementation: import("../../index.js").StyleImplementation;
6
+ implementation: import("../../index.js").StyleImplementation<{
7
+ type: string;
8
+ propSchema: "string";
9
+ }>;
7
10
  };
@@ -0,0 +1,7 @@
1
+ import * as Y from "yjs";
2
+ import { BlockNoteExtension } from "../../../editor/BlockNoteExtension.js";
3
+ export declare class SchemaMigrationPlugin extends BlockNoteExtension {
4
+ private migrationDone;
5
+ static key(): string;
6
+ constructor(fragment: Y.XmlFragment);
7
+ }
@@ -0,0 +1,3 @@
1
+ import { MigrationRule } from "./migrationRule.js";
2
+ declare const _default: MigrationRule[];
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { Transaction } from "@tiptap/pm/state";
2
+ import * as Y from "yjs";
3
+ export type MigrationRule = (fragment: Y.XmlFragment, tr: Transaction) => void;
@@ -0,0 +1,2 @@
1
+ import { MigrationRule } from "./migrationRule.js";
2
+ export declare const moveColorAttributes: MigrationRule;
@@ -1,7 +1,7 @@
1
1
  import type { CommentBody, ThreadStore, User } from "../../comments/index.js";
2
2
  import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
3
3
  import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
4
- import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
4
+ import { BlockNoteSchema } from "../../blocks/BlockNoteSchema.js";
5
5
  import { UserStore } from "./userstore/UserStore.js";
6
6
  export declare class CommentsPlugin extends BlockNoteExtension {
7
7
  private readonly editor;
@@ -3,9 +3,9 @@ import { EditorView } from "prosemirror-view";
3
3
  import type { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
4
4
  import { BlockNoteExtension } from "../../editor/BlockNoteExtension.js";
5
5
  import { UiElementPosition } from "../../extensions-shared/UiElementPosition.js";
6
- import type { BlockFromConfig, FileBlockConfig, InlineContentSchema, StyleSchema } from "../../schema/index.js";
6
+ import type { BlockFromConfig, InlineContentSchema, StyleSchema } from "../../schema/index.js";
7
7
  export type FilePanelState<I extends InlineContentSchema, S extends StyleSchema> = UiElementPosition & {
8
- block: BlockFromConfig<FileBlockConfig, I, S>;
8
+ block: BlockFromConfig<any, I, S>;
9
9
  };
10
10
  export declare class FilePanelView<I extends InlineContentSchema, S extends StyleSchema> implements PluginView {
11
11
  private readonly editor;
@@ -13,7 +13,7 @@ export declare class FilePanelView<I extends InlineContentSchema, S extends Styl
13
13
  private readonly pmView;
14
14
  state?: FilePanelState<I, S>;
15
15
  emitUpdate: () => void;
16
- constructor(editor: BlockNoteEditor<Record<string, FileBlockConfig>, I, S>, pluginKey: PluginKey<FilePanelState<I, S>>, pmView: EditorView, emitUpdate: (state: FilePanelState<I, S>) => void);
16
+ constructor(editor: BlockNoteEditor<Record<string, any>, I, S>, pluginKey: PluginKey<FilePanelState<I, S>>, pmView: EditorView, emitUpdate: (state: FilePanelState<I, S>) => void);
17
17
  mouseDownHandler: () => void;
18
18
  dragstartHandler: () => void;
19
19
  scrollHandler: () => void;
@@ -24,7 +24,7 @@ export declare class FilePanelView<I extends InlineContentSchema, S extends Styl
24
24
  export declare class FilePanelProsemirrorPlugin<I extends InlineContentSchema, S extends StyleSchema> extends BlockNoteExtension {
25
25
  static key(): string;
26
26
  private view;
27
- constructor(editor: BlockNoteEditor<Record<string, FileBlockConfig>, I, S>);
27
+ constructor(editor: BlockNoteEditor<Record<string, any>, I, S>);
28
28
  get shown(): boolean;
29
29
  onUpdate(callback: (state: FilePanelState<I, S>) => void): () => void;
30
30
  closeMenu: () => void | undefined;
@@ -3,5 +3,8 @@ export declare const TextColor: {
3
3
  type: string;
4
4
  propSchema: "string";
5
5
  };
6
- implementation: import("../../index.js").StyleImplementation;
6
+ implementation: import("../../index.js").StyleImplementation<{
7
+ type: string;
8
+ propSchema: "string";
9
+ }>;
7
10
  };
@@ -7,33 +7,10 @@ export * from "./api/getBlockInfoFromPos.js";
7
7
  export * from "./api/getBlocksChangedByTransaction.js";
8
8
  export * from "./api/nodeUtil.js";
9
9
  export * from "./api/pmUtil.js";
10
- export * from "./blocks/AudioBlockContent/AudioBlockContent.js";
11
- export * from "./blocks/CodeBlockContent/CodeBlockContent.js";
12
- export * from "./blocks/defaultBlockHelpers.js";
13
- export * from "./blocks/defaultBlocks.js";
14
- export * from "./blocks/defaultBlockTypeGuards.js";
15
- export * from "./blocks/defaultProps.js";
16
- export * from "./blocks/FileBlockContent/FileBlockContent.js";
17
- export * from "./blocks/FileBlockContent/helpers/parse/parseEmbedElement.js";
18
- export * from "./blocks/FileBlockContent/helpers/parse/parseFigureElement.js";
19
- export * from "./blocks/FileBlockContent/helpers/render/createAddFileButton.js";
20
- export * from "./blocks/FileBlockContent/helpers/render/createFileBlockWrapper.js";
21
- export * from "./blocks/FileBlockContent/helpers/render/createFileNameWithIcon.js";
22
- export * from "./blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.js";
23
- export * from "./blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.js";
24
- export * from "./blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.js";
25
- export * from "./blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.js";
26
- export * from "./blocks/ImageBlockContent/ImageBlockContent.js";
27
- export * from "./blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.js";
28
- export * from "./blocks/PageBreakBlockContent/PageBreakBlockContent.js";
29
- export * from "./blocks/PageBreakBlockContent/schema.js";
30
- export * from "./blocks/ToggleWrapper/createToggleWrapper.js";
31
- export { EMPTY_CELL_HEIGHT, EMPTY_CELL_WIDTH, } from "./blocks/TableBlockContent/TableExtension.js";
32
- export * from "./blocks/VideoBlockContent/VideoBlockContent.js";
10
+ export * from "./blocks/index.js";
33
11
  export * from "./editor/BlockNoteEditor.js";
34
12
  export * from "./editor/BlockNoteExtension.js";
35
13
  export * from "./editor/BlockNoteExtensions.js";
36
- export * from "./editor/BlockNoteSchema.js";
37
14
  export * from "./editor/defaultColors.js";
38
15
  export * from "./editor/selectionTypes.js";
39
16
  export * from "./exporter/index.js";
@@ -56,7 +33,7 @@ export * from "./util/combineByGroup.js";
56
33
  export * from "./util/string.js";
57
34
  export * from "./util/table.js";
58
35
  export * from "./util/typescript.js";
59
- export type { CodeBlockOptions } from "./blocks/CodeBlockContent/CodeBlockContent.js";
36
+ export type { CodeBlockOptions } from "./blocks/Code/block.js";
60
37
  export { assertEmpty, UnreachableCaseError } from "./util/typescript.js";
61
38
  export * from "./util/EventEmitter.js";
62
39
  export { selectedFragmentToHTML } from "./api/clipboard/toClipboard/copyExtension.js";