@blocknote/core 0.56.0 → 0.57.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 (733) hide show
  1. package/NOTICE.txt +101 -0
  2. package/dist/BlockNoteExtension-U58cXw1g.js +64 -0
  3. package/dist/ThreadStore-CSEwCO0O.js +8 -0
  4. package/dist/{UserStore-OZJP3K8T.js → UserStore-BFv6NXA-.js} +3 -7
  5. package/dist/ar-DPJDxCQI.js +3 -0
  6. package/dist/blocknote.js +8 -6
  7. package/dist/blocks-BUX9dXi9.js +2063 -0
  8. package/dist/blocks.js +3 -2
  9. package/dist/comments.js +8 -9
  10. package/dist/de-CakHBokE.js +3 -0
  11. package/dist/emoji-data.js +102 -0
  12. package/dist/en-BGdzE27X.js +3 -0
  13. package/dist/{en-Ch-vvt5e.js → en-Ne9rlj9Y.js} +9 -6
  14. package/dist/es-VeBX6MEG.js +3 -0
  15. package/dist/{extensions-BbM81hHa.js → extensions-CEgexSyF.js} +846 -824
  16. package/dist/extensions.js +4 -4
  17. package/dist/fa-Dt7EYtKf.js +3 -0
  18. package/dist/fr-DUhhjxrJ.js +3 -0
  19. package/dist/getDefaultSlashMenuItems-DfDOr807.js +1939 -0
  20. package/dist/he-BShJg1dK.js +3 -0
  21. package/dist/hr-BXtyqmwg.js +3 -0
  22. package/dist/is-2Fb-0w_j.js +3 -0
  23. package/dist/it-CiZtVb3Y.js +3 -0
  24. package/dist/ja-CsxD3kEL.js +3 -0
  25. package/dist/ko-It6g03Cy.js +3 -0
  26. package/dist/locales.js +692 -54
  27. package/dist/markGroups-BszXCkX8.js +18 -0
  28. package/dist/nb-CLao87La.js +3 -0
  29. package/dist/nl-JQSo8dht.js +3 -0
  30. package/dist/pl-DEMBgHEP.js +3 -0
  31. package/dist/pt-CBCdYAax.js +3 -0
  32. package/dist/ru-BQk_9Q-L.js +3 -0
  33. package/dist/sk-kgB2DtDL.js +3 -0
  34. package/dist/{src-BmLsLZfE.js → src-DksfoQmN.js} +1173 -1090
  35. package/dist/style.css +1 -1
  36. package/dist/tr-DkcSXX8f.js +3 -0
  37. package/dist/uk-Bib-e6bV.js +3 -0
  38. package/dist/uz-B2jaKhJb.js +3 -0
  39. package/dist/vi-V_GFRxE8.js +3 -0
  40. package/dist/y.js +356 -361
  41. package/dist/yjs.js +134 -135
  42. package/dist/zh-hant-2ZrAkFnC.js +3 -0
  43. package/dist/zh-jglyCmjs.js +3 -0
  44. package/package.json +45 -21
  45. package/types/src/api/blockManipulation/layoutBlocks/layoutBlocks.fixture.d.ts +5 -0
  46. package/types/src/api/blockManipulation/tables/tables.d.ts +9 -4
  47. package/types/src/api/clipboard/fromClipboard/normalizeOfficeHTML.d.ts +5 -0
  48. package/types/src/api/exporters/markdown/wrapWithDelimiter.d.ts +6 -0
  49. package/types/src/blocks/Code/helpers/extensions/CodeKeyboardShortcutsExtension.d.ts +4 -0
  50. package/types/src/blocks/defaultBlocks.d.ts +10 -0
  51. package/types/src/editor/BlockNoteEditor.d.ts +2 -1
  52. package/types/src/editor/managers/ExtensionManager/index.d.ts +4 -4
  53. package/types/src/editor/managers/StyleManager.d.ts +2 -1
  54. package/types/src/emoji-data/frimousse/ar.d.ts +2 -0
  55. package/types/src/emoji-data/frimousse/common.d.ts +3 -0
  56. package/types/src/emoji-data/frimousse/de.d.ts +2 -0
  57. package/types/src/emoji-data/frimousse/en.d.ts +2 -0
  58. package/types/src/emoji-data/frimousse/es.d.ts +2 -0
  59. package/types/src/emoji-data/frimousse/fa.d.ts +2 -0
  60. package/types/src/emoji-data/frimousse/fr.d.ts +2 -0
  61. package/types/src/emoji-data/frimousse/he.d.ts +2 -0
  62. package/types/src/emoji-data/frimousse/hr.d.ts +2 -0
  63. package/types/src/emoji-data/frimousse/is.d.ts +2 -0
  64. package/types/src/emoji-data/frimousse/it.d.ts +2 -0
  65. package/types/src/emoji-data/frimousse/ja.d.ts +2 -0
  66. package/types/src/emoji-data/frimousse/ko.d.ts +2 -0
  67. package/types/src/emoji-data/frimousse/loadFrimousseData.d.ts +2 -0
  68. package/types/src/emoji-data/frimousse/nb.d.ts +2 -0
  69. package/types/src/emoji-data/frimousse/nl.d.ts +2 -0
  70. package/types/src/emoji-data/frimousse/pl.d.ts +2 -0
  71. package/types/src/emoji-data/frimousse/pt.d.ts +2 -0
  72. package/types/src/emoji-data/frimousse/ru.d.ts +2 -0
  73. package/types/src/emoji-data/frimousse/sk.d.ts +2 -0
  74. package/types/src/emoji-data/frimousse/tr.d.ts +2 -0
  75. package/types/src/emoji-data/frimousse/types.d.ts +21 -0
  76. package/types/src/emoji-data/frimousse/uk.d.ts +2 -0
  77. package/types/src/emoji-data/frimousse/uz.d.ts +2 -0
  78. package/types/src/emoji-data/frimousse/vi.d.ts +2 -0
  79. package/types/src/emoji-data/frimousse/zh-hant.d.ts +2 -0
  80. package/types/src/emoji-data/frimousse/zh.d.ts +2 -0
  81. package/types/src/emoji-data/index.d.ts +3 -0
  82. package/types/src/emoji-data/searchEmojis.d.ts +5 -0
  83. package/types/src/extensions/Loading/Loading.d.ts +11 -0
  84. package/types/src/extensions/SideMenu/MultipleNodeSelection.d.ts +13 -4
  85. package/types/src/extensions/SideMenu/SideMenu.d.ts +2 -1
  86. package/types/src/extensions/Versioning/Versioning.d.ts +2 -0
  87. package/types/src/extensions/Versioning/inMemoryVersioning.d.ts +1 -0
  88. package/types/src/extensions/Versioning/types.d.ts +12 -6
  89. package/types/src/extensions/Versioning/versioningState.d.ts +6 -0
  90. package/types/src/extensions/index.d.ts +1 -2
  91. package/types/src/i18n/dictionary.d.ts +4 -1
  92. package/types/src/i18n/locales/en.d.ts +6 -0
  93. package/types/src/i18n/locales/fa.d.ts +6 -0
  94. package/types/src/i18n/locales/index.d.ts +1 -0
  95. package/types/src/i18n/locales/sk.d.ts +6 -0
  96. package/types/src/i18n/locales/tr.d.ts +378 -0
  97. package/types/src/index.d.ts +0 -1
  98. package/types/src/schema/inlineContent/createSpec.d.ts +2 -1
  99. package/types/src/schema/inlineContent/internal.d.ts +1 -1
  100. package/types/src/schema/inlineContent/types.d.ts +2 -4
  101. package/types/src/schema/styles/createSpec.d.ts +2 -1
  102. package/types/src/schema/styles/internal.d.ts +4 -1
  103. package/types/src/schema/styles/types.d.ts +2 -0
  104. package/types/src/y/extensions/YSync.d.ts +1 -1
  105. package/types/src/y/extensions/index.d.ts +1 -1
  106. package/types/src/y/versioning/yhub.d.ts +2 -0
  107. package/types/src/yjs/extensions/Versioning.d.ts +1 -0
  108. package/types/src/yjs/extensions/YUndo.d.ts +3 -2
  109. package/types/src/yjs/extensions/index.d.ts +1 -1
  110. package/dist/BlockNoteExtension-DjEkXkR5.cjs +0 -2
  111. package/dist/BlockNoteExtension-DjEkXkR5.cjs.map +0 -1
  112. package/dist/BlockNoteExtension-TsTGtIeX.js +0 -87
  113. package/dist/BlockNoteExtension-TsTGtIeX.js.map +0 -1
  114. package/dist/ThreadStore-Bx-gSEh1.cjs +0 -2
  115. package/dist/ThreadStore-Bx-gSEh1.cjs.map +0 -1
  116. package/dist/ThreadStore-et9wB5Xt.js +0 -11
  117. package/dist/ThreadStore-et9wB5Xt.js.map +0 -1
  118. package/dist/UserStore-CTVzVGh-.cjs +0 -2
  119. package/dist/UserStore-CTVzVGh-.cjs.map +0 -1
  120. package/dist/UserStore-OZJP3K8T.js.map +0 -1
  121. package/dist/blocknote.cjs +0 -1
  122. package/dist/blocks-COVwe5Cf.cjs +0 -12
  123. package/dist/blocks-COVwe5Cf.cjs.map +0 -1
  124. package/dist/blocks-COYcDVg7.js +0 -3943
  125. package/dist/blocks-COYcDVg7.js.map +0 -1
  126. package/dist/blocks.cjs +0 -1
  127. package/dist/comments.cjs +0 -2
  128. package/dist/comments.cjs.map +0 -1
  129. package/dist/comments.js.map +0 -1
  130. package/dist/en-Ch-vvt5e.js.map +0 -1
  131. package/dist/en-N5lu0-j8.cjs +0 -2
  132. package/dist/en-N5lu0-j8.cjs.map +0 -1
  133. package/dist/extensions-BbM81hHa.js.map +0 -1
  134. package/dist/extensions-D_WkAfSt.cjs +0 -58
  135. package/dist/extensions-D_WkAfSt.cjs.map +0 -1
  136. package/dist/extensions.cjs +0 -1
  137. package/dist/locales.cjs +0 -2
  138. package/dist/locales.cjs.map +0 -1
  139. package/dist/locales.js.map +0 -1
  140. package/dist/src-4OQT3z5S.cjs +0 -23
  141. package/dist/src-4OQT3z5S.cjs.map +0 -1
  142. package/dist/src-BmLsLZfE.js.map +0 -1
  143. package/dist/webpack-stats.json +0 -1
  144. package/dist/y.cjs +0 -2
  145. package/dist/y.cjs.map +0 -1
  146. package/dist/y.js.map +0 -1
  147. package/dist/yjs.cjs +0 -2
  148. package/dist/yjs.cjs.map +0 -1
  149. package/dist/yjs.js.map +0 -1
  150. package/src/api/README.md +0 -8
  151. package/src/api/__snapshots__/blocks-deleted-nested-deep.json +0 -26
  152. package/src/api/__snapshots__/blocks-deleted-nested.json +0 -68
  153. package/src/api/__snapshots__/blocks-deleted.json +0 -26
  154. package/src/api/__snapshots__/blocks-indented-changed.json +0 -129
  155. package/src/api/__snapshots__/blocks-inserted-nested.json +0 -62
  156. package/src/api/__snapshots__/blocks-inserted.json +0 -20
  157. package/src/api/__snapshots__/blocks-moved-deeper-into-nesting.json +0 -164
  158. package/src/api/__snapshots__/blocks-moved-down-twice-in-same-parent.json +0 -44
  159. package/src/api/__snapshots__/blocks-moved-insert-changes-sibling-order.json +0 -26
  160. package/src/api/__snapshots__/blocks-moved-multiple-in-same-transaction.json +0 -188
  161. package/src/api/__snapshots__/blocks-moved-nested-sibling-reorder.json +0 -180
  162. package/src/api/__snapshots__/blocks-moved-to-different-parent.json +0 -78
  163. package/src/api/__snapshots__/blocks-moved-to-root-level.json +0 -78
  164. package/src/api/__snapshots__/blocks-moved-up-down-in-same-parent.json +0 -44
  165. package/src/api/__snapshots__/blocks-moved-up-down-in-same-transaction.json +0 -44
  166. package/src/api/__snapshots__/blocks-outdented-changed.json +0 -129
  167. package/src/api/__snapshots__/blocks-updated-content-inserted.json +0 -42
  168. package/src/api/__snapshots__/blocks-updated-multiple-insert.json +0 -50
  169. package/src/api/__snapshots__/blocks-updated-multiple.json +0 -82
  170. package/src/api/__snapshots__/blocks-updated-nested-deep.json +0 -42
  171. package/src/api/__snapshots__/blocks-updated-nested-multiple.json +0 -118
  172. package/src/api/__snapshots__/blocks-updated-nested.json +0 -78
  173. package/src/api/__snapshots__/blocks-updated-single.json +0 -42
  174. package/src/api/__snapshots__/blocks-updated.json +0 -42
  175. package/src/api/blockManipulation/__snapshots__/transactions.test.ts.snap +0 -34
  176. package/src/api/blockManipulation/commands/insertBlocks/__snapshots__/insertBlocks.test.ts.snap +0 -4570
  177. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.ts +0 -176
  178. package/src/api/blockManipulation/commands/insertBlocks/insertBlocks.ts +0 -95
  179. package/src/api/blockManipulation/commands/insertBlocks/insertPlacement.test.ts +0 -217
  180. package/src/api/blockManipulation/commands/mergeBlocks/__snapshots__/mergeBlocks.test.ts.snap +0 -2761
  181. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.ts +0 -251
  182. package/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.ts +0 -187
  183. package/src/api/blockManipulation/commands/moveBlocks/__snapshots__/moveBlocks.test.ts.snap +0 -13625
  184. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.ts +0 -391
  185. package/src/api/blockManipulation/commands/moveBlocks/moveBlocks.ts +0 -350
  186. package/src/api/blockManipulation/commands/nestBlock/__snapshots__/nestBlock.test.ts.snap +0 -952
  187. package/src/api/blockManipulation/commands/nestBlock/nestBlock.test.ts +0 -917
  188. package/src/api/blockManipulation/commands/nestBlock/nestBlock.ts +0 -248
  189. package/src/api/blockManipulation/commands/replaceBlocks/__snapshots__/replaceBlocks.test.ts.snap +0 -5710
  190. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.ts +0 -306
  191. package/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.ts +0 -143
  192. package/src/api/blockManipulation/commands/splitBlock/__snapshots__/splitBlock.test.ts.snap +0 -3507
  193. package/src/api/blockManipulation/commands/splitBlock/splitBlock.test.ts +0 -364
  194. package/src/api/blockManipulation/commands/splitBlock/splitBlock.ts +0 -90
  195. package/src/api/blockManipulation/commands/updateBlock/__snapshots__/updateBlock.test.ts.snap +0 -15085
  196. package/src/api/blockManipulation/commands/updateBlock/updateBlock.test.ts +0 -1210
  197. package/src/api/blockManipulation/commands/updateBlock/updateBlock.ts +0 -706
  198. package/src/api/blockManipulation/getBlock/getBlock.ts +0 -104
  199. package/src/api/blockManipulation/insertContentAt.ts +0 -83
  200. package/src/api/blockManipulation/layoutBlocks/fixLayoutBlock.ts +0 -173
  201. package/src/api/blockManipulation/layoutBlocks/layoutBlocks.browser.test.ts +0 -293
  202. package/src/api/blockManipulation/layoutBlocks/layoutBlocks.fixture.ts +0 -145
  203. package/src/api/blockManipulation/layoutBlocks/layoutBlocks.test.ts +0 -783
  204. package/src/api/blockManipulation/layoutBlocks/plainBlocks.test.ts +0 -180
  205. package/src/api/blockManipulation/layoutBlocks/titledBlocks.test.ts +0 -365
  206. package/src/api/blockManipulation/selections/selection.ts +0 -234
  207. package/src/api/blockManipulation/selections/textCursorPosition.ts +0 -63
  208. package/src/api/blockManipulation/setupTestEnv.ts +0 -223
  209. package/src/api/blockManipulation/tables/tables.test.ts +0 -2127
  210. package/src/api/blockManipulation/tables/tables.ts +0 -887
  211. package/src/api/clipboard/fromClipboard/acceptedMIMETypes.ts +0 -8
  212. package/src/api/clipboard/fromClipboard/fileDropExtension.ts +0 -55
  213. package/src/api/clipboard/fromClipboard/handleFileInsertion.ts +0 -209
  214. package/src/api/clipboard/fromClipboard/handleVSCodePaste.ts +0 -38
  215. package/src/api/clipboard/fromClipboard/pasteExtension.ts +0 -157
  216. package/src/api/clipboard/toClipboard/copyExtension.ts +0 -299
  217. package/src/api/combineTransactionSteps.ts +0 -22
  218. package/src/api/exporters/html/externalHTMLExporter.ts +0 -76
  219. package/src/api/exporters/html/internalHTMLSerializer.ts +0 -182
  220. package/src/api/exporters/html/util/serializeBlocksExternalHTML.ts +0 -510
  221. package/src/api/exporters/html/util/serializeBlocksInternalHTML.ts +0 -283
  222. package/src/api/exporters/markdown/htmlToMarkdown.ts +0 -895
  223. package/src/api/exporters/markdown/markdownExporter.ts +0 -41
  224. package/src/api/getBlockInfoFromPos.test.ts +0 -681
  225. package/src/api/getBlockInfoFromPos.ts +0 -693
  226. package/src/api/getBlocksChangedByTransaction.test.ts +0 -783
  227. package/src/api/getBlocksChangedByTransaction.ts +0 -458
  228. package/src/api/getChangedRangeWithAttrs.ts +0 -54
  229. package/src/api/getChangedRanges.test.ts +0 -391
  230. package/src/api/getChangedRanges.ts +0 -368
  231. package/src/api/nodeConversions/blockToNode.test.ts +0 -113
  232. package/src/api/nodeConversions/blockToNode.ts +0 -427
  233. package/src/api/nodeConversions/fragmentToBlocks.ts +0 -48
  234. package/src/api/nodeConversions/nodeToBlock.ts +0 -717
  235. package/src/api/nodeUtil.ts +0 -46
  236. package/src/api/parsers/html/parseHTML.ts +0 -80
  237. package/src/api/parsers/html/util/__snapshots__/nestedLists.test.ts.snap +0 -144
  238. package/src/api/parsers/html/util/nestedLists.test.ts +0 -165
  239. package/src/api/parsers/html/util/nestedLists.ts +0 -123
  240. package/src/api/parsers/html/util/normalizeWhitespace.ts +0 -87
  241. package/src/api/parsers/markdown/autolink.ts +0 -23
  242. package/src/api/parsers/markdown/detectMarkdown.test.ts +0 -211
  243. package/src/api/parsers/markdown/detectMarkdown.ts +0 -61
  244. package/src/api/parsers/markdown/markdownToHtml.ts +0 -1444
  245. package/src/api/parsers/markdown/parseMarkdown.ts +0 -24
  246. package/src/api/pmUtil.ts +0 -79
  247. package/src/api/positionMapping.test.ts +0 -209
  248. package/src/api/positionMapping.ts +0 -42
  249. package/src/blocks/Audio/block.ts +0 -171
  250. package/src/blocks/Audio/parseAudioElement.ts +0 -5
  251. package/src/blocks/BlockNoteSchema.ts +0 -59
  252. package/src/blocks/Code/CodeBlockOptions.ts +0 -83
  253. package/src/blocks/Code/block.test.ts +0 -265
  254. package/src/blocks/Code/block.ts +0 -56
  255. package/src/blocks/Code/helpers/extensions/CodeKeyboardShortcutsExtension.ts +0 -125
  256. package/src/blocks/Code/helpers/parse/parsePreCode.ts +0 -45
  257. package/src/blocks/Code/helpers/render/createCodeBlock.ts +0 -98
  258. package/src/blocks/Code/helpers/toExternalHTML/createPreCode.ts +0 -14
  259. package/src/blocks/Divider/block.ts +0 -49
  260. package/src/blocks/File/block.ts +0 -95
  261. package/src/blocks/File/helpers/parse/parseEmbedElement.ts +0 -5
  262. package/src/blocks/File/helpers/parse/parseFigureElement.ts +0 -16
  263. package/src/blocks/File/helpers/render/createAddFileButton.ts +0 -69
  264. package/src/blocks/File/helpers/render/createFileBlockWrapper.ts +0 -88
  265. package/src/blocks/File/helpers/render/createFileNameWithIcon.ts +0 -37
  266. package/src/blocks/File/helpers/render/createResizableFileBlockWrapper.ts +0 -271
  267. package/src/blocks/File/helpers/toExternalHTML/createFigureWithCaption.ts +0 -13
  268. package/src/blocks/File/helpers/toExternalHTML/createLinkWithCaption.ts +0 -15
  269. package/src/blocks/Heading/block.ts +0 -227
  270. package/src/blocks/Image/block.ts +0 -193
  271. package/src/blocks/Image/parseImageElement.ts +0 -7
  272. package/src/blocks/ListItem/BulletListItem/block.ts +0 -129
  273. package/src/blocks/ListItem/CheckListItem/block.test.ts +0 -61
  274. package/src/blocks/ListItem/CheckListItem/block.ts +0 -184
  275. package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.test.ts +0 -352
  276. package/src/blocks/ListItem/NumberedListItem/IndexingPlugin.ts +0 -239
  277. package/src/blocks/ListItem/NumberedListItem/block.ts +0 -143
  278. package/src/blocks/ListItem/ToggleListItem/block.ts +0 -139
  279. package/src/blocks/ListItem/getListItemContent.ts +0 -115
  280. package/src/blocks/PageBreak/block.ts +0 -72
  281. package/src/blocks/PageBreak/getPageBreakSlashMenuItems.ts +0 -47
  282. package/src/blocks/Paragraph/block.ts +0 -80
  283. package/src/blocks/Quote/block.ts +0 -99
  284. package/src/blocks/README.md +0 -3
  285. package/src/blocks/Table/TableExtension.test.ts +0 -231
  286. package/src/blocks/Table/TableExtension.ts +0 -115
  287. package/src/blocks/Table/block.ts +0 -492
  288. package/src/blocks/ToggleWrapper/createToggleFrame.ts +0 -126
  289. package/src/blocks/ToggleWrapper/toggleBlocks.browser.test.ts +0 -1056
  290. package/src/blocks/Video/block.ts +0 -142
  291. package/src/blocks/Video/parseVideoElement.ts +0 -7
  292. package/src/blocks/defaultBlockHelpers.ts +0 -113
  293. package/src/blocks/defaultBlockTypeGuards.ts +0 -167
  294. package/src/blocks/defaultBlockTypeItems.test.ts +0 -70
  295. package/src/blocks/defaultBlockTypeItems.ts +0 -99
  296. package/src/blocks/defaultBlocks.test.ts +0 -67
  297. package/src/blocks/defaultBlocks.ts +0 -214
  298. package/src/blocks/defaultProps.ts +0 -165
  299. package/src/blocks/getDetailsContent.ts +0 -77
  300. package/src/blocks/index.ts +0 -30
  301. package/src/comments/CommentEditorSubmitExtension.test.ts +0 -141
  302. package/src/comments/CommentEditorSubmitExtension.ts +0 -56
  303. package/src/comments/extension.ts +0 -396
  304. package/src/comments/index.ts +0 -8
  305. package/src/comments/mark.ts +0 -64
  306. package/src/comments/threadstore/DefaultThreadStoreAuth.ts +0 -106
  307. package/src/comments/threadstore/ThreadStore.ts +0 -130
  308. package/src/comments/threadstore/ThreadStoreAuth.ts +0 -13
  309. package/src/comments/threadstore/TipTapThreadStore.ts +0 -292
  310. package/src/comments/threadstore/tiptap/types.ts +0 -131
  311. package/src/comments/types.ts +0 -121
  312. package/src/editor/Block.css +0 -1498
  313. package/src/editor/BlockNoteEditor.node.test.ts +0 -35
  314. package/src/editor/BlockNoteEditor.test.ts +0 -278
  315. package/src/editor/BlockNoteEditor.ts +0 -1559
  316. package/src/editor/BlockNoteExtension.test.ts +0 -103
  317. package/src/editor/BlockNoteExtension.ts +0 -246
  318. package/src/editor/README.md +0 -3
  319. package/src/editor/blockColors.browser.test.ts +0 -127
  320. package/src/editor/cursorPositionTypes.ts +0 -17
  321. package/src/editor/defaultColors.ts +0 -77
  322. package/src/editor/editor.css +0 -257
  323. package/src/editor/managers/BlockManager.ts +0 -256
  324. package/src/editor/managers/EventManager.browser.test.ts +0 -334
  325. package/src/editor/managers/EventManager.ts +0 -260
  326. package/src/editor/managers/ExportManager.ts +0 -137
  327. package/src/editor/managers/ExtensionManager/ExtensionManager.browser.test.ts +0 -45
  328. package/src/editor/managers/ExtensionManager/ExtensionManager.node.test.ts +0 -209
  329. package/src/editor/managers/ExtensionManager/ExtensionManager.test.ts +0 -336
  330. package/src/editor/managers/ExtensionManager/extensions.ts +0 -200
  331. package/src/editor/managers/ExtensionManager/index.ts +0 -764
  332. package/src/editor/managers/ExtensionManager/symbol.ts +0 -5
  333. package/src/editor/managers/SelectionManager.ts +0 -120
  334. package/src/editor/managers/StateManager.ts +0 -261
  335. package/src/editor/managers/StyleManager.browser.test.ts +0 -122
  336. package/src/editor/managers/StyleManager.test.ts +0 -98
  337. package/src/editor/managers/StyleManager.ts +0 -278
  338. package/src/editor/managers/index.ts +0 -8
  339. package/src/editor/performance.test.ts +0 -192
  340. package/src/editor/selectionTypes.ts +0 -14
  341. package/src/editor/transformPasted.test.ts +0 -295
  342. package/src/editor/transformPasted.ts +0 -294
  343. package/src/exporter/ExportImage.ts +0 -50
  344. package/src/exporter/Exporter.test.ts +0 -255
  345. package/src/exporter/Exporter.ts +0 -185
  346. package/src/exporter/index.ts +0 -3
  347. package/src/exporter/mapping.ts +0 -110
  348. package/src/extensions/BlockChange/BlockChange.ts +0 -67
  349. package/src/extensions/DropCursor/DropCursor.ts +0 -376
  350. package/src/extensions/DropCursor/dropIntoChildren.ts +0 -80
  351. package/src/extensions/DropCursor/utils.ts +0 -195
  352. package/src/extensions/FilePanel/FilePanel.ts +0 -41
  353. package/src/extensions/FormattingToolbar/FormattingToolbar.ts +0 -157
  354. package/src/extensions/History/History.ts +0 -11
  355. package/src/extensions/InlineContentBoundaryEdit/InlineContentBoundaryEdit.ts +0 -109
  356. package/src/extensions/LinkToolbar/LinkToolbar.ts +0 -76
  357. package/src/extensions/LinkToolbar/protocols.ts +0 -13
  358. package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboard.test.ts +0 -190
  359. package/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboard.ts +0 -112
  360. package/src/extensions/Placeholder/Placeholder.test.ts +0 -23
  361. package/src/extensions/Placeholder/Placeholder.ts +0 -150
  362. package/src/extensions/PositionMapping/PositionMapping.ts +0 -68
  363. package/src/extensions/PreviousBlockType/PreviousBlockType.test.ts +0 -156
  364. package/src/extensions/PreviousBlockType/PreviousBlockType.ts +0 -201
  365. package/src/extensions/README.md +0 -3
  366. package/src/extensions/ReadOnly/ReadOnly.test.ts +0 -181
  367. package/src/extensions/ReadOnly/ReadOnly.ts +0 -73
  368. package/src/extensions/ShowSelection/ShowSelection.ts +0 -61
  369. package/src/extensions/SideMenu/MultipleNodeSelection.ts +0 -89
  370. package/src/extensions/SideMenu/SideMenu.ts +0 -470
  371. package/src/extensions/SideMenu/blockDropHandling.ts +0 -372
  372. package/src/extensions/SideMenu/blockGeometry.browser.test.ts +0 -148
  373. package/src/extensions/SideMenu/blockGeometry.test.ts +0 -46
  374. package/src/extensions/SideMenu/blockGeometry.ts +0 -53
  375. package/src/extensions/SideMenu/dragging.ts +0 -200
  376. package/src/extensions/SideMenu/sideMenuHover.test.ts +0 -36
  377. package/src/extensions/SideMenu/sideMenuHover.ts +0 -270
  378. package/src/extensions/SourceBlockWithPreview/SourceBlockWithPreview.ts +0 -193
  379. package/src/extensions/SourceInlineContentWithPreview/SourceInlineContentWithPreview.ts +0 -142
  380. package/src/extensions/SuggestionMenu/DefaultGridSuggestionItem.ts +0 -4
  381. package/src/extensions/SuggestionMenu/DefaultSuggestionItem.ts +0 -11
  382. package/src/extensions/SuggestionMenu/SuggestionMenu.test.ts +0 -309
  383. package/src/extensions/SuggestionMenu/SuggestionMenu.ts +0 -436
  384. package/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.ts +0 -76
  385. package/src/extensions/SuggestionMenu/getDefaultSlashMenuItems.ts +0 -299
  386. package/src/extensions/SyntaxHighlighting/SyntaxHighlighting.test.ts +0 -130
  387. package/src/extensions/SyntaxHighlighting/SyntaxHighlighting.ts +0 -89
  388. package/src/extensions/SyntaxHighlighting/inlineHighlight.test.ts +0 -135
  389. package/src/extensions/SyntaxHighlighting/shiki.ts +0 -116
  390. package/src/extensions/TableHandles/TableHandles.browser.test.ts +0 -307
  391. package/src/extensions/TableHandles/TableHandles.ts +0 -1263
  392. package/src/extensions/TrailingNode/TrailingNode.ts +0 -233
  393. package/src/extensions/Versioning/Versioning.browser.test.ts +0 -151
  394. package/src/extensions/Versioning/Versioning.node.test.ts +0 -177
  395. package/src/extensions/Versioning/Versioning.ts +0 -161
  396. package/src/extensions/Versioning/__test__/result.ts +0 -12
  397. package/src/extensions/Versioning/comparison.test.ts +0 -40
  398. package/src/extensions/Versioning/createVersioning.test.ts +0 -867
  399. package/src/extensions/Versioning/createVersioning.ts +0 -499
  400. package/src/extensions/Versioning/formatVersionDate.ts +0 -24
  401. package/src/extensions/Versioning/inMemoryVersioning.test.ts +0 -572
  402. package/src/extensions/Versioning/inMemoryVersioning.ts +0 -268
  403. package/src/extensions/Versioning/index.ts +0 -6
  404. package/src/extensions/Versioning/scrollScheduling.test.ts +0 -51
  405. package/src/extensions/Versioning/scrollToFirstChange.test.ts +0 -320
  406. package/src/extensions/Versioning/scrollToFirstChange.ts +0 -139
  407. package/src/extensions/Versioning/types.ts +0 -219
  408. package/src/extensions/Versioning/versioningState.ts +0 -154
  409. package/src/extensions/blockDOM.browser.test.ts +0 -102
  410. package/src/extensions/blockDOM.test.ts +0 -178
  411. package/src/extensions/blockDOM.ts +0 -135
  412. package/src/extensions/index.ts +0 -27
  413. package/src/extensions/tiptap-extensions/BackgroundColor/BackgroundColorExtension.ts +0 -17
  414. package/src/extensions/tiptap-extensions/HardBreak/HardBreak.ts +0 -35
  415. package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.test.ts +0 -1870
  416. package/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.ts +0 -1116
  417. package/src/extensions/tiptap-extensions/KeyboardShortcuts/blockIdentity.browser.test.ts +0 -152
  418. package/src/extensions/tiptap-extensions/Link/helpers/autolink.ts +0 -174
  419. package/src/extensions/tiptap-extensions/Link/helpers/clickHandler.ts +0 -82
  420. package/src/extensions/tiptap-extensions/Link/helpers/linkDetector.ts +0 -412
  421. package/src/extensions/tiptap-extensions/Link/helpers/pasteHandler.ts +0 -53
  422. package/src/extensions/tiptap-extensions/Link/helpers/tlds.ts +0 -7
  423. package/src/extensions/tiptap-extensions/Link/helpers/whitespace.ts +0 -13
  424. package/src/extensions/tiptap-extensions/Link/index.ts +0 -2
  425. package/src/extensions/tiptap-extensions/Link/link.test.ts +0 -945
  426. package/src/extensions/tiptap-extensions/Link/link.ts +0 -238
  427. package/src/extensions/tiptap-extensions/TextAlignment/TextAlignmentExtension.ts +0 -33
  428. package/src/extensions/tiptap-extensions/TextColor/TextColorExtension.ts +0 -17
  429. package/src/extensions/tiptap-extensions/UniqueID/UniqueID.test.ts +0 -173
  430. package/src/extensions/tiptap-extensions/UniqueID/UniqueID.ts +0 -339
  431. package/src/extensions/tiptap-extensions/index.ts +0 -7
  432. package/src/extensions-shared/UiElementPosition.ts +0 -4
  433. package/src/fonts/inter.browser.test.ts +0 -57
  434. package/src/i18n/dictionary.ts +0 -17
  435. package/src/i18n/index.ts +0 -2
  436. package/src/i18n/locales/ar.ts +0 -443
  437. package/src/i18n/locales/de.ts +0 -477
  438. package/src/i18n/locales/en.ts +0 -458
  439. package/src/i18n/locales/es.ts +0 -456
  440. package/src/i18n/locales/fa.ts +0 -427
  441. package/src/i18n/locales/fr.ts +0 -504
  442. package/src/i18n/locales/he.ts +0 -458
  443. package/src/i18n/locales/hr.ts +0 -472
  444. package/src/i18n/locales/index.ts +0 -23
  445. package/src/i18n/locales/is.ts +0 -472
  446. package/src/i18n/locales/it.ts +0 -480
  447. package/src/i18n/locales/ja.ts +0 -498
  448. package/src/i18n/locales/ko.ts +0 -471
  449. package/src/i18n/locales/nl.ts +0 -459
  450. package/src/i18n/locales/no.ts +0 -476
  451. package/src/i18n/locales/pl.ts +0 -449
  452. package/src/i18n/locales/pt.ts +0 -451
  453. package/src/i18n/locales/ru.ts +0 -502
  454. package/src/i18n/locales/sk.ts +0 -456
  455. package/src/i18n/locales/uk.ts +0 -482
  456. package/src/i18n/locales/uz.ts +0 -492
  457. package/src/i18n/locales/vi.ts +0 -457
  458. package/src/i18n/locales/zh-tw.ts +0 -499
  459. package/src/i18n/locales/zh.ts +0 -499
  460. package/src/index.ts +0 -66
  461. package/src/locales.ts +0 -1
  462. package/src/pm-nodes/BlockContainer.test.ts +0 -101
  463. package/src/pm-nodes/BlockContainer.ts +0 -200
  464. package/src/pm-nodes/BlockGroup.ts +0 -58
  465. package/src/pm-nodes/Doc.ts +0 -11
  466. package/src/pm-nodes/README.md +0 -143
  467. package/src/pm-nodes/index.ts +0 -3
  468. package/src/pm-nodes/suggestionMarks.ts +0 -43
  469. package/src/schema/README.md +0 -3
  470. package/src/schema/blocks/children.test.ts +0 -288
  471. package/src/schema/blocks/children.ts +0 -136
  472. package/src/schema/blocks/createSpec.browser.test.ts +0 -176
  473. package/src/schema/blocks/createSpec.test.ts +0 -354
  474. package/src/schema/blocks/createSpec.ts +0 -732
  475. package/src/schema/blocks/extendBlockSpec.test.ts +0 -188
  476. package/src/schema/blocks/frame.test.ts +0 -112
  477. package/src/schema/blocks/frame.ts +0 -337
  478. package/src/schema/blocks/internal.test.ts +0 -86
  479. package/src/schema/blocks/internal.ts +0 -288
  480. package/src/schema/blocks/keyboard.ts +0 -154
  481. package/src/schema/blocks/layoutBlockAttributes.ts +0 -29
  482. package/src/schema/blocks/meta.test.ts +0 -53
  483. package/src/schema/blocks/meta.ts +0 -35
  484. package/src/schema/blocks/renderFrame.test.ts +0 -691
  485. package/src/schema/blocks/types.ts +0 -966
  486. package/src/schema/blocks/validateChildren.ts +0 -156
  487. package/src/schema/contentTypePropagation.test.ts +0 -182
  488. package/src/schema/dataAttributes.test.ts +0 -72
  489. package/src/schema/dataAttributes.ts +0 -69
  490. package/src/schema/index.ts +0 -15
  491. package/src/schema/inlineContent/createSpec.test.ts +0 -161
  492. package/src/schema/inlineContent/createSpec.ts +0 -409
  493. package/src/schema/inlineContent/internal.ts +0 -131
  494. package/src/schema/inlineContent/types.ts +0 -204
  495. package/src/schema/markGroups.ts +0 -82
  496. package/src/schema/nodeViewMutations.test.ts +0 -146
  497. package/src/schema/nodeViewMutations.ts +0 -49
  498. package/src/schema/propTypes.ts +0 -61
  499. package/src/schema/schema.test.ts +0 -110
  500. package/src/schema/schema.ts +0 -243
  501. package/src/schema/styles/createSpec.ts +0 -140
  502. package/src/schema/styles/internal.ts +0 -155
  503. package/src/schema/styles/types.ts +0 -57
  504. package/src/style.css +0 -2
  505. package/src/user/UserStore.ts +0 -199
  506. package/src/user/createUserStore.test.ts +0 -126
  507. package/src/user/index.ts +0 -2
  508. package/src/user/userColors.test.ts +0 -108
  509. package/src/user/userColors.ts +0 -101
  510. package/src/util/EventEmitter.ts +0 -59
  511. package/src/util/README.md +0 -3
  512. package/src/util/Store.test.ts +0 -132
  513. package/src/util/Store.ts +0 -135
  514. package/src/util/browser.ts +0 -54
  515. package/src/util/combineByGroup.ts +0 -25
  516. package/src/util/expandToWords.ts +0 -38
  517. package/src/util/string.ts +0 -36
  518. package/src/util/table.ts +0 -110
  519. package/src/util/topo-sort.test.ts +0 -125
  520. package/src/util/topo-sort.ts +0 -206
  521. package/src/util/typescript.ts +0 -17
  522. package/src/vite-env.d.ts +0 -7
  523. package/src/y/README.md +0 -5
  524. package/src/y/comments/RESTYjsThreadStore.ts +0 -138
  525. package/src/y/comments/YjsThreadStore.test.ts +0 -295
  526. package/src/y/comments/YjsThreadStore.ts +0 -358
  527. package/src/y/comments/YjsThreadStoreBase.ts +0 -50
  528. package/src/y/comments/index.ts +0 -3
  529. package/src/y/comments/yjsHelpers.ts +0 -125
  530. package/src/y/extensions/AttributionExtension.test.ts +0 -364
  531. package/src/y/extensions/AttributionExtension.ts +0 -401
  532. package/src/y/extensions/DiffVersioningExtension.test.ts +0 -242
  533. package/src/y/extensions/DiffVersioningExtension.ts +0 -200
  534. package/src/y/extensions/EmptyDocBinding.test.ts +0 -282
  535. package/src/y/extensions/ForkYDoc.node.test.ts +0 -77
  536. package/src/y/extensions/ForkYDoc.test.ts +0 -344
  537. package/src/y/extensions/ForkYDoc.ts +0 -117
  538. package/src/y/extensions/History.test.ts +0 -125
  539. package/src/y/extensions/RelativePositionMapping.test.ts +0 -453
  540. package/src/y/extensions/RelativePositionMapping.ts +0 -45
  541. package/src/y/extensions/Suggestions.ts +0 -174
  542. package/src/y/extensions/Versioning.node.test.ts +0 -126
  543. package/src/y/extensions/Versioning.test.ts +0 -117
  544. package/src/y/extensions/Versioning.ts +0 -74
  545. package/src/y/extensions/YAttributionMarks.ts +0 -422
  546. package/src/y/extensions/YCursorPlugin.ts +0 -192
  547. package/src/y/extensions/YSync.node.test.ts +0 -75
  548. package/src/y/extensions/YSync.ts +0 -197
  549. package/src/y/extensions/YSyncRemount.test.ts +0 -99
  550. package/src/y/extensions/blockMatchNodes.ts +0 -173
  551. package/src/y/extensions/index.ts +0 -140
  552. package/src/y/extensions/legacyYjsDocBinding.test.ts +0 -652
  553. package/src/y/extensions/nestingChanges.test.ts +0 -326
  554. package/src/y/extensions/persistentBlockGroups.test.ts +0 -1709
  555. package/src/y/extensions/persistentBlockGroups.ts +0 -953
  556. package/src/y/extensions/snapshotCodec.test.ts +0 -105
  557. package/src/y/extensions/snapshotCodec.ts +0 -39
  558. package/src/y/extensions/snapshotPreview.test.ts +0 -201
  559. package/src/y/extensions/snapshotPreview.ts +0 -292
  560. package/src/y/extensions/tableReshape.test.ts +0 -121
  561. package/src/y/extensions/v1BindingSnapshotDiff.test.ts +0 -121
  562. package/src/y/extensions/versionDiffAttribution.test.ts +0 -944
  563. package/src/y/extensions/versionDiffPerformance.test.ts +0 -101
  564. package/src/y/index.ts +0 -5
  565. package/src/y/utils.test.ts +0 -1309
  566. package/src/y/utils.ts +0 -366
  567. package/src/y/versioning/__test__/fixtures/activity-all-after.bin +0 -0
  568. package/src/y/versioning/__test__/fixtures/activity-all-after.json +0 -50
  569. package/src/y/versioning/__test__/fixtures/activity-all.bin +0 -0
  570. package/src/y/versioning/__test__/fixtures/activity-all.json +0 -20
  571. package/src/y/versioning/__test__/fixtures/activity-filtered-after.bin +0 -0
  572. package/src/y/versioning/__test__/fixtures/activity-filtered-after.json +0 -32
  573. package/src/y/versioning/__test__/fixtures/activity-filtered-before.json +0 -1
  574. package/src/y/versioning/__test__/fixtures/changeset.bin +0 -0
  575. package/src/y/versioning/__test__/fixtures/patch-response.json +0 -4
  576. package/src/y/versioning/__test__/yhub.test.ts +0 -966
  577. package/src/y/versioning/index.ts +0 -6
  578. package/src/y/versioning/yhub.ts +0 -350
  579. package/src/y/versioning/yhubClient.ts +0 -345
  580. package/src/yjs/README.md +0 -5
  581. package/src/yjs/comments/RESTYjsThreadStore.test.ts +0 -95
  582. package/src/yjs/comments/RESTYjsThreadStore.ts +0 -172
  583. package/src/yjs/comments/YjsThreadStore.test.ts +0 -295
  584. package/src/yjs/comments/YjsThreadStore.ts +0 -345
  585. package/src/yjs/comments/YjsThreadStoreBase.ts +0 -50
  586. package/src/yjs/comments/index.ts +0 -3
  587. package/src/yjs/comments/yjsHelpers.ts +0 -127
  588. package/src/yjs/extensions/FixUpSchema.test.ts +0 -421
  589. package/src/yjs/extensions/FixUpSchema.ts +0 -99
  590. package/src/yjs/extensions/ForkYDoc.browser.test.ts +0 -84
  591. package/src/yjs/extensions/ForkYDoc.node.test.ts +0 -231
  592. package/src/yjs/extensions/ForkYDoc.test.ts +0 -320
  593. package/src/yjs/extensions/ForkYDoc.ts +0 -177
  594. package/src/yjs/extensions/RelativePositionMapping.test.ts +0 -418
  595. package/src/yjs/extensions/RelativePositionMapping.ts +0 -77
  596. package/src/yjs/extensions/Versioning.test.ts +0 -376
  597. package/src/yjs/extensions/Versioning.ts +0 -126
  598. package/src/yjs/extensions/YCursorPlugin.ts +0 -201
  599. package/src/yjs/extensions/YSync.ts +0 -16
  600. package/src/yjs/extensions/YUndo.ts +0 -12
  601. package/src/yjs/extensions/__snapshots__/fork-yjs-snap-editor-forked.json +0 -19
  602. package/src/yjs/extensions/__snapshots__/fork-yjs-snap-editor.json +0 -19
  603. package/src/yjs/extensions/__snapshots__/fork-yjs-snap-forked.html +0 -1
  604. package/src/yjs/extensions/__snapshots__/fork-yjs-snap.html +0 -1
  605. package/src/yjs/extensions/index.ts +0 -89
  606. package/src/yjs/extensions/schemaMigration/SchemaMigration.ts +0 -59
  607. package/src/yjs/extensions/schemaMigration/migrationRules/index.ts +0 -4
  608. package/src/yjs/extensions/schemaMigration/migrationRules/migrationRule.ts +0 -4
  609. package/src/yjs/extensions/schemaMigration/migrationRules/moveColorAttributes.test.ts +0 -130
  610. package/src/yjs/extensions/schemaMigration/migrationRules/moveColorAttributes.ts +0 -91
  611. package/src/yjs/index.ts +0 -7
  612. package/src/yjs/utils.test.ts +0 -1013
  613. package/src/yjs/utils.ts +0 -186
  614. package/types/src/api/blockManipulation/commands/insertBlocks/insertBlocks.test.d.ts +0 -1
  615. package/types/src/api/blockManipulation/commands/insertBlocks/insertPlacement.test.d.ts +0 -1
  616. package/types/src/api/blockManipulation/commands/mergeBlocks/mergeBlocks.test.d.ts +0 -1
  617. package/types/src/api/blockManipulation/commands/moveBlocks/moveBlocks.test.d.ts +0 -1
  618. package/types/src/api/blockManipulation/commands/nestBlock/nestBlock.test.d.ts +0 -1
  619. package/types/src/api/blockManipulation/commands/replaceBlocks/replaceBlocks.test.d.ts +0 -1
  620. package/types/src/api/blockManipulation/commands/splitBlock/splitBlock.test.d.ts +0 -1
  621. package/types/src/api/blockManipulation/commands/updateBlock/updateBlock.test.d.ts +0 -1
  622. package/types/src/api/blockManipulation/layoutBlocks/layoutBlocks.browser.test.d.ts +0 -1
  623. package/types/src/api/blockManipulation/layoutBlocks/layoutBlocks.test.d.ts +0 -1
  624. package/types/src/api/blockManipulation/layoutBlocks/plainBlocks.test.d.ts +0 -1
  625. package/types/src/api/blockManipulation/layoutBlocks/titledBlocks.test.d.ts +0 -1
  626. package/types/src/api/blockManipulation/tables/tables.test.d.ts +0 -1
  627. package/types/src/api/getBlockInfoFromPos.test.d.ts +0 -1
  628. package/types/src/api/getBlocksChangedByTransaction.test.d.ts +0 -1
  629. package/types/src/api/getChangedRanges.test.d.ts +0 -1
  630. package/types/src/api/nodeConversions/blockToNode.test.d.ts +0 -1
  631. package/types/src/api/parsers/html/util/nestedLists.test.d.ts +0 -1
  632. package/types/src/api/parsers/markdown/detectMarkdown.test.d.ts +0 -1
  633. package/types/src/api/positionMapping.test.d.ts +0 -1
  634. package/types/src/blocks/Code/block.test.d.ts +0 -1
  635. package/types/src/blocks/ListItem/CheckListItem/block.test.d.ts +0 -1
  636. package/types/src/blocks/ListItem/NumberedListItem/IndexingPlugin.test.d.ts +0 -1
  637. package/types/src/blocks/Table/TableExtension.test.d.ts +0 -1
  638. package/types/src/blocks/ToggleWrapper/toggleBlocks.browser.test.d.ts +0 -1
  639. package/types/src/blocks/defaultBlockTypeItems.test.d.ts +0 -1
  640. package/types/src/blocks/defaultBlocks.test.d.ts +0 -1
  641. package/types/src/comments/CommentEditorSubmitExtension.test.d.ts +0 -1
  642. package/types/src/editor/BlockNoteEditor.node.test.d.ts +0 -1
  643. package/types/src/editor/BlockNoteEditor.test.d.ts +0 -1
  644. package/types/src/editor/BlockNoteExtension.test.d.ts +0 -1
  645. package/types/src/editor/blockColors.browser.test.d.ts +0 -1
  646. package/types/src/editor/managers/EventManager.browser.test.d.ts +0 -1
  647. package/types/src/editor/managers/ExtensionManager/ExtensionManager.browser.test.d.ts +0 -1
  648. package/types/src/editor/managers/ExtensionManager/ExtensionManager.node.test.d.ts +0 -1
  649. package/types/src/editor/managers/ExtensionManager/ExtensionManager.test.d.ts +0 -1
  650. package/types/src/editor/managers/StyleManager.browser.test.d.ts +0 -1
  651. package/types/src/editor/managers/StyleManager.test.d.ts +0 -1
  652. package/types/src/editor/performance.test.d.ts +0 -1
  653. package/types/src/editor/transformPasted.test.d.ts +0 -1
  654. package/types/src/exporter/Exporter.test.d.ts +0 -1
  655. package/types/src/extensions/NodeSelectionKeyboard/NodeSelectionKeyboard.test.d.ts +0 -1
  656. package/types/src/extensions/Placeholder/Placeholder.test.d.ts +0 -1
  657. package/types/src/extensions/PreviousBlockType/PreviousBlockType.test.d.ts +0 -1
  658. package/types/src/extensions/ReadOnly/ReadOnly.test.d.ts +0 -1
  659. package/types/src/extensions/SideMenu/blockGeometry.browser.test.d.ts +0 -1
  660. package/types/src/extensions/SideMenu/blockGeometry.test.d.ts +0 -1
  661. package/types/src/extensions/SideMenu/sideMenuHover.test.d.ts +0 -1
  662. package/types/src/extensions/SuggestionMenu/DefaultGridSuggestionItem.d.ts +0 -4
  663. package/types/src/extensions/SuggestionMenu/SuggestionMenu.test.d.ts +0 -1
  664. package/types/src/extensions/SuggestionMenu/getDefaultEmojiPickerItems.d.ts +0 -4
  665. package/types/src/extensions/SyntaxHighlighting/SyntaxHighlighting.test.d.ts +0 -1
  666. package/types/src/extensions/SyntaxHighlighting/inlineHighlight.test.d.ts +0 -1
  667. package/types/src/extensions/TableHandles/TableHandles.browser.test.d.ts +0 -1
  668. package/types/src/extensions/Versioning/Versioning.browser.test.d.ts +0 -1
  669. package/types/src/extensions/Versioning/Versioning.node.test.d.ts +0 -1
  670. package/types/src/extensions/Versioning/__test__/result.d.ts +0 -3
  671. package/types/src/extensions/Versioning/comparison.test.d.ts +0 -1
  672. package/types/src/extensions/Versioning/createVersioning.test.d.ts +0 -1
  673. package/types/src/extensions/Versioning/inMemoryVersioning.test.d.ts +0 -1
  674. package/types/src/extensions/Versioning/scrollScheduling.test.d.ts +0 -1
  675. package/types/src/extensions/Versioning/scrollToFirstChange.test.d.ts +0 -1
  676. package/types/src/extensions/blockDOM.browser.test.d.ts +0 -1
  677. package/types/src/extensions/blockDOM.test.d.ts +0 -1
  678. package/types/src/extensions/tiptap-extensions/KeyboardShortcuts/KeyboardShortcutsExtension.test.d.ts +0 -4
  679. package/types/src/extensions/tiptap-extensions/KeyboardShortcuts/blockIdentity.browser.test.d.ts +0 -1
  680. package/types/src/extensions/tiptap-extensions/Link/link.test.d.ts +0 -1
  681. package/types/src/extensions/tiptap-extensions/UniqueID/UniqueID.test.d.ts +0 -4
  682. package/types/src/fonts/inter.browser.test.d.ts +0 -2
  683. package/types/src/pm-nodes/BlockContainer.test.d.ts +0 -1
  684. package/types/src/schema/blocks/children.test.d.ts +0 -1
  685. package/types/src/schema/blocks/createSpec.browser.test.d.ts +0 -1
  686. package/types/src/schema/blocks/createSpec.test.d.ts +0 -1
  687. package/types/src/schema/blocks/extendBlockSpec.test.d.ts +0 -1
  688. package/types/src/schema/blocks/frame.test.d.ts +0 -1
  689. package/types/src/schema/blocks/internal.test.d.ts +0 -1
  690. package/types/src/schema/blocks/meta.test.d.ts +0 -1
  691. package/types/src/schema/blocks/renderFrame.test.d.ts +0 -1
  692. package/types/src/schema/contentTypePropagation.test.d.ts +0 -1
  693. package/types/src/schema/dataAttributes.test.d.ts +0 -1
  694. package/types/src/schema/inlineContent/createSpec.test.d.ts +0 -1
  695. package/types/src/schema/nodeViewMutations.test.d.ts +0 -1
  696. package/types/src/schema/schema.test.d.ts +0 -1
  697. package/types/src/user/createUserStore.test.d.ts +0 -1
  698. package/types/src/user/userColors.test.d.ts +0 -1
  699. package/types/src/util/Store.test.d.ts +0 -1
  700. package/types/src/util/topo-sort.test.d.ts +0 -1
  701. package/types/src/y/comments/YjsThreadStore.test.d.ts +0 -1
  702. package/types/src/y/extensions/AttributionExtension.test.d.ts +0 -1
  703. package/types/src/y/extensions/DiffVersioningExtension.test.d.ts +0 -1
  704. package/types/src/y/extensions/EmptyDocBinding.test.d.ts +0 -1
  705. package/types/src/y/extensions/ForkYDoc.node.test.d.ts +0 -1
  706. package/types/src/y/extensions/ForkYDoc.test.d.ts +0 -1
  707. package/types/src/y/extensions/History.test.d.ts +0 -1
  708. package/types/src/y/extensions/RelativePositionMapping.test.d.ts +0 -1
  709. package/types/src/y/extensions/Versioning.node.test.d.ts +0 -1
  710. package/types/src/y/extensions/Versioning.test.d.ts +0 -1
  711. package/types/src/y/extensions/YSync.node.test.d.ts +0 -1
  712. package/types/src/y/extensions/YSyncRemount.test.d.ts +0 -1
  713. package/types/src/y/extensions/legacyYjsDocBinding.test.d.ts +0 -1
  714. package/types/src/y/extensions/nestingChanges.test.d.ts +0 -1
  715. package/types/src/y/extensions/persistentBlockGroups.test.d.ts +0 -1
  716. package/types/src/y/extensions/snapshotCodec.test.d.ts +0 -1
  717. package/types/src/y/extensions/snapshotPreview.test.d.ts +0 -1
  718. package/types/src/y/extensions/tableReshape.test.d.ts +0 -1
  719. package/types/src/y/extensions/v1BindingSnapshotDiff.test.d.ts +0 -1
  720. package/types/src/y/extensions/versionDiffAttribution.test.d.ts +0 -1
  721. package/types/src/y/extensions/versionDiffPerformance.test.d.ts +0 -1
  722. package/types/src/y/utils.test.d.ts +0 -1
  723. package/types/src/y/versioning/__test__/yhub.test.d.ts +0 -1
  724. package/types/src/yjs/comments/RESTYjsThreadStore.test.d.ts +0 -1
  725. package/types/src/yjs/comments/YjsThreadStore.test.d.ts +0 -1
  726. package/types/src/yjs/extensions/FixUpSchema.test.d.ts +0 -1
  727. package/types/src/yjs/extensions/ForkYDoc.browser.test.d.ts +0 -1
  728. package/types/src/yjs/extensions/ForkYDoc.node.test.d.ts +0 -1
  729. package/types/src/yjs/extensions/ForkYDoc.test.d.ts +0 -1
  730. package/types/src/yjs/extensions/RelativePositionMapping.test.d.ts +0 -1
  731. package/types/src/yjs/extensions/Versioning.test.d.ts +0 -1
  732. package/types/src/yjs/extensions/schemaMigration/migrationRules/moveColorAttributes.test.d.ts +0 -1
  733. package/types/src/yjs/utils.test.d.ts +0 -1
