@blocknote/core 0.25.2 → 0.27.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 (153) hide show
  1. package/dist/blocknote.cjs +11 -10
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +3722 -9856
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/comments.cjs +1 -1
  6. package/dist/comments.cjs.map +1 -1
  7. package/dist/comments.js +45 -44
  8. package/dist/comments.js.map +1 -1
  9. package/dist/en-B7ycW7c8.js +360 -0
  10. package/dist/en-B7ycW7c8.js.map +1 -0
  11. package/dist/en-D4taoCs4.cjs +2 -0
  12. package/dist/en-D4taoCs4.cjs.map +1 -0
  13. package/dist/locales.cjs +2 -0
  14. package/dist/locales.cjs.map +1 -0
  15. package/dist/locales.js +6129 -0
  16. package/dist/locales.js.map +1 -0
  17. package/dist/style.css +1 -1
  18. package/dist/tsconfig.tsbuildinfo +1 -1
  19. package/dist/webpack-stats.json +1 -1
  20. package/package.json +36 -27
  21. package/src/api/clipboard/__snapshots__/internal/basicBlocks.html +1 -1
  22. package/src/api/clipboard/__snapshots__/internal/basicBlocksWithProps.html +1 -1
  23. package/src/api/clipboard/clipboardExternal.test.ts +1 -1
  24. package/src/api/clipboard/clipboardInternal.test.ts +1 -1
  25. package/src/api/clipboard/fromClipboard/acceptedMIMETypes.ts +1 -0
  26. package/src/api/clipboard/fromClipboard/pasteExtension.ts +96 -42
  27. package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/external.html +1 -1
  28. package/src/api/exporters/html/__snapshots__/codeBlock/contains-newlines/internal.html +1 -1
  29. package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/external.html +1 -1
  30. package/src/api/exporters/html/__snapshots__/codeBlock/defaultLanguage/internal.html +1 -1
  31. package/src/api/exporters/html/__snapshots__/codeBlock/empty/external.html +1 -1
  32. package/src/api/exporters/html/__snapshots__/codeBlock/empty/internal.html +1 -1
  33. package/src/api/exporters/html/__snapshots__/codeBlock/python/external.html +1 -1
  34. package/src/api/exporters/html/__snapshots__/codeBlock/python/internal.html +1 -1
  35. package/src/api/exporters/html/htmlConversion.test.ts +2 -2
  36. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +4 -4
  37. package/src/api/exporters/markdown/__snapshots__/codeBlock/defaultLanguage/markdown.md +1 -1
  38. package/src/api/exporters/markdown/__snapshots__/codeBlock/empty/markdown.md +1 -1
  39. package/src/api/exporters/markdown/__snapshots__/complex/misc/markdown.md +1 -1
  40. package/src/api/exporters/markdown/__snapshots__/lists/basic/markdown.md +8 -6
  41. package/src/api/exporters/markdown/__snapshots__/lists/nested/markdown.md +6 -6
  42. package/src/api/exporters/markdown/markdownExporter.test.ts +2 -2
  43. package/src/api/nodeConversions/__snapshots__/nodeConversions.test.ts.snap +2 -2
  44. package/src/api/nodeConversions/nodeToBlock.ts +1 -0
  45. package/src/api/parsers/html/__snapshots__/parse-2-tables.json +129 -0
  46. package/src/api/parsers/html/__snapshots__/parse-codeblocks.json +1 -1
  47. package/src/api/parsers/html/parseHTML.test.ts +36 -1
  48. package/src/api/parsers/markdown/__snapshots__/pasted/whitespace bold.json +42 -0
  49. package/src/api/parsers/markdown/__snapshots__/whitespace bold.json +19 -0
  50. package/src/api/parsers/markdown/detectMarkdown.ts +60 -0
  51. package/src/api/parsers/markdown/parseMarkdown.test.ts +7 -2
  52. package/src/api/parsers/markdown/parseMarkdown.ts +19 -18
  53. package/src/api/testUtil/cases/defaultSchema.ts +13 -0
  54. package/src/blocks/CodeBlockContent/CodeBlockContent.ts +100 -69
  55. package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +98 -0
  56. package/src/blocks/TableBlockContent/TableExtension.ts +1 -1
  57. package/src/blocks/defaultBlocks.ts +2 -2
  58. package/src/comments/threadstore/yjs/YjsThreadStore.ts +1 -0
  59. package/src/comments/threadstore/yjs/yjsHelpers.ts +3 -1
  60. package/src/comments/types.ts +4 -0
  61. package/src/editor/Block.css +14 -1
  62. package/src/editor/BlockNoteEditor.ts +103 -11
  63. package/src/editor/BlockNoteExtensions.ts +18 -4
  64. package/src/editor/BlockNoteTipTapEditor.ts +18 -7
  65. package/src/extensions/Comments/CommentsPlugin.ts +77 -30
  66. package/src/extensions/HardBreak/HardBreak.ts +35 -0
  67. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +100 -3
  68. package/src/extensions/SideMenu/dragging.ts +13 -0
  69. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +3 -1
  70. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +18 -2
  71. package/src/extensions/TableHandles/TableHandlesPlugin.ts +24 -23
  72. package/src/i18n/index.ts +2 -0
  73. package/src/i18n/locales/ar.ts +10 -0
  74. package/src/i18n/locales/de.ts +21 -1
  75. package/src/i18n/locales/en.ts +10 -0
  76. package/src/i18n/locales/es.ts +21 -1
  77. package/src/i18n/locales/fr.ts +10 -0
  78. package/src/i18n/locales/hr.ts +27 -4
  79. package/src/i18n/locales/is.ts +10 -0
  80. package/src/i18n/locales/it.ts +21 -1
  81. package/src/i18n/locales/ja.ts +10 -0
  82. package/src/i18n/locales/ko.ts +10 -0
  83. package/src/i18n/locales/nl.ts +10 -0
  84. package/src/i18n/locales/no.ts +10 -0
  85. package/src/i18n/locales/pl.ts +10 -0
  86. package/src/i18n/locales/pt.ts +10 -0
  87. package/src/i18n/locales/ru.ts +10 -0
  88. package/src/i18n/locales/uk.ts +10 -0
  89. package/src/i18n/locales/vi.ts +10 -0
  90. package/src/i18n/locales/zh.ts +10 -0
  91. package/src/index.ts +2 -3
  92. package/src/locales.ts +1 -0
  93. package/src/schema/blocks/types.ts +1 -0
  94. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +1 -1
  95. package/types/src/api/blockManipulation/setupTestEnv.d.ts +34 -2
  96. package/types/src/api/clipboard/fromClipboard/acceptedMIMETypes.d.ts +1 -1
  97. package/types/src/api/clipboard/fromClipboard/fileDropExtension.d.ts +2 -2
  98. package/types/src/api/clipboard/fromClipboard/pasteExtension.d.ts +3 -3
  99. package/types/src/api/clipboard/testUtil.d.ts +66 -34
  100. package/types/src/api/clipboard/toClipboard/copyExtension.d.ts +1 -1
  101. package/types/src/api/exporters/html/externalHTMLExporter.d.ts +2 -2
  102. package/types/src/api/exporters/html/internalHTMLSerializer.d.ts +2 -2
  103. package/types/src/api/exporters/html/util/serializeBlocksExternalHTML.d.ts +1 -1
  104. package/types/src/api/exporters/html/util/serializeBlocksInternalHTML.d.ts +1 -1
  105. package/types/src/api/parsers/markdown/detectMarkdown.d.ts +6 -0
  106. package/types/src/api/parsers/markdown/parseMarkdown.d.ts +1 -0
  107. package/types/src/api/testUtil/cases/customBlocks.d.ts +72 -40
  108. package/types/src/api/testUtil/cases/customInlineContent.d.ts +34 -2
  109. package/types/src/api/testUtil/cases/customStyles.d.ts +34 -2
  110. package/types/src/blocks/AudioBlockContent/AudioBlockContent.d.ts +3 -3
  111. package/types/src/blocks/CodeBlockContent/CodeBlockContent.d.ts +46 -34
  112. package/types/src/blocks/FileBlockContent/FileBlockContent.d.ts +3 -3
  113. package/types/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.d.ts +1 -1
  114. package/types/src/blocks/HeadingBlockContent/HeadingBlockContent.d.ts +2 -2
  115. package/types/src/blocks/ImageBlockContent/ImageBlockContent.d.ts +2 -2
  116. package/types/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.d.ts +2 -2
  117. package/types/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.d.ts +2 -2
  118. package/types/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.d.ts +2 -2
  119. package/types/src/blocks/PageBreakBlockContent/PageBreakBlockContent.d.ts +2 -2
  120. package/types/src/blocks/PageBreakBlockContent/schema.d.ts +13 -13
  121. package/types/src/blocks/ParagraphBlockContent/ParagraphBlockContent.d.ts +2 -2
  122. package/types/src/blocks/QuoteBlockContent/QuoteBlockContent.d.ts +52 -0
  123. package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +2 -2
  124. package/types/src/blocks/VideoBlockContent/VideoBlockContent.d.ts +2 -2
  125. package/types/src/blocks/defaultBlockHelpers.d.ts +2 -2
  126. package/types/src/blocks/defaultBlocks.d.ts +107 -44
  127. package/types/src/comments/threadstore/yjs/YjsThreadStore.d.ts +3 -3
  128. package/types/src/comments/types.d.ts +4 -0
  129. package/types/src/editor/BlockNoteEditor.d.ts +58 -0
  130. package/types/src/editor/BlockNoteExtensions.d.ts +3 -2
  131. package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -1
  132. package/types/src/exporter/mapping.d.ts +2 -2
  133. package/types/src/extensions/BackgroundColor/BackgroundColorMark.d.ts +1 -1
  134. package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +1 -1
  135. package/types/src/extensions/Comments/CommentsPlugin.d.ts +16 -1
  136. package/types/src/extensions/HardBreak/HardBreak.d.ts +2 -0
  137. package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +4 -4
  138. package/types/src/extensions/TextColor/TextColorMark.d.ts +1 -1
  139. package/types/src/i18n/index.d.ts +2 -0
  140. package/types/src/i18n/locales/de.d.ts +2 -304
  141. package/types/src/i18n/locales/en.d.ts +11 -1
  142. package/types/src/i18n/locales/es.d.ts +2 -269
  143. package/types/src/i18n/locales/hr.d.ts +2 -266
  144. package/types/src/i18n/locales/it.d.ts +2 -269
  145. package/types/src/index.d.ts +1 -2
  146. package/types/src/locales.d.ts +1 -0
  147. package/types/src/pm-nodes/BlockContainer.d.ts +2 -7
  148. package/types/src/pm-nodes/BlockGroup.d.ts +2 -7
  149. package/types/src/schema/blocks/types.d.ts +1 -0
  150. package/types/src/schema/inlineContent/internal.d.ts +1 -1
  151. package/README.md +0 -125
  152. package/src/blocks/CodeBlockContent/defaultSupportedLanguages.ts +0 -116
  153. package/types/src/blocks/CodeBlockContent/shiki.bundle.d.ts +0 -82
