@blocknote/core 0.25.1 → 0.26.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 (65) hide show
  1. package/dist/blocknote.cjs +7 -7
  2. package/dist/blocknote.cjs.map +1 -1
  3. package/dist/blocknote.js +781 -646
  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/style.css +1 -1
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/dist/webpack-stats.json +1 -1
  12. package/package.json +2 -2
  13. package/src/api/nodeConversions/nodeToBlock.ts +3 -2
  14. package/src/api/parsers/html/__snapshots__/parse-2-tables.json +129 -0
  15. package/src/api/parsers/html/parseHTML.test.ts +35 -0
  16. package/src/comments/threadstore/ThreadStore.ts +1 -1
  17. package/src/comments/threadstore/yjs/YjsThreadStore.ts +1 -0
  18. package/src/comments/threadstore/yjs/yjsHelpers.ts +3 -1
  19. package/src/comments/types.ts +4 -0
  20. package/src/editor/Block.css +1 -1
  21. package/src/editor/BlockNoteEditor.ts +1 -7
  22. package/src/editor/BlockNoteTipTapEditor.ts +18 -7
  23. package/src/extensions/Comments/CommentMark.ts +0 -1
  24. package/src/extensions/Comments/CommentsPlugin.ts +79 -30
  25. package/src/extensions/SideMenu/dragging.ts +13 -0
  26. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +6 -2
  27. package/src/extensions/TableHandles/TableHandlesPlugin.ts +25 -26
  28. package/src/i18n/locales/ar.ts +4 -0
  29. package/src/i18n/locales/de.ts +15 -1
  30. package/src/i18n/locales/en.ts +4 -0
  31. package/src/i18n/locales/es.ts +15 -1
  32. package/src/i18n/locales/fr.ts +4 -0
  33. package/src/i18n/locales/hr.ts +21 -4
  34. package/src/i18n/locales/is.ts +4 -0
  35. package/src/i18n/locales/it.ts +15 -1
  36. package/src/i18n/locales/ja.ts +4 -0
  37. package/src/i18n/locales/ko.ts +4 -0
  38. package/src/i18n/locales/nl.ts +4 -0
  39. package/src/i18n/locales/no.ts +4 -0
  40. package/src/i18n/locales/pl.ts +4 -0
  41. package/src/i18n/locales/pt.ts +4 -0
  42. package/src/i18n/locales/ru.ts +4 -0
  43. package/src/i18n/locales/uk.ts +4 -0
  44. package/src/i18n/locales/vi.ts +4 -0
  45. package/src/i18n/locales/zh.ts +4 -0
  46. package/types/src/comments/threadstore/ThreadStore.d.ts +1 -1
  47. package/types/src/comments/types.d.ts +4 -0
  48. package/types/src/editor/BlockNoteTipTapEditor.d.ts +2 -1
  49. package/types/src/extensions/Comments/CommentsPlugin.d.ts +16 -1
  50. package/types/src/extensions/Comments/threadstore/DefaultThreadStoreAuth.d.ts +47 -0
  51. package/types/src/extensions/Comments/threadstore/ThreadStore.d.ts +121 -0
  52. package/types/src/extensions/Comments/threadstore/ThreadStoreAuth.d.ts +12 -0
  53. package/types/src/extensions/Comments/threadstore/TipTapThreadStore.d.ts +97 -0
  54. package/types/src/extensions/Comments/threadstore/yjs/RESTYjsThreadStore.d.ts +83 -0
  55. package/types/src/extensions/Comments/threadstore/yjs/YjsThreadStore.d.ts +79 -0
  56. package/types/src/extensions/Comments/threadstore/yjs/YjsThreadStore.test.d.ts +1 -0
  57. package/types/src/extensions/Comments/threadstore/yjs/YjsThreadStoreBase.d.ts +15 -0
  58. package/types/src/extensions/Comments/threadstore/yjs/yjsHelpers.d.ts +13 -0
  59. package/types/src/extensions/Comments/types.d.ts +109 -0
  60. package/types/src/i18n/locales/de.d.ts +2 -304
  61. package/types/src/i18n/locales/en.d.ts +4 -0
  62. package/types/src/i18n/locales/es.d.ts +2 -269
  63. package/types/src/i18n/locales/hr.d.ts +2 -266
  64. package/types/src/i18n/locales/it.d.ts +2 -269
  65. package/types/src/models/User.d.ts +5 -0