package/dist/y.js CHANGED
@@ -1,31 +1,33 @@
1
- import { En as e, Ot as t, Wn as n } from "./blocks-COYcDVg7.js";
2
- import { a as r, n as i, t as a } from "./BlockNoteExtension-TsTGtIeX.js";
3
- import { S as o, _ as s, b as c, x as l, y as u } from "./src-BmLsLZfE.js";
4
- import { B as d, i as f } from "./extensions-BbM81hHa.js";
5
- import { n as p, t as m } from "./UserStore-OZJP3K8T.js";
6
- import { t as h } from "./ThreadStore-et9wB5Xt.js";
7
- import { Plugin as g, PluginKey as _ } from "prosemirror-state";
8
- import { Mark as v, getMarkRange as y, posToDOMRect as ee } from "@tiptap/core";
1
+ import { Y as e, m as t } from "./getDefaultSlashMenuItems-DfDOr807.js";
2
+ import { It as n } from "./blocks-BUX9dXi9.js";
3
+ import { t as r } from "./markGroups-BszXCkX8.js";
4
+ import { S as i, _ as a, b as o, x as s, y as c } from "./src-DksfoQmN.js";
5
+ import { B as l, O as u, i as d } from "./extensions-CEgexSyF.js";
6
+ import { n as f, t as p } from "./BlockNoteExtension-U58cXw1g.js";
7
+ import { n as m, t as h } from "./UserStore-BFv6NXA-.js";
8
+ import { t as g } from "./ThreadStore-CSEwCO0O.js";
9
+ import { Plugin as _, PluginKey as v } from "prosemirror-state";
10
+ import { Mark as y, getMarkRange as ee, posToDOMRect as te } from "@tiptap/core";
9
11
  import { uuidv4 as b } from "lib0/random";
