@atlaskit/editor-core 165.0.0 → 166.0.2

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 (244) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/cjs/actions/index.js +9 -0
  3. package/dist/cjs/create-editor/ReactEditorView.js +14 -6
  4. package/dist/cjs/create-editor/create-plugins-list.js +1 -2
  5. package/dist/cjs/editor.js +13 -0
  6. package/dist/cjs/event-dispatcher/index.js +9 -0
  7. package/dist/cjs/nodeviews/ReactNodeView.js +1 -11
  8. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  9. package/dist/cjs/plugins/analytics/types/enums.js +1 -0
  10. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
  11. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
  12. package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
  13. package/dist/cjs/plugins/card/styles.js +3 -1
  14. package/dist/cjs/plugins/code-block/styles.js +6 -4
  15. package/dist/cjs/plugins/collab-edit/index.js +2 -2
  16. package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
  17. package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
  18. package/dist/cjs/plugins/date/styles.js +3 -1
  19. package/dist/cjs/plugins/emoji/index.js +30 -34
  20. package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
  21. package/dist/cjs/plugins/emoji/styles.js +3 -17
  22. package/dist/cjs/plugins/expand/ui/styles.js +2 -2
  23. package/dist/cjs/plugins/extension/context-panel.js +2 -2
  24. package/dist/cjs/plugins/extension/pm-plugins/main.js +2 -2
  25. package/dist/cjs/plugins/extension/ui/styles.js +3 -1
  26. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  27. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
  28. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
  29. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
  30. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
  31. package/dist/cjs/plugins/layout/styles.js +3 -1
  32. package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
  33. package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
  34. package/dist/cjs/plugins/list/transforms.js +11 -3
  35. package/dist/cjs/plugins/macro/actions.js +2 -2
  36. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
  37. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  38. package/dist/cjs/plugins/media/styles.js +3 -1
  39. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  40. package/dist/cjs/plugins/mentions/index.js +10 -14
  41. package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
  42. package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
  43. package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
  44. package/dist/cjs/plugins/panel/styles.js +3 -1
  45. package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  46. package/dist/cjs/plugins/rule/styles.js +3 -1
  47. package/dist/cjs/plugins/selection/utils.js +39 -23
  48. package/dist/cjs/plugins/table/event-handlers.js +3 -3
  49. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
  50. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  51. package/dist/cjs/plugins/table/ui/consts.js +6 -4
  52. package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
  53. package/dist/cjs/plugins/text-formatting/utils.js +1 -1
  54. package/dist/cjs/plugins/type-ahead/index.js +6 -2
  55. package/dist/cjs/plugins/unsupported-content/index.js +22 -10
  56. package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
  57. package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
  58. package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
  59. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
  60. package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
  61. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +2 -2
  62. package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
  63. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
  64. package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
  65. package/dist/cjs/ui/ContentStyles/index.js +2 -2
  66. package/dist/cjs/version-wrapper.js +1 -1
  67. package/dist/cjs/version.json +1 -1
  68. package/dist/es2019/actions/index.js +12 -1
  69. package/dist/es2019/create-editor/ReactEditorView.js +14 -6
  70. package/dist/es2019/create-editor/create-plugins-list.js +1 -2
  71. package/dist/es2019/editor.js +14 -0
  72. package/dist/es2019/event-dispatcher/index.js +8 -0
  73. package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
  74. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
  75. package/dist/es2019/plugins/analytics/types/enums.js +1 -0
  76. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
  77. package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
  78. package/dist/es2019/plugins/card/styles.js +9 -5
  79. package/dist/es2019/plugins/code-block/styles.js +11 -8
  80. package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
  81. package/dist/es2019/plugins/date/styles.js +3 -1
  82. package/dist/es2019/plugins/emoji/index.js +16 -21
  83. package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
  84. package/dist/es2019/plugins/emoji/styles.js +1 -82
  85. package/dist/es2019/plugins/expand/ui/styles.js +2 -2
  86. package/dist/es2019/plugins/extension/ui/styles.js +4 -2
  87. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  88. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  89. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  90. package/dist/es2019/plugins/layout/styles.js +3 -2
  91. package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
  92. package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
  93. package/dist/es2019/plugins/list/transforms.js +9 -4
  94. package/dist/es2019/plugins/media/styles.js +9 -7
  95. package/dist/es2019/plugins/mentions/index.js +1 -6
  96. package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
  97. package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
  98. package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
  99. package/dist/es2019/plugins/panel/styles.js +5 -4
  100. package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  101. package/dist/es2019/plugins/rule/styles.js +2 -1
  102. package/dist/es2019/plugins/selection/utils.js +35 -20
  103. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
  104. package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
  105. package/dist/es2019/plugins/table/ui/consts.js +5 -4
  106. package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
  107. package/dist/es2019/plugins/text-formatting/utils.js +1 -1
  108. package/dist/es2019/plugins/type-ahead/index.js +5 -1
  109. package/dist/es2019/plugins/unsupported-content/index.js +23 -12
  110. package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
  111. package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  112. package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
  113. package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
  114. package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
  115. package/dist/es2019/ui/ContentStyles/index.js +3 -3
  116. package/dist/es2019/version-wrapper.js +1 -1
  117. package/dist/es2019/version.json +1 -1
  118. package/dist/esm/actions/index.js +9 -1
  119. package/dist/esm/create-editor/ErrorBoundary.js +1 -1
  120. package/dist/esm/create-editor/ReactEditorView.js +14 -6
  121. package/dist/esm/create-editor/create-plugins-list.js +1 -2
  122. package/dist/esm/editor.js +16 -1
  123. package/dist/esm/event-dispatcher/index.js +9 -0
  124. package/dist/esm/nodeviews/ReactNodeView.js +1 -10
  125. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  126. package/dist/esm/plugins/analytics/types/enums.js +1 -0
  127. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
  128. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
  129. package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
  130. package/dist/esm/plugins/card/styles.js +2 -1
  131. package/dist/esm/plugins/code-block/styles.js +5 -4
  132. package/dist/esm/plugins/collab-edit/index.js +1 -1
  133. package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
  134. package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
  135. package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
  136. package/dist/esm/plugins/custom-autoformat/index.js +1 -1
  137. package/dist/esm/plugins/date/styles.js +2 -1
  138. package/dist/esm/plugins/emoji/index.js +26 -29
  139. package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
  140. package/dist/esm/plugins/emoji/styles.js +3 -14
  141. package/dist/esm/plugins/expand/ui/styles.js +2 -2
  142. package/dist/esm/plugins/extension/actions.js +1 -1
  143. package/dist/esm/plugins/extension/context-panel.js +1 -1
  144. package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
  145. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
  146. package/dist/esm/plugins/extension/ui/styles.js +2 -1
  147. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
  148. package/dist/esm/plugins/feedback-dialog/index.js +1 -1
  149. package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
  150. package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
  151. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
  152. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
  153. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
  154. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
  155. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
  156. package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
  157. package/dist/esm/plugins/layout/styles.js +2 -1
  158. package/dist/esm/plugins/list/commands/indent-list.js +4 -1
  159. package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
  160. package/dist/esm/plugins/list/transforms.js +9 -4
  161. package/dist/esm/plugins/macro/actions.js +1 -1
  162. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
  163. package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
  164. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  165. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
  166. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  167. package/dist/esm/plugins/media/picker-facade.js +1 -1
  168. package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
  169. package/dist/esm/plugins/media/styles.js +2 -1
  170. package/dist/esm/plugins/media/toolbar/utils.js +1 -1
  171. package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
  172. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
  173. package/dist/esm/plugins/media/utils/check-media-type.js +1 -1
  174. package/dist/esm/plugins/mentions/index.js +10 -14
  175. package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
  176. package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
  177. package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
  178. package/dist/esm/plugins/panel/styles.js +2 -1
  179. package/dist/esm/plugins/paste/handlers.js +1 -1
  180. package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
  181. package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
  182. package/dist/esm/plugins/quick-insert/index.js +1 -1
  183. package/dist/esm/plugins/rule/styles.js +2 -1
  184. package/dist/esm/plugins/selection/utils.js +35 -20
  185. package/dist/esm/plugins/table/event-handlers.js +3 -3
  186. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
  187. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  188. package/dist/esm/plugins/table/ui/consts.js +5 -4
  189. package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
  190. package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
  191. package/dist/esm/plugins/text-formatting/utils.js +1 -1
  192. package/dist/esm/plugins/type-ahead/index.js +6 -2
  193. package/dist/esm/plugins/unsupported-content/index.js +21 -11
  194. package/dist/esm/plugins/unsupported-content/styles.js +3 -2
  195. package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
  196. package/dist/esm/ui/Appearance/Chromeless.js +6 -3
  197. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
  198. package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
  199. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
  200. package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
  201. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
  202. package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
  203. package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
  204. package/dist/esm/ui/ContentStyles/index.js +3 -3
  205. package/dist/esm/ui/LinkSearch/index.js +1 -1
  206. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  207. package/dist/esm/utils/action.js +1 -1
  208. package/dist/esm/utils/clipboard.js +1 -1
  209. package/dist/esm/utils/extensions.js +1 -1
  210. package/dist/esm/version-wrapper.js +1 -1
  211. package/dist/esm/version.json +1 -1
  212. package/dist/types/actions/index.d.ts +3 -1
  213. package/dist/types/editor.d.ts +3 -0
  214. package/dist/types/event-dispatcher/index.d.ts +1 -0
  215. package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
  216. package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
  217. package/dist/types/plugins/analytics/types/events.d.ts +2 -2
  218. package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
  219. package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
  220. package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
  221. package/dist/types/plugins/emoji/index.d.ts +2 -6
  222. package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
  223. package/dist/types/plugins/emoji/styles.d.ts +0 -1
  224. package/dist/types/plugins/emoji/types.d.ts +0 -1
  225. package/dist/types/plugins/list/transforms.d.ts +10 -1
  226. package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
  227. package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
  228. package/dist/types/plugins/selection/utils.d.ts +7 -15
  229. package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
  230. package/dist/types/plugins/table/ui/consts.d.ts +2 -2
  231. package/dist/types/plugins/type-ahead/types.d.ts +1 -0
  232. package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
  233. package/dist/types/types/editor-appearance-component.d.ts +1 -0
  234. package/dist/types/types/editor-props.d.ts +1 -0
  235. package/dist/types/types/feature-flags.d.ts +0 -14
  236. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
  237. package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
  238. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +4 -4
  239. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  240. package/package.json +23 -23
  241. package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
  242. package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
  243. package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
  244. package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
