@atlaskit/editor-core 150.0.2 → 151.1.1

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 +69 -0
  2. package/dist/cjs/actions/index.js +5 -23
  3. package/dist/cjs/create-editor/ErrorBoundary.js +113 -79
  4. package/dist/cjs/create-editor/ReactEditorView.js +145 -31
  5. package/dist/cjs/create-editor/create-plugins-list.js +8 -2
  6. package/dist/cjs/editor.js +101 -40
  7. package/dist/cjs/labs/next/presets/cxhtml.js +2 -1
  8. package/dist/cjs/plugins/analytics/types/enums.js +3 -1
  9. package/dist/cjs/plugins/base/index.js +4 -3
  10. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +66 -36
  11. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
  12. package/dist/cjs/plugins/card/index.js +13 -2
  13. package/dist/cjs/plugins/card/nodeviews/embedCard.js +1 -0
  14. package/dist/cjs/plugins/card/pm-plugins/main.js +7 -2
  15. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +10 -3
  16. package/dist/cjs/plugins/code-bidi-warning/index.js +25 -0
  17. package/dist/cjs/plugins/code-bidi-warning/plugin-key.js +11 -0
  18. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/main.js +43 -0
  19. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +118 -0
  20. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/reducer.js +12 -0
  21. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/types.js +5 -0
  22. package/dist/cjs/plugins/code-block/index.js +10 -6
  23. package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +16 -5
  24. package/dist/cjs/plugins/code-block/pm-plugins/main.js +12 -3
  25. package/dist/cjs/plugins/code-block/toolbar.js +1 -1
  26. package/dist/cjs/plugins/emoji/styles.js +1 -1
  27. package/dist/cjs/plugins/extension/pm-plugins/main.js +1 -4
  28. package/dist/cjs/plugins/extension/toolbar.js +28 -23
  29. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +9 -3
  30. package/dist/cjs/plugins/find-replace/ui/Find.js +27 -7
  31. package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +2 -2
  32. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +3 -3
  33. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  34. package/dist/cjs/plugins/hyperlink/utils.js +6 -69
  35. package/dist/cjs/plugins/index.js +8 -0
  36. package/dist/cjs/plugins/media/index.js +14 -3
  37. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +24 -10
  38. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +179 -0
  39. package/dist/cjs/plugins/media/pm-plugins/main.js +18 -9
  40. package/dist/cjs/plugins/media/toolbar/index.js +49 -17
  41. package/dist/cjs/plugins/media/toolbar/utils.js +20 -2
  42. package/dist/cjs/plugins/media/utils/media-files.js +67 -1
  43. package/dist/cjs/plugins/mentions/type-ahead/index.js +39 -3
  44. package/dist/cjs/plugins/panel/index.js +2 -3
  45. package/dist/cjs/plugins/panel/message.js +47 -0
  46. package/dist/cjs/plugins/panel/toolbar.js +64 -84
  47. package/dist/cjs/plugins/panel/utils.js +2 -2
  48. package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -3
  49. package/dist/cjs/plugins/rank.js +1 -1
  50. package/dist/cjs/plugins/status/styles.js +1 -1
  51. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  52. package/dist/cjs/profiler/render-count.js +82 -0
  53. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -5
  54. package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +55 -19
  55. package/dist/cjs/version-wrapper.js +1 -1
  56. package/dist/cjs/version.json +1 -1
  57. package/dist/es2019/actions/index.js +6 -28
  58. package/dist/es2019/create-editor/ErrorBoundary.js +73 -60
  59. package/dist/es2019/create-editor/ReactEditorView.js +130 -23
  60. package/dist/es2019/create-editor/create-plugins-list.js +9 -3
  61. package/dist/es2019/editor.js +74 -35
  62. package/dist/es2019/labs/next/presets/cxhtml.js +2 -1
  63. package/dist/es2019/plugins/analytics/types/enums.js +3 -1
  64. package/dist/es2019/plugins/base/index.js +4 -3
  65. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +63 -35
  66. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -1
  67. package/dist/es2019/plugins/card/index.js +7 -2
  68. package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -0
  69. package/dist/es2019/plugins/card/pm-plugins/main.js +9 -2
  70. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +12 -5
  71. package/dist/es2019/plugins/code-bidi-warning/index.js +15 -0
  72. package/dist/es2019/plugins/code-bidi-warning/plugin-key.js +2 -0
  73. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/main.js +31 -0
  74. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +88 -0
  75. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/reducer.js +3 -0
  76. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/types.js +1 -0
  77. package/dist/es2019/plugins/code-block/index.js +6 -1
  78. package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +16 -4
  79. package/dist/es2019/plugins/code-block/pm-plugins/main.js +50 -39
  80. package/dist/es2019/plugins/code-block/toolbar.js +1 -1
  81. package/dist/es2019/plugins/emoji/styles.js +2 -0
  82. package/dist/es2019/plugins/extension/pm-plugins/main.js +1 -4
  83. package/dist/es2019/plugins/extension/toolbar.js +30 -25
  84. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +9 -4
  85. package/dist/es2019/plugins/find-replace/ui/Find.js +27 -6
  86. package/dist/es2019/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
  87. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  88. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  89. package/dist/es2019/plugins/hyperlink/utils.js +3 -59
  90. package/dist/es2019/plugins/index.js +2 -1
  91. package/dist/es2019/plugins/media/index.js +13 -4
  92. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +16 -7
  93. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +88 -0
  94. package/dist/es2019/plugins/media/pm-plugins/main.js +20 -11
  95. package/dist/es2019/plugins/media/toolbar/index.js +44 -15
  96. package/dist/es2019/plugins/media/toolbar/utils.js +16 -0
  97. package/dist/es2019/plugins/media/utils/media-files.js +68 -2
  98. package/dist/es2019/plugins/mentions/type-ahead/index.js +21 -2
  99. package/dist/es2019/plugins/panel/index.js +3 -4
  100. package/dist/es2019/plugins/panel/message.js +38 -0
  101. package/dist/es2019/plugins/panel/toolbar.js +52 -71
  102. package/dist/es2019/plugins/panel/utils.js +2 -2
  103. package/dist/es2019/plugins/paste/linkify-md-plugin.js +2 -2
  104. package/dist/es2019/plugins/rank.js +1 -1
  105. package/dist/es2019/plugins/status/styles.js +2 -0
  106. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  107. package/dist/es2019/profiler/render-count.js +60 -0
  108. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -2
  109. package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +51 -18
  110. package/dist/es2019/version-wrapper.js +1 -1
  111. package/dist/es2019/version.json +1 -1
  112. package/dist/esm/actions/index.js +6 -24
  113. package/dist/esm/create-editor/ErrorBoundary.js +113 -78
  114. package/dist/esm/create-editor/ReactEditorView.js +146 -31
  115. package/dist/esm/create-editor/create-plugins-list.js +9 -3
  116. package/dist/esm/editor.js +100 -40
  117. package/dist/esm/labs/next/presets/cxhtml.js +2 -1
  118. package/dist/esm/plugins/analytics/types/enums.js +3 -1
  119. package/dist/esm/plugins/base/index.js +4 -3
  120. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +64 -36
  121. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
  122. package/dist/esm/plugins/card/index.js +13 -2
  123. package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -0
  124. package/dist/esm/plugins/card/pm-plugins/main.js +7 -2
  125. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +12 -5
  126. package/dist/esm/plugins/code-bidi-warning/index.js +17 -0
  127. package/dist/esm/plugins/code-bidi-warning/plugin-key.js +2 -0
  128. package/dist/esm/plugins/code-bidi-warning/pm-plugins/main.js +30 -0
  129. package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +96 -0
  130. package/dist/esm/plugins/code-bidi-warning/pm-plugins/reducer.js +3 -0
  131. package/dist/esm/plugins/code-bidi-warning/pm-plugins/types.js +1 -0
  132. package/dist/esm/plugins/code-block/index.js +10 -6
  133. package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +16 -5
  134. package/dist/esm/plugins/code-block/pm-plugins/main.js +11 -3
  135. package/dist/esm/plugins/code-block/toolbar.js +1 -1
  136. package/dist/esm/plugins/emoji/styles.js +1 -1
  137. package/dist/esm/plugins/extension/pm-plugins/main.js +1 -4
  138. package/dist/esm/plugins/extension/toolbar.js +28 -23
  139. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +9 -4
  140. package/dist/esm/plugins/find-replace/ui/Find.js +27 -7
  141. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +2 -2
  142. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  143. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  144. package/dist/esm/plugins/hyperlink/utils.js +3 -59
  145. package/dist/esm/plugins/index.js +2 -1
  146. package/dist/esm/plugins/media/index.js +14 -4
  147. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +24 -10
  148. package/dist/esm/plugins/media/nodeviews/mediaInline.js +147 -0
  149. package/dist/esm/plugins/media/pm-plugins/main.js +19 -11
  150. package/dist/esm/plugins/media/toolbar/index.js +47 -19
  151. package/dist/esm/plugins/media/toolbar/utils.js +15 -1
  152. package/dist/esm/plugins/media/utils/media-files.js +60 -2
  153. package/dist/esm/plugins/mentions/type-ahead/index.js +39 -3
  154. package/dist/esm/plugins/panel/index.js +3 -4
  155. package/dist/esm/plugins/panel/message.js +38 -0
  156. package/dist/esm/plugins/panel/toolbar.js +57 -77
  157. package/dist/esm/plugins/panel/utils.js +2 -2
  158. package/dist/esm/plugins/paste/linkify-md-plugin.js +2 -2
  159. package/dist/esm/plugins/rank.js +1 -1
  160. package/dist/esm/plugins/status/styles.js +1 -1
  161. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  162. package/dist/esm/profiler/render-count.js +57 -0
  163. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -5
  164. package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +53 -20
  165. package/dist/esm/version-wrapper.js +1 -1
  166. package/dist/esm/version.json +1 -1
  167. package/dist/types/create-editor/ErrorBoundary.d.ts +6 -6
  168. package/dist/types/create-editor/ReactEditorView.d.ts +15 -3
  169. package/dist/types/editor.d.ts +2 -0
  170. package/dist/types/plugins/analytics/index.d.ts +1 -1
  171. package/dist/types/plugins/analytics/types/enums.d.ts +4 -2
  172. package/dist/types/plugins/analytics/types/events.d.ts +7 -2
  173. package/dist/types/plugins/analytics/types/general-events.d.ts +4 -1
  174. package/dist/types/plugins/analytics/types/index.d.ts +1 -1
  175. package/dist/types/plugins/analytics/types/insert-events.d.ts +6 -1
  176. package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -0
  177. package/dist/types/plugins/base/index.d.ts +1 -0
  178. package/dist/types/plugins/base/pm-plugins/frozen-editor.d.ts +3 -2
  179. package/dist/types/plugins/card/pm-plugins/main.d.ts +2 -3
  180. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
  181. package/dist/types/plugins/card/types.d.ts +6 -0
  182. package/dist/types/plugins/code-bidi-warning/index.d.ts +3 -0
  183. package/dist/types/plugins/code-bidi-warning/plugin-key.d.ts +2 -0
  184. package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +3 -0
  185. package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +7 -0
  186. package/dist/types/plugins/code-bidi-warning/pm-plugins/reducer.d.ts +3 -0
  187. package/dist/types/plugins/code-bidi-warning/pm-plugins/types.d.ts +5 -0
  188. package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +11 -2
  189. package/dist/types/plugins/code-block/pm-plugins/main.d.ts +5 -1
  190. package/dist/types/plugins/extension/types.d.ts +0 -2
  191. package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
  192. package/dist/types/plugins/floating-toolbar/types.d.ts +1 -1
  193. package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -1
  194. package/dist/types/plugins/hyperlink/HyperlinkToolbarAppearance.d.ts +1 -1
  195. package/dist/types/plugins/hyperlink/utils.d.ts +0 -21
  196. package/dist/types/plugins/index.d.ts +1 -0
  197. package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +27 -0
  198. package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -2
  199. package/dist/types/plugins/media/toolbar/utils.d.ts +2 -0
  200. package/dist/types/plugins/media/utils/media-files.d.ts +8 -0
  201. package/dist/types/plugins/panel/message.d.ts +37 -0
  202. package/dist/types/plugins/panel/toolbar.d.ts +4 -37
  203. package/dist/types/plugins/panel/types.d.ts +1 -0
  204. package/dist/types/profiler/render-count.d.ts +14 -0
  205. package/dist/types/types/feature-flags.d.ts +17 -0
  206. package/dist/types/ui/LinkSearch/types.d.ts +1 -0
  207. package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +17 -1
  208. package/package.json +21 -18
  209. package/dist/cjs/plugins/caption/nodeviews/index.test.js +0 -135
  210. package/dist/cjs/plugins/caption/pm-plugins/keymap.test.js +0 -203
  211. package/dist/cjs/plugins/caption/pm-plugins/main.test.js +0 -141
  212. package/dist/cjs/plugins/code-block/language-list.test.js +0 -74
  213. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -101
  214. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -98
  215. package/dist/cjs/plugins/media/commands/captions.test.js +0 -149
  216. package/dist/cjs/plugins/media/commands/linking.test.js +0 -296
  217. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -50
  218. package/dist/cjs/plugins/panel/toolbar.test.js +0 -250
  219. package/dist/cjs/ui/ColorPickerButton/index.test.js +0 -123
  220. package/dist/cjs/ui/PortalProvider/index.test.js +0 -139
  221. package/dist/es2019/plugins/caption/nodeviews/index.test.js +0 -122
  222. package/dist/es2019/plugins/caption/pm-plugins/keymap.test.js +0 -193
  223. package/dist/es2019/plugins/caption/pm-plugins/main.test.js +0 -132
  224. package/dist/es2019/plugins/code-block/language-list.test.js +0 -69
  225. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -83
  226. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
  227. package/dist/es2019/plugins/media/commands/captions.test.js +0 -126
  228. package/dist/es2019/plugins/media/commands/linking.test.js +0 -208
  229. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
  230. package/dist/es2019/plugins/panel/toolbar.test.js +0 -200
  231. package/dist/es2019/ui/ColorPickerButton/index.test.js +0 -88
  232. package/dist/es2019/ui/PortalProvider/index.test.js +0 -115
  233. package/dist/esm/plugins/caption/nodeviews/index.test.js +0 -125
  234. package/dist/esm/plugins/caption/pm-plugins/keymap.test.js +0 -195
  235. package/dist/esm/plugins/caption/pm-plugins/main.test.js +0 -124
  236. package/dist/esm/plugins/code-block/language-list.test.js +0 -71
  237. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -92
  238. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
  239. package/dist/esm/plugins/media/commands/captions.test.js +0 -135
  240. package/dist/esm/plugins/media/commands/linking.test.js +0 -268
  241. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
  242. package/dist/esm/plugins/panel/toolbar.test.js +0 -230
  243. package/dist/esm/ui/ColorPickerButton/index.test.js +0 -107
  244. package/dist/esm/ui/PortalProvider/index.test.js +0 -129
