@atlaskit/editor-core 172.1.1 → 172.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (541) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/analytics-api/api.js +38 -0
  3. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +36 -0
  4. package/dist/cjs/analytics-api/editor-state-context.js +96 -0
  5. package/dist/cjs/analytics-api/map-attributes.js +30 -0
  6. package/dist/cjs/create-editor/ReactEditorView.js +47 -6
  7. package/dist/cjs/create-editor/ReactEditorViewContext.js +2 -6
  8. package/dist/cjs/create-editor/create-plugins-list.js +12 -3
  9. package/dist/cjs/event-dispatcher/index.js +12 -81
  10. package/dist/cjs/insert-api/api.js +48 -0
  11. package/dist/cjs/insert-api/insert-content-handlers.js +101 -0
  12. package/dist/cjs/insert-api/insert-node-helpers.js +157 -0
  13. package/dist/cjs/{plugins/analytics/types/avatar.js → insert-api/types.js} +0 -0
  14. package/dist/cjs/keymaps/index.js +437 -288
  15. package/dist/cjs/messages.js +8 -125
  16. package/dist/cjs/plugins/analytics/index.js +26 -26
  17. package/dist/cjs/plugins/analytics/types/enums.js +49 -344
  18. package/dist/cjs/plugins/analytics/types/extension-events.js +19 -26
  19. package/dist/cjs/plugins/analytics/types/general-events.js +25 -34
  20. package/dist/cjs/plugins/analytics/types/index.js +10 -56
  21. package/dist/cjs/plugins/analytics/types/inline-comment-events.js +7 -8
  22. package/dist/cjs/plugins/analytics/types/node-events.js +13 -20
  23. package/dist/cjs/plugins/analytics/types/smart-links.js +8 -14
  24. package/dist/cjs/plugins/analytics/types/toolbar-button.js +7 -20
  25. package/dist/cjs/plugins/analytics/utils.js +37 -127
  26. package/dist/cjs/plugins/expand/utils.js +18 -45
  27. package/dist/cjs/plugins/extension/actions.js +10 -30
  28. package/dist/cjs/plugins/extension/ui/Extension/styles.js +18 -8
  29. package/dist/cjs/plugins/insert-block/index.js +1 -0
  30. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +31 -22
  31. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +6 -170
  32. package/dist/cjs/plugins/layout/styles.js +14 -6
  33. package/dist/cjs/plugins/layout/utils.js +25 -66
  34. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +10 -0
  35. package/dist/cjs/plugins/paste/handlers.js +19 -15
  36. package/dist/cjs/plugins/paste/util/index.js +30 -1
  37. package/dist/cjs/plugins/selection/gap-cursor/selection.js +23 -188
  38. package/dist/cjs/plugins/selection/gap-cursor/utils/is-ignored.js +7 -8
  39. package/dist/cjs/plugins/selection/gap-cursor/utils/is-valid-target-node.js +7 -8
  40. package/dist/cjs/plugins/selection/gap-cursor/utils.js +6 -6
  41. package/dist/cjs/plugins/selection/gap-cursor-selection.js +1 -1
  42. package/dist/cjs/plugins/selection/types.js +9 -11
  43. package/dist/cjs/plugins/selection/utils.js +2 -2
  44. package/dist/cjs/plugins/table/commands/go-to-next-cell.js +40 -38
  45. package/dist/cjs/plugins/table/commands/insert.js +57 -49
  46. package/dist/cjs/plugins/table/commands/selection.js +302 -218
  47. package/dist/cjs/plugins/table/commands-with-analytics.js +241 -219
  48. package/dist/cjs/plugins/table/event-handlers.js +60 -60
  49. package/dist/cjs/plugins/table/index.js +64 -20
  50. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +20 -22
  51. package/dist/cjs/plugins/table/nodeviews/table.js +19 -11
  52. package/dist/cjs/plugins/table/nodeviews/tableCell.js +11 -13
  53. package/dist/cjs/plugins/table/nodeviews/update-overflow-shadows.js +25 -25
  54. package/dist/cjs/plugins/table/pm-plugins/keymap.js +15 -13
  55. package/dist/cjs/plugins/table/pm-plugins/main.js +8 -8
  56. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -8
  57. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -1
  58. package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -10
  59. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
  60. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/dom.js +30 -28
  61. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -7
  62. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
  63. package/dist/cjs/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
  64. package/dist/cjs/plugins/table/toolbar.js +74 -72
  65. package/dist/cjs/plugins/table/transforms/column-width.js +41 -38
  66. package/dist/cjs/plugins/table/transforms/replace-table.js +4 -4
  67. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +2 -4
  68. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +25 -21
  69. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
  70. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +7 -4
  71. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +12 -11
  72. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +2 -2
  73. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +4 -6
  74. package/dist/cjs/plugins/table/ui/common-styles.js +3 -3
  75. package/dist/cjs/plugins/table/utils/analytics.js +26 -1
  76. package/dist/cjs/plugins/table/utils/index.js +0 -6
  77. package/dist/cjs/selection-api/api.js +34 -0
  78. package/dist/cjs/types/browser.js +1 -2
  79. package/dist/cjs/ui/ColorPalette/Color/index.js +2 -106
  80. package/dist/cjs/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +2 -21
  81. package/dist/cjs/ui/ColorPalette/Palettes/common.js +7 -25
  82. package/dist/cjs/ui/ColorPalette/Palettes/paletteMessages.js +2 -114
  83. package/dist/cjs/ui/ColorPalette/Palettes/panelBackgroundPalette.js +12 -152
  84. package/dist/cjs/ui/ColorPalette/Palettes/statusColorPalette.js +13 -61
  85. package/dist/cjs/ui/ColorPalette/Palettes/textColorPalette.js +12 -34
  86. package/dist/cjs/ui/ColorPalette/index.js +2 -76
  87. package/dist/cjs/ui/Dropdown/index.js +3 -119
  88. package/dist/cjs/ui/DropdownMenu/index.js +3 -286
  89. package/dist/cjs/ui/Toolbar/types.js +19 -33
  90. package/dist/cjs/ui/ToolbarButton/index.js +8 -120
  91. package/dist/cjs/ui/WithPluginState/index.js +1 -3
  92. package/dist/cjs/ui/styles.js +35 -27
  93. package/dist/cjs/ui/with-outer-listeners.js +4 -152
  94. package/dist/cjs/utils/dom.js +46 -123
  95. package/dist/cjs/utils/index.js +40 -42
  96. package/dist/cjs/utils/node-width.js +7 -79
  97. package/dist/cjs/utils/nodes.js +57 -124
  98. package/dist/cjs/utils/plugin-state-factory.js +7 -107
  99. package/dist/cjs/utils/selection.js +11 -62
  100. package/dist/cjs/utils/slice.js +28 -68
  101. package/dist/cjs/utils/step.js +18 -46
  102. package/dist/cjs/version-wrapper.js +1 -1
  103. package/dist/cjs/version.json +1 -1
  104. package/dist/es2019/analytics-api/api.js +30 -0
  105. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +25 -0
  106. package/dist/es2019/analytics-api/editor-state-context.js +85 -0
  107. package/dist/es2019/analytics-api/map-attributes.js +14 -0
  108. package/dist/es2019/create-editor/ReactEditorView.js +33 -4
  109. package/dist/es2019/create-editor/ReactEditorViewContext.js +1 -2
  110. package/dist/es2019/create-editor/create-plugins-list.js +13 -4
  111. package/dist/es2019/event-dispatcher/index.js +1 -60
  112. package/dist/es2019/insert-api/api.js +43 -0
  113. package/dist/es2019/insert-api/insert-content-handlers.js +85 -0
  114. package/dist/es2019/insert-api/insert-node-helpers.js +149 -0
  115. package/dist/es2019/{plugins/analytics/types/avatar.js → insert-api/types.js} +0 -0
  116. package/dist/es2019/keymaps/index.js +1 -186
  117. package/dist/es2019/messages.js +2 -123
  118. package/dist/es2019/plugins/analytics/index.js +1 -1
  119. package/dist/es2019/plugins/analytics/types/enums.js +1 -336
  120. package/dist/es2019/plugins/analytics/types/extension-events.js +1 -22
  121. package/dist/es2019/plugins/analytics/types/general-events.js +1 -30
  122. package/dist/es2019/plugins/analytics/types/index.js +1 -6
  123. package/dist/es2019/plugins/analytics/types/inline-comment-events.js +1 -7
  124. package/dist/es2019/plugins/analytics/types/node-events.js +1 -18
  125. package/dist/es2019/plugins/analytics/types/smart-links.js +1 -12
  126. package/dist/es2019/plugins/analytics/types/toolbar-button.js +1 -19
  127. package/dist/es2019/plugins/analytics/utils.js +12 -113
  128. package/dist/es2019/plugins/expand/utils.js +1 -36
  129. package/dist/es2019/plugins/extension/actions.js +1 -26
  130. package/dist/es2019/plugins/extension/ui/Extension/styles.js +2 -3
  131. package/dist/es2019/plugins/insert-block/index.js +1 -0
  132. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -12
  133. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +1 -168
  134. package/dist/es2019/plugins/layout/styles.js +2 -3
  135. package/dist/es2019/plugins/layout/utils.js +1 -54
  136. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +10 -0
  137. package/dist/es2019/plugins/paste/handlers.js +8 -4
  138. package/dist/es2019/plugins/paste/util/index.js +23 -0
  139. package/dist/es2019/plugins/selection/gap-cursor/selection.js +1 -136
  140. package/dist/es2019/plugins/selection/gap-cursor/utils/is-ignored.js +1 -5
  141. package/dist/es2019/plugins/selection/gap-cursor/utils/is-valid-target-node.js +1 -4
  142. package/dist/es2019/plugins/selection/gap-cursor/utils.js +4 -4
  143. package/dist/es2019/plugins/selection/gap-cursor-selection.js +1 -1
  144. package/dist/es2019/plugins/selection/types.js +2 -9
  145. package/dist/es2019/plugins/selection/utils.js +1 -1
  146. package/dist/es2019/plugins/table/commands/go-to-next-cell.js +4 -4
  147. package/dist/es2019/plugins/table/commands/insert.js +26 -24
  148. package/dist/es2019/plugins/table/commands/selection.js +109 -51
  149. package/dist/es2019/plugins/table/commands-with-analytics.js +39 -38
  150. package/dist/es2019/plugins/table/event-handlers.js +6 -7
  151. package/dist/es2019/plugins/table/index.js +56 -16
  152. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +11 -12
  153. package/dist/es2019/plugins/table/nodeviews/table.js +18 -8
  154. package/dist/es2019/plugins/table/nodeviews/tableCell.js +2 -3
  155. package/dist/es2019/plugins/table/nodeviews/update-overflow-shadows.js +3 -4
  156. package/dist/es2019/plugins/table/pm-plugins/keymap.js +13 -12
  157. package/dist/es2019/plugins/table/pm-plugins/main.js +8 -8
  158. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -6
  159. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -2
  160. package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -8
  161. package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
  162. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/dom.js +2 -2
  163. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -4
  164. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
  165. package/dist/es2019/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
  166. package/dist/es2019/plugins/table/toolbar.js +24 -24
  167. package/dist/es2019/plugins/table/transforms/column-width.js +3 -2
  168. package/dist/es2019/plugins/table/transforms/replace-table.js +4 -4
  169. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  170. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +19 -16
  171. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
  172. package/dist/es2019/plugins/table/ui/FloatingDeleteButton/index.js +8 -4
  173. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +9 -6
  174. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +2 -2
  175. package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +2 -3
  176. package/dist/es2019/plugins/table/ui/common-styles.js +1 -1
  177. package/dist/es2019/plugins/table/utils/analytics.js +16 -1
  178. package/dist/es2019/plugins/table/utils/index.js +1 -1
  179. package/dist/es2019/selection-api/api.js +22 -0
  180. package/dist/es2019/types/browser.js +0 -1
  181. package/dist/es2019/ui/ColorPalette/Color/index.js +1 -66
  182. package/dist/es2019/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -14
  183. package/dist/es2019/ui/ColorPalette/Palettes/common.js +1 -20
  184. package/dist/es2019/ui/ColorPalette/Palettes/paletteMessages.js +2 -113
  185. package/dist/es2019/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -137
  186. package/dist/es2019/ui/ColorPalette/Palettes/statusColorPalette.js +1 -51
  187. package/dist/es2019/ui/ColorPalette/Palettes/textColorPalette.js +1 -25
  188. package/dist/es2019/ui/ColorPalette/index.js +2 -62
  189. package/dist/es2019/ui/Dropdown/index.js +2 -84
  190. package/dist/es2019/ui/DropdownMenu/index.js +2 -244
  191. package/dist/es2019/ui/Toolbar/types.js +1 -30
  192. package/dist/es2019/ui/ToolbarButton/index.js +2 -94
  193. package/dist/es2019/ui/WithPluginState/index.js +1 -1
  194. package/dist/es2019/ui/styles.js +9 -47
  195. package/dist/es2019/ui/with-outer-listeners.js +2 -104
  196. package/dist/es2019/utils/dom.js +1 -113
  197. package/dist/es2019/utils/index.js +2 -21
  198. package/dist/es2019/utils/node-width.js +1 -75
  199. package/dist/es2019/utils/nodes.js +1 -88
  200. package/dist/es2019/utils/plugin-state-factory.js +1 -107
  201. package/dist/es2019/utils/selection.js +2 -52
  202. package/dist/es2019/utils/slice.js +1 -56
  203. package/dist/es2019/utils/step.js +1 -35
  204. package/dist/es2019/version-wrapper.js +1 -1
  205. package/dist/es2019/version.json +1 -1
  206. package/dist/esm/analytics-api/api.js +27 -0
  207. package/dist/esm/analytics-api/attach-payload-into-transaction.js +22 -0
  208. package/dist/esm/analytics-api/editor-state-context.js +81 -0
  209. package/dist/esm/analytics-api/map-attributes.js +20 -0
  210. package/dist/esm/create-editor/ReactEditorView.js +44 -6
  211. package/dist/esm/create-editor/ReactEditorViewContext.js +1 -2
  212. package/dist/esm/create-editor/create-plugins-list.js +15 -4
  213. package/dist/esm/event-dispatcher/index.js +1 -74
  214. package/dist/esm/insert-api/api.js +37 -0
  215. package/dist/esm/insert-api/insert-content-handlers.js +88 -0
  216. package/dist/esm/insert-api/insert-node-helpers.js +138 -0
  217. package/dist/{es2019/plugins/analytics/types/config-panel-events.js → esm/insert-api/types.js} +0 -0
  218. package/dist/esm/keymaps/index.js +1 -184
  219. package/dist/esm/messages.js +2 -123
  220. package/dist/esm/plugins/analytics/index.js +1 -1
  221. package/dist/esm/plugins/analytics/types/enums.js +1 -336
  222. package/dist/esm/plugins/analytics/types/extension-events.js +1 -22
  223. package/dist/esm/plugins/analytics/types/general-events.js +1 -30
  224. package/dist/esm/plugins/analytics/types/index.js +1 -6
  225. package/dist/esm/plugins/analytics/types/inline-comment-events.js +1 -7
  226. package/dist/esm/plugins/analytics/types/node-events.js +1 -18
  227. package/dist/esm/plugins/analytics/types/smart-links.js +1 -12
  228. package/dist/esm/plugins/analytics/types/toolbar-button.js +1 -19
  229. package/dist/esm/plugins/analytics/utils.js +12 -113
  230. package/dist/esm/plugins/expand/utils.js +1 -34
  231. package/dist/esm/plugins/extension/actions.js +1 -24
  232. package/dist/esm/plugins/extension/ui/Extension/styles.js +2 -3
  233. package/dist/esm/plugins/insert-block/index.js +1 -0
  234. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -12
  235. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/messages.js +1 -168
  236. package/dist/esm/plugins/layout/styles.js +2 -3
  237. package/dist/esm/plugins/layout/utils.js +1 -58
  238. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +10 -0
  239. package/dist/esm/plugins/paste/handlers.js +8 -4
  240. package/dist/esm/plugins/paste/util/index.js +23 -0
  241. package/dist/esm/plugins/selection/gap-cursor/selection.js +1 -176
  242. package/dist/esm/plugins/selection/gap-cursor/utils/is-ignored.js +1 -5
  243. package/dist/esm/plugins/selection/gap-cursor/utils/is-valid-target-node.js +1 -4
  244. package/dist/esm/plugins/selection/gap-cursor/utils.js +4 -4
  245. package/dist/esm/plugins/selection/gap-cursor-selection.js +1 -1
  246. package/dist/esm/plugins/selection/types.js +2 -9
  247. package/dist/esm/plugins/selection/utils.js +1 -1
  248. package/dist/esm/plugins/table/commands/go-to-next-cell.js +34 -32
  249. package/dist/esm/plugins/table/commands/insert.js +57 -49
  250. package/dist/esm/plugins/table/commands/selection.js +303 -215
  251. package/dist/esm/plugins/table/commands-with-analytics.js +241 -220
  252. package/dist/esm/plugins/table/event-handlers.js +60 -59
  253. package/dist/esm/plugins/table/index.js +62 -18
  254. package/dist/esm/plugins/table/nodeviews/TableComponent.js +20 -21
  255. package/dist/esm/plugins/table/nodeviews/table.js +19 -9
  256. package/dist/esm/plugins/table/nodeviews/tableCell.js +11 -12
  257. package/dist/esm/plugins/table/nodeviews/update-overflow-shadows.js +25 -24
  258. package/dist/esm/plugins/table/pm-plugins/keymap.js +14 -13
  259. package/dist/esm/plugins/table/pm-plugins/main.js +8 -8
  260. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +4 -6
  261. package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin.js +2 -1
  262. package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +7 -8
  263. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
  264. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/dom.js +30 -28
  265. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -4
  266. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +3 -2
  267. package/dist/esm/plugins/table/pm-plugins/table-selection-keymap.js +3 -3
  268. package/dist/esm/plugins/table/toolbar.js +75 -73
  269. package/dist/esm/plugins/table/transforms/column-width.js +41 -38
  270. package/dist/esm/plugins/table/transforms/replace-table.js +4 -4
  271. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +2 -2
  272. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +25 -21
  273. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +6 -2
  274. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +6 -4
  275. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +9 -6
  276. package/dist/esm/plugins/table/ui/LayoutButton/index.js +2 -2
  277. package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +4 -5
  278. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  279. package/dist/esm/plugins/table/utils/analytics.js +22 -1
  280. package/dist/esm/plugins/table/utils/index.js +1 -1
  281. package/dist/esm/selection-api/api.js +23 -0
  282. package/dist/esm/types/browser.js +0 -1
  283. package/dist/esm/ui/ColorPalette/Color/index.js +1 -93
  284. package/dist/esm/ui/ColorPalette/Palettes/cellBackgroundColorPalette.js +1 -14
  285. package/dist/esm/ui/ColorPalette/Palettes/common.js +1 -19
  286. package/dist/esm/ui/ColorPalette/Palettes/paletteMessages.js +2 -113
  287. package/dist/esm/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -147
  288. package/dist/esm/ui/ColorPalette/Palettes/statusColorPalette.js +1 -51
  289. package/dist/esm/ui/ColorPalette/Palettes/textColorPalette.js +1 -25
  290. package/dist/esm/ui/ColorPalette/index.js +2 -64
  291. package/dist/esm/ui/Dropdown/index.js +2 -106
  292. package/dist/esm/ui/DropdownMenu/index.js +2 -265
  293. package/dist/esm/ui/Toolbar/types.js +1 -30
  294. package/dist/esm/ui/ToolbarButton/index.js +2 -102
  295. package/dist/esm/ui/WithPluginState/index.js +1 -1
  296. package/dist/esm/ui/styles.js +17 -20
  297. package/dist/esm/ui/with-outer-listeners.js +2 -139
  298. package/dist/esm/utils/dom.js +1 -113
  299. package/dist/esm/utils/index.js +5 -23
  300. package/dist/esm/utils/node-width.js +1 -73
  301. package/dist/esm/utils/nodes.js +1 -100
  302. package/dist/esm/utils/plugin-state-factory.js +1 -106
  303. package/dist/esm/utils/selection.js +2 -50
  304. package/dist/esm/utils/slice.js +1 -59
  305. package/dist/esm/utils/step.js +1 -37
  306. package/dist/esm/version-wrapper.js +1 -1
  307. package/dist/esm/version.json +1 -1
  308. package/dist/types/actions/index.d.ts +2 -16
  309. package/dist/types/analytics-api/api.d.ts +9 -0
  310. package/dist/types/analytics-api/attach-payload-into-transaction.d.ts +10 -0
  311. package/dist/types/analytics-api/editor-state-context.d.ts +9 -0
  312. package/dist/types/analytics-api/map-attributes.d.ts +2 -0
  313. package/dist/types/create-editor/ReactEditorView.d.ts +1 -0
  314. package/dist/types/create-editor/ReactEditorViewContext.d.ts +1 -7
  315. package/dist/types/create-editor/create-plugins-list.d.ts +5 -1
  316. package/dist/types/event-dispatcher/index.d.ts +2 -19
  317. package/dist/types/insert-api/api.d.ts +9 -0
  318. package/dist/types/insert-api/insert-content-handlers.d.ts +9 -0
  319. package/dist/types/insert-api/insert-node-helpers.d.ts +30 -0
  320. package/dist/types/insert-api/types.d.ts +16 -0
  321. package/dist/types/keymaps/index.d.ts +2 -89
  322. package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
  323. package/dist/types/labs/next/presets/mobile.d.ts +1 -1
  324. package/dist/types/messages.d.ts +2 -124
  325. package/dist/types/plugins/analytics/index.d.ts +2 -2
  326. package/dist/types/plugins/analytics/types/dispatch-analytics-event.d.ts +1 -2
  327. package/dist/types/plugins/analytics/types/enums.d.ts +1 -313
  328. package/dist/types/plugins/analytics/types/events.d.ts +1 -111
  329. package/dist/types/plugins/analytics/types/experimental-events.d.ts +1 -17
  330. package/dist/types/plugins/analytics/types/extension-events.d.ts +2 -43
  331. package/dist/types/plugins/analytics/types/general-events.d.ts +2 -179
  332. package/dist/types/plugins/analytics/types/index.d.ts +4 -14
  333. package/dist/types/plugins/analytics/types/inline-comment-events.d.ts +2 -17
  334. package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -76
  335. package/dist/types/plugins/analytics/types/media-events.d.ts +1 -16
  336. package/dist/types/plugins/analytics/types/node-events.d.ts +2 -56
  337. package/dist/types/plugins/analytics/types/selection-events.d.ts +1 -18
  338. package/dist/types/plugins/analytics/types/smart-links.d.ts +2 -13
  339. package/dist/types/plugins/analytics/types/toolbar-button.d.ts +2 -22
  340. package/dist/types/plugins/analytics/types/type-ahead.d.ts +1 -27
  341. package/dist/types/plugins/analytics/utils.d.ts +3 -8
  342. package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +1 -1
  343. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -1
  344. package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +1 -1
  345. package/dist/types/plugins/context-panel/types.d.ts +1 -3
  346. package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +1 -1
  347. package/dist/types/plugins/expand/utils.d.ts +1 -5
  348. package/dist/types/plugins/extension/actions.d.ts +2 -6
  349. package/dist/types/plugins/extension/commands.d.ts +7 -7
  350. package/dist/types/plugins/extension/plugin-factory.d.ts +2 -2
  351. package/dist/types/plugins/extension/ui/Extension/styles.d.ts +2 -2
  352. package/dist/types/plugins/find-replace/commands.d.ts +7 -7
  353. package/dist/types/plugins/find-replace/plugin.d.ts +1 -1
  354. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +1 -1
  355. package/dist/types/plugins/floating-toolbar/types.d.ts +1 -153
  356. package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +2 -1
  357. package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +2 -12
  358. package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -20
  359. package/dist/types/plugins/insert-block/index.d.ts +2 -0
  360. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/messages.d.ts +1 -167
  361. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +3 -1
  362. package/dist/types/plugins/layout/styles.d.ts +2 -2
  363. package/dist/types/plugins/layout/utils.d.ts +1 -15
  364. package/dist/types/plugins/media/commands/linking.d.ts +3 -3
  365. package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +1 -1
  366. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
  367. package/dist/types/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -2
  368. package/dist/types/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
  369. package/dist/types/plugins/media/pm-plugins/linking/index.d.ts +1 -1
  370. package/dist/types/plugins/mobile-dimensions/commands.d.ts +4 -4
  371. package/dist/types/plugins/mobile-dimensions/plugin-factory.d.ts +1 -1
  372. package/dist/types/plugins/paste/util/index.d.ts +2 -1
  373. package/dist/types/plugins/selection/commands.d.ts +1 -1
  374. package/dist/types/plugins/selection/gap-cursor/selection.d.ts +1 -40
  375. package/dist/types/plugins/selection/gap-cursor/utils/is-ignored.d.ts +1 -2
  376. package/dist/types/plugins/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -2
  377. package/dist/types/plugins/selection/gap-cursor-selection.d.ts +1 -1
  378. package/dist/types/plugins/selection/plugin-factory.d.ts +1 -1
  379. package/dist/types/plugins/selection/types.d.ts +4 -19
  380. package/dist/types/plugins/table/commands/go-to-next-cell.d.ts +3 -2
  381. package/dist/types/plugins/table/commands/hover.d.ts +7 -7
  382. package/dist/types/plugins/table/commands/insert.d.ts +5 -4
  383. package/dist/types/plugins/table/commands/misc.d.ts +8 -8
  384. package/dist/types/plugins/table/commands/selection.d.ts +4 -3
  385. package/dist/types/plugins/table/commands/toggle.d.ts +1 -1
  386. package/dist/types/plugins/table/commands-with-analytics.d.ts +21 -19
  387. package/dist/types/plugins/table/event-handlers.d.ts +4 -2
  388. package/dist/types/plugins/table/index.d.ts +7 -0
  389. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +4 -2
  390. package/dist/types/plugins/table/nodeviews/table.d.ts +2 -1
  391. package/dist/types/plugins/table/nodeviews/tableCell.d.ts +2 -1
  392. package/dist/types/plugins/table/nodeviews/types.d.ts +3 -0
  393. package/dist/types/plugins/table/nodeviews/update-overflow-shadows.d.ts +2 -1
  394. package/dist/types/plugins/table/pm-plugins/keymap.d.ts +3 -1
  395. package/dist/types/plugins/table/pm-plugins/main.d.ts +4 -2
  396. package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -1
  397. package/dist/types/plugins/table/pm-plugins/sticky-headers/commands.d.ts +2 -2
  398. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +2 -1
  399. package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
  400. package/dist/types/plugins/table/pm-plugins/sticky-headers/plugin.d.ts +2 -1
  401. package/dist/types/plugins/table/pm-plugins/table-resizing/commands.d.ts +4 -4
  402. package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +3 -1
  403. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin-factory.d.ts +2 -2
  404. package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +3 -1
  405. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/dom.d.ts +2 -1
  406. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +3 -1
  407. package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +2 -1
  408. package/dist/types/plugins/table/pm-plugins/table-selection-keymap.d.ts +2 -1
  409. package/dist/types/plugins/table/toolbar.d.ts +5 -3
  410. package/dist/types/plugins/table/transforms/column-width.d.ts +2 -1
  411. package/dist/types/plugins/table/transforms/replace-table.d.ts +3 -2
  412. package/dist/types/plugins/table/types.d.ts +3 -1
  413. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +1 -1
  414. package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +4 -0
  415. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +5 -1
  416. package/dist/types/plugins/table/ui/FloatingDeleteButton/index.d.ts +2 -0
  417. package/dist/types/plugins/table/ui/FloatingInsertButton/index.d.ts +5 -1
  418. package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +2 -0
  419. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +2 -0
  420. package/dist/types/plugins/table/utils/analytics.d.ts +3 -0
  421. package/dist/types/plugins/table/utils/index.d.ts +1 -1
  422. package/dist/types/plugins/type-ahead/types.d.ts +2 -50
  423. package/dist/types/plugins/width/index.d.ts +3 -6
  424. package/dist/types/selection-api/api.d.ts +11 -0
  425. package/dist/types/types/browser.d.ts +1 -10
  426. package/dist/types/types/editor-appearance.d.ts +1 -1
  427. package/dist/types/types/editor-plugin.d.ts +1 -59
  428. package/dist/types/types/editor-react-context.d.ts +1 -6
  429. package/dist/types/types/empty-state-handler.d.ts +1 -7
  430. package/dist/types/types/feature-flags.d.ts +1 -343
  431. package/dist/types/types/pm-config.d.ts +1 -14
  432. package/dist/types/types/pm-plugin.d.ts +1 -27
  433. package/dist/types/types/ui-components.d.ts +1 -22
  434. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +118 -118
  435. package/dist/types/ui/ColorPalette/Color/index.d.ts +1 -19
  436. package/dist/types/ui/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -2
  437. package/dist/types/ui/ColorPalette/Palettes/common.d.ts +1 -1
  438. package/dist/types/ui/ColorPalette/Palettes/paletteMessages.d.ts +2 -113
  439. package/dist/types/ui/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -3
  440. package/dist/types/ui/ColorPalette/Palettes/statusColorPalette.d.ts +1 -3
  441. package/dist/types/ui/ColorPalette/Palettes/textColorPalette.d.ts +1 -3
  442. package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -8
  443. package/dist/types/ui/ColorPalette/index.d.ts +2 -23
  444. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  445. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  446. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  447. package/dist/types/ui/Dropdown/index.d.ts +2 -33
  448. package/dist/types/ui/DropdownMenu/index.d.ts +2 -18
  449. package/dist/types/ui/DropdownMenu/types.d.ts +1 -43
  450. package/dist/types/ui/Toolbar/types.d.ts +2 -30
  451. package/dist/types/ui/ToolbarButton/index.d.ts +3 -52
  452. package/dist/types/ui/styles.d.ts +3 -3
  453. package/dist/types/ui/with-outer-listeners.d.ts +2 -10
  454. package/dist/types/utils/document-logger.d.ts +2 -7
  455. package/dist/types/utils/dom.d.ts +2 -26
  456. package/dist/types/utils/index.d.ts +3 -6
  457. package/dist/types/utils/node-width.d.ts +1 -7
  458. package/dist/types/utils/nodes.d.ts +1 -35
  459. package/dist/types/utils/performance/plugin-performance-report.d.ts +2 -25
  460. package/dist/types/utils/plugin-state-factory.d.ts +2 -16
  461. package/dist/types/utils/selection.d.ts +3 -6
  462. package/dist/types/utils/slice.d.ts +2 -11
  463. package/dist/types/utils/step.d.ts +1 -15
  464. package/package.json +8 -9
  465. package/dist/cjs/plugins/analytics/types/config-panel-events.js +0 -5
  466. package/dist/cjs/plugins/analytics/types/cut-copy-events.js +0 -5
  467. package/dist/cjs/plugins/analytics/types/date-events.js +0 -5
  468. package/dist/cjs/plugins/analytics/types/element-browser-events.js +0 -5
  469. package/dist/cjs/plugins/analytics/types/find-replace-events.js +0 -5
  470. package/dist/cjs/plugins/analytics/types/format-events.js +0 -24
  471. package/dist/cjs/plugins/analytics/types/insert-events.js +0 -51
  472. package/dist/cjs/plugins/analytics/types/list-events.js +0 -25
  473. package/dist/cjs/plugins/analytics/types/paste-events.js +0 -55
  474. package/dist/cjs/plugins/analytics/types/substitute-events.js +0 -24
  475. package/dist/cjs/plugins/analytics/types/table-events.js +0 -43
  476. package/dist/cjs/plugins/analytics/types/utils.js +0 -27
  477. package/dist/cjs/ui/ColorPalette/Color/styles.js +0 -21
  478. package/dist/cjs/ui/ColorPalette/Palettes/getColorMessage.js +0 -17
  479. package/dist/cjs/ui/ColorPalette/styles.js +0 -19
  480. package/dist/cjs/ui/DropList/index.js +0 -215
  481. package/dist/cjs/ui/Layer/index.js +0 -245
  482. package/dist/cjs/ui/Layer/internal/helpers.js +0 -70
  483. package/dist/cjs/ui/ToolbarButton/styles.js +0 -26
  484. package/dist/es2019/plugins/analytics/types/cut-copy-events.js +0 -1
  485. package/dist/es2019/plugins/analytics/types/date-events.js +0 -1
  486. package/dist/es2019/plugins/analytics/types/element-browser-events.js +0 -1
  487. package/dist/es2019/plugins/analytics/types/find-replace-events.js +0 -1
  488. package/dist/es2019/plugins/analytics/types/format-events.js +0 -16
  489. package/dist/es2019/plugins/analytics/types/insert-events.js +0 -41
  490. package/dist/es2019/plugins/analytics/types/list-events.js +0 -17
  491. package/dist/es2019/plugins/analytics/types/paste-events.js +0 -46
  492. package/dist/es2019/plugins/analytics/types/substitute-events.js +0 -16
  493. package/dist/es2019/plugins/analytics/types/table-events.js +0 -34
  494. package/dist/es2019/plugins/analytics/types/utils.js +0 -19
  495. package/dist/es2019/ui/ColorPalette/Color/styles.js +0 -24
  496. package/dist/es2019/ui/ColorPalette/Palettes/getColorMessage.js +0 -14
  497. package/dist/es2019/ui/ColorPalette/styles.js +0 -7
  498. package/dist/es2019/ui/DropList/index.js +0 -186
  499. package/dist/es2019/ui/Layer/index.js +0 -195
  500. package/dist/es2019/ui/Layer/internal/helpers.js +0 -62
  501. package/dist/es2019/ui/ToolbarButton/styles.js +0 -12
  502. package/dist/esm/plugins/analytics/types/avatar.js +0 -1
  503. package/dist/esm/plugins/analytics/types/config-panel-events.js +0 -1
  504. package/dist/esm/plugins/analytics/types/cut-copy-events.js +0 -1
  505. package/dist/esm/plugins/analytics/types/date-events.js +0 -1
  506. package/dist/esm/plugins/analytics/types/element-browser-events.js +0 -1
  507. package/dist/esm/plugins/analytics/types/find-replace-events.js +0 -1
  508. package/dist/esm/plugins/analytics/types/format-events.js +0 -16
  509. package/dist/esm/plugins/analytics/types/insert-events.js +0 -41
  510. package/dist/esm/plugins/analytics/types/list-events.js +0 -17
  511. package/dist/esm/plugins/analytics/types/paste-events.js +0 -46
  512. package/dist/esm/plugins/analytics/types/substitute-events.js +0 -16
  513. package/dist/esm/plugins/analytics/types/table-events.js +0 -34
  514. package/dist/esm/plugins/analytics/types/utils.js +0 -19
  515. package/dist/esm/ui/ColorPalette/Color/styles.js +0 -8
  516. package/dist/esm/ui/ColorPalette/Palettes/getColorMessage.js +0 -10
  517. package/dist/esm/ui/ColorPalette/styles.js +0 -7
  518. package/dist/esm/ui/DropList/index.js +0 -203
  519. package/dist/esm/ui/Layer/index.js +0 -228
  520. package/dist/esm/ui/Layer/internal/helpers.js +0 -62
  521. package/dist/esm/ui/ToolbarButton/styles.js +0 -12
  522. package/dist/types/plugins/analytics/types/avatar.d.ts +0 -5
  523. package/dist/types/plugins/analytics/types/config-panel-events.d.ts +0 -17
  524. package/dist/types/plugins/analytics/types/cut-copy-events.d.ts +0 -12
  525. package/dist/types/plugins/analytics/types/date-events.d.ts +0 -17
  526. package/dist/types/plugins/analytics/types/element-browser-events.d.ts +0 -11
  527. package/dist/types/plugins/analytics/types/find-replace-events.d.ts +0 -23
  528. package/dist/types/plugins/analytics/types/format-events.d.ts +0 -49
  529. package/dist/types/plugins/analytics/types/insert-events.d.ts +0 -128
  530. package/dist/types/plugins/analytics/types/list-events.d.ts +0 -52
  531. package/dist/types/plugins/analytics/types/paste-events.d.ts +0 -39
  532. package/dist/types/plugins/analytics/types/substitute-events.d.ts +0 -26
  533. package/dist/types/plugins/analytics/types/table-events.d.ts +0 -94
  534. package/dist/types/plugins/analytics/types/utils.d.ts +0 -45
  535. package/dist/types/ui/ColorPalette/Color/styles.d.ts +0 -2
  536. package/dist/types/ui/ColorPalette/Palettes/getColorMessage.d.ts +0 -2
  537. package/dist/types/ui/ColorPalette/styles.d.ts +0 -1
  538. package/dist/types/ui/DropList/index.d.ts +0 -22
  539. package/dist/types/ui/Layer/index.d.ts +0 -47
  540. package/dist/types/ui/Layer/internal/helpers.d.ts +0 -5
  541. package/dist/types/ui/ToolbarButton/styles.d.ts +0 -4
