@atlaskit/editor-core 187.17.5 → 187.18.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 (253) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -2
  3. package/dist/cjs/plugins/annotation/toolbar.js +31 -8
  4. package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +7 -41
  5. package/dist/cjs/plugins/index.js +0 -7
  6. package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +0 -3
  7. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +27 -13
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/cjs/version.json +1 -1
  10. package/dist/es2019/labs/next/presets/default.js +1 -1
  11. package/dist/es2019/plugins/annotation/toolbar.js +34 -9
  12. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +9 -41
  13. package/dist/es2019/plugins/index.js +0 -1
  14. package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +0 -3
  15. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +27 -13
  16. package/dist/es2019/version-wrapper.js +1 -1
  17. package/dist/es2019/version.json +1 -1
  18. package/dist/esm/labs/next/presets/default.js +1 -1
  19. package/dist/esm/plugins/annotation/toolbar.js +30 -7
  20. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +7 -41
  21. package/dist/esm/plugins/index.js +0 -1
  22. package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +0 -3
  23. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +27 -13
  24. package/dist/esm/version-wrapper.js +1 -1
  25. package/dist/esm/version.json +1 -1
  26. package/dist/types/extensibility.d.ts +0 -2
  27. package/dist/types/index.d.ts +0 -5
  28. package/dist/types/labs/next/presets/default.d.ts +28 -30
  29. package/dist/types/plugins/analytics/index.d.ts +0 -2
  30. package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
  31. package/dist/types/plugins/annotation/types.d.ts +9 -3
  32. package/dist/types/plugins/annotation/utils.d.ts +2 -5
  33. package/dist/types/plugins/base/pm-plugins/context-identifier.d.ts +1 -1
  34. package/dist/types/plugins/block-type/commands/block-type.d.ts +0 -2
  35. package/dist/types/plugins/block-type/pm-plugins/main.d.ts +6 -1
  36. package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +1 -1
  37. package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +0 -2
  38. package/dist/types/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.d.ts +5 -1
  39. package/dist/types/plugins/code-block/pm-plugins/main.d.ts +2 -1
  40. package/dist/types/plugins/code-block/utils.d.ts +1 -1
  41. package/dist/types/plugins/collab-edit/utils.d.ts +1 -5
  42. package/dist/types/plugins/copy-button/pm-plugins/main.d.ts +10 -1
  43. package/dist/types/plugins/copy-button/toolbar.d.ts +0 -2
  44. package/dist/types/plugins/copy-button/utils.d.ts +1 -1
  45. package/dist/types/plugins/custom-autoformat/index.d.ts +2 -1
  46. package/dist/types/plugins/date/pm-plugins/main.d.ts +0 -2
  47. package/dist/types/plugins/expand/pm-plugins/main.d.ts +1 -1
  48. package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -2
  49. package/dist/types/plugins/extension/plugin-factory.d.ts +0 -2
  50. package/dist/types/plugins/extension/utils.d.ts +1 -1
  51. package/dist/types/plugins/find-replace/plugin.d.ts +0 -2
  52. package/dist/types/plugins/find-replace/utils/index.d.ts +1 -4
  53. package/dist/types/plugins/floating-toolbar/pm-plugins/force-focus/index.d.ts +3 -1
  54. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +0 -2
  55. package/dist/types/plugins/index.d.ts +0 -1
  56. package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +1 -2
  57. package/dist/types/plugins/media/commands/helpers.d.ts +1 -1
  58. package/dist/types/plugins/media/pm-plugins/alt-text/index.d.ts +1 -3
  59. package/dist/types/plugins/media/pm-plugins/linking/index.d.ts +0 -2
  60. package/dist/types/plugins/media/toolbar/utils.d.ts +1 -3
  61. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +0 -1
  62. package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +0 -1
  63. package/dist/types/plugins/mobile-dimensions/plugin-factory.d.ts +0 -2
  64. package/dist/types/plugins/panel/utils.d.ts +1 -1
  65. package/dist/types/plugins/paste/pm-plugins/main.d.ts +1 -1
  66. package/dist/types/plugins/paste/pm-plugins/plugin-factory.d.ts +0 -2
  67. package/dist/types/plugins/paste/util/index.d.ts +1 -1
  68. package/dist/types/plugins/selection/plugin-factory.d.ts +0 -2
  69. package/dist/types/plugins/selection/pm-plugins/gap-cursor-main.d.ts +1 -1
  70. package/dist/types/plugins/selection/pm-plugins/selection-main.d.ts +1 -1
  71. package/dist/types/plugins/tasks-and-decisions/pm-plugins/helpers.d.ts +1 -2
  72. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  73. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  74. package/dist/types/utils/action.d.ts +1 -60
  75. package/dist/types/utils/list-commands.d.ts +0 -1
  76. package/dist/types-ts4.5/extensibility.d.ts +0 -2
  77. package/dist/types-ts4.5/index.d.ts +0 -5
  78. package/dist/types-ts4.5/labs/next/presets/default.d.ts +28 -30
  79. package/dist/types-ts4.5/plugins/analytics/index.d.ts +0 -2
  80. package/dist/types-ts4.5/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
  81. package/dist/types-ts4.5/plugins/annotation/types.d.ts +9 -3
  82. package/dist/types-ts4.5/plugins/annotation/utils.d.ts +2 -5
  83. package/dist/types-ts4.5/plugins/base/pm-plugins/context-identifier.d.ts +1 -1
  84. package/dist/types-ts4.5/plugins/block-type/commands/block-type.d.ts +0 -2
  85. package/dist/types-ts4.5/plugins/block-type/pm-plugins/main.d.ts +6 -1
  86. package/dist/types-ts4.5/plugins/code-bidi-warning/pm-plugins/main.d.ts +1 -1
  87. package/dist/types-ts4.5/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +0 -2
  88. package/dist/types-ts4.5/plugins/code-block/pm-plugins/codeBlockCopySelectionPlugin.d.ts +8 -1
  89. package/dist/types-ts4.5/plugins/code-block/pm-plugins/main.d.ts +2 -1
  90. package/dist/types-ts4.5/plugins/code-block/utils.d.ts +1 -1
  91. package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +1 -5
  92. package/dist/types-ts4.5/plugins/copy-button/pm-plugins/main.d.ts +10 -1
  93. package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +0 -2
  94. package/dist/types-ts4.5/plugins/copy-button/utils.d.ts +1 -1
  95. package/dist/types-ts4.5/plugins/custom-autoformat/index.d.ts +2 -1
  96. package/dist/types-ts4.5/plugins/date/pm-plugins/main.d.ts +0 -2
  97. package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +1 -1
  98. package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -2
  99. package/dist/types-ts4.5/plugins/extension/plugin-factory.d.ts +0 -2
  100. package/dist/types-ts4.5/plugins/extension/utils.d.ts +1 -1
  101. package/dist/types-ts4.5/plugins/find-replace/plugin.d.ts +0 -2
  102. package/dist/types-ts4.5/plugins/find-replace/utils/index.d.ts +1 -4
  103. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/force-focus/index.d.ts +3 -1
  104. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +0 -2
  105. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  106. package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +1 -2
  107. package/dist/types-ts4.5/plugins/media/commands/helpers.d.ts +1 -1
  108. package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/index.d.ts +1 -3
  109. package/dist/types-ts4.5/plugins/media/pm-plugins/linking/index.d.ts +0 -2
  110. package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +1 -3
  111. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +0 -1
  112. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/index.d.ts +0 -1
  113. package/dist/types-ts4.5/plugins/mobile-dimensions/plugin-factory.d.ts +0 -2
  114. package/dist/types-ts4.5/plugins/panel/utils.d.ts +1 -1
  115. package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +1 -1
  116. package/dist/types-ts4.5/plugins/paste/pm-plugins/plugin-factory.d.ts +0 -2
  117. package/dist/types-ts4.5/plugins/paste/util/index.d.ts +1 -1
  118. package/dist/types-ts4.5/plugins/selection/plugin-factory.d.ts +0 -2
  119. package/dist/types-ts4.5/plugins/selection/pm-plugins/gap-cursor-main.d.ts +1 -1
  120. package/dist/types-ts4.5/plugins/selection/pm-plugins/selection-main.d.ts +1 -1
  121. package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/helpers.d.ts +1 -2
  122. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  123. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  124. package/dist/types-ts4.5/utils/action.d.ts +1 -60
  125. package/dist/types-ts4.5/utils/list-commands.d.ts +0 -1
  126. package/package.json +5 -4
  127. package/report.api.md +1 -24
  128. package/tmp/api-report-tmp.d.ts +1 -21
  129. package/dist/cjs/plugins/text-formatting/actions.js +0 -188
  130. package/dist/cjs/plugins/text-formatting/commands/clear-formatting.js +0 -111
  131. package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +0 -143
  132. package/dist/cjs/plugins/text-formatting/commands/transform-to-code.js +0 -68
  133. package/dist/cjs/plugins/text-formatting/index.js +0 -136
  134. package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -21
  135. package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -36
  136. package/dist/cjs/plugins/text-formatting/pm-plugins/cursor.js +0 -55
  137. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +0 -276
  138. package/dist/cjs/plugins/text-formatting/pm-plugins/keymap.js +0 -52
  139. package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +0 -113
  140. package/dist/cjs/plugins/text-formatting/pm-plugins/plugin-key.js +0 -9
  141. package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -176
  142. package/dist/cjs/plugins/text-formatting/ui/Toolbar/constants.js +0 -19
  143. package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -86
  144. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -53
  145. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -225
  146. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -23
  147. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -60
  148. package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +0 -201
  149. package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +0 -40
  150. package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -46
  151. package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +0 -17
  152. package/dist/cjs/plugins/text-formatting/utils/cell-selection.js +0 -12
  153. package/dist/cjs/plugins/text-formatting/utils.js +0 -86
  154. package/dist/es2019/plugins/text-formatting/actions.js +0 -161
  155. package/dist/es2019/plugins/text-formatting/commands/clear-formatting.js +0 -105
  156. package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +0 -144
  157. package/dist/es2019/plugins/text-formatting/commands/transform-to-code.js +0 -71
  158. package/dist/es2019/plugins/text-formatting/index.js +0 -127
  159. package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -10
  160. package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -26
  161. package/dist/es2019/plugins/text-formatting/pm-plugins/cursor.js +0 -52
  162. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +0 -244
  163. package/dist/es2019/plugins/text-formatting/pm-plugins/keymap.js +0 -43
  164. package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +0 -109
  165. package/dist/es2019/plugins/text-formatting/pm-plugins/plugin-key.js +0 -2
  166. package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -155
  167. package/dist/es2019/plugins/text-formatting/ui/Toolbar/constants.js +0 -20
  168. package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -66
  169. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -42
  170. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -210
  171. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -11
  172. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -48
  173. package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +0 -168
  174. package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +0 -32
  175. package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -36
  176. package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +0 -10
  177. package/dist/es2019/plugins/text-formatting/utils/cell-selection.js +0 -5
  178. package/dist/es2019/plugins/text-formatting/utils.js +0 -74
  179. package/dist/esm/plugins/text-formatting/actions.js +0 -168
  180. package/dist/esm/plugins/text-formatting/commands/clear-formatting.js +0 -101
  181. package/dist/esm/plugins/text-formatting/commands/text-formatting.js +0 -134
  182. package/dist/esm/plugins/text-formatting/commands/transform-to-code.js +0 -61
  183. package/dist/esm/plugins/text-formatting/index.js +0 -128
  184. package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -10
  185. package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -28
  186. package/dist/esm/plugins/text-formatting/pm-plugins/cursor.js +0 -48
  187. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +0 -259
  188. package/dist/esm/plugins/text-formatting/pm-plugins/keymap.js +0 -43
  189. package/dist/esm/plugins/text-formatting/pm-plugins/main.js +0 -98
  190. package/dist/esm/plugins/text-formatting/pm-plugins/plugin-key.js +0 -2
  191. package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -169
  192. package/dist/esm/plugins/text-formatting/ui/Toolbar/constants.js +0 -8
  193. package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -75
  194. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -45
  195. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -213
  196. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -15
  197. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -50
  198. package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +0 -191
  199. package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +0 -31
  200. package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -35
  201. package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +0 -10
  202. package/dist/esm/plugins/text-formatting/utils/cell-selection.js +0 -5
  203. package/dist/esm/plugins/text-formatting/utils.js +0 -75
  204. package/dist/types/plugins/text-formatting/actions.d.ts +0 -22
  205. package/dist/types/plugins/text-formatting/commands/clear-formatting.d.ts +0 -6
  206. package/dist/types/plugins/text-formatting/commands/text-formatting.d.ts +0 -5
  207. package/dist/types/plugins/text-formatting/commands/transform-to-code.d.ts +0 -2
  208. package/dist/types/plugins/text-formatting/index.d.ts +0 -17
  209. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting-keymap.d.ts +0 -4
  210. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -8
  211. package/dist/types/plugins/text-formatting/pm-plugins/cursor.d.ts +0 -3
  212. package/dist/types/plugins/text-formatting/pm-plugins/input-rule.d.ts +0 -24
  213. package/dist/types/plugins/text-formatting/pm-plugins/keymap.d.ts +0 -4
  214. package/dist/types/plugins/text-formatting/pm-plugins/main.d.ts +0 -7
  215. package/dist/types/plugins/text-formatting/pm-plugins/plugin-key.d.ts +0 -3
  216. package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +0 -3
  217. package/dist/types/plugins/text-formatting/ui/Toolbar/constants.d.ts +0 -6
  218. package/dist/types/plugins/text-formatting/ui/Toolbar/dropdown-menu.d.ts +0 -15
  219. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.d.ts +0 -7
  220. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.d.ts +0 -14
  221. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/menu-state.d.ts +0 -1
  222. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +0 -20
  223. package/dist/types/plugins/text-formatting/ui/Toolbar/index.d.ts +0 -26
  224. package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +0 -13
  225. package/dist/types/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +0 -9
  226. package/dist/types/plugins/text-formatting/ui/Toolbar/types.d.ts +0 -32
  227. package/dist/types/plugins/text-formatting/utils/cell-selection.d.ts +0 -3
  228. package/dist/types/plugins/text-formatting/utils.d.ts +0 -11
  229. package/dist/types-ts4.5/plugins/text-formatting/actions.d.ts +0 -22
  230. package/dist/types-ts4.5/plugins/text-formatting/commands/clear-formatting.d.ts +0 -6
  231. package/dist/types-ts4.5/plugins/text-formatting/commands/text-formatting.d.ts +0 -5
  232. package/dist/types-ts4.5/plugins/text-formatting/commands/transform-to-code.d.ts +0 -2
  233. package/dist/types-ts4.5/plugins/text-formatting/index.d.ts +0 -19
  234. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting-keymap.d.ts +0 -4
  235. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -8
  236. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/cursor.d.ts +0 -3
  237. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/input-rule.d.ts +0 -24
  238. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/keymap.d.ts +0 -4
  239. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/main.d.ts +0 -7
  240. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/plugin-key.d.ts +0 -3
  241. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +0 -3
  242. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/constants.d.ts +0 -6
  243. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/dropdown-menu.d.ts +0 -15
  244. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.d.ts +0 -7
  245. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.d.ts +0 -14
  246. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/menu-state.d.ts +0 -5
  247. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +0 -20
  248. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/index.d.ts +0 -26
  249. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/more-button.d.ts +0 -13
  250. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +0 -9
  251. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/types.d.ts +0 -32
  252. package/dist/types-ts4.5/plugins/text-formatting/utils/cell-selection.d.ts +0 -3
  253. package/dist/types-ts4.5/plugins/text-formatting/utils.d.ts +0 -11
