@blocknote/core 0.56.0 → 0.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +366 -365
  41. package/dist/yjs.js +140 -138
  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
- let t = document.createElement("span");
253
- t.classList.add("bn-collaboration-cursor__base");
254
- 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
- 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;
252
+ function Oe(e) {
253
+ let t = typeof e.color == "string" ? e.color : "#ffa500", n = De(t) ? "white" : "black", r = document.createElement("span");
254
+ r.classList.add("bn-collaboration-cursor__base");
255
+ let i = document.createElement("span");
256
+ i.setAttribute("contentedEditable", "false"), i.classList.add("bn-collaboration-cursor__caret"), i.style.backgroundColor = t, i.style.color = n;
257
+ let a = document.createElement("span");
258
+ return a.classList.add("bn-collaboration-cursor__label"), a.style.backgroundColor = t, a.style.color = n, a.insertBefore(document.createTextNode(e.name), null), i.insertBefore(a, null), r.insertBefore(document.createTextNode("⁠"), null), r.insertBefore(i, null), r.insertBefore(document.createTextNode("⁠"), null), r;
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,18 @@ 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(e) {
278
+ let t = document.createElement("span").style;
279
+ return typeof e.color == "string" && (t.backgroundColor = e.color), ie({
280
+ ...e,
281
+ color: t.backgroundColor || "#ffa500"
282
+ });
283
+ },
277
284
  cursorBuilder(n, r) {
278
285
  let i = t.get(r);
279
286
  if (!i) {
280
- let a = (e.renderCursor ?? De)(n);
287
+ let a = (e.renderCursor ?? Oe)(n);
281
288
  e.showCursorLabels !== "always" && (a.addEventListener("mouseenter", () => {
282
289
  let e = t.get(r);
283
290
  e.element.setAttribute("data-active", ""), e.hideTimeout && (clearTimeout(e.hideTimeout), t.set(r, {
@@ -312,15 +319,15 @@ var F = a(({ options: e }) => {
312
319
  if (e) return e.user;
313
320
  }
314
321
  };
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;
322
+ }), ke = (e) => {
323
+ for (let t of e.children) if (C.$insertOp.check(t)) {
324
+ for (let e of t.insert) if (C.$deltaAny.check(e)) return e;
318
325
  }
319
326
  return null;
320
327
  }, I = (e, t) => {
321
328
  if (e.name !== t.name) return !1;
322
329
  if (e.name !== "blockContainer") return !0;
323
- let n = Oe(e), r = Oe(t);
330
+ let n = ke(e), r = ke(t);
324
331
  return n?.name === r?.name;
325
332
  }, L = {
326
333
  groupName: "blockGroup",
@@ -331,29 +338,29 @@ var F = a(({ options: e }) => {
331
338
  "columnList"
332
339
  ],
333
340
  implicitGroups: !0
334
- }, ke = { group: !1 };
335
- function R(e) {
341
+ }, R = { group: !1 };
342
+ function z(e) {
336
343
  return {
337
344
  group: !0,
338
345
  len: e
339
346
  };
340
347
  }
341
348
  function Ae(e, t) {
342
- return w.$deltaAny.check(e) && e.name === t;
349
+ return C.$deltaAny.check(e) && e.name === t;
343
350
  }
344
351
  function je(e) {
345
352
  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);
353
+ 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
354
  return t;
348
355
  }
349
- function z(e) {
356
+ function B(e) {
350
357
  let t = 0;
351
358
  for (let n of e) n.group && (t += n.len);
352
359
  return t;
353
360
  }
354
361
  function Me(e) {
355
362
  let t = [];
356
- for (let n = 0; n < e; n++) t.push(ke);
363
+ for (let n = 0; n < e; n++) t.push(R);
357
364
  return t;
358
365
  }
359
366
  var Ne = class {
@@ -416,7 +423,7 @@ var Ne = class {
416
423
  if (n === e.length) break;
417
424
  if (this.ops.get(n)?.kind === "delete") continue;
418
425
  let i = e[n], a = this.lenAdjust.get(n);
419
- t.push(a === void 0 || !i.group ? i : R(i.len + a));
426
+ t.push(a === void 0 || !i.group ? i : z(i.len + a));
420
427
  }
421
428
  return t;
422
429
  }
@@ -434,10 +441,10 @@ function Fe(e, t) {
434
441
  }
435
442
  return e.length;
436
443
  }
437
- function B(e) {
444
+ function V(e) {
438
445
  return (t) => typeof t == "number" ? e(t) : t;
439
446
  }
440
- var Ie = class extends T.Transformer {
447
+ var Ie = class extends w.Transformer {
441
448
  groupName;
442
449
  implicitGroups;
443
450
  segs = [];
@@ -447,9 +454,9 @@ var Ie = class extends T.Transformer {
447
454
  }
448
455
  applyA(e) {
449
456
  this.fresh = !1;
450
- let t = this.segs, n = this.groupName, r = z(t), i = 0;
457
+ let t = this.segs, n = this.groupName, r = B(t), i = 0;
451
458
  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 = () => {
459
+ let a = [], o = new Ne(), s = C.create(), c = 0, l = 0, u = !1, d = 0, f = 0, p = 0, m = () => {
453
460
  if (p > c) {
454
461
  let e = p - c;
455
462
  s.retain(e), c = p, l += e;
@@ -458,21 +465,21 @@ var Ie = class extends T.Transformer {
458
465
  let e = t[d++];
459
466
  e.group ? p += e.len : f++;
460
467
  };
461
- for (let r of e.children) if (w.$retainOp.check(r)) {
468
+ for (let r of e.children) if (C.$retainOp.check(r)) {
462
469
  let e = r.format, n = r.attribution;
463
470
  for (let i = r.retain; i > 0 && d < t.length; i--) {
464
471
  let r = t[d];
465
- !r.group && (e !== void 0 || n !== void 0) && o.retainAt(f, e, n), a.push(r), h();
472
+ r.group || e === void 0 && n === void 0 || o.retainAt(f, e, n), a.push(r), h();
466
473
  }
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)) {
474
+ } else if (C.$textOp.check(r)) o.insertAt(f, r.insert, r.format, r.attribution, []), a.push(...Me(r.insert.length));
475
+ else if (C.$insertOp.check(r)) for (let e of r.insert) if (Ae(e, n)) {
469
476
  m();
470
477
  let t = l;
471
478
  s.append(e), l += e.childCnt;
472
479
  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--) {
480
+ n && C.mergeRootMarks(s, e, V((e) => t + e)), u ||= e.childCnt > 0 || n, a.push(z(e.childCnt));
481
+ } else o.insertAt(f, [e], r.format, r.attribution, []), a.push(R);
482
+ else if (C.$deleteOp.check(r)) for (let e = r.delete; e > 0 && d < t.length; e--) {
476
483
  let e = t[d];
477
484
  e.group ? e.len > 0 && (m(), s.delete(e.len), c += e.len, u = !0) : o.deleteAt(f), h();
478
485
  }
@@ -482,21 +489,21 @@ var Ie = class extends T.Transformer {
482
489
  if (e.group) {
483
490
  m();
484
491
  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);
492
+ 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);
493
+ (n.marks !== null || n.deleteMarks !== null) && (C.mergeRootMarks(s, n, V((e) => t + e)), u = !0), a.push(z(e.len + je(n)));
494
+ } else o.modifyAt(f, C.clone(n), r.format, r.attribution), a.push(e);
488
495
  h();
489
496
  }
490
497
  for (; d < t.length;) a.push(t[d++]);
491
- let g = z(a), _ = w.cloneShallow(e);
498
+ let g = B(a), _ = C.cloneShallow(e);
492
499
  if (o.emit(_, i), r === 0) {
493
500
  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)]);
501
+ let e = C.create(n);
502
+ for (let t of s.children) (C.$insertOp.check(t) || C.$textOp.check(t)) && e.insert(t.insert, t.format, t.attribution);
503
+ C.mergeRootMarks(e, s), _.insert([e.done(!1)]);
497
504
  }
498
505
  } 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, _);
506
+ return C.remapRootMarks(_, V((e) => Pe(a, e, g))), this.segs = a, _.done(!1), w.createTransformResult(null, _);
500
507
  }
501
508
  applyB(e) {
502
509
  let t = this.fresh;
@@ -512,10 +519,10 @@ var Ie = class extends T.Transformer {
512
519
  }), e += t.len) : i.push(n);
513
520
  });
514
521
  }
515
- let o = i.length, s = z(n), c = s > 0, l = new Ne(), u = /* @__PURE__ */ new Map(), d = (e) => {
522
+ let o = i.length, s = B(n), c = s > 0, l = new Ne(), u = /* @__PURE__ */ new Map(), d = (e) => {
516
523
  let t = u.get(e);
517
524
  return t === void 0 && (t = {
518
- b: w.create(),
525
+ b: C.create(),
519
526
  emitted: 0,
520
527
  out: 0,
521
528
  net: 0,
@@ -529,18 +536,18 @@ var Ie = class extends T.Transformer {
529
536
  }, p = (e) => e < o ? i[e] : n.length, m = !1, h = (e, t, r, i) => {
530
537
  let o = a.findIndex((e) => t <= e.start + e.len);
531
538
  if (o === -1) {
532
- l.insertAt(n.length, [e], r, i, [R(e.childCnt)]), m = !0;
539
+ l.insertAt(n.length, [e], r, i, [z(e.childCnt)]), m = !0;
533
540
  return;
534
541
  }
535
542
  let s = d(o);
536
543
  f(s, t - a[o].start);
537
544
  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));
545
+ 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
546
  }, g = (e) => {
540
547
  let t = 0, n = 0, r = () => {
541
548
  for (; t < a.length && n >= a[t].len;) t++, n = 0;
542
549
  };
543
- for (let i of e.children) if (w.$retainOp.check(i)) {
550
+ for (let i of e.children) if (C.$retainOp.check(i)) {
544
551
  let e = i.format, o = i.attribution, s = i.retain;
545
552
  for (; s > 0 && (r(), !(t >= a.length));) {
546
553
  let r = Math.min(a[t].len - n, s);
@@ -550,17 +557,17 @@ var Ie = class extends T.Transformer {
550
557
  }
551
558
  n += r, s -= r;
552
559
  }
553
- } else if (w.$deleteOp.check(i)) {
560
+ } else if (C.$deleteOp.check(i)) {
554
561
  let e = i.delete;
555
562
  for (; e > 0 && (r(), !(t >= a.length));) {
556
563
  let r = Math.min(a[t].len - n, e), i = d(t);
557
564
  f(i, n), i.b.delete(r), i.emitted += r, i.net -= r, i.touched = !0, n += r, e -= r;
558
565
  }
559
- } else if (w.$modifyOp.check(i)) {
566
+ } else if (C.$modifyOp.check(i)) {
560
567
  if (r(), t >= a.length) continue;
561
568
  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)) {
569
+ 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;
570
+ } else if (C.$insertOp.check(i) || C.$textOp.check(i)) {
564
571
  t >= a.length && (t = a.length - 1, n = a[t].len);
565
572
  let e = d(t);
566
573
  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 +585,22 @@ var Ie = class extends T.Transformer {
578
585
  let e = t.key, r = n.findIndex((t) => e <= t.start + t.len);
579
586
  r === -1 && (r = a.length - 1);
580
587
  let i = d(r);
581
- w.addRootMark(i.b, t.copy(e - n[r].start)), i.touched = !0;
588
+ C.addRootMark(i.b, t.copy(e - n[r].start)), i.touched = !0;
582
589
  }
583
590
  }
584
591
  if (e.deleteMarks !== null && a.length > 0) {
585
592
  let t = d(0);
586
- for (let n of e.deleteMarks) w.deleteRootMark(t.b, n);
593
+ for (let n of e.deleteMarks) C.deleteRootMark(t.b, n);
587
594
  t.touched = !0;
588
595
  }
589
596
  }, _ = 0;
590
- for (let t of e.children) if (w.$retainOp.check(t)) {
597
+ for (let t of e.children) if (C.$retainOp.check(t)) {
591
598
  let e = t.format, n = t.attribution;
592
599
  for (let r = t.retain; r > 0; r--, _++) if (_ < o) (e !== void 0 || n !== void 0) && l.retainAt(i[_], e, n);
593
600
  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[_]);
601
+ } else if (C.$textOp.check(t)) l.insertAt(p(_), t.insert, t.format, t.attribution, Me(t.insert.length));
602
+ 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]);
603
+ else if (C.$deleteOp.check(t)) for (let e = t.delete; e > 0; e--, _++) if (_ < o) l.deleteAt(i[_]);
597
604
  else if (_ === o && c) a.forEach((e, t) => {
598
605
  if (e.len > 0) {
599
606
  let n = d(t);
@@ -601,19 +608,19 @@ var Ie = class extends T.Transformer {
601
608
  }
602
609
  });
603
610
  else break;
604
- else _ < o ? l.modifyAt(i[_], w.clone(t.value), t.format, t.attribution) : _ === o && c && g(t.value), _++;
611
+ else _ < o ? l.modifyAt(i[_], C.clone(t.value), t.format, t.attribution) : _ === o && c && g(t.value), _++;
605
612
  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);
613
+ this.implicitGroups && t && a.length === 0 && !m && l.insertAt(n.length, [C.create(r).done(!1)], void 0, void 0, [z(0)]);
614
+ let v = C.cloneShallow(e);
608
615
  l.emit(v, n.length);
609
616
  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);
617
+ return C.remapRootMarks(v, V((e) => Fe(y, e))), this.segs = y, v.done(!1), w.createTransformResult(v, null);
611
618
  }