@@ -1 +1 @@
1
- {"builtAt":1741193153445,"assets":[{"name":"blocknote.cjs","size":287384},{"name":"comments.cjs","size":11720},{"name":"comments.cjs.map","size":47300},{"name":"blocknote.cjs.map","size":1059927}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":7622,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/de.ts","size":8039,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":7724,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/es.ts","size":7897,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":8964,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/hr.ts","size":7828,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":7959,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/it.ts","size":7990,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":7258,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":7034,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":8189,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/no.ts","size":8071,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":7874,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":8126,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":8806,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/uk.ts","size":8740,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":7976,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":6961,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3648,"chunks":["a1ee98a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1755,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4130,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9510,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2739,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":6903,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":490,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4754,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5122,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3264,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1725,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3155,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/defaultSupportedLanguages.ts","size":1707,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9104,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1460,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4637,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3243,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3418,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1429,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3415,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4427,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1434,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2275,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":4708,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1147,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6763,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":1141,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5693,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2324,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2533,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts","size":123,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2452,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":4698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2880,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1097,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":115,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3917,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":1552,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":859,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5228,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/createCollaborationExtensions.ts","size":3553,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1486,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":6396,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3584,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5323,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":14774,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7611,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4826,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":967,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4482,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":14087,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8070,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":27024,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2038,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4887,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":3846,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":29763,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":3860,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":2907,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7223,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]}]}
1
+ {"builtAt":1742379509520,"assets":[{"name":"blocknote.cjs","size":290407},{"name":"comments.cjs","size":11826},{"name":"comments.cjs.map","size":47556},{"name":"blocknote.cjs.map","size":1068595}],"chunks":[{"id":"a1ee98a","entry":true,"initial":true,"files":["blocknote.cjs"],"names":["blocknote"]},{"id":"1627b02","entry":true,"initial":true,"files":["comments.cjs"],"names":["comments"]}],"modules":[{"name":"./src/i18n/locales/ar.ts","size":7747,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/de.ts","size":8463,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/en.ts","size":7849,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/es.ts","size":8327,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/fr.ts","size":9094,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/hr.ts","size":8359,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/is.ts","size":8080,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/it.ts","size":8419,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ja.ts","size":7369,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ko.ts","size":7145,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/nl.ts","size":8321,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/no.ts","size":8191,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pl.ts","size":8011,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/pt.ts","size":8259,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/ru.ts","size":8944,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/uk.ts","size":8877,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/vi.ts","size":8114,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/zh.ts","size":7068,"chunks":["a1ee98a"]},{"name":"./src/i18n/locales/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/util/typescript.ts","size":331,"chunks":["a1ee98a"]},{"name":"./src/api/getBlockInfoFromPos.ts","size":3648,"chunks":["a1ee98a"]},{"name":"./src/extensions/UniqueID/UniqueID.ts","size":9054,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/types.ts","size":302,"chunks":["a1ee98a"]},{"name":"./src/util/table.ts","size":1212,"chunks":["a1ee98a"]},{"name":"./src/util/browser.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockHelpers.ts","size":1755,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultProps.ts","size":269,"chunks":["a1ee98a"]},{"name":"./src/util/string.ts","size":299,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/internal.ts","size":4130,"chunks":["a1ee98a"]},{"name":"./src/schema/blocks/createSpec.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/nodeToBlock.ts","size":9521,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/internal.ts","size":1398,"chunks":["a1ee98a"]},{"name":"./src/schema/inlineContent/createSpec.ts","size":2739,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/internal.ts","size":1162,"chunks":["a1ee98a"]},{"name":"./src/schema/styles/createSpec.ts","size":1263,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/tables/tables.ts","size":10346,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/blockToNode.ts","size":6903,"chunks":["a1ee98a"]},{"name":"./src/api/nodeUtil.ts","size":490,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/updateBlock/updateBlock.ts","size":4754,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksExternalHTML.ts","size":5122,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/externalHTMLExporter.ts","size":886,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/util/serializeBlocksInternalHTML.ts","size":3264,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/html/internalHTMLSerializer.ts","size":288,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseFigureElement.ts","size":342,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createAddFileButton.ts","size":1725,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileNameWithIcon.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createFileBlockWrapper.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createFigureWithCaption.ts","size":307,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/toExternalHTML/createLinkWithCaption.ts","size":294,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/parseAudioElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/AudioBlockContent/AudioBlockContent.ts","size":3155,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/defaultSupportedLanguages.ts","size":1707,"chunks":["a1ee98a"]},{"name":"./src/blocks/CodeBlockContent/CodeBlockContent.ts","size":9104,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/parse/parseEmbedElement.ts","size":108,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/FileBlockContent.ts","size":1460,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/helpers/render/createResizableFileBlockWrapper.ts","size":4637,"chunks":["a1ee98a"]},{"name":"./src/blocks/FileBlockContent/uploadToTmpFilesDotOrg_DEV_ONLY.ts","size":316,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/parseImageElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/ImageBlockContent/ImageBlockContent.ts","size":3243,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/PageBreakBlockContent.ts","size":854,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorMark.ts","size":946,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorMark.ts","size":866,"chunks":["a1ee98a"]},{"name":"./src/blocks/HeadingBlockContent/HeadingBlockContent.ts","size":3418,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/splitBlock/splitBlock.ts","size":868,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/ListItemKeyboardShortcuts.ts","size":1429,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/BulletListItemBlockContent/BulletListItemBlockContent.ts","size":3415,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/CheckListItemBlockContent/CheckListItemBlockContent.ts","size":7148,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListIndexingPlugin.ts","size":2207,"chunks":["a1ee98a"]},{"name":"./src/blocks/ListItemBlockContent/NumberedListItemBlockContent/NumberedListItemBlockContent.ts","size":4427,"chunks":["a1ee98a"]},{"name":"./src/blocks/ParagraphBlockContent/ParagraphBlockContent.ts","size":1434,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableExtension.ts","size":2275,"chunks":["a1ee98a"]},{"name":"./src/blocks/TableBlockContent/TableBlockContent.ts","size":4708,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/parseVideoElement.ts","size":175,"chunks":["a1ee98a"]},{"name":"./src/blocks/VideoBlockContent/VideoBlockContent.ts","size":3162,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlocks.ts","size":1147,"chunks":["a1ee98a"]},{"name":"./src/blocks/defaultBlockTypeGuards.ts","size":1688,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts","size":6811,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteSchema.ts","size":1044,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/schema.ts","size":350,"chunks":["a1ee98a"]},{"name":"./src/blocks/PageBreakBlockContent/getPageBreakSlashMenuItems.ts","size":536,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts","size":1141,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts","size":5693,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/nestBlock/nestBlock.ts","size":2324,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts","size":2533,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/removeBlocks/removeBlocks.ts","size":123,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/getBlock/getBlock.ts","size":2452,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/insertContentAt.ts","size":1120,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/selection.ts","size":4698,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/selections/textCursorPosition/textCursorPosition.ts","size":2880,"chunks":["a1ee98a"]},{"name":"./src/util/esmDependencies.ts","size":820,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/removeUnderlinesRehypePlugin.ts","size":752,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/util/addSpacesToCheckboxesRehypePlugin.ts","size":969,"chunks":["a1ee98a"]},{"name":"./src/api/exporters/markdown/markdownExporter.ts","size":837,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/util/nestedLists.ts","size":2174,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/html/parseHTML.ts","size":503,"chunks":["a1ee98a"]},{"name":"./src/api/parsers/markdown/parseMarkdown.ts","size":1097,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/acceptedMIMETypes.ts","size":115,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleFileInsertion.ts","size":3917,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/fileDropExtension.ts","size":884,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/handleVSCodePaste.ts","size":661,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/fromClipboard/pasteExtension.ts","size":1552,"chunks":["a1ee98a"]},{"name":"./src/api/nodeConversions/fragmentToBlocks.ts","size":859,"chunks":["a1ee98a"]},{"name":"./src/api/clipboard/toClipboard/copyExtension.ts","size":5228,"chunks":["a1ee98a"]},{"name":"./src/extensions/BackgroundColor/BackgroundColorExtension.ts","size":819,"chunks":["a1ee98a"]},{"name":"./src/extensions/Collaboration/createCollaborationExtensions.ts","size":3553,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentMark.ts","size":1428,"chunks":["a1ee98a"]},{"name":"./src/util/EventEmitter.ts","size":744,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/userstore/UserStore.ts","size":1354,"chunks":["a1ee98a"]},{"name":"./src/extensions/Comments/CommentsPlugin.ts","size":7660,"chunks":["a1ee98a"]},{"name":"./src/extensions/FilePanel/FilePanelPlugin.ts","size":3584,"chunks":["a1ee98a"]},{"name":"./src/extensions/FormattingToolbar/FormattingToolbarPlugin.ts","size":5323,"chunks":["a1ee98a"]},{"name":"./src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts","size":3228,"chunks":["a1ee98a"]},{"name":"./src/extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts","size":14774,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/LinkToolbarPlugin.ts","size":7611,"chunks":["a1ee98a"]},{"name":"./src/extensions/LinkToolbar/protocols.ts","size":172,"chunks":["a1ee98a"]},{"name":"./src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboardPlugin.ts","size":1195,"chunks":["a1ee98a"]},{"name":"./src/extensions/Placeholder/PlaceholderPlugin.ts","size":3609,"chunks":["a1ee98a"]},{"name":"./src/extensions/PreviousBlockType/PreviousBlockTypePlugin.ts","size":4826,"chunks":["a1ee98a"]},{"name":"./src/extensions/ShowSelection/ShowSelectionPlugin.ts","size":967,"chunks":["a1ee98a"]},{"name":"./src/extensions/getDraggableBlockFromElement.ts","size":404,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/MultipleNodeSelection.ts","size":1616,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/dragging.ts","size":4733,"chunks":["a1ee98a"]},{"name":"./src/extensions/SideMenu/SideMenuPlugin.ts","size":14087,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/SuggestionPlugin.ts","size":8070,"chunks":["a1ee98a"]},{"name":"./src/extensions/TableHandles/TableHandlesPlugin.ts","size":26718,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextAlignment/TextAlignmentExtension.ts","size":976,"chunks":["a1ee98a"]},{"name":"./src/extensions/TextColor/TextColorExtension.ts","size":753,"chunks":["a1ee98a"]},{"name":"./src/extensions/TrailingNode/TrailingNodeExtension.ts","size":1563,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockContainer.ts","size":2038,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/BlockGroup.ts","size":1102,"chunks":["a1ee98a"]},{"name":"./src/pm-nodes/Doc.ts","size":90,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteExtensions.ts","size":4887,"chunks":["a1ee98a"]},{"name":"./src/editor/transformPasted.ts","size":2604,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteTipTapEditor.ts","size":3938,"chunks":["a1ee98a"]},{"name":"./src/style.css","size":0,"chunks":["a1ee98a"]},{"name":"./src/editor/BlockNoteEditor.ts","size":29570,"chunks":["a1ee98a"]},{"name":"./src/editor/defaultColors.ts","size":1193,"chunks":["a1ee98a"]},{"name":"./src/exporter/Exporter.ts","size":1075,"chunks":["a1ee98a"]},{"name":"./src/exporter/mapping.ts","size":197,"chunks":["a1ee98a"]},{"name":"./src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts","size":1204,"chunks":["a1ee98a"]},{"name":"./src/util/combineByGroup.ts","size":550,"chunks":["a1ee98a"]},{"name":"./src/api/testUtil/partialBlockTestUtil.ts","size":3860,"chunks":["a1ee98a"]},{"name":"./src/index.ts","size":0,"chunks":["a1ee98a"]},{"name":"./src/comments/threadstore/ThreadStoreAuth.ts","size":25,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/DefaultThreadStoreAuth.ts","size":2014,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/ThreadStore.ts","size":77,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/TipTapThreadStore.ts","size":5321,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/yjsHelpers.ts","size":3002,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStoreBase.ts","size":790,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/RESTYjsThreadStore.ts","size":2069,"chunks":["1627b02"]},{"name":"./src/comments/threadstore/yjs/YjsThreadStore.ts","size":7267,"chunks":["1627b02"]},{"name":"./src/comments/index.ts","size":0,"chunks":["1627b02"]}]}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "*.css"
7
7
  ],
8
8
  "license": "MPL-2.0",
9
- "version": "0.25.1",
9
+ "version": "0.26.0",
10
10
  "files": [
11
11
  "dist",
12
12
  "types",
@@ -137,5 +137,5 @@
137
137
  "access": "public",
138
138
  "registry": "https://registry.npmjs.org/"
139
139
  },
140
- "gitHead": "79dac9b8156f076d7a8ba095451fb0da2c09400a"
140
+ "gitHead": "7d8c79c62c750db921208c373e6ae7b0c42f994c"
141
141
  }
@@ -82,6 +82,7 @@ export function contentNodeToTableContent<
82
82
 
83
83
  // Only merge if the last and first content are both styled text nodes and have the same styles
84
84
  if (
85
+ first &&
85
86
  isStyledTextInlineContent(last) &&
86
87
  isStyledTextInlineContent(first) &&
87
88
  JSON.stringify(last.styles) === JSON.stringify(first.styles)
@@ -112,13 +113,13 @@ export function contentNodeToTableContent<
112
113
  });
