@atlaskit/editor-core 187.8.3 → 187.8.7

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 (151) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/create-editor/ReactEditorViewInternal.js +4 -5
  3. package/dist/cjs/plugins/annotation/commands/transform.js +2 -2
  4. package/dist/cjs/plugins/block-type/commands/block-type.js +2 -2
  5. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +2 -2
  6. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -2
  7. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -2
  8. package/dist/cjs/plugins/text-color/commands/toggle-color.js +2 -2
  9. package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +9 -9
  10. package/dist/cjs/plugins/text-formatting/commands/transform-to-code.js +2 -2
  11. package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -5
  12. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +2 -2
  13. package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +2 -1
  14. package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +2 -2
  15. package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +2 -3
  16. package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -2
  17. package/dist/cjs/ui/Appearance/Comment/Comment.js +5 -6
  18. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -2
  19. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
  20. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -5
  21. package/dist/cjs/ui/Dropdown/index.js +1 -2
  22. package/dist/cjs/ui/styles.js +3 -5
  23. package/dist/cjs/utils/commands.js +8 -121
  24. package/dist/cjs/utils/index.js +0 -13
  25. package/dist/cjs/version-wrapper.js +1 -1
  26. package/dist/cjs/version.json +1 -1
  27. package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -6
  28. package/dist/es2019/plugins/annotation/commands/transform.js +1 -1
  29. package/dist/es2019/plugins/block-type/commands/block-type.js +1 -1
  30. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
  31. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -5
  32. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -1
  33. package/dist/es2019/plugins/text-color/commands/toggle-color.js +1 -1
  34. package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +1 -1
  35. package/dist/es2019/plugins/text-formatting/commands/transform-to-code.js +1 -1
  36. package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -2
  37. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  38. package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +2 -1
  39. package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +1 -1
  40. package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -2
  41. package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +1 -1
  42. package/dist/es2019/ui/Appearance/Comment/Comment.js +6 -5
  43. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +3 -2
  44. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -3
  45. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
  46. package/dist/es2019/ui/Dropdown/index.js +1 -2
  47. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
  48. package/dist/es2019/ui/styles.js +0 -5
  49. package/dist/es2019/utils/commands.js +1 -113
  50. package/dist/es2019/utils/index.js +0 -12
  51. package/dist/es2019/version-wrapper.js +1 -1
  52. package/dist/es2019/version.json +1 -1
  53. package/dist/esm/create-editor/ReactEditorViewInternal.js +3 -6
  54. package/dist/esm/plugins/annotation/commands/transform.js +1 -1
  55. package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
  56. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
  57. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -5
  58. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -1
  59. package/dist/esm/plugins/text-color/commands/toggle-color.js +1 -1
  60. package/dist/esm/plugins/text-formatting/commands/text-formatting.js +1 -1
  61. package/dist/esm/plugins/text-formatting/commands/transform-to-code.js +1 -1
  62. package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -2
  63. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
  64. package/dist/esm/plugins/text-formatting/pm-plugins/main.js +2 -1
  65. package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +1 -1
  66. package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -2
  67. package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +1 -1
  68. package/dist/esm/ui/Appearance/Comment/Comment.js +4 -5
  69. package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
  70. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -3
  71. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
  72. package/dist/esm/ui/Dropdown/index.js +1 -2
  73. package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
  74. package/dist/esm/ui/styles.js +2 -3
  75. package/dist/esm/utils/commands.js +7 -118
  76. package/dist/esm/utils/index.js +0 -12
  77. package/dist/esm/version-wrapper.js +1 -1
  78. package/dist/esm/version.json +1 -1
  79. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -1
  80. package/dist/types/plugins/block-type/commands/block-type.d.ts +1 -2
  81. package/dist/types/plugins/code-block/ide-ux/quote-handling.d.ts +1 -1
  82. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -1
  83. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
  84. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -1
  85. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +1 -1
  86. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -1
  87. package/dist/types/plugins/text-color/commands/toggle-color.d.ts +1 -1
  88. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +2 -2
  89. package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
  90. package/dist/types/types/editor-appearance-component.d.ts +4 -4
  91. package/dist/types/types/editor-instance.d.ts +1 -1
  92. package/dist/types/types/editor-props.d.ts +5 -8
  93. package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -2
  94. package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +1 -2
  95. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  96. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  97. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  98. package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
  99. package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
  100. package/dist/types/ui/ElementBrowser/types.d.ts +1 -1
  101. package/dist/types/ui/styles.d.ts +0 -1
  102. package/dist/types/utils/commands.d.ts +2 -12
  103. package/dist/types/utils/index.d.ts +0 -4
  104. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -1
  105. package/dist/types-ts4.5/plugins/block-type/commands/block-type.d.ts +1 -2
  106. package/dist/types-ts4.5/plugins/code-block/ide-ux/quote-handling.d.ts +1 -1
  107. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -1
  108. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
  109. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -1
  110. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +1 -1
  111. package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -1
  112. package/dist/types-ts4.5/plugins/text-color/commands/toggle-color.d.ts +1 -1
  113. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +2 -2
  114. package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
  115. package/dist/types-ts4.5/types/editor-appearance-component.d.ts +4 -4
  116. package/dist/types-ts4.5/types/editor-instance.d.ts +1 -1
  117. package/dist/types-ts4.5/types/editor-props.d.ts +5 -8
  118. package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +2 -2
  119. package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +1 -2
  120. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  121. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
  122. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  123. package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +1 -1
  124. package/dist/types-ts4.5/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
  125. package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +1 -1
  126. package/dist/types-ts4.5/ui/styles.d.ts +0 -1
  127. package/dist/types-ts4.5/utils/commands.d.ts +2 -12
  128. package/dist/types-ts4.5/utils/index.d.ts +0 -4
  129. package/package.json +3 -3
  130. package/report.api.md +2 -10
  131. package/tmp/api-report-tmp.d.ts +2 -7
  132. package/dist/cjs/ui/Appearance/FullPage/messages.js +0 -25
  133. package/dist/cjs/ui/DropdownMenu/index.js +0 -31
  134. package/dist/cjs/ui/DropdownMenu/types.js +0 -5
  135. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -218
  136. package/dist/es2019/ui/Appearance/FullPage/messages.js +0 -18
  137. package/dist/es2019/ui/DropdownMenu/index.js +0 -18
  138. package/dist/es2019/ui/DropdownMenu/types.js +0 -1
  139. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -205
  140. package/dist/esm/ui/Appearance/FullPage/messages.js +0 -18
  141. package/dist/esm/ui/DropdownMenu/index.js +0 -20
  142. package/dist/esm/ui/DropdownMenu/types.js +0 -1
  143. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -205
  144. package/dist/types/ui/Appearance/FullPage/messages.d.ts +0 -18
  145. package/dist/types/ui/DropdownMenu/index.d.ts +0 -3
  146. package/dist/types/ui/DropdownMenu/types.d.ts +0 -1
  147. package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +0 -31
  148. package/dist/types-ts4.5/ui/Appearance/FullPage/messages.d.ts +0 -18
  149. package/dist/types-ts4.5/ui/DropdownMenu/index.d.ts +0 -3
  150. package/dist/types-ts4.5/ui/DropdownMenu/types.d.ts +0 -1
  151. package/dist/types-ts4.5/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +0 -31
