@atlaskit/editor-core 187.17.6 → 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 (154) hide show
  1. package/CHANGELOG.md +11 -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/index.js +0 -7
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/labs/next/presets/default.js +1 -1
  8. package/dist/es2019/plugins/annotation/toolbar.js +34 -9
  9. package/dist/es2019/plugins/index.js +0 -1
  10. package/dist/es2019/version-wrapper.js +1 -1
  11. package/dist/es2019/version.json +1 -1
  12. package/dist/esm/labs/next/presets/default.js +1 -1
  13. package/dist/esm/plugins/annotation/toolbar.js +30 -7
  14. package/dist/esm/plugins/index.js +0 -1
  15. package/dist/esm/version-wrapper.js +1 -1
  16. package/dist/esm/version.json +1 -1
  17. package/dist/types/index.d.ts +0 -5
  18. package/dist/types/labs/next/presets/default.d.ts +28 -28
  19. package/dist/types/plugins/annotation/types.d.ts +9 -3
  20. package/dist/types/plugins/index.d.ts +0 -1
  21. package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +1 -2
  22. package/dist/types-ts4.5/index.d.ts +0 -5
  23. package/dist/types-ts4.5/labs/next/presets/default.d.ts +28 -28
  24. package/dist/types-ts4.5/plugins/annotation/types.d.ts +9 -3
  25. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  26. package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +1 -2
  27. package/package.json +2 -1
  28. package/report.api.md +1 -24
  29. package/tmp/api-report-tmp.d.ts +1 -21
  30. package/dist/cjs/plugins/text-formatting/actions.js +0 -188
  31. package/dist/cjs/plugins/text-formatting/commands/clear-formatting.js +0 -111
  32. package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +0 -143
  33. package/dist/cjs/plugins/text-formatting/commands/transform-to-code.js +0 -68
  34. package/dist/cjs/plugins/text-formatting/index.js +0 -136
  35. package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -21
  36. package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -36
  37. package/dist/cjs/plugins/text-formatting/pm-plugins/cursor.js +0 -55
  38. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +0 -276
  39. package/dist/cjs/plugins/text-formatting/pm-plugins/keymap.js +0 -52
  40. package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +0 -113
  41. package/dist/cjs/plugins/text-formatting/pm-plugins/plugin-key.js +0 -9
  42. package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -176
  43. package/dist/cjs/plugins/text-formatting/ui/Toolbar/constants.js +0 -19
  44. package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -86
  45. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -53
  46. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -225
  47. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -23
  48. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -60
  49. package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +0 -201
  50. package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +0 -40
  51. package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -46
  52. package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +0 -17
  53. package/dist/cjs/plugins/text-formatting/utils/cell-selection.js +0 -12
  54. package/dist/cjs/plugins/text-formatting/utils.js +0 -86
  55. package/dist/es2019/plugins/text-formatting/actions.js +0 -161
  56. package/dist/es2019/plugins/text-formatting/commands/clear-formatting.js +0 -105
  57. package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +0 -144
  58. package/dist/es2019/plugins/text-formatting/commands/transform-to-code.js +0 -71
  59. package/dist/es2019/plugins/text-formatting/index.js +0 -127
  60. package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -10
  61. package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -26
  62. package/dist/es2019/plugins/text-formatting/pm-plugins/cursor.js +0 -52
  63. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +0 -244
  64. package/dist/es2019/plugins/text-formatting/pm-plugins/keymap.js +0 -43
  65. package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +0 -109
  66. package/dist/es2019/plugins/text-formatting/pm-plugins/plugin-key.js +0 -2
  67. package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -155
  68. package/dist/es2019/plugins/text-formatting/ui/Toolbar/constants.js +0 -20
  69. package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -66
  70. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -42
  71. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -210
  72. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -11
  73. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -48
  74. package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +0 -168
  75. package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +0 -32
  76. package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -36
  77. package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +0 -10
  78. package/dist/es2019/plugins/text-formatting/utils/cell-selection.js +0 -5
  79. package/dist/es2019/plugins/text-formatting/utils.js +0 -74
  80. package/dist/esm/plugins/text-formatting/actions.js +0 -168
  81. package/dist/esm/plugins/text-formatting/commands/clear-formatting.js +0 -101
  82. package/dist/esm/plugins/text-formatting/commands/text-formatting.js +0 -134
  83. package/dist/esm/plugins/text-formatting/commands/transform-to-code.js +0 -61
  84. package/dist/esm/plugins/text-formatting/index.js +0 -128
  85. package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -10
  86. package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -28
  87. package/dist/esm/plugins/text-formatting/pm-plugins/cursor.js +0 -48
  88. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +0 -259
  89. package/dist/esm/plugins/text-formatting/pm-plugins/keymap.js +0 -43
  90. package/dist/esm/plugins/text-formatting/pm-plugins/main.js +0 -98
  91. package/dist/esm/plugins/text-formatting/pm-plugins/plugin-key.js +0 -2
  92. package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -169
  93. package/dist/esm/plugins/text-formatting/ui/Toolbar/constants.js +0 -8
  94. package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -75
  95. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -45
  96. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -213
  97. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -15
  98. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -50
  99. package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +0 -191
  100. package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +0 -31
  101. package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -35
  102. package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +0 -10
  103. package/dist/esm/plugins/text-formatting/utils/cell-selection.js +0 -5
  104. package/dist/esm/plugins/text-formatting/utils.js +0 -75
  105. package/dist/types/plugins/text-formatting/actions.d.ts +0 -22
  106. package/dist/types/plugins/text-formatting/commands/clear-formatting.d.ts +0 -6
  107. package/dist/types/plugins/text-formatting/commands/text-formatting.d.ts +0 -5
  108. package/dist/types/plugins/text-formatting/commands/transform-to-code.d.ts +0 -2
  109. package/dist/types/plugins/text-formatting/index.d.ts +0 -17
  110. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting-keymap.d.ts +0 -4
  111. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -8
  112. package/dist/types/plugins/text-formatting/pm-plugins/cursor.d.ts +0 -3
  113. package/dist/types/plugins/text-formatting/pm-plugins/input-rule.d.ts +0 -24
  114. package/dist/types/plugins/text-formatting/pm-plugins/keymap.d.ts +0 -4
  115. package/dist/types/plugins/text-formatting/pm-plugins/main.d.ts +0 -7
  116. package/dist/types/plugins/text-formatting/pm-plugins/plugin-key.d.ts +0 -3
  117. package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +0 -3
  118. package/dist/types/plugins/text-formatting/ui/Toolbar/constants.d.ts +0 -6
  119. package/dist/types/plugins/text-formatting/ui/Toolbar/dropdown-menu.d.ts +0 -15
  120. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.d.ts +0 -7
  121. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.d.ts +0 -14
  122. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/menu-state.d.ts +0 -1
  123. package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +0 -20
  124. package/dist/types/plugins/text-formatting/ui/Toolbar/index.d.ts +0 -26
  125. package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +0 -13
  126. package/dist/types/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +0 -9
  127. package/dist/types/plugins/text-formatting/ui/Toolbar/types.d.ts +0 -32
  128. package/dist/types/plugins/text-formatting/utils/cell-selection.d.ts +0 -3
  129. package/dist/types/plugins/text-formatting/utils.d.ts +0 -11
  130. package/dist/types-ts4.5/plugins/text-formatting/actions.d.ts +0 -22
  131. package/dist/types-ts4.5/plugins/text-formatting/commands/clear-formatting.d.ts +0 -6
  132. package/dist/types-ts4.5/plugins/text-formatting/commands/text-formatting.d.ts +0 -5
  133. package/dist/types-ts4.5/plugins/text-formatting/commands/transform-to-code.d.ts +0 -2
  134. package/dist/types-ts4.5/plugins/text-formatting/index.d.ts +0 -19
  135. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting-keymap.d.ts +0 -4
  136. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -8
  137. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/cursor.d.ts +0 -3
  138. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/input-rule.d.ts +0 -24
  139. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/keymap.d.ts +0 -4
  140. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/main.d.ts +0 -7
  141. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/plugin-key.d.ts +0 -3
  142. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +0 -3
  143. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/constants.d.ts +0 -6
  144. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/dropdown-menu.d.ts +0 -15
  145. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.d.ts +0 -7
  146. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.d.ts +0 -14
  147. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/menu-state.d.ts +0 -5
  148. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +0 -20
  149. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/index.d.ts +0 -26
  150. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/more-button.d.ts +0 -13
  151. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +0 -9
  152. package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/types.d.ts +0 -32
  153. package/dist/types-ts4.5/plugins/text-formatting/utils/cell-selection.d.ts +0 -3
  154. package/dist/types-ts4.5/plugins/text-formatting/utils.d.ts +0 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`80b964e24a2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/80b964e24a2) - [ED-19205] Extract the text-formatting editor plugin to a separate package
8
+
9
+ ### Patch Changes
10
+
11
+ - [`8474692c96d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8474692c96d) - [ux] ED-18785 Place toolbar below selection if not sufficient space above
12
+ - Updated dependencies
13
+
3
14
  ## 187.17.6
