@atlaskit/editor-core 189.5.1 → 189.5.6

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 (177) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/afm-cc/tsconfig.json +335 -0
  3. package/dist/cjs/composable-editor/editor-internal.js +11 -11
  4. package/dist/cjs/composable-editor/editor.js +8 -7
  5. package/dist/cjs/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
  6. package/dist/cjs/composable-editor/hooks/useMeasureEditorMountTime.js +2 -0
  7. package/dist/cjs/editor.js +4 -3
  8. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +11 -10
  9. package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
  10. package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +2 -1
  11. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +6 -5
  12. package/dist/cjs/plugins/collab-edit/ui/avatars.js +5 -2
  13. package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -1
  14. package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +7 -4
  15. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +13 -11
  16. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +5 -4
  17. package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +9 -8
  18. package/dist/cjs/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +4 -4
  19. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +7 -6
  20. package/dist/cjs/plugins/find-replace/ui/Find.js +14 -13
  21. package/dist/cjs/plugins/find-replace/ui/FindReplace.js +6 -5
  22. package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +8 -7
  23. package/dist/cjs/plugins/find-replace/ui/Replace.js +6 -5
  24. package/dist/cjs/plugins/find-replace/ui/styles.js +1 -0
  25. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +5 -4
  26. package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +11 -8
  27. package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +2 -1
  28. package/dist/cjs/ui/Addon/ClickAreaInline/index.js +2 -1
  29. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +2 -1
  30. package/dist/cjs/ui/Addon/Dropdown/index.js +3 -2
  31. package/dist/cjs/ui/Addon/DropdownItem/index.js +5 -2
  32. package/dist/cjs/ui/Alignment/index.js +7 -6
  33. package/dist/cjs/ui/Appearance/Chromeless.js +7 -6
  34. package/dist/cjs/ui/Appearance/Comment/Comment.js +17 -16
  35. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +5 -4
  36. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -3
  37. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +12 -10
  38. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
  39. package/dist/cjs/ui/AppearanceComponents/Mobile.js +6 -5
  40. package/dist/cjs/ui/ChromeCollapsed/index.js +3 -2
  41. package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +16 -15
  42. package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +12 -11
  43. package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +7 -6
  44. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +8 -8
  45. package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +18 -17
  46. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +9 -8
  47. package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +10 -9
  48. package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +6 -5
  49. package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +7 -6
  50. package/dist/cjs/ui/ConfigPanel/Header.js +14 -13
  51. package/dist/cjs/ui/ConfigPanel/LoadingState.js +3 -2
  52. package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +5 -4
  53. package/dist/cjs/ui/ContentStyles/index.js +2 -1
  54. package/dist/cjs/ui/ContextPanel/index.js +11 -10
  55. package/dist/cjs/ui/PluginSlot/index.js +4 -3
  56. package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
  57. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -4
  58. package/dist/cjs/ui/ToolbarFeedback/index.js +16 -15
  59. package/dist/cjs/ui/WithFlash/index.js +2 -1
  60. package/dist/cjs/version-wrapper.js +1 -1
  61. package/dist/es2019/composable-editor/editor-internal.js +12 -11
  62. package/dist/es2019/composable-editor/editor.js +8 -6
  63. package/dist/es2019/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
  64. package/dist/es2019/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
  65. package/dist/es2019/editor.js +4 -2
  66. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
  67. package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
  68. package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
  69. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +7 -6
  70. package/dist/es2019/plugins/collab-edit/ui/avatars.js +4 -2
  71. package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
  72. package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +6 -4
  73. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +14 -11
  74. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
  75. package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +7 -5
  76. package/dist/es2019/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
  77. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
  78. package/dist/es2019/plugins/find-replace/ui/Find.js +14 -12
  79. package/dist/es2019/plugins/find-replace/ui/FindReplace.js +6 -4
  80. package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
  81. package/dist/es2019/plugins/find-replace/ui/Replace.js +6 -4
  82. package/dist/es2019/plugins/find-replace/ui/styles.js +1 -0
  83. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
  84. package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
  85. package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +3 -2
  86. package/dist/es2019/ui/Addon/ClickAreaInline/index.js +3 -2
  87. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -2
  88. package/dist/es2019/ui/Addon/Dropdown/index.js +3 -1
  89. package/dist/es2019/ui/Addon/DropdownItem/index.js +4 -2
  90. package/dist/es2019/ui/Alignment/index.js +5 -3
  91. package/dist/es2019/ui/Appearance/Chromeless.js +8 -7
  92. package/dist/es2019/ui/Appearance/Comment/Comment.js +18 -17
  93. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +7 -5
  94. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -3
  95. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
  96. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
  97. package/dist/es2019/ui/AppearanceComponents/Mobile.js +7 -6
  98. package/dist/es2019/ui/ChromeCollapsed/index.js +3 -1
  99. package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
  100. package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +13 -12
  101. package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
  102. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
  103. package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +19 -18
  104. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +10 -9
  105. package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +11 -10
  106. package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +7 -6
  107. package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +8 -7
  108. package/dist/es2019/ui/ConfigPanel/Header.js +15 -14
  109. package/dist/es2019/ui/ConfigPanel/LoadingState.js +4 -3
  110. package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
  111. package/dist/es2019/ui/ContentStyles/index.js +3 -2
  112. package/dist/es2019/ui/ContextPanel/index.js +12 -11
  113. package/dist/es2019/ui/PluginSlot/index.js +5 -4
  114. package/dist/es2019/ui/Toolbar/ToolbarInner.js +3 -2
  115. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
  116. package/dist/es2019/ui/ToolbarFeedback/index.js +14 -12
  117. package/dist/es2019/ui/WithFlash/index.js +3 -2
  118. package/dist/es2019/version-wrapper.js +1 -1
  119. package/dist/esm/composable-editor/editor-internal.js +12 -11
  120. package/dist/esm/composable-editor/editor.js +8 -6
  121. package/dist/esm/composable-editor/hooks/useEditorMeasuresConstructor.js +2 -0
  122. package/dist/esm/composable-editor/hooks/useMeasureEditorMountTime.js +1 -0
  123. package/dist/esm/editor.js +4 -2
  124. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +11 -9
  125. package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -3
  126. package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +3 -2
  127. package/dist/esm/plugins/breakout/ui/LayoutButton.js +7 -6
  128. package/dist/esm/plugins/collab-edit/ui/avatars.js +4 -2
  129. package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +3 -1
  130. package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +6 -4
  131. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +14 -11
  132. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +5 -3
  133. package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +7 -5
  134. package/dist/esm/plugins/extension/ui/Extension/MultiBodiedExtension/index.js +6 -4
  135. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +8 -7
  136. package/dist/esm/plugins/find-replace/ui/Find.js +14 -12
  137. package/dist/esm/plugins/find-replace/ui/FindReplace.js +6 -4
  138. package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +9 -8
  139. package/dist/esm/plugins/find-replace/ui/Replace.js +6 -4
  140. package/dist/esm/plugins/find-replace/ui/styles.js +1 -0
  141. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
  142. package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +10 -8
  143. package/dist/esm/ui/Addon/ClickAreaBlock/index.js +3 -2
  144. package/dist/esm/ui/Addon/ClickAreaInline/index.js +3 -2
  145. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -2
  146. package/dist/esm/ui/Addon/Dropdown/index.js +3 -1
  147. package/dist/esm/ui/Addon/DropdownItem/index.js +4 -2
  148. package/dist/esm/ui/Alignment/index.js +5 -3
  149. package/dist/esm/ui/Appearance/Chromeless.js +8 -7
  150. package/dist/esm/ui/Appearance/Comment/Comment.js +18 -17
  151. package/dist/esm/ui/Appearance/Comment/Toolbar.js +7 -5
  152. package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -3
  153. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +12 -11
  154. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +15 -13
  155. package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -6
  156. package/dist/esm/ui/ChromeCollapsed/index.js +3 -1
  157. package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +17 -17
  158. package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +13 -12
  159. package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +8 -7
  160. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +9 -8
  161. package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +19 -18
  162. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +10 -9
  163. package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +11 -10
  164. package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +7 -6
  165. package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +8 -7
  166. package/dist/esm/ui/ConfigPanel/Header.js +15 -14
  167. package/dist/esm/ui/ConfigPanel/LoadingState.js +4 -3
  168. package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +6 -5
  169. package/dist/esm/ui/ContentStyles/index.js +3 -2
  170. package/dist/esm/ui/ContextPanel/index.js +12 -11
  171. package/dist/esm/ui/PluginSlot/index.js +5 -4
  172. package/dist/esm/ui/Toolbar/ToolbarInner.js +3 -2
  173. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +6 -5
  174. package/dist/esm/ui/ToolbarFeedback/index.js +14 -12
  175. package/dist/esm/ui/WithFlash/index.js +3 -2
  176. package/dist/esm/version-wrapper.js +1 -1
  177. package/package.json +13 -5
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { useRef, useCallback, useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import uuid from 'uuid/v4';
3
5
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
4
6
  import { ACTION, fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
@@ -68,7 +70,7 @@ function Editor(passedProps) {
68
70
  };
69
71
  useMeasureEditorMountTime(props, getExperienceStore, createAnalyticsEvent);
70
72
  const providerFactory = useProviderFactory(props, editorActions.current, createAnalyticsEvent);
71
- return /*#__PURE__*/React.createElement(EditorInternal, {
73
+ return jsx(EditorInternal, {
72
74
  props: props,
73
75
  handleAnalyticsEvent: handleAnalyticsEvent,
74
76
  createAnalyticsEvent: createAnalyticsEvent,
@@ -262,7 +264,7 @@ function EditorButBetter(passedProps) {
262
264
  onSaveFromProps(view);
263
265
  }
264
266
  }, [onSaveFromProps]);
265
- return /*#__PURE__*/React.createElement(EditorInternal, {
267
+ return jsx(EditorInternal, {
266
268
  props: props,
267
269
  handleAnalyticsEvent: handleAnalyticsEvent,
268
270
  createAnalyticsEvent: createAnalyticsEvent,
@@ -286,17 +288,17 @@ export function ComposableEditor(props) {
286
288
  };
287
289
  }, [props.appearance]);
288
290
  if (getBooleanFF('platform.editor.less-editor-props-rerendering')) {
289
- return /*#__PURE__*/React.createElement(FabricEditorAnalyticsContext
291
+ return jsx(FabricEditorAnalyticsContext
290
292
  // @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
291
293
  , {
292
294
  data: data
293
- }, /*#__PURE__*/React.createElement(EditorButBetter, props));
295
+ }, jsx(EditorButBetter, props));
294
296
  }
295
- return /*#__PURE__*/React.createElement(FabricEditorAnalyticsContext
297
+ return jsx(FabricEditorAnalyticsContext
296
298
  // @ts-expect-error Type 'string' is not assignable to type '"editorCore" | "renderer"'.
297
299
  , {
298
300
  data: data
299
- }, /*#__PURE__*/React.createElement(Editor, props));
301
+ }, jsx(Editor, props));
300
302
  }
301
303
  ComposableEditor.propTypes = {
302
304
  minHeight: ({
@@ -1,3 +1,5 @@
1
+ /** @jsx jsx */
2
+
1
3
  import { useConstructor } from '@atlaskit/editor-common/hooks';
2
4
  import { measureTTI, startMeasure } from '@atlaskit/editor-common/utils';
3
5
  import measurements from '../../utils/performance/measure-enum';
@@ -1,3 +1,4 @@
1
+ /** @jsx jsx */
1
2
  import { useEffect } from 'react';
2
3
  import { ACTION } from '@atlaskit/editor-common/analytics';
3
4
  import { clearMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
@@ -1,6 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
+ /** @jsx jsx */
3
4
  import React from 'react';
5
+ import { jsx } from '@emotion/react';
4
6
  import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
5
7
  import { ComposableEditor } from './composable-editor';
6
8
  import useUniversalPreset from './presets/useUniversalPreset';
@@ -10,7 +12,7 @@ const ComposableEditorWrapper = ({
10
12
  const preset = useUniversalPreset({
11
13
  props
12
14
  });
13
- return /*#__PURE__*/React.createElement(ComposableEditor, _extends({
15
+ return jsx(ComposableEditor, _extends({
14
16
  preset: preset
15
17
  }, props));
16
18
  };
@@ -20,7 +22,7 @@ export default class Editor extends React.Component {
20
22
  editorDeprecationWarnings(props);
21
23
  }
22
24
  render() {
23
- return /*#__PURE__*/React.createElement(ComposableEditorWrapper, {
25
+ return jsx(ComposableEditorWrapper, {
24
26
  props: this.props
25
27
  });
26
28
  }
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import { injectIntl } from 'react-intl-next';
4
6
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
5
7
  import ToolbarButton from '../../../../ui/ToolbarButton';
@@ -66,9 +68,9 @@ export class AlignmentToolbar extends React.Component {
66
68
  intl
67
69
  } = this.props;
68
70
  const title = intl.formatMessage(messages.alignment);
69
- return /*#__PURE__*/React.createElement("span", {
71
+ return jsx("span", {
70
72
  css: wrapper
71
- }, /*#__PURE__*/React.createElement(Dropdown, {
73
+ }, jsx(Dropdown, {
72
74
  mountTo: popupsMountPoint,
73
75
  boundariesElement: popupsBoundariesElement,
74
76
  scrollableElement: popupsScrollableElement,
@@ -95,7 +97,7 @@ export class AlignmentToolbar extends React.Component {
95
97
  fitWidth: 112,
96
98
  fitHeight: 80,
97
99
  closeOnTab: true,
98
- trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
100
+ trigger: jsx(ToolbarButton, {
99
101
  spacing: isReducedSpacing ? 'none' : 'default',
100
102
  disabled: disabled,
101
103
  selected: isOpen,
@@ -106,21 +108,21 @@ export class AlignmentToolbar extends React.Component {
106
108
  "aria-haspopup": true,
107
109
  onClick: this.toggleOpen,
108
110
  onKeyDown: this.toggleOpenByKeyboard,
109
- iconBefore: /*#__PURE__*/React.createElement("div", {
111
+ iconBefore: jsx("div", {
110
112
  css: triggerWrapper
111
- }, /*#__PURE__*/React.createElement(IconMap, {
113
+ }, jsx(IconMap, {
112
114
  alignment: pluginState.align
113
- }), /*#__PURE__*/React.createElement("span", {
115
+ }), jsx("span", {
114
116
  css: expandIconWrapper
115
- }, /*#__PURE__*/React.createElement(ExpandIcon, {
117
+ }, jsx(ExpandIcon, {
116
118
  label: ""
117
119
  }))),
118
120
  ref: this.toolbarItemRef
119
121
  })
120
- }, /*#__PURE__*/React.createElement(Alignment, {
122
+ }, jsx(Alignment, {
121
123
  onClick: align => this.changeAlignment(align, false),
122
124
  selectedAlignment: pluginState.align
123
- })), /*#__PURE__*/React.createElement("span", {
125
+ })), jsx("span", {
124
126
  css: separatorStyles
125
127
  }));
126
128
  }
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { useEffect } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import AvatarsWithPluginState from '../../collab-edit/ui/avatars-with-plugin-state';
4
5
  import { useIntl } from 'react-intl-next';
5
6
  import { avatarGroupMessages } from '../messages';
@@ -34,11 +35,11 @@ const AvatarGroupPluginWrapper = props => {
34
35
  eventType: EVENT_TYPE.UI
35
36
  });
36
37
  }, [dispatchAnalyticsEvent]);
37
- return /*#__PURE__*/React.createElement("div", {
38
+ return jsx("div", {
38
39
  "aria-label": intl.formatMessage(avatarGroupMessages.editors),
39
40
  "data-testid": 'avatar-group-in-plugin',
40
41
  css: props.takeFullWidth ? toolbarButtonWrapperFullWidth : toolbarButtonWrapper
41
- }, /*#__PURE__*/React.createElement(AvatarsWithPluginState, {
42
+ }, jsx(AvatarsWithPluginState, {
42
43
  editorView: props.editorView,
43
44
  eventDispatcher: props.eventDispatcher,
44
45
  inviteToEditComponent: props.collabEdit && props.collabEdit.inviteToEditComponent,
@@ -1,4 +1,5 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
2
3
  const beforePrimaryToolbarPluginWrapper = css`
3
4
  display: flex;
4
5
  margin-right: 8px;
@@ -6,7 +7,7 @@ const beforePrimaryToolbarPluginWrapper = css`
6
7
  justify-content: flex-end;
7
8
  align-items: center;
8
9
  `;
9
- export const BeforePrimaryToolbarWrapper = props => /*#__PURE__*/React.createElement("div", {
10
+ export const BeforePrimaryToolbarWrapper = props => jsx("div", {
10
11
  css: beforePrimaryToolbarPluginWrapper,
11
12
  "data-testid": 'before-primary-toolbar-components-plugin'
12
13
  }, props.beforePrimaryToolbarComponents);
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React from 'react';
3
- import { css } from '@emotion/react';
4
+ import { css, jsx } from '@emotion/react';
4
5
  import { B300, N300, N20A } from '@atlaskit/theme/colors';
5
6
  import { injectIntl } from 'react-intl-next';
6
7
  import { findParentDomRefOfType, findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
@@ -86,7 +87,7 @@ class LayoutButton extends React.Component {
86
87
  if (closestEl && closestEl.firstChild) {
87
88
  element = closestEl.firstChild;
88
89
  }
89
- return /*#__PURE__*/React.createElement(Popup, {
90
+ return jsx(Popup, {
90
91
  ariaLabel: title,
91
92
  target: element,
92
93
  offset: [5, 0],
@@ -98,15 +99,15 @@ class LayoutButton extends React.Component {
98
99
  stick: true,
99
100
  forcePlacement: true,
100
101
  zIndex: belowOtherPopupsZIndex
101
- }, /*#__PURE__*/React.createElement("div", {
102
+ }, jsx("div", {
102
103
  css: toolbarButtonWrapper
103
- }, /*#__PURE__*/React.createElement(ToolbarButton, {
104
+ }, jsx(ToolbarButton, {
104
105
  title: title,
105
106
  testId: titleMessage.id,
106
107
  onClick: this.handleClick(nextBreakoutMode),
107
- iconBefore: breakoutMode === 'full-width' ? /*#__PURE__*/React.createElement(CollapseIcon, {
108
+ iconBefore: breakoutMode === 'full-width' ? jsx(CollapseIcon, {
108
109
  label: title
109
- }) : /*#__PURE__*/React.createElement(ExpandIcon, {
110
+ }) : jsx(ExpandIcon, {
110
111
  label: title
111
112
  })
112
113
  })));
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import AvatarGroup from '@atlaskit/avatar-group';
3
5
  import { avatarContainer } from './styles';
4
6
  import toAvatar from './to-avatar';
@@ -14,9 +16,9 @@ export const Avatars = /*#__PURE__*/React.memo(props => {
14
16
  if (!avatars.length) {
15
17
  return null;
16
18
  }
17
- return /*#__PURE__*/React.createElement("div", {
19
+ return jsx("div", {
18
20
  css: avatarContainer
19
- }, /*#__PURE__*/React.createElement(AvatarGroup, {
21
+ }, jsx(AvatarGroup, {
20
22
  appearance: "stack",
21
23
  size: "medium",
22
24
  data: avatars,
@@ -1,9 +1,11 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
1
3
  import { getAvatarColor } from '../utils';
2
4
  import { badge } from './styles';
3
5
  export const ColoredAvatarItem = props => {
4
6
  const color = getAvatarColor(props.sessionId).color.solid;
5
7
  const avatar = props.name.substr(0, 1).toUpperCase();
6
- return /*#__PURE__*/React.createElement("div", {
8
+ return jsx("div", {
7
9
  css: badge(color),
8
10
  "data-testid": "editor-collab-badge"
9
11
  }, avatar);
@@ -1,8 +1,10 @@
1
+ /** @jsx jsx */
1
2
  import React, { Fragment } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import InviteTeamIcon from '@atlaskit/icon/glyph/editor/add';
3
5
  import ToolbarButton from '../../../ui/ToolbarButton';
4
6
  import { inviteTeamWrapper } from './styles';
5
- const ID = props => /*#__PURE__*/React.createElement(Fragment, null, props.children);
7
+ const ID = props => jsx(Fragment, null, props.children);
6
8
  export const InviteToEditButton = props => {
7
9
  const {
8
10
  Component,
@@ -10,16 +12,16 @@ export const InviteToEditButton = props => {
10
12
  selected,
11
13
  title
12
14
  } = props;
13
- const iconBefore = React.useMemo(() => /*#__PURE__*/React.createElement(InviteTeamIcon, {
15
+ const iconBefore = React.useMemo(() => jsx(InviteTeamIcon, {
14
16
  label: title
15
17
  }), [title]);
16
18
  if (!Component && !onClick) {
17
19
  return null;
18
20
  }
19
21
  const Wrapper = Component ? Component : ID;
20
- return /*#__PURE__*/React.createElement("div", {
22
+ return jsx("div", {
21
23
  css: inviteTeamWrapper
22
- }, /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ToolbarButton, {
24
+ }, jsx(Wrapper, null, jsx(ToolbarButton, {
23
25
  className: "invite-to-edit",
24
26
  onClick: onClick,
25
27
  selected: selected,
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+
2
4
  import React from 'react';
5
+ import { jsx } from '@emotion/react';
3
6
  import { overflowShadow } from '@atlaskit/editor-common/ui';
4
7
  import { calculateBreakoutStyles } from '@atlaskit/editor-common/utils';
5
8
  import { wrapperStyle, header, content, contentWrapper, widerLayoutClassName } from './styles';
@@ -71,26 +74,26 @@ function ExtensionWithPluginState(props) {
71
74
  ...newContentStyles,
72
75
  ...contentWrapper
73
76
  };
74
- return /*#__PURE__*/React.createElement("div", {
77
+ return jsx("div", {
75
78
  ref: handleRef,
76
79
  "data-layout": node.attrs.layout,
77
80
  className: classNames,
78
81
  css: wrapperStyle,
79
82
  style: customContainerStyles
80
- }, /*#__PURE__*/React.createElement("div", {
83
+ }, jsx("div", {
81
84
  className: `extension-overflow-wrapper ${hasBody ? 'with-body' : ''}`
82
- }, /*#__PURE__*/React.createElement("div", {
85
+ }, jsx("div", {
83
86
  css: overlay,
84
87
  className: "extension-overlay"
85
- }), /*#__PURE__*/React.createElement("div", {
88
+ }), jsx("div", {
86
89
  css: header,
87
90
  contentEditable: false,
88
91
  className: headerClassNames
89
- }, !removeBorder && /*#__PURE__*/React.createElement(ExtensionLozenge, {
92
+ }, !removeBorder && jsx(ExtensionLozenge, {
90
93
  node: node
91
- }), children), hasBody && /*#__PURE__*/React.createElement("div", {
94
+ }), children), hasBody && jsx("div", {
92
95
  css: newContentStyles
93
- }, /*#__PURE__*/React.createElement("div", {
96
+ }, jsx("div", {
94
97
  css: content,
95
98
  ref: handleContentDOMRef,
96
99
  className: "extension-content block"
@@ -104,7 +107,7 @@ const Extension = props => {
104
107
  const {
105
108
  pluginInjectionApi
106
109
  } = props;
107
- return pluginInjectionApi === undefined ? /*#__PURE__*/React.createElement(ExtensionDeprecated, props) : /*#__PURE__*/React.createElement(ExtensionWithSharedState, props);
110
+ return pluginInjectionApi === undefined ? jsx(ExtensionDeprecated, props) : jsx(ExtensionWithSharedState, props);
108
111
  };
109
112
  const ExtensionWithSharedState = props => {
110
113
  const {
@@ -113,7 +116,7 @@ const ExtensionWithSharedState = props => {
113
116
  const {
114
117
  widthState
115
118
  } = useSharedPluginState(pluginInjectionApi, ['width']);
116
- return /*#__PURE__*/React.createElement(ExtensionWithPluginState, _extends({
119
+ return jsx(ExtensionWithPluginState, _extends({
117
120
  widthState: widthState
118
121
  }, props));
119
122
  };
@@ -130,14 +133,14 @@ const widthPluginKey = {
130
133
  }
131
134
  };
132
135
  const ExtensionDeprecated = props => {
133
- return /*#__PURE__*/React.createElement(WithPluginState, {
136
+ return jsx(WithPluginState, {
134
137
  editorView: props.view,
135
138
  plugins: {
136
139
  widthState: widthPluginKey
137
140
  },
138
141
  render: ({
139
142
  widthState
140
- }) => /*#__PURE__*/React.createElement(ExtensionWithPluginState, _extends({
143
+ }) => jsx(ExtensionWithPluginState, _extends({
141
144
  widthState: widthState
142
145
  }, props))
143
146
  });
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { Component } from 'react';
3
5
  import { overlay } from '../styles';
4
6
  import ExtensionLozenge from '../Lozenge';
@@ -11,13 +13,13 @@ export default class InlineExtension extends Component {
11
13
  } = this.props;
12
14
  const hasChildren = !!children;
13
15
  const className = hasChildren ? 'with-overlay with-children' : 'with-overlay';
14
- return /*#__PURE__*/React.createElement("div", {
16
+ return jsx("div", {
15
17
  css: wrapperStyle,
16
18
  className: `extension-container inline ${className}`
17
- }, /*#__PURE__*/React.createElement("div", {
19
+ }, jsx("div", {
18
20
  css: overlay,
19
21
  className: "extension-overlay"
20
- }), children ? children : /*#__PURE__*/React.createElement(ExtensionLozenge, {
22
+ }), children ? children : jsx(ExtensionLozenge, {
21
23
  node: node
22
24
  }));
23
25
  }
@@ -1,4 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+ import { jsx } from '@emotion/react';
2
4
  import { Component } from 'react';
3
5
  import EditorFileIcon from '@atlaskit/icon/glyph/editor/file';
4
6
  import { getExtensionLozengeData } from '@atlaskit/editor-common/utils';
@@ -33,7 +35,7 @@ export default class ExtensionLozenge extends Component {
33
35
  url,
34
36
  ...rest
35
37
  } = lozengeData;
36
- return /*#__PURE__*/React.createElement("img", _extends({
38
+ return jsx("img", _extends({
37
39
  css: styledImage,
38
40
  src: url
39
41
  }, rest, {
@@ -51,18 +53,18 @@ export default class ExtensionLozenge extends Component {
51
53
  const params = parameters && parameters.macroParams;
52
54
  const title = parameters && parameters.extensionTitle || parameters && parameters.macroMetadata && parameters.macroMetadata.title || extensionKey;
53
55
  const isBlockExtension = name === 'extension';
54
- return /*#__PURE__*/React.createElement("div", {
56
+ return jsx("div", {
55
57
  "data-testid": "lozenge-fallback",
56
58
  css: placeholderFallback
57
59
  }, lozengeData && !isBlockExtension ? this.renderImage({
58
60
  height: ICON_SIZE,
59
61
  width: ICON_SIZE,
60
62
  ...lozengeData
61
- }) : /*#__PURE__*/React.createElement(EditorFileIcon, {
63
+ }) : jsx(EditorFileIcon, {
62
64
  label: title
63
- }), /*#__PURE__*/React.createElement("span", {
65
+ }), jsx("span", {
64
66
  className: "extension-title"
65
- }, capitalizeFirstLetter(title)), params && !isBlockExtension && /*#__PURE__*/React.createElement("span", {
67
+ }, capitalizeFirstLetter(title)), params && !isBlockExtension && jsx("span", {
66
68
  css: placeholderFallbackParams
67
69
  }, Object.keys(params).map(key => key && ` | ${key} = ${params[key].value}`)));
68
70
  }
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { jsx, css } from '@emotion/react';
2
4
  import { N30 } from '@atlaskit/theme/colors';
3
5
  import React, { useState } from 'react';
4
6
  const useMultiBodiedExtensionActions = ({
@@ -146,16 +148,16 @@ const MultiBodiedExtension = ({
146
148
  display: block;
147
149
  }
148
150
  `;
149
- return /*#__PURE__*/React.createElement("section", {
151
+ return jsx("section", {
150
152
  className: "multiBodiedExtension--container",
151
153
  css: containerCSS,
152
154
  "data-testid": "multiBodiedExtension--container",
153
155
  "data-active-child-index": activeChildIndex
154
- }, /*#__PURE__*/React.createElement("nav", {
156
+ }, jsx("nav", {
155
157
  className: "multiBodiedExtension-navigation",
156
158
  css: navigationCSS,
157
159
  "data-testid": "multiBodiedExtension-navigation"
158
- }, extensionHandlerResult), /*#__PURE__*/React.createElement("article", {
160
+ }, extensionHandlerResult), jsx("article", {
159
161
  className: "multiBodiedExtension--frames",
160
162
  "data-testid": "multiBodiedExtension--frames",
161
163
  ref: articleRef
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { G300, N0 } from '@atlaskit/theme/colors';
4
5
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
5
6
  import { FormattedMessage } from 'react-intl-next';
@@ -48,19 +49,19 @@ export const SaveIndicator = ({
48
49
  return () => clearTimeout(handleId);
49
50
  }
50
51
  }, [saving, duration]);
51
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", null, children({
52
+ return jsx(Fragment, null, jsx("div", null, children({
52
53
  onSaveStarted,
53
54
  onSaveEnded: noop
54
- })), visible && saving && /*#__PURE__*/React.createElement("div", {
55
+ })), visible && saving && jsx("div", {
55
56
  css: saveIndicatorWrapper
56
- }, /*#__PURE__*/React.createElement("div", {
57
+ }, jsx("div", {
57
58
  css: saveIndicatorContent,
58
59
  "data-testid": "save-indicator-content"
59
- }, /*#__PURE__*/React.createElement(CheckCircleIcon, {
60
+ }, jsx(CheckCircleIcon, {
60
61
  label: "Saving",
61
62
  primaryColor: `var(--ds-icon-success, ${G300})`,
62
63
  size: "small"
63
- }), /*#__PURE__*/React.createElement("span", {
64
+ }), jsx("span", {
64
65
  css: saveIndicatorText
65
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.saveIndicator)))));
66
+ }, jsx(FormattedMessage, messages.saveIndicator)))));
66
67
  };
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import { defineMessages, injectIntl } from 'react-intl-next';
4
6
  import debounce from 'lodash/debounce';
5
7
  import EditorCloseIcon from '@atlaskit/icon/glyph/editor/close';
@@ -164,16 +166,16 @@ class Find extends React.Component {
164
166
  this.findNext = formatMessage(messages.findNext);
165
167
  this.findPrevious = formatMessage(messages.findPrevious);
166
168
  this.matchCase = formatMessage(messages.matchCase);
167
- this.matchCaseIcon = /*#__PURE__*/React.createElement(MatchCaseIcon, {
169
+ this.matchCaseIcon = jsx(MatchCaseIcon, {
168
170
  label: this.matchCase
169
171
  });
170
- this.findNextIcon = /*#__PURE__*/React.createElement(ChevronDownIcon, {
172
+ this.findNextIcon = jsx(ChevronDownIcon, {
171
173
  label: this.findNext
172
174
  });
173
- this.findPrevIcon = /*#__PURE__*/React.createElement(ChevronUpIcon, {
175
+ this.findPrevIcon = jsx(ChevronUpIcon, {
174
176
  label: this.findPrevious
175
177
  });
176
- this.closeIcon = /*#__PURE__*/React.createElement(EditorCloseIcon, {
178
+ this.closeIcon = jsx(EditorCloseIcon, {
177
179
  label: this.closeFindReplaceDialog
178
180
  });
179
181
 
@@ -233,9 +235,9 @@ class Find extends React.Component {
233
235
  selectedMatchPosition: count.index + 1,
234
236
  totalResultsCount: count.total
235
237
  });
236
- return /*#__PURE__*/React.createElement("div", {
238
+ return jsx("div", {
237
239
  css: sectionWrapperStyles
238
- }, /*#__PURE__*/React.createElement(Textfield, {
240
+ }, jsx(Textfield, {
239
241
  name: "find",
240
242
  appearance: "none",
241
243
  placeholder: this.find,
@@ -248,30 +250,30 @@ class Find extends React.Component {
248
250
  onBlur: this.props.onFindBlur,
249
251
  onCompositionStart: this.handleCompositionStart,
250
252
  onCompositionEnd: this.handleCompositionEnd
251
- }), /*#__PURE__*/React.createElement("div", {
253
+ }), jsx("div", {
252
254
  css: countWrapperStyles,
253
255
  "aria-live": "polite"
254
- }, findText && /*#__PURE__*/React.createElement("span", {
256
+ }, findText && jsx("span", {
255
257
  "data-testid": "textfield-count",
256
258
  css: countStyles
257
- }, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
259
+ }, count.total === 0 ? this.noResultsFound : resultsCount)), allowMatchCase && jsx(FindReplaceTooltipButton, {
258
260
  title: this.matchCase,
259
261
  icon: this.matchCaseIcon,
260
262
  onClick: this.handleMatchCaseClick,
261
263
  isPressed: shouldMatchCase
262
- }), /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
264
+ }), jsx(FindReplaceTooltipButton, {
263
265
  title: this.findNext,
264
266
  icon: this.findNextIcon,
265
267
  keymapDescription: 'Enter',
266
268
  onClick: this.handleFindNextClick,
267
269
  disabled: count.total <= 1
268
- }), /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
270
+ }), jsx(FindReplaceTooltipButton, {
269
271
  title: this.findPrevious,
270
272
  icon: this.findPrevIcon,
271
273
  keymapDescription: 'Shift Enter',
272
274
  onClick: this.handleFindPrevClick,
273
275
  disabled: count.total <= 1
274
- }), /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
276
+ }), jsx(FindReplaceTooltipButton, {
275
277
  title: this.closeFindReplaceDialog,
276
278
  icon: this.closeIcon,
277
279
  keymapDescription: 'Escape',
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ /** @jsx jsx */
2
3
  import React from 'react';
4
+ import { jsx } from '@emotion/react';
3
5
  import Find from './Find';
4
6
  import Replace from './Replace';
5
7
  import { ruleStyles, wrapperStyles } from './styles';
@@ -43,9 +45,9 @@ class FindReplace extends React.PureComponent {
43
45
  shouldMatchCase,
44
46
  onToggleMatchCase
45
47
  } = this.props;
46
- return /*#__PURE__*/React.createElement("div", {
48
+ return jsx("div", {
47
49
  css: wrapperStyles
48
- }, /*#__PURE__*/React.createElement(Find, {
50
+ }, jsx(Find, {
49
51
  allowMatchCase: allowMatchCase,
50
52
  shouldMatchCase: shouldMatchCase,
51
53
  onToggleMatchCase: onToggleMatchCase,
@@ -59,10 +61,10 @@ class FindReplace extends React.PureComponent {
59
61
  onFindTextfieldRefSet: this.setFindTextfieldRef,
60
62
  onCancel: onCancel,
61
63
  onArrowDown: this.setFocusToReplace
62
- }), /*#__PURE__*/React.createElement("hr", {
64
+ }), jsx("hr", {
63
65
  css: ruleStyles,
64
66
  id: "replace-hr-element"
65
- }), /*#__PURE__*/React.createElement(Replace, {
67
+ }), jsx(Replace, {
66
68
  canReplace: count.total > 0,
67
69
  replaceText: replaceText,
68
70
  onReplace: onReplace,
@@ -1,7 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ /** @jsx jsx */
3
4
  import React from 'react';
4
- import { css } from '@emotion/react';
5
+ import { css, jsx } from '@emotion/react';
5
6
  import { defineMessages, injectIntl } from 'react-intl-next';
6
7
  import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
7
8
  import ToolbarButton, { TOOLBAR_BUTTON } from '../../../ui/ToolbarButton';
@@ -69,9 +70,9 @@ class FindReplaceToolbarButton extends React.PureComponent {
69
70
  const title = formatMessage(messages.findReplaceToolbarButton);
70
71
  const stackBelowOtherEditorFloatingPanels = akEditorFloatingPanelZIndex - 1;
71
72
  const keymap = findKeymapByDescription('Find');
72
- return /*#__PURE__*/React.createElement("div", {
73
+ return jsx("div", {
73
74
  css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWith]
74
- }, /*#__PURE__*/React.createElement(Dropdown, {
75
+ }, jsx(Dropdown, {
75
76
  mountTo: popupsMountPoint,
76
77
  boundariesElement: popupsBoundariesElement,
77
78
  scrollableElement: popupsScrollableElement,
@@ -89,15 +90,15 @@ class FindReplaceToolbarButton extends React.PureComponent {
89
90
  type: ArrowKeyNavigationType.MENU,
90
91
  disableArrowKeyNavigation: true
91
92
  },
92
- trigger: /*#__PURE__*/React.createElement(ToolbarButton, {
93
+ trigger: jsx(ToolbarButton, {
93
94
  buttonId: TOOLBAR_BUTTON.FIND_REPLACE,
94
95
  spacing: isReducedSpacing ? 'none' : 'default',
95
96
  selected: isActive,
96
- title: /*#__PURE__*/React.createElement(ToolTipContent, {
97
+ title: jsx(ToolTipContent, {
97
98
  description: title,
98
99
  keymap: keymap
99
100
  }),
100
- iconBefore: /*#__PURE__*/React.createElement(EditorSearchIcon, {
101
+ iconBefore: jsx(EditorSearchIcon, {
101
102
  label: title
102
103
  }),
103
104
  onClick: this.toggleOpen,
@@ -106,9 +107,9 @@ class FindReplaceToolbarButton extends React.PureComponent {
106
107
  "aria-label": keymap ? tooltip(keymap, title) : title,
107
108
  "aria-keyshortcuts": getAriaKeyshortcuts(keymap)
108
109
  })
109
- }, /*#__PURE__*/React.createElement("div", {
110
+ }, jsx("div", {
110
111
  css: wrapper
111
- }, /*#__PURE__*/React.createElement(FindReplace, _extends({
112
+ }, jsx(FindReplace, _extends({
112
113
  findText: findText,
113
114
  replaceText: replaceText,
114
115
  count: {