612
- }, Le = class extends T.Template {
619
+ }, Le = class extends w.Template {
613
620
  groupName;
614
621
  implicitGroups;
615
622
  constructor(e, t, n) {
616
- super(e, w.$deltaAny), this.groupName = t, this.implicitGroups = n;
623
+ super(e, C.$deltaAny), this.groupName = t, this.implicitGroups = n;
617
624
  }
618
625
  get name() {
619
626
  return `blocknote:persistentGroup:${this.groupName}`;
@@ -622,63 +629,65 @@ var Ie = class extends T.Transformer {
622
629
  return new Ie(this.$in, this.$out, this.groupName, this.implicitGroups);
623
630
  }
624
631
  };
625
- function V(e, t = {}) {
632
+ function H(e, t = {}) {
626
633
  let n = t.groupName ?? L.groupName, r = t.containerName ?? L.containerName, i = t.implicitGroups ?? L.implicitGroups, a = new Set(t.nestingNodes ?? L.nestingNodes);
627
634
  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);
635
+ return w.children(e, (e, t) => e.name === r ? s(t) : e.name !== null && a.has(e.name) ? o(t) : null);
629
636
  }
630
637
  function s(e) {
631
- return T.pipe(e, (e) => o(e), (e) => new Le(e, n, i));
638
+ return w.pipe(e, (e) => o(e), (e) => new Le(e, n, i));
632
639
  }
633
640
  return o(e);
634
641
  }