@@ -76,6 +76,40 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
76
76
  };
77
77
  }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
78
78
  };
79
+ quote: {
80
+ config: {
81
+ type: "quote";
82
+ content: "inline";
83
+ propSchema: {
84
+ backgroundColor: {
85
+ default: "default";
86
+ };
87
+ textColor: {
88
+ default: "default";
89
+ };
90
+ textAlignment: {
91
+ default: "left";
92
+ values: readonly ["left", "center", "right", "justify"];
93
+ };
94
+ };
95
+ };
96
+ implementation: import("../../index.js").TiptapBlockImplementation<{
97
+ type: "quote";
98
+ content: "inline";
99
+ propSchema: {
100
+ backgroundColor: {
101
+ default: "default";
102
+ };
103
+ textColor: {
104
+ default: "default";
105
+ };
106
+ textAlignment: {
107
+ default: "left";
108
+ values: readonly ["left", "center", "right", "justify"];
109
+ };
110
+ };
111
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
112
+ };
79
113
  codeBlock: {
80
114
  config: {
81
115
  type: "codeBlock";
@@ -83,7 +117,6 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
83
117
  propSchema: {
84
118
  language: {
85
119
  default: string;
86
- values: string[];
87
120
  };
88
121
  };
89
122
  };
@@ -93,7 +126,6 @@ export declare function setupTestEnv(): () => BlockNoteEditor<import("../../inde
93
126
  propSchema: {
94
127
  language: {
95
128
  default: string;
96
- values: string[];
97
129
  };
98
130
  };
99
131
  }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
@@ -1 +1 @@
1
- export declare const acceptedMIMETypes: readonly ["vscode-editor-data", "blocknote/html", "text/html", "text/plain", "Files"];
1
+ export declare const acceptedMIMETypes: readonly ["vscode-editor-data", "blocknote/html", "text/markdown", "text/html", "text/plain", "Files"];
@@ -1,6 +1,6 @@
1
1
  import { Extension } from "@tiptap/core";
2
2
  import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
3
- import { InlineContentSchema, StyleSchema } from "../../../schema/index.js";
4
- export declare const createDropFileExtension: <BSchema extends Record<string, import("../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
3
+ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
4
+ export declare const createDropFileExtension: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
5
5
  editor: BlockNoteEditor<BSchema, I, S>;
6
6
  }, undefined>;
@@ -1,4 +1,4 @@
1
1
  import { Extension } from "@tiptap/core";
2
- import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor";
3
- import { InlineContentSchema, StyleSchema } from "../../../schema/index.js";
4
- export declare const createPasteFromClipboardExtension: <BSchema extends Record<string, import("../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<any, any>;
2
+ import type { BlockNoteEditor, BlockNoteEditorOptions } from "../../../editor/BlockNoteEditor";
3
+ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
4
+ export declare const createPasteFromClipboardExtension: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, pasteHandler: Exclude<BlockNoteEditorOptions<any, any, any>["pasteHandler"], undefined>) => Extension<any, any>;
@@ -1,5 +1,5 @@
1
1
  import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
2
- export declare const schema: BlockNoteSchema<import("../../schema/index.js").BlockSchemaFromSpecs<{
2
+ export declare const schema: BlockNoteSchema<import("../../index.js").BlockSchemaFromSpecs<{
3
3
  customParagraph: any;
4
4
  paragraph: {
5
5
  config: {
@@ -18,7 +18,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
18
18
  };
19
19
  };
20
20
  };
21
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
21
+ implementation: import("../../index.js").TiptapBlockImplementation<{
22
22
  type: "paragraph";
23
23
  content: "inline";
24
24
  propSchema: {
@@ -33,7 +33,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
33
33
  values: readonly ["left", "center", "right", "justify"];
34
34
  };
35
35
  };
36
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
36
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
37
37
  };
38
38
  heading: {
39
39
  config: {
@@ -56,7 +56,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
56
56
  };
57
57
  };
58
58
  };
59
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
59
+ implementation: import("../../index.js").TiptapBlockImplementation<{
60
60
  type: "heading";
61
61
  content: "inline";
62
62
  propSchema: {
@@ -75,7 +75,41 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
75
75
  values: readonly ["left", "center", "right", "justify"];
76
76
  };
77
77
  };
78
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
78
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
79
+ };
80
+ quote: {
81
+ config: {
82
+ type: "quote";
83
+ content: "inline";
84
+ propSchema: {
85
+ backgroundColor: {
86
+ default: "default";
87
+ };
88
+ textColor: {
89
+ default: "default";
90
+ };
91
+ textAlignment: {
92
+ default: "left";
93
+ values: readonly ["left", "center", "right", "justify"];
94
+ };
95
+ };
96
+ };
97
+ implementation: import("../../index.js").TiptapBlockImplementation<{
98
+ type: "quote";
99
+ content: "inline";
100
+ propSchema: {
101
+ backgroundColor: {
102
+ default: "default";
103
+ };
104
+ textColor: {
105
+ default: "default";
106
+ };
107
+ textAlignment: {
108
+ default: "left";
109
+ values: readonly ["left", "center", "right", "justify"];
110
+ };
111
+ };
112
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
79
113
  };
80
114
  codeBlock: {
81
115
  config: {
@@ -84,20 +118,18 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
84
118
  propSchema: {
85
119
  language: {
86
120
  default: string;
87
- values: string[];
88
121
  };
89
122
  };
90
123
  };
91
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
124
+ implementation: import("../../index.js").TiptapBlockImplementation<{
92
125
  type: "codeBlock";
93
126
  content: "inline";
94
127
  propSchema: {
95
128
  language: {
96
129
  default: string;
97
- values: string[];
98
130
  };
99
131
  };
100
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
132
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
101
133
  };
102
134
  bulletListItem: {
103
135
  config: {
@@ -116,7 +148,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
116
148
  };
117
149
  };
118
150
  };
119
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
151
+ implementation: import("../../index.js").TiptapBlockImplementation<{
120
152
  type: "bulletListItem";
121
153
  content: "inline";
122
154
  propSchema: {
@@ -131,7 +163,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
131
163
  values: readonly ["left", "center", "right", "justify"];
132
164
  };
133
165
  };
134
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
166
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
135
167
  };