10
- import { acceptAllChanges as te, acceptChanges as ne, configureYProsemirror as x, defaultSelectionBuilder as re, defaultTransformer as ie, deltaToPSteps as ae, docToDelta as oe, nodeToDelta as se, pauseSync as ce, pmnodeToDelta as le, rejectAllChanges as ue, rejectChanges as de, relativePositionStore as fe, syncPlugin as pe, yCursorPlugin as me, ySyncPluginKey as S, yattr2markname as he, ynodeToPmnode as ge } from "@y/prosemirror";
11
- import * as C from "@y/y";
12
- import * as w from "lib0/delta";
13
- import * as T from "lib0/delta/transformer";
14
- import { decodeAny as E, encodeAny as _e } from "lib0/buffer";
15
- //#region src/y/extensions/YAttributionMarks.ts
12
+ import { acceptAllChanges as ne, acceptChanges as re, configureYProsemirror as x, defaultSelectionBuilder as ie, defaultTransformer as ae, deltaToPSteps as oe, docToDelta as se, nodeToDelta as ce, pauseSync as le, pmnodeToDelta as ue, rejectAllChanges as de, rejectChanges as fe, relativePositionStore as pe, syncPlugin as me, yCursorPlugin as he, ySyncPluginKey as ge, yattr2markname as _e, ynodeToPmnode as ve } from "@y/prosemirror";
13
+ import * as S from "@y/y";
14
+ import * as C from "lib0/delta";
15
+ import * as w from "lib0/delta/transformer";
16
+ import { decodeAny as T, encodeAny as E } from "lib0/buffer";
17
+ // src/y/extensions/YAttributionMarks.ts
16
18
  var D = (e, t) => e === void 0 ? void 0 : typeof e == "string" ? e : e[t];