@@ -9,6 +9,13 @@ import { syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '
9
9
  import { updateStickyState } from '../commands';
10
10
  import { getTop, getTree } from './dom';
11
11
  import { getFeatureFlags } from '../../../../feature-flags-context';
12
+ import debounce from 'lodash/debounce';
13
+ import throttle from 'lodash/throttle'; // limit scroll event calls
14
+
15
+ const HEADER_ROW_SCROLL_THROTTLE_TIMEOUT = 200; // timeout for resetting the scroll class - if it’s too long then users won’t be able to click on the header cells,
16
+ // if too short it would trigger too many dom udpates.
17
+
18
+ const HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT = 400;
12
19
  export const supportedHeaderRow = node => {
13
20
  const allHeaders = mapChildren(node, child => child.type.name === 'tableHeader').every(Boolean);
14
21
  const someMerged = mapChildren(node, child => child.attrs.rowspan || 0).some(rowspan => rowspan > 1);
@@ -33,6 +40,17 @@ export class TableRowNodeView {
33
40
 
34
41
  _defineProperty(this, "listening", false);
35
42
 
43
+ _defineProperty(this, "headerRowMouseScrollEnd", debounce(() => {
44
+ this.dom.classList.remove('no-pointer-events');
45
+ }, HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT));
46
+
47
+ _defineProperty(this, "headerRowMouseScroll", throttle(() => {
48
+ if (this.isSticky) {
49
+ this.dom.classList.add('no-pointer-events');
50
+ this.headerRowMouseScrollEnd();
51
+ }
52
+ }, HEADER_ROW_SCROLL_THROTTLE_TIMEOUT));
53
+
36
54
  _defineProperty(this, "onScroll", () => {
37
55
  if (!this.tree) {
38
56
  return;
@@ -322,6 +340,8 @@ export class TableRowNodeView {
322
340
  this.eventDispatcher.on(widthPluginKey.key, this.onWidthPluginState);
323
341
  this.eventDispatcher.on(tablePluginKey.key, this.onTablePluginState);
324
342
  this.listening = true;
343
+ this.dom.addEventListener('wheel', this.headerRowMouseScroll.bind(this));
344
+ this.dom.addEventListener('touchmove', this.headerRowMouseScroll.bind(this));
325
345
  }
326
346
 
327
347
  unsubscribe() {
@@ -344,6 +364,8 @@ export class TableRowNodeView {
344
364
  this.eventDispatcher.off(widthPluginKey.key, this.onWidthPluginState);
345
365
  this.eventDispatcher.off(tablePluginKey.key, this.onTablePluginState);
346
366
  this.listening = false;
367
+ this.dom.removeEventListener('wheel', this.headerRowMouseScroll);
368
+ this.dom.removeEventListener('touchmove', this.headerRowMouseScroll);
347
369
  } // initialize intersection observer to track if table is within scroll area
348
370
 
349
371
 
@@ -163,6 +163,10 @@ export const tableStyles = props => {
163
163
 
164
164
  box-shadow: 0 6px 4px -4px ${N40A};
165
165
  margin-left: -1px;
166
+
167
+ &.no-pointer-events {
168
+ pointer-events: none;
169
+ }
166
170
  }
167
171
 
168
172
  .${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
@@ -1,6 +1,7 @@
1
1
  import { B200, B300, B75, N0, N20, R50, R400, R75, DN400, N200, DN30 } from '@atlaskit/theme/colors';
2
2
  import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
3
3
  import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
4
+ import { token } from '@atlaskit/tokens';
4
5
  import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
5
6
  import { themed } from '@atlaskit/theme/components';
6
7
  /**
@@ -12,16 +13,16 @@ export const tableCellBackgroundColor = themed({
12
13
  dark: DN30
13
14
  });
14
15
  export const tableToolbarColor = themed({
15
- light: akEditorTableToolbar,
16
- dark: akEditorTableToolbarDark
16
+ light: token('color.background.neutral', akEditorTableToolbar),
17
+ dark: token('color.background.neutral', akEditorTableToolbarDark)
17
18
  });
18
19
  export const tableTextColor = themed({
19
20
  light: N200,
20
21
  dark: DN400
21
22
  });
22
23
  export const tableBorderColor = themed({
23
- light: akEditorTableBorder,
24
- dark: akEditorTableBorderDark
24
+ light: token('color.border', akEditorTableBorder),
25
+ dark: token('color.border', akEditorTableBorderDark)
25
26
  });
26
27
  export const tableFloatingControlsColor = N20;
27
28
  export const tableCellSelectedColor = B75;
@@ -1,6 +1,7 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
3
3
  import { SelectionStyle, getSelectionStyles, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
4
+ import { token } from '@atlaskit/tokens';
4
5
  export const taskDecisionStyles = css`
5
6
  [data-decision-wrapper] {
6
7
  cursor: pointer;
@@ -15,8 +16,9 @@ export const taskDecisionStyles = css`
15
16
  .danger {
16
17
  .${TaskDecisionSharedCssClassName.DECISION_CONTAINER}.${akEditorSelectedNodeClassName}
17
18
  > div {
18
- box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px ${akEditorDeleteBorder};
19
- background-color: ${akEditorDeleteBackgroundWithOpacity};
19
+ box-shadow: 0 0 0 ${akEditorSelectedBorderSize}px
20
+ ${token('color.border.danger', akEditorDeleteBorder)};
21
+ background-color: ${token('color.blanket.danger', akEditorDeleteBackgroundWithOpacity)};
20
22
  &::after {
21
23
  content: none; /* reset the Blanket selection style */
22
24
  }
@@ -134,7 +134,7 @@ export const checkFormattingIsPresent = state => {
134
134
  return marksArePresent(state) || blockStylingIsPresent(state);
135
135
  };
136
136
  export const usePreviousObjectState = value => {
137
- const ref = useRef();
137
+ const ref = useRef([]);
138
138
  useEffect(() => {
139
139
  ref.current = value;
140
140
  });
@@ -180,6 +180,7 @@ const typeAheadPlugin = options => {
180
180
  },
181
181
 
182
182
  onEditorViewStateUpdated({
183
+ originalTransaction,
183
184
  oldEditorState,
184
185
  newEditorState
185
186
  }) {
@@ -199,10 +200,13 @@ const typeAheadPlugin = options => {
199
200
  const isANewHandler = oldTriggerHandler !== newTriggerHandler;
200
201
 
201
202
  if (oldTriggerHandler !== null && oldTriggerHandler !== void 0 && oldTriggerHandler.dismiss && isANewHandler) {
203
+ const typeAheadMessage = originalTransaction.getMeta(typeAheadPluginKey);
204
+ const wasItemInserted = typeAheadMessage && typeAheadMessage.action === 'INSERT_RAW_QUERY';
202
205
  oldTriggerHandler.dismiss({
203
206
  editorState: newEditorState,
204
207
  query: oldPluginState.query,
205
- stats: (oldPluginState.stats || new StatsModifier()).serialize()
208
+ stats: (oldPluginState.stats || new StatsModifier()).serialize(),
209
+ wasItemInserted
206
210
  });
207
211
  }
208
212
 
@@ -1,16 +1,19 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from 'prosemirror-state';
3
3
  import { confluenceUnsupportedBlock, confluenceUnsupportedInline, unsupportedBlock, unsupportedInline, unsupportedMark, unsupportedNodeAttribute } from '@atlaskit/adf-schema';
4
- import { UnsupportedBlock, UnsupportedInline } from '@atlaskit/editor-common/ui';
4
+ import { UnsupportedBlock } from '@atlaskit/editor-common/ui';
5
+ import { UnsupportedInlineNodeView } from './unsupported-inline-node-view';
5
6
  import { ReactNodeView } from '../../nodeviews';
7
+ import { getInlineNodeViewProducer } from '../../nodeviews/getInlineNodeViewProducer';
6
8
  export const pluginKey = new PluginKey('unsupportedContentPlugin');
7
9
 
8
- const createPlugin = ({
9
- portalProviderAPI,
10
- eventDispatcher,
11
- dispatchAnalyticsEvent
12
- }) => {
10
+ const createPlugin = pmPluginFactoryParams => {
13
11
  const hasIntlContext = true;
12
+ const {
13
+ portalProviderAPI,
14
+ eventDispatcher,
15
+ dispatchAnalyticsEvent
16
+ } = pmPluginFactoryParams;
14
17
  return new SafePlugin({
15
18
  key: pluginKey,
16
19
  props: {
@@ -18,15 +21,23 @@ const createPlugin = ({
18
21
  confluenceUnsupportedBlock: ReactNodeView.fromComponent(UnsupportedBlock, portalProviderAPI, eventDispatcher, {
19
22
  dispatchAnalyticsEvent
20
23
  }, undefined, hasIntlContext),
21
- confluenceUnsupportedInline: ReactNodeView.fromComponent(UnsupportedInline, portalProviderAPI, eventDispatcher, {
22
- dispatchAnalyticsEvent
23
- }, undefined, hasIntlContext),
24
+ confluenceUnsupportedInline: getInlineNodeViewProducer({
25
+ pmPluginFactoryParams,
26
+ Component: UnsupportedInlineNodeView,
27
+ extraComponentProps: {
28
+ dispatchAnalyticsEvent
29
+ }
30
+ }),
24
31
  unsupportedBlock: ReactNodeView.fromComponent(UnsupportedBlock, portalProviderAPI, eventDispatcher, {
25
32
  dispatchAnalyticsEvent
26
33
  }, undefined, hasIntlContext),
27
- unsupportedInline: ReactNodeView.fromComponent(UnsupportedInline, portalProviderAPI, eventDispatcher, {
28
- dispatchAnalyticsEvent
29
- }, undefined, hasIntlContext)
34
+ unsupportedInline: getInlineNodeViewProducer({
35
+ pmPluginFactoryParams,
36
+ Component: UnsupportedInlineNodeView,
37
+ extraComponentProps: {
38
+ dispatchAnalyticsEvent
39
+ }
40
+ })
30
41
  }
31
42
  }
32
43
  });
@@ -1,10 +1,11 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { SelectionStyle, getSelectionStyles, akEditorDeleteBackgroundWithOpacity, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
3
+ import { token } from '@atlaskit/tokens';
3
4
  export const UnsupportedSharedCssClassName = {
4
5
  BLOCK_CONTAINER: 'unsupportedBlockView-content-wrap',
5
6
  INLINE_CONTAINER: 'unsupportedInlineView-content-wrap'
6
7
  };
7
- const inlineUnsupportedSelector = `.${UnsupportedSharedCssClassName.INLINE_CONTAINER} > span`;
8
+ const inlineUnsupportedSelector = `.${UnsupportedSharedCssClassName.INLINE_CONTAINER} > span:nth-child(2)`;
8
9
  const blockUnsupportedSelector = `.${UnsupportedSharedCssClassName.BLOCK_CONTAINER} > div`;
9
10
  export const unsupportedStyles = css`
10
11
  ${blockUnsupportedSelector}, ${inlineUnsupportedSelector} {
@@ -19,8 +20,9 @@ export const unsupportedStyles = css`
19
20
  .danger {
20
21
  .${akEditorSelectedNodeClassName}${blockUnsupportedSelector},
21
22
  .${akEditorSelectedNodeClassName}${inlineUnsupportedSelector} {
22
- border: ${akEditorSelectedBorderSize}px solid ${akEditorDeleteBorder};
23
- background-color: ${akEditorDeleteBackgroundWithOpacity};
23
+ border: ${akEditorSelectedBorderSize}px solid
24
+ ${token('color.border.danger', akEditorDeleteBorder)};
25
+ background-color: ${token('color.blanket.danger', akEditorDeleteBackgroundWithOpacity)};
24
26
  }
25
27
  }
26
28
  `;
@@ -0,0 +1,7 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { UnsupportedInline } from '@atlaskit/editor-common/ui';
5
+ export const UnsupportedInlineNodeView = props => {
6
+ return jsx(UnsupportedInline, props);
7
+ };
@@ -12,7 +12,6 @@ import WithFlash from '../WithFlash';
12
12
  const chromelessEditor = css`
13
13
  line-height: 20px;
14
14
  height: auto;
15
- min-height: 30px;
16
15
 
17
16
  overflow-x: hidden;
18
17
  overflow-y: auto;
@@ -50,6 +49,7 @@ export default class Editor extends React.Component {
50
49
  contentComponents,
51
50
  customContentComponents,
52
51
  maxHeight,
52
+ minHeight = 30,
53
53
  popupsMountPoint,
54
54
  popupsBoundariesElement,
55
55
  popupsScrollableElement,
@@ -62,7 +62,10 @@ export default class Editor extends React.Component {
62
62
  }, jsx("div", {
63
63
  css: [chromelessEditor, maxHeight && css`
64
64
  max-height: ${maxHeight}px;
65
- `],
65
+ `, css`
66
+ min-height: ${minHeight}px;
67
+ `],
68
+ "data-testid": "chromeless-editor",
66
69
  ref: ref => this.containerElement = ref
67
70
  }, jsx(ContentArea, null, customContentComponents, jsx(PluginSlot, {
68
71
  editorView: editorView,
@@ -37,7 +37,7 @@ const commentEditorStyle = css`
37
37
  min-width: 272px;
38
38
  /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */
39
39
  /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */
40
- min-height: 150px;
40
+
41
41
  height: auto;
42
42
  background-color: white;
43
43
  border: 1px solid ${N40};
@@ -117,6 +117,7 @@ class Editor extends React.Component {
117
117
  popupsBoundariesElement,
118
118
  popupsScrollableElement,
119
119
  maxHeight,
120
+ minHeight = 150,
120
121
  onSave,
121
122
  onCancel,
122
123
  disabled,
@@ -129,7 +130,9 @@ class Editor extends React.Component {
129
130
  return jsx(WithFlash, {
130
131
  animate: maxContentSizeReached
131
132
  }, jsx("div", {
132
- css: commentEditorStyle,
133
+ css: [commentEditorStyle, css`
134
+ min-height: ${minHeight}px;
135
+ `],
133
136
  className: "akEditor"
134
137
  }, jsx(MainToolbar, {
135
138
  useStickyToolbar: useStickyToolbar
@@ -2,11 +2,12 @@ import { css } from '@emotion/react';
2
2
  import { akEditorSubtleAccent, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
3
3
  import { borderRadius } from '@atlaskit/theme/constants';
4
4
  import { N300, N50 } from '@atlaskit/theme/colors';
5
+ import { token } from '@atlaskit/tokens';
5
6
  export const inputStyle = css`
6
7
  /* Normal .className gets overridden by input[type=text] hence this hack to produce input.className */
7
8
  input& {
8
9
  background-color: white;
9
- border: 1px solid ${akEditorSubtleAccent};
10
+ border: 1px solid ${token('color.border.input', akEditorSubtleAccent)};
10
11
  border-radius: ${borderRadius()}px;
11
12
  box-sizing: border-box;
12
13
  height: 40px;
@@ -17,7 +17,7 @@ import { layoutStyles } from '../../plugins/layout/styles';
17
17
  import { panelStyles } from '../../plugins/panel/styles';
18
18
  import { fakeCursorStyles } from '../../plugins/fake-text-cursor/styles';
19
19
  import { mentionsStyles } from '../../plugins/mentions/styles';
20
- import { emojiStyles, emojiStylesNext } from '../../plugins/emoji/styles';
20
+ import { emojiStyles } from '../../plugins/emoji/styles';
21
21
  import { textFormattingStyles } from '../../plugins/text-formatting/styles';
22
22
  import { placeholderTextStyles } from '../../plugins/placeholder-text/styles';
23
23
  import { gridStyles } from '../../plugins/grid/styles';
@@ -35,7 +35,7 @@ import { useFeatureFlags } from '../../plugins/feature-flags-context';
35
35
  import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
36
36
 
37
37
  const contentStyles = props => {
38
- var _props$featureFlags, _props$featureFlags2;
38
+ var _props$featureFlags;
39
39
 
40
40
  return css`
41
41
  .ProseMirror {
@@ -89,7 +89,7 @@ const contentStyles = props => {
89
89
  ${panelStyles(props)}
90
90
  ${fakeCursorStyles}
91
91
  ${mentionsStyles}
92
- ${(_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.nextEmojiNodeView ? emojiStylesNext : emojiStyles}
92
+ ${emojiStyles}
93
93
  ${tasksAndDecisionsStyles}
94
94
  ${gridStyles}
95
95
  ${linkStyles}
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "165.0.0";
2
+ export const version = "166.0.2";
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": "165.0.0",
3
+ "version": "166.0.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,8 +1,8 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import { Node } from 'prosemirror-model';
7
7
  import { TextSelection } from 'prosemirror-state';
8
8
  import { toJSON } from '../utils';
@@ -14,6 +14,7 @@ import { analyticsEventKey } from '@atlaskit/editor-common/utils';
14
14
  import { findNodePosWithLocalId } from '../plugins/extension/utils';
15
15
  import { getFeatureFlags } from '../plugins/feature-flags-context/get-feature-flags';
16
16
  import { getCollabProvider } from '../plugins/collab-edit/native-collab-provider-plugin';
17
+ import deprecationWarnings from '../utils/deprecation-warnings';
17
18
 
18
19
  var EditorActions = /*#__PURE__*/function () {
19
20
  function EditorActions() {
@@ -300,6 +301,13 @@ var EditorActions = /*#__PURE__*/function () {
300
301
  value: function replaceDocument(rawValue) {
301
302
  var shouldScrollToBottom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
302
303
  var shouldAddToHistory = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
304
+ deprecationWarnings('EditorActions.replaceDocument', {
305
+ shouldAddToHistory: shouldAddToHistory
306
+ }, [{
307
+ property: 'shouldAddToHistory',
308
+ description: '[ED-14158] EditorActions.replaceDocument does not use the shouldAddToHistory arg',
309
+ type: 'removed'
310
+ }]);
303
311
 
304
312
  if (!this.editorView || rawValue === undefined || rawValue === null) {
305
313
  return false;
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  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; }
12
12
 
@@ -580,11 +580,22 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
580
580
  config: _this.config,
581
581
  eventDispatcher: _this.eventDispatcher,
582
582
  transformer: _this.contentTransformer
583
- });
583
+ }); // Allows us to dispatch analytics within the plugin view.destory methods
584
+
585
+
586
+ var analyticsConnected = _this.eventDispatcher.has(analyticsEventKey, _this.handleAnalyticsEvent);
587
+
588
+ if (!analyticsConnected) {
589
+ _this.eventDispatcher.on(analyticsEventKey, _this.handleAnalyticsEvent);
590
+ }
584
591
 
585
592
  _this.view.destroy(); // Destroys the dom node & all node views
586
593
 
587
594
 
595
+ if (!analyticsConnected) {
596
+ _this.eventDispatcher.off(analyticsEventKey, _this.handleAnalyticsEvent);
597
+ }
598
+
588
599
  _this.view = undefined;
589
600
  }
590
601
  });
@@ -755,7 +766,6 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
755
766
  // This serves to avoid potential runtime exceptions which could arise
756
767
  // from an async dispatched transaction after it's unmounted.
757
768
  this.canDispatchTransactions = false;
758
- this.eventDispatcher.destroy();
759
769
  clearTimeout(this.focusTimeoutId);
760
770
 
761
771
  if (this.reliabilityInterval) {
@@ -774,11 +784,9 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
774
784
  state.destroy();
775
785
  }
776
786
  });
777
- } // this.view will be destroyed when React unmounts in handleEditorViewRef
778
-
787
+ }
779
788
 
780
- this.eventDispatcher.off(analyticsEventKey, this.handleAnalyticsEvent);
781
- this.eventDispatcher.off('resetEditorState', this.resetEditorState);
789
+ this.eventDispatcher.destroy(); // this.view will be destroyed when React unmounts in handleEditorViewRef
782
790
  } // Helper to allow tests to inject plugins directly
783
791
 
784
792
  }, {
@@ -199,8 +199,7 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
199
199
 
200
200
  if (props.emojiProvider) {
201
201
  preset.add([emojiPlugin, {
202
- createAnalyticsEvent: createAnalyticsEvent,
203
- allowZeroWidthSpaceAfter: !isMobile
202
+ createAnalyticsEvent: createAnalyticsEvent
204
203
  }]);
205
204
  }
206
205
 
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -15,6 +14,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
15
14
 
16
15
  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; }
17
16
 
17
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
18
+
18
19
  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); }; }
19
20
 
20
21
  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; } }
@@ -593,6 +594,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
593
594
  eventDispatcher: eventDispatcher,
594
595
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
595
596
  maxHeight: _this5.props.maxHeight,
597
+ minHeight: _this5.props.minHeight,
596
598
  onSave: _this5.props.onSave ? _this5.handleSave : undefined,
597
599
  onCancel: _this5.props.onCancel,
598
600
  popupsMountPoint: _this5.props.popupsMountPoint,
@@ -636,6 +638,19 @@ _defineProperty(Editor, "defaultProps", {
636
638
  quickInsert: true
637
639
  });
638
640
 
641
+ _defineProperty(Editor, "propTypes", {
642
+ minHeight: function minHeight(_ref4) {
643
+ var appearance = _ref4.appearance,
644
+ _minHeight = _ref4.minHeight;
645
+
646
+ if (_minHeight && appearance && !['comment', 'chromeless'].includes(appearance)) {
647
+ return new Error('minHeight only supports editor appearance chromeless and comment');
648
+ }
649
+
650
+ return null;
651
+ }
652
+ });
653
+
639
654
  _defineProperty(Editor, "contextTypes", {
640
655
  editorActions: PropTypes.object
641
656
  });
@@ -17,6 +17,15 @@ export var EventDispatcher = /*#__PURE__*/function () {
17
17
 
18
18
  this.listeners[event].add(cb);
19
19
  }
20
+ }, {
21
+ key: "has",
22
+ value: function has(event, cb) {
23
+ if (!this.listeners[event]) {
24
+ return false;
25
+ }
26
+
27
+ return this.listeners[event].has(cb);
28
+ }
20
29
  }, {
21
30
  key: "off",
22
31
  value: function off(event, cb) {
@@ -6,7 +6,6 @@ import React from 'react';
6
6
  import { createDispatch } from '../event-dispatcher';
7
7
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../plugins/analytics';
8
8
  import { analyticsEventKey } from '../plugins/analytics/consts';
9
- import { getFeatureFlags } from '../plugins/feature-flags-context';
10
9
  import { ErrorBoundary } from '../ui/ErrorBoundary';
11
10
  import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from './getPerformanceOptions';
12
11
 
@@ -125,20 +124,12 @@ var ReactNodeView = /*#__PURE__*/function () {
125
124
  }
126
125
  }, {
127
126
  key: "createDomRef",
128
- value: function createDomRef(options) {
127
+ value: function createDomRef() {
129
128
  if (!this.node.isInline) {
130
129
  return document.createElement('div');
131
130
  }
132
131
 
133
132
  var htmlElement = document.createElement('span');
134
- var state = this.view.state;
135
- var featureFlags = getFeatureFlags(state);
136
-
137
- if (featureFlags && featureFlags.displayInlineBlockForInlineNodes && (options === null || options === void 0 ? void 0 : options.displayInlineBlockForInlineNodes) !== false) {
138
- htmlElement.style.display = 'inline-block';
139
- htmlElement.style.userSelect = 'all';
140
- }
141
-
142
133
  return htmlElement;
143
134
  }
144
135
  }, {
@@ -6,4 +6,4 @@ import { css } from '@emotion/react';
6
6
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils'; // For reasoning behind styles, see comments in:
7
7
  // ./getInlineNodeViewProducer -> portalChildren()
8
8
 
9
- export var InlineNodeViewSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .inlineNodeView {\n display: inline;\n user-select: all;\n }\n\n &.ua-chrome .inlineNodeView > span {\n user-select: none;\n }\n\n .inlineNodeViewAddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), ZERO_WIDTH_SPACE);
9
+ export var InlineNodeViewSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .inlineNodeView {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > * {\n white-space: pre-wrap;\n }\n }\n\n &.ua-chrome .inlineNodeView > span {\n user-select: none;\n }\n\n .inlineNodeViewAddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), ZERO_WIDTH_SPACE);
@@ -55,6 +55,7 @@ export var ACTION;
55
55
  ACTION["INDENTED"] = "indented";
56
56
  ACTION["INITIALISED"] = "initialised";
57
57
  ACTION["INPUT_PERF_SAMPLING"] = "inputPerfSampling";
58
+ ACTION["INPUT_PERF_SAMPLING_AVG"] = "inputPerfSamplingAvg";
58
59
  ACTION["INSERTED"] = "inserted";
59
60
  ACTION["INVALID_DOCUMENT_ENCOUNTERED"] = "invalidDocumentEncountered";
60
61
  ACTION["INVOKED"] = "invoked";
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
  import { RESOLVE_METHOD } from './../../analytics/types/inline-comment-events';
5
5
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { AnnotationTypes } from '@atlaskit/adf-schema';