635
- //#endregion
636
- //#region src/y/extensions/YSync.ts
642
+ // src/y/extensions/YSync.ts
637
643
  function Re(t) {
638
644
  let n = e(t), r = n.length === 1 ? n[0] : void 0;
639
645
  if (!r || r.type !== "paragraph" || r.children.length !== 0) return !1;
640
646
  let { content: i } = r;
641
647
  return i === void 0 || (typeof i == "string" || Array.isArray(i)) && i.length === 0;
642
648
  }
643
- var H = (e, t) => {
649
+ var U = (e, t) => {
644
650
  let n = { ...e };
645
651
  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
652
  userIds: [...new Set(Object.values(t.format).flat())],
647
653
  format: t.format
648
654
  }), 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]
655
+ }, ze = p(({ options: e, editor: t }) => {
656
+ let n = !1;
657
+ return {
658
+ key: "ySync",
659
+ fragment: e.fragment,
660
+ mount({ signal: r }) {
661
+ let { fragment: i, provider: a } = e, o = a && "synced" in a ? a.synced : void 0;
662
+ if (n ||= i.length > 0 || o !== !1, !n && a) {
663
+ if (!("on" in a) || typeof a.on != "function") throw Error("YSync: an unsynced provider must support sync events");
664
+ let e = t.getExtension(u)?.acquire() ?? (() => {});
665
+ function o(t) {
666
+ t !== !0 || n || r.aborted || (n = !0, e());
667
+ }
668
+ function s() {
669
+ o(i.length > 0);
670
+ }
671
+ i.observe(s), a.on("synced", o), r.addEventListener("abort", () => {
672
+ i.unobserve(s), "off" in a && typeof a.off == "function" && a.off("synced", o), e();
673
+ }, { once: !0 }), s(), "synced" in a && a.synced === !0 && o(!0);
674
+ }
675
+ r.aborted || ge.getState(t.prosemirrorState)?.ytype || t.getExtension(q)?.store.state.isForked || t.exec(x({ ytype: e.fragment }));
676
+ },
677
+ prosemirrorPlugins: [me({
678
+ suggestionDoc: e.suggestionDoc,
679
+ mapAttributionToMark: U,
680
+ customCompare: I,
681
+ transformers: [H],
682
+ isInitialContent: Re
683
+ })],
684
+ runsBefore: ["default"]
685
+ };
686
+ }), W = ae({
687
+ mapAttributionToMark: U,
688
+ transformers: [H]
680
689
  });