@@ -1,3 +1,4 @@
1
1
  import { Direction } from '@atlaskit/editor-tables/types';
2
- import { Command } from '../../../types/command';
3
- export declare const goToNextCell: (direction: Direction) => Command;
2
+ import { Command } from '@atlaskit/editor-common/types';
3
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (direction: Direction) => Command;
@@ -1,8 +1,8 @@
1
1
  import { CellColumnPositioning } from '../types';
2
- export declare const hoverMergedCells: () => import("../../..").Command;
3
- export declare const hoverColumns: (hoveredColumns: number[], isInDanger?: boolean | undefined) => import("../../..").Command;
4
- export declare const hoverRows: (hoveredRows: number[], isInDanger?: boolean | undefined) => import("../../..").Command;
5
- export declare const hoverTable: (isInDanger?: boolean | undefined, isSelected?: boolean | undefined) => import("../../..").Command;
6
- export declare const clearHoverSelection: () => import("../../..").Command;
7
- export declare const showResizeHandleLine: (cellColumnPositioning: CellColumnPositioning) => import("../../..").Command;
8
- export declare const hideResizeHandleLine: () => import("../../..").Command;
2
+ export declare const hoverMergedCells: () => import("@atlaskit/editor-common/types").Command;
3
+ export declare const hoverColumns: (hoveredColumns: number[], isInDanger?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
4
+ export declare const hoverRows: (hoveredRows: number[], isInDanger?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
5
+ export declare const hoverTable: (isInDanger?: boolean | undefined, isSelected?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
6
+ export declare const clearHoverSelection: () => import("@atlaskit/editor-common/types").Command;
7
+ export declare const showResizeHandleLine: (cellColumnPositioning: CellColumnPositioning) => import("@atlaskit/editor-common/types").Command;
8
+ export declare const hideResizeHandleLine: () => import("@atlaskit/editor-common/types").Command;
@@ -1,9 +1,10 @@
1
1
  import { Transaction } from 'prosemirror-state';
2
2
  import { Command } from '../../../types';
3
3
  import { EditorView } from 'prosemirror-view';
4
- export declare function addColumnAt(column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined): (tr: Transaction) => Transaction<any>;
5
- export declare const addColumnBefore: Command;
6
- export declare const addColumnAfter: Command;
7
- export declare const insertColumn: (column: number) => Command;
4
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
+ export declare function addColumnAt(getEditorContainerWidth: GetEditorContainerWidth): (column: number, allowAddColumnCustomStep: boolean | undefined, view: EditorView | undefined) => (tr: Transaction) => Transaction<any>;
6
+ export declare const addColumnBefore: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
7
+ export declare const addColumnAfter: (getEditorContainerWidth: GetEditorContainerWidth) => Command;
8
+ export declare const insertColumn: (getEditorContainerWidth: GetEditorContainerWidth) => (column: number) => Command;
8
9
  export declare const insertRow: (row: number, moveCursorToTheNewRow: boolean) => Command;
9
10
  export declare const createTable: () => Command;
@@ -3,8 +3,8 @@ import { Transaction } from 'prosemirror-state';
3
3
  import { ContentNodeWithPos } from 'prosemirror-utils';
4
4
  import { EditorView } from 'prosemirror-view';
5
5
  import { Command } from '../../../types';
6
- export declare const setEditorFocus: (editorHasFocus: boolean) => Command;
7
- export declare const setTableRef: (ref?: HTMLTableElement | undefined) => Command;
6
+ export declare const setEditorFocus: (editorHasFocus: boolean) => import("@atlaskit/editor-common/types").Command;
7
+ export declare const setTableRef: (ref?: HTMLTableElement | undefined) => import("@atlaskit/editor-common/types").Command;
8
8
  export declare const setCellAttr: (name: string, value: any) => Command;
9
9
  export declare const triggerUnlessTableHeader: (command: Command) => Command;
10
10
  export declare const transformSliceRemoveCellBackgroundColor: (slice: Slice, schema: Schema) => Slice;
@@ -15,12 +15,12 @@ export declare const deleteTableIfSelected: Command;
15
15
  export declare const convertFirstRowToHeader: (schema: Schema) => (tr: Transaction) => Transaction;
16
16
  export declare const moveCursorBackward: Command;
17
17
  export declare const setMultipleCellAttrs: (attrs: Object, targetCellPosition?: number | undefined) => Command;
18
- export declare const selectColumn: (column: number, expand?: boolean | undefined) => Command;
19
- export declare const selectRow: (row: number, expand?: boolean | undefined) => Command;
20
- export declare const showInsertColumnButton: (columnIndex: number) => Command;
21
- export declare const showInsertRowButton: (rowIndex: number) => Command;
22
- export declare const hideInsertColumnOrRowButton: () => Command;
23
- export declare const addResizeHandleDecorations: (columnIndex: number) => Command;
18
+ export declare const selectColumn: (column: number, expand?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
19
+ export declare const selectRow: (row: number, expand?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
20
+ export declare const showInsertColumnButton: (columnIndex: number) => import("@atlaskit/editor-common/types").Command;
21
+ export declare const showInsertRowButton: (rowIndex: number) => import("@atlaskit/editor-common/types").Command;
22
+ export declare const hideInsertColumnOrRowButton: () => import("@atlaskit/editor-common/types").Command;
23
+ export declare const addResizeHandleDecorations: (columnIndex: number) => import("@atlaskit/editor-common/types").Command;
24
24
  export declare const autoSizeTable: (view: EditorView, node: PMNode, table: HTMLTableElement, basePos: number, opts: {
25
25
  containerWidth: number;
26
26
  }) => boolean;
@@ -1,7 +1,8 @@
1
- import { Command } from '../../../types';
1
+ import type { Command } from '@atlaskit/editor-common/types';
2
+ import { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
2
3
  export declare enum TableSelectionDirection {
3
4
  TopToBottom = "TopToBottom",
4
5
  BottomToTop = "BottomToTop"
5
6
  }
6
- export declare const arrowLeftFromTable: Command;
7
- export declare const arrowRightFromTable: Command;
7
+ export declare const arrowLeftFromTable: (editorSelectionAPI: EditorSelectionAPI | undefined | null) => () => Command;
8
+ export declare const arrowRightFromTable: (editorSelectionAPI: EditorSelectionAPI | undefined | null) => () => Command;
@@ -9,4 +9,4 @@ export declare const toggleHeaderRow: Command;
9
9
  export declare const toggleHeaderColumn: Command;
10
10
  export declare const toggleNumberColumn: Command;
11
11
  export declare const toggleTableLayout: Command;
12
- export declare const toggleContextualMenu: () => Command;
12
+ export declare const toggleContextualMenu: () => import("@atlaskit/editor-common/types").Command;
@@ -1,24 +1,26 @@
1
1
  import { Rect } from '@atlaskit/editor-tables/table-map';
2
2
  import { Command } from '../../types';
3
- import { INPUT_METHOD } from '../analytics';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
5
  import { InsertRowMethods, InsertRowOptions, RowInsertPosition } from './types';
5
6
  import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
6
7
  import { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
7
- export declare const emptyMultipleCellsWithAnalytics: (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB, targetCellPosition?: number | undefined) => Command;
8
- export declare const mergeCellsWithAnalytics: () => Command;
9
- export declare const splitCellWithAnalytics: () => Command;
10
- export declare const setColorWithAnalytics: (cellColor: string, targetCellPosition?: number | undefined) => Command;
11
- export declare const addRowAroundSelection: (side: RowInsertPosition) => Command;
12
- export declare const insertRowWithAnalytics: (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
13
- export declare const insertColumnWithAnalytics: (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB, position: number) => Command;
14
- export declare const deleteRowsWithAnalytics: (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB, rect: Rect, isHeaderRowRequired: boolean) => Command;
15
- export declare const deleteColumnsWithAnalytics: (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB, rect: Rect) => Command;
16
- export declare const deleteTableWithAnalytics: () => Command;
17
- export declare const deleteTableIfSelectedWithAnalytics: (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => Command;
18
- export declare const toggleHeaderRowWithAnalytics: () => Command;
19
- export declare const toggleHeaderColumnWithAnalytics: () => Command;
20
- export declare const toggleNumberColumnWithAnalytics: () => Command;
21
- export declare const toggleTableLayoutWithAnalytics: () => Command;
22
- export declare const sortColumnWithAnalytics: (inputMethod: INPUT_METHOD.CONTEXT_MENU, columnIndex: number, sortOrder: SortOrder) => Command;
23
- export declare const distributeColumnsWidthsWithAnalytics: (inputMethod: INPUT_METHOD.CONTEXT_MENU, { resizeState, table, attributes }: ResizeStateWithAnalytics) => Command;
24
- export declare const wrapTableInExpandWithAnalytics: () => Command;
8
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
9
+ export declare const emptyMultipleCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB, targetCellPosition?: number | undefined) => import("@atlaskit/editor-common/types").Command;
10
+ export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => import("@atlaskit/editor-common/types").Command;
11
+ export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
12
+ export declare const setColorWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (cellColor: string, targetCellPosition?: number | undefined) => import("@atlaskit/editor-common/types").Command;
13
+ export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
14
+ export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => import("@atlaskit/editor-common/types").Command;
15
+ export declare const insertColumnWithAnalytics: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB, position: number) => import("@atlaskit/editor-common/types").Command;
16
+ export declare const deleteRowsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB, rect: Rect, isHeaderRowRequired: boolean) => import("@atlaskit/editor-common/types").Command;
17
+ export declare const deleteColumnsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.BUTTON | INPUT_METHOD.FLOATING_TB, rect: Rect) => import("@atlaskit/editor-common/types").Command;
18
+ export declare const deleteTableWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
19
+ export declare const deleteTableIfSelectedWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.FLOATING_TB | INPUT_METHOD.KEYBOARD) => import("@atlaskit/editor-common/types").Command;
20
+ export declare const toggleHeaderRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
21
+ export declare const toggleHeaderColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
22
+ export declare const toggleNumberColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
23
+ export declare const toggleTableLayoutWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
24
+ export declare const sortColumnWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU, columnIndex: number, sortOrder: SortOrder) => import("@atlaskit/editor-common/types").Command;
25
+ export declare const distributeColumnsWidthsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU, { resizeState, table, attributes }: ResizeStateWithAnalytics) => import("@atlaskit/editor-common/types").Command;
26
+ export declare const wrapTableInExpandWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => import("@atlaskit/editor-common/types").Command;
@@ -1,6 +1,8 @@
1
1
  import { EditorState, Transaction } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
4
  import { ElementContentRects } from './types';
5
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
6
  export declare const handleBlur: (view: EditorView, event: Event) => boolean;
5
7
  export declare const handleFocus: (view: EditorView, event: Event) => boolean;
6
8
  export declare const handleClick: (view: EditorView, event: Event) => boolean;
@@ -8,7 +10,7 @@ export declare const handleMouseOver: (view: EditorView, mouseEvent: Event) => b
8
10
  export declare const handleMouseDown: (_: EditorView, event: Event) => boolean;
9
11
  export declare const handleMouseOut: (view: EditorView, mouseEvent: Event) => boolean;
10
12
  export declare const handleMouseLeave: (view: EditorView, event: Event) => boolean;
11
- export declare const handleMouseMove: (view: EditorView, event: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean;
13
+ export declare const handleMouseMove: (getEditorFeatureFlags: GetEditorFeatureFlags) => (view: EditorView, event: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean;
12
14
  export declare function handleTripleClick(view: EditorView, pos: number): boolean;
13
- export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState) => Transaction;
15
+ export declare const handleCut: (oldTr: Transaction, oldState: EditorState, newState: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Transaction;
14
16
  export declare const whenTableInFocus: (eventHandler: (view: EditorView, mouseEvent: Event, tableCellOptimization?: boolean | undefined, elementContentRects?: ElementContentRects | undefined) => boolean, elementContentRects?: ElementContentRects | undefined) => (view: EditorView, mouseEvent: Event) => boolean;
@@ -1,11 +1,18 @@
1
1
  import { EditorPlugin } from '../../types';
2
2
  import { PluginConfig } from './types';
3
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
+ import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
5
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
3
6
  interface TablePluginOptions {
4
7
  tableOptions: PluginConfig;
5
8
  breakoutEnabled?: boolean;
6
9
  allowContextualMenu?: boolean;
7
10
  fullWidthEnabled?: boolean;
8
11
  wasFullWidthEnabled?: boolean;
12
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
13
+ editorSelectionAPI?: EditorSelectionAPI;
14
+ getEditorContainerWidth?: GetEditorContainerWidth;
15
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
9
16
  }
10
17
  declare const tablesPlugin: (options?: TablePluginOptions | undefined) => EditorPlugin;
11
18
  export default tablesPlugin;
@@ -1,13 +1,14 @@
1
1
  import React from 'react';
2
2
  import { Node as PmNode } from 'prosemirror-model';
3
3
  import { EditorView } from 'prosemirror-view';
4
- import { WidthPluginState } from '../../width';
4
+ import type { EditorContainerWidth } from '@atlaskit/editor-common/types';
5
5
  import { RowStickyState, StickyPluginState } from '../pm-plugins/sticky-headers';
6
6
  import { ColumnResizingPluginState, ShadowEvent } from '../types';
7
7
  import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
8
8
  import { TableOptions } from './types';
9
9
  import { EventDispatcher } from '../../../event-dispatcher';
10
10
  import { ForwardRef } from '../../../nodeviews/types';
11
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
11
12
  export interface ComponentProps {
12
13
  view: EditorView;
13
14
  getNode: () => PmNode;
@@ -16,7 +17,7 @@ export interface ComponentProps {
16
17
  getPos: () => number;
17
18
  options?: TableOptions;
18
19
  contentDOM: ForwardRef;
19
- containerWidth: WidthPluginState;
20
+ containerWidth: EditorContainerWidth;
20
21
  allowControls: boolean;
21
22
  isHeaderRowEnabled: boolean;
22
23
  isHeaderColumnEnabled: boolean;
@@ -24,6 +25,7 @@ export interface ComponentProps {
24
25
  tableActive: boolean;
25
26
  ordering: TableColumnOrdering;
26
27
  tableResizingPluginState?: ColumnResizingPluginState;
28
+ getEditorFeatureFlags: GetEditorFeatureFlags;
27
29
  }
28
30
  interface TableState {
29
31
  scroll: number;
@@ -6,6 +6,7 @@ import { ForwardRef, getPosHandler, getPosHandlerNode } from '../../../nodeviews
6
6
  import ReactNodeView from '../../../nodeviews/ReactNodeView';
7
7
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
8
8
  import { Props, TableOptions } from './types';
9
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
9
10
  export default class TableView extends ReactNodeView<Props> {
10
11
  private table;
11
12
  private resizeObserver?;
@@ -25,4 +26,4 @@ export default class TableView extends ReactNodeView<Props> {
25
26
  ignoreMutation(): boolean;
26
27
  destroy(): void;
27
28
  }
28
- export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, options: TableOptions) => NodeView;
29
+ export declare const createTableView: (node: PmNode, view: EditorView, getPos: getPosHandler, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, options: TableOptions, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags) => NodeView;
@@ -2,6 +2,7 @@ import { Node } from 'prosemirror-model';
2
2
  import { EditorView, NodeView } from 'prosemirror-view';
3
3
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import { getPosHandler } from '../../../../src/nodeviews';
5
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
5
6
  export default class TableCellNodeView implements NodeView {
6
7
  node: Node;
7
8
  dom: HTMLElement;
@@ -11,7 +12,7 @@ export default class TableCellNodeView implements NodeView {
11
12
  providerFactory?: ProviderFactory;
12
13
  observer?: ResizeObserver;
13
14
  mouseMoveOptimization?: boolean;
14
- constructor(node: Node, view: EditorView, getPos: any, observer?: ResizeObserver);
15
+ constructor(node: Node, view: EditorView, getPos: any, getEditorFeatureFlags: GetEditorFeatureFlags, observer?: ResizeObserver);
15
16
  private updateNodeView;
16
17
  update(node: Node): boolean;
17
18
  destroy(): void;
@@ -1,5 +1,6 @@
1
1
  import { Node as PmNode } from 'prosemirror-model';
2
2
  import { EditorView } from 'prosemirror-view';
3
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
3
4
  import { EventDispatcher } from '../../../event-dispatcher';
4
5
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
5
6
  export declare type TableOptions = {
@@ -17,4 +18,6 @@ export interface Props {
17
18
  getPos: () => number;
18
19
  options?: TableOptions;
19
20
  tableRenderOptimization?: boolean;
21
+ getEditorContainerWidth: GetEditorContainerWidth;
22
+ getEditorFeatureFlags: GetEditorFeatureFlags;
20
23
  }
@@ -1,7 +1,8 @@
1
1
  import { EditorState } from 'prosemirror-state';
2
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
2
3
  export declare const updateShadowListForStickyStyles: (heightStyle: string, shadows: HTMLCollection) => void;
3
4
  /**
4
5
  * Update overflow shadows for a given wrapper & table.
5
6
  * if `overflowShadowOptimization` is enabled, this will exit early.
6
7
  */
7
- export declare const updateOverflowShadows: (editorState: EditorState, wrapper?: HTMLElement | null | undefined, table?: HTMLElement | null | undefined, rightShadows?: NodeListOf<HTMLElement> | null | undefined, leftShadows?: NodeListOf<HTMLElement> | null | undefined) => false | undefined;
8
+ export declare const updateOverflowShadows: (getEditorFeatureFlags: GetEditorFeatureFlags) => (editorState: EditorState, wrapper?: HTMLElement | null | undefined, table?: HTMLElement | null | undefined, rightShadows?: NodeListOf<HTMLElement> | null | undefined, leftShadows?: NodeListOf<HTMLElement> | null | undefined) => false | undefined;
@@ -1,3 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- export declare function keymapPlugin(): SafePlugin;
2
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
4
+ export declare function keymapPlugin(getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null): SafePlugin;
3
5
  export default keymapPlugin;
@@ -2,5 +2,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
3
3
  import { PortalProviderAPI } from '../../../ui/PortalProvider';
4
4
  import { PluginConfig } from '../types';
5
- import { DispatchAnalyticsEvent } from '../../analytics/types/dispatch-analytics-event';
6
- export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, breakoutEnabled?: boolean | undefined, fullWidthModeEnabled?: boolean | undefined, previousFullWidthModeEnabled?: boolean | undefined) => SafePlugin<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>;
5
+ import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
8
+ export declare const createPlugin: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginConfig: PluginConfig, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, breakoutEnabled?: boolean | undefined, fullWidthModeEnabled?: boolean | undefined, previousFullWidthModeEnabled?: boolean | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => SafePlugin<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>;
@@ -1 +1 @@
1
- export declare const createPluginState: (dispatch: import("../../../event-dispatcher").Dispatch<any>, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState<any>) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>, createCommand: <A = import("../types").TablePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("../../..").Command, getPluginState: (state: import("prosemirror-state").EditorState<any>) => import("../types").TablePluginState;
1
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState<any>) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState, import("prosemirror-model").Schema<any, any>>, createCommand: <A = import("../types").TablePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState<any>) => import("../types").TablePluginState;
@@ -1,3 +1,3 @@
1
1
  import { RowStickyState } from './types';
2
- export declare const updateStickyState: (rowState: RowStickyState) => import("../../../..").Command;
3
- export declare const removeStickyState: (pos: number) => import("../../../..").Command;
2
+ export declare const updateStickyState: (rowState: RowStickyState) => import("@atlaskit/editor-common/types").Command;
3
+ export declare const removeStickyState: (pos: number) => import("@atlaskit/editor-common/types").Command;
@@ -4,6 +4,7 @@ import { EditorView, NodeView } from 'prosemirror-view';
4
4
  import { EventDispatcher } from '../../../../../event-dispatcher';
5
5
  import { TablePluginState } from '../../../types';
6
6
  import { TableDOMElements } from './dom';
7
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
7
8
  export declare const supportedHeaderRow: (node: PmNode) => boolean;
8
9
  export declare class TableRowNodeView implements NodeView {
9
10
  view: EditorView;
@@ -26,7 +27,7 @@ export declare class TableRowNodeView implements NodeView {
26
27
  private sentinels;
27
28
  private stickyRowHeight?;
28
29
  get tree(): TableDOMElements | null | undefined;
29
- constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher);
30
+ constructor(node: PmNode, view: EditorView, getPos: any, eventDispatcher: EventDispatcher, getEditorFeatureFlags: GetEditorFeatureFlags);
30
31
  listening: boolean;
31
32
  headerRowMouseScrollEnd: import("lodash").DebouncedFunc<() => void>;
32
33
  headerRowMouseScroll: import("lodash").DebouncedFunc<() => void>;
@@ -1,3 +1,3 @@
1
1
  import { StickyPluginAction, StickyPluginState } from './types';
2
- declare const createPluginState: (dispatch: import("../../../../event-dispatcher").Dispatch<any>, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState<any>) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState, import("prosemirror-model").Schema<any, any>>, createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("../../../..").Command;
2
+ declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState<any>) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState, import("prosemirror-model").Schema<any, any>>, createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command;
3
3
  export { createPluginState, createCommand };
@@ -1,3 +1,4 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
2
3
  import { Dispatch, EventDispatcher } from '../../../../event-dispatcher';
3
- export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState?: () => never[]) => SafePlugin<import("./types").StickyPluginState, import("prosemirror-model").Schema<any, any>>;
4
+ export declare const createPlugin: (dispatch: Dispatch, eventDispatcher: EventDispatcher, initialState: (() => never[]) | undefined, getEditorFeatureFlags: GetEditorFeatureFlags) => SafePlugin<import("./types").StickyPluginState, import("prosemirror-model").Schema<any, any>>;
@@ -11,14 +11,14 @@ export declare const evenColumns: ({ resizeState, table, start, event, }: {
11
11
  event: MouseEvent;
12
12
  }) => Command;
13
13
  export declare const distributeColumnsWidths: (newResizeState: ResizeState, table: ContentNodeWithPos) => Command;
14
- export declare const setResizeHandlePos: (resizeHandlePos: number | null) => Command;
15
- export declare const stopResizing: (tr?: Transaction<any> | undefined) => Command;
14
+ export declare const setResizeHandlePos: (resizeHandlePos: number | null) => import("@atlaskit/editor-common/types").Command;
15
+ export declare const stopResizing: (tr?: Transaction<any> | undefined) => import("@atlaskit/editor-common/types").Command;
16
16
  export declare const setDragging: (dragging: {
17
17
  startX: number;
18
18
  startWidth: number;
19
- } | null, tr?: Transaction<any> | undefined) => Command;
19
+ } | null, tr?: Transaction<any> | undefined) => import("@atlaskit/editor-common/types").Command;
20
20
  export declare const setLastClick: (lastClick: {
21
21
  x: number;
22
22
  y: number;
23
23
  time: number;
24
- } | null, transform?: ((tr: Transaction) => Transaction) | undefined) => Command;
24
+ } | null, transform?: ((tr: Transaction) => Transaction) | undefined) => import("@atlaskit/editor-common/types").Command;
@@ -1,2 +1,4 @@
1
1
  import { EditorView } from 'prosemirror-view';
2
- export declare const handleMouseDown: (view: EditorView, event: MouseEvent, localResizeHandlePos: number) => boolean;
2
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
+ export declare const handleMouseDown: (view: EditorView, event: MouseEvent, localResizeHandlePos: number, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
@@ -1,4 +1,4 @@
1
1
  import { ColumnResizingPluginState } from '../../types';
2
- export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("../../../..").Command;
3
- export declare const createPluginState: (dispatch: import("../../../../event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState<any>) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState, import("prosemirror-model").Schema<any, any>>;
2
+ export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState<any>>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction<any>, state: import("prosemirror-state").EditorState<any>) => import("prosemirror-state").Transaction<any>) | undefined) => import("@atlaskit/editor-common/types").Command;
3
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState<any>) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState, import("prosemirror-model").Schema<any, any>>;
4
4
  export declare const getPluginState: (state: import("prosemirror-state").EditorState<any>) => ColumnResizingPluginState;
@@ -1,4 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { Dispatch } from '../../../../event-dispatcher';
3
3
  import { ColumnResizingPluginState } from '../../types';
4
- export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState): SafePlugin<ColumnResizingPluginState, import("prosemirror-model").Schema<any, any>>;
4
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
+ import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
6
+ export declare function createPlugin(dispatch: Dispatch<ColumnResizingPluginState>, { lastColumnResizable }: ColumnResizingPluginState, getEditorContainerWidth: GetEditorContainerWidth, getEditorFeatureFlags: GetEditorFeatureFlags, editorAnalyticsAPI?: EditorAnalyticsAPI): SafePlugin<ColumnResizingPluginState, import("prosemirror-model").Schema<any, any>>;
@@ -1,6 +1,7 @@
1
1
  import { EditorState } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