@@ -42,24 +42,18 @@ export default (function () {
42
42
  node.setAttribute('aria-hidden', 'true');
43
43
  node.appendChild(document.createTextNode(ZERO_WIDTH_SPACE));
44
44
  node.className = 'cursor-target';
45
- return Decoration.widget(selection.from, node, {
45
+ var $from = selection.$from;
46
+ var rightPosition = $from.pos;
47
+ var leftPosition = $from.posAtIndex(Math.max($from.index() - 1, 0));
48
+ var widgetPos = side === 'left' ? leftPosition : rightPosition;
49
+ return Decoration.widget(widgetPos, node, {
46
50
  raw: true,
47
- side: side === 'left' ? -1 : 1,
48
51
  key: 'inlineCursor'
49
52
  });
50
53
  };
51
54
 
52
- // Create editable decoration widgets either side of the cursor to allow
53
- // text input.
54
- // We check beforeInput events below to prevent content
55
- // being added to the decorations.
56
- //
57
- // This prevents issues with the cursor disappearing
58
- // or appearing in the wrong place when;
59
- // - positioned between inline nodes (chrome + firefox)
60
- // - positioned between the beginning of another node and an inline node (firefox)
61
- // - positioned between an inline node and the end of a node (chrome)
62
- if (!browser.safari && (hasInlineNodeViewAfter || isAtEndAndInlineNodeViewBefore) && (hasInlineNodeViewBefore || isAtStartAndInlineNodeViewAfter)) {
55
+ // Create editable decoration widgets around the current inline node to allow proper cursor navigation.
56
+ if ((hasInlineNodeViewAfter || isAtEndAndInlineNodeViewBefore) && (hasInlineNodeViewBefore || isAtStartAndInlineNodeViewAfter)) {
63
57
  return {
64
58
  cursorTarget: {
65
59
  decorations: [createWidget('left'), createWidget('right')],
@@ -70,34 +64,6 @@ export default (function () {
70
64
  }
71
65
  };
72
66
  }
73
-
74
- // Only create one widget on the left or right of the cursor in Safari.
75
- // This is to prevent the left key from being blocked when at the start of a paragraph,
76
- // and the right key from being blocked when at the end of a paragraph. This also
77
- // improves click and drag selections, making it easier to select the first node.
78
- if (browser.safari) {
79
- if (isAtEndAndInlineNodeViewBefore || hasInlineNodeViewBefore && hasInlineNodeViewAfter) {
80
- return {
81
- cursorTarget: {
82
- decorations: [createWidget('left')],
83
- positions: {
84
- from: $from.pos,
85
- to: $to.pos
86
- }
87
- }
88
- };
89
- } else if (isAtStartAndInlineNodeViewAfter) {
90
- return {
91
- cursorTarget: {
92
- decorations: [createWidget('right')],
93
- positions: {
94
- from: $from.pos,
95
- to: $to.pos
96
- }
97
- }
98
- };
99
- }
100
- }
101
67
  }
102
68
  return {
103
69
  cursorTarget: undefined
@@ -30,7 +30,6 @@ export { default as saveOnEnterPlugin } from './save-on-enter';
30
30
  export { default as submitEditorPlugin } from './submit-editor';
31
31
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
32
32
  export { default as textColorPlugin } from './text-color';
33
- export { default as textFormattingPlugin } from './text-formatting';
34
33
  export { default as typeAheadPlugin } from './type-ahead';
35
34
  export { default as unsupportedContentPlugin } from './unsupported-content';
36
35
  export { default as floatingToolbarPlugin } from './floating-toolbar';
@@ -8,9 +8,6 @@ var serializePlaceholderNode = function serializePlaceholderNode(node) {
8
8
 
9
9
  // the inline node api test suite requires the following class name
10
10
  element.classList.add('placeholderView-content-wrap');
11
- if (browser.gecko) {
12
- element.setAttribute('contenteditable', 'true');
13
- }
14
11
  element.innerText = ZERO_WIDTH_SPACE;
15
12
  var elementChildren = document.createElement('span');
16
13
  elementChildren.classList.add('pm-placeholder__text');
@@ -88,24 +88,38 @@ var plugin = new SafePlugin({
88
88
  }
89
89
  return null;
90
90
  },
91
- // there's no space between top level nodes and the wrapping ProseMirror contenteditable area and handleClick won't capture clicks, there's nothing to click on
92
- // it handles only attempts to set gap cursor for nested nodes, where we have space between parent and child nodes
93
- // top level nodes are handled by <ClickAreaBlock>
94
- handleClick: function handleClick(view, position, event) {
91
+ handleClick: function handleClick(view, nodePos, event) {
92
+ var _$pos$parent;
95
93
  var posAtCoords = view.posAtCoords({
96
94
  left: event.clientX,
97
95
  top: event.clientY
98
96
  });
99
-
100
- // this helps to ignore all of the clicks outside of the parent (e.g. nodeView controls)
101
- if (posAtCoords && posAtCoords.inside !== position && !isIgnoredClick(event.target)) {
102
- // max available space between parent and child from the left side in px
103
- // this ensures the correct side of the gap cursor in case of clicking in between two block nodes
104
- var leftSideOffsetX = 20;
105
- var side = event.offsetX > leftSideOffsetX ? Side.RIGHT : Side.LEFT;
106
- return setGapCursorAtPos(position, side)(view.state, view.dispatch);
97
+ if (!posAtCoords || isIgnoredClick(event.target)) {
98
+ return false;
107
99
  }
108
- return false;
100
+ var isInsideTheTarget = posAtCoords.pos === posAtCoords.inside;
101
+ if (isInsideTheTarget) {
102
+ return false;
103
+ }
104
+ var leftSideOffsetX = 20;
105
+ var side = event.offsetX > leftSideOffsetX ? Side.RIGHT : Side.LEFT;
106
+ var $pos = view.state.doc.resolve(nodePos);
107
+ // In the new prosemirror-view posAtCoords is not returning a precise value for our media nodes
108
+ if (((_$pos$parent = $pos.parent) === null || _$pos$parent === void 0 ? void 0 : _$pos$parent.type.name) === 'mediaSingle') {
109
+ var $insidePos = view.state.doc.resolve(Math.max(posAtCoords.inside, 0));
110
+ // We don't have GapCursors problems when the node target is inside the root level
111
+ if ($insidePos.depth <= 1) {
112
+ return false;
113
+ }
114
+ var mediaGapCursor = !$pos.nodeBefore ? $pos.before() : $pos.after();
115
+ return setGapCursorAtPos(mediaGapCursor, side)(view.state, view.dispatch);
116
+ }
117
+ var docSize = view.state.doc.content.size;
118
+ var nodeInside = posAtCoords.inside <= 0 || posAtCoords.inside > docSize ? null : view.state.doc.nodeAt(posAtCoords.inside);
119
+ if (nodeInside !== null && nodeInside !== void 0 && nodeInside.isAtom) {
120
+ return false;
121
+ }
122
+ return setGapCursorAtPos(nodePos, side)(view.state, view.dispatch);
109
123
  },
110
124
  handleDOMEvents: {
111
125
  /**
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.17.5";
2
+ export var version = "187.18.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.17.5",
3
+ "version": "187.18.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../typings/prosemirror-state.d.ts" />
3
1
  export { getChangedNodes } from './utils/document';
4
2
  export { validateNodes } from './utils/nodes';
5
3
  export { toJSON } from './utils';
@@ -77,8 +77,3 @@ export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
77
77
  export { default as messages, statusMessages, dateMessages } from './messages';
78
78
  export { createTypeAheadTools } from './plugins/type-ahead/api';
79
79
  export { createQuickInsertTools } from './plugins/quick-insert/api';
80
- export type {
81
- /**
82
- * Temporary, until we extract the plugin to its own package
83
- * @deprecated Don't use this
84
- */ textFormattingPlugin, } from './plugins';
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
2
  import type { PastePluginOptions } from '../../../plugins/paste';
5
3
  import type { BasePluginOptions } from '../../../plugins/base';
@@ -257,13 +255,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
257
255
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
258
256
  }>>];
259
257
  actions: {
260
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
261
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
262
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
263
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
264
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
265
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
266
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
258
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
259
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
260
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
261
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
262
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
263
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
264
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
267
265
  };
268
266
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
269
267
  pluginConfiguration: TextFormattingOptions | undefined;
@@ -297,13 +295,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
297
295
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
298
296
  }>>];
299
297
  actions: {
300
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
301
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
302
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
303
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
304
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
305
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
306
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
298
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
299
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
300
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
301
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
302
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
303
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
304
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
307
305
  };
308
306
  }>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
309
307
  pluginConfiguration: HyperlinkPluginOptions | undefined;
@@ -620,13 +618,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
620
618
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
621
619
  }>>];
622
620
  actions: {
623
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
624
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
625
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
626
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
627
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
628
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
629
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
621
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
622
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
623
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
624
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
625
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
626
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
627
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
630
628
  };
631
629
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
632
630
  pluginConfiguration: TextFormattingOptions | undefined;
@@ -660,13 +658,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
660
658
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
661
659
  }>>];
