@blocknote/core 0.30.0 → 0.31.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 (245) hide show
  1. package/dist/blocknote.cjs +9 -9
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +2771 -2245
  4. package/dist/blocknote.js.map +1 -1
  5. package/dist/comments.cjs.map +1 -1
  6. package/dist/comments.js.map +1 -1
  7. package/dist/{en-D4taoCs4.cjs → en-BXVKCwYt.cjs} +2 -2
  8. package/dist/en-BXVKCwYt.cjs.map +1 -0
  9. package/dist/{en-B7ycW7c8.js → en-qGo6sk9V.js} +2 -3
  10. package/dist/en-qGo6sk9V.js.map +1 -0
  11. package/dist/locales.cjs +1 -1
  12. package/dist/locales.cjs.map +1 -1
  13. package/dist/locales.js +20 -39
  14. package/dist/locales.js.map +1 -1
  15. package/dist/style.css +1 -1
  16. package/dist/webpack-stats.json +1 -1
  17. package/package.json +8 -7
  18. package/src/api/README.md +1 -1
  19. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +19 -14
  20. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +7 -8
  21. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +3 -3
  22. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +12 -12
  23. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +14 -14
  24. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +16 -16
  25. package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +8 -8
  26. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +12 -12
  27. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +8 -8
  28. package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +10 -10
  29. package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +2 -2
  30. package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +2816 -0
  31. package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +200 -42
  32. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +104 -34
  33. package/src/api/blockManipulation/getBlock/getBlock.ts +9 -9
  34. package/src/api/blockManipulation/insertContentAt.ts +1 -1
  35. package/src/api/blockManipulation/selections/selection.ts +59 -12
  36. package/src/api/blockManipulation/selections/{textCursorPosition/textCursorPosition.ts → textCursorPosition.ts} +13 -13
  37. package/src/api/blockManipulation/tables/tables.test.ts +106 -106
  38. package/src/api/blockManipulation/tables/tables.ts +35 -35
  39. package/src/api/clipboard/fromClipboard/fileDropExtension.ts +2 -2
  40. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +9 -9
  41. package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +3 -3
  42. package/src/api/clipboard/fromClipboard/pasteExtension.ts +3 -3
  43. package/src/api/clipboard/toClipboard/copyExtension.ts +22 -22
  44. package/src/api/exporters/html/externalHTMLExporter.ts +6 -6
  45. package/src/api/exporters/html/internalHTMLSerializer.ts +3 -3
  46. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +16 -16
  47. package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +14 -14
  48. package/src/api/exporters/markdown/markdownExporter.ts +3 -3
  49. package/src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts +3 -3
  50. package/src/api/getBlockInfoFromPos.ts +6 -6
  51. package/src/api/nodeConversions/blockToNode.ts +31 -28
  52. package/src/api/nodeConversions/fragmentToBlocks.ts +1 -1
  53. package/src/api/nodeConversions/nodeToBlock.ts +240 -41
  54. package/src/api/nodeUtil.test.ts +16 -16
  55. package/src/api/nodeUtil.ts +10 -10
  56. package/src/api/parsers/html/parseHTML.ts +1 -1
  57. package/src/api/parsers/html/util/nestedLists.ts +2 -2
  58. package/src/api/parsers/markdown/parseMarkdown.ts +1 -1
  59. package/src/api/pmUtil.ts +7 -7
  60. package/src/api/positionMapping.test.ts +3 -3
  61. package/src/api/positionMapping.ts +5 -5
  62. package/src/blocks/AudioBlockContent/AudioBlockContent.ts +4 -4
  63. package/src/blocks/CodeBlockContent/CodeBlockContent.ts +18 -18
  64. package/src/blocks/FileBlockContent/FileBlockContent.ts +2 -2
  65. package/src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts +2 -2
  66. package/src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts +6 -6
  67. package/src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts +2 -2
  68. package/src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts +1 -1
  69. package/src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts +7 -7
  70. package/src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts +1 -1
  71. package/src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts +1 -1
  72. package/src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts +2 -2
  73. package/src/blocks/HeadingBlockContent/HeadingBlockContent.ts +6 -6
  74. package/src/blocks/ImageBlockContent/ImageBlockContent.ts +4 -4
  75. package/src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts +4 -4
  76. package/src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts +10 -10
  77. package/src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts +1 -1
  78. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts +1 -1
  79. package/src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts +4 -4
  80. package/src/blocks/ListItemBlockContent/getListItemContent.ts +5 -5
  81. package/src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts +1 -1
  82. package/src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts +3 -3
  83. package/src/blocks/PageBreakBlockContent/schema.ts +2 -2
  84. package/src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts +3 -3
  85. package/src/blocks/QuoteBlockContent/QuoteBlockContent.ts +4 -4
  86. package/src/blocks/README.md +1 -1
  87. package/src/blocks/TableBlockContent/TableBlockContent.ts +37 -7
  88. package/src/blocks/TableBlockContent/TableExtension.ts +3 -3
  89. package/src/blocks/VideoBlockContent/VideoBlockContent.ts +4 -4
  90. package/src/blocks/defaultBlockHelpers.ts +8 -8
  91. package/src/blocks/defaultBlockTypeGuards.ts +16 -16
  92. package/src/blocks/defaultBlocks.ts +3 -3
  93. package/src/comments/threadstore/DefaultThreadStoreAuth.ts +3 -3
  94. package/src/comments/threadstore/ThreadStore.ts +1 -1
  95. package/src/comments/threadstore/TipTapThreadStore.ts +10 -10
  96. package/src/comments/threadstore/yjs/RESTYjsThreadStore.ts +4 -4
  97. package/src/comments/threadstore/yjs/YjsThreadStore.test.ts +2 -2
  98. package/src/comments/threadstore/yjs/YjsThreadStore.ts +14 -14
  99. package/src/comments/threadstore/yjs/YjsThreadStoreBase.ts +1 -1
  100. package/src/comments/threadstore/yjs/yjsHelpers.ts +6 -6
  101. package/src/editor/Block.css +35 -1
  102. package/src/editor/BlockNoteEditor.test.ts +10 -3
  103. package/src/editor/BlockNoteEditor.ts +95 -38
  104. package/src/editor/BlockNoteExtension.ts +26 -0
  105. package/src/editor/BlockNoteExtensions.ts +38 -22
  106. package/src/editor/BlockNoteSchema.ts +4 -4
  107. package/src/editor/BlockNoteTipTapEditor.ts +33 -12
  108. package/src/editor/README.md +1 -1
  109. package/src/editor/cursorPositionTypes.ts +1 -1
  110. package/src/editor/editor.css +15 -3
  111. package/src/editor/selectionTypes.ts +1 -1
  112. package/src/editor/transformPasted.ts +2 -2
  113. package/src/exporter/Exporter.ts +5 -5
  114. package/src/exporter/mapping.ts +7 -7
  115. package/src/extensions/BackgroundColor/BackgroundColorMark.ts +1 -1
  116. package/src/extensions/Collaboration/CursorPlugin.ts +15 -9
  117. package/src/extensions/Collaboration/ForkYDocPlugin.test.ts +166 -0
  118. package/src/extensions/Collaboration/ForkYDocPlugin.ts +174 -0
  119. package/src/extensions/Collaboration/SyncPlugin.ts +7 -4
  120. package/src/extensions/Collaboration/UndoPlugin.ts +7 -4
  121. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor-forked.json +30 -0
  122. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-editor.json +30 -0
  123. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap-forked.html +1 -0
  124. package/src/extensions/Collaboration/__snapshots__/fork-yjs-snap.html +1 -0
  125. package/src/extensions/Comments/CommentsPlugin.ts +80 -75
  126. package/src/extensions/Comments/userstore/UserStore.ts +2 -2
  127. package/src/extensions/FilePanel/FilePanelPlugin.ts +56 -55
  128. package/src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts +60 -30
  129. package/src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +26 -26
  130. package/src/extensions/LinkToolbar/LinkToolbarPlugin.ts +33 -32
  131. package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts +45 -42
  132. package/src/extensions/Placeholder/PlaceholderPlugin.ts +113 -110
  133. package/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts +179 -170
  134. package/src/extensions/README.md +1 -1
  135. package/src/extensions/ShowSelection/ShowSelectionPlugin.ts +22 -19
  136. package/src/extensions/SideMenu/MultipleNodeSelection.ts +1 -1
  137. package/src/extensions/SideMenu/SideMenuPlugin.ts +49 -48
  138. package/src/extensions/SideMenu/dragging.ts +8 -8
  139. package/src/extensions/SuggestionMenu/SuggestionPlugin.ts +176 -176
  140. package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +2 -2
  141. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +16 -16
  142. package/src/extensions/Suggestions/SuggestionMarks.ts +175 -0
  143. package/src/extensions/TableHandles/TableHandlesPlugin.ts +199 -195
  144. package/src/extensions/TrailingNode/TrailingNodeExtension.ts +1 -1
  145. package/src/extensions/UniqueID/UniqueID.ts +6 -6
  146. package/src/extensions/getDraggableBlockFromElement.ts +1 -1
  147. package/src/fonts/inter.css +18 -9
  148. package/src/i18n/locales/ar.ts +0 -1
  149. package/src/i18n/locales/de.ts +0 -1
  150. package/src/i18n/locales/en.ts +0 -1
  151. package/src/i18n/locales/es.ts +0 -1
  152. package/src/i18n/locales/fr.ts +0 -1
  153. package/src/i18n/locales/hr.ts +0 -1
  154. package/src/i18n/locales/is.ts +0 -1
  155. package/src/i18n/locales/it.ts +0 -1
  156. package/src/i18n/locales/ja.ts +0 -1
  157. package/src/i18n/locales/ko.ts +0 -1
  158. package/src/i18n/locales/nl.ts +0 -1
  159. package/src/i18n/locales/no.ts +0 -1
  160. package/src/i18n/locales/pl.ts +0 -1
  161. package/src/i18n/locales/pt.ts +0 -1
  162. package/src/i18n/locales/ru.ts +0 -1
  163. package/src/i18n/locales/sk.ts +0 -1
  164. package/src/i18n/locales/uk.ts +0 -1
  165. package/src/i18n/locales/vi.ts +0 -1
  166. package/src/i18n/locales/zh-tw.ts +0 -1
  167. package/src/i18n/locales/zh.ts +0 -1
  168. package/src/index.ts +18 -8
  169. package/src/locales.ts +1 -1
  170. package/src/pm-nodes/BlockContainer.ts +1 -1
  171. package/src/pm-nodes/BlockGroup.ts +2 -2
  172. package/src/pm-nodes/Doc.ts +5 -4
  173. package/src/schema/README.md +1 -1
  174. package/src/schema/blocks/createSpec.ts +14 -14
  175. package/src/schema/blocks/internal.ts +17 -17
  176. package/src/schema/blocks/types.ts +25 -25
  177. package/src/schema/inlineContent/createSpec.ts +16 -20
  178. package/src/schema/inlineContent/internal.ts +9 -9
  179. package/src/schema/inlineContent/types.ts +26 -26
  180. package/src/schema/propTypes.ts +8 -8
  181. package/src/schema/styles/createSpec.ts +2 -2
  182. package/src/schema/styles/internal.ts +7 -7
  183. package/src/schema/styles/types.ts +2 -2
  184. package/src/util/EventEmitter.ts +4 -4
  185. package/src/util/README.md +1 -1
  186. package/src/util/combineByGroup.ts +1 -1
  187. package/src/util/table.ts +33 -30
  188. package/types/src/api/blockManipulation/commands/insertBlocks/insertBlocks.d.ts +1 -1
  189. package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.d.ts +4 -0
  190. package/types/src/api/blockManipulation/commands/removeBlocks/removeBlocks.test.d.ts +1 -0
  191. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.d.ts +3 -1
  192. package/types/src/api/blockManipulation/selections/selection.d.ts +10 -0
  193. package/types/src/api/blockManipulation/selections/textCursorPosition.d.ts +5 -0
  194. package/types/src/api/blockManipulation/transactions.test.d.ts +0 -0
  195. package/types/src/api/clipboard/clipboardExternal.test.d.ts +1 -0
  196. package/types/src/api/clipboard/clipboardInternal.test.d.ts +1 -0
  197. package/types/src/api/clipboard/testUtil.d.ts +541 -0
  198. package/types/src/api/exporters/html/htmlConversion.test.d.ts +1 -0
  199. package/types/src/api/exporters/markdown/markdownExporter.test.d.ts +1 -0
  200. package/types/src/api/nodeConversions/nodeConversions.test.d.ts +1 -0
  201. package/types/src/api/nodeConversions/nodeToBlock.d.ts +39 -2
  202. package/types/src/api/parsers/html/parseHTML.test.d.ts +1 -0
  203. package/types/src/api/parsers/markdown/parseMarkdown.test.d.ts +1 -0
  204. package/types/src/api/pmUtil.d.ts +3 -3
  205. package/types/src/api/testUtil/cases/customBlocks.d.ts +670 -0
  206. package/types/src/api/testUtil/cases/customInlineContent.d.ts +558 -0
  207. package/types/src/api/testUtil/cases/customStyles.d.ts +552 -0
  208. package/types/src/api/testUtil/cases/defaultSchema.d.ts +4 -0
  209. package/types/src/api/testUtil/index.d.ts +14 -0
  210. package/types/src/api/testUtil/partialBlockTestUtil.d.ts +9 -0
  211. package/types/src/api/testUtil/paste.d.ts +2 -0
  212. package/types/src/blocks/CodeBlockContent/defaultSupportedLanguages.d.ts +6 -0
  213. package/types/src/blocks/TableBlockContent/TableBlockContent.d.ts +9 -1
  214. package/types/src/editor/BlockNoteEditor.d.ts +58 -10
  215. package/types/src/editor/BlockNoteExtension.d.ts +9 -0
  216. package/types/src/editor/BlockNoteExtensions.d.ts +2 -2
  217. package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -2
  218. package/types/src/extensions/Collaboration/CursorPlugin.d.ts +3 -3
  219. package/types/src/extensions/Collaboration/ForkYDocPlugin.d.ts +41 -0
  220. package/types/src/extensions/Collaboration/ForkYDocPlugin.test.d.ts +1 -0
  221. package/types/src/extensions/Collaboration/SyncPlugin.d.ts +3 -3
  222. package/types/src/extensions/Collaboration/UndoPlugin.d.ts +3 -3
  223. package/types/src/extensions/Collaboration/createCollaborationExtensions.d.ts +17 -0
  224. package/types/src/extensions/Comments/CommentsPlugin.d.ts +2 -4
  225. package/types/src/extensions/FilePanel/FilePanelPlugin.d.ts +3 -4
  226. package/types/src/extensions/FormattingToolbar/FormattingToolbarPlugin.d.ts +5 -5
  227. package/types/src/extensions/LinkToolbar/LinkToolbarPlugin.d.ts +3 -4
  228. package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.d.ts +2 -3
  229. package/types/src/extensions/Placeholder/PlaceholderPlugin.d.ts +2 -3
  230. package/types/src/extensions/PreviousBlockType/PreviousBlockTypePlugin.d.ts +2 -3
  231. package/types/src/extensions/ShowSelection/ShowSelectionPlugin.d.ts +2 -3
  232. package/types/src/extensions/SideMenu/SideMenuPlugin.d.ts +3 -4
  233. package/types/src/extensions/SuggestionMenu/SuggestionPlugin.d.ts +2 -4
  234. package/types/src/extensions/Suggestions/SuggestionMarks.d.ts +4 -0
  235. package/types/src/extensions/TableHandles/TableHandlesPlugin.d.ts +5 -6
  236. package/types/src/i18n/locales/en.d.ts +0 -1
  237. package/types/src/i18n/locales/sk.d.ts +0 -1
  238. package/types/src/index.d.ts +15 -8
  239. package/dist/en-B7ycW7c8.js.map +0 -1
  240. package/dist/en-D4taoCs4.cjs.map +0 -1
  241. package/dist/tsconfig.tsbuildinfo +0 -1
  242. package/src/api/blockManipulation/selections/__snapshots__/selection.test.ts.snap +0 -844
  243. package/src/api/blockManipulation/selections/selection.test.ts +0 -72
  244. package/src/api/blockManipulation/selections/textCursorPosition/__snapshots__/textCursorPosition.test.ts.snap +0 -316
  245. package/src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.test.ts +0 -74