- export declare const updateControls: (state: EditorState) => void;
3
+ import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
+ export declare const updateControls: (getEditorFeatureFlags: GetEditorFeatureFlags) => (state: EditorState) => void;
4
5
  export declare const isClickNear: (event: MouseEvent, click: {
5
6
  x: number;
6
7
  y: number;
@@ -4,6 +4,7 @@ import { CellAttributes, TableLayout } from '@atlaskit/adf-schema';
4
4
  import { TableOptions } from '../../../nodeviews/types';
5
5
  import { Node as PMNode } from 'prosemirror-model';
6
6
  import { EditorState } from 'prosemirror-state';
7
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
7
8
  export declare const tableLayoutToSize: Record<string, number>;
8
9
  export declare function getLayoutSize(tableLayout: TableLayout, containerWidth: number | undefined, options: TableOptions): number;
9
10
  export declare function getDefaultLayoutMaxWidth(containerWidth?: number): number;
@@ -15,6 +16,7 @@ interface getTableMaxWidthProps {
15
16
  tableStart: number;
16
17
  state: EditorState;
17
18
  layout: TableLayout;
19
+ getEditorContainerWidth: GetEditorContainerWidth;
18
20
  }
19
- export declare const getTableMaxWidth: ({ table, tableStart, state, layout, }: getTableMaxWidthProps) => any;
21
+ export declare const getTableMaxWidth: ({ table, tableStart, state, layout, getEditorContainerWidth, }: getTableMaxWidthProps) => any;
20
22
  export {};
@@ -3,6 +3,7 @@ import { Rect } from '@atlaskit/editor-tables/table-map';
3
3
  import { TableLayout } from '@atlaskit/adf-schema';
4
4
  import { ResizeState, ResizeStateWithAnalytics } from './types';
5
5
  import { EditorState } from 'prosemirror-state';
6
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
7
  export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, }: {
7
8
  minWidth: number;
8
9
  maxSize: number;
@@ -25,4 +26,4 @@ export declare const normaliseTableLayout: (input: string | undefined | null) =>
25
26
  export declare const getNewResizeStateFromSelectedColumns: (rect: Rect, state: EditorState, domAtPos: (pos: number) => {
26
27
  node: Node;
27
28
  offset: number;
28
- }) => ResizeStateWithAnalytics | undefined;
29
+ }, getEditorContainerWidth: GetEditorContainerWidth) => ResizeStateWithAnalytics | undefined;
@@ -1,3 +1,4 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- export declare function tableSelectionKeymapPlugin(): SafePlugin;
2
+ import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
3
+ export declare function tableSelectionKeymapPlugin(editorSelectionAPI: EditorSelectionAPI | undefined | null): SafePlugin;
3
4
  export default tableSelectionKeymapPlugin;