17
19
  function O(e) {
18
20
  return e.attrs.changes ?? {};
19
21
  }
20
- function ve(e) {
22
+ function ye(e) {
21
23
  let t = e.attrs.format ?? {};
22
- return Object.fromEntries(Object.entries(t).filter(([t]) => !(e.type.schema.marks[he(t)]?.spec.group ?? "").split(" ").includes(r)));
24
+ return Object.fromEntries(Object.entries(t).filter(([t]) => !(e.type.schema.marks[_e(t)]?.spec.group ?? "").split(" ").includes(r)));
23
25
  }
24
26
  function k(e) {
25
27
  return e.type.name === "y-attributed-attrs" ? [...new Set(Object.values(O(e)).flatMap((e) => e.userIds))] : e.attrs.userIds ?? [];
26
28
  }
27
29
  var A = (e, t) => ({ mark: n, inline: r }) => {
28
- let i = t?.editor, a = O(n), { id: o, ...s } = a, d = r ? a : s, f = e === "modification" ? ve(n) : void 0;
30
+ let i = t?.editor, a = O(n), { id: l, ...u } = a, d = r ? a : u, f = e === "modification" ? ye(n) : void 0;
29
31
  if (e === "attrs" && Object.keys(d).length === 0 || f && Object.keys(f).length === 0) {
30
32
  let e = document.createElement(r ? "span" : "div");
31
33
  return e.style.display = "contents", {
@@ -41,10 +43,10 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
41
43
  let g = D(t?.getAttributionMarkClassName?.({
42
44
  contentType: r ? "inline-content" : "block",
43
45
  modificationType: e === "modification" ? "format" : e
44
- }), "content"), _ = p[0], v = _ ? u(_) : c[0];
46
+ }), "content"), _ = p[0], v = _ ? c(_) : o[0];
45
47
  if (g) h.style.cssText = "display: contents";
46
48
  else {
47
- let e = _ ? `var(${l(_).light}, ${v.light})` : v.light, t = _ ? `var(${l(_).dark}, ${v.dark})` : v.dark;
49
+ let e = _ ? `var(${s(_).light}, ${v.light})` : v.light, t = _ ? `var(${s(_).dark}, ${v.dark})` : v.dark;
48
50
  h.style.cssText = `display: contents; --user-color-light: ${e}; --user-color-dark: ${t}`;
49
51
  }
50
52
  let y = document.createElement("span");
@@ -57,7 +59,7 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
57
59
  dom: h,
58
60
  contentDOM: y
59
61
  };
60
- }, ye = v.create({
62
+ }, be = y.create({
61
63
  name: "y-attributed-insert",
62
64
  inclusive: !1,
63
65
  group: `${n} ${r}`,
@@ -70,7 +72,7 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
70
72
  extendMarkSchema(e) {
71
73
  return e.name === this.name ? { blocknoteIgnore: !0 } : {};
72
74
  }
73
- }), be = v.create({
75
+ }), xe = y.create({
74
76
  name: "y-attributed-delete",
75
77
  inclusive: !1,
76
78
  group: `${n} ${r}`,
@@ -86,7 +88,7 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
86
88
  extendMarkSchema(e) {
87
89
  return e.name === this.name ? { blocknoteIgnore: !0 } : {};
88
90
  }
89
- }), xe = v.create({
91
+ }), Se = y.create({
90
92
  name: "y-attributed-format",
91
93
  inclusive: !1,
92
94
  group: `${n} ${r}`,
@@ -102,7 +104,7 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
102
104
  extendMarkSchema(e) {
103
105
  return e.name === this.name ? { blocknoteIgnore: !0 } : {};
104
106
  }
105
- }), Se = v.create({
107
+ }), Ce = y.create({
106
108
  name: "y-attributed-attrs",
107
109
  priority: 110,
108
110
  inclusive: !1,
@@ -116,20 +118,20 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
116
118
  extendMarkSchema(e) {
117
119
  return e.name === this.name ? { blocknoteIgnore: !0 } : {};
118
120
  }
119
- }), Ce = a(({ options: e }) => ({
121
+ }), we = p(({ options: e }) => ({
120
122
  key: "yAttributionMarks",
121
123
  tiptapExtensions: [
122
- ye.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName }),
123
124
  be.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName }),
124
- Se.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName }),
125
- xe.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName })
125
+ xe.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName }),
126
+ Ce.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName }),
127
+ Se.configure({ getAttributionMarkClassName: e?.getAttributionMarkClassName })
126
128
  ]