@@ -1,6 +1,4 @@
1
1
  import { TextSelection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
3
- import { transformSmartCharsMentionsAndEmojis } from '../plugins/text-formatting/commands/transform-to-code';
4
2
  import { GapCursorSelection } from '@atlaskit/editor-common/selection';
5
3
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
6
4
  const isEmptySelectionAtStart = state => {
@@ -65,116 +63,6 @@ function findCutBefore($pos) {
65
63
  }
66
64
  return null;
67
65
  }
68
- const applyMarkOnRange = (from, to, removeMark, mark, tr) => {
69
- const {
70
- schema
71
- } = tr.doc.type;
72
- const {
73
- code
74
- } = schema.marks;
75
- if (mark.type === code) {
76
- transformSmartCharsMentionsAndEmojis(from, to, tr);
77
- }
78
- tr.doc.nodesBetween(tr.mapping.map(from), tr.mapping.map(to), (node, pos) => {
79
- if (!node.isText) {
80
- return true;
81
- }
82
-
83
- // This is an issue when the user selects some text.
84
- // We need to check if the current node position is less than the range selection from.
85
- // If it’s true, that means we should apply the mark using the range selection,
86
- // not the current node position.
87
- const nodeBetweenFrom = Math.max(pos, tr.mapping.map(from));
88
- const nodeBetweenTo = Math.min(pos + node.nodeSize, tr.mapping.map(to));
89
- if (removeMark) {
90
- tr.removeMark(nodeBetweenFrom, nodeBetweenTo, mark);
91
- } else {
92
- tr.addMark(nodeBetweenFrom, nodeBetweenTo, mark);
93
- }
94
- return true;
95
- });
96
- return tr;
97
- };
98
- const entireSelectionContainsMark = (mark, doc, fromPos, toPos) => {
99
- let onlyContainsMark = true;
100
- doc.nodesBetween(fromPos, toPos, node => {
101
- // Skip recursion once we've found text which doesn't include the mark
102
- if (!onlyContainsMark) {
103
- return false;
104
- }
105
- if (node.isText) {
106
- onlyContainsMark && (onlyContainsMark = mark.isInSet(node.marks));
107
- }
108
- });
109
- return onlyContainsMark;
110
- };
111
- const toggleMarkInRange = mark => (state, dispatch) => {
112
- const tr = state.tr;
113
- if (state.selection instanceof CellSelection) {
114
- let removeMark = true;
115
- const cells = [];
116
- state.selection.forEachCell((cell, cellPos) => {
117
- cells.push({
118
- node: cell,
119
- pos: cellPos
120
- });
121
- const from = cellPos;
122
- const to = cellPos + cell.nodeSize;
123
- removeMark && (removeMark = entireSelectionContainsMark(mark, state.doc, from, to));
124
- });
125
- for (let i = cells.length - 1; i >= 0; i--) {
126
- const cell = cells[i];
127
- const from = cell.pos;
128
- const to = from + cell.node.nodeSize;
129
- applyMarkOnRange(from, to, removeMark, mark, tr);
130
- }
131
- } else {
132
- const {
133
- $from,
134
- $to
135
- } = state.selection;
136
- // We decide to remove the mark only if the entire selection contains the mark
137
- // Examples with *bold* text
138
- // Scenario 1: Selection contains both bold and non-bold text -> bold entire selection
139
- // Scenario 2: Selection contains only bold text -> un-bold entire selection
140
- // Scenario 3: Selection contains no bold text -> bold entire selection
141
- const removeMark = entireSelectionContainsMark(mark, state.doc, $from.pos, $to.pos);
142
- applyMarkOnRange($from.pos, $to.pos, removeMark, mark, tr);
143
- }
144
- if (tr.docChanged) {
145
- if (dispatch) {
146
- dispatch(tr);
147
- }
148
- return true;
149
- }
150
- return false;
151
- };
152
-
153
- /**
154
- * A wrapper over the default toggleMark, except when we have a selection
155
- * we only toggle marks on text nodes rather than inline nodes.
156
- * @param markType
157
- * @param attrs
158
- */
159
- const toggleMark = (markType, attrs) => (state, dispatch) => {
160
- const mark = markType.create(attrs);
161
-
162
- // For cursor selections we can use the default behaviour.
163
- if (state.selection instanceof TextSelection && state.selection.$cursor) {
164
- const tr = state.tr;
165
- if (mark.isInSet(state.storedMarks || state.selection.$cursor.marks())) {
166
- tr.removeStoredMark(mark);
167
- } else {
168
- tr.addStoredMark(mark);
169
- }
170
- if (dispatch) {
171
- dispatch(tr);
172
- return true;
173
- }
174
- return false;
175
- }
176
- return toggleMarkInRange(mark)(state, dispatch);
177
- };
178
66
  const withScrollIntoView = command => (state, dispatch, view) => command(state, tr => {
179
67
  tr.scrollIntoView();
180
68
  if (dispatch) {
@@ -283,4 +171,4 @@ const deleteEmptyParagraphAndMoveBlockUp = canNextNodeMoveUp => {
283
171
  return false;
284
172
  };
285
173
  };
286
- export { isEmptySelectionAtStart, isEmptySelectionAtEnd, isFirstChildOfParent, isNthParentOfType, findCutBefore, toggleMark, applyMarkOnRange, withScrollIntoView, walkNextNode, walkPrevNode, insertContentDeleteRange, selectNode, deleteEmptyParagraphAndMoveBlockUp };
174
+ export { isEmptySelectionAtStart, isEmptySelectionAtEnd, isFirstChildOfParent, isNthParentOfType, findCutBefore, withScrollIntoView, walkNextNode, walkPrevNode, insertContentDeleteRange, selectNode, deleteEmptyParagraphAndMoveBlockUp };
@@ -294,18 +294,6 @@ export const isInsideBlockQuote = state => {
294
294
  } = state.schema.nodes;
295
295
  return hasParentNodeOfType(blockquote)(state.selection);
296
296
  };
297
- export function filterChildrenBetween(doc, from, to, predicate) {
298
- const results = [];
299
- doc.nodesBetween(from, to, (node, pos, parent) => {
300
- if (predicate(node, pos, parent)) {
301
- results.push({
302
- node,
303
- pos
304
- });
305
- }
306
- });
307
- return results;
308
- }
309
297
  export function dedupe(list = [], iteratee = p => p) {
310
298
  /**
311
299
  .,
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.8.3";
2
+ export const version = "187.8.7";
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.8.3",
3
+ "version": "187.8.7",
4
4
  "sideEffects": false
5
5
  }
@@ -15,10 +15,9 @@ import PropTypes from 'prop-types';
15
15
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
16
16
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
17
17
  import { editorMessages } from './messages';
18
- import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common/utils';
18
+ import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking, processRawValue, analyticsEventKey } from '@atlaskit/editor-common/utils';
19
19
  import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
20
20
  import { createDispatch, EventDispatcher } from '../event-dispatcher';
21
- import { processRawValue } from '@atlaskit/editor-common/utils';
22
21
  import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
23
22
  import { RenderTracking } from '../utils/performance/components/RenderTracking';
24
23
  import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
@@ -30,17 +29,16 @@ import { getDocStructure } from '../utils/document-logger';
30
29
  import { isFullPage } from '../utils/is-full-page';
31
30
  import measurements from '../utils/performance/measure-enum';
32
31
  import { getNodesCount } from '../utils/document';
33
- import { analyticsEventKey } from '@atlaskit/editor-common/utils';
34
32
  import { createSchema } from './create-schema';
35
33
  import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
36
34
  import { getParticipantsCount } from '../plugins/collab-edit/get-participants-count';
35
+ import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, EVENT_NAME_ON_CHANGE, TransactionTracker } from '../utils/performance/track-transactions';
37
36
  import { countNodes as _countNodes } from '../utils/count-nodes';
38
- import { TransactionTracker } from '../utils/performance/track-transactions';
39
- import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, EVENT_NAME_ON_CHANGE } from '../utils/performance/track-transactions';
40
37
  import { PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS } from './consts';
41
38
  import { getContextIdentifier } from '../plugins/base/pm-plugins/context-identifier';
42
39
  import ReactEditorViewContext from './ReactEditorViewContext';
43
40
  import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
41
+ import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
44
42
  function handleEditorFocus(view) {
45
43
  if (view.hasFocus()) {
46
44
  return;
@@ -78,7 +76,6 @@ function handleEditorFocus(view) {
78
76
  view.focus();
79
77
  }, 0);
80
78
  }
81
- export var EDIT_AREA_ID = 'ak-editor-textarea';
82
79
  export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
83
80
  _inherits(ReactEditorView, _React$Component);
84
81
  var _super = _createSuper(ReactEditorView);
@@ -3,7 +3,7 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
3
3
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { addAnalytics } from '../../analytics/utils';
5
5
  import { getSelectionPositions, getPluginState, getDraftCommandAnalyticsPayload } from '../utils';
6
- import { applyMarkOnRange } from '../../../utils/commands';
6
+ import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
7
7
  var addAnnotationMark = function addAnnotationMark(id) {
8
8
  return function (transaction, state) {
9
9
  var inlineCommentState = getPluginState(state);
@@ -9,7 +9,7 @@ import { shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/
9
9
  import { withAnalytics as withAnalyticsDeprecated } from '../../analytics';
10
10
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
11
11
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
12
- import { filterChildrenBetween } from '../../../utils';
12
+ import { filterChildrenBetween } from '@atlaskit/editor-common/mark';
13
13
  import { PanelType } from '@atlaskit/adf-schema';
14
14
  import { CellSelection } from '@atlaskit/editor-tables';
15
15
  import { transformToCodeBlockAction } from './transform-to-code-block';
@@ -14,7 +14,7 @@ import React from 'react';
14
14
  import { jsx } from '@emotion/react';
15
15
  import { injectIntl } from 'react-intl-next';
16
16
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
17
- import DropdownMenu from '../../../../ui/DropdownMenu';
17
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
18
18
  import { separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
19
19
  import { blockTypeMenuItemStyle, keyboardShortcut, keyboardShortcutSelect } from './styled';
20
20
  import { tooltip, findKeymapByDescription } from '../../../../keymaps';
@@ -11,9 +11,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
13
  /** @jsx jsx */
14
- import React from 'react';
14
+ import React, { Component } from 'react';
15
15
  import { css, jsx } from '@emotion/react';
16
- import { Component } from 'react';
17
16
  import ButtonGroup from '@atlaskit/button/button-group';
18
17
  import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
19
18
  import { themed } from '@atlaskit/theme/components';
@@ -21,7 +20,7 @@ import { borderRadius } from '@atlaskit/theme/constants';
21
20
  import { DN70 } from '@atlaskit/theme/colors';
22
21
  import { compareArrays, shallowEqual } from '../utils';
23
22
  import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
24
- import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
23
+ import { FloatingToolbarButton as Button, Announcer } from '@atlaskit/editor-common/ui';
25
24
  import Dropdown from './Dropdown';
26
25
  import Select from './Select';
27
26
  import Separator from './Separator';
@@ -30,12 +29,11 @@ import { ExtensionsPlaceholder } from './ExtensionsPlaceholder';
30
29
  import ColorPickerButton from '../../../ui/ColorPickerButton';
31
30
  import { backgroundPaletteTooltipMessages } from '../../../ui/ColorPalette';
32
31
  import { EmojiPickerButton } from './EmojiPickerButton';
33
- import { Announcer } from '@atlaskit/editor-common/ui';
34
32
  import { injectIntl } from 'react-intl-next';
35
33
  import messages from './messages';
36
34
  import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
37
35
  import ScrollButtons from './ScrollButtons';
38
- import { ToolbarArrowKeyNavigationProvider } from '../../../ui/ToolbarArrowKeyNavigationProvider';
36
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
39
37
  import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
40
38
  var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
41
39
  var items = _ref.items,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
3
- import DropdownMenu from '../../../../ui/DropdownMenu';
3
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
4
4
  import { DropDownButton } from './dropdown-button';
5
5
  export var BlockInsertMenuLegacy = function BlockInsertMenuLegacy(props) {
6
6
  var items = props.items;
@@ -1,4 +1,4 @@
1
- import { toggleMark } from '../../../utils/commands';
1
+ import { toggleMark } from '@atlaskit/editor-common/mark';
2
2
  import { ACTIONS, pluginKey } from '../pm-plugins/main';
3
3
  import { getDisabledState } from '../utils/disabled';
4
4
  export var toggleColor = function toggleColor(color) {
@@ -1,5 +1,5 @@
1
1
  import { Selection } from '@atlaskit/editor-prosemirror/state';
2
- import { applyMarkOnRange, toggleMark } from '../../../utils/commands';
2
+ import { applyMarkOnRange, toggleMark } from '@atlaskit/editor-common/mark';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { hasCode, markActive } from '../utils';
5
5
  import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
@@ -1,4 +1,4 @@
1
- import { filterChildrenBetween } from '../../../utils';
1
+ import { filterChildrenBetween } from '@atlaskit/editor-common/mark';
2
2
  var SMART_TO_ASCII = {
3
3
  '…': '...',
4
4
  '→': '->',
@@ -1,9 +1,9 @@
1
- import * as safePlugin from '@atlaskit/editor-common/safe-plugin';
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { checkFormattingIsPresent } from '../utils';
4
4
  export var pluginKey = new PluginKey('clearFormattingPlugin');
5
5
  export var plugin = function plugin(dispatch) {
6
- return new safePlugin.SafePlugin({
6
+ return new SafePlugin({
7
7
  state: {
8
8
  init: function init(_config, state) {
9
9
  return {
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  import { ruleWithAnalytics } from '../../../utils/input-rules';
14
14
  import { createRule, createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
15
15
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
- import { transformSmartCharsMentionsAndEmojis } from '../commands/transform-to-code';
16
+ import { transformSmartCharsMentionsAndEmojis } from '@atlaskit/editor-common/mark';
17
17
  var ValidAutoformatChars = /*#__PURE__*/function (ValidAutoformatChars) {
18
18
  ValidAutoformatChars["STRONG"] = "__";
19
19
  ValidAutoformatChars["STRIKE"] = "~~";
@@ -1,9 +1,10 @@
1
+ // TODO: Ideally this should use the custom toggleMark function from @atlaskit/editor-common so we also disable the options when selecting inline nodes but it disables the marks when the selection is empty at this point in time which is undesirable
2
+ // import { toggleMark } from '@atlaskit/editor-common/mark';
1
3
  import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
2
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
5
  import * as keymaps from '@atlaskit/editor-common/keymaps';
4
6
  import { shallowEqual } from '@atlaskit/editor-common/utils';
5
7
  import { createInlineCodeFromTextInputWithAnalytics } from '../commands/text-formatting';
6
- // eslint-disable-next-line no-duplicate-imports
7
8
  import * as commands from '../commands/text-formatting';
8
9
  import { anyMarkActive } from '../utils';
9
10
  import { pluginKey } from './plugin-key';
@@ -1,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useMemo, useState } from 'react';
3
3
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
4
- import DropdownMenu from '../../../../ui/DropdownMenu';
4
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
5
5
  import { useMenuState } from './hooks/menu-state';
6
6
  import { MoreButton } from './more-button';
7
7
  export var FormattingTextDropdownMenu = /*#__PURE__*/React.memo(function (_ref) {
@@ -10,9 +10,8 @@ import { toolbarMessages } from '../toolbar-messages';
10
10
  import * as commands from '../../../commands/text-formatting';
11
11
  import { TOOLBAR_ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
12
12
  import { pluginKey as textFormattingPluginKey } from '../../../pm-plugins/plugin-key';
13
- import { toggleCode, toggleStrikethrough, toggleUnderline, tooltip, toggleBold, toggleItalic, toggleSubscript, toggleSuperscript, ToolTipContent } from '../../../../../keymaps';
13
+ import { toggleCode, toggleStrikethrough, toggleUnderline, tooltip, toggleBold, toggleItalic, toggleSubscript, toggleSuperscript, ToolTipContent, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
14
14
  import { IconTypes } from '../types';
15
- import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
16
15
  var withToolbarInputMethod = function withToolbarInputMethod(func) {
17
16
  return func({
18
17
  inputMethod: INPUT_METHOD.TOOLBAR
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl-next';
6
6
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
7
7
  import BulletListIcon from '@atlaskit/icon/glyph/editor/bullet-list';
8
8
  import { toggleBulletList as toggleBulletListKeymap, toggleOrderedList as toggleOrderedListKeymap, indent as toggleIndentKeymap, outdent as toggleOutdentKeymap, tooltip } from '../../../keymaps';
9
- import DropdownMenu from '../../../ui/DropdownMenu';
9
+ import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
10
10
  import ToolbarButton from '../../../ui/ToolbarButton';
11
11
  import { expandIconWrapperStyle, shortcutStyle } from '../../../ui/styles';
12
12
  import { wrapperStyle, separatorStyles } from '@atlaskit/editor-common/styles';
@@ -32,13 +32,12 @@ import { injectIntl } from 'react-intl-next';
32
32
  import messages from '../../../messages';
33
33
  import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle } from './Toolbar';
34
34
  import { createEditorContentStyle } from '../../ContentStyles';
35
- import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
35
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
36
36
  var CommentEditorMargin = 14;
37
- var CommentEditorSmallerMargin = 8;
38
- var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, "var(--ds-background-input, white)", "var(--ds-border, ".concat(N40, ")"), borderRadius());
39
- var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
37
+ var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: ", " ", "\n ", ";\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Paragraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-background-input, white)", "var(--ds-border, ".concat(N40, ")"), borderRadius());
38
+ var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for table controls. Otherwise margin collapse and controls are misplaced. **/\n .ProseMirror {\n margin: ", " ", "px\n ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), "var(--ds-space-150, 12px)", CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
40
39
  ContentArea.displayName = 'ContentArea';
41
- var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
40
+ var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: ", " 1px;\n"])), "var(--ds-space-150, 12px)");
42
41
  var Editor = /*#__PURE__*/function (_React$Component) {
43
42
  _inherits(Editor, _React$Component);
44
43
  var _super = _createSuper(Editor);
@@ -3,12 +3,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
5
  /** @jsx jsx */
6
+
6
7
  import React, { useEffect, useState } from 'react';
7
8
  import { css, jsx } from '@emotion/react';
8
9
  import { N30 } from '@atlaskit/theme/colors';
9
10
  import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
10
11
  export var TableControlsPadding = 20;
11
- var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", TableControlsPadding);
12
+ var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)");
12
13
  var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(N30, ")"));
13
14
  var StickyToolbar = function StickyToolbar(props) {
14
15
  var _useState = useState(0),
@@ -75,4 +76,4 @@ export var MainToolbar = function MainToolbar(_ref) {
75
76
  }
76
77
  return jsx(FixedToolbar, null, children);
77
78
  };
78
- export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", "px;\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), TableControlsPadding);
79
+ export var mainToolbarCustomComponentsSlotStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)");
@@ -1,14 +1,13 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx, useTheme } from '@emotion/react';
3
- import { WidthConsumer } from '@atlaskit/editor-common/ui';
4
- import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
3
+ import { WidthConsumer, ContextPanelConsumer } from '@atlaskit/editor-common/ui';
5
4
  import React, { useImperativeHandle, useRef } from 'react';
6
5
  import { injectIntl } from 'react-intl-next';
7
6
  import { ClickAreaBlock } from '../../Addon';
8
7
  import ContextPanel from '../../ContextPanel';
9
8
  import PluginSlot from '../../PluginSlot';
10
9
  import { contentArea, editorContentAreaStyle, sidebarArea, ScrollContainer, editorContentGutterStyle, positionedOverEditorStyle } from './StyledComponents';
11
- import messages from './messages';
10
+ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
12
11
  export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
13
12
  var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
14
13
  var theme = useTheme();
@@ -10,8 +10,8 @@ import { BeforePrimaryToolbarWrapper } from '../../../plugins/before-primaryTool
10
10
  import Toolbar from '../../Toolbar';
11
11
  import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
12
12
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
13
- import messages from './messages';
14
- import { ToolbarArrowKeyNavigationProvider } from '../../ToolbarArrowKeyNavigationProvider';
13
+ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
14
+ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
15
15
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
16
16
  var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _props$featureFlags5, _props$featureFlags6;
17
17
  var _useState = useState(false),
@@ -3,9 +3,8 @@ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructurin
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import { Dropdown as DropdownComponent } from '@atlaskit/editor-common/ui-menu';
6
+ import { Dropdown as DropdownComponent, KeyDownHandlerContext } from '@atlaskit/editor-common/ui-menu';
7
7
  import React, { useContext } from 'react';
8
- import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
9
8
  var Dropdown = /*#__PURE__*/React.memo(function (_ref) {
10
9
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
11
10
  var keyDownHandlerContext = useContext(KeyDownHandlerContext);
@@ -5,6 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  var _excluded = ["children"];
6
6
  var _templateObject, _templateObject2;
7
7
  /** @jsx jsx */
8
+
8
9
  import { useCallback, useState } from 'react';
9
10
  import { css, jsx } from '@emotion/react';
10
11
  // AFP-2532 TODO: Fix automatic suppressions below
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
3
  import { css } from '@emotion/react';
4
4
  export { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
5
5
  export { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
@@ -7,5 +7,4 @@ export var wrapperSmallStyle = css(_templateObject || (_templateObject = _tagged
7
7
  export var expandIconWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: -8px;\n"])));
8
8
  export var buttonContentStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: ", ";\n"])), "var(--ds-space-075, 6px)");
9
9
  export var buttonContentReducedSpacingStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", ";\n"])), "var(--ds-space-100, 8px)");
10
- export var clickSelectWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n user-select: all;\n"])));
11
- export var centeredToolbarContainer = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n align-items: center;\n"])));
10
+ export var clickSelectWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n user-select: all;\n"])));