136
168
  numberedListItem: {
137
169
  config: {
@@ -154,7 +186,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
154
186
  };
155
187
  };
156
188
  };
157
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
189
+ implementation: import("../../index.js").TiptapBlockImplementation<{
158
190
  type: "numberedListItem";
159
191
  content: "inline";
160
192
  propSchema: {
@@ -173,7 +205,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
173
205
  values: readonly ["left", "center", "right", "justify"];
174
206
  };
175
207
  };
176
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
208
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
177
209
  };
178
210
  checkListItem: {
179
211
  config: {
@@ -195,7 +227,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
195
227
  };
196
228
  };
197
229
  };
198
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
230
+ implementation: import("../../index.js").TiptapBlockImplementation<{
199
231
  type: "checkListItem";
200
232
  content: "inline";
201
233
  propSchema: {
@@ -213,7 +245,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
213
245
  values: readonly ["left", "center", "right", "justify"];
214
246
  };
215
247
  };
216
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
248
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
217
249
  };
218
250
  table: {
219
251
  config: {
@@ -225,7 +257,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
225
257
  };
226
258
  };
227
259
  };
228
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
260
+ implementation: import("../../index.js").TiptapBlockImplementation<{
229
261
  type: "table";
230
262
  content: "table";
231
263
  propSchema: {
@@ -233,7 +265,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
233
265
  default: "default";
234
266
  };
235
267
  };