@@ -3,8 +3,10 @@ import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { EditorState } from 'prosemirror-state';
5
5
  import { DirectEditorProps, EditorView } from 'prosemirror-view';
6
+ import { Node as PMNode } from 'prosemirror-model';
6
7
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
7
8
  import { ErrorReporter, ProviderFactory, Transformer } from '@atlaskit/editor-common';
9
+ import { ExperienceStore } from '@atlaskit/editor-common/ufo';
8
10
  import { Dispatch, EventDispatcher } from '../event-dispatcher';
9
11
  import { AnalyticsEventPayload, DispatchAnalyticsEvent, FULL_WIDTH_MODE } from '../plugins/analytics';
10
12
  import { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
@@ -19,6 +21,7 @@ export interface EditorViewProps {
19
21
  portalProviderAPI: PortalProviderAPI;
20
22
  allowAnalyticsGASV3?: boolean;
21
23
  disabled?: boolean;
24
+ experienceStore?: ExperienceStore;
22
25
  render?: (props: {
23
26
  editor: JSX.Element;
24
27
  view?: EditorView;
@@ -52,12 +55,14 @@ export default class ReactEditorView<T = {}> extends React.Component<EditorViewP
52
55
  proseMirrorRenderedSeverity?: SEVERITY;
53
56
  transactionTracker: TransactionTracker;
54
57
  validTransactionCount: number;
58
+ experienceStore?: ExperienceStore;
55
59
  static contextTypes: {
56
60
  getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<any>;
57
61
  intl: ReactIntl.IntlShape;
58
62
  };
59
63
  private canDispatchTransactions;
60
- private focusTimeoutId;
64
+ private focusTimeoutId?;
65
+ private reliabilityInterval?;
61
66
  private pluginPerformanceObserver;
62
67
  private featureFlags;
63
68
  private onPluginObservation;
@@ -67,6 +72,11 @@ export default class ReactEditorView<T = {}> extends React.Component<EditorViewP
67
72
  constructor(props: EditorViewProps & T, context: EditorReactContext);
68
73
  UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
69
74
  formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
75
+ resetEditorState: ({ doc, shouldScrollToBottom, }: {
76
+ doc: string;
77
+ shouldScrollToBottom: boolean;
78
+ }) => void;
79
+ blur: () => void;
70
80
  reconfigureState: (props: EditorViewProps) => void;
71
81
  handleAnalyticsEvent: FireAnalyticsCallback;
72
82
  componentDidMount(): void;
@@ -78,13 +88,15 @@ export default class ReactEditorView<T = {}> extends React.Component<EditorViewP
78
88
  createEditorState: (options: {
79
89
  props: EditorViewProps;
80
90
  context: EditorReactContext;
81
- replaceDoc?: boolean;
91
+ doc?: string | Object | PMNode<any> | undefined;
92
+ resetting?: boolean | undefined;
93
+ selectionAtStart?: boolean | undefined;
82
94
  }) => EditorState<any>;
83
95
  private onEditorViewStateUpdated;
84
96
  private trackValidTransactions;
85
97
  private dispatchTransaction;
86
98
  getDirectEditorProps: (state?: EditorState<any> | undefined) => DirectEditorProps;
87
- createEditorView: (node: HTMLDivElement) => void;
99
+ private createEditorView;
88
100
  handleEditorViewRef: (node: HTMLDivElement) => void;
89
101
  dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
90
102
  private editor;
@@ -27,6 +27,8 @@ export default class Editor extends React.Component<EditorProps, State> {
27
27
  private editorActions;
28
28
  private createAnalyticsEvent?;
29
29
  private editorSessionId;
30
+ private experienceStore?;
31
+ private startTime?;
30
32
  constructor(props: EditorProps, context: Context);
31
33
  componentDidMount(): void;
32
34
  componentDidUpdate(prevProps: EditorProps): void;
@@ -1,6 +1,6 @@
1
1
  import analyticsPlugin from './plugin';
2
2
  export { ACTION_SUBJECT_ID, ACTION_SUBJECT, ACTION, BROWSER_FREEZE_INTERACTION_TYPE, EVENT_TYPE, FULL_WIDTH_MODE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, MODE, PasteContents, PasteSources, PasteTypes, PLATFORMS, PUNC, SYMBOL, TABLE_ACTION, TABLE_BREAKOUT, TRIGGER_METHOD, USER_CONTEXT, DELETE_DIRECTION, LIST_TEXT_SCENARIOS, } from './types';
3
- export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, } from './types';
3
+ export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, ErrorEventPayload, ErrorEventAttributes, FormatEventPayload, GeneralEventPayload, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, SubstituteEventPayload, TableEventPayload, } from './types';
4
4
  export { withAnalytics, addAnalytics, findInsertLocation, getAnalyticsEventsFromTransaction, getSelectionType, getStateContext, mapActionSubjectIdToAttributes, } from './utils';
5
5
  export declare const analyticsPluginKey: import("prosemirror-state").PluginKey<any, any>;
6
6
  export default analyticsPlugin;
@@ -88,7 +88,8 @@ export declare enum ACTION {
88
88
  RENDERED = "rendered",
89
89
  ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
90
90
  ON_CHANGE_CALLBACK = "onChangeCalled",
91
- REMOVE_ICON = "removedIcon"
91
+ REMOVE_ICON = "removedIcon",
92
+ UFO_SESSION_COMPLETE = "ufoSessionComplete"
92
93
  }
93
94
  export declare enum INPUT_METHOD {
94
95
  ASCII = "ascii",
@@ -217,8 +218,9 @@ export declare enum ACTION_SUBJECT_ID {
217
218
  LINK = "link",
218
219
  LINK_PREVIEW = "linkPreview",
219
220
  MEDIA = "media",
220
- MEDIA_SINGLE = "mediaSingle",
221
221
  MEDIA_GROUP = "mediaGroup",
222
+ MEDIA_INLINE = "mediaInline",
223
+ MEDIA_SINGLE = "mediaSingle",
222
224
  MEDIA_LINK = "mediaLink",
223
225
  MENTION = "mention",
224
226
  NESTED_EXPAND = "nestedExpand",
@@ -77,7 +77,7 @@ declare type ContentComponentErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SU
77
77
  position: number;
78
78
  docSize: number;
79
79
  }, undefined>;
80
- declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, {
80
+ export declare type ErrorEventAttributes = {
81
81
  error: Error;
82
82
  errorInfo: React.ErrorInfo;
83
83
  product?: string;
@@ -85,6 +85,11 @@ declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTI
85
85
  errorId?: string;
86
86
  docStructure?: string | SimplifiedNode;
87
87
  browserExtensions?: UserBrowserExtensionResults;
88
+ };
89
+ declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes, undefined>;
90
+ declare type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
91
+ errorStack: string;
92
+ errorId: string;
88
93
  }, undefined>;
89
- export declare type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | ComponentCrashErrorAEP;
94
+ export declare type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP;
90
95
  export {};
@@ -57,6 +57,9 @@ declare type EditorRenderedAEP<T> = OperationalAEP<ACTION.RE_RENDERED, ACTION_SU
57
57
  propsDifference: PropsDifference<T> | ShallowPropsDifference<T>;
58
58
  count: number;
59
59
  }, undefined>;
60
+ export declare type UfoSessionCompletePayloadAEP = OperationalAEP<ACTION.UFO_SESSION_COMPLETE, ACTION_SUBJECT.EDITOR, undefined, {
61
+ interval: number;
62
+ }, undefined>;
60
63
  declare type BrowserFreezePayload = OperationalAEPWithObjectId<ACTION.BROWSER_FREEZE, ACTION_SUBJECT.EDITOR, undefined, {
61
64
  freezeTime: number;
62
65
  nodeSize: number;
@@ -145,5 +148,5 @@ declare type RichMediaLayoutAEP = TrackAEP<ACTION.SELECTED, ACTION_SUBJECT.MEDIA
145
148
  declare type CodeBlockLanguageSelectedAEP = TrackAEP<ACTION.LANGUAGE_SELECTED, ACTION_SUBJECT.CODE_BLOCK, undefined, {
146
149
  language: string;
147
150
  }, undefined>;
148
- export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP;
151
+ export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP;
149
152
  export {};
@@ -1,5 +1,5 @@
1
1
  export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, TRIGGER_METHOD, CONTENT_COMPONENT, FLOATING_CONTROLS_TITLE, } from './enums';
2
- export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, ErrorEventPayload, } from './events';
2
+ export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadWithChannel, ErrorEventPayload, ErrorEventAttributes, } from './events';
3
3
  export type { FormatEventPayload } from './format-events';
4
4
  export type { SubstituteEventPayload } from './substitute-events';
5
5
  export type { GeneralEventPayload } from './general-events';
@@ -76,6 +76,11 @@ declare type InsertMediaGroupAEP = InsertAEP<ACTION_SUBJECT_ID.MEDIA, {
76
76
  fileExtension?: string;
77
77
  type: ACTION_SUBJECT_ID.MEDIA_SINGLE | ACTION_SUBJECT_ID.MEDIA_GROUP;
78
78
  }, undefined>;
79
+ declare type InsertMediaInlineAEP = InsertAEP<ACTION_SUBJECT_ID.MEDIA, {
80
+ inputMethod?: InputMethodInsertMedia;
81
+ fileExtension?: string;
82
+ type: ACTION_SUBJECT_ID.MEDIA_INLINE;
83
+ }, undefined>;
79
84
  export declare type InputMethodInsertLink = INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.CLIPBOARD | INPUT_METHOD.FORMATTING | INPUT_METHOD.AUTO_DETECT | INPUT_METHOD.MANUAL;
80
85
  declare type InsertLinkAEP = InsertAEP<ACTION_SUBJECT_ID.LINK, {
81
86
  inputMethod: InputMethodInsertLink;
@@ -119,5 +124,5 @@ declare type InsertNodeViaExtensionAPIAEP = InsertAEP<undefined, {
119
124
  declare type InsertPlaceholderTextAEP = InsertAEP<ACTION_SUBJECT_ID.PLACEHOLDER_TEXT, {
120
125
  inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU;
121
126
  }, undefined>;
122
- export declare type InsertEventPayload = InsertDividerAEP | InsertLineBreakAEP | InsertPanelAEP | InsertCodeBlockAEP | InsertTableAEP | InsertExpandAEP | InsertActionDecisionAEP | InsertEmojiAEP | InsertStatusAEP | InsertMediaSingleAEP | InsertMediaGroupAEP | InsertLinkAEP | InsertLinkPreviewAEP | InsertMediaLinkAEP | InsertSmartLinkAEP | InsertLayoutAEP | InsertExtensionAEP | InsertNodeViaExtensionAPIAEP | InsertDateAEP | InsertPlaceholderTextAEP;
127
+ export declare type InsertEventPayload = InsertDividerAEP | InsertLineBreakAEP | InsertPanelAEP | InsertCodeBlockAEP | InsertTableAEP | InsertExpandAEP | InsertActionDecisionAEP | InsertEmojiAEP | InsertStatusAEP | InsertMediaSingleAEP | InsertMediaGroupAEP | InsertMediaInlineAEP | InsertLinkAEP | InsertLinkPreviewAEP | InsertMediaLinkAEP | InsertSmartLinkAEP | InsertLayoutAEP | InsertExtensionAEP | InsertNodeViaExtensionAPIAEP | InsertDateAEP | InsertPlaceholderTextAEP;
123
128
  export {};
@@ -67,6 +67,7 @@ export declare type SelectedSearchResultsAEP = UIAEP<ACTION.SELECTED, ACTION_SUB
67
67
  resultCount: number;
68
68
  selectedResultId: string;
69
69
  selectedRelativePosition: number;
70
+ prefetch: boolean;
70
71
  }, undefined>;
71
72
  export declare type EditLinkToolbarAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.SMART_LINK | ACTION_SUBJECT.HYPERLINK, ACTION_SUBJECT_ID.EDIT_LINK, {}, undefined>;
72
73
  export declare type UnlinkToolbarAEP = UIAEP<ACTION.UNLINK, ACTION_SUBJECT.SMART_LINK | ACTION_SUBJECT.HYPERLINK, ACTION_SUBJECT_ID.CARD_INLINE | undefined, {}, undefined>;
@@ -6,6 +6,7 @@ export interface BasePluginOptions {
6
6
  allowInlineCursorTarget?: boolean;
7
7
  inputTracking?: InputTracking;
8
8
  browserFreezeTracking?: BrowserFreezetracking;
9
+ ufo?: boolean;
9
10
  }
10
11
  export declare const isChromeWithSelectionBug: boolean;
11
12
  declare const basePlugin: (options?: BasePluginOptions | undefined) => EditorPlugin;
@@ -1,10 +1,11 @@
1
- import { Plugin } from 'prosemirror-state';
1
+ import { Plugin, PluginKey } from 'prosemirror-state';
2
2
  import { DispatchAnalyticsEvent } from '../../analytics';
3
3
  import { InputTracking, BrowserFreezetracking } from '../../../types/performance-tracking';
4
+ export declare const frozenEditorPluginKey: PluginKey<any, any>;
4
5
  export declare const DEFAULT_FREEZE_THRESHOLD = 600;
5
6
  export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
6
7
  export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
7
8
  export declare const DEFAULT_TRACK_SEVERITY_THRESHOLD_NORMAL = 100;
8
9
  export declare const DEFAULT_TRACK_SEVERITY_THRESHOLD_DEGRADED = 500;
9
- declare const _default: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, inputTracking?: InputTracking | undefined, browserFreezeTracking?: BrowserFreezetracking | undefined) => Plugin<any, any>;
10
+ declare const _default: (dispatchAnalyticsEvent: DispatchAnalyticsEvent, inputTracking?: InputTracking | undefined, browserFreezeTracking?: BrowserFreezetracking | undefined, ufo?: boolean | undefined) => Plugin<any, any>;
10
11
  export default _default;
@@ -1,6 +1,5 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
- import { CardPlatform } from '@atlaskit/smart-card';
2
+ import { CardPluginOptions } from '../types';
3
3
  import { PMPluginFactoryParams } from '../../../types';
4
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
4
  export { pluginKey } from './plugin-key';
6
- export declare const createPlugin: (platform: CardPlatform, allowResizing: boolean, useAlternativePreloader: boolean, fullWidthMode?: boolean | undefined, createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined) => ({ portalProviderAPI, eventDispatcher, providerFactory, dispatchAnalyticsEvent, }: PMPluginFactoryParams) => Plugin<any, any>;
5
+ export declare const createPlugin: (options: CardPluginOptions) => ({ portalProviderAPI, eventDispatcher, providerFactory, dispatchAnalyticsEvent, }: PMPluginFactoryParams) => Plugin<any, any>;
@@ -1,5 +1,6 @@
1
1
  import { CardProvider } from '@atlaskit/editor-common/provider-factory';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { OutstandingRequests, Request } from '../../types';
4
- export declare const resolveWithProvider: (view: EditorView, outstandingRequests: OutstandingRequests, provider: CardProvider, request: Request) => Promise<void | import("@atlaskit/smart-card").InlineCardAdf | import("@atlaskit/smart-card").BlockCardAdf | import("@atlaskit/smart-card").EmbedCardAdf>;
4
+ import { CardOptions } from '@atlaskit/editor-common';
5
+ export declare const resolveWithProvider: (view: EditorView, outstandingRequests: OutstandingRequests, provider: CardProvider, request: Request, options: CardOptions) => Promise<void | import("@atlaskit/smart-card").InlineCardAdf | import("@atlaskit/smart-card").BlockCardAdf | import("@atlaskit/smart-card").EmbedCardAdf>;
5
6
  export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
@@ -2,6 +2,7 @@ import { INPUT_METHOD, ACTION } from '../analytics/types/enums';
2
2
  import { CardProvider, CardAppearance, CardAdf } from '@atlaskit/editor-common/provider-factory';
3
3
  import { SmartLinkEvents } from '@atlaskit/smart-card';
4
4
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
+ import { CardOptions } from '@atlaskit/editor-common';
5
6
  export declare type CardInfo = {
6
7
  title?: string;
7
8
  url?: string;
@@ -27,6 +28,11 @@ export declare type CardPluginState = {
27
28
  smartLinkEvents?: SmartLinkEvents;
28
29
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
29
30
  };
31
+ export declare type CardPluginOptions = CardOptions & {
32
+ platform: 'mobile' | 'web';
33
+ fullWidthMode?: boolean;
34
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
35
+ };
30
36
  export declare type SetProvider = {
31
37
  type: 'SET_PROVIDER';
32
38
  provider: CardProvider | null;
@@ -0,0 +1,3 @@
1
+ import { EditorPlugin } from '../../types';
2
+ declare const codeBidiWarning: () => EditorPlugin;
3
+ export default codeBidiWarning;
@@ -0,0 +1,2 @@
1
+ import { PluginKey } from 'prosemirror-state';
2
+ export declare const codeBidiWarningPluginKey: PluginKey<any, any>;
@@ -0,0 +1,3 @@
1
+ import { Plugin } from 'prosemirror-state';
2
+ import { PMPluginFactoryParams } from '../../../types';
3
+ export declare const createPlugin: ({ dispatch, reactContext, }: PMPluginFactoryParams) => Plugin<any, import("prosemirror-model").Schema<any, any>>;
@@ -0,0 +1,7 @@
1
+ import { DecorationSet } from 'prosemirror-view';
2
+ import { Node as PmNode } from 'prosemirror-model';
3
+ export declare const createPluginState: (dispatch: import("../../../event-dispatcher").Dispatch<any>, initialState: import("./types").CodeBidiWarningPluginState | ((state: import("prosemirror-state").EditorState<any>) => import("./types").CodeBidiWarningPluginState)) => import("prosemirror-state").StateField<import("./types").CodeBidiWarningPluginState, import("prosemirror-model").Schema<any, any>>, getPluginState: (state: import("prosemirror-state").EditorState<any>) => import("./types").CodeBidiWarningPluginState;
4
+ export declare function createBidiWarningsDecorationSetFromDoc({ doc, codeBidiWarningLabel, }: {
5
+ doc: PmNode<any>;
6
+ codeBidiWarningLabel: string;
7
+ }): DecorationSet<any>;
@@ -0,0 +1,3 @@
1
+ import { CodeBidiWarningPluginState } from './types';
2
+ declare const _default: (pluginState: CodeBidiWarningPluginState, action: unknown) => CodeBidiWarningPluginState;
3
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { DecorationSet } from 'prosemirror-view';
2
+ export declare type CodeBidiWarningPluginState = {
3
+ decorationSet: DecorationSet;
4
+ codeBidiWarningLabel: string;
5
+ };
@@ -2,6 +2,10 @@ import { EditorView } from 'prosemirror-view';
2
2
  import { Node } from 'prosemirror-model';
3
3
  import { getPosHandlerNode, getPosHandler } from '../../../nodeviews/';
4
4
  import React from 'react';
5
+ declare type CodeBidiWarningOptions = {
6
+ label: string;
7
+ enabled?: boolean;
8
+ };
5
9
  export declare class CodeBlockView {
6
10
  node: Node;
7
11
  dom: HTMLElement;
@@ -11,11 +15,12 @@ export declare class CodeBlockView {
11
15
  highlighter: React.ReactElement | null;
12
16
  getPos: getPosHandlerNode;
13
17
  view: EditorView;
18
+ codeBidiWarningOptions: CodeBidiWarningOptions;
14
19
  measurements: number[];
15
20
  count: number;
16
21
  shouldDebounce: boolean;
17
22
  timer: number | null;
18
- constructor(node: Node, view: EditorView, getPos: getPosHandlerNode);
23
+ constructor(node: Node, view: EditorView, getPos: getPosHandlerNode, codeBidiWarningOptions: CodeBidiWarningOptions);
19
24
  private measure;
20
25
  private highlight;
21
26
  private ensureLineNumbers;
@@ -25,4 +30,8 @@ export declare class CodeBlockView {
25
30
  target: Element;
26
31
  }): boolean;
27
32
  }
28
- export declare const highlightingCodeBlockNodeView: () => (node: Node, view: EditorView, getPos: getPosHandler) => CodeBlockView;
33
+ export declare const highlightingCodeBlockNodeView: ({ codeBidiWarnings, codeBidiWarningLabel, }: {
34
+ codeBidiWarnings?: boolean | undefined;
35
+ codeBidiWarningLabel: string;
36
+ }) => (node: Node, view: EditorView, getPos: getPosHandler) => CodeBlockView;
37
+ export {};
@@ -1,2 +1,6 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
- export declare const createPlugin: (useLongPressSelection?: boolean) => Plugin<any, any>;
2
+ import { EditorReactContext } from '../../../types/editor-react-context';
3
+ export declare const createPlugin: ({ useLongPressSelection, reactContext, }: {
4
+ useLongPressSelection?: boolean | undefined;
5
+ reactContext: () => EditorReactContext;
6
+ }) => Plugin<any, any>;
@@ -1,8 +1,6 @@
1
- import { ExtensionLayout } from '@atlaskit/adf-schema';
2
1
  import { ContextIdentifierProvider } from '@atlaskit/editor-common';
3
2
  import { UpdateExtension, ExtensionProvider, Parameters, TransformBefore, TransformAfter } from '@atlaskit/editor-common/extensions';
4
3
  export declare type ExtensionState<T extends Parameters = Parameters> = {
5
- layout: ExtensionLayout;
6
4
  localId?: string;
7
5
  autoSaveResolve?: () => void;
8
6
  showEditButton: boolean;
@@ -4,4 +4,4 @@ import type { FeatureFlags } from '../../types/feature-flags';
4
4
  *
5
5
  * Useful for analytics and analysis purposes.
6
6
  */
7
- export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): ("newInsertionBehaviour" | "interactiveExpand" | "placeholderBracketHint" | "placeholderHints" | "moreTextColors" | "findReplace" | "findReplaceMatchCase" | "extensionLocalIdGeneration" | "keyboardAccessibleDatepicker" | "addColumnWithCustomStep" | "undoRedoButtons" | "catchAllTracking" | "nextEmojiNodeView" | "stickyHeadersOptimization" | "initialRenderOptimization" | "mouseMoveOptimization" | "tableRenderOptimization" | "tableOverflowShadowsOptimization" | "codeBlockSyntaxHighlighting" | "queueAnalytics" | "extendFloatingToolbar" | "displayInlineBlockForInlineNodes" | "useUnpredictableInputRule" | "showAvatarGroupAsPlugin" | "errorBoundaryDocStructure" | "synchronyErrorDocStructure" | "enableViewUpdateSubscription" | "collabAvatarScroll")[];
7
+ export declare function getEnabledFeatureFlagKeys(featureFlags: FeatureFlags): ("newInsertionBehaviour" | "interactiveExpand" | "placeholderBracketHint" | "placeholderHints" | "moreTextColors" | "findReplace" | "findReplaceMatchCase" | "extensionLocalIdGeneration" | "keyboardAccessibleDatepicker" | "addColumnWithCustomStep" | "undoRedoButtons" | "catchAllTracking" | "nextEmojiNodeView" | "stickyHeadersOptimization" | "initialRenderOptimization" | "mouseMoveOptimization" | "tableRenderOptimization" | "tableOverflowShadowsOptimization" | "codeBlockSyntaxHighlighting" | "codeBidiWarnings" | "queueAnalytics" | "extendFloatingToolbar" | "displayInlineBlockForInlineNodes" | "useUnpredictableInputRule" | "showAvatarGroupAsPlugin" | "errorBoundaryDocStructure" | "synchronyErrorDocStructure" | "enableViewUpdateSubscription" | "collabAvatarScroll" | "ufo")[];
@@ -74,7 +74,7 @@ declare type FloatingToolbarSelectBase<T, V = SelectOption> = {
74
74
  options: V[];
75
75
  hidden?: boolean;
76
76
  hideExpandIcon?: boolean;
77
- defaultValue?: V;
77
+ defaultValue?: V | null;
78
78
  placeholder?: string;
79
79
  onChange: (selected: V) => T;
80
80
  filterOption?: ((option: V, rawInput: string) => boolean) | null;
@@ -18,7 +18,7 @@ export interface Props {
18
18
  mountPoint?: HTMLElement;
19
19
  boundariesElement?: HTMLElement;
20
20
  scrollableElement?: HTMLElement;
21
- defaultValue?: SelectOption;
21
+ defaultValue?: SelectOption | null;
22
22
  placeholder?: string;
23
23
  onChange?: (change: ValueType<SelectOption>) => void;
24
24
  width?: number;
@@ -23,6 +23,6 @@ export declare class HyperlinkToolbarAppearance extends Component<HyperlinkToolb
23
23
  private getProvider;
24
24
  private resolveUrl;
25
25
  componentDidMount: () => Promise<void>;
26
- componentWillReceiveProps(nextProps: HyperlinkToolbarAppearanceProps): void;
26
+ UNSAFE_componentWillReceiveProps(nextProps: HyperlinkToolbarAppearanceProps): void;
27
27
  render(): JSX.Element | null;
28
28
  }
@@ -1,16 +1,4 @@
1
1
  import { Slice, Schema } from 'prosemirror-model';
2
- export declare const LINK_REGEXP: RegExp;
3
- export interface Match {
4
- schema: any;
5
- index: number;
6
- lastIndex: number;
7
- raw: string;
8
- text: string;
9
- url: string;
10
- length?: number;
11
- input?: string;
12
- }
13
- export declare function getLinkMatch(str: string): Match | LinkifyMatch | null;
14
2
  /**
15
3
  * Instance of class LinkMatcher are used in autoformatting in place of Regex.
16
4
  * Hence it has been made similar to regex with an exec method.
@@ -26,12 +14,3 @@ export declare function normalizeUrl(url?: string | null): string;
26
14
  export declare function linkifyContent(schema: Schema): (slice: Slice) => Slice;
27
15
  export declare function getLinkDomain(url: string): string;
28
16
  export declare function isFromCurrentDomain(url: string): boolean;
29
- export interface LinkifyMatch {
30
- index: number;
31
- lastIndex: number;
32
- raw: string;
33
- url: string;
34
- text: string;
35
- schema: string;
36
- }
37
- export declare const linkifyMatch: (text: string) => LinkifyMatch[];
@@ -63,3 +63,4 @@ export { default as clipboardPlugin } from './clipboard';
63
63
  export { default as undoRedoPlugin } from './undo-redo';
64
64
  export { default as avatarGroupPlugin } from './avatar-group';
65
65
  export { default as viewUpdateSubscriptionPlugin } from './view-update-subscription';
66
+ export { default as codeBidiWarningPlugin } from './code-bidi-warning';
@@ -0,0 +1,27 @@
1
+ import { Node as PMNode } from 'prosemirror-model';
2
+ import { EditorView, NodeView } from 'prosemirror-view';
3
+ import React from 'react';
4
+ import { EventDispatcher } from '../../../event-dispatcher';
5
+ import { getPosHandler, ReactNodeView } from '../../../nodeviews/';
6
+ import { FileIdentifier } from '@atlaskit/media-client';
7
+ import { MediaProvider, ProviderFactory } from '@atlaskit/editor-common';
8
+ import { PortalProviderAPI } from '../../../../src/ui/PortalProvider';
9
+ export interface MediaInlineProps {
10
+ mediaProvider: Promise<MediaProvider>;
11
+ identifier: FileIdentifier;
12
+ node: PMNode;
13
+ }
14
+ export declare const MediaInline: React.FC<MediaInlineProps>;
15
+ export interface MediaInlineNodeViewProps {
16
+ providerFactory: ProviderFactory;
17
+ }
18
+ export declare class MediaInlineNodeView extends ReactNodeView<MediaInlineNodeViewProps> {
19
+ createDomRef(): HTMLSpanElement;
20
+ getContentDOM(): {
21
+ dom: HTMLSpanElement;
22
+ };
23
+ ignoreMutation(): boolean;
24
+ viewShouldUpdate(nextNode: PMNode): boolean;
25
+ render(props: MediaInlineNodeViewProps): JSX.Element;
26
+ }
27
+ export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -36,7 +36,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
36
36
  private customPicker?;
37
37
  private removeOnCloseListener;
38
38
  private openMediaPickerBrowser?;
39
- private onPopupToogleCallback;
39
+ private onPopupToggleCallback;
40
40
  private reactContext;
41
41
  pickers: PickerFacade[];
42
42
  pickerPromises: Array<Promise<PickerFacade>>;
@@ -64,7 +64,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
64
64
  shouldUseMediaPickerPopup: () => boolean;
65
65
  showMediaPicker: () => void;
66
66
  setBrowseFn: (browseFn: () => void) => void;
67
- onPopupToggle: (onPopupToogleCallback: (isOpen: boolean) => void) => void;
67
+ onPopupToggle: (onPopupToggleCallback: (isOpen: boolean) => void) => void;
68
68
  /**
69
69
  * Returns a promise that is resolved after all pending operations have been finished.
70
70
  * An optional timeout will cause the promise to reject if the operation takes too long
@@ -1,4 +1,6 @@
1
1
  import { MediaBaseAttributes } from '@atlaskit/adf-schema';
2
+ import { EditorState } from 'prosemirror-state';
2
3
  import { MediaPluginState } from '../pm-plugins/types';
3
4
  export declare const getSelectedMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaBaseAttributes | null;
4
5
  export declare const downloadMedia: (mediaPluginState: MediaPluginState) => Promise<boolean>;
6
+ export declare const removeMediaGroupNode: (state: EditorState) => import("prosemirror-state").Transaction<any>;
@@ -5,6 +5,14 @@ export interface Range {
5
5
  start: number;
6
6
  end: number;
7
7
  }
8
+ export declare const canInsertMediaInline: (state: EditorState) => boolean;
9
+ /**
10
+ * Create a new media inline to insert the new media.
11
+ * @param view Editor view
12
+ * @param mediaState Media file to be added to the editor
13
+ * @param collection Collection for the media to be added
14
+ */
15
+ export declare const insertMediaInlineNode: (view: EditorView, mediaState: MediaState, collection: string, inputMethod?: import("../../analytics").INPUT_METHOD.CLIPBOARD | import("../../analytics").INPUT_METHOD.DRAG_AND_DROP | import("../../analytics").INPUT_METHOD.PICKER_CLOUD | undefined) => boolean;
8
16
  /**
9
17
  * Insert a media into an existing media group
10
18
  * or create a new media group to insert the new media.
@@ -0,0 +1,37 @@
1
+ export declare const messages: {
2
+ info: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ note: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ success: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ warning: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ error: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ emoji: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ backgroundColor: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ };
@@ -6,42 +6,9 @@ import { NodeType } from 'prosemirror-model';
6
6
  import { Command } from '../../types';
7
7
  import { ProviderFactory } from '@atlaskit/editor-common';
8
8
  import { FormattedMessage } from 'react-intl';
9
- export declare const messages: {
10
- info: {
11
- id: string;
12
- defaultMessage: string;
13
- description: string;
14
- };
15
- note: {
16
- id: string;
17
- defaultMessage: string;
18
- description: string;
19
- };
20
- success: {
21
- id: string;
22
- defaultMessage: string;
23
- description: string;
24
- };
25
- warning: {
26
- id: string;
27
- defaultMessage: string;
28
- description: string;
29
- };
30
- error: {
31
- id: string;
32
- defaultMessage: string;
33
- description: string;
34
- };
35
- emoji: {
36
- id: string;
37
- defaultMessage: string;
38
- description: string;
39
- };
40
- backgroundColor: {
41
- id: string;
42
- defaultMessage: string;
43
- description: string;
44
- };
9
+ import { PanelType } from '@atlaskit/adf-schema';
10
+ export declare const panelIconMap: {
11
+ [key in Exclude<PanelType, PanelType.CUSTOM>]: string;
45
12
  };
46
- export declare const getToolbarItems: (formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor) => string, panelNodeType: NodeType, isCustomPanelEnabled: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined) => FloatingToolbarItem<Command>[];
13
+ export declare const getToolbarItems: (formatMessage: (messageDescriptor: FormattedMessage.MessageDescriptor) => string, panelNodeType: NodeType, isCustomPanelEnabled: boolean, isCustomPanelEditable: boolean, providerFactory: ProviderFactory, activePanelType?: string | undefined, activePanelColor?: string | undefined, activePanelIcon?: string | undefined) => FloatingToolbarItem<Command>[];
47
14
  export declare const getToolbarConfig: (state: EditorState, intl: InjectedIntl, options: PanelPluginOptions | undefined, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
@@ -5,4 +5,5 @@ export interface PanelPluginOptions extends LongPressSelectionPluginOptions, Pan
5
5
  }
6
6
  export interface PanelPluginConfig {
7
7
  UNSAFE_allowCustomPanel?: boolean;
8
+ UNSAFE_allowCustomPanelEdit?: boolean;
8
9
  }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export declare enum ProfiledComponentIds {
3
+ editor = "Editor",
4
+ appearance = "FullPageEditor",
5
+ reactEditorView = "ReactEditorView",
6
+ contentArea = "FullPageContentArea",
7
+ toolbar = "FullPageToolbar",
8
+ mention = "MentionNodeView"
9
+ }
10
+ declare type RenderCountProfilerProps = {
11
+ componentId: keyof typeof ProfiledComponentIds;
12
+ };
13
+ export declare const RenderCountProfiler: React.FC<RenderCountProfilerProps>;
14
+ export {};
@@ -179,6 +179,15 @@ export declare type FeatureFlags = {
179
179
  * @default false
180
180
  */
181
181
  codeBlockSyntaxHighlighting?: boolean;
182
+ /**
183
+ * @description
184
+ * Disables decorating code snippets with bidi character warnings
185
+ * when they are used in inline code and code blocks.
186
+ *
187
+ * @see https://product-fabric.atlassian.net/browse/ED-13860
188
+ * @default true
189
+ */
190
+ codeBidiWarnings?: boolean;
182
191
  /**
183
192
  * @description
184
193
  * Yield to user interaction work before sending analytics
@@ -242,5 +251,13 @@ export declare type FeatureFlags = {
242
251
  * @default false
243
252
  */
244
253
  collabAvatarScroll?: boolean;
254
+ /**
255
+ * @description
256
+ * Enable UFO experiences
257
+ *
258
+ * @see https://product-fabric.atlassian.net/browse/ED-13059
259
+ * @default false
260
+ */
261
+ ufo?: boolean;
245
262
  };
246
263
  export declare type FeatureFlagKey = keyof FeatureFlags;