127
- })), we = {
129
+ })), Te = {
128
130
  "y-attributed-insert": "insert",
129
131
  "y-attributed-delete": "delete",
130
132
  "y-attributed-format": "format",
131
133
  "y-attributed-attrs": "attrs"
132
- }, Te = new _("attributionLoadUsers"), j = "[data-user-ids]", M = (e) => {
134
+ }, Ee = new v("attributionLoadUsers"), j = "[data-user-ids]", M = (e) => {
133
135
  if (!e) return [];
134
136
  let t;
135
137
  try {
@@ -147,30 +149,30 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
147
149
  return [];
148
150
  }
149
151
  return typeof t != "object" || !t ? [] : Object.keys(t);
150
- }, P = a(({ editor: e, options: t }) => {
151
- let n = p(t?.resolveUsers), r = t?.getAttributionMarkClassName, a = i(void 0), c = (e) => {
152
- let t = d(e), r = /* @__PURE__ */ new Set();
152
+ }, P = p(({ editor: e, options: t }) => {
153
+ let n = m(t?.resolveUsers), r = t?.getAttributionMarkClassName, o = f(void 0), c = (e) => {
154
+ let t = l(e), r = /* @__PURE__ */ new Set();
153
155
  t && e.doc.nodesBetween(t.from, t.to, (e) => {
154
- for (let t of e.marks) we[t.type.name] && k(t)?.forEach((e) => r.add(e));
156
+ for (let t of e.marks) Te[t.type.name] && k(t)?.forEach((e) => r.add(e));
155
157
  return !0;
156
158
  }), r.size > 0 && n.loadUsers(Array.from(r));
157
159
  };
158
160
  return {
159
161
  key: "attribution",
160
162
  userStore: n,
161
- store: a,
162
- prosemirrorPlugins: [new g({
163
- key: Te,
163
+ store: o,
164
+ prosemirrorPlugins: [new _({
165
+ key: Ee,
164
166
  state: {
165
167
  init: () => null,
166
168
  apply: (e) => (e.docChanged && c(e), null)
167
169
  }
168
170
  })],
169
- mount({ dom: t, root: i, signal: c }) {
171
+ mount({ dom: t, root: c, signal: l }) {
170
172
  let u = () => {
171
173
  for (let [e, r] of n.store.state) {
172
- let { light: n, dark: i } = l(e), a = o(r);
173
- a ? (t.style.setProperty(n, a.light), t.style.setProperty(i, a.dark)) : (t.style.removeProperty(n), t.style.removeProperty(i));
174
+ let { light: n, dark: a } = s(e), o = i(r);
175
+ o ? (t.style.setProperty(n, o.light), t.style.setProperty(a, o.dark)) : (t.style.removeProperty(n), t.style.removeProperty(a));
174
176
  }
175
177
  }, d, f = (e) => M(e).map((e) => n.getUser(e)?.username ?? e).filter((e) => e !== ""), p = (e) => {
176
178
  let t = M(e.dataset.userIds), n = N(e.dataset.format);
@@ -182,21 +184,21 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
182
184
  } : {
183
185
  modificationType: "attrs",
184
186
  attributes: N(e.dataset.attributes)
185
- }, { modificationType: a } = i, o = t ? { modificationType: "change" } : i, c = e.dataset.inline === "false" ? "block" : "inline-content";
187
+ }, { modificationType: o } = i, s = t ? { modificationType: "change" } : i, c = e.dataset.inline === "false" ? "block" : "inline-content";
186
188
  return {
187
189
  anchor: e,
188
- color: s(n, M(e.dataset.userIds)).dark,
189
- ...o,
190
+ color: a(n, M(e.dataset.userIds)).dark,
191
+ ...s,
190
192
  contentType: c,
191
193
  users: f(e.dataset.userIds),
192
194
  className: D(r?.({
193
195
  contentType: c,
194
- modificationType: a
196
+ modificationType: o
195
197
  }), "tooltip"),
196
198
  ...t ? { reference: t } : {}
197
199
  };
198
200
  }, h = () => {
199
- d && (d = void 0, a.setState(void 0));
201
+ d && (d = void 0, o.setState(void 0));
200
202
  }, g = (n) => {
201
203
  if (!t.contains(n)) return;
202
204
  let r = e.prosemirrorView, i = r.state.doc.resolve(r.posAtDOM(n, 0));
@@ -213,8 +215,8 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
213
215
  preview: a
214
216
  } : void 0;
215
217
  };
216
- i.addEventListener("mouseover", (e) => {
217
- let r = e.target instanceof Element ? e.target : null, i = r && t.contains(r) ? r.closest(j) ?? void 0 : void 0, o = r && !i ? g(r) : void 0, s = i ?? o?.mark;
218
+ c.addEventListener("mouseover", (e) => {
219
+ let r = e.target instanceof Element ? e.target : null, i = r && t.contains(r) ? r.closest(j) ?? void 0 : void 0, a = r && !i ? g(r) : void 0, s = i ?? a?.mark;
218
220
  if (!s) {
219
221
  h();
220
222
  return;
@@ -225,22 +227,21 @@ var A = (e, t) => ({ mark: n, inline: r }) => {
225
227
  if (!e || p(e) !== c) break;
226
228
  l = e, u = e.parentElement;
227
229
  }
228
- if (d === l && a.state?.reference === o?.preview) return;
229
- d = l, a.setState(m(l, o?.preview));
230
+ if (d === l && o.state?.reference === a?.preview) return;
231
+ d = l, o.setState(m(l, a?.preview));
230
232
  let f = M(l.dataset.userIds);
231
233
  f.length > 0 && n.loadUsers(f).then(() => {
232
- d === l && a.state?.reference === o?.preview && a.setState(m(l, o?.preview));
234
+ d === l && o.state?.reference === a?.preview && o.setState(m(l, a?.preview));
233
235
  });
234
- }, { signal: c }), c.addEventListener("abort", h), u();
236
+ }, { signal: l }), l.addEventListener("abort", h), u();
235
237
  let _ = n.store.subscribe(u);
236
- c.addEventListener("abort", _);
238
+ l.addEventListener("abort", _);
237
239
  },
238
- blockNoteExtensions: [Ce({ getAttributionMarkClassName: t?.getAttributionMarkClassName })]
240
+ blockNoteExtensions: [we({ getAttributionMarkClassName: t?.getAttributionMarkClassName })]
239
241
  };
240
242
  });
241
- //#endregion
242
- //#region src/y/extensions/YCursorPlugin.ts
243
- function Ee(e) {
243
+ // src/y/extensions/YCursorPlugin.ts
244
+ function De(e) {
244
245
  let t = e.charAt(0) === "#" ? e.substring(1, 7) : e, n = parseInt(t.substring(0, 2), 16), r = parseInt(t.substring(2, 4), 16), i = parseInt(t.substring(4, 6), 16), a = [
245
246
  n / 255,
246
247
  r / 255,
@@ -248,15 +249,15 @@ function Ee(e) {
248
249
  ].map((e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4);
249
250
  return .2126 * a[0] + .7152 * a[1] + .0722 * a[2] <= .179;
250
251
  }
251
- function De(e) {
252
+ function Oe(e) {
252
253
  let t = document.createElement("span");
253
254
  t.classList.add("bn-collaboration-cursor__base");
254
255
  let n = document.createElement("span");
255
- n.setAttribute("contentedEditable", "false"), n.classList.add("bn-collaboration-cursor__caret"), n.setAttribute("style", `background-color: ${e.color}; color: ${Ee(e.color) ? "white" : "black"}`);
256
+ n.setAttribute("contentedEditable", "false"), n.classList.add("bn-collaboration-cursor__caret"), n.setAttribute("style", `background-color: ${e.color}; color: ${De(e.color) ? "white" : "black"}`);
256
257
  let r = document.createElement("span");
257
- return r.classList.add("bn-collaboration-cursor__label"), r.setAttribute("style", `background-color: ${e.color}; color: ${Ee(e.color) ? "white" : "black"}`), r.insertBefore(document.createTextNode(e.name), null), n.insertBefore(r, null), t.insertBefore(document.createTextNode("⁠"), null), t.insertBefore(n, null), t.insertBefore(document.createTextNode("⁠"), null), t;
258
+ return r.classList.add("bn-collaboration-cursor__label"), r.setAttribute("style", `background-color: ${e.color}; color: ${De(e.color) ? "white" : "black"}`), r.insertBefore(document.createTextNode(e.name), null), n.insertBefore(r, null), t.insertBefore(document.createTextNode("⁠"), null), t.insertBefore(n, null), t.insertBefore(document.createTextNode("⁠"), null), t;
258
259
  }
259
- var F = a(({ options: e }) => {
260
+ var F = p(({ options: e }) => {
260
261
  let t = /* @__PURE__ */ new Map(), n = e.provider && "awareness" in e.provider && typeof e.provider.awareness == "object" ? e.provider.awareness : void 0;
261
262
  return n && ("setLocalStateField" in n && typeof n.setLocalStateField == "function" && n.setLocalStateField("user", e.user), "on" in n && typeof n.on == "function" && e.showCursorLabels !== "always" && n.on("change", ({ updated: e }) => {
262
263
  for (let n of e) {
@@ -272,12 +273,12 @@ var F = a(({ options: e }) => {
272
273
  }
273
274
  })), {
274
275
  key: "yCursor",
275
- prosemirrorPlugins: [n ? me(n, {
276
- selectionBuilder: re,
276
+ prosemirrorPlugins: [n ? he(n, {
277
+ selectionBuilder: ie,
277
278
  cursorBuilder(n, r) {
278
279
  let i = t.get(r);
279
280
  if (!i) {
280
- let a = (e.renderCursor ?? De)(n);
281
+ let a = (e.renderCursor ?? Oe)(n);
281
282
  e.showCursorLabels !== "always" && (a.addEventListener("mouseenter", () => {
282
283
  let e = t.get(r);
283
284
  e.element.setAttribute("data-active", ""), e.hideTimeout && (clearTimeout(e.hideTimeout), t.set(r, {
@@ -312,15 +313,15 @@ var F = a(({ options: e }) => {
312
313
  if (e) return e.user;
313
314
  }
314
315
  };
315
- }), Oe = (e) => {
316
- for (let t of e.children) if (w.$insertOp.check(t)) {
317
- for (let e of t.insert) if (w.$deltaAny.check(e)) return e;
316
+ }), ke = (e) => {
317
+ for (let t of e.children) if (C.$insertOp.check(t)) {
318
+ for (let e of t.insert) if (C.$deltaAny.check(e)) return e;
318
319
  }
319
320
  return null;
320
321
  }, I = (e, t) => {
321
322
  if (e.name !== t.name) return !1;
322
323
  if (e.name !== "blockContainer") return !0;
323
- let n = Oe(e), r = Oe(t);
324
+ let n = ke(e), r = ke(t);
324
325
  return n?.name === r?.name;
325
326
  }, L = {
326
327
  groupName: "blockGroup",
@@ -331,29 +332,29 @@ var F = a(({ options: e }) => {
331
332
  "columnList"
332
333
  ],
333
334
  implicitGroups: !0
334
- }, ke = { group: !1 };
335
- function R(e) {
335
+ }, R = { group: !1 };
336
+ function z(e) {
336
337
  return {
337
338
  group: !0,
338
339
  len: e
339
340
  };
340
341
  }
341
342
  function Ae(e, t) {
342
- return w.$deltaAny.check(e) && e.name === t;
343
+ return C.$deltaAny.check(e) && e.name === t;
343
344
  }
344
345
  function je(e) {
345
346
  let t = 0;
346
- for (let n of e.children) w.$insertOp.check(n) || w.$textOp.check(n) ? t += n.insert.length : w.$deleteOp.check(n) && (t -= n.delete);
347
+ for (let n of e.children) C.$insertOp.check(n) || C.$textOp.check(n) ? t += n.insert.length : C.$deleteOp.check(n) && (t -= n.delete);
347
348
  return t;
348
349
  }
349
- function z(e) {
350
+ function B(e) {
350
351
  let t = 0;
351
352
  for (let n of e) n.group && (t += n.len);
352
353
  return t;
353
354
  }
354
355
  function Me(e) {
355
356
  let t = [];
356
- for (let n = 0; n < e; n++) t.push(ke);
357
+ for (let n = 0; n < e; n++) t.push(R);
357
358
  return t;
358
359
  }
359
360
  var Ne = class {
@@ -416,7 +417,7 @@ var Ne = class {
416
417
  if (n === e.length) break;
417
418
  if (this.ops.get(n)?.kind === "delete") continue;
418
419
  let i = e[n], a = this.lenAdjust.get(n);
419
- t.push(a === void 0 || !i.group ? i : R(i.len + a));
420
+ t.push(a === void 0 || !i.group ? i : z(i.len + a));
420
421
  }
421
422
  return t;
422
423
  }
@@ -434,10 +435,10 @@ function Fe(e, t) {
434
435
  }
435
436
  return e.length;
436
437
  }
437
- function B(e) {
438
+ function V(e) {
438
439
  return (t) => typeof t == "number" ? e(t) : t;
439
440
  }
440
- var Ie = class extends T.Transformer {
441
+ var Ie = class extends w.Transformer {
441
442
  groupName;
442
443
  implicitGroups;
443
444
  segs = [];
@@ -447,9 +448,9 @@ var Ie = class extends T.Transformer {
447
448
  }
448
449
  applyA(e) {
449
450
  this.fresh = !1;
450
- let t = this.segs, n = this.groupName, r = z(t), i = 0;
451
+ let t = this.segs, n = this.groupName, r = B(t), i = 0;
451
452
  for (let e of t) e.group || i++;
452
- let a = [], o = new Ne(), s = w.create(), c = 0, l = 0, u = !1, d = 0, f = 0, p = 0, m = () => {
453
+ let a = [], o = new Ne(), s = C.create(), c = 0, l = 0, u = !1, d = 0, f = 0, p = 0, m = () => {
453
454
  if (p > c) {
454
455
  let e = p - c;
455
456
  s.retain(e), c = p, l += e;
@@ -458,21 +459,21 @@ var Ie = class extends T.Transformer {
458
459
  let e = t[d++];
459
460
  e.group ? p += e.len : f++;
460
461
  };
461
- for (let r of e.children) if (w.$retainOp.check(r)) {
462
+ for (let r of e.children) if (C.$retainOp.check(r)) {
462
463
  let e = r.format, n = r.attribution;
463
464
  for (let i = r.retain; i > 0 && d < t.length; i--) {
464
465
  let r = t[d];
465
- !r.group && (e !== void 0 || n !== void 0) && o.retainAt(f, e, n), a.push(r), h();
466
+ r.group || e === void 0 && n === void 0 || o.retainAt(f, e, n), a.push(r), h();
466
467
  }
467
- } else if (w.$textOp.check(r)) o.insertAt(f, r.insert, r.format, r.attribution, []), a.push(...Me(r.insert.length));
468
- else if (w.$insertOp.check(r)) for (let e of r.insert) if (Ae(e, n)) {
468
+ } else if (C.$textOp.check(r)) o.insertAt(f, r.insert, r.format, r.attribution, []), a.push(...Me(r.insert.length));
469
+ else if (C.$insertOp.check(r)) for (let e of r.insert) if (Ae(e, n)) {
469
470
  m();
470
471
  let t = l;
471
472
  s.append(e), l += e.childCnt;
472
473
  let n = e.marks !== null || e.deleteMarks !== null;
473
- n && w.mergeRootMarks(s, e, B((e) => t + e)), u ||= e.childCnt > 0 || n, a.push(R(e.childCnt));
474
- } else o.insertAt(f, [e], r.format, r.attribution, []), a.push(ke);
475
- else if (w.$deleteOp.check(r)) for (let e = r.delete; e > 0 && d < t.length; e--) {
474
+ n && C.mergeRootMarks(s, e, V((e) => t + e)), u ||= e.childCnt > 0 || n, a.push(z(e.childCnt));
475
+ } else o.insertAt(f, [e], r.format, r.attribution, []), a.push(R);
476
+ else if (C.$deleteOp.check(r)) for (let e = r.delete; e > 0 && d < t.length; e--) {
476
477
  let e = t[d];
477
478
  e.group ? e.len > 0 && (m(), s.delete(e.len), c += e.len, u = !0) : o.deleteAt(f), h();
478
479
  }
@@ -482,21 +483,21 @@ var Ie = class extends T.Transformer {
482
483
  if (e.group) {
483
484
  m();
484
485
  let t = l;
485
- for (let e of n.children) w.$retainOp.check(e) ? (s.retain(e.retain, e.format, e.attribution), c += e.retain, l += e.retain, u ||= e.format !== void 0 || e.attribution !== void 0) : w.$deleteOp.check(e) ? (s.delete(e.delete), c += e.delete, u = !0) : w.$modifyOp.check(e) ? (s.modify(w.clone(e.value), e.format, e.attribution), c += 1, l += 1, u = !0) : (w.$insertOp.check(e) || w.$textOp.check(e)) && (s.insert(e.insert, e.format, e.attribution), l += e.insert.length, u = !0);
486
- (n.marks !== null || n.deleteMarks !== null) && (w.mergeRootMarks(s, n, B((e) => t + e)), u = !0), a.push(R(e.len + je(n)));
487
- } else o.modifyAt(f, w.clone(n), r.format, r.attribution), a.push(e);
486
+ for (let e of n.children) C.$retainOp.check(e) ? (s.retain(e.retain, e.format, e.attribution), c += e.retain, l += e.retain, u ||= e.format !== void 0 || e.attribution !== void 0) : C.$deleteOp.check(e) ? (s.delete(e.delete), c += e.delete, u = !0) : C.$modifyOp.check(e) ? (s.modify(C.clone(e.value), e.format, e.attribution), c += 1, l += 1, u = !0) : (C.$insertOp.check(e) || C.$textOp.check(e)) && (s.insert(e.insert, e.format, e.attribution), l += e.insert.length, u = !0);
487
+ (n.marks !== null || n.deleteMarks !== null) && (C.mergeRootMarks(s, n, V((e) => t + e)), u = !0), a.push(z(e.len + je(n)));
488
+ } else o.modifyAt(f, C.clone(n), r.format, r.attribution), a.push(e);
488
489
  h();
489
490
  }
490
491
  for (; d < t.length;) a.push(t[d++]);
491
- let g = z(a), _ = w.cloneShallow(e);
492
+ let g = B(a), _ = C.cloneShallow(e);
492
493
  if (o.emit(_, i), r === 0) {
493
494
  if (g > 0) {
494
- let e = w.create(n);
495
- for (let t of s.children) (w.$insertOp.check(t) || w.$textOp.check(t)) && e.insert(t.insert, t.format, t.attribution);
496
- w.mergeRootMarks(e, s), _.insert([e.done(!1)]);
495
+ let e = C.create(n);
496
+ for (let t of s.children) (C.$insertOp.check(t) || C.$textOp.check(t)) && e.insert(t.insert, t.format, t.attribution);
497
+ C.mergeRootMarks(e, s), _.insert([e.done(!1)]);
497
498
  }
498
499
  } else g === 0 ? _.delete(1) : u && _.modify(s.done(!1));
499
- return w.remapRootMarks(_, B((e) => Pe(a, e, g))), this.segs = a, _.done(!1), T.createTransformResult(null, _);
500
+ return C.remapRootMarks(_, V((e) => Pe(a, e, g))), this.segs = a, _.done(!1), w.createTransformResult(null, _);
500
501
  }
501
502
  applyB(e) {
502
503
  let t = this.fresh;
@@ -512,10 +513,10 @@ var Ie = class extends T.Transformer {
512
513
  }), e += t.len) : i.push(n);
513
514
  });
514
515
  }
515
- let o = i.length, s = z(n), c = s > 0, l = new Ne(), u = /* @__PURE__ */ new Map(), d = (e) => {
516
+ let o = i.length, s = B(n), c = s > 0, l = new Ne(), u = /* @__PURE__ */ new Map(), d = (e) => {
516
517
  let t = u.get(e);
517
518
  return t === void 0 && (t = {
518
- b: w.create(),
519
+ b: C.create(),
519
520
  emitted: 0,
520
521
  out: 0,
521
522
  net: 0,
@@ -529,18 +530,18 @@ var Ie = class extends T.Transformer {
529
530
  }, p = (e) => e < o ? i[e] : n.length, m = !1, h = (e, t, r, i) => {
530
531
  let o = a.findIndex((e) => t <= e.start + e.len);
531
532
  if (o === -1) {
532
- l.insertAt(n.length, [e], r, i, [R(e.childCnt)]), m = !0;
533
+ l.insertAt(n.length, [e], r, i, [z(e.childCnt)]), m = !0;
533
534
  return;
534
535
  }
535
536
  let s = d(o);
536
537
  f(s, t - a[o].start);
537
538
  let c = s.out;
538
- s.b.append(e), s.out += e.childCnt, s.net += e.childCnt, s.touched = !0, (e.marks !== null || e.deleteMarks !== null) && w.mergeRootMarks(s.b, e, B((e) => c + e));
539
+ s.b.append(e), s.out += e.childCnt, s.net += e.childCnt, s.touched = !0, (e.marks !== null || e.deleteMarks !== null) && C.mergeRootMarks(s.b, e, V((e) => c + e));
539
540
  }, g = (e) => {
540
541
  let t = 0, n = 0, r = () => {
541
542
  for (; t < a.length && n >= a[t].len;) t++, n = 0;
542
543
  };
543
- for (let i of e.children) if (w.$retainOp.check(i)) {
544
+ for (let i of e.children) if (C.$retainOp.check(i)) {
544
545
  let e = i.format, o = i.attribution, s = i.retain;
545
546
  for (; s > 0 && (r(), !(t >= a.length));) {
546
547
  let r = Math.min(a[t].len - n, s);
@@ -550,17 +551,17 @@ var Ie = class extends T.Transformer {
550
551
  }
551
552
  n += r, s -= r;
552
553
  }
553
- } else if (w.$deleteOp.check(i)) {
554
+ } else if (C.$deleteOp.check(i)) {
554
555
  let e = i.delete;
555
556
  for (; e > 0 && (r(), !(t >= a.length));) {
556
557
  let r = Math.min(a[t].len - n, e), i = d(t);
557
558
  f(i, n), i.b.delete(r), i.emitted += r, i.net -= r, i.touched = !0, n += r, e -= r;
558
559
  }
559
- } else if (w.$modifyOp.check(i)) {
560
+ } else if (C.$modifyOp.check(i)) {
560
561
  if (r(), t >= a.length) continue;
561
562
  let e = d(t);
562
- f(e, n), e.b.modify(w.clone(i.value), i.format, i.attribution), e.emitted += 1, e.out += 1, e.touched = !0, n += 1;
563
- } else if (w.$insertOp.check(i) || w.$textOp.check(i)) {
563
+ f(e, n), e.b.modify(C.clone(i.value), i.format, i.attribution), e.emitted += 1, e.out += 1, e.touched = !0, n += 1;
564
+ } else if (C.$insertOp.check(i) || C.$textOp.check(i)) {
564
565
  t >= a.length && (t = a.length - 1, n = a[t].len);
565
566
  let e = d(t);
566
567
  f(e, n), e.b.insert(i.insert, i.format, i.attribution), e.out += i.insert.length, e.net += i.insert.length, e.touched = !0;
@@ -578,22 +579,22 @@ var Ie = class extends T.Transformer {
578
579
  let e = t.key, r = n.findIndex((t) => e <= t.start + t.len);
579
580
  r === -1 && (r = a.length - 1);
580
581
  let i = d(r);
581
- w.addRootMark(i.b, t.copy(e - n[r].start)), i.touched = !0;
582
+ C.addRootMark(i.b, t.copy(e - n[r].start)), i.touched = !0;
582
583
  }
583
584
  }
584
585
  if (e.deleteMarks !== null && a.length > 0) {
585
586
  let t = d(0);
586
- for (let n of e.deleteMarks) w.deleteRootMark(t.b, n);
587
+ for (let n of e.deleteMarks) C.deleteRootMark(t.b, n);
587
588
  t.touched = !0;
588
589
  }
589
590
  }, _ = 0;
590
- for (let t of e.children) if (w.$retainOp.check(t)) {
591
+ for (let t of e.children) if (C.$retainOp.check(t)) {
591
592
  let e = t.format, n = t.attribution;
592
593
  for (let r = t.retain; r > 0; r--, _++) if (_ < o) (e !== void 0 || n !== void 0) && l.retainAt(i[_], e, n);
593
594
  else if (!(_ === o && c)) break;
594
- } else if (w.$textOp.check(t)) l.insertAt(p(_), t.insert, t.format, t.attribution, Me(t.insert.length));
595
- else if (w.$insertOp.check(t)) for (let e of t.insert) Ae(e, r) ? h(e, c && _ > o ? s : 0, t.format, t.attribution) : l.insertAt(p(_), [e], t.format, t.attribution, [ke]);
596
- else if (w.$deleteOp.check(t)) for (let e = t.delete; e > 0; e--, _++) if (_ < o) l.deleteAt(i[_]);
595
+ } else if (C.$textOp.check(t)) l.insertAt(p(_), t.insert, t.format, t.attribution, Me(t.insert.length));
596
+ else if (C.$insertOp.check(t)) for (let e of t.insert) Ae(e, r) ? h(e, c && _ > o ? s : 0, t.format, t.attribution) : l.insertAt(p(_), [e], t.format, t.attribution, [R]);
597
+ else if (C.$deleteOp.check(t)) for (let e = t.delete; e > 0; e--, _++) if (_ < o) l.deleteAt(i[_]);
597
598
  else if (_ === o && c) a.forEach((e, t) => {
598
599
  if (e.len > 0) {
599
600
  let n = d(t);
@@ -601,19 +602,19 @@ var Ie = class extends T.Transformer {
601
602
  }
602
603
  });
603
604
  else break;
604
- else _ < o ? l.modifyAt(i[_], w.clone(t.value), t.format, t.attribution) : _ === o && c && g(t.value), _++;
605
+ else _ < o ? l.modifyAt(i[_], C.clone(t.value), t.format, t.attribution) : _ === o && c && g(t.value), _++;
605
606
  for (let [e, t] of u) t.touched && l.modifyAt(a[e].ai, t.b.done(!1), void 0, void 0), t.net !== 0 && l.adjustLen(a[e].ai, t.net);
606
- this.implicitGroups && t && a.length === 0 && !m && l.insertAt(n.length, [w.create(r).done(!1)], void 0, void 0, [R(0)]);
607
- let v = w.cloneShallow(e);
607
+ this.implicitGroups && t && a.length === 0 && !m && l.insertAt(n.length, [C.create(r).done(!1)], void 0, void 0, [z(0)]);
608
+ let v = C.cloneShallow(e);
608
609
  l.emit(v, n.length);
609
610
  let y = l.rebuildSegs(n);
610
- return w.remapRootMarks(v, B((e) => Fe(y, e))), this.segs = y, v.done(!1), T.createTransformResult(v, null);
611
+ return C.remapRootMarks(v, V((e) => Fe(y, e))), this.segs = y, v.done(!1), w.createTransformResult(v, null);
611
612
  }
612
- }, Le = class extends T.Template {
613
+ }, Le = class extends w.Template {
613
614
  groupName;
614
615
  implicitGroups;
615
616
  constructor(e, t, n) {
616
- super(e, w.$deltaAny), this.groupName = t, this.implicitGroups = n;
617
+ super(e, C.$deltaAny), this.groupName = t, this.implicitGroups = n;
617
618
  }
618
619
  get name() {
619
620
  return `blocknote:persistentGroup:${this.groupName}`;
@@ -622,63 +623,65 @@ var Ie = class extends T.Transformer {
622
623
  return new Ie(this.$in, this.$out, this.groupName, this.implicitGroups);
623
624
  }
624
625
  };
625
- function V(e, t = {}) {
626
+ function H(e, t = {}) {
626
627
  let n = t.groupName ?? L.groupName, r = t.containerName ?? L.containerName, i = t.implicitGroups ?? L.implicitGroups, a = new Set(t.nestingNodes ?? L.nestingNodes);
627
628
  function o(e) {
628
- return T.children(e, (e, t) => e.name === r ? s(t) : e.name !== null && a.has(e.name) ? o(t) : null);
629
+ return w.children(e, (e, t) => e.name === r ? s(t) : e.name !== null && a.has(e.name) ? o(t) : null);
629
630
  }
630
631
  function s(e) {
631
- return T.pipe(e, (e) => o(e), (e) => new Le(e, n, i));
632
+ return w.pipe(e, (e) => o(e), (e) => new Le(e, n, i));
632
633
  }
633
634
  return o(e);
634
635
  }
635
- //#endregion
636
- //#region src/y/extensions/YSync.ts
636
+ // src/y/extensions/YSync.ts
637
637
  function Re(t) {
638
638
  let n = e(t), r = n.length === 1 ? n[0] : void 0;
639
639
  if (!r || r.type !== "paragraph" || r.children.length !== 0) return !1;
640
640
  let { content: i } = r;
641
641
  return i === void 0 || (typeof i == "string" || Array.isArray(i)) && i.length === 0;
642
642
  }
643
- var H = (e, t) => {
643
+ var U = (e, t) => {
644
644
  let n = { ...e };
645
645
  return t.insert && (n["y-attributed-insert"] = { userIds: t.insert }), t.delete && (n["y-attributed-delete"] = { userIds: t.delete }), t.format && (n["y-attributed-format"] = {
646
646
  userIds: [...new Set(Object.values(t.format).flat())],
647
647
  format: t.format
648
648
  }), n;
649
- }, ze = a(({ options: e, editor: t }) => ({
650
- key: "ySync",
651
- fragment: e.fragment,
652
- mount: ({ signal: n }) => {
653
- if (S.getState(t.prosemirrorState)?.ytype || t.getExtension(J)?.store.state.isForked) return;
654
- let r = () => {
655
- n.aborted || t.getExtension(J)?.store.state.isForked || t.exec(x({ ytype: e.fragment }));
656
- };
657
- if (e.provider && "synced" in e.provider && typeof e.provider.synced == "boolean") {
658
- if (e.provider.synced) r();
659
- else if ("on" in e.provider && typeof e.provider.on == "function") {
660
- let t = e.provider, n = (e) => {
661
- e && r();
662
- };
663
- return e.provider.on("synced", n), () => {
664
- "off" in t && typeof t.off == "function" && t.off("synced", n);
665
- };
666
- } else throw Error("YSyncExtension: provider must have a 'synced' boolean or an 'on' method to listen for 'sync'");
667
- } else r();
668
- },
669
- prosemirrorPlugins: [pe({
670
- suggestionDoc: e.suggestionDoc,
671
- mapAttributionToMark: H,
672
- customCompare: I,
673
- transformers: [V],
674
- isInitialContent: Re
675
- })],
676
- runsBefore: ["default"]
677
- })), U = ie({
678
- mapAttributionToMark: H,
679
- transformers: [V]
649
+ }, ze = p(({ options: e, editor: t }) => {
650
+ let n = !1;
651
+ return {
652
+ key: "ySync",
653
+ fragment: e.fragment,
654
+ mount({ signal: r }) {
655
+ let { fragment: i, provider: a } = e, o = a && "synced" in a ? a.synced : void 0;
656
+ if (n ||= i.length > 0 || o !== !1, !n && a) {
657
+ if (!("on" in a) || typeof a.on != "function") throw Error("YSync: an unsynced provider must support sync events");
658
+ let e = t.getExtension(u)?.acquire() ?? (() => {});
659
+ function o(t) {
660
+ t !== !0 || n || r.aborted || (n = !0, e());
661
+ }
662
+ function s() {
663
+ o(i.length > 0);
664
+ }
665
+ i.observe(s), a.on("synced", o), r.addEventListener("abort", () => {
666
+ i.unobserve(s), "off" in a && typeof a.off == "function" && a.off("synced", o), e();
667
+ }, { once: !0 }), s(), "synced" in a && a.synced === !0 && o(!0);
668
+ }
669
+ r.aborted || ge.getState(t.prosemirrorState)?.ytype || t.getExtension(q)?.store.state.isForked || t.exec(x({ ytype: e.fragment }));
670
+ },
671
+ prosemirrorPlugins: [me({
672
+ suggestionDoc: e.suggestionDoc,
673
+ mapAttributionToMark: U,
674
+ customCompare: I,
675
+ transformers: [H],
676
+ isInitialContent: Re
677
+ })],
678
+ runsBefore: ["default"]
679
+ };
680
+ }), W = ae({
681
+ mapAttributionToMark: U,
682
+ transformers: [H]
680
683
  });
681
- function W(e, t) {
684
+ function G(e, t) {
682
685
  let n = e.doc;
683
686
  if (!n) throw Error("type does not have a ydoc");
684
687
  if (e._item === null) {
@@ -687,27 +690,27 @@ function W(e, t) {
687
690
  return t.get(r, e.name);
688
691
  }
689
692
  {
690
- let n = e._item, r = t.store.clients.get(n.id.client) ?? [], i = r[C.findIndexSS(r, n.id.clock)];
693
+ let n = e._item, r = t.store.clients.get(n.id.client) ?? [], i = r[S.findIndexSS(r, n.id.clock)];
691
694
  if (!i) throw Error("type does not exist in other ydoc");
692
695
  let a = i.content;
693
696
  if (!a) throw Error("type does not exist in other ydoc");
694
697
  return a.type;
695
698
  }
696
699
  }
697
- function G(e, t) {
700
+ function Be(e, t) {
698
701
  if (t instanceof Uint8Array) {
699
- let n = new C.Doc({ gc: !1 });
702
+ let n = new S.Doc({ gc: !1 });
700
703
  try {
701
- return C.applyUpdate(n, t), G(e, n);
704
+ return S.applyUpdate(n, t), Be(e, n);
702
705
  } finally {
703
706
  n.destroy();
704
707
  }
705
708
  }
706
- let n = W(e, t), r = C.createIdSet();
707
- for (let e of t.store.clients.values()) for (let t of e) t instanceof C.Item && C.isParentOf(n, t) && r.add(t.id.client, t.id.clock, t.length);
709
+ let n = G(e, t), r = S.createIdSet();
710
+ for (let e of t.store.clients.values()) for (let t of e) t instanceof S.Item && S.isParentOf(n, t) && r.add(t.id.client, t.id.clock, t.length);
708
711
  return r;
709
712
  }
710
- function Be(t, n) {
713
+ function Ve(t, n) {
711
714
  let r = t.pmSchema.nodeFromJSON(n);
712
715
  return e(r);
713
716
  }
@@ -715,51 +718,50 @@ function K(e, n) {
715
718
  let r = n.map((n) => t(n, e.pmSchema));
716
719
  return e.pmSchema.topNodeType.create(null, e.pmSchema.nodes.blockGroup.create(null, r));
717
720
  }
718
- function Ve(e) {
721
+ function He(e) {
719
722
  if (typeof e != "object" || !e) return !1;
720
723
  let t = e;
721
- return t.name === "blockContainer" || He(t.children) || He(t.insert);
724
+ return t.name === "blockContainer" || Ue(t.children) || Ue(t.insert);
722
725
  }
723
- function He(e) {
726
+ function Ue(e) {
724
727
  if (typeof e != "object" || !e || !(Symbol.iterator in e)) return !1;
725
- for (let t of e) if (Ve(t)) return !0;
728
+ for (let t of e) if (He(t)) return !0;
726
729
  return !1;
727
730
  }
728
- function Ue(t, n) {
729
- if (n.length === 0 || !Ve(n.toDeltaDeep())) return [];
730
- let r = ge(n, t.pmSchema, {
731
+ function We(t, n) {
732
+ if (n.length === 0 || !He(n.toDeltaDeep())) return [];
733
+ let r = ve(n, t.pmSchema, {
731
734
  renderer: null,
732
- transformer: U
735
+ transformer: W
733
736
  });
734
737
  return e(r);
735
738
  }
736
- function We(e, t, n) {
737
- return n ||= new C.Doc().get("prosemirror"), t.length === 0 || n.applyDelta(le(K(e, t), { transformer: U })), n;
738
- }
739
- function Ge(e, t, n = "prosemirror") {
740
- return Ue(e, t.get(n));
739
+ function Ge(e, t, n) {
740
+ return n ||= new S.Doc().get("prosemirror"), t.length === 0 || n.applyDelta(ue(K(e, t), { transformer: W })), n;
741
741
  }
742
742
  function Ke(e, t, n = "prosemirror") {
743
- let r = new C.Doc();
743
+ return We(e, t.get(n));
744
+ }
745
+ function qe(e, t, n = "prosemirror") {
746
+ let r = new S.Doc();
744
747
  if (t.length === 0) return r.get(n), r;
745
- let i = le(K(e, t), { transformer: U });
748
+ let i = ue(K(e, t), { transformer: W });
746
749
  return r.get(n).applyDelta(i), r;
747
750
  }
748
- function q(e, t) {
749
- let n = se(e), r = se(t);
750
- return w.diff(n.done(), r.done(), { compare: I });
751
+ function Je(e, t) {
752
+ let n = ce(e), r = ce(t);
753
+ return C.diff(n.done(), r.done(), { compare: I });
751
754
  }
752
- function qe(e, t, n = {}) {
753
- let r = ge(t, e.doc.type.schema, {
754
- transformer: U,
755
+ function Ye(e, t, n = {}) {
756
+ let r = ve(t, e.doc.type.schema, {
757
+ transformer: W,
755
758
  ...n
756
- }), i = q(e.doc, r);
757
- return ae(e, i).setMeta("y-sync-hydration", { delta: i });
759
+ }), i = Je(e.doc, r);
760
+ return oe(e, i).setMeta("y-sync-hydration", { delta: i });
758
761
  }
759
- //#endregion
760
- //#region src/y/extensions/ForkYDoc.ts
761
- var J = a(({ editor: e, options: t }) => {
762
- let n, r = i({ isForked: !1 });
762
+ // src/y/extensions/ForkYDoc.ts
763
+ var q = p(({ editor: e, options: t }) => {
764
+ let n, r = f({ isForked: !1 });
763
765
  return {
764
766
  key: "yForkDoc",
765
767
  store: r,
@@ -767,9 +769,9 @@ var J = a(({ editor: e, options: t }) => {
767
769
  if (n) return;
768
770
  let a = t.fragment;
769
771
  if (!a) throw Error("No fragment to fork from");
770
- let o = new C.Doc();
771
- C.applyUpdateV2(o, i ?? C.encodeStateAsUpdateV2(a.doc));
772
- let s = W(a, o);
772
+ let o = new S.Doc();
773
+ S.applyUpdateV2(o, i ?? S.encodeStateAsUpdateV2(a.doc));
774
+ let s = G(a, o);
773
775
  n = {
774
776
  originalFragment: a,
775
777
  forkedFragment: s,
@@ -783,18 +785,18 @@ var J = a(({ editor: e, options: t }) => {
783
785
  ytype: o,
784
786
  renderer: a
785
787
  })), c && e.registerExtension(c), i) {
786
- let t = C.encodeStateAsUpdate(s.doc, C.encodeStateVector(o.doc));
787
- C.applyUpdate(o.doc, t, e);
788
+ let t = S.encodeStateAsUpdate(s.doc, S.encodeStateVector(o.doc));
789
+ S.applyUpdate(o.doc, t, e);
788
790
  }
789
791
  n = void 0, s.doc.destroy(), r.setState({ isForked: !1 });
790
792
  }
791
793
  };
792
- }), Je = a(({ editor: e }) => ({
794
+ }), Xe = p(({ editor: e }) => ({
793
795
  key: "yPositionMapping",
794
796
  mapPosition: (t, n = "left") => {
795
- if (!S.getState(e.prosemirrorState)?.ytype) throw Error("YSync plugin state not found");
797
+ if (!ge.getState(e.prosemirrorState)?.ytype) throw Error("YSync plugin state not found");
796
798
  if (t === 0) return () => 0;
797
- let r = fe(e.prosemirrorView, e.prosemirrorState.doc.resolve(t + (n === "right" ? 1 : -1)));
799
+ let r = pe(e.prosemirrorView, e.prosemirrorState.doc.resolve(t + (n === "right" ? 1 : -1)));
798
800
  if (r === null) throw Error("Position not found, cannot track positions");
799
801
  return () => {
800
802
  let t = r(e.prosemirrorView);
@@ -802,10 +804,10 @@ var J = a(({ editor: e, options: t }) => {
802
804
  return t.pos + (n === "right" ? -1 : 1);
803
805
  };
804
806
  }
805
- })), Ye = a(({ editor: e, options: t }) => {
807
+ })), Ze = p(({ editor: e, options: t }) => {
806
808
  let n = t.suggestionDoc;
807
809
  if (!n) throw Error("Suggestion doc not found");
808
- let r = p(t.resolveUsers);
810
+ let r = m(t.resolveUsers);
809
811
  function i(t) {
810
812
  let n = e.prosemirrorView.nodeDOM(t);
811
813
  for (; n && n.parentElement;) {
@@ -818,7 +820,7 @@ var J = a(({ editor: e, options: t }) => {
818
820
  return e.transact((r) => {
819
821
  let i = r.doc.resolve(t), a = i.marks().find((e) => e.type.name === n);
820
822
  if (!a) return;
821
- let o = y(i, a.type);
823
+ let o = ee(i, a.type);
822
824
  if (o) return {
823
825
  range: o,
824
826
  mark: a,
@@ -826,7 +828,7 @@ var J = a(({ editor: e, options: t }) => {
826
828
  return r.doc.textBetween(o.from, o.to);
827
829
  },
828
830
  get position() {
829
- return ee(e.prosemirrorView, o.from, o.to).toJSON();
831
+ return te(e.prosemirrorView, o.from, o.to).toJSON();
830
832
  }
831
833
  };
832
834
  });
@@ -843,13 +845,13 @@ var J = a(({ editor: e, options: t }) => {
843
845
  runsBefore: ["ySync"],
844
846
  viewSuggestions: () => {
845
847
  t.renderer && (t.renderer.suggestionMode = !1), e.exec(x({
846
- ytype: W(t.fragment, n),
848
+ ytype: G(t.fragment, n),
847
849
  renderer: t.renderer
848
850
  }));
849
851
  },
850
852
  enableSuggestions: () => {
851
853
  t.renderer && (t.renderer.suggestionMode = !0), e.exec(x({
852
- ytype: W(t.fragment, n),
854
+ ytype: G(t.fragment, n),
853
855
  renderer: t.renderer
854
856
  }));
855
857
  },
@@ -859,10 +861,10 @@ var J = a(({ editor: e, options: t }) => {
859
861
  renderer: null
860
862
  }));
861
863
  },
862
- applyAllSuggestions: () => e.exec(te()),
863
- applySuggestion: (t, n) => e.exec(ne(t, n)),
864
- revertSuggestion: (t, n) => e.exec(de(t, n)),
865
- revertAllSuggestions: () => e.exec(ue()),
864
+ applyAllSuggestions: () => e.exec(ne()),
865
+ applySuggestion: (t, n) => e.exec(re(t, n)),
866
+ revertSuggestion: (t, n) => e.exec(fe(t, n)),
867
+ revertAllSuggestions: () => e.exec(de()),
866
868
  getSuggestionElementAtPos: i,
867
869
  getMarkAtPos: a,
868
870
  getSuggestionAtSelection: o,
@@ -875,17 +877,17 @@ var J = a(({ editor: e, options: t }) => {
875
877
  return e.prosemirrorState.doc.descendants((e) => !t && (t = e.marks.findIndex((e) => e.type.name === "y-attributed-insert" || e.type.name === "y-attributed-delete" || e.type.name === "y-attributed-format") !== -1, !0)), t;
876
878
  }
877
879
  };
878
- }), Y = "blocknote:version-diff", Xe = "#2948b3", Ze = "#d6defd";
879
- function Qe(e, t) {
880
- let n = C.createContentMap();
880
+ }), Qe = "blocknote:version-diff", $e = "#2948b3", et = "#d6defd";
881
+ function tt(e, t) {
882
+ let n = S.createContentMap();
881
883
  return e.on("beforeObserverCalls", (e) => {
882
- e.insertSet.isEmpty() || C.insertIntoIdMap(n.inserts, C.createIdMapFromIdSet(e.insertSet, [C.createContentAttribute("insert", t)])), e.deleteSet.isEmpty() || C.insertIntoIdMap(n.deletes, C.createIdMapFromIdSet(e.deleteSet, [C.createContentAttribute("delete", t)]));
884
+ e.insertSet.isEmpty() || S.insertIntoIdMap(n.inserts, S.createIdMapFromIdSet(e.insertSet, [S.createContentAttribute("insert", t)])), e.deleteSet.isEmpty() || S.insertIntoIdMap(n.deletes, S.createIdMapFromIdSet(e.deleteSet, [S.createContentAttribute("delete", t)]));
883
885
  }), n;
884
886
  }
885
- var $e = a(({ options: e, editor: t }) => {
886
- let n = e?.color ?? Xe, r = e?.color === void 0 ? Ze : void 0, i = m(async () => []);
887
+ var nt = p(({ options: e, editor: t }) => {
888
+ let n = e?.color ?? $e, r = e?.color === void 0 ? et : void 0, i = h(async () => []);
887
889
  return i.setUser({
888
- id: Y,
890
+ id: Qe,
889
891
  username: "",
890
892
  avatarUrl: "",
891
893
  color: n,
@@ -898,25 +900,25 @@ var $e = a(({ options: e, editor: t }) => {
898
900
  })],
899
901
  renderDiff(e, n) {
900
902
  if (!t.pmSchema.marks["y-attributed-insert"]) throw Error("DiffVersioningExtension: the y-attributed-* marks are missing from the schema. This should not happen — the extension registers them via AttributionExtension.");
901
- let r = K(t, n), i = K(t, e), a = new C.Doc({ gc: !1 }), o = a.get("prosemirror");
903
+ let r = K(t, n), i = K(t, e), a = new S.Doc({ gc: !1 }), o = a.get("prosemirror");
902
904
  a.transact(() => {
903
- o.applyDelta(oe(r));
905
+ o.applyDelta(se(r));
904
906
  });
905
- let s = new C.Doc({ gc: !1 });
906
- C.applyUpdateV2(s, C.encodeStateAsUpdateV2(a));
907
- let c = W(o, s), l = Qe(s, Y), u = q(r, i);
907
+ let s = new S.Doc({ gc: !1 });
908
+ S.applyUpdateV2(s, S.encodeStateAsUpdateV2(a));
909
+ let c = G(o, s), l = tt(s, Qe), u = Je(r, i);
908
910
  s.transact(() => {
909
911
  c.applyDelta(u);
910
- }, Y);
911
- let d = C.createDiffRenderer(a, s, { attributions: l });
912
+ }, Qe);
913
+ let d = S.createDiffRenderer(a, s, { attributions: l });
912
914
  t.exec((e, t) => {
913
- let n = qe(e.tr, c, { renderer: d });
914
- return t && t(n), !0;
915
+ let n = Ye(e.tr, c, { renderer: d });
916
+ return n.setMeta("blocknoteVersionPreview", !0), t && t(n), !0;
915
917
  }), a.destroy(), s.destroy();
916
918
  }
917
919
  };
918
- }), X = a(({ options: e }) => {
919
- let t = p(e.resolveUsers), n = {
920
+ }), J = p(({ options: e }) => {
921
+ let t = m(e.resolveUsers), n = {
920
922
  ...e,
921
923
  resolveUsers: t
922
924
  };
@@ -925,9 +927,9 @@ var $e = a(({ options: e, editor: t }) => {
925
927
  fragment: e.fragment,
926
928
  userStore: t,
927
929
  blockNoteExtensions: [
928
- e.suggestionDoc ? Ye(n) : null,
929
- Je(),
930
- J(e),
930
+ e.suggestionDoc ? Ze(n) : null,
931
+ Xe(),
932
+ q(e),
931
933
  ze(n),
932
934
  F(e),
933
935
  P({
@@ -937,38 +939,37 @@ var $e = a(({ options: e, editor: t }) => {
937
939
  ].filter((e) => e !== null)
938
940
  };
939
941
  });
940
- function et(e) {
942
+ function rt(e) {
941
943
  return e.initialContent && console.warn("When using Collaboration, initialContent might cause conflicts, because changes should come from the collaboration provider"), {
942
944
  ...e,
943
- extensions: [...e.extensions ?? [], X(e.collaboration)],
945
+ extensions: [...e.extensions ?? [], J(e.collaboration)],
944
946
  initialContent: [{
945
947
  type: "paragraph",
946
948
  id: "initialBlockId"
947
949
  }]
948
950
  };
949
951
  }
950
- //#endregion
951
- //#region src/y/comments/yjsHelpers.ts
952
- function tt(e) {
953
- let t = new C.Node();
952
+ // src/y/comments/yjsHelpers.ts
953
+ function it(e) {
954
+ let t = new S.Node();
954
955
  if (t.setAttr("id", e.id), t.setAttr("userId", e.userId), t.setAttr("createdAt", e.createdAt.getTime()), t.setAttr("updatedAt", e.updatedAt.getTime()), e.deletedAt ? (t.setAttr("deletedAt", e.deletedAt.getTime()), t.setAttr("body", void 0)) : t.setAttr("body", e.body), e.reactions.length > 0) throw Error("Reactions should be empty in commentToYType");
955
- return t.setAttr("reactionsByUser", new C.Node()), t.setAttr("metadata", e.metadata), t;
956
+ return t.setAttr("reactionsByUser", new S.Node()), t.setAttr("metadata", e.metadata), t;
956
957
  }
957
- function nt(e) {
958
- let t = new C.Node();
958
+ function at(e) {
959
+ let t = new S.Node();
959
960
  t.setAttr("id", e.id), t.setAttr("createdAt", e.createdAt.getTime()), t.setAttr("updatedAt", e.updatedAt.getTime());
960
- let n = new C.Node();
961
- return n.push(e.comments.map((e) => tt(e))), t.setAttr("comments", n), t.setAttr("resolved", e.resolved), t.setAttr("resolvedUpdatedAt", e.resolvedUpdatedAt?.getTime()), t.setAttr("resolvedBy", e.resolvedBy), t.setAttr("metadata", e.metadata), t;
961
+ let n = new S.Node();
962
+ return n.push(e.comments.map((e) => it(e))), t.setAttr("comments", n), t.setAttr("resolved", e.resolved), t.setAttr("resolvedUpdatedAt", e.resolvedUpdatedAt?.getTime()), t.setAttr("resolvedBy", e.resolvedBy), t.setAttr("metadata", e.metadata), t;
962
963
  }
963
- function rt(e) {
964
+ function ot(e) {
964
965
  return {
965
966
  emoji: e.getAttr("emoji"),
966
967
  createdAt: new Date(e.getAttr("createdAt")),
967
968
  userId: e.getAttr("userId")
968
969
  };
969
970
  }
970
- function it(e) {
971
- return [...e.attrValues()].map((e) => rt(e)).reduce((e, t) => {
971
+ function st(e) {
972
+ return [...e.attrValues()].map((e) => ot(e)).reduce((e, t) => {
972
973
  let n = e.find((e) => e.emoji === t.emoji);
973
974
  return n ? (n.userIds.push(t.userId), n.createdAt = new Date(Math.min(n.createdAt.getTime(), t.createdAt.getTime()))) : e.push({
974
975
  emoji: t.emoji,
@@ -977,7 +978,7 @@ function it(e) {
977
978
  }), e;
978
979
  }, []);
979
980
  }
980
- function Z(e) {
981
+ function Y(e) {
981
982
  return {
982
983
  type: "comment",
983
984
  id: e.getAttr("id"),
@@ -985,27 +986,26 @@ function Z(e) {
985
986
  createdAt: new Date(e.getAttr("createdAt")),
986
987
  updatedAt: new Date(e.getAttr("updatedAt")),
987
988
  deletedAt: e.getAttr("deletedAt") ? new Date(e.getAttr("deletedAt")) : void 0,
988
- reactions: it(e.getAttr("reactionsByUser")),
989
+ reactions: st(e.getAttr("reactionsByUser")),
989
990
  metadata: e.getAttr("metadata"),
990
991
  body: e.getAttr("body")
991
992
  };
992
993
  }
993
- function Q(e) {
994
+ function X(e) {
994
995
  return {
995
996
  type: "thread",
996
997
  id: e.getAttr("id"),
997
998
  createdAt: new Date(e.getAttr("createdAt")),
998
999
  updatedAt: new Date(e.getAttr("updatedAt")),
999
- comments: (e.getAttr("comments")?.toArray() || []).map((e) => Z(e)),
1000
+ comments: (e.getAttr("comments")?.toArray() || []).map((e) => Y(e)),
1000
1001
  resolved: e.getAttr("resolved"),
1001
1002
  resolvedUpdatedAt: new Date(e.getAttr("resolvedUpdatedAt")),
1002
1003
  resolvedBy: e.getAttr("resolvedBy"),
1003
1004
  metadata: e.getAttr("metadata")
1004
1005
  };
1005
1006
  }
1006
- //#endregion
1007
- //#region src/y/comments/YjsThreadStoreBase.ts
1008
- var at = class extends h {
1007
+ // src/y/comments/YjsThreadStoreBase.ts
1008
+ var ct = class extends g {
1009
1009
  threadsYType;
1010
1010
  constructor(e, t) {
1011
1011
  super(t), this.threadsYType = e;
@@ -1013,12 +1013,12 @@ var at = class extends h {
1013
1013
  getThread(e) {
1014
1014
  let t = this.threadsYType.getAttr(e);
1015
1015
  if (!t) throw Error("Thread not found");
1016
- return Q(t);
1016
+ return X(t);
1017
1017
  }
1018
1018
  getThreads() {
1019
1019
  let e = /* @__PURE__ */ new Map();
1020
1020
  return this.threadsYType.forEachAttr((t, n) => {
1021
- t instanceof C.Node && e.set(String(n), Q(t));
1021
+ t instanceof S.Node && e.set(String(n), X(t));
1022
1022
  }), e;
1023
1023
  }
1024
1024
  subscribe(e) {
@@ -1029,7 +1029,7 @@ var at = class extends h {
1029
1029
  this.threadsYType.unobserveDeep(t);
1030
1030
  };
1031
1031
  }
1032
- }, ot = class extends at {
1032
+ }, lt = class extends ct {
1033
1033
  BASE_URL;
1034
1034
  headers;
1035
1035
  constructor(e, t, n, r) {
@@ -1072,7 +1072,7 @@ var at = class extends h {
1072
1072
  return this.doRequest(`/${t}/comments/${n}/reactions`, "POST", r);
1073
1073
  };
1074
1074
  deleteReaction = (e) => this.doRequest(`/${e.threadId}/comments/${e.commentId}/reactions/${e.emoji}`, "DELETE");
1075
- }, st = class extends at {
1075
+ }, ut = class extends ct {
1076
1076
  userId;
1077
1077
  constructor(e, t, n) {
1078
1078
  super(t, n), this.userId = e;
@@ -1098,13 +1098,13 @@ var at = class extends h {
1098
1098
  resolved: !1,
1099
1099
  metadata: e.metadata
1100
1100
  };
1101
- return this.threadsYType.setAttr(r.id, nt(r)), r;
1101
+ return this.threadsYType.setAttr(r.id, at(r)), r;
1102
1102
  });
1103
1103
  addThreadToDocument = void 0;
1104
1104
  addComment = this.transact((e) => {
1105
1105
  let t = this.threadsYType.getAttr(e.threadId);
1106
1106
  if (!t) throw Error("Thread not found");
1107
- if (!this.auth.canAddComment(Q(t))) throw Error("Not authorized");
1107
+ if (!this.auth.canAddComment(X(t))) throw Error("Not authorized");
1108
1108
  let n = /* @__PURE__ */ new Date(), r = {
1109
1109
  type: "comment",
1110
1110
  id: b(),
@@ -1116,100 +1116,98 @@ var at = class extends h {
1116
1116
  metadata: e.comment.metadata,
1117
1117
  body: e.comment.body
1118
1118
  };
1119
- return t.getAttr("comments").push([tt(r)]), t.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime()), r;
1119
+ return t.getAttr("comments").push([it(r)]), t.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime()), r;
1120
1120
  });
1121
1121
  updateComment = this.transact((e) => {
1122
1122
  let t = this.threadsYType.getAttr(e.threadId);
1123
1123
  if (!t) throw Error("Thread not found");
1124
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1124
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1125
1125
  if (r === -1) throw Error("Comment not found");
1126
1126
  let i = n.get(r);
1127
- if (!this.auth.canUpdateComment(Z(i))) throw Error("Not authorized");
1127
+ if (!this.auth.canUpdateComment(Y(i))) throw Error("Not authorized");
1128
1128
  i.setAttr("body", e.comment.body), i.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime()), i.setAttr("metadata", e.comment.metadata);
1129
1129
  });
1130
1130
  deleteComment = this.transact((e) => {
1131
1131
  let t = this.threadsYType.getAttr(e.threadId);
1132
1132
  if (!t) throw Error("Thread not found");
1133
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1133
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1134
1134
  if (r === -1) throw Error("Comment not found");
1135
1135
  let i = n.get(r);
1136
- if (!this.auth.canDeleteComment(Z(i))) throw Error("Not authorized");
1136
+ if (!this.auth.canDeleteComment(Y(i))) throw Error("Not authorized");
1137
1137
  if (i.getAttr("deletedAt")) throw Error("Comment already deleted");
1138
1138
  e.softDelete ? (i.setAttr("deletedAt", (/* @__PURE__ */ new Date()).getTime()), i.setAttr("body", void 0)) : n.delete(r), n.toArray().every((e) => e.getAttr("deletedAt")) && (e.softDelete ? t.setAttr("deletedAt", (/* @__PURE__ */ new Date()).getTime()) : this.threadsYType.deleteAttr(e.threadId)), t.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime());
1139
1139
  });
1140
1140
  deleteThread = this.transact((e) => {
1141
- if (!this.auth.canDeleteThread(Q(this.threadsYType.getAttr(e.threadId)))) throw Error("Not authorized");
1141
+ if (!this.auth.canDeleteThread(X(this.threadsYType.getAttr(e.threadId)))) throw Error("Not authorized");
1142
1142
  this.threadsYType.deleteAttr(e.threadId);
1143
1143
  });
1144
1144
  resolveThread = this.transact((e) => {
1145
1145
  let t = this.threadsYType.getAttr(e.threadId);
1146
1146
  if (!t) throw Error("Thread not found");
1147
- if (!this.auth.canResolveThread(Q(t))) throw Error("Not authorized");
1147
+ if (!this.auth.canResolveThread(X(t))) throw Error("Not authorized");
1148
1148
  t.setAttr("resolved", !0), t.setAttr("resolvedUpdatedAt", (/* @__PURE__ */ new Date()).getTime()), t.setAttr("resolvedBy", this.userId);
1149
1149
  });
1150
1150
  unresolveThread = this.transact((e) => {
1151
1151
  let t = this.threadsYType.getAttr(e.threadId);
1152
1152
  if (!t) throw Error("Thread not found");
1153
- if (!this.auth.canUnresolveThread(Q(t))) throw Error("Not authorized");
1153
+ if (!this.auth.canUnresolveThread(X(t))) throw Error("Not authorized");
1154
1154
  t.setAttr("resolved", !1), t.setAttr("resolvedUpdatedAt", (/* @__PURE__ */ new Date()).getTime());
1155
1155
  });
1156
1156
  addReaction = this.transact((e) => {
1157
1157
  let t = this.threadsYType.getAttr(e.threadId);
1158
1158
  if (!t) throw Error("Thread not found");
1159
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1159
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1160
1160
  if (r === -1) throw Error("Comment not found");
1161
1161
  let i = n.get(r);
1162
- if (!this.auth.canAddReaction(Z(i), e.emoji)) throw Error("Not authorized");
1162
+ if (!this.auth.canAddReaction(Y(i), e.emoji)) throw Error("Not authorized");
1163
1163
  let a = /* @__PURE__ */ new Date(), o = `${this.userId}-${e.emoji}`, s = i.getAttr("reactionsByUser");
1164
1164
  if (!s.hasAttr(o)) {
1165
- let t = new C.Node();
1165
+ let t = new S.Node();
1166
1166
  t.setAttr("emoji", e.emoji), t.setAttr("createdAt", a.getTime()), t.setAttr("userId", this.userId), s.setAttr(o, t);
1167
1167
  }
1168
1168
  });
1169
1169
  deleteReaction = this.transact((e) => {
1170
1170
  let t = this.threadsYType.getAttr(e.threadId);
1171
1171
  if (!t) throw Error("Thread not found");
1172
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1172
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1173
1173
  if (r === -1) throw Error("Comment not found");
1174
1174
  let i = n.get(r);
1175
- if (!this.auth.canDeleteReaction(Z(i), e.emoji)) throw Error("Not authorized");
1175
+ if (!this.auth.canDeleteReaction(Y(i), e.emoji)) throw Error("Not authorized");
1176
1176
  let a = `${this.userId}-${e.emoji}`;
1177
1177
  i.getAttr("reactionsByUser").deleteAttr(a);
1178
1178
  });
1179
1179
  };
1180
- function $(e, t) {
1180
+ function Z(e, t) {
1181
1181
  for (let n = 0; n < e.length; n++) if (t(e.get(n))) return n;
1182
1182
  return -1;
1183
1183
  }
1184
- //#endregion
1185
- //#region src/y/extensions/snapshotCodec.ts
1186
- function ct(e) {
1187
- return C.encodeStateAsUpdateV2(e.doc);
1184
+ // src/y/extensions/snapshotCodec.ts
1185
+ function dt(e) {
1186
+ return S.encodeStateAsUpdateV2(e.doc);
1188
1187
  }
1189
- function lt(e, t, n) {
1190
- let r = new C.Doc(n?.suggestionDoc ? { isSuggestionDoc: !0 } : void 0);
1188
+ function ft(e, t, n) {
1189
+ let r = new S.Doc(n?.suggestionDoc ? { isSuggestionDoc: !0 } : void 0);
1191
1190
  try {
1192
- return C.applyUpdateV2(r, t), {
1191
+ return S.applyUpdateV2(r, t), {
1193
1192
  doc: r,
1194
- fragment: W(e, r)
1193
+ fragment: G(e, r)
1195
1194
  };
1196
1195
  } catch (e) {
1197
1196
  throw r.destroy(), e;
1198
1197
  }
1199
1198
  }
1200
- function ut(e) {
1199
+ function pt(e) {
1201
1200
  e?.doc.destroy();
1202
1201
  }
1203
- //#endregion
1204
- //#region src/y/extensions/snapshotPreview.ts
1205
- function dt(e, t) {
1202
+ // src/y/extensions/snapshotPreview.ts
1203
+ function Q(e, t) {
1206
1204
  let n = e.store.clients.get(t.client)?.at(-1);
1207
1205
  return n !== void 0 && t.clock < n.id.clock + n.length;
1208
1206
  }
1209
- function ft(e, t, n) {
1207
+ function mt(e, t, n) {
1210
1208
  let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1211
1209
  for (let a = e._start; a !== null; a = a.right) {
1212
- let e = !dt(t, a.id);
1210
+ let e = !Q(t, a.id);
1213
1211
  if (!e && !a.deleted) continue;
1214
1212
  let [o, s] = e ? [r, n.inserts] : [i, n.deletes];
1215
1213
  for (let e of s.slice(a.id.client, a.id.clock, a.length)) for (let t of e.attrs ?? []) o.set(`${t.name}:${String(t.val)}`, t);
@@ -1219,21 +1217,18 @@ function ft(e, t, n) {
1219
1217
  deleted: [...i.values()]
1220
1218
  };
1221
1219
  }
1222
- function pt(e) {
1220
+ function ht(e) {
1223
1221
  let t = [];
1224
1222
  for (let n = e._start; n !== null; n = n.right) if (!n.deleted) {
1225
- if (n.content instanceof C.ContentType) {
1226
- t.push({
1227
- id: n.id,
1228
- node: n.content.type
1229
- });
1230
- continue;
1231
- }
1232
- for (let e = 0; e < n.length; e++) t.push({ id: C.createID(n.id.client, n.id.clock + e) });
1223
+ if (n.content instanceof S.ContentType) t.push({
1224
+ id: n.id,
1225
+ node: n.content.type
1226
+ });
1227
+ else for (let e = 0; e < n.length; e++) t.push({ id: S.createID(n.id.client, n.id.clock + e) });
1233
1228
  }
1234
1229
  return t;
1235
1230
  }
1236
- function mt(e, t, n) {
1231
+ function gt(e, t, n) {
1237
1232
  for (let [r, i] of e._map) {
1238
1233
  let e = t._map.get(r);
1239
1234
  if (!i.deleted) {
@@ -1241,33 +1236,33 @@ function mt(e, t, n) {
1241
1236
  n.push([i.id, e.id]);
1242
1237
  }
1243
1238
  }
1244
- let r = pt(e), i = pt(t);
1239
+ let r = ht(e), i = ht(t);
1245
1240
  return r.length === i.length && r.every((e, t) => {
1246
1241
  let r = i[t];
1247
- return n.push([e.id, r.id]), e.node && r.node ? mt(e.node, r.node, n) : !e.node && !r.node;
1242
+ return n.push([e.id, r.id]), e.node && r.node ? gt(e.node, r.node, n) : !e.node && !r.node;
1248
1243
  });
1249
1244
  }
1250
- function ht(e) {
1245
+ function _t(e) {
1251
1246
  let t = e._observers;
1252
1247
  if (t.has("update") || t.has("updateV2")) throw Error("DANGER! Refusing to write to a doc that something syncs. splitChangedBlocks should only write to throwaway copies.");
1253
1248
  }
1254
- function gt(e, t) {
1255
- return e.map((e) => C.createContentAttribute(e.name.replace(/^(insert|delete)/, t), e.val));
1249
+ function vt(e, t) {
1250
+ return e.map((e) => S.createContentAttribute(e.name.replace(/^(insert|delete)/, t), e.val));
1256
1251
  }
1257
- function _t(e, t, n, r) {
1258
- ht(e.doc);
1252
+ function yt(e, t, n, r) {
1253
+ _t(e.doc);
1259
1254
  for (let i = 0; i < e.length; i++) {
1260
1255
  let a = e.get(i);
1261
- if (a instanceof C.Node) {
1256
+ if (a instanceof S.Node) {
1262
1257
  if (a.name === "blockContainer" && a._item) {
1263
- let o = dt(t, a._item.id) ? W(a, t) : void 0;
1258
+ let o = Q(t, a._item.id) ? G(a, t) : void 0;
1264
1259
  if (o && !I(o.toDeltaDeep(), a.toDeltaDeep())) {
1265
- let { inserted: o, deleted: s } = n ? ft(a, t, n) : {
1260
+ let { inserted: o, deleted: s } = n ? mt(a, t, n) : {
1266
1261
  inserted: [],
1267
1262
  deleted: []
1268
- }, c = a.doc, l = o.length ? o : gt(s, "insert"), u = s.length ? s : gt(o, "delete"), d = C.createIdMap(), f = C.createIdSet();
1263
+ }, c = a.doc, l = o.length ? o : vt(s, "insert"), u = s.length ? s : vt(o, "delete"), d = S.createIdMap(), f = S.createIdSet();
1269
1264
  function p(e) {
1270
- l.length && (C.insertIntoIdMap(r.inserts, C.mergeIdMaps([C.diffIdMap(C.createIdMapFromIdSet(e.insertSet, l), f), d])), C.insertIntoIdMap(r.deletes, C.createIdMapFromIdSet(e.deleteSet, u)));
1265
+ l.length && (S.insertIntoIdMap(r.inserts, S.mergeIdMaps([S.diffIdMap(S.createIdMapFromIdSet(e.insertSet, l), f), d])), S.insertIntoIdMap(r.deletes, S.createIdMapFromIdSet(e.deleteSet, u)));
1271
1266
  }
1272
1267
  c.on("beforeObserverCalls", p);
1273
1268
  try {
@@ -1275,11 +1270,11 @@ function _t(e, t, n, r) {
1275
1270
  let r = a.clone();
1276
1271
  e.insert(i + 1, [r]);
1277
1272
  let o = [];
1278
- if (n && mt(a, r, o)) for (let [e, r] of o) {
1279
- let i = dt(t, e) ? void 0 : n.inserts.slice(e.client, e.clock, 1)[0]?.attrs;
1273
+ if (n && gt(a, r, o)) for (let [e, r] of o) {
1274
+ let i = Q(t, e) ? void 0 : n.inserts.slice(e.client, e.clock, 1)[0]?.attrs;
1280
1275
  if (i) {
1281
- let e = C.createIdSet();
1282
- e.add(r.client, r.clock, 1), f.add(r.client, r.clock, 1), C.insertIntoIdMap(d, C.createIdMapFromIdSet(e, i));
1276
+ let e = S.createIdSet();
1277
+ e.add(r.client, r.clock, 1), f.add(r.client, r.clock, 1), S.insertIntoIdMap(d, S.createIdMapFromIdSet(e, i));
1283
1278
  }
1284
1279
  }
1285
1280
  e.delete(i);
@@ -1290,65 +1285,69 @@ function _t(e, t, n, r) {
1290
1285
  continue;
1291
1286
  }
1292
1287
  }
1293
- _t(a, t, n, r);
1288
+ yt(a, t, n, r);
1294
1289
  }
1295
1290
  }
1296
1291
  }
1297
- function vt(e, t, n, r, i) {
1298
- let a = r ? lt(t, r, { suggestionDoc: !0 }) : void 0;
1292
+ function bt(e, t, n, r, i) {
1293
+ let a = r ? ft(t, r, { suggestionDoc: !0 }) : void 0;
1299
1294
  try {
1300
- let r = lt(t, n);
1295
+ let r = ft(t, n);
1301
1296
  try {
1302
1297
  let t = i;
1303
1298
  if (a) {
1304
- let e = C.createContentMap();
1305
- _t(r.fragment, a.doc, i, e), i && (t = C.createContentMap(C.mergeIdMaps([i.inserts, e.inserts]), C.mergeIdMaps([i.deletes, e.deletes])));
1299
+ let e = S.createContentMap();
1300
+ yt(r.fragment, a.doc, i, e), i && (t = S.createContentMap(S.mergeIdMaps([i.inserts, e.inserts]), S.mergeIdMaps([i.deletes, e.deletes])));
1306
1301
  }
1307
1302
  e.exec(x({
1308
1303
  ytype: r.fragment,
1309
- renderer: a ? C.createDiffRenderer(a.doc, r.doc, t ? { attributions: t } : void 0) : void 0
1304
+ renderer: a ? S.createDiffRenderer(a.doc, r.doc, t ? { attributions: t } : void 0) : void 0
1310
1305
  }));
1311
1306
  } finally {
1312
- ut(r);
1307
+ pt(r);
1313
1308
  }
1314
1309
  } finally {
1315
- ut(a);
1310
+ pt(a);
1316
1311
  }
1317
1312
  }
1318
- //#endregion
1319
- //#region src/y/extensions/Versioning.ts
1320
- function yt(e, t) {
1313
+ // src/y/extensions/Versioning.ts
1314
+ function $(e, t) {
1321
1315
  return {
1322
1316
  supportsComparison: !0,
1323
1317
  open() {
1324
- let n = e.getExtension(J), r = S.getState(e.prosemirrorState);
1318
+ let n = e.getExtension(q), r = ge.getState(e.prosemirrorState);
1325
1319
  if (!n || n.store.state.isForked || r?.renderer || r?.ytype !== t) throw Error("Versioning requires an active plain live binding and an available fork");
1326
1320
  let i = {
1327
- content: ct(t),
1321
+ content: dt(t),
1328
1322
  capturedAt: Date.now()
1329
1323
  };
1330
1324
  try {
1331
- n.fork(), e.exec((e, t) => ce(e, t ?? null));
1325
+ n.fork(), e.exec((e, t) => le(e, t ?? null));
1332
1326
  } catch (e) {
1333
- throw n.merge({ keepChanges: !1 }), e;
1327
+ throw n.merge({
1328
+ keepChanges: !1,
1329
+ renderer: r.renderer
1330
+ }), e;
1334
1331
  }
1335
1332
  let a = !1;
1336
1333
  return {
1337
1334
  current: i,
1338
1335
  show({ content: n, comparison: r }) {
1339
1336
  if (a) throw Error("Version view is closed");
1340
- vt(e, t, n, r?.content, r?.attributions);
1337
+ bt(e, t, n, r?.content, r?.attributions);
1341
1338
  },
1342
1339
  close() {
1343
- a ||= (n.merge({ keepChanges: !1 }), !0);
1340
+ a ||= (n.merge({
1341
+ keepChanges: !1,
1342
+ renderer: r.renderer
1343
+ }), !0);
1344
1344
  }
1345
1345
  };
1346
1346
  }
1347
1347
  };
1348
1348
  }
1349
- //#endregion
1350
- //#region src/y/versioning/yhubClient.ts
1351
- var bt = class {
1349
+ // src/y/versioning/yhubClient.ts
1350
+ var xt = class {
1352
1351
  baseUrl;
1353
1352
  documentPath;
1354
1353
  headers;
@@ -1401,7 +1400,7 @@ var bt = class {
1401
1400
  }
1402
1401
  async getVersion(e) {
1403
1402
  return this.request("version", (e) => {
1404
- let { versions: t } = E(e);
1403
+ let { versions: t } = T(e);
1405
1404
  return t[0];
1406
1405
  }, {
1407
1406
  from: e,
@@ -1415,9 +1414,9 @@ var bt = class {
1415
1414
  name: t,
1416
1415
  ...n === void 0 ? {} : { custom: n }
1417
1416
  };
1418
- return this.request("version", (e) => E(e), void 0, {
1417
+ return this.request("version", (e) => T(e), void 0, {
1419
1418
  method: "POST",
1420
- body: _e(r)
1419
+ body: E(r)
1421
1420
  });
1422
1421
  }
1423
1422
  async updateVersion(e, t, n = e.custom) {
@@ -1428,9 +1427,9 @@ var bt = class {
1428
1427
  name: t,
1429
1428
  custom: n
1430
1429
  };
1431
- return this.request("version", (e) => E(e), void 0, {
1430
+ return this.request("version", (e) => T(e), void 0, {
1432
1431
  method: "PATCH",
1433
- body: _e(r)
1432
+ body: E(r)
1434
1433
  });
1435
1434
  }
1436
1435
  async deleteVersion(e) {
@@ -1441,7 +1440,7 @@ var bt = class {
1441
1440
  }
1442
1441
  async getActivity(e, t) {
1443
1442
  return this.request("activity", (e) => {
1444
- let { activity: t } = E(e);
1443
+ let { activity: t } = T(e);
1445
1444
  return t.map((e) => ({
1446
1445
  ...e,
1447
1446
  by: (Array.isArray(e.by) ? e.by : e.by?.split(",") ?? []).filter((e) => e !== null).map((e) => e.trim()).filter(Boolean),
@@ -1450,18 +1449,18 @@ var bt = class {
1450
1449
  }, e, { signal: t });
1451
1450
  }
1452
1451
  async getChangeset(e, t) {
1453
- return this.request("changeset", (e) => E(e), e, { signal: t });
1452
+ return this.request("changeset", (e) => T(e), e, { signal: t });
1454
1453
  }
1455
1454
  async getDocument(e) {
1456
1455
  return this.request("ydoc", (e) => {
1457
- let { doc: t } = E(e);
1456
+ let { doc: t } = T(e);
1458
1457
  if (!t) throw Error("YHub returned no document state.");
1459
1458
  return t;
1460
1459
  }, e);
1461
1460
  }
1462
1461
  async getContent(e, t) {
1463
1462
  return this.request("changeset", (t) => {
1464
- let { ydoc: n } = E(t);
1463
+ let { ydoc: n } = T(t);
1465
1464
  if (!n) throw Error(`YHub returned no document state at timestamp ${e}.`);
1466
1465
  return n;
1467
1466
  }, {
@@ -1471,7 +1470,7 @@ var bt = class {
1471
1470
  }
1472
1471
  async getAttributions(e, t, n) {
1473
1472
  return this.request("changeset", (e) => {
1474
- let { attributions: t } = E(e);
1473
+ let { attributions: t } = T(e);
1475
1474
  if (!t) throw Error("YHub returned no attributions.");
1476
1475
  return t;
1477
1476
  }, {
@@ -1483,31 +1482,30 @@ var bt = class {
1483
1482
  async rollback(e) {
1484
1483
  return this.request("rollback", () => void 0, void 0, {
1485
1484
  method: "POST",
1486
- body: _e(e)
1485
+ body: E(e)
1487
1486
  });
1488
1487
  }
1489
1488
  };
1490
- //#endregion
1491
- //#region src/y/versioning/yhub.ts
1492
- function xt(e) {
1493
- return f((t) => {
1494
- let n = t.getExtension(X);
1489
+ // src/y/versioning/yhub.ts
1490
+ function St(e) {
1491
+ return d((t) => {
1492
+ let n = t.getExtension(J);
1495
1493
  if (!n) throw Error("Y14 versioning requires Y14 collaboration");
1496
1494
  return {
1497
- adapter: yt(t, n.fragment),
1495
+ adapter: $(t, n.fragment),
1498
1496
  storage: e.storage,
1499
1497
  resolveUsers: n.userStore,
1500
1498
  scrollToFirstChange: e.scrollToFirstChange
1501
1499
  };
1502
1500
  })();
1503
1501
  }
1504
- function St(e) {
1505
- return f((t) => {
1506
- let n = t.getExtension(X);
1502
+ function Ct(e) {
1503
+ return d((t) => {
1504
+ let n = t.getExtension(J);
1507
1505
  if (!n) throw Error("Y14 versioning requires Y14 collaboration");
1508
1506
  return {
1509
- adapter: yt(t, n.fragment),
1510
- storage: Ct({
1507
+ adapter: $(t, n.fragment),
1508
+ storage: wt({
1511
1509
  ...e,
1512
1510
  fragment: n.fragment,
1513
1511
  beforeRestoreName: t.dictionary.versioning.before_restore
@@ -1517,8 +1515,8 @@ function St(e) {
1517
1515
  };
1518
1516
  })();
1519
1517
  }
1520
- function Ct(e) {
1521
- let { fragment: t, beforeRestoreName: n } = e, r = new bt(e);
1518
+ function wt(e) {
1519
+ let { fragment: t, beforeRestoreName: n } = e, r = new xt(e);
1522
1520
  function i(e) {
1523
1521
  let t = e.split("-"), n = Number(t[0]), r = Number(t[1]);
1524
1522
  if (t.length !== 2 || t.some((e) => e.length === 0) || !Number.isFinite(n) || !Number.isFinite(r) || n > r) throw Error("Invalid YHub checkpoint identifier");
@@ -1607,14 +1605,14 @@ function Ct(e) {
1607
1605
  let n = await r.getContent(i(e).to, t);
1608
1606
  return n.ok ? {
1609
1607
  ok: !0,
1610
- value: C.convertUpdateFormatV1ToV2(n.value)
1608
+ value: S.convertUpdateFormatV1ToV2(n.value)
1611
1609
  } : n;
1612
1610
  },
1613
1611
  async getAttributions(e, t, n, a) {
1614
1612
  let o = await r.getAttributions(i(t).to + 1, e.type === "current" ? void 0 : i(e.id).to, a);
1615
1613
  return o.ok ? {
1616
1614
  ok: !0,
1617
- value: C.decodeContentMap(o.value)
1615
+ value: S.decodeContentMap(o.value)
1618
1616
  } : o;
1619
1617
  },
1620
1618
  async create(e, n) {
@@ -1627,9 +1625,9 @@ function Ct(e) {
1627
1625
  };
1628
1626
  let s = await r.getContent(o.to);
1629
1627
  if (!s.ok) return s;
1630
- let c = new C.Doc(), l = new C.Doc();
1628
+ let c = new S.Doc(), l = new S.Doc();
1631
1629
  try {
1632
- if (C.applyUpdateV2(c, e), C.applyUpdate(l, s.value), JSON.stringify(W(t, c).toJSON()) !== JSON.stringify(W(t, l).toJSON())) return {
1630
+ if (S.applyUpdateV2(c, e), S.applyUpdate(l, s.value), JSON.stringify(G(t, c).toJSON()) !== JSON.stringify(G(t, l).toJSON())) return {
1633
1631
  ok: !1,
1634
1632
  error: { type: "conflict" }
1635
1633
  };
@@ -1656,7 +1654,7 @@ function Ct(e) {
1656
1654
  let { to: o } = i(e), [s, c] = await Promise.all([a(void 0, { limit: 1 }), r.getDocument({ gc: !1 })]);
1657
1655
  if (!s.ok) return s;
1658
1656
  if (!c.ok) return c;
1659
- let l = G(t, c.value);
1657
+ let l = Be(t, c.value);
1660
1658
  if (s.value[0]) {
1661
1659
  let e = await r.getVersion(s.value[0].to);
1662
1660
  if (!e.ok) return e;
@@ -1667,14 +1665,14 @@ function Ct(e) {
1667
1665
  }
1668
1666
  let u = await r.rollback({
1669
1667
  from: o + 1,
1670
- contentIds: C.encodeContentIds({
1668
+ contentIds: S.encodeContentIds({
1671
1669
  inserts: l,
1672
1670
  deletes: l
1673
1671
  })
1674
1672
  });
1675
1673
  if (!u.ok) return u;
1676
1674
  let d = await r.getDocument({ gc: !1 });
1677
- return d.ok ? (C.applyUpdate(t.doc, d.value), {
1675
+ return d.ok ? (S.applyUpdate(t.doc, d.value), {
1678
1676
  ok: !0,
1679
1677
  value: void 0
1680
1678
  }) : d.error.type === "timeout" ? {
@@ -1716,7 +1714,4 @@ function Ct(e) {
1716
1714
  }
1717
1715
  };
1718
1716
  }
1719
- //#endregion
1720
- export { P as AttributionExtension, X as CollaborationExtension, $e as DiffVersioningExtension, J as ForkYDocExtension, Le as PersistentGroup, Ie as PersistentGroupTransformer, ot as RESTYjsThreadStore, Je as RelativePositionMappingExtension, Ye as SuggestionsExtension, Se as YAttributedAttributes, be as YAttributedDeletion, xe as YAttributedFormat, ye as YAttributedInsertion, Ce as YAttributionMarksExtension, F as YCursorExtension, St as YHubVersioningExtension, ze as YSyncExtension, xt as YVersioningExtension, st as YjsThreadStore, at as YjsThreadStoreBase, K as _blocksToProsemirrorNode, Be as _prosemirrorJSONToBlocks, U as blockNoteTransformer, Ke as blocksToYDoc, We as blocksToYType, G as collectFragmentIds, Ct as createYHubVersionStorage, yt as createYVersionView, q as docDiffToDelta, W as findTypeInOtherYdoc, O as getAttributeChanges, k as getAttributionUserIds, H as mapAttributionToMark, V as persistentBlockGroups, D as resolveAttributionMarkClassName, et as withCollaboration, Ge as yDocToBlocks, qe as yNodeToTransaction, Ue as yfragmentToBlocks };
1721
-
1722
- //# sourceMappingURL=y.js.map
1717
+ export { P as AttributionExtension, J as CollaborationExtension, nt as DiffVersioningExtension, q as ForkYDocExtension, Le as PersistentGroup, Ie as PersistentGroupTransformer, lt as RESTYjsThreadStore, Xe as RelativePositionMappingExtension, Ze as SuggestionsExtension, Ce as YAttributedAttributes, xe as YAttributedDeletion, Se as YAttributedFormat, be as YAttributedInsertion, we as YAttributionMarksExtension, F as YCursorExtension, Ct as YHubVersioningExtension, ze as YSyncExtension, St as YVersioningExtension, ut as YjsThreadStore, ct as YjsThreadStoreBase, K as _blocksToProsemirrorNode, Ve as _prosemirrorJSONToBlocks, W as blockNoteTransformer, qe as blocksToYDoc, Ge as blocksToYType, Be as collectFragmentIds, wt as createYHubVersionStorage, $ as createYVersionView, Je as docDiffToDelta, G as findTypeInOtherYdoc, O as getAttributeChanges, k as getAttributionUserIds, U as mapAttributionToMark, H as persistentBlockGroups, D as resolveAttributionMarkClassName, rt as withCollaboration, Ke as yDocToBlocks, Ye as yNodeToTransaction, We as yfragmentToBlocks };