4
15
 
5
16
  ### Patch Changes
@@ -10,7 +10,7 @@ var _paste = _interopRequireDefault(require("../../../plugins/paste"));
10
10
  var _blockType = _interopRequireDefault(require("../../../plugins/block-type"));
11
11
  var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("../../../plugins/clear-marks-on-change-to-empty-document"));
12
12
  var _editorPluginHyperlink = require("@atlaskit/editor-plugin-hyperlink");
13
- var _textFormatting = _interopRequireDefault(require("../../../plugins/text-formatting"));
13
+ var _editorPluginTextFormatting = require("@atlaskit/editor-plugin-text-formatting");
14
14
  var _editorPluginWidth = require("@atlaskit/editor-plugin-width");
15
15
  var _unsupportedContent = _interopRequireDefault(require("../../../plugins/unsupported-content"));
16
16
  var _base = _interopRequireDefault(require("../../../plugins/base"));
@@ -73,7 +73,7 @@ function createDefaultPreset(options) {
73
73
  return builder.add([p, options.annotationProviders]);
74
74
  }
75
75
  return builder;
76
- }).add([_editorPluginHyperlink.hyperlinkPlugin, options.hyperlinkOptions]).add([_textFormatting.default, options.textFormatting]).add(_editorPluginWidth.widthPlugin).add([_quickInsert.default, options.quickInsert]).add([_typeAhead.default, options.typeAhead || {
76
+ }).add([_editorPluginHyperlink.hyperlinkPlugin, options.hyperlinkOptions]).add([_editorPluginTextFormatting.textFormattingPlugin, options.textFormatting]).add(_editorPluginWidth.widthPlugin).add([_quickInsert.default, options.quickInsert]).add([_typeAhead.default, options.typeAhead || {
77
77
  createAnalyticsEvent: options.createAnalyticsEvent
78
78
  }]).add(_unsupportedContent.default).add(_editorPluginEditorDisabled.editorDisabledPlugin).add([_submitEditor.default, options.submitEditor]).add(_fakeTextCursor.default).add(_floatingToolbar.default).add([_selection.default, options.selection]).add([_codeBlock.default, options.codeBlock || {
79
79
  appearance: 'full-page'
@@ -32,6 +32,16 @@ var annotationMessages = (0, _reactIntlNext.defineMessages)({
32
32
  description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
33
33
  }
34
34
  });
35
+ /**
36
+ * Returns the coordintes at the bottom the selection.
37
+ */
38
+ exports.annotationMessages = annotationMessages;
39
+ var getCoordsBelowSelection = function getCoordsBelowSelection(bottomCoords, toolbarRect) {
40
+ return {
41
+ top: (bottomCoords.top || 0) + toolbarRect.height / 1.15,
42
+ left: bottomCoords.right - toolbarRect.width / 2
43
+ };
44
+ };
35
45
 
36
46
  /*
37
47
  Calculates the position of the floating toolbar relative to the selection.
@@ -47,7 +57,6 @@ var annotationMessages = (0, _reactIntlNext.defineMessages)({
47
57
  - use wrapperBounds to clamp values
48
58
  - editorView.dom bounds differ to wrapperBounds, convert at the end
49
59
  */
50
- exports.annotationMessages = annotationMessages;
51
60
  var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAboveSelection(toolbarTitle) {
52
61
  return function (editorView, nextPos) {
53
62
  var toolbar = document.querySelector("div[aria-label=\"".concat(toolbarTitle, "\"]"));
@@ -83,13 +92,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
83
92
  }
84
93
 
85
94
  /*
86
- short selection above a long paragraph
87
- eg. short {<}heading
88
- The purpose of this text is to show the selection range{>}.
89
- The horizontal positioning should center around "heading",
90
- not where it ends at "range".
91
- Note: if it was "head<b>ing</b>" then it would only center
92
- around "head". Undesireable but matches the current renderer.
95
+ short selection above a long paragraph
96
+ eg. short {<}heading
97
+ The purpose of this text is to show the selection range{>}.
98
+ The horizontal positioning should center around "heading",
99
+ not where it ends at "range".
100
+ Note: if it was "head<b>ing</b>" then it would only center
101
+ around "head". Undesireable but matches the current renderer.
93
102
  */
94
103
  var cliffPosition = range.getClientRects()[0];
95
104
  if (cliffPosition.right < left) {
@@ -101,6 +110,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
101
110
  }
102
111
  left -= toolbarRect.width / 2;
103
112
 
113
+ // Place toolbar below selection if not sufficient space above
114
+ if (top < wrapperBounds.top) {
115
+ var _getCoordsBelowSelect = getCoordsBelowSelection(bottomCoords, toolbarRect);
116
+ top = _getCoordsBelowSelect.top;
117
+ left = _getCoordsBelowSelect.left;
118
+ }
119
+
104
120
  // remap positions from browser document to wrapperBounds
105
121
  return {
106
122
  top: top - wrapperBounds.top + scrollWrapper.scrollTop,
@@ -156,6 +172,13 @@ var calculateToolbarPositionTrackHead = function calculateToolbarPositionTrackHe
156
172
  }
157
173
  var left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
158
174
 
175
+ // Place toolbar below selection if not sufficient space above
176
+ if (top < wrapperBounds.top) {
177
+ var _getCoordsBelowSelect2 = getCoordsBelowSelection(bottomCoords, toolbarRect);
178
+ top = _getCoordsBelowSelect2.top;
179
+ left = _getCoordsBelowSelect2.left;
180
+ }
181
+
159
182
  // remap positions from browser document to wrapperBounds
160
183
  return {
161
184
  top: top - wrapperBounds.top + scrollWrapper.scrollTop,
@@ -347,12 +347,6 @@ Object.defineProperty(exports, "textColorPlugin", {
347
347
  return _textColor.default;
348
348
  }
349
349
  });
350
- Object.defineProperty(exports, "textFormattingPlugin", {
351
- enumerable: true,
352
- get: function get() {
353
- return _textFormatting.default;
354
- }
355
- });
356
350
  Object.defineProperty(exports, "toolbarListsIndentationPlugin", {
357
351
  enumerable: true,
358
352
  get: function get() {
@@ -414,7 +408,6 @@ var _saveOnEnter = _interopRequireDefault(require("./save-on-enter"));
414
408
  var _submitEditor = _interopRequireDefault(require("./submit-editor"));
415
409
  var _tasksAndDecisions = _interopRequireDefault(require("./tasks-and-decisions"));
416
410
  var _textColor = _interopRequireDefault(require("./text-color"));
417
- var _textFormatting = _interopRequireDefault(require("./text-formatting"));
418
411
  var _typeAhead = _interopRequireDefault(require("./type-ahead"));
419
412
  var _unsupportedContent = _interopRequireDefault(require("./unsupported-content"));
420
413
  var _floatingToolbar = _interopRequireDefault(require("./floating-toolbar"));
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.17.6";
9
+ var version = "187.18.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.17.6",
3
+ "version": "187.18.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,7 @@ import pastePlugin from '../../../plugins/paste';
4
4
  import blockTypePlugin from '../../../plugins/block-type';
5
5
  import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-marks-on-change-to-empty-document';
6
6
  import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import textFormattingPlugin from '../../../plugins/text-formatting';
7
+ import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
8
8
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
9
9
  import unsupportedContentPlugin from '../../../plugins/unsupported-content';
10
10
  import basePlugin from '../../../plugins/base';
@@ -24,6 +24,15 @@ export const annotationMessages = defineMessages({
24
24
  description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
25
25
  }
26
26
  });
27
+ /**
28
+ * Returns the coordintes at the bottom the selection.
29
+ */
30
+ const getCoordsBelowSelection = (bottomCoords, toolbarRect) => {
31
+ return {
32
+ top: (bottomCoords.top || 0) + toolbarRect.height / 1.15,
33
+ left: bottomCoords.right - toolbarRect.width / 2
34
+ };
35
+ };
27
36
 
28
37
  /*
29
38
  Calculates the position of the floating toolbar relative to the selection.
@@ -61,7 +70,7 @@ const calculateToolbarPositionAboveSelection = toolbarTitle => (editorView, next
61
70
  } = editorView.state.selection;
62
71
  const topCoords = editorView.coordsAtPos(Math.min(head, anchor));
63
72
  const bottomCoords = editorView.coordsAtPos(Math.max(head, anchor) - Math.min(range.endOffset, 1));
64
- const top = (topCoords.top || 0) - toolbarRect.height * 1.5;
73
+ let top = (topCoords.top || 0) - toolbarRect.height * 1.5;
65
74
  let left = 0;
66
75
 
67
76
  // If not on the same line
@@ -74,13 +83,13 @@ const calculateToolbarPositionAboveSelection = toolbarTitle => (editorView, next
74
83
  }
75
84
 
76
85
  /*
77
- short selection above a long paragraph
78
- eg. short {<}heading
79
- The purpose of this text is to show the selection range{>}.
80
- The horizontal positioning should center around "heading",
81
- not where it ends at "range".
82
- Note: if it was "head<b>ing</b>" then it would only center
83
- around "head". Undesireable but matches the current renderer.
86
+ short selection above a long paragraph
87
+ eg. short {<}heading
88
+ The purpose of this text is to show the selection range{>}.
89
+ The horizontal positioning should center around "heading",
90
+ not where it ends at "range".
91
+ Note: if it was "head<b>ing</b>" then it would only center
92
+ around "head". Undesireable but matches the current renderer.
84
93
  */
85
94
  const cliffPosition = range.getClientRects()[0];
86
95
  if (cliffPosition.right < left) {
@@ -92,6 +101,14 @@ const calculateToolbarPositionAboveSelection = toolbarTitle => (editorView, next
92
101
  }
93
102
  left -= toolbarRect.width / 2;
94
103
 
104
+ // Place toolbar below selection if not sufficient space above
105
+ if (top < wrapperBounds.top) {
106
+ ({
107
+ top,
108
+ left
109
+ } = getCoordsBelowSelection(bottomCoords, toolbarRect));
110
+ }
111
+
95
112
  // remap positions from browser document to wrapperBounds
96
113
  return {
97
114
  top: top - wrapperBounds.top + scrollWrapper.scrollTop,
@@ -144,7 +161,15 @@ const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, nextPos)
144
161
  } else {
145
162
  top = (topCoords.top || 0) - toolbarRect.height * 1.5;
146
163
  }
147
- const left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
164
+ let left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
165
+
166
+ // Place toolbar below selection if not sufficient space above
167
+ if (top < wrapperBounds.top) {
168
+ ({
169
+ top,
170
+ left
171
+ } = getCoordsBelowSelection(bottomCoords, toolbarRect));
172
+ }
148
173
 
149
174
  // remap positions from browser document to wrapperBounds
150
175
  return {
@@ -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';
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.17.6";
2
+ export const version = "187.18.0";
3
3
  export const 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.6",
3
+ "version": "187.18.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,7 +4,7 @@ import pastePlugin from '../../../plugins/paste';
4
4
  import blockTypePlugin from '../../../plugins/block-type';
5
5
  import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-marks-on-change-to-empty-document';
6
6
  import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import textFormattingPlugin from '../../../plugins/text-formatting';
7
+ import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
8
8
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
9
9
  import unsupportedContentPlugin from '../../../plugins/unsupported-content';
10
10
  import basePlugin from '../../../plugins/base';
@@ -24,6 +24,15 @@ export var annotationMessages = defineMessages({
24
24
  description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
25
25
  }
26
26
  });
27
+ /**
28
+ * Returns the coordintes at the bottom the selection.
29
+ */
30
+ var getCoordsBelowSelection = function getCoordsBelowSelection(bottomCoords, toolbarRect) {
31
+ return {
32
+ top: (bottomCoords.top || 0) + toolbarRect.height / 1.15,
33
+ left: bottomCoords.right - toolbarRect.width / 2
34
+ };
35
+ };
27
36
 
28
37
  /*
29
38
  Calculates the position of the floating toolbar relative to the selection.
@@ -74,13 +83,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
74
83
  }
75
84
 
76
85
  /*
77
- short selection above a long paragraph
78
- eg. short {<}heading
79
- The purpose of this text is to show the selection range{>}.
80
- The horizontal positioning should center around "heading",
81
- not where it ends at "range".
82
- Note: if it was "head<b>ing</b>" then it would only center
83
- around "head". Undesireable but matches the current renderer.
86
+ short selection above a long paragraph
87
+ eg. short {<}heading
88
+ The purpose of this text is to show the selection range{>}.
89
+ The horizontal positioning should center around "heading",
90
+ not where it ends at "range".
91
+ Note: if it was "head<b>ing</b>" then it would only center
92
+ around "head". Undesireable but matches the current renderer.
84
93
  */
85
94
  var cliffPosition = range.getClientRects()[0];
86
95
  if (cliffPosition.right < left) {
@@ -92,6 +101,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
92
101
  }
93
102
  left -= toolbarRect.width / 2;
94
103
 
104
+ // Place toolbar below selection if not sufficient space above
105
+ if (top < wrapperBounds.top) {
106
+ var _getCoordsBelowSelect = getCoordsBelowSelection(bottomCoords, toolbarRect);
107
+ top = _getCoordsBelowSelect.top;
108
+ left = _getCoordsBelowSelect.left;
109
+ }
110
+
95
111
  // remap positions from browser document to wrapperBounds
96
112
  return {
97
113
  top: top - wrapperBounds.top + scrollWrapper.scrollTop,
@@ -147,6 +163,13 @@ var calculateToolbarPositionTrackHead = function calculateToolbarPositionTrackHe
147
163
  }
148
164
  var left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
149
165
 
166
+ // Place toolbar below selection if not sufficient space above
167
+ if (top < wrapperBounds.top) {
168
+ var _getCoordsBelowSelect2 = getCoordsBelowSelection(bottomCoords, toolbarRect);
169
+ top = _getCoordsBelowSelect2.top;
170
+ left = _getCoordsBelowSelect2.left;
171
+ }
172
+
150
173
  // remap positions from browser document to wrapperBounds
151
174
  return {
152
175
  top: top - wrapperBounds.top + scrollWrapper.scrollTop,
@@ -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';
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.17.6";
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.6",
3
+ "version": "187.18.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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';
@@ -255,13 +255,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
255
255
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
256
256
  }>>];
257
257
  actions: {
258
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
259
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
260
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
261
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
262
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
263
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
264
- 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;
265
265
  };
266
266
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
267
267
  pluginConfiguration: TextFormattingOptions | undefined;
@@ -295,13 +295,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
295
295
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
296
296
  }>>];
297
297
  actions: {
298
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
299
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
300
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
301
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
302
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
303
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
304
- 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;
305
305
  };
306
306
  }>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
307
307
  pluginConfiguration: HyperlinkPluginOptions | undefined;
@@ -618,13 +618,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
618
618
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
619
619
  }>>];