113
114
 
114
115
  for (let i = 0; i < headerMatrix.length; i++) {
115
- if (headerMatrix[i].every((isHeader) => isHeader)) {
116
+ if (headerMatrix[i]?.every((isHeader) => isHeader)) {
116
117
  ret.headerRows = (ret.headerRows ?? 0) + 1;
117
118
  }
118
119
  }
119
120
 
120
121
  for (let i = 0; i < headerMatrix[0]?.length; i++) {
121
- if (headerMatrix.every((row) => row[i])) {
122
+ if (headerMatrix?.every((row) => row[i])) {
122
123
  ret.headerCols = (ret.headerCols ?? 0) + 1;
123
124
  }
124
125
  }
@@ -0,0 +1,129 @@
1
+ [
2
+ {
3
+ "id": "1",
4
+ "type": "table",
5
+ "props": {
6
+ "textColor": "default"
7
+ },
8
+ "content": {
9
+ "type": "tableContent",
10
+ "columnWidths": [
11
+ null
12
+ ],
13
+ "rows": [
14
+ {
15
+ "cells": [
16
+ {
17
+ "type": "tableCell",
18
+ "content": [
19
+ {
20
+ "type": "text",
21
+ "text": "Company",
22
+ "styles": {
23
+ "underline": true
24
+ }
25
+ }
26
+ ],
27
+ "props": {
28
+ "colspan": 1,
29
+ "rowspan": 1,
30
+ "backgroundColor": "default",
31
+ "textColor": "default",
32
+ "textAlignment": "left"
33
+ }
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "cells": [
39
+ {
40
+ "type": "tableCell",
41
+ "content": [
42
+ {
43
+ "type": "text",
44
+ "text": "Example Company Inc.",
45
+ "styles": {
46
+ "bold": true
47
+ }
48
+ },
49
+ {
50
+ "type": "text",
51
+ "text": "\n \nName: [Company Representative]\nTitle: Chief Executive Officer",
52
+ "styles": {}
53
+ }
54
+ ],
55
+ "props": {
56
+ "colspan": 1,
57
+ "rowspan": 1,
58
+ "backgroundColor": "default",
59
+ "textColor": "default",
60
+ "textAlignment": "left"
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ "children": []
68
+ },
69
+ {
70
+ "id": "2",
71
+ "type": "table",
72
+ "props": {
73
+ "textColor": "default"
74
+ },
75
+ "content": {
76
+ "type": "tableContent",
77
+ "columnWidths": [
78
+ null
79
+ ],
80
+ "rows": [
81
+ {
82
+ "cells": [
83
+ {
84
+ "type": "tableCell",
85
+ "content": [
86
+ {
87
+ "type": "text",
88
+ "text": "Advisor",
89
+ "styles": {
90
+ "underline": true
91
+ }
92
+ }
93
+ ],
94
+ "props": {
95
+ "colspan": 1,
96
+ "rowspan": 1,
97
+ "backgroundColor": "default",
98
+ "textColor": "default",
99
+ "textAlignment": "left"
100
+ }
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "cells": [
106
+ {
107
+ "type": "tableCell",
108
+ "content": [
109
+ {
110
+ "type": "text",
111
+ "text": "[Advisor Name]",
112
+ "styles": {}
113
+ }
114
+ ],
115
+ "props": {
116
+ "colspan": 1,
117
+ "rowspan": 1,
118
+ "backgroundColor": "default",
119
+ "textColor": "default",
120
+ "textAlignment": "left"
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ },
127
+ "children": []
128
+ }
129
+ ]
@@ -346,6 +346,41 @@ describe("Parse HTML", () => {
346
346
  await parseHTMLAndCompareSnapshots(html, "parse-div-with-inline-content");
347
347
  });
348
348
 
349
+ it("Parses 2 tables", async () => {
350
+ const html = `
351
+ <table style="border-collapse:collapse;margin-left:255.478pt" cellspacing="0">
352
+ <tr style="height:22pt">
353
+ <td style="width:203pt">
354
+ <p data-text-alignment="left" data-text-indent="0pt"><u>Company</u></p>
355
+ </td>
356
+ </tr>
357
+ <tr style="height:86pt">
358
+ <td style="width:203pt">
359
+ <p data-text-alignment="left" data-text-indent="0pt"><b>Example Company Inc.</b></p>
360
+ <p data-text-alignment="left" data-text-indent="0pt">
361
+ <p>Name: [Company Representative]</p>
362
+ </p>
363
+ <p data-text-alignment="left" data-text-indent="0pt">Title: Chief Executive Officer</p>
364
+ </td>
365
+ </tr>
366
+ </table>
367
+
368
+ <table style="border-collapse:collapse;margin-left:256.5pt" cellspacing="0">
369
+ <tr style="height:58pt">
370
+ <td style="width:209pt;border-bottom-style:solid;border-bottom-width:2pt">
371
+ <p data-text-alignment="left" data-text-indent="0pt"><u>Advisor</u></p>
372
+ </td>
373
+ </tr>
374
+ <tr style="height:13pt">
375
+ <td style="width:209pt;border-top-style:solid;border-top-width:2pt">
376
+ <p data-text-alignment="left" data-text-indent="0pt">[Advisor Name]</p>
377
+ </td>
378
+ </tr>
379
+ </table>`;
380
+
381
+ await parseHTMLAndCompareSnapshots(html, "parse-2-tables");
382
+ });
383
+
349
384
  it("Parse Notion HTML", async () => {
350
385
  // A few notes on Notion output HTML:
351
386
  // - Does not preserve text/background colors
@@ -27,7 +27,7 @@ export abstract class ThreadStore {
27
27
  head: number;
28
28
  anchor: number;
29
29
  };
30
- yjs: {
30
+ yjs?: {
31
31
  head: any;
32
32
  anchor: any;
33
33
  };
@@ -237,6 +237,7 @@ export class YjsThreadStore extends YjsThreadStoreBase {
237
237
 
238
238
  yThread.set("resolved", true);
239
239
  yThread.set("resolvedUpdatedAt", new Date().getTime());
240
+ yThread.set("resolvedBy", this.userId);
240
241
  });
241
242
 
242
243
  public unresolveThread = this.transact((options: { threadId: string }) => {
@@ -40,6 +40,7 @@ export function threadToYMap(thread: ThreadData) {
40
40
  yMap.set("comments", commentsArray);
41
41
  yMap.set("resolved", thread.resolved);
42
42
  yMap.set("resolvedUpdatedAt", thread.resolvedUpdatedAt?.getTime());
43
+ yMap.set("resolvedBy", thread.resolvedBy);
43
44
  yMap.set("metadata", thread.metadata);
44
45
  return yMap;
45
46
  }
@@ -115,7 +116,8 @@ export function yMapToThread(yMap: Y.Map<any>): ThreadData {
115
116
  (comment) => yMapToComment(comment)
116
117
  ),
117
118
  resolved: yMap.get("resolved"),
118
- resolvedUpdatedAt: yMap.get("resolvedUpdatedAt"),
119
+ resolvedUpdatedAt: new Date(yMap.get("resolvedUpdatedAt")),
120
+ resolvedBy: yMap.get("resolvedBy"),
119
121
  metadata: yMap.get("metadata"),
120
122
  };
121
123
  }
@@ -105,6 +105,10 @@ export type ThreadData = {
105
105
  * The date when the thread was marked as resolved.
106
106
  */
107
107
  resolvedUpdatedAt?: Date;
108
+ /**
109
+ * The id of the user that marked the thread as resolved.
110
+ */
111
+ resolvedBy?: string;
108
112
  /**
109
113
  * You can use this store any additional information about the thread.
110
114
  */
@@ -542,6 +542,6 @@ NESTED BLOCKS
542
542
  background: rgba(255, 200, 0, 0.15);
543
543
  }
544
544
 
545
- .bn-thread-mark:not([data-orphan="true"]) .bn-thread-mark-selected {
545
+ .bn-thread-mark .bn-thread-mark-selected {
546
546
  background: rgba(255, 200, 0, 0.25);
547
547
  }
@@ -587,12 +587,6 @@ export class BlockNoteEditor<
587
587
  );
588
588
  }
589
589
 
590
- if (newOptions.comments && !collaborationEnabled) {
591
- throw new Error(
592
- "Comments are only supported when collaboration is enabled, please set the collaboration option"
593
- );
594
- }
595
-
596
590
  const initialContent =
597
591
  newOptions.initialContent ||
598
592
  (collaborationEnabled
@@ -694,7 +688,7 @@ export class BlockNoteEditor<
694
688
  parentElement?: HTMLElement | null,
695
689
  contentComponent?: any
696
690
  ) => {
697
- this._tiptapEditor.mount(parentElement, contentComponent);
691
+ this._tiptapEditor.mount(this, parentElement, contentComponent);
698
692
  };
699
693
 
700
694
  /**
@@ -10,6 +10,7 @@ import { EditorState, Transaction } from "@tiptap/pm/state";
10
10
  import { blockToNode } from "../api/nodeConversions/blockToNode.js";
11
11
  import { PartialBlock } from "../blocks/defaultBlocks.js";
12
12
  import { StyleSchema } from "../schema/index.js";
13
+ import type { BlockNoteEditor } from "./BlockNoteEditor.js";
13
14
 
14
15
  export type BlockNoteTipTapEditorOptions = Partial<
15
16
  Omit<EditorOptions, "content">
@@ -149,7 +150,10 @@ export class BlockNoteTipTapEditor extends TiptapEditor {
149
150
  /**
150
151
  * Replace the default `createView` method with a custom one - which we call on mount
151
152
  */
152
- private createViewAlternative(contentComponent?: any) {
153
+ private createViewAlternative(
154
+ blockNoteEditor: BlockNoteEditor<any, any, any>,
155
+ contentComponent?: any
156
+ ) {
153
157
  (this as any).contentComponent = contentComponent;
154
158
 
155
159
  const markViews: any = {};
@@ -157,7 +161,8 @@ export class BlockNoteTipTapEditor extends TiptapEditor {
157
161
  if (extension.type === "mark" && extension.config.addMarkView) {
158
162
  // Note: migrate to using `addMarkView` from tiptap as soon as this lands
159
163
  // (currently tiptap doesn't support markviews)
160
- markViews[extension.name] = extension.config.addMarkView;
164
+ markViews[extension.name] =
165
+ extension.config.addMarkView(blockNoteEditor);
161
166
  }
162
167
  });
163
168
 
@@ -169,19 +174,21 @@ export class BlockNoteTipTapEditor extends TiptapEditor {
169
174
  dispatchTransaction: this.dispatchTransaction.bind(this),
170
175
  state: this.state,
171
176
  markViews,
177
+ nodeViews: this.extensionManager.nodeViews,
172
178
  }
173
179
  );
174
180
 
175
181
  // `editor.view` is not yet available at this time.
176
- // Therefore we will add all plugins and node views directly afterwards.
182
+ // Therefore we will add all plugins directly afterwards.
183
+ //
184
+ // To research: this is the default tiptap behavior, but might actually not be necessary
185
+ // it feels like it's a workaround for plugins that don't account for the view not being available yet
177
186
  const newState = this.state.reconfigure({
178
187
  plugins: this.extensionManager.plugins,
179
188
  });
180
189
 
181
190
  this.view.updateState(newState);
182
191
 
183
- this.createNodeViews();
184
-
185
192
  // emit the created event, call here manually because we blocked the default call in the constructor
186
193
  // (https://github.com/ueberdosis/tiptap/blob/45bac803283446795ad1b03f43d3746fa54a68ff/packages/core/src/Editor.ts#L117)
187
194
  this.commands.focus(
@@ -198,12 +205,16 @@ export class BlockNoteTipTapEditor extends TiptapEditor {
198
205
  *
199
206
  * @param element DOM element to mount to, ur null / undefined to destroy
200
207
  */
201
- public mount = (element?: HTMLElement | null, contentComponent?: any) => {
208
+ public mount = (
209
+ blockNoteEditor: BlockNoteEditor<any, any, any>,
210
+ element?: HTMLElement | null,
211
+ contentComponent?: any
212
+ ) => {
202
213
  if (!element) {
203
214
  this.destroy();
204
215
  } else {
205
216
  this.options.element = element;
206
- this.createViewAlternative(contentComponent);
217
+ this.createViewAlternative(blockNoteEditor, contentComponent);
207
218
  }
208
219
  };
209
220
  }
@@ -5,7 +5,6 @@ export const CommentMark = Mark.create({
5
5
  excludes: "",
6
6
  inclusive: false,
7
7
  keepOnSplit: true,
8
- group: "blocknoteIgnore", // ignore in blocknote json
9
8
 
10
9
  addAttributes() {
11
10
  // Return an object with attribute configuration