@@ -3,6 +3,8 @@ import { FloatingToolbarDropdown, FloatingToolbarHandler, FloatingToolbarItem }
3
3
  import { ToolbarMenuConfig, ToolbarMenuState, ToolbarMenuContext, PluginConfig } from './types';
4
4
  import { EditorState } from 'prosemirror-state';
5
5
  import { Rect } from '@atlaskit/editor-tables/table-map';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
8
  export declare const messages: {
7
9
  tableOptions: {
8
10
  id: string;
@@ -30,6 +32,6 @@ export declare const messages: {
30
32
  description: string;
31
33
  };
32
34
  };
33
- export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext) => FloatingToolbarItem<Command>;
34
- export declare const getToolbarCellOptionsConfig: (editorState: EditorState, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext) => FloatingToolbarDropdown<Command>;
35
- export declare const getToolbarConfig: (config: PluginConfig) => FloatingToolbarHandler;
35
+ export declare const getToolbarMenuConfig: (config: ToolbarMenuConfig, state: ToolbarMenuState, { formatMessage }: ToolbarMenuContext, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => FloatingToolbarItem<Command>;
36
+ export declare const getToolbarCellOptionsConfig: (editorState: EditorState, initialSelectionRect: Rect, { formatMessage }: ToolbarMenuContext, getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => FloatingToolbarDropdown<Command>;
37
+ export declare const getToolbarConfig: (getEditorContainerWidth: GetEditorContainerWidth, editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (config: PluginConfig) => FloatingToolbarHandler;
@@ -3,6 +3,7 @@ import { Transaction } from 'prosemirror-state';
3
3
  import { ResizeState } from '../pm-plugins/table-resizing/utils';
4
4
  import { ContentNodeWithPos } from 'prosemirror-utils';
5
5
  import { EditorView } from 'prosemirror-view';
6
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
7
  export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNode, start: number) => (tr: Transaction) => Transaction;
7
8
  /**
8
9
  * This function is called when user inserts/deletes a column in a table to;
@@ -14,4 +15,4 @@ export declare const updateColumnWidths: (resizeState: ResizeState, table: PMNod
14
15
  * @param view
15
16
  * @returns Updated transaction with rescaled columns for a given table
16
17
  */
17
- export declare const rescaleColumns: (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
18
+ export declare const rescaleColumns: (getEditorContainerWidth: GetEditorContainerWidth) => (table: ContentNodeWithPos, view: EditorView | undefined) => (tr: Transaction) => Transaction;
@@ -1,4 +1,5 @@
1
1
  import { Transaction, EditorState } from 'prosemirror-state';
2
2
  import { Slice } from 'prosemirror-model';
3
- import { INPUT_METHOD } from '../../analytics';
4
- export declare const replaceSelectedTable: (state: EditorState, content: string | Slice, inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.CLIPBOARD) => Transaction;
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
+ export declare const replaceSelectedTable: (state: EditorState, content: string | Slice, inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.CLIPBOARD, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Transaction;
@@ -5,7 +5,7 @@ import { DecorationSet } from 'prosemirror-view';
5
5
  import { IntlShape } from 'react-intl-next';
6
6
  import { TableLayout } from '@atlaskit/adf-schema';
7
7
  import { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
8
- import { INPUT_METHOD } from '../analytics/types/enums';
8
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
9
9
  export declare const RESIZE_HANDLE_AREA_DECORATION_GAP = 30;
10
10
  export declare type RowInsertPosition = 'TOP' | 'BOTTOM';
11
11
  export declare type PermittedLayoutsDescriptor = TableLayout[] | 'all';
@@ -292,6 +292,8 @@ export declare const TableCssClassName: {
292
292
  TABLE_CELL_NODEVIEW_CONTENT_DOM: string;
293
293
  TABLE_CELL_WRAPPER: string;
294
294
  TABLE_HEADER_CELL_WRAPPER: string;
295
+ TABLE_ROW_CONTROLS_WRAPPER: string;
296
+ TABLE_COLUMN_CONTROLS_DECORATIONS: string;
295
297
  };
296
298
  export interface ToolbarMenuConfig {
297
299
  allowHeaderRow?: boolean;
@@ -5,7 +5,7 @@ import { EditorView } from 'prosemirror-view';
5
5
  import { WrappedComponentProps } from 'react-intl-next';
6
6
  import { TableLayout } from '@atlaskit/adf-schema';
7
7
  import { RowStickyState } from '../../pm-plugins/sticky-headers';
8
- import { DispatchAnalyticsEvent } from '../../../analytics/types';
8
+ import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
9
9
  import { Node as PMNode } from 'prosemirror-model';
10
10
  export interface Props {
11
11
  editorView: EditorView;
@@ -4,6 +4,8 @@ import { jsx } from '@emotion/react';
4
4
  import { Rect } from '@atlaskit/editor-tables/table-map';
5
5
  import { EditorView } from 'prosemirror-view';
6
6
  import { WrappedComponentProps } from 'react-intl-next';
7
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
7
9
  export declare const messages: {
8
10
  cellBackground: {
9
11
  id: string;
@@ -57,6 +59,8 @@ export interface Props {
57
59
  allowBackgroundColor?: boolean;
58
60
  boundariesElement?: HTMLElement;
59
61
  offset?: Array<number>;
62
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
63
+ getEditorContainerWidth: GetEditorContainerWidth;
60
64
  }
61
65
  export interface State {
62
66
  isSubmenuOpen: boolean;
@@ -2,17 +2,21 @@
2
2
  import { jsx } from '@emotion/react';
3
3
  import { EditorView } from 'prosemirror-view';
4
4
  import { PluginConfig } from '../../types';
5
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
+ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
7
  export interface Props {
6
8
  editorView: EditorView;
7
9
  isOpen: boolean;
10
+ getEditorContainerWidth: GetEditorContainerWidth;
8
11
  targetCellPosition?: number;
9
12
  mountPoint?: HTMLElement;
10
13
  boundariesElement?: HTMLElement;
11
14
  scrollableElement?: HTMLElement;
12
15
  pluginConfig?: PluginConfig;
16
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
13
17
  }
14
18
  declare const FloatingContextualMenu: {
15
- ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, }: Props): jsx.JSX.Element | null;
19
+ ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, pluginConfig, editorAnalyticsAPI, getEditorContainerWidth, }: Props): jsx.JSX.Element | null;
16
20
  displayName: string;
17
21
  };
18
22
  export default FloatingContextualMenu;
@@ -3,6 +3,7 @@ import { Selection } from 'prosemirror-state';
3
3
  import { EditorView } from 'prosemirror-view';
4
4
  import { RowStickyState } from '../../pm-plugins/sticky-headers';
5
5
  import { CellSelectionType } from './types';
6
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
7
  export interface Props {
7
8
  editorView: EditorView;
8
9
  selection: Selection;
@@ -12,6 +13,7 @@ export interface Props {
12
13
  scrollableElement?: HTMLElement;
13
14
  stickyHeaders?: RowStickyState;
14
15
  isNumberColumnEnabled?: boolean;
16
+ editorAnalyticsAPI?: EditorAnalyticsAPI;
15
17
  }
16
18
  export interface State {
17
19
  selectionType?: CellSelectionType;