@@ -0,0 +1,552 @@
1
+ import { EditorTestCases } from "../index.js";
2
+ import { DefaultBlockSchema, DefaultInlineContentSchema } from "../../../blocks/defaultBlocks.js";
3
+ import { BlockNoteSchema } from "../../../editor/BlockNoteSchema.js";
4
+ declare const schema: BlockNoteSchema<import("../../../index.js").BlockSchemaFromSpecs<{
5
+ paragraph: {
6
+ config: {
7
+ type: "paragraph";
8
+ content: "inline";
9
+ propSchema: {
10
+ backgroundColor: {
11
+ default: "default";
12
+ };
13
+ textColor: {
14
+ default: "default";
15
+ };
16
+ textAlignment: {
17
+ default: "left";
18
+ values: readonly ["left", "center", "right", "justify"];
19
+ };
20
+ };
21
+ };
22
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
23
+ type: "paragraph";
24
+ content: "inline";
25
+ propSchema: {
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
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
38
+ };
39
+ heading: {
40
+ config: {
41
+ type: "heading";
42
+ content: "inline";
43
+ propSchema: {
44
+ level: {
45
+ default: number;
46
+ values: readonly [1, 2, 3];
47
+ };
48
+ backgroundColor: {
49
+ default: "default";
50
+ };
51
+ textColor: {
52
+ default: "default";
53
+ };
54
+ textAlignment: {
55
+ default: "left";
56
+ values: readonly ["left", "center", "right", "justify"];
57
+ };
58
+ };
59
+ };
60
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
61
+ type: "heading";
62
+ content: "inline";
63
+ propSchema: {
64
+ level: {
65
+ default: number;
66
+ values: readonly [1, 2, 3];
67
+ };
68
+ backgroundColor: {
69
+ default: "default";
70
+ };
71
+ textColor: {
72
+ default: "default";
73
+ };
74
+ textAlignment: {
75
+ default: "left";
76
+ values: readonly ["left", "center", "right", "justify"];
77
+ };
78
+ };
79
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
80
+ };
81
+ quote: {
82
+ config: {
83
+ type: "quote";
84
+ content: "inline";
85
+ propSchema: {
86
+ backgroundColor: {
87
+ default: "default";
88
+ };
89
+ textColor: {
90
+ default: "default";
91
+ };
92
+ textAlignment: {
93
+ default: "left";
94
+ values: readonly ["left", "center", "right", "justify"];
95
+ };
96
+ };
97
+ };
98
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
99
+ type: "quote";
100
+ content: "inline";
101
+ propSchema: {
102
+ backgroundColor: {
103
+ default: "default";
104
+ };
105
+ textColor: {
106
+ default: "default";
107
+ };
108
+ textAlignment: {
109
+ default: "left";
110
+ values: readonly ["left", "center", "right", "justify"];
111
+ };
112
+ };
113
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
114
+ };
115
+ codeBlock: {
116
+ config: {
117
+ type: "codeBlock";
118
+ content: "inline";
119
+ propSchema: {
120
+ language: {
121
+ default: string;
122
+ };
123
+ };
124
+ };
125
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
126
+ type: "codeBlock";
127
+ content: "inline";
128
+ propSchema: {
129
+ language: {
130
+ default: string;
131
+ };
132
+ };
133
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
134
+ };
135
+ bulletListItem: {
136
+ config: {
137
+ type: "bulletListItem";
138
+ content: "inline";
139
+ propSchema: {
140
+ backgroundColor: {
141
+ default: "default";
142
+ };
143
+ textColor: {
144
+ default: "default";
145
+ };
146
+ textAlignment: {
147
+ default: "left";
148
+ values: readonly ["left", "center", "right", "justify"];
149
+ };
150
+ };
151
+ };
152
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
153
+ type: "bulletListItem";
154
+ content: "inline";
155
+ propSchema: {
156
+ backgroundColor: {
157
+ default: "default";
158
+ };
159
+ textColor: {
160
+ default: "default";
161
+ };
162
+ textAlignment: {
163
+ default: "left";
164
+ values: readonly ["left", "center", "right", "justify"];
165
+ };
166
+ };
167
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
168
+ };
169
+ numberedListItem: {
170
+ config: {
171
+ type: "numberedListItem";
172
+ content: "inline";
173
+ propSchema: {
174
+ start: {
175
+ default: undefined;
176
+ type: "number";
177
+ };
178
+ backgroundColor: {
179
+ default: "default";
180
+ };
181
+ textColor: {
182
+ default: "default";
183
+ };
184
+ textAlignment: {
185
+ default: "left";
186
+ values: readonly ["left", "center", "right", "justify"];
187
+ };
188
+ };
189
+ };
190
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
191
+ type: "numberedListItem";
192
+ content: "inline";
193
+ propSchema: {
194
+ start: {
195
+ default: undefined;
196
+ type: "number";
197
+ };
198
+ backgroundColor: {
199
+ default: "default";
200
+ };
201
+ textColor: {
202
+ default: "default";
203
+ };
204
+ textAlignment: {
205
+ default: "left";
206
+ values: readonly ["left", "center", "right", "justify"];
207
+ };
208
+ };
209
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
210
+ };
211
+ checkListItem: {
212
+ config: {
213
+ type: "checkListItem";
214
+ content: "inline";
215
+ propSchema: {
216
+ checked: {
217
+ default: false;
218
+ };
219
+ backgroundColor: {
220
+ default: "default";
221
+ };
222
+ textColor: {
223
+ default: "default";
224
+ };
225
+ textAlignment: {
226
+ default: "left";
227
+ values: readonly ["left", "center", "right", "justify"];
228
+ };
229
+ };
230
+ };
231
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
232
+ type: "checkListItem";
233
+ content: "inline";
234
+ propSchema: {
235
+ checked: {
236
+ default: false;
237
+ };
238
+ backgroundColor: {
239
+ default: "default";
240
+ };
241
+ textColor: {
242
+ default: "default";
243
+ };
244
+ textAlignment: {
245
+ default: "left";
246
+ values: readonly ["left", "center", "right", "justify"];
247
+ };
248
+ };
249
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
250
+ };
251
+ table: {
252
+ config: {
253
+ type: "table";
254
+ content: "table";
255
+ propSchema: {
256
+ textColor: {
257
+ default: "default";
258
+ };
259
+ };
260
+ };
261
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
262
+ type: "table";
263
+ content: "table";
264
+ propSchema: {
265
+ textColor: {
266
+ default: "default";
267
+ };
268
+ };
269
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
270
+ };
271
+ file: {
272
+ config: {
273
+ type: "file";
274
+ propSchema: {
275
+ backgroundColor: {
276
+ default: "default";
277
+ };
278
+ name: {
279
+ default: "";
280
+ };
281
+ url: {
282
+ default: "";
283
+ };
284
+ caption: {
285
+ default: "";
286
+ };
287
+ };
288
+ content: "none";
289
+ isFileBlock: true;
290
+ };
291
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
292
+ type: "file";
293
+ propSchema: {
294
+ backgroundColor: {
295
+ default: "default";
296
+ };
297
+ name: {
298
+ default: "";
299
+ };
300
+ url: {
301
+ default: "";
302
+ };
303
+ caption: {
304
+ default: "";
305
+ };
306
+ };
307
+ content: "none";
308
+ isFileBlock: true;
309
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
310
+ };
311
+ image: {
312
+ config: {
313
+ type: "image";
314
+ propSchema: {
315
+ textAlignment: {
316
+ default: "left";
317
+ values: readonly ["left", "center", "right", "justify"];
318
+ };
319
+ backgroundColor: {
320
+ default: "default";
321
+ };
322
+ name: {
323
+ default: "";
324
+ };
325
+ url: {
326
+ default: "";
327
+ };
328
+ caption: {
329
+ default: "";
330
+ };
331
+ showPreview: {
332
+ default: true;
333
+ };
334
+ previewWidth: {
335
+ default: number;
336
+ };
337
+ };
338
+ content: "none";
339
+ isFileBlock: true;
340
+ fileBlockAccept: string[];
341
+ };
342
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
343
+ type: "image";
344
+ propSchema: {
345
+ textAlignment: {
346
+ default: "left";
347
+ values: readonly ["left", "center", "right", "justify"];
348
+ };
349
+ backgroundColor: {
350
+ default: "default";
351
+ };
352
+ name: {
353
+ default: "";
354
+ };
355
+ url: {
356
+ default: "";
357
+ };
358
+ caption: {
359
+ default: "";
360
+ };
361
+ showPreview: {
362
+ default: true;
363
+ };
364
+ previewWidth: {
365
+ default: number;
366
+ };
367
+ };
368
+ content: "none";
369
+ isFileBlock: true;
370
+ fileBlockAccept: string[];
371
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
372
+ };
373
+ video: {
374
+ config: {
375
+ type: "video";
376
+ propSchema: {
377
+ textAlignment: {
378
+ default: "left";
379
+ values: readonly ["left", "center", "right", "justify"];
380
+ };
381
+ backgroundColor: {
382
+ default: "default";
383
+ };
384
+ name: {
385
+ default: "";
386
+ };
387
+ url: {
388
+ default: "";
389
+ };
390
+ caption: {
391
+ default: "";
392
+ };
393
+ showPreview: {
394
+ default: true;
395
+ };
396
+ previewWidth: {
397
+ default: number;
398
+ };
399
+ };
400
+ content: "none";
401
+ isFileBlock: true;
402
+ fileBlockAccept: string[];
403
+ };
404
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
405
+ type: "video";
406
+ propSchema: {
407
+ textAlignment: {
408
+ default: "left";
409
+ values: readonly ["left", "center", "right", "justify"];
410
+ };
411
+ backgroundColor: {
412
+ default: "default";
413
+ };
414
+ name: {
415
+ default: "";
416
+ };
417
+ url: {
418
+ default: "";
419
+ };
420
+ caption: {
421
+ default: "";
422
+ };
423
+ showPreview: {
424
+ default: true;
425
+ };
426
+ previewWidth: {
427
+ default: number;
428
+ };
429
+ };
430
+ content: "none";
431
+ isFileBlock: true;
432
+ fileBlockAccept: string[];
433
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
434
+ };
435
+ audio: {
436
+ config: {
437
+ type: "audio";
438
+ propSchema: {
439
+ backgroundColor: {
440
+ default: "default";
441
+ };
442
+ name: {
443
+ default: "";
444
+ };
445
+ url: {
446
+ default: "";
447
+ };
448
+ caption: {
449
+ default: "";
450
+ };
451
+ showPreview: {
452
+ default: true;
453
+ };
454
+ };
455
+ content: "none";
456
+ isFileBlock: true;
457
+ fileBlockAccept: string[];
458
+ };
459
+ implementation: import("../../../index.js").TiptapBlockImplementation<{
460
+ type: "audio";
461
+ propSchema: {
462
+ backgroundColor: {
463
+ default: "default";
464
+ };
465
+ name: {
466
+ default: "";
467
+ };
468
+ url: {
469
+ default: "";
470
+ };
471
+ caption: {
472
+ default: "";
473
+ };
474
+ showPreview: {
475
+ default: true;
476
+ };
477
+ };
478
+ content: "none";
479
+ isFileBlock: true;
480
+ fileBlockAccept: string[];
481
+ }, any, import("../../../index.js").InlineContentSchema, import("../../../index.js").StyleSchema>;
482
+ };
483
+ }>, import("../../../index.js").InlineContentSchemaFromSpecs<{
484
+ text: {
485
+ config: "text";
486
+ implementation: any;
487
+ };
488
+ link: {
489
+ config: "link";
490
+ implementation: any;
491
+ };
492
+ }>, import("../../../index.js").StyleSchemaFromSpecs<{
493
+ small: import("../../../index.js").StyleSpec<{
494
+ type: string;
495
+ propSchema: "boolean";
496
+ }>;
497
+ fontSize: import("../../../index.js").StyleSpec<{
498
+ type: string;
499
+ propSchema: "string";
500
+ }>;
501
+ bold: {
502
+ config: {
503
+ type: string;
504
+ propSchema: "boolean";
505
+ };
506
+ implementation: import("../../../index.js").StyleImplementation;
507
+ };
508
+ italic: {
509
+ config: {
510
+ type: string;
511
+ propSchema: "boolean";
512
+ };
513
+ implementation: import("../../../index.js").StyleImplementation;
514
+ };
515
+ underline: {
516
+ config: {
517
+ type: string;
518
+ propSchema: "boolean";
519
+ };
520
+ implementation: import("../../../index.js").StyleImplementation;
521
+ };
522
+ strike: {
523
+ config: {
524
+ type: string;
525
+ propSchema: "boolean";
526
+ };
527
+ implementation: import("../../../index.js").StyleImplementation;
528
+ };
529
+ code: {
530
+ config: {
531
+ type: string;
532
+ propSchema: "boolean";
533
+ };
534
+ implementation: import("../../../index.js").StyleImplementation;
535
+ };
536
+ textColor: {
537
+ config: {
538
+ type: string;
539
+ propSchema: "string";
540
+ };
541
+ implementation: import("../../../index.js").StyleImplementation;
542
+ };
543
+ backgroundColor: {
544
+ config: {
545
+ type: string;
546
+ propSchema: "string";
547
+ };
548
+ implementation: import("../../../index.js").StyleImplementation;
549
+ };
550
+ }>>;
551
+ export declare const customStylesTestCases: EditorTestCases<DefaultBlockSchema, DefaultInlineContentSchema, typeof schema.styleSchema>;
552
+ export {};
@@ -0,0 +1,4 @@
1
+ import { EditorTestCases } from "../index.js";
2
+ import { DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema } from "../../../blocks/defaultBlocks.js";
3
+ import { pageBreakSchema } from "../../../blocks/PageBreakBlockContent/schema.js";
4
+ export declare const defaultSchemaTestCases: EditorTestCases<DefaultBlockSchema & typeof pageBreakSchema.blockSchema, DefaultInlineContentSchema, DefaultStyleSchema>;
@@ -0,0 +1,14 @@
1
+ import { PartialBlock } from "../../blocks/defaultBlocks.js";
2
+ import { BlockNoteEditor } from "../../editor/BlockNoteEditor.js";
3
+ import { BlockSchema } from "../../schema/blocks/types.js";
4
+ import { InlineContentSchema } from "../../schema/inlineContent/types.js";
5
+ import { StyleSchema } from "../../schema/styles/types.js";
6
+ import { NoInfer } from "../../util/typescript.js";
7
+ export type EditorTestCases<B extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema> = {
8
+ name: string;
9
+ createEditor: () => BlockNoteEditor<B, I, S>;
10
+ documents: Array<{
11
+ name: string;
12
+ blocks: PartialBlock<NoInfer<B>, NoInfer<I>, NoInfer<S>>[];
13
+ }>;
14
+ };
@@ -0,0 +1,9 @@
1
+ import { Block, PartialBlock } from "../../blocks/defaultBlocks.js";
2
+ import { BlockNoteSchema } from "../../editor/BlockNoteSchema.js";
3
+ import { BlockSchema } from "../../schema/blocks/types.js";
4
+ import { InlineContentSchema } from "../../schema/inlineContent/types.js";
5
+ import { StyleSchema } from "../../schema/styles/types.js";
6
+ export declare function partialBlocksToBlocksForTesting<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(schema: BlockNoteSchema<BSchema, I, S>, partialBlocks: Array<PartialBlock<NoInfer<BSchema>, NoInfer<I>, NoInfer<S>>>): Array<Block<BSchema, I, S>>;
7
+ export declare function partialBlockToBlockForTesting<BSchema extends BlockSchema, I extends InlineContentSchema, S extends StyleSchema>(schema: BSchema, partialBlock: PartialBlock<BSchema, I, S>): Block<BSchema, I, S>;
8
+ export declare function addIdsToBlock(block: PartialBlock<any, any, any>): void;
9
+ export declare function addIdsToBlocks(blocks: PartialBlock<any, any, any>[]): void;
@@ -0,0 +1,2 @@
1
+ import { EditorView } from "@tiptap/pm/view";
2
+ export declare function doPaste(view: EditorView, text: string, html: string | null, preferPlain: boolean, event: ClipboardEvent): boolean;
@@ -0,0 +1,6 @@
1
+ export type SupportedLanguageConfig = {
2
+ id: string;
3
+ name: string;
4
+ match: string[];
5
+ };
6
+ export declare const defaultSupportedLanguages: SupportedLanguageConfig[];
@@ -1,14 +1,22 @@
1
+ import { Node } from "@tiptap/core";
1
2
  export declare const tablePropSchema: {
2
3
  textColor: {
3
4
  default: "default";
4
5
  };
5
6
  };
6
- export declare const TableBlockContent: import("@tiptap/core").Node<any, any> & {
7
+ export declare const TableBlockContent: Node<any, any> & {
7
8
  name: "table";
8
9
  config: {
9
10
  content: "tableRow+";
10
11
  };
11
12
  };
13
+ /**
14
+ * This extension allows you to create table rows.
15
+ * @see https://www.tiptap.dev/api/nodes/table-row
16
+ */
17
+ export declare const TableRow: Node<{
18
+ HTMLAttributes: Record<string, any>;
19
+ }, any>;
12
20
  export declare const Table: {
13
21
  config: {
14
22
  type: "table";