@atlaskit/editor-plugin-table 2.6.3 → 2.6.5

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 (347) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/plugins/table/commands/clear.js +3 -3
  3. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +5 -5
  4. package/dist/cjs/plugins/table/commands/insert.js +19 -19
  5. package/dist/cjs/plugins/table/commands/misc.js +4 -4
  6. package/dist/cjs/plugins/table/commands/selection.js +5 -5
  7. package/dist/cjs/plugins/table/commands/sort.js +2 -2
  8. package/dist/cjs/plugins/table/event-handlers.js +4 -4
  9. package/dist/cjs/plugins/table/handlers.js +5 -5
  10. package/dist/cjs/plugins/table/nodeviews/table.js +2 -2
  11. package/dist/cjs/plugins/table/nodeviews/tableCell.js +2 -2
  12. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +5 -5
  13. package/dist/cjs/plugins/table/pm-plugins/keymap.js +10 -10
  14. package/dist/cjs/plugins/table/pm-plugins/main.js +12 -12
  15. package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +2 -2
  16. package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +7 -7
  17. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-key.js +2 -2
  18. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +2 -2
  19. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-key.js +2 -2
  20. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
  21. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +2 -2
  22. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +7 -1
  23. package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +2 -2
  24. package/dist/cjs/plugins/table/pm-plugins/table-width.js +4 -4
  25. package/dist/cjs/plugins/table/toolbar.js +12 -12
  26. package/dist/cjs/plugins/table/transforms/delete-columns.js +4 -4
  27. package/dist/cjs/plugins/table/transforms/delete-rows.js +2 -2
  28. package/dist/cjs/plugins/table/transforms/merge.js +5 -5
  29. package/dist/cjs/plugins/table/transforms/replace-table.js +4 -4
  30. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  31. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +4 -4
  32. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +6 -6
  33. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +2 -2
  34. package/dist/cjs/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +3 -3
  35. package/dist/cjs/plugins/table/utils/collapse.js +4 -4
  36. package/dist/cjs/plugins/table/utils/column-controls.js +8 -8
  37. package/dist/cjs/plugins/table/utils/decoration.js +8 -8
  38. package/dist/cjs/plugins/table/utils/nodes.js +6 -6
  39. package/dist/cjs/plugins/table/utils/paste.js +7 -7
  40. package/dist/cjs/plugins/table/utils/row-controls.js +7 -7
  41. package/dist/cjs/version.json +1 -1
  42. package/dist/es2019/plugins/table/commands/clear.js +2 -1
  43. package/dist/es2019/plugins/table/commands/go-to-next-cell.js +2 -1
  44. package/dist/es2019/plugins/table/commands/insert.js +2 -2
  45. package/dist/es2019/plugins/table/commands/misc.js +1 -1
  46. package/dist/es2019/plugins/table/commands/selection.js +1 -1
  47. package/dist/es2019/plugins/table/commands/sort.js +1 -1
  48. package/dist/es2019/plugins/table/event-handlers.js +1 -1
  49. package/dist/es2019/plugins/table/handlers.js +3 -3
  50. package/dist/es2019/plugins/table/nodeviews/table.js +1 -1
  51. package/dist/es2019/plugins/table/nodeviews/tableCell.js +1 -1
  52. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +3 -3
  53. package/dist/es2019/plugins/table/pm-plugins/keymap.js +2 -2
  54. package/dist/es2019/plugins/table/pm-plugins/main.js +1 -1
  55. package/dist/es2019/plugins/table/pm-plugins/plugin-key.js +1 -1
  56. package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +2 -2
  57. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin-key.js +1 -1
  58. package/dist/es2019/plugins/table/pm-plugins/table-local-id.js +1 -2
  59. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin-factory.js +0 -1
  60. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin-key.js +1 -1
  61. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  62. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  63. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +7 -1
  64. package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  65. package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -2
  66. package/dist/es2019/plugins/table/toolbar.js +1 -1
  67. package/dist/es2019/plugins/table/transforms/delete-columns.js +1 -1
  68. package/dist/es2019/plugins/table/transforms/delete-rows.js +1 -1
  69. package/dist/es2019/plugins/table/transforms/merge.js +2 -2
  70. package/dist/es2019/plugins/table/transforms/replace-table.js +2 -2
  71. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -1
  72. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +1 -1
  73. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  74. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +1 -1
  75. package/dist/es2019/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +1 -1
  76. package/dist/es2019/plugins/table/utils/collapse.js +2 -2
  77. package/dist/es2019/plugins/table/utils/column-controls.js +1 -1
  78. package/dist/es2019/plugins/table/utils/decoration.js +3 -2
  79. package/dist/es2019/plugins/table/utils/nodes.js +1 -1
  80. package/dist/es2019/plugins/table/utils/paste.js +2 -2
  81. package/dist/es2019/plugins/table/utils/row-controls.js +1 -1
  82. package/dist/es2019/version.json +1 -1
  83. package/dist/esm/plugins/table/commands/clear.js +2 -1
  84. package/dist/esm/plugins/table/commands/go-to-next-cell.js +2 -1
  85. package/dist/esm/plugins/table/commands/insert.js +2 -2
  86. package/dist/esm/plugins/table/commands/misc.js +1 -1
  87. package/dist/esm/plugins/table/commands/selection.js +1 -1
  88. package/dist/esm/plugins/table/commands/sort.js +1 -1
  89. package/dist/esm/plugins/table/event-handlers.js +1 -1
  90. package/dist/esm/plugins/table/handlers.js +3 -3
  91. package/dist/esm/plugins/table/nodeviews/table.js +1 -1
  92. package/dist/esm/plugins/table/nodeviews/tableCell.js +1 -1
  93. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +3 -3
  94. package/dist/esm/plugins/table/pm-plugins/keymap.js +2 -2
  95. package/dist/esm/plugins/table/pm-plugins/main.js +1 -1
  96. package/dist/esm/plugins/table/pm-plugins/plugin-key.js +1 -1
  97. package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +2 -2
  98. package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin-key.js +1 -1
  99. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +1 -2
  100. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin-factory.js +0 -1
  101. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin-key.js +1 -1
  102. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +1 -1
  103. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  104. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +7 -1
  105. package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +1 -1
  106. package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -2
  107. package/dist/esm/plugins/table/toolbar.js +1 -1
  108. package/dist/esm/plugins/table/transforms/delete-columns.js +1 -1
  109. package/dist/esm/plugins/table/transforms/delete-rows.js +1 -1
  110. package/dist/esm/plugins/table/transforms/merge.js +2 -2
  111. package/dist/esm/plugins/table/transforms/replace-table.js +2 -2
  112. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -1
  113. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +1 -1
  114. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  115. package/dist/esm/plugins/table/ui/LayoutButton/index.js +1 -1
  116. package/dist/esm/plugins/table/ui/TableFloatingControls/NumberColumn/index.js +1 -1
  117. package/dist/esm/plugins/table/utils/collapse.js +2 -2
  118. package/dist/esm/plugins/table/utils/column-controls.js +1 -1
  119. package/dist/esm/plugins/table/utils/decoration.js +3 -2
  120. package/dist/esm/plugins/table/utils/nodes.js +1 -1
  121. package/dist/esm/plugins/table/utils/paste.js +2 -2
  122. package/dist/esm/plugins/table/utils/row-controls.js +1 -1
  123. package/dist/esm/version.json +1 -1
  124. package/dist/types/plugins/table/commands/insert.d.ts +2 -2
  125. package/dist/types/plugins/table/commands/misc.d.ts +4 -4
  126. package/dist/types/plugins/table/commands/referentiality.d.ts +1 -1
  127. package/dist/types/plugins/table/event-handlers.d.ts +2 -2
  128. package/dist/types/plugins/table/handlers.d.ts +1 -1
  129. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +2 -2
  130. package/dist/types/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  131. package/dist/types/plugins/table/nodeviews/TableResizer.d.ts +3 -3
  132. package/dist/types/plugins/table/nodeviews/table.d.ts +2 -2
  133. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +2 -2
  134. package/dist/types/plugins/table/nodeviews/types.d.ts +2 -2
  135. package/dist/types/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  136. package/dist/types/plugins/table/pm-plugins/decorations/utils/types.d.ts +2 -2
  137. package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +1 -1
  138. package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +2 -2
  139. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -2
  140. package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +1 -1
  141. package/dist/types/plugins/table/pm-plugins/table-resizing/commands.d.ts +3 -3
  142. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  143. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +1 -1
  144. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -1
  145. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
  146. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -2
  147. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
  148. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -2
  149. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  150. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  151. package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
  152. package/dist/types/plugins/table/toolbar.d.ts +2 -2
  153. package/dist/types/plugins/table/transforms/column-width.d.ts +4 -4
  154. package/dist/types/plugins/table/transforms/delete-columns.d.ts +1 -1
  155. package/dist/types/plugins/table/transforms/delete-rows.d.ts +1 -1
  156. package/dist/types/plugins/table/transforms/fix-tables.d.ts +3 -3
  157. package/dist/types/plugins/table/transforms/merge.d.ts +2 -2
  158. package/dist/types/plugins/table/transforms/replace-table.d.ts +2 -2
  159. package/dist/types/plugins/table/transforms/split.d.ts +1 -1
  160. package/dist/types/plugins/table/types.d.ts +3 -3
  161. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  162. package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +1 -1
  163. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  164. package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -2
  165. package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +2 -2
  166. package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  167. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  168. package/dist/types/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +1 -1
  169. package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +1 -1
  170. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +2 -2
  171. package/dist/types/plugins/table/utils/analytics.d.ts +1 -1
  172. package/dist/types/plugins/table/utils/collapse.d.ts +2 -2
  173. package/dist/types/plugins/table/utils/column-controls.d.ts +2 -2
  174. package/dist/types/plugins/table/utils/decoration.d.ts +3 -3
  175. package/dist/types/plugins/table/utils/get-allow-add-column-custom-step.d.ts +1 -1
  176. package/dist/types/plugins/table/utils/nodes.d.ts +2 -2
  177. package/dist/types/plugins/table/utils/paste.d.ts +2 -2
  178. package/dist/types/plugins/table/utils/row-controls.d.ts +2 -2
  179. package/dist/types/plugins/table/utils/selection.d.ts +1 -1
  180. package/dist/types/plugins/table/utils/table.d.ts +1 -1
  181. package/dist/types/plugins/table/utils/update-plugin-state-decorations.d.ts +2 -2
  182. package/dist/types-ts4.5/plugins/table/commands/insert.d.ts +2 -2
  183. package/dist/types-ts4.5/plugins/table/commands/misc.d.ts +4 -4
  184. package/dist/types-ts4.5/plugins/table/commands/referentiality.d.ts +1 -1
  185. package/dist/types-ts4.5/plugins/table/event-handlers.d.ts +2 -2
  186. package/dist/types-ts4.5/plugins/table/handlers.d.ts +1 -1
  187. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +2 -2
  188. package/dist/types-ts4.5/plugins/table/nodeviews/TableContainer.d.ts +2 -2
  189. package/dist/types-ts4.5/plugins/table/nodeviews/TableResizer.d.ts +3 -3
  190. package/dist/types-ts4.5/plugins/table/nodeviews/table.d.ts +2 -2
  191. package/dist/types-ts4.5/plugins/table/nodeviews/tableCell.d.ts +2 -2
  192. package/dist/types-ts4.5/plugins/table/nodeviews/types.d.ts +2 -2
  193. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/plugin.d.ts +2 -2
  194. package/dist/types-ts4.5/plugins/table/pm-plugins/decorations/utils/types.d.ts +2 -2
  195. package/dist/types-ts4.5/plugins/table/pm-plugins/plugin-key.d.ts +1 -1
  196. package/dist/types-ts4.5/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +2 -2
  197. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -2
  198. package/dist/types-ts4.5/plugins/table/pm-plugins/sticky-headers/plugin-key.d.ts +1 -1
  199. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/commands.d.ts +3 -3
  200. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
  201. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/plugin-key.d.ts +1 -1
  202. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -1
  203. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
  204. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -2
  205. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
  206. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -2
  207. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +3 -3
  208. package/dist/types-ts4.5/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -1
  209. package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
  210. package/dist/types-ts4.5/plugins/table/toolbar.d.ts +2 -2
  211. package/dist/types-ts4.5/plugins/table/transforms/column-width.d.ts +4 -4
  212. package/dist/types-ts4.5/plugins/table/transforms/delete-columns.d.ts +1 -1
  213. package/dist/types-ts4.5/plugins/table/transforms/delete-rows.d.ts +1 -1
  214. package/dist/types-ts4.5/plugins/table/transforms/fix-tables.d.ts +3 -3
  215. package/dist/types-ts4.5/plugins/table/transforms/merge.d.ts +2 -2
  216. package/dist/types-ts4.5/plugins/table/transforms/replace-table.d.ts +2 -2
  217. package/dist/types-ts4.5/plugins/table/transforms/split.d.ts +1 -1
  218. package/dist/types-ts4.5/plugins/table/types.d.ts +3 -3
  219. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualButton/index.d.ts +2 -2
  220. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +1 -1
  221. package/dist/types-ts4.5/plugins/table/ui/FloatingContextualMenu/index.d.ts +1 -1
  222. package/dist/types-ts4.5/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -2
  223. package/dist/types-ts4.5/plugins/table/ui/FloatingInsertButton/index.d.ts +2 -2
  224. package/dist/types-ts4.5/plugins/table/ui/LayoutButton/index.d.ts +1 -1
  225. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  226. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/NumberColumn/index.d.ts +1 -1
  227. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +1 -1
  228. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +2 -2
  229. package/dist/types-ts4.5/plugins/table/utils/analytics.d.ts +1 -1
  230. package/dist/types-ts4.5/plugins/table/utils/collapse.d.ts +2 -2
  231. package/dist/types-ts4.5/plugins/table/utils/column-controls.d.ts +2 -2
  232. package/dist/types-ts4.5/plugins/table/utils/decoration.d.ts +3 -3
  233. package/dist/types-ts4.5/plugins/table/utils/get-allow-add-column-custom-step.d.ts +1 -1
  234. package/dist/types-ts4.5/plugins/table/utils/nodes.d.ts +2 -2
  235. package/dist/types-ts4.5/plugins/table/utils/paste.d.ts +2 -2
  236. package/dist/types-ts4.5/plugins/table/utils/row-controls.d.ts +2 -2
  237. package/dist/types-ts4.5/plugins/table/utils/selection.d.ts +1 -1
  238. package/dist/types-ts4.5/plugins/table/utils/table.d.ts +1 -1
  239. package/dist/types-ts4.5/plugins/table/utils/update-plugin-state-decorations.d.ts +2 -2
  240. package/package.json +3 -10
  241. package/src/__tests__/integration/resize.ts +1 -2
  242. package/src/__tests__/unit/commands/go-to-next-cell.ts +1 -2
  243. package/src/__tests__/unit/commands/insert.ts +1 -2
  244. package/src/__tests__/unit/commands/misc.ts +1 -2
  245. package/src/__tests__/unit/commands.ts +4 -5
  246. package/src/__tests__/unit/copy-paste.ts +15 -8
  247. package/src/__tests__/unit/event-handlers/index.ts +1 -2
  248. package/src/__tests__/unit/event-handlers.ts +1 -2
  249. package/src/__tests__/unit/get-toolbar-config.ts +1 -2
  250. package/src/__tests__/unit/handlers.ts +1 -2
  251. package/src/__tests__/unit/hover-selection.ts +2 -3
  252. package/src/__tests__/unit/index.ts +1 -2
  253. package/src/__tests__/unit/layout.ts +1 -2
  254. package/src/__tests__/unit/nodeviews/TableComponent.tsx +1 -1
  255. package/src/__tests__/unit/nodeviews/table.ts +2 -3
  256. package/src/__tests__/unit/pm-plugins/decorations/column-controls.ts +1 -2
  257. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +3 -4
  258. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +2 -3
  259. package/src/__tests__/unit/pm-plugins/main.ts +8 -7
  260. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +2 -2
  261. package/src/__tests__/unit/pm-plugins/table-local-id.ts +5 -2
  262. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +2 -3
  263. package/src/__tests__/unit/sort-column.ts +1 -2
  264. package/src/__tests__/unit/transforms/delete-columns.ts +1 -2
  265. package/src/__tests__/unit/transforms/delete-rows.ts +1 -2
  266. package/src/__tests__/unit/transforms/merging.ts +1 -2
  267. package/src/__tests__/unit/ui/ContextualMenu.tsx +1 -1
  268. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +7 -5
  269. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +1 -1
  270. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +1 -1
  271. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +7 -5
  272. package/src/__tests__/unit/ui/TableFloatingControls.tsx +1 -1
  273. package/src/__tests__/unit/undo-redo.ts +2 -2
  274. package/src/__tests__/unit/utils.ts +1 -2
  275. package/src/plugins/table/commands/clear.ts +1 -2
  276. package/src/plugins/table/commands/go-to-next-cell.ts +1 -1
  277. package/src/plugins/table/commands/insert.ts +3 -4
  278. package/src/plugins/table/commands/misc.ts +8 -5
  279. package/src/plugins/table/commands/referentiality.ts +1 -2
  280. package/src/plugins/table/commands/selection.ts +5 -3
  281. package/src/plugins/table/commands/sort.ts +6 -3
  282. package/src/plugins/table/commands/toggle.ts +1 -1
  283. package/src/plugins/table/commands-with-analytics.ts +1 -2
  284. package/src/plugins/table/event-handlers.ts +8 -9
  285. package/src/plugins/table/handlers.ts +10 -5
  286. package/src/plugins/table/index.tsx +2 -3
  287. package/src/plugins/table/nodeviews/TableComponent.tsx +2 -2
  288. package/src/plugins/table/nodeviews/TableContainer.tsx +2 -2
  289. package/src/plugins/table/nodeviews/TableResizer.tsx +3 -3
  290. package/src/plugins/table/nodeviews/table.tsx +7 -8
  291. package/src/plugins/table/nodeviews/tableCell.tsx +2 -2
  292. package/src/plugins/table/nodeviews/types.ts +2 -3
  293. package/src/plugins/table/pm-plugins/decorations/plugin.ts +3 -4
  294. package/src/plugins/table/pm-plugins/decorations/utils/column-controls.ts +5 -3
  295. package/src/plugins/table/pm-plugins/decorations/utils/column-resizing.ts +1 -1
  296. package/src/plugins/table/pm-plugins/decorations/utils/compose-decorations.ts +1 -1
  297. package/src/plugins/table/pm-plugins/decorations/utils/types.ts +5 -2
  298. package/src/plugins/table/pm-plugins/keymap.ts +2 -3
  299. package/src/plugins/table/pm-plugins/main.ts +11 -8
  300. package/src/plugins/table/pm-plugins/plugin-key.ts +1 -1
  301. package/src/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.ts +6 -3
  302. package/src/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.ts +2 -2
  303. package/src/plugins/table/pm-plugins/sticky-headers/plugin-key.ts +1 -1
  304. package/src/plugins/table/pm-plugins/table-local-id.ts +2 -2
  305. package/src/plugins/table/pm-plugins/table-resizing/commands.ts +3 -4
  306. package/src/plugins/table/pm-plugins/table-resizing/event-handlers.ts +1 -2
  307. package/src/plugins/table/pm-plugins/table-resizing/plugin-factory.ts +1 -2
  308. package/src/plugins/table/pm-plugins/table-resizing/plugin-key.ts +1 -1
  309. package/src/plugins/table/pm-plugins/table-resizing/utils/colgroup.ts +4 -2
  310. package/src/plugins/table/pm-plugins/table-resizing/utils/column-state.ts +2 -3
  311. package/src/plugins/table/pm-plugins/table-resizing/utils/dom.ts +2 -3
  312. package/src/plugins/table/pm-plugins/table-resizing/utils/misc.ts +17 -5
  313. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +2 -3
  314. package/src/plugins/table/pm-plugins/table-resizing/utils/scale-table.ts +3 -4
  315. package/src/plugins/table/pm-plugins/table-resizing/utils/types.ts +1 -1
  316. package/src/plugins/table/pm-plugins/table-selection-keymap.ts +1 -2
  317. package/src/plugins/table/pm-plugins/table-width.ts +2 -2
  318. package/src/plugins/table/toolbar.tsx +4 -4
  319. package/src/plugins/table/transforms/column-width.ts +4 -5
  320. package/src/plugins/table/transforms/delete-columns.ts +2 -3
  321. package/src/plugins/table/transforms/delete-rows.ts +2 -3
  322. package/src/plugins/table/transforms/fix-tables.ts +3 -4
  323. package/src/plugins/table/transforms/merge.ts +2 -3
  324. package/src/plugins/table/transforms/replace-table.ts +6 -3
  325. package/src/plugins/table/transforms/split.ts +2 -3
  326. package/src/plugins/table/types.ts +3 -3
  327. package/src/plugins/table/ui/FloatingContextualButton/index.tsx +3 -3
  328. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +1 -1
  329. package/src/plugins/table/ui/FloatingContextualMenu/index.tsx +2 -2
  330. package/src/plugins/table/ui/FloatingDeleteButton/index.tsx +2 -2
  331. package/src/plugins/table/ui/FloatingInsertButton/index.tsx +3 -3
  332. package/src/plugins/table/ui/LayoutButton/index.tsx +2 -2
  333. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +1 -1
  334. package/src/plugins/table/ui/TableFloatingControls/NumberColumn/index.tsx +2 -3
  335. package/src/plugins/table/ui/TableFloatingControls/RowControls/index.tsx +2 -1
  336. package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -3
  337. package/src/plugins/table/utils/analytics.ts +1 -2
  338. package/src/plugins/table/utils/collapse.ts +6 -4
  339. package/src/plugins/table/utils/column-controls.ts +3 -4
  340. package/src/plugins/table/utils/decoration.ts +9 -6
  341. package/src/plugins/table/utils/get-allow-add-column-custom-step.ts +1 -1
  342. package/src/plugins/table/utils/nodes.ts +3 -4
  343. package/src/plugins/table/utils/paste.ts +8 -4
  344. package/src/plugins/table/utils/row-controls.ts +3 -4
  345. package/src/plugins/table/utils/selection.ts +1 -2
  346. package/src/plugins/table/utils/table.ts +1 -2
  347. package/src/plugins/table/utils/update-plugin-state-decorations.ts +2 -2
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.tableSafariDeleteCompositionTextIssueWorkaroundKey = exports.createPlugin = void 0;
7
- var _prosemirrorState = require("prosemirror-state");
8
- var _prosemirrorView = require("prosemirror-view");
9
7
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
+ var _state = require("@atlaskit/editor-prosemirror/state");
9
+ var _view = require("@atlaskit/editor-prosemirror/view");
10
10
  /**
11
11
  * Fix an issue that composition text replacement in Safari removes empty nodes during text composition text deletion.
12
12
  * https://github.com/ProseMirror/prosemirror/issues/934
13
13
  * We will remove this plugin when Webkit fix the problem itself.
14
14
  */
