@ecomcx/ecomweb-editor 1.24.0 → 1.25.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 (1608) hide show
  1. package/README.md +4 -6
  2. package/package.json +5 -36
  3. package/src/index.ts +1 -32
  4. package/src/shared/block-defs.ts +3 -4
  5. package/src/shared/panel-store.ts +3 -3
  6. package/src/shared/types.ts +0 -21
  7. package/src/v2/blocks/layout.tsx +36 -31
  8. package/src/v2/blocks/media.tsx +9 -7
  9. package/src/v2/blocks/text.tsx +21 -7
  10. package/src/v2/canvas/block-list.tsx +1 -0
  11. package/src/v2/canvas/canvas-css.ts +14 -3
  12. package/src/v2/core/registry.ts +1 -1
  13. package/src/v2/index.ts +8 -0
  14. package/src/v2/text/rich-schema.ts +2 -1
  15. package/node_modules/@floating-ui/core/LICENSE +0 -20
  16. package/node_modules/@floating-ui/core/README.md +0 -4
  17. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +0 -1
  18. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +0 -1164
  19. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +0 -535
  20. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +0 -535
  21. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +0 -1038
  22. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -1038
  23. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +0 -1183
  24. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +0 -1
  25. package/node_modules/@floating-ui/core/package.json +0 -63
  26. package/node_modules/@floating-ui/dom/LICENSE +0 -20
  27. package/node_modules/@floating-ui/dom/README.md +0 -4
  28. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +0 -1
  29. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +0 -964
  30. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +0 -362
  31. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +0 -362
  32. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +0 -789
  33. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -789
  34. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +0 -983
  35. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +0 -1
  36. package/node_modules/@floating-ui/dom/package.json +0 -72
  37. package/node_modules/@floating-ui/utils/LICENSE +0 -20
  38. package/node_modules/@floating-ui/utils/README.md +0 -4
  39. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +0 -105
  40. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +0 -105
  41. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +0 -47
  42. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +0 -47
  43. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +0 -165
  44. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -165
  45. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +0 -192
  46. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +0 -1
  47. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +0 -136
  48. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -136
  49. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +0 -167
  50. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +0 -1
  51. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +0 -47
  52. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +0 -165
  53. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +0 -192
  54. package/node_modules/@floating-ui/utils/dom/package.json +0 -6
  55. package/node_modules/@floating-ui/utils/package.json +0 -70
  56. package/node_modules/@tiptap/core/LICENSE.md +0 -21
  57. package/node_modules/@tiptap/core/README.md +0 -18
  58. package/node_modules/@tiptap/core/dist/index.cjs +0 -8463
  59. package/node_modules/@tiptap/core/dist/index.cjs.map +0 -1
  60. package/node_modules/@tiptap/core/dist/index.d.cts +0 -5798
  61. package/node_modules/@tiptap/core/dist/index.d.cts.map +0 -1
  62. package/node_modules/@tiptap/core/dist/index.d.ts +0 -5797
  63. package/node_modules/@tiptap/core/dist/index.d.ts.map +0 -1
  64. package/node_modules/@tiptap/core/dist/index.js +0 -8288
  65. package/node_modules/@tiptap/core/dist/index.js.map +0 -1
  66. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +0 -70
  67. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +0 -1
  68. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +0 -28
  69. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts.map +0 -1
  70. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +0 -28
  71. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts.map +0 -1
  72. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -64
  73. package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
  74. package/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -13
  75. package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +0 -1
  76. package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +0 -1
  77. package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +0 -1
  78. package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +0 -1
  79. package/node_modules/@tiptap/core/jsx-runtime/index.cjs +0 -1
  80. package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +0 -1
  81. package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +0 -1
  82. package/node_modules/@tiptap/core/jsx-runtime/index.js +0 -1
  83. package/node_modules/@tiptap/core/package.json +0 -74
  84. package/node_modules/@tiptap/core/src/CommandManager.test.ts +0 -220
  85. package/node_modules/@tiptap/core/src/CommandManager.ts +0 -208
  86. package/node_modules/@tiptap/core/src/Editor.test.ts +0 -756
  87. package/node_modules/@tiptap/core/src/Editor.ts +0 -908
  88. package/node_modules/@tiptap/core/src/EventEmitter.ts +0 -71
  89. package/node_modules/@tiptap/core/src/Extendable.test.ts +0 -764
  90. package/node_modules/@tiptap/core/src/Extendable.ts +0 -668
  91. package/node_modules/@tiptap/core/src/Extension.ts +0 -59
  92. package/node_modules/@tiptap/core/src/ExtensionManager.test.ts +0 -852
  93. package/node_modules/@tiptap/core/src/ExtensionManager.ts +0 -589
  94. package/node_modules/@tiptap/core/src/InputRule.test.ts +0 -113
  95. package/node_modules/@tiptap/core/src/InputRule.ts +0 -373
  96. package/node_modules/@tiptap/core/src/Mark.ts +0 -231
  97. package/node_modules/@tiptap/core/src/MarkView.test.ts +0 -53
  98. package/node_modules/@tiptap/core/src/MarkView.ts +0 -132
  99. package/node_modules/@tiptap/core/src/Node.ts +0 -390
  100. package/node_modules/@tiptap/core/src/NodePos.test.ts +0 -722
  101. package/node_modules/@tiptap/core/src/NodePos.ts +0 -270
  102. package/node_modules/@tiptap/core/src/NodeView.test.ts +0 -157
  103. package/node_modules/@tiptap/core/src/NodeView.ts +0 -367
  104. package/node_modules/@tiptap/core/src/PasteRule.ts +0 -396
  105. package/node_modules/@tiptap/core/src/Tracker.ts +0 -38
  106. package/node_modules/@tiptap/core/src/commands/blur.ts +0 -29
  107. package/node_modules/@tiptap/core/src/commands/canJoinItemsAt.ts +0 -13
  108. package/node_modules/@tiptap/core/src/commands/clearContent.ts +0 -25
  109. package/node_modules/@tiptap/core/src/commands/clearNodes.ts +0 -57
  110. package/node_modules/@tiptap/core/src/commands/command.ts +0 -22
  111. package/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +0 -21
  112. package/node_modules/@tiptap/core/src/commands/cut.test.ts +0 -38
  113. package/node_modules/@tiptap/core/src/commands/cut.ts +0 -36
  114. package/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +0 -44
  115. package/node_modules/@tiptap/core/src/commands/deleteNode.ts +0 -41
  116. package/node_modules/@tiptap/core/src/commands/deleteRange.ts +0 -26
  117. package/node_modules/@tiptap/core/src/commands/deleteSelection.test.ts +0 -125
  118. package/node_modules/@tiptap/core/src/commands/deleteSelection.ts +0 -109
  119. package/node_modules/@tiptap/core/src/commands/enter.ts +0 -19
  120. package/node_modules/@tiptap/core/src/commands/exitCode.ts +0 -21
  121. package/node_modules/@tiptap/core/src/commands/extendMarkRange.test.ts +0 -455
  122. package/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +0 -52
  123. package/node_modules/@tiptap/core/src/commands/first.ts +0 -26
  124. package/node_modules/@tiptap/core/src/commands/focus.ts +0 -108
  125. package/node_modules/@tiptap/core/src/commands/forEach.ts +0 -24
  126. package/node_modules/@tiptap/core/src/commands/index.ts +0 -59
  127. package/node_modules/@tiptap/core/src/commands/insertContent.test.ts +0 -197
  128. package/node_modules/@tiptap/core/src/commands/insertContent.ts +0 -50
  129. package/node_modules/@tiptap/core/src/commands/insertContentAt.test.ts +0 -133
  130. package/node_modules/@tiptap/core/src/commands/insertContentAt.ts +0 -208
  131. package/node_modules/@tiptap/core/src/commands/insertDefaultBlock.test.ts +0 -178
  132. package/node_modules/@tiptap/core/src/commands/insertDefaultBlock.ts +0 -97
  133. package/node_modules/@tiptap/core/src/commands/join.ts +0 -69
  134. package/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +0 -42
  135. package/node_modules/@tiptap/core/src/commands/joinItemForward.test.ts +0 -138
  136. package/node_modules/@tiptap/core/src/commands/joinItemForward.ts +0 -42
  137. package/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +0 -20
  138. package/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +0 -20
  139. package/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +0 -100
  140. package/node_modules/@tiptap/core/src/commands/lift.ts +0 -34
  141. package/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +0 -21
  142. package/node_modules/@tiptap/core/src/commands/liftListItem.ts +0 -26
  143. package/node_modules/@tiptap/core/src/commands/newlineInCode.ts +0 -21
  144. package/node_modules/@tiptap/core/src/commands/resetAttributes.ts +0 -80
  145. package/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +0 -23
  146. package/node_modules/@tiptap/core/src/commands/selectAll.ts +0 -27
  147. package/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +0 -21
  148. package/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +0 -21
  149. package/node_modules/@tiptap/core/src/commands/selectParentNode.ts +0 -21
  150. package/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +0 -23
  151. package/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +0 -23
  152. package/node_modules/@tiptap/core/src/commands/setContent.test.ts +0 -177
  153. package/node_modules/@tiptap/core/src/commands/setContent.ts +0 -79
  154. package/node_modules/@tiptap/core/src/commands/setMark.ts +0 -122
  155. package/node_modules/@tiptap/core/src/commands/setMeta.ts +0 -25
  156. package/node_modules/@tiptap/core/src/commands/setNode.ts +0 -57
  157. package/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +0 -31
  158. package/node_modules/@tiptap/core/src/commands/setTextDirection.ts +0 -51
  159. package/node_modules/@tiptap/core/src/commands/setTextSelection.ts +0 -36
  160. package/node_modules/@tiptap/core/src/commands/sinkListItem.ts +0 -26
  161. package/node_modules/@tiptap/core/src/commands/splitBlock.test.ts +0 -107
  162. package/node_modules/@tiptap/core/src/commands/splitBlock.ts +0 -136
  163. package/node_modules/@tiptap/core/src/commands/splitListItem.ts +0 -166
  164. package/node_modules/@tiptap/core/src/commands/toggleList.ts +0 -308
  165. package/node_modules/@tiptap/core/src/commands/toggleMark.ts +0 -51
  166. package/node_modules/@tiptap/core/src/commands/toggleNode.ts +0 -47
  167. package/node_modules/@tiptap/core/src/commands/toggleWrap.ts +0 -32
  168. package/node_modules/@tiptap/core/src/commands/undoInputRule.ts +0 -49
  169. package/node_modules/@tiptap/core/src/commands/unsetAllMarks.test.ts +0 -109
  170. package/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +0 -44
  171. package/node_modules/@tiptap/core/src/commands/unsetMark.ts +0 -65
  172. package/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +0 -51
  173. package/node_modules/@tiptap/core/src/commands/updateAttributes.ts +0 -150
  174. package/node_modules/@tiptap/core/src/commands/updateDecorations.ts +0 -28
  175. package/node_modules/@tiptap/core/src/commands/utils/appendContentNode.ts +0 -25
  176. package/node_modules/@tiptap/core/src/commands/utils/appendNestedList.test.ts +0 -35
  177. package/node_modules/@tiptap/core/src/commands/utils/appendNestedList.ts +0 -43
  178. package/node_modules/@tiptap/core/src/commands/utils/convertListItem.ts +0 -32
  179. package/node_modules/@tiptap/core/src/commands/utils/convertListItems.ts +0 -24
  180. package/node_modules/@tiptap/core/src/commands/utils/createNode.ts +0 -18
  181. package/node_modules/@tiptap/core/src/commands/utils/findNodePosition.ts +0 -18
  182. package/node_modules/@tiptap/core/src/commands/utils/flushPendingContent.ts +0 -23
  183. package/node_modules/@tiptap/core/src/commands/utils/listConversionTypes.ts +0 -17
  184. package/node_modules/@tiptap/core/src/commands/wrapIn.ts +0 -27
  185. package/node_modules/@tiptap/core/src/commands/wrapInList.ts +0 -27
  186. package/node_modules/@tiptap/core/src/decorations/Decoration.test.ts +0 -40
  187. package/node_modules/@tiptap/core/src/decorations/Decoration.ts +0 -177
  188. package/node_modules/@tiptap/core/src/decorations/DecorationManager.test.ts +0 -821
  189. package/node_modules/@tiptap/core/src/decorations/DecorationManager.ts +0 -440
  190. package/node_modules/@tiptap/core/src/decorations/constants.ts +0 -7
  191. package/node_modules/@tiptap/core/src/decorations/createWidgetDecoration.test.ts +0 -224
  192. package/node_modules/@tiptap/core/src/decorations/createWidgetDecoration.ts +0 -221
  193. package/node_modules/@tiptap/core/src/decorations/decorationApplyScope.test.ts +0 -50
  194. package/node_modules/@tiptap/core/src/decorations/decorationApplyScope.ts +0 -45
  195. package/node_modules/@tiptap/core/src/decorations/helpers/buildDecorationSet.ts +0 -25
  196. package/node_modules/@tiptap/core/src/decorations/helpers/decorationsToPMDecorations.ts +0 -36
  197. package/node_modules/@tiptap/core/src/decorations/helpers/filterOutOfRangeDecorations.ts +0 -52
  198. package/node_modules/@tiptap/core/src/decorations/helpers/findDuplicateWidgetKeys.ts +0 -37
  199. package/node_modules/@tiptap/core/src/decorations/helpers/getRebuildRanges.test.ts +0 -147
  200. package/node_modules/@tiptap/core/src/decorations/helpers/getRebuildRanges.ts +0 -96
  201. package/node_modules/@tiptap/core/src/decorations/helpers/hasResolvableChangedRange.ts +0 -24
  202. package/node_modules/@tiptap/core/src/decorations/helpers/isAttrStep.ts +0 -21
  203. package/node_modules/@tiptap/core/src/decorations/helpers/mapDecorationSet.ts +0 -31
  204. package/node_modules/@tiptap/core/src/decorations/helpers/mapDecorations.ts +0 -26
  205. package/node_modules/@tiptap/core/src/decorations/helpers/mergeDecorationSets.ts +0 -16
  206. package/node_modules/@tiptap/core/src/decorations/helpers/rangeOwnsPosition.ts +0 -38
  207. package/node_modules/@tiptap/core/src/decorations/helpers/shouldRecomputeDecoration.ts +0 -24
  208. package/node_modules/@tiptap/core/src/decorations/helpers/unionWidgetKeys.ts +0 -15
  209. package/node_modules/@tiptap/core/src/decorations/helpers/validateDecorationSpec.ts +0 -49
  210. package/node_modules/@tiptap/core/src/decorations/helpers/widgetKeyOf.ts +0 -11
  211. package/node_modules/@tiptap/core/src/decorations/index.ts +0 -28
  212. package/node_modules/@tiptap/core/src/decorations/types.ts +0 -87
  213. package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.test.ts +0 -68
  214. package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +0 -53
  215. package/node_modules/@tiptap/core/src/extensions/commands.ts +0 -14
  216. package/node_modules/@tiptap/core/src/extensions/delete.test.ts +0 -49
  217. package/node_modules/@tiptap/core/src/extensions/delete.ts +0 -101
  218. package/node_modules/@tiptap/core/src/extensions/drop.ts +0 -26
  219. package/node_modules/@tiptap/core/src/extensions/editable.ts +0 -18
  220. package/node_modules/@tiptap/core/src/extensions/focusEvents.ts +0 -45
  221. package/node_modules/@tiptap/core/src/extensions/index.ts +0 -10
  222. package/node_modules/@tiptap/core/src/extensions/keymap.ts +0 -165
  223. package/node_modules/@tiptap/core/src/extensions/paste.ts +0 -25
  224. package/node_modules/@tiptap/core/src/extensions/tabindex.test.ts +0 -75
  225. package/node_modules/@tiptap/core/src/extensions/tabindex.ts +0 -58
  226. package/node_modules/@tiptap/core/src/extensions/textDirection.ts +0 -88
  227. package/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +0 -69
  228. package/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +0 -24
  229. package/node_modules/@tiptap/core/src/helpers/createChainableState.ts +0 -42
  230. package/node_modules/@tiptap/core/src/helpers/createDocument.ts +0 -24
  231. package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.test.ts +0 -332
  232. package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +0 -128
  233. package/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +0 -18
  234. package/node_modules/@tiptap/core/src/helpers/findChildren.ts +0 -24
  235. package/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +0 -40
  236. package/node_modules/@tiptap/core/src/helpers/findParentNode.ts +0 -18
  237. package/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +0 -37
  238. package/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +0 -34
  239. package/node_modules/@tiptap/core/src/helpers/generateHTML.test.ts +0 -29
  240. package/node_modules/@tiptap/core/src/helpers/generateHTML.ts +0 -18
  241. package/node_modules/@tiptap/core/src/helpers/generateJSON.test.ts +0 -31
  242. package/node_modules/@tiptap/core/src/helpers/generateJSON.ts +0 -18
  243. package/node_modules/@tiptap/core/src/helpers/generateText.test.ts +0 -71
  244. package/node_modules/@tiptap/core/src/helpers/generateText.ts +0 -34
  245. package/node_modules/@tiptap/core/src/helpers/getAttributes.ts +0 -32
  246. package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.test.ts +0 -473
  247. package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +0 -120
  248. package/node_modules/@tiptap/core/src/helpers/getChangedRanges.test.ts +0 -48
  249. package/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +0 -85
  250. package/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +0 -54
  251. package/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +0 -32
  252. package/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +0 -13
  253. package/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +0 -33
  254. package/node_modules/@tiptap/core/src/helpers/getMarkRange.test.ts +0 -237
  255. package/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +0 -105
  256. package/node_modules/@tiptap/core/src/helpers/getMarkType.ts +0 -15
  257. package/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +0 -44
  258. package/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +0 -34
  259. package/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +0 -25
  260. package/node_modules/@tiptap/core/src/helpers/getNodeType.ts +0 -15
  261. package/node_modules/@tiptap/core/src/helpers/getPreviousBlockSibling.test.ts +0 -111
  262. package/node_modules/@tiptap/core/src/helpers/getPreviousBlockSibling.ts +0 -36
  263. package/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +0 -23
  264. package/node_modules/@tiptap/core/src/helpers/getSchema.ts +0 -12
  265. package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.test.ts +0 -171
  266. package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +0 -41
  267. package/node_modules/@tiptap/core/src/helpers/getSchemaSpecByResolvedExtensions.test.ts +0 -101
  268. package/node_modules/@tiptap/core/src/helpers/getSchemaSpecByResolvedExtensions.ts +0 -240
  269. package/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +0 -11
  270. package/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +0 -19
  271. package/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +0 -28
  272. package/node_modules/@tiptap/core/src/helpers/getText.ts +0 -28
  273. package/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +0 -52
  274. package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.test.ts +0 -40
  275. package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +0 -34
  276. package/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +0 -16
  277. package/node_modules/@tiptap/core/src/helpers/index.ts +0 -71
  278. package/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +0 -47
  279. package/node_modules/@tiptap/core/src/helpers/isActive.test.ts +0 -106
  280. package/node_modules/@tiptap/core/src/helpers/isActive.ts +0 -27
  281. package/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +0 -29
  282. package/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +0 -11
  283. package/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +0 -13
  284. package/node_modules/@tiptap/core/src/helpers/isFragment.ts +0 -14
  285. package/node_modules/@tiptap/core/src/helpers/isList.ts +0 -27
  286. package/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +0 -94
  287. package/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +0 -51
  288. package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.test.ts +0 -250
  289. package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +0 -62
  290. package/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +0 -5
  291. package/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.test.ts +0 -218
  292. package/node_modules/@tiptap/core/src/helpers/isNodeViewSelected.ts +0 -42
  293. package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddMarkStep.test.ts +0 -19
  294. package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddMarkStep.ts +0 -31
  295. package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddNodeMarkStep.test.ts +0 -19
  296. package/node_modules/@tiptap/core/src/helpers/isProseMirrorAddNodeMarkStep.ts +0 -31
  297. package/node_modules/@tiptap/core/src/helpers/isProseMirrorAttrStep.test.ts +0 -17
  298. package/node_modules/@tiptap/core/src/helpers/isProseMirrorAttrStep.ts +0 -31
  299. package/node_modules/@tiptap/core/src/helpers/isProseMirrorCellSelection.test.ts +0 -17
  300. package/node_modules/@tiptap/core/src/helpers/isProseMirrorCellSelection.ts +0 -18
  301. package/node_modules/@tiptap/core/src/helpers/isProseMirrorContent.ts +0 -14
  302. package/node_modules/@tiptap/core/src/helpers/isProseMirrorDocAttrStep.test.ts +0 -17
  303. package/node_modules/@tiptap/core/src/helpers/isProseMirrorDocAttrStep.ts +0 -31
  304. package/node_modules/@tiptap/core/src/helpers/isProseMirrorFragment.test.ts +0 -27
  305. package/node_modules/@tiptap/core/src/helpers/isProseMirrorFragment.ts +0 -34
  306. package/node_modules/@tiptap/core/src/helpers/isProseMirrorNodeSelection.test.ts +0 -35
  307. package/node_modules/@tiptap/core/src/helpers/isProseMirrorNodeSelection.ts +0 -18
  308. package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveMarkStep.test.ts +0 -19
  309. package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveMarkStep.ts +0 -31
  310. package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveNodeMarkStep.test.ts +0 -19
  311. package/node_modules/@tiptap/core/src/helpers/isProseMirrorRemoveNodeMarkStep.ts +0 -31
  312. package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceAroundStep.test.ts +0 -19
  313. package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceAroundStep.ts +0 -31
  314. package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceStep.test.ts +0 -17
  315. package/node_modules/@tiptap/core/src/helpers/isProseMirrorReplaceStep.ts +0 -31
  316. package/node_modules/@tiptap/core/src/helpers/isProseMirrorSlice.test.ts +0 -16
  317. package/node_modules/@tiptap/core/src/helpers/isProseMirrorSlice.ts +0 -43
  318. package/node_modules/@tiptap/core/src/helpers/isProseMirrorStep.test.ts +0 -30
  319. package/node_modules/@tiptap/core/src/helpers/isProseMirrorStep.ts +0 -30
  320. package/node_modules/@tiptap/core/src/helpers/isProseMirrorStepResult.test.ts +0 -17
  321. package/node_modules/@tiptap/core/src/helpers/isProseMirrorStepResult.ts +0 -26
  322. package/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +0 -5
  323. package/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +0 -35
  324. package/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +0 -25
  325. package/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +0 -42
  326. package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.test.ts +0 -51
  327. package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +0 -158
  328. package/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +0 -29
  329. package/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +0 -26
  330. package/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +0 -18
  331. package/node_modules/@tiptap/core/src/helpers/warnOnDuplicatedProseMirrorModel.test.ts +0 -23
  332. package/node_modules/@tiptap/core/src/helpers/warnOnDuplicatedProseMirrorModel.ts +0 -47
  333. package/node_modules/@tiptap/core/src/index.ts +0 -23
  334. package/node_modules/@tiptap/core/src/inputRules/index.ts +0 -5
  335. package/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +0 -72
  336. package/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +0 -80
  337. package/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +0 -39
  338. package/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +0 -41
  339. package/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +0 -88
  340. package/node_modules/@tiptap/core/src/jsx-runtime.test.ts +0 -349
  341. package/node_modules/@tiptap/core/src/jsx-runtime.ts +0 -145
  342. package/node_modules/@tiptap/core/src/lib/ResizableNodeView.test.ts +0 -121
  343. package/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +0 -1079
  344. package/node_modules/@tiptap/core/src/lib/index.ts +0 -1
  345. package/node_modules/@tiptap/core/src/pasteRules/index.ts +0 -3
  346. package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.test.ts +0 -91
  347. package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +0 -82
  348. package/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +0 -44
  349. package/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +0 -34
  350. package/node_modules/@tiptap/core/src/schema/getSchemaAttributes.ts +0 -45
  351. package/node_modules/@tiptap/core/src/schema/mergeSchemaSpec.ts +0 -83
  352. package/node_modules/@tiptap/core/src/schema/schemaSpecFields.ts +0 -24
  353. package/node_modules/@tiptap/core/src/style.ts +0 -71
  354. package/node_modules/@tiptap/core/src/types.ts +0 -1114
  355. package/node_modules/@tiptap/core/src/utilities/attrsEqual.test.ts +0 -54
  356. package/node_modules/@tiptap/core/src/utilities/attrsEqual.ts +0 -27
  357. package/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +0 -25
  358. package/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +0 -30
  359. package/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +0 -21
  360. package/node_modules/@tiptap/core/src/utilities/deleteProps.ts +0 -19
  361. package/node_modules/@tiptap/core/src/utilities/elementFromString.ts +0 -29
  362. package/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +0 -4
  363. package/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +0 -8
  364. package/node_modules/@tiptap/core/src/utilities/fromString.test.ts +0 -53
  365. package/node_modules/@tiptap/core/src/utilities/fromString.ts +0 -19
  366. package/node_modules/@tiptap/core/src/utilities/getStyleProperty.test.ts +0 -53
  367. package/node_modules/@tiptap/core/src/utilities/getStyleProperty.ts +0 -52
  368. package/node_modules/@tiptap/core/src/utilities/htmlEntities.test.ts +0 -159
  369. package/node_modules/@tiptap/core/src/utilities/htmlEntities.ts +0 -74
  370. package/node_modules/@tiptap/core/src/utilities/index.ts +0 -31
  371. package/node_modules/@tiptap/core/src/utilities/isAndroid.test.ts +0 -28
  372. package/node_modules/@tiptap/core/src/utilities/isAndroid.ts +0 -3
  373. package/node_modules/@tiptap/core/src/utilities/isDev.ts +0 -12
  374. package/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +0 -3
  375. package/node_modules/@tiptap/core/src/utilities/isFirefox.ts +0 -11
  376. package/node_modules/@tiptap/core/src/utilities/isFunction.ts +0 -4
  377. package/node_modules/@tiptap/core/src/utilities/isMacOS.ts +0 -3
  378. package/node_modules/@tiptap/core/src/utilities/isNumber.ts +0 -3
  379. package/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +0 -13
  380. package/node_modules/@tiptap/core/src/utilities/isRegExp.ts +0 -3
  381. package/node_modules/@tiptap/core/src/utilities/isSafari.ts +0 -13
  382. package/node_modules/@tiptap/core/src/utilities/isString.ts +0 -3
  383. package/node_modules/@tiptap/core/src/utilities/isValidCSSStyleValue.test.ts +0 -22
  384. package/node_modules/@tiptap/core/src/utilities/isValidCSSStyleValue.ts +0 -8
  385. package/node_modules/@tiptap/core/src/utilities/isiOS.ts +0 -9
  386. package/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +0 -138
  387. package/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +0 -229
  388. package/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +0 -262
  389. package/node_modules/@tiptap/core/src/utilities/markdown/index.ts +0 -14
  390. package/node_modules/@tiptap/core/src/utilities/markdown/parseAttributes.test.ts +0 -70
  391. package/node_modules/@tiptap/core/src/utilities/markdown/parseAttributes.ts +0 -48
  392. package/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +0 -194
  393. package/node_modules/@tiptap/core/src/utilities/markdown/parseShortcodeAttributes.ts +0 -13
  394. package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.test.ts +0 -51
  395. package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +0 -136
  396. package/node_modules/@tiptap/core/src/utilities/markdown/serializeAttributes.ts +0 -42
  397. package/node_modules/@tiptap/core/src/utilities/markdown/tokenizeAttributes.ts +0 -163
  398. package/node_modules/@tiptap/core/src/utilities/marksEqual.test.ts +0 -101
  399. package/node_modules/@tiptap/core/src/utilities/marksEqual.ts +0 -44
  400. package/node_modules/@tiptap/core/src/utilities/mergeAttributes.test.ts +0 -194
  401. package/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +0 -128
  402. package/node_modules/@tiptap/core/src/utilities/mergeDeep.test.ts +0 -98
  403. package/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +0 -20
  404. package/node_modules/@tiptap/core/src/utilities/minMax.ts +0 -3
  405. package/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +0 -30
  406. package/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +0 -13
  407. package/node_modules/@tiptap/extension-blockquote/LICENSE.md +0 -21
  408. package/node_modules/@tiptap/extension-blockquote/README.md +0 -18
  409. package/node_modules/@tiptap/extension-blockquote/dist/index.cjs +0 -132
  410. package/node_modules/@tiptap/extension-blockquote/dist/index.cjs.map +0 -1
  411. package/node_modules/@tiptap/extension-blockquote/dist/index.d.cts +0 -40
  412. package/node_modules/@tiptap/extension-blockquote/dist/index.d.cts.map +0 -1
  413. package/node_modules/@tiptap/extension-blockquote/dist/index.d.ts +0 -40
  414. package/node_modules/@tiptap/extension-blockquote/dist/index.d.ts.map +0 -1
  415. package/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -126
  416. package/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
  417. package/node_modules/@tiptap/extension-blockquote/package.json +0 -52
  418. package/node_modules/@tiptap/extension-blockquote/src/blockquote.tsx +0 -143
  419. package/node_modules/@tiptap/extension-blockquote/src/handleBackspace.test.ts +0 -45
  420. package/node_modules/@tiptap/extension-blockquote/src/handleBackspace.ts +0 -75
  421. package/node_modules/@tiptap/extension-blockquote/src/index.ts +0 -5
  422. package/node_modules/@tiptap/extension-bold/LICENSE.md +0 -21
  423. package/node_modules/@tiptap/extension-bold/README.md +0 -18
  424. package/node_modules/@tiptap/extension-bold/dist/index.cjs +0 -117
  425. package/node_modules/@tiptap/extension-bold/dist/index.cjs.map +0 -1
  426. package/node_modules/@tiptap/extension-bold/dist/index.d.cts +0 -52
  427. package/node_modules/@tiptap/extension-bold/dist/index.d.cts.map +0 -1
  428. package/node_modules/@tiptap/extension-bold/dist/index.d.ts +0 -52
  429. package/node_modules/@tiptap/extension-bold/dist/index.d.ts.map +0 -1
  430. package/node_modules/@tiptap/extension-bold/dist/index.js +0 -108
  431. package/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
  432. package/node_modules/@tiptap/extension-bold/package.json +0 -50
  433. package/node_modules/@tiptap/extension-bold/src/bold.test.ts +0 -25
  434. package/node_modules/@tiptap/extension-bold/src/bold.tsx +0 -163
  435. package/node_modules/@tiptap/extension-bold/src/index.ts +0 -5
  436. package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +0 -21
  437. package/node_modules/@tiptap/extension-bubble-menu/README.md +0 -18
  438. package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +0 -333
  439. package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs.map +0 -1
  440. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +0 -170
  441. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts.map +0 -1
  442. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +0 -170
  443. package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts.map +0 -1
  444. package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +0 -326
  445. package/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +0 -1
  446. package/node_modules/@tiptap/extension-bubble-menu/package.json +0 -56
  447. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.test.ts +0 -289
  448. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.ts +0 -710
  449. package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu.ts +0 -50
  450. package/node_modules/@tiptap/extension-bubble-menu/src/index.ts +0 -6
  451. package/node_modules/@tiptap/extension-bullet-list/LICENSE.md +0 -21
  452. package/node_modules/@tiptap/extension-bullet-list/README.md +0 -18
  453. package/node_modules/@tiptap/extension-bullet-list/dist/index.cjs +0 -17
  454. package/node_modules/@tiptap/extension-bullet-list/dist/index.cjs.map +0 -1
  455. package/node_modules/@tiptap/extension-bullet-list/dist/index.d.cts +0 -2
  456. package/node_modules/@tiptap/extension-bullet-list/dist/index.d.ts +0 -2
  457. package/node_modules/@tiptap/extension-bullet-list/dist/index.js +0 -7
  458. package/node_modules/@tiptap/extension-bullet-list/dist/index.js.map +0 -1
  459. package/node_modules/@tiptap/extension-bullet-list/package.json +0 -50
  460. package/node_modules/@tiptap/extension-bullet-list/src/index.ts +0 -6
  461. package/node_modules/@tiptap/extension-code/LICENSE.md +0 -21
  462. package/node_modules/@tiptap/extension-code/README.md +0 -18
  463. package/node_modules/@tiptap/extension-code/dist/index.cjs +0 -136
  464. package/node_modules/@tiptap/extension-code/dist/index.cjs.map +0 -1
  465. package/node_modules/@tiptap/extension-code/dist/index.d.cts +0 -60
  466. package/node_modules/@tiptap/extension-code/dist/index.d.cts.map +0 -1
  467. package/node_modules/@tiptap/extension-code/dist/index.d.ts +0 -60
  468. package/node_modules/@tiptap/extension-code/dist/index.d.ts.map +0 -1
  469. package/node_modules/@tiptap/extension-code/dist/index.js +0 -127
  470. package/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
  471. package/node_modules/@tiptap/extension-code/package.json +0 -50
  472. package/node_modules/@tiptap/extension-code/src/code.test.ts +0 -122
  473. package/node_modules/@tiptap/extension-code/src/code.ts +0 -200
  474. package/node_modules/@tiptap/extension-code/src/index.ts +0 -5
  475. package/node_modules/@tiptap/extension-code-block/LICENSE.md +0 -21
  476. package/node_modules/@tiptap/extension-code-block/README.md +0 -18
  477. package/node_modules/@tiptap/extension-code-block/dist/index.cjs +0 -255
  478. package/node_modules/@tiptap/extension-code-block/dist/index.cjs.map +0 -1
  479. package/node_modules/@tiptap/extension-code-block/dist/index.d.cts +0 -84
  480. package/node_modules/@tiptap/extension-code-block/dist/index.d.cts.map +0 -1
  481. package/node_modules/@tiptap/extension-code-block/dist/index.d.ts +0 -84
  482. package/node_modules/@tiptap/extension-code-block/dist/index.d.ts.map +0 -1
  483. package/node_modules/@tiptap/extension-code-block/dist/index.js +0 -248
  484. package/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
  485. package/node_modules/@tiptap/extension-code-block/package.json +0 -52
  486. package/node_modules/@tiptap/extension-code-block/src/code-block.test.ts +0 -97
  487. package/node_modules/@tiptap/extension-code-block/src/code-block.ts +0 -514
  488. package/node_modules/@tiptap/extension-code-block/src/index.ts +0 -5
  489. package/node_modules/@tiptap/extension-document/LICENSE.md +0 -21
  490. package/node_modules/@tiptap/extension-document/README.md +0 -18
  491. package/node_modules/@tiptap/extension-document/dist/index.cjs +0 -26
  492. package/node_modules/@tiptap/extension-document/dist/index.cjs.map +0 -1
  493. package/node_modules/@tiptap/extension-document/dist/index.d.cts +0 -10
  494. package/node_modules/@tiptap/extension-document/dist/index.d.cts.map +0 -1
  495. package/node_modules/@tiptap/extension-document/dist/index.d.ts +0 -10
  496. package/node_modules/@tiptap/extension-document/dist/index.d.ts.map +0 -1
  497. package/node_modules/@tiptap/extension-document/dist/index.js +0 -22
  498. package/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
  499. package/node_modules/@tiptap/extension-document/package.json +0 -50
  500. package/node_modules/@tiptap/extension-document/src/document.ts +0 -19
  501. package/node_modules/@tiptap/extension-document/src/index.ts +0 -5
  502. package/node_modules/@tiptap/extension-dropcursor/LICENSE.md +0 -21
  503. package/node_modules/@tiptap/extension-dropcursor/README.md +0 -18
  504. package/node_modules/@tiptap/extension-dropcursor/dist/index.cjs +0 -17
  505. package/node_modules/@tiptap/extension-dropcursor/dist/index.cjs.map +0 -1
  506. package/node_modules/@tiptap/extension-dropcursor/dist/index.d.cts +0 -2
  507. package/node_modules/@tiptap/extension-dropcursor/dist/index.d.ts +0 -2
  508. package/node_modules/@tiptap/extension-dropcursor/dist/index.js +0 -7
  509. package/node_modules/@tiptap/extension-dropcursor/dist/index.js.map +0 -1
  510. package/node_modules/@tiptap/extension-dropcursor/package.json +0 -50
  511. package/node_modules/@tiptap/extension-dropcursor/src/index.ts +0 -6
  512. package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +0 -21
  513. package/node_modules/@tiptap/extension-floating-menu/README.md +0 -18
  514. package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +0 -272
  515. package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs.map +0 -1
  516. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +0 -180
  517. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts.map +0 -1
  518. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +0 -180
  519. package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts.map +0 -1
  520. package/node_modules/@tiptap/extension-floating-menu/dist/index.js +0 -265
  521. package/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +0 -1
  522. package/node_modules/@tiptap/extension-floating-menu/package.json +0 -55
  523. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.test.ts +0 -250
  524. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.ts +0 -580
  525. package/node_modules/@tiptap/extension-floating-menu/src/floating-menu.ts +0 -77
  526. package/node_modules/@tiptap/extension-floating-menu/src/index.ts +0 -6
  527. package/node_modules/@tiptap/extension-gapcursor/LICENSE.md +0 -21
  528. package/node_modules/@tiptap/extension-gapcursor/README.md +0 -18
  529. package/node_modules/@tiptap/extension-gapcursor/dist/index.cjs +0 -17
  530. package/node_modules/@tiptap/extension-gapcursor/dist/index.cjs.map +0 -1
  531. package/node_modules/@tiptap/extension-gapcursor/dist/index.d.cts +0 -2
  532. package/node_modules/@tiptap/extension-gapcursor/dist/index.d.ts +0 -2
  533. package/node_modules/@tiptap/extension-gapcursor/dist/index.js +0 -7
  534. package/node_modules/@tiptap/extension-gapcursor/dist/index.js.map +0 -1
  535. package/node_modules/@tiptap/extension-gapcursor/package.json +0 -50
  536. package/node_modules/@tiptap/extension-gapcursor/src/index.ts +0 -5
  537. package/node_modules/@tiptap/extension-hard-break/LICENSE.md +0 -21
  538. package/node_modules/@tiptap/extension-hard-break/README.md +0 -18
  539. package/node_modules/@tiptap/extension-hard-break/dist/index.cjs +0 -69
  540. package/node_modules/@tiptap/extension-hard-break/dist/index.cjs.map +0 -1
  541. package/node_modules/@tiptap/extension-hard-break/dist/index.d.cts +0 -35
  542. package/node_modules/@tiptap/extension-hard-break/dist/index.d.cts.map +0 -1
  543. package/node_modules/@tiptap/extension-hard-break/dist/index.d.ts +0 -35
  544. package/node_modules/@tiptap/extension-hard-break/dist/index.d.ts.map +0 -1
  545. package/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -64
  546. package/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
  547. package/node_modules/@tiptap/extension-hard-break/package.json +0 -50
  548. package/node_modules/@tiptap/extension-hard-break/src/hard-break.test.ts +0 -78
  549. package/node_modules/@tiptap/extension-hard-break/src/hard-break.ts +0 -121
  550. package/node_modules/@tiptap/extension-hard-break/src/index.ts +0 -5
  551. package/node_modules/@tiptap/extension-heading/LICENSE.md +0 -21
  552. package/node_modules/@tiptap/extension-heading/README.md +0 -18
  553. package/node_modules/@tiptap/extension-heading/dist/index.cjs +0 -93
  554. package/node_modules/@tiptap/extension-heading/dist/index.cjs.map +0 -1
  555. package/node_modules/@tiptap/extension-heading/dist/index.d.cts +0 -50
  556. package/node_modules/@tiptap/extension-heading/dist/index.d.cts.map +0 -1
  557. package/node_modules/@tiptap/extension-heading/dist/index.d.ts +0 -50
  558. package/node_modules/@tiptap/extension-heading/dist/index.d.ts.map +0 -1
  559. package/node_modules/@tiptap/extension-heading/dist/index.js +0 -88
  560. package/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
  561. package/node_modules/@tiptap/extension-heading/package.json +0 -50
  562. package/node_modules/@tiptap/extension-heading/src/heading.ts +0 -152
  563. package/node_modules/@tiptap/extension-heading/src/index.ts +0 -5
  564. package/node_modules/@tiptap/extension-highlight/LICENSE.md +0 -21
  565. package/node_modules/@tiptap/extension-highlight/README.md +0 -18
  566. package/node_modules/@tiptap/extension-highlight/dist/index.cjs +0 -113
  567. package/node_modules/@tiptap/extension-highlight/dist/index.cjs.map +0 -1
  568. package/node_modules/@tiptap/extension-highlight/dist/index.d.cts +0 -59
  569. package/node_modules/@tiptap/extension-highlight/dist/index.d.cts.map +0 -1
  570. package/node_modules/@tiptap/extension-highlight/dist/index.d.ts +0 -59
  571. package/node_modules/@tiptap/extension-highlight/dist/index.d.ts.map +0 -1
  572. package/node_modules/@tiptap/extension-highlight/dist/index.js +0 -106
  573. package/node_modules/@tiptap/extension-highlight/dist/index.js.map +0 -1
  574. package/node_modules/@tiptap/extension-highlight/package.json +0 -50
  575. package/node_modules/@tiptap/extension-highlight/src/highlight.test.ts +0 -44
  576. package/node_modules/@tiptap/extension-highlight/src/highlight.ts +0 -190
  577. package/node_modules/@tiptap/extension-highlight/src/index.ts +0 -5
  578. package/node_modules/@tiptap/extension-horizontal-rule/LICENSE.md +0 -21
  579. package/node_modules/@tiptap/extension-horizontal-rule/README.md +0 -18
  580. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs +0 -78
  581. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs.map +0 -1
  582. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts +0 -35
  583. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.cts.map +0 -1
  584. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts +0 -35
  585. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.d.ts.map +0 -1
  586. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -73
  587. package/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
  588. package/node_modules/@tiptap/extension-horizontal-rule/package.json +0 -52
  589. package/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.test.ts +0 -58
  590. package/node_modules/@tiptap/extension-horizontal-rule/src/horizontal-rule.ts +0 -136
  591. package/node_modules/@tiptap/extension-horizontal-rule/src/index.ts +0 -5
  592. package/node_modules/@tiptap/extension-image/LICENSE.md +0 -21
  593. package/node_modules/@tiptap/extension-image/README.md +0 -18
  594. package/node_modules/@tiptap/extension-image/dist/index.cjs +0 -181
  595. package/node_modules/@tiptap/extension-image/dist/index.cjs.map +0 -1
  596. package/node_modules/@tiptap/extension-image/dist/index.d.cts +0 -69
  597. package/node_modules/@tiptap/extension-image/dist/index.d.cts.map +0 -1
  598. package/node_modules/@tiptap/extension-image/dist/index.d.ts +0 -69
  599. package/node_modules/@tiptap/extension-image/dist/index.d.ts.map +0 -1
  600. package/node_modules/@tiptap/extension-image/dist/index.js +0 -175
  601. package/node_modules/@tiptap/extension-image/dist/index.js.map +0 -1
  602. package/node_modules/@tiptap/extension-image/package.json +0 -50
  603. package/node_modules/@tiptap/extension-image/src/image.test.ts +0 -556
  604. package/node_modules/@tiptap/extension-image/src/image.ts +0 -330
  605. package/node_modules/@tiptap/extension-image/src/index.ts +0 -5
  606. package/node_modules/@tiptap/extension-italic/LICENSE.md +0 -21
  607. package/node_modules/@tiptap/extension-italic/README.md +0 -18
  608. package/node_modules/@tiptap/extension-italic/dist/index.cjs +0 -113
  609. package/node_modules/@tiptap/extension-italic/dist/index.cjs.map +0 -1
  610. package/node_modules/@tiptap/extension-italic/dist/index.d.cts +0 -55
  611. package/node_modules/@tiptap/extension-italic/dist/index.d.cts.map +0 -1
  612. package/node_modules/@tiptap/extension-italic/dist/index.d.ts +0 -55
  613. package/node_modules/@tiptap/extension-italic/dist/index.d.ts.map +0 -1
  614. package/node_modules/@tiptap/extension-italic/dist/index.js +0 -104
  615. package/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
  616. package/node_modules/@tiptap/extension-italic/package.json +0 -50
  617. package/node_modules/@tiptap/extension-italic/src/index.ts +0 -5
  618. package/node_modules/@tiptap/extension-italic/src/italic.ts +0 -160
  619. package/node_modules/@tiptap/extension-link/LICENSE.md +0 -21
  620. package/node_modules/@tiptap/extension-link/README.md +0 -18
  621. package/node_modules/@tiptap/extension-link/dist/index.cjs +0 -560
  622. package/node_modules/@tiptap/extension-link/dist/index.cjs.map +0 -1
  623. package/node_modules/@tiptap/extension-link/dist/index.d.cts +0 -159
  624. package/node_modules/@tiptap/extension-link/dist/index.d.cts.map +0 -1
  625. package/node_modules/@tiptap/extension-link/dist/index.d.ts +0 -159
  626. package/node_modules/@tiptap/extension-link/dist/index.d.ts.map +0 -1
  627. package/node_modules/@tiptap/extension-link/dist/index.js +0 -553
  628. package/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
  629. package/node_modules/@tiptap/extension-link/package.json +0 -56
  630. package/node_modules/@tiptap/extension-link/src/helpers/autolink.ts +0 -211
  631. package/node_modules/@tiptap/extension-link/src/helpers/clickHandler.ts +0 -73
  632. package/node_modules/@tiptap/extension-link/src/helpers/markdownLink.ts +0 -205
  633. package/node_modules/@tiptap/extension-link/src/helpers/pasteHandler.ts +0 -53
  634. package/node_modules/@tiptap/extension-link/src/helpers/unlinkTrailingWhitespace.ts +0 -46
  635. package/node_modules/@tiptap/extension-link/src/helpers/whitespace.ts +0 -8
  636. package/node_modules/@tiptap/extension-link/src/index.ts +0 -5
  637. package/node_modules/@tiptap/extension-link/src/link.ts +0 -555
  638. package/node_modules/@tiptap/extension-list/LICENSE.md +0 -21
  639. package/node_modules/@tiptap/extension-list/README.md +0 -18
  640. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs +0 -84
  641. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.cjs.map +0 -1
  642. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts +0 -52
  643. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.cts.map +0 -1
  644. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts +0 -52
  645. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.d.ts.map +0 -1
  646. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.js +0 -82
  647. package/node_modules/@tiptap/extension-list/dist/bullet-list/index.js.map +0 -1
  648. package/node_modules/@tiptap/extension-list/dist/index.cjs +0 -1570
  649. package/node_modules/@tiptap/extension-list/dist/index.cjs.map +0 -1
  650. package/node_modules/@tiptap/extension-list/dist/index.d.cts +0 -391
  651. package/node_modules/@tiptap/extension-list/dist/index.d.cts.map +0 -1
  652. package/node_modules/@tiptap/extension-list/dist/index.d.ts +0 -390
  653. package/node_modules/@tiptap/extension-list/dist/index.d.ts.map +0 -1
  654. package/node_modules/@tiptap/extension-list/dist/index.js +0 -1533
  655. package/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
  656. package/node_modules/@tiptap/extension-list/dist/item/index.cjs +0 -308
  657. package/node_modules/@tiptap/extension-list/dist/item/index.cjs.map +0 -1
  658. package/node_modules/@tiptap/extension-list/dist/item/index.d.cts +0 -30
  659. package/node_modules/@tiptap/extension-list/dist/item/index.d.cts.map +0 -1
  660. package/node_modules/@tiptap/extension-list/dist/item/index.d.ts +0 -30
  661. package/node_modules/@tiptap/extension-list/dist/item/index.d.ts.map +0 -1
  662. package/node_modules/@tiptap/extension-list/dist/item/index.js +0 -307
  663. package/node_modules/@tiptap/extension-list/dist/item/index.js.map +0 -1
  664. package/node_modules/@tiptap/extension-list/dist/keymap/index.cjs +0 -263
  665. package/node_modules/@tiptap/extension-list/dist/keymap/index.cjs.map +0 -1
  666. package/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts +0 -66
  667. package/node_modules/@tiptap/extension-list/dist/keymap/index.d.cts.map +0 -1
  668. package/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts +0 -65
  669. package/node_modules/@tiptap/extension-list/dist/keymap/index.d.ts.map +0 -1
  670. package/node_modules/@tiptap/extension-list/dist/keymap/index.js +0 -245
  671. package/node_modules/@tiptap/extension-list/dist/keymap/index.js.map +0 -1
  672. package/node_modules/@tiptap/extension-list/dist/keymap/rolldown-runtime-D7D4PA-g.js +0 -13
  673. package/node_modules/@tiptap/extension-list/dist/kit/index.cjs +0 -1487
  674. package/node_modules/@tiptap/extension-list/dist/kit/index.cjs.map +0 -1
  675. package/node_modules/@tiptap/extension-list/dist/kit/index.d.cts +0 -235
  676. package/node_modules/@tiptap/extension-list/dist/kit/index.d.cts.map +0 -1
  677. package/node_modules/@tiptap/extension-list/dist/kit/index.d.ts +0 -235
  678. package/node_modules/@tiptap/extension-list/dist/kit/index.d.ts.map +0 -1
  679. package/node_modules/@tiptap/extension-list/dist/kit/index.js +0 -1486
  680. package/node_modules/@tiptap/extension-list/dist/kit/index.js.map +0 -1
  681. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs +0 -671
  682. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.cjs.map +0 -1
  683. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts +0 -120
  684. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.cts.map +0 -1
  685. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts +0 -120
  686. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.d.ts.map +0 -1
  687. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.js +0 -659
  688. package/node_modules/@tiptap/extension-list/dist/ordered-list/index.js.map +0 -1
  689. package/node_modules/@tiptap/extension-list/dist/rolldown-runtime-D7D4PA-g.js +0 -13
  690. package/node_modules/@tiptap/extension-list/dist/task-item/index.cjs +0 -327
  691. package/node_modules/@tiptap/extension-list/dist/task-item/index.cjs.map +0 -1
  692. package/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts +0 -69
  693. package/node_modules/@tiptap/extension-list/dist/task-item/index.d.cts.map +0 -1
  694. package/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts +0 -69
  695. package/node_modules/@tiptap/extension-list/dist/task-item/index.d.ts.map +0 -1
  696. package/node_modules/@tiptap/extension-list/dist/task-item/index.js +0 -325
  697. package/node_modules/@tiptap/extension-list/dist/task-item/index.js.map +0 -1
  698. package/node_modules/@tiptap/extension-list/dist/task-list/index.cjs +0 -121
  699. package/node_modules/@tiptap/extension-list/dist/task-list/index.cjs.map +0 -1
  700. package/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts +0 -35
  701. package/node_modules/@tiptap/extension-list/dist/task-list/index.d.cts.map +0 -1
  702. package/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts +0 -35
  703. package/node_modules/@tiptap/extension-list/dist/task-list/index.d.ts.map +0 -1
  704. package/node_modules/@tiptap/extension-list/dist/task-list/index.js +0 -120
  705. package/node_modules/@tiptap/extension-list/dist/task-list/index.js.map +0 -1
  706. package/node_modules/@tiptap/extension-list/package.json +0 -108
  707. package/node_modules/@tiptap/extension-list/src/bullet-list/bullet-list.ts +0 -151
  708. package/node_modules/@tiptap/extension-list/src/bullet-list/index.ts +0 -1
  709. package/node_modules/@tiptap/extension-list/src/helpers/createBranchingListDeleteKeymap.ts +0 -24
  710. package/node_modules/@tiptap/extension-list/src/helpers/getBranchingNestedListAtCursor.ts +0 -116
  711. package/node_modules/@tiptap/extension-list/src/helpers/handleDeleteBranchingNestedList.ts +0 -25
  712. package/node_modules/@tiptap/extension-list/src/helpers/hasBranchingNestedListAfterCursor.ts +0 -30
  713. package/node_modules/@tiptap/extension-list/src/helpers/hoistBranchingNestedList.ts +0 -56
  714. package/node_modules/@tiptap/extension-list/src/index.ts +0 -7
  715. package/node_modules/@tiptap/extension-list/src/item/index.ts +0 -1
  716. package/node_modules/@tiptap/extension-list/src/item/list-item.test.ts +0 -46
  717. package/node_modules/@tiptap/extension-list/src/item/list-item.ts +0 -206
  718. package/node_modules/@tiptap/extension-list/src/keymap/index.ts +0 -2
  719. package/node_modules/@tiptap/extension-list/src/keymap/list-keymap.ts +0 -120
  720. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/findListItemPos.ts +0 -30
  721. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/getNextListDepth.ts +0 -16
  722. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleBackspace.ts +0 -70
  723. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleDelete.ts +0 -44
  724. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/handleTab.ts +0 -48
  725. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListBefore.ts +0 -19
  726. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemAfter.ts +0 -17
  727. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/hasListItemBefore.ts +0 -17
  728. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/index.ts +0 -11
  729. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/listItemHasSubList.ts +0 -21
  730. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsDeeper.ts +0 -19
  731. package/node_modules/@tiptap/extension-list/src/keymap/listHelpers/nextListIsHigher.ts +0 -19
  732. package/node_modules/@tiptap/extension-list/src/kit/index.ts +0 -81
  733. package/node_modules/@tiptap/extension-list/src/ordered-list/collectOrderedListItemsFromSource.ts +0 -58
  734. package/node_modules/@tiptap/extension-list/src/ordered-list/index.ts +0 -13
  735. package/node_modules/@tiptap/extension-list/src/ordered-list/ordered-list.ts +0 -360
  736. package/node_modules/@tiptap/extension-list/src/ordered-list/roman.test.ts +0 -122
  737. package/node_modules/@tiptap/extension-list/src/ordered-list/roman.ts +0 -295
  738. package/node_modules/@tiptap/extension-list/src/ordered-list/utils.test.ts +0 -105
  739. package/node_modules/@tiptap/extension-list/src/ordered-list/utils.ts +0 -399
  740. package/node_modules/@tiptap/extension-list/src/task-item/index.ts +0 -1
  741. package/node_modules/@tiptap/extension-list/src/task-item/task-item.test.ts +0 -1394
  742. package/node_modules/@tiptap/extension-list/src/task-item/task-item.ts +0 -359
  743. package/node_modules/@tiptap/extension-list/src/task-list/index.ts +0 -1
  744. package/node_modules/@tiptap/extension-list/src/task-list/task-list.ts +0 -194
  745. package/node_modules/@tiptap/extension-list-item/LICENSE.md +0 -21
  746. package/node_modules/@tiptap/extension-list-item/README.md +0 -18
  747. package/node_modules/@tiptap/extension-list-item/dist/index.cjs +0 -17
  748. package/node_modules/@tiptap/extension-list-item/dist/index.cjs.map +0 -1
  749. package/node_modules/@tiptap/extension-list-item/dist/index.d.cts +0 -2
  750. package/node_modules/@tiptap/extension-list-item/dist/index.d.ts +0 -2
  751. package/node_modules/@tiptap/extension-list-item/dist/index.js +0 -7
  752. package/node_modules/@tiptap/extension-list-item/dist/index.js.map +0 -1
  753. package/node_modules/@tiptap/extension-list-item/package.json +0 -50
  754. package/node_modules/@tiptap/extension-list-item/src/index.ts +0 -6
  755. package/node_modules/@tiptap/extension-list-keymap/LICENSE.md +0 -21
  756. package/node_modules/@tiptap/extension-list-keymap/README.md +0 -18
  757. package/node_modules/@tiptap/extension-list-keymap/dist/index.cjs +0 -23
  758. package/node_modules/@tiptap/extension-list-keymap/dist/index.cjs.map +0 -1
  759. package/node_modules/@tiptap/extension-list-keymap/dist/index.d.cts +0 -2
  760. package/node_modules/@tiptap/extension-list-keymap/dist/index.d.ts +0 -2
  761. package/node_modules/@tiptap/extension-list-keymap/dist/index.js +0 -7
  762. package/node_modules/@tiptap/extension-list-keymap/dist/index.js.map +0 -1
  763. package/node_modules/@tiptap/extension-list-keymap/package.json +0 -50
  764. package/node_modules/@tiptap/extension-list-keymap/src/index.ts +0 -6
  765. package/node_modules/@tiptap/extension-ordered-list/LICENSE.md +0 -21
  766. package/node_modules/@tiptap/extension-ordered-list/README.md +0 -18
  767. package/node_modules/@tiptap/extension-ordered-list/dist/index.cjs +0 -17
  768. package/node_modules/@tiptap/extension-ordered-list/dist/index.cjs.map +0 -1
  769. package/node_modules/@tiptap/extension-ordered-list/dist/index.d.cts +0 -2
  770. package/node_modules/@tiptap/extension-ordered-list/dist/index.d.ts +0 -2
  771. package/node_modules/@tiptap/extension-ordered-list/dist/index.js +0 -7
  772. package/node_modules/@tiptap/extension-ordered-list/dist/index.js.map +0 -1
  773. package/node_modules/@tiptap/extension-ordered-list/package.json +0 -50
  774. package/node_modules/@tiptap/extension-ordered-list/src/index.ts +0 -6
  775. package/node_modules/@tiptap/extension-paragraph/LICENSE.md +0 -21
  776. package/node_modules/@tiptap/extension-paragraph/README.md +0 -18
  777. package/node_modules/@tiptap/extension-paragraph/dist/index.cjs +0 -73
  778. package/node_modules/@tiptap/extension-paragraph/dist/index.cjs.map +0 -1
  779. package/node_modules/@tiptap/extension-paragraph/dist/index.d.cts +0 -29
  780. package/node_modules/@tiptap/extension-paragraph/dist/index.d.cts.map +0 -1
  781. package/node_modules/@tiptap/extension-paragraph/dist/index.d.ts +0 -29
  782. package/node_modules/@tiptap/extension-paragraph/dist/index.d.ts.map +0 -1
  783. package/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -68
  784. package/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
  785. package/node_modules/@tiptap/extension-paragraph/package.json +0 -50
  786. package/node_modules/@tiptap/extension-paragraph/src/index.ts +0 -5
  787. package/node_modules/@tiptap/extension-paragraph/src/paragraph.ts +0 -139
  788. package/node_modules/@tiptap/extension-strike/LICENSE.md +0 -21
  789. package/node_modules/@tiptap/extension-strike/README.md +0 -18
  790. package/node_modules/@tiptap/extension-strike/dist/index.cjs +0 -88
  791. package/node_modules/@tiptap/extension-strike/dist/index.cjs.map +0 -1
  792. package/node_modules/@tiptap/extension-strike/dist/index.d.cts +0 -47
  793. package/node_modules/@tiptap/extension-strike/dist/index.d.cts.map +0 -1
  794. package/node_modules/@tiptap/extension-strike/dist/index.d.ts +0 -47
  795. package/node_modules/@tiptap/extension-strike/dist/index.d.ts.map +0 -1
  796. package/node_modules/@tiptap/extension-strike/dist/index.js +0 -81
  797. package/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
  798. package/node_modules/@tiptap/extension-strike/package.json +0 -50
  799. package/node_modules/@tiptap/extension-strike/src/index.ts +0 -5
  800. package/node_modules/@tiptap/extension-strike/src/strike.ts +0 -134
  801. package/node_modules/@tiptap/extension-subscript/LICENSE.md +0 -21
  802. package/node_modules/@tiptap/extension-subscript/README.md +0 -18
  803. package/node_modules/@tiptap/extension-subscript/dist/index.cjs +0 -56
  804. package/node_modules/@tiptap/extension-subscript/dist/index.cjs.map +0 -1
  805. package/node_modules/@tiptap/extension-subscript/dist/index.d.cts +0 -39
  806. package/node_modules/@tiptap/extension-subscript/dist/index.d.cts.map +0 -1
  807. package/node_modules/@tiptap/extension-subscript/dist/index.d.ts +0 -39
  808. package/node_modules/@tiptap/extension-subscript/dist/index.d.ts.map +0 -1
  809. package/node_modules/@tiptap/extension-subscript/dist/index.js +0 -51
  810. package/node_modules/@tiptap/extension-subscript/dist/index.js.map +0 -1
  811. package/node_modules/@tiptap/extension-subscript/package.json +0 -52
  812. package/node_modules/@tiptap/extension-subscript/src/index.ts +0 -5
  813. package/node_modules/@tiptap/extension-subscript/src/subscript.test.ts +0 -48
  814. package/node_modules/@tiptap/extension-subscript/src/subscript.ts +0 -97
  815. package/node_modules/@tiptap/extension-superscript/LICENSE.md +0 -21
  816. package/node_modules/@tiptap/extension-superscript/README.md +0 -18
  817. package/node_modules/@tiptap/extension-superscript/dist/index.cjs +0 -56
  818. package/node_modules/@tiptap/extension-superscript/dist/index.cjs.map +0 -1
  819. package/node_modules/@tiptap/extension-superscript/dist/index.d.cts +0 -39
  820. package/node_modules/@tiptap/extension-superscript/dist/index.d.cts.map +0 -1
  821. package/node_modules/@tiptap/extension-superscript/dist/index.d.ts +0 -39
  822. package/node_modules/@tiptap/extension-superscript/dist/index.d.ts.map +0 -1
  823. package/node_modules/@tiptap/extension-superscript/dist/index.js +0 -51
  824. package/node_modules/@tiptap/extension-superscript/dist/index.js.map +0 -1
  825. package/node_modules/@tiptap/extension-superscript/package.json +0 -52
  826. package/node_modules/@tiptap/extension-superscript/src/index.ts +0 -5
  827. package/node_modules/@tiptap/extension-superscript/src/superscript.test.ts +0 -48
  828. package/node_modules/@tiptap/extension-superscript/src/superscript.ts +0 -97
  829. package/node_modules/@tiptap/extension-table/LICENSE.md +0 -21
  830. package/node_modules/@tiptap/extension-table/README.md +0 -18
  831. package/node_modules/@tiptap/extension-table/dist/cell/index.cjs +0 -142
  832. package/node_modules/@tiptap/extension-table/dist/cell/index.cjs.map +0 -1
  833. package/node_modules/@tiptap/extension-table/dist/cell/index.d.cts +0 -35
  834. package/node_modules/@tiptap/extension-table/dist/cell/index.d.cts.map +0 -1
  835. package/node_modules/@tiptap/extension-table/dist/cell/index.d.ts +0 -35
  836. package/node_modules/@tiptap/extension-table/dist/cell/index.d.ts.map +0 -1
  837. package/node_modules/@tiptap/extension-table/dist/cell/index.js +0 -141
  838. package/node_modules/@tiptap/extension-table/dist/cell/index.js.map +0 -1
  839. package/node_modules/@tiptap/extension-table/dist/header/index.cjs +0 -142
  840. package/node_modules/@tiptap/extension-table/dist/header/index.cjs.map +0 -1
  841. package/node_modules/@tiptap/extension-table/dist/header/index.d.cts +0 -35
  842. package/node_modules/@tiptap/extension-table/dist/header/index.d.cts.map +0 -1
  843. package/node_modules/@tiptap/extension-table/dist/header/index.d.ts +0 -35
  844. package/node_modules/@tiptap/extension-table/dist/header/index.d.ts.map +0 -1
  845. package/node_modules/@tiptap/extension-table/dist/header/index.js +0 -141
  846. package/node_modules/@tiptap/extension-table/dist/header/index.js.map +0 -1
  847. package/node_modules/@tiptap/extension-table/dist/index.cjs +0 -832
  848. package/node_modules/@tiptap/extension-table/dist/index.cjs.map +0 -1
  849. package/node_modules/@tiptap/extension-table/dist/index.d.cts +0 -344
  850. package/node_modules/@tiptap/extension-table/dist/index.d.cts.map +0 -1
  851. package/node_modules/@tiptap/extension-table/dist/index.d.ts +0 -344
  852. package/node_modules/@tiptap/extension-table/dist/index.d.ts.map +0 -1
  853. package/node_modules/@tiptap/extension-table/dist/index.js +0 -819
  854. package/node_modules/@tiptap/extension-table/dist/index.js.map +0 -1
  855. package/node_modules/@tiptap/extension-table/dist/kit/index.cjs +0 -817
  856. package/node_modules/@tiptap/extension-table/dist/kit/index.cjs.map +0 -1
  857. package/node_modules/@tiptap/extension-table/dist/kit/index.d.cts +0 -265
  858. package/node_modules/@tiptap/extension-table/dist/kit/index.d.cts.map +0 -1
  859. package/node_modules/@tiptap/extension-table/dist/kit/index.d.ts +0 -265
  860. package/node_modules/@tiptap/extension-table/dist/kit/index.d.ts.map +0 -1
  861. package/node_modules/@tiptap/extension-table/dist/kit/index.js +0 -816
  862. package/node_modules/@tiptap/extension-table/dist/kit/index.js.map +0 -1
  863. package/node_modules/@tiptap/extension-table/dist/row/index.cjs +0 -29
  864. package/node_modules/@tiptap/extension-table/dist/row/index.cjs.map +0 -1
  865. package/node_modules/@tiptap/extension-table/dist/row/index.d.cts +0 -35
  866. package/node_modules/@tiptap/extension-table/dist/row/index.d.cts.map +0 -1
  867. package/node_modules/@tiptap/extension-table/dist/row/index.d.ts +0 -35
  868. package/node_modules/@tiptap/extension-table/dist/row/index.d.ts.map +0 -1
  869. package/node_modules/@tiptap/extension-table/dist/row/index.js +0 -28
  870. package/node_modules/@tiptap/extension-table/dist/row/index.js.map +0 -1
  871. package/node_modules/@tiptap/extension-table/dist/table/index.cjs +0 -616
  872. package/node_modules/@tiptap/extension-table/dist/table/index.cjs.map +0 -1
  873. package/node_modules/@tiptap/extension-table/dist/table/index.d.cts +0 -254
  874. package/node_modules/@tiptap/extension-table/dist/table/index.d.cts.map +0 -1
  875. package/node_modules/@tiptap/extension-table/dist/table/index.d.ts +0 -254
  876. package/node_modules/@tiptap/extension-table/dist/table/index.d.ts.map +0 -1
  877. package/node_modules/@tiptap/extension-table/dist/table/index.js +0 -609
  878. package/node_modules/@tiptap/extension-table/dist/table/index.js.map +0 -1
  879. package/node_modules/@tiptap/extension-table/package.json +0 -92
  880. package/node_modules/@tiptap/extension-table/src/cell/index.ts +0 -1
  881. package/node_modules/@tiptap/extension-table/src/cell/table-cell.test.ts +0 -220
  882. package/node_modules/@tiptap/extension-table/src/cell/table-cell.ts +0 -74
  883. package/node_modules/@tiptap/extension-table/src/header/index.ts +0 -1
  884. package/node_modules/@tiptap/extension-table/src/header/table-header.test.ts +0 -193
  885. package/node_modules/@tiptap/extension-table/src/header/table-header.ts +0 -74
  886. package/node_modules/@tiptap/extension-table/src/index.ts +0 -6
  887. package/node_modules/@tiptap/extension-table/src/kit/index.ts +0 -64
  888. package/node_modules/@tiptap/extension-table/src/row/index.ts +0 -1
  889. package/node_modules/@tiptap/extension-table/src/row/table-row.ts +0 -38
  890. package/node_modules/@tiptap/extension-table/src/table/TableView.ts +0 -154
  891. package/node_modules/@tiptap/extension-table/src/table/index.ts +0 -4
  892. package/node_modules/@tiptap/extension-table/src/table/table.test.ts +0 -76
  893. package/node_modules/@tiptap/extension-table/src/table/table.ts +0 -648
  894. package/node_modules/@tiptap/extension-table/src/table/utilities/colStyle.ts +0 -12
  895. package/node_modules/@tiptap/extension-table/src/table/utilities/createCell.ts +0 -12
  896. package/node_modules/@tiptap/extension-table/src/table/utilities/createColGroup.ts +0 -69
  897. package/node_modules/@tiptap/extension-table/src/table/utilities/createTable.ts +0 -40
  898. package/node_modules/@tiptap/extension-table/src/table/utilities/deleteTableWhenAllCellsSelected.ts +0 -37
  899. package/node_modules/@tiptap/extension-table/src/table/utilities/getTableNodeTypes.ts +0 -21
  900. package/node_modules/@tiptap/extension-table/src/table/utilities/isCellSelection.ts +0 -5
  901. package/node_modules/@tiptap/extension-table/src/table/utilities/keepCursorInTable.ts +0 -29
  902. package/node_modules/@tiptap/extension-table/src/table/utilities/markdown.test.ts +0 -123
  903. package/node_modules/@tiptap/extension-table/src/table/utilities/markdown.ts +0 -233
  904. package/node_modules/@tiptap/extension-table/src/table/utilities/preserveCellSelectionOnContextMenu.test.ts +0 -166
  905. package/node_modules/@tiptap/extension-table/src/table/utilities/preserveCellSelectionOnContextMenu.ts +0 -69
  906. package/node_modules/@tiptap/extension-table/src/types.ts +0 -19
  907. package/node_modules/@tiptap/extension-table/src/utils/fillEmptyCellContent.ts +0 -25
  908. package/node_modules/@tiptap/extension-table/src/utils/omitDefaultSpanAttribute.ts +0 -15
  909. package/node_modules/@tiptap/extension-table/src/utils/parseAlign.ts +0 -80
  910. package/node_modules/@tiptap/extension-table/src/utils/parseColwidth.ts +0 -37
  911. package/node_modules/@tiptap/extension-text/LICENSE.md +0 -21
  912. package/node_modules/@tiptap/extension-text/README.md +0 -18
  913. package/node_modules/@tiptap/extension-text/dist/index.cjs +0 -28
  914. package/node_modules/@tiptap/extension-text/dist/index.cjs.map +0 -1
  915. package/node_modules/@tiptap/extension-text/dist/index.d.cts +0 -10
  916. package/node_modules/@tiptap/extension-text/dist/index.d.cts.map +0 -1
  917. package/node_modules/@tiptap/extension-text/dist/index.d.ts +0 -10
  918. package/node_modules/@tiptap/extension-text/dist/index.d.ts.map +0 -1
  919. package/node_modules/@tiptap/extension-text/dist/index.js +0 -24
  920. package/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
  921. package/node_modules/@tiptap/extension-text/package.json +0 -50
  922. package/node_modules/@tiptap/extension-text/src/index.ts +0 -5
  923. package/node_modules/@tiptap/extension-text/src/text.ts +0 -20
  924. package/node_modules/@tiptap/extension-text-align/LICENSE.md +0 -21
  925. package/node_modules/@tiptap/extension-text-align/README.md +0 -18
  926. package/node_modules/@tiptap/extension-text-align/dist/index.cjs +0 -73
  927. package/node_modules/@tiptap/extension-text-align/dist/index.cjs.map +0 -1
  928. package/node_modules/@tiptap/extension-text-align/dist/index.d.cts +0 -53
  929. package/node_modules/@tiptap/extension-text-align/dist/index.d.cts.map +0 -1
  930. package/node_modules/@tiptap/extension-text-align/dist/index.d.ts +0 -53
  931. package/node_modules/@tiptap/extension-text-align/dist/index.d.ts.map +0 -1
  932. package/node_modules/@tiptap/extension-text-align/dist/index.js +0 -68
  933. package/node_modules/@tiptap/extension-text-align/dist/index.js.map +0 -1
  934. package/node_modules/@tiptap/extension-text-align/package.json +0 -50
  935. package/node_modules/@tiptap/extension-text-align/src/index.ts +0 -5
  936. package/node_modules/@tiptap/extension-text-align/src/text-align.test.ts +0 -41
  937. package/node_modules/@tiptap/extension-text-align/src/text-align.ts +0 -140
  938. package/node_modules/@tiptap/extension-text-style/LICENSE.md +0 -21
  939. package/node_modules/@tiptap/extension-text-style/README.md +0 -18
  940. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.cjs +0 -121
  941. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.cjs.map +0 -1
  942. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.cts +0 -161
  943. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.cts.map +0 -1
  944. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.ts +0 -161
  945. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.d.ts.map +0 -1
  946. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.js +0 -116
  947. package/node_modules/@tiptap/extension-text-style/dist/background-color/index.js.map +0 -1
  948. package/node_modules/@tiptap/extension-text-style/dist/color/index.cjs +0 -121
  949. package/node_modules/@tiptap/extension-text-style/dist/color/index.cjs.map +0 -1
  950. package/node_modules/@tiptap/extension-text-style/dist/color/index.d.cts +0 -161
  951. package/node_modules/@tiptap/extension-text-style/dist/color/index.d.cts.map +0 -1
  952. package/node_modules/@tiptap/extension-text-style/dist/color/index.d.ts +0 -161
  953. package/node_modules/@tiptap/extension-text-style/dist/color/index.d.ts.map +0 -1
  954. package/node_modules/@tiptap/extension-text-style/dist/color/index.js +0 -116
  955. package/node_modules/@tiptap/extension-text-style/dist/color/index.js.map +0 -1
  956. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.cjs +0 -120
  957. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.cjs.map +0 -1
  958. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.cts +0 -161
  959. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.cts.map +0 -1
  960. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.ts +0 -161
  961. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.d.ts.map +0 -1
  962. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.js +0 -115
  963. package/node_modules/@tiptap/extension-text-style/dist/font-family/index.js.map +0 -1
  964. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.cjs +0 -120
  965. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.cjs.map +0 -1
  966. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.cts +0 -161
  967. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.cts.map +0 -1
  968. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.ts +0 -161
  969. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.d.ts.map +0 -1
  970. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.js +0 -115
  971. package/node_modules/@tiptap/extension-text-style/dist/font-size/index.js.map +0 -1
  972. package/node_modules/@tiptap/extension-text-style/dist/index.cjs +0 -298
  973. package/node_modules/@tiptap/extension-text-style/dist/index.cjs.map +0 -1
  974. package/node_modules/@tiptap/extension-text-style/dist/index.d.cts +0 -275
  975. package/node_modules/@tiptap/extension-text-style/dist/index.d.cts.map +0 -1
  976. package/node_modules/@tiptap/extension-text-style/dist/index.d.ts +0 -275
  977. package/node_modules/@tiptap/extension-text-style/dist/index.d.ts.map +0 -1
  978. package/node_modules/@tiptap/extension-text-style/dist/index.js +0 -291
  979. package/node_modules/@tiptap/extension-text-style/dist/index.js.map +0 -1
  980. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.cjs +0 -120
  981. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.cjs.map +0 -1
  982. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.cts +0 -161
  983. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.cts.map +0 -1
  984. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.ts +0 -161
  985. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.d.ts.map +0 -1
  986. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.js +0 -115
  987. package/node_modules/@tiptap/extension-text-style/dist/line-height/index.js.map +0 -1
  988. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.cjs +0 -80
  989. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.cjs.map +0 -1
  990. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.cts +0 -170
  991. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.cts.map +0 -1
  992. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.ts +0 -170
  993. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.d.ts.map +0 -1
  994. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.js +0 -79
  995. package/node_modules/@tiptap/extension-text-style/dist/text-style/index.js.map +0 -1
  996. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.cjs +0 -292
  997. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.cjs.map +0 -1
  998. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.cts +0 -244
  999. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.cts.map +0 -1
  1000. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.ts +0 -244
  1001. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.d.ts.map +0 -1
  1002. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.js +0 -291
  1003. package/node_modules/@tiptap/extension-text-style/dist/text-style-kit/index.js.map +0 -1
  1004. package/node_modules/@tiptap/extension-text-style/package.json +0 -106
  1005. package/node_modules/@tiptap/extension-text-style/src/background-color/background-color.test.ts +0 -35
  1006. package/node_modules/@tiptap/extension-text-style/src/background-color/background-color.ts +0 -100
  1007. package/node_modules/@tiptap/extension-text-style/src/background-color/index.ts +0 -5
  1008. package/node_modules/@tiptap/extension-text-style/src/color/color.test.ts +0 -35
  1009. package/node_modules/@tiptap/extension-text-style/src/color/color.ts +0 -96
  1010. package/node_modules/@tiptap/extension-text-style/src/color/index.ts +0 -5
  1011. package/node_modules/@tiptap/extension-text-style/src/font-family/font-family.test.ts +0 -89
  1012. package/node_modules/@tiptap/extension-text-style/src/font-family/font-family.ts +0 -94
  1013. package/node_modules/@tiptap/extension-text-style/src/font-family/index.ts +0 -5
  1014. package/node_modules/@tiptap/extension-text-style/src/font-size/font-size.test.ts +0 -35
  1015. package/node_modules/@tiptap/extension-text-style/src/font-size/font-size.ts +0 -92
  1016. package/node_modules/@tiptap/extension-text-style/src/font-size/index.ts +0 -5
  1017. package/node_modules/@tiptap/extension-text-style/src/index.ts +0 -14
  1018. package/node_modules/@tiptap/extension-text-style/src/line-height/index.ts +0 -5
  1019. package/node_modules/@tiptap/extension-text-style/src/line-height/line-height.test.ts +0 -35
  1020. package/node_modules/@tiptap/extension-text-style/src/line-height/line-height.ts +0 -93
  1021. package/node_modules/@tiptap/extension-text-style/src/text-style/index.ts +0 -168
  1022. package/node_modules/@tiptap/extension-text-style/src/text-style-kit/index.ts +0 -86
  1023. package/node_modules/@tiptap/extension-underline/LICENSE.md +0 -21
  1024. package/node_modules/@tiptap/extension-underline/README.md +0 -18
  1025. package/node_modules/@tiptap/extension-underline/dist/index.cjs +0 -81
  1026. package/node_modules/@tiptap/extension-underline/dist/index.cjs.map +0 -1
  1027. package/node_modules/@tiptap/extension-underline/dist/index.d.cts +0 -39
  1028. package/node_modules/@tiptap/extension-underline/dist/index.d.cts.map +0 -1
  1029. package/node_modules/@tiptap/extension-underline/dist/index.d.ts +0 -39
  1030. package/node_modules/@tiptap/extension-underline/dist/index.d.ts.map +0 -1
  1031. package/node_modules/@tiptap/extension-underline/dist/index.js +0 -76
  1032. package/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
  1033. package/node_modules/@tiptap/extension-underline/package.json +0 -50
  1034. package/node_modules/@tiptap/extension-underline/src/index.ts +0 -5
  1035. package/node_modules/@tiptap/extension-underline/src/underline.ts +0 -123
  1036. package/node_modules/@tiptap/extension-youtube/LICENSE.md +0 -21
  1037. package/node_modules/@tiptap/extension-youtube/README.md +0 -18
  1038. package/node_modules/@tiptap/extension-youtube/dist/index.cjs +0 -254
  1039. package/node_modules/@tiptap/extension-youtube/dist/index.cjs.map +0 -1
  1040. package/node_modules/@tiptap/extension-youtube/dist/index.d.cts +0 -204
  1041. package/node_modules/@tiptap/extension-youtube/dist/index.d.cts.map +0 -1
  1042. package/node_modules/@tiptap/extension-youtube/dist/index.d.ts +0 -204
  1043. package/node_modules/@tiptap/extension-youtube/dist/index.d.ts.map +0 -1
  1044. package/node_modules/@tiptap/extension-youtube/dist/index.js +0 -246
  1045. package/node_modules/@tiptap/extension-youtube/dist/index.js.map +0 -1
  1046. package/node_modules/@tiptap/extension-youtube/package.json +0 -50
  1047. package/node_modules/@tiptap/extension-youtube/src/index.ts +0 -5
  1048. package/node_modules/@tiptap/extension-youtube/src/utils.test.ts +0 -163
  1049. package/node_modules/@tiptap/extension-youtube/src/utils.ts +0 -234
  1050. package/node_modules/@tiptap/extension-youtube/src/youtube.ts +0 -399
  1051. package/node_modules/@tiptap/extensions/LICENSE.md +0 -21
  1052. package/node_modules/@tiptap/extensions/README.md +0 -18
  1053. package/node_modules/@tiptap/extensions/dist/character-count/index.cjs +0 -87
  1054. package/node_modules/@tiptap/extensions/dist/character-count/index.cjs.map +0 -1
  1055. package/node_modules/@tiptap/extensions/dist/character-count/index.d.cts +0 -70
  1056. package/node_modules/@tiptap/extensions/dist/character-count/index.d.cts.map +0 -1
  1057. package/node_modules/@tiptap/extensions/dist/character-count/index.d.ts +0 -70
  1058. package/node_modules/@tiptap/extensions/dist/character-count/index.d.ts.map +0 -1
  1059. package/node_modules/@tiptap/extensions/dist/character-count/index.js +0 -86
  1060. package/node_modules/@tiptap/extensions/dist/character-count/index.js.map +0 -1
  1061. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs +0 -27
  1062. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.cjs.map +0 -1
  1063. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts +0 -32
  1064. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.cts.map +0 -1
  1065. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts +0 -32
  1066. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.d.ts.map +0 -1
  1067. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.js +0 -26
  1068. package/node_modules/@tiptap/extensions/dist/drop-cursor/index.js.map +0 -1
  1069. package/node_modules/@tiptap/extensions/dist/focus/index.cjs +0 -48
  1070. package/node_modules/@tiptap/extensions/dist/focus/index.cjs.map +0 -1
  1071. package/node_modules/@tiptap/extensions/dist/focus/index.d.cts +0 -29
  1072. package/node_modules/@tiptap/extensions/dist/focus/index.d.cts.map +0 -1
  1073. package/node_modules/@tiptap/extensions/dist/focus/index.d.ts +0 -29
  1074. package/node_modules/@tiptap/extensions/dist/focus/index.d.ts.map +0 -1
  1075. package/node_modules/@tiptap/extensions/dist/focus/index.js +0 -47
  1076. package/node_modules/@tiptap/extensions/dist/focus/index.js.map +0 -1
  1077. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs +0 -29
  1078. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.cjs.map +0 -1
  1079. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts +0 -26
  1080. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.cts.map +0 -1
  1081. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts +0 -26
  1082. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.d.ts.map +0 -1
  1083. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.js +0 -28
  1084. package/node_modules/@tiptap/extensions/dist/gap-cursor/index.js.map +0 -1
  1085. package/node_modules/@tiptap/extensions/dist/index.cjs +0 -711
  1086. package/node_modules/@tiptap/extensions/dist/index.cjs.map +0 -1
  1087. package/node_modules/@tiptap/extensions/dist/index.d.cts +0 -321
  1088. package/node_modules/@tiptap/extensions/dist/index.d.cts.map +0 -1
  1089. package/node_modules/@tiptap/extensions/dist/index.d.ts +0 -321
  1090. package/node_modules/@tiptap/extensions/dist/index.d.ts.map +0 -1
  1091. package/node_modules/@tiptap/extensions/dist/index.js +0 -699
  1092. package/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
  1093. package/node_modules/@tiptap/extensions/dist/placeholder/index.cjs +0 -372
  1094. package/node_modules/@tiptap/extensions/dist/placeholder/index.cjs.map +0 -1
  1095. package/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts +0 -91
  1096. package/node_modules/@tiptap/extensions/dist/placeholder/index.d.cts.map +0 -1
  1097. package/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts +0 -91
  1098. package/node_modules/@tiptap/extensions/dist/placeholder/index.d.ts.map +0 -1
  1099. package/node_modules/@tiptap/extensions/dist/placeholder/index.js +0 -368
  1100. package/node_modules/@tiptap/extensions/dist/placeholder/index.js.map +0 -1
  1101. package/node_modules/@tiptap/extensions/dist/selection/index.cjs +0 -72
  1102. package/node_modules/@tiptap/extensions/dist/selection/index.cjs.map +0 -1
  1103. package/node_modules/@tiptap/extensions/dist/selection/index.d.cts +0 -20
  1104. package/node_modules/@tiptap/extensions/dist/selection/index.d.cts.map +0 -1
  1105. package/node_modules/@tiptap/extensions/dist/selection/index.d.ts +0 -20
  1106. package/node_modules/@tiptap/extensions/dist/selection/index.d.ts.map +0 -1
  1107. package/node_modules/@tiptap/extensions/dist/selection/index.js +0 -71
  1108. package/node_modules/@tiptap/extensions/dist/selection/index.js.map +0 -1
  1109. package/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs +0 -62
  1110. package/node_modules/@tiptap/extensions/dist/trailing-node/index.cjs.map +0 -1
  1111. package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts +0 -30
  1112. package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.cts.map +0 -1
  1113. package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts +0 -30
  1114. package/node_modules/@tiptap/extensions/dist/trailing-node/index.d.ts.map +0 -1
  1115. package/node_modules/@tiptap/extensions/dist/trailing-node/index.js +0 -60
  1116. package/node_modules/@tiptap/extensions/dist/trailing-node/index.js.map +0 -1
  1117. package/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs +0 -48
  1118. package/node_modules/@tiptap/extensions/dist/undo-redo/index.cjs.map +0 -1
  1119. package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts +0 -45
  1120. package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.cts.map +0 -1
  1121. package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts +0 -45
  1122. package/node_modules/@tiptap/extensions/dist/undo-redo/index.d.ts.map +0 -1
  1123. package/node_modules/@tiptap/extensions/dist/undo-redo/index.js +0 -47
  1124. package/node_modules/@tiptap/extensions/dist/undo-redo/index.js.map +0 -1
  1125. package/node_modules/@tiptap/extensions/package.json +0 -116
  1126. package/node_modules/@tiptap/extensions/src/character-count/character-count.ts +0 -203
  1127. package/node_modules/@tiptap/extensions/src/character-count/index.ts +0 -1
  1128. package/node_modules/@tiptap/extensions/src/drop-cursor/drop-cursor.ts +0 -47
  1129. package/node_modules/@tiptap/extensions/src/drop-cursor/index.ts +0 -1
  1130. package/node_modules/@tiptap/extensions/src/focus/focus.ts +0 -110
  1131. package/node_modules/@tiptap/extensions/src/focus/index.ts +0 -1
  1132. package/node_modules/@tiptap/extensions/src/gap-cursor/gap-cursor.ts +0 -47
  1133. package/node_modules/@tiptap/extensions/src/gap-cursor/index.ts +0 -1
  1134. package/node_modules/@tiptap/extensions/src/index.ts +0 -8
  1135. package/node_modules/@tiptap/extensions/src/placeholder/constants.ts +0 -8
  1136. package/node_modules/@tiptap/extensions/src/placeholder/index.ts +0 -4
  1137. package/node_modules/@tiptap/extensions/src/placeholder/placeholder.ts +0 -30
  1138. package/node_modules/@tiptap/extensions/src/placeholder/plugins/PlaceholderPlugin.ts +0 -49
  1139. package/node_modules/@tiptap/extensions/src/placeholder/types.ts +0 -74
  1140. package/node_modules/@tiptap/extensions/src/placeholder/utils/buildPlaceholderDecorations.ts +0 -164
  1141. package/node_modules/@tiptap/extensions/src/placeholder/utils/createPlaceholderDecoration.ts +0 -61
  1142. package/node_modules/@tiptap/extensions/src/placeholder/utils/index.ts +0 -3
  1143. package/node_modules/@tiptap/extensions/src/placeholder/utils/placeholderStateField.ts +0 -204
  1144. package/node_modules/@tiptap/extensions/src/placeholder/utils/preparePlaceholderAttribute.ts +0 -21
  1145. package/node_modules/@tiptap/extensions/src/placeholder/utils/resolveTopLevelRange.test.ts +0 -78
  1146. package/node_modules/@tiptap/extensions/src/placeholder/utils/resolveTopLevelRange.ts +0 -93
  1147. package/node_modules/@tiptap/extensions/src/selection/index.ts +0 -1
  1148. package/node_modules/@tiptap/extensions/src/selection/selection.test.ts +0 -97
  1149. package/node_modules/@tiptap/extensions/src/selection/selection.ts +0 -106
  1150. package/node_modules/@tiptap/extensions/src/trailing-node/index.ts +0 -1
  1151. package/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.test.ts +0 -90
  1152. package/node_modules/@tiptap/extensions/src/trailing-node/trailing-node.ts +0 -107
  1153. package/node_modules/@tiptap/extensions/src/undo-redo/index.ts +0 -1
  1154. package/node_modules/@tiptap/extensions/src/undo-redo/undo-redo.ts +0 -86
  1155. package/node_modules/@tiptap/pm/LICENSE +0 -21
  1156. package/node_modules/@tiptap/pm/README.md +0 -22
  1157. package/node_modules/@tiptap/pm/THIRD_PARTY_LICENSES.md +0 -47
  1158. package/node_modules/@tiptap/pm/changeset/index.ts +0 -1
  1159. package/node_modules/@tiptap/pm/commands/index.ts +0 -1
  1160. package/node_modules/@tiptap/pm/dist/changeset/index.cjs +0 -9
  1161. package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +0 -1
  1162. package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +0 -1
  1163. package/node_modules/@tiptap/pm/dist/changeset/index.js +0 -2
  1164. package/node_modules/@tiptap/pm/dist/commands/index.cjs +0 -9
  1165. package/node_modules/@tiptap/pm/dist/commands/index.d.cts +0 -1
  1166. package/node_modules/@tiptap/pm/dist/commands/index.d.ts +0 -1
  1167. package/node_modules/@tiptap/pm/dist/commands/index.js +0 -2
  1168. package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +0 -9
  1169. package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +0 -1
  1170. package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +0 -1
  1171. package/node_modules/@tiptap/pm/dist/dropcursor/index.js +0 -2
  1172. package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +0 -9
  1173. package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +0 -1
  1174. package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +0 -1
  1175. package/node_modules/@tiptap/pm/dist/gapcursor/index.js +0 -2
  1176. package/node_modules/@tiptap/pm/dist/history/index.cjs +0 -9
  1177. package/node_modules/@tiptap/pm/dist/history/index.d.cts +0 -1
  1178. package/node_modules/@tiptap/pm/dist/history/index.d.ts +0 -1
  1179. package/node_modules/@tiptap/pm/dist/history/index.js +0 -2
  1180. package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +0 -9
  1181. package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +0 -1
  1182. package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +0 -1
  1183. package/node_modules/@tiptap/pm/dist/inputrules/index.js +0 -2
  1184. package/node_modules/@tiptap/pm/dist/keymap/index.cjs +0 -9
  1185. package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +0 -1
  1186. package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +0 -1
  1187. package/node_modules/@tiptap/pm/dist/keymap/index.js +0 -2
  1188. package/node_modules/@tiptap/pm/dist/model/index.cjs +0 -9
  1189. package/node_modules/@tiptap/pm/dist/model/index.d.cts +0 -1
  1190. package/node_modules/@tiptap/pm/dist/model/index.d.ts +0 -1
  1191. package/node_modules/@tiptap/pm/dist/model/index.js +0 -2
  1192. package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +0 -9
  1193. package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +0 -1
  1194. package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +0 -1
  1195. package/node_modules/@tiptap/pm/dist/schema-list/index.js +0 -2
  1196. package/node_modules/@tiptap/pm/dist/state/index.cjs +0 -9
  1197. package/node_modules/@tiptap/pm/dist/state/index.d.cts +0 -1
  1198. package/node_modules/@tiptap/pm/dist/state/index.d.ts +0 -1
  1199. package/node_modules/@tiptap/pm/dist/state/index.js +0 -2
  1200. package/node_modules/@tiptap/pm/dist/tables/index.cjs +0 -9
  1201. package/node_modules/@tiptap/pm/dist/tables/index.d.cts +0 -1
  1202. package/node_modules/@tiptap/pm/dist/tables/index.d.ts +0 -1
  1203. package/node_modules/@tiptap/pm/dist/tables/index.js +0 -2
  1204. package/node_modules/@tiptap/pm/dist/transform/index.cjs +0 -9
  1205. package/node_modules/@tiptap/pm/dist/transform/index.d.cts +0 -1
  1206. package/node_modules/@tiptap/pm/dist/transform/index.d.ts +0 -1
  1207. package/node_modules/@tiptap/pm/dist/transform/index.js +0 -2
  1208. package/node_modules/@tiptap/pm/dist/view/index.cjs +0 -9
  1209. package/node_modules/@tiptap/pm/dist/view/index.d.cts +0 -1
  1210. package/node_modules/@tiptap/pm/dist/view/index.d.ts +0 -1
  1211. package/node_modules/@tiptap/pm/dist/view/index.js +0 -2
  1212. package/node_modules/@tiptap/pm/dropcursor/index.ts +0 -1
  1213. package/node_modules/@tiptap/pm/gapcursor/index.ts +0 -1
  1214. package/node_modules/@tiptap/pm/history/index.ts +0 -1
  1215. package/node_modules/@tiptap/pm/inputrules/index.ts +0 -1
  1216. package/node_modules/@tiptap/pm/keymap/index.ts +0 -1
  1217. package/node_modules/@tiptap/pm/model/index.ts +0 -1
  1218. package/node_modules/@tiptap/pm/package.json +0 -166
  1219. package/node_modules/@tiptap/pm/schema-list/index.ts +0 -1
  1220. package/node_modules/@tiptap/pm/state/index.ts +0 -1
  1221. package/node_modules/@tiptap/pm/tables/index.ts +0 -1
  1222. package/node_modules/@tiptap/pm/transform/index.ts +0 -1
  1223. package/node_modules/@tiptap/pm/view/index.ts +0 -1
  1224. package/node_modules/@tiptap/react/LICENSE.md +0 -21
  1225. package/node_modules/@tiptap/react/README.md +0 -18
  1226. package/node_modules/@tiptap/react/dist/index.cjs +0 -1396
  1227. package/node_modules/@tiptap/react/dist/index.cjs.map +0 -1
  1228. package/node_modules/@tiptap/react/dist/index.d.cts +0 -632
  1229. package/node_modules/@tiptap/react/dist/index.d.cts.map +0 -1
  1230. package/node_modules/@tiptap/react/dist/index.d.ts +0 -632
  1231. package/node_modules/@tiptap/react/dist/index.d.ts.map +0 -1
  1232. package/node_modules/@tiptap/react/dist/index.js +0 -1337
  1233. package/node_modules/@tiptap/react/dist/index.js.map +0 -1
  1234. package/node_modules/@tiptap/react/dist/menus/index.cjs +0 -469
  1235. package/node_modules/@tiptap/react/dist/menus/index.cjs.map +0 -1
  1236. package/node_modules/@tiptap/react/dist/menus/index.d.cts +0 -21
  1237. package/node_modules/@tiptap/react/dist/menus/index.d.cts.map +0 -1
  1238. package/node_modules/@tiptap/react/dist/menus/index.d.ts +0 -21
  1239. package/node_modules/@tiptap/react/dist/menus/index.d.ts.map +0 -1
  1240. package/node_modules/@tiptap/react/dist/menus/index.js +0 -444
  1241. package/node_modules/@tiptap/react/dist/menus/index.js.map +0 -1
  1242. package/node_modules/@tiptap/react/package.json +0 -80
  1243. package/node_modules/@tiptap/react/src/Context.tsx +0 -62
  1244. package/node_modules/@tiptap/react/src/Editor.ts +0 -16
  1245. package/node_modules/@tiptap/react/src/EditorContent.test.ts +0 -39
  1246. package/node_modules/@tiptap/react/src/EditorContent.tsx +0 -230
  1247. package/node_modules/@tiptap/react/src/NodeViewContent.tsx +0 -30
  1248. package/node_modules/@tiptap/react/src/NodeViewWrapper.tsx +0 -27
  1249. package/node_modules/@tiptap/react/src/ReactMarkViewRenderer.tsx +0 -114
  1250. package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.test.ts +0 -566
  1251. package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.tsx +0 -465
  1252. package/node_modules/@tiptap/react/src/ReactNodeViewSelectionTracker.ts +0 -113
  1253. package/node_modules/@tiptap/react/src/ReactRenderer.tsx +0 -304
  1254. package/node_modules/@tiptap/react/src/ReactWidgetRenderer.test.ts +0 -448
  1255. package/node_modules/@tiptap/react/src/ReactWidgetRenderer.tsx +0 -97
  1256. package/node_modules/@tiptap/react/src/Tiptap.tsx +0 -232
  1257. package/node_modules/@tiptap/react/src/captureDOMSelection.test.ts +0 -76
  1258. package/node_modules/@tiptap/react/src/captureDOMSelection.ts +0 -35
  1259. package/node_modules/@tiptap/react/src/handleMobileEnter.test.ts +0 -218
  1260. package/node_modules/@tiptap/react/src/handleMobileEnter.ts +0 -60
  1261. package/node_modules/@tiptap/react/src/index.ts +0 -16
  1262. package/node_modules/@tiptap/react/src/lib/utils/getTextSelectionAncestorPositions.ts +0 -27
  1263. package/node_modules/@tiptap/react/src/menus/BubbleMenu.test.ts +0 -178
  1264. package/node_modules/@tiptap/react/src/menus/BubbleMenu.tsx +0 -160
  1265. package/node_modules/@tiptap/react/src/menus/FloatingMenu.test.ts +0 -168
  1266. package/node_modules/@tiptap/react/src/menus/FloatingMenu.tsx +0 -161
  1267. package/node_modules/@tiptap/react/src/menus/getAutoPluginKey.ts +0 -5
  1268. package/node_modules/@tiptap/react/src/menus/index.ts +0 -4
  1269. package/node_modules/@tiptap/react/src/menus/useMenuElementProps.ts +0 -369
  1270. package/node_modules/@tiptap/react/src/types.ts +0 -8
  1271. package/node_modules/@tiptap/react/src/useEditor.ts +0 -379
  1272. package/node_modules/@tiptap/react/src/useEditorState.test.ts +0 -160
  1273. package/node_modules/@tiptap/react/src/useEditorState.ts +0 -187
  1274. package/node_modules/@tiptap/react/src/useReactNodeView.ts +0 -38
  1275. package/node_modules/@tiptap/starter-kit/LICENSE.md +0 -21
  1276. package/node_modules/@tiptap/starter-kit/README.md +0 -18
  1277. package/node_modules/@tiptap/starter-kit/dist/index.cjs +0 -76
  1278. package/node_modules/@tiptap/starter-kit/dist/index.cjs.map +0 -1
  1279. package/node_modules/@tiptap/starter-kit/dist/index.d.cts +0 -137
  1280. package/node_modules/@tiptap/starter-kit/dist/index.d.cts.map +0 -1
  1281. package/node_modules/@tiptap/starter-kit/dist/index.d.ts +0 -137
  1282. package/node_modules/@tiptap/starter-kit/dist/index.d.ts.map +0 -1
  1283. package/node_modules/@tiptap/starter-kit/dist/index.js +0 -71
  1284. package/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
  1285. package/node_modules/@tiptap/starter-kit/package.json +0 -70
  1286. package/node_modules/@tiptap/starter-kit/src/index.ts +0 -6
  1287. package/node_modules/@tiptap/starter-kit/src/starter-kit.ts +0 -273
  1288. package/node_modules/@tiptap/suggestion/LICENSE.md +0 -21
  1289. package/node_modules/@tiptap/suggestion/README.md +0 -18
  1290. package/node_modules/@tiptap/suggestion/dist/index.cjs +0 -665
  1291. package/node_modules/@tiptap/suggestion/dist/index.cjs.map +0 -1
  1292. package/node_modules/@tiptap/suggestion/dist/index.d.cts +0 -419
  1293. package/node_modules/@tiptap/suggestion/dist/index.d.cts.map +0 -1
  1294. package/node_modules/@tiptap/suggestion/dist/index.d.ts +0 -419
  1295. package/node_modules/@tiptap/suggestion/dist/index.d.ts.map +0 -1
  1296. package/node_modules/@tiptap/suggestion/dist/index.js +0 -657
  1297. package/node_modules/@tiptap/suggestion/dist/index.js.map +0 -1
  1298. package/node_modules/@tiptap/suggestion/package.json +0 -54
  1299. package/node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts +0 -86
  1300. package/node_modules/@tiptap/suggestion/src/helpers.ts +0 -129
  1301. package/node_modules/@tiptap/suggestion/src/index.ts +0 -8
  1302. package/node_modules/@tiptap/suggestion/src/plugin/async.ts +0 -89
  1303. package/node_modules/@tiptap/suggestion/src/plugin/floating-ui.ts +0 -204
  1304. package/node_modules/@tiptap/suggestion/src/plugin/props.ts +0 -94
  1305. package/node_modules/@tiptap/suggestion/src/plugin/state.ts +0 -182
  1306. package/node_modules/@tiptap/suggestion/src/plugin/view.ts +0 -236
  1307. package/node_modules/@tiptap/suggestion/src/suggestion.ts +0 -151
  1308. package/node_modules/@tiptap/suggestion/src/types.ts +0 -439
  1309. package/node_modules/@types/use-sync-external-store/LICENSE +0 -21
  1310. package/node_modules/@types/use-sync-external-store/README.md +0 -15
  1311. package/node_modules/@types/use-sync-external-store/index.d.ts +0 -5
  1312. package/node_modules/@types/use-sync-external-store/package.json +0 -30
  1313. package/node_modules/@types/use-sync-external-store/shim/index.d.ts +0 -1
  1314. package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +0 -1
  1315. package/node_modules/@types/use-sync-external-store/with-selector.d.ts +0 -7
  1316. package/node_modules/fast-equals/LICENSE +0 -21
  1317. package/node_modules/fast-equals/README.md +0 -479
  1318. package/node_modules/fast-equals/dist/cjs/index.cjs +0 -796
  1319. package/node_modules/fast-equals/dist/cjs/index.cjs.map +0 -1
  1320. package/node_modules/fast-equals/dist/cjs/index.d.cts +0 -211
  1321. package/node_modules/fast-equals/dist/es/index.d.mts +0 -211
  1322. package/node_modules/fast-equals/dist/es/index.mjs +0 -785
  1323. package/node_modules/fast-equals/dist/es/index.mjs.map +0 -1
  1324. package/node_modules/fast-equals/dist/umd/index.d.ts +0 -211
  1325. package/node_modules/fast-equals/dist/umd/index.js +0 -802
  1326. package/node_modules/fast-equals/dist/umd/index.js.map +0 -1
  1327. package/node_modules/fast-equals/index.d.ts +0 -211
  1328. package/node_modules/fast-equals/package.json +0 -120
  1329. package/node_modules/linkifyjs/LICENSE +0 -19
  1330. package/node_modules/linkifyjs/README.md +0 -47
  1331. package/node_modules/linkifyjs/dist/linkify.cjs +0 -1854
  1332. package/node_modules/linkifyjs/dist/linkify.d.cts +0 -637
  1333. package/node_modules/linkifyjs/dist/linkify.d.mts +0 -637
  1334. package/node_modules/linkifyjs/dist/linkify.js +0 -1859
  1335. package/node_modules/linkifyjs/dist/linkify.min.js +0 -1
  1336. package/node_modules/linkifyjs/dist/linkify.mjs +0 -1836
  1337. package/node_modules/linkifyjs/package.json +0 -38
  1338. package/node_modules/orderedmap/LICENSE +0 -19
  1339. package/node_modules/orderedmap/README.md +0 -69
  1340. package/node_modules/orderedmap/dist/index.cjs +0 -139
  1341. package/node_modules/orderedmap/dist/index.d.cts +0 -33
  1342. package/node_modules/orderedmap/dist/index.d.ts +0 -33
  1343. package/node_modules/orderedmap/dist/index.js +0 -137
  1344. package/node_modules/orderedmap/package.json +0 -39
  1345. package/node_modules/prosemirror-changeset/CHANGELOG.md +0 -171
  1346. package/node_modules/prosemirror-changeset/LICENSE +0 -19
  1347. package/node_modules/prosemirror-changeset/README.md +0 -175
  1348. package/node_modules/prosemirror-changeset/dist/index.cjs +0 -588
  1349. package/node_modules/prosemirror-changeset/dist/index.d.cts +0 -187
  1350. package/node_modules/prosemirror-changeset/dist/index.d.ts +0 -187
  1351. package/node_modules/prosemirror-changeset/dist/index.js +0 -722
  1352. package/node_modules/prosemirror-changeset/package.json +0 -40
  1353. package/node_modules/prosemirror-changeset/src/README.md +0 -32
  1354. package/node_modules/prosemirror-changeset/src/change.ts +0 -189
  1355. package/node_modules/prosemirror-changeset/src/changeset.ts +0 -212
  1356. package/node_modules/prosemirror-changeset/src/diff.ts +0 -158
  1357. package/node_modules/prosemirror-changeset/src/simplify.ts +0 -132
  1358. package/node_modules/prosemirror-changeset/test/test-changed-range.ts +0 -48
  1359. package/node_modules/prosemirror-changeset/test/test-changes.ts +0 -211
  1360. package/node_modules/prosemirror-changeset/test/test-diff.ts +0 -77
  1361. package/node_modules/prosemirror-changeset/test/test-merge.ts +0 -56
  1362. package/node_modules/prosemirror-changeset/test/test-simplify.ts +0 -74
  1363. package/node_modules/prosemirror-commands/.tern-project +0 -8
  1364. package/node_modules/prosemirror-commands/CHANGELOG.md +0 -328
  1365. package/node_modules/prosemirror-commands/CONTRIBUTING.md +0 -104
  1366. package/node_modules/prosemirror-commands/LICENSE +0 -19
  1367. package/node_modules/prosemirror-commands/README.md +0 -28
  1368. package/node_modules/prosemirror-commands/dist/index.cjs +0 -688
  1369. package/node_modules/prosemirror-commands/dist/index.d.cts +0 -215
  1370. package/node_modules/prosemirror-commands/dist/index.d.ts +0 -215
  1371. package/node_modules/prosemirror-commands/dist/index.js +0 -852
  1372. package/node_modules/prosemirror-commands/package.json +0 -39
  1373. package/node_modules/prosemirror-commands/src/README.md +0 -40
  1374. package/node_modules/prosemirror-commands/src/commands.ts +0 -786
  1375. package/node_modules/prosemirror-dropcursor/CHANGELOG.md +0 -149
  1376. package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +0 -104
  1377. package/node_modules/prosemirror-dropcursor/LICENSE +0 -19
  1378. package/node_modules/prosemirror-dropcursor/README.md +0 -50
  1379. package/node_modules/prosemirror-dropcursor/dist/index.cjs +0 -200
  1380. package/node_modules/prosemirror-dropcursor/dist/index.d.cts +0 -38
  1381. package/node_modules/prosemirror-dropcursor/dist/index.d.ts +0 -38
  1382. package/node_modules/prosemirror-dropcursor/dist/index.js +0 -163
  1383. package/node_modules/prosemirror-dropcursor/package.json +0 -38
  1384. package/node_modules/prosemirror-dropcursor/src/dropcursor.ts +0 -186
  1385. package/node_modules/prosemirror-gapcursor/CHANGELOG.md +0 -122
  1386. package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +0 -104
  1387. package/node_modules/prosemirror-gapcursor/LICENSE +0 -19
  1388. package/node_modules/prosemirror-gapcursor/README.md +0 -31
  1389. package/node_modules/prosemirror-gapcursor/dist/index.cjs +0 -239
  1390. package/node_modules/prosemirror-gapcursor/dist/index.d.cts +0 -31
  1391. package/node_modules/prosemirror-gapcursor/dist/index.d.ts +0 -31
  1392. package/node_modules/prosemirror-gapcursor/dist/index.js +0 -239
  1393. package/node_modules/prosemirror-gapcursor/package.json +0 -43
  1394. package/node_modules/prosemirror-gapcursor/src/README.md +0 -21
  1395. package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +0 -141
  1396. package/node_modules/prosemirror-gapcursor/src/index.ts +0 -91
  1397. package/node_modules/prosemirror-gapcursor/style/gapcursor.css +0 -25
  1398. package/node_modules/prosemirror-history/.tern-project +0 -8
  1399. package/node_modules/prosemirror-history/CHANGELOG.md +0 -176
  1400. package/node_modules/prosemirror-history/CONTRIBUTING.md +0 -104
  1401. package/node_modules/prosemirror-history/LICENSE +0 -19
  1402. package/node_modules/prosemirror-history/README.md +0 -27
  1403. package/node_modules/prosemirror-history/dist/index.cjs +0 -383
  1404. package/node_modules/prosemirror-history/dist/index.d.cts +0 -64
  1405. package/node_modules/prosemirror-history/dist/index.d.ts +0 -64
  1406. package/node_modules/prosemirror-history/dist/index.js +0 -454
  1407. package/node_modules/prosemirror-history/package.json +0 -40
  1408. package/node_modules/prosemirror-history/src/README.md +0 -23
  1409. package/node_modules/prosemirror-history/src/history.ts +0 -466
  1410. package/node_modules/prosemirror-inputrules/.tern-project +0 -8
  1411. package/node_modules/prosemirror-inputrules/CHANGELOG.md +0 -127
  1412. package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +0 -104
  1413. package/node_modules/prosemirror-inputrules/LICENSE +0 -19
  1414. package/node_modules/prosemirror-inputrules/README.md +0 -29
  1415. package/node_modules/prosemirror-inputrules/dist/index.cjs +0 -194
  1416. package/node_modules/prosemirror-inputrules/dist/index.d.cts +0 -131
  1417. package/node_modules/prosemirror-inputrules/dist/index.d.ts +0 -131
  1418. package/node_modules/prosemirror-inputrules/dist/index.js +0 -239
  1419. package/node_modules/prosemirror-inputrules/package.json +0 -36
  1420. package/node_modules/prosemirror-inputrules/src/README.md +0 -23
  1421. package/node_modules/prosemirror-inputrules/src/index.ts +0 -4
  1422. package/node_modules/prosemirror-inputrules/src/inputrules.ts +0 -167
  1423. package/node_modules/prosemirror-inputrules/src/rulebuilders.ts +0 -59
  1424. package/node_modules/prosemirror-inputrules/src/rules.ts +0 -17
  1425. package/node_modules/prosemirror-keymap/.tern-project +0 -8
  1426. package/node_modules/prosemirror-keymap/CHANGELOG.md +0 -104
  1427. package/node_modules/prosemirror-keymap/CONTRIBUTING.md +0 -104
  1428. package/node_modules/prosemirror-keymap/LICENSE +0 -19
  1429. package/node_modules/prosemirror-keymap/README.md +0 -27
  1430. package/node_modules/prosemirror-keymap/dist/index.cjs +0 -65
  1431. package/node_modules/prosemirror-keymap/dist/index.d.cts +0 -47
  1432. package/node_modules/prosemirror-keymap/dist/index.d.ts +0 -47
  1433. package/node_modules/prosemirror-keymap/dist/index.js +0 -128
  1434. package/node_modules/prosemirror-keymap/package.json +0 -38
  1435. package/node_modules/prosemirror-keymap/src/README.md +0 -5
  1436. package/node_modules/prosemirror-keymap/src/keymap.ts +0 -105
  1437. package/node_modules/prosemirror-model/.tern-project +0 -8
  1438. package/node_modules/prosemirror-model/CHANGELOG.md +0 -782
  1439. package/node_modules/prosemirror-model/CONTRIBUTING.md +0 -104
  1440. package/node_modules/prosemirror-model/LICENSE +0 -19
  1441. package/node_modules/prosemirror-model/README.md +0 -29
  1442. package/node_modules/prosemirror-model/dist/index.cjs +0 -2911
  1443. package/node_modules/prosemirror-model/dist/index.d.cts +0 -1683
  1444. package/node_modules/prosemirror-model/dist/index.d.ts +0 -1683
  1445. package/node_modules/prosemirror-model/dist/index.js +0 -3463
  1446. package/node_modules/prosemirror-model/package.json +0 -38
  1447. package/node_modules/prosemirror-model/src/README.md +0 -62
  1448. package/node_modules/prosemirror-model/src/comparedeep.ts +0 -15
  1449. package/node_modules/prosemirror-model/src/content.ts +0 -413
  1450. package/node_modules/prosemirror-model/src/diff.ts +0 -57
  1451. package/node_modules/prosemirror-model/src/dom.ts +0 -1
  1452. package/node_modules/prosemirror-model/src/fragment.ts +0 -268
  1453. package/node_modules/prosemirror-model/src/from_dom.ts +0 -851
  1454. package/node_modules/prosemirror-model/src/index.ts +0 -11
  1455. package/node_modules/prosemirror-model/src/mark.ts +0 -110
  1456. package/node_modules/prosemirror-model/src/node.ts +0 -410
  1457. package/node_modules/prosemirror-model/src/replace.ts +0 -217
  1458. package/node_modules/prosemirror-model/src/resolvedpos.ts +0 -289
  1459. package/node_modules/prosemirror-model/src/schema.ts +0 -691
  1460. package/node_modules/prosemirror-model/src/to_dom.ts +0 -242
  1461. package/node_modules/prosemirror-schema-list/.tern-project +0 -8
  1462. package/node_modules/prosemirror-schema-list/CHANGELOG.md +0 -140
  1463. package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +0 -100
  1464. package/node_modules/prosemirror-schema-list/LICENSE +0 -19
  1465. package/node_modules/prosemirror-schema-list/README.md +0 -28
  1466. package/node_modules/prosemirror-schema-list/dist/index.cjs +0 -253
  1467. package/node_modules/prosemirror-schema-list/dist/index.d.cts +0 -71
  1468. package/node_modules/prosemirror-schema-list/dist/index.d.ts +0 -71
  1469. package/node_modules/prosemirror-schema-list/dist/index.js +0 -289
  1470. package/node_modules/prosemirror-schema-list/package.json +0 -40
  1471. package/node_modules/prosemirror-schema-list/src/README.md +0 -29
  1472. package/node_modules/prosemirror-schema-list/src/schema-list.ts +0 -267
  1473. package/node_modules/prosemirror-state/.tern-project +0 -8
  1474. package/node_modules/prosemirror-state/CHANGELOG.md +0 -296
  1475. package/node_modules/prosemirror-state/CONTRIBUTING.md +0 -104
  1476. package/node_modules/prosemirror-state/LICENSE +0 -19
  1477. package/node_modules/prosemirror-state/README.md +0 -28
  1478. package/node_modules/prosemirror-state/dist/index.cjs +0 -884
  1479. package/node_modules/prosemirror-state/dist/index.d.cts +0 -709
  1480. package/node_modules/prosemirror-state/dist/index.d.ts +0 -709
  1481. package/node_modules/prosemirror-state/dist/index.js +0 -1002
  1482. package/node_modules/prosemirror-state/package.json +0 -39
  1483. package/node_modules/prosemirror-state/src/README.md +0 -42
  1484. package/node_modules/prosemirror-state/src/index.ts +0 -7
  1485. package/node_modules/prosemirror-state/src/plugin.ts +0 -142
  1486. package/node_modules/prosemirror-state/src/selection.ts +0 -462
  1487. package/node_modules/prosemirror-state/src/state.ts +0 -266
  1488. package/node_modules/prosemirror-state/src/transaction.ts +0 -215
  1489. package/node_modules/prosemirror-tables/LICENSE +0 -19
  1490. package/node_modules/prosemirror-tables/README.md +0 -254
  1491. package/node_modules/prosemirror-tables/dist/index.cjs +0 -2683
  1492. package/node_modules/prosemirror-tables/dist/index.d.cts +0 -751
  1493. package/node_modules/prosemirror-tables/dist/index.d.cts.map +0 -1
  1494. package/node_modules/prosemirror-tables/dist/index.d.ts +0 -751
  1495. package/node_modules/prosemirror-tables/dist/index.d.ts.map +0 -1
  1496. package/node_modules/prosemirror-tables/dist/index.js +0 -2626
  1497. package/node_modules/prosemirror-tables/dist/index.js.map +0 -1
  1498. package/node_modules/prosemirror-tables/package.json +0 -80
  1499. package/node_modules/prosemirror-tables/style/tables.css +0 -48
  1500. package/node_modules/prosemirror-transform/.tern-project +0 -8
  1501. package/node_modules/prosemirror-transform/CHANGELOG.md +0 -530
  1502. package/node_modules/prosemirror-transform/CONTRIBUTING.md +0 -104
  1503. package/node_modules/prosemirror-transform/LICENSE +0 -19
  1504. package/node_modules/prosemirror-transform/README.md +0 -29
  1505. package/node_modules/prosemirror-transform/dist/index.cjs +0 -2014
  1506. package/node_modules/prosemirror-transform/dist/index.d.cts +0 -857
  1507. package/node_modules/prosemirror-transform/dist/index.d.ts +0 -857
  1508. package/node_modules/prosemirror-transform/dist/index.js +0 -2272
  1509. package/node_modules/prosemirror-transform/package.json +0 -37
  1510. package/node_modules/prosemirror-transform/src/README.md +0 -59
  1511. package/node_modules/prosemirror-transform/src/attr_step.ts +0 -98
  1512. package/node_modules/prosemirror-transform/src/index.ts +0 -11
  1513. package/node_modules/prosemirror-transform/src/map.ts +0 -287
  1514. package/node_modules/prosemirror-transform/src/mark.ts +0 -90
  1515. package/node_modules/prosemirror-transform/src/mark_step.ts +0 -287
  1516. package/node_modules/prosemirror-transform/src/replace.ts +0 -483
  1517. package/node_modules/prosemirror-transform/src/replace_step.ts +0 -187
  1518. package/node_modules/prosemirror-transform/src/step.ts +0 -97
  1519. package/node_modules/prosemirror-transform/src/structure.ts +0 -349
  1520. package/node_modules/prosemirror-transform/src/transform.ts +0 -271
  1521. package/node_modules/prosemirror-view/.tern-project +0 -8
  1522. package/node_modules/prosemirror-view/CHANGELOG.md +0 -2543
  1523. package/node_modules/prosemirror-view/CONTRIBUTING.md +0 -104
  1524. package/node_modules/prosemirror-view/LICENSE +0 -19
  1525. package/node_modules/prosemirror-view/README.md +0 -28
  1526. package/node_modules/prosemirror-view/dist/index.cjs +0 -5549
  1527. package/node_modules/prosemirror-view/dist/index.d.cts +0 -913
  1528. package/node_modules/prosemirror-view/dist/index.d.ts +0 -913
  1529. package/node_modules/prosemirror-view/dist/index.js +0 -6053
  1530. package/node_modules/prosemirror-view/package.json +0 -43
  1531. package/node_modules/prosemirror-view/src/README.md +0 -38
  1532. package/node_modules/prosemirror-view/src/browser.ts +0 -24
  1533. package/node_modules/prosemirror-view/src/capturekeys.ts +0 -344
  1534. package/node_modules/prosemirror-view/src/clipboard.ts +0 -282
  1535. package/node_modules/prosemirror-view/src/decoration.ts +0 -817
  1536. package/node_modules/prosemirror-view/src/dom.ts +0 -166
  1537. package/node_modules/prosemirror-view/src/domchange.ts +0 -383
  1538. package/node_modules/prosemirror-view/src/domcoords.ts +0 -517
  1539. package/node_modules/prosemirror-view/src/domobserver.ts +0 -397
  1540. package/node_modules/prosemirror-view/src/index.ts +0 -826
  1541. package/node_modules/prosemirror-view/src/input.ts +0 -885
  1542. package/node_modules/prosemirror-view/src/selection.ts +0 -229
  1543. package/node_modules/prosemirror-view/src/viewdesc.ts +0 -1624
  1544. package/node_modules/prosemirror-view/style/prosemirror.css +0 -54
  1545. package/node_modules/rope-sequence/LICENSE +0 -19
  1546. package/node_modules/rope-sequence/README.md +0 -63
  1547. package/node_modules/rope-sequence/dist/index.cjs +0 -209
  1548. package/node_modules/rope-sequence/dist/index.d.cts +0 -11
  1549. package/node_modules/rope-sequence/dist/index.d.ts +0 -11
  1550. package/node_modules/rope-sequence/dist/index.js +0 -207
  1551. package/node_modules/rope-sequence/index.js +0 -190
  1552. package/node_modules/rope-sequence/package.json +0 -34
  1553. package/node_modules/rope-sequence/test.js +0 -78
  1554. package/node_modules/use-sync-external-store/LICENSE +0 -21
  1555. package/node_modules/use-sync-external-store/README.md +0 -5
  1556. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -97
  1557. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -85
  1558. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -95
  1559. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +0 -88
  1560. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +0 -59
  1561. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -66
  1562. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -96
  1563. package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -84
  1564. package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +0 -27
  1565. package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +0 -13
  1566. package/node_modules/use-sync-external-store/index.js +0 -7
  1567. package/node_modules/use-sync-external-store/package.json +0 -43
  1568. package/node_modules/use-sync-external-store/shim/index.js +0 -7
  1569. package/node_modules/use-sync-external-store/shim/index.native.js +0 -7
  1570. package/node_modules/use-sync-external-store/shim/with-selector.js +0 -7
  1571. package/node_modules/use-sync-external-store/with-selector.js +0 -7
  1572. package/node_modules/w3c-keyname/.tern-port +0 -1
  1573. package/node_modules/w3c-keyname/LICENSE +0 -19
  1574. package/node_modules/w3c-keyname/README.md +0 -18
  1575. package/node_modules/w3c-keyname/index.cjs +0 -127
  1576. package/node_modules/w3c-keyname/index.d.cts +0 -5
  1577. package/node_modules/w3c-keyname/index.d.ts +0 -5
  1578. package/node_modules/w3c-keyname/index.js +0 -119
  1579. package/node_modules/w3c-keyname/package.json +0 -37
  1580. package/src/legacy/ask.tsx +0 -154
  1581. package/src/legacy/basic.tsx +0 -127
  1582. package/src/legacy/block-meta.ts +0 -42
  1583. package/src/legacy/block-ops.ts +0 -179
  1584. package/src/legacy/blocks.tsx +0 -165
  1585. package/src/legacy/boundary.tsx +0 -17
  1586. package/src/legacy/content.ts +0 -22
  1587. package/src/legacy/drag-handle.tsx +0 -188
  1588. package/src/legacy/dynamic.tsx +0 -145
  1589. package/src/legacy/editor.css +0 -356
  1590. package/src/legacy/editor.tsx +0 -425
  1591. package/src/legacy/extensions.ts +0 -78
  1592. package/src/legacy/insert-pattern.ts +0 -13
  1593. package/src/legacy/insert.ts +0 -9
  1594. package/src/legacy/inserter.tsx +0 -164
  1595. package/src/legacy/inspector.tsx +0 -237
  1596. package/src/legacy/layout-ui.tsx +0 -227
  1597. package/src/legacy/layout.tsx +0 -174
  1598. package/src/legacy/media.ts +0 -31
  1599. package/src/legacy/nodes.tsx +0 -107
  1600. package/src/legacy/outline.tsx +0 -124
  1601. package/src/legacy/panels.ts +0 -22
  1602. package/src/legacy/rank.ts +0 -22
  1603. package/src/legacy/registry.ts +0 -20
  1604. package/src/legacy/resize-handles.tsx +0 -149
  1605. package/src/legacy/style-attr.ts +0 -69
  1606. package/src/legacy/synced.tsx +0 -128
  1607. package/src/legacy/toolbar.tsx +0 -238
  1608. package/src/legacy/unknown.tsx +0 -74
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["readFromCache: (key: Node) => TableMap | undefined","addToCache: (key: Node, value: TableMap) => TableMap","cache: (Node | TableMap)[]","width: number","height: number","map: number[]","problems: Problem[] | null","result: number[]","seen: Record<number, boolean>","colWidths: ColWidths","result: ColWidths","result: MutableAttrs","attrs: MutableAttrs","cellAttrs: Record<string, AttributeSpec>","result: CellAttrs","seen: Record<number, boolean>","anchor: number","head: number","cells: Decoration[]","fromCellBoundaryNode: Node | undefined","toCellBoundaryNode: Node | undefined","normalize: Selection | undefined","role: string | undefined","tr: Transaction | undefined","mustAdd: number[]","role: TableRole","nodes: Node[]","rows: (Node | null)[][]","colCount","row: (Node | null)[]","newRows: Node[]","oldRow: Node","newCells: Node[]","target: number","anchor: number","head: number","moveTableColumn","moveTableRow","refColumn: number | null","refRow: number | null","seen: Record<number, boolean>","mergedPos: number | undefined","mergedCell: Node | undefined","cellNode: Node | null | undefined","cellPos: number | undefined","toggleHeaderRow: Command","toggleHeaderColumn: Command","toggleHeaderCell: Command","widths: ColWidths","added: number[]","newRows: Fragment[]","cells: Node[]","add: Node","start","cellSel: CellSelection","handleMouseDown","$anchor","dirStr: 'up' | 'down' | 'left' | 'right'","node: Node","defaultCellMinWidth: number","col","activeHandle: number","dragging: Dragging | false","pluginState","event","dom: Node | null","handleMouseDown"],"sources":["../src/tablemap.ts","../src/schema.ts","../src/util.ts","../src/cellselection.ts","../src/fixtables.ts","../src/utils/convert.ts","../src/utils/move-row-in-array-of-rows.ts","../src/utils/query.ts","../src/utils/get-cells.ts","../src/utils/selection-range.ts","../src/utils/transpose.ts","../src/utils/move-column.ts","../src/utils/move-row.ts","../src/commands.ts","../src/copypaste.ts","../src/input.ts","../src/tableview.ts","../src/columnresizing.ts","../src/index.ts"],"sourcesContent":["// Because working with row and column-spanning cells is not quite\n// trivial, this code builds up a descriptive structure for a given\n// table node. The structures are cached with the (persistent) table\n// nodes as key, so that they only have to be recomputed when the\n// content of the table changes.\n//\n// This does mean that they have to store table-relative, not\n// document-relative positions. So code that uses them will typically\n// compute the start position of the table and offset positions passed\n// to or gotten from this structure by that amount.\nimport type { Attrs, Node } from 'prosemirror-model';\n\nimport type { CellAttrs } from './util';\n\n/**\n * @public\n */\nexport type ColWidths = number[];\n\n/**\n * @public\n */\nexport type Problem =\n | {\n type: 'colwidth mismatch';\n pos: number;\n colwidth: ColWidths;\n }\n | {\n type: 'collision';\n pos: number;\n row: number;\n n: number;\n }\n | {\n type: 'missing';\n row: number;\n n: number;\n }\n | {\n type: 'overlong_rowspan';\n pos: number;\n n: number;\n }\n | {\n type: 'zero_sized';\n };\n\nlet readFromCache: (key: Node) => TableMap | undefined;\nlet addToCache: (key: Node, value: TableMap) => TableMap;\n\n// Prefer using a weak map to cache table maps. Fall back on a\n// fixed-size cache if that's not supported.\nif (typeof WeakMap != 'undefined') {\n let cache = new WeakMap<Node, TableMap>();\n readFromCache = (key) => cache.get(key);\n addToCache = (key, value) => {\n cache.set(key, value);\n return value;\n };\n} else {\n const cache: (Node | TableMap)[] = [];\n const cacheSize = 10;\n let cachePos = 0;\n readFromCache = (key) => {\n for (let i = 0; i < cache.length; i += 2)\n if (cache[i] == key) return cache[i + 1] as TableMap;\n };\n addToCache = (key, value) => {\n if (cachePos == cacheSize) cachePos = 0;\n cache[cachePos++] = key;\n return (cache[cachePos++] = value);\n };\n}\n\n/**\n * @public\n */\nexport interface Rect {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/**\n * A table map describes the structure of a given table. To avoid\n * recomputing them all the time, they are cached per table node. To\n * be able to do that, positions saved in the map are relative to the\n * start of the table, rather than the start of the document.\n *\n * @public\n */\nexport class TableMap {\n constructor(\n /**\n * The number of columns\n */\n public width: number,\n /**\n * The number of rows\n */\n public height: number,\n /**\n * A width * height array with the start position of\n * the cell covering that part of the table in each slot\n */\n public map: number[],\n /**\n * An optional array of problems (cell overlap or non-rectangular\n * shape) for the table, used by the table normalizer.\n */\n public problems: Problem[] | null,\n ) {}\n\n // Find the dimensions of the cell at the given position.\n findCell(pos: number): Rect {\n for (let i = 0; i < this.map.length; i++) {\n const curPos = this.map[i];\n if (curPos != pos) continue;\n\n const left = i % this.width;\n const top = (i / this.width) | 0;\n let right = left + 1;\n let bottom = top + 1;\n\n for (let j = 1; right < this.width && this.map[i + j] == curPos; j++) {\n right++;\n }\n for (\n let j = 1;\n bottom < this.height && this.map[i + this.width * j] == curPos;\n j++\n ) {\n bottom++;\n }\n\n return { left, top, right, bottom };\n }\n throw new RangeError(`No cell with offset ${pos} found`);\n }\n\n // Find the left side of the cell at the given position.\n colCount(pos: number): number {\n for (let i = 0; i < this.map.length; i++) {\n if (this.map[i] == pos) {\n return i % this.width;\n }\n }\n throw new RangeError(`No cell with offset ${pos} found`);\n }\n\n // Find the next cell in the given direction, starting from the cell\n // at `pos`, if any.\n nextCell(pos: number, axis: 'horiz' | 'vert', dir: number): null | number {\n const { left, right, top, bottom } = this.findCell(pos);\n if (axis == 'horiz') {\n if (dir < 0 ? left == 0 : right == this.width) return null;\n return this.map[top * this.width + (dir < 0 ? left - 1 : right)];\n } else {\n if (dir < 0 ? top == 0 : bottom == this.height) return null;\n return this.map[left + this.width * (dir < 0 ? top - 1 : bottom)];\n }\n }\n\n // Get the rectangle spanning the two given cells.\n rectBetween(a: number, b: number): Rect {\n const {\n left: leftA,\n right: rightA,\n top: topA,\n bottom: bottomA,\n } = this.findCell(a);\n const {\n left: leftB,\n right: rightB,\n top: topB,\n bottom: bottomB,\n } = this.findCell(b);\n return {\n left: Math.min(leftA, leftB),\n top: Math.min(topA, topB),\n right: Math.max(rightA, rightB),\n bottom: Math.max(bottomA, bottomB),\n };\n }\n\n // Return the position of all cells that have the top left corner in\n // the given rectangle.\n cellsInRect(rect: Rect): number[] {\n const result: number[] = [];\n const seen: Record<number, boolean> = {};\n for (let row = rect.top; row < rect.bottom; row++) {\n for (let col = rect.left; col < rect.right; col++) {\n const index = row * this.width + col;\n const pos = this.map[index];\n\n if (seen[pos]) continue;\n seen[pos] = true;\n\n if (\n (col == rect.left && col && this.map[index - 1] == pos) ||\n (row == rect.top && row && this.map[index - this.width] == pos)\n ) {\n continue;\n }\n result.push(pos);\n }\n }\n return result;\n }\n\n // Return the position at which the cell at the given row and column\n // starts, or would start, if a cell started there.\n positionAt(row: number, col: number, table: Node): number {\n for (let i = 0, rowStart = 0; ; i++) {\n const rowEnd = rowStart + table.child(i).nodeSize;\n if (i == row) {\n let index = col + row * this.width;\n const rowEndIndex = (row + 1) * this.width;\n // Skip past cells from previous rows (via rowspan)\n while (index < rowEndIndex && this.map[index] < rowStart) index++;\n return index == rowEndIndex ? rowEnd - 1 : this.map[index];\n }\n rowStart = rowEnd;\n }\n }\n\n // Find the table map for the given table node.\n static get(table: Node): TableMap {\n return readFromCache(table) || addToCache(table, computeMap(table));\n }\n}\n\n// Compute a table map.\nfunction computeMap(table: Node): TableMap {\n if (table.type.spec.tableRole != 'table')\n throw new RangeError('Not a table node: ' + table.type.name);\n const width = findWidth(table),\n height = table.childCount;\n const map = [];\n let mapPos = 0;\n let problems: Problem[] | null = null;\n const colWidths: ColWidths = [];\n for (let i = 0, e = width * height; i < e; i++) map[i] = 0;\n\n for (let row = 0, pos = 0; row < height; row++) {\n const rowNode = table.child(row);\n pos++;\n for (let i = 0; ; i++) {\n while (mapPos < map.length && map[mapPos] != 0) mapPos++;\n if (i == rowNode.childCount) break;\n const cellNode = rowNode.child(i);\n const { colspan, rowspan, colwidth } = cellNode.attrs;\n for (let h = 0; h < rowspan; h++) {\n if (h + row >= height) {\n (problems || (problems = [])).push({\n type: 'overlong_rowspan',\n pos,\n n: rowspan - h,\n });\n break;\n }\n const start = mapPos + h * width;\n for (let w = 0; w < colspan; w++) {\n if (map[start + w] == 0) map[start + w] = pos;\n else\n (problems || (problems = [])).push({\n type: 'collision',\n row,\n pos,\n n: colspan - w,\n });\n const colW = colwidth && colwidth[w];\n if (colW) {\n const widthIndex = ((start + w) % width) * 2,\n prev = colWidths[widthIndex];\n if (\n prev == null ||\n (prev != colW && colWidths[widthIndex + 1] == 1)\n ) {\n colWidths[widthIndex] = colW;\n colWidths[widthIndex + 1] = 1;\n } else if (prev == colW) {\n colWidths[widthIndex + 1]++;\n }\n }\n }\n }\n mapPos += colspan;\n pos += cellNode.nodeSize;\n }\n const expectedPos = (row + 1) * width;\n let missing = 0;\n while (mapPos < expectedPos) if (map[mapPos++] == 0) missing++;\n if (missing)\n (problems || (problems = [])).push({ type: 'missing', row, n: missing });\n pos++;\n }\n\n if (width === 0 || height === 0)\n (problems || (problems = [])).push({ type: 'zero_sized' });\n\n const tableMap = new TableMap(width, height, map, problems);\n let badWidths = false;\n\n // For columns that have defined widths, but whose widths disagree\n // between rows, fix up the cells whose width doesn't match the\n // computed one.\n for (let i = 0; !badWidths && i < colWidths.length; i += 2)\n if (colWidths[i] != null && colWidths[i + 1] < height) badWidths = true;\n if (badWidths) findBadColWidths(tableMap, colWidths, table);\n\n return tableMap;\n}\n\nfunction findWidth(table: Node): number {\n let width = -1;\n let hasRowSpan = false;\n for (let row = 0; row < table.childCount; row++) {\n const rowNode = table.child(row);\n let rowWidth = 0;\n if (hasRowSpan)\n for (let j = 0; j < row; j++) {\n const prevRow = table.child(j);\n for (let i = 0; i < prevRow.childCount; i++) {\n const cell = prevRow.child(i);\n if (j + cell.attrs.rowspan > row) rowWidth += cell.attrs.colspan;\n }\n }\n for (let i = 0; i < rowNode.childCount; i++) {\n const cell = rowNode.child(i);\n rowWidth += cell.attrs.colspan;\n if (cell.attrs.rowspan > 1) hasRowSpan = true;\n }\n if (width == -1) width = rowWidth;\n else if (width != rowWidth) width = Math.max(width, rowWidth);\n }\n return width;\n}\n\nfunction findBadColWidths(\n map: TableMap,\n colWidths: ColWidths,\n table: Node,\n): void {\n if (!map.problems) map.problems = [];\n const seen: Record<number, boolean> = {};\n for (let i = 0; i < map.map.length; i++) {\n const pos = map.map[i];\n if (seen[pos]) continue;\n seen[pos] = true;\n const node = table.nodeAt(pos);\n if (!node) {\n throw new RangeError(`No cell with offset ${pos} found`);\n }\n\n let updated = null;\n const attrs = node.attrs as CellAttrs;\n for (let j = 0; j < attrs.colspan; j++) {\n const col = (i + j) % map.width;\n const colWidth = colWidths[col * 2];\n if (\n colWidth != null &&\n (!attrs.colwidth || attrs.colwidth[j] != colWidth)\n )\n (updated || (updated = freshColWidth(attrs)))[j] = colWidth;\n }\n if (updated)\n map.problems.unshift({\n type: 'colwidth mismatch',\n pos,\n colwidth: updated,\n });\n }\n}\n\nfunction freshColWidth(attrs: Attrs): ColWidths {\n if (attrs.colwidth) return attrs.colwidth.slice();\n const result: ColWidths = [];\n for (let i = 0; i < attrs.colspan; i++) result.push(0);\n return result;\n}\n","// Helper for creating a schema that supports tables.\n\nimport type {\n AttributeSpec,\n Attrs,\n Node,\n NodeSpec,\n NodeType,\n Schema,\n} from 'prosemirror-model';\n\nimport type { CellAttrs, MutableAttrs } from './util';\n\nfunction getCellAttrs(dom: HTMLElement | string, extraAttrs: Attrs): Attrs {\n if (typeof dom === 'string') {\n return {};\n }\n\n const widthAttr = dom.getAttribute('data-colwidth');\n const widths =\n widthAttr && /^\\d+(,\\d+)*$/.test(widthAttr)\n ? widthAttr.split(',').map((s) => Number(s))\n : null;\n const colspan = Number(dom.getAttribute('colspan') || 1);\n const result: MutableAttrs = {\n colspan,\n rowspan: Number(dom.getAttribute('rowspan') || 1),\n colwidth: widths && widths.length == colspan ? widths : null,\n } satisfies CellAttrs;\n for (const prop in extraAttrs) {\n const getter = extraAttrs[prop].getFromDOM;\n const value = getter && getter(dom);\n if (value != null) {\n result[prop] = value;\n }\n }\n return result;\n}\n\nfunction setCellAttrs(node: Node, extraAttrs: Attrs): Attrs {\n const attrs: MutableAttrs = {};\n if (node.attrs.colspan != 1) attrs.colspan = node.attrs.colspan;\n if (node.attrs.rowspan != 1) attrs.rowspan = node.attrs.rowspan;\n if (node.attrs.colwidth)\n attrs['data-colwidth'] = node.attrs.colwidth.join(',');\n for (const prop in extraAttrs) {\n const setter = extraAttrs[prop].setDOMAttr;\n if (setter) setter(node.attrs[prop], attrs);\n }\n return attrs;\n}\n\n/**\n * @public\n */\nexport type getFromDOM = (dom: HTMLElement) => unknown;\n\n/**\n * @public\n */\nexport type setDOMAttr = (value: unknown, attrs: MutableAttrs) => void;\n\n/**\n * @public\n */\nexport interface CellAttributes {\n /**\n * The attribute's default value.\n */\n default: unknown;\n\n /**\n * A function or type name used to validate values of this attribute.\n *\n * See [validate](https://prosemirror.net/docs/ref/#model.AttributeSpec.validate).\n */\n validate?: string | ((value: unknown) => void);\n\n /**\n * A function to read the attribute's value from a DOM node.\n */\n getFromDOM?: getFromDOM;\n\n /**\n * A function to add the attribute's value to an attribute\n * object that's used to render the cell's DOM.\n */\n setDOMAttr?: setDOMAttr;\n}\n\n/**\n * @public\n */\nexport interface TableNodesOptions {\n /**\n * A group name (something like `\"block\"`) to add to the table\n * node type.\n */\n tableGroup?: string;\n\n /**\n * The content expression for table cells.\n */\n cellContent: string;\n\n /**\n * Additional attributes to add to cells. Maps attribute names to\n * objects with the following properties:\n */\n cellAttributes: { [key: string]: CellAttributes };\n}\n\n/**\n * @public\n */\nexport type TableNodes = Record<\n 'table' | 'table_row' | 'table_cell' | 'table_header',\n NodeSpec\n>;\n\nfunction validateColwidth(value: unknown) {\n if (value === null) {\n return;\n }\n if (!Array.isArray(value)) {\n throw new TypeError('colwidth must be null or an array');\n }\n for (const item of value) {\n if (typeof item !== 'number') {\n throw new TypeError('colwidth must be null or an array of numbers');\n }\n }\n}\n\n/**\n * This function creates a set of [node\n * specs](http://prosemirror.net/docs/ref/#model.SchemaSpec.nodes) for\n * `table`, `table_row`, and `table_cell` nodes types as used by this\n * module. The result can then be added to the set of nodes when\n * creating a schema.\n *\n * @public\n */\nexport function tableNodes(options: TableNodesOptions): TableNodes {\n const extraAttrs = options.cellAttributes || {};\n const cellAttrs: Record<string, AttributeSpec> = {\n colspan: { default: 1, validate: 'number' },\n rowspan: { default: 1, validate: 'number' },\n colwidth: { default: null, validate: validateColwidth },\n };\n for (const prop in extraAttrs)\n cellAttrs[prop] = {\n default: extraAttrs[prop].default,\n validate: extraAttrs[prop].validate,\n };\n\n return {\n table: {\n content: 'table_row+',\n tableRole: 'table',\n isolating: true,\n group: options.tableGroup,\n parseDOM: [{ tag: 'table' }],\n toDOM() {\n return ['table', ['tbody', 0]];\n },\n },\n table_row: {\n content: '(table_cell | table_header)*',\n tableRole: 'row',\n parseDOM: [{ tag: 'tr' }],\n toDOM() {\n return ['tr', 0];\n },\n },\n table_cell: {\n content: options.cellContent,\n attrs: cellAttrs,\n tableRole: 'cell',\n isolating: true,\n parseDOM: [\n { tag: 'td', getAttrs: (dom) => getCellAttrs(dom, extraAttrs) },\n ],\n toDOM(node) {\n return ['td', setCellAttrs(node, extraAttrs), 0];\n },\n },\n table_header: {\n content: options.cellContent,\n attrs: cellAttrs,\n tableRole: 'header_cell',\n isolating: true,\n parseDOM: [\n { tag: 'th', getAttrs: (dom) => getCellAttrs(dom, extraAttrs) },\n ],\n toDOM(node) {\n return ['th', setCellAttrs(node, extraAttrs), 0];\n },\n },\n };\n}\n\n/**\n * @public\n */\nexport type TableRole = 'table' | 'row' | 'cell' | 'header_cell';\n\n/**\n * @public\n */\nexport function tableNodeTypes(schema: Schema): Record<TableRole, NodeType> {\n let result = schema.cached.tableNodeTypes;\n if (!result) {\n result = schema.cached.tableNodeTypes = {};\n for (const name in schema.nodes) {\n const type = schema.nodes[name],\n role = type.spec.tableRole;\n if (role) result[role] = type;\n }\n }\n return result;\n}\n","// Various helper function for working with tables\n\nimport type { Attrs, Node, ResolvedPos } from 'prosemirror-model';\nimport type { EditorState, NodeSelection } from 'prosemirror-state';\nimport { PluginKey } from 'prosemirror-state';\n\nimport type { CellSelection } from './cellselection';\nimport { tableNodeTypes } from './schema';\nimport type { Rect } from './tablemap';\nimport { TableMap } from './tablemap';\n\n/**\n * @public\n */\nexport type MutableAttrs = Record<string, unknown>;\n\n/**\n * @public\n */\nexport interface CellAttrs {\n colspan: number;\n rowspan: number;\n colwidth: number[] | null;\n}\n\n/**\n * @public\n */\nexport const tableEditingKey = new PluginKey<number>('selectingCells');\n\n/**\n * @public\n */\nexport function cellAround($pos: ResolvedPos): ResolvedPos | null {\n for (let d = $pos.depth - 1; d > 0; d--)\n if ($pos.node(d).type.spec.tableRole == 'row')\n return $pos.node(0).resolve($pos.before(d + 1));\n return null;\n}\n\nexport function cellWrapping($pos: ResolvedPos): null | Node {\n for (let d = $pos.depth; d > 0; d--) {\n // Sometimes the cell can be in the same depth.\n const role = $pos.node(d).type.spec.tableRole;\n if (role === 'cell' || role === 'header_cell') return $pos.node(d);\n }\n return null;\n}\n\n/**\n * @public\n */\nexport function isInTable(state: EditorState): boolean {\n const $head = state.selection.$head;\n for (let d = $head.depth; d > 0; d--)\n if ($head.node(d).type.spec.tableRole == 'row') return true;\n return false;\n}\n\n/**\n * @internal\n */\nexport function selectionCell(state: EditorState): ResolvedPos {\n const sel = state.selection as CellSelection | NodeSelection;\n if ('$anchorCell' in sel && sel.$anchorCell) {\n return sel.$anchorCell.pos > sel.$headCell.pos\n ? sel.$anchorCell\n : sel.$headCell;\n } else if (\n 'node' in sel &&\n sel.node &&\n sel.node.type.spec.tableRole == 'cell'\n ) {\n return sel.$anchor;\n }\n const $cell = cellAround(sel.$head) || cellNear(sel.$head);\n if ($cell) {\n return $cell;\n }\n throw new RangeError(`No cell found around position ${sel.head}`);\n}\n\n/**\n * @public\n */\nexport function cellNear($pos: ResolvedPos): ResolvedPos | undefined {\n for (\n let after = $pos.nodeAfter, pos = $pos.pos;\n after;\n after = after.firstChild, pos++\n ) {\n const role = after.type.spec.tableRole;\n if (role == 'cell' || role == 'header_cell') return $pos.doc.resolve(pos);\n }\n for (\n let before = $pos.nodeBefore, pos = $pos.pos;\n before;\n before = before.lastChild, pos--\n ) {\n const role = before.type.spec.tableRole;\n if (role == 'cell' || role == 'header_cell')\n return $pos.doc.resolve(pos - before.nodeSize);\n }\n}\n\n/**\n * @public\n */\nexport function pointsAtCell($pos: ResolvedPos): boolean {\n return $pos.parent.type.spec.tableRole == 'row' && !!$pos.nodeAfter;\n}\n\n/**\n * @public\n */\nexport function moveCellForward($pos: ResolvedPos): ResolvedPos {\n return $pos.node(0).resolve($pos.pos + $pos.nodeAfter!.nodeSize);\n}\n\n/**\n * @internal\n */\nexport function inSameTable($cellA: ResolvedPos, $cellB: ResolvedPos): boolean {\n return (\n $cellA.depth == $cellB.depth &&\n $cellA.pos >= $cellB.start(-1) &&\n $cellA.pos <= $cellB.end(-1)\n );\n}\n\n/**\n * @public\n */\nexport function findCell($pos: ResolvedPos): Rect {\n return TableMap.get($pos.node(-1)).findCell($pos.pos - $pos.start(-1));\n}\n\n/**\n * @public\n */\nexport function colCount($pos: ResolvedPos): number {\n return TableMap.get($pos.node(-1)).colCount($pos.pos - $pos.start(-1));\n}\n\n/**\n * @public\n */\nexport function nextCell(\n $pos: ResolvedPos,\n axis: 'horiz' | 'vert',\n dir: number,\n): ResolvedPos | null {\n const table = $pos.node(-1);\n const map = TableMap.get(table);\n const tableStart = $pos.start(-1);\n\n const moved = map.nextCell($pos.pos - tableStart, axis, dir);\n return moved == null ? null : $pos.node(0).resolve(tableStart + moved);\n}\n\n/**\n * @public\n */\nexport function removeColSpan(attrs: CellAttrs, pos: number, n = 1): CellAttrs {\n const result: CellAttrs = { ...attrs, colspan: attrs.colspan - n };\n\n if (result.colwidth) {\n result.colwidth = result.colwidth.slice();\n result.colwidth.splice(pos, n);\n if (!result.colwidth.some((w) => w > 0)) result.colwidth = null;\n }\n return result;\n}\n\n/**\n * @public\n */\nexport function addColSpan(attrs: CellAttrs, pos: number, n = 1): Attrs {\n const result = { ...attrs, colspan: attrs.colspan + n };\n if (result.colwidth) {\n result.colwidth = result.colwidth.slice();\n for (let i = 0; i < n; i++) result.colwidth.splice(pos, 0, 0);\n }\n return result;\n}\n\n/**\n * @public\n */\nexport function columnIsHeader(\n map: TableMap,\n table: Node,\n col: number,\n): boolean {\n const headerCell = tableNodeTypes(table.type.schema).header_cell;\n for (let row = 0; row < map.height; row++)\n if (table.nodeAt(map.map[col + row * map.width])!.type != headerCell)\n return false;\n return true;\n}\n","// This file defines a ProseMirror selection subclass that models\n// table cell selections. The table plugin needs to be active to wire\n// in the user interaction part of table selections (so that you\n// actually get such selections when you select across cells).\n\nimport type { Node, ResolvedPos } from 'prosemirror-model';\nimport { Fragment, Slice } from 'prosemirror-model';\nimport type { EditorState, Transaction } from 'prosemirror-state';\nimport {\n NodeSelection,\n Selection,\n SelectionRange,\n TextSelection,\n} from 'prosemirror-state';\nimport type { Mappable } from 'prosemirror-transform';\nimport type { DecorationSource } from 'prosemirror-view';\nimport { Decoration, DecorationSet } from 'prosemirror-view';\n\nimport { TableMap } from './tablemap';\nimport type { CellAttrs } from './util';\nimport { inSameTable, pointsAtCell, removeColSpan } from './util';\n\n/**\n * @public\n */\nexport interface CellSelectionJSON {\n type: string;\n anchor: number;\n head: number;\n}\n\n/**\n * A [`Selection`](http://prosemirror.net/docs/ref/#state.Selection)\n * subclass that represents a cell selection spanning part of a table.\n * With the plugin enabled, these will be created when the user\n * selects across cells, and will be drawn by giving selected cells a\n * `selectedCell` CSS class.\n *\n * @public\n */\nexport class CellSelection extends Selection {\n // A resolved position pointing _in front of_ the anchor cell (the one\n // that doesn't move when extending the selection).\n public $anchorCell: ResolvedPos;\n\n // A resolved position pointing in front of the head cell (the one\n // moves when extending the selection).\n public $headCell: ResolvedPos;\n\n // A table selection is identified by its anchor and head cells. The\n // positions given to this constructor should point _before_ two\n // cells in the same table. They may be the same, to select a single\n // cell.\n constructor($anchorCell: ResolvedPos, $headCell: ResolvedPos = $anchorCell) {\n const table = $anchorCell.node(-1);\n const map = TableMap.get(table);\n const tableStart = $anchorCell.start(-1);\n const rect = map.rectBetween(\n $anchorCell.pos - tableStart,\n $headCell.pos - tableStart,\n );\n\n const doc = $anchorCell.node(0);\n const cells = map\n .cellsInRect(rect)\n .filter((p) => p != $headCell.pos - tableStart);\n // Make the head cell the first range, so that it counts as the\n // primary part of the selection\n cells.unshift($headCell.pos - tableStart);\n const ranges = cells.map((pos) => {\n const cell = table.nodeAt(pos);\n if (!cell) {\n throw new RangeError(`No cell with offset ${pos} found`);\n }\n const from = tableStart + pos + 1;\n return new SelectionRange(\n doc.resolve(from),\n doc.resolve(from + cell.content.size),\n );\n });\n super(ranges[0].$from, ranges[0].$to, ranges);\n this.$anchorCell = $anchorCell;\n this.$headCell = $headCell;\n }\n\n public map(doc: Node, mapping: Mappable): CellSelection | Selection {\n const $anchorCell = doc.resolve(mapping.map(this.$anchorCell.pos));\n const $headCell = doc.resolve(mapping.map(this.$headCell.pos));\n if (\n pointsAtCell($anchorCell) &&\n pointsAtCell($headCell) &&\n inSameTable($anchorCell, $headCell)\n ) {\n const tableChanged = this.$anchorCell.node(-1) != $anchorCell.node(-1);\n if (tableChanged && this.isRowSelection())\n return CellSelection.rowSelection($anchorCell, $headCell);\n else if (tableChanged && this.isColSelection())\n return CellSelection.colSelection($anchorCell, $headCell);\n else return new CellSelection($anchorCell, $headCell);\n }\n return TextSelection.between($anchorCell, $headCell);\n }\n\n // Returns a rectangular slice of table rows containing the selected\n // cells.\n public override content(): Slice {\n const table = this.$anchorCell.node(-1);\n const map = TableMap.get(table);\n const tableStart = this.$anchorCell.start(-1);\n\n const rect = map.rectBetween(\n this.$anchorCell.pos - tableStart,\n this.$headCell.pos - tableStart,\n );\n const seen: Record<number, boolean> = {};\n const rows = [];\n for (let row = rect.top; row < rect.bottom; row++) {\n const rowContent = [];\n for (\n let index = row * map.width + rect.left, col = rect.left;\n col < rect.right;\n col++, index++\n ) {\n const pos = map.map[index];\n if (seen[pos]) continue;\n seen[pos] = true;\n\n const cellRect = map.findCell(pos);\n let cell = table.nodeAt(pos);\n if (!cell) {\n throw new RangeError(`No cell with offset ${pos} found`);\n }\n\n const extraLeft = rect.left - cellRect.left;\n const extraRight = cellRect.right - rect.right;\n\n if (extraLeft > 0 || extraRight > 0) {\n let attrs = cell.attrs as CellAttrs;\n if (extraLeft > 0) {\n attrs = removeColSpan(attrs, 0, extraLeft);\n }\n if (extraRight > 0) {\n attrs = removeColSpan(\n attrs,\n attrs.colspan - extraRight,\n extraRight,\n );\n }\n if (cellRect.left < rect.left) {\n cell = cell.type.createAndFill(attrs);\n if (!cell) {\n throw new RangeError(\n `Could not create cell with attrs ${JSON.stringify(attrs)}`,\n );\n }\n } else {\n cell = cell.type.create(attrs, cell.content);\n }\n }\n if (cellRect.top < rect.top || cellRect.bottom > rect.bottom) {\n const attrs = {\n ...cell.attrs,\n rowspan:\n Math.min(cellRect.bottom, rect.bottom) -\n Math.max(cellRect.top, rect.top),\n };\n if (cellRect.top < rect.top) {\n cell = cell.type.createAndFill(attrs)!;\n } else {\n cell = cell.type.create(attrs, cell.content);\n }\n }\n rowContent.push(cell);\n }\n rows.push(table.child(row).copy(Fragment.from(rowContent)));\n }\n\n const fragment =\n this.isColSelection() && this.isRowSelection() ? table : rows;\n return new Slice(Fragment.from(fragment), 1, 1);\n }\n\n public override replace(tr: Transaction, content: Slice = Slice.empty): void {\n const mapFrom = tr.steps.length,\n ranges = this.ranges;\n for (let i = 0; i < ranges.length; i++) {\n const { $from, $to } = ranges[i],\n mapping = tr.mapping.slice(mapFrom);\n tr.replace(\n mapping.map($from.pos),\n mapping.map($to.pos),\n i ? Slice.empty : content,\n );\n }\n const sel = Selection.findFrom(\n tr.doc.resolve(tr.mapping.slice(mapFrom).map(this.to)),\n -1,\n );\n if (sel) tr.setSelection(sel);\n }\n\n public override replaceWith(tr: Transaction, node: Node): void {\n this.replace(tr, new Slice(Fragment.from(node), 0, 0));\n }\n\n public forEachCell(f: (node: Node, pos: number) => void): void {\n const table = this.$anchorCell.node(-1);\n const map = TableMap.get(table);\n const tableStart = this.$anchorCell.start(-1);\n\n const cells = map.cellsInRect(\n map.rectBetween(\n this.$anchorCell.pos - tableStart,\n this.$headCell.pos - tableStart,\n ),\n );\n for (let i = 0; i < cells.length; i++) {\n f(table.nodeAt(cells[i])!, tableStart + cells[i]);\n }\n }\n\n // True if this selection goes all the way from the top to the\n // bottom of the table.\n public isColSelection(): boolean {\n const anchorTop = this.$anchorCell.index(-1);\n const headTop = this.$headCell.index(-1);\n if (Math.min(anchorTop, headTop) > 0) return false;\n\n const anchorBottom = anchorTop + this.$anchorCell.nodeAfter!.attrs.rowspan;\n const headBottom = headTop + this.$headCell.nodeAfter!.attrs.rowspan;\n\n return (\n Math.max(anchorBottom, headBottom) == this.$headCell.node(-1).childCount\n );\n }\n\n // Returns the smallest column selection that covers the given anchor\n // and head cell.\n public static colSelection(\n $anchorCell: ResolvedPos,\n $headCell: ResolvedPos = $anchorCell,\n ): CellSelection {\n const table = $anchorCell.node(-1);\n const map = TableMap.get(table);\n const tableStart = $anchorCell.start(-1);\n\n const anchorRect = map.findCell($anchorCell.pos - tableStart);\n const headRect = map.findCell($headCell.pos - tableStart);\n const doc = $anchorCell.node(0);\n\n if (anchorRect.top <= headRect.top) {\n if (anchorRect.top > 0)\n $anchorCell = doc.resolve(tableStart + map.map[anchorRect.left]);\n if (headRect.bottom < map.height)\n $headCell = doc.resolve(\n tableStart +\n map.map[map.width * (map.height - 1) + headRect.right - 1],\n );\n } else {\n if (headRect.top > 0)\n $headCell = doc.resolve(tableStart + map.map[headRect.left]);\n if (anchorRect.bottom < map.height)\n $anchorCell = doc.resolve(\n tableStart +\n map.map[map.width * (map.height - 1) + anchorRect.right - 1],\n );\n }\n return new CellSelection($anchorCell, $headCell);\n }\n\n // True if this selection goes all the way from the left to the\n // right of the table.\n public isRowSelection(): boolean {\n const table = this.$anchorCell.node(-1);\n const map = TableMap.get(table);\n const tableStart = this.$anchorCell.start(-1);\n\n const anchorLeft = map.colCount(this.$anchorCell.pos - tableStart);\n const headLeft = map.colCount(this.$headCell.pos - tableStart);\n if (Math.min(anchorLeft, headLeft) > 0) return false;\n\n const anchorRight = anchorLeft + this.$anchorCell.nodeAfter!.attrs.colspan;\n const headRight = headLeft + this.$headCell.nodeAfter!.attrs.colspan;\n return Math.max(anchorRight, headRight) == map.width;\n }\n\n public eq(other: unknown): boolean {\n return (\n other instanceof CellSelection &&\n other.$anchorCell.pos == this.$anchorCell.pos &&\n other.$headCell.pos == this.$headCell.pos\n );\n }\n\n // Returns the smallest row selection that covers the given anchor\n // and head cell.\n public static rowSelection(\n $anchorCell: ResolvedPos,\n $headCell: ResolvedPos = $anchorCell,\n ): CellSelection {\n const table = $anchorCell.node(-1);\n const map = TableMap.get(table);\n const tableStart = $anchorCell.start(-1);\n\n const anchorRect = map.findCell($anchorCell.pos - tableStart);\n const headRect = map.findCell($headCell.pos - tableStart);\n const doc = $anchorCell.node(0);\n\n if (anchorRect.left <= headRect.left) {\n if (anchorRect.left > 0)\n $anchorCell = doc.resolve(\n tableStart + map.map[anchorRect.top * map.width],\n );\n if (headRect.right < map.width)\n $headCell = doc.resolve(\n tableStart + map.map[map.width * (headRect.top + 1) - 1],\n );\n } else {\n if (headRect.left > 0)\n $headCell = doc.resolve(tableStart + map.map[headRect.top * map.width]);\n if (anchorRect.right < map.width)\n $anchorCell = doc.resolve(\n tableStart + map.map[map.width * (anchorRect.top + 1) - 1],\n );\n }\n return new CellSelection($anchorCell, $headCell);\n }\n\n public toJSON(): CellSelectionJSON {\n return {\n type: 'cell',\n anchor: this.$anchorCell.pos,\n head: this.$headCell.pos,\n };\n }\n\n public static override fromJSON(\n doc: Node,\n json: CellSelectionJSON,\n ): CellSelection {\n return new CellSelection(doc.resolve(json.anchor), doc.resolve(json.head));\n }\n\n static create(\n doc: Node,\n anchorCell: number,\n headCell: number = anchorCell,\n ): CellSelection {\n return new CellSelection(doc.resolve(anchorCell), doc.resolve(headCell));\n }\n\n public override getBookmark(): CellBookmark {\n return new CellBookmark(this.$anchorCell.pos, this.$headCell.pos);\n }\n}\n\nCellSelection.prototype.visible = false;\n\nSelection.jsonID('cell', CellSelection);\n\n/**\n * @public\n */\nexport class CellBookmark {\n constructor(\n public anchor: number,\n public head: number,\n ) {}\n\n map(mapping: Mappable): CellBookmark {\n return new CellBookmark(mapping.map(this.anchor), mapping.map(this.head));\n }\n\n resolve(doc: Node): CellSelection | Selection {\n const $anchorCell = doc.resolve(this.anchor),\n $headCell = doc.resolve(this.head);\n if (\n $anchorCell.parent.type.spec.tableRole == 'row' &&\n $headCell.parent.type.spec.tableRole == 'row' &&\n $anchorCell.index() < $anchorCell.parent.childCount &&\n $headCell.index() < $headCell.parent.childCount &&\n inSameTable($anchorCell, $headCell)\n )\n return new CellSelection($anchorCell, $headCell);\n else return Selection.near($headCell, 1);\n }\n}\n\nexport function drawCellSelection(state: EditorState): DecorationSource | null {\n if (!(state.selection instanceof CellSelection)) return null;\n const cells: Decoration[] = [];\n state.selection.forEachCell((node, pos) => {\n cells.push(\n Decoration.node(pos, pos + node.nodeSize, { class: 'selectedCell' }),\n );\n });\n return DecorationSet.create(state.doc, cells);\n}\n\nfunction isCellBoundarySelection({ $from, $to }: TextSelection) {\n if ($from.pos == $to.pos || $from.pos < $to.pos - 6) return false; // Cheap elimination\n let afterFrom = $from.pos;\n let beforeTo = $to.pos;\n let depth = $from.depth;\n for (; depth >= 0; depth--, afterFrom++)\n if ($from.after(depth + 1) < $from.end(depth)) break;\n for (let d = $to.depth; d >= 0; d--, beforeTo--)\n if ($to.before(d + 1) > $to.start(d)) break;\n return (\n afterFrom == beforeTo &&\n /row|table/.test($from.node(depth).type.spec.tableRole)\n );\n}\n\nfunction isTextSelectionAcrossCells({ $from, $to }: TextSelection) {\n let fromCellBoundaryNode: Node | undefined;\n let toCellBoundaryNode: Node | undefined;\n\n for (let i = $from.depth; i > 0; i--) {\n const node = $from.node(i);\n if (\n node.type.spec.tableRole === 'cell' ||\n node.type.spec.tableRole === 'header_cell'\n ) {\n fromCellBoundaryNode = node;\n break;\n }\n }\n\n for (let i = $to.depth; i > 0; i--) {\n const node = $to.node(i);\n if (\n node.type.spec.tableRole === 'cell' ||\n node.type.spec.tableRole === 'header_cell'\n ) {\n toCellBoundaryNode = node;\n break;\n }\n }\n\n return fromCellBoundaryNode !== toCellBoundaryNode && $to.parentOffset === 0;\n}\n\nexport function normalizeSelection(\n state: EditorState,\n tr: Transaction | undefined,\n allowTableNodeSelection: boolean,\n): Transaction | undefined {\n const sel = (tr || state).selection;\n const doc = (tr || state).doc;\n let normalize: Selection | undefined;\n let role: string | undefined;\n if (sel instanceof NodeSelection && (role = sel.node.type.spec.tableRole)) {\n if (role == 'cell' || role == 'header_cell') {\n normalize = CellSelection.create(doc, sel.from);\n } else if (role == 'row') {\n const $cell = doc.resolve(sel.from + 1);\n normalize = CellSelection.rowSelection($cell, $cell);\n } else if (!allowTableNodeSelection) {\n const map = TableMap.get(sel.node);\n const start = sel.from + 1;\n const lastCell = start + map.map[map.width * map.height - 1];\n normalize = CellSelection.create(doc, start + 1, lastCell);\n }\n } else if (sel instanceof TextSelection && isCellBoundarySelection(sel)) {\n normalize = TextSelection.create(doc, sel.from);\n } else if (sel instanceof TextSelection && isTextSelectionAcrossCells(sel)) {\n normalize = TextSelection.create(doc, sel.$from.start(), sel.$from.end());\n }\n if (normalize) (tr || (tr = state.tr)).setSelection(normalize);\n return tr;\n}\n","// This file defines helpers for normalizing tables, making sure no\n// cells overlap (which can happen, if you have the wrong col- and\n// rowspans) and that each row has the same width. Uses the problems\n// reported by `TableMap`.\n\nimport type { Node } from 'prosemirror-model';\nimport type { EditorState, Transaction } from 'prosemirror-state';\nimport { PluginKey } from 'prosemirror-state';\n\nimport type { TableRole } from './schema';\nimport { tableNodeTypes } from './schema';\nimport { TableMap } from './tablemap';\nimport type { CellAttrs } from './util';\nimport { removeColSpan } from './util';\n\n/**\n * @public\n */\nexport const fixTablesKey = new PluginKey<{ fixTables: boolean }>('fix-tables');\n\n/**\n * Helper for iterating through the nodes in a document that changed\n * compared to the given previous document. Useful for avoiding\n * duplicate work on each transaction.\n *\n * @public\n */\nfunction changedDescendants(\n old: Node,\n cur: Node,\n offset: number,\n f: (node: Node, pos: number) => void,\n): void {\n const oldSize = old.childCount,\n curSize = cur.childCount;\n outer: for (let i = 0, j = 0; i < curSize; i++) {\n const child = cur.child(i);\n for (let scan = j, e = Math.min(oldSize, i + 3); scan < e; scan++) {\n if (old.child(scan) == child) {\n j = scan + 1;\n offset += child.nodeSize;\n continue outer;\n }\n }\n f(child, offset);\n if (j < oldSize && old.child(j).sameMarkup(child))\n changedDescendants(old.child(j), child, offset + 1, f);\n else child.nodesBetween(0, child.content.size, f, offset + 1);\n offset += child.nodeSize;\n }\n}\n\n/**\n * Inspect all tables in the given state's document and return a\n * transaction that fixes them, if necessary. If `oldState` was\n * provided, that is assumed to hold a previous, known-good state,\n * which will be used to avoid re-scanning unchanged parts of the\n * document.\n *\n * @public\n */\nexport function fixTables(\n state: EditorState,\n oldState?: EditorState,\n): Transaction | undefined {\n let tr: Transaction | undefined;\n const check = (node: Node, pos: number) => {\n if (node.type.spec.tableRole == 'table')\n tr = fixTable(state, node, pos, tr);\n };\n if (!oldState) state.doc.descendants(check);\n else if (oldState.doc != state.doc)\n changedDescendants(oldState.doc, state.doc, 0, check);\n return tr;\n}\n\n// Fix the given table, if necessary. Will append to the transaction\n// it was given, if non-null, or create a new one if necessary.\nexport function fixTable(\n state: EditorState,\n table: Node,\n tablePos: number,\n tr: Transaction | undefined,\n): Transaction | undefined {\n const map = TableMap.get(table);\n if (!map.problems) return tr;\n if (!tr) tr = state.tr;\n\n // Track which rows we must add cells to, so that we can adjust that\n // when fixing collisions.\n const mustAdd: number[] = [];\n for (let i = 0; i < map.height; i++) mustAdd.push(0);\n for (let i = 0; i < map.problems.length; i++) {\n const prob = map.problems[i];\n if (prob.type == 'collision') {\n const cell = table.nodeAt(prob.pos);\n if (!cell) continue;\n const attrs = cell.attrs as CellAttrs;\n for (let j = 0; j < attrs.rowspan; j++) mustAdd[prob.row + j] += prob.n;\n tr.setNodeMarkup(\n tr.mapping.map(tablePos + 1 + prob.pos),\n null,\n removeColSpan(attrs, attrs.colspan - prob.n, prob.n),\n );\n } else if (prob.type == 'missing') {\n mustAdd[prob.row] += prob.n;\n } else if (prob.type == 'overlong_rowspan') {\n const cell = table.nodeAt(prob.pos);\n if (!cell) continue;\n tr.setNodeMarkup(tr.mapping.map(tablePos + 1 + prob.pos), null, {\n ...cell.attrs,\n rowspan: cell.attrs.rowspan - prob.n,\n });\n } else if (prob.type == 'colwidth mismatch') {\n const cell = table.nodeAt(prob.pos);\n if (!cell) continue;\n tr.setNodeMarkup(tr.mapping.map(tablePos + 1 + prob.pos), null, {\n ...cell.attrs,\n colwidth: prob.colwidth,\n });\n } else if (prob.type == 'zero_sized') {\n const pos = tr.mapping.map(tablePos);\n tr.delete(pos, pos + table.nodeSize);\n }\n }\n let first, last;\n for (let i = 0; i < mustAdd.length; i++)\n if (mustAdd[i]) {\n if (first == null) first = i;\n last = i;\n }\n // Add the necessary cells, using a heuristic for whether to add the\n // cells at the start or end of the rows (if it looks like a 'bite'\n // was taken out of the table, add cells at the start of the row\n // after the bite. Otherwise add them at the end).\n for (let i = 0, pos = tablePos + 1; i < map.height; i++) {\n const row = table.child(i);\n const end = pos + row.nodeSize;\n const add = mustAdd[i];\n if (add > 0) {\n let role: TableRole = 'cell';\n if (row.firstChild) {\n role = row.firstChild.type.spec.tableRole;\n }\n const nodes: Node[] = [];\n for (let j = 0; j < add; j++) {\n const node = tableNodeTypes(state.schema)[role].createAndFill();\n\n if (node) nodes.push(node);\n }\n const side = (i == 0 || first == i - 1) && last == i ? pos + 1 : end - 1;\n tr.insert(tr.mapping.map(side), nodes);\n }\n pos = end;\n }\n return tr.setMeta(fixTablesKey, { fixTables: true });\n}\n","import type { Node } from 'prosemirror-model';\n\nimport { TableMap } from '../tablemap';\n\n/**\n * This function will transform the table node into a matrix of rows and columns\n * respecting merged cells, for example this table:\n *\n * ```\n * ┌──────┬──────┬─────────────┐\n * │ A1 │ B1 │ C1 │\n * ├──────┼──────┴──────┬──────┤\n * │ A2 │ B2 │ │\n * ├──────┼─────────────┤ D1 │\n * │ A3 │ B3 │ C3 │ │\n * └──────┴──────┴──────┴──────┘\n * ```\n *\n * will be converted to the below:\n *\n * ```javascript\n * [\n * [A1, B1, C1, null],\n * [A2, B2, null, D1],\n * [A3, B3, C3, null],\n * ]\n * ```\n * @internal\n */\nexport function convertTableNodeToArrayOfRows(\n tableNode: Node,\n): (Node | null)[][] {\n const map = TableMap.get(tableNode);\n const rows: (Node | null)[][] = [];\n const rowCount = map.height;\n const colCount = map.width;\n for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n const row: (Node | null)[] = [];\n for (let colIndex = 0; colIndex < colCount; colIndex++) {\n const cellIndex = rowIndex * colCount + colIndex;\n const cellPos = map.map[cellIndex];\n if (rowIndex > 0) {\n const topCellIndex = cellIndex - colCount;\n const topCellPos = map.map[topCellIndex];\n if (cellPos === topCellPos) {\n row.push(null);\n continue;\n }\n }\n if (colIndex > 0) {\n const leftCellIndex = cellIndex - 1;\n const leftCellPos = map.map[leftCellIndex];\n if (cellPos === leftCellPos) {\n row.push(null);\n continue;\n }\n }\n row.push(tableNode.nodeAt(cellPos));\n }\n rows.push(row);\n }\n\n return rows;\n}\n\n/**\n * Convert an array of rows to a table node.\n *\n * @internal\n */\nexport function convertArrayOfRowsToTableNode(\n tableNode: Node,\n arrayOfNodes: (Node | null)[][],\n): Node {\n const newRows: Node[] = [];\n const map = TableMap.get(tableNode);\n const rowCount = map.height;\n const colCount = map.width;\n for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n const oldRow: Node = tableNode.child(rowIndex);\n const newCells: Node[] = [];\n\n for (let colIndex = 0; colIndex < colCount; colIndex++) {\n const cell = arrayOfNodes[rowIndex][colIndex];\n if (!cell) {\n continue;\n }\n\n const cellPos = map.map[rowIndex * map.width + colIndex];\n const oldCell = tableNode.nodeAt(cellPos);\n if (!oldCell) {\n continue;\n }\n\n const newCell = oldCell.type.createChecked(\n cell.attrs,\n cell.content,\n cell.marks,\n );\n newCells.push(newCell);\n }\n\n const newRow = oldRow.type.createChecked(\n oldRow.attrs,\n newCells,\n oldRow.marks,\n );\n newRows.push(newRow);\n }\n\n const newTable = tableNode.type.createChecked(\n tableNode.attrs,\n newRows,\n tableNode.marks,\n );\n return newTable;\n}\n","/**\n * Move a row in an array of rows.\n *\n * @internal\n */\nexport function moveRowInArrayOfRows<T>(\n rows: T[],\n indexesOrigin: number[],\n indexesTarget: number[],\n directionOverride: -1 | 1 | 0,\n): T[] {\n const direction = indexesOrigin[0] > indexesTarget[0] ? -1 : 1;\n\n const rowsExtracted = rows.splice(indexesOrigin[0], indexesOrigin.length);\n const positionOffset = rowsExtracted.length % 2 === 0 ? 1 : 0;\n let target: number;\n\n if (directionOverride === -1 && direction === 1) {\n target = indexesTarget[0] - 1;\n } else if (directionOverride === 1 && direction === -1) {\n target = indexesTarget[indexesTarget.length - 1] - positionOffset + 1;\n } else {\n target =\n direction === -1\n ? indexesTarget[0]\n : indexesTarget[indexesTarget.length - 1] - positionOffset;\n }\n\n rows.splice(target, 0, ...rowsExtracted);\n return rows;\n}\n","import type { Node, ResolvedPos } from 'prosemirror-model';\nimport type { Selection } from 'prosemirror-state';\n\nimport { CellSelection } from '../cellselection';\nimport { cellAround, cellNear, inSameTable } from '../util';\n\n/**\n * Checks if the given object is a `CellSelection` instance.\n *\n * @internal\n */\nfunction isCellSelection(value: unknown): value is CellSelection {\n return value instanceof CellSelection;\n}\n\n/**\n * Find the closest table node for a given position.\n *\n * @public\n */\nexport function findTable($pos: ResolvedPos): FindNodeResult | null {\n return findParentNode((node) => node.type.spec.tableRole === 'table', $pos);\n}\n\n/**\n * Try to find the anchor and head cell in the same table by using the given\n * anchor and head as hit points, or fallback to the selection's anchor and\n * head.\n *\n * @public\n */\nexport function findCellRange(\n selection: Selection,\n anchorHit?: number,\n headHit?: number,\n): [ResolvedPos, ResolvedPos] | null {\n if (anchorHit == null && headHit == null && isCellSelection(selection)) {\n return [selection.$anchorCell, selection.$headCell];\n }\n\n const anchor: number = anchorHit ?? headHit ?? selection.anchor;\n const head: number = headHit ?? anchorHit ?? selection.head;\n\n const doc = selection.$head.doc;\n\n const $anchorCell = findCellPos(doc, anchor);\n const $headCell = findCellPos(doc, head);\n\n if ($anchorCell && $headCell && inSameTable($anchorCell, $headCell)) {\n return [$anchorCell, $headCell];\n }\n return null;\n}\n\n/**\n * Try to find a resolved pos of a cell by using the given pos as a hit point.\n *\n * @public\n */\nexport function findCellPos(doc: Node, pos: number): ResolvedPos | undefined {\n const $pos = doc.resolve(pos);\n return cellAround($pos) || cellNear($pos);\n}\n\n/**\n * Result of finding a parent node.\n *\n * @public\n */\nexport interface FindNodeResult {\n /**\n * The closest parent node that satisfies the predicate.\n */\n node: Node;\n\n /**\n * The position directly before the node.\n */\n pos: number;\n\n /**\n * The position at the start of the node.\n */\n start: number;\n\n /**\n * The depth of the node.\n */\n depth: number;\n}\n\n/**\n * Find the closest parent node that satisfies the predicate.\n *\n * @internal\n */\nfunction findParentNode(\n /**\n * The predicate to test the parent node.\n */\n predicate: (node: Node) => boolean,\n /**\n * The position to start searching from.\n */\n $pos: ResolvedPos,\n): FindNodeResult | null {\n for (let depth = $pos.depth; depth >= 0; depth -= 1) {\n const node = $pos.node(depth);\n\n if (predicate(node)) {\n const pos = depth === 0 ? 0 : $pos.before(depth);\n const start = $pos.start(depth);\n return { node, pos, start, depth };\n }\n }\n\n return null;\n}\n","import type { Selection } from 'prosemirror-state';\n\nimport { TableMap } from '../tablemap';\n\nimport type { FindNodeResult } from './query';\nimport { findTable } from './query';\n\n/**\n * Returns an array of cells in a column at the specified column index.\n *\n * @internal\n */\nexport function getCellsInColumn(\n columnIndex: number,\n selection: Selection,\n): FindNodeResult[] | undefined {\n const table = findTable(selection.$from);\n if (!table) {\n return;\n }\n\n const map = TableMap.get(table.node);\n\n if (columnIndex < 0 || columnIndex > map.width - 1) {\n return;\n }\n\n const cells = map.cellsInRect({\n left: columnIndex,\n right: columnIndex + 1,\n top: 0,\n bottom: map.height,\n });\n\n return cells.map((nodePos) => {\n const node = table.node.nodeAt(nodePos)!;\n const pos = nodePos + table.start;\n return { pos, start: pos + 1, node, depth: table.depth + 2 };\n });\n}\n\n/**\n * Returns an array of cells in a row at the specified row index.\n *\n * @internal\n */\nexport function getCellsInRow(\n rowIndex: number,\n selection: Selection,\n): FindNodeResult[] | undefined {\n const table = findTable(selection.$from);\n if (!table) {\n return;\n }\n\n const map = TableMap.get(table.node);\n\n if (rowIndex < 0 || rowIndex > map.height - 1) {\n return;\n }\n\n const cells = map.cellsInRect({\n left: 0,\n right: map.width,\n top: rowIndex,\n bottom: rowIndex + 1,\n });\n\n return cells.map((nodePos) => {\n const node = table.node.nodeAt(nodePos)!;\n const pos = nodePos + table.start;\n return { pos, start: pos + 1, node, depth: table.depth + 2 };\n });\n}\n","import type { ResolvedPos } from 'prosemirror-model';\nimport type { Transaction } from 'prosemirror-state';\n\nimport { getCellsInColumn, getCellsInRow } from './get-cells';\n\nexport type CellSelectionRange = {\n $anchor: ResolvedPos;\n $head: ResolvedPos;\n // an array of column/row indexes\n indexes: number[];\n};\n\n/**\n * Returns a range of rectangular selection spanning all merged cells around a\n * column at index `columnIndex`.\n *\n * Original implementation from Atlassian (Apache License 2.0)\n *\n * https://bitbucket.org/atlassian/atlassian-frontend-mirror/src/5f91cb871e8248bc3bae5ddc30bb9fd9200fadbb/editor/editor-tables/src/utils/get-selection-range-in-column.ts#editor/editor-tables/src/utils/get-selection-range-in-column.ts\n *\n * @internal\n */\nexport function getSelectionRangeInColumn(\n tr: Transaction,\n startColIndex: number,\n endColIndex: number = startColIndex,\n): CellSelectionRange | undefined {\n let startIndex = startColIndex;\n let endIndex = endColIndex;\n\n // looking for selection start column (startIndex)\n for (let i = startColIndex; i >= 0; i--) {\n const cells = getCellsInColumn(i, tr.selection);\n if (cells) {\n cells.forEach((cell) => {\n const maybeEndIndex = cell.node.attrs.colspan + i - 1;\n if (maybeEndIndex >= startIndex) {\n startIndex = i;\n }\n if (maybeEndIndex > endIndex) {\n endIndex = maybeEndIndex;\n }\n });\n }\n }\n // looking for selection end column (endIndex)\n for (let i = startColIndex; i <= endIndex; i++) {\n const cells = getCellsInColumn(i, tr.selection);\n if (cells) {\n cells.forEach((cell) => {\n const maybeEndIndex = cell.node.attrs.colspan + i - 1;\n if (cell.node.attrs.colspan > 1 && maybeEndIndex > endIndex) {\n endIndex = maybeEndIndex;\n }\n });\n }\n }\n\n // filter out columns without cells (where all rows have colspan > 1 in the same column)\n const indexes = [];\n for (let i = startIndex; i <= endIndex; i++) {\n const maybeCells = getCellsInColumn(i, tr.selection);\n if (maybeCells && maybeCells.length > 0) {\n indexes.push(i);\n }\n }\n startIndex = indexes[0];\n endIndex = indexes[indexes.length - 1];\n\n const firstSelectedColumnCells = getCellsInColumn(startIndex, tr.selection);\n const firstRowCells = getCellsInRow(0, tr.selection);\n if (!firstSelectedColumnCells || !firstRowCells) {\n return;\n }\n\n const $anchor = tr.doc.resolve(\n firstSelectedColumnCells[firstSelectedColumnCells.length - 1].pos,\n );\n\n let headCell;\n for (let i = endIndex; i >= startIndex; i--) {\n const columnCells = getCellsInColumn(i, tr.selection);\n if (columnCells && columnCells.length > 0) {\n for (let j = firstRowCells.length - 1; j >= 0; j--) {\n if (firstRowCells[j].pos === columnCells[0].pos) {\n headCell = columnCells[0];\n break;\n }\n }\n if (headCell) {\n break;\n }\n }\n }\n if (!headCell) {\n return;\n }\n\n const $head = tr.doc.resolve(headCell.pos);\n return { $anchor, $head, indexes };\n}\n\n/**\n * Returns a range of rectangular selection spanning all merged cells around a\n * row at index `rowIndex`.\n *\n * Original implementation from Atlassian (Apache License 2.0)\n *\n * https://bitbucket.org/atlassian/atlassian-frontend-mirror/src/5f91cb871e8248bc3bae5ddc30bb9fd9200fadbb/editor/editor-tables/src/utils/get-selection-range-in-row.ts#editor/editor-tables/src/utils/get-selection-range-in-row.ts\n *\n * @internal\n */\nexport function getSelectionRangeInRow(\n tr: Transaction,\n startRowIndex: number,\n endRowIndex: number = startRowIndex,\n): CellSelectionRange | undefined {\n let startIndex = startRowIndex;\n let endIndex = endRowIndex;\n\n // looking for selection start row (startIndex)\n for (let i = startRowIndex; i >= 0; i--) {\n const cells = getCellsInRow(i, tr.selection);\n if (cells) {\n cells.forEach((cell) => {\n const maybeEndIndex = cell.node.attrs.rowspan + i - 1;\n if (maybeEndIndex >= startIndex) {\n startIndex = i;\n }\n if (maybeEndIndex > endIndex) {\n endIndex = maybeEndIndex;\n }\n });\n }\n }\n // looking for selection end row (endIndex)\n for (let i = startRowIndex; i <= endIndex; i++) {\n const cells = getCellsInRow(i, tr.selection);\n if (cells) {\n cells.forEach((cell) => {\n const maybeEndIndex = cell.node.attrs.rowspan + i - 1;\n if (cell.node.attrs.rowspan > 1 && maybeEndIndex > endIndex) {\n endIndex = maybeEndIndex;\n }\n });\n }\n }\n\n // filter out rows without cells (where all columns have rowspan > 1 in the same row)\n const indexes = [];\n for (let i = startIndex; i <= endIndex; i++) {\n const maybeCells = getCellsInRow(i, tr.selection);\n if (maybeCells && maybeCells.length > 0) {\n indexes.push(i);\n }\n }\n startIndex = indexes[0];\n endIndex = indexes[indexes.length - 1];\n\n const firstSelectedRowCells = getCellsInRow(startIndex, tr.selection);\n const firstColumnCells = getCellsInColumn(0, tr.selection);\n if (!firstSelectedRowCells || !firstColumnCells) {\n return;\n }\n\n const $anchor = tr.doc.resolve(\n firstSelectedRowCells[firstSelectedRowCells.length - 1].pos,\n );\n\n let headCell;\n for (let i = endIndex; i >= startIndex; i--) {\n const rowCells = getCellsInRow(i, tr.selection);\n if (rowCells && rowCells.length > 0) {\n for (let j = firstColumnCells.length - 1; j >= 0; j--) {\n if (firstColumnCells[j].pos === rowCells[0].pos) {\n headCell = rowCells[0];\n break;\n }\n }\n if (headCell) {\n break;\n }\n }\n }\n if (!headCell) {\n return;\n }\n\n const $head = tr.doc.resolve(headCell.pos);\n return { $anchor, $head, indexes };\n}\n","/**\n * Transposes a 2D array by flipping columns to rows.\n *\n * Transposition is a familiar algebra concept where the matrix is flipped\n * along its diagonal. For more details, see:\n * https://en.wikipedia.org/wiki/Transpose\n *\n * @example\n * ```javascript\n * const arr = [\n * ['a1', 'a2', 'a3'],\n * ['b1', 'b2', 'b3'],\n * ['c1', 'c2', 'c3'],\n * ['d1', 'd2', 'd3'],\n * ];\n *\n * const result = transpose(arr);\n * result === [\n * ['a1', 'b1', 'c1', 'd1'],\n * ['a2', 'b2', 'c2', 'd2'],\n * ['a3', 'b3', 'c3', 'd3'],\n * ]\n * ```\n */\nexport function transpose<T>(array: T[][]): T[][] {\n return array[0].map((_, i) => {\n return array.map((column) => column[i]);\n });\n}\n","import type { Node } from 'prosemirror-model';\nimport type { Transaction } from 'prosemirror-state';\n\nimport { CellSelection } from '../cellselection';\nimport { TableMap } from '../tablemap';\n\nimport {\n convertArrayOfRowsToTableNode,\n convertTableNodeToArrayOfRows,\n} from './convert';\nimport { moveRowInArrayOfRows } from './move-row-in-array-of-rows';\nimport { findTable } from './query';\nimport { getSelectionRangeInColumn } from './selection-range';\nimport { transpose } from './transpose';\n\n/**\n * Parameters for moving a column in a table.\n *\n * @internal\n */\nexport interface MoveColumnParams {\n tr: Transaction;\n originIndex: number;\n targetIndex: number;\n select: boolean;\n pos: number;\n}\n\n/**\n * Move a column from index `origin` to index `target`.\n *\n * @internal\n */\nexport function moveColumn(moveColParams: MoveColumnParams): boolean {\n const { tr, originIndex, targetIndex, select, pos } = moveColParams;\n const $pos = tr.doc.resolve(pos);\n const table = findTable($pos);\n if (!table) return false;\n\n const indexesOriginColumn = getSelectionRangeInColumn(\n tr,\n originIndex,\n )?.indexes;\n const indexesTargetColumn = getSelectionRangeInColumn(\n tr,\n targetIndex,\n )?.indexes;\n\n if (!indexesOriginColumn || !indexesTargetColumn) return false;\n\n if (indexesOriginColumn.includes(targetIndex)) return false;\n\n const newTable = moveTableColumn(\n table.node,\n indexesOriginColumn,\n indexesTargetColumn,\n 0,\n );\n\n tr.replaceWith(table.pos, table.pos + table.node.nodeSize, newTable);\n\n if (!select) return true;\n\n const map = TableMap.get(newTable);\n const start = table.start;\n const index = targetIndex;\n const lastCell = map.positionAt(map.height - 1, index, newTable);\n const $lastCell = tr.doc.resolve(start + lastCell);\n\n const firstCell = map.positionAt(0, index, newTable);\n const $firstCell = tr.doc.resolve(start + firstCell);\n\n tr.setSelection(CellSelection.colSelection($lastCell, $firstCell));\n return true;\n}\n\nfunction moveTableColumn(\n table: Node,\n indexesOrigin: number[],\n indexesTarget: number[],\n direction: -1 | 1 | 0,\n) {\n let rows = transpose(convertTableNodeToArrayOfRows(table));\n\n rows = moveRowInArrayOfRows(rows, indexesOrigin, indexesTarget, direction);\n rows = transpose(rows);\n\n return convertArrayOfRowsToTableNode(table, rows);\n}\n","import type { Node } from 'prosemirror-model';\nimport type { Transaction } from 'prosemirror-state';\n\nimport { CellSelection } from '../cellselection';\nimport { TableMap } from '../tablemap';\n\nimport {\n convertArrayOfRowsToTableNode,\n convertTableNodeToArrayOfRows,\n} from './convert';\nimport { moveRowInArrayOfRows } from './move-row-in-array-of-rows';\nimport { findTable } from './query';\nimport { getSelectionRangeInRow } from './selection-range';\n\n/**\n * Parameters for moving a row in a table.\n *\n * @internal\n */\nexport interface MoveRowParams {\n tr: Transaction;\n originIndex: number;\n targetIndex: number;\n select: boolean;\n pos: number;\n}\n\n/**\n * Move a row from index `origin` to index `target`.\n *\n * @internal\n */\nexport function moveRow(moveRowParams: MoveRowParams): boolean {\n const { tr, originIndex, targetIndex, select, pos } = moveRowParams;\n const $pos = tr.doc.resolve(pos);\n const table = findTable($pos);\n if (!table) return false;\n\n const indexesOriginRow = getSelectionRangeInRow(tr, originIndex)?.indexes;\n const indexesTargetRow = getSelectionRangeInRow(tr, targetIndex)?.indexes;\n\n if (!indexesOriginRow || !indexesTargetRow) return false;\n\n if (indexesOriginRow.includes(targetIndex)) return false;\n\n const newTable = moveTableRow(\n table.node,\n indexesOriginRow,\n indexesTargetRow,\n 0,\n );\n\n tr.replaceWith(table.pos, table.pos + table.node.nodeSize, newTable);\n\n if (!select) return true;\n\n const map = TableMap.get(newTable);\n const start = table.start;\n const index = targetIndex;\n const lastCell = map.positionAt(index, map.width - 1, newTable);\n const $lastCell = tr.doc.resolve(start + lastCell);\n\n const firstCell = map.positionAt(index, 0, newTable);\n const $firstCell = tr.doc.resolve(start + firstCell);\n\n tr.setSelection(CellSelection.rowSelection($lastCell, $firstCell));\n return true;\n}\n\nfunction moveTableRow(\n table: Node,\n indexesOrigin: number[],\n indexesTarget: number[],\n direction: -1 | 1 | 0,\n) {\n let rows = convertTableNodeToArrayOfRows(table);\n\n rows = moveRowInArrayOfRows(rows, indexesOrigin, indexesTarget, direction);\n\n return convertArrayOfRowsToTableNode(table, rows);\n}\n","// This file defines a number of table-related commands.\n\nimport type { Node, NodeType, ResolvedPos } from 'prosemirror-model';\nimport { Fragment, Slice } from 'prosemirror-model';\nimport type { Command, EditorState, Transaction } from 'prosemirror-state';\nimport { TextSelection } from 'prosemirror-state';\n\nimport { CellSelection } from './cellselection';\nimport type { Direction } from './input';\nimport type { TableRole } from './schema';\nimport { tableNodeTypes } from './schema';\nimport type { Rect } from './tablemap';\nimport { TableMap } from './tablemap';\nimport type { CellAttrs } from './util';\nimport {\n addColSpan,\n cellAround,\n cellWrapping,\n columnIsHeader,\n isInTable,\n moveCellForward,\n removeColSpan,\n selectionCell,\n} from './util';\nimport { moveColumn } from './utils/move-column';\nimport { moveRow } from './utils/move-row';\n\n/**\n * @public\n */\nexport type TableRect = Rect & {\n tableStart: number;\n map: TableMap;\n table: Node;\n};\n\n/**\n * Helper to get the selected rectangle in a table, if any. Adds table\n * map, table node, and table start offset to the object for\n * convenience.\n *\n * @public\n */\nexport function selectedRect(state: EditorState): TableRect {\n const sel = state.selection;\n const $pos = selectionCell(state);\n const table = $pos.node(-1);\n const tableStart = $pos.start(-1);\n const map = TableMap.get(table);\n const rect =\n sel instanceof CellSelection\n ? map.rectBetween(\n sel.$anchorCell.pos - tableStart,\n sel.$headCell.pos - tableStart,\n )\n : map.findCell($pos.pos - tableStart);\n return { ...rect, tableStart, map, table };\n}\n\n/**\n * Add a column at the given position in a table.\n *\n * @public\n */\nexport function addColumn(\n tr: Transaction,\n { map, tableStart, table }: TableRect,\n col: number,\n): Transaction {\n let refColumn: number | null = col > 0 ? -1 : 0;\n if (columnIsHeader(map, table, col + refColumn)) {\n refColumn = col == 0 || col == map.width ? null : 0;\n }\n\n for (let row = 0; row < map.height; row++) {\n const index = row * map.width + col;\n // If this position falls inside a col-spanning cell\n if (col > 0 && col < map.width && map.map[index - 1] == map.map[index]) {\n const pos = map.map[index];\n const cell = table.nodeAt(pos)!;\n tr.setNodeMarkup(\n tr.mapping.map(tableStart + pos),\n null,\n addColSpan(cell.attrs as CellAttrs, col - map.colCount(pos)),\n );\n // Skip ahead if rowspan > 1\n row += cell.attrs.rowspan - 1;\n } else {\n const type =\n refColumn == null\n ? tableNodeTypes(table.type.schema).cell\n : table.nodeAt(map.map[index + refColumn])!.type;\n const pos = map.positionAt(row, col, table);\n tr.insert(tr.mapping.map(tableStart + pos), type.createAndFill()!);\n }\n }\n return tr;\n}\n\n/**\n * Command to add a column before the column with the selection.\n *\n * @public\n */\nexport function addColumnBefore(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const rect = selectedRect(state);\n dispatch(addColumn(state.tr, rect, rect.left));\n }\n return true;\n}\n\n/**\n * Command to add a column after the column with the selection.\n *\n * @public\n */\nexport function addColumnAfter(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const rect = selectedRect(state);\n dispatch(addColumn(state.tr, rect, rect.right));\n }\n return true;\n}\n\n/**\n * @public\n */\nexport function removeColumn(\n tr: Transaction,\n { map, table, tableStart }: TableRect,\n col: number,\n) {\n const mapStart = tr.mapping.maps.length;\n for (let row = 0; row < map.height; ) {\n const index = row * map.width + col;\n const pos = map.map[index];\n const cell = table.nodeAt(pos)!;\n const attrs = cell.attrs as CellAttrs;\n // If this is part of a col-spanning cell\n if (\n (col > 0 && map.map[index - 1] == pos) ||\n (col < map.width - 1 && map.map[index + 1] == pos)\n ) {\n tr.setNodeMarkup(\n tr.mapping.slice(mapStart).map(tableStart + pos),\n null,\n removeColSpan(attrs, col - map.colCount(pos)),\n );\n } else {\n const start = tr.mapping.slice(mapStart).map(tableStart + pos);\n tr.delete(start, start + cell.nodeSize);\n }\n row += attrs.rowspan;\n }\n}\n\n/**\n * Command function that removes the selected columns from a table.\n *\n * @public\n */\nexport function deleteColumn(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const rect = selectedRect(state);\n const tr = state.tr;\n if (rect.left == 0 && rect.right == rect.map.width) return false;\n for (let i = rect.right - 1; ; i--) {\n removeColumn(tr, rect, i);\n if (i == rect.left) break;\n const table = rect.tableStart\n ? tr.doc.nodeAt(rect.tableStart - 1)\n : tr.doc;\n if (!table) {\n throw new RangeError('No table found');\n }\n rect.table = table;\n rect.map = TableMap.get(table);\n }\n dispatch(tr);\n }\n return true;\n}\n\n/**\n * @public\n */\nexport function rowIsHeader(map: TableMap, table: Node, row: number): boolean {\n const headerCell = tableNodeTypes(table.type.schema).header_cell;\n for (let col = 0; col < map.width; col++)\n if (table.nodeAt(map.map[col + row * map.width])?.type != headerCell)\n return false;\n return true;\n}\n\n/**\n * @public\n */\nexport function addRow(\n tr: Transaction,\n { map, tableStart, table }: TableRect,\n row: number,\n): Transaction {\n let rowPos = tableStart;\n for (let i = 0; i < row; i++) rowPos += table.child(i).nodeSize;\n const cells = [];\n let refRow: number | null = row > 0 ? -1 : 0;\n if (rowIsHeader(map, table, row + refRow))\n refRow = row == 0 || row == map.height ? null : 0;\n for (let col = 0, index = map.width * row; col < map.width; col++, index++) {\n // Covered by a rowspan cell\n if (\n row > 0 &&\n row < map.height &&\n map.map[index] == map.map[index - map.width]\n ) {\n const pos = map.map[index];\n const attrs = table.nodeAt(pos)!.attrs;\n tr.setNodeMarkup(tableStart + pos, null, {\n ...attrs,\n rowspan: attrs.rowspan + 1,\n });\n col += attrs.colspan - 1;\n } else {\n const type =\n refRow == null\n ? tableNodeTypes(table.type.schema).cell\n : table.nodeAt(map.map[index + refRow * map.width])?.type;\n const node = type?.createAndFill();\n if (node) cells.push(node);\n }\n }\n tr.insert(rowPos, tableNodeTypes(table.type.schema).row.create(null, cells));\n return tr;\n}\n\n/**\n * Add a table row before the selection.\n *\n * @public\n */\nexport function addRowBefore(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const rect = selectedRect(state);\n dispatch(addRow(state.tr, rect, rect.top));\n }\n return true;\n}\n\n/**\n * Add a table row after the selection.\n *\n * @public\n */\nexport function addRowAfter(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const rect = selectedRect(state);\n dispatch(addRow(state.tr, rect, rect.bottom));\n }\n return true;\n}\n\n/**\n * @public\n */\nexport function removeRow(\n tr: Transaction,\n { map, table, tableStart }: TableRect,\n row: number,\n): void {\n let rowPos = 0;\n for (let i = 0; i < row; i++) rowPos += table.child(i).nodeSize;\n const nextRow = rowPos + table.child(row).nodeSize;\n\n const mapFrom = tr.mapping.maps.length;\n tr.delete(rowPos + tableStart, nextRow + tableStart);\n\n const seen = new Set<number>();\n\n for (let col = 0, index = row * map.width; col < map.width; col++, index++) {\n const pos = map.map[index];\n\n // Skip cells that are checked already\n if (seen.has(pos)) continue;\n seen.add(pos);\n\n if (row > 0 && pos == map.map[index - map.width]) {\n // If this cell starts in the row above, simply reduce its rowspan\n const attrs = table.nodeAt(pos)!.attrs as CellAttrs;\n tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(pos + tableStart), null, {\n ...attrs,\n rowspan: attrs.rowspan - 1,\n });\n col += attrs.colspan - 1;\n } else if (row < map.height && pos == map.map[index + map.width]) {\n // Else, if it continues in the row below, it has to be moved down\n const cell = table.nodeAt(pos)!;\n const attrs = cell.attrs as CellAttrs;\n const copy = cell.type.create(\n { ...attrs, rowspan: cell.attrs.rowspan - 1 },\n cell.content,\n );\n const newPos = map.positionAt(row + 1, col, table);\n tr.insert(tr.mapping.slice(mapFrom).map(tableStart + newPos), copy);\n col += attrs.colspan - 1;\n }\n }\n}\n\n/**\n * Remove the selected rows from a table.\n *\n * @public\n */\nexport function deleteRow(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const rect = selectedRect(state),\n tr = state.tr;\n if (rect.top == 0 && rect.bottom == rect.map.height) return false;\n for (let i = rect.bottom - 1; ; i--) {\n removeRow(tr, rect, i);\n if (i == rect.top) break;\n const table = rect.tableStart\n ? tr.doc.nodeAt(rect.tableStart - 1)\n : tr.doc;\n if (!table) {\n throw new RangeError('No table found');\n }\n rect.table = table;\n rect.map = TableMap.get(rect.table);\n }\n dispatch(tr);\n }\n return true;\n}\n\nfunction isEmpty(cell: Node): boolean {\n const c = cell.content;\n\n return (\n c.childCount == 1 && c.child(0).isTextblock && c.child(0).childCount == 0\n );\n}\n\nfunction cellsOverlapRectangle({ width, height, map }: TableMap, rect: Rect) {\n let indexTop = rect.top * width + rect.left,\n indexLeft = indexTop;\n let indexBottom = (rect.bottom - 1) * width + rect.left,\n indexRight = indexTop + (rect.right - rect.left - 1);\n for (let i = rect.top; i < rect.bottom; i++) {\n if (\n (rect.left > 0 && map[indexLeft] == map[indexLeft - 1]) ||\n (rect.right < width && map[indexRight] == map[indexRight + 1])\n )\n return true;\n indexLeft += width;\n indexRight += width;\n }\n for (let i = rect.left; i < rect.right; i++) {\n if (\n (rect.top > 0 && map[indexTop] == map[indexTop - width]) ||\n (rect.bottom < height && map[indexBottom] == map[indexBottom + width])\n )\n return true;\n indexTop++;\n indexBottom++;\n }\n return false;\n}\n\n/**\n * Merge the selected cells into a single cell. Only available when\n * the selected cells' outline forms a rectangle.\n *\n * @public\n */\nexport function mergeCells(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n const sel = state.selection;\n if (\n !(sel instanceof CellSelection) ||\n sel.$anchorCell.pos == sel.$headCell.pos\n )\n return false;\n const rect = selectedRect(state),\n { map } = rect;\n if (cellsOverlapRectangle(map, rect)) return false;\n if (dispatch) {\n const tr = state.tr;\n const seen: Record<number, boolean> = {};\n let content = Fragment.empty;\n let mergedPos: number | undefined;\n let mergedCell: Node | undefined;\n for (let row = rect.top; row < rect.bottom; row++) {\n for (let col = rect.left; col < rect.right; col++) {\n const cellPos = map.map[row * map.width + col];\n const cell = rect.table.nodeAt(cellPos);\n if (seen[cellPos] || !cell) continue;\n seen[cellPos] = true;\n if (mergedPos == null) {\n mergedPos = cellPos;\n mergedCell = cell;\n } else {\n if (!isEmpty(cell)) content = content.append(cell.content);\n const mapped = tr.mapping.map(cellPos + rect.tableStart);\n tr.delete(mapped, mapped + cell.nodeSize);\n }\n }\n }\n if (mergedPos == null || mergedCell == null) {\n return true;\n }\n\n tr.setNodeMarkup(mergedPos + rect.tableStart, null, {\n ...addColSpan(\n mergedCell.attrs as CellAttrs,\n mergedCell.attrs.colspan,\n rect.right - rect.left - mergedCell.attrs.colspan,\n ),\n rowspan: rect.bottom - rect.top,\n });\n if (content.size > 0) {\n const end = mergedPos + 1 + mergedCell.content.size;\n const start = isEmpty(mergedCell) ? mergedPos + 1 : end;\n tr.replaceWith(start + rect.tableStart, end + rect.tableStart, content);\n }\n tr.setSelection(\n new CellSelection(tr.doc.resolve(mergedPos + rect.tableStart)),\n );\n dispatch(tr);\n }\n return true;\n}\n\n/**\n * Split a selected cell, whose rowpan or colspan is greater than one,\n * into smaller cells. Use the first cell type for the new cells.\n *\n * @public\n */\nexport function splitCell(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n const nodeTypes = tableNodeTypes(state.schema);\n return splitCellWithType(({ node }) => {\n return nodeTypes[node.type.spec.tableRole as TableRole];\n })(state, dispatch);\n}\n\n/**\n * @public\n */\nexport interface GetCellTypeOptions {\n node: Node;\n row: number;\n col: number;\n}\n\n/**\n * Split a selected cell, whose rowpan or colspan is greater than one,\n * into smaller cells with the cell type (th, td) returned by getType function.\n *\n * @public\n */\nexport function splitCellWithType(\n getCellType: (options: GetCellTypeOptions) => NodeType,\n): Command {\n return (state, dispatch) => {\n const sel = state.selection;\n let cellNode: Node | null | undefined;\n let cellPos: number | undefined;\n if (!(sel instanceof CellSelection)) {\n cellNode = cellWrapping(sel.$from);\n if (!cellNode) return false;\n cellPos = cellAround(sel.$from)?.pos;\n } else {\n if (sel.$anchorCell.pos != sel.$headCell.pos) return false;\n cellNode = sel.$anchorCell.nodeAfter;\n cellPos = sel.$anchorCell.pos;\n }\n if (cellNode == null || cellPos == null) {\n return false;\n }\n if (cellNode.attrs.colspan == 1 && cellNode.attrs.rowspan == 1) {\n return false;\n }\n if (dispatch) {\n let baseAttrs = cellNode.attrs;\n const attrs = [];\n const colwidth = baseAttrs.colwidth;\n if (baseAttrs.rowspan > 1) baseAttrs = { ...baseAttrs, rowspan: 1 };\n if (baseAttrs.colspan > 1) baseAttrs = { ...baseAttrs, colspan: 1 };\n const rect = selectedRect(state),\n tr = state.tr;\n for (let i = 0; i < rect.right - rect.left; i++)\n attrs.push(\n colwidth\n ? {\n ...baseAttrs,\n colwidth: colwidth && colwidth[i] ? [colwidth[i]] : null,\n }\n : baseAttrs,\n );\n let lastCell;\n for (let row = rect.top; row < rect.bottom; row++) {\n let pos = rect.map.positionAt(row, rect.left, rect.table);\n if (row == rect.top) pos += cellNode.nodeSize;\n for (let col = rect.left, i = 0; col < rect.right; col++, i++) {\n if (col == rect.left && row == rect.top) continue;\n tr.insert(\n (lastCell = tr.mapping.map(pos + rect.tableStart, 1)),\n getCellType({ node: cellNode, row, col }).createAndFill(attrs[i])!,\n );\n }\n }\n tr.setNodeMarkup(\n cellPos,\n getCellType({ node: cellNode, row: rect.top, col: rect.left }),\n attrs[0],\n );\n if (sel instanceof CellSelection)\n tr.setSelection(\n new CellSelection(\n tr.doc.resolve(sel.$anchorCell.pos),\n lastCell ? tr.doc.resolve(lastCell) : undefined,\n ),\n );\n dispatch(tr);\n }\n return true;\n };\n}\n\n/**\n * Returns a command that sets the given attribute to the given value,\n * and is only available when the currently selected cell doesn't\n * already have that attribute set to that value.\n *\n * @public\n */\nexport function setCellAttr(name: string, value: unknown): Command {\n return function (state, dispatch) {\n if (!isInTable(state)) return false;\n const $cell = selectionCell(state);\n if ($cell.nodeAfter!.attrs[name] === value) return false;\n if (dispatch) {\n const tr = state.tr;\n if (state.selection instanceof CellSelection)\n state.selection.forEachCell((node, pos) => {\n if (node.attrs[name] !== value)\n tr.setNodeMarkup(pos, null, {\n ...node.attrs,\n [name]: value,\n });\n });\n else\n tr.setNodeMarkup($cell.pos, null, {\n ...$cell.nodeAfter!.attrs,\n [name]: value,\n });\n dispatch(tr);\n }\n return true;\n };\n}\n\nfunction deprecated_toggleHeader(type: ToggleHeaderType): Command {\n return function (state, dispatch) {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const types = tableNodeTypes(state.schema);\n const rect = selectedRect(state),\n tr = state.tr;\n const cells = rect.map.cellsInRect(\n type == 'column'\n ? {\n left: rect.left,\n top: 0,\n right: rect.right,\n bottom: rect.map.height,\n }\n : type == 'row'\n ? {\n left: 0,\n top: rect.top,\n right: rect.map.width,\n bottom: rect.bottom,\n }\n : rect,\n );\n const nodes = cells.map((pos) => rect.table.nodeAt(pos)!);\n for (\n let i = 0;\n i < cells.length;\n i++ // Remove headers, if any\n )\n if (nodes[i].type == types.header_cell)\n tr.setNodeMarkup(\n rect.tableStart + cells[i],\n types.cell,\n nodes[i].attrs,\n );\n if (tr.steps.length === 0)\n for (\n let i = 0;\n i < cells.length;\n i++ // No headers removed, add instead\n )\n tr.setNodeMarkup(\n rect.tableStart + cells[i],\n types.header_cell,\n nodes[i].attrs,\n );\n dispatch(tr);\n }\n return true;\n };\n}\n\nfunction isHeaderEnabledByType(\n type: 'row' | 'column',\n rect: TableRect,\n types: Record<string, NodeType>,\n): boolean {\n // Get cell positions for first row or first column\n const cellPositions = rect.map.cellsInRect({\n left: 0,\n top: 0,\n right: type == 'row' ? rect.map.width : 1,\n bottom: type == 'column' ? rect.map.height : 1,\n });\n\n for (let i = 0; i < cellPositions.length; i++) {\n const cell = rect.table.nodeAt(cellPositions[i]);\n if (cell && cell.type !== types.header_cell) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * @public\n */\nexport type ToggleHeaderType = 'column' | 'row' | 'cell';\n\n/**\n * Toggles between row/column header and normal cells (Only applies to first row/column).\n * For deprecated behavior pass `useDeprecatedLogic` in options with true.\n *\n * @public\n */\nexport function toggleHeader(\n type: ToggleHeaderType,\n options?: { useDeprecatedLogic: boolean },\n): Command {\n options = options || { useDeprecatedLogic: false };\n\n if (options.useDeprecatedLogic) return deprecated_toggleHeader(type);\n\n return function (state, dispatch) {\n if (!isInTable(state)) return false;\n if (dispatch) {\n const types = tableNodeTypes(state.schema);\n const rect = selectedRect(state),\n tr = state.tr;\n\n const isHeaderRowEnabled = isHeaderEnabledByType('row', rect, types);\n const isHeaderColumnEnabled = isHeaderEnabledByType(\n 'column',\n rect,\n types,\n );\n\n const isHeaderEnabled =\n type === 'column'\n ? isHeaderRowEnabled\n : type === 'row'\n ? isHeaderColumnEnabled\n : false;\n\n const selectionStartsAt = isHeaderEnabled ? 1 : 0;\n\n const cellsRect =\n type == 'column'\n ? {\n left: 0,\n top: selectionStartsAt,\n right: 1,\n bottom: rect.map.height,\n }\n : type == 'row'\n ? {\n left: selectionStartsAt,\n top: 0,\n right: rect.map.width,\n bottom: 1,\n }\n : rect;\n\n const newType =\n type == 'column'\n ? isHeaderColumnEnabled\n ? types.cell\n : types.header_cell\n : type == 'row'\n ? isHeaderRowEnabled\n ? types.cell\n : types.header_cell\n : types.cell;\n\n rect.map.cellsInRect(cellsRect).forEach((relativeCellPos) => {\n const cellPos = relativeCellPos + rect.tableStart;\n const cell = tr.doc.nodeAt(cellPos);\n\n if (cell) {\n tr.setNodeMarkup(cellPos, newType, cell.attrs);\n }\n });\n\n dispatch(tr);\n }\n return true;\n };\n}\n\n/**\n * Toggles whether the selected row contains header cells.\n *\n * @public\n */\nexport const toggleHeaderRow: Command = toggleHeader('row', {\n useDeprecatedLogic: true,\n});\n\n/**\n * Toggles whether the selected column contains header cells.\n *\n * @public\n */\nexport const toggleHeaderColumn: Command = toggleHeader('column', {\n useDeprecatedLogic: true,\n});\n\n/**\n * Toggles whether the selected cells are header cells.\n *\n * @public\n */\nexport const toggleHeaderCell: Command = toggleHeader('cell', {\n useDeprecatedLogic: true,\n});\n\nfunction findNextCell($cell: ResolvedPos, dir: Direction): number | null {\n if (dir < 0) {\n const before = $cell.nodeBefore;\n if (before) return $cell.pos - before.nodeSize;\n for (\n let row = $cell.index(-1) - 1, rowEnd = $cell.before();\n row >= 0;\n row--\n ) {\n const rowNode = $cell.node(-1).child(row);\n const lastChild = rowNode.lastChild;\n if (lastChild) {\n return rowEnd - 1 - lastChild.nodeSize;\n }\n rowEnd -= rowNode.nodeSize;\n }\n } else {\n if ($cell.index() < $cell.parent.childCount - 1) {\n return $cell.pos + $cell.nodeAfter!.nodeSize;\n }\n const table = $cell.node(-1);\n for (\n let row = $cell.indexAfter(-1), rowStart = $cell.after();\n row < table.childCount;\n row++\n ) {\n const rowNode = table.child(row);\n if (rowNode.childCount) return rowStart + 1;\n rowStart += rowNode.nodeSize;\n }\n }\n return null;\n}\n\n/**\n * Returns a command for selecting the next (direction=1) or previous\n * (direction=-1) cell in a table.\n *\n * @public\n */\nexport function goToNextCell(direction: Direction): Command {\n return function (state, dispatch) {\n if (!isInTable(state)) return false;\n const cell = findNextCell(selectionCell(state), direction);\n if (cell == null) return false;\n if (dispatch) {\n const $cell = state.doc.resolve(cell);\n dispatch(\n state.tr\n .setSelection(TextSelection.between($cell, moveCellForward($cell)))\n .scrollIntoView(),\n );\n }\n return true;\n };\n}\n\n/**\n * Deletes the table around the selection, if any.\n *\n * @public\n */\nexport function deleteTable(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n const $pos = state.selection.$anchor;\n for (let d = $pos.depth; d > 0; d--) {\n const node = $pos.node(d);\n if (node.type.spec.tableRole == 'table') {\n if (dispatch)\n dispatch(\n state.tr.delete($pos.before(d), $pos.after(d)).scrollIntoView(),\n );\n return true;\n }\n }\n return false;\n}\n\n/**\n * Deletes the content of the selected cells, if they are not empty.\n *\n * @public\n */\nexport function deleteCellSelection(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n): boolean {\n const sel = state.selection;\n if (!(sel instanceof CellSelection)) return false;\n if (dispatch) {\n const tr = state.tr;\n const baseContent = tableNodeTypes(state.schema).cell.createAndFill()!\n .content;\n sel.forEachCell((cell, pos) => {\n if (!cell.content.eq(baseContent))\n tr.replace(\n tr.mapping.map(pos + 1),\n tr.mapping.map(pos + cell.nodeSize - 1),\n new Slice(baseContent, 0, 0),\n );\n });\n if (tr.docChanged) dispatch(tr);\n }\n return true;\n}\n\n/**\n * Options for moveTableRow\n *\n * @public\n */\nexport interface MoveTableRowOptions {\n /**\n * The source row index to move from.\n */\n from: number;\n\n /**\n * The destination row index to move to.\n */\n to: number;\n\n /**\n * Whether to select the moved row after the operation.\n *\n * @default true\n */\n select?: boolean;\n\n /**\n * Optional position to resolve table from. If not provided, uses the current selection.\n */\n pos?: number;\n}\n\n/**\n * Move a table row from index `from` to index `to`.\n *\n * @public\n */\nexport function moveTableRow(options: MoveTableRowOptions): Command {\n return (state, dispatch) => {\n const {\n from: originIndex,\n to: targetIndex,\n select = true,\n pos = state.selection.from,\n } = options;\n const tr = state.tr;\n if (moveRow({ tr, originIndex, targetIndex, select, pos })) {\n dispatch?.(tr);\n return true;\n }\n return false;\n };\n}\n\n/**\n * Options for moveTableColumn\n *\n * @public\n */\nexport interface MoveTableColumnOptions {\n /**\n * The source column index to move from.\n */\n from: number;\n\n /**\n * The destination column index to move to.\n */\n to: number;\n\n /**\n * Whether to select the moved column after the operation.\n *\n * @default true\n */\n select?: boolean;\n\n /**\n * Optional position to resolve table from. If not provided, uses the current selection.\n */\n pos?: number;\n}\n\n/**\n * Move a table column from index `from` to index `to`.\n *\n * @public\n */\nexport function moveTableColumn(options: MoveTableColumnOptions): Command {\n return (state, dispatch) => {\n const {\n from: originIndex,\n to: targetIndex,\n select = true,\n pos = state.selection.from,\n } = options;\n const tr = state.tr;\n if (moveColumn({ tr, originIndex, targetIndex, select, pos })) {\n dispatch?.(tr);\n return true;\n }\n return false;\n };\n}\n","// Utilities used for copy/paste handling.\n//\n// This module handles pasting cell content into tables, or pasting\n// anything into a cell selection, as replacing a block of cells with\n// the content of the selection. When pasting cells into a cell, that\n// involves placing the block of pasted content so that its top left\n// aligns with the selection cell, optionally extending the table to\n// the right or bottom to make sure it is large enough. Pasting into a\n// cell selection is different, here the cells in the selection are\n// clipped to the selection's rectangle, optionally repeating the\n// pasted cells when they are smaller than the selection.\n\nimport type { Node, NodeType, Schema } from 'prosemirror-model';\nimport { Fragment, Slice } from 'prosemirror-model';\nimport type { EditorState, Transaction } from 'prosemirror-state';\nimport { Transform } from 'prosemirror-transform';\n\nimport { CellSelection } from './cellselection';\nimport { tableNodeTypes } from './schema';\nimport type { ColWidths, Rect } from './tablemap';\nimport { TableMap } from './tablemap';\nimport type { CellAttrs } from './util';\nimport { removeColSpan } from './util';\n\n/**\n * @internal\n */\nexport type Area = { width: number; height: number; rows: Fragment[] };\n\n// Utilities to help with copying and pasting table cells\n\n/**\n * Get a rectangular area of cells from a slice, or null if the outer\n * nodes of the slice aren't table cells or rows.\n *\n * @internal\n */\nexport function pastedCells(slice: Slice): Area | null {\n if (slice.size === 0) return null;\n let { content, openStart, openEnd } = slice;\n while (\n content.childCount == 1 &&\n ((openStart > 0 && openEnd > 0) ||\n content.child(0).type.spec.tableRole == 'table')\n ) {\n openStart--;\n openEnd--;\n content = content.child(0).content;\n }\n const first = content.child(0);\n const role = first.type.spec.tableRole;\n const schema = first.type.schema,\n rows = [];\n if (role == 'row') {\n for (let i = 0; i < content.childCount; i++) {\n let cells = content.child(i).content;\n const left = i ? 0 : Math.max(0, openStart - 1);\n const right = i < content.childCount - 1 ? 0 : Math.max(0, openEnd - 1);\n if (left || right)\n cells = fitSlice(\n tableNodeTypes(schema).row,\n new Slice(cells, left, right),\n ).content;\n rows.push(cells);\n }\n } else if (role == 'cell' || role == 'header_cell') {\n rows.push(\n openStart || openEnd\n ? fitSlice(\n tableNodeTypes(schema).row,\n new Slice(content, openStart, openEnd),\n ).content\n : content,\n );\n } else {\n return null;\n }\n return ensureRectangular(schema, rows);\n}\n\n// Compute the width and height of a set of cells, and make sure each\n// row has the same number of cells.\nfunction ensureRectangular(schema: Schema, rows: Fragment[]): Area {\n const widths: ColWidths = [];\n for (let i = 0; i < rows.length; i++) {\n const row = rows[i];\n for (let j = row.childCount - 1; j >= 0; j--) {\n const { rowspan, colspan } = row.child(j).attrs;\n for (let r = i; r < i + rowspan; r++)\n widths[r] = (widths[r] || 0) + colspan;\n }\n }\n let width = 0;\n for (let r = 0; r < widths.length; r++) width = Math.max(width, widths[r]);\n for (let r = 0; r < widths.length; r++) {\n if (r >= rows.length) rows.push(Fragment.empty);\n if (widths[r] < width) {\n const empty = tableNodeTypes(schema).cell.createAndFill()!;\n const cells = [];\n for (let i = widths[r]; i < width; i++) {\n cells.push(empty);\n }\n rows[r] = rows[r].append(Fragment.from(cells));\n }\n }\n return { height: rows.length, width, rows };\n}\n\nexport function fitSlice(nodeType: NodeType, slice: Slice): Node {\n const node = nodeType.createAndFill()!;\n const tr = new Transform(node).replace(0, node.content.size, slice);\n return tr.doc;\n}\n\n/**\n * Clip or extend (repeat) the given set of cells to cover the given\n * width and height. Will clip rowspan/colspan cells at the edges when\n * they stick out.\n *\n * @internal\n */\nexport function clipCells(\n { width, height, rows }: Area,\n newWidth: number,\n newHeight: number,\n): Area {\n if (width != newWidth) {\n const added: number[] = [];\n const newRows: Fragment[] = [];\n for (let row = 0; row < rows.length; row++) {\n const frag = rows[row],\n cells = [];\n for (let col = added[row] || 0, i = 0; col < newWidth; i++) {\n let cell = frag.child(i % frag.childCount);\n if (col + cell.attrs.colspan > newWidth)\n cell = cell.type.createChecked(\n removeColSpan(\n cell.attrs as CellAttrs,\n cell.attrs.colspan,\n col + cell.attrs.colspan - newWidth,\n ),\n cell.content,\n );\n cells.push(cell);\n col += cell.attrs.colspan;\n for (let j = 1; j < cell.attrs.rowspan; j++)\n added[row + j] = (added[row + j] || 0) + cell.attrs.colspan;\n }\n newRows.push(Fragment.from(cells));\n }\n rows = newRows;\n width = newWidth;\n }\n\n if (height != newHeight) {\n const newRows = [];\n for (let row = 0, i = 0; row < newHeight; row++, i++) {\n const cells = [],\n source = rows[i % height];\n for (let j = 0; j < source.childCount; j++) {\n let cell = source.child(j);\n if (row + cell.attrs.rowspan > newHeight)\n cell = cell.type.create(\n {\n ...cell.attrs,\n rowspan: Math.max(1, newHeight - cell.attrs.rowspan),\n },\n cell.content,\n );\n cells.push(cell);\n }\n newRows.push(Fragment.from(cells));\n }\n rows = newRows;\n height = newHeight;\n }\n\n return { width, height, rows };\n}\n\n// Make sure a table has at least the given width and height. Return\n// true if something was changed.\nfunction growTable(\n tr: Transaction,\n map: TableMap,\n table: Node,\n start: number,\n width: number,\n height: number,\n mapFrom: number,\n): boolean {\n const schema = tr.doc.type.schema;\n const types = tableNodeTypes(schema);\n let empty;\n let emptyHead;\n if (width > map.width) {\n for (let row = 0, rowEnd = 0; row < map.height; row++) {\n const rowNode = table.child(row);\n rowEnd += rowNode.nodeSize;\n const cells: Node[] = [];\n let add: Node;\n if (rowNode.lastChild == null || rowNode.lastChild.type == types.cell)\n add = empty || (empty = types.cell.createAndFill()!);\n else add = emptyHead || (emptyHead = types.header_cell.createAndFill()!);\n for (let i = map.width; i < width; i++) cells.push(add);\n tr.insert(tr.mapping.slice(mapFrom).map(rowEnd - 1 + start), cells);\n }\n }\n if (height > map.height) {\n const cells = [];\n for (\n let i = 0, start = (map.height - 1) * map.width;\n i < Math.max(map.width, width);\n i++\n ) {\n const header =\n i >= map.width\n ? false\n : table.nodeAt(map.map[start + i])!.type == types.header_cell;\n cells.push(\n header\n ? emptyHead || (emptyHead = types.header_cell.createAndFill()!)\n : empty || (empty = types.cell.createAndFill()!),\n );\n }\n\n const emptyRow = types.row.create(null, Fragment.from(cells)),\n rows = [];\n for (let i = map.height; i < height; i++) rows.push(emptyRow);\n tr.insert(tr.mapping.slice(mapFrom).map(start + table.nodeSize - 2), rows);\n }\n return !!(empty || emptyHead);\n}\n\n// Make sure the given line (left, top) to (right, top) doesn't cross\n// any rowspan cells by splitting cells that cross it. Return true if\n// something changed.\nfunction isolateHorizontal(\n tr: Transaction,\n map: TableMap,\n table: Node,\n start: number,\n left: number,\n right: number,\n top: number,\n mapFrom: number,\n): boolean {\n if (top == 0 || top == map.height) return false;\n let found = false;\n for (let col = left; col < right; col++) {\n const index = top * map.width + col,\n pos = map.map[index];\n if (map.map[index - map.width] == pos) {\n found = true;\n const cell = table.nodeAt(pos)!;\n const { top: cellTop, left: cellLeft } = map.findCell(pos);\n tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(pos + start), null, {\n ...cell.attrs,\n rowspan: top - cellTop,\n });\n tr.insert(\n tr.mapping.slice(mapFrom).map(map.positionAt(top, cellLeft, table)),\n cell.type.createAndFill({\n ...cell.attrs,\n rowspan: cellTop + cell.attrs.rowspan - top,\n })!,\n );\n col += cell.attrs.colspan - 1;\n }\n }\n return found;\n}\n\n// Make sure the given line (left, top) to (left, bottom) doesn't\n// cross any colspan cells by splitting cells that cross it. Return\n// true if something changed.\nfunction isolateVertical(\n tr: Transaction,\n map: TableMap,\n table: Node,\n start: number,\n top: number,\n bottom: number,\n left: number,\n mapFrom: number,\n): boolean {\n if (left == 0 || left == map.width) return false;\n let found = false;\n for (let row = top; row < bottom; row++) {\n const index = row * map.width + left,\n pos = map.map[index];\n if (map.map[index - 1] == pos) {\n found = true;\n const cell = table.nodeAt(pos)!;\n const cellLeft = map.colCount(pos);\n const updatePos = tr.mapping.slice(mapFrom).map(pos + start);\n tr.setNodeMarkup(\n updatePos,\n null,\n removeColSpan(\n cell.attrs as CellAttrs,\n left - cellLeft,\n cell.attrs.colspan - (left - cellLeft),\n ),\n );\n tr.insert(\n updatePos + cell.nodeSize,\n cell.type.createAndFill(\n removeColSpan(cell.attrs as CellAttrs, 0, left - cellLeft),\n )!,\n );\n row += cell.attrs.rowspan - 1;\n }\n }\n return found;\n}\n\n/**\n * Insert the given set of cells (as returned by `pastedCells`) into a\n * table, at the position pointed at by rect.\n *\n * @internal\n */\nexport function insertCells(\n state: EditorState,\n dispatch: (tr: Transaction) => void,\n tableStart: number,\n rect: Rect,\n cells: Area,\n): void {\n let table = tableStart ? state.doc.nodeAt(tableStart - 1) : state.doc;\n if (!table) {\n throw new Error('No table found');\n }\n let map = TableMap.get(table);\n const { top, left } = rect;\n const right = left + cells.width,\n bottom = top + cells.height;\n const tr = state.tr;\n let mapFrom = 0;\n\n function recomp(): void {\n table = tableStart ? tr.doc.nodeAt(tableStart - 1) : tr.doc;\n if (!table) {\n throw new Error('No table found');\n }\n map = TableMap.get(table);\n mapFrom = tr.mapping.maps.length;\n }\n\n // Prepare the table to be large enough and not have any cells\n // crossing the boundaries of the rectangle that we want to\n // insert into. If anything about it changes, recompute the table\n // map so that subsequent operations can see the current shape.\n if (growTable(tr, map, table, tableStart, right, bottom, mapFrom)) recomp();\n if (isolateHorizontal(tr, map, table, tableStart, left, right, top, mapFrom))\n recomp();\n if (\n isolateHorizontal(tr, map, table, tableStart, left, right, bottom, mapFrom)\n )\n recomp();\n if (isolateVertical(tr, map, table, tableStart, top, bottom, left, mapFrom))\n recomp();\n if (isolateVertical(tr, map, table, tableStart, top, bottom, right, mapFrom))\n recomp();\n\n for (let row = top; row < bottom; row++) {\n const from = map.positionAt(row, left, table),\n to = map.positionAt(row, right, table);\n tr.replace(\n tr.mapping.slice(mapFrom).map(from + tableStart),\n tr.mapping.slice(mapFrom).map(to + tableStart),\n new Slice(cells.rows[row - top], 0, 0),\n );\n }\n recomp();\n tr.setSelection(\n new CellSelection(\n tr.doc.resolve(tableStart + map.positionAt(top, left, table)),\n tr.doc.resolve(tableStart + map.positionAt(bottom - 1, right - 1, table)),\n ),\n );\n dispatch(tr);\n}\n","// This file defines a number of helpers for wiring up user input to\n// table-related functionality.\n\nimport { keydownHandler } from 'prosemirror-keymap';\nimport type { ResolvedPos, Slice } from 'prosemirror-model';\nimport { Fragment } from 'prosemirror-model';\nimport type { Command, EditorState, Transaction } from 'prosemirror-state';\nimport { Selection, TextSelection } from 'prosemirror-state';\nimport type { EditorView } from 'prosemirror-view';\n\nimport { CellSelection } from './cellselection';\nimport { deleteCellSelection } from './commands';\nimport { clipCells, fitSlice, insertCells, pastedCells } from './copypaste';\nimport { tableNodeTypes } from './schema';\nimport { TableMap } from './tablemap';\nimport {\n cellAround,\n inSameTable,\n isInTable,\n nextCell,\n selectionCell,\n tableEditingKey,\n} from './util';\n\ntype Axis = 'horiz' | 'vert';\n\n/**\n * @public\n */\nexport type Direction = -1 | 1;\n\nexport const handleKeyDown = keydownHandler({\n ArrowLeft: arrow('horiz', -1),\n ArrowRight: arrow('horiz', 1),\n ArrowUp: arrow('vert', -1),\n ArrowDown: arrow('vert', 1),\n\n 'Shift-ArrowLeft': shiftArrow('horiz', -1),\n 'Shift-ArrowRight': shiftArrow('horiz', 1),\n 'Shift-ArrowUp': shiftArrow('vert', -1),\n 'Shift-ArrowDown': shiftArrow('vert', 1),\n\n Backspace: deleteCellSelection,\n 'Mod-Backspace': deleteCellSelection,\n Delete: deleteCellSelection,\n 'Mod-Delete': deleteCellSelection,\n});\n\nfunction maybeSetSelection(\n state: EditorState,\n dispatch: undefined | ((tr: Transaction) => void),\n selection: Selection,\n): boolean {\n if (selection.eq(state.selection)) return false;\n if (dispatch) dispatch(state.tr.setSelection(selection).scrollIntoView());\n return true;\n}\n\n/**\n * @internal\n */\nexport function arrow(axis: Axis, dir: Direction): Command {\n return (state, dispatch, view) => {\n if (!view) return false;\n const sel = state.selection;\n if (sel instanceof CellSelection) {\n return maybeSetSelection(\n state,\n dispatch,\n Selection.near(sel.$headCell, dir),\n );\n }\n if (axis != 'horiz' && !sel.empty) return false;\n const end = atEndOfCell(view, axis, dir);\n if (end == null) return false;\n if (axis == 'horiz') {\n return maybeSetSelection(\n state,\n dispatch,\n Selection.near(state.doc.resolve(sel.head + dir), dir),\n );\n } else {\n const $cell = state.doc.resolve(end);\n const $next = nextCell($cell, axis, dir);\n let newSel;\n if ($next) newSel = Selection.near($next, 1);\n else if (dir < 0)\n newSel = Selection.near(state.doc.resolve($cell.before(-1)), -1);\n else newSel = Selection.near(state.doc.resolve($cell.after(-1)), 1);\n return maybeSetSelection(state, dispatch, newSel);\n }\n };\n}\n\nfunction shiftArrow(axis: Axis, dir: Direction): Command {\n return (state, dispatch, view) => {\n if (!view) return false;\n const sel = state.selection;\n let cellSel: CellSelection;\n if (sel instanceof CellSelection) {\n cellSel = sel;\n } else {\n const end = atEndOfCell(view, axis, dir);\n if (end == null) return false;\n cellSel = new CellSelection(state.doc.resolve(end));\n }\n\n const $head = nextCell(cellSel.$headCell, axis, dir);\n if (!$head) return false;\n return maybeSetSelection(\n state,\n dispatch,\n new CellSelection(cellSel.$anchorCell, $head),\n );\n };\n}\n\nexport function handleTripleClick(view: EditorView, pos: number): boolean {\n const doc = view.state.doc,\n $cell = cellAround(doc.resolve(pos));\n if (!$cell) return false;\n view.dispatch(view.state.tr.setSelection(new CellSelection($cell)));\n return true;\n}\n\n/**\n * @public\n */\nexport function handlePaste(\n view: EditorView,\n _: ClipboardEvent,\n slice: Slice,\n): boolean {\n if (!isInTable(view.state)) return false;\n let cells = pastedCells(slice);\n const sel = view.state.selection;\n if (sel instanceof CellSelection) {\n if (!cells)\n cells = {\n width: 1,\n height: 1,\n rows: [\n Fragment.from(\n fitSlice(tableNodeTypes(view.state.schema).cell, slice),\n ),\n ],\n };\n const table = sel.$anchorCell.node(-1);\n const start = sel.$anchorCell.start(-1);\n const rect = TableMap.get(table).rectBetween(\n sel.$anchorCell.pos - start,\n sel.$headCell.pos - start,\n );\n cells = clipCells(cells, rect.right - rect.left, rect.bottom - rect.top);\n insertCells(view.state, view.dispatch, start, rect, cells);\n return true;\n } else if (cells) {\n const $cell = selectionCell(view.state);\n const start = $cell.start(-1);\n insertCells(\n view.state,\n view.dispatch,\n start,\n TableMap.get($cell.node(-1)).findCell($cell.pos - start),\n cells,\n );\n return true;\n } else {\n return false;\n }\n}\n\nexport function handleMouseDown(\n view: EditorView,\n startEvent: MouseEvent,\n): void {\n // Only handle mouse down events for the main button (usually the left button).\n // This ensures that the cell selection won't be triggered when trying to open\n // the context menu.\n if (startEvent.button != 0) return;\n\n if (startEvent.ctrlKey || startEvent.metaKey) return;\n\n const startDOMCell = domInCell(view, startEvent.target as Node);\n let $anchor;\n if (startEvent.shiftKey && view.state.selection instanceof CellSelection) {\n // Adding to an existing cell selection\n setCellSelection(view.state.selection.$anchorCell, startEvent);\n startEvent.preventDefault();\n } else if (\n startEvent.shiftKey &&\n startDOMCell &&\n ($anchor = cellAround(view.state.selection.$anchor)) != null &&\n cellUnderMouse(view, startEvent)?.pos != $anchor.pos\n ) {\n // Adding to a selection that starts in another cell (causing a\n // cell selection to be created).\n setCellSelection($anchor, startEvent);\n startEvent.preventDefault();\n } else if (!startDOMCell) {\n // Not in a cell, let the default behavior happen.\n return;\n }\n\n // Create and dispatch a cell selection between the given anchor and\n // the position under the mouse.\n function setCellSelection($anchor: ResolvedPos, event: MouseEvent): void {\n let $head = cellUnderMouse(view, event);\n const starting = tableEditingKey.getState(view.state) == null;\n if (!$head || !inSameTable($anchor, $head)) {\n if (starting) $head = $anchor;\n else return;\n }\n const selection = new CellSelection($anchor, $head);\n if (starting || !view.state.selection.eq(selection)) {\n const tr = view.state.tr.setSelection(selection);\n if (starting) tr.setMeta(tableEditingKey, $anchor.pos);\n view.dispatch(tr);\n }\n }\n\n // Stop listening to mouse motion events.\n function stop(): void {\n view.root.removeEventListener('mouseup', stop);\n view.root.removeEventListener('dragstart', stop);\n view.root.removeEventListener('mousemove', move);\n if (tableEditingKey.getState(view.state) != null)\n view.dispatch(view.state.tr.setMeta(tableEditingKey, -1));\n }\n\n function move(_event: Event): void {\n const event = _event as MouseEvent;\n const anchor = tableEditingKey.getState(view.state);\n let $anchor;\n if (anchor != null) {\n // Continuing an existing cross-cell selection\n $anchor = view.state.doc.resolve(anchor);\n } else if (domInCell(view, event.target as Node) != startDOMCell) {\n // Moving out of the initial cell -- start a new cell selection\n $anchor = cellUnderMouse(view, startEvent);\n if (!$anchor) return stop();\n }\n if ($anchor) setCellSelection($anchor, event);\n }\n\n view.root.addEventListener('mouseup', stop);\n view.root.addEventListener('dragstart', stop);\n view.root.addEventListener('mousemove', move);\n}\n\n// Check whether the cursor is at the end of a cell (so that further\n// motion would move out of the cell)\nfunction atEndOfCell(view: EditorView, axis: Axis, dir: number): null | number {\n if (!(view.state.selection instanceof TextSelection)) return null;\n const { $head } = view.state.selection;\n for (let d = $head.depth - 1; d >= 0; d--) {\n const parent = $head.node(d),\n index = dir < 0 ? $head.index(d) : $head.indexAfter(d);\n if (index != (dir < 0 ? 0 : parent.childCount)) return null;\n if (\n parent.type.spec.tableRole == 'cell' ||\n parent.type.spec.tableRole == 'header_cell'\n ) {\n const cellPos = $head.before(d);\n const dirStr: 'up' | 'down' | 'left' | 'right' =\n axis == 'vert' ? (dir > 0 ? 'down' : 'up') : dir > 0 ? 'right' : 'left';\n return view.endOfTextblock(dirStr) ? cellPos : null;\n }\n }\n return null;\n}\n\nfunction domInCell(view: EditorView, dom: Node | null): Node | null {\n for (; dom && dom != view.dom; dom = dom.parentNode) {\n if (dom.nodeName == 'TD' || dom.nodeName == 'TH') {\n return dom;\n }\n }\n return null;\n}\n\nfunction cellUnderMouse(\n view: EditorView,\n event: MouseEvent,\n): ResolvedPos | null {\n const mousePos = view.posAtCoords({\n left: event.clientX,\n top: event.clientY,\n });\n if (!mousePos) return null;\n // Prefer `inside` position for better accuracy with merged cells (rowspan/colspan),\n // but fall back to `pos` if `inside` doesn't resolve to a valid cell\n let { inside, pos } = mousePos;\n return (\n (inside >= 0 && cellAround(view.state.doc.resolve(inside))) ||\n cellAround(view.state.doc.resolve(pos))\n );\n}\n","import type { Node } from 'prosemirror-model';\nimport type { NodeView, ViewMutationRecord } from 'prosemirror-view';\n\nimport type { CellAttrs } from './util';\n\n/**\n * @public\n */\nexport class TableView implements NodeView {\n public dom: HTMLDivElement;\n public table: HTMLTableElement;\n public colgroup: HTMLTableColElement;\n public contentDOM: HTMLTableSectionElement;\n\n constructor(\n public node: Node,\n public defaultCellMinWidth: number,\n ) {\n this.dom = document.createElement('div');\n this.dom.className = 'tableWrapper';\n this.table = this.dom.appendChild(document.createElement('table'));\n this.table.style.setProperty(\n '--default-cell-min-width',\n `${defaultCellMinWidth}px`,\n );\n this.colgroup = this.table.appendChild(document.createElement('colgroup'));\n updateColumnsOnResize(node, this.colgroup, this.table, defaultCellMinWidth);\n this.contentDOM = this.table.appendChild(document.createElement('tbody'));\n }\n\n update(node: Node): boolean {\n if (node.type != this.node.type) return false;\n this.node = node;\n updateColumnsOnResize(\n node,\n this.colgroup,\n this.table,\n this.defaultCellMinWidth,\n );\n return true;\n }\n\n ignoreMutation(record: ViewMutationRecord): boolean {\n return (\n record.type == 'attributes' &&\n (record.target == this.table || this.colgroup.contains(record.target))\n );\n }\n}\n\n/**\n * @public\n */\nexport function updateColumnsOnResize(\n node: Node,\n colgroup: HTMLTableColElement,\n table: HTMLTableElement,\n defaultCellMinWidth: number,\n overrideCol?: number,\n overrideValue?: number,\n): void {\n let totalWidth = 0;\n let fixedWidth = true;\n let nextDOM = colgroup.firstChild as HTMLElement;\n const row = node.firstChild;\n if (!row) return;\n\n for (let i = 0, col = 0; i < row.childCount; i++) {\n const { colspan, colwidth } = row.child(i).attrs as CellAttrs;\n for (let j = 0; j < colspan; j++, col++) {\n const hasWidth =\n overrideCol == col ? overrideValue : colwidth && colwidth[j];\n const cssWidth = hasWidth ? hasWidth + 'px' : '';\n totalWidth += hasWidth || defaultCellMinWidth;\n if (!hasWidth) fixedWidth = false;\n if (!nextDOM) {\n const col = document.createElement('col');\n col.style.width = cssWidth;\n colgroup.appendChild(col);\n } else {\n if (nextDOM.style.width != cssWidth) {\n nextDOM.style.width = cssWidth;\n }\n nextDOM = nextDOM.nextSibling as HTMLElement;\n }\n }\n }\n\n while (nextDOM) {\n const after = nextDOM.nextSibling;\n nextDOM.parentNode?.removeChild(nextDOM);\n nextDOM = after as HTMLElement;\n }\n\n if (fixedWidth) {\n table.style.width = totalWidth + 'px';\n table.style.minWidth = '';\n } else {\n table.style.width = '';\n table.style.minWidth = totalWidth + 'px';\n }\n}\n","import type { Attrs, Node as ProsemirrorNode } from 'prosemirror-model';\nimport type { EditorState, Transaction } from 'prosemirror-state';\nimport { Plugin, PluginKey } from 'prosemirror-state';\nimport type { EditorView, NodeView } from 'prosemirror-view';\nimport { Decoration, DecorationSet } from 'prosemirror-view';\n\nimport { tableNodeTypes } from './schema';\nimport { TableMap } from './tablemap';\nimport { TableView, updateColumnsOnResize } from './tableview';\nimport type { CellAttrs } from './util';\nimport { cellAround, pointsAtCell } from './util';\n\n/**\n * @public\n */\nexport const columnResizingPluginKey = new PluginKey<ResizeState>(\n 'tableColumnResizing',\n);\n\n/**\n * @public\n */\nexport type ColumnResizingOptions = {\n handleWidth?: number;\n /**\n * Minimum width of a cell /column. The column cannot be resized smaller than this.\n */\n cellMinWidth?: number;\n /**\n * The default minWidth of a cell / column when it doesn't have an explicit width (i.e.: it has not been resized manually)\n */\n defaultCellMinWidth?: number;\n lastColumnResizable?: boolean;\n /**\n * A custom node view for the rendering table nodes. By default, the plugin\n * uses the {@link TableView} class. You can explicitly set this to `null` to\n * not use a custom node view.\n */\n View?:\n | (new (\n node: ProsemirrorNode,\n cellMinWidth: number,\n view: EditorView,\n ) => NodeView)\n | null;\n};\n\n/**\n * @public\n */\nexport type Dragging = { startX: number; startWidth: number };\n\n/**\n * @public\n */\nexport function columnResizing({\n handleWidth = 5,\n cellMinWidth = 25,\n defaultCellMinWidth = 100,\n View = TableView,\n lastColumnResizable = true,\n}: ColumnResizingOptions = {}): Plugin {\n const plugin = new Plugin<ResizeState>({\n key: columnResizingPluginKey,\n state: {\n init(_, state) {\n const nodeViews = plugin.spec?.props?.nodeViews;\n const tableName = tableNodeTypes(state.schema).table.name;\n if (View && nodeViews) {\n nodeViews[tableName] = (node, view) => {\n return new View(node, defaultCellMinWidth, view);\n };\n }\n return new ResizeState(-1, false);\n },\n apply(tr, prev) {\n return prev.apply(tr);\n },\n },\n props: {\n attributes: (state): Record<string, string> => {\n const pluginState = columnResizingPluginKey.getState(state);\n return pluginState && pluginState.activeHandle > -1\n ? { class: 'resize-cursor' }\n : {};\n },\n\n handleDOMEvents: {\n mousemove: (view, event) => {\n handleMouseMove(view, event, handleWidth, lastColumnResizable);\n },\n mouseleave: (view) => {\n handleMouseLeave(view);\n },\n mousedown: (view, event) => {\n handleMouseDown(view, event, cellMinWidth, defaultCellMinWidth);\n },\n },\n\n decorations: (state) => {\n const pluginState = columnResizingPluginKey.getState(state);\n if (pluginState && pluginState.activeHandle > -1) {\n return handleDecorations(state, pluginState.activeHandle);\n }\n },\n\n nodeViews: {},\n },\n });\n return plugin;\n}\n\n/**\n * @public\n */\nexport class ResizeState {\n constructor(\n public activeHandle: number,\n public dragging: Dragging | false,\n ) {}\n\n apply(tr: Transaction): ResizeState {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const state = this;\n const action = tr.getMeta(columnResizingPluginKey);\n if (action && action.setHandle != null)\n return new ResizeState(action.setHandle, false);\n if (action && action.setDragging !== undefined)\n return new ResizeState(state.activeHandle, action.setDragging);\n if (state.activeHandle > -1 && tr.docChanged) {\n let handle = tr.mapping.map(state.activeHandle, -1);\n if (!pointsAtCell(tr.doc.resolve(handle))) {\n handle = -1;\n }\n return new ResizeState(handle, state.dragging);\n }\n return state;\n }\n}\n\nfunction handleMouseMove(\n view: EditorView,\n event: MouseEvent,\n handleWidth: number,\n lastColumnResizable: boolean,\n): void {\n if (!view.editable) return;\n\n const pluginState = columnResizingPluginKey.getState(view.state);\n if (!pluginState) return;\n\n if (!pluginState.dragging) {\n const target = domCellAround(event.target as HTMLElement);\n let cell = -1;\n if (target) {\n const { left, right } = target.getBoundingClientRect();\n if (event.clientX - left <= handleWidth)\n cell = edgeCell(view, event, 'left', handleWidth);\n else if (right - event.clientX <= handleWidth)\n cell = edgeCell(view, event, 'right', handleWidth);\n }\n\n if (cell != pluginState.activeHandle) {\n if (!lastColumnResizable && cell !== -1) {\n const $cell = view.state.doc.resolve(cell);\n const table = $cell.node(-1);\n const map = TableMap.get(table);\n const tableStart = $cell.start(-1);\n const col =\n map.colCount($cell.pos - tableStart) +\n $cell.nodeAfter!.attrs.colspan -\n 1;\n\n if (col == map.width - 1) {\n return;\n }\n }\n\n updateHandle(view, cell);\n }\n }\n}\n\nfunction handleMouseLeave(view: EditorView): void {\n if (!view.editable) return;\n\n const pluginState = columnResizingPluginKey.getState(view.state);\n if (pluginState && pluginState.activeHandle > -1 && !pluginState.dragging)\n updateHandle(view, -1);\n}\n\nfunction handleMouseDown(\n view: EditorView,\n event: MouseEvent,\n cellMinWidth: number,\n defaultCellMinWidth: number,\n): boolean {\n if (!view.editable) return false;\n\n const win = view.dom.ownerDocument.defaultView ?? window;\n\n const pluginState = columnResizingPluginKey.getState(view.state);\n if (!pluginState || pluginState.activeHandle == -1 || pluginState.dragging)\n return false;\n\n const cell = view.state.doc.nodeAt(pluginState.activeHandle)!;\n const width = currentColWidth(view, pluginState.activeHandle, cell.attrs);\n view.dispatch(\n view.state.tr.setMeta(columnResizingPluginKey, {\n setDragging: { startX: event.clientX, startWidth: width },\n }),\n );\n\n function finish(event: MouseEvent) {\n win.removeEventListener('mouseup', finish);\n win.removeEventListener('mousemove', move);\n const pluginState = columnResizingPluginKey.getState(view.state);\n if (pluginState?.dragging) {\n updateColumnWidth(\n view,\n pluginState.activeHandle,\n draggedWidth(pluginState.dragging, event, cellMinWidth),\n );\n view.dispatch(\n view.state.tr.setMeta(columnResizingPluginKey, { setDragging: null }),\n );\n }\n }\n\n function move(event: MouseEvent): void {\n if (!event.which) return finish(event);\n const pluginState = columnResizingPluginKey.getState(view.state);\n if (!pluginState) return;\n if (pluginState.dragging) {\n const dragged = draggedWidth(pluginState.dragging, event, cellMinWidth);\n displayColumnWidth(\n view,\n pluginState.activeHandle,\n dragged,\n defaultCellMinWidth,\n );\n }\n }\n\n displayColumnWidth(\n view,\n pluginState.activeHandle,\n width,\n defaultCellMinWidth,\n );\n\n win.addEventListener('mouseup', finish);\n win.addEventListener('mousemove', move);\n event.preventDefault();\n return true;\n}\n\nfunction currentColWidth(\n view: EditorView,\n cellPos: number,\n { colspan, colwidth }: Attrs,\n): number {\n const width = colwidth && colwidth[colwidth.length - 1];\n if (width) return width;\n const dom = view.domAtPos(cellPos);\n const node = dom.node.childNodes[dom.offset] as HTMLElement;\n let domWidth = node.offsetWidth,\n parts = colspan;\n if (colwidth)\n for (let i = 0; i < colspan; i++)\n if (colwidth[i]) {\n domWidth -= colwidth[i];\n parts--;\n }\n return domWidth / parts;\n}\n\nfunction domCellAround(target: HTMLElement | null): HTMLElement | null {\n while (target && target.nodeName != 'TD' && target.nodeName != 'TH')\n target =\n target.classList && target.classList.contains('ProseMirror')\n ? null\n : (target.parentNode as HTMLElement);\n return target;\n}\n\nfunction edgeCell(\n view: EditorView,\n event: MouseEvent,\n side: 'left' | 'right',\n handleWidth: number,\n): number {\n // posAtCoords returns inconsistent positions when cursor is moving\n // across a collapsed table border. Use an offset to adjust the\n // target viewport coordinates away from the table border.\n const offset = side == 'right' ? -handleWidth : handleWidth;\n const found = view.posAtCoords({\n left: event.clientX + offset,\n top: event.clientY,\n });\n if (!found) return -1;\n const { pos } = found;\n const $cell = cellAround(view.state.doc.resolve(pos));\n if (!$cell) return -1;\n if (side == 'right') return $cell.pos;\n const map = TableMap.get($cell.node(-1)),\n start = $cell.start(-1);\n const index = map.map.indexOf($cell.pos - start);\n return index % map.width == 0 ? -1 : start + map.map[index - 1];\n}\n\nfunction draggedWidth(\n dragging: Dragging,\n event: MouseEvent,\n resizeMinWidth: number,\n): number {\n const offset = event.clientX - dragging.startX;\n return Math.max(resizeMinWidth, dragging.startWidth + offset);\n}\n\nfunction updateHandle(view: EditorView, value: number): void {\n view.dispatch(\n view.state.tr.setMeta(columnResizingPluginKey, { setHandle: value }),\n );\n}\n\nfunction updateColumnWidth(\n view: EditorView,\n cell: number,\n width: number,\n): void {\n const $cell = view.state.doc.resolve(cell);\n const table = $cell.node(-1),\n map = TableMap.get(table),\n start = $cell.start(-1);\n const col =\n map.colCount($cell.pos - start) + $cell.nodeAfter!.attrs.colspan - 1;\n const tr = view.state.tr;\n for (let row = 0; row < map.height; row++) {\n const mapIndex = row * map.width + col;\n // Rowspanning cell that has already been handled\n if (row && map.map[mapIndex] == map.map[mapIndex - map.width]) continue;\n const pos = map.map[mapIndex];\n const attrs = table.nodeAt(pos)!.attrs as CellAttrs;\n const index = attrs.colspan == 1 ? 0 : col - map.colCount(pos);\n if (attrs.colwidth && attrs.colwidth[index] == width) continue;\n const colwidth = attrs.colwidth\n ? attrs.colwidth.slice()\n : zeroes(attrs.colspan);\n colwidth[index] = width;\n tr.setNodeMarkup(start + pos, null, { ...attrs, colwidth: colwidth });\n }\n if (tr.docChanged) view.dispatch(tr);\n}\n\nfunction displayColumnWidth(\n view: EditorView,\n cell: number,\n width: number,\n defaultCellMinWidth: number,\n): void {\n const $cell = view.state.doc.resolve(cell);\n const table = $cell.node(-1),\n start = $cell.start(-1);\n const col =\n TableMap.get(table).colCount($cell.pos - start) +\n $cell.nodeAfter!.attrs.colspan -\n 1;\n let dom: Node | null = view.domAtPos($cell.start(-1)).node;\n while (dom && dom.nodeName != 'TABLE') {\n dom = dom.parentNode;\n }\n if (!dom) return;\n updateColumnsOnResize(\n table,\n dom.firstChild as HTMLTableColElement,\n dom as HTMLTableElement,\n defaultCellMinWidth,\n col,\n width,\n );\n}\n\nfunction zeroes(n: number): 0[] {\n return Array(n).fill(0);\n}\n\nexport function handleDecorations(\n state: EditorState,\n cell: number,\n): DecorationSet {\n const decorations = [];\n const $cell = state.doc.resolve(cell);\n const table = $cell.node(-1);\n if (!table) {\n return DecorationSet.empty;\n }\n const map = TableMap.get(table);\n const start = $cell.start(-1);\n const col =\n map.colCount($cell.pos - start) + $cell.nodeAfter!.attrs.colspan - 1;\n for (let row = 0; row < map.height; row++) {\n const index = col + row * map.width;\n // For positions that have either a different cell or the end\n // of the table to their right, and either the top of the table or\n // a different cell above them, add a decoration\n if (\n (col == map.width - 1 || map.map[index] != map.map[index + 1]) &&\n (row == 0 || map.map[index] != map.map[index - map.width])\n ) {\n const cellPos = map.map[index];\n const pos = start + cellPos + table.nodeAt(cellPos)!.nodeSize - 1;\n const dom = document.createElement('div');\n dom.className = 'column-resize-handle';\n if (columnResizingPluginKey.getState(state)?.dragging) {\n decorations.push(\n Decoration.node(\n start + cellPos,\n start + cellPos + table.nodeAt(cellPos)!.nodeSize,\n {\n class: 'column-resize-dragging',\n },\n ),\n );\n }\n\n decorations.push(Decoration.widget(pos, dom));\n }\n }\n return DecorationSet.create(state.doc, decorations);\n}\n","// This file defines a plugin that handles the drawing of cell\n// selections and the basic user interactions for creating and working\n// with such selections. It also makes sure that, after each\n// transaction, the shapes of tables are normalized to be rectangular\n// and not contain overlapping cells.\n\nimport { Plugin } from 'prosemirror-state';\n\nimport { drawCellSelection, normalizeSelection } from './cellselection';\nimport { fixTables, fixTablesKey } from './fixtables';\nimport {\n handleKeyDown,\n handleMouseDown,\n handlePaste,\n handleTripleClick,\n} from './input';\nimport { tableEditingKey } from './util';\n\nexport { CellBookmark, CellSelection } from './cellselection';\nexport type { CellSelectionJSON } from './cellselection';\nexport {\n columnResizing,\n columnResizingPluginKey,\n ResizeState,\n} from './columnresizing';\nexport type { ColumnResizingOptions, Dragging } from './columnresizing';\nexport * from './commands';\nexport {\n clipCells as __clipCells,\n insertCells as __insertCells,\n pastedCells as __pastedCells,\n} from './copypaste';\nexport type { Area as __Area } from './copypaste';\nexport type { Direction } from './input';\nexport { tableNodes, tableNodeTypes } from './schema';\nexport type {\n CellAttributes,\n getFromDOM,\n setDOMAttr,\n TableNodes,\n TableNodesOptions,\n TableRole,\n} from './schema';\nexport { TableMap } from './tablemap';\nexport type { ColWidths, Problem, Rect } from './tablemap';\nexport { TableView, updateColumnsOnResize } from './tableview';\nexport {\n addColSpan,\n cellAround,\n cellNear,\n colCount,\n columnIsHeader,\n findCell,\n inSameTable,\n isInTable,\n moveCellForward,\n nextCell,\n pointsAtCell,\n removeColSpan,\n selectionCell,\n} from './util';\nexport type { MutableAttrs } from './util';\nexport { findCellPos, findCellRange, findTable } from './utils/query';\nexport type { FindNodeResult } from './utils/query';\nexport { fixTables, fixTablesKey, handlePaste, tableEditingKey };\n\n/**\n * @public\n */\nexport type TableEditingOptions = {\n /**\n * Whether to allow table node selection.\n *\n * By default, any node selection wrapping a table will be converted into a\n * CellSelection wrapping all cells in the table. You can pass `true` to allow\n * the selection to remain a NodeSelection.\n *\n * @default false\n */\n allowTableNodeSelection?: boolean;\n};\n\n/**\n * Creates a [plugin](http://prosemirror.net/docs/ref/#state.Plugin)\n * that, when added to an editor, enables cell-selection, handles\n * cell-based copy/paste, and makes sure tables stay well-formed (each\n * row has the same width, and cells don't overlap).\n *\n * You should probably put this plugin near the end of your array of\n * plugins, since it handles mouse and arrow key events in tables\n * rather broadly, and other plugins, like the gap cursor or the\n * column-width dragging plugin, might want to get a turn first to\n * perform more specific behavior.\n *\n * @public\n */\nexport function tableEditing({\n allowTableNodeSelection = false,\n}: TableEditingOptions = {}): Plugin {\n return new Plugin({\n key: tableEditingKey,\n\n // This piece of state is used to remember when a mouse-drag\n // cell-selection is happening, so that it can continue even as\n // transactions (which might move its anchor cell) come in.\n state: {\n init() {\n return null;\n },\n apply(tr, cur) {\n const set = tr.getMeta(tableEditingKey);\n if (set != null) return set == -1 ? null : set;\n if (cur == null || !tr.docChanged) return cur;\n const { deleted, pos } = tr.mapping.mapResult(cur);\n return deleted ? null : pos;\n },\n },\n\n props: {\n decorations: drawCellSelection,\n\n handleDOMEvents: {\n mousedown: handleMouseDown,\n },\n\n createSelectionBetween(view) {\n return tableEditingKey.getState(view.state) != null\n ? view.state.selection\n : null;\n },\n\n handleTripleClick,\n\n handleKeyDown,\n\n handlePaste,\n },\n\n appendTransaction(_, oldState, state) {\n return normalizeSelection(\n state,\n fixTables(state, oldState),\n allowTableNodeSelection,\n );\n },\n });\n}\n"],"mappings":";;;;;;;AAgDA,IAAIA;AACJ,IAAIC;AAIJ,IAAI,OAAO,WAAW,aAAa;CACjC,IAAI,wBAAQ,IAAI,SAAyB;AACzC,kBAAiB,QAAQ,MAAM,IAAI,IAAI;AACvC,eAAc,KAAK,UAAU;AAC3B,QAAM,IAAI,KAAK,MAAM;AACrB,SAAO;;OAEJ;CACL,MAAMC,QAA6B,EAAE;CACrC,MAAM,YAAY;CAClB,IAAI,WAAW;AACf,kBAAiB,QAAQ;AACvB,OAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,EACrC,KAAI,MAAM,MAAM,IAAK,QAAO,MAAM,IAAI;;AAE1C,eAAc,KAAK,UAAU;AAC3B,MAAI,YAAY,UAAW,YAAW;AACtC,QAAM,cAAc;AACpB,SAAQ,MAAM,cAAc;;;;;;;;;;;AAsBhC,IAAa,WAAb,MAAsB;CACpB,YAIE,AA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EAED,OAAO;GACL,aAAa;GAEb,iBAAiB,EACf,WAAWC,mBACZ;GAED,uBAAuB,MAAM;AAC3B,WAAO,gBAAgB,SAAS,KAAK,MAAM,IAAI,OAC3C,KAAK,MAAM,YACX;;GAGN;GAEA;GAEA;GACD;EAED,kBAAkB,GAAG,UAAU,OAAO;AACpC,UAAO,mBACL,OACA,UAAU,OAAO,SAAS,EAC1B,wBACD;;EAEJ,CAAC"}
@@ -1,80 +0,0 @@
1
- {
2
- "name": "prosemirror-tables",
3
- "type": "module",
4
- "version": "1.8.5",
5
- "description": "ProseMirror's rowspan/colspan tables component",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/ProseMirror/prosemirror-tables.git"
10
- },
11
- "main": "dist/index.cjs",
12
- "module": "dist/index.js",
13
- "types": "dist/index.d.ts",
14
- "style": "style/tables.css",
15
- "exports": {
16
- ".": {
17
- "import": "./dist/index.js",
18
- "require": "./dist/index.cjs"
19
- },
20
- "./style/tables.css": "./style/tables.css"
21
- },
22
- "files": [
23
- "style",
24
- "dist"
25
- ],
26
- "dependencies": {
27
- "prosemirror-keymap": "^1.2.3",
28
- "prosemirror-model": "^1.25.4",
29
- "prosemirror-state": "^1.4.4",
30
- "prosemirror-transform": "^1.10.5",
31
- "prosemirror-view": "^1.41.4"
32
- },
33
- "devDependencies": {
34
- "@ocavue/eslint-config": "^3.8.0",
35
- "@ocavue/tsconfig": "^0.6.2",
36
- "@vitest/coverage-v8": "^4.0.16",
37
- "builddocs": "^1.0.8",
38
- "eslint": "^9.39.2",
39
- "happy-dom": "^20.0.11",
40
- "ist": "^1.1.7",
41
- "pkg-pr-new": "^0.0.62",
42
- "prettier": "^3.7.4",
43
- "prosemirror-commands": "^1.7.1",
44
- "prosemirror-example-setup": "^1.2.3",
45
- "prosemirror-gapcursor": "^1.4.0",
46
- "prosemirror-menu": "^1.2.5",
47
- "prosemirror-schema-basic": "^1.2.4",
48
- "prosemirror-test-builder": "^1.1.1",
49
- "tsdown": "^0.18.2",
50
- "typescript": "^5.9.3",
51
- "vite": "^7.3.0",
52
- "vitest": "^4.0.16"
53
- },
54
- "maintainers": [
55
- {
56
- "name": "Eduard Shvedai",
57
- "email": "eshvedai@atlassian.com"
58
- },
59
- {
60
- "name": "Huanhuan Huang",
61
- "email": "hhuang@atlassian.com"
62
- },
63
- {
64
- "name": "Ocavue",
65
- "email": "ocavue@gmail.com"
66
- }
67
- ],
68
- "scripts": {
69
- "dev": "vite demo",
70
- "build_demo": "vite build demo",
71
- "typecheck": "tsc --noEmit",
72
- "test": "vitest",
73
- "build": "tsdown",
74
- "watch": "tsdown --watch",
75
- "build_readme": "builddocs --name tables --format markdown --main src/README.md src/index.ts > README.md",
76
- "format": "prettier --write .",
77
- "lint": "eslint . && prettier --check . && pnpm run typecheck",
78
- "fix": "eslint --fix . && prettier --write ."
79
- }
80
- }
@@ -1,48 +0,0 @@
1
- .ProseMirror .tableWrapper {
2
- overflow-x: auto;
3
- }
4
- .ProseMirror table {
5
- border-collapse: collapse;
6
- table-layout: fixed;
7
- width: 100%;
8
- overflow: hidden;
9
- }
10
- .ProseMirror td,
11
- .ProseMirror th {
12
- vertical-align: top;
13
- box-sizing: border-box;
14
- position: relative;
15
- }
16
-
17
- .ProseMirror td:not([data-colwidth]):not(.column-resize-dragging),
18
- .ProseMirror th:not([data-colwidth]):not(.column-resize-dragging) {
19
- /* if there's no explicit width set and the column is not being resized, set a default width */
20
- min-width: var(--default-cell-min-width);
21
- }
22
-
23
- .ProseMirror .column-resize-handle {
24
- position: absolute;
25
- right: -2px;
26
- top: 0;
27
- bottom: 0;
28
- width: 4px;
29
- z-index: 20;
30
- background-color: #adf;
31
- pointer-events: none;
32
- }
33
- .ProseMirror.resize-cursor {
34
- cursor: ew-resize;
35
- cursor: col-resize;
36
- }
37
- /* Give selected cells a blue overlay */
38
- .ProseMirror .selectedCell:after {
39
- z-index: 2;
40
- position: absolute;
41
- content: '';
42
- left: 0;
43
- right: 0;
44
- top: 0;
45
- bottom: 0;
46
- background: rgba(200, 200, 255, 0.4);
47
- pointer-events: none;
48
- }
@@ -1,8 +0,0 @@
1
- {
2
- "libs": ["browser"],
3
- "plugins": {
4
- "node": {},
5
- "complete_strings": {},
6
- "es_modules": {}
7
- }
8
- }