236
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
268
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
237
269
  };
238
270
  file: {
239
271
  config: {
@@ -255,7 +287,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
255
287
  content: "none";
256
288
  isFileBlock: true;
257
289
  };
258
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
290
+ implementation: import("../../index.js").TiptapBlockImplementation<{
259
291
  type: "file";
260
292
  propSchema: {
261
293
  backgroundColor: {
@@ -273,7 +305,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
273
305
  };
274
306
  content: "none";
275
307
  isFileBlock: true;
276
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
308
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
277
309
  };
278
310
  image: {
279
311
  config: {
@@ -306,7 +338,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
306
338
  isFileBlock: true;
307
339
  fileBlockAccept: string[];
308
340
  };
309
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
341
+ implementation: import("../../index.js").TiptapBlockImplementation<{
310
342
  type: "image";
311
343
  propSchema: {
312
344
  textAlignment: {
@@ -335,7 +367,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
335
367
  content: "none";
336
368
  isFileBlock: true;
337
369
  fileBlockAccept: string[];
338
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
370
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
339
371
  };
340
372
  video: {
341
373
  config: {
@@ -368,7 +400,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
368
400
  isFileBlock: true;
369
401
  fileBlockAccept: string[];
370
402
  };
371
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
403
+ implementation: import("../../index.js").TiptapBlockImplementation<{
372
404
  type: "video";
373
405
  propSchema: {
374
406
  textAlignment: {
@@ -397,7 +429,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
397
429
  content: "none";
398
430
  isFileBlock: true;
399
431
  fileBlockAccept: string[];
400
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
432
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
401
433
  };
402
434
  audio: {
403
435
  config: {
@@ -423,7 +455,7 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
423
455
  isFileBlock: true;
424
456
  fileBlockAccept: string[];
425
457
  };
426
- implementation: import("../../schema/index.js").TiptapBlockImplementation<{
458
+ implementation: import("../../index.js").TiptapBlockImplementation<{
427
459
  type: "audio";
428
460
  propSchema: {
429
461
  backgroundColor: {
@@ -445,9 +477,9 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
445
477
  content: "none";
446
478
  isFileBlock: true;
447
479
  fileBlockAccept: string[];
448
- }, any, import("../../schema/index.js").InlineContentSchema, import("../../schema/index.js").StyleSchema>;
480
+ }, any, import("../../index.js").InlineContentSchema, import("../../index.js").StyleSchema>;
449
481
  };
450
- }>, import("../../schema/index.js").InlineContentSchemaFromSpecs<{
482
+ }>, import("../../index.js").InlineContentSchemaFromSpecs<{
451
483
  text: {
452
484
  config: "text";
453
485
  implementation: any;
@@ -456,54 +488,54 @@ export declare const schema: BlockNoteSchema<import("../../schema/index.js").Blo
456
488
  config: "link";
457
489
  implementation: any;
458
490
  };
459
- }>, import("../../schema/index.js").StyleSchemaFromSpecs<{
491
+ }>, import("../../index.js").StyleSchemaFromSpecs<{
460
492
  bold: {
461
493
  config: {
462
494
  type: string;
463
495
  propSchema: "boolean";
464
496
  };
465
- implementation: import("../../schema/index.js").StyleImplementation;
497
+ implementation: import("../../index.js").StyleImplementation;
466
498
  };
467
499
  italic: {
468
500
  config: {
469
501
  type: string;
470
502
  propSchema: "boolean";
471
503
  };
472
- implementation: import("../../schema/index.js").StyleImplementation;
504
+ implementation: import("../../index.js").StyleImplementation;
473
505
  };
474
506
  underline: {
475
507
  config: {
476
508
  type: string;
477
509
  propSchema: "boolean";
478
510
  };
479
- implementation: import("../../schema/index.js").StyleImplementation;
511
+ implementation: import("../../index.js").StyleImplementation;
480
512
  };
481
513
  strike: {
482
514
  config: {
483
515
  type: string;
484
516
  propSchema: "boolean";
485
517
  };
486
- implementation: import("../../schema/index.js").StyleImplementation;
518
+ implementation: import("../../index.js").StyleImplementation;
487
519
  };
488
520
  code: {
489
521
  config: {
490
522
  type: string;
491
523
  propSchema: "boolean";
492
524
  };
493
- implementation: import("../../schema/index.js").StyleImplementation;
525
+ implementation: import("../../index.js").StyleImplementation;
494
526
  };
495
527
  textColor: {
496
528
  config: {
497
529
  type: string;
498
530
  propSchema: "string";
499
531
  };
500
- implementation: import("../../schema/index.js").StyleImplementation;
532
+ implementation: import("../../index.js").StyleImplementation;
501
533
  };
502
534
  backgroundColor: {
503
535
  config: {
504
536
  type: string;
505
537
  propSchema: "string";
506
538
  };
507
- implementation: import("../../schema/index.js").StyleImplementation;
539
+ implementation: import("../../index.js").StyleImplementation;
508
540
  };
509
541
  }>>;
@@ -7,6 +7,6 @@ export declare function selectedFragmentToHTML<BSchema extends BlockSchema, I ex
7
7
  externalHTML: string;
8
8
  markdown: string;
9
9
  };
10
- export declare const createCopyToClipboardExtension: <BSchema extends Record<string, import("../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
10
+ export declare const createCopyToClipboardExtension: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>) => Extension<{
11
11
  editor: BlockNoteEditor<BSchema, I, S>;
12
12
  }, undefined>;
@@ -1,8 +1,8 @@
1
1
  import { Schema } from "prosemirror-model";
2
2
  import { PartialBlock } from "../../../blocks/defaultBlocks.js";
3
3
  import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
4
- import { InlineContent, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
5
- export declare const createExternalHTMLExporter: <BSchema extends Record<string, import("../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => {
4
+ import { BlockSchema, InlineContent, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
5
+ export declare const createExternalHTMLExporter: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => {
6
6
  exportBlocks: (blocks: PartialBlock<BSchema, I, S>[], options: {
7
7
  document?: Document;
8
8
  }) => string;
@@ -1,8 +1,8 @@
1
1
  import { Schema } from "prosemirror-model";
2
2
  import { PartialBlock } from "../../../blocks/defaultBlocks.js";
3
3
  import type { BlockNoteEditor } from "../../../editor/BlockNoteEditor.js";
4
- import { InlineContentSchema, StyleSchema } from "../../../schema/index.js";
5
- export declare const createInternalHTMLSerializer: <BSchema extends Record<string, import("../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => {
4
+ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
5
+ export declare const createInternalHTMLSerializer: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(schema: Schema, editor: BlockNoteEditor<BSchema, I, S>) => {
6
6
  serializeBlocks: (blocks: PartialBlock<BSchema, I, S>[], options: {
7
7
  document?: Document;
8
8
  }) => string;
@@ -5,6 +5,6 @@ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schem
5
5
  export declare function serializeInlineContentExternalHTML<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<any, I, S>, blockContent: PartialBlock<BSchema, I, S>["content"], serializer: DOMSerializer, options?: {
6
6
  document?: Document;
7
7
  }): HTMLElement | DocumentFragment;
8
- export declare const serializeBlocksExternalHTML: <BSchema extends Record<string, import("../../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, orderedListItemBlockTypes: Set<string>, unorderedListItemBlockTypes: Set<string>, options?: {
8
+ export declare const serializeBlocksExternalHTML: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, orderedListItemBlockTypes: Set<string>, unorderedListItemBlockTypes: Set<string>, options?: {
9
9
  document?: Document;
10
10
  }) => DocumentFragment;
@@ -5,6 +5,6 @@ import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../../schem
5
5
  export declare function serializeInlineContentInternalHTML<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<any, I, S>, blockContent: PartialBlock<BSchema, I, S>["content"], serializer: DOMSerializer, blockType?: string, options?: {
6
6
  document?: Document;
7
7
  }): HTMLElement | DocumentFragment;
8
- export declare const serializeBlocksInternalHTML: <BSchema extends Record<string, import("../../../../schema/index.js").BlockConfig>, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, options?: {
8
+ export declare const serializeBlocksInternalHTML: <BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(editor: BlockNoteEditor<BSchema, I, S>, blocks: PartialBlock<BSchema, I, S>[], serializer: DOMSerializer, options?: {
9
9
  document?: Document;
10
10
  }) => HTMLElement;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns `true` if the source text might be a markdown document.
3
+ *
4
+ * @param src Source text to analyze.
5
+ */
6
+ export declare const isMarkdown: (src: string) => boolean;
@@ -1,4 +1,5 @@
1
1
  import { Schema } from "prosemirror-model";
2
2
  import { Block } from "../../../blocks/defaultBlocks.js";
3
3
  import { BlockSchema, InlineContentSchema, StyleSchema } from "../../../schema/index.js";
4
+ export declare function markdownToHTML(markdown: string): Promise<string>;
4
5
  export declare function markdownToBlocks<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(markdown: string, blockSchema: BSchema, icSchema: I, styleSchema: S, pmSchema: Schema): Promise<Block<BSchema, I, S>[]>;