15
15
 
16
- var tableSafariDeleteCompositionTextIssueWorkaroundKey = new _prosemirrorState.PluginKey('tableSafariDeleteCompositionTextIssueWorkaround');
16
+ var tableSafariDeleteCompositionTextIssueWorkaroundKey = new _state.PluginKey('tableSafariDeleteCompositionTextIssueWorkaround');
17
17
  exports.tableSafariDeleteCompositionTextIssueWorkaroundKey = tableSafariDeleteCompositionTextIssueWorkaroundKey;
18
18
  var createPlugin = function createPlugin() {
19
19
  return new _safePlugin.SafePlugin({
@@ -22,7 +22,7 @@ var createPlugin = function createPlugin() {
22
22
  init: function init() {
23
23
  return {
24
24
  renderSpan: false,
25
- decorations: _prosemirrorView.DecorationSet.empty
25
+ decorations: _view.DecorationSet.empty
26
26
  };
27
27
  },
28
28
  apply: function apply(tr, value) {
@@ -35,13 +35,13 @@ var createPlugin = function createPlugin() {
35
35
  // Find position of the first text node in case it has multiple text nodes created by Japanese IME
36
36
  var $from = tr.selection.$from;
37
37
  var pos = $from.before($from.depth);
38
- var spanDecoration = _prosemirrorView.Decoration.widget(pos, function () {
38
+ var spanDecoration = _view.Decoration.widget(pos, function () {
39
39
  var spanElement = document.createElement('span');
40
40
  return spanElement;
41
41
  });
42
- decorations = _prosemirrorView.DecorationSet.create(tr.doc, [spanDecoration]);
42
+ decorations = _view.DecorationSet.create(tr.doc, [spanDecoration]);
43
43
  } else {
44
- decorations = _prosemirrorView.DecorationSet.empty;
44
+ decorations = _view.DecorationSet.empty;
45
45
  }
46
46
  return {
47
47
  renderSpan: renderSpan,
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.pluginKey = void 0;
7
- var _prosemirrorState = require("prosemirror-state");
8
- var pluginKey = new _prosemirrorState.PluginKey('stickyHeadersPlugin');
7
+ var _state = require("@atlaskit/editor-prosemirror/state");
8
+ var pluginKey = new _state.PluginKey('stickyHeadersPlugin');
9
9
  exports.pluginKey = pluginKey;
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.createPlugin = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _prosemirrorState = require("prosemirror-state");
10
9
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
11
10
  var _adfSchema = require("@atlaskit/adf-schema");
12
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
13
12
  var _utils = require("@atlaskit/editor-common/utils");
13
+ var _state = require("@atlaskit/editor-prosemirror/state");
14
14
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
15
15
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
16
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
@@ -27,7 +27,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
27
27
  * TODO: https://product-fabric.atlassian.net/browse/ED-12714
28
28
  *
29
29
  */
30
- var pluginKey = new _prosemirrorState.PluginKey('tableLocalIdPlugin');
30
+ var pluginKey = new _state.PluginKey('tableLocalIdPlugin');
31
31
  var getPluginState = function getPluginState(state) {
32
32
  return state && pluginKey.getState(state);
33
33
  };
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.pluginKey = void 0;
7
- var _prosemirrorState = require("prosemirror-state");
8
- var pluginKey = new _prosemirrorState.PluginKey('tableFlexiColumnResizing');
7
+ var _state = require("@atlaskit/editor-prosemirror/state");
8
+ var pluginKey = new _state.PluginKey('tableFlexiColumnResizing');
9
9
  exports.pluginKey = pluginKey;
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.isMinCellWidthTable = exports.insertColgroupFromNode = exports.hasTableBeenResized = exports.getColgroupChildrenLength = exports.generateColgroup = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _prosemirrorModel = require("prosemirror-model");
10
9
  var _styles = require("@atlaskit/editor-common/styles");
11
10
  var _utils = require("@atlaskit/editor-common/utils");
11
+ var _model = require("@atlaskit/editor-prosemirror/model");
12
12
  var _tableMap = require("@atlaskit/editor-tables/table-map");
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
14
  var generateColgroup = function generateColgroup(table) {
@@ -95,7 +95,7 @@ var isMinCellWidthTable = function isMinCellWidthTable(table) {
95
95
  };
96
96
  exports.isMinCellWidthTable = isMinCellWidthTable;
97
97
  function renderColgroupFromNode(table) {
98
- var rendered = _prosemirrorModel.DOMSerializer.renderSpec(document, ['colgroup', {}].concat((0, _toConsumableArray2.default)(generateColgroup(table))));
98
+ var rendered = _model.DOMSerializer.renderSpec(document, ['colgroup', {}].concat((0, _toConsumableArray2.default)(generateColgroup(table))));
99
99
  return rendered.dom;
100
100
  }
101
101
  var getColgroupChildrenLength = function getColgroupChildrenLength(table) {
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getFreeSpace = exports.getColumnStateFromDOM = exports.getCellsRefsInColumn = exports.calculateColumnWidth = exports.addContainerLeftRightPadding = void 0;
7
- var _prosemirrorUtils = require("prosemirror-utils");
8
7
  var _styles = require("@atlaskit/editor-common/styles");
8
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
9
9
  var _tableMap = require("@atlaskit/editor-tables/table-map");
10
10
  var _contentWidth2 = require("./content-width");
11
11
  var _unitToNumber = require("./unit-to-number");
@@ -38,7 +38,7 @@ var getCellsRefsInColumn = function getCellsRefsInColumn(columnIndex, table, tab
38
38
  });
39
39
  var cells = [];
40
40
  cellsPositions.forEach(function (pos) {
41
- var col = (0, _prosemirrorUtils.findDomRefAtPos)(pos + tableStart, domAtPos);
41
+ var col = (0, _utils.findDomRefAtPos)(pos + tableStart, domAtPos);
42
42
  if (col) {
43
43
  cells.push(col);
44
44
  }
@@ -14,6 +14,7 @@ var _styles = require("@atlaskit/editor-common/styles");
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
15
  var _utils = require("@atlaskit/editor-common/utils");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  // Translates named layouts in number values.
18
19
  function getLayoutSize(tableLayout) {
19
20
  var containerWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -74,7 +75,12 @@ var getTableMaxWidth = function getTableMaxWidth(_ref2) {
74
75
  getEditorContainerWidth = _ref2.getEditorContainerWidth;
75
76
  var containerWidth = getEditorContainerWidth();
76
77
  var parentWidth = (0, _nodeWidth.getParentNodeWidth)(tableStart, state, containerWidth);
77
- var maxWidth = parentWidth || getLayoutSize(layout, containerWidth.width, {});
78
+ var maxWidth;
79
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
80
+ maxWidth = parentWidth || table.attrs.width || getLayoutSize(layout, containerWidth.width, {});
81
+ } else {
82
+ maxWidth = parentWidth || getLayoutSize(layout, containerWidth.width, {});
83
+ }
78
84
  if (table.attrs.isNumberColumnEnabled) {
79
85
  maxWidth -= _editorSharedStyles.akEditorTableNumberColumnWidth;
80
86
  }
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  exports.tableSelectionKeymapPlugin = tableSelectionKeymapPlugin;
8
- var _prosemirrorKeymap = require("prosemirror-keymap");
9
8
  var _keymaps = require("@atlaskit/editor-common/keymaps");
9
+ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
10
10
  var _selection = require("../commands/selection");
11
11
  function tableSelectionKeymapPlugin(editorSelectionAPI) {
12
12
  var list = {};
13
13
  (0, _keymaps.bindKeymapWithCommand)(_keymaps.moveRight.common, (0, _selection.arrowRightFromTable)(editorSelectionAPI)(), list);
14
14
  (0, _keymaps.bindKeymapWithCommand)(_keymaps.moveLeft.common, (0, _selection.arrowLeftFromTable)(editorSelectionAPI)(), list);
15
- return (0, _prosemirrorKeymap.keymap)(list);
15
+ return (0, _keymap.keymap)(list);
16
16
  }
17
17
  var _default = tableSelectionKeymapPlugin;
18
18
  exports.default = _default;
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.pluginKey = exports.createPlugin = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _prosemirrorState = require("prosemirror-state");
11
- var _prosemirrorTransform = require("prosemirror-transform");
12
10
  var _steps = require("@atlaskit/adf-schema/steps");
13
11
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
12
+ var _state = require("@atlaskit/editor-prosemirror/state");
13
+ var _transform = require("@atlaskit/editor-prosemirror/transform");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
  var _excluded = ["width"];
16
16
  /**
@@ -20,7 +20,7 @@ var _excluded = ["width"];
20
20
  */
21
21
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22
22
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
- var pluginKey = new _prosemirrorState.PluginKey('tableWidthPlugin');
23
+ var pluginKey = new _state.PluginKey('tableWidthPlugin');
24
24
  exports.pluginKey = pluginKey;
25
25
  var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
26
26
  return new _safePlugin.SafePlugin({
@@ -53,7 +53,7 @@ var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
53
53
  return true;
54
54
  }
55
55
  var hasStepReplacingEntireDocument = tr.steps.some(function (step) {
56
- if (!(step instanceof _prosemirrorTransform.ReplaceStep)) {
56
+ if (!(step instanceof _transform.ReplaceStep)) {
57
57
  return false;
58
58
  }
59
59
  var isStepReplacingFromDocStart = step.from === 0;
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.messages = exports.getToolbarMenuConfig = exports.getToolbarConfig = exports.getToolbarCellOptionsConfig = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _prosemirrorUtils = require("prosemirror-utils");
10
9
  var _reactIntlNext = require("react-intl-next");
11
10
  var _steps = require("@atlaskit/adf-schema/steps");
12
11
  var _analytics = require("@atlaskit/editor-common/analytics");
@@ -14,9 +13,10 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
14
13
  var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
15
14
  var _uiColor = require("@atlaskit/editor-common/ui-color");
16
15
  var _utils = require("@atlaskit/editor-common/utils");
16
+ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
18
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
19
- var _utils2 = require("@atlaskit/editor-tables/utils");
19
+ var _utils3 = require("@atlaskit/editor-tables/utils");
20
20
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
21
21
  var _commands = require("./commands");
22
22
  var _commandsWithAnalytics = require("./commands-with-analytics");
@@ -28,7 +28,7 @@ var _transforms = require("./transforms");
28
28
  var _types = require("./types");
29
29
  var _ContextualMenu = require("./ui/FloatingContextualMenu/ContextualMenu");
30
30
  var _messages2 = _interopRequireDefault(require("./ui/messages"));
31
- var _utils3 = require("./utils");
31
+ var _utils4 = require("./utils");
32
32
  /** @jsx jsx */
33
33
 
34
34
  var messages = (0, _reactIntlNext.defineMessages)({
@@ -195,7 +195,7 @@ var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(editorSta
195
195
  title: formatMessage(_ContextualMenu.messages.splitCell),
196
196
  onClick: (0, _commandsWithAnalytics.splitCellWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.FLOATING_TB),
197
197
  selected: false,
198
- disabled: !(0, _utils2.splitCell)(editorState)
198
+ disabled: !(0, _utils3.splitCell)(editorState)
199
199
  }];
200
200
  if (pluginState !== null && pluginState !== void 0 && (_pluginState$pluginCo = pluginState.pluginConfig) !== null && _pluginState$pluginCo !== void 0 && _pluginState$pluginCo.allowDistributeColumns) {
201
201
  var _newResizeStateWithAn;
@@ -217,13 +217,13 @@ var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(editorSta
217
217
  });
218
218
  }
219
219
  if (pluginState !== null && pluginState !== void 0 && (_pluginState$pluginCo2 = pluginState.pluginConfig) !== null && _pluginState$pluginCo2 !== void 0 && _pluginState$pluginCo2.allowColumnSorting) {
220
- var hasMergedCellsInTable = (0, _utils3.getMergedCellsPositions)(editorState.tr).length > 0;
220
+ var hasMergedCellsInTable = (0, _utils4.getMergedCellsPositions)(editorState.tr).length > 0;
221
221
  var warning = hasMergedCellsInTable ? formatMessage(_ContextualMenu.messages.canNotSortTable) : undefined;
222
222
  options.push({
223
223
  id: 'editor.table.sortColumnAsc',
224
224
  title: formatMessage(_ContextualMenu.messages.sortColumnASC),
225
225
  onMouseOver: function onMouseOver(state, dispatch) {
226
- if ((0, _utils3.getMergedCellsPositions)(state.tr).length !== 0) {
226
+ if ((0, _utils4.getMergedCellsPositions)(state.tr).length !== 0) {
227
227
  (0, _commands.hoverMergedCells)()(state, dispatch);
228
228
  return true;
229
229
  }
@@ -245,7 +245,7 @@ var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(editorSta
245
245
  id: 'editor.table.sortColumnDesc',
246
246
  title: formatMessage(_ContextualMenu.messages.sortColumnDESC),
247
247
  onMouseOver: function onMouseOver(state, dispatch) {
248
- if ((0, _utils3.getMergedCellsPositions)(state.tr).length !== 0) {
248
+ if ((0, _utils4.getMergedCellsPositions)(state.tr).length !== 0) {
249
249
  (0, _commands.hoverMergedCells)()(state, dispatch);
250
250
  return true;
251
251
  }
@@ -295,12 +295,12 @@ var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(editorSta
295
295
  exports.getToolbarCellOptionsConfig = getToolbarCellOptionsConfig;
296
296
  var getClosestSelectionRect = function getClosestSelectionRect(state) {
297
297
  var selection = state.selection;
298
- return (0, _utils2.isSelectionType)(selection, 'cell') ? (0, _utils2.getSelectionRect)(selection) : (0, _utils2.findCellRectClosestToPos)(selection.$from);
298
+ return (0, _utils3.isSelectionType)(selection, 'cell') ? (0, _utils3.getSelectionRect)(selection) : (0, _utils3.findCellRectClosestToPos)(selection.$from);
299
299
  };
300
300
  var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth, editorAnalyticsAPI, getEditorFeatureFlags, getEditorView) {
301
301
  return function (config) {
302
302
  return function (state, intl) {
303
- var tableObject = (0, _utils2.findTable)(state.selection);
303
+ var tableObject = (0, _utils3.findTable)(state.selection);
304
304
  var pluginState = (0, _pluginFactory.getPluginState)(state);
305
305
  var resizeState = _tableResizing.pluginKey.getState(state);
306
306
  var tableWidthState = _tableWidth.pluginKey.getState(state);
@@ -342,7 +342,7 @@ var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth, editor
342
342
  var getDomRef = function getDomRef(editorView) {
343
343
  var element;
344
344
  var domAtPos = editorView.domAtPos.bind(editorView);
345
- var parent = (0, _prosemirrorUtils.findParentDomRefOfType)(nodeType, domAtPos)(state.selection);
345
+ var parent = (0, _utils2.findParentDomRefOfType)(nodeType, domAtPos)(state.selection);
346
346
  if (parent) {
347
347
  var tableRef = parent.querySelector('table') || undefined;
348
348
  if (tableRef) {
@@ -462,7 +462,7 @@ var clickWithCheckboxHandler = function clickWithCheckboxHandler(isChecked, node
462
462
  var highlightRowsHandler = function highlightRowsHandler(state, dispatch) {
463
463
  var selectionRect = getClosestSelectionRect(state);
464
464
  if (selectionRect) {
465
- (0, _commands.hoverRows)((0, _utils3.getSelectedRowIndexes)(selectionRect), true)(state, dispatch);
465
+ (0, _commands.hoverRows)((0, _utils4.getSelectedRowIndexes)(selectionRect), true)(state, dispatch);
466
466
  return true;
467
467
  }
468
468
  return false;
@@ -470,7 +470,7 @@ var highlightRowsHandler = function highlightRowsHandler(state, dispatch) {
470
470
  var highlightColumnsHandler = function highlightColumnsHandler(state, dispatch) {
471
471
  var selectionRect = getClosestSelectionRect(state);
472
472
  if (selectionRect) {
473
- (0, _commands.hoverColumns)((0, _utils3.getSelectedColumnIndexes)(selectionRect), true)(state, dispatch);
473
+ (0, _commands.hoverColumns)((0, _utils4.getSelectedColumnIndexes)(selectionRect), true)(state, dispatch);
474
474
  return true;
475
475
  }
476
476
  return false;
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.deleteColumns = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _prosemirrorState = require("prosemirror-state");
11
10
  var _steps = require("@atlaskit/adf-schema/steps");
11
+ var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _tableMap = require("@atlaskit/editor-tables/table-map");
13
13
  var _utils = require("@atlaskit/editor-tables/utils");
14
14
  var _split = require("./split");
@@ -38,12 +38,12 @@ var deleteColumnsCustomStep = function deleteColumnsCustomStep(rect) {
38
38
  var tablePosResult = tr.mapping.mapResult(table.pos);
39
39
  if (tablePosResult.deleted) {
40
40
  var pos = Math.min(tablePosResult.pos, tr.doc.nodeSize - 1);
41
- tr.setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(pos)));
41
+ tr.setSelection(_state.Selection.near(tr.doc.resolve(pos)));
42
42
  } else {
43
43
  var newTable = tr.doc.nodeAt(tablePosResult.pos);
44
44
  if (newTable) {
45
45
  var cursorPos = getNextCursorPos(newTable, deletedColumns);
46
- tr.setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(table.pos + cursorPos)));
46
+ tr.setSelection(_state.Selection.near(tr.doc.resolve(table.pos + cursorPos)));
47
47
  }
48
48
  }
49
49
  return tr;
@@ -149,7 +149,7 @@ var deleteColumnsLegacy = function deleteColumnsLegacy(rect) {
149
149
  var cursorPos = getNextCursorPos(newTable, columnsToDelete);
150
150
  return tr.replaceWith(table.pos, table.pos + table.node.nodeSize, fixedTable)
151
151
  // move cursor to the left of the deleted columns if possible, otherwise - to the first column
152
- .setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(table.pos + cursorPos)));
152
+ .setSelection(_state.Selection.near(tr.doc.resolve(table.pos + cursorPos)));
153
153
  };
154
154
  };
155
155
  function getNextCursorPos(table, deletedColumns) {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.deleteRows = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _prosemirrorState = require("prosemirror-state");
10
+ var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _tableMap = require("@atlaskit/editor-tables/table-map");
12
12
  var _utils = require("@atlaskit/editor-tables/utils");
13
13
  var _merge = require("./merge");
@@ -117,7 +117,7 @@ var deleteRows = function deleteRows(rect) {
117
117
  var cursorPos = getNextCursorPos(newTable, rowsToDelete);
118
118
  return tr.replaceWith(table.pos, table.pos + table.node.nodeSize, fixedTable)
119
119
  // move cursor before the deleted rows if possible, otherwise - to the first row
120
- .setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(table.pos + cursorPos)));
120
+ .setSelection(_state.Selection.near(tr.doc.resolve(table.pos + cursorPos)));
121
121
  };
122
122
  };
123
123
  exports.deleteRows = deleteRows;
@@ -8,8 +8,8 @@ exports.canMergeCells = canMergeCells;
8
8
  exports.mergeCells = mergeCells;
9
9
  exports.mergeEmptyColumns = mergeEmptyColumns;
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _prosemirrorModel = require("prosemirror-model");
12
- var _prosemirrorState = require("prosemirror-state");
11
+ var _model = require("@atlaskit/editor-prosemirror/model");
12
+ var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
14
14
  var _tableMap = require("@atlaskit/editor-tables/table-map");
15
15
  var _utils = require("@atlaskit/editor-tables/utils");
@@ -43,7 +43,7 @@ function mergeCells(tr) {
43
43
  if (colIndex === rect.left && rowIndex === rect.top) {
44
44
  mergedCellPos = cellPos;
45
45
  // merge content of the selected cells, dropping empty cells
46
- var content = isEmptyCell(cell) ? _prosemirrorModel.Fragment.empty : cell.content;
46
+ var content = isEmptyCell(cell) ? _model.Fragment.empty : cell.content;
47
47
  var seenContent = [mergedCellPos];
48
48
  for (var i = rect.top; i < rect.bottom; i++) {
49
49
  for (var j = rect.left; j < rect.right; j++) {
@@ -65,7 +65,7 @@ function mergeCells(tr) {
65
65
  var attrs = addColSpan(_objectSpread(_objectSpread({}, cell.attrs), {}, {
66
66
  rowspan: rowspan
67
67
  }), cell.attrs.colspan, rect.right - rect.left - cell.attrs.colspan);
68
- var newCell = content === _prosemirrorModel.Fragment.empty ? cell.type.createAndFill(attrs, content, cell.marks) : cell.type.createChecked(attrs, content, cell.marks);
68
+ var newCell = content === _model.Fragment.empty ? cell.type.createAndFill(attrs, content, cell.marks) : cell.type.createChecked(attrs, content, cell.marks);
69
69
  rowCells.push(newCell);
70
70
  } else if (selectedCells.indexOf(cellPos) === -1) {
71
71
  // if its one of the selected cells, but not the merged cell, we get rid of it
@@ -112,7 +112,7 @@ function mergeCells(tr) {
112
112
  if (fixedTable === null) {
113
113
  return tr;
114
114
  }
115
- return tr.replaceWith(table.pos, table.pos + table.node.nodeSize, fixedTable).setSelection(_prosemirrorState.Selection.near(tr.doc.resolve((mergedCellPos || 0) + table.start)));
115
+ return tr.replaceWith(table.pos, table.pos + table.node.nodeSize, fixedTable).setSelection(_state.Selection.near(tr.doc.resolve((mergedCellPos || 0) + table.start)));
116
116
  }
117
117
  function canMergeCells(tr) {
118
118
  var selection = tr.selection;
@@ -4,18 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.replaceSelectedTable = void 0;
7
- var _prosemirrorModel = require("prosemirror-model");
8
- var _prosemirrorState = require("prosemirror-state");
9
7
  var _analytics = require("@atlaskit/editor-common/analytics");
8
+ var _model = require("@atlaskit/editor-prosemirror/model");
9
+ var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _utils = require("@atlaskit/editor-tables/utils");
11
11
  var _utils2 = require("../utils");
12
12
  var replaceSelectedTable = function replaceSelectedTable(state, content, inputMethod, editorAnalyticsAPI) {
13
13
  if ((0, _utils.isTableSelected)(state.selection)) {
14
14
  var table = (0, _utils.findTable)(state.selection);
15
15
  if (table) {
16
- var slice = typeof content === 'string' ? new _prosemirrorModel.Slice(_prosemirrorModel.Fragment.from(state.schema.text(content)), 0, 0) : content;
16
+ var slice = typeof content === 'string' ? new _model.Slice(_model.Fragment.from(state.schema.text(content)), 0, 0) : content;
17
17
  var tr = state.tr.replace(table.pos, table.pos + table.node.nodeSize, slice);
18
- tr.setSelection(_prosemirrorState.TextSelection.create(tr.doc, table.pos + slice.size + 1));
18
+ tr.setSelection(_state.TextSelection.create(tr.doc, table.pos + slice.size + 1));
19
19
  var _getSelectedTableInfo = (0, _utils2.getSelectedTableInfo)(state.selection),
20
20
  totalRowCount = _getSelectedTableInfo.totalRowCount,
21
21
  totalColumnCount = _getSelectedTableInfo.totalColumnCount;
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = _default;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
- var _prosemirrorUtils = require("prosemirror-utils");
11
10
  var _reactIntlNext = require("react-intl-next");
12
11
  var _analytics = require("@atlaskit/editor-common/analytics");
13
12
  var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
14
13
  var _ui = require("@atlaskit/editor-common/ui");
15
14
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
15
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
18
18
  var _commands = require("../../commands");
@@ -47,7 +47,7 @@ var FloatingContextualButtonInner = /*#__PURE__*/_react.default.memo(function (p
47
47
  };
48
48
  var domAtPos = editorView.domAtPos.bind(editorView);
49
49
  var targetCellRef;
50
- targetCellRef = (0, _prosemirrorUtils.findDomRefAtPos)(targetCellPosition, domAtPos);
50
+ targetCellRef = (0, _utils.findDomRefAtPos)(targetCellPosition, domAtPos);
51
51
  if (!targetCellRef || !(targetCellRef instanceof HTMLElement)) {
52
52
  return null;
53
53
  }
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _prosemirrorUtils = require("prosemirror-utils");
10
9
  var _ui = require("@atlaskit/editor-common/ui");
10
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
- var _utils = require("@atlaskit/editor-tables/utils");
12
+ var _utils2 = require("@atlaskit/editor-tables/utils");
13
13
  var _pluginFactory = require("../../pm-plugins/plugin-factory");
14
14
  var _consts = require("../consts");
15
15
  var _ContextualMenu = _interopRequireDefault(require("./ContextualMenu"));
@@ -33,12 +33,12 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
33
33
  return null;
34
34
  }
35
35
  var selection = editorView.state.selection;
36
- var selectionRect = (0, _utils.isSelectionType)(selection, 'cell') ? (0, _utils.getSelectionRect)(selection) : (0, _utils.findCellRectClosestToPos)(selection.$from);
36
+ var selectionRect = (0, _utils2.isSelectionType)(selection, 'cell') ? (0, _utils2.getSelectionRect)(selection) : (0, _utils2.findCellRectClosestToPos)(selection.$from);
37
37
  if (!selectionRect) {
38
38
  return null;
39
39
  }
40
40
  var domAtPos = editorView.domAtPos.bind(editorView);
41
- var targetCellRef = (0, _prosemirrorUtils.findDomRefAtPos)(targetCellPosition, domAtPos);
41
+ var targetCellRef = (0, _utils.findDomRefAtPos)(targetCellPosition, domAtPos);
42
42
  if (!targetCellRef) {
43
43
  return null;
44
44
  }
@@ -14,17 +14,17 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
14
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _react = _interopRequireDefault(require("react"));
17
- var _prosemirrorUtils = require("prosemirror-utils");
18
17
  var _reactIntlNext = require("react-intl-next");
19
18
  var _analytics = require("@atlaskit/editor-common/analytics");
20
19
  var _ui = require("@atlaskit/editor-common/ui");
21
20
  var _utils = require("@atlaskit/editor-common/utils");
21
+ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
22
22
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
23
23
  var _tableMap = require("@atlaskit/editor-tables/table-map");
24
- var _utils2 = require("@atlaskit/editor-tables/utils");
24
+ var _utils3 = require("@atlaskit/editor-tables/utils");
25
25
  var _commandsWithAnalytics = require("../../commands-with-analytics");
26
26
  var _types = require("../../types");
27
- var _utils3 = require("../../utils");
27
+ var _utils4 = require("../../utils");
28
28
  var _getPopupOptions = _interopRequireDefault(require("./getPopupOptions"));
29
29
  var _InsertButton = _interopRequireDefault(require("./InsertButton"));
30
30
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -72,7 +72,7 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
72
72
  if (!cellPosition) {
73
73
  return null;
74
74
  }
75
- var tablePos = (0, _utils2.findTable)(editorView.state.selection);
75
+ var tablePos = (0, _utils3.findTable)(editorView.state.selection);
76
76
  if (!tablePos) {
77
77
  return null;
78
78
  }
@@ -80,7 +80,7 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
80
80
  var pos = cellPosition + tablePos.start + 1;
81
81
  var target;
82
82
  try {
83
- target = (0, _prosemirrorUtils.findDomRefAtPos)(pos, domAtPos);
83
+ target = (0, _utils2.findDomRefAtPos)(pos, domAtPos);
84
84
  } catch (error) {
85
85
  // eslint-disable-next-line no-console
86
86
  console.warn(error);
@@ -113,7 +113,7 @@ var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
113
113
  var tableContainerWrapper = (0, _utils.closestElement)(targetCellRef, ".".concat(_types.TableCssClassName.TABLE_CONTAINER));
114
114
  var tableWrapper = (0, _utils.closestElement)(targetCellRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
115
115
  var index = type === 'column' ? insertColumnButtonIndex : insertRowButtonIndex;
116
- var hasNumberedColumns = (0, _utils3.checkIfNumberColumnEnabled)(editorView.state.selection);
116
+ var hasNumberedColumns = (0, _utils4.checkIfNumberColumnEnabled)(editorView.state.selection);
117
117
  return /*#__PURE__*/_react.default.createElement(_ui.Popup, (0, _extends2.default)({
118
118
  target: targetCellRef,
119
119
  mountTo: tableContainerWrapper || mountPoint,
@@ -15,11 +15,11 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
  var _classnames2 = _interopRequireDefault(require("classnames"));
18
- var _prosemirrorUtils = require("prosemirror-utils");
19
18
  var _reactIntlNext = require("react-intl-next");
20
19
  var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
21
20
  var _ui = require("@atlaskit/editor-common/ui");
22
21
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
22
+ var _utils = require("@atlaskit/editor-prosemirror/utils");
23
23
  var _collapse = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/collapse"));
24
24
  var _expand = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/expand"));
25
25
  var _commandsWithAnalytics = require("../../commands-with-analytics");
@@ -110,7 +110,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
110
110
  value: function getStickyTargetRef(pos) {
111
111
  var editorView = this.props.editorView;
112
112
  var domAtPos = editorView.domAtPos.bind(editorView);
113
- var node = (0, _prosemirrorUtils.findDomRefAtPos)(pos, domAtPos);
113
+ var node = (0, _utils.findDomRefAtPos)(pos, domAtPos);
114
114
  return node.dataset['headerRow'] && node.classList.contains('sticky') ? node : null;
115
115
  }
116
116
  }, {
@@ -14,7 +14,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
14
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _react = _interopRequireWildcard(require("react"));
17
- var _prosemirrorState = require("prosemirror-state");
17
+ var _state = require("@atlaskit/editor-prosemirror/state");
18
18
  var _utils = require("@atlaskit/editor-tables/utils");
19
19
  var _commands = require("../../../commands");
20
20
  var _types = require("../../../types");
@@ -52,9 +52,9 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
52
52
  var newPos = selection.head > pos ?
53
53
  // Selection is after table
54
54
  // nodeSize - 3 will move the position inside last table cell
55
- _prosemirrorState.Selection.near(doc.resolve(pos + ($pos.parent.nodeSize - 3)), -1) :
55
+ _state.Selection.near(doc.resolve(pos + ($pos.parent.nodeSize - 3)), -1) :
56
56
  // Selection is before table
57
- _prosemirrorState.Selection.near($pos);
57
+ _state.Selection.near($pos);
58
58
  editorView.dispatch(tr.setSelection(newPos));
59
59
  }
60
60
  selectRow(index, event.shiftKey);
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isTableCollapsible = exports.collapseSelectedTable = void 0;
7
- var _prosemirrorModel = require("prosemirror-model");
8
- var _prosemirrorTransform = require("prosemirror-transform");
7
+ var _model = require("@atlaskit/editor-prosemirror/model");
8
+ var _transform = require("@atlaskit/editor-prosemirror/transform");
9
9
  var _utils = require("@atlaskit/editor-tables/utils");
10
10
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
11
11
 
@@ -30,11 +30,11 @@ var isTableCollapsible = function isTableCollapsible(tr) {
30
30
  var node = nodePos.node,
31
31
  pos = nodePos.pos;
32
32
  var $pos = tr.doc.resolve(pos);
33
- var range = new _prosemirrorModel.NodeRange($pos, tr.doc.resolve(pos + node.nodeSize), $pos.depth);
33
+ var range = new _model.NodeRange($pos, tr.doc.resolve(pos + node.nodeSize), $pos.depth);
34
34
  if (!range) {
35
35
  return bail();
36
36
  }
37
- var canWrap = (0, _prosemirrorTransform.findWrapping)(range, expand);
37
+ var canWrap = (0, _transform.findWrapping)(range, expand);
38
38
  if (canWrap === null) {
39
39
  return bail();
40
40
  }