620
620
  actions: {
621
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
622
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
623
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
624
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
625
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
626
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
627
- 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;
628
628
  };
629
629
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
630
630
  pluginConfiguration: TextFormattingOptions | undefined;
@@ -658,13 +658,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
658
658
  actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
659
659
  }>>];
660
660
  actions: {
661
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
662
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
663
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
664
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
665
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
666
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
667
- 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;
668
668
  };
669
669
  }>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
670
670
  pluginConfiguration: HyperlinkPluginOptions | undefined;
@@ -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 {};
@@ -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;
@@ -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';
@@ -310,13 +310,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
310
310
  }>>
311
311
  ];
312
312
  actions: {
313
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
314
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
315
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
316
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
317
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
318
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
319
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
313
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
314
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
315
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
316
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
317
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
318
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
319
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
320
320
  };
321
321
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
322
322
  pluginConfiguration: TextFormattingOptions | undefined;
@@ -356,13 +356,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
356
356
  }>>
357
357
  ];
358
358
  actions: {
359
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
360
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
361
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
362
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
363
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
364
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
365
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
359
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
360
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
361
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
362
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
363
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
364
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
365
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
366
366
  };
367
367
  }>,
368
368
  (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
@@ -751,13 +751,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
751
751
  }>>
752
752
  ];
753
753
  actions: {
754
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
755
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
756
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
757
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
758
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
759
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
760
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
754
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
755
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
756
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
757
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
758
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
759
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
760
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
761
761
  };
762
762
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
763
763
  pluginConfiguration: TextFormattingOptions | undefined;
@@ -797,13 +797,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
797
797
  }>>
798
798
  ];
799
799
  actions: {
800
- toggleSuperscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
801
- toggleSubscript: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
802
- toggleStrike: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
803
- toggleCode: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
804
- toggleUnderline: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
805
- toggleEm: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
806
- toggleStrong: import("../../../plugins/text-formatting/actions").ToggleMarkWithAnalyticsCommand;
800
+ toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
801
+ toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
802
+ toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
803
+ toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
804
+ toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
805
+ toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
806
+ toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
807
807
  };
808
808
  }>,
809
809
  (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
@@ -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 {};