662
660
  actions: {
663
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
664
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
665
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
666
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
667
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
668
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
669
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
661
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
662
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
663
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
664
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
665
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
666
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
667
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
670
668
  };
671
669
  }>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
672
670
  pluginConfiguration: HyperlinkPluginOptions | undefined;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import analyticsPlugin from './plugin';
4
2
  export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, LIST_TEXT_SCENARIOS, fireAnalyticsEvent, getAnalyticsEventsFromTransaction, } from '@atlaskit/editor-common/analytics';
5
3
  export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, ErrorEventAttributes, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, FireAnalyticsCallback, FireAnalyticsEvent, } from '@atlaskit/editor-common/analytics';
@@ -1,4 +1,2 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import type { InlineCommentPluginState } from './types';
4
2
  export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: InlineCommentPluginState | ((state: import("prosemirror-state").EditorState) => InlineCommentPluginState)) => import("prosemirror-state").SafeStateField<InlineCommentPluginState>, createCommand: <A = import("./types").InlineCommentAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { AnnotationTypes } from '@atlaskit/adf-schema';
3
- import { AnnotationUpdateEmitter } from './update-provider';
1
+ import type React from 'react';
2
+ import type { AnnotationTypes } from '@atlaskit/adf-schema';
3
+ import type { AnnotationUpdateEmitter } from './update-provider';
4
4
  export type AnnotationInfo = {
5
5
  id: string;
6
6
  type: AnnotationTypes.INLINE_COMMENT;
@@ -73,4 +73,10 @@ export declare const AnnotationTestIds: {
73
73
  componentSave: string;
74
74
  componentClose: string;
75
75
  };
76
+ export type CoordsAtPos = {
77
+ top: number;
78
+ bottom: number;
79
+ left: number;
80
+ right: number;
81
+ };
76
82
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference path="../../../../../../../typings/prosemirror.d.ts" />
2
1
  import type { ResolvedPos, Mark, Node, Slice, Schema } from '@atlaskit/editor-prosemirror/model';
3
2
  import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
4
3
  import { PluginKey, TextSelection, AllSelection } from '@atlaskit/editor-prosemirror/state';
@@ -12,11 +11,9 @@ import type { AnalyticsEventPayloadCallback } from '../analytics/utils';
12
11
  * Finds the marks in the nodes to the left and right.
13
12
  * @param $pos Position to center search around
14
13
  */
15
- export declare const surroundingMarks: ($pos: ResolvedPos) => Mark[][];
14
+ export declare const surroundingMarks: ($pos: ResolvedPos) => (readonly Mark[])[];
16
15
  export declare const getAllAnnotations: (doc: Node) => string[];
17
- export declare const addDraftDecoration: (start: number, end: number) => Decoration<{
18
- [key: string]: any;
19
- } & import("prosemirror-view").InlineDecorationSpec>;
16
+ export declare const addDraftDecoration: (start: number, end: number) => Decoration;
20
17
  export declare const getAnnotationViewKey: (annotations: AnnotationInfo[]) => string;
21
18
  export declare const findAnnotationsInSelection: (selection: Selection, doc: Node) => AnnotationInfo[];
22
19
  /**
@@ -9,5 +9,5 @@ export interface PluginState {
9
9
  contextIdentifierProvider?: ContextIdentifierProvider;
10
10
  }
11
11
  export declare const getContextIdentifier: (state?: EditorState) => ContextIdentifierProvider | undefined;
12
- declare const _default: (dispatch: Dispatch, providerFactory?: ProviderFactory) => SafePlugin<any>;
12
+ declare const _default: (dispatch: Dispatch, providerFactory?: ProviderFactory) => SafePlugin<{}>;
13
13
  export default _default;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
2
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
5
3
  import type { HeadingLevelsAndNormalText, Command } from '@atlaskit/editor-common/types';
@@ -9,4 +9,9 @@ export type BlockTypeState = {
9
9
  availableWrapperBlockTypes: BlockType[];
10
10
  };
11
11
  export declare const pluginKey: PluginKey<BlockTypeState>;
12
- export declare const createPlugin: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean) => SafePlugin<BlockTypeState>;
12
+ export declare const createPlugin: (editorAnalyticsApi: EditorAnalyticsAPI | undefined, dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean) => SafePlugin<{
13
+ currentBlockType: BlockType;
14
+ blockTypesDisabled: boolean;
15
+ availableBlockTypes: BlockType[];
16
+ availableWrapperBlockTypes: BlockType[];
17
+ }>;
@@ -2,4 +2,4 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { EditorProps, PMPluginFactoryParams } from '../../../types';
3
3
  export declare const createPlugin: ({ dispatch, getIntl }: PMPluginFactoryParams, { appearance }: {
4
4
  appearance: EditorProps['appearance'];
5
- }) => SafePlugin<any>;
5
+ }) => SafePlugin<import("./types").CodeBidiWarningPluginState>;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
2
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
5
3
  export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("./types").CodeBidiWarningPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").CodeBidiWarningPluginState)) => import("prosemirror-state").SafeStateField<import("./types").CodeBidiWarningPluginState>, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").CodeBidiWarningPluginState;
@@ -2,6 +2,10 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  export declare const copySelectionPluginKey: PluginKey<any>;
5
- export declare function codeBlockCopySelectionPlugin(): SafePlugin<any>;
5
+ type CodeBlockCopySelectionPluginState = {
6
+ decorationStartAndEnd?: [start: number, end: number];
7
+ };
8
+ export declare function codeBlockCopySelectionPlugin(): SafePlugin<CodeBlockCopySelectionPluginState>;
6
9
  export declare function provideVisualFeedbackForCopyButton(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;
7
10
  export declare function removeVisualFeedbackForCopyButton(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;
11
+ export {};
@@ -1,9 +1,10 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { EditorProps } from '../../../types';
4
+ import type { CodeBlockState } from './main-state';
4
5
  export declare const createPlugin: ({ useLongPressSelection, getIntl, appearance, allowCompositionInputOverride, }: {
5
6
  useLongPressSelection?: boolean | undefined;
6
7
  getIntl: () => IntlShape;
7
8
  appearance: EditorProps['appearance'];
8
9
  allowCompositionInputOverride?: boolean | undefined;
9
- }) => SafePlugin<any>;
10
+ }) => SafePlugin<CodeBlockState>;
@@ -3,4 +3,4 @@ import { Slice } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  export declare function transformSliceToJoinAdjacentCodeBlocks(slice: Slice): Slice;
5
5
  export declare const transformSingleLineCodeBlockToCodeMark: (slice: Slice, schema: Schema) => Slice;
6
- export declare const findCodeBlock: (state: EditorState, selection?: Selection | null) => import("prosemirror-utils").ContentNodeWithPos | undefined;
6
+ export declare const findCodeBlock: (state: EditorState, selection?: Selection | null) => import("prosemirror-utils/dist/types").FindResult;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
2
  import type { EditorView, DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
@@ -15,9 +13,7 @@ export declare const getAvatarColor: (str: string) => {
15
13
  color: Color;
16
14
  };
17
15
  export declare const findPointers: (id: string, decorations: DecorationSet) => Decoration[];
18
- export declare const createTelepointers: (from: number, to: number, sessionId: string, isSelection: boolean, initial: string) => Decoration<{
19
- [key: string]: any;
20
- }>[];
16
+ export declare const createTelepointers: (from: number, to: number, sessionId: string, isSelection: boolean, initial: string) => Decoration[];
21
17
  export declare const replaceDocument: (doc: any, state: EditorState, version?: number, options?: CollabEditOptions, reserveCursor?: boolean) => import("prosemirror-state").Transaction;
22
18
  export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number) => void;
23
19
  export declare const getPositionOfTelepointer: (sessionId: string, decorationSet: DecorationSet) => undefined | number;
@@ -1,3 +1,12 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- export declare function copyButtonPlugin(): SafePlugin<any>;
2
+ import type { MarkType } from '@atlaskit/editor-prosemirror/model';
3
+ type CopyButtonPluginState = {
4
+ copied: boolean;
5
+ markSelection?: {
6
+ start: number;
7
+ end: number;
8
+ markType: MarkType;
9
+ };
10
+ };
11
+ export declare function copyButtonPlugin(): SafePlugin<CopyButtonPluginState>;
3
12
  export default copyButtonPlugin;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
2
  import type { Command } from '../../../src/types';
5
3
  import type { FloatingToolbarButton, FloatingToolbarItem, MarkOptions, NodeOptions } from '@atlaskit/editor-common/types';
@@ -4,5 +4,5 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  export declare function getSelectedNodeOrNodeParentByNodeType({ nodeType, selection, }: {
5
5
  nodeType: NodeType | Array<NodeType>;
6
6
  selection: Transaction['selection'];
7
- }): import("prosemirror-utils").ContentNodeWithPos | undefined;
7
+ }): import("prosemirror-utils/dist/types").FindResult;
8
8
  export declare const toDOM: (node: PMNode, schema: Schema) => Node;
@@ -1,5 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { NextEditorPlugin, PMPluginFactoryParams } from '../../types';
3
- export declare const createPMPlugin: ({ providerFactory }: PMPluginFactoryParams) => SafePlugin<any>;
3
+ import type { CustomAutoformatState } from './types';
4
+ export declare const createPMPlugin: ({ providerFactory }: PMPluginFactoryParams) => SafePlugin<CustomAutoformatState>;
4
5
  declare const customAutoformatPlugin: NextEditorPlugin<'customAutoformat'>;
5
6
  export default customAutoformatPlugin;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { PMPluginFactory } from '../../../types';
4
2
  import { DatePluginState } from './types';
5
3
  declare const getPluginState: (state: import("prosemirror-state").EditorState) => DatePluginState;
@@ -4,4 +4,4 @@ import type { EditorProps } from '../../../types';
4
4
  import type { IntlShape } from 'react-intl-next';
5
5
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
6
6
  export declare function containsClass(element: Element | null, className: string): boolean;
7
- export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorProps['appearance'], useLongPressSelection: boolean | undefined, featureFlags: FeatureFlags) => SafePlugin<any>;
7
+ export declare const createPlugin: (dispatch: Dispatch, getIntl: () => IntlShape, appearance: EditorProps['appearance'], useLongPressSelection: boolean | undefined, featureFlags: FeatureFlags) => SafePlugin<import("..").ExpandPluginState>;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
2
  export declare const pluginKey: PluginKey<any>;
5
3
  export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("..").ExpandPluginState | ((state: import("prosemirror-state").EditorState) => import("..").ExpandPluginState)) => import("prosemirror-state").SafeStateField<import("..").ExpandPluginState>, createCommand: <A = import("../types").ExpandPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("..").ExpandPluginState;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { ExtensionState } from './types';
4
2
  export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: ExtensionState<import("@atlaskit/editor-common/extensions").Parameters> | ((state: import("prosemirror-state").EditorState) => ExtensionState<import("@atlaskit/editor-common/extensions").Parameters>)) => import("prosemirror-state").SafeStateField<ExtensionState<import("@atlaskit/editor-common/extensions").Parameters>>;
5
3
  export declare const createCommand: <A = import("./types").ExtensionAction<import("@atlaskit/editor-common/extensions").Parameters>>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command;
@@ -2,7 +2,7 @@ import type { Schema, Mark } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { NodeWithPos, DomAtPos } from '@atlaskit/editor-prosemirror/utils';
5
- export declare const getSelectedExtension: (state: EditorState, searchParent?: boolean) => import("prosemirror-utils").ContentNodeWithPos | undefined;
5
+ export declare const getSelectedExtension: (state: EditorState, searchParent?: boolean) => import("prosemirror-utils/dist/types").ContentNodeWithPos | undefined;
6
6
  export declare const findExtensionWithLocalId: (state: EditorState, localId?: string) => NodeWithPos | undefined;
7
7
  export declare const getSelectedDomElement: (schema: Schema, domAtPos: DomAtPos, selectedExtensionNode: NodeWithPos) => HTMLElement;
8
8
  export declare const getDataConsumerMark: (newNode: PMNode) => Mark | undefined;
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
2
  import type { Dispatch } from '../../event-dispatcher';
5
3
  import type { FindReplacePluginState } from './types';
@@ -1,4 +1,3 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
1
  import type { Fragment, Node as PmNode, Slice } from '@atlaskit/editor-prosemirror/model';
3
2
  import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
4
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
@@ -11,9 +10,7 @@ export declare const createDecorations: (selectedIndex: number, matches: {
11
10
  start: number;
12
11
  end: number;
13
12
  }[]) => Decoration[];
14
- export declare const createDecoration: (start: number, end: number, isSelected?: boolean) => Decoration<{
15
- [key: string]: any;
16
- } & import("prosemirror-view").InlineDecorationSpec>;
13
+ export declare const createDecoration: (start: number, end: number, isSelected?: boolean) => Decoration;
17
14
  export declare function findMatches(content: PmNode | Fragment, searchText: string, shouldMatchCase: boolean, contentIndex?: number): Match[];
18
15
  /**
19
16
  * Finds index of first item in matches array that comes after user's cursor pos.
@@ -7,7 +7,9 @@ export declare const forceFocusStateKey: PluginKey<any>;
7
7
  * Used in cases where a floating toolbar button opens a submenu which destroys
8
8
  * the button, but the user has pressed ESC to close the submenu and focus needs
9
9
  * to move back to the button. */
10
- declare const _default: () => SafePlugin<any>;
10
+ declare const _default: () => SafePlugin<{
11
+ selector: null;
12
+ }>;
11
13
  export default _default;
12
14
  /**
13
15
  * The provided selector should be the floating toolbar button that needs focus.
@@ -1,3 +1 @@
1
- /// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch<any>, initialState: import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData | ((state: import("prosemirror-state").EditorState) => import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData)) => import("prosemirror-state").SafeStateField<import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData>, createCommand: <A = import("./types").FloatingToolbarPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("@atlaskit/editor-plugin-floating-toolbar").FloatingToolbarPluginData;
@@ -31,7 +31,6 @@ export { default as saveOnEnterPlugin } from './save-on-enter';
31
31
  export { default as submitEditorPlugin } from './submit-editor';
32
32
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
33
33
  export { default as textColorPlugin } from './text-color';
34
- export { default as textFormattingPlugin } from './text-formatting';
35
34
  export { default as typeAheadPlugin } from './type-ahead';
36
35
  export { default as unsupportedContentPlugin } from './unsupported-content';
37
36
  export { default as floatingToolbarPlugin } from './floating-toolbar';
@@ -1,7 +1,6 @@
1
1
  import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
2
- import type { InputRuleWrapper } from '@atlaskit/prosemirror-input-rules';
2
+ import type { InputRuleWrapper, FeatureFlags } from '@atlaskit/editor-common/types';
3
3
  import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
4
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
5
4
  type WrappingRuleProps = {
6
5
  featureFlags: FeatureFlags;
7
6
  match: RegExp;
@@ -8,7 +8,7 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
8
8
  */
9
9
  export declare const findMediaSingleNode: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler | null;
10
10
  export declare const findAllMediaSingleNodes: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler[];
11
- export declare const isMediaNode: (pos: number, state: EditorState) => boolean | null | undefined;
11
+ export declare const isMediaNode: (pos: number, state: EditorState) => boolean | null;
12
12
  export declare const updateAllMediaSingleNodesAttrs: (id: string, attrs: object) => Command;
13
13
  export declare const updateCurrentMediaNodeAttrs: (attrs: object, mediaNode: MediaNodeWithPosHandler) => Command;
14
14
  export declare const updateMediaSingleNodeAttrs: (id: string, attrs: object) => Command;
@@ -1,9 +1,7 @@
1
- /// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
3
  import type { PMPluginFactoryParams } from '../../../../types';
6
4
  export declare const pluginKey: PluginKey<any>;
7
5
  declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
8
- export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<any>;
6
+ export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
9
7
  export { createCommand, getPluginState };
@@ -1,5 +1,3 @@
1
- /// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
2
- /// <reference path="../../../../../../../../../typings/prosemirror-state.d.ts" />
3
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
5
3
  import type { Dispatch } from '../../../../event-dispatcher';