@blocknote/core 0.51.4 → 0.52.1
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.
- package/dist/BlockNoteExtension-B_IEJHS8.js +38 -0
- package/dist/BlockNoteExtension-B_IEJHS8.js.map +1 -0
- package/dist/BlockNoteExtension-M0znTzxP.cjs +2 -0
- package/dist/BlockNoteExtension-M0znTzxP.cjs.map +1 -0
- package/dist/ThreadStore-Bx-gSEh1.cjs +2 -0
- package/dist/ThreadStore-Bx-gSEh1.cjs.map +1 -0
- package/dist/ThreadStore-et9wB5Xt.js +11 -0
- package/dist/ThreadStore-et9wB5Xt.js.map +1 -0
- package/dist/UserStore-DCG6lsla.cjs +2 -0
- package/dist/UserStore-DCG6lsla.cjs.map +1 -0
- package/dist/UserStore-QbbPFj0z.js +73 -0
- package/dist/UserStore-QbbPFj0z.js.map +1 -0
- package/dist/blocknote.cjs +1 -1
- package/dist/blocknote.js +6 -7
- package/dist/blocks-BqHv0xhc.cjs +12 -0
- package/dist/blocks-BqHv0xhc.cjs.map +1 -0
- package/dist/{blocks-DGsP5WKr.js → blocks-CiuUGa1E.js} +1093 -994
- package/dist/blocks-CiuUGa1E.js.map +1 -0
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.js +2 -2
- package/dist/comments.cjs +1 -1
- package/dist/comments.cjs.map +1 -1
- package/dist/comments.js +75 -340
- package/dist/comments.js.map +1 -1
- package/dist/{en-Cj5r8sW_.cjs → en-C5Z4Ag9_.cjs} +2 -2
- package/dist/en-C5Z4Ag9_.cjs.map +1 -0
- package/dist/{en-B9hMApn4.js → en-CGKXfWma.js} +9 -1
- package/dist/en-CGKXfWma.js.map +1 -0
- package/dist/{extensions-Co4y7P63.js → extensions-CrUGDOks.js} +655 -583
- package/dist/extensions-CrUGDOks.js.map +1 -0
- package/dist/extensions-Ghr9QqqR.cjs +52 -0
- package/dist/extensions-Ghr9QqqR.cjs.map +1 -0
- package/dist/extensions.cjs +1 -1
- package/dist/extensions.js +4 -4
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +177 -1
- package/dist/locales.js.map +1 -1
- package/dist/{src-Bcud0PIg.js → src-DTF83Cl9.js} +1243 -1297
- package/dist/src-DTF83Cl9.js.map +1 -0
- package/dist/src-OfbaVbMw.cjs +21 -0
- package/dist/src-OfbaVbMw.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/dist/y.cjs +2 -0
- package/dist/y.cjs.map +1 -0
- package/dist/y.js +989 -0
- package/dist/y.js.map +1 -0
- package/dist/yjs.cjs +1 -1
- package/dist/yjs.cjs.map +1 -1
- package/dist/yjs.js +535 -14
- package/dist/yjs.js.map +1 -1
- package/package.json +46 -19
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +1 -1
- package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +1 -1
- package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +3 -3
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +25 -20
- package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +39 -29
- package/src/api/blockManipulation/commands/nestBlock/nestBlock.test.ts +2 -2
- package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +4 -8
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +1 -1
- package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +21 -9
- package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +6 -5
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +362 -4
- package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +240 -30
- package/src/api/blockManipulation/getBlock/getBlock.ts +4 -9
- package/src/api/blockManipulation/selections/selection.ts +3 -6
- package/src/api/blockManipulation/selections/textCursorPosition.ts +10 -10
- package/src/api/blockManipulation/setupTestEnv.ts +1 -1
- package/src/api/blockManipulation/tables/tables.test.ts +1 -1
- package/src/api/clipboard/fromClipboard/fileDropExtension.ts +1 -1
- package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +8 -4
- package/src/api/clipboard/fromClipboard/pasteExtension.ts +1 -1
- package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +2 -1
- package/src/api/exporters/markdown/htmlToMarkdown.ts +79 -43
- package/src/api/getBlockInfoFromPos.test.ts +256 -0
- package/src/api/getBlockInfoFromPos.ts +53 -15
- package/src/api/getBlocksChangedByTransaction.test.ts +2 -1
- package/src/api/getBlocksChangedByTransaction.ts +6 -6
- package/src/api/nodeConversions/blockToNode.test.ts +113 -0
- package/src/api/nodeConversions/blockToNode.ts +15 -3
- package/src/api/nodeConversions/fragmentToBlocks.ts +2 -4
- package/src/api/nodeConversions/nodeToBlock.ts +28 -58
- package/src/api/nodeUtil.ts +6 -2
- package/src/api/parsers/html/parseHTML.ts +1 -1
- package/src/api/parsers/html/util/nestedLists.test.ts +1 -1
- package/src/api/parsers/markdown/detectMarkdown.test.ts +1 -1
- package/src/api/parsers/markdown/markdownToHtml.ts +228 -82
- package/src/api/pmUtil.ts +18 -1
- package/src/api/positionMapping.test.ts +20 -345
- package/src/api/positionMapping.ts +13 -83
- package/src/blocks/Audio/block.ts +1 -1
- package/src/blocks/Code/block.test.ts +14 -7
- package/src/blocks/Code/block.ts +2 -2
- package/src/blocks/Image/block.ts +1 -1
- package/src/blocks/ListItem/CheckListItem/block.test.ts +1 -1
- package/src/blocks/ListItem/ListItemKeyboardShortcuts.ts +2 -2
- package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.test.ts +4 -11
- package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +47 -50
- package/src/blocks/Table/TableExtension.test.ts +9 -6
- package/src/blocks/Table/TableExtension.ts +20 -6
- package/src/blocks/Table/block.ts +18 -5
- package/src/blocks/Video/block.ts +1 -1
- package/src/blocks/utils/listItemEnterHandler.ts +3 -2
- package/src/comments/extension.ts +30 -21
- package/src/comments/index.ts +0 -3
- package/src/comments/mark.ts +4 -0
- package/src/comments/threadstore/ThreadStore.ts +4 -8
- package/src/comments/types.ts +0 -8
- package/src/editor/Block.css +307 -3
- package/src/editor/BlockNoteEditor.test.ts +21 -18
- package/src/editor/BlockNoteEditor.ts +22 -57
- package/src/editor/BlockNoteExtension.test.ts +1 -1
- package/src/editor/managers/BlockManager.ts +1 -1
- package/src/editor/managers/ExtensionManager/ExtensionManager.test.ts +249 -0
- package/src/editor/managers/ExtensionManager/extensions.ts +7 -18
- package/src/editor/managers/ExtensionManager/index.ts +168 -68
- package/src/editor/managers/StateManager.ts +4 -3
- package/src/editor/performance.test.ts +14 -1
- package/src/editor/transformPasted.test.ts +1 -1
- package/src/extensions/Placeholder/Placeholder.ts +1 -0
- package/src/extensions/PositionMapping/PositionMapping.ts +68 -0
- package/src/extensions/PreviousBlockType/PreviousBlockType.test.ts +14 -1
- package/src/extensions/PreviousBlockType/PreviousBlockType.ts +14 -11
- package/src/extensions/SideMenu/SideMenu.ts +9 -2
- package/src/extensions/SuggestionMenu/SuggestionMenu.test.ts +1 -1
- package/src/extensions/TableHandles/TableHandles.ts +18 -20
- package/src/extensions/TrailingNode/TrailingNode.ts +33 -1
- package/src/extensions/Versioning/Versioning.test.ts +435 -0
- package/src/extensions/Versioning/Versioning.ts +628 -0
- package/src/extensions/Versioning/inMemoryVersioning.test.ts +469 -0
- package/src/extensions/Versioning/inMemoryVersioning.ts +263 -0
- package/src/extensions/Versioning/index.ts +2 -0
- package/src/extensions/index.ts +6 -9
- package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.test.ts +155 -0
- package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +6 -8
- package/src/extensions/tiptap-extensions/Link/helpers/autolink.ts +9 -9
- package/src/extensions/tiptap-extensions/Link/helpers/linkDetector.ts +8 -10
- package/src/extensions/tiptap-extensions/Link/helpers/whitespace.ts +2 -2
- package/src/extensions/tiptap-extensions/Link/link.test.ts +26 -22
- package/src/extensions/tiptap-extensions/UniqueID/UniqueID.test.ts +187 -0
- package/src/extensions/tiptap-extensions/UniqueID/UniqueID.ts +37 -24
- package/src/extensions/tiptap-extensions/index.ts +1 -25
- package/src/i18n/locales/ar.ts +9 -0
- package/src/i18n/locales/de.ts +9 -0
- package/src/i18n/locales/en.ts +10 -1
- package/src/i18n/locales/es.ts +9 -0
- package/src/i18n/locales/fa.ts +11 -1
- package/src/i18n/locales/fr.ts +9 -0
- package/src/i18n/locales/he.ts +10 -1
- package/src/i18n/locales/hr.ts +10 -0
- package/src/i18n/locales/is.ts +10 -0
- package/src/i18n/locales/it.ts +9 -0
- package/src/i18n/locales/ja.ts +9 -0
- package/src/i18n/locales/ko.ts +9 -0
- package/src/i18n/locales/nl.ts +10 -0
- package/src/i18n/locales/no.ts +10 -0
- package/src/i18n/locales/pl.ts +9 -0
- package/src/i18n/locales/pt.ts +10 -0
- package/src/i18n/locales/ru.ts +10 -0
- package/src/i18n/locales/sk.ts +10 -1
- package/src/i18n/locales/uk.ts +9 -0
- package/src/i18n/locales/uz.ts +9 -0
- package/src/i18n/locales/vi.ts +9 -0
- package/src/i18n/locales/zh-tw.ts +9 -0
- package/src/i18n/locales/zh.ts +9 -0
- package/src/index.ts +2 -0
- package/src/pm-nodes/BlockContainer.ts +4 -1
- package/src/pm-nodes/BlockGroup.ts +4 -1
- package/src/pm-nodes/Doc.ts +4 -1
- package/src/pm-nodes/suggestionMarks.ts +43 -0
- package/src/schema/blocks/createSpec.test.ts +123 -0
- package/src/schema/blocks/createSpec.ts +82 -24
- package/src/schema/blocks/extendBlockSpec.test.ts +188 -0
- package/src/schema/blocks/internal.ts +13 -43
- package/src/schema/blocks/types.ts +69 -22
- package/src/schema/contentTypePropagation.test.ts +182 -0
- package/src/schema/index.ts +1 -0
- package/src/schema/inlineContent/internal.ts +1 -1
- package/src/schema/inlineContent/types.ts +3 -3
- package/src/schema/markGroups.ts +50 -0
- package/src/user/UserStore.ts +199 -0
- package/src/user/createUserStore.test.ts +126 -0
- package/src/user/index.ts +2 -0
- package/src/user/userColors.ts +72 -0
- package/src/util/string.ts +1 -1
- package/src/util/topo-sort.test.ts +1 -1
- package/src/util/typescript.ts +2 -1
- package/src/vite-env.d.ts +1 -1
- package/src/y/README.md +5 -0
- package/src/{comments/threadstore/yjs → y/comments}/RESTYjsThreadStore.ts +8 -14
- package/src/y/comments/YjsThreadStore.test.ts +295 -0
- package/src/y/comments/YjsThreadStore.ts +358 -0
- package/src/y/comments/YjsThreadStoreBase.ts +50 -0
- package/src/y/comments/index.ts +3 -0
- package/src/y/comments/yjsHelpers.ts +125 -0
- package/src/y/extensions/AttributionExtension.test.ts +86 -0
- package/src/y/extensions/AttributionExtension.ts +378 -0
- package/src/y/extensions/DiffVersioningExtension.test.ts +193 -0
- package/src/y/extensions/DiffVersioningExtension.ts +228 -0
- package/src/y/extensions/ForkYDoc.test.ts +253 -0
- package/src/y/extensions/ForkYDoc.ts +108 -0
- package/src/y/extensions/RelativePositionMapping.test.ts +418 -0
- package/src/y/extensions/RelativePositionMapping.ts +49 -0
- package/src/y/extensions/Suggestions.ts +174 -0
- package/src/y/extensions/Versioning.test.ts +395 -0
- package/src/y/extensions/Versioning.ts +115 -0
- package/src/y/extensions/YAttributionMarks.ts +320 -0
- package/src/{extensions/Collaboration → y/extensions}/YCursorPlugin.ts +15 -7
- package/src/y/extensions/YSync.ts +125 -0
- package/src/y/extensions/blockMatchNodes.ts +182 -0
- package/src/y/extensions/index.ts +156 -0
- package/src/y/index.ts +4 -0
- package/src/y/utils.test.ts +1042 -0
- package/src/y/utils.ts +242 -0
- package/src/y/versioning/__test__/fixtures/activity-all-after.bin +0 -0
- package/src/y/versioning/__test__/fixtures/activity-all-after.json +50 -0
- package/src/y/versioning/__test__/fixtures/activity-all.bin +0 -0
- package/src/y/versioning/__test__/fixtures/activity-all.json +20 -0
- package/src/y/versioning/__test__/fixtures/activity-filtered-after.bin +0 -0
- package/src/y/versioning/__test__/fixtures/activity-filtered-after.json +32 -0
- package/src/y/versioning/__test__/fixtures/activity-filtered-before.json +1 -0
- package/src/y/versioning/__test__/fixtures/changeset.bin +0 -0
- package/src/y/versioning/__test__/fixtures/patch-response.json +4 -0
- package/src/y/versioning/__test__/yhub.test.ts +752 -0
- package/src/y/versioning/index.ts +1 -0
- package/src/y/versioning/yhub.ts +631 -0
- package/src/yjs/README.md +5 -0
- package/src/yjs/comments/RESTYjsThreadStore.ts +166 -0
- package/src/{comments/threadstore/yjs → yjs/comments}/YjsThreadStore.test.ts +3 -3
- package/src/{comments/threadstore/yjs → yjs/comments}/YjsThreadStore.ts +7 -3
- package/src/{comments/threadstore/yjs → yjs/comments}/YjsThreadStoreBase.ts +3 -3
- package/src/yjs/comments/index.ts +3 -0
- package/src/{comments/threadstore/yjs → yjs/comments}/yjsHelpers.ts +5 -1
- package/src/yjs/extensions/FixUpSchema.test.ts +421 -0
- package/src/yjs/extensions/FixUpSchema.ts +88 -0
- package/src/yjs/extensions/ForkYDoc.test.ts +216 -0
- package/src/{extensions/Collaboration → yjs/extensions}/ForkYDoc.ts +38 -57
- package/src/yjs/extensions/RelativePositionMapping.test.ts +418 -0
- package/src/yjs/extensions/RelativePositionMapping.ts +71 -0
- package/src/yjs/extensions/Versioning.test.ts +549 -0
- package/src/yjs/extensions/Versioning.ts +83 -0
- package/src/yjs/extensions/YCursorPlugin.ts +201 -0
- package/src/{extensions/Collaboration → yjs/extensions}/YSync.ts +1 -1
- package/src/yjs/extensions/index.ts +89 -0
- package/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/moveColorAttributes.test.ts +1 -1
- package/src/yjs/index.ts +2 -0
- package/src/yjs/utils.test.ts +5 -15
- package/src/yjs/utils.ts +36 -0
- package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.d.ts +3 -1
- package/types/src/api/blockManipulation/selections/selection.d.ts +1 -1
- package/types/src/api/getBlockInfoFromPos.d.ts +5 -9
- package/types/src/api/nodeConversions/nodeToBlock.d.ts +4 -6
- package/types/src/api/pmUtil.d.ts +12 -1
- package/types/src/blocks/Audio/block.d.ts +2 -2
- package/types/src/blocks/Code/block.d.ts +2 -2
- package/types/src/blocks/File/block.d.ts +2 -2
- package/types/src/blocks/Heading/block.d.ts +21 -21
- package/types/src/blocks/Image/block.d.ts +3 -3
- package/types/src/blocks/ListItem/CheckListItem/block.d.ts +6 -6
- package/types/src/blocks/ListItem/NumberedListItem/block.d.ts +6 -6
- package/types/src/blocks/Video/block.d.ts +3 -3
- package/types/src/blocks/defaultBlocks.d.ts +17 -17
- package/types/src/comments/extension.d.ts +18 -5
- package/types/src/comments/index.d.ts +0 -3
- package/types/src/comments/threadstore/ThreadStore.d.ts +4 -8
- package/types/src/comments/types.d.ts +0 -8
- package/types/src/editor/BlockNoteEditor.d.ts +8 -9
- package/types/src/editor/managers/BlockManager.d.ts +1 -1
- package/types/src/editor/managers/ExtensionManager/extensions.d.ts +2 -2
- package/types/src/editor/managers/ExtensionManager/index.d.ts +13 -0
- package/types/src/editor/managers/SelectionManager.d.ts +1 -1
- package/types/src/extensions/PositionMapping/PositionMapping.d.ts +4 -0
- package/types/src/extensions/TableHandles/TableHandles.d.ts +6 -6
- package/types/src/extensions/Versioning/Versioning.d.ts +352 -0
- package/types/src/extensions/Versioning/Versioning.test.d.ts +1 -0
- package/types/src/extensions/Versioning/inMemoryVersioning.d.ts +37 -0
- package/types/src/extensions/Versioning/inMemoryVersioning.test.d.ts +1 -0
- package/types/src/extensions/Versioning/index.d.ts +2 -0
- package/types/src/extensions/index.d.ts +6 -9
- package/types/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.test.d.ts +1 -0
- package/types/src/extensions/tiptap-extensions/UniqueID/UniqueID.d.ts +6 -1
- package/types/src/extensions/tiptap-extensions/UniqueID/UniqueID.test.d.ts +4 -0
- package/types/src/extensions/tiptap-extensions/index.d.ts +1 -5
- package/types/src/i18n/locales/en.d.ts +9 -1
- package/types/src/i18n/locales/fa.d.ts +9 -1
- package/types/src/i18n/locales/sk.d.ts +9 -1
- package/types/src/index.d.ts +2 -0
- package/types/src/pm-nodes/suggestionMarks.d.ts +26 -0
- package/types/src/schema/blocks/createSpec.d.ts +4 -4
- package/types/src/schema/blocks/createSpec.test.d.ts +1 -0
- package/types/src/schema/blocks/extendBlockSpec.test.d.ts +1 -0
- package/types/src/schema/blocks/internal.d.ts +5 -7
- package/types/src/schema/blocks/types.d.ts +22 -14
- package/types/src/schema/contentTypePropagation.test.d.ts +1 -0
- package/types/src/schema/index.d.ts +1 -0
- package/types/src/schema/inlineContent/types.d.ts +3 -3
- package/types/src/schema/markGroups.d.ts +33 -0
- package/types/src/user/UserStore.d.ts +105 -0
- package/types/src/user/createUserStore.test.d.ts +1 -0
- package/types/src/user/index.d.ts +2 -0
- package/types/src/user/userColors.d.ts +36 -0
- package/types/src/y/comments/RESTYjsThreadStore.d.ts +77 -0
- package/types/src/y/comments/YjsThreadStore.d.ts +79 -0
- package/types/src/y/comments/YjsThreadStore.test.d.ts +1 -0
- package/types/src/y/comments/YjsThreadStoreBase.d.ts +15 -0
- package/types/src/y/comments/index.d.ts +3 -0
- package/types/src/y/comments/yjsHelpers.d.ts +13 -0
- package/types/src/y/extensions/AttributionExtension.d.ts +74 -0
- package/types/src/y/extensions/AttributionExtension.test.d.ts +1 -0
- package/types/src/y/extensions/DiffVersioningExtension.d.ts +69 -0
- package/types/src/y/extensions/DiffVersioningExtension.test.d.ts +1 -0
- package/types/src/{extensions/Collaboration → y/extensions}/ForkYDoc.d.ts +4 -2
- package/types/src/y/extensions/ForkYDoc.test.d.ts +1 -0
- package/types/src/y/extensions/RelativePositionMapping.d.ts +4 -0
- package/types/src/y/extensions/RelativePositionMapping.test.d.ts +1 -0
- package/types/src/y/extensions/Suggestions.d.ts +36 -0
- package/types/src/y/extensions/Versioning.d.ts +17 -0
- package/types/src/y/extensions/Versioning.test.d.ts +1 -0
- package/types/src/y/extensions/YAttributionMarks.d.ts +67 -0
- package/types/src/y/extensions/YCursorPlugin.d.ts +14 -0
- package/types/src/y/extensions/YSync.d.ts +32 -0
- package/types/src/y/extensions/blockMatchNodes.d.ts +25 -0
- package/types/src/y/extensions/index.d.ts +189 -0
- package/types/src/y/index.d.ts +4 -0
- package/types/src/y/utils.d.ts +82 -0
- package/types/src/y/utils.test.d.ts +1 -0
- package/types/src/y/versioning/__test__/yhub.test.d.ts +1 -0
- package/types/src/y/versioning/index.d.ts +1 -0
- package/types/src/y/versioning/yhub.d.ts +87 -0
- package/types/src/{comments/threadstore/yjs → yjs/comments}/RESTYjsThreadStore.d.ts +6 -10
- package/types/src/{comments/threadstore/yjs → yjs/comments}/YjsThreadStore.d.ts +3 -3
- package/types/src/yjs/comments/YjsThreadStore.test.d.ts +1 -0
- package/types/src/{comments/threadstore/yjs → yjs/comments}/YjsThreadStoreBase.d.ts +3 -3
- package/types/src/yjs/comments/index.d.ts +3 -0
- package/types/src/{comments/threadstore/yjs → yjs/comments}/yjsHelpers.d.ts +1 -1
- package/types/src/yjs/extensions/FixUpSchema.d.ts +3 -0
- package/types/src/yjs/extensions/FixUpSchema.test.d.ts +1 -0
- package/types/src/yjs/extensions/ForkYDoc.d.ts +27 -0
- package/types/src/yjs/extensions/ForkYDoc.test.d.ts +1 -0
- package/types/src/yjs/extensions/RelativePositionMapping.d.ts +4 -0
- package/types/src/yjs/extensions/RelativePositionMapping.test.d.ts +1 -0
- package/types/src/yjs/extensions/Versioning.d.ts +26 -0
- package/types/src/yjs/extensions/Versioning.test.d.ts +1 -0
- package/types/src/{extensions/Collaboration → yjs/extensions}/YCursorPlugin.d.ts +5 -2
- package/types/src/{extensions/Collaboration → yjs/extensions}/YSync.d.ts +1 -1
- package/types/src/{extensions/Collaboration/Collaboration.d.ts → yjs/extensions/index.d.ts} +36 -15
- package/types/src/yjs/extensions/schemaMigration/migrationRules/moveColorAttributes.test.d.ts +1 -0
- package/types/src/yjs/index.d.ts +2 -0
- package/types/src/yjs/utils.d.ts +5 -0
- package/dist/BlockNoteExtension-B6RhuQ3V.js +0 -27
- package/dist/BlockNoteExtension-B6RhuQ3V.js.map +0 -1
- package/dist/BlockNoteExtension-ab0REuob.cjs +0 -2
- package/dist/BlockNoteExtension-ab0REuob.cjs.map +0 -1
- package/dist/EventEmitter-CuPnGDYt.js +0 -22
- package/dist/EventEmitter-CuPnGDYt.js.map +0 -1
- package/dist/EventEmitter-DHdSnYCD.cjs +0 -2
- package/dist/EventEmitter-DHdSnYCD.cjs.map +0 -1
- package/dist/ShowSelection-BsHFfdMi.js +0 -29
- package/dist/ShowSelection-BsHFfdMi.js.map +0 -1
- package/dist/ShowSelection-DhXglbt8.cjs +0 -2
- package/dist/ShowSelection-DhXglbt8.cjs.map +0 -1
- package/dist/blocks-Bm6IfL1R.cjs +0 -11
- package/dist/blocks-Bm6IfL1R.cjs.map +0 -1
- package/dist/blocks-DGsP5WKr.js.map +0 -1
- package/dist/en-B9hMApn4.js.map +0 -1
- package/dist/en-Cj5r8sW_.cjs.map +0 -1
- package/dist/extensions-Co4y7P63.js.map +0 -1
- package/dist/extensions-IJK3t0sz.cjs +0 -52
- package/dist/extensions-IJK3t0sz.cjs.map +0 -1
- package/dist/src-B6rlChSc.cjs +0 -21
- package/dist/src-B6rlChSc.cjs.map +0 -1
- package/dist/src-Bcud0PIg.js.map +0 -1
- package/src/comments/userstore/UserStore.ts +0 -72
- package/src/extensions/Collaboration/Collaboration.ts +0 -55
- package/src/extensions/Collaboration/ForkYDoc.test.ts +0 -179
- package/src/extensions/tiptap-extensions/Suggestions/SuggestionMarks.ts +0 -175
- package/types/src/comments/userstore/UserStore.d.ts +0 -31
- package/types/src/extensions/tiptap-extensions/Suggestions/SuggestionMarks.d.ts +0 -4
- /package/src/{extensions/Collaboration → yjs/extensions}/YUndo.ts +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/__snapshots__/fork-yjs-snap-editor-forked.json +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/__snapshots__/fork-yjs-snap-editor.json +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/__snapshots__/fork-yjs-snap-forked.html +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/__snapshots__/fork-yjs-snap.html +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/SchemaMigration.ts +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/index.ts +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/migrationRule.ts +0 -0
- /package/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/moveColorAttributes.ts +0 -0
- /package/types/src/{comments/threadstore/yjs/YjsThreadStore.test.d.ts → api/getBlockInfoFromPos.test.d.ts} +0 -0
- /package/types/src/{extensions/Collaboration/ForkYDoc.test.d.ts → api/nodeConversions/blockToNode.test.d.ts} +0 -0
- /package/types/src/{extensions/Collaboration/schemaMigration/migrationRules/moveColorAttributes.test.d.ts → editor/managers/ExtensionManager/ExtensionManager.test.d.ts} +0 -0
- /package/types/src/{extensions/Collaboration → yjs/extensions}/YUndo.d.ts +0 -0
- /package/types/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/SchemaMigration.d.ts +0 -0
- /package/types/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/index.d.ts +0 -0
- /package/types/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/migrationRule.d.ts +0 -0
- /package/types/src/{extensions/Collaboration → yjs/extensions}/schemaMigration/migrationRules/moveColorAttributes.d.ts +0 -0
package/src/i18n/locales/fr.ts
CHANGED
|
@@ -431,6 +431,7 @@ export const fr: Dictionary = {
|
|
|
431
431
|
save_button_text: "Enregistrer",
|
|
432
432
|
cancel_button_text: "Annuler",
|
|
433
433
|
deleted_reference_text: "Contenu d'origine supprimé",
|
|
434
|
+
discard_pending_comment: "Voulez-vous vraiment abandonner ce commentaire ?",
|
|
434
435
|
actions: {
|
|
435
436
|
add_reaction: "Ajouter une réaction",
|
|
436
437
|
resolve: "Résoudre",
|
|
@@ -447,6 +448,14 @@ export const fr: Dictionary = {
|
|
|
447
448
|
more_replies: (count) => `${count} réponses de plus`,
|
|
448
449
|
},
|
|
449
450
|
},
|
|
451
|
+
suggestion_changes: {
|
|
452
|
+
formatting_change: "Modification de mise en forme",
|
|
453
|
+
deleted: "Supprimé",
|
|
454
|
+
inserted_by: (users: string) => `Inséré par : ${users}`,
|
|
455
|
+
deleted_by: (users: string) => `Supprimé par : ${users}`,
|
|
456
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
457
|
+
`Modification de mise en forme (${formats}) par : ${users}`,
|
|
458
|
+
},
|
|
450
459
|
generic: {
|
|
451
460
|
ctrl_shortcut: "Ctrl",
|
|
452
461
|
},
|
package/src/i18n/locales/he.ts
CHANGED
|
@@ -190,7 +190,7 @@ export const he: Dictionary = {
|
|
|
190
190
|
new_comment: "כתוב תגובה...",
|
|
191
191
|
edit_comment: "ערוך תגובה...",
|
|
192
192
|
comment_reply: "הוסף תגובה...",
|
|
193
|
-
} as Record<string
|
|
193
|
+
} as Record<string, string | undefined>,
|
|
194
194
|
file_blocks: {
|
|
195
195
|
add_button_text: {
|
|
196
196
|
image: "הוסף תמונה",
|
|
@@ -385,6 +385,7 @@ export const he: Dictionary = {
|
|
|
385
385
|
save_button_text: "שמור",
|
|
386
386
|
cancel_button_text: "בטל",
|
|
387
387
|
deleted_reference_text: "התוכן המקורי נמחק",
|
|
388
|
+
discard_pending_comment: "האם אתה בטוח שברצונך לבטל את התגובה הזו?",
|
|
388
389
|
actions: {
|
|
389
390
|
add_reaction: "הוסף תגובה",
|
|
390
391
|
resolve: "סמן כפתור",
|
|
@@ -401,6 +402,14 @@ export const he: Dictionary = {
|
|
|
401
402
|
more_replies: (count: number) => `${count} תגובות נוספות`,
|
|
402
403
|
},
|
|
403
404
|
},
|
|
405
|
+
suggestion_changes: {
|
|
406
|
+
formatting_change: "שינוי עיצוב",
|
|
407
|
+
deleted: "נמחק",
|
|
408
|
+
inserted_by: (users: string) => `נוסף על ידי: ${users}`,
|
|
409
|
+
deleted_by: (users: string) => `נמחק על ידי: ${users}`,
|
|
410
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
411
|
+
`שינוי עיצוב (${formats}) על ידי: ${users}`,
|
|
412
|
+
},
|
|
404
413
|
generic: {
|
|
405
414
|
ctrl_shortcut: "Ctrl",
|
|
406
415
|
},
|
package/src/i18n/locales/hr.ts
CHANGED
|
@@ -398,6 +398,8 @@ export const hr: Dictionary = {
|
|
|
398
398
|
save_button_text: "Spremi",
|
|
399
399
|
cancel_button_text: "Odustani",
|
|
400
400
|
deleted_reference_text: "Originalni sadržaj je obrisan",
|
|
401
|
+
discard_pending_comment:
|
|
402
|
+
"Jeste li sigurni da želite odbaciti ovaj komentar?",
|
|
401
403
|
actions: {
|
|
402
404
|
add_reaction: "Dodaj reakciju",
|
|
403
405
|
resolve: "Riješi",
|
|
@@ -414,6 +416,14 @@ export const hr: Dictionary = {
|
|
|
414
416
|
more_replies: (count) => `${count} dodatnih odgovora`,
|
|
415
417
|
},
|
|
416
418
|
},
|
|
419
|
+
suggestion_changes: {
|
|
420
|
+
formatting_change: "Promjena oblikovanja",
|
|
421
|
+
deleted: "Izbrisano",
|
|
422
|
+
inserted_by: (users: string) => `Umetnuo/la: ${users}`,
|
|
423
|
+
deleted_by: (users: string) => `Izbrisao/la: ${users}`,
|
|
424
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
425
|
+
`Promjena oblikovanja (${formats}) od: ${users}`,
|
|
426
|
+
},
|
|
417
427
|
generic: {
|
|
418
428
|
ctrl_shortcut: "Ctrl",
|
|
419
429
|
},
|
package/src/i18n/locales/is.ts
CHANGED
|
@@ -398,6 +398,8 @@ export const is: Dictionary = {
|
|
|
398
398
|
save_button_text: "Vista",
|
|
399
399
|
cancel_button_text: "Hætta",
|
|
400
400
|
deleted_reference_text: "Upprunalegu efni eytt",
|
|
401
|
+
discard_pending_comment:
|
|
402
|
+
"Ertu viss um að þú viljir henda þessari athugasemd?",
|
|
401
403
|
actions: {
|
|
402
404
|
add_reaction: "Bæta við viðbrögðum",
|
|
403
405
|
resolve: "Leysa",
|
|
@@ -414,6 +416,14 @@ export const is: Dictionary = {
|
|
|
414
416
|
more_replies: (count) => `${count} fleiri svör`,
|
|
415
417
|
},
|
|
416
418
|
},
|
|
419
|
+
suggestion_changes: {
|
|
420
|
+
formatting_change: "Sniðbreyting",
|
|
421
|
+
deleted: "Eytt",
|
|
422
|
+
inserted_by: (users: string) => `Sett inn af: ${users}`,
|
|
423
|
+
deleted_by: (users: string) => `Eytt af: ${users}`,
|
|
424
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
425
|
+
`Sniðbreyting (${formats}) af: ${users}`,
|
|
426
|
+
},
|
|
417
427
|
generic: {
|
|
418
428
|
ctrl_shortcut: "Ctrl",
|
|
419
429
|
},
|
package/src/i18n/locales/it.ts
CHANGED
|
@@ -407,6 +407,7 @@ export const it: Dictionary = {
|
|
|
407
407
|
save_button_text: "Salva",
|
|
408
408
|
cancel_button_text: "Annulla",
|
|
409
409
|
deleted_reference_text: "Contenuto originale eliminato",
|
|
410
|
+
discard_pending_comment: "Vuoi davvero eliminare questo commento?",
|
|
410
411
|
actions: {
|
|
411
412
|
add_reaction: "Aggiungi reazione",
|
|
412
413
|
resolve: "Risolvi",
|
|
@@ -423,6 +424,14 @@ export const it: Dictionary = {
|
|
|
423
424
|
more_replies: (count) => `${count} altre risposte`,
|
|
424
425
|
},
|
|
425
426
|
},
|
|
427
|
+
suggestion_changes: {
|
|
428
|
+
formatting_change: "Modifica formattazione",
|
|
429
|
+
deleted: "Eliminato",
|
|
430
|
+
inserted_by: (users: string) => `Inserito da: ${users}`,
|
|
431
|
+
deleted_by: (users: string) => `Eliminato da: ${users}`,
|
|
432
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
433
|
+
`Modifica formattazione (${formats}) da: ${users}`,
|
|
434
|
+
},
|
|
426
435
|
generic: {
|
|
427
436
|
ctrl_shortcut: "Ctrl",
|
|
428
437
|
},
|
package/src/i18n/locales/ja.ts
CHANGED
|
@@ -425,6 +425,7 @@ export const ja: Dictionary = {
|
|
|
425
425
|
save_button_text: "保存",
|
|
426
426
|
cancel_button_text: "キャンセル",
|
|
427
427
|
deleted_reference_text: "元のコンテンツが削除されました",
|
|
428
|
+
discard_pending_comment: "このコメントを破棄してもよろしいですか?",
|
|
428
429
|
actions: {
|
|
429
430
|
add_reaction: "リアクションを追加",
|
|
430
431
|
resolve: "解決",
|
|
@@ -441,6 +442,14 @@ export const ja: Dictionary = {
|
|
|
441
442
|
more_replies: (count) => `${count} 件の追加返信`,
|
|
442
443
|
},
|
|
443
444
|
},
|
|
445
|
+
suggestion_changes: {
|
|
446
|
+
formatting_change: "書式の変更",
|
|
447
|
+
deleted: "削除済み",
|
|
448
|
+
inserted_by: (users: string) => `挿入者: ${users}`,
|
|
449
|
+
deleted_by: (users: string) => `削除者: ${users}`,
|
|
450
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
451
|
+
`書式の変更 (${formats}) 変更者: ${users}`,
|
|
452
|
+
},
|
|
444
453
|
generic: {
|
|
445
454
|
ctrl_shortcut: "Ctrl",
|
|
446
455
|
},
|
package/src/i18n/locales/ko.ts
CHANGED
|
@@ -398,6 +398,7 @@ export const ko: Dictionary = {
|
|
|
398
398
|
save_button_text: "저장",
|
|
399
399
|
cancel_button_text: "취소",
|
|
400
400
|
deleted_reference_text: "원본 콘텐츠 삭제됨",
|
|
401
|
+
discard_pending_comment: "이 댓글을 삭제하시겠습니까?",
|
|
401
402
|
actions: {
|
|
402
403
|
add_reaction: "반응 추가",
|
|
403
404
|
resolve: "해결",
|
|
@@ -414,6 +415,14 @@ export const ko: Dictionary = {
|
|
|
414
415
|
more_replies: (count) => `${count}개의 추가 답글`,
|
|
415
416
|
},
|
|
416
417
|
},
|
|
418
|
+
suggestion_changes: {
|
|
419
|
+
formatting_change: "서식 변경",
|
|
420
|
+
deleted: "삭제됨",
|
|
421
|
+
inserted_by: (users: string) => `삽입한 사람: ${users}`,
|
|
422
|
+
deleted_by: (users: string) => `삭제한 사람: ${users}`,
|
|
423
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
424
|
+
`서식 변경 (${formats}) 변경한 사람: ${users}`,
|
|
425
|
+
},
|
|
417
426
|
generic: {
|
|
418
427
|
ctrl_shortcut: "Ctrl",
|
|
419
428
|
},
|
package/src/i18n/locales/nl.ts
CHANGED
|
@@ -385,6 +385,8 @@ export const nl: Dictionary = {
|
|
|
385
385
|
save_button_text: "Opslaan",
|
|
386
386
|
cancel_button_text: "Annuleren",
|
|
387
387
|
deleted_reference_text: "Originele inhoud verwijderd",
|
|
388
|
+
discard_pending_comment:
|
|
389
|
+
"Weet je zeker dat je deze reactie wilt verwijderen?",
|
|
388
390
|
actions: {
|
|
389
391
|
add_reaction: "Reactie toevoegen",
|
|
390
392
|
resolve: "Oplossen",
|
|
@@ -401,6 +403,14 @@ export const nl: Dictionary = {
|
|
|
401
403
|
more_replies: (count) => `${count} extra reacties`,
|
|
402
404
|
},
|
|
403
405
|
},
|
|
406
|
+
suggestion_changes: {
|
|
407
|
+
formatting_change: "Opmaakwijziging",
|
|
408
|
+
deleted: "Verwijderd",
|
|
409
|
+
inserted_by: (users: string) => `Ingevoegd door: ${users}`,
|
|
410
|
+
deleted_by: (users: string) => `Verwijderd door: ${users}`,
|
|
411
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
412
|
+
`Opmaakwijziging (${formats}) door: ${users}`,
|
|
413
|
+
},
|
|
404
414
|
generic: {
|
|
405
415
|
ctrl_shortcut: "Ctrl",
|
|
406
416
|
},
|
package/src/i18n/locales/no.ts
CHANGED
|
@@ -402,6 +402,8 @@ export const no: Dictionary = {
|
|
|
402
402
|
save_button_text: "Lagre",
|
|
403
403
|
cancel_button_text: "Avbryt",
|
|
404
404
|
deleted_reference_text: "Originalt innhold slettet",
|
|
405
|
+
discard_pending_comment:
|
|
406
|
+
"Er du sikker på at du vil forkaste denne kommentaren?",
|
|
405
407
|
actions: {
|
|
406
408
|
add_reaction: "Legg til reaksjon",
|
|
407
409
|
resolve: "Løs",
|
|
@@ -418,6 +420,14 @@ export const no: Dictionary = {
|
|
|
418
420
|
more_replies: (count) => `${count} flere svar`,
|
|
419
421
|
},
|
|
420
422
|
},
|
|
423
|
+
suggestion_changes: {
|
|
424
|
+
formatting_change: "Formateringsendring",
|
|
425
|
+
deleted: "Slettet",
|
|
426
|
+
inserted_by: (users: string) => `Satt inn av: ${users}`,
|
|
427
|
+
deleted_by: (users: string) => `Slettet av: ${users}`,
|
|
428
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
429
|
+
`Formateringsendring (${formats}) av: ${users}`,
|
|
430
|
+
},
|
|
421
431
|
generic: {
|
|
422
432
|
ctrl_shortcut: "Ctrl",
|
|
423
433
|
},
|
package/src/i18n/locales/pl.ts
CHANGED
|
@@ -376,6 +376,7 @@ export const pl: Dictionary = {
|
|
|
376
376
|
save_button_text: "Zapisz",
|
|
377
377
|
cancel_button_text: "Anuluj",
|
|
378
378
|
deleted_reference_text: "Oryginalna treść usunięta",
|
|
379
|
+
discard_pending_comment: "Czy na pewno chcesz odrzucić ten komentarz?",
|
|
379
380
|
actions: {
|
|
380
381
|
add_reaction: "Dodaj reakcję",
|
|
381
382
|
resolve: "Rozwiąż",
|
|
@@ -392,6 +393,14 @@ export const pl: Dictionary = {
|
|
|
392
393
|
more_replies: (count) => `${count} więcej odpowiedzi`,
|
|
393
394
|
},
|
|
394
395
|
},
|
|
396
|
+
suggestion_changes: {
|
|
397
|
+
formatting_change: "Zmiana formatowania",
|
|
398
|
+
deleted: "Usunięto",
|
|
399
|
+
inserted_by: (users: string) => `Wstawione przez: ${users}`,
|
|
400
|
+
deleted_by: (users: string) => `Usunięte przez: ${users}`,
|
|
401
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
402
|
+
`Zmiana formatowania (${formats}) przez: ${users}`,
|
|
403
|
+
},
|
|
395
404
|
generic: {
|
|
396
405
|
ctrl_shortcut: "Ctrl",
|
|
397
406
|
},
|
package/src/i18n/locales/pt.ts
CHANGED
|
@@ -377,6 +377,8 @@ export const pt: Dictionary = {
|
|
|
377
377
|
save_button_text: "Salvar",
|
|
378
378
|
cancel_button_text: "Cancelar",
|
|
379
379
|
deleted_reference_text: "Conteúdo original excluído",
|
|
380
|
+
discard_pending_comment:
|
|
381
|
+
"Tem certeza de que deseja descartar este comentário?",
|
|
380
382
|
actions: {
|
|
381
383
|
add_reaction: "Adicionar reação",
|
|
382
384
|
resolve: "Resolver",
|
|
@@ -393,6 +395,14 @@ export const pt: Dictionary = {
|
|
|
393
395
|
more_replies: (count) => `${count} respostas a mais`,
|
|
394
396
|
},
|
|
395
397
|
},
|
|
398
|
+
suggestion_changes: {
|
|
399
|
+
formatting_change: "Alteração de formatação",
|
|
400
|
+
deleted: "Excluído",
|
|
401
|
+
inserted_by: (users: string) => `Inserido por: ${users}`,
|
|
402
|
+
deleted_by: (users: string) => `Excluído por: ${users}`,
|
|
403
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
404
|
+
`Alteração de formatação (${formats}) por: ${users}`,
|
|
405
|
+
},
|
|
396
406
|
generic: {
|
|
397
407
|
ctrl_shortcut: "Ctrl",
|
|
398
408
|
},
|
package/src/i18n/locales/ru.ts
CHANGED
|
@@ -428,6 +428,8 @@ export const ru: Dictionary = {
|
|
|
428
428
|
save_button_text: "Сохранить",
|
|
429
429
|
cancel_button_text: "Отменить",
|
|
430
430
|
deleted_reference_text: "Исходный контент удалён",
|
|
431
|
+
discard_pending_comment:
|
|
432
|
+
"Вы уверены, что хотите отменить этот комментарий?",
|
|
431
433
|
actions: {
|
|
432
434
|
add_reaction: "Добавить реакцию",
|
|
433
435
|
resolve: "Решить",
|
|
@@ -444,6 +446,14 @@ export const ru: Dictionary = {
|
|
|
444
446
|
more_replies: (count) => `${count} дополнительных ответов`,
|
|
445
447
|
},
|
|
446
448
|
},
|
|
449
|
+
suggestion_changes: {
|
|
450
|
+
formatting_change: "Изменение форматирования",
|
|
451
|
+
deleted: "Удалено",
|
|
452
|
+
inserted_by: (users: string) => `Вставлено: ${users}`,
|
|
453
|
+
deleted_by: (users: string) => `Удалено: ${users}`,
|
|
454
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
455
|
+
`Изменение форматирования (${formats}): ${users}`,
|
|
456
|
+
},
|
|
447
457
|
generic: {
|
|
448
458
|
ctrl_shortcut: "Ctrl",
|
|
449
459
|
},
|
package/src/i18n/locales/sk.ts
CHANGED
|
@@ -188,7 +188,7 @@ export const sk = {
|
|
|
188
188
|
new_comment: "Napíšte komentár...",
|
|
189
189
|
edit_comment: "Upravte komentár...",
|
|
190
190
|
comment_reply: "Pridať komentár...",
|
|
191
|
-
} as Record<string
|
|
191
|
+
} as Record<string, string | undefined>,
|
|
192
192
|
file_blocks: {
|
|
193
193
|
add_button_text: {
|
|
194
194
|
image: "Pridať obrázok",
|
|
@@ -383,6 +383,7 @@ export const sk = {
|
|
|
383
383
|
save_button_text: "Uložiť",
|
|
384
384
|
cancel_button_text: "Zrušiť",
|
|
385
385
|
deleted_reference_text: "Pôvodný obsah odstránený",
|
|
386
|
+
discard_pending_comment: "Naozaj chcete zahodiť tento komentár?",
|
|
386
387
|
actions: {
|
|
387
388
|
add_reaction: "Pridať reakciu",
|
|
388
389
|
resolve: "Vyriešiť",
|
|
@@ -399,6 +400,14 @@ export const sk = {
|
|
|
399
400
|
more_replies: (count: number) => `${count} ďalších odpovedí`,
|
|
400
401
|
},
|
|
401
402
|
},
|
|
403
|
+
suggestion_changes: {
|
|
404
|
+
formatting_change: "Zmena formátovania",
|
|
405
|
+
deleted: "Odstránené",
|
|
406
|
+
inserted_by: (users: string) => `Vložil: ${users}`,
|
|
407
|
+
deleted_by: (users: string) => `Odstránil: ${users}`,
|
|
408
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
409
|
+
`Zmena formátovania (${formats}) od: ${users}`,
|
|
410
|
+
},
|
|
402
411
|
generic: {
|
|
403
412
|
ctrl_shortcut: "Ctrl",
|
|
404
413
|
},
|
package/src/i18n/locales/uk.ts
CHANGED
|
@@ -409,6 +409,7 @@ export const uk: Dictionary = {
|
|
|
409
409
|
save_button_text: "Зберегти",
|
|
410
410
|
cancel_button_text: "Скасувати",
|
|
411
411
|
deleted_reference_text: "Оригінальний вміст видалено",
|
|
412
|
+
discard_pending_comment: "Ви впевнені, що хочете відхилити цей коментар?",
|
|
412
413
|
actions: {
|
|
413
414
|
add_reaction: "Додати реакцію",
|
|
414
415
|
resolve: "Вирішити",
|
|
@@ -425,6 +426,14 @@ export const uk: Dictionary = {
|
|
|
425
426
|
more_replies: (count) => `${count} додаткових відповідей`,
|
|
426
427
|
},
|
|
427
428
|
},
|
|
429
|
+
suggestion_changes: {
|
|
430
|
+
formatting_change: "Зміна форматування",
|
|
431
|
+
deleted: "Видалено",
|
|
432
|
+
inserted_by: (users: string) => `Вставлено користувачем: ${users}`,
|
|
433
|
+
deleted_by: (users: string) => `Видалено користувачем: ${users}`,
|
|
434
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
435
|
+
`Зміна форматування (${formats}) користувачем: ${users}`,
|
|
436
|
+
},
|
|
428
437
|
generic: {
|
|
429
438
|
ctrl_shortcut: "Ctrl",
|
|
430
439
|
},
|
package/src/i18n/locales/uz.ts
CHANGED
|
@@ -418,6 +418,7 @@ export const uz: Dictionary = {
|
|
|
418
418
|
save_button_text: "Saqlash",
|
|
419
419
|
cancel_button_text: "Bekor qilish",
|
|
420
420
|
deleted_reference_text: "Asl tarkib o‘chirildi",
|
|
421
|
+
discard_pending_comment: "Haqiqatan ham bu izohni bekor qilmoqchimisiz?",
|
|
421
422
|
actions: {
|
|
422
423
|
add_reaction: "Reaksiya qo‘shish",
|
|
423
424
|
resolve: "Hal qilish",
|
|
@@ -435,6 +436,14 @@ export const uz: Dictionary = {
|
|
|
435
436
|
},
|
|
436
437
|
},
|
|
437
438
|
|
|
439
|
+
suggestion_changes: {
|
|
440
|
+
formatting_change: "Formatlash o'zgarishi",
|
|
441
|
+
deleted: "O'chirildi",
|
|
442
|
+
inserted_by: (users: string) => `Qo'shgan: ${users}`,
|
|
443
|
+
deleted_by: (users: string) => `O'chirgan: ${users}`,
|
|
444
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
445
|
+
`Formatlash o'zgarishi (${formats}), o'zgartirgan: ${users}`,
|
|
446
|
+
},
|
|
438
447
|
generic: {
|
|
439
448
|
ctrl_shortcut: "Ctrl",
|
|
440
449
|
},
|
package/src/i18n/locales/vi.ts
CHANGED
|
@@ -384,6 +384,7 @@ export const vi: Dictionary = {
|
|
|
384
384
|
save_button_text: "Lưu",
|
|
385
385
|
cancel_button_text: "Hủy",
|
|
386
386
|
deleted_reference_text: "Nội dung gốc đã bị xóa",
|
|
387
|
+
discard_pending_comment: "Bạn có chắc chắn muốn hủy bình luận này không?",
|
|
387
388
|
actions: {
|
|
388
389
|
add_reaction: "Thêm phản ứng",
|
|
389
390
|
resolve: "Giải quyết",
|
|
@@ -400,6 +401,14 @@ export const vi: Dictionary = {
|
|
|
400
401
|
more_replies: (count) => `${count} câu trả lời nữa`,
|
|
401
402
|
},
|
|
402
403
|
},
|
|
404
|
+
suggestion_changes: {
|
|
405
|
+
formatting_change: "Thay đổi định dạng",
|
|
406
|
+
deleted: "Đã xóa",
|
|
407
|
+
inserted_by: (users: string) => `Được chèn bởi: ${users}`,
|
|
408
|
+
deleted_by: (users: string) => `Được xóa bởi: ${users}`,
|
|
409
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
410
|
+
`Thay đổi định dạng (${formats}) bởi: ${users}`,
|
|
411
|
+
},
|
|
403
412
|
generic: {
|
|
404
413
|
ctrl_shortcut: "Ctrl",
|
|
405
414
|
},
|
|
@@ -426,6 +426,7 @@ export const zhTW: Dictionary = {
|
|
|
426
426
|
save_button_text: "儲存",
|
|
427
427
|
cancel_button_text: "取消",
|
|
428
428
|
deleted_reference_text: "原始內容已刪除",
|
|
429
|
+
discard_pending_comment: "確定要捨棄此評論嗎?",
|
|
429
430
|
actions: {
|
|
430
431
|
add_reaction: "新增回應",
|
|
431
432
|
resolve: "解決",
|
|
@@ -442,6 +443,14 @@ export const zhTW: Dictionary = {
|
|
|
442
443
|
more_replies: (count) => `還有 ${count} 則回覆`,
|
|
443
444
|
},
|
|
444
445
|
},
|
|
446
|
+
suggestion_changes: {
|
|
447
|
+
formatting_change: "格式變更",
|
|
448
|
+
deleted: "已刪除",
|
|
449
|
+
inserted_by: (users: string) => `插入者:${users}`,
|
|
450
|
+
deleted_by: (users: string) => `刪除者:${users}`,
|
|
451
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
452
|
+
`格式變更(${formats}),變更者:${users}`,
|
|
453
|
+
},
|
|
445
454
|
generic: {
|
|
446
455
|
ctrl_shortcut: "Ctrl",
|
|
447
456
|
},
|
package/src/i18n/locales/zh.ts
CHANGED
|
@@ -426,6 +426,7 @@ export const zh: Dictionary = {
|
|
|
426
426
|
save_button_text: "保存",
|
|
427
427
|
cancel_button_text: "取消",
|
|
428
428
|
deleted_reference_text: "原始内容已删除",
|
|
429
|
+
discard_pending_comment: "确定要放弃此评论吗?",
|
|
429
430
|
actions: {
|
|
430
431
|
add_reaction: "添加反应",
|
|
431
432
|
resolve: "解决",
|
|
@@ -442,6 +443,14 @@ export const zh: Dictionary = {
|
|
|
442
443
|
more_replies: (count) => `还有 ${count} 条回复`,
|
|
443
444
|
},
|
|
444
445
|
},
|
|
446
|
+
suggestion_changes: {
|
|
447
|
+
formatting_change: "格式更改",
|
|
448
|
+
deleted: "已删除",
|
|
449
|
+
inserted_by: (users: string) => `插入者:${users}`,
|
|
450
|
+
deleted_by: (users: string) => `删除者:${users}`,
|
|
451
|
+
formatting_change_by: (formats: string, users: string) =>
|
|
452
|
+
`格式更改(${formats}),更改者:${users}`,
|
|
453
|
+
},
|
|
445
454
|
generic: {
|
|
446
455
|
ctrl_shortcut: "Ctrl",
|
|
447
456
|
},
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./api/exporters/html/externalHTMLExporter.js";
|
|
|
6
6
|
export * from "./api/exporters/html/internalHTMLSerializer.js";
|
|
7
7
|
export * from "./api/getBlockInfoFromPos.js";
|
|
8
8
|
export * from "./api/getBlocksChangedByTransaction.js";
|
|
9
|
+
export * from "./pm-nodes/suggestionMarks.js";
|
|
9
10
|
export * from "./api/nodeUtil.js";
|
|
10
11
|
export * from "./api/pmUtil.js";
|
|
11
12
|
export * from "./blocks/index.js";
|
|
@@ -18,6 +19,7 @@ export * from "./extensions/index.js";
|
|
|
18
19
|
export * from "./extensions-shared/UiElementPosition.js";
|
|
19
20
|
export * from "./i18n/dictionary.js";
|
|
20
21
|
export * from "./schema/index.js";
|
|
22
|
+
export * from "./user/index.js";
|
|
21
23
|
export * from "./util/browser.js";
|
|
22
24
|
export * from "./util/combineByGroup.js";
|
|
23
25
|
export * from "./util/expandToWords.js";
|
|
@@ -3,6 +3,7 @@ import { Node } from "@tiptap/core";
|
|
|
3
3
|
import type { BlockNoteEditor } from "../editor/BlockNoteEditor.js";
|
|
4
4
|
import { BlockNoteDOMAttributes } from "../schema/index.js";
|
|
5
5
|
import { mergeCSSClasses } from "../util/browser.js";
|
|
6
|
+
import { suggestionMarks } from "./suggestionMarks.js";
|
|
6
7
|
|
|
7
8
|
// Object containing all possible block attributes.
|
|
8
9
|
const BlockAttributes: Record<string, string> = {
|
|
@@ -27,7 +28,9 @@ export const BlockContainer = Node.create<{
|
|
|
27
28
|
// Ensures content-specific keyboard handlers trigger first.
|
|
28
29
|
priority: 50,
|
|
29
30
|
defining: true,
|
|
30
|
-
marks
|
|
31
|
+
marks() {
|
|
32
|
+
return suggestionMarks(this.editor);
|
|
33
|
+
},
|
|
31
34
|
parseHTML() {
|
|
32
35
|
return [
|
|
33
36
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
2
|
import { BlockNoteDOMAttributes } from "../schema/index.js";
|
|
3
3
|
import { mergeCSSClasses } from "../util/browser.js";
|
|
4
|
+
import { suggestionMarks } from "./suggestionMarks.js";
|
|
4
5
|
|
|
5
6
|
export const BlockGroup = Node.create<{
|
|
6
7
|
domAttributes?: BlockNoteDOMAttributes;
|
|
@@ -8,7 +9,9 @@ export const BlockGroup = Node.create<{
|
|
|
8
9
|
name: "blockGroup",
|
|
9
10
|
group: "childContainer",
|
|
10
11
|
content: "blockGroupChild+",
|
|
11
|
-
marks
|
|
12
|
+
marks() {
|
|
13
|
+
return suggestionMarks(this.editor);
|
|
14
|
+
},
|
|
12
15
|
parseHTML() {
|
|
13
16
|
return [
|
|
14
17
|
{
|
package/src/pm-nodes/Doc.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Node } from "@tiptap/core";
|
|
2
|
+
import { suggestionMarks } from "./suggestionMarks.js";
|
|
2
3
|
|
|
3
4
|
export const Doc = Node.create({
|
|
4
5
|
name: "doc",
|
|
5
6
|
topNode: true,
|
|
6
7
|
content: "blockGroup",
|
|
7
|
-
marks
|
|
8
|
+
marks() {
|
|
9
|
+
return suggestionMarks(this.editor);
|
|
10
|
+
},
|
|
8
11
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Editor, getExtensionField } from "@tiptap/core";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The mark schema group shared by every "suggestion" mark — both the Yjs
|
|
5
|
+
* collaboration marks (`y-attributed-*`) and the AI marks (`insertion` /
|
|
6
|
+
* `deletion` / `modification`). A mark opts into being allowed on block nodes by
|
|
7
|
+
* declaring this group in its spec (`group: BLOCK_LEVEL_SUGGESTION_GROUP`).
|
|
8
|
+
*/
|
|
9
|
+
export const BLOCK_LEVEL_SUGGESTION_GROUP = "blockLevelSuggestion";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Block node specs (blockContainer, blockGroup, doc, table cells, columns...)
|
|
13
|
+
* allow the suggestion marks so that a whole block can be marked inserted /
|
|
14
|
+
* deleted / modified in suggestion mode.
|
|
15
|
+
*
|
|
16
|
+
* These marks only exist when the extension that provides them is loaded; a node
|
|
17
|
+
* spec that referenced them unconditionally would make ProseMirror throw
|
|
18
|
+
* "Unknown mark type" while building the schema of an editor that doesn't have
|
|
19
|
+
* them (e.g. a plain, non-collaborative, non-AI editor) — this applies to a mark
|
|
20
|
+
* group with no members too.
|
|
21
|
+
*
|
|
22
|
+
* Use this as a node's `marks` field: it returns the {@link
|
|
23
|
+
* BLOCK_LEVEL_SUGGESTION_GROUP} group name (which ProseMirror expands to every
|
|
24
|
+
* mark in the group) when at least one such mark is registered on the editor, or
|
|
25
|
+
* `""` otherwise. It's evaluated at schema-build time, where the tiptap editor's
|
|
26
|
+
* fully-flattened extension list is available on `this.editor`.
|
|
27
|
+
*/
|
|
28
|
+
export function suggestionMarks(editor: Editor | undefined): string {
|
|
29
|
+
if (!editor) {
|
|
30
|
+
return "";
|
|
31
|
+
}
|
|
32
|
+
const hasAttributionMark = editor.options.extensions.some((extension) => {
|
|
33
|
+
if (extension.type !== "mark") {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const group = getExtensionField(extension, "group") as string | undefined;
|
|
37
|
+
return (
|
|
38
|
+
typeof group === "string" &&
|
|
39
|
+
group.split(" ").includes(BLOCK_LEVEL_SUGGESTION_GROUP)
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
return hasAttributionMark ? BLOCK_LEVEL_SUGGESTION_GROUP : "";
|
|
43
|
+
}
|