681
- function W(e, t) {
690
+ function G(e, t) {
682
691
  let n = e.doc;
683
692
  if (!n) throw Error("type does not have a ydoc");
684
693
  if (e._item === null) {
@@ -687,27 +696,27 @@ function W(e, t) {
687
696
  return t.get(r, e.name);
688
697
  }
689
698
  {
690
- let n = e._item, r = t.store.clients.get(n.id.client) ?? [], i = r[C.findIndexSS(r, n.id.clock)];
699
+ let n = e._item, r = t.store.clients.get(n.id.client) ?? [], i = r[S.findIndexSS(r, n.id.clock)];
691
700
  if (!i) throw Error("type does not exist in other ydoc");
692
701
  let a = i.content;
693
702
  if (!a) throw Error("type does not exist in other ydoc");
694
703
  return a.type;
695
704
  }
696
705
  }
697
- function G(e, t) {
706
+ function Be(e, t) {
698
707
  if (t instanceof Uint8Array) {
699
- let n = new C.Doc({ gc: !1 });
708
+ let n = new S.Doc({ gc: !1 });
700
709
  try {
701
- return C.applyUpdate(n, t), G(e, n);
710
+ return S.applyUpdate(n, t), Be(e, n);
702
711
  } finally {
703
712
  n.destroy();
704
713
  }
705
714
  }
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);
715
+ let n = G(e, t), r = S.createIdSet();
716
+ 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
717
  return r;
709
718
  }
710
- function Be(t, n) {
719
+ function Ve(t, n) {
711
720
  let r = t.pmSchema.nodeFromJSON(n);
712
721
  return e(r);
713
722
  }
@@ -715,51 +724,50 @@ function K(e, n) {
715
724
  let r = n.map((n) => t(n, e.pmSchema));
716
725
  return e.pmSchema.topNodeType.create(null, e.pmSchema.nodes.blockGroup.create(null, r));
717
726
  }
718
- function Ve(e) {
727
+ function He(e) {
719
728
  if (typeof e != "object" || !e) return !1;
720
729
  let t = e;
721
- return t.name === "blockContainer" || He(t.children) || He(t.insert);
730
+ return t.name === "blockContainer" || Ue(t.children) || Ue(t.insert);
722
731
  }
723
- function He(e) {
732
+ function Ue(e) {
724
733
  if (typeof e != "object" || !e || !(Symbol.iterator in e)) return !1;
725
- for (let t of e) if (Ve(t)) return !0;
734
+ for (let t of e) if (He(t)) return !0;
726
735
  return !1;
727
736
  }
728
- function Ue(t, n) {
729
- if (n.length === 0 || !Ve(n.toDeltaDeep())) return [];
730
- let r = ge(n, t.pmSchema, {
737
+ function We(t, n) {
738
+ if (n.length === 0 || !He(n.toDeltaDeep())) return [];
739
+ let r = ve(n, t.pmSchema, {
731
740
  renderer: null,
732
- transformer: U
741
+ transformer: W
733
742
  });
734
743
  return e(r);
735
744
  }
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));
745
+ function Ge(e, t, n) {
746
+ return n ||= new S.Doc().get("prosemirror"), t.length === 0 || n.applyDelta(ue(K(e, t), { transformer: W })), n;
741
747
  }
742
748
  function Ke(e, t, n = "prosemirror") {
743
- let r = new C.Doc();
749
+ return We(e, t.get(n));
750
+ }
751
+ function qe(e, t, n = "prosemirror") {
752
+ let r = new S.Doc();
744
753
  if (t.length === 0) return r.get(n), r;
745
- let i = le(K(e, t), { transformer: U });
754
+ let i = ue(K(e, t), { transformer: W });
746
755
  return r.get(n).applyDelta(i), r;
747
756
  }
748
- function q(e, t) {
749
- let n = se(e), r = se(t);
750
- return w.diff(n.done(), r.done(), { compare: I });
757
+ function Je(e, t) {
758
+ let n = ce(e), r = ce(t);
759
+ return C.diff(n.done(), r.done(), { compare: I });
751
760
  }
752
- function qe(e, t, n = {}) {
753
- let r = ge(t, e.doc.type.schema, {
754
- transformer: U,
761
+ function Ye(e, t, n = {}) {
762
+ let r = ve(t, e.doc.type.schema, {
763
+ transformer: W,
755
764
  ...n
756
- }), i = q(e.doc, r);
757
- return ae(e, i).setMeta("y-sync-hydration", { delta: i });
765
+ }), i = Je(e.doc, r);
766
+ return oe(e, i).setMeta("y-sync-hydration", { delta: i });
758
767
  }
759
- //#endregion
760
- //#region src/y/extensions/ForkYDoc.ts
761
- var J = a(({ editor: e, options: t }) => {
762
- let n, r = i({ isForked: !1 });
768
+ // src/y/extensions/ForkYDoc.ts
769
+ var q = p(({ editor: e, options: t }) => {
770
+ let n, r = f({ isForked: !1 });
763
771
  return {
764
772
  key: "yForkDoc",
765
773
  store: r,
@@ -767,9 +775,9 @@ var J = a(({ editor: e, options: t }) => {
767
775
  if (n) return;
768
776
  let a = t.fragment;
769
777
  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);
778
+ let o = new S.Doc();
779
+ S.applyUpdateV2(o, i ?? S.encodeStateAsUpdateV2(a.doc));
780
+ let s = G(a, o);
773
781
  n = {
774
782
  originalFragment: a,
775
783
  forkedFragment: s,
@@ -783,18 +791,18 @@ var J = a(({ editor: e, options: t }) => {
783
791
  ytype: o,
784
792
  renderer: a
785
793
  })), c && e.registerExtension(c), i) {
786
- let t = C.encodeStateAsUpdate(s.doc, C.encodeStateVector(o.doc));
787
- C.applyUpdate(o.doc, t, e);
794
+ let t = S.encodeStateAsUpdate(s.doc, S.encodeStateVector(o.doc));
795
+ S.applyUpdate(o.doc, t, e);
788
796
  }
789
797
  n = void 0, s.doc.destroy(), r.setState({ isForked: !1 });
790
798
  }
791
799
  };
792
- }), Je = a(({ editor: e }) => ({
800
+ }), Xe = p(({ editor: e }) => ({
793
801
  key: "yPositionMapping",
794
802
  mapPosition: (t, n = "left") => {
795
- if (!S.getState(e.prosemirrorState)?.ytype) throw Error("YSync plugin state not found");
803
+ if (!ge.getState(e.prosemirrorState)?.ytype) throw Error("YSync plugin state not found");
796
804
  if (t === 0) return () => 0;
797
- let r = fe(e.prosemirrorView, e.prosemirrorState.doc.resolve(t + (n === "right" ? 1 : -1)));
805
+ let r = pe(e.prosemirrorView, e.prosemirrorState.doc.resolve(t + (n === "right" ? 1 : -1)));
798
806
  if (r === null) throw Error("Position not found, cannot track positions");
799
807
  return () => {
800
808
  let t = r(e.prosemirrorView);
@@ -802,10 +810,10 @@ var J = a(({ editor: e, options: t }) => {
802
810
  return t.pos + (n === "right" ? -1 : 1);
803
811
  };
804
812
  }
805
- })), Ye = a(({ editor: e, options: t }) => {
813
+ })), Ze = p(({ editor: e, options: t }) => {
806
814
  let n = t.suggestionDoc;
807
815
  if (!n) throw Error("Suggestion doc not found");
808
- let r = p(t.resolveUsers);
816
+ let r = m(t.resolveUsers);
809
817
  function i(t) {
810
818
  let n = e.prosemirrorView.nodeDOM(t);
811
819
  for (; n && n.parentElement;) {
@@ -818,7 +826,7 @@ var J = a(({ editor: e, options: t }) => {
818
826
  return e.transact((r) => {
819
827
  let i = r.doc.resolve(t), a = i.marks().find((e) => e.type.name === n);
820
828
  if (!a) return;
821
- let o = y(i, a.type);
829
+ let o = ee(i, a.type);
822
830
  if (o) return {
823
831
  range: o,
824
832
  mark: a,
@@ -826,7 +834,7 @@ var J = a(({ editor: e, options: t }) => {
826
834
  return r.doc.textBetween(o.from, o.to);
827
835
  },
828
836
  get position() {
829
- return ee(e.prosemirrorView, o.from, o.to).toJSON();
837
+ return te(e.prosemirrorView, o.from, o.to).toJSON();
830
838
  }
831
839
  };
832
840
  });
@@ -843,13 +851,13 @@ var J = a(({ editor: e, options: t }) => {
843
851
  runsBefore: ["ySync"],
844
852
  viewSuggestions: () => {
845
853
  t.renderer && (t.renderer.suggestionMode = !1), e.exec(x({
846
- ytype: W(t.fragment, n),
854
+ ytype: G(t.fragment, n),
847
855
  renderer: t.renderer
848
856
  }));
849
857
  },
850
858
  enableSuggestions: () => {
851
859
  t.renderer && (t.renderer.suggestionMode = !0), e.exec(x({
852
- ytype: W(t.fragment, n),
860
+ ytype: G(t.fragment, n),
853
861
  renderer: t.renderer
854
862
  }));
855
863
  },
@@ -859,10 +867,10 @@ var J = a(({ editor: e, options: t }) => {
859
867
  renderer: null
860
868
  }));
861
869
  },
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()),
870
+ applyAllSuggestions: () => e.exec(ne()),
871
+ applySuggestion: (t, n) => e.exec(re(t, n)),
872
+ revertSuggestion: (t, n) => e.exec(fe(t, n)),
873
+ revertAllSuggestions: () => e.exec(de()),
866
874
  getSuggestionElementAtPos: i,
867
875
  getMarkAtPos: a,
868
876
  getSuggestionAtSelection: o,
@@ -875,17 +883,17 @@ var J = a(({ editor: e, options: t }) => {
875
883
  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
884
  }
877
885
  };
878
- }), Y = "blocknote:version-diff", Xe = "#2948b3", Ze = "#d6defd";
879
- function Qe(e, t) {
880
- let n = C.createContentMap();
886
+ }), Qe = "blocknote:version-diff", $e = "#2948b3", et = "#d6defd";
887
+ function tt(e, t) {
888
+ let n = S.createContentMap();
881
889
  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)]));
890
+ 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
891
  }), n;
884
892
  }
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 () => []);
893
+ var nt = p(({ options: e, editor: t }) => {
894
+ let n = e?.color ?? $e, r = e?.color === void 0 ? et : void 0, i = h(async () => []);
887
895
  return i.setUser({
888
- id: Y,
896
+ id: Qe,
889
897
  username: "",
890
898
  avatarUrl: "",
891
899
  color: n,
@@ -898,25 +906,25 @@ var $e = a(({ options: e, editor: t }) => {
898
906
  })],
899
907
  renderDiff(e, n) {
900
908
  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");
909
+ let r = K(t, n), i = K(t, e), a = new S.Doc({ gc: !1 }), o = a.get("prosemirror");
902
910
  a.transact(() => {
903
- o.applyDelta(oe(r));
911
+ o.applyDelta(se(r));
904
912
  });
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);
913
+ let s = new S.Doc({ gc: !1 });
914
+ S.applyUpdateV2(s, S.encodeStateAsUpdateV2(a));
915
+ let c = G(o, s), l = tt(s, Qe), u = Je(r, i);
908
916
  s.transact(() => {
909
917
  c.applyDelta(u);
910
- }, Y);
911
- let d = C.createDiffRenderer(a, s, { attributions: l });
918
+ }, Qe);
919
+ let d = S.createDiffRenderer(a, s, { attributions: l });
912
920
  t.exec((e, t) => {
913
- let n = qe(e.tr, c, { renderer: d });
914
- return t && t(n), !0;
921
+ let n = Ye(e.tr, c, { renderer: d });
922
+ return n.setMeta("blocknoteVersionPreview", !0), t && t(n), !0;
915
923
  }), a.destroy(), s.destroy();
916
924
  }
917
925
  };
918
- }), X = a(({ options: e }) => {
919
- let t = p(e.resolveUsers), n = {
926
+ }), J = p(({ options: e }) => {
927
+ let t = m(e.resolveUsers), n = {
920
928
  ...e,
921
929
  resolveUsers: t
922
930
  };
@@ -925,9 +933,9 @@ var $e = a(({ options: e, editor: t }) => {
925
933
  fragment: e.fragment,
926
934
  userStore: t,
927
935
  blockNoteExtensions: [
928
- e.suggestionDoc ? Ye(n) : null,
929
- Je(),
930
- J(e),
936
+ e.suggestionDoc ? Ze(n) : null,
937
+ Xe(),
938
+ q(e),
931
939
  ze(n),
932
940
  F(e),
933
941
  P({
@@ -937,38 +945,37 @@ var $e = a(({ options: e, editor: t }) => {
937
945
  ].filter((e) => e !== null)
938
946
  };
939
947
  });
940
- function et(e) {
948
+ function rt(e) {
941
949
  return e.initialContent && console.warn("When using Collaboration, initialContent might cause conflicts, because changes should come from the collaboration provider"), {
942
950
  ...e,
943
- extensions: [...e.extensions ?? [], X(e.collaboration)],
951
+ extensions: [...e.extensions ?? [], J(e.collaboration)],
944
952
  initialContent: [{
945
953
  type: "paragraph",
946
954
  id: "initialBlockId"
947
955
  }]
948
956
  };
949
957
  }
950
- //#endregion
951
- //#region src/y/comments/yjsHelpers.ts
952
- function tt(e) {
953
- let t = new C.Node();
958
+ // src/y/comments/yjsHelpers.ts
959
+ function it(e) {
960
+ let t = new S.Node();
954
961
  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;
962
+ return t.setAttr("reactionsByUser", new S.Node()), t.setAttr("metadata", e.metadata), t;
956
963
  }
957
- function nt(e) {
958
- let t = new C.Node();
964
+ function at(e) {
965
+ let t = new S.Node();
959
966
  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;
967
+ let n = new S.Node();
968
+ 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
969
  }
963
- function rt(e) {
970
+ function ot(e) {
964
971
  return {
965
972
  emoji: e.getAttr("emoji"),
966
973
  createdAt: new Date(e.getAttr("createdAt")),
967
974
  userId: e.getAttr("userId")
968
975
  };
969
976
  }
970
- function it(e) {
971
- return [...e.attrValues()].map((e) => rt(e)).reduce((e, t) => {
977
+ function st(e) {
978
+ return [...e.attrValues()].map((e) => ot(e)).reduce((e, t) => {
972
979
  let n = e.find((e) => e.emoji === t.emoji);
973
980
  return n ? (n.userIds.push(t.userId), n.createdAt = new Date(Math.min(n.createdAt.getTime(), t.createdAt.getTime()))) : e.push({
974
981
  emoji: t.emoji,
@@ -977,7 +984,7 @@ function it(e) {
977
984
  }), e;
978
985
  }, []);
979
986
  }
980
- function Z(e) {
987
+ function Y(e) {
981
988
  return {
982
989
  type: "comment",
983
990
  id: e.getAttr("id"),
@@ -985,27 +992,26 @@ function Z(e) {
985
992
  createdAt: new Date(e.getAttr("createdAt")),
986
993
  updatedAt: new Date(e.getAttr("updatedAt")),
987
994
  deletedAt: e.getAttr("deletedAt") ? new Date(e.getAttr("deletedAt")) : void 0,
988
- reactions: it(e.getAttr("reactionsByUser")),
995
+ reactions: st(e.getAttr("reactionsByUser")),
989
996
  metadata: e.getAttr("metadata"),
990
997
  body: e.getAttr("body")
991
998
  };
992
999
  }
993
- function Q(e) {
1000
+ function X(e) {
994
1001
  return {
995
1002
  type: "thread",
996
1003
  id: e.getAttr("id"),
997
1004
  createdAt: new Date(e.getAttr("createdAt")),
998
1005
  updatedAt: new Date(e.getAttr("updatedAt")),
999
- comments: (e.getAttr("comments")?.toArray() || []).map((e) => Z(e)),
1006
+ comments: (e.getAttr("comments")?.toArray() || []).map((e) => Y(e)),
1000
1007
  resolved: e.getAttr("resolved"),
1001
1008
  resolvedUpdatedAt: new Date(e.getAttr("resolvedUpdatedAt")),
1002
1009
  resolvedBy: e.getAttr("resolvedBy"),
1003
1010
  metadata: e.getAttr("metadata")
1004
1011
  };
1005
1012
  }
1006
- //#endregion
1007
- //#region src/y/comments/YjsThreadStoreBase.ts
1008
- var at = class extends h {
1013
+ // src/y/comments/YjsThreadStoreBase.ts
1014
+ var ct = class extends g {
1009
1015
  threadsYType;
1010
1016
  constructor(e, t) {
1011
1017
  super(t), this.threadsYType = e;
@@ -1013,12 +1019,12 @@ var at = class extends h {
1013
1019
  getThread(e) {
1014
1020
  let t = this.threadsYType.getAttr(e);
1015
1021
  if (!t) throw Error("Thread not found");
1016
- return Q(t);
1022
+ return X(t);
1017
1023
  }
1018
1024
  getThreads() {
1019
1025
  let e = /* @__PURE__ */ new Map();
1020
1026
  return this.threadsYType.forEachAttr((t, n) => {
1021
- t instanceof C.Node && e.set(String(n), Q(t));
1027
+ t instanceof S.Node && e.set(String(n), X(t));
1022
1028
  }), e;
1023
1029
  }
1024
1030
  subscribe(e) {
@@ -1029,7 +1035,7 @@ var at = class extends h {
1029
1035
  this.threadsYType.unobserveDeep(t);
1030
1036
  };
1031
1037
  }
1032
- }, ot = class extends at {
1038
+ }, lt = class extends ct {
1033
1039
  BASE_URL;
1034
1040
  headers;
1035
1041
  constructor(e, t, n, r) {
@@ -1072,7 +1078,7 @@ var at = class extends h {
1072
1078
  return this.doRequest(`/${t}/comments/${n}/reactions`, "POST", r);
1073
1079
  };
1074
1080
  deleteReaction = (e) => this.doRequest(`/${e.threadId}/comments/${e.commentId}/reactions/${e.emoji}`, "DELETE");
1075
- }, st = class extends at {
1081
+ }, ut = class extends ct {
1076
1082
  userId;
1077
1083
  constructor(e, t, n) {
1078
1084
  super(t, n), this.userId = e;
@@ -1098,13 +1104,13 @@ var at = class extends h {
1098
1104
  resolved: !1,
1099
1105
  metadata: e.metadata
1100
1106
  };
1101
- return this.threadsYType.setAttr(r.id, nt(r)), r;
1107
+ return this.threadsYType.setAttr(r.id, at(r)), r;
1102
1108
  });
1103
1109
  addThreadToDocument = void 0;
1104
1110
  addComment = this.transact((e) => {
1105
1111
  let t = this.threadsYType.getAttr(e.threadId);
1106
1112
  if (!t) throw Error("Thread not found");
1107
- if (!this.auth.canAddComment(Q(t))) throw Error("Not authorized");
1113
+ if (!this.auth.canAddComment(X(t))) throw Error("Not authorized");
1108
1114
  let n = /* @__PURE__ */ new Date(), r = {
1109
1115
  type: "comment",
1110
1116
  id: b(),
@@ -1116,100 +1122,98 @@ var at = class extends h {
1116
1122
  metadata: e.comment.metadata,
1117
1123
  body: e.comment.body
1118
1124
  };
1119
- return t.getAttr("comments").push([tt(r)]), t.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime()), r;
1125
+ return t.getAttr("comments").push([it(r)]), t.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime()), r;
1120
1126
  });
1121
1127
  updateComment = this.transact((e) => {
1122
1128
  let t = this.threadsYType.getAttr(e.threadId);
1123
1129
  if (!t) throw Error("Thread not found");
1124
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1130
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1125
1131
  if (r === -1) throw Error("Comment not found");
1126
1132
  let i = n.get(r);
1127
- if (!this.auth.canUpdateComment(Z(i))) throw Error("Not authorized");
1133
+ if (!this.auth.canUpdateComment(Y(i))) throw Error("Not authorized");
1128
1134
  i.setAttr("body", e.comment.body), i.setAttr("updatedAt", (/* @__PURE__ */ new Date()).getTime()), i.setAttr("metadata", e.comment.metadata);
1129
1135
  });
1130
1136
  deleteComment = this.transact((e) => {
1131
1137
  let t = this.threadsYType.getAttr(e.threadId);
1132
1138
  if (!t) throw Error("Thread not found");
1133
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1139
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1134
1140
  if (r === -1) throw Error("Comment not found");
1135
1141
  let i = n.get(r);
1136
- if (!this.auth.canDeleteComment(Z(i))) throw Error("Not authorized");
1142
+ if (!this.auth.canDeleteComment(Y(i))) throw Error("Not authorized");
1137
1143
  if (i.getAttr("deletedAt")) throw Error("Comment already deleted");
1138
1144
  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
1145
  });
1140
1146
  deleteThread = this.transact((e) => {
1141
- if (!this.auth.canDeleteThread(Q(this.threadsYType.getAttr(e.threadId)))) throw Error("Not authorized");
1147
+ if (!this.auth.canDeleteThread(X(this.threadsYType.getAttr(e.threadId)))) throw Error("Not authorized");
1142
1148
  this.threadsYType.deleteAttr(e.threadId);
1143
1149
  });
1144
1150
  resolveThread = this.transact((e) => {
1145
1151
  let t = this.threadsYType.getAttr(e.threadId);
1146
1152
  if (!t) throw Error("Thread not found");
1147
- if (!this.auth.canResolveThread(Q(t))) throw Error("Not authorized");
1153
+ if (!this.auth.canResolveThread(X(t))) throw Error("Not authorized");
1148
1154
  t.setAttr("resolved", !0), t.setAttr("resolvedUpdatedAt", (/* @__PURE__ */ new Date()).getTime()), t.setAttr("resolvedBy", this.userId);
1149
1155
  });
1150
1156
  unresolveThread = this.transact((e) => {
1151
1157
  let t = this.threadsYType.getAttr(e.threadId);
1152
1158
  if (!t) throw Error("Thread not found");
1153
- if (!this.auth.canUnresolveThread(Q(t))) throw Error("Not authorized");
1159
+ if (!this.auth.canUnresolveThread(X(t))) throw Error("Not authorized");
1154
1160
  t.setAttr("resolved", !1), t.setAttr("resolvedUpdatedAt", (/* @__PURE__ */ new Date()).getTime());
1155
1161
  });
1156
1162
  addReaction = this.transact((e) => {
1157
1163
  let t = this.threadsYType.getAttr(e.threadId);
1158
1164
  if (!t) throw Error("Thread not found");
1159
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1165
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1160
1166
  if (r === -1) throw Error("Comment not found");
1161
1167
  let i = n.get(r);
1162
- if (!this.auth.canAddReaction(Z(i), e.emoji)) throw Error("Not authorized");
1168
+ if (!this.auth.canAddReaction(Y(i), e.emoji)) throw Error("Not authorized");
1163
1169
  let a = /* @__PURE__ */ new Date(), o = `${this.userId}-${e.emoji}`, s = i.getAttr("reactionsByUser");
1164
1170
  if (!s.hasAttr(o)) {
1165
- let t = new C.Node();
1171
+ let t = new S.Node();
1166
1172
  t.setAttr("emoji", e.emoji), t.setAttr("createdAt", a.getTime()), t.setAttr("userId", this.userId), s.setAttr(o, t);
1167
1173
  }
1168
1174
  });
1169
1175
  deleteReaction = this.transact((e) => {
1170
1176
  let t = this.threadsYType.getAttr(e.threadId);
1171
1177
  if (!t) throw Error("Thread not found");
1172
- let n = t.getAttr("comments"), r = $(n, (t) => t.getAttr("id") === e.commentId);
1178
+ let n = t.getAttr("comments"), r = Z(n, (t) => t.getAttr("id") === e.commentId);
1173
1179
  if (r === -1) throw Error("Comment not found");
1174
1180
  let i = n.get(r);
1175
- if (!this.auth.canDeleteReaction(Z(i), e.emoji)) throw Error("Not authorized");
1181
+ if (!this.auth.canDeleteReaction(Y(i), e.emoji)) throw Error("Not authorized");
1176
1182
  let a = `${this.userId}-${e.emoji}`;
1177
1183
  i.getAttr("reactionsByUser").deleteAttr(a);
1178
1184
  });
1179
1185
  };
1180
- function $(e, t) {
1186
+ function Z(e, t) {
1181
1187
  for (let n = 0; n < e.length; n++) if (t(e.get(n))) return n;
1182
1188
  return -1;
1183
1189
  }
1184
- //#endregion
1185
- //#region src/y/extensions/snapshotCodec.ts
1186
- function ct(e) {
1187
- return C.encodeStateAsUpdateV2(e.doc);
1190
+ // src/y/extensions/snapshotCodec.ts
1191
+ function dt(e) {
1192
+ return S.encodeStateAsUpdateV2(e.doc);
1188
1193
  }
1189
- function lt(e, t, n) {
1190
- let r = new C.Doc(n?.suggestionDoc ? { isSuggestionDoc: !0 } : void 0);
1194
+ function ft(e, t, n) {
1195
+ let r = new S.Doc(n?.suggestionDoc ? { isSuggestionDoc: !0 } : void 0);
1191
1196
  try {
1192
- return C.applyUpdateV2(r, t), {
1197
+ return S.applyUpdateV2(r, t), {
1193
1198
  doc: r,
1194
- fragment: W(e, r)
1199
+ fragment: G(e, r)
1195
1200
  };
1196
1201
  } catch (e) {
1197
1202
  throw r.destroy(), e;
1198
1203
  }
1199
1204
  }
1200
- function ut(e) {
1205
+ function pt(e) {
1201
1206
  e?.doc.destroy();
1202
1207
  }
1203
- //#endregion
1204
- //#region src/y/extensions/snapshotPreview.ts
1205
- function dt(e, t) {
1208
+ // src/y/extensions/snapshotPreview.ts
1209
+ function Q(e, t) {
1206
1210
  let n = e.store.clients.get(t.client)?.at(-1);
1207
1211
  return n !== void 0 && t.clock < n.id.clock + n.length;
1208
1212
  }
1209
- function ft(e, t, n) {
1213
+ function mt(e, t, n) {
1210
1214
  let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1211
1215
  for (let a = e._start; a !== null; a = a.right) {
1212
- let e = !dt(t, a.id);
1216
+ let e = !Q(t, a.id);
1213
1217
  if (!e && !a.deleted) continue;
1214
1218
  let [o, s] = e ? [r, n.inserts] : [i, n.deletes];
1215
1219
  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 +1223,18 @@ function ft(e, t, n) {
1219
1223
  deleted: [...i.values()]
1220
1224
  };
1221
1225
  }
1222
- function pt(e) {
1226
+ function ht(e) {
1223
1227
  let t = [];
1224
1228
  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) });
1229
+ if (n.content instanceof S.ContentType) t.push({
1230
+ id: n.id,
1231
+ node: n.content.type
1232
+ });
1233
+ else for (let e = 0; e < n.length; e++) t.push({ id: S.createID(n.id.client, n.id.clock + e) });
1233
1234
  }
1234
1235
  return t;
1235
1236
  }
1236
- function mt(e, t, n) {
1237
+ function gt(e, t, n) {
1237
1238
  for (let [r, i] of e._map) {
1238
1239
  let e = t._map.get(r);
1239
1240
  if (!i.deleted) {
@@ -1241,33 +1242,33 @@ function mt(e, t, n) {
1241
1242
  n.push([i.id, e.id]);
1242
1243
  }
1243
1244
  }
1244
- let r = pt(e), i = pt(t);
1245
+ let r = ht(e), i = ht(t);
1245
1246
  return r.length === i.length && r.every((e, t) => {
1246
1247
  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;
1248
+ return n.push([e.id, r.id]), e.node && r.node ? gt(e.node, r.node, n) : !e.node && !r.node;
1248
1249
  });
1249
1250
  }
1250
- function ht(e) {
1251
+ function _t(e) {
1251
1252
  let t = e._observers;
1252
1253
  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
1254
  }
1254
- function gt(e, t) {
1255
- return e.map((e) => C.createContentAttribute(e.name.replace(/^(insert|delete)/, t), e.val));
1255
+ function vt(e, t) {
1256
+ return e.map((e) => S.createContentAttribute(e.name.replace(/^(insert|delete)/, t), e.val));
1256
1257
  }
1257
- function _t(e, t, n, r) {
1258
- ht(e.doc);
1258
+ function yt(e, t, n, r) {
1259
+ _t(e.doc);
1259
1260
  for (let i = 0; i < e.length; i++) {
1260
1261
  let a = e.get(i);
1261
- if (a instanceof C.Node) {
1262
+ if (a instanceof S.Node) {
1262
1263
  if (a.name === "blockContainer" && a._item) {
1263
- let o = dt(t, a._item.id) ? W(a, t) : void 0;
1264
+ let o = Q(t, a._item.id) ? G(a, t) : void 0;
1264
1265
  if (o && !I(o.toDeltaDeep(), a.toDeltaDeep())) {
1265
- let { inserted: o, deleted: s } = n ? ft(a, t, n) : {
1266
+ let { inserted: o, deleted: s } = n ? mt(a, t, n) : {
1266
1267
  inserted: [],
1267
1268
  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();
1269
+ }, c = a.doc, l = o.length ? o : vt(s, "insert"), u = s.length ? s : vt(o, "delete"), d = S.createIdMap(), f = S.createIdSet();
1269
1270
  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)));
1271
+ 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
1272
  }
1272
1273
  c.on("beforeObserverCalls", p);
1273
1274
  try {
@@ -1275,11 +1276,11 @@ function _t(e, t, n, r) {
1275
1276
  let r = a.clone();
1276
1277
  e.insert(i + 1, [r]);
1277
1278
  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;
1279
+ if (n && gt(a, r, o)) for (let [e, r] of o) {
1280
+ let i = Q(t, e) ? void 0 : n.inserts.slice(e.client, e.clock, 1)[0]?.attrs;
1280
1281
  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));
1282
+ let e = S.createIdSet();
1283
+ e.add(r.client, r.clock, 1), f.add(r.client, r.clock, 1), S.insertIntoIdMap(d, S.createIdMapFromIdSet(e, i));
1283
1284
  }
1284
1285
  }
1285
1286
  e.delete(i);
@@ -1290,65 +1291,69 @@ function _t(e, t, n, r) {
1290
1291
  continue;
1291
1292
  }
1292
1293
  }
1293
- _t(a, t, n, r);
1294
+ yt(a, t, n, r);
1294
1295
  }
1295
1296
  }
1296
1297
  }
1297
- function vt(e, t, n, r, i) {
1298
- let a = r ? lt(t, r, { suggestionDoc: !0 }) : void 0;
1298
+ function bt(e, t, n, r, i) {
1299
+ let a = r ? ft(t, r, { suggestionDoc: !0 }) : void 0;
1299
1300
  try {
1300
- let r = lt(t, n);
1301
+ let r = ft(t, n);
1301
1302
  try {
1302
1303
  let t = i;
1303
1304
  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])));
1305
+ let e = S.createContentMap();
1306
+ yt(r.fragment, a.doc, i, e), i && (t = S.createContentMap(S.mergeIdMaps([i.inserts, e.inserts]), S.mergeIdMaps([i.deletes, e.deletes])));
1306
1307
  }
1307
1308
  e.exec(x({
1308
1309
  ytype: r.fragment,
1309
- renderer: a ? C.createDiffRenderer(a.doc, r.doc, t ? { attributions: t } : void 0) : void 0
1310
+ renderer: a ? S.createDiffRenderer(a.doc, r.doc, t ? { attributions: t } : void 0) : void 0
1310
1311
  }));
1311
1312
  } finally {
1312
- ut(r);
1313
+ pt(r);
1313
1314
  }
1314
1315
  } finally {
1315
- ut(a);
1316
+ pt(a);
1316
1317
  }
1317
1318
  }
1318
- //#endregion
1319
- //#region src/y/extensions/Versioning.ts
1320
- function yt(e, t) {
1319
+ // src/y/extensions/Versioning.ts
1320
+ function $(e, t) {
1321
1321
  return {
1322
1322
  supportsComparison: !0,
1323
1323
  open() {
1324
- let n = e.getExtension(J), r = S.getState(e.prosemirrorState);
1324
+ let n = e.getExtension(q), r = ge.getState(e.prosemirrorState);
1325
1325
  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
1326
  let i = {
1327
- content: ct(t),
1327
+ content: dt(t),
1328
1328
  capturedAt: Date.now()
1329
1329
  };
1330
1330
  try {
1331
- n.fork(), e.exec((e, t) => ce(e, t ?? null));
1331
+ n.fork(), e.exec((e, t) => le(e, t ?? null));
1332
1332
  } catch (e) {
1333
- throw n.merge({ keepChanges: !1 }), e;
1333
+ throw n.merge({
1334
+ keepChanges: !1,
1335
+ renderer: r.renderer
1336
+ }), e;
1334
1337
  }
1335
1338
  let a = !1;
1336
1339
  return {
1337
1340
  current: i,
1338
1341
  show({ content: n, comparison: r }) {
1339
1342
  if (a) throw Error("Version view is closed");
1340
- vt(e, t, n, r?.content, r?.attributions);
1343
+ bt(e, t, n, r?.content, r?.attributions);
1341
1344
  },
1342
1345
  close() {
1343
- a ||= (n.merge({ keepChanges: !1 }), !0);
1346
+ a ||= (n.merge({
1347
+ keepChanges: !1,
1348
+ renderer: r.renderer
1349
+ }), !0);
1344
1350
  }
1345
1351
  };
1346
1352
  }
1347
1353
  };
1348
1354
  }
1349
- //#endregion
1350
- //#region src/y/versioning/yhubClient.ts
1351
- var bt = class {
1355
+ // src/y/versioning/yhubClient.ts
1356
+ var xt = class {
1352
1357
  baseUrl;
1353
1358
  documentPath;
1354
1359
  headers;
@@ -1401,7 +1406,7 @@ var bt = class {
1401
1406
  }
1402
1407
  async getVersion(e) {
1403
1408
  return this.request("version", (e) => {
1404
- let { versions: t } = E(e);
1409
+ let { versions: t } = T(e);
1405
1410
  return t[0];
1406
1411
  }, {
1407
1412
  from: e,
@@ -1415,9 +1420,9 @@ var bt = class {
1415
1420
  name: t,
1416
1421
  ...n === void 0 ? {} : { custom: n }
1417
1422
  };
1418
- return this.request("version", (e) => E(e), void 0, {
1423
+ return this.request("version", (e) => T(e), void 0, {
1419
1424
  method: "POST",
1420
- body: _e(r)
1425
+ body: E(r)
1421
1426
  });
1422
1427
  }
1423
1428
  async updateVersion(e, t, n = e.custom) {
@@ -1428,9 +1433,9 @@ var bt = class {
1428
1433
  name: t,
1429
1434
  custom: n
1430
1435
  };
1431
- return this.request("version", (e) => E(e), void 0, {
1436
+ return this.request("version", (e) => T(e), void 0, {
1432
1437
  method: "PATCH",
1433
- body: _e(r)
1438
+ body: E(r)
1434
1439
  });
1435
1440
  }
1436
1441
  async deleteVersion(e) {
@@ -1441,7 +1446,7 @@ var bt = class {
1441
1446
  }
1442
1447
  async getActivity(e, t) {
1443
1448
  return this.request("activity", (e) => {
1444
- let { activity: t } = E(e);
1449
+ let { activity: t } = T(e);
1445
1450
  return t.map((e) => ({
1446
1451
  ...e,
1447
1452
  by: (Array.isArray(e.by) ? e.by : e.by?.split(",") ?? []).filter((e) => e !== null).map((e) => e.trim()).filter(Boolean),
@@ -1450,18 +1455,18 @@ var bt = class {
1450
1455
  }, e, { signal: t });
1451
1456
  }
1452
1457
  async getChangeset(e, t) {
1453
- return this.request("changeset", (e) => E(e), e, { signal: t });
1458
+ return this.request("changeset", (e) => T(e), e, { signal: t });
1454
1459
  }
1455
1460
  async getDocument(e) {
1456
1461
  return this.request("ydoc", (e) => {
1457
- let { doc: t } = E(e);
1462
+ let { doc: t } = T(e);
1458
1463
  if (!t) throw Error("YHub returned no document state.");
1459
1464
  return t;
1460
1465
  }, e);
1461
1466
  }
1462
1467
  async getContent(e, t) {
1463
1468
  return this.request("changeset", (t) => {
1464
- let { ydoc: n } = E(t);
1469
+ let { ydoc: n } = T(t);
1465
1470
  if (!n) throw Error(`YHub returned no document state at timestamp ${e}.`);
1466
1471
  return n;
1467
1472
  }, {
@@ -1471,7 +1476,7 @@ var bt = class {
1471
1476
  }
1472
1477
  async getAttributions(e, t, n) {
1473
1478
  return this.request("changeset", (e) => {
1474
- let { attributions: t } = E(e);
1479
+ let { attributions: t } = T(e);
1475
1480
  if (!t) throw Error("YHub returned no attributions.");
1476
1481
  return t;
1477
1482
  }, {
@@ -1483,31 +1488,30 @@ var bt = class {
1483
1488
  async rollback(e) {
1484
1489
  return this.request("rollback", () => void 0, void 0, {
1485
1490
  method: "POST",
1486
- body: _e(e)
1491
+ body: E(e)
1487
1492
  });
1488
1493
  }
1489
1494
  };
1490
- //#endregion
1491
- //#region src/y/versioning/yhub.ts
1492
- function xt(e) {
1493
- return f((t) => {
1494
- let n = t.getExtension(X);
1495
+ // src/y/versioning/yhub.ts
1496
+ function St(e) {
1497
+ return d((t) => {
1498
+ let n = t.getExtension(J);
1495
1499
  if (!n) throw Error("Y14 versioning requires Y14 collaboration");
1496
1500
  return {
1497
- adapter: yt(t, n.fragment),
1501
+ adapter: $(t, n.fragment),
1498
1502
  storage: e.storage,
1499
1503
  resolveUsers: n.userStore,
1500
1504
  scrollToFirstChange: e.scrollToFirstChange
1501
1505
  };
1502
1506
  })();
1503
1507
  }
1504
- function St(e) {
1505
- return f((t) => {
1506
- let n = t.getExtension(X);
1508
+ function Ct(e) {
1509
+ return d((t) => {
1510
+ let n = t.getExtension(J);
1507
1511
  if (!n) throw Error("Y14 versioning requires Y14 collaboration");
1508
1512
  return {
1509
- adapter: yt(t, n.fragment),
1510
- storage: Ct({
1513
+ adapter: $(t, n.fragment),
1514
+ storage: wt({
1511
1515
  ...e,
1512
1516
  fragment: n.fragment,
1513
1517
  beforeRestoreName: t.dictionary.versioning.before_restore
@@ -1517,8 +1521,8 @@ function St(e) {
1517
1521
  };
1518
1522
  })();
1519
1523
  }
1520
- function Ct(e) {
1521
- let { fragment: t, beforeRestoreName: n } = e, r = new bt(e);
1524
+ function wt(e) {
1525
+ let { fragment: t, beforeRestoreName: n } = e, r = new xt(e);
1522
1526
  function i(e) {
1523
1527
  let t = e.split("-"), n = Number(t[0]), r = Number(t[1]);
1524
1528
  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 +1611,14 @@ function Ct(e) {
1607
1611
  let n = await r.getContent(i(e).to, t);
1608
1612
  return n.ok ? {
1609
1613
  ok: !0,
1610
- value: C.convertUpdateFormatV1ToV2(n.value)
1614
+ value: S.convertUpdateFormatV1ToV2(n.value)
1611
1615
  } : n;
1612
1616
  },
1613
1617
  async getAttributions(e, t, n, a) {
1614
1618
  let o = await r.getAttributions(i(t).to + 1, e.type === "current" ? void 0 : i(e.id).to, a);
1615
1619
  return o.ok ? {
1616
1620
  ok: !0,
1617
- value: C.decodeContentMap(o.value)
1621
+ value: S.decodeContentMap(o.value)
1618
1622
  } : o;
1619
1623
  },
1620
1624
  async create(e, n) {
@@ -1627,9 +1631,9 @@ function Ct(e) {
1627
1631
  };
1628
1632
  let s = await r.getContent(o.to);
1629
1633
  if (!s.ok) return s;
1630
- let c = new C.Doc(), l = new C.Doc();
1634
+ let c = new S.Doc(), l = new S.Doc();
1631
1635
  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 {
1636
+ if (S.applyUpdateV2(c, e), S.applyUpdate(l, s.value), JSON.stringify(G(t, c).toJSON()) !== JSON.stringify(G(t, l).toJSON())) return {
1633
1637
  ok: !1,
1634
1638
  error: { type: "conflict" }
1635
1639
  };
@@ -1656,7 +1660,7 @@ function Ct(e) {
1656
1660
  let { to: o } = i(e), [s, c] = await Promise.all([a(void 0, { limit: 1 }), r.getDocument({ gc: !1 })]);
1657
1661
  if (!s.ok) return s;
1658
1662
  if (!c.ok) return c;
1659
- let l = G(t, c.value);
1663
+ let l = Be(t, c.value);
1660
1664
  if (s.value[0]) {
1661
1665
  let e = await r.getVersion(s.value[0].to);
1662
1666
  if (!e.ok) return e;
@@ -1667,14 +1671,14 @@ function Ct(e) {
1667
1671
  }
1668
1672
  let u = await r.rollback({
1669
1673
  from: o + 1,
1670
- contentIds: C.encodeContentIds({
1674
+ contentIds: S.encodeContentIds({
1671
1675
  inserts: l,
1672
1676
  deletes: l
1673
1677
  })
1674
1678
  });
1675
1679
  if (!u.ok) return u;
1676
1680
  let d = await r.getDocument({ gc: !1 });
1677
- return d.ok ? (C.applyUpdate(t.doc, d.value), {
1681
+ return d.ok ? (S.applyUpdate(t.doc, d.value), {
1678
1682
  ok: !0,
1679
1683
  value: void 0
1680
1684
  }) : d.error.type === "timeout" ? {
@@ -1716,7 +1720,4 @@ function Ct(e) {
1716
1720
  }
1717
1721
  };
1718
1722
  }